@automattic/charts 0.58.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (253) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +7 -54
  3. package/dist/index.cjs +9606 -22
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.css +20 -25
  6. package/dist/index.css.map +1 -1
  7. package/dist/index.d.cts +1612 -33
  8. package/dist/index.d.ts +1612 -33
  9. package/dist/index.js +9640 -56
  10. package/dist/index.js.map +1 -1
  11. package/package.json +8 -125
  12. package/src/charts/bar-chart/bar-chart.module.scss +0 -5
  13. package/src/charts/bar-chart/bar-chart.tsx +131 -137
  14. package/src/charts/leaderboard-chart/leaderboard-chart.tsx +23 -40
  15. package/src/charts/line-chart/line-chart.module.scss +0 -5
  16. package/src/charts/line-chart/line-chart.tsx +190 -183
  17. package/src/charts/line-chart/private/line-chart-annotations-overlay.tsx +1 -2
  18. package/src/charts/pie-chart/pie-chart.module.scss +2 -10
  19. package/src/charts/pie-chart/pie-chart.tsx +198 -199
  20. package/src/charts/pie-chart/test/composition-api.test.tsx +3 -3
  21. package/src/charts/pie-chart/test/pie-chart.test.tsx +42 -35
  22. package/src/charts/pie-semi-circle-chart/pie-semi-circle-chart.module.scss +2 -8
  23. package/src/charts/pie-semi-circle-chart/pie-semi-circle-chart.tsx +155 -155
  24. package/src/charts/pie-semi-circle-chart/test/pie-semi-circle-chart.test.tsx +25 -25
  25. package/src/charts/private/chart-layout/chart-layout.module.scss +7 -0
  26. package/src/charts/private/chart-layout/chart-layout.tsx +106 -0
  27. package/src/charts/private/chart-layout/index.ts +2 -0
  28. package/src/charts/private/chart-layout/test/chart-layout.test.tsx +167 -0
  29. package/src/charts/private/single-chart-context/single-chart-context.tsx +2 -2
  30. package/src/charts/private/svg-empty-state/index.ts +1 -0
  31. package/src/charts/private/svg-empty-state/svg-empty-state.module.scss +7 -0
  32. package/src/charts/private/svg-empty-state/svg-empty-state.tsx +40 -0
  33. package/src/components/legend/hooks/test/use-chart-legend-items.test.tsx +12 -8
  34. package/src/components/legend/hooks/use-chart-legend-items.ts +12 -13
  35. package/src/components/legend/legend.tsx +33 -8
  36. package/src/components/legend/test/legend.test.tsx +93 -1
  37. package/src/hooks/index.ts +1 -0
  38. package/src/hooks/use-data-with-percentages.ts +24 -0
  39. package/src/hooks/use-interactive-legend-data.ts +18 -15
  40. package/src/index.ts +65 -2
  41. package/src/providers/chart-context/global-charts-provider.tsx +7 -1
  42. package/src/providers/chart-context/hooks/use-chart-registration.ts +2 -1
  43. package/src/providers/chart-context/types.ts +2 -2
  44. package/src/types.ts +27 -7
  45. package/src/utils/test/resolve-css-var.test.ts +2 -0
  46. package/dist/base-tooltip-DOq93wjU.d.cts +0 -38
  47. package/dist/base-tooltip-DOq93wjU.d.ts +0 -38
  48. package/dist/charts/bar-chart/index.cjs +0 -17
  49. package/dist/charts/bar-chart/index.cjs.map +0 -1
  50. package/dist/charts/bar-chart/index.css +0 -141
  51. package/dist/charts/bar-chart/index.css.map +0 -1
  52. package/dist/charts/bar-chart/index.d.cts +0 -36
  53. package/dist/charts/bar-chart/index.d.ts +0 -36
  54. package/dist/charts/bar-chart/index.js +0 -17
  55. package/dist/charts/bar-chart/index.js.map +0 -1
  56. package/dist/charts/bar-list-chart/index.cjs +0 -18
  57. package/dist/charts/bar-list-chart/index.cjs.map +0 -1
  58. package/dist/charts/bar-list-chart/index.css +0 -141
  59. package/dist/charts/bar-list-chart/index.css.map +0 -1
  60. package/dist/charts/bar-list-chart/index.d.cts +0 -92
  61. package/dist/charts/bar-list-chart/index.d.ts +0 -92
  62. package/dist/charts/bar-list-chart/index.js +0 -18
  63. package/dist/charts/bar-list-chart/index.js.map +0 -1
  64. package/dist/charts/conversion-funnel-chart/index.cjs +0 -11
  65. package/dist/charts/conversion-funnel-chart/index.cjs.map +0 -1
  66. package/dist/charts/conversion-funnel-chart/index.css +0 -157
  67. package/dist/charts/conversion-funnel-chart/index.css.map +0 -1
  68. package/dist/charts/conversion-funnel-chart/index.d.cts +0 -97
  69. package/dist/charts/conversion-funnel-chart/index.d.ts +0 -97
  70. package/dist/charts/conversion-funnel-chart/index.js +0 -11
  71. package/dist/charts/conversion-funnel-chart/index.js.map +0 -1
  72. package/dist/charts/geo-chart/index.cjs +0 -13
  73. package/dist/charts/geo-chart/index.cjs.map +0 -1
  74. package/dist/charts/geo-chart/index.css +0 -23
  75. package/dist/charts/geo-chart/index.css.map +0 -1
  76. package/dist/charts/geo-chart/index.d.cts +0 -67
  77. package/dist/charts/geo-chart/index.d.ts +0 -67
  78. package/dist/charts/geo-chart/index.js +0 -13
  79. package/dist/charts/geo-chart/index.js.map +0 -1
  80. package/dist/charts/leaderboard-chart/index.cjs +0 -21
  81. package/dist/charts/leaderboard-chart/index.cjs.map +0 -1
  82. package/dist/charts/leaderboard-chart/index.css +0 -160
  83. package/dist/charts/leaderboard-chart/index.css.map +0 -1
  84. package/dist/charts/leaderboard-chart/index.d.cts +0 -46
  85. package/dist/charts/leaderboard-chart/index.d.ts +0 -46
  86. package/dist/charts/leaderboard-chart/index.js +0 -21
  87. package/dist/charts/leaderboard-chart/index.js.map +0 -1
  88. package/dist/charts/line-chart/index.cjs +0 -17
  89. package/dist/charts/line-chart/index.cjs.map +0 -1
  90. package/dist/charts/line-chart/index.css +0 -213
  91. package/dist/charts/line-chart/index.css.map +0 -1
  92. package/dist/charts/line-chart/index.d.cts +0 -98
  93. package/dist/charts/line-chart/index.d.ts +0 -98
  94. package/dist/charts/line-chart/index.js +0 -17
  95. package/dist/charts/line-chart/index.js.map +0 -1
  96. package/dist/charts/pie-chart/index.cjs +0 -19
  97. package/dist/charts/pie-chart/index.cjs.map +0 -1
  98. package/dist/charts/pie-chart/index.css +0 -131
  99. package/dist/charts/pie-chart/index.css.map +0 -1
  100. package/dist/charts/pie-chart/index.d.cts +0 -91
  101. package/dist/charts/pie-chart/index.d.ts +0 -91
  102. package/dist/charts/pie-chart/index.js +0 -19
  103. package/dist/charts/pie-chart/index.js.map +0 -1
  104. package/dist/charts/pie-semi-circle-chart/index.cjs +0 -18
  105. package/dist/charts/pie-semi-circle-chart/index.cjs.map +0 -1
  106. package/dist/charts/pie-semi-circle-chart/index.css +0 -132
  107. package/dist/charts/pie-semi-circle-chart/index.css.map +0 -1
  108. package/dist/charts/pie-semi-circle-chart/index.d.cts +0 -88
  109. package/dist/charts/pie-semi-circle-chart/index.d.ts +0 -88
  110. package/dist/charts/pie-semi-circle-chart/index.js +0 -18
  111. package/dist/charts/pie-semi-circle-chart/index.js.map +0 -1
  112. package/dist/charts/sparkline/index.cjs +0 -18
  113. package/dist/charts/sparkline/index.cjs.map +0 -1
  114. package/dist/charts/sparkline/index.css +0 -230
  115. package/dist/charts/sparkline/index.css.map +0 -1
  116. package/dist/charts/sparkline/index.d.cts +0 -113
  117. package/dist/charts/sparkline/index.d.ts +0 -113
  118. package/dist/charts/sparkline/index.js +0 -18
  119. package/dist/charts/sparkline/index.js.map +0 -1
  120. package/dist/chunk-2A34OA5O.cjs +0 -51
  121. package/dist/chunk-2A34OA5O.cjs.map +0 -1
  122. package/dist/chunk-2I67QUIV.js +0 -895
  123. package/dist/chunk-2I67QUIV.js.map +0 -1
  124. package/dist/chunk-2ICEEQOC.js +0 -1071
  125. package/dist/chunk-2ICEEQOC.js.map +0 -1
  126. package/dist/chunk-4B7BL2DD.js +0 -120
  127. package/dist/chunk-4B7BL2DD.js.map +0 -1
  128. package/dist/chunk-4OXMTKAL.js +0 -401
  129. package/dist/chunk-4OXMTKAL.js.map +0 -1
  130. package/dist/chunk-ASLARV7L.cjs +0 -81
  131. package/dist/chunk-ASLARV7L.cjs.map +0 -1
  132. package/dist/chunk-B6NLZFRW.js +0 -617
  133. package/dist/chunk-B6NLZFRW.js.map +0 -1
  134. package/dist/chunk-BBAUQOW6.cjs +0 -120
  135. package/dist/chunk-BBAUQOW6.cjs.map +0 -1
  136. package/dist/chunk-BPYKWMI7.js +0 -194
  137. package/dist/chunk-BPYKWMI7.js.map +0 -1
  138. package/dist/chunk-CMMHCTBX.cjs +0 -373
  139. package/dist/chunk-CMMHCTBX.cjs.map +0 -1
  140. package/dist/chunk-CPPXJATQ.cjs +0 -1071
  141. package/dist/chunk-CPPXJATQ.cjs.map +0 -1
  142. package/dist/chunk-DKU775VC.js +0 -219
  143. package/dist/chunk-DKU775VC.js.map +0 -1
  144. package/dist/chunk-GRA7Y2ZG.cjs +0 -401
  145. package/dist/chunk-GRA7Y2ZG.cjs.map +0 -1
  146. package/dist/chunk-I2276W3I.cjs +0 -66
  147. package/dist/chunk-I2276W3I.cjs.map +0 -1
  148. package/dist/chunk-JJIMABHT.js +0 -351
  149. package/dist/chunk-JJIMABHT.js.map +0 -1
  150. package/dist/chunk-KJHWXOCZ.js +0 -421
  151. package/dist/chunk-KJHWXOCZ.js.map +0 -1
  152. package/dist/chunk-KRWGSOJ2.js +0 -91
  153. package/dist/chunk-KRWGSOJ2.js.map +0 -1
  154. package/dist/chunk-KXRWNFQJ.js +0 -51
  155. package/dist/chunk-KXRWNFQJ.js.map +0 -1
  156. package/dist/chunk-LTFH7SEG.js +0 -373
  157. package/dist/chunk-LTFH7SEG.js.map +0 -1
  158. package/dist/chunk-MUNOKLLE.js +0 -165
  159. package/dist/chunk-MUNOKLLE.js.map +0 -1
  160. package/dist/chunk-MXGLYWVP.cjs +0 -351
  161. package/dist/chunk-MXGLYWVP.cjs.map +0 -1
  162. package/dist/chunk-OP6PHB2U.js +0 -81
  163. package/dist/chunk-OP6PHB2U.js.map +0 -1
  164. package/dist/chunk-OYC34VTO.cjs +0 -3957
  165. package/dist/chunk-OYC34VTO.cjs.map +0 -1
  166. package/dist/chunk-PQL5I3F6.cjs +0 -421
  167. package/dist/chunk-PQL5I3F6.cjs.map +0 -1
  168. package/dist/chunk-REZTQ4PH.cjs +0 -488
  169. package/dist/chunk-REZTQ4PH.cjs.map +0 -1
  170. package/dist/chunk-TZRUHQOH.cjs +0 -91
  171. package/dist/chunk-TZRUHQOH.cjs.map +0 -1
  172. package/dist/chunk-UTYVIOWZ.js +0 -3957
  173. package/dist/chunk-UTYVIOWZ.js.map +0 -1
  174. package/dist/chunk-W2LDIX26.cjs +0 -165
  175. package/dist/chunk-W2LDIX26.cjs.map +0 -1
  176. package/dist/chunk-WSG64BVN.cjs +0 -219
  177. package/dist/chunk-WSG64BVN.cjs.map +0 -1
  178. package/dist/chunk-WTQYGUNF.js +0 -400
  179. package/dist/chunk-WTQYGUNF.js.map +0 -1
  180. package/dist/chunk-WYK7EL5R.cjs +0 -895
  181. package/dist/chunk-WYK7EL5R.cjs.map +0 -1
  182. package/dist/chunk-XC4KHJYX.cjs +0 -617
  183. package/dist/chunk-XC4KHJYX.cjs.map +0 -1
  184. package/dist/chunk-XVBH5XHE.cjs +0 -400
  185. package/dist/chunk-XVBH5XHE.cjs.map +0 -1
  186. package/dist/chunk-XWYZIFZW.js +0 -66
  187. package/dist/chunk-XWYZIFZW.js.map +0 -1
  188. package/dist/chunk-Y3NNQMAX.cjs +0 -194
  189. package/dist/chunk-Y3NNQMAX.cjs.map +0 -1
  190. package/dist/chunk-YAFQVVDI.js +0 -488
  191. package/dist/chunk-YAFQVVDI.js.map +0 -1
  192. package/dist/components/legend/index.cjs +0 -12
  193. package/dist/components/legend/index.cjs.map +0 -1
  194. package/dist/components/legend/index.css +0 -91
  195. package/dist/components/legend/index.css.map +0 -1
  196. package/dist/components/legend/index.d.cts +0 -37
  197. package/dist/components/legend/index.d.ts +0 -37
  198. package/dist/components/legend/index.js +0 -12
  199. package/dist/components/legend/index.js.map +0 -1
  200. package/dist/components/tooltip/index.cjs +0 -12
  201. package/dist/components/tooltip/index.cjs.map +0 -1
  202. package/dist/components/tooltip/index.css +0 -13
  203. package/dist/components/tooltip/index.css.map +0 -1
  204. package/dist/components/tooltip/index.d.cts +0 -71
  205. package/dist/components/tooltip/index.d.ts +0 -71
  206. package/dist/components/tooltip/index.js +0 -12
  207. package/dist/components/tooltip/index.js.map +0 -1
  208. package/dist/components/trend-indicator/index.cjs +0 -8
  209. package/dist/components/trend-indicator/index.cjs.map +0 -1
  210. package/dist/components/trend-indicator/index.css +0 -27
  211. package/dist/components/trend-indicator/index.css.map +0 -1
  212. package/dist/components/trend-indicator/index.d.cts +0 -44
  213. package/dist/components/trend-indicator/index.d.ts +0 -44
  214. package/dist/components/trend-indicator/index.js +0 -8
  215. package/dist/components/trend-indicator/index.js.map +0 -1
  216. package/dist/format-metric-value-MXm5DtQ_.d.cts +0 -24
  217. package/dist/format-metric-value-MXm5DtQ_.d.ts +0 -24
  218. package/dist/hooks/index.cjs +0 -29
  219. package/dist/hooks/index.cjs.map +0 -1
  220. package/dist/hooks/index.css +0 -9
  221. package/dist/hooks/index.css.map +0 -1
  222. package/dist/hooks/index.d.cts +0 -264
  223. package/dist/hooks/index.d.ts +0 -264
  224. package/dist/hooks/index.js +0 -29
  225. package/dist/hooks/index.js.map +0 -1
  226. package/dist/leaderboard-chart-BSbg0ufV.d.cts +0 -79
  227. package/dist/leaderboard-chart-odEYxxEC.d.ts +0 -79
  228. package/dist/legend-DFkosEvC.d.cts +0 -9
  229. package/dist/legend-DLswHhOk.d.ts +0 -9
  230. package/dist/providers/index.cjs +0 -21
  231. package/dist/providers/index.cjs.map +0 -1
  232. package/dist/providers/index.css +0 -9
  233. package/dist/providers/index.css.map +0 -1
  234. package/dist/providers/index.d.cts +0 -28
  235. package/dist/providers/index.d.ts +0 -28
  236. package/dist/providers/index.js +0 -21
  237. package/dist/providers/index.js.map +0 -1
  238. package/dist/themes-D0qc5JaW.d.cts +0 -67
  239. package/dist/themes-itO4Ht5g.d.ts +0 -67
  240. package/dist/types-B5f6XQ7Q.d.cts +0 -19
  241. package/dist/types-BsHooDbM.d.ts +0 -19
  242. package/dist/types-BuSrRM4p.d.ts +0 -49
  243. package/dist/types-ChOUI9-N.d.cts +0 -545
  244. package/dist/types-ChOUI9-N.d.ts +0 -545
  245. package/dist/types-Dfw9VOKI.d.cts +0 -49
  246. package/dist/utils/index.cjs +0 -44
  247. package/dist/utils/index.cjs.map +0 -1
  248. package/dist/utils/index.d.cts +0 -226
  249. package/dist/utils/index.d.ts +0 -226
  250. package/dist/utils/index.js +0 -44
  251. package/dist/utils/index.js.map +0 -1
  252. package/dist/with-responsive-CNfhzAUu.d.cts +0 -18
  253. package/dist/with-responsive-CNfhzAUu.d.ts +0 -18
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/jetpack/jetpack/projects/js-packages/charts/dist/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,utDAAC","file":"/home/runner/work/jetpack/jetpack/projects/js-packages/charts/dist/index.cjs"}
1
+ {"version":3,"sources":["/home/runner/work/jetpack/jetpack/projects/js-packages/charts/dist/index.cjs","../../../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js","../../../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js","../../../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js","../../../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js","../../../../node_modules/.pnpm/hoist-non-react-statics@3.3.2/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","../../../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/es6/index.js","webpack:///webpack/bootstrap%20e215e692fd94470ebd89","webpack:///src/index.js","webpack:///src/utils.js","../src/charts/bar-chart/bar-chart.tsx","../src/components/legend/legend.tsx","../src/charts/private/single-chart-context/single-chart-context.tsx","../src/charts/private/single-chart-context/use-single-chart-context.ts","../src/providers/chart-context/global-charts-provider.tsx","../src/hooks/use-tooltip-portal-relocator.ts","../src/hooks/use-tooltip-portal-relocator.module.scss","../src/utils/create-composition.ts","../src/utils/date-parsing.ts","../src/utils/format-metric-value.ts","../src/utils/format-percentage.ts","../src/utils/get-longest-tick-width.ts","../src/utils/get-styles.ts","../src/utils/is-safari.ts","../src/utils/merge-themes.ts","../src/utils/color-utils.ts","../src/utils/resolve-css-var.ts","../src/providers/chart-context/private/get-chart-color.ts","../src/providers/chart-context/themes.ts","../src/providers/chart-context/hooks/use-global-charts-context.ts","../src/providers/chart-context/hooks/use-chart-id.ts","../src/providers/chart-context/hooks/use-chart-registration.ts","../src/hooks/use-deep-memo.ts","../src/hooks/use-xychart-theme.ts","../src/hooks/use-chart-data-transform.ts","../src/hooks/use-chart-margin.tsx","../src/hooks/use-element-size.ts","../src/hooks/use-text-truncation.ts","../src/hooks/use-zero-value-display.ts","../src/hooks/use-data-with-percentages.ts","../src/hooks/use-interactive-legend-data.ts","../src/hooks/use-prefers-reduced-motion.ts","../src/providers/chart-context/hooks/use-global-charts-theme.ts","../src/components/legend/private/base-legend.tsx","../src/components/legend/utils/value-or-identity.ts","../src/components/legend/utils/label-transform-factory.ts","../src/components/legend/private/base-legend.module.scss","../src/components/legend/hooks/use-chart-legend-items.ts","../src/components/tooltip/base-tooltip.tsx","../src/components/tooltip/base-tooltip.module.scss","../src/components/tooltip/accessible-tooltip.tsx","../src/charts/private/chart-composition/chart-svg.tsx","../src/charts/private/chart-composition/chart-html.tsx","../src/charts/private/chart-composition/render-legend-slot.ts","../src/charts/private/chart-composition/use-chart-children.ts","../../../../node_modules/.pnpm/@base-ui+utils@0.2.5_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/esm/useRefWithInit.js","../../../../node_modules/.pnpm/@base-ui+utils@0.2.5_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/esm/formatErrorMessage.js","../../../../node_modules/.pnpm/@base-ui+react@1.2.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/esm/utils/useRenderElement.js","../../../../node_modules/.pnpm/@base-ui+utils@0.2.5_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/esm/useMergedRefs.js","../../../../node_modules/.pnpm/@base-ui+utils@0.2.5_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/esm/getReactElementRef.js","../../../../node_modules/.pnpm/@base-ui+utils@0.2.5_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/esm/reactVersion.js","../../../../node_modules/.pnpm/@base-ui+utils@0.2.5_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/esm/mergeObjects.js","../../../../node_modules/.pnpm/@base-ui+react@1.2.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/esm/utils/getStateAttributesProps.js","../../../../node_modules/.pnpm/@base-ui+react@1.2.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/esm/utils/resolveClassName.js","../../../../node_modules/.pnpm/@base-ui+react@1.2.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/esm/utils/resolveStyle.js","../../../../node_modules/.pnpm/@base-ui+react@1.2.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/esm/merge-props/mergeProps.js","../../../../node_modules/.pnpm/@base-ui+utils@0.2.5_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/utils/esm/empty.js","../../../../node_modules/.pnpm/@base-ui+react@1.2.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@base-ui/react/esm/use-render/useRender.js","../../../../node_modules/.pnpm/@wordpress+element@6.42.0/node_modules/@wordpress/element/src/react.ts","../../../../node_modules/.pnpm/is-plain-object@5.0.0/node_modules/is-plain-object/dist/is-plain-object.mjs","../../../../node_modules/.pnpm/lower-case@2.0.2/node_modules/lower-case/src/index.ts","../../../../node_modules/.pnpm/no-case@3.0.4/node_modules/no-case/src/index.ts","../../../../node_modules/.pnpm/dot-case@3.0.4/node_modules/dot-case/src/index.ts","../../../../node_modules/.pnpm/param-case@3.0.4/node_modules/param-case/src/index.ts","../../../../node_modules/.pnpm/@wordpress+ui@0.9.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1_stylelint@16.26.1/node_modules/@wordpress/ui/src/stack/style.module.css","../../../../node_modules/.pnpm/@wordpress+ui@0.9.0_@types+react@18.3.28_react-dom@18.3.1_react@18.3.1__react@18.3.1_stylelint@16.26.1/node_modules/@wordpress/ui/src/stack/stack.tsx","../src/charts/private/chart-layout/chart-layout.tsx","../src/charts/private/chart-layout/chart-layout.module.scss","../src/charts/private/svg-empty-state/svg-empty-state.module.scss","../src/charts/private/svg-empty-state/svg-empty-state.tsx","../src/charts/private/with-responsive/with-responsive.tsx","../src/charts/private/with-responsive/with-responsive.module.scss","../src/charts/bar-chart/bar-chart.module.scss","../src/charts/bar-chart/private/use-bar-chart-options.ts","../src/charts/bar-chart/private/truncated-tick-component.tsx","../src/charts/bar-list-chart/bar-list-chart.tsx","../src/charts/conversion-funnel-chart/conversion-funnel-chart.tsx","../src/charts/conversion-funnel-chart/conversion-funnel-chart.module.scss","../src/charts/conversion-funnel-chart/private/use-funnel-selection.ts","../src/charts/geo-chart/geo-chart.tsx","../src/charts/geo-chart/geo-chart.module.scss","../../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/src/utils/values.js","../../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/src/utils/hooks/use-update-effect.js","../../../../node_modules/.pnpm/@emotion+react@11.14.0_@types+react@18.3.28_react@18.3.1/node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js","../../../../node_modules/.pnpm/@emotion+sheet@1.4.0/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js","../../../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Enum.js","../../../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Utility.js","../../../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Tokenizer.js","../../../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Parser.js","../../../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Serializer.js","../../../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Middleware.js","../../../../node_modules/.pnpm/@emotion+weak-memoize@0.4.0/node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js","../../../../node_modules/.pnpm/@emotion+memoize@0.9.0/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js","../../../../node_modules/.pnpm/@emotion+cache@11.14.0/node_modules/@emotion/cache/dist/emotion-cache.esm.js","../../../../node_modules/.pnpm/@emotion+utils@1.4.2/node_modules/@emotion/utils/dist/emotion-utils.esm.js","../../../../node_modules/.pnpm/@emotion+hash@0.9.2/node_modules/@emotion/hash/dist/emotion-hash.esm.js","../../../../node_modules/.pnpm/@emotion+unitless@0.10.0/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js","../../../../node_modules/.pnpm/@emotion+serialize@1.3.3/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js","../../../../node_modules/.pnpm/@emotion+use-insertion-effect-with-fallbacks@1.2.0_react@18.3.1/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.esm.js","../../../../node_modules/.pnpm/@emotion+react@11.14.0_@types+react@18.3.28_react@18.3.1/node_modules/@emotion/react/dist/emotion-react.esm.js","../../../../node_modules/.pnpm/@emotion+css@11.13.5/node_modules/@emotion/css/create-instance/dist/emotion-css-create-instance.esm.js","../../../../node_modules/.pnpm/@emotion+css@11.13.5/node_modules/@emotion/css/dist/emotion-css.esm.js","../../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/src/utils/hooks/use-cx.ts","../../../../node_modules/.pnpm/memize@2.1.1/node_modules/memize/dist/index.js","../../../../node_modules/.pnpm/colord@2.9.3/node_modules/colord/index.mjs","../../../../node_modules/.pnpm/colord@2.9.3/node_modules/colord/plugins/names.mjs","../../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/src/utils/colors.js","../../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/src/utils/colors-values.js","../../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/src/utils/config-values.js","../../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/src/context/context-system-provider.js","../../../../node_modules/.pnpm/@wordpress+warning@3.42.0/node_modules/@wordpress/warning/src/utils.ts","../../../../node_modules/.pnpm/@wordpress+warning@3.42.0/node_modules/@wordpress/warning/src/index.ts","../../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/src/context/constants.js","../../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/src/context/get-styled-class-name-from-key.ts","../../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/src/context/context-connect.ts","../../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/src/context/utils.js","../../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/src/context/use-context-system.js","../../../../node_modules/.pnpm/@emotion+styled@11.14.1_@emotion+react@11.14.0_@types+react@18.3.28_react@18.3.1__@types+react@18.3.28_react@18.3.1/node_modules/@emotion/styled/base/dist/emotion-styled-base.esm.js","../../../../node_modules/.pnpm/@emotion+is-prop-valid@1.4.0/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js","../../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/src/view/component.tsx","../../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/src/utils/use-responsive-value.ts","../../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/src/utils/space.ts","../../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/src/truncate/styles.ts","../../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/src/truncate/utils.ts","../../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/src/truncate/hook.ts","../../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/src/text/styles.ts","../../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/src/text/utils.ts","../../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/src/utils/font-size.ts","../../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/src/text/get-line-height.ts","../../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/src/text/hook.ts","../../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/src/text/component.tsx","../../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/src/grid/utils.ts","../../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/src/grid/hook.ts","../../../../node_modules/.pnpm/@wordpress+components@32.4.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wordpress/components/src/grid/component.tsx","../src/charts/leaderboard-chart/leaderboard-chart.tsx","../src/charts/leaderboard-chart/hooks/use-leaderboard-legend-items.ts","../src/charts/leaderboard-chart/leaderboard-chart.module.scss","../src/charts/line-chart/line-chart.tsx","../src/charts/private/default-glyph/default-glyph.tsx","../src/charts/line-chart/line-chart.module.scss","../src/charts/line-chart/private/line-chart-annotation-label-popover.tsx","../src/charts/line-chart/private/line-chart-annotations-overlay.tsx","../src/charts/line-chart/private/line-chart-annotation.tsx","../src/charts/line-chart/private/line-chart-glyph.tsx","../src/charts/pie-chart/pie-chart.tsx","../src/charts/private/radial-wipe-animation/radial-wipe-animation.tsx","../src/charts/pie-chart/pie-chart.module.scss","../src/charts/pie-semi-circle-chart/pie-semi-circle-chart.tsx","../src/charts/pie-semi-circle-chart/pie-semi-circle-chart.module.scss","../src/charts/sparkline/sparkline.tsx","../src/charts/sparkline/sparkline.module.scss","../src/components/trend-indicator/trend-indicator.tsx","../src/components/trend-indicator/trend-indicator.module.scss"],"names":["a","b","length","i","c","d","e","f","g","h","k","l","m","n","p","r","t","v","w","x","y","u","REACT_LAZY_TYPE","Fragment","StrictMode","Suspense","module","combineChunks","fillInChunks","findAll","findChunks","_ref","autoEscape","caseSensitive","defaultFindChunks","sanitize","searchWords","textToHighlight","chunksToHighlight","chunks","totalLength","sort","first","second","start","reduce","processedChunks","nextChunk","prevChunk","pop","end","endIndex","Math","max","push","highlight","defaultSanitize","filter","searchWord","escapeRegExpFn","regex","RegExp","match","exec","index","lastIndex","allChunks","append","forEach","chunk","string","replace","node","Chart","formatNumber","getStringWidth","varName","d3Hsl","prev","useContext","useEffect","useRef","useMemo","useState","useCallback","_jsx","_jsxs","_Fragment","Group","position","result","Children","cloneElement","createContext","createElement","forwardRef","isValidElement","useId","useLayoutEffect","re","__assign","formatNumberCompact","renderDefaultTooltip","createScale","from","getScaleBandwidth","clsx","flush","StyleSheet","character","characters","weakMemoize","toRules","getRules","compat","removeLabel","prefixer","createCache","stylis","sheet","_stylis","_insert","cache","keyframes","next","Insertion","_ref2","css","cx","injectGlobal","hydrate","classnames","o","fastDeepEqual","Component","createStyled","_EMOTION_STRINGIFIED_CSS_ERROR__","upperCase","Text","Grid","XYChart","DataContext","__","yMin","yMax","xMin","xMax","_createElement","formatDateTick","validateData","toNumber","useTooltip","isValid","Pie","DEFAULT_WIDTH"],"mappings":"AAAA;AACE;A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ACJ,EAAA;AACd,EAAA;AACA,EAAA;AACgB,EAAA;AAChB,EAAA;AACA,EAAA;AACqB,EAAA;AACH,EAAA;AACH,EAAA;AACf,EAAA;AACe,EAAA;AACQ,EAAA;AACvB,EAAA;AACC;AACc,EAAA;AACN,IAAA;AACT,EAAA;AACwB,EAAA;AACf,IAAA;AACT,EAAA;AACwB,EAAA;AACT,EAAA;AACb,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACD,EAAA;AACoB,EAAA;AACA,EAAA;AACjB,EAAA;AACA,EAAA;AACgB,EAAA;AACL,IAAA;AACQ,IAAA;AACnB,MAAA;AACI,MAAA;AACO,MAAA;AACJ,QAAA;AACH,UAAA;AACiB,UAAA;AACZ,QAAA;AACY,UAAA;AACnB,QAAA;AACK,MAAA;AACY,QAAA;AACnB,MAAA;AACiB,MAAA;AACjB,MAAA;AACkB,MAAA;AACJ,MAAA;AACF,QAAA;AACC,QAAA;AACN,QAAA;AACE,QAAA;AACT,MAAA;AAIW,MAAA;AACH,QAAA;AACR,MAAA;AACO1C,MAAAA;AACT,IAAA;AACqB,IAAA;AACT,MAAA;AACC,MAAA;AACN,MAAA;AACE,MAAA;AACR,IAAA;AACF,EAAA;AACM,EAAA;AACT;AxI6qN2B;AACA;AyInzNG;AACG;AACzB,EAAA;AACG,EAAA;AACC,EAAA;AACE,EAAA;AACC,EAAA;AACN,EAAA;AACT;AACmC;AACP;AACd,EAAA;AACS,IAAA;AACrB,EAAA;AACoB,EAAA;AACH,IAAA;AACQ,IAAA;AACd,MAAA;AACT,IAAA;AACO,IAAA;AACT,EAAA;AACsB,EAAA;AACF,EAAA;AACtB;AzIqzN2B;AACA;A0I30NG;AACZ,EAAA;AACP,IAAA;AACT,EAAA;AACK,EAAA;AACH,IAAA;AACF,EAAA;AACoB,EAAA;AACZ,EAAA;AACD,IAAA;AACa,MAAA;AAChB,MAAA;AACG,IAAA;AACa,MAAA;AAChB,MAAA;AACG,IAAA;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,QAAA;AACjB2C,UAAAA;AACJ,UAAA;AACiB,UAAA;AACX,UAAA;AACP,QAAA;AACF,MAAA;AACF,IAAA;AACH,EAAA;AACoB3C,EAAAA;AAClB,IAAA;AACgB,IAAA;AACO,IAAA;AACf,MAAA;AACN,MAAA;AACA,MAAA;AACQ,MAAA;AACR,MAAA;AACA,MAAA;AACc,MAAA;AACF,MAAA;AACI,MAAA;AACP,MAAA;AACD,QAAA;AACD,UAAA;AACQ,YAAA;AACX,UAAA;AACG,UAAA;AACQ,YAAA;AACX,UAAA;AACF,QAAA;AACF,MAAA;AACW,MAAA;AACX,MAAA;AACD,IAAA;AACF,EAAA;AACF;AACkB;AAYb;AACgB;AAKJ;A/JyoSS;AACA;AiKl0SV;AjKo0SU;AACA;AkKr0S0D;AAChE,EAAA;AACI,EAAA;AACE,EAAA;AACzB,EAAA;AACyB,EAAA;AACzB,EAAA;AACF;AlKu0S2B;AACA;AiK70SL;AACG;AACnB,EAAA;AACE,EAAA;AACG,EAAA;AACX;AACc;AACZ,EAAA;AACI;AACc,EAAA;AACT,IAAA;AACT,EAAA;AACa,EAAA;AACOA,EAAAA;AACP,IAAA;AACF,IAAA;AACH,IAAA;AACS,IAAA;AACQ,IAAA;AACX,MAAA;AACF,MAAA;AACK,MAAA;AACE,MAAA;AACC,MAAA;AACjB,IAAA;AACF,EAAA;AACH;AAS+B;AAC7B,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACW,EAAA;AACV;AACoB,EAAA;AACDC,EAAAA;AACF,IAAA;AAChB,IAAA;AACc,IAAA;AACsB,IAAA;AAClC,MAAA;AACeD,IAAAA;AACJ,MAAA;AACD,MAAA;AACV,IAAA;AACH,EAAA;AACH;AjKu0S2B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/jetpack/jetpack/projects/js-packages/charts/dist/index.cjs","sourcesContent":[null,"'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","/** @license React v16.13.1\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n var envHasBigInt64Array = typeof BigInt64Array !== 'undefined';\n\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n if ((a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n for (i of a.entries())\n if (!b.has(i[0])) return false;\n for (i of a.entries())\n if (!equal(i[1], b.get(i[0]))) return false;\n return true;\n }\n\n if ((a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n for (i of a.entries())\n if (!b.has(i[0])) return false;\n return true;\n }\n\n if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap e215e692fd94470ebd89","// @flow\n\nexport { combineChunks, fillInChunks, findAll, findChunks } from './utils'\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","// @flow\n\nexport type Chunk = {|\n highlight: boolean,\n start: number,\n end: number,\n|};\n\n/**\n * Creates an array of chunk objects representing both higlightable and non highlightable pieces of text that match each search word.\n * @return Array of \"chunks\" (where a Chunk is { start:number, end:number, highlight:boolean })\n */\nexport const findAll = ({\n autoEscape,\n caseSensitive = false,\n findChunks = defaultFindChunks,\n sanitize,\n searchWords,\n textToHighlight\n}: {\n autoEscape?: boolean,\n caseSensitive?: boolean,\n findChunks?: typeof defaultFindChunks,\n sanitize?: typeof defaultSanitize,\n searchWords: Array<string>,\n textToHighlight: string,\n}): Array<Chunk> => (\n fillInChunks({\n chunksToHighlight: combineChunks({\n chunks: findChunks({\n autoEscape,\n caseSensitive,\n sanitize,\n searchWords,\n textToHighlight\n })\n }),\n totalLength: textToHighlight ? textToHighlight.length : 0\n })\n)\n\n/**\n * Takes an array of {start:number, end:number} objects and combines chunks that overlap into single chunks.\n * @return {start:number, end:number}[]\n */\nexport const combineChunks = ({\n chunks\n}: {\n chunks: Array<Chunk>,\n}): Array<Chunk> => {\n chunks = chunks\n .sort((first, second) => first.start - second.start)\n .reduce((processedChunks, nextChunk) => {\n // First chunk just goes straight in the array...\n if (processedChunks.length === 0) {\n return [nextChunk]\n } else {\n // ... subsequent chunks get checked to see if they overlap...\n const prevChunk = processedChunks.pop()\n if (nextChunk.start < prevChunk.end) {\n // It may be the case that prevChunk completely surrounds nextChunk, so take the\n // largest of the end indexes.\n const endIndex = Math.max(prevChunk.end, nextChunk.end)\n processedChunks.push({highlight: false, start: prevChunk.start, end: endIndex})\n } else {\n processedChunks.push(prevChunk, nextChunk)\n }\n return processedChunks\n }\n }, [])\n\n return chunks\n}\n\n/**\n * Examine text for any matches.\n * If we find matches, add them to the returned array as a \"chunk\" object ({start:number, end:number}).\n * @return {start:number, end:number}[]\n */\nconst defaultFindChunks = ({\n autoEscape,\n caseSensitive,\n sanitize = defaultSanitize,\n searchWords,\n textToHighlight\n}: {\n autoEscape?: boolean,\n caseSensitive?: boolean,\n sanitize?: typeof defaultSanitize,\n searchWords: Array<string>,\n textToHighlight: string,\n}): Array<Chunk> => {\n textToHighlight = sanitize(textToHighlight)\n\n return searchWords\n .filter(searchWord => searchWord) // Remove empty words\n .reduce((chunks, searchWord) => {\n searchWord = sanitize(searchWord)\n\n if (autoEscape) {\n searchWord = escapeRegExpFn(searchWord)\n }\n\n const regex = new RegExp(searchWord, caseSensitive ? 'g' : 'gi')\n\n let match\n while ((match = regex.exec(textToHighlight))) {\n let start = match.index\n let end = regex.lastIndex\n // We do not return zero-length matches\n if (end > start) {\n chunks.push({highlight: false, start, end})\n }\n\n // Prevent browsers like Firefox from getting stuck in an infinite loop\n // See http://www.regexguru.com/2008/04/watch-out-for-zero-length-matches/\n if (match.index === regex.lastIndex) {\n regex.lastIndex++\n }\n }\n\n return chunks\n }, [])\n}\n// Allow the findChunks to be overridden in findAll,\n// but for backwards compatibility we export as the old name\nexport {defaultFindChunks as findChunks}\n\n/**\n * Given a set of chunks to highlight, create an additional set of chunks\n * to represent the bits of text between the highlighted text.\n * @param chunksToHighlight {start:number, end:number}[]\n * @param totalLength number\n * @return {start:number, end:number, highlight:boolean}[]\n */\nexport const fillInChunks = ({\n chunksToHighlight,\n totalLength\n}: {\n chunksToHighlight: Array<Chunk>,\n totalLength: number,\n}): Array<Chunk> => {\n const allChunks = []\n const append = (start, end, highlight) => {\n if (end - start > 0) {\n allChunks.push({\n start,\n end,\n highlight\n })\n }\n }\n\n if (chunksToHighlight.length === 0) {\n append(0, totalLength, false)\n } else {\n let lastIndex = 0\n chunksToHighlight.forEach((chunk) => {\n append(lastIndex, chunk.start, false)\n append(chunk.start, chunk.end, true)\n lastIndex = chunk.end\n })\n append(lastIndex, totalLength, false)\n }\n return allChunks\n}\n\nfunction defaultSanitize (string: string): string {\n return string\n}\n\nfunction escapeRegExpFn (string: string): string {\n return string.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&')\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils.js","import { formatNumber } from '@automattic/number-formatters';\nimport { PatternLines, PatternCircles, PatternWaves, PatternHexagons } from '@visx/pattern';\nimport { Axis, BarSeries, BarGroup, Grid, XYChart } from '@visx/xychart';\nimport { __ } from '@wordpress/i18n';\nimport clsx from 'clsx';\nimport { useCallback, useContext, useState, useRef, useMemo } from 'react';\nimport { Legend, useChartLegendItems } from '../../components/legend';\nimport { AccessibleTooltip, useKeyboardNavigation } from '../../components/tooltip';\nimport { useXYChartTheme, useChartDataTransform, useZeroValueDisplay, useChartMargin, usePrefersReducedMotion } from '../../hooks';\nimport { GlobalChartsProvider, useChartId, useChartRegistration, useGlobalChartsContext, GlobalChartsContext } from '../../providers';\nimport { attachSubComponents } from '../../utils';\nimport { useChartChildren } from '../private/chart-composition';\nimport { ChartLayout } from '../private/chart-layout';\nimport { SingleChartContext } from '../private/single-chart-context';\nimport { SvgEmptyState } from '../private/svg-empty-state';\nimport { withResponsive } from '../private/with-responsive';\nimport styles from './bar-chart.module.scss';\nimport { useBarChartOptions } from './private';\n\n// Base props type with optional responsive properties\n\n// Composition API types\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\n// Validation function similar to LineChart\nconst validateData = data => {\n if (!data?.length) return 'No data available';\n const hasInvalidData = data.some(series => series.data.some(point => isNaN(point.value) || point.value === null || point.value === undefined || !point.label && (!('date' in point && point.date) || isNaN(point.date.getTime()))));\n if (hasInvalidData) return 'Invalid data';\n return null;\n};\nconst getPatternId = (chartId, index) => `bar-pattern-${chartId}-${index}`;\nconst BarChartInternal = ({\n data,\n chartId: providedChartId,\n width,\n height,\n className,\n margin,\n withTooltips = false,\n showLegend = false,\n legend = {},\n gridVisibility: gridVisibilityProp,\n renderTooltip,\n options = {},\n orientation = 'vertical',\n withPatterns = false,\n showZeroValues = false,\n animation,\n children,\n gap = 'md'\n}) => {\n const legendInteractive = legend.interactive ?? false;\n const horizontal = orientation === 'horizontal';\n const chartId = useChartId(providedChartId);\n const theme = useXYChartTheme(data);\n const dataSorted = useChartDataTransform(data);\n\n // Transform data to add a small value for zero bars to make them visible\n // For vertical bars, height determines bar pixel height; for horizontal bars, width does\n const dataWithVisibleZeros = useZeroValueDisplay(dataSorted, {\n enabled: showZeroValues,\n valueAxisLength: horizontal ? width : height\n });\n\n // Create legend items using the reusable hook\n const legendItems = useChartLegendItems(dataSorted);\n const chartOptions = useBarChartOptions(dataWithVisibleZeros, horizontal, options);\n const defaultMargin = useChartMargin(height, chartOptions, dataSorted, theme, horizontal);\n const chartRef = useRef(null);\n\n // Process children for composition API (Legend, etc.)\n const {\n legendChildren,\n nonLegendChildren\n } = useChartChildren(children, 'BarChart');\n const [measuredChartHeight, setMeasuredChartHeight] = useState();\n const handleContentHeightChange = useCallback(contentHeight => {\n const chartHeight = contentHeight > 0 ? contentHeight : height;\n setMeasuredChartHeight(chartHeight);\n }, [height]);\n const [selectedIndex, setSelectedIndex] = useState(undefined);\n const [isNavigating, setIsNavigating] = useState(false);\n const totalPoints = Math.max(0, ...data.map(series => series.data?.length || 0)) * data.length;\n\n // Use the keyboard navigation hook\n const {\n tooltipRef,\n onChartFocus,\n onChartBlur,\n onChartKeyDown\n } = useKeyboardNavigation({\n selectedIndex,\n setSelectedIndex,\n isNavigating,\n setIsNavigating,\n chartRef,\n totalPoints\n });\n const {\n getElementStyles,\n isSeriesVisible\n } = useGlobalChartsContext();\n\n // Add visibility information to series when using interactive legends\n const seriesWithVisibility = useMemo(() => {\n if (!chartId || !legendInteractive) {\n return dataWithVisibleZeros.map((series, index) => ({\n series,\n index,\n isVisible: true\n }));\n }\n return dataWithVisibleZeros.map((series, index) => ({\n series,\n index,\n isVisible: isSeriesVisible(chartId, series.label)\n }));\n }, [dataWithVisibleZeros, chartId, isSeriesVisible, legendInteractive]);\n\n // Check if all series are hidden\n const allSeriesHidden = useMemo(() => {\n return seriesWithVisibility.every(({\n isVisible\n }) => !isVisible);\n }, [seriesWithVisibility]);\n const getBarBackground = useCallback(index => () => withPatterns ? `url(#${getPatternId(chartId, index)})` : getElementStyles({\n data: dataSorted[index],\n index\n }).color, [withPatterns, getElementStyles, dataSorted, chartId]);\n const renderDefaultTooltip = useCallback(({\n tooltipData\n }) => {\n const nearestDatum = tooltipData?.nearestDatum?.datum;\n if (!nearestDatum) return null;\n return /*#__PURE__*/_jsxs(\"div\", {\n className: styles['bar-chart__tooltip'],\n children: [/*#__PURE__*/_jsx(\"div\", {\n className: styles['bar-chart__tooltip-header'],\n children: tooltipData?.nearestDatum?.key\n }), /*#__PURE__*/_jsxs(\"div\", {\n className: styles['bar-chart__tooltip-row'],\n children: [/*#__PURE__*/_jsxs(\"span\", {\n className: styles['bar-chart__tooltip-label'],\n children: [chartOptions.tooltip.labelFormatter(nearestDatum.label || (nearestDatum.date ? nearestDatum.date.getTime() : 0), 0, []), \":\"]\n }), /*#__PURE__*/_jsx(\"span\", {\n className: styles['bar-chart__tooltip-value'],\n children: formatNumber(nearestDatum.value)\n })]\n })]\n });\n }, [chartOptions.tooltip]);\n const renderPattern = useCallback((index, color) => {\n const patternType = index % 4;\n const id = getPatternId(chartId, index);\n const commonProps = {\n id,\n stroke: 'white',\n strokeWidth: 1,\n background: color\n };\n switch (patternType) {\n case 0:\n default:\n return /*#__PURE__*/_jsx(PatternLines, {\n ...commonProps,\n width: 5,\n height: 5,\n orientation: ['diagonal']\n }, id);\n case 1:\n return /*#__PURE__*/_jsx(PatternCircles, {\n ...commonProps,\n width: 6,\n height: 6,\n fill: \"white\"\n }, id);\n case 2:\n return /*#__PURE__*/_jsx(PatternWaves, {\n ...commonProps,\n width: 4,\n height: 4\n }, id);\n case 3:\n return /*#__PURE__*/_jsx(PatternHexagons, {\n ...commonProps,\n size: 8,\n height: 3\n }, id);\n }\n }, [chartId]);\n const createPatternBorderStyle = useCallback((index, color) => {\n const patternId = getPatternId(chartId, index);\n return `\n\t\t\t.visx-bar[fill=\"url(#${patternId})\"] {\n\t\t\t\tstroke: ${color};\n\t\t\t\tstroke-width: 1;\n\t\t\t\t}\n\t\t\t`;\n }, [chartId]);\n const createKeyboardHighlightStyle = useCallback(() => {\n if (selectedIndex === undefined) return '';\n\n // Calculate which bar should be highlighted based on selectedIndex\n // Pattern: [series1[0], series2[0], series3[0], series1[1], series2[1], series3[1], ...]\n const maxDataPoints = Math.max(...data.map(s => s.data.length));\n const dataPointIndex = Math.floor(selectedIndex / data.length);\n const seriesIndex = selectedIndex % data.length;\n\n // Only highlight if we're within valid bounds\n if (dataPointIndex >= maxDataPoints || seriesIndex >= data.length) {\n return '';\n }\n const seriesData = data[seriesIndex];\n if (dataPointIndex >= seriesData.data.length) {\n return '';\n }\n\n // Based on the DOM structure analysis:\n // - All bars are in a single .visx-bar-group\n // - Bars are ordered as: [series1[0], series1[1], series2[0], series2[1], ...]\n // - So we need to calculate the actual bar index in the DOM\n const actualBarIndex = seriesIndex * maxDataPoints + dataPointIndex;\n\n // Use a CSS class selector instead of ID since useId() generates invalid CSS ID characters\n const generatedStyles = `\n\t\t\t.bar-chart[data-chart-id=\"bar-chart-${chartId}\"] .visx-bar-group .visx-bar:nth-child(${actualBarIndex + 1}) {\n\t\t\t\tstroke: #005fcc;\n\t\t\t\tstroke-width: 2px;\n\t\t\t}\n\t\t`;\n return generatedStyles;\n }, [selectedIndex, data, chartId]);\n\n // Validate data first\n const error = validateData(dataSorted);\n const isDataValid = !error;\n\n // Memoize metadata to prevent unnecessary re-registration\n const chartMetadata = useMemo(() => ({\n orientation,\n withPatterns\n }), [orientation, withPatterns]);\n\n // Register chart with context only if data is valid\n useChartRegistration({\n chartId,\n legendItems,\n chartType: 'bar',\n isDataValid,\n metadata: chartMetadata\n });\n const prefersReducedMotion = usePrefersReducedMotion();\n if (error) {\n return /*#__PURE__*/_jsx(\"div\", {\n className: clsx('bar-chart', styles['bar-chart']),\n children: error\n });\n }\n const gridVisibility = gridVisibilityProp ?? chartOptions.gridVisibility;\n const highlightedBarStyle = createKeyboardHighlightStyle();\n const legendPosition = legend.position ?? 'bottom';\n const legendElement = showLegend && /*#__PURE__*/_jsx(Legend, {\n orientation: legend.orientation ?? 'horizontal',\n position: legendPosition,\n alignment: legend.alignment ?? 'center',\n labelStyles: legend.labelStyles,\n itemClassName: legend.itemClassName,\n itemStyles: legend.itemStyles,\n shapeStyles: legend.shapeStyles,\n className: styles['bar-chart__legend'],\n shape: legend.shape ?? 'rect',\n chartId: chartId,\n interactive: legendInteractive\n });\n return /*#__PURE__*/_jsx(SingleChartContext.Provider, {\n value: {\n chartId,\n chartWidth: width,\n chartHeight: measuredChartHeight || 0\n },\n children: /*#__PURE__*/_jsx(ChartLayout, {\n legendPosition: legendPosition,\n legendElement: legendElement,\n legendChildren: legendChildren,\n gap: gap,\n className: clsx('bar-chart', styles['bar-chart'], {\n [styles[`bar-chart--animated${horizontal ? '-horizontal' : ''}`]]: animation && !prefersReducedMotion\n }, className),\n style: {\n width,\n height\n },\n \"data-chart-id\": `bar-chart-${chartId}`,\n trailingContent: nonLegendChildren,\n onContentHeightChange: handleContentHeightChange,\n children: ({\n contentHeight\n }) => {\n const chartHeight = contentHeight > 0 ? contentHeight : height;\n return /*#__PURE__*/_jsx(\"div\", {\n role: \"grid\",\n \"aria-label\": __('Bar chart', 'jetpack-charts'),\n tabIndex: 0,\n onKeyDown: onChartKeyDown,\n onFocus: onChartFocus,\n onBlur: onChartBlur,\n children: chartHeight > 0 && /*#__PURE__*/_jsx(\"div\", {\n ref: chartRef,\n children: /*#__PURE__*/_jsxs(XYChart, {\n theme: theme,\n width: width,\n height: chartHeight,\n margin: {\n ...defaultMargin,\n ...margin\n },\n xScale: chartOptions.xScale,\n yScale: chartOptions.yScale,\n horizontal: horizontal,\n pointerEventsDataKey: \"nearest\",\n children: [/*#__PURE__*/_jsx(Grid, {\n columns: gridVisibility.includes('y'),\n rows: gridVisibility.includes('x'),\n numTicks: 4\n }), withPatterns && /*#__PURE__*/_jsxs(_Fragment, {\n children: [/*#__PURE__*/_jsx(\"defs\", {\n children: dataSorted.map((seriesData, index) => renderPattern(index, getElementStyles({\n data: seriesData,\n index\n }).color))\n }), /*#__PURE__*/_jsx(\"style\", {\n children: dataSorted.map((seriesData, index) => createPatternBorderStyle(index, getElementStyles({\n data: seriesData,\n index\n }).color))\n })]\n }), highlightedBarStyle && /*#__PURE__*/_jsx(\"style\", {\n children: highlightedBarStyle\n }), allSeriesHidden ? /*#__PURE__*/_jsx(SvgEmptyState, {\n x: width / 2,\n y: chartHeight / 2,\n width: width,\n height: chartHeight,\n children: __('All series are hidden. Click legend items to show data.', 'jetpack-charts')\n }) : null, /*#__PURE__*/_jsx(BarGroup, {\n padding: chartOptions.barGroup.padding,\n children: seriesWithVisibility.map(({\n series: seriesData,\n index,\n isVisible\n }) => {\n // Skip rendering invisible series\n if (!isVisible) {\n return null;\n }\n return /*#__PURE__*/_jsx(BarSeries, {\n dataKey: seriesData?.label,\n data: seriesData.data,\n yAccessor: chartOptions.accessors.yAccessor,\n xAccessor: chartOptions.accessors.xAccessor,\n colorAccessor: getBarBackground(index)\n }, seriesData?.label);\n })\n }), /*#__PURE__*/_jsx(Axis, {\n ...chartOptions.axis.x\n }), /*#__PURE__*/_jsx(Axis, {\n ...chartOptions.axis.y\n }), withTooltips && /*#__PURE__*/_jsx(AccessibleTooltip, {\n detectBounds: true,\n snapTooltipToDatumX: true,\n snapTooltipToDatumY: true,\n renderTooltip: renderTooltip || renderDefaultTooltip,\n selectedIndex: selectedIndex,\n tooltipRef: tooltipRef,\n keyboardFocusedClassName: styles['bar-chart__tooltip--keyboard-focused'],\n series: data,\n mode: \"individual\"\n })]\n })\n })\n });\n }\n })\n });\n};\nconst BarChartWithProvider = props => {\n const existingContext = useContext(GlobalChartsContext);\n\n // If we're already in a GlobalChartsProvider context, don't create a new one\n if (existingContext) {\n return /*#__PURE__*/_jsx(BarChartInternal, {\n ...props\n });\n }\n\n // Otherwise, create our own GlobalChartsProvider\n return /*#__PURE__*/_jsx(GlobalChartsProvider, {\n children: /*#__PURE__*/_jsx(BarChartInternal, {\n ...props\n })\n });\n};\nBarChartWithProvider.displayName = 'BarChart';\n\n// Create BarChart with composition API\nconst BarChart = attachSubComponents(BarChartWithProvider, {\n Legend: Legend\n});\n\n// Create responsive BarChart with composition API\nconst BarChartResponsive = attachSubComponents(withResponsive(BarChartWithProvider), {\n Legend: Legend\n});\nexport { BarChartResponsive as default, BarChart as BarChartUnresponsive };","import { useContext, useMemo, forwardRef } from 'react';\nimport { SingleChartContext } from '../../charts/private/single-chart-context';\nimport { GlobalChartsContext } from '../../providers';\nimport { BaseLegend } from './private';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst defaultShapeByChartType = {\n line: 'line',\n bar: 'rect',\n pie: 'circle',\n 'pie-semi-circle': 'circle',\n leaderboard: 'circle'\n};\nexport const Legend = /*#__PURE__*/forwardRef(({\n chartId,\n items,\n shape,\n ...props\n}, ref) => {\n // Get context but don't throw if it doesn't exist\n const context = useContext(GlobalChartsContext);\n const singleChartContext = useContext(SingleChartContext);\n\n // When chartId is used, it is standalone mode\n // When chartId is not provided, we use the context's chartId, meaning it is in a single chart context\n const contextChartId = chartId ?? singleChartContext?.chartId;\n const chartData = useMemo(() => contextChartId && context ? context.getChartData(contextChartId) : undefined, [contextChartId, context]);\n const contextItems = chartData?.legendItems;\n\n // Derive the default legend shape from the chart type when no explicit shape is provided\n const resolvedShape = shape ?? (chartData?.chartType ? defaultShapeByChartType[chartData.chartType] : undefined);\n\n // Provided items take precedence over context items\n const legendItems = items || contextItems;\n if (!legendItems) {\n return null;\n }\n return /*#__PURE__*/_jsx(BaseLegend, {\n ref: ref,\n items: legendItems,\n shape: resolvedShape,\n ...props,\n chartId: contextChartId\n });\n});","import { createContext } from 'react';\n\n// Local context for chart implicit state sharing\n\nexport const ChartInstanceContext = /*#__PURE__*/createContext(null);\n\n// Backward compatibility exports\nexport const SingleChartContext = ChartInstanceContext;","import { useContext } from 'react';\nimport { ChartInstanceContext, type ChartInstanceContextValue } from './single-chart-context';\n\nexport const useChartInstanceContext = (): ChartInstanceContextValue => {\n\tconst context = useContext( ChartInstanceContext );\n\tif ( ! context ) {\n\t\tthrow new Error( 'useChartInstanceContext must be used within a Chart component' );\n\t}\n\treturn context;\n};\n\nexport const useSingleChartContext = useChartInstanceContext;\n","import { hsl as d3Hsl } from '@visx/vendor/d3-color';\nimport { createContext, useCallback, useMemo, useState, useEffect, useLayoutEffect, useRef } from 'react';\nimport { useTooltipPortalRelocator } from '../../hooks/use-tooltip-portal-relocator';\nimport { getItemShapeStyles, getSeriesLineStyles, mergeThemes, resolveCssVariable, normalizeColorToHex } from '../../utils';\nimport { getChartColor } from './private/get-chart-color';\nimport { defaultTheme } from './themes';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const GlobalChartsContext = /*#__PURE__*/createContext(null);\nexport const GlobalChartsProvider = ({\n children,\n theme,\n portalContainer\n}) => {\n const [charts, setCharts] = useState(() => new Map());\n // Track hidden series per chart: chartId -> Set<seriesLabel>\n const [hiddenSeries, setHiddenSeries] = useState(() => new Map());\n\n // Ref to the wrapper element for resolving scoped CSS variables\n const wrapperRef = useRef(null);\n\n // Relocate tooltip portals into the wrapper (or a consumer-provided container) for z-index control.\n useTooltipPortalRelocator(portalContainer ?? wrapperRef);\n const providerTheme = useMemo(() => {\n return theme ? mergeThemes(defaultTheme, theme) : defaultTheme;\n }, [theme]);\n\n // Cache expensive color computations that only change when theme colors change\n // Using useState + useLayoutEffect instead of useMemo to ensure CSS variables\n // in <style> tags are applied to the DOM before we try to resolve them\n const [colorCache, setColorCache] = useState(() => ({\n colors: [],\n hues: [],\n existingHslColors: [],\n minHue: 360,\n maxHue: 0\n }));\n\n // Compute color cache after DOM is updated (so CSS variables are available)\n // Resolves CSS variables from the wrapper element's scope to handle scoped variables\n // Note: Only re-runs when providerTheme changes, not when wrapper element changes.\n // This is intentional, as wrapperRef is expected to be stable for the lifetime of the provider.\n useLayoutEffect(() => {\n const {\n colors\n } = providerTheme;\n const resolvedColors = [];\n const hues = [];\n const existingHslColors = [];\n let minHue = 360;\n let maxHue = 0;\n\n // Process all colors once and cache the results\n if (Array.isArray(colors)) {\n for (const color of colors) {\n if (color && typeof color === 'string') {\n let colorValue = color;\n\n // Handle CSS custom properties - resolve them to actual values\n // Supports both '--var-name' and 'var(--var-name)' formats\n // Use wrapper element to resolve scoped CSS variables\n if (color.startsWith('--') || color.startsWith('var(')) {\n const resolved = resolveCssVariable(color, wrapperRef.current);\n if (resolved === null || resolved === '') {\n continue;\n }\n colorValue = resolved;\n }\n\n // Process hex colors\n if (colorValue.startsWith('#')) {\n resolvedColors.push(colorValue);\n const hslColor = d3Hsl(colorValue);\n // d3Hsl returns NaN values for invalid colors\n if (!isNaN(hslColor.h)) {\n const hslTuple = [hslColor.h, hslColor.s * 100, hslColor.l * 100];\n hues.push(hslTuple[0]);\n existingHslColors.push(hslTuple);\n minHue = Math.min(minHue, hslTuple[0]);\n maxHue = Math.max(maxHue, hslTuple[0]);\n }\n }\n }\n }\n }\n setColorCache({\n colors: resolvedColors,\n hues,\n existingHslColors,\n minHue,\n maxHue\n });\n }, [providerTheme]);\n const [groupToColorMap, setGroupToColorMap] = useState(() => new Map());\n\n // Reset group color mappings when theme colors change\n useEffect(() => {\n // Create a completely new Map instance to trigger dependencies, e.g. useChartLegendItems\n setGroupToColorMap(new Map());\n }, [providerTheme.colors]);\n const registerChart = useCallback((id, data) => {\n setCharts(prev => new Map(prev).set(id, data));\n }, []);\n const unregisterChart = useCallback(id => {\n setCharts(prev => {\n const newMap = new Map(prev);\n newMap.delete(id);\n return newMap;\n });\n }, []);\n const getChartData = useCallback(id => {\n return charts.get(id);\n }, [charts]);\n const resolveColor = useCallback(({\n group,\n index,\n overrideColor\n }) => {\n // Highest precedence: eg. explicit series stroke or chart color prop\n if (overrideColor) {\n return normalizeColorToHex(overrideColor, wrapperRef.current, resolveCssVariable);\n }\n\n // If group provided, maintain a stable assignment\n if (group) {\n const existing = groupToColorMap.get(group);\n if (existing) {\n return existing;\n }\n\n // Use map size as index to assign colors sequentially (0, 1, 2...)\n // ensuring each new group gets the next available palette color\n const assignedCount = groupToColorMap.size;\n const color = getChartColor(assignedCount, colorCache);\n groupToColorMap.set(group, color);\n return color;\n }\n return getChartColor(index, colorCache);\n }, [colorCache, groupToColorMap]);\n const getElementStyles = useCallback(({\n data,\n index,\n overrideColor,\n legendShape\n }) => {\n const isSeriesData = data && typeof data === 'object' && 'data' in data && 'options' in data;\n // DataPointPercentage has a numeric 'value' directly, unlike SeriesData which has 'data' array\n const isPointPercentageData = data && typeof data === 'object' && 'value' in data && typeof data.value === 'number' && !('data' in data);\n return {\n color: resolveColor({\n group: data?.group,\n index,\n overrideColor: overrideColor || isSeriesData && data?.options?.stroke || isPointPercentageData && data?.color\n }),\n lineStyles: isSeriesData ? getSeriesLineStyles(data, index, providerTheme) : {},\n glyph: providerTheme.glyphs?.[index],\n shapeStyles: isSeriesData ? getItemShapeStyles(data, index, providerTheme, legendShape) : {}\n };\n }, [providerTheme, resolveColor]);\n\n // Series visibility management methods\n const toggleSeriesVisibility = useCallback((chartId, seriesLabel) => {\n setHiddenSeries(prev => {\n const newMap = new Map(prev);\n const chartHidden = newMap.get(chartId) || new Set();\n const newSet = new Set(chartHidden);\n if (newSet.has(seriesLabel)) {\n newSet.delete(seriesLabel);\n } else {\n newSet.add(seriesLabel);\n }\n if (newSet.size === 0) {\n newMap.delete(chartId);\n } else {\n newMap.set(chartId, newSet);\n }\n return newMap;\n });\n }, []);\n const isSeriesVisible = useCallback((chartId, seriesLabel) => {\n const chartHidden = hiddenSeries.get(chartId);\n return !chartHidden || !chartHidden.has(seriesLabel);\n }, [hiddenSeries]);\n const getHiddenSeries = useCallback(chartId => {\n const set = hiddenSeries.get(chartId);\n return set ? new Set(set) : new Set();\n }, [hiddenSeries]);\n const value = useMemo(() => ({\n charts,\n registerChart,\n unregisterChart,\n getChartData,\n theme: providerTheme,\n getElementStyles,\n toggleSeriesVisibility,\n isSeriesVisible,\n getHiddenSeries\n }), [charts, registerChart, unregisterChart, getChartData, providerTheme, getElementStyles, toggleSeriesVisibility, isSeriesVisible, getHiddenSeries]);\n return /*#__PURE__*/_jsx(GlobalChartsContext.Provider, {\n value: value,\n children: /*#__PURE__*/_jsx(\"div\", {\n ref: wrapperRef,\n style: {\n display: 'contents'\n },\n children: children\n })\n });\n};","import { useEffect } from 'react';\nimport styles from './use-tooltip-portal-relocator.module.scss';\nimport type { RefObject } from 'react';\n\n/**\n * Detects whether a DOM node is a visx chart tooltip portal.\n *\n * visx renders tooltips via `ReactDOM.createPortal` into plain `<div>` elements\n * appended to `document.body`. These portals have no id or className and contain\n * a child element with the class `visx-tooltip`.\n * @param node - The DOM node to check.\n * @return Whether the node is a visx tooltip portal div.\n */\nfunction isVisxPortalNode( node: Node ): node is HTMLDivElement {\n\treturn (\n\t\tnode instanceof HTMLDivElement &&\n\t\tnode.parentElement === document.body &&\n\t\t! node.id &&\n\t\t! node.className &&\n\t\tnode.querySelector( '.visx-tooltip' ) !== null\n\t);\n}\n\n// Shared state for the document.body.removeChild patch.\n// Reference-counted so multiple hook instances can coexist safely.\nlet patchRefCount = 0;\nlet origRemoveChild: typeof document.body.removeChild | null = null;\nlet patchedRemoveChild: typeof document.body.removeChild | null = null;\nconst relocatedNodes = new WeakSet< Node >();\n\n/**\n * Installs (or increments the ref count of) the shared removeChild patch.\n */\nfunction installRemoveChildPatch() {\n\tif ( patchRefCount++ > 0 ) {\n\t\treturn;\n\t}\n\torigRemoveChild = document.body.removeChild;\n\tpatchedRemoveChild = function < T extends Node >( this: HTMLElement, child: T ): T {\n\t\tif ( relocatedNodes.has( child ) && child.parentNode !== this ) {\n\t\t\trelocatedNodes.delete( child );\n\t\t\tchild.parentNode?.removeChild( child );\n\t\t\treturn child;\n\t\t}\n\t\treturn origRemoveChild!.call( this, child );\n\t};\n\tdocument.body.removeChild = patchedRemoveChild;\n}\n\n/**\n * Decrements the ref count and removes the patch when no instances remain.\n * If another library has since wrapped our patch, we leave it in place to\n * avoid breaking their chain — our function becomes a transparent pass-through\n * once all relocated nodes have been cleaned up.\n */\nfunction uninstallRemoveChildPatch() {\n\tif ( --patchRefCount > 0 ) {\n\t\treturn;\n\t}\n\t// Only revert if removeChild is still our function. If something else\n\t// has wrapped it, reverting would break their patch.\n\tif ( document.body.removeChild === patchedRemoveChild ) {\n\t\tdocument.body.removeChild = origRemoveChild!;\n\t}\n\torigRemoveChild = null;\n\tpatchedRemoveChild = null;\n}\n\n/**\n * Relocates visx chart tooltip portals from `document.body` into a target\n * container element. This allows the tooltips to participate in the same CSS\n * stacking context as other elements in the container (e.g. a sticky header),\n * so z-index ordering works correctly between them.\n *\n * The relocated portal divs use `position: fixed` at the viewport origin to\n * preserve the tooltip coordinate system (visx calculates positions relative\n * to the viewport).\n *\n * Because the visx Portal class calls `document.body.removeChild(node)` during\n * unmount, we patch `document.body.removeChild` to gracefully handle nodes that\n * were moved out of body. Without this, React throws a \"not a child of this\n * node\" error when tooltips unmount.\n *\n * **Important:** The container and its ancestors must not have CSS `transform`,\n * `perspective`, or `filter` properties set, as these create a new containing\n * block for `position: fixed` children, breaking viewport-relative positioning.\n *\n * @param containerRef - Ref to the element that portals should be relocated into.\n * The element referenced here, or one of its ancestors,\n * should establish the desired stacking context (for example\n * by using position and z-index).\n */\nexport function useTooltipPortalRelocator(\n\tcontainerRef: RefObject< HTMLElement | null > | undefined\n) {\n\tuseEffect( () => {\n\t\tconst container = containerRef?.current;\n\t\tif ( ! container ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Track nodes relocated by this instance so we can move them back on cleanup.\n\t\tconst instanceNodes = new Set< Node >();\n\n\t\tconst relocateNode = ( node: Node ) => {\n\t\t\tif ( ! isVisxPortalNode( node ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hide the portal immediately to prevent the tooltip from\n\t\t\t// flashing at (0,0) before visx calculates the correct position.\n\t\t\tnode.style.opacity = '0';\n\n\t\t\t// Position the portal at the viewport origin so visx's\n\t\t\t// absolute-positioned tooltip coordinates remain correct.\n\t\t\t// Zero-size with overflow: visible so it doesn't affect layout\n\t\t\t// but tooltip content still renders. pointerEvents: none on the\n\t\t\t// wrapper is intentional — tooltip inner elements manage their own.\n\t\t\tnode.classList.add( styles.relocatedPortal );\n\n\t\t\t// Remember the focused element before moving the node — relocating\n\t\t\t// a DOM subtree causes the browser to blur any focused descendants.\n\t\t\tconst { activeElement } = node.ownerDocument;\n\t\t\tconst focusedElement =\n\t\t\t\tactiveElement instanceof HTMLElement && node.contains( activeElement )\n\t\t\t\t\t? activeElement\n\t\t\t\t\t: null;\n\n\t\t\t// Insert at the start of the container (before header and content).\n\t\t\tcontainer.insertBefore( node, container.firstChild );\n\t\t\trelocatedNodes.add( node );\n\t\t\tinstanceNodes.add( node );\n\n\t\t\t// Restore focus that was lost due to the DOM move.\n\t\t\tif ( focusedElement ) {\n\t\t\t\tfocusedElement.focus();\n\t\t\t}\n\n\t\t\t// Reveal after two animation frames so visx has positioned the tooltip.\n\t\t\trequestAnimationFrame( () => {\n\t\t\t\trequestAnimationFrame( () => {\n\t\t\t\t\tnode.style.opacity = '';\n\t\t\t\t} );\n\t\t\t} );\n\t\t};\n\n\t\t// Patch document.body.removeChild so visx Portal unmount doesn't throw\n\t\t// when it tries to remove a node we already moved out of body.\n\t\tinstallRemoveChildPatch();\n\n\t\t// Relocate any portals that already exist.\n\t\tfor ( const child of Array.from( document.body.children ) ) {\n\t\t\trelocateNode( child );\n\t\t}\n\n\t\t// Watch for new portals being appended to body.\n\t\tconst observer = new MutationObserver( mutations => {\n\t\t\tfor ( const mutation of mutations ) {\n\t\t\t\tfor ( const node of mutation.addedNodes ) {\n\t\t\t\t\trelocateNode( node );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\tobserver.observe( document.body, { childList: true } );\n\n\t\treturn () => {\n\t\t\t// Disconnect first to avoid the observer re-relocating nodes\n\t\t\t// as we move them back to body.\n\t\t\tobserver.disconnect();\n\n\t\t\t// Move relocated nodes back to body so visx can clean them up\n\t\t\t// normally with the original removeChild.\n\t\t\tfor ( const node of instanceNodes ) {\n\t\t\t\tif ( node instanceof HTMLElement ) {\n\t\t\t\t\tnode.classList.remove( styles.relocatedPortal );\n\t\t\t\t}\n\t\t\t\tif ( node.parentNode === container ) {\n\t\t\t\t\tdocument.body.appendChild( node );\n\t\t\t\t}\n\t\t\t\trelocatedNodes.delete( node );\n\t\t\t}\n\t\t\tinstanceNodes.clear();\n\n\t\t\tuninstallRemoveChildPatch();\n\t\t};\n\t}, [ containerRef ] );\n}\n","import 'css-chunk:src/hooks/use-tooltip-portal-relocator.module.scss';export default {\n \"relocatedPortal\": \"a8ccharts-jCw5dQ\"\n};","/**\n * Utility function to create chart components with composition API.\n *\n * This function attaches subcomponents to a chart component to enable\n * dot notation access like <Chart.Legend />, <Chart.Tooltip />, etc.\n *\n * @param Chart - The main chart component\n * @param subComponents - Object containing subcomponents to attach\n * @return Chart component with attached subcomponents\n */\nexport function attachSubComponents< TChart, TSubComponents extends Record< string, unknown > >(\n\tChart: TChart,\n\tsubComponents: TSubComponents\n): TChart & TSubComponents {\n\treturn Object.assign( Chart, subComponents );\n}\n","/**\n * @file Date parsing utilities using date-fns for local timezone handling\n *\n * This module provides utilities for parsing various date string formats and converting\n * them to local timezone dates using the battle-tested date-fns library. For formats\n * without timezone info, they're treated as local. For formats with timezone info,\n * they're converted to the equivalent local time.\n *\n * Note: And specifically it prevents format `YYYY-MM-DD` being parsed as UTC date.\n *\n * Key Features:\n * - All parsed dates are in local timezone\n * - Converts timezone-aware strings to local equivalent\n * - Robust input validation and error handling using date-fns\n * - TypeScript type safety\n * - Much smaller codebase than custom parsing\n *\n * Supported Formats:\n * - YYYY-MM-DD (treated as local)\n * - YYYY-MM-DD HH:mm:ss (treated as local)\n * - YYYY-MM-DD HH:mm (treated as local)\n * - YYYY-MM-DDTHH:mm:ss (treated as local)\n * - YYYY-MM-DDTHH:mm:ss.SSS (treated as local)\n * - YYYY-MM-DDTHH:mm (treated as local)\n * - YYYY-MM-DDTHH:mm:ssZ (converted to local)\n * - YYYY-MM-DDTHH:mm:ss±HH:mm (converted to local)\n *\n * @example\n * ```typescript\n * parseAsLocalDate(\"2025-01-01\"); // Local timezone\n * parseAsLocalDate(\"2025-01-01 14:30:00\"); // Local timezone\n * parseAsLocalDate(\"2025-01-01 14:30\"); // Local timezone\n * parseAsLocalDate(\"2025-01-01T14:30:45.123\"); // Local timezone\n * parseAsLocalDate(\"2025-01-01T14:30:00Z\"); // UTC 14:30 → Local equivalent\n * parseAsLocalDate(\"2025-01-01T14:30:00+05:00\"); // +05:00 14:30 → Local equivalent\n * ```\n */\n\nimport { parse, parseISO, isValid } from 'date-fns';\n\n/**\n * Checks if a date string contains timezone information\n * @param {string} dateString - The date string to check for timezone information\n * @return {boolean} True if the date string contains timezone information, false otherwise\n */\nconst hasTimezone = ( dateString: string ): boolean => {\n\tconst tIndex = dateString.indexOf( 'T' );\n\tif ( tIndex === -1 ) {\n\t\treturn false;\n\t}\n\n\tif ( dateString.endsWith( 'Z' ) ) {\n\t\treturn true;\n\t}\n\n\treturn /[+-]\\d{2}:?\\d{2}$/.test( dateString.slice( tIndex + 1 ) );\n};\n\n/**\n * Parses any supported date string format and returns a local timezone date\n *\n * Uses date-fns for robust parsing and validation. For strings without timezone\n * info, treats as local timezone. For strings with timezone info, converts to\n * local timezone equivalent.\n *\n * Supports:\n * - YYYY-MM-DD (local)\n * - YYYY-MM-DD HH:mm:ss (local)\n * - YYYY-MM-DD HH:mm (local)\n * - YYYY-MM-DDTHH:mm:ss (local)\n * - YYYY-MM-DDTHH:mm:ss.SSS (local)\n * - YYYY-MM-DDTHH:mm (local)\n * - YYYY-MM-DDTHH:mm:ssZ (UTC → local)\n * - YYYY-MM-DDTHH:mm:ss±HH:mm (offset → local)\n * @param {string} dateString - The date string to parse into a local timezone date\n * @return {Date} A Date object representing the parsed date in local timezone, or an invalid Date if parsing fails\n */\nexport const parseAsLocalDate = ( dateString: string ): Date => {\n\tconst trimmedString = dateString.trim();\n\n\t// If it has timezone information, parse as ISO and convert to local\n\tif ( hasTimezone( trimmedString ) ) {\n\t\tconst isoDate = parseISO( trimmedString );\n\n\t\tif ( ! isValid( isoDate ) ) {\n\t\t\treturn new Date( NaN );\n\t\t}\n\n\t\t// parseISO automatically converts to local timezone\n\t\treturn isoDate;\n\t}\n\n\t// For naive strings, try different local formats\n\tconst formats = [\n\t\t'yyyy-MM-dd', // 2025-01-01\n\t\t'yyyy-MM-dd HH:mm:ss', // 2025-01-01 14:30:45\n\t\t'yyyy-MM-dd HH:mm', // 2025-01-01 14:30\n\t\t\"yyyy-MM-dd'T'HH:mm:ss\", // 2025-01-01T14:30:45\n\t\t\"yyyy-MM-dd'T'HH:mm:ss.SSS\", // 2025-01-01T14:30:45.123\n\t\t\"yyyy-MM-dd'T'HH:mm\", // 2025-01-01T14:30\n\t];\n\n\tfor ( const format of formats ) {\n\t\tconst result = parse( trimmedString, format, new Date() );\n\t\tif ( isValid( result ) ) {\n\t\t\treturn result;\n\t\t}\n\t}\n\n\t// If no format matched, return invalid date\n\treturn new Date( NaN );\n};\n","import { formatNumberCompact, formatNumber } from '@automattic/number-formatters';\n\n/**\n * Types for formatMetricValue\n */\nexport type MetricValueType = 'number' | 'average' | 'currency';\n\ntype FormatMetricValueOptions = {\n\tdecimals?: number;\n\tuseMultipliers?: boolean;\n\tsignDisplay?: Intl.NumberFormatOptions[ 'signDisplay' ];\n};\n\n/**\n * Format a numeric metric value based on type, precision and scale.\n * Supports currency, number and percentage, using `@automattic/number-formatters`.\n *\n * @param value - The value to format\n * @param type - The type of formatting to apply\n * @param options - Formatting options\n * @param options.decimals - Number of decimal places to show\n * @param options.useMultipliers - Whether to use K, M, B suffixes for large numbers\n * @param options.signDisplay - Controls when to display the sign (auto, always, never, exceptZero)\n * @return Formatted string\n */\nexport const formatMetricValue = (\n\tvalue: string | number,\n\ttype: MetricValueType = 'number',\n\t{ decimals, useMultipliers = false, signDisplay }: FormatMetricValueOptions = {}\n): string => {\n\tif ( value === null || value === undefined ) {\n\t\treturn '';\n\t}\n\n\tconst numericValue = Number( value );\n\tif ( isNaN( numericValue ) ) {\n\t\treturn '';\n\t}\n\n\tswitch ( type ) {\n\t\tcase 'currency': {\n\t\t\t// Basic currency formatting - can be enhanced with full currency support\n\t\t\tconst formatted = useMultipliers\n\t\t\t\t? formatNumberCompact( numericValue, {\n\t\t\t\t\t\tdecimals: decimals ?? 2,\n\t\t\t\t\t\tnumberFormatOptions: {\n\t\t\t\t\t\t\tmaximumFractionDigits: decimals ?? 2,\n\t\t\t\t\t\t\tsignDisplay,\n\t\t\t\t\t\t},\n\t\t\t\t } )\n\t\t\t\t: formatNumber( numericValue, {\n\t\t\t\t\t\tdecimals: decimals ?? 2,\n\t\t\t\t\t\tnumberFormatOptions: {\n\t\t\t\t\t\t\tsignDisplay,\n\t\t\t\t\t\t},\n\t\t\t\t } );\n\t\t\treturn `$${ formatted }`;\n\t\t}\n\n\t\tcase 'average': {\n\t\t\tif ( ! Number.isFinite( numericValue ) ) {\n\t\t\t\treturn '—';\n\t\t\t}\n\n\t\t\treturn formatNumber( numericValue, {\n\t\t\t\tdecimals: decimals ?? 0,\n\t\t\t\tnumberFormatOptions: {\n\t\t\t\t\tstyle: 'percent',\n\t\t\t\t\tsignDisplay: signDisplay ?? 'exceptZero',\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\tcase 'number':\n\t\tdefault: {\n\t\t\treturn useMultipliers\n\t\t\t\t? formatNumberCompact( numericValue, {\n\t\t\t\t\t\tdecimals: decimals ?? 0,\n\t\t\t\t\t\tnumberFormatOptions: {\n\t\t\t\t\t\t\tmaximumFractionDigits: decimals ?? 0,\n\t\t\t\t\t\t\tsignDisplay,\n\t\t\t\t\t\t},\n\t\t\t\t } )\n\t\t\t\t: formatNumber( numericValue, {\n\t\t\t\t\t\tdecimals: decimals ?? 0,\n\t\t\t\t\t\tnumberFormatOptions: {\n\t\t\t\t\t\t\tsignDisplay,\n\t\t\t\t\t\t},\n\t\t\t\t } );\n\t\t}\n\t}\n};\n","import { formatNumber } from '@automattic/number-formatters';\n\n/**\n * Format a percentage value with smart decimal handling.\n * Uses `@automattic/number-formatters` for consistent formatting.\n * Removes unnecessary trailing zeros and caps at 2 decimal places.\n *\n * @param value - The percentage value (0-100 range)\n * @return Formatted percentage string (e.g., \"30%\", \"30.1%\", \"30.25%\")\n */\nexport const formatPercentage = ( value: number ): string => {\n\t// Use formatNumber with percentage style, but convert from 0-100 range to 0-1 range\n\treturn formatNumber( value / 100, {\n\t\tnumberFormatOptions: {\n\t\t\tstyle: 'percent',\n\t\t\tminimumFractionDigits: 0,\n\t\t\tmaximumFractionDigits: 2,\n\t\t},\n\t} );\n};\n","import { getStringWidth } from '@visx/text';\nimport type { TickFormatter } from '@visx/axis';\nimport type { AnyD3Scale, ScaleInput } from '@visx/scale';\n\n/**\n * Returns the width of the longest tick.\n *\n * @param ticks - Ticks to get the width of.\n * @param formatTick - Function to format the tick.\n * @param {object} labelStyle - Style object for the label.\n * @return {number} - Width of the longest tick.\n */\nexport const getLongestTickWidth = < T extends AnyD3Scale >(\n\tticks: ScaleInput< T >[],\n\tformatTick: TickFormatter< ScaleInput< T > >,\n\tlabelStyle?: object\n) => {\n\tconst formattedTicks = ticks.map( tick => formatTick( tick, 0, [] ) );\n\tconst longestTick = formattedTicks.reduce(\n\t\t( longest, current ) => ( longest.length >= current.length ? longest : current ),\n\t\tformattedTicks[ 0 ]\n\t);\n\n\treturn getStringWidth( longestTick, labelStyle );\n};\n","import type { ChartTheme, SeriesData } from '../types';\nimport type { LegendShape } from '@visx/legend/lib/types';\nimport type { LineStyles } from '@visx/xychart';\n\n/**\n * Utility function to get consolidated line styles for a series\n * This consolidates the logic used by both LineChart and Legend components\n *\n * @param {SeriesData} seriesData - The series data containing styling options\n * @param {number} index - The index of the series in the data array\n * @param {ChartTheme} providerTheme - The chart theme configuration\n * @return {LineStyles} The consolidated line styles for the series\n */\nexport function getSeriesLineStyles(\n\tseriesData: SeriesData,\n\tindex: number,\n\tproviderTheme: ChartTheme\n): LineStyles {\n\t// Get theme-based line styles for line type\n\tconst themeSemanticLineStyle = providerTheme?.lineChart?.lineStyles?.[ seriesData.options?.type ];\n\n\t// Get theme-based line styles for index of series data\n\tconst themeSeriesLineStyle =\n\t\tproviderTheme?.seriesLineStyles?.[ index % providerTheme.seriesLineStyles.length ];\n\n\t// Priority order: custom series style > theme line type style > default theme series style\n\treturn (\n\t\tseriesData.options?.seriesLineStyle ?? themeSemanticLineStyle ?? themeSeriesLineStyle ?? {}\n\t);\n}\n\n/**\n * Utility function to get stroke color for a series\n *\n * @param {SeriesData} seriesData - The series data containing styling options\n * @param {number} index - The index of the series in the data array\n * @param {string[]} themeColors - Array of theme colors\n * @return {string} The stroke color for the series\n */\nexport function getSeriesStroke(\n\tseriesData: SeriesData,\n\tindex: number,\n\tthemeColors: string[]\n): string {\n\treturn seriesData.options?.stroke ?? themeColors[ index % themeColors.length ];\n}\n\n/**\n * Utility function to get shape styles for a legend item\n *\n * @param {SeriesData} series - The series data containing styling options\n * @param {number} index - The index of the series in the data array\n * @param {ChartTheme} theme - The chart theme configuration\n * @param {LegendShape} legendShape - The shape to use for the item (optional)\n * @return {Record< string, unknown >} The shape styles for the item\n */\nexport function getItemShapeStyles(\n\tseries: SeriesData,\n\tindex: number,\n\ttheme: ChartTheme,\n\tlegendShape?: LegendShape< SeriesData[], number >\n): Record< string, unknown > {\n\tconst seriesShapeStyles = series.options?.legendShapeStyle ?? {};\n\tconst lineStyles = legendShape === 'line' ? getSeriesLineStyles( series, index, theme ) : {};\n\tconst themeShapeStyles = theme.legend?.shapeStyles?.[ index ];\n\n\tconst itemShapeStyles = {\n\t\t...seriesShapeStyles,\n\t\t...lineStyles,\n\t};\n\n\t// Return item shape styles if they are not empty\n\tif (\n\t\tObject.values( itemShapeStyles ).some(\n\t\t\tvalue => value !== undefined && value !== null && value !== ''\n\t\t)\n\t) {\n\t\treturn itemShapeStyles;\n\t}\n\n\t// Fallback to theme shape styles if defined\n\treturn themeShapeStyles ?? {};\n}\n","export const isSafari = () => {\n\tif ( typeof navigator !== 'undefined' && navigator.userAgent ) {\n\t\treturn /^((?!chrome|android).)*safari/i.test( navigator.userAgent );\n\t}\n\treturn false;\n};\n","import deepmerge from 'deepmerge';\nimport type { ChartTheme, CompleteChartTheme } from '../types';\n\n/**\n * Merges chart themes with proper precedence.\n * The second theme (override) takes precedence over the first theme (base).\n *\n * @param baseTheme - Base theme object\n * @param overrideTheme - Theme to override base with (takes precedence)\n * @return Merged theme with overrideTheme values taking precedence\n */\nexport function mergeThemes(\n\tbaseTheme: CompleteChartTheme,\n\toverrideTheme: Partial< ChartTheme >\n): CompleteChartTheme;\nexport function mergeThemes(\n\tbaseTheme: ChartTheme,\n\toverrideTheme: Partial< ChartTheme >\n): ChartTheme;\nexport function mergeThemes(\n\tbaseTheme: ChartTheme,\n\toverrideTheme: Partial< ChartTheme >\n): ChartTheme {\n\t// Use deepmerge to properly merge nested objects, with overrideTheme taking precedence\n\treturn deepmerge( baseTheme, overrideTheme, {\n\t\t// Ensure arrays are replaced rather than concatenated\n\t\tarrayMerge: ( _destinationArray, sourceArray ) => sourceArray,\n\t} ) as ChartTheme;\n}\n","import { color as d3Color, hsl as d3Hsl } from '@visx/vendor/d3-color';\n\n/**\n * Check if a value is a valid 6-digit hex color\n * @param hex - The value to check\n * @return true if valid hex color format (e.g., '#ff0000')\n */\nexport const isValidHexColor = ( hex: unknown ): hex is string => {\n\treturn typeof hex === 'string' && /^#[0-9a-fA-F]{6}$/.test( hex );\n};\n\n/**\n * Validate hex color format, throwing descriptive errors if invalid\n * @param hex - The hex color string to validate\n * @throws {Error} if hex string is malformed\n */\nexport const validateHexColor = ( hex: unknown ): void => {\n\tif ( isValidHexColor( hex ) ) {\n\t\treturn;\n\t}\n\n\t// Provide specific error messages for common issues\n\tif ( typeof hex !== 'string' ) {\n\t\tthrow new Error( 'Hex color must be a string' );\n\t}\n\tif ( ! hex.startsWith( '#' ) ) {\n\t\tthrow new Error( 'Hex color must start with #' );\n\t}\n\tif ( hex.length !== 7 ) {\n\t\tthrow new Error( 'Hex color must be 7 characters long (e.g., #ff0000)' );\n\t}\n\tthrow new Error( 'Hex color contains invalid characters. Only 0-9, a-f, A-F are allowed' );\n};\n\n/**\n * Convert hex color to rgba with specified opacity.\n * This is genuinely reusable across chart components.\n * @param hex - The hex color string (e.g., '#ff0000')\n * @param alpha - The opacity value. Values outside the [0, 1] range will be clamped by the underlying d3 color library.\n * @return The rgba color string (e.g., 'rgba(255, 0, 0, 0.5)')\n * @throws {Error} if hex string is malformed or alpha is not a valid number\n */\nexport const hexToRgba = ( hex: string, alpha: number ): string => {\n\tvalidateHexColor( hex );\n\n\tif ( typeof alpha !== 'number' || isNaN( alpha ) ) {\n\t\tthrow new Error( 'Alpha must be a number' );\n\t}\n\n\t// Safe to use non-null assertion since validateHexColor ensures valid hex\n\treturn d3Color( hex )!.copy( { opacity: alpha } ).formatRgb();\n};\n\n/**\n * Calculate the perceptual distance between two HSL colors\n * @param hsl1 - first color in HSL format [h, s, l]\n * @param hsl2 - second color in HSL format [h, s, l]\n * @return distance value (0-100+, lower means more similar)\n */\nexport const getColorDistance = (\n\thsl1: [ number, number, number ],\n\thsl2: [ number, number, number ]\n): number => {\n\tconst [ h1, s1, l1 ] = hsl1;\n\tconst [ h2, s2, l2 ] = hsl2;\n\n\t// Calculate hue difference, accounting for circular nature (0° = 360°)\n\tlet hueDiff = Math.abs( h1 - h2 );\n\thueDiff = Math.min( hueDiff, 360 - hueDiff );\n\n\t// Weight the differences: hue is most important, then lightness, then saturation\n\tconst hueWeight = 2;\n\tconst lightnessWeight = 1;\n\tconst saturationWeight = 0.5;\n\n\treturn Math.sqrt(\n\t\tMath.pow( hueDiff * hueWeight, 2 ) +\n\t\t\tMath.pow( ( l1 - l2 ) * lightnessWeight, 2 ) +\n\t\t\tMath.pow( ( s1 - s2 ) * saturationWeight, 2 )\n\t);\n};\n\n/**\n * Parse an HSL string like 'hsl(120, 50%, 50%)' into an HSL tuple.\n *\n * @param hslString - HSL color string\n * @return HSL tuple [h, s, l] or null if invalid\n */\nexport const parseHslString = ( hslString: string ): [ number, number, number ] | null => {\n\tconst lower = hslString.toLowerCase().trim();\n\n\t// Check prefix - d3-color handles the parsing\n\tif ( ! lower.startsWith( 'hsl(' ) ) {\n\t\treturn null;\n\t}\n\n\tconst parsed = d3Hsl( lower );\n\n\t// d3Hsl returns NaN values for invalid colors\n\tif ( isNaN( parsed.h ) && isNaN( parsed.s ) && isNaN( parsed.l ) ) {\n\t\treturn null;\n\t}\n\n\t// Normalize hue to 0-360 range (d3 may return NaN for achromatic colors)\n\tconst h = isNaN( parsed.h ) ? 0 : ( ( parsed.h % 360 ) + 360 ) % 360;\n\n\t// d3-color uses 0-1 scale, convert to 0-100\n\treturn [ h, parsed.s * 100, parsed.l * 100 ];\n};\n\n/**\n * Parse an RGB string like 'rgb(255, 0, 0)' into a hex color.\n *\n * @param rgbString - RGB color string\n * @return hex color string or null if invalid\n */\nexport const parseRgbString = ( rgbString: string ): string | null => {\n\tconst lower = rgbString.toLowerCase().trim();\n\n\t// Check prefix - only handle rgb(), not rgba()\n\tif ( ! lower.startsWith( 'rgb(' ) || lower.startsWith( 'rgba(' ) ) {\n\t\treturn null;\n\t}\n\n\tconst parsed = d3Color( lower );\n\n\t// d3Color returns null for invalid colors\n\tif ( ! parsed ) {\n\t\treturn null;\n\t}\n\n\t// d3-color clamps values automatically\n\treturn parsed.formatHex();\n};\n\n/**\n * Normalize any CSS color value to a hex color string.\n * Handles hex colors, HSL strings, RGB strings, and CSS variables.\n *\n * @param color - Any CSS color value\n * @param element - Optional DOM element for resolving CSS variables\n * @param resolveCss - Function to resolve CSS variables (injected for testability)\n * @return hex color string, or the original value if conversion fails\n */\nexport const normalizeColorToHex = (\n\tcolor: string,\n\telement?: HTMLElement | null,\n\tresolveCss?: ( value: string, el?: HTMLElement | null ) => string | null\n): string => {\n\tif ( ! color || typeof color !== 'string' ) {\n\t\treturn '';\n\t}\n\n\t// Already a valid hex color (6-digit format)\n\tif ( /^#[0-9a-fA-F]{6}$/.test( color ) ) {\n\t\treturn color;\n\t}\n\n\tconst trimmed = color.trim().toLowerCase();\n\n\t// Handle 3-digit hex colors - expand to 6-digit\n\tif ( /^#[0-9a-f]{3}$/i.test( trimmed ) ) {\n\t\tconst r = trimmed[ 1 ];\n\t\tconst g = trimmed[ 2 ];\n\t\tconst b = trimmed[ 3 ];\n\t\treturn `#${ r }${ r }${ g }${ g }${ b }${ b }`;\n\t}\n\n\t// Handle CSS variables - must be resolved before d3-color can parse\n\tif ( trimmed.startsWith( '--' ) || trimmed.startsWith( 'var(' ) ) {\n\t\tif ( resolveCss ) {\n\t\t\tconst resolved = resolveCss( color, element );\n\t\t\tif ( resolved ) {\n\t\t\t\t// Recursively normalize the resolved value\n\t\t\t\treturn normalizeColorToHex( resolved, element, resolveCss );\n\t\t\t}\n\t\t}\n\t\t// Can't resolve CSS variable, return original\n\t\treturn color;\n\t}\n\n\t// Handle HSL and RGB strings using d3-color\n\tif ( trimmed.startsWith( 'hsl(' ) || trimmed.startsWith( 'rgb(' ) ) {\n\t\t// Reject rgba() - we only handle rgb()\n\t\tif ( trimmed.startsWith( 'rgba(' ) ) {\n\t\t\treturn color;\n\t\t}\n\t\tconst parsed = d3Color( trimmed );\n\t\tif ( parsed ) {\n\t\t\treturn parsed.formatHex();\n\t\t}\n\t\treturn color;\n\t}\n\n\t// Unknown format, return as-is\n\treturn color;\n};\n\n/**\n * Lighten a hex color by blending it with white.\n * Useful for creating color gradients or lighter variants.\n *\n * @param hex - Hex color string (e.g., '#98C8DF')\n * @param blend - Blend amount with white (0 = original color, 1 = white)\n * @return Lightened hex color string (e.g., '#cce4ef')\n * @throws {Error} if hex string is malformed\n */\nexport const lightenHexColor = ( hex: string, blend: number ): string => {\n\tvalidateHexColor( hex );\n\n\tconst r = parseInt( hex.slice( 1, 3 ), 16 );\n\tconst g = parseInt( hex.slice( 3, 5 ), 16 );\n\tconst b = parseInt( hex.slice( 5, 7 ), 16 );\n\n\t// Blend with white (255, 255, 255)\n\tconst newR = Math.round( r + ( 255 - r ) * blend );\n\tconst newG = Math.round( g + ( 255 - g ) * blend );\n\tconst newB = Math.round( b + ( 255 - b ) * blend );\n\n\treturn `#${ newR.toString( 16 ).padStart( 2, '0' ) }${ newG\n\t\t.toString( 16 )\n\t\t.padStart( 2, '0' ) }${ newB.toString( 16 ).padStart( 2, '0' ) }`;\n};\n","/**\n * Pattern for valid CSS custom property names (e.g., '--my-color', '--jp-gray-10')\n */\nconst CSS_VAR_NAME_PATTERN = /^--[\\w-]+$/;\n\n/**\n * Resolves a CSS custom property (variable) to its computed value.\n * Handles multiple formats:\n * - Plain variable names: '--my-color'\n * - CSS var() syntax: 'var(--my-color)'\n * - CSS var() with fallback: 'var(--my-color, #ffffff)'\n * - Regular values (returned as-is): '#ffffff', 'red'\n *\n * @param value - A CSS variable name, var() expression, or regular value\n * @param element - Optional DOM element to resolve the variable from (defaults to document.documentElement)\n * @return The resolved value, fallback value, or null if unresolvable\n */\nexport const resolveCssVariable = (\n\tvalue: string,\n\telement?: HTMLElement | null\n): string | null => {\n\tif ( ! value ) {\n\t\treturn null;\n\t}\n\n\t// Check if it's a var() expression: var(--name) or var(--name, fallback)\n\t// Parse manually to avoid regex backtracking vulnerabilities\n\tif ( value.startsWith( 'var(' ) && value.endsWith( ')' ) ) {\n\t\tconst parsed = parseVarExpression( value );\n\n\t\tif ( parsed ) {\n\t\t\tconst resolved = resolveVariableName( parsed.varName, element );\n\n\t\t\treturn resolved || parsed.fallback;\n\t\t}\n\t}\n\n\t// Check if it's a plain variable name (starts with --)\n\tif ( value.startsWith( '--' ) ) {\n\t\treturn resolveVariableName( value, element );\n\t}\n\n\t// Return regular values as-is (e.g., '#ffffff', 'red')\n\treturn value;\n};\n\n/**\n * Parses a var() expression into its variable name and optional fallback.\n * Uses string manipulation instead of complex regex to avoid ReDoS.\n *\n * @param expr - A var() expression like 'var(--name)' or 'var(--name, fallback)'\n * @return Parsed result or null if invalid\n */\nfunction parseVarExpression( expr: string ): { varName: string; fallback: string | null } | null {\n\t// Remove 'var(' prefix and ')' suffix\n\tconst inner = expr.slice( 4, -1 ).trim();\n\n\tif ( ! inner.startsWith( '--' ) ) {\n\t\treturn null;\n\t}\n\n\t// Find the comma separator (if any)\n\tconst commaIndex = inner.indexOf( ',' );\n\n\tif ( commaIndex === -1 ) {\n\t\t// No fallback: var(--name)\n\t\tconst varName = inner.trim();\n\t\t// Validate variable name format\n\t\tif ( ! CSS_VAR_NAME_PATTERN.test( varName ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn { varName, fallback: null };\n\t}\n\n\t// Has fallback: var(--name, fallback)\n\tconst varName = inner.slice( 0, commaIndex ).trim();\n\n\t// Validate variable name format\n\tif ( ! CSS_VAR_NAME_PATTERN.test( varName ) ) {\n\t\treturn null;\n\t}\n\n\tconst fallback = inner.slice( commaIndex + 1 ).trim();\n\n\treturn { varName, fallback: fallback || null };\n}\n\n/**\n * Resolves a plain CSS variable name to its computed value.\n *\n * @param varName - A CSS variable name like '--my-color'\n * @param element - Optional DOM element to resolve from\n * @return The computed value or null\n */\nfunction resolveVariableName( varName: string, element?: HTMLElement | null ): string | null {\n\tif ( typeof window === 'undefined' || typeof document === 'undefined' ) {\n\t\treturn null;\n\t}\n\n\ttry {\n\t\tconst targetElement = element || document.documentElement;\n\t\tconst computedValue = getComputedStyle( targetElement ).getPropertyValue( varName ).trim();\n\n\t\treturn computedValue || null;\n\t} catch {\n\t\t// Return null if getComputedStyle throws (e.g., detached element)\n\t\treturn null;\n\t}\n}\n","import { hsl as d3Hsl } from '@visx/vendor/d3-color';\nimport { getColorDistance } from '../../../utils';\n\nexport interface ColorCache {\n\tcolors: string[];\n\thues: number[];\n\texistingHslColors: Array< [ number, number, number ] >;\n\tminHue: number;\n\tmaxHue: number;\n}\n\n/**\n * Golden ratio for mathematically pleasing color distribution\n * Used to generate evenly spaced hues that are visually distinct\n */\nconst GOLDEN_RATIO = 0.618033988749;\n\n/**\n * Minimum perceptual distance between colors to ensure visual distinction\n * Based on weighted HSL distance calculation optimized for chart readability\n */\nconst MIN_COLOR_DISTANCE = 25;\n\n/**\n * Maximum attempts to find a sufficiently different color\n * Prevents infinite loops while allowing reasonable search space\n */\nconst MAX_COLOR_GENERATION_ATTEMPTS = 50;\n\n/**\n * Color variation attempt offset\n * Small increment to explore slightly different color variations per attempt\n */\nconst VARIATION_ATTEMPT_OFFSET = 0.1;\n\n// Saturation configuration for generated colors\n\n/**\n * Base saturation percentage for generated colors\n * 45% provides muted, professional colors without being washed out\n */\nconst BASE_SATURATION = 45;\n\n/**\n * Number of saturation variation steps\n * Creates 3 different saturation levels for variety\n */\nconst SATURATION_VARIATION_STEPS = 3;\n\n/**\n * Saturation increment per variation step\n * 10% increments provide subtle variation while keeping colors muted\n * Results in saturation levels: 45%, 55%, 65%\n */\nconst SATURATION_INCREMENT = 10;\n\n// Lightness configuration for WCAG AA accessibility compliance\n\n/**\n * Base lightness percentage for generated colors\n * 35% ensures sufficient contrast against white backgrounds for WCAG AA compliance\n * WCAG AA requires 4.5:1 contrast ratio for normal text\n */\nconst BASE_LIGHTNESS = 35;\n\n/**\n * Number of lightness variation steps\n * Creates 4 different lightness levels for variety\n */\nconst LIGHTNESS_VARIATION_STEPS = 4;\n\n/**\n * Lightness increment per variation step\n * 8% increments provide subtle lightness variation while maintaining accessibility\n * Results in lightness levels: 35%, 43%, 51%, 59%\n * All levels maintain WCAG AA compliance against white backgrounds\n */\nconst LIGHTNESS_INCREMENT = 8;\n\n// Hue range expansion and constraints\n\n/**\n * Minimum hue range in degrees to ensure sufficient color variety\n * 60 degrees provides reasonable color spread even for narrow palettes\n */\nconst MIN_HUE_RANGE_DEGREES = 60;\n\n/**\n * Hue range expansion factor\n * 1.3x expansion provides slightly more variety than the original palette\n */\nconst HUE_RANGE_EXPANSION_FACTOR = 1.3;\n\n/**\n * Threshold for detecting hue wrap-around (color wheel boundary crossing)\n * 180 degrees indicates the colors span more than half the color wheel\n */\nconst HUE_WRAP_THRESHOLD_DEGREES = 180;\n\n/**\n * Full color wheel rotation in degrees\n */\nconst FULL_HUE_ROTATION_DEGREES = 360;\n\n/**\n * Factor for single color hue range\n */\nconst SINGLE_COLOR_HUE_RANGE_FACTOR = 0.33;\n\n/**\n * Get a color from the colors array or generate a new color using the golden ratio\n *\n * @param index - the index of the color to get\n * @param colorCache - pre-computed color data for performance\n * @return a color from the colors array or a new color using the golden ratio\n */\nexport const getChartColor = ( index: number, colorCache: ColorCache ): string => {\n\tconst {\n\t\tcolors,\n\t\thues,\n\t\texistingHslColors,\n\t\tminHue: cachedMinHue,\n\t\tmaxHue: cachedMaxHue,\n\t} = colorCache;\n\n\tif ( index < colors.length ) {\n\t\treturn colors[ index ];\n\t}\n\n\tlet minHue = cachedMinHue;\n\tlet maxHue = cachedMaxHue;\n\n\t// Generate additional colors using golden ratio, avoiding similar colors\n\tfor ( let attempt = 0; attempt < MAX_COLOR_GENERATION_ATTEMPTS; attempt++ ) {\n\t\t// Calculate hue using golden ratio distribution with variation per attempt\n\t\t// Formula: ((base_index + attempt_variation) * golden_ratio * 360°) mod 360°\n\t\t// This ensures mathematically pleasing spacing while allowing slight shifts per attempt\n\t\tlet hue =\n\t\t\t( ( index - colors.length + attempt * VARIATION_ATTEMPT_OFFSET ) *\n\t\t\t\tGOLDEN_RATIO *\n\t\t\t\tFULL_HUE_ROTATION_DEGREES ) %\n\t\t\tFULL_HUE_ROTATION_DEGREES;\n\n\t\t// If we have existing colors, constrain new colors to their hue range\n\t\tif ( hues.length > 0 ) {\n\t\t\t// Handle hue wrap-around (e.g., if colors span across 0 degrees)\n\t\t\tlet hueRange = maxHue - minHue;\n\n\t\t\t// If there's only one color, use a set hue range for limited variety\n\t\t\tif ( hues.length === 1 ) {\n\t\t\t\thueRange = FULL_HUE_ROTATION_DEGREES * SINGLE_COLOR_HUE_RANGE_FACTOR;\n\t\t\t} else if ( hueRange > HUE_WRAP_THRESHOLD_DEGREES ) {\n\t\t\t\t// If the range is very large, it might be wrapping around the color wheel\n\t\t\t\t// Check if a smaller range exists when considering wrap-around\n\t\t\t\tconst altMinHue = Math.min( ...hues.filter( h => h > HUE_WRAP_THRESHOLD_DEGREES ) );\n\t\t\t\tconst altMaxHue =\n\t\t\t\t\tMath.max( ...hues.filter( h => h < HUE_WRAP_THRESHOLD_DEGREES ) ) +\n\t\t\t\t\tFULL_HUE_ROTATION_DEGREES;\n\t\t\t\tconst altRange = altMaxHue - altMinHue;\n\n\t\t\t\tif ( altRange < hueRange ) {\n\t\t\t\t\tminHue = altMinHue;\n\t\t\t\t\tmaxHue = altMaxHue;\n\t\t\t\t\thueRange = altRange;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Expand the range slightly to provide some variation\n\t\t\tconst expandedRange = Math.max(\n\t\t\t\thueRange * HUE_RANGE_EXPANSION_FACTOR,\n\t\t\t\tMIN_HUE_RANGE_DEGREES\n\t\t\t);\n\t\t\tconst rangeCenter = ( minHue + maxHue ) / 2;\n\t\t\tconst expandedMin = rangeCenter - expandedRange / 2;\n\n\t\t\t// Map the generated hue to the expanded range\n\t\t\thue = expandedMin + ( hue / FULL_HUE_ROTATION_DEGREES ) * expandedRange;\n\n\t\t\t// Normalize to 0-360 range\n\t\t\thue =\n\t\t\t\t( ( hue % FULL_HUE_ROTATION_DEGREES ) + FULL_HUE_ROTATION_DEGREES ) %\n\t\t\t\tFULL_HUE_ROTATION_DEGREES;\n\t\t}\n\n\t\tconst saturation =\n\t\t\tBASE_SATURATION + ( ( index + attempt ) % SATURATION_VARIATION_STEPS ) * SATURATION_INCREMENT;\n\t\tconst lightness =\n\t\t\tBASE_LIGHTNESS + ( ( index + attempt ) % LIGHTNESS_VARIATION_STEPS ) * LIGHTNESS_INCREMENT;\n\n\t\tconst candidateHsl: [ number, number, number ] = [ hue, saturation, lightness ];\n\n\t\t// Check if this color is sufficiently different from existing colors\n\t\tlet isSufficientlyDifferent = true;\n\t\tfor ( const existingHsl of existingHslColors ) {\n\t\t\tif ( getColorDistance( candidateHsl, existingHsl ) < MIN_COLOR_DISTANCE ) {\n\t\t\t\tisSufficientlyDifferent = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif ( isSufficientlyDifferent ) {\n\t\t\t// d3-color uses 0-1 scale for saturation and lightness\n\t\t\treturn d3Hsl( Math.round( hue ), saturation / 100, lightness / 100 ).formatHex();\n\t\t}\n\t}\n\n\t// Fallback if we couldn't find a sufficiently different color\n\t// Formula: ((base_index) * golden_ratio * 360°) mod 360°\n\t// This ensures mathematically pleasing spacing while maintaining consistency\n\tconst fallbackHue =\n\t\t( ( index - colors.length ) * GOLDEN_RATIO * FULL_HUE_ROTATION_DEGREES ) %\n\t\tFULL_HUE_ROTATION_DEGREES;\n\tconst fallbackSaturation =\n\t\tBASE_SATURATION + ( index % SATURATION_VARIATION_STEPS ) * SATURATION_INCREMENT;\n\tconst fallbackLightness =\n\t\tBASE_LIGHTNESS + ( index % LIGHTNESS_VARIATION_STEPS ) * LIGHTNESS_INCREMENT;\n\t// d3-color uses 0-1 scale for saturation and lightness\n\treturn d3Hsl(\n\t\tMath.round( fallbackHue ),\n\t\tfallbackSaturation / 100,\n\t\tfallbackLightness / 100\n\t).formatHex();\n};\n","import type { CompleteChartTheme } from '../../types';\n\n/**\n * Default theme configuration\n */\nconst defaultTheme: CompleteChartTheme = {\n\tbackgroundColor: '#FFFFFF', // chart background color\n\tlabelBackgroundColor: 'transparent', // label background color (transparent by default)\n\tlabelTextColor: '#FFFFFF', // label text color (white to match original behavior)\n\tcolors: [ '#98C8DF', '#006DAB', '#A6DC80', '#1F9828', '#FF8C8F' ],\n\tgridStyles: {\n\t\tstroke: '#DCDCDE',\n\t\tstrokeWidth: 1,\n\t},\n\ttickLength: 4,\n\tgridColor: '',\n\tgridColorDark: '',\n\txTickLineStyles: { stroke: 'black' },\n\txAxisLineStyles: { stroke: '#DCDCDE', strokeWidth: 1 },\n\tlegend: {\n\t\tlabelStyles: {\n\t\t\tcolor: 'var(--jp-gray-80, #2c3338)',\n\t\t},\n\t\tcontainerStyles: {},\n\t\tshapeStyles: [],\n\t},\n\tseriesLineStyles: [],\n\tglyphs: [],\n\tsvgLabelSmall: { fill: 'var(--jp-gray-80, #2c3338)' },\n\tannotationStyles: {\n\t\tlabel: {\n\t\t\tanchorLineStroke: 'var(--jp-gray-80, #2c3338)',\n\t\t\tbackgroundFill: '#fff',\n\t\t},\n\t\tconnector: {\n\t\t\tstroke: 'var(--jp-gray-80, #2c3338)',\n\t\t},\n\t\tcircleSubject: {\n\t\t\tstroke: 'transparent',\n\t\t\tfill: 'var(--jp-gray-80, #2c3338)',\n\t\t\tradius: 5,\n\t\t},\n\t},\n\tgeoChart: {\n\t\tfeatureFillColor: 'var(--jp-gray-0, #f6f7f7)',\n\t},\n\tleaderboardChart: {\n\t\trowGap: 12,\n\t\tcolumnGap: 4,\n\t\tlabelSpacing: 1.5,\n\t\tdeltaColors: [ '#FF8C8F', '#757575', '#1F9828' ], // [negative, neutral, positive]\n\t},\n\tconversionFunnelChart: {\n\t\tbackgroundColor: '#F3F4F6',\n\t\tpositiveChangeColor: '#1F9828',\n\t\tnegativeChangeColor: '#FF8C8F',\n\t},\n\tlineChart: {\n\t\tlineStyles: {\n\t\t\tcomparison: {\n\t\t\t\tstrokeDasharray: '4 4',\n\t\t\t\tstrokeLinecap: 'square',\n\t\t\t},\n\t\t},\n\t},\n\tsparkline: {\n\t\tmargin: { top: 2, right: 2, bottom: 2, left: 2 },\n\t\tstrokeWidth: 1.5,\n\t},\n};\n\nexport { defaultTheme };\n","import { useContext } from 'react';\nimport { GlobalChartsContext } from '../global-charts-provider';\nimport type { GlobalChartsContextValue } from '../types';\n\nexport const useGlobalChartsContext = (): GlobalChartsContextValue => {\n\tconst context = useContext( GlobalChartsContext );\n\tif ( ! context ) {\n\t\tthrow new Error( 'useGlobalChartsContext must be used within a GlobalChartsProvider' );\n\t}\n\treturn context;\n};\n","import { useId } from 'react';\n\nexport const useChartId = ( providedId?: string ): string => {\n\tconst generatedId = useId();\n\treturn providedId || generatedId;\n};\n","import { useEffect, useMemo } from 'react';\nimport { useDeepMemo } from '../../../hooks';\nimport { useGlobalChartsContext } from './use-global-charts-context';\nimport type { BaseLegendItem } from '../../../components/legend';\nimport type { ChartType } from '../../../types';\n\nexport const useChartRegistration = ( {\n\tchartId,\n\tlegendItems,\n\tchartType,\n\tisDataValid,\n\tmetadata,\n}: {\n\tchartId: string;\n\tlegendItems: BaseLegendItem[];\n\tchartType: ChartType;\n\tisDataValid: boolean;\n\tmetadata?: Record< string, unknown >;\n} ): void => {\n\tconst { registerChart, unregisterChart } = useGlobalChartsContext();\n\n\t// Memoize legendItems with deep comparison to prevent infinite loops\n\tconst stableLegendItems = useDeepMemo( legendItems );\n\n\t// Memoize metadata to prevent unnecessary re-renders\n\tconst memoizedMetadata = useMemo( () => metadata, [ metadata ] );\n\n\tuseEffect( () => {\n\t\t// Only register if data is valid\n\t\tif ( isDataValid ) {\n\t\t\tregisterChart( chartId, {\n\t\t\t\tlegendItems: stableLegendItems,\n\t\t\t\tchartType,\n\t\t\t\tmetadata: memoizedMetadata,\n\t\t\t} );\n\t\t}\n\n\t\treturn () => {\n\t\t\tunregisterChart( chartId );\n\t\t};\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [\n\t\tchartId,\n\t\tstableLegendItems,\n\t\tchartType,\n\t\tmemoizedMetadata,\n\t\tisDataValid,\n\t\t// Removed registerChart and unregisterChart from dependencies\n\t\t// They are stable functions created with useCallback and empty deps\n\t] );\n};\n","import isEqual from 'fast-deep-equal';\nimport { useRef } from 'react';\n\n/**\n * Custom hook to memoize a value using deep equality comparison.\n * Prevents unnecessary re-renders when objects have the same content but different references.\n *\n * @param value - The value to memoize with deep equality comparison\n * @return The memoized value that only changes when deeply different\n */\nexport const useDeepMemo = < T >( value: T ): T => {\n\tconst ref = useRef< T >( value );\n\n\tif ( ! isEqual( ref.current, value ) ) {\n\t\tref.current = value;\n\t}\n\n\treturn ref.current;\n};\n","import { buildChartTheme } from '@visx/xychart';\nimport { useMemo } from 'react';\nimport { useGlobalChartsTheme } from '../providers';\nimport type { SeriesData } from '../types';\n\nexport const useXYChartTheme = ( data: SeriesData[] ) => {\n\tconst theme = useGlobalChartsTheme();\n\n\treturn useMemo( () => {\n\t\tconst seriesColors = ( data ?? [] )\n\t\t\t.map( series => series.options?.stroke )\n\t\t\t.filter( ( color ): color is string => Boolean( color ) );\n\n\t\treturn buildChartTheme( {\n\t\t\t...theme,\n\t\t\tcolors: [ ...seriesColors, ...( theme.colors ?? [] ) ],\n\t\t} );\n\t}, [ theme, data ] );\n};\n","import { useMemo } from 'react';\nimport { parseAsLocalDate } from '../utils';\nimport type { SeriesData } from '../types';\n\n/**\n * Hook that transforms and sorts chart data, handling date parsing and sorting\n *\n * This hook extracts the common data transformation logic used in both line-chart\n * and bar-chart components. It:\n * 1. Parses date strings into Date objects using parseAsLocalDate\n * 2. Sorts data points by date when date properties are present\n * 3. Returns the original data unchanged when no date properties are found\n *\n * @param {SeriesData[]} data - The raw chart data to transform\n * @return {SeriesData[]} The transformed and sorted data\n */\nexport const useChartDataTransform = ( data: SeriesData[] ) => {\n\treturn useMemo( () => {\n\t\t// Check if the first data point has date or dateString properties\n\t\tconst firstPoint = data?.[ 0 ]?.data?.[ 0 ];\n\t\tconst hasDateProperties = firstPoint && ( 'date' in firstPoint || 'dateString' in firstPoint );\n\n\t\t// If no date properties found, return data unchanged\n\t\tif ( ! hasDateProperties ) {\n\t\t\treturn data;\n\t\t}\n\n\t\t// Transform and sort data with date properties\n\t\treturn data.map( series => ( {\n\t\t\t...series,\n\t\t\tdata: series.data\n\t\t\t\t.map( point => {\n\t\t\t\t\tlet date: Date | undefined;\n\n\t\t\t\t\tif ( 'date' in point && point.date ) {\n\t\t\t\t\t\tdate = point.date;\n\t\t\t\t\t} else if ( 'dateString' in point && point.dateString ) {\n\t\t\t\t\t\tdate = parseAsLocalDate( point.dateString );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...point,\n\t\t\t\t\t\tdate,\n\t\t\t\t\t};\n\t\t\t\t} )\n\t\t\t\t.sort( ( a, b ) => {\n\t\t\t\t\tif ( ! a.date || ! b.date ) return 0;\n\t\t\t\t\treturn a.date.getTime() - b.date.getTime();\n\t\t\t\t} ),\n\t\t} ) );\n\t}, [ data ] );\n};\n","import { createScale, getTicks } from '@visx/scale';\nimport { useMemo } from 'react';\nimport { getLongestTickWidth } from '../utils';\n/**\n * Base top margin used when no dynamic adjustments are necessary.\n */\nconst DEFAULT_MARGIN_TOP = 10;\n\n/**\n * Base right margin used when no dynamic adjustments are necessary.\n */\nconst DEFAULT_MARGIN_RIGHT = 20;\n\n/**\n * Base bottom margin used for charts with a bottom X-axis.\n * This is large enough for typical font sizes and will be increased\n * dynamically when tick labels require more space.\n */\nconst DEFAULT_MARGIN_BOTTOM = 20;\n\n/**\n * Base left margin used when no dynamic adjustments are necessary.\n */\nconst DEFAULT_MARGIN_LEFT = 20;\n\n/**\n * Bottom margin to use when the X-axis is rendered at the top.\n * We only need a small buffer below the chart in that case.\n */\nconst DEFAULT_BOTTOM_FOR_TOP_AXIS = 10;\n\n/**\n * Fallback font size used when we cannot derive a font size\n * from the theme or axis styles for X-axis tick labels.\n */\nconst DEFAULT_FONT_SIZE = 12;\n\n/**\n * Fallback tick length used when tickLength is not provided\n * by the theme for either axis.\n */\nconst DEFAULT_TICK_LENGTH = 8;\n\n/**\n * Fallback width used for Y-axis tick labels when we cannot\n * measure them via getLongestTickWidth.\n */\nconst DEFAULT_Y_TICK_WIDTH = 40;\nconst resolveFontSize = val => {\n if (typeof val === 'number' && !isNaN(val)) {\n return val;\n }\n if (typeof val === 'string') {\n const parsed = parseFloat(val);\n return isNaN(parsed) ? undefined : parsed;\n }\n return undefined;\n};\nconst getXAxisLabelMetrics = (theme, orientation) => {\n const xAxisStyles = orientation === 'top' ? theme.axisStyles?.x?.top : theme.axisStyles?.x?.bottom;\n const fontSize = resolveFontSize(xAxisStyles?.axisLabel?.fontSize) || resolveFontSize(theme.svgLabelSmall?.fontSize) || DEFAULT_FONT_SIZE;\n const tickLength = xAxisStyles?.tickLength ?? DEFAULT_TICK_LENGTH;\n return {\n fontSize,\n tickLength\n };\n};\nexport const useChartMargin = (height, options, data, theme, horizontal = false) => {\n const yTicks = useMemo(() => {\n const allDataPoints = data.flatMap(series => series.data);\n if (horizontal) {\n // When horizontal, y ticks renders fixed tick labels.\n return allDataPoints.map(d => d.label || options.axis?.y?.tickFormat(d.date.getTime(), 0, []));\n }\n const minY = Math.min(...allDataPoints.map(d => d.value));\n const maxY = Math.max(...allDataPoints.map(d => d.value));\n const yScale = createScale({\n ...options.yScale,\n domain: [minY, maxY],\n range: [height, 0]\n });\n return getTicks(yScale, options.axis?.y?.numTicks);\n }, [options, data, height, horizontal]);\n return useMemo(() => {\n // Default margin is for bottom axis labels.\n const defaultMargin = {\n top: DEFAULT_MARGIN_TOP,\n right: DEFAULT_MARGIN_RIGHT,\n bottom: DEFAULT_MARGIN_BOTTOM,\n left: DEFAULT_MARGIN_LEFT\n };\n\n // Auto-calculate margin for y axis labels based on orientation and tick width.\n const yAxisOrientation = options.axis?.y?.orientation;\n const yAxisStyles = yAxisOrientation === 'right' ? theme.axisStyles.y.right : theme.axisStyles.y.left;\n const yTickWidth = getLongestTickWidth(yTicks, options.axis?.y?.tickFormat, yAxisStyles.axisLabel);\n const yMarginValue = (yTickWidth ?? DEFAULT_Y_TICK_WIDTH) + (yAxisStyles?.tickLength ?? 0);\n if (yAxisOrientation === 'right') {\n defaultMargin.right = yMarginValue;\n } else {\n defaultMargin.left = yMarginValue;\n }\n\n // Dynamically compute X-axis margin (bottom by default, or top if orientation is 'top').\n // This mirrors Y-axis behavior where margin is based on label size and tick length,\n // but keeps the padding minimal so consumers can control container spacing themselves.\n const xOrientation = options.axis?.x?.orientation === 'top' ? 'top' : 'bottom';\n const {\n fontSize,\n tickLength\n } = getXAxisLabelMetrics(theme, xOrientation);\n const computedXMargin = fontSize + tickLength;\n if (xOrientation === 'top') {\n defaultMargin.top = Math.max(defaultMargin.top, computedXMargin);\n defaultMargin.bottom = DEFAULT_BOTTOM_FOR_TOP_AXIS;\n } else {\n defaultMargin.bottom = Math.max(defaultMargin.bottom, computedXMargin);\n }\n return defaultMargin;\n }, [options, theme, yTicks]);\n};","import { useState, useCallback, useRef } from 'react';\n\n/**\n * Hook to measure the width and height of a DOM element.\n * Returns a ref callback to attach to the element and the current dimensions in pixels.\n *\n * @param {object} props - Optional props.\n * @param {number} props.initialWidth - The initial width to use.\n * @param {number} props.initialHeight - The initial height to use.\n *\n * @return {[Function, number, number]} A tuple containing a ref callback, width, and height in pixels\n */\nexport function useElementSize< T extends HTMLElement = HTMLDivElement >( {\n\tinitialWidth = 0,\n\tinitialHeight = 0,\n}: {\n\tinitialWidth?: number;\n\tinitialHeight?: number;\n} = {} ): [ ( node: T | null ) => void, number, number ] {\n\tconst [ width, setWidth ] = useState( initialWidth );\n\tconst [ height, setHeight ] = useState( initialHeight );\n\tconst observerRef = useRef< ResizeObserver | null >( null );\n\n\tconst refCallback = useCallback( ( node: T | null ) => {\n\t\tif ( observerRef.current ) {\n\t\t\tobserverRef.current.disconnect();\n\t\t\tobserverRef.current = null;\n\t\t}\n\t\tif ( node ) {\n\t\t\tconst handleResize = () => {\n\t\t\t\tconst rect = node.getBoundingClientRect();\n\t\t\t\tsetWidth( rect.width || 0 );\n\t\t\t\tsetHeight( rect.height || 0 );\n\t\t\t};\n\t\t\thandleResize();\n\t\t\tconst resizeObserver = new ResizeObserver( handleResize );\n\t\t\tresizeObserver.observe( node );\n\t\t\tobserverRef.current = resizeObserver;\n\t\t}\n\t}, [] );\n\n\treturn [ refCallback, width, height ];\n}\n","import { useCallback, useRef, useState } from 'react';\n\n/**\n * Hook to detect if text content is truncated within its container.\n * Uses ResizeObserver to dynamically track changes in element size.\n *\n * @param enabled - Whether truncation detection should be active. Defaults to true.\n * @return A tuple containing:\n * - [0] refCallback: Function to attach to the text element as a ref\n * - [1] isTruncated: Boolean indicating if the text is currently truncated\n *\n * @example\n * ```tsx\n * const [textRef, isTruncated] = useTextTruncation(true);\n *\n * return (\n * <span ref={textRef} title={isTruncated ? fullText : undefined}>\n * {text}\n * </span>\n * );\n * ```\n */\nexport function useTextTruncation(\n\tenabled: boolean = true\n): [ ( node: HTMLElement | null ) => void, boolean ] {\n\tconst [ isTruncated, setIsTruncated ] = useState( false );\n\tconst observerRef = useRef< ResizeObserver | null >( null );\n\n\tconst refCallback = useCallback(\n\t\t( node: HTMLElement | null ) => {\n\t\t\t// Cleanup existing observer\n\t\t\tif ( observerRef.current ) {\n\t\t\t\tobserverRef.current.disconnect();\n\t\t\t\tobserverRef.current = null;\n\t\t\t}\n\n\t\t\tif ( node && enabled ) {\n\t\t\t\tconst checkTruncation = () => {\n\t\t\t\t\t// Check if content width exceeds container width (indicates truncation)\n\t\t\t\t\tconst truncated = node.scrollWidth > node.clientWidth;\n\t\t\t\t\tsetIsTruncated( truncated );\n\t\t\t\t};\n\n\t\t\t\t// Initial check\n\t\t\t\tcheckTruncation();\n\n\t\t\t\t// Watch for size changes\n\t\t\t\tconst resizeObserver = new ResizeObserver( checkTruncation );\n\t\t\t\tresizeObserver.observe( node );\n\t\t\t\tobserverRef.current = resizeObserver;\n\t\t\t} else {\n\t\t\t\tsetIsTruncated( false );\n\t\t\t}\n\t\t},\n\t\t[ enabled ]\n\t);\n\n\treturn [ refCallback, isTruncated ];\n}\n","import { useMemo } from 'react';\nimport type { SeriesData, DataPointDate } from '../types';\n\nexport type EnhancedDataPoint = DataPointDate & {\n\tvisualValue?: number;\n};\n\nexport interface EnhancedSeriesData extends Omit< SeriesData, 'data' > {\n\tdata: EnhancedDataPoint[];\n}\n\nexport interface UseZeroValueDisplayOptions {\n\tenabled: boolean;\n\t/**\n\t * The pixel length of the value axis (height for vertical charts, width for\n\t * horizontal charts). Used to calculate a minimum visible value that ensures\n\t * zero-value bars are at least MIN_PIXEL_HEIGHT pixels tall along that axis.\n\t */\n\tvalueAxisLength?: number;\n}\n\n/**\n * Minimum pixel size for near-zero bars (non-zero values that would render too small).\n * Using 3px to be visible but not misleading - larger values might look like actual data.\n */\nconst MIN_PIXEL_SIZE = 3;\n\n/**\n * Pixel size for zero-value bars (1px less than near-zero to be visually distinguishable).\n */\nconst ZERO_PIXEL_SIZE = MIN_PIXEL_SIZE - 1;\n\nexport const useZeroValueDisplay = (\n\tdata: SeriesData[],\n\toptions: UseZeroValueDisplayOptions = { enabled: false }\n): SeriesData[] | EnhancedSeriesData[] => {\n\tconst { enabled, valueAxisLength } = options;\n\n\treturn useMemo( () => {\n\t\tif ( ! enabled || ! valueAxisLength || valueAxisLength <= 0 ) return data;\n\n\t\t// Find max absolute value\n\t\tlet maxAbsoluteValue = 0;\n\t\tfor ( const series of data ) {\n\t\t\tfor ( const point of series.data ) {\n\t\t\t\tif ( point.value !== null && point.value !== 0 ) {\n\t\t\t\t\tmaxAbsoluteValue = Math.max( maxAbsoluteValue, Math.abs( point.value ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( maxAbsoluteValue === 0 ) return data;\n\n\t\t// Calculate values that render as specific pixel sizes, clamped to maxAbsoluteValue\n\t\t// to prevent visual distortion when valueAxisLength is very small\n\t\tconst minNonZeroValue = Math.min(\n\t\t\t( MIN_PIXEL_SIZE / valueAxisLength ) * maxAbsoluteValue,\n\t\t\tmaxAbsoluteValue\n\t\t);\n\t\tconst zeroVisualValue = Math.min(\n\t\t\t( ZERO_PIXEL_SIZE / valueAxisLength ) * maxAbsoluteValue,\n\t\t\tmaxAbsoluteValue\n\t\t);\n\n\t\treturn data.map( series => ( {\n\t\t\t...series,\n\t\t\tdata: series.data.map( ( point: DataPointDate ): EnhancedDataPoint => {\n\t\t\t\t// Zero values get a smaller visual representation (2px)\n\t\t\t\tif ( point.value === 0 ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...point,\n\t\t\t\t\t\tvisualValue: zeroVisualValue,\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Null values should remain untouched\n\t\t\t\tif ( point.value === null ) {\n\t\t\t\t\treturn point;\n\t\t\t\t}\n\n\t\t\t\tconst absValue = Math.abs( point.value );\n\n\t\t\t\t// Near-zero values that would render below MIN_PIXEL_SIZE get boosted to 3px\n\t\t\t\t// Preserve the sign for negative values\n\t\t\t\tif ( absValue < minNonZeroValue ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...point,\n\t\t\t\t\t\tvisualValue: Math.sign( point.value ) * minNonZeroValue,\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\treturn point;\n\t\t\t} ),\n\t\t} ) );\n\t}, [ data, enabled, valueAxisLength ] );\n};\n","import { useMemo } from 'react';\n\ninterface DataPointWithValue {\n\tvalue: number;\n}\n\n/**\n * Hook to calculate percentages from values for chart data.\n * Ensures percentages are always derived from values (single source of truth).\n *\n * @param data - Array of data points with values\n * @return Data with calculated percentages\n */\nexport const useDataWithPercentages = < T extends DataPointWithValue >(\n\tdata: T[]\n): ( T & { percentage: number } )[] => {\n\treturn useMemo( () => {\n\t\tconst totalValue = data.reduce( ( sum, segment ) => sum + segment.value, 0 );\n\t\treturn data.map( segment => ( {\n\t\t\t...segment,\n\t\t\tpercentage: totalValue > 0 ? ( segment.value / totalValue ) * 100 : 0,\n\t\t} ) );\n\t}, [ data ] );\n};\n","import { useMemo } from 'react';\n\n/**\n * Data point interface for charts with interactive legends.\n * Requires label for series identification, value for calculations,\n * and percentage (should be pre-calculated by the chart component).\n */\ninterface DataPointWithPercentage {\n\tlabel: string;\n\tvalue: number;\n\tpercentage: number;\n}\n\n/**\n * Parameters for the useInteractiveLegendData hook.\n */\ninterface UseInteractiveLegendDataParams< T extends DataPointWithPercentage > {\n\t/** The chart data with pre-calculated percentages */\n\tdata: T[];\n\t/** Unique chart identifier, required for interactive legends */\n\tchartId: string | undefined;\n\t/** Whether interactive legend filtering is enabled */\n\tlegendInteractive: boolean;\n\t/** Function to check if a series is visible in the legend */\n\tisSeriesVisible: ( chartId: string, label: string ) => boolean;\n}\n\n/**\n * Return value from the useInteractiveLegendData hook.\n */\ninterface UseInteractiveLegendDataResult< T extends DataPointWithPercentage > {\n\t/** Filtered data array containing only visible segments with recalculated percentages */\n\tvisibleData: T[];\n\t/** Boolean indicating if all segments are hidden */\n\tallSegmentsHidden: boolean;\n\t/**\n\t * Legend data with stable percentage formatting.\n\t * Hidden items keep their original percentage.\n\t * Visible items show recalculated percentages that total 100%.\n\t */\n\tlegendData: T[];\n}\n\n/**\n * Custom hook to filter and recalculate chart data for interactive legends.\n *\n * When interactive legends are enabled, this hook:\n * 1. Filters data to show only visible series based on legend selection\n * 2. Recalculates percentages so visible segments total 100%\n * 3. Tracks whether all segments are hidden to show empty state\n *\n * This is particularly useful for pie charts, donut charts, and semi-circle charts\n * where segment visibility and percentages need to be dynamically adjusted.\n *\n * @example\n * ```tsx\n * const { visibleData, allSegmentsHidden, legendData } = useInteractiveLegendData({\n * data: chartData,\n * chartId: 'my-pie-chart',\n * legendInteractive: true,\n * isSeriesVisible: (id, label) => context.isSeriesVisible(id, label),\n * });\n *\n * // Use legendData for creating legend items (shows recalculated percentages)\n * const legendItems = useChartLegendItems(legendData, legendOptions);\n *\n * if (allSegmentsHidden) {\n * return <EmptyState />;\n * }\n *\n * // Use visibleData for rendering the chart (only visible segments)\n * return <PieChart data={visibleData} />;\n * ```\n *\n * @param params - Configuration object for the hook\n * @param params.data - The chart data to filter\n * @param params.chartId - Unique identifier for the chart (required for interactive mode)\n * @param params.legendInteractive - Whether to enable interactive filtering\n * @param params.isSeriesVisible - Function to check series visibility\n * @return Object containing visibleData, allSegmentsHidden flag, and legendData with recalculated percentages\n */\nexport const useInteractiveLegendData = < T extends DataPointWithPercentage >( {\n\tdata,\n\tchartId,\n\tlegendInteractive,\n\tisSeriesVisible,\n}: UseInteractiveLegendDataParams< T > ): UseInteractiveLegendDataResult< T > => {\n\t// Filter and recalculate data for interactive legends\n\t// Note: data should already have percentages calculated by the chart component\n\tconst visibleData = useMemo( () => {\n\t\t// If interactive mode is disabled or no chartId, return data as-is\n\t\tif ( ! chartId || ! legendInteractive ) {\n\t\t\treturn data;\n\t\t}\n\n\t\t// Filter to only visible segments based on legend state\n\t\tconst filtered = data.filter( segment => isSeriesVisible( chartId, segment.label ) );\n\n\t\t// If no segments are visible, return empty array\n\t\tif ( filtered.length === 0 ) {\n\t\t\treturn [];\n\t\t}\n\n\t\t// Recalculate percentages from values so visible segments total 100%\n\t\tconst totalValue = filtered.reduce( ( sum, segment ) => sum + segment.value, 0 );\n\t\treturn filtered.map( segment => ( {\n\t\t\t...segment,\n\t\t\tpercentage: totalValue > 0 ? ( segment.value / totalValue ) * 100 : 0,\n\t\t} ) );\n\t}, [ data, chartId, isSeriesVisible, legendInteractive ] );\n\n\t// Check if all segments are hidden (only relevant in interactive mode)\n\tconst allSegmentsHidden = useMemo( () => {\n\t\treturn legendInteractive && visibleData.length === 0;\n\t}, [ legendInteractive, visibleData ] );\n\n\t// Prepare legend data with percentages\n\t// Hidden items keep their original percentage (calculated from all values)\n\t// Visible items show recalculated percentages (totaling 100%)\n\tconst legendData = useMemo( () => {\n\t\tif ( ! legendInteractive || ! chartId ) {\n\t\t\treturn data;\n\t\t}\n\n\t\t// Build a Map for O(1) lookups instead of O(n) find() calls\n\t\tconst visibleDataMap = new Map( visibleData.map( d => [ d.label, d ] ) );\n\n\t\treturn data.map( segment => {\n\t\t\tconst isVisible = isSeriesVisible( chartId, segment.label );\n\t\t\tif ( ! isVisible ) {\n\t\t\t\t// Hidden items keep original percentage\n\t\t\t\treturn segment;\n\t\t\t}\n\n\t\t\t// For visible items, get the recalculated percentage from visibleData\n\t\t\treturn visibleDataMap.get( segment.label ) || segment;\n\t\t} );\n\t}, [ data, visibleData, legendInteractive, chartId, isSeriesVisible ] );\n\n\treturn { visibleData, allSegmentsHidden, legendData };\n};\n","import { useState, useEffect } from 'react';\n\n// 'no-preference' returns false in unsupported browsers,\n// causing a safe fallback to reduced motion instead of animating.\nconst QUERY = '(prefers-reduced-motion: no-preference)';\n\nconst getInitialState = () => ! window.matchMedia( QUERY ).matches;\n\n/**\n * Custom hook to determine if the user prefers reduced motion.\n * @return {boolean} A boolean indicating the user's preference for reduced motion.\n */\nexport function usePrefersReducedMotion() {\n\tconst [ prefersReducedMotion, setPrefersReducedMotion ] = useState( getInitialState );\n\n\tuseEffect( () => {\n\t\tconst mediaQueryList = window.matchMedia( QUERY );\n\n\t\tconst listener = event => {\n\t\t\tsetPrefersReducedMotion( ! event.matches );\n\t\t};\n\n\t\tmediaQueryList.addEventListener( 'change', listener );\n\n\t\treturn () => {\n\t\t\tmediaQueryList.removeEventListener( 'change', listener );\n\t\t};\n\t}, [] );\n\n\treturn prefersReducedMotion;\n}\n","import { useContext } from 'react';\nimport { GlobalChartsContext } from '../global-charts-provider';\nimport { defaultTheme } from '../themes';\nimport type { CompleteChartTheme } from '../../../types';\n\n/**\n * Hook to get the global chart theme from GlobalChartsProvider\n *\n * @return The global chart theme\n */\nexport const useGlobalChartsTheme = (): CompleteChartTheme => {\n\t// Get context but don't throw if it doesn't exist (for testing or standalone usage)\n\tconst context = useContext( GlobalChartsContext );\n\tconst globalTheme = context?.theme;\n\n\treturn globalTheme ?? defaultTheme;\n};\n","import { Group } from '@visx/group';\nimport { LegendItem, LegendLabel, LegendOrdinal, LegendShape } from '@visx/legend';\nimport { scaleOrdinal } from '@visx/scale';\nimport clsx from 'clsx';\nimport { forwardRef, useCallback, useContext } from 'react';\nimport { useTextTruncation } from '../../../hooks';\nimport { GlobalChartsContext, useGlobalChartsTheme } from '../../../providers';\nimport { valueOrIdentity, valueOrIdentityString, labelTransformFactory } from '../utils';\nimport styles from './base-legend.module.scss';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst orientationToFlexDirection = {\n horizontal: 'row',\n vertical: 'column'\n};\n\n// Component for legend text with truncation detection\n// Moved outside BaseLegend to prevent recreation on every render\nconst LegendText = ({\n text,\n textOverflow,\n maxWidth\n}) => {\n const isEllipsis = maxWidth != null && textOverflow === 'ellipsis';\n const [textRef, isTruncated] = useTextTruncation(Boolean(isEllipsis));\n return /*#__PURE__*/_jsx(\"span\", {\n ref: textRef,\n className: clsx(styles['legend-item-text'], maxWidth != null && styles[`legend-item-text--${textOverflow}`]),\n style: {\n ...(maxWidth != null && {\n maxWidth,\n minWidth: 0\n })\n },\n title: isEllipsis && isTruncated ? text : undefined,\n children: text\n });\n};\n\n/*\n * Base legend component that displays color-coded items with labels based on visx LegendOrdinal.\n * We avoid using LegendOrdinal directly to enable support for advanced features such as interactivity.\n */\nexport const BaseLegend = /*#__PURE__*/forwardRef(({\n items,\n className,\n orientation = 'horizontal',\n alignment = 'center',\n shape = 'rect',\n fill = valueOrIdentityString,\n size = valueOrIdentityString,\n labelFormat = valueOrIdentity,\n labelTransform = labelTransformFactory,\n itemStyles,\n itemClassName,\n labelStyles,\n labelClassName,\n shapeStyles,\n render,\n interactive = false,\n chartId\n}, ref) => {\n const {\n margin: itemMargin = '0',\n flexDirection: itemDirection = 'row'\n } = itemStyles ?? {};\n const {\n justifyContent: labelJustifyContent = 'flex-start',\n flex: labelFlex = '0 0 auto',\n margin: labelMargin = '0 4px',\n maxWidth,\n textOverflow = 'wrap'\n } = labelStyles ?? {};\n const {\n width: shapeWidth = 16,\n height: shapeHeight = 16,\n margin: shapeMargin = '2px 4px 2px 0'\n } = shapeStyles ?? {};\n const theme = useGlobalChartsTheme();\n const context = useContext(GlobalChartsContext);\n const legendScale = scaleOrdinal({\n domain: items.map(item => item.label),\n range: items.map(item => item.color)\n });\n const domain = legendScale.domain();\n const getShapeStyle = useCallback(({\n index\n }) => items[index]?.shapeStyle, [items]);\n\n // Handle legend item clicks for interactive mode\n const handleLegendClick = useCallback(seriesLabel => {\n if (interactive && chartId && context) {\n context.toggleSeriesVisibility(chartId, seriesLabel);\n }\n }, [interactive, chartId, context]);\n\n // Check if a series is visible\n const isSeriesVisible = useCallback(seriesLabel => {\n if (!interactive || !chartId || !context) {\n return true;\n }\n return context.isSeriesVisible(chartId, seriesLabel);\n }, [interactive, chartId, context]);\n\n // Create event handlers to avoid inline arrow functions\n const createClickHandler = useCallback(labelText => {\n if (!interactive) {\n return undefined;\n }\n return () => handleLegendClick(labelText);\n }, [interactive, handleLegendClick]);\n const createKeyDownHandler = useCallback(labelText => {\n if (!interactive) {\n return undefined;\n }\n return event => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n handleLegendClick(labelText);\n }\n };\n }, [interactive, handleLegendClick]);\n return render ? render(items) : /*#__PURE__*/_jsx(LegendOrdinal, {\n scale: legendScale,\n labelFormat: labelFormat,\n labelTransform: labelTransform,\n children: labels => /*#__PURE__*/_jsx(\"div\", {\n ref: ref,\n role: \"list\",\n className: clsx(styles.legend, styles[`legend--${orientation}`], styles[`legend--alignment-${alignment}`], className),\n style: {\n flexDirection: orientationToFlexDirection[orientation],\n ...theme.legend?.containerStyles\n },\n children: labels.map((label, i) => {\n const visible = isSeriesVisible(label.text);\n const handleClick = createClickHandler(label.text);\n const handleKeyDown = createKeyDownHandler(label.text);\n const matchedItem = items[i];\n return /*#__PURE__*/_jsxs(LegendItem, {\n className: clsx('visx-legend-item', styles['legend-item'], interactive && styles['legend-item--interactive'], !visible && styles['legend-item--inactive'], itemClassName),\n margin: itemMargin,\n flexDirection: orientation === 'vertical' && alignment === 'end' ? 'row-reverse' : itemDirection,\n onClick: handleClick,\n onKeyDown: handleKeyDown,\n role: interactive ? 'button' : undefined,\n tabIndex: interactive ? 0 : undefined,\n \"aria-pressed\": interactive ? visible : undefined,\n \"aria-label\": interactive ? `${label.text}: ${visible ? 'visible' : 'hidden'}. Toggle visibility.` : undefined,\n children: [items[i]?.renderGlyph ? /*#__PURE__*/_jsx(\"svg\", {\n width: items[i]?.glyphSize * 2,\n height: items[i]?.glyphSize * 2,\n children: /*#__PURE__*/_jsx(Group, {\n children: items[i]?.renderGlyph({\n key: `legend-glyph-${label.text}`,\n datum: {},\n index: i,\n color: fill(label),\n size: items[i]?.glyphSize,\n x: items[i]?.glyphSize,\n y: items[i]?.glyphSize\n })\n })\n }) : /*#__PURE__*/_jsx(LegendShape, {\n shape: shape,\n height: shapeHeight,\n width: shapeWidth,\n margin: shapeMargin,\n item: domain[i],\n itemIndex: i,\n label: label,\n fill: fill,\n size: size,\n shapeStyle: getShapeStyle\n }), /*#__PURE__*/_jsxs(LegendLabel, {\n className: clsx('visx-legend-label', styles['legend-item-label'], labelClassName),\n style: {\n justifyContent: labelJustifyContent,\n flex: labelFlex,\n margin: labelMargin,\n ...theme.legend?.labelStyles\n },\n children: [/*#__PURE__*/_jsx(LegendText, {\n text: label.text,\n textOverflow: textOverflow,\n maxWidth: maxWidth\n }), matchedItem?.value != null && matchedItem.value !== '' && /*#__PURE__*/_jsxs(\"span\", {\n className: styles['legend-item-value'],\n children: ['\\u00A0', matchedItem.value]\n })]\n })]\n }, `legend-${label.text}-${i}`);\n })\n })\n });\n});","export type ValueOrIdentity< T > = T | { value?: T };\n\n/**\n * Returns an object's value if defined, or the object.\n * @param _ - The object to return the value of.\n * @return The value of the object, or the object itself.\n */\nexport function valueOrIdentity< T >( _: ValueOrIdentity< T > ): T {\n\tif ( _ && typeof _ === 'object' && 'value' in _ && typeof _.value !== 'undefined' )\n\t\treturn _.value;\n\treturn _ as T;\n}\n\n/**\n * Returns an object's value if defined, or the object, coerced to a string.\n * @param _ - The object to return the value of.\n * @return The value of the object, or the object itself.\n */\nexport function valueOrIdentityString< T >( _: ValueOrIdentity< T > ): string {\n\treturn String( valueOrIdentity( _ ) );\n}\n","import type { ItemTransformer, LabelFormatter } from '@visx/legend/lib/types';\nimport type { AnyD3Scale, ScaleInput } from '@visx/scale';\n\n/**\n * Returns a function which takes a Datum and index as input, and returns a formatted label object.\n * @param {object} root0 - The object to return the value of.\n * @param {AnyD3Scale} root0.scale - The scale to use.\n * @param {LabelFormatter<ScaleInput<Scale>>} root0.labelFormat - The label format to use.\n * @return {ItemTransformer<ScaleInput<Scale>, ReturnType<Scale>>} The label transform factory.\n */\nexport function labelTransformFactory< Scale extends AnyD3Scale >( {\n\tscale,\n\tlabelFormat,\n}: {\n\tscale: Scale;\n\tlabelFormat: LabelFormatter< ScaleInput< Scale > >;\n} ): ItemTransformer< ScaleInput< Scale >, ReturnType< Scale > > {\n\treturn ( d, i ) => ( {\n\t\tdatum: d,\n\t\tindex: i,\n\t\ttext: `${ labelFormat( d, i ) }`,\n\t\tvalue: scale( d ),\n\t} );\n}\n","import 'css-chunk:src/components/legend/private/base-legend.module.scss';export default {\n \"legend\": \"a8ccharts-89ApsU\",\n \"legend--horizontal\": \"a8ccharts-AELBvX\",\n \"legend--vertical\": \"a8ccharts-fX8uQe\",\n \"legend--alignment-start\": \"a8ccharts-DEe0wg\",\n \"legend--alignment-center\": \"a8ccharts-WBKF9I\",\n \"legend--alignment-end\": \"a8ccharts-JfwMng\",\n \"legend-item\": \"a8ccharts-Vflwq8\",\n \"legend-item--interactive\": \"a8ccharts-qGsavM\",\n \"legend-item--inactive\": \"a8ccharts-ZtDY-Q\",\n \"legend-item-label\": \"a8ccharts-2H65Kr\",\n \"legend-item-text--wrap\": \"a8ccharts-faSDBI\",\n \"legend-item-text--ellipsis\": \"a8ccharts-FISUIO\",\n \"legend-item-value\": \"a8ccharts-DTZlT-\"\n};","import { formatNumber } from '@automattic/number-formatters';\nimport { useMemo } from 'react';\nimport {\n\tuseGlobalChartsContext,\n\ttype GetElementStylesParams,\n\ttype ElementStyles,\n} from '../../../providers';\nimport { formatPercentage } from '../../../utils';\nimport type { SeriesData, DataPointDate, DataPointPercentageCalculated } from '../../../types';\nimport type { BaseLegendItem } from '../types';\nimport type { LegendShape } from '@visx/legend/lib/types';\nimport type { GlyphProps } from '@visx/xychart';\nimport type { ReactNode } from 'react';\n\nexport type LegendValueDisplay = 'percentage' | 'value' | 'valueDisplay' | 'none';\n\nexport interface ChartLegendOptions {\n\twithGlyph?: boolean;\n\tglyphSize?: number;\n\trenderGlyph?: < Datum extends object >( props: GlyphProps< Datum > ) => ReactNode;\n\tshowValues?: boolean;\n\tlegendValueDisplay?: LegendValueDisplay;\n\tlegendShape?: LegendShape< SeriesData[], number >;\n}\n\n/**\n * Formats the value for a data point based on its type and display preference\n * @param point - The data point to format\n * @param showValues - Whether to show values or return empty string\n * @param legendValueDisplay - What type of value to display\n * @return Formatted value string\n */\nfunction formatPointValue(\n\tpoint: DataPointDate | DataPointPercentageCalculated,\n\tshowValues: boolean,\n\tlegendValueDisplay: LegendValueDisplay = 'percentage'\n): string {\n\tif ( ! showValues || legendValueDisplay === 'none' ) {\n\t\treturn '';\n\t}\n\n\t// Handle DataPointPercentageCalculated (pie chart data with calculated percentage)\n\tif ( 'percentage' in point ) {\n\t\tswitch ( legendValueDisplay ) {\n\t\t\tcase 'percentage':\n\t\t\t\treturn formatPercentage( point.percentage );\n\t\t\tcase 'value':\n\t\t\t\treturn formatNumber( point.value );\n\t\t\tcase 'valueDisplay':\n\t\t\t\treturn point.valueDisplay || formatNumber( point.value );\n\t\t\tdefault:\n\t\t\t\treturn '';\n\t\t}\n\t}\n\n\t// Handle DataPointDate (time series data)\n\tif ( 'value' in point ) {\n\t\treturn point.value !== null ? formatNumber( point.value ) : '';\n\t}\n\n\treturn '';\n}\n\n/**\n * Applies glyph configuration to a legend item if needed\n * @param baseItem - The base legend item\n * @param withGlyph - Whether to include glyph rendering\n * @param glyph - Glyph component from theme\n * @param renderGlyph - Custom glyph render function\n * @param glyphSize - Size of the glyph\n * @return The legend item with glyph configuration applied if applicable\n */\nfunction applyGlyphToLegendItem(\n\tbaseItem: BaseLegendItem,\n\twithGlyph: boolean,\n\tglyph?: < Datum extends object >( props: GlyphProps< Datum > ) => ReactNode,\n\trenderGlyph?: < Datum extends object >( props: GlyphProps< Datum > ) => ReactNode,\n\tglyphSize?: number\n): BaseLegendItem {\n\tif ( withGlyph ) {\n\t\tconst glyphToUse = glyph || renderGlyph;\n\t\tif ( glyphToUse ) {\n\t\t\treturn {\n\t\t\t\t...baseItem,\n\t\t\t\tglyphSize,\n\t\t\t\trenderGlyph: glyphToUse,\n\t\t\t};\n\t\t}\n\t}\n\n\treturn baseItem;\n}\n\n/**\n * Processes SeriesData into legend items\n * @param seriesData - The series data to process\n * @param getElementStyles - Function to get element styles\n * @param showValues - Whether to show values in legend\n * @param withGlyph - Whether to include glyph rendering\n * @param glyphSize - Size of the glyph\n * @param renderGlyph - Component to render the glyph\n * @param legendShape - The shape type for legend items (string literal or React component)\n * @return Array of processed legend items\n */\nfunction processSeriesData(\n\tseriesData: SeriesData[],\n\tgetElementStyles: ( params: GetElementStylesParams ) => ElementStyles,\n\tshowValues: boolean,\n\twithGlyph: boolean,\n\tglyphSize: number,\n\trenderGlyph?: < Datum extends object >( props: GlyphProps< Datum > ) => ReactNode,\n\tlegendShape?: LegendShape< SeriesData[], number >\n): BaseLegendItem[] {\n\tconst mapper = ( series: SeriesData, index: number ) => {\n\t\tconst { color, glyph, shapeStyles } = getElementStyles( {\n\t\t\tdata: series,\n\t\t\tindex,\n\t\t\tlegendShape,\n\t\t} );\n\n\t\tconst baseItem: BaseLegendItem = {\n\t\t\tlabel: series.label,\n\t\t\tvalue: showValues ? series.data?.length?.toString() || '0' : '',\n\t\t\tcolor,\n\t\t\tshapeStyle: shapeStyles,\n\t\t};\n\n\t\treturn applyGlyphToLegendItem( baseItem, withGlyph, glyph, renderGlyph, glyphSize );\n\t};\n\n\treturn seriesData.map( mapper );\n}\n\n/**\n * Processes point data into legend items\n * @param pointData - The point data to process\n * @param getElementStyles - Function to get element styles\n * @param showValues - Whether to show values in legend\n * @param legendValueDisplay - What type of value to display\n * @param withGlyph - Whether to include glyph rendering\n * @param glyphSize - Size of the glyph\n * @param renderGlyph - Component to render the glyph\n * @param legendShape - The shape type for legend items (string literal or React component)\n * @return Array of processed legend items\n */\nfunction processPointData(\n\tpointData: ( DataPointDate | DataPointPercentageCalculated )[],\n\tgetElementStyles: ( params: GetElementStylesParams ) => ElementStyles,\n\tshowValues: boolean,\n\tlegendValueDisplay: LegendValueDisplay,\n\twithGlyph: boolean,\n\tglyphSize: number,\n\trenderGlyph?: < Datum extends object >( props: GlyphProps< Datum > ) => ReactNode,\n\tlegendShape?: LegendShape< SeriesData[], number >\n): BaseLegendItem[] {\n\tconst mapper = ( point: DataPointDate | DataPointPercentageCalculated, index: number ) => {\n\t\tconst { color, glyph, shapeStyles } = getElementStyles( {\n\t\t\tdata: point as DataPointPercentageCalculated,\n\t\t\tindex,\n\t\t\tlegendShape,\n\t\t} );\n\n\t\tconst baseItem: BaseLegendItem = {\n\t\t\tlabel: point.label,\n\t\t\tvalue: formatPointValue( point, showValues, legendValueDisplay ),\n\t\t\tcolor,\n\t\t\tshapeStyle: shapeStyles,\n\t\t};\n\n\t\treturn applyGlyphToLegendItem( baseItem, withGlyph, glyph, renderGlyph, glyphSize );\n\t};\n\n\treturn pointData.map( mapper );\n}\n\n/**\n * Hook to transform chart data into legend items\n * @param data - The chart data to transform\n * @param options - Configuration options for legend generation\n * @param legendShape - The shape type for legend items (string literal or React component)\n * @return Array of legend items ready for display\n */\nexport function useChartLegendItems<\n\tT extends SeriesData[] | DataPointDate[] | DataPointPercentageCalculated[],\n>(\n\tdata: T,\n\toptions: ChartLegendOptions = {},\n\tlegendShape?: LegendShape< SeriesData[], number >\n): BaseLegendItem[] {\n\tconst {\n\t\tshowValues = false,\n\t\tlegendValueDisplay = 'percentage',\n\t\twithGlyph = false,\n\t\tglyphSize = 8,\n\t\trenderGlyph,\n\t} = options;\n\tconst { getElementStyles } = useGlobalChartsContext();\n\n\treturn useMemo( () => {\n\t\tif ( ! data || ! Array.isArray( data ) || data.length === 0 ) {\n\t\t\treturn [];\n\t\t}\n\n\t\t// Handle SeriesData (multiple series with data points)\n\t\tif ( 'data' in data[ 0 ] ) {\n\t\t\treturn processSeriesData(\n\t\t\t\tdata as SeriesData[],\n\t\t\t\tgetElementStyles,\n\t\t\t\tshowValues,\n\t\t\t\twithGlyph,\n\t\t\t\tglyphSize,\n\t\t\t\trenderGlyph,\n\t\t\t\tlegendShape\n\t\t\t);\n\t\t}\n\n\t\t// Handle DataPointDate or DataPointPercentageCalculated (single data points)\n\t\treturn processPointData(\n\t\t\tdata as ( DataPointDate | DataPointPercentageCalculated )[],\n\t\t\tgetElementStyles,\n\t\t\tshowValues,\n\t\t\tlegendValueDisplay,\n\t\t\twithGlyph,\n\t\t\tglyphSize,\n\t\t\trenderGlyph,\n\t\t\tlegendShape\n\t\t);\n\t}, [\n\t\tdata,\n\t\tgetElementStyles,\n\t\tshowValues,\n\t\tlegendValueDisplay,\n\t\twithGlyph,\n\t\tglyphSize,\n\t\trenderGlyph,\n\t\tlegendShape,\n\t] );\n}\n","import { formatNumber } from '@automattic/number-formatters';\nimport styles from './base-tooltip.module.scss';\nimport { Fragment as _Fragment, jsxs as _jsxs, jsx as _jsx } from \"react/jsx-runtime\";\nconst DefaultTooltipContent = ({\n data\n}) => /*#__PURE__*/_jsxs(_Fragment, {\n children: [data?.label, \": \", data?.valueDisplay || formatNumber(data?.value)]\n});\nexport const BaseTooltip = ({\n data,\n top,\n left,\n component: Component = DefaultTooltipContent,\n children,\n className,\n style,\n renderContainer = true\n}) => {\n const content = children || data && /*#__PURE__*/_jsx(Component, {\n data: data,\n className: className\n });\n if (!renderContainer) {\n return content;\n }\n return /*#__PURE__*/_jsx(\"div\", {\n className: styles.tooltip,\n style: {\n top,\n left,\n ...style\n },\n role: \"tooltip\",\n children: content\n });\n};","import 'css-chunk:src/components/tooltip/base-tooltip.module.scss';export default {\n \"tooltip\": \"a8ccharts-OfX6nd\"\n};","import { Tooltip, TooltipContext } from '@visx/xychart';\nimport { useContext, useEffect, useCallback, useMemo } from 'react';\n\n// Type for flattened tooltip data used in individual mode\n\n// Enhanced tooltip with keyboard navigation and accessibility\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const AccessibleTooltip = ({\n renderTooltip,\n selectedIndex,\n tooltipRef,\n keyboardFocusedClassName,\n series = [],\n mode = 'group',\n ...props\n}) => {\n const tooltipContext = useContext(TooltipContext);\n const tooltipData = useMemo(() => {\n if (mode !== 'individual') return [];\n if (series.length === 0) return [];\n const maxDataPoints = Math.max(...series.map(s => s.data.length));\n const flattened = [];\n\n // Pattern: [series1[0], series2[0], series3[0], series1[1], series2[1], series3[1], ...]\n for (let dataPointIndex = 0; dataPointIndex < maxDataPoints; dataPointIndex++) {\n for (let seriesIndex = 0; seriesIndex < series.length; seriesIndex++) {\n const seriesData = series[seriesIndex];\n if (dataPointIndex < seriesData.data.length) {\n flattened.push({\n datum: seriesData.data[dataPointIndex],\n seriesLabel: seriesData.label,\n seriesIndex,\n dataPointIndex\n });\n }\n }\n }\n return flattened;\n }, [series, mode]);\n\n // Handle tooltip highlighting for keyboard navigation\n useEffect(() => {\n if (selectedIndex === undefined) {\n tooltipContext?.hideTooltip();\n return;\n }\n if (mode === 'group') {\n // Show all series at the selected data point index in single tooltip.\n series.forEach((s, index) => {\n if (selectedIndex < s.data.length) {\n const datum = s.data[selectedIndex];\n tooltipContext?.showTooltip({\n datum,\n key: s.label,\n index\n });\n }\n });\n } else if (mode === 'individual') {\n // Show individual tooltips for each datapoint from each series.\n if (selectedIndex < tooltipData.length) {\n const tooltipItem = tooltipData[selectedIndex];\n tooltipContext?.showTooltip({\n datum: tooltipItem.datum,\n key: tooltipItem.seriesLabel,\n index: tooltipItem.seriesIndex\n });\n }\n }\n\n // Don't include tooltipContext in the dependency array to avoid loop.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectedIndex, tooltipData, series]);\n\n // Create a focusable renderTooltip that includes accessibility features\n const focusableRenderTooltip = useMemo(() => {\n if (!renderTooltip) return undefined;\n return params => {\n const tooltipContent = renderTooltip(params);\n if (selectedIndex !== undefined) {\n return /*#__PURE__*/_jsx(\"div\", {\n ref: tooltipRef,\n tabIndex: -1,\n role: \"tooltip\",\n \"aria-atomic\": \"true\",\n className: keyboardFocusedClassName,\n children: tooltipContent\n }, `chart-tooltip-${selectedIndex}`);\n }\n return /*#__PURE__*/_jsx(\"div\", {\n role: \"tooltip\",\n \"aria-live\": \"polite\",\n children: tooltipContent\n });\n };\n }, [renderTooltip, selectedIndex, tooltipRef, keyboardFocusedClassName]);\n return /*#__PURE__*/_jsx(Tooltip, {\n ...props,\n renderTooltip: focusableRenderTooltip\n });\n};\n\n// Keyboard navigation hook for charts\n\nexport const useKeyboardNavigation = ({\n selectedIndex,\n setSelectedIndex,\n isNavigating,\n setIsNavigating,\n chartRef,\n totalPoints\n}) => {\n // Focus the tooltip as soon as it is rendered\n const tooltipRef = useCallback(element => {\n if (element && selectedIndex !== undefined) {\n element.focus();\n }\n }, [selectedIndex]);\n\n // On each focus of chart, reset the selectedIndex to 0, if keyboard navigation is not already active\n const onChartFocus = useCallback(() => {\n if (!isNavigating && selectedIndex !== undefined) {\n setSelectedIndex(0);\n }\n }, [isNavigating, selectedIndex, setSelectedIndex]);\n\n // On each blur of chart, keyboard navigation should restart from first tooltip\n const onChartBlur = useCallback(() => {\n setIsNavigating(false);\n }, [setIsNavigating]);\n const onChartKeyDown = useCallback(event => {\n if (totalPoints === 0) return;\n\n // Keep focus on the chart if tab is pressed\n if (event.key === 'Tab') {\n chartRef.current?.focus();\n setSelectedIndex(undefined);\n setIsNavigating(false);\n return;\n }\n const currentSelectedIndex = selectedIndex === undefined ? -1 : selectedIndex;\n if (currentSelectedIndex + 1 >= totalPoints && ['ArrowRight'].includes(event.key)) {\n chartRef.current?.focus();\n setSelectedIndex(undefined);\n setIsNavigating(false);\n return;\n }\n event.preventDefault();\n if (['ArrowRight'].includes(event.key)) {\n setIsNavigating(true);\n setSelectedIndex((currentSelectedIndex + 1) % totalPoints);\n } else if (['ArrowLeft'].includes(event.key)) {\n setIsNavigating(true);\n setSelectedIndex((currentSelectedIndex - 1 + totalPoints) % totalPoints);\n } else if (event.key === 'Escape') {\n setSelectedIndex(undefined);\n setIsNavigating(false);\n chartRef.current?.focus();\n }\n }, [totalPoints, selectedIndex, setSelectedIndex, setIsNavigating, chartRef]);\n return {\n tooltipRef,\n onChartFocus,\n onChartBlur,\n onChartKeyDown\n };\n};\n\n// Re-export the base Tooltip for backwards compatibility\nexport { Tooltip };","import { Fragment as _Fragment, jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Compound component for SVG children in charts.\n * This component serves as a marker for SVG content that should be rendered\n * inside the chart's SVG element. The actual rendering is handled by the parent chart.\n *\n * @param {PropsWithChildren} props - Component props\n * @param {ReactNode} props.children - Child elements to render inside the SVG\n * @return {JSX.Element} The children wrapped in a fragment\n */\nexport const ChartSVG = ({\n children\n}) => {\n // This component doesn't render directly - its children are extracted by the parent chart\n // We just return the children as-is\n return /*#__PURE__*/_jsx(_Fragment, {\n children: children\n });\n};\n\n// Set displayName for better debugging and type checking\nChartSVG.displayName = 'Chart.SVG';","import { Fragment as _Fragment, jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Compound component for HTML children in charts.\n * This component serves as a marker for HTML content that should be rendered\n * outside the chart's SVG element. The actual rendering is handled by the parent chart.\n *\n * @param {PropsWithChildren} props - Component props\n * @param {ReactNode} props.children - Child elements to render outside the SVG\n * @return {JSX.Element} The children wrapped in a fragment\n */\nexport const ChartHTML = ({\n children\n}) => {\n // This component doesn't render directly - its children are extracted by the parent chart\n // We just return the children as-is\n return /*#__PURE__*/_jsx(_Fragment, {\n children: children\n });\n};\n\n// Set displayName for better debugging and type checking\nChartHTML.displayName = 'Chart.HTML';","import { createElement, Fragment } from 'react';\nimport type { LegendChild } from './use-chart-children';\nimport type { LegendPosition } from '../../../types';\nimport type { ReactNode } from 'react';\n\n/**\n * Renders legend children filtered by position slot.\n *\n * @param {LegendChild[]} legendChildren - The legend children to filter and render\n * @param {LegendPosition} position - The position slot to render\n * @return {ReactNode[]} Array of legend elements for the given position\n */\nexport function renderLegendSlot(\n\tlegendChildren: LegendChild[],\n\tposition: LegendPosition\n): ReactNode[] {\n\treturn legendChildren\n\t\t.filter( l => l.position === position )\n\t\t.map( ( l, i ) =>\n\t\t\tcreateElement( Fragment, { key: `legend-${ position }-${ i }` }, l.element )\n\t\t);\n}\n","import { Group } from '@visx/group';\nimport { useMemo, Children, isValidElement } from 'react';\nimport { Legend } from '../../../components/legend';\nimport type { LegendPosition } from '../../../types';\nimport type { ReactElement, ReactNode } from 'react';\n\nexport type LegendChild = {\n\telement: ReactElement;\n\tposition: LegendPosition;\n};\n\ninterface ChartChildren {\n\tsvgChildren: ReactNode[];\n\thtmlChildren: ReactNode[];\n\tlegendChildren: LegendChild[];\n\totherChildren: ReactNode[];\n\t/** All children except Legend, in original order. */\n\tnonLegendChildren: ReactNode[];\n}\n\n/**\n * Custom hook to process and categorize chart children for composition API.\n * Extracts children from compound components (Chart.SVG, Chart.HTML) and\n * maintains backward compatibility with legacy Group components.\n *\n * @param {ReactNode} children - The children prop from the chart component\n * @param {string} chartType - The type of chart (e.g., 'PieChart', 'BarChart')\n * @return {ChartChildren} Categorized children for rendering\n */\nexport function useChartChildren( children: ReactNode, chartType: string ): ChartChildren {\n\treturn useMemo( () => {\n\t\tconst svg: ReactNode[] = [];\n\t\tconst html: ReactNode[] = [];\n\t\tconst legend: LegendChild[] = [];\n\t\tconst other: ReactNode[] = [];\n\t\tconst nonLegend: ReactNode[] = [];\n\n\t\tChildren.forEach( children, child => {\n\t\t\tif ( isValidElement( child ) ) {\n\t\t\t\t// Extract Legend children for position-based slot rendering\n\t\t\t\tif ( child.type === Legend ) {\n\t\t\t\t\tconst rawPosition = child.props?.position;\n\t\t\t\t\tconst position =\n\t\t\t\t\t\trawPosition === 'top' || rawPosition === 'bottom' ? rawPosition : 'bottom';\n\n\t\t\t\t\tlegend.push( { element: child as ReactElement, position } );\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Check displayName for compound components\n\t\t\t\tconst childType = child.type as { displayName?: string };\n\t\t\t\tconst displayName = childType?.displayName;\n\n\t\t\t\t// Handle chart-specific compound components (e.g., PieChart.SVG)\n\t\t\t\tif ( displayName === `${ chartType }.SVG` || displayName === 'Chart.SVG' ) {\n\t\t\t\t\t// Extract children from Chart.SVG with safety checks\n\t\t\t\t\tif ( child.props?.children ) {\n\t\t\t\t\t\tChildren.forEach( child.props.children, svgChild => {\n\t\t\t\t\t\t\tsvg.push( svgChild );\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t} else if ( displayName === `${ chartType }.HTML` || displayName === 'Chart.HTML' ) {\n\t\t\t\t\t// Extract children from Chart.HTML with safety checks\n\t\t\t\t\tif ( child.props?.children ) {\n\t\t\t\t\t\tChildren.forEach( child.props.children, htmlChild => {\n\t\t\t\t\t\t\thtml.push( htmlChild );\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t} else if ( child.type === Group ) {\n\t\t\t\t\t// Legacy support: still check for Group type for backward compatibility\n\t\t\t\t\tsvg.push( child );\n\t\t\t\t} else {\n\t\t\t\t\tother.push( child );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Preserve original order of all non-Legend children\n\t\t\tnonLegend.push( child );\n\t\t} );\n\n\t\treturn {\n\t\t\tsvgChildren: svg,\n\t\t\thtmlChildren: html,\n\t\t\tlegendChildren: legend,\n\t\t\totherChildren: other,\n\t\t\tnonLegendChildren: nonLegend,\n\t\t};\n\t}, [ children, chartType ] );\n}\n","'use client';\n\nimport * as React from 'react';\nconst UNINITIALIZED = {};\n\n/**\n * A React.useRef() that is initialized with a function. Note that it accepts an optional\n * initialization argument, so the initialization function doesn't need to be an inline closure.\n *\n * @usage\n * const ref = useRefWithInit(sortColumns, columns)\n */\n\nexport function useRefWithInit(init, initArg) {\n const ref = React.useRef(UNINITIALIZED);\n if (ref.current === UNINITIALIZED) {\n ref.current = init(initArg);\n }\n return ref;\n}","/**\n * WARNING: Don't import this directly. It's imported by the code generated by\n * `@mui/interal-babel-plugin-minify-errors`. Make sure to always use string literals in `Error`\n * constructors to ensure the plugin works as expected. Supported patterns include:\n * throw new Error('My message');\n * throw new Error(`My message: ${foo}`);\n * throw new Error(`My message: ${foo}` + 'another string');\n * ...\n */\nexport default function formatErrorMessage(code, ...args) {\n const url = new URL('https://base-ui.com/production-error');\n url.searchParams.set('code', code.toString());\n args.forEach(arg => url.searchParams.append('args[]', arg));\n return `Base UI error #${code}; visit ${url} for the full message.`;\n}","import _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nimport { useMergedRefs, useMergedRefsN } from '@base-ui/utils/useMergedRefs';\nimport { getReactElementRef } from '@base-ui/utils/getReactElementRef';\nimport { mergeObjects } from '@base-ui/utils/mergeObjects';\nimport { getStateAttributesProps } from \"./getStateAttributesProps.js\";\nimport { resolveClassName } from \"./resolveClassName.js\";\nimport { resolveStyle } from \"./resolveStyle.js\";\nimport { mergeProps, mergePropsN, mergeClassNames } from \"../merge-props/index.js\";\nimport { EMPTY_OBJECT } from \"./constants.js\";\nimport { createElement as _createElement } from \"react\";\n/**\n * Renders a Base UI element.\n *\n * @param element The default HTML element to render. Can be overridden by the `render` prop.\n * @param componentProps An object containing the `render` and `className` props to be used for element customization. Other props are ignored.\n * @param params Additional parameters for rendering the element.\n */\nexport function useRenderElement(element, componentProps, params = {}) {\n const renderProp = componentProps.render;\n const outProps = useRenderElementProps(componentProps, params);\n if (params.enabled === false) {\n return null;\n }\n const state = params.state ?? EMPTY_OBJECT;\n return evaluateRenderProp(element, renderProp, outProps, state);\n}\n\n/**\n * Computes render element final props.\n */\nfunction useRenderElementProps(componentProps, params = {}) {\n const {\n className: classNameProp,\n style: styleProp,\n render: renderProp\n } = componentProps;\n const {\n state = EMPTY_OBJECT,\n ref,\n props,\n stateAttributesMapping,\n enabled = true\n } = params;\n const className = enabled ? resolveClassName(classNameProp, state) : undefined;\n const style = enabled ? resolveStyle(styleProp, state) : undefined;\n const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT;\n const outProps = enabled ? mergeObjects(stateProps, Array.isArray(props) ? mergePropsN(props) : props) ?? EMPTY_OBJECT : EMPTY_OBJECT;\n\n // SAFETY: The `useMergedRefs` functions use a single hook to store the same value,\n // switching between them at runtime is safe. If this assertion fails, React will\n // throw at runtime anyway.\n // This also skips the `useMergedRefs` call on the server, which is fine because\n // refs are not used on the server side.\n /* eslint-disable react-hooks/rules-of-hooks */\n if (typeof document !== 'undefined') {\n if (!enabled) {\n useMergedRefs(null, null);\n } else if (Array.isArray(ref)) {\n outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);\n } else {\n outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);\n }\n }\n if (!enabled) {\n return EMPTY_OBJECT;\n }\n if (className !== undefined) {\n outProps.className = mergeClassNames(outProps.className, className);\n }\n if (style !== undefined) {\n outProps.style = mergeObjects(outProps.style, style);\n }\n return outProps;\n}\n\n// The symbol React uses internally for lazy components\n// https://github.com/facebook/react/blob/a0566250b210499b4c5677f5ac2eedbd71d51a1b/packages/shared/ReactSymbols.js#L31\n//\n// TODO delete once https://github.com/facebook/react/issues/32392 is fixed\nconst REACT_LAZY_TYPE = Symbol.for('react.lazy');\nfunction evaluateRenderProp(element, render, props, state) {\n if (render) {\n if (typeof render === 'function') {\n return render(props, state);\n }\n const mergedProps = mergeProps(props, render.props);\n mergedProps.ref = props.ref;\n let newElement = render;\n\n // Workaround for https://github.com/facebook/react/issues/32392\n // This works because the toArray() logic unwrap lazy element type in\n // https://github.com/facebook/react/blob/a0566250b210499b4c5677f5ac2eedbd71d51a1b/packages/react/src/ReactChildren.js#L186\n if (newElement?.$$typeof === REACT_LAZY_TYPE) {\n const children = React.Children.toArray(render);\n newElement = children[0];\n }\n\n // There is a high number of indirections, the error message thrown by React.cloneElement() is\n // hard to use for developers, this logic provides a better context.\n //\n // Our general guideline is to never change the control flow depending on the environment.\n // However, React.cloneElement() throws if React.isValidElement() is false,\n // so we can throw before with custom message.\n if (process.env.NODE_ENV !== 'production') {\n if (! /*#__PURE__*/React.isValidElement(newElement)) {\n throw new Error(['Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.', 'A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.', 'https://base-ui.com/r/invalid-render-prop'].join('\\n'));\n }\n }\n return /*#__PURE__*/React.cloneElement(newElement, mergedProps);\n }\n if (element) {\n if (typeof element === 'string') {\n return renderTag(element, props);\n }\n }\n // Unreachable, but the typings on `useRenderElement` need to be reworked\n // to annotate it correctly.\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: Render element or function are not defined.' : _formatErrorMessage(8));\n}\nfunction renderTag(Tag, props) {\n if (Tag === 'button') {\n return /*#__PURE__*/_createElement(\"button\", {\n type: \"button\",\n ...props,\n key: props.key\n });\n }\n if (Tag === 'img') {\n return /*#__PURE__*/_createElement(\"img\", {\n alt: \"\",\n ...props,\n key: props.key\n });\n }\n return /*#__PURE__*/React.createElement(Tag, props);\n}","import { useRefWithInit } from \"./useRefWithInit.js\";\n\n/**\n * Merges refs into a single memoized callback ref or `null`.\n * This makes sure multiple refs are updated together and have the same value.\n *\n * This function accepts up to four refs. If you need to merge more, or have an unspecified number of refs to merge,\n * use `useMergedRefsN` instead.\n */\n\nexport function useMergedRefs(a, b, c, d) {\n const forkRef = useRefWithInit(createForkRef).current;\n if (didChange(forkRef, a, b, c, d)) {\n update(forkRef, [a, b, c, d]);\n }\n return forkRef.callback;\n}\n\n/**\n * Merges an array of refs into a single memoized callback ref or `null`.\n *\n * If you need to merge a fixed number (up to four) of refs, use `useMergedRefs` instead for better performance.\n */\nexport function useMergedRefsN(refs) {\n const forkRef = useRefWithInit(createForkRef).current;\n if (didChangeN(forkRef, refs)) {\n update(forkRef, refs);\n }\n return forkRef.callback;\n}\nfunction createForkRef() {\n return {\n callback: null,\n cleanup: null,\n refs: []\n };\n}\nfunction didChange(forkRef, a, b, c, d) {\n // prettier-ignore\n return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d;\n}\nfunction didChangeN(forkRef, newRefs) {\n return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]);\n}\nfunction update(forkRef, refs) {\n forkRef.refs = refs;\n if (refs.every(ref => ref == null)) {\n forkRef.callback = null;\n return;\n }\n forkRef.callback = instance => {\n if (forkRef.cleanup) {\n forkRef.cleanup();\n forkRef.cleanup = null;\n }\n if (instance != null) {\n const cleanupCallbacks = Array(refs.length).fill(null);\n for (let i = 0; i < refs.length; i += 1) {\n const ref = refs[i];\n if (ref == null) {\n continue;\n }\n switch (typeof ref) {\n case 'function':\n {\n const refCleanup = ref(instance);\n if (typeof refCleanup === 'function') {\n cleanupCallbacks[i] = refCleanup;\n }\n break;\n }\n case 'object':\n {\n ref.current = instance;\n break;\n }\n default:\n }\n }\n forkRef.cleanup = () => {\n for (let i = 0; i < refs.length; i += 1) {\n const ref = refs[i];\n if (ref == null) {\n continue;\n }\n switch (typeof ref) {\n case 'function':\n {\n const cleanupCallback = cleanupCallbacks[i];\n if (typeof cleanupCallback === 'function') {\n cleanupCallback();\n } else {\n ref(null);\n }\n break;\n }\n case 'object':\n {\n ref.current = null;\n break;\n }\n default:\n }\n }\n };\n }\n };\n}","import * as React from 'react';\nimport { isReactVersionAtLeast } from \"./reactVersion.js\";\n\n/**\n * Extracts the `ref` from a React element, handling different React versions.\n */\nexport function getReactElementRef(element) {\n if (! /*#__PURE__*/React.isValidElement(element)) {\n return null;\n }\n const reactElement = element;\n const propsWithRef = reactElement.props;\n return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;\n}","import * as React from 'react';\nconst majorVersion = parseInt(React.version, 10);\nexport function isReactVersionAtLeast(reactVersionToCheck) {\n return majorVersion >= reactVersionToCheck;\n}","export function mergeObjects(a, b) {\n if (a && !b) {\n return a;\n }\n if (!a && b) {\n return b;\n }\n if (a || b) {\n return {\n ...a,\n ...b\n };\n }\n return undefined;\n}","export function getStateAttributesProps(state, customMapping) {\n const props = {};\n\n /* eslint-disable-next-line guard-for-in */\n for (const key in state) {\n const value = state[key];\n if (customMapping?.hasOwnProperty(key)) {\n const customProps = customMapping[key](value);\n if (customProps != null) {\n Object.assign(props, customProps);\n }\n continue;\n }\n if (value === true) {\n props[`data-${key.toLowerCase()}`] = '';\n } else if (value) {\n props[`data-${key.toLowerCase()}`] = value.toString();\n }\n }\n return props;\n}","/**\n * If the provided className is a string, it will be returned as is.\n * Otherwise, the function will call the className function with the state as the first argument.\n *\n * @param className\n * @param state\n */\nexport function resolveClassName(className, state) {\n return typeof className === 'function' ? className(state) : className;\n}","/**\n * If the provided style is an object, it will be returned as is.\n * Otherwise, the function will call the style function with the state as the first argument.\n *\n * @param style\n * @param state\n */\nexport function resolveStyle(style, state) {\n return typeof style === 'function' ? style(state) : style;\n}","import { mergeObjects } from '@base-ui/utils/mergeObjects';\nconst EMPTY_PROPS = {};\n\n/* eslint-disable id-denylist */\n/**\n * Merges multiple sets of React props. It follows the Object.assign pattern where the rightmost object's fields overwrite\n * the conflicting ones from others. This doesn't apply to event handlers, `className` and `style` props.\n *\n * Event handlers are merged and called in right-to-left order (rightmost handler executes first, leftmost last).\n * For React synthetic events, the rightmost handler can prevent prior (left-positioned) handlers from executing\n * by calling `event.preventBaseUIHandler()`. For non-synthetic events (custom events with primitive/object values),\n * all handlers always execute without prevention capability.\n *\n * The `className` prop is merged by concatenating classes in right-to-left order (rightmost class appears first in the string).\n * The `style` prop is merged with rightmost styles overwriting the prior ones.\n *\n * Props can either be provided as objects or as functions that take the previous props as an argument.\n * The function will receive the merged props up to that point (going from left to right):\n * so in the case of `(obj1, obj2, fn, obj3)`, `fn` will receive the merged props of `obj1` and `obj2`.\n * The function is responsible for chaining event handlers if needed (i.e. we don't run the merge logic).\n *\n * Event handlers returned by the functions are not automatically prevented when `preventBaseUIHandler` is called.\n * They must check `event.baseUIHandlerPrevented` themselves and bail out if it's true.\n *\n * @important **`ref` is not merged.**\n * @param a Props object to merge.\n * @param b Props object to merge. The function will overwrite conflicting props from `a`.\n * @param c Props object to merge. The function will overwrite conflicting props from previous parameters.\n * @param d Props object to merge. The function will overwrite conflicting props from previous parameters.\n * @param e Props object to merge. The function will overwrite conflicting props from previous parameters.\n * @returns The merged props.\n * @public\n */\n\nexport function mergeProps(a, b, c, d, e) {\n // We need to mutably own `merged`\n let merged = {\n ...resolvePropsGetter(a, EMPTY_PROPS)\n };\n if (b) {\n merged = mergeOne(merged, b);\n }\n if (c) {\n merged = mergeOne(merged, c);\n }\n if (d) {\n merged = mergeOne(merged, d);\n }\n if (e) {\n merged = mergeOne(merged, e);\n }\n return merged;\n}\n/* eslint-enable id-denylist */\n\n/**\n * Merges an arbitrary number of React props using the same logic as {@link mergeProps}.\n * This function accepts an array of props instead of individual arguments.\n *\n * This has slightly lower performance than {@link mergeProps} due to accepting an array\n * instead of a fixed number of arguments. Prefer {@link mergeProps} when merging 5 or\n * fewer prop sets for better performance.\n *\n * @param props Array of props to merge.\n * @returns The merged props.\n * @see mergeProps\n * @public\n */\nexport function mergePropsN(props) {\n if (props.length === 0) {\n return EMPTY_PROPS;\n }\n if (props.length === 1) {\n return resolvePropsGetter(props[0], EMPTY_PROPS);\n }\n\n // We need to mutably own `merged`\n let merged = {\n ...resolvePropsGetter(props[0], EMPTY_PROPS)\n };\n for (let i = 1; i < props.length; i += 1) {\n merged = mergeOne(merged, props[i]);\n }\n return merged;\n}\nfunction mergeOne(merged, inputProps) {\n if (isPropsGetter(inputProps)) {\n return inputProps(merged);\n }\n return mutablyMergeInto(merged, inputProps);\n}\n\n/**\n * Merges two sets of props. In case of conflicts, the external props take precedence.\n */\nfunction mutablyMergeInto(mergedProps, externalProps) {\n if (!externalProps) {\n return mergedProps;\n }\n\n // eslint-disable-next-line guard-for-in\n for (const propName in externalProps) {\n const externalPropValue = externalProps[propName];\n switch (propName) {\n case 'style':\n {\n mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);\n break;\n }\n case 'className':\n {\n mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);\n break;\n }\n default:\n {\n if (isEventHandler(propName, externalPropValue)) {\n mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);\n } else {\n mergedProps[propName] = externalPropValue;\n }\n }\n }\n }\n return mergedProps;\n}\nfunction isEventHandler(key, value) {\n // This approach is more efficient than using a regex.\n const code0 = key.charCodeAt(0);\n const code1 = key.charCodeAt(1);\n const code2 = key.charCodeAt(2);\n return code0 === 111 /* o */ && code1 === 110 /* n */ && code2 >= 65 /* A */ && code2 <= 90 /* Z */ && (typeof value === 'function' || typeof value === 'undefined');\n}\nfunction isPropsGetter(inputProps) {\n return typeof inputProps === 'function';\n}\nfunction resolvePropsGetter(inputProps, previousProps) {\n if (isPropsGetter(inputProps)) {\n return inputProps(previousProps);\n }\n return inputProps ?? EMPTY_PROPS;\n}\nfunction mergeEventHandlers(ourHandler, theirHandler) {\n if (!theirHandler) {\n return ourHandler;\n }\n if (!ourHandler) {\n return theirHandler;\n }\n return event => {\n if (isSyntheticEvent(event)) {\n const baseUIEvent = event;\n makeEventPreventable(baseUIEvent);\n const result = theirHandler(baseUIEvent);\n if (!baseUIEvent.baseUIHandlerPrevented) {\n ourHandler?.(baseUIEvent);\n }\n return result;\n }\n const result = theirHandler(event);\n ourHandler?.(event);\n return result;\n };\n}\nexport function makeEventPreventable(event) {\n event.preventBaseUIHandler = () => {\n event.baseUIHandlerPrevented = true;\n };\n return event;\n}\nexport function mergeClassNames(ourClassName, theirClassName) {\n if (theirClassName) {\n if (ourClassName) {\n // eslint-disable-next-line prefer-template\n return theirClassName + ' ' + ourClassName;\n }\n return theirClassName;\n }\n return ourClassName;\n}\nfunction isSyntheticEvent(event) {\n return event != null && typeof event === 'object' && 'nativeEvent' in event;\n}","export function NOOP() {}\nexport const EMPTY_ARRAY = Object.freeze([]);\nexport const EMPTY_OBJECT = Object.freeze({});","import { useRenderElement } from \"../utils/useRenderElement.js\";\n/**\n * Renders a Base UI element.\n *\n * @public\n */\nexport function useRender(params) {\n return useRenderElement(params.defaultTagName ?? 'div', params, params);\n}","/**\n * External dependencies\n */\n// eslint-disable-next-line @typescript-eslint/no-restricted-imports\nimport {\n\tChildren,\n\tcloneElement,\n\tComponent,\n\tcreateContext,\n\tcreateElement,\n\tcreateRef,\n\tforwardRef,\n\tFragment,\n\tisValidElement,\n\tmemo,\n\tPureComponent,\n\tStrictMode,\n\tuseCallback,\n\tuseContext,\n\tuseDebugValue,\n\tuseDeferredValue,\n\tuseEffect,\n\tuseId,\n\tuseMemo,\n\tuseImperativeHandle,\n\tuseInsertionEffect,\n\tuseLayoutEffect,\n\tuseReducer,\n\tuseRef,\n\tuseState,\n\tuseSyncExternalStore,\n\tuseTransition,\n\tstartTransition,\n\tlazy,\n\tSuspense,\n} from 'react';\nimport type { ReactNode } from 'react';\n\n/**\n * Object containing a React element.\n */\nexport type Element = React.ReactElement;\n\n/**\n * Object containing a React component.\n */\nexport type ComponentType< T = any > = React.ComponentType< T >;\n\n/**\n * Object containing a React synthetic event.\n */\nexport type SyntheticEvent< T = Element > = React.SyntheticEvent< T >;\n\n/**\n * Object containing a React ref object.\n */\nexport type RefObject< T > = React.RefObject< T >;\n\n/**\n * Object containing a React ref callback.\n */\nexport type RefCallback< T > = React.RefCallback< T >;\n\n/**\n * Object containing a React ref.\n */\nexport type Ref< T > = React.Ref< T >;\n\n/**\n * Object that provides utilities for dealing with React children.\n */\nexport { Children };\n\n/**\n * Creates a copy of an element with extended props.\n *\n * @param {Element} element Element\n * @param {?Object} props Props to apply to cloned element\n *\n * @return {Element} Cloned element.\n */\nexport { cloneElement };\n\n/**\n * A base class to create WordPress Components (Refs, state and lifecycle hooks)\n */\nexport { Component };\n\n/**\n * Creates a context object containing two components: a provider and consumer.\n *\n * @param {Object} defaultValue A default data stored in the context.\n *\n * @return {Object} Context object.\n */\nexport { createContext };\n\n/**\n * Returns a new element of given type. Type can be either a string tag name or\n * another function which itself returns an element.\n *\n * @param {?(string|Function)} type Tag name or element creator\n * @param {Object} props Element properties, either attribute\n * set to apply to DOM node or values to\n * pass through to element creator\n * @param {...Element} children Descendant elements\n *\n * @return {Element} Element.\n */\nexport { createElement };\n\n/**\n * Returns an object tracking a reference to a rendered element via its\n * `current` property as either a DOMElement or Element, dependent upon the\n * type of element rendered with the ref attribute.\n *\n * @return {Object} Ref object.\n */\nexport { createRef };\n\n/**\n * Component enhancer used to enable passing a ref to its wrapped component.\n * Pass a function argument which receives `props` and `ref` as its arguments,\n * returning an element using the forwarded ref. The return value is a new\n * component which forwards its ref.\n *\n * @param {Function} forwarder Function passed `props` and `ref`, expected to\n * return an element.\n *\n * @return {Component} Enhanced component.\n */\nexport { forwardRef };\n\n/**\n * A component which renders its children without any wrapping element.\n */\nexport { Fragment };\n\n/**\n * Checks if an object is a valid React Element.\n *\n * @param {Object} objectToCheck The object to be checked.\n *\n * @return {boolean} true if objectToTest is a valid React Element and false otherwise.\n */\nexport { isValidElement };\n\n/**\n * @see https://react.dev/reference/react/memo\n */\nexport { memo };\n\n/**\n * Component that activates additional checks and warnings for its descendants.\n */\nexport { StrictMode };\n\n/**\n * @see https://react.dev/reference/react/useCallback\n */\nexport { useCallback };\n\n/**\n * @see https://react.dev/reference/react/useContext\n */\nexport { useContext };\n\n/**\n * @see https://react.dev/reference/react/useDebugValue\n */\nexport { useDebugValue };\n\n/**\n * @see https://react.dev/reference/react/useDeferredValue\n */\nexport { useDeferredValue };\n\n/**\n * @see https://react.dev/reference/react/useEffect\n */\nexport { useEffect };\n\n/**\n * @see https://react.dev/reference/react/useId\n */\nexport { useId };\n\n/**\n * @see https://react.dev/reference/react/useImperativeHandle\n */\nexport { useImperativeHandle };\n\n/**\n * @see https://react.dev/reference/react/useInsertionEffect\n */\nexport { useInsertionEffect };\n\n/**\n * @see https://react.dev/reference/react/useLayoutEffect\n */\nexport { useLayoutEffect };\n\n/**\n * @see https://react.dev/reference/react/useMemo\n */\nexport { useMemo };\n\n/**\n * @see https://react.dev/reference/react/useReducer\n */\nexport { useReducer };\n\n/**\n * @see https://react.dev/reference/react/useRef\n */\nexport { useRef };\n\n/**\n * @see https://react.dev/reference/react/useState\n */\nexport { useState };\n\n/**\n * @see https://react.dev/reference/react/useSyncExternalStore\n */\nexport { useSyncExternalStore };\n\n/**\n * @see https://react.dev/reference/react/useTransition\n */\nexport { useTransition };\n\n/**\n * @see https://react.dev/reference/react/startTransition\n */\nexport { startTransition };\n\n/**\n * @see https://react.dev/reference/react/lazy\n */\nexport { lazy };\n\n/**\n * @see https://react.dev/reference/react/Suspense\n */\nexport { Suspense };\n\n/**\n * @see https://react.dev/reference/react/PureComponent\n */\nexport { PureComponent };\n\n/**\n * Concatenate two or more React children objects.\n *\n * @param childrenArguments - Array of children arguments (array of arrays/strings/objects) to concatenate.\n * @return The concatenated value.\n */\nexport function concatChildren(\n\t...childrenArguments: ReactNode[][]\n): ReactNode[] {\n\treturn childrenArguments.reduce< ReactNode[] >(\n\t\t( accumulator, children, i ) => {\n\t\t\tChildren.forEach( children, ( child, j ) => {\n\t\t\t\tif ( isValidElement( child ) && typeof child !== 'string' ) {\n\t\t\t\t\tchild = cloneElement( child, {\n\t\t\t\t\t\tkey: [ i, j ].join(),\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\taccumulator.push( child );\n\t\t\t} );\n\n\t\t\treturn accumulator;\n\t\t},\n\t\t[]\n\t);\n}\n\n/**\n * Switches the nodeName of all the elements in the children object.\n *\n * @param children Children object.\n * @param nodeName Node name.\n *\n * @return The updated children object.\n */\nexport function switchChildrenNodeName(\n\tchildren: ReactNode,\n\tnodeName: string\n): ReactNode {\n\treturn (\n\t\tchildren &&\n\t\tChildren.map( children, ( elt, index ) => {\n\t\t\tif ( typeof elt?.valueOf() === 'string' ) {\n\t\t\t\treturn createElement( nodeName, { key: index }, elt );\n\t\t\t}\n\t\t\tif ( ! isValidElement( elt ) ) {\n\t\t\t\treturn elt;\n\t\t\t}\n\n\t\t\tconst { children: childrenProp, ...props } = elt.props;\n\t\t\treturn createElement(\n\t\t\t\tnodeName,\n\t\t\t\t{ key: index, ...props },\n\t\t\t\tchildrenProp\n\t\t\t);\n\t\t} )\n\t);\n}\n","/*!\n * is-plain-object <https://github.com/jonschlinkert/is-plain-object>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\nfunction isObject(o) {\n return Object.prototype.toString.call(o) === '[object Object]';\n}\n\nfunction isPlainObject(o) {\n var ctor,prot;\n\n if (isObject(o) === false) return false;\n\n // If has modified constructor\n ctor = o.constructor;\n if (ctor === undefined) return true;\n\n // If has modified prototype\n prot = ctor.prototype;\n if (isObject(prot) === false) return false;\n\n // If constructor does not have an Object-specific method\n if (prot.hasOwnProperty('isPrototypeOf') === false) {\n return false;\n }\n\n // Most likely a plain Object\n return true;\n}\n\nexport { isPlainObject };\n","/**\n * Locale character mapping rules.\n */\ninterface Locale {\n regexp: RegExp;\n map: Record<string, string>;\n}\n\n/**\n * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt\n */\nconst SUPPORTED_LOCALE: Record<string, Locale> = {\n tr: {\n regexp: /\\u0130|\\u0049|\\u0049\\u0307/g,\n map: {\n İ: \"\\u0069\",\n I: \"\\u0131\",\n İ: \"\\u0069\",\n },\n },\n az: {\n regexp: /\\u0130/g,\n map: {\n İ: \"\\u0069\",\n I: \"\\u0131\",\n İ: \"\\u0069\",\n },\n },\n lt: {\n regexp: /\\u0049|\\u004A|\\u012E|\\u00CC|\\u00CD|\\u0128/g,\n map: {\n I: \"\\u0069\\u0307\",\n J: \"\\u006A\\u0307\",\n Į: \"\\u012F\\u0307\",\n Ì: \"\\u0069\\u0307\\u0300\",\n Í: \"\\u0069\\u0307\\u0301\",\n Ĩ: \"\\u0069\\u0307\\u0303\",\n },\n },\n};\n\n/**\n * Localized lower case.\n */\nexport function localeLowerCase(str: string, locale: string) {\n const lang = SUPPORTED_LOCALE[locale.toLowerCase()];\n if (lang) return lowerCase(str.replace(lang.regexp, (m) => lang.map[m]));\n return lowerCase(str);\n}\n\n/**\n * Lower case as a function.\n */\nexport function lowerCase(str: string) {\n return str.toLowerCase();\n}\n","import { lowerCase } from \"lower-case\";\n\nexport interface Options {\n splitRegexp?: RegExp | RegExp[];\n stripRegexp?: RegExp | RegExp[];\n delimiter?: string;\n transform?: (part: string, index: number, parts: string[]) => string;\n}\n\n// Support camel case (\"camelCase\" -> \"camel Case\" and \"CAMELCase\" -> \"CAMEL Case\").\nconst DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];\n\n// Remove all non-word characters.\nconst DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;\n\n/**\n * Normalize the string into something other libraries can manipulate easier.\n */\nexport function noCase(input: string, options: Options = {}) {\n const {\n splitRegexp = DEFAULT_SPLIT_REGEXP,\n stripRegexp = DEFAULT_STRIP_REGEXP,\n transform = lowerCase,\n delimiter = \" \",\n } = options;\n\n let result = replace(\n replace(input, splitRegexp, \"$1\\0$2\"),\n stripRegexp,\n \"\\0\"\n );\n let start = 0;\n let end = result.length;\n\n // Trim the delimiter from around the output string.\n while (result.charAt(start) === \"\\0\") start++;\n while (result.charAt(end - 1) === \"\\0\") end--;\n\n // Transform each token independently.\n return result.slice(start, end).split(\"\\0\").map(transform).join(delimiter);\n}\n\n/**\n * Replace `re` in the input string with the replacement value.\n */\nfunction replace(input: string, re: RegExp | RegExp[], value: string) {\n if (re instanceof RegExp) return input.replace(re, value);\n return re.reduce((input, re) => input.replace(re, value), input);\n}\n","import { noCase, Options } from \"no-case\";\n\nexport { Options };\n\nexport function dotCase(input: string, options: Options = {}) {\n return noCase(input, {\n delimiter: \".\",\n ...options,\n });\n}\n","import { dotCase, Options } from \"dot-case\";\n\nexport { Options };\n\nexport function paramCase(input: string, options: Options = {}) {\n return dotCase(input, {\n delimiter: \"-\",\n ...options,\n });\n}\n","if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='71d20935c2']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"71d20935c2\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"stack\":\"_19ce0419607e1896__stack\"};\n","import { useRender, mergeProps } from '@base-ui/react';\nimport { forwardRef } from '@wordpress/element';\nimport type { GapSize } from '@wordpress/theme';\nimport { type StackProps } from './types';\nimport styles from './style.module.css';\n\n// Static map so that the build-time token fallback plugin can inject fallback\n// values into each `var()` call.\nconst gapTokens: Record< GapSize, string > = {\n\txs: 'var(--wpds-dimension-gap-xs, 4px)',\n\tsm: 'var(--wpds-dimension-gap-sm, 8px)',\n\tmd: 'var(--wpds-dimension-gap-md, 12px)',\n\tlg: 'var(--wpds-dimension-gap-lg, 16px)',\n\txl: 'var(--wpds-dimension-gap-xl, 24px)',\n\t'2xl': 'var(--wpds-dimension-gap-2xl, 32px)',\n\t'3xl': 'var(--wpds-dimension-gap-3xl, 40px)',\n};\n\n/**\n * A flexible layout component using CSS Flexbox for consistent spacing and alignment.\n * Built on design tokens for predictable spacing values.\n */\nexport const Stack = forwardRef< HTMLDivElement, StackProps >( function Stack(\n\t{ direction, gap, align, justify, wrap, render, ...props },\n\tref\n) {\n\tconst style: React.CSSProperties = {\n\t\tgap: gap && gapTokens[ gap ],\n\t\talignItems: align,\n\t\tjustifyContent: justify,\n\t\tflexDirection: direction,\n\t\tflexWrap: wrap,\n\t};\n\n\tconst element = useRender( {\n\t\trender,\n\t\tref,\n\t\tprops: mergeProps< 'div' >( props, { style, className: styles.stack } ),\n\t} );\n\n\treturn element;\n} );\n","import { Stack } from '@wordpress/ui';\nimport { useEffect } from 'react';\nimport { useElementSize } from '../../../hooks';\nimport { renderLegendSlot } from '../chart-composition';\nimport styles from './chart-layout.module.scss';\n\n/**\n * Measurements provided to the render prop when ChartLayout handles resize listening.\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const ChartLayout = ({\n legendPosition,\n legendElement,\n legendChildren,\n children,\n trailingContent,\n onContentHeightChange,\n gap,\n className,\n style,\n 'data-testid': dataTestId,\n 'data-chart-id': dataChartId\n}) => {\n const [contentRef, contentWidth, contentHeight] = useElementSize();\n const isRenderProp = typeof children === 'function';\n const isMeasured = contentHeight > 0;\n\n // When using render-prop children, hide the layout until measurement is available\n // to prevent layout shift. Plain ReactNode children don't need this since they\n // don't depend on measured dimensions.\n const visibilityStyle = isRenderProp && !isMeasured ? {\n visibility: 'hidden'\n } : {};\n useEffect(() => {\n if (isRenderProp && onContentHeightChange && isMeasured) {\n onContentHeightChange(contentHeight);\n }\n }, [isRenderProp, contentHeight, isMeasured, onContentHeightChange]);\n const renderedChildren = isRenderProp ? children({\n contentWidth,\n contentHeight,\n isMeasured\n }) : children;\n return /*#__PURE__*/_jsxs(Stack, {\n direction: \"column\",\n gap: gap,\n className: className,\n style: {\n ...style,\n ...visibilityStyle\n },\n \"data-chart-id\": dataChartId,\n children: [legendPosition === 'top' && legendElement, renderLegendSlot(legendChildren, 'top'), isRenderProp ? /*#__PURE__*/_jsx(\"div\", {\n ref: contentRef,\n className: styles['chart-layout__content'],\n children: renderedChildren\n }) : renderedChildren, legendPosition === 'bottom' && legendElement, renderLegendSlot(legendChildren, 'bottom'), trailingContent]\n });\n};","import 'css-chunk:src/charts/private/chart-layout/chart-layout.module.scss';export default {\n \"chart-layout__content\": \"a8ccharts-gXtQZk\"\n};","import 'css-chunk:src/charts/private/svg-empty-state/svg-empty-state.module.scss';export default {\n \"svg-empty-state\": \"a8ccharts-tGXBHV\"\n};","import { Stack } from '@wordpress/ui';\nimport styles from './svg-empty-state.module.scss';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Renders empty-state text inside an SVG using foreignObject so that the\n * message wraps onto multiple lines instead of being clipped.\n *\n * The component centers the text within the specified area.\n *\n * @param root0 - Component props\n * @param root0.x - X coordinate of the center point\n * @param root0.y - Y coordinate of the center point\n * @param root0.width - Available width for the text area\n * @param root0.height - Available height for the text area\n * @param root0.children - Text content\n * @return {JSX.Element} A foreignObject element containing the centered text.\n */\nexport const SvgEmptyState = ({\n x,\n y,\n width,\n height,\n children\n}) => {\n return /*#__PURE__*/_jsx(\"foreignObject\", {\n x: x - width / 2,\n y: y - height / 2,\n width: width,\n height: height,\n children: /*#__PURE__*/_jsx(Stack, {\n align: \"center\",\n justify: \"center\",\n className: styles['svg-empty-state'],\n children: children\n })\n });\n};","import { useParentSize } from '@visx/responsive';\nimport styles from './with-responsive.module.scss';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useResponsiveDimensions = ({\n resizeDebounceTime = 300,\n maxWidth = 1200,\n aspectRatio\n}) => {\n const {\n parentRef,\n width: parentWidth,\n height: parentHeight\n } = useParentSize({\n debounceTime: resizeDebounceTime,\n enableDebounceLeadingCall: true\n });\n const containerWidth = parentWidth > 0 ? Math.min(parentWidth, maxWidth) : 0;\n const containerHeight = aspectRatio !== undefined ? containerWidth * aspectRatio : parentHeight;\n return {\n parentRef,\n width: containerWidth,\n height: containerHeight,\n /**\n * Whether an aspectRatio was provided. Used to determine container\n * height styling: 'auto' when true (height derived from width),\n * '100%' when false (fill parent container).\n */\n hasAspectRatio: aspectRatio !== undefined\n };\n};\n\n/**\n * A higher-order component that provides responsive dimensions\n * to the wrapped chart component using useParentSize from `@visx/responsive`.\n *\n * @param WrappedComponent - The chart component to be wrapped.\n * @return A functional component that renders the wrapped component with responsive dimensions.\n */\nexport function withResponsive(\n// 'options' is excluded so that each chart can define its own options type\nWrappedComponent) {\n return function ResponsiveChart({\n resizeDebounceTime = 300,\n maxWidth = 1200,\n aspectRatio,\n size,\n width,\n height,\n ...chartProps\n }) {\n const {\n parentRef,\n width: measuredWidth,\n height: measuredHeight,\n hasAspectRatio\n } = useResponsiveDimensions({\n resizeDebounceTime,\n maxWidth,\n aspectRatio\n });\n\n // Use measured dimensions, but fall back to explicit width/height props if measurement returns 0\n // (e.g., during initial render or in test environments without DOM measurement).\n // Do not use size here — size controls chart element dimensions (e.g. pie diameter), not container dimensions.\n const effectiveWidth = measuredWidth || width || 0;\n const effectiveHeight = measuredHeight || height || 0;\n const defaultHeight = hasAspectRatio ? 'auto' : '100%';\n return /*#__PURE__*/_jsx(\"div\", {\n ref: parentRef,\n className: styles.container,\n style: {\n width: width ?? '100%',\n height: height ?? defaultHeight\n },\n children: /*#__PURE__*/_jsx(WrappedComponent, {\n width: effectiveWidth,\n height: effectiveHeight,\n size: size,\n ...chartProps\n })\n });\n };\n}","import 'css-chunk:src/charts/private/with-responsive/with-responsive.module.scss';export default {\n \"container\": \"a8ccharts-GSKfBD\"\n};","import 'css-chunk:src/charts/bar-chart/bar-chart.module.scss';export default {\n \"bar-chart\": \"a8ccharts-3gflnB\",\n \"bar-chart--animated\": \"a8ccharts-98W-yu\",\n \"rise\": \"a8ccharts-z6AsiQ\",\n \"bar-chart--animated-horizontal\": \"a8ccharts-HFA3FF\",\n \"stretch\": \"a8ccharts-DQp37O\"\n};","import { formatNumberCompact } from '@automattic/number-formatters';\nimport { useMemo } from 'react';\nimport { TruncatedXTickComponent, TruncatedYTickComponent } from './truncated-tick-component';\nimport type { EnhancedDataPoint } from '../../../hooks/use-zero-value-display';\nimport type { DataPointDate, BaseChartProps, SeriesData } from '../../../types';\nimport type { TickFormatter } from '@visx/axis';\n\nconst formatDateTick = ( timestamp: number ) => {\n\tconst date = new Date( timestamp );\n\treturn date.toLocaleDateString( undefined, {\n\t\tmonth: 'short',\n\t\tday: 'numeric',\n\t} );\n};\n\n/**\n * Get the group padding of a scale.\n *\n * @param scale - The scale to get the group padding of.\n * @return The group padding of the scale.\n */\nconst getGroupPadding = ( scale: Record< string, unknown > ): number => {\n\treturn typeof scale.paddingInner === 'number' ? ( scale.paddingInner as number ) : 0;\n};\n\n/**\n * Returns the merged options for the bar chart, including axis and scale configuration based on the orientation.\n *\n * @param data - The data to be displayed in the chart.\n * @param horizontal - Whether the chart is horizontal or vertical.\n * @param options - The options for the chart.\n * @return The merged options for the chart.\n */\nexport function useBarChartOptions(\n\tdata: SeriesData[],\n\thorizontal: boolean,\n\toptions: BaseChartProps[ 'options' ] = {}\n) {\n\tconst defaultOptions = useMemo( () => {\n\t\tconst bandScale = {\n\t\t\ttype: 'band' as const,\n\t\t\tpadding: 0.2,\n\t\t\tpaddingInner: 0.1,\n\t\t};\n\t\tconst linearScale = {\n\t\t\ttype: 'linear' as const,\n\t\t\tnice: true,\n\t\t\tzero: false,\n\t\t};\n\n\t\tconst labelFormatter = data?.[ 0 ]?.data?.[ 0 ]?.label\n\t\t\t? ( label: string ) => label\n\t\t\t: formatDateTick;\n\t\tconst valueFormatter = formatNumberCompact as TickFormatter< unknown >;\n\n\t\tconst labelAccessor = ( d: DataPointDate ) => d?.label || d?.date;\n\t\tconst valueAccessor = ( d: DataPointDate | EnhancedDataPoint ) => {\n\t\t\t// Use visualValue for bar rendering if available (for zero values), otherwise use value\n\t\t\tconst enhancedPoint = d as EnhancedDataPoint;\n\t\t\treturn enhancedPoint?.visualValue !== undefined ? enhancedPoint.visualValue : d?.value;\n\t\t};\n\n\t\treturn {\n\t\t\tvertical: {\n\t\t\t\txTickFormat: labelFormatter,\n\t\t\t\tyTickFormat: valueFormatter,\n\t\t\t\ttooltipLabelFormatter: labelFormatter,\n\t\t\t\txAccessor: labelAccessor,\n\t\t\t\tyAccessor: valueAccessor,\n\t\t\t\tgridVisibility: 'x',\n\t\t\t\txScale: bandScale,\n\t\t\t\tyScale: linearScale,\n\t\t\t},\n\t\t\thorizontal: {\n\t\t\t\txTickFormat: valueFormatter,\n\t\t\t\tyTickFormat: labelFormatter,\n\t\t\t\ttooltipLabelFormatter: labelFormatter,\n\t\t\t\txAccessor: valueAccessor,\n\t\t\t\tyAccessor: labelAccessor,\n\t\t\t\tgridVisibility: 'y',\n\t\t\t\txScale: linearScale,\n\t\t\t\tyScale: bandScale,\n\t\t\t},\n\t\t};\n\t}, [ data ] );\n\n\treturn useMemo( () => {\n\t\tconst orientationKey = horizontal ? 'horizontal' : 'vertical';\n\t\tconst {\n\t\t\txTickFormat,\n\t\t\tyTickFormat,\n\t\t\ttooltipLabelFormatter: defaultTooltipLabelFormatter,\n\t\t\txAccessor,\n\t\t\tyAccessor,\n\t\t\tgridVisibility,\n\t\t\txScale: baseXScale,\n\t\t\tyScale: baseYScale,\n\t\t} = defaultOptions[ orientationKey ];\n\n\t\tconst xScale = { ...baseXScale, ...( options.xScale || {} ) };\n\t\tconst yScale = { ...baseYScale, ...( options.yScale || {} ) };\n\t\tconst providedToolTipLabelFormatter = horizontal\n\t\t\t? options.axis?.y?.tickFormat\n\t\t\t: options.axis?.x?.tickFormat;\n\n\t\tconst { labelOverflow: xLabelOverflow, ...xAxisOptions } = options.axis?.x || {};\n\t\tconst { labelOverflow: yLabelOverflow, ...yAxisOptions } = options.axis?.y || {};\n\n\t\treturn {\n\t\t\tgridVisibility,\n\t\t\txScale,\n\t\t\tyScale,\n\t\t\taccessors: {\n\t\t\t\txAccessor,\n\t\t\t\tyAccessor,\n\t\t\t},\n\t\t\taxis: {\n\t\t\t\tx: {\n\t\t\t\t\torientation: 'bottom' as const,\n\t\t\t\t\tnumTicks: 4,\n\t\t\t\t\ttickFormat: xTickFormat,\n\t\t\t\t\t...( xLabelOverflow === 'ellipsis' ? { tickComponent: TruncatedXTickComponent } : {} ),\n\t\t\t\t\t...xAxisOptions,\n\t\t\t\t},\n\t\t\t\ty: {\n\t\t\t\t\torientation: 'left' as const,\n\t\t\t\t\tnumTicks: 4,\n\t\t\t\t\ttickFormat: yTickFormat,\n\t\t\t\t\t...( yLabelOverflow === 'ellipsis' ? { tickComponent: TruncatedYTickComponent } : {} ),\n\t\t\t\t\t...yAxisOptions,\n\t\t\t\t},\n\t\t\t},\n\t\t\tbarGroup: {\n\t\t\t\tpadding: getGroupPadding( horizontal ? yScale : xScale ),\n\t\t\t},\n\t\t\ttooltip: {\n\t\t\t\tlabelFormatter: providedToolTipLabelFormatter || defaultTooltipLabelFormatter,\n\t\t\t},\n\t\t};\n\t}, [ defaultOptions, options, horizontal ] );\n}\n","import { DataContext } from '@visx/xychart';\nimport { useContext } from 'react';\nimport { isSafari } from '../../../utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Get the bandwidth of a scale\n *\n * @param scale - The scale to get the bandwidth of\n * @return The bandwidth of the scale\n */\nconst getScaleBandwidth = scale => {\n return scale && 'bandwidth' in scale ? scale.bandwidth() ?? 0 : 0;\n};\n/**\n * Minimum width in pixels for tick labels when scale bandwidth is very small.\n * Prevents labels from collapsing to unreadable widths on dense charts.\n *\n * Trade-off: When bandwidth is less than this minimum (e.g., many bars in a narrow chart),\n * adjacent labels may overlap since each label uses this minimum width regardless of\n * available space. This prioritizes label readability over preventing overlap.\n *\n * For very dense charts where overlap occurs, consider:\n * - Using `numTicks` option to reduce the number of displayed labels\n * - Using `tickFormat` to abbreviate label text\n * - Increasing chart width or reducing data points\n */\nconst MIN_TICK_LABEL_WIDTH = 20;\n\n/**\n * A tick component that renders labels with text truncation (ellipsis) when they exceed\n * the available bandwidth. Shows the full text on hover via native title attribute.\n *\n * Uses foreignObject to embed HTML within SVG, enabling CSS text-overflow: ellipsis.\n * Inherits text styles from tickLabelProps passed by visx Axis component.\n *\n * Note: A minimum label width (MIN_TICK_LABEL_WIDTH) is enforced to keep labels readable.\n * On very dense charts where bandwidth < 20px, this may cause label overlap.\n * See MIN_TICK_LABEL_WIDTH documentation for mitigation strategies.\n *\n * @param props - The props for the truncated tick component\n * @param props.x - The x position of the tick\n * @param props.y - The y position of the tick\n * @param props.formattedValue - The formatted value of the tick\n * @param props.axis - The axis this tick belongs to\n * @param props.textAnchor - The text anchor of the tick\n * @param props.fill - The fill color of the tick\n * @param props.dy - The dy offset of the tick\n *\n * @return The truncated tick component\n */\nexport const TruncatedTickComponent = ({\n x,\n y,\n formattedValue,\n axis,\n textAnchor,\n fill,\n dy,\n ...textProps\n}) => {\n // Get max width of the tick label\n const {\n xScale,\n yScale\n } = useContext(DataContext) || {};\n const scale = axis === 'x' ? xScale : yScale;\n const bandwidth = getScaleBandwidth(scale);\n const maxWidth = Math.max(bandwidth, MIN_TICK_LABEL_WIDTH);\n\n // Map SVG textAnchor to CSS textAlign\n let textAlign = 'center';\n if (textAnchor === 'start') {\n textAlign = 'left';\n } else if (textAnchor === 'end') {\n textAlign = 'right';\n } else if (textAnchor === 'middle') {\n textAlign = 'center';\n }\n\n // Calculate x offset based on text alignment\n let xOffset = 0;\n if (textAlign === 'center') {\n xOffset = -maxWidth / 2;\n } else if (textAlign === 'right') {\n xOffset = -maxWidth;\n }\n\n // Extract compatible style properties from SVG text props\n const {\n fontSize,\n fontFamily,\n fontWeight,\n fontStyle,\n letterSpacing,\n opacity\n } = textProps;\n const textStyles = {\n /**\n * SVG <text> elements are vertically aligned to the baseline by default, but HTML <div> elements inside <foreignObject>\n * are positioned relative to the top-left corner. To visually align the tick label like SVG text,\n * we shift the div up by 100% of its height and adjust by twice the SVG dy value (from visx) to approximate original placement.\n */\n transform: `translateY(calc(-100% + ${dy ?? '0'} * 2))`,\n // Safari doesn't work well with foreignObject positioning. Use position: fixed as a workaround.\n ...(isSafari() ? {\n position: 'fixed'\n } : {}),\n // Apply compatible SVG text styles\n fontSize,\n fontFamily,\n fontWeight,\n fontStyle,\n letterSpacing,\n opacity,\n // Convert svg text styles to CSS styles for the div\n color: fill ?? 'inherit',\n textAlign,\n // Ensure text is truncated with ellipsis, remains on one line, and shows the full value in a tooltip on hover.\n // The surrounding div uses CSS to handle overflow, and the 'title' attribute is set for accessibility.\n width: maxWidth,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n cursor: 'default',\n pointerEvents: 'auto'\n };\n return /*#__PURE__*/_jsx(\"foreignObject\", {\n x: x + xOffset,\n y: y,\n width: maxWidth,\n height: 0,\n overflow: \"visible\",\n children: /*#__PURE__*/_jsx(\"div\", {\n style: textStyles,\n title: formattedValue,\n children: formattedValue\n })\n });\n};\n\n/**\n * Factory function to create a truncated tick component for a specific axis.\n * Returns a component that can be passed to visx's tickComponent prop.\n *\n * @param axis - The axis this tick component is for ('x' or 'y')\n * @return A tick component function compatible with visx's TickRendererProps\n */\nconst createTruncatedTickComponent = axis => props => {\n return /*#__PURE__*/_jsx(TruncatedTickComponent, {\n ...props,\n axis: axis\n });\n};\n\n/**\n * Pre-created tick components for x and y axes.\n * These functions are created once at module initialization and reused,\n * avoiding repeated factory calls when configuring axes.\n */\nexport const TruncatedXTickComponent = createTruncatedTickComponent('x');\nexport const TruncatedYTickComponent = createTruncatedTickComponent('y');","import { formatNumberCompact } from '@automattic/number-formatters';\nimport { Group } from '@visx/group';\nimport { createScale, scaleBand } from '@visx/scale';\nimport { Text } from '@visx/text';\nimport { useContext, useMemo } from 'react';\nimport { GlobalChartsContext, GlobalChartsProvider } from '../../providers';\nimport { BarChartUnresponsive } from '../bar-chart';\nimport { withResponsive } from '../private/with-responsive';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Get the bandwidth of a scale\n * @param scale - The scale to get the bandwidth of\n * @return The bandwidth of the scale\n */\nconst getScaleBandwidth = scale => {\n // Broaden type before using 'xxx' in s as typeguard.\n const s = scale;\n return s && 'bandwidth' in s ? s?.bandwidth() ?? 0 : 0;\n};\nconst DefaultLabelComponent = ({\n textProps,\n x,\n y,\n label,\n formatter\n}) => {\n return /*#__PURE__*/_jsx(Text, {\n ...textProps,\n textAnchor: \"start\",\n x: x,\n y: y,\n children: formatter(label)\n });\n};\nconst DefaultValueComponent = ({\n textProps,\n x,\n y,\n value,\n formatter\n}) => {\n return /*#__PURE__*/_jsx(Text, {\n ...textProps,\n textAnchor: \"end\",\n x: x,\n y: y,\n fontWeight: 500,\n children: formatter(value)\n });\n};\nconst AxisRenderer = ({\n ticks,\n tickLabelProps,\n yOffset,\n labelPosition,\n valuePosition,\n data,\n labelFormatter,\n valueFormatter,\n LabelComponent = DefaultLabelComponent,\n ValueComponent = DefaultValueComponent\n}) => {\n if (ticks.length === 0) {\n return null;\n }\n\n // compute the max tick label size to compute label offset\n const allTickLabelProps = ticks.map(({\n value,\n index\n }) => typeof tickLabelProps === 'function' ? tickLabelProps(value, index, ticks) : {});\n return ticks.map(({\n from,\n formattedValue\n }, index) => {\n const textProps = allTickLabelProps[index] ?? {};\n // No need to pass textAnchor and dx. It will be handled by the component.\n delete textProps.textAnchor;\n delete textProps.dx;\n const sum = data.reduce((acc, {\n data: seriesData\n }) => acc + (seriesData[index]?.value ?? 0), 0);\n const y = from.y + yOffset;\n return /*#__PURE__*/_jsxs(Group, {\n children: [/*#__PURE__*/_jsx(LabelComponent, {\n textProps: textProps,\n x: labelPosition,\n y: y,\n label: formattedValue,\n formatter: labelFormatter\n }), /*#__PURE__*/_jsx(ValueComponent, {\n textProps: textProps,\n x: valuePosition,\n y: y,\n value: sum,\n formatter: valueFormatter,\n data: data,\n index: index\n })]\n }, index);\n });\n};\n\n/**\n * Calculate the default y offset for the bar list chart.\n * @param data - The data to calculate the default y offset for.\n * @param yScaleConfig - The y scale configuration.\n * @param height - The height of the chart.\n * @param isMultiSeries - Whether the chart is a multi series chart.\n * @return The default y offset.\n */\nconst getDefaultYOffset = (data, yScaleConfig, height, isMultiSeries) => {\n if (!isMultiSeries) {\n return 0;\n }\n const dataKeys = data.map(({\n label\n }) => label);\n const yScale = createScale({\n type: 'band',\n range: [0, height],\n domain: dataKeys,\n ...yScaleConfig\n });\n const groupScale = scaleBand({\n domain: dataKeys,\n range: [0, getScaleBandwidth(yScale)],\n padding: yScaleConfig.paddingInner\n });\n const GAP_BETWEEN_BARS = 6;\n const barThickness = getScaleBandwidth(groupScale);\n\n // Use negative value to move the label up.\n return -(barThickness + GAP_BETWEEN_BARS);\n};\nconst BarListChartInternal = ({\n data,\n width,\n height,\n options = {},\n margin = {\n left: 0,\n right: 20,\n bottom: 0,\n top: 0\n },\n ...rest\n}) => {\n const chartOptions = useMemo(() => {\n const isMultiSeries = data.length > 1;\n const defaultYScale = {\n // For multi series, set default padding larger to look better.\n paddingInner: isMultiSeries ? 0.3 : 0.1,\n padding: isMultiSeries ? 0.3 : 0.1\n };\n const defaultXScale = {\n // Always begin at zero since the x axis is hidden.\n zero: true\n };\n const yScale = {\n ...defaultYScale,\n ...(options.yScale ?? {})\n };\n const xScale = {\n ...defaultXScale,\n ...(options.xScale ?? {})\n };\n return {\n yScale,\n xScale,\n labelPosition: options.labelPosition ?? (isMultiSeries ? 0 : 10),\n valueFormatter: options.valueFormatter ?? (value => formatNumberCompact(value)),\n labelFormatter: options.labelFormatter ?? (value => String(value)),\n valuePosition: options.valuePosition ?? width,\n yOffset: options.yOffset ?? getDefaultYOffset(data, yScale, height, isMultiSeries)\n };\n }, [options, width, data, height]);\n return /*#__PURE__*/_jsx(BarChartUnresponsive, {\n orientation: \"horizontal\",\n gridVisibility: 'none',\n data: data,\n width: width,\n height: height,\n margin: margin,\n options: {\n axis: {\n y: {\n children: renderProps => /*#__PURE__*/_jsx(AxisRenderer, {\n ...renderProps,\n data: data,\n yOffset: chartOptions.yOffset,\n labelPosition: chartOptions.labelPosition,\n valuePosition: chartOptions.valuePosition,\n labelFormatter: chartOptions.labelFormatter,\n valueFormatter: chartOptions.valueFormatter,\n LabelComponent: options.labelComponent,\n ValueComponent: options.valueComponent\n })\n },\n x: {\n children: () => null\n }\n },\n xScale: chartOptions.xScale,\n yScale: chartOptions.yScale\n },\n ...rest\n });\n};\nconst BarListChart = props => {\n const existingContext = useContext(GlobalChartsContext);\n\n // If we're already in a GlobalChartsProvider context, render the core component directly\n if (existingContext) {\n return /*#__PURE__*/_jsx(BarListChartInternal, {\n ...props\n });\n }\n\n // Otherwise, wrap with our own GlobalChartsProvider\n return /*#__PURE__*/_jsx(GlobalChartsProvider, {\n children: /*#__PURE__*/_jsx(BarListChartInternal, {\n ...props\n })\n });\n};\nBarListChart.displayName = 'BarListChart';\nconst BarListChartResponsive = withResponsive(BarListChart);\nexport { BarListChartResponsive as default, BarListChart as BarListChartUnresponsive };","import { useTooltip, useTooltipInPortal } from '@visx/tooltip';\nimport { Stack } from '@wordpress/ui';\nimport clsx from 'clsx';\nimport { useRef, useMemo, useEffect, useCallback, useContext } from 'react';\nimport { usePrefersReducedMotion } from '../../hooks';\nimport { GlobalChartsProvider, GlobalChartsContext, useChartId, useChartRegistration, useGlobalChartsTheme, useGlobalChartsContext } from '../../providers';\nimport { formatPercentage, hexToRgba } from '../../utils';\nimport styles from './conversion-funnel-chart.module.scss';\nimport { useFunnelSelection } from './private';\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Internal ConversionFunnelChart component with chart registration\n *\n * @param props - Component props\n * @param props.chartId - Optional unique identifier for the chart\n * @param props.mainRate - Main conversion rate to highlight\n * @param props.changeIndicator - Change indicator (e.g., +2%, -1.5%)\n * @param props.steps - Array of funnel steps\n * @param props.loading - Whether the chart is in loading state\n * @param props.animation - Whether to show chart animation on initial render or not\n * @param props.className - Additional CSS class name\n * @param props.height - Height of the chart container. Falls back to style.height if set, otherwise defaults to \"100%\".\n * @param props.style - Custom styling\n * @param props.renderStepLabel - Custom render function for step labels\n * @param props.renderStepRate - Custom render function for step rates\n * @param props.renderMainMetric - Custom render function for the entire main metric section\n * @param props.renderTooltip - Custom render function for tooltip content\n * @return JSX element representing the conversion funnel chart\n */\nconst ConversionFunnelChartInternal = ({\n mainRate,\n changeIndicator,\n steps,\n loading = false,\n animation,\n className,\n chartId: providedChartId,\n height,\n style,\n renderStepLabel,\n renderStepRate,\n renderMainMetric,\n renderTooltip\n}) => {\n const chartId = useChartId(providedChartId);\n const {\n conversionFunnelChart: conversionFunnelChartSettings\n } = useGlobalChartsTheme();\n const {\n getElementStyles\n } = useGlobalChartsContext();\n const chartRef = useRef(null);\n const selectedBarRef = useRef(null);\n\n // Use @visx/tooltip hooks for tooltip positioning\n const {\n tooltipData,\n tooltipLeft,\n tooltipTop,\n tooltipOpen,\n showTooltip,\n hideTooltip\n } = useTooltip();\n\n // Use custom hook for selection management\n const {\n handleBarClick,\n handleBarKeyDown,\n clearSelection,\n getStepState\n } = useFunnelSelection(hideTooltip);\n const {\n containerRef: portalContainerRef,\n TooltipInPortal,\n containerBounds\n } = useTooltipInPortal({\n // use TooltipWithBounds for boundary detection\n detectBounds: true,\n // when tooltip containers are scrolled, this will correctly update the Tooltip position\n scroll: true\n });\n\n // Wrapper to clear selectedBarRef after clearing selection\n const clearSelectionAndRef = useCallback(() => {\n clearSelection();\n selectedBarRef.current = null;\n hideTooltip();\n }, [clearSelection, hideTooltip]);\n\n // Helper function to show tooltip at specific coordinates\n const showTooltipAt = useCallback((step, x, y) => {\n showTooltip({\n tooltipData: step,\n tooltipLeft: x,\n tooltipTop: y - 10\n });\n }, [showTooltip]);\n\n // Helper function to get tooltip coordinates for mouse events\n // Use clientX/Y and subtract containerBounds to cancel out any stale offset.\n // TooltipInPortal calculates: tooltipLeft + containerBounds.left + scrollX\n // By passing (clientX - containerBounds.left), we get correct page coordinates\n // regardless of whether bounds are stale (e.g., after dashboard customization).\n const getMouseTooltipCoords = useCallback(event => {\n // Don't return coords until container bounds are measured\n if (containerBounds.width === 0 || containerBounds.height === 0) {\n return null;\n }\n return {\n x: event.clientX - containerBounds.left,\n y: event.clientY - containerBounds.top\n };\n }, [containerBounds.width, containerBounds.height, containerBounds.left, containerBounds.top]);\n\n // Helper function to get tooltip coordinates for keyboard events\n // Use fresh getBoundingClientRect() and subtract containerBounds to cancel out stale offset.\n const getKeyboardTooltipCoords = useCallback(event => {\n // Don't return coords until container bounds are measured\n if (containerBounds.width === 0 || containerBounds.height === 0) {\n return null;\n }\n const rect = event.currentTarget.getBoundingClientRect();\n // Calculate center of element in viewport coordinates, then subtract containerBounds\n const x = rect.left + rect.width / 2 - containerBounds.left;\n const y = rect.top - containerBounds.top;\n return {\n x,\n y\n };\n }, [containerBounds.width, containerBounds.height, containerBounds.left, containerBounds.top]);\n\n // Helper function to handle step interaction (both click and keyboard)\n const handleStepInteraction = useCallback((step, event, interactionType) => {\n // Store reference to the interacted element\n selectedBarRef.current = event.currentTarget;\n\n // Check if deselecting the same step\n const {\n isClicked\n } = getStepState(step.id);\n if (isClicked) {\n // Deselecting - clear selection (tooltip will be hidden by hook)\n if (interactionType === 'click') {\n handleBarClick(step.id);\n } else {\n handleBarKeyDown(step.id, event);\n }\n return;\n }\n\n // Selecting - handle selection and show tooltip\n if (interactionType === 'click') {\n handleBarClick(step.id);\n const coords = getMouseTooltipCoords(event);\n if (coords) {\n showTooltipAt(step, coords.x, coords.y);\n }\n } else {\n handleBarKeyDown(step.id, event);\n const coords = getKeyboardTooltipCoords(event);\n if (coords) {\n showTooltipAt(step, coords.x, coords.y);\n }\n }\n }, [getStepState, handleBarClick, handleBarKeyDown, showTooltipAt, getMouseTooltipCoords, getKeyboardTooltipCoords]);\n\n // Create handler factories to avoid arrow functions in JSX\n const stepHandlers = useMemo(() => {\n const handlers = new Map();\n steps.forEach(step => {\n const onClick = event => {\n event.stopPropagation();\n handleStepInteraction(step, event, 'click');\n };\n const onKeyDown = event => {\n if (event.key === 'Enter' || event.key === ' ') {\n handleStepInteraction(step, event, 'keyboard');\n } else {\n // For other keys (like Escape), just handle the selection\n selectedBarRef.current = event.currentTarget;\n handleBarKeyDown(step.id, event);\n }\n };\n handlers.set(step.id, {\n onClick,\n onKeyDown\n });\n });\n return handlers;\n }, [steps, handleStepInteraction, handleBarKeyDown]);\n\n // Handle document-level click to clear selection when clicking outside selected bar\n useEffect(() => {\n const handleDocumentClick = event => {\n // Only clear selection if there's an active selection and click is outside the selected bar\n if (selectedBarRef.current && !selectedBarRef.current.contains(event.target)) {\n clearSelectionAndRef();\n }\n };\n document.addEventListener('mousedown', handleDocumentClick);\n return () => {\n document.removeEventListener('mousedown', handleDocumentClick);\n };\n }, [clearSelectionAndRef]);\n\n // Resolve height: explicit height prop > style.height > default 100%\n const resolvedHeight = height ?? style?.height ?? '100%';\n\n // Get component settings from theme with fallbacks\n const {\n primaryColor,\n backgroundColor,\n positiveChangeColor,\n negativeChangeColor\n } = conversionFunnelChartSettings;\n\n // Resolve bar color using getElementStyles with primaryColor as override\n const {\n color: barColor\n } = getElementStyles ? getElementStyles({\n index: 0,\n overrideColor: primaryColor\n }) : {\n color: primaryColor || '#000000'\n };\n\n // Determine change indicator color\n const isPositiveChange = changeIndicator?.startsWith('+');\n const changeColor = isPositiveChange ? positiveChangeColor : negativeChangeColor;\n\n // Create light background version of primary color if not set\n const barBackgroundColor = backgroundColor || hexToRgba(barColor, 0.08) || 'rgba(0, 0, 0, 0.08)';\n\n // Default main metric rendering function\n const renderDefaultMainMetric = () => /*#__PURE__*/_jsxs(_Fragment, {\n children: [/*#__PURE__*/_jsx(\"span\", {\n className: styles['main-rate'],\n children: formatPercentage(mainRate)\n }), changeIndicator && /*#__PURE__*/_jsx(\"span\", {\n className: styles['change-indicator'],\n style: {\n color: changeColor\n },\n children: changeIndicator\n })]\n });\n\n // Default tooltip rendering function\n const renderDefaultTooltip = step => /*#__PURE__*/_jsxs(_Fragment, {\n children: [/*#__PURE__*/_jsx(\"div\", {\n className: styles['tooltip-title'],\n children: step.label\n }), /*#__PURE__*/_jsxs(\"div\", {\n className: styles['tooltip-content'],\n children: [formatPercentage(step.rate), ` • ${step.count ?? 'no'} items`]\n })]\n });\n\n // Validate data\n const isDataValid = Boolean(steps && steps.length > 0);\n\n // Memoize metadata to prevent unnecessary re-registration\n const chartMetadata = useMemo(() => ({\n mainRate,\n changeIndicator,\n stepsCount: steps?.length || 0\n }), [mainRate, changeIndicator, steps?.length]);\n useChartRegistration({\n chartId,\n legendItems: [],\n chartType: 'conversion-funnel',\n isDataValid,\n metadata: chartMetadata\n });\n const prefersReducedMotion = usePrefersReducedMotion();\n\n // Handle empty or undefined data\n if (!isDataValid) {\n return /*#__PURE__*/_jsx(Stack, {\n direction: \"column\",\n className: clsx(styles.conversionFunnelChart, loading && styles.loading, className),\n style: {\n ...style,\n height: resolvedHeight\n },\n children: /*#__PURE__*/_jsx(\"div\", {\n className: styles['empty-state'],\n children: loading ? 'Loading...' : 'No data available'\n })\n });\n }\n\n // Calculate bar heights relative to the maximum (first step)\n const maxRate = Math.max(...steps.map(step => step.rate));\n return /*#__PURE__*/_jsxs(_Fragment, {\n children: [/*#__PURE__*/_jsxs(Stack, {\n direction: \"column\",\n ref: node => {\n // Set containerRef for @visx coordinate system\n portalContainerRef(node);\n chartRef.current = node;\n },\n className: clsx(styles.conversionFunnelChart, loading && styles.loading, className),\n style: {\n ...style,\n height: resolvedHeight\n },\n children: [renderMainMetric ? renderMainMetric({\n mainRate,\n changeIndicator,\n className: styles['main-metric'],\n changeColor\n }) : /*#__PURE__*/_jsx(\"div\", {\n className: styles['main-metric'],\n children: renderDefaultMainMetric()\n }), /*#__PURE__*/_jsx(\"div\", {\n className: styles['funnel-container'],\n children: steps.map((step, index) => {\n const barHeight = step.rate / maxRate * 100;\n const {\n isBlurred\n } = getStepState(step.id);\n return /*#__PURE__*/_jsxs(\"div\", {\n className: clsx(styles['funnel-step'], isBlurred && styles.blurred),\n children: [/*#__PURE__*/_jsxs(\"div\", {\n className: styles['step-header'],\n children: [renderStepLabel ? renderStepLabel({\n step,\n index,\n className: styles['step-label']\n }) : /*#__PURE__*/_jsx(\"span\", {\n className: styles['step-label'],\n children: step.label\n }), renderStepRate ? renderStepRate({\n step,\n index,\n className: styles['step-rate']\n }) : /*#__PURE__*/_jsx(\"span\", {\n className: styles['step-rate'],\n children: formatPercentage(step.rate)\n })]\n }), /*#__PURE__*/_jsx(\"div\", {\n className: clsx(styles['bar-container'], isBlurred && styles.disabled),\n onClick: stepHandlers.get(step.id)?.onClick,\n onKeyDown: stepHandlers.get(step.id)?.onKeyDown,\n role: \"button\",\n tabIndex: isBlurred ? -1 : 0,\n \"aria-label\": step.label,\n style: {\n backgroundColor: barBackgroundColor\n },\n children: /*#__PURE__*/_jsx(\"div\", {\n className: clsx(styles['funnel-bar'], {\n [styles['funnel-bar--animated']]: animation && !loading && !prefersReducedMotion\n }),\n style: {\n height: `${barHeight}%`,\n backgroundColor: barColor\n }\n })\n })]\n }, step.id);\n })\n })]\n }), tooltipOpen && tooltipData && (() => {\n const tooltipContent = renderTooltip ? renderTooltip({\n step: tooltipData,\n index: steps.findIndex(s => s.id === tooltipData.id),\n top: tooltipTop,\n left: tooltipLeft,\n className: styles['tooltip-wrapper']\n }) : renderDefaultTooltip(tooltipData);\n\n // Don't render tooltip if renderTooltip returns falsy\n if (!tooltipContent) return null;\n return /*#__PURE__*/_jsx(TooltipInPortal\n // set this to random so it correctly updates with parent bounds\n , {\n top: tooltipTop,\n left: tooltipLeft,\n className: styles['tooltip-wrapper'],\n children: tooltipContent\n }, Math.random());\n })()]\n });\n};\n\n/**\n * ConversionFunnelChart component with provider wrapper\n *\n * @param props - Component props\n * @return JSX element representing the conversion funnel chart\n */\nconst ConversionFunnelChartWithProvider = props => {\n const existingContext = useContext(GlobalChartsContext);\n\n // If we're already in a GlobalChartsProvider context, don't create a new one\n if (existingContext) {\n return /*#__PURE__*/_jsx(ConversionFunnelChartInternal, {\n ...props\n });\n }\n\n // Otherwise, create our own GlobalChartsProvider\n return /*#__PURE__*/_jsx(GlobalChartsProvider, {\n children: /*#__PURE__*/_jsx(ConversionFunnelChartInternal, {\n ...props\n })\n });\n};\nConversionFunnelChartWithProvider.displayName = 'ConversionFunnelChart';\nexport { ConversionFunnelChartWithProvider as default };","import 'css-chunk:src/charts/conversion-funnel-chart/conversion-funnel-chart.module.scss';export default {\n \"conversionFunnelChart\": \"a8ccharts-lK-YNK\",\n \"loading\": \"a8ccharts-DbHKK5\",\n \"main-metric\": \"a8ccharts-61WPYr\",\n \"main-rate\": \"a8ccharts-RRRI6x\",\n \"change-indicator\": \"a8ccharts-661iwx\",\n \"funnel-container\": \"a8ccharts-Z7EGnW\",\n \"funnel-step\": \"a8ccharts-VqFY0l\",\n \"blurred\": \"a8ccharts-7dTRBs\",\n \"step-header\": \"a8ccharts-2JsQiV\",\n \"step-label\": \"a8ccharts-6OabC4\",\n \"step-rate\": \"a8ccharts-9wSZ6n\",\n \"bar-container\": \"a8ccharts-sSmCTi\",\n \"disabled\": \"a8ccharts-PLWVAW\",\n \"funnel-bar\": \"a8ccharts-EzczI-\",\n \"selected\": \"a8ccharts-wNpZEu\",\n \"funnel-bar--animated\": \"a8ccharts-68HQJl\",\n \"stretch\": \"a8ccharts-CmtieZ\",\n \"tooltip-wrapper\": \"a8ccharts-2TeoCn\",\n \"tooltip-title\": \"a8ccharts-jkRitH\",\n \"tooltip-content\": \"a8ccharts-8jgT-3\",\n \"empty-state\": \"a8ccharts-Ml6MMr\"\n};","import { useCallback, useState } from 'react';\n\n/**\n * Custom hook to manage funnel bar selection state and interactions\n * @param hideTooltip - Function to hide tooltip when selection is cleared\n * @return Object containing selection state and event handlers\n */\nexport const useFunnelSelection = ( hideTooltip?: () => void ) => {\n\tconst [ clickedStep, setClickedStep ] = useState< string | null >( null );\n\n\t// Handle bar click\n\tconst handleBarClick = useCallback(\n\t\t( stepId: string ) => {\n\t\t\tif ( clickedStep === stepId ) {\n\t\t\t\t// If clicking the same step, deselect it\n\t\t\t\tsetClickedStep( null );\n\t\t\t\thideTooltip?.();\n\t\t\t} else {\n\t\t\t\t// Otherwise, select this step\n\t\t\t\tsetClickedStep( stepId );\n\t\t\t}\n\t\t},\n\t\t[ clickedStep, hideTooltip ]\n\t);\n\n\t// Handle bar keydown\n\tconst handleBarKeyDown = useCallback(\n\t\t( stepId: string, event: React.KeyboardEvent ) => {\n\t\t\tif ( event.key === 'Enter' || event.key === ' ' ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tif ( clickedStep === stepId ) {\n\t\t\t\t\tsetClickedStep( null );\n\t\t\t\t\thideTooltip?.();\n\t\t\t\t} else {\n\t\t\t\t\tsetClickedStep( stepId );\n\t\t\t\t}\n\t\t\t} else if ( event.key === 'Escape' ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tsetClickedStep( null );\n\t\t\t\thideTooltip?.();\n\t\t\t}\n\t\t},\n\t\t[ clickedStep, hideTooltip ]\n\t);\n\n\t// Clear selection (for chart-level click)\n\tconst clearSelection = useCallback( () => {\n\t\tsetClickedStep( null );\n\t\thideTooltip?.();\n\t}, [ hideTooltip ] );\n\n\t// Get step state helpers\n\tconst getStepState = useCallback(\n\t\t( stepId: string ) => ( {\n\t\t\tisClicked: clickedStep === stepId,\n\t\t\tisBlurred: clickedStep !== null && clickedStep !== stepId,\n\t\t} ),\n\t\t[ clickedStep ]\n\t);\n\n\treturn {\n\t\tclickedStep,\n\t\thandleBarClick,\n\t\thandleBarKeyDown,\n\t\tclearSelection,\n\t\tgetStepState,\n\t};\n};\n","/**\n * External dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport clsx from 'clsx';\nimport { useContext, useMemo } from 'react';\nimport { Chart } from 'react-google-charts';\n/**\n * Internal dependencies\n */\nimport { GlobalChartsContext, GlobalChartsProvider, useGlobalChartsContext } from '../../providers';\nimport { lightenHexColor, normalizeColorToHex } from '../../utils/color-utils';\nimport { resolveCssVariable } from '../../utils/resolve-css-var';\nimport { withResponsive } from '../private/with-responsive';\nimport styles from './geo-chart.module.scss';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst DEFAULT_FEATURE_FILL_COLOR = '#ffffff';\nconst DEFAULT_BACKGROUND_COLOR = '#ffffff';\n\n/**\n * Renders a geographical chart using Google Charts GeoChart to visualize data.\n *\n * Supports the full Google Charts data format including custom tooltips, formatted values,\n * and multiple data columns for maximum flexibility.\n *\n * Locations can be identified by full name (e.g., 'United States', 'California') or codes\n * (e.g., 'US', 'US-CA'). Full names are recommended for better readability in tooltips.\n *\n * @param props - The props for the GeoChart component\n * @param props.data - Data in Google Charts format (array of arrays with headers)\n * @param props.width - Width of the chart in pixels\n * @param props.height - Height of the chart in pixels\n * @param props.region - Region to display ('world', 'US', or ISO 3166-1 alpha-2 code)\n * @param props.resolution - Resolution level ('countries', 'provinces', or 'metros')\n * @param props.className - Additional CSS class name for the chart container\n * @param props.renderPlaceholder - Optional render function for the loading placeholder\n * @return A React component displaying an interactive map with data visualization\n */\nconst GeoChartInternal = ({\n className,\n data,\n width,\n height,\n region = 'world',\n resolution = 'countries',\n renderPlaceholder\n}) => {\n const {\n getElementStyles,\n theme: {\n geoChart: {\n featureFillColor\n },\n backgroundColor\n }\n } = useGlobalChartsContext();\n\n // Render loading placeholder\n const loadingPlaceholder = /*#__PURE__*/_jsx(\"div\", {\n className: clsx('geo-chart', styles.container, className),\n style: {\n width,\n height\n },\n children: renderPlaceholder ? renderPlaceholder() : __('Loading map', 'jetpack-charts')\n });\n\n // Google charts doesn't accept CSS variables, so we need to convert them to hex colors\n const fullColorHex = getElementStyles({\n index: 0\n }).color;\n const lightColorHex = lightenHexColor(fullColorHex, 0.8);\n // Use normalizeColorToHex to ensure HSL/RGB values from CSS variables are converted to hex\n const backgroundColorHex = normalizeColorToHex(backgroundColor, null, resolveCssVariable) || DEFAULT_BACKGROUND_COLOR;\n const defaultFillColorHex = normalizeColorToHex(featureFillColor, null, resolveCssVariable) || DEFAULT_FEATURE_FILL_COLOR;\n\n // Check if data has HTML tooltips (column with role: 'tooltip' and p.html: true)\n const hasHtmlTooltips = useMemo(() => data.length > 0 && data[0].some(col => typeof col === 'object' && col !== null && 'role' in col && col.role === 'tooltip' && 'p' in col && typeof col.p === 'object' && col.p !== null && 'html' in col.p && col.p.html === true), [data]);\n const options = useMemo(() => ({\n ...(region !== 'world' && {\n region\n }),\n ...(resolution !== 'countries' && {\n resolution\n }),\n colorAxis: {\n colors: [lightColorHex, fullColorHex]\n },\n backgroundColor: backgroundColorHex,\n datalessRegionColor: defaultFillColorHex,\n defaultColor: defaultFillColorHex,\n tooltip: {\n trigger: 'focus',\n isHtml: hasHtmlTooltips\n },\n legend: 'none',\n keepAspectRatio: true\n }), [region, resolution, lightColorHex, fullColorHex, backgroundColorHex, defaultFillColorHex, hasHtmlTooltips]);\n return /*#__PURE__*/_jsx(\"div\", {\n className: clsx('geo-chart', styles.container, className),\n style: {\n width,\n height,\n backgroundColor\n },\n children: /*#__PURE__*/_jsx(Chart, {\n chartType: \"GeoChart\",\n width: width,\n height: height,\n data: data,\n options: options,\n loader: loadingPlaceholder\n })\n });\n};\nconst GeoChartWithProvider = props => {\n const existingContext = useContext(GlobalChartsContext);\n\n // If we're already in a GlobalChartsProvider context, don't create a new one\n if (existingContext) {\n return /*#__PURE__*/_jsx(GeoChartInternal, {\n ...props\n });\n }\n\n // Otherwise, create our own GlobalChartsProvider\n return /*#__PURE__*/_jsx(GlobalChartsProvider, {\n children: /*#__PURE__*/_jsx(GeoChartInternal, {\n ...props\n })\n });\n};\nGeoChartWithProvider.displayName = 'GeoChart';\nconst GeoChartResponsive = withResponsive(GeoChartWithProvider);\nexport { GeoChartResponsive as default, GeoChartWithProvider as GeoChartUnresponsive };","import 'css-chunk:src/charts/geo-chart/geo-chart.module.scss';export default {\n \"container\": \"a8ccharts-JvcqOz\"\n};","/**\n * Determines if a value is null or undefined.\n *\n * @template T\n *\n * @param {T} value The value to check.\n * @return {value is Exclude<T, null | undefined>} Whether value is not null or undefined.\n */\nexport function isValueDefined(value) {\n return value !== undefined && value !== null;\n}\n\n/**\n * Determines if a value is empty, null, or undefined.\n *\n * @param {string | number | null | undefined} value The value to check.\n * @return {value is (\"\" | null | undefined)} Whether value is empty.\n */\nexport function isValueEmpty(value) {\n const isEmptyString = value === '';\n return !isValueDefined(value) || isEmptyString;\n}\n\n/**\n * Get the first defined/non-null value from an array.\n *\n * @template T\n *\n * @param {Array<T | null | undefined>} values Values to derive from.\n * @param {T} fallbackValue Fallback value if there are no defined values.\n * @return {T} A defined value or the fallback value.\n */\nexport function getDefinedValue(values = [], fallbackValue) {\n return values.find(isValueDefined) ?? fallbackValue;\n}\n\n/**\n * Converts a string to a number.\n *\n * @param {string} value\n * @return {number} String as a number.\n */\nexport const stringToNumber = value => {\n return parseFloat(value);\n};\n\n/**\n * Regardless of the input being a string or a number, returns a number.\n *\n * Returns `undefined` in case the string is `undefined` or not a valid numeric value.\n *\n * @param {string | number} value\n * @return {number} The parsed number.\n */\nexport const ensureNumber = value => {\n return typeof value === 'string' ? stringToNumber(value) : value;\n};","/**\n * WordPress dependencies\n */\nimport { useRef, useEffect } from '@wordpress/element';\n\n/**\n * A `React.useEffect` that will not run on the first render.\n * Source:\n * https://github.com/ariakit/ariakit/blob/main/packages/ariakit-react-core/src/utils/hooks.ts\n *\n * @param {React.EffectCallback} effect\n * @param {React.DependencyList} deps\n */\nfunction useUpdateEffect(effect, deps) {\n const mountedRef = useRef(false);\n useEffect(() => {\n if (mountedRef.current) {\n return effect();\n }\n mountedRef.current = true;\n return undefined;\n // 1. This hook needs to pass a dep list that isn't an array literal\n // 2. `effect` is missing from the array, and will need to be added carefully to avoid additional warnings\n // see https://github.com/WordPress/gutenberg/pull/41166\n }, deps);\n useEffect(() => () => {\n mountedRef.current = false;\n }, []);\n}\nexport default useUpdateEffect;","import * as React from 'react';\nimport { useContext, forwardRef } from 'react';\nimport createCache from '@emotion/cache';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport weakMemoize from '@emotion/weak-memoize';\nimport hoistNonReactStatics from '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js';\nimport { getRegisteredStyles, registerStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\nimport { useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\n\nvar isDevelopment = false;\n\nvar isBrowser = typeof document !== 'undefined';\n\nvar EmotionCacheContext = /* #__PURE__ */React.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case\n// because this module is primarily intended for the browser and node\n// but it's also required in react native and similar environments sometimes\n// and we could have a special build just for that\n// but this is much easier and the native packages\n// might use a different theme context in the future anyway\ntypeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({\n key: 'css'\n}) : null);\n\nvar CacheProvider = EmotionCacheContext.Provider;\nvar __unsafe_useEmotionCache = function useEmotionCache() {\n return useContext(EmotionCacheContext);\n};\n\nvar withEmotionCache = function withEmotionCache(func) {\n return /*#__PURE__*/forwardRef(function (props, ref) {\n // the cache will never be null in the browser\n var cache = useContext(EmotionCacheContext);\n return func(props, cache, ref);\n });\n};\n\nif (!isBrowser) {\n withEmotionCache = function withEmotionCache(func) {\n return function (props) {\n var cache = useContext(EmotionCacheContext);\n\n if (cache === null) {\n // yes, we're potentially creating this on every render\n // it doesn't actually matter though since it's only on the server\n // so there will only every be a single render\n // that could change in the future because of suspense and etc. but for now,\n // this works and i don't want to optimise for a future thing that we aren't sure about\n cache = createCache({\n key: 'css'\n });\n return /*#__PURE__*/React.createElement(EmotionCacheContext.Provider, {\n value: cache\n }, func(props, cache));\n } else {\n return func(props, cache);\n }\n };\n };\n}\n\nvar ThemeContext = /* #__PURE__ */React.createContext({});\n\nvar useTheme = function useTheme() {\n return React.useContext(ThemeContext);\n};\n\nvar getTheme = function getTheme(outerTheme, theme) {\n if (typeof theme === 'function') {\n var mergedTheme = theme(outerTheme);\n\n return mergedTheme;\n }\n\n return _extends({}, outerTheme, theme);\n};\n\nvar createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {\n return weakMemoize(function (theme) {\n return getTheme(outerTheme, theme);\n });\n});\nvar ThemeProvider = function ThemeProvider(props) {\n var theme = React.useContext(ThemeContext);\n\n if (props.theme !== theme) {\n theme = createCacheWithTheme(theme)(props.theme);\n }\n\n return /*#__PURE__*/React.createElement(ThemeContext.Provider, {\n value: theme\n }, props.children);\n};\nfunction withTheme(Component) {\n var componentName = Component.displayName || Component.name || 'Component';\n var WithTheme = /*#__PURE__*/React.forwardRef(function render(props, ref) {\n var theme = React.useContext(ThemeContext);\n return /*#__PURE__*/React.createElement(Component, _extends({\n theme: theme,\n ref: ref\n }, props));\n });\n WithTheme.displayName = \"WithTheme(\" + componentName + \")\";\n return hoistNonReactStatics(WithTheme, Component);\n}\n\nvar hasOwn = {}.hasOwnProperty;\n\nvar typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';\nvar createEmotionProps = function createEmotionProps(type, props) {\n\n var newProps = {};\n\n for (var _key in props) {\n if (hasOwn.call(props, _key)) {\n newProps[_key] = props[_key];\n }\n }\n\n newProps[typePropName] = type; // Runtime labeling is an opt-in feature because:\n\n return newProps;\n};\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serialized = _ref.serialized,\n isStringTag = _ref.isStringTag;\n registerStyles(cache, serialized, isStringTag);\n var rules = useInsertionEffectAlwaysWithSyncFallback(function () {\n return insertStyles(cache, serialized, isStringTag);\n });\n\n if (!isBrowser && rules !== undefined) {\n var _ref2;\n\n var serializedNames = serialized.name;\n var next = serialized.next;\n\n while (next !== undefined) {\n serializedNames += ' ' + next.name;\n next = next.next;\n }\n\n return /*#__PURE__*/React.createElement(\"style\", (_ref2 = {}, _ref2[\"data-emotion\"] = cache.key + \" \" + serializedNames, _ref2.dangerouslySetInnerHTML = {\n __html: rules\n }, _ref2.nonce = cache.sheet.nonce, _ref2));\n }\n\n return null;\n};\n\nvar Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {\n var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works\n // not passing the registered cache to serializeStyles because it would\n // make certain babel optimisations not possible\n\n if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {\n cssProp = cache.registered[cssProp];\n }\n\n var WrappedComponent = props[typePropName];\n var registeredStyles = [cssProp];\n var className = '';\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, registeredStyles, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(registeredStyles, undefined, React.useContext(ThemeContext));\n\n className += cache.key + \"-\" + serialized.name;\n var newProps = {};\n\n for (var _key2 in props) {\n if (hasOwn.call(props, _key2) && _key2 !== 'css' && _key2 !== typePropName && (!isDevelopment )) {\n newProps[_key2] = props[_key2];\n }\n }\n\n newProps.className = className;\n\n if (ref) {\n newProps.ref = ref;\n }\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serialized: serialized,\n isStringTag: typeof WrappedComponent === 'string'\n }), /*#__PURE__*/React.createElement(WrappedComponent, newProps));\n});\n\nvar Emotion$1 = Emotion;\n\nexport { CacheProvider as C, Emotion$1 as E, ThemeContext as T, __unsafe_useEmotionCache as _, isDevelopment as a, ThemeProvider as b, createEmotionProps as c, withTheme as d, hasOwn as h, isBrowser as i, useTheme as u, withEmotionCache as w };\n","var isDevelopment = false;\n\n/*\n\nBased off glamor's StyleSheet, thanks Sunil ❤️\n\nhigh performance StyleSheet for css-in-js systems\n\n- uses multiple style tags behind the scenes for millions of rules\n- uses `insertRule` for appending in production for *much* faster performance\n\n// usage\n\nimport { StyleSheet } from '@emotion/sheet'\n\nlet styleSheet = new StyleSheet({ key: '', container: document.head })\n\nstyleSheet.insert('#box { border: 1px solid red; }')\n- appends a css rule into the stylesheet\n\nstyleSheet.flush()\n- empties the stylesheet of all its contents\n\n*/\n\nfunction sheetForTag(tag) {\n if (tag.sheet) {\n return tag.sheet;\n } // this weirdness brought to you by firefox\n\n /* istanbul ignore next */\n\n\n for (var i = 0; i < document.styleSheets.length; i++) {\n if (document.styleSheets[i].ownerNode === tag) {\n return document.styleSheets[i];\n }\n } // this function should always return with a value\n // TS can't understand it though so we make it stop complaining here\n\n\n return undefined;\n}\n\nfunction createStyleElement(options) {\n var tag = document.createElement('style');\n tag.setAttribute('data-emotion', options.key);\n\n if (options.nonce !== undefined) {\n tag.setAttribute('nonce', options.nonce);\n }\n\n tag.appendChild(document.createTextNode(''));\n tag.setAttribute('data-s', '');\n return tag;\n}\n\nvar StyleSheet = /*#__PURE__*/function () {\n // Using Node instead of HTMLElement since container may be a ShadowRoot\n function StyleSheet(options) {\n var _this = this;\n\n this._insertTag = function (tag) {\n var before;\n\n if (_this.tags.length === 0) {\n if (_this.insertionPoint) {\n before = _this.insertionPoint.nextSibling;\n } else if (_this.prepend) {\n before = _this.container.firstChild;\n } else {\n before = _this.before;\n }\n } else {\n before = _this.tags[_this.tags.length - 1].nextSibling;\n }\n\n _this.container.insertBefore(tag, before);\n\n _this.tags.push(tag);\n };\n\n this.isSpeedy = options.speedy === undefined ? !isDevelopment : options.speedy;\n this.tags = [];\n this.ctr = 0;\n this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets\n\n this.key = options.key;\n this.container = options.container;\n this.prepend = options.prepend;\n this.insertionPoint = options.insertionPoint;\n this.before = null;\n }\n\n var _proto = StyleSheet.prototype;\n\n _proto.hydrate = function hydrate(nodes) {\n nodes.forEach(this._insertTag);\n };\n\n _proto.insert = function insert(rule) {\n // the max length is how many rules we have per style tag, it's 65000 in speedy mode\n // it's 1 in dev because we insert source maps that map a single rule to a location\n // and you can only have one source map per style tag\n if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {\n this._insertTag(createStyleElement(this));\n }\n\n var tag = this.tags[this.tags.length - 1];\n\n if (this.isSpeedy) {\n var sheet = sheetForTag(tag);\n\n try {\n // this is the ultrafast version, works across browsers\n // the big drawback is that the css won't be editable in devtools\n sheet.insertRule(rule, sheet.cssRules.length);\n } catch (e) {\n }\n } else {\n tag.appendChild(document.createTextNode(rule));\n }\n\n this.ctr++;\n };\n\n _proto.flush = function flush() {\n this.tags.forEach(function (tag) {\n var _tag$parentNode;\n\n return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag);\n });\n this.tags = [];\n this.ctr = 0;\n };\n\n return StyleSheet;\n}();\n\nexport { StyleSheet };\n","export var MS = '-ms-'\nexport var MOZ = '-moz-'\nexport var WEBKIT = '-webkit-'\n\nexport var COMMENT = 'comm'\nexport var RULESET = 'rule'\nexport var DECLARATION = 'decl'\n\nexport var PAGE = '@page'\nexport var MEDIA = '@media'\nexport var IMPORT = '@import'\nexport var CHARSET = '@charset'\nexport var VIEWPORT = '@viewport'\nexport var SUPPORTS = '@supports'\nexport var DOCUMENT = '@document'\nexport var NAMESPACE = '@namespace'\nexport var KEYFRAMES = '@keyframes'\nexport var FONT_FACE = '@font-face'\nexport var COUNTER_STYLE = '@counter-style'\nexport var FONT_FEATURE_VALUES = '@font-feature-values'\nexport var LAYER = '@layer'\n","/**\n * @param {number}\n * @return {number}\n */\nexport var abs = Math.abs\n\n/**\n * @param {number}\n * @return {string}\n */\nexport var from = String.fromCharCode\n\n/**\n * @param {object}\n * @return {object}\n */\nexport var assign = Object.assign\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {number}\n */\nexport function hash (value, length) {\n\treturn charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0\n}\n\n/**\n * @param {string} value\n * @return {string}\n */\nexport function trim (value) {\n\treturn value.trim()\n}\n\n/**\n * @param {string} value\n * @param {RegExp} pattern\n * @return {string?}\n */\nexport function match (value, pattern) {\n\treturn (value = pattern.exec(value)) ? value[0] : value\n}\n\n/**\n * @param {string} value\n * @param {(string|RegExp)} pattern\n * @param {string} replacement\n * @return {string}\n */\nexport function replace (value, pattern, replacement) {\n\treturn value.replace(pattern, replacement)\n}\n\n/**\n * @param {string} value\n * @param {string} search\n * @return {number}\n */\nexport function indexof (value, search) {\n\treturn value.indexOf(search)\n}\n\n/**\n * @param {string} value\n * @param {number} index\n * @return {number}\n */\nexport function charat (value, index) {\n\treturn value.charCodeAt(index) | 0\n}\n\n/**\n * @param {string} value\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function substr (value, begin, end) {\n\treturn value.slice(begin, end)\n}\n\n/**\n * @param {string} value\n * @return {number}\n */\nexport function strlen (value) {\n\treturn value.length\n}\n\n/**\n * @param {any[]} value\n * @return {number}\n */\nexport function sizeof (value) {\n\treturn value.length\n}\n\n/**\n * @param {any} value\n * @param {any[]} array\n * @return {any}\n */\nexport function append (value, array) {\n\treturn array.push(value), value\n}\n\n/**\n * @param {string[]} array\n * @param {function} callback\n * @return {string}\n */\nexport function combine (array, callback) {\n\treturn array.map(callback).join('')\n}\n","import {from, trim, charat, strlen, substr, append, assign} from './Utility.js'\n\nexport var line = 1\nexport var column = 1\nexport var length = 0\nexport var position = 0\nexport var character = 0\nexport var characters = ''\n\n/**\n * @param {string} value\n * @param {object | null} root\n * @param {object | null} parent\n * @param {string} type\n * @param {string[] | string} props\n * @param {object[] | string} children\n * @param {number} length\n */\nexport function node (value, root, parent, type, props, children, length) {\n\treturn {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}\n}\n\n/**\n * @param {object} root\n * @param {object} props\n * @return {object}\n */\nexport function copy (root, props) {\n\treturn assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props)\n}\n\n/**\n * @return {number}\n */\nexport function char () {\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function prev () {\n\tcharacter = position > 0 ? charat(characters, --position) : 0\n\n\tif (column--, character === 10)\n\t\tcolumn = 1, line--\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function next () {\n\tcharacter = position < length ? charat(characters, position++) : 0\n\n\tif (column++, character === 10)\n\t\tcolumn = 1, line++\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function peek () {\n\treturn charat(characters, position)\n}\n\n/**\n * @return {number}\n */\nexport function caret () {\n\treturn position\n}\n\n/**\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function slice (begin, end) {\n\treturn substr(characters, begin, end)\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function token (type) {\n\tswitch (type) {\n\t\t// \\0 \\t \\n \\r \\s whitespace token\n\t\tcase 0: case 9: case 10: case 13: case 32:\n\t\t\treturn 5\n\t\t// ! + , / > @ ~ isolate token\n\t\tcase 33: case 43: case 44: case 47: case 62: case 64: case 126:\n\t\t// ; { } breakpoint token\n\t\tcase 59: case 123: case 125:\n\t\t\treturn 4\n\t\t// : accompanied token\n\t\tcase 58:\n\t\t\treturn 3\n\t\t// \" ' ( [ opening delimit token\n\t\tcase 34: case 39: case 40: case 91:\n\t\t\treturn 2\n\t\t// ) ] closing delimit token\n\t\tcase 41: case 93:\n\t\t\treturn 1\n\t}\n\n\treturn 0\n}\n\n/**\n * @param {string} value\n * @return {any[]}\n */\nexport function alloc (value) {\n\treturn line = column = 1, length = strlen(characters = value), position = 0, []\n}\n\n/**\n * @param {any} value\n * @return {any}\n */\nexport function dealloc (value) {\n\treturn characters = '', value\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function delimit (type) {\n\treturn trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))\n}\n\n/**\n * @param {string} value\n * @return {string[]}\n */\nexport function tokenize (value) {\n\treturn dealloc(tokenizer(alloc(value)))\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function whitespace (type) {\n\twhile (character = peek())\n\t\tif (character < 33)\n\t\t\tnext()\n\t\telse\n\t\t\tbreak\n\n\treturn token(type) > 2 || token(character) > 3 ? '' : ' '\n}\n\n/**\n * @param {string[]} children\n * @return {string[]}\n */\nexport function tokenizer (children) {\n\twhile (next())\n\t\tswitch (token(character)) {\n\t\t\tcase 0: append(identifier(position - 1), children)\n\t\t\t\tbreak\n\t\t\tcase 2: append(delimit(character), children)\n\t\t\t\tbreak\n\t\t\tdefault: append(from(character), children)\n\t\t}\n\n\treturn children\n}\n\n/**\n * @param {number} index\n * @param {number} count\n * @return {string}\n */\nexport function escaping (index, count) {\n\twhile (--count && next())\n\t\t// not 0-9 A-F a-f\n\t\tif (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))\n\t\t\tbreak\n\n\treturn slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function delimiter (type) {\n\twhile (next())\n\t\tswitch (character) {\n\t\t\t// ] ) \" '\n\t\t\tcase type:\n\t\t\t\treturn position\n\t\t\t// \" '\n\t\t\tcase 34: case 39:\n\t\t\t\tif (type !== 34 && type !== 39)\n\t\t\t\t\tdelimiter(character)\n\t\t\t\tbreak\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (type === 41)\n\t\t\t\t\tdelimiter(type)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tnext()\n\t\t\t\tbreak\n\t\t}\n\n\treturn position\n}\n\n/**\n * @param {number} type\n * @param {number} index\n * @return {number}\n */\nexport function commenter (type, index) {\n\twhile (next())\n\t\t// //\n\t\tif (type + character === 47 + 10)\n\t\t\tbreak\n\t\t// /*\n\t\telse if (type + character === 42 + 42 && peek() === 47)\n\t\t\tbreak\n\n\treturn '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())\n}\n\n/**\n * @param {number} index\n * @return {string}\n */\nexport function identifier (index) {\n\twhile (!token(peek()))\n\t\tnext()\n\n\treturn slice(index, position)\n}\n","import {COMMENT, RULESET, DECLARATION} from './Enum.js'\nimport {abs, charat, trim, from, sizeof, strlen, substr, append, replace, indexof} from './Utility.js'\nimport {node, char, prev, next, peek, caret, alloc, dealloc, delimit, whitespace, escaping, identifier, commenter} from './Tokenizer.js'\n\n/**\n * @param {string} value\n * @return {object[]}\n */\nexport function compile (value) {\n\treturn dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {string[]} rule\n * @param {string[]} rules\n * @param {string[]} rulesets\n * @param {number[]} pseudo\n * @param {number[]} points\n * @param {string[]} declarations\n * @return {object}\n */\nexport function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {\n\tvar index = 0\n\tvar offset = 0\n\tvar length = pseudo\n\tvar atrule = 0\n\tvar property = 0\n\tvar previous = 0\n\tvar variable = 1\n\tvar scanning = 1\n\tvar ampersand = 1\n\tvar character = 0\n\tvar type = ''\n\tvar props = rules\n\tvar children = rulesets\n\tvar reference = rule\n\tvar characters = type\n\n\twhile (scanning)\n\t\tswitch (previous = character, character = next()) {\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (previous != 108 && charat(characters, length - 1) == 58) {\n\t\t\t\t\tif (indexof(characters += replace(delimit(character), '&', '&\\f'), '&\\f') != -1)\n\t\t\t\t\t\tampersand = -1\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t// \" ' [\n\t\t\tcase 34: case 39: case 91:\n\t\t\t\tcharacters += delimit(character)\n\t\t\t\tbreak\n\t\t\t// \\t \\n \\r \\s\n\t\t\tcase 9: case 10: case 13: case 32:\n\t\t\t\tcharacters += whitespace(previous)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tcharacters += escaping(caret() - 1, 7)\n\t\t\t\tcontinue\n\t\t\t// /\n\t\t\tcase 47:\n\t\t\t\tswitch (peek()) {\n\t\t\t\t\tcase 42: case 47:\n\t\t\t\t\t\tappend(comment(commenter(next(), caret()), root, parent), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcharacters += '/'\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t// {\n\t\t\tcase 123 * variable:\n\t\t\t\tpoints[index++] = strlen(characters) * ampersand\n\t\t\t// } ; \\0\n\t\t\tcase 125 * variable: case 59: case 0:\n\t\t\t\tswitch (character) {\n\t\t\t\t\t// \\0 }\n\t\t\t\t\tcase 0: case 125: scanning = 0\n\t\t\t\t\t// ;\n\t\t\t\t\tcase 59 + offset: if (ampersand == -1) characters = replace(characters, /\\f/g, '')\n\t\t\t\t\t\tif (property > 0 && (strlen(characters) - length))\n\t\t\t\t\t\t\tappend(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @ ;\n\t\t\t\t\tcase 59: characters += ';'\n\t\t\t\t\t// { rule/at-rule\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tappend(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets)\n\n\t\t\t\t\t\tif (character === 123)\n\t\t\t\t\t\t\tif (offset === 0)\n\t\t\t\t\t\t\t\tparse(characters, root, reference, reference, props, rulesets, length, points, children)\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tswitch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {\n\t\t\t\t\t\t\t\t\t// d l m s\n\t\t\t\t\t\t\t\t\tcase 100: case 108: case 109: case 115:\n\t\t\t\t\t\t\t\t\t\tparse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children)\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\tparse(characters, reference, reference, reference, [''], children, 0, points, children)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tindex = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo\n\t\t\t\tbreak\n\t\t\t// :\n\t\t\tcase 58:\n\t\t\t\tlength = 1 + strlen(characters), property = previous\n\t\t\tdefault:\n\t\t\t\tif (variable < 1)\n\t\t\t\t\tif (character == 123)\n\t\t\t\t\t\t--variable\n\t\t\t\t\telse if (character == 125 && variable++ == 0 && prev() == 125)\n\t\t\t\t\t\tcontinue\n\n\t\t\t\tswitch (characters += from(character), character * variable) {\n\t\t\t\t\t// &\n\t\t\t\t\tcase 38:\n\t\t\t\t\t\tampersand = offset > 0 ? 1 : (characters += '\\f', -1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// ,\n\t\t\t\t\tcase 44:\n\t\t\t\t\t\tpoints[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @\n\t\t\t\t\tcase 64:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (peek() === 45)\n\t\t\t\t\t\t\tcharacters += delimit(next())\n\n\t\t\t\t\t\tatrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// -\n\t\t\t\t\tcase 45:\n\t\t\t\t\t\tif (previous === 45 && strlen(characters) == 2)\n\t\t\t\t\t\t\tvariable = 0\n\t\t\t\t}\n\t\t}\n\n\treturn rulesets\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} index\n * @param {number} offset\n * @param {string[]} rules\n * @param {number[]} points\n * @param {string} type\n * @param {string[]} props\n * @param {string[]} children\n * @param {number} length\n * @return {object}\n */\nexport function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length) {\n\tvar post = offset - 1\n\tvar rule = offset === 0 ? rules : ['']\n\tvar size = sizeof(rule)\n\n\tfor (var i = 0, j = 0, k = 0; i < index; ++i)\n\t\tfor (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)\n\t\t\tif (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\\f/g, rule[x])))\n\t\t\t\tprops[k++] = z\n\n\treturn node(value, root, parent, offset === 0 ? RULESET : type, props, children, length)\n}\n\n/**\n * @param {number} value\n * @param {object} root\n * @param {object?} parent\n * @return {object}\n */\nexport function comment (value, root, parent) {\n\treturn node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0)\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} length\n * @return {object}\n */\nexport function declaration (value, root, parent, length) {\n\treturn node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length)\n}\n","import {IMPORT, LAYER, COMMENT, RULESET, DECLARATION, KEYFRAMES} from './Enum.js'\nimport {strlen, sizeof} from './Utility.js'\n\n/**\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function serialize (children, callback) {\n\tvar output = ''\n\tvar length = sizeof(children)\n\n\tfor (var i = 0; i < length; i++)\n\t\toutput += callback(children[i], i, children, callback) || ''\n\n\treturn output\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function stringify (element, index, children, callback) {\n\tswitch (element.type) {\n\t\tcase LAYER: if (element.children.length) break\n\t\tcase IMPORT: case DECLARATION: return element.return = element.return || element.value\n\t\tcase COMMENT: return ''\n\t\tcase KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'\n\t\tcase RULESET: element.value = element.props.join(',')\n\t}\n\n\treturn strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''\n}\n","import {MS, MOZ, WEBKIT, RULESET, KEYFRAMES, DECLARATION} from './Enum.js'\nimport {match, charat, substr, strlen, sizeof, replace, combine} from './Utility.js'\nimport {copy, tokenize} from './Tokenizer.js'\nimport {serialize} from './Serializer.js'\nimport {prefix} from './Prefixer.js'\n\n/**\n * @param {function[]} collection\n * @return {function}\n */\nexport function middleware (collection) {\n\tvar length = sizeof(collection)\n\n\treturn function (element, index, children, callback) {\n\t\tvar output = ''\n\n\t\tfor (var i = 0; i < length; i++)\n\t\t\toutput += collection[i](element, index, children, callback) || ''\n\n\t\treturn output\n\t}\n}\n\n/**\n * @param {function} callback\n * @return {function}\n */\nexport function rulesheet (callback) {\n\treturn function (element) {\n\t\tif (!element.root)\n\t\t\tif (element = element.return)\n\t\t\t\tcallback(element)\n\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n */\nexport function prefixer (element, index, children, callback) {\n\tif (element.length > -1)\n\t\tif (!element.return)\n\t\t\tswitch (element.type) {\n\t\t\t\tcase DECLARATION: element.return = prefix(element.value, element.length, children)\n\t\t\t\t\treturn\n\t\t\t\tcase KEYFRAMES:\n\t\t\t\t\treturn serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback)\n\t\t\t\tcase RULESET:\n\t\t\t\t\tif (element.length)\n\t\t\t\t\t\treturn combine(element.props, function (value) {\n\t\t\t\t\t\t\tswitch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n\t\t\t\t\t\t\t\t// :read-(only|write)\n\t\t\t\t\t\t\t\tcase ':read-only': case ':read-write':\n\t\t\t\t\t\t\t\t\treturn serialize([copy(element, {props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]})], callback)\n\t\t\t\t\t\t\t\t// :placeholder\n\t\t\t\t\t\t\t\tcase '::placeholder':\n\t\t\t\t\t\t\t\t\treturn serialize([\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]})\n\t\t\t\t\t\t\t\t\t], callback)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn ''\n\t\t\t\t\t\t})\n\t\t\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n */\nexport function namespace (element) {\n\tswitch (element.type) {\n\t\tcase RULESET:\n\t\t\telement.props = element.props.map(function (value) {\n\t\t\t\treturn combine(tokenize(value), function (value, index, children) {\n\t\t\t\t\tswitch (charat(value, 0)) {\n\t\t\t\t\t\t// \\f\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn substr(value, 1, strlen(value))\n\t\t\t\t\t\t// \\0 ( + > ~\n\t\t\t\t\t\tcase 0: case 40: case 43: case 62: case 126:\n\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t// :\n\t\t\t\t\t\tcase 58:\n\t\t\t\t\t\t\tif (children[++index] === 'global')\n\t\t\t\t\t\t\t\tchildren[index] = '', children[++index] = '\\f' + substr(children[index], index = 1, -1)\n\t\t\t\t\t\t// \\s\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\treturn index === 1 ? '' : value\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tswitch (index) {\n\t\t\t\t\t\t\t\tcase 0: element = value\n\t\t\t\t\t\t\t\t\treturn sizeof(children) > 1 ? '' : value\n\t\t\t\t\t\t\t\tcase index = sizeof(children) - 1: case 2:\n\t\t\t\t\t\t\t\t\treturn index === 2 ? value + element + element : value + element\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t}\n}\n","var weakMemoize = function weakMemoize(func) {\n var cache = new WeakMap();\n return function (arg) {\n if (cache.has(arg)) {\n // Use non-null assertion because we just checked that the cache `has` it\n // This allows us to remove `undefined` from the return value\n return cache.get(arg);\n }\n\n var ret = func(arg);\n cache.set(arg, ret);\n return ret;\n };\n};\n\nexport { weakMemoize as default };\n","function memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport { memoize as default };\n","import { StyleSheet } from '@emotion/sheet';\nimport { dealloc, alloc, next, token, from, peek, delimit, slice, position, RULESET, combine, match, serialize, copy, replace, WEBKIT, MOZ, MS, KEYFRAMES, DECLARATION, hash, charat, strlen, indexof, stringify, rulesheet, middleware, compile } from 'stylis';\nimport weakMemoize from '@emotion/weak-memoize';\nimport memoize from '@emotion/memoize';\n\nvar isBrowser = typeof document !== 'undefined';\n\nvar identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {\n var previous = 0;\n var character = 0;\n\n while (true) {\n previous = character;\n character = peek(); // &\\f\n\n if (previous === 38 && character === 12) {\n points[index] = 1;\n }\n\n if (token(character)) {\n break;\n }\n\n next();\n }\n\n return slice(begin, position);\n};\n\nvar toRules = function toRules(parsed, points) {\n // pretend we've started with a comma\n var index = -1;\n var character = 44;\n\n do {\n switch (token(character)) {\n case 0:\n // &\\f\n if (character === 38 && peek() === 12) {\n // this is not 100% correct, we don't account for literal sequences here - like for example quoted strings\n // stylis inserts \\f after & to know when & where it should replace this sequence with the context selector\n // and when it should just concatenate the outer and inner selectors\n // it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here\n points[index] = 1;\n }\n\n parsed[index] += identifierWithPointTracking(position - 1, points, index);\n break;\n\n case 2:\n parsed[index] += delimit(character);\n break;\n\n case 4:\n // comma\n if (character === 44) {\n // colon\n parsed[++index] = peek() === 58 ? '&\\f' : '';\n points[index] = parsed[index].length;\n break;\n }\n\n // fallthrough\n\n default:\n parsed[index] += from(character);\n }\n } while (character = next());\n\n return parsed;\n};\n\nvar getRules = function getRules(value, points) {\n return dealloc(toRules(alloc(value), points));\n}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11\n\n\nvar fixedElements = /* #__PURE__ */new WeakMap();\nvar compat = function compat(element) {\n if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo\n // negative .length indicates that this rule has been already prefixed\n element.length < 1) {\n return;\n }\n\n var value = element.value;\n var parent = element.parent;\n var isImplicitRule = element.column === parent.column && element.line === parent.line;\n\n while (parent.type !== 'rule') {\n parent = parent.parent;\n if (!parent) return;\n } // short-circuit for the simplest case\n\n\n if (element.props.length === 1 && value.charCodeAt(0) !== 58\n /* colon */\n && !fixedElements.get(parent)) {\n return;\n } // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)\n // then the props has already been manipulated beforehand as they that array is shared between it and its \"rule parent\"\n\n\n if (isImplicitRule) {\n return;\n }\n\n fixedElements.set(element, true);\n var points = [];\n var rules = getRules(value, points);\n var parentRules = parent.props;\n\n for (var i = 0, k = 0; i < rules.length; i++) {\n for (var j = 0; j < parentRules.length; j++, k++) {\n element.props[k] = points[i] ? rules[i].replace(/&\\f/g, parentRules[j]) : parentRules[j] + \" \" + rules[i];\n }\n }\n};\nvar removeLabel = function removeLabel(element) {\n if (element.type === 'decl') {\n var value = element.value;\n\n if ( // charcode for l\n value.charCodeAt(0) === 108 && // charcode for b\n value.charCodeAt(2) === 98) {\n // this ignores label\n element[\"return\"] = '';\n element.value = '';\n }\n }\n};\n\n/* eslint-disable no-fallthrough */\n\nfunction prefix(value, length) {\n switch (hash(value, length)) {\n // color-adjust\n case 5103:\n return WEBKIT + 'print-' + value + value;\n // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)\n\n case 5737:\n case 4201:\n case 3177:\n case 3433:\n case 1641:\n case 4457:\n case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break\n\n case 5572:\n case 6356:\n case 5844:\n case 3191:\n case 6645:\n case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,\n\n case 6391:\n case 5879:\n case 5623:\n case 6135:\n case 4599:\n case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)\n\n case 4215:\n case 6389:\n case 5109:\n case 5365:\n case 5621:\n case 3829:\n return WEBKIT + value + value;\n // appearance, user-select, transform, hyphens, text-size-adjust\n\n case 5349:\n case 4246:\n case 4810:\n case 6968:\n case 2756:\n return WEBKIT + value + MOZ + value + MS + value + value;\n // flex, flex-direction\n\n case 6828:\n case 4268:\n return WEBKIT + value + MS + value + value;\n // order\n\n case 6165:\n return WEBKIT + value + MS + 'flex-' + value + value;\n // align-items\n\n case 5187:\n return WEBKIT + value + replace(value, /(\\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value;\n // align-self\n\n case 5443:\n return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value;\n // align-content\n\n case 4675:\n return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value;\n // flex-shrink\n\n case 5548:\n return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value;\n // flex-basis\n\n case 5292:\n return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value;\n // flex-grow\n\n case 6060:\n return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value;\n // transition\n\n case 4554:\n return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value;\n // cursor\n\n case 6187:\n return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;\n // background, background-image\n\n case 5495:\n case 3959:\n return replace(value, /(image-set\\([^]*)/, WEBKIT + '$1' + '$`$1');\n // justify-content\n\n case 4968:\n return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value;\n // (margin|padding)-inline-(start|end)\n\n case 4095:\n case 3583:\n case 4068:\n case 2532:\n return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;\n // (min|max)?(width|height|inline-size|block-size)\n\n case 8116:\n case 7059:\n case 5753:\n case 5535:\n case 5445:\n case 5701:\n case 4933:\n case 4677:\n case 5533:\n case 5789:\n case 5021:\n case 4765:\n // stretch, max-content, min-content, fill-available\n if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {\n // (m)ax-content, (m)in-content\n case 109:\n // -\n if (charat(value, length + 4) !== 45) break;\n // (f)ill-available, (f)it-content\n\n case 102:\n return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;\n // (s)tretch\n\n case 115:\n return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value;\n }\n break;\n // position: sticky\n\n case 4949:\n // (s)ticky?\n if (charat(value, length + 1) !== 115) break;\n // display: (flex|inline-flex)\n\n case 6444:\n switch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {\n // stic(k)y\n case 107:\n return replace(value, ':', ':' + WEBKIT) + value;\n // (inline-)?fl(e)x\n\n case 101:\n return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value;\n }\n\n break;\n // writing-mode\n\n case 5936:\n switch (charat(value, length + 11)) {\n // vertical-l(r)\n case 114:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb') + value;\n // vertical-r(l)\n\n case 108:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb-rl') + value;\n // horizontal(-)tb\n\n case 45:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'lr') + value;\n }\n\n return WEBKIT + value + MS + value + value;\n }\n\n return value;\n}\n\nvar prefixer = function prefixer(element, index, children, callback) {\n if (element.length > -1) if (!element[\"return\"]) switch (element.type) {\n case DECLARATION:\n element[\"return\"] = prefix(element.value, element.length);\n break;\n\n case KEYFRAMES:\n return serialize([copy(element, {\n value: replace(element.value, '@', '@' + WEBKIT)\n })], callback);\n\n case RULESET:\n if (element.length) return combine(element.props, function (value) {\n switch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n // :read-(only|write)\n case ':read-only':\n case ':read-write':\n return serialize([copy(element, {\n props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]\n })], callback);\n // :placeholder\n\n case '::placeholder':\n return serialize([copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]\n })], callback);\n }\n\n return '';\n });\n }\n};\n\nvar getServerStylisCache = isBrowser ? undefined : weakMemoize(function () {\n return memoize(function () {\n return {};\n });\n});\nvar defaultStylisPlugins = [prefixer];\n\nvar createCache = function createCache(options) {\n var key = options.key;\n\n if (isBrowser && key === 'css') {\n var ssrStyles = document.querySelectorAll(\"style[data-emotion]:not([data-s])\"); // get SSRed styles out of the way of React's hydration\n // document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)\n // note this very very intentionally targets all style elements regardless of the key to ensure\n // that creating a cache works inside of render of a React component\n\n Array.prototype.forEach.call(ssrStyles, function (node) {\n // we want to only move elements which have a space in the data-emotion attribute value\n // because that indicates that it is an Emotion 11 server-side rendered style elements\n // while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector\n // Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)\n // so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles\n // will not result in the Emotion 10 styles being destroyed\n var dataEmotionAttribute = node.getAttribute('data-emotion');\n\n if (dataEmotionAttribute.indexOf(' ') === -1) {\n return;\n }\n\n document.head.appendChild(node);\n node.setAttribute('data-s', '');\n });\n }\n\n var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;\n\n var inserted = {};\n var container;\n var nodesToHydrate = [];\n\n if (isBrowser) {\n container = options.container || document.head;\n Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which\n // means that the style elements we're looking at are only Emotion 11 server-rendered style elements\n document.querySelectorAll(\"style[data-emotion^=\\\"\" + key + \" \\\"]\"), function (node) {\n var attrib = node.getAttribute(\"data-emotion\").split(' ');\n\n for (var i = 1; i < attrib.length; i++) {\n inserted[attrib[i]] = true;\n }\n\n nodesToHydrate.push(node);\n });\n }\n\n var _insert;\n\n var omnipresentPlugins = [compat, removeLabel];\n\n if (!getServerStylisCache) {\n var currentSheet;\n var finalizingPlugins = [stringify, rulesheet(function (rule) {\n currentSheet.insert(rule);\n })];\n var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));\n\n var stylis = function stylis(styles) {\n return serialize(compile(styles), serializer);\n };\n\n _insert = function insert(selector, serialized, sheet, shouldCache) {\n currentSheet = sheet;\n\n stylis(selector ? selector + \"{\" + serialized.styles + \"}\" : serialized.styles);\n\n if (shouldCache) {\n cache.inserted[serialized.name] = true;\n }\n };\n } else {\n var _finalizingPlugins = [stringify];\n\n var _serializer = middleware(omnipresentPlugins.concat(stylisPlugins, _finalizingPlugins));\n\n var _stylis = function _stylis(styles) {\n return serialize(compile(styles), _serializer);\n };\n\n var serverStylisCache = getServerStylisCache(stylisPlugins)(key);\n\n var getRules = function getRules(selector, serialized) {\n var name = serialized.name;\n\n if (serverStylisCache[name] === undefined) {\n serverStylisCache[name] = _stylis(selector ? selector + \"{\" + serialized.styles + \"}\" : serialized.styles);\n }\n\n return serverStylisCache[name];\n };\n\n _insert = function _insert(selector, serialized, sheet, shouldCache) {\n var name = serialized.name;\n var rules = getRules(selector, serialized);\n\n if (cache.compat === undefined) {\n // in regular mode, we don't set the styles on the inserted cache\n // since we don't need to and that would be wasting memory\n // we return them so that they are rendered in a style tag\n if (shouldCache) {\n cache.inserted[name] = true;\n }\n\n return rules;\n } else {\n // in compat mode, we put the styles on the inserted cache so\n // that emotion-server can pull out the styles\n // except when we don't want to cache it which was in Global but now\n // is nowhere but we don't want to do a major right now\n // and just in case we're going to leave the case here\n // it's also not affecting client side bundle size\n // so it's really not a big deal\n if (shouldCache) {\n cache.inserted[name] = rules;\n } else {\n return rules;\n }\n }\n };\n }\n\n var cache = {\n key: key,\n sheet: new StyleSheet({\n key: key,\n container: container,\n nonce: options.nonce,\n speedy: options.speedy,\n prepend: options.prepend,\n insertionPoint: options.insertionPoint\n }),\n nonce: options.nonce,\n inserted: inserted,\n registered: {},\n insert: _insert\n };\n cache.sheet.hydrate(nodesToHydrate);\n return cache;\n};\n\nexport { createCache as default };\n","var isBrowser = typeof document !== 'undefined';\n\nfunction getRegisteredStyles(registered, registeredStyles, classNames) {\n var rawClassName = '';\n classNames.split(' ').forEach(function (className) {\n if (registered[className] !== undefined) {\n registeredStyles.push(registered[className] + \";\");\n } else if (className) {\n rawClassName += className + \" \";\n }\n });\n return rawClassName;\n}\nvar registerStyles = function registerStyles(cache, serialized, isStringTag) {\n var className = cache.key + \"-\" + serialized.name;\n\n if ( // we only need to add the styles to the registered cache if the\n // class name could be used further down\n // the tree but if it's a string tag, we know it won't\n // so we don't have to add it to registered cache.\n // this improves memory usage since we can avoid storing the whole style string\n (isStringTag === false || // we need to always store it if we're in compat mode and\n // in node since emotion-server relies on whether a style is in\n // the registered cache to know whether a style is global or not\n // also, note that this check will be dead code eliminated in the browser\n isBrowser === false && cache.compat !== undefined) && cache.registered[className] === undefined) {\n cache.registered[className] = serialized.styles;\n }\n};\nvar insertStyles = function insertStyles(cache, serialized, isStringTag) {\n registerStyles(cache, serialized, isStringTag);\n var className = cache.key + \"-\" + serialized.name;\n\n if (cache.inserted[serialized.name] === undefined) {\n var stylesForSSR = '';\n var current = serialized;\n\n do {\n var maybeStyles = cache.insert(serialized === current ? \".\" + className : '', current, cache.sheet, true);\n\n if (!isBrowser && maybeStyles !== undefined) {\n stylesForSSR += maybeStyles;\n }\n\n current = current.next;\n } while (current !== undefined);\n\n if (!isBrowser && stylesForSSR.length !== 0) {\n return stylesForSSR;\n }\n }\n};\n\nexport { getRegisteredStyles, insertStyles, registerStyles };\n","/* eslint-disable */\n// Inspired by https://github.com/garycourt/murmurhash-js\n// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86\nfunction murmur2(str) {\n // 'm' and 'r' are mixing constants generated offline.\n // They're not really 'magic', they just happen to work well.\n // const m = 0x5bd1e995;\n // const r = 24;\n // Initialize the hash\n var h = 0; // Mix 4 bytes at a time into the hash\n\n var k,\n i = 0,\n len = str.length;\n\n for (; len >= 4; ++i, len -= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);\n k ^=\n /* k >>> r: */\n k >>> 24;\n h =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Handle the last few bytes of the input array\n\n\n switch (len) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Do a few final mixes of the hash to ensure the last few\n // bytes are well-incorporated.\n\n\n h ^= h >>> 13;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n return ((h ^ h >>> 15) >>> 0).toString(36);\n}\n\nexport { murmur2 as default };\n","var unitlessKeys = {\n animationIterationCount: 1,\n aspectRatio: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n scale: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\nexport { unitlessKeys as default };\n","import hashString from '@emotion/hash';\nimport unitless from '@emotion/unitless';\nimport memoize from '@emotion/memoize';\n\nvar isDevelopment = false;\n\nvar hyphenateRegex = /[A-Z]|^ms/g;\nvar animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;\n\nvar isCustomProperty = function isCustomProperty(property) {\n return property.charCodeAt(1) === 45;\n};\n\nvar isProcessableValue = function isProcessableValue(value) {\n return value != null && typeof value !== 'boolean';\n};\n\nvar processStyleName = /* #__PURE__ */memoize(function (styleName) {\n return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();\n});\n\nvar processStyleValue = function processStyleValue(key, value) {\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n if (typeof value === 'string') {\n return value.replace(animationRegex, function (match, p1, p2) {\n cursor = {\n name: p1,\n styles: p2,\n next: cursor\n };\n return p1;\n });\n }\n }\n }\n\n if (unitless[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {\n return value + 'px';\n }\n\n return value;\n};\n\nvar noComponentSelectorMessage = 'Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.';\n\nfunction handleInterpolation(mergedProps, registered, interpolation) {\n if (interpolation == null) {\n return '';\n }\n\n var componentSelector = interpolation;\n\n if (componentSelector.__emotion_styles !== undefined) {\n\n return componentSelector;\n }\n\n switch (typeof interpolation) {\n case 'boolean':\n {\n return '';\n }\n\n case 'object':\n {\n var keyframes = interpolation;\n\n if (keyframes.anim === 1) {\n cursor = {\n name: keyframes.name,\n styles: keyframes.styles,\n next: cursor\n };\n return keyframes.name;\n }\n\n var serializedStyles = interpolation;\n\n if (serializedStyles.styles !== undefined) {\n var next = serializedStyles.next;\n\n if (next !== undefined) {\n // not the most efficient thing ever but this is a pretty rare case\n // and there will be very few iterations of this generally\n while (next !== undefined) {\n cursor = {\n name: next.name,\n styles: next.styles,\n next: cursor\n };\n next = next.next;\n }\n }\n\n var styles = serializedStyles.styles + \";\";\n return styles;\n }\n\n return createStringFromObject(mergedProps, registered, interpolation);\n }\n\n case 'function':\n {\n if (mergedProps !== undefined) {\n var previousCursor = cursor;\n var result = interpolation(mergedProps);\n cursor = previousCursor;\n return handleInterpolation(mergedProps, registered, result);\n }\n\n break;\n }\n } // finalize string values (regular strings and functions interpolated into css calls)\n\n\n var asString = interpolation;\n\n if (registered == null) {\n return asString;\n }\n\n var cached = registered[asString];\n return cached !== undefined ? cached : asString;\n}\n\nfunction createStringFromObject(mergedProps, registered, obj) {\n var string = '';\n\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n string += handleInterpolation(mergedProps, registered, obj[i]) + \";\";\n }\n } else {\n for (var key in obj) {\n var value = obj[key];\n\n if (typeof value !== 'object') {\n var asString = value;\n\n if (registered != null && registered[asString] !== undefined) {\n string += key + \"{\" + registered[asString] + \"}\";\n } else if (isProcessableValue(asString)) {\n string += processStyleName(key) + \":\" + processStyleValue(key, asString) + \";\";\n }\n } else {\n if (key === 'NO_COMPONENT_SELECTOR' && isDevelopment) {\n throw new Error(noComponentSelectorMessage);\n }\n\n if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {\n for (var _i = 0; _i < value.length; _i++) {\n if (isProcessableValue(value[_i])) {\n string += processStyleName(key) + \":\" + processStyleValue(key, value[_i]) + \";\";\n }\n }\n } else {\n var interpolated = handleInterpolation(mergedProps, registered, value);\n\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n string += processStyleName(key) + \":\" + interpolated + \";\";\n break;\n }\n\n default:\n {\n\n string += key + \"{\" + interpolated + \"}\";\n }\n }\n }\n }\n }\n }\n\n return string;\n}\n\nvar labelPattern = /label:\\s*([^\\s;{]+)\\s*(;|$)/g; // this is the cursor for keyframes\n// keyframes are stored on the SerializedStyles object as a linked list\n\nvar cursor;\nfunction serializeStyles(args, registered, mergedProps) {\n if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {\n return args[0];\n }\n\n var stringMode = true;\n var styles = '';\n cursor = undefined;\n var strings = args[0];\n\n if (strings == null || strings.raw === undefined) {\n stringMode = false;\n styles += handleInterpolation(mergedProps, registered, strings);\n } else {\n var asTemplateStringsArr = strings;\n\n styles += asTemplateStringsArr[0];\n } // we start at 1 since we've already handled the first arg\n\n\n for (var i = 1; i < args.length; i++) {\n styles += handleInterpolation(mergedProps, registered, args[i]);\n\n if (stringMode) {\n var templateStringsArr = strings;\n\n styles += templateStringsArr[i];\n }\n } // using a global regex with .exec is stateful so lastIndex has to be reset each time\n\n\n labelPattern.lastIndex = 0;\n var identifierName = '';\n var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5\n\n while ((match = labelPattern.exec(styles)) !== null) {\n identifierName += '-' + match[1];\n }\n\n var name = hashString(styles) + identifierName;\n\n return {\n name: name,\n styles: styles,\n next: cursor\n };\n}\n\nexport { serializeStyles };\n","import * as React from 'react';\n\nvar isBrowser = typeof document !== 'undefined';\n\nvar syncFallback = function syncFallback(create) {\n return create();\n};\n\nvar useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : false;\nvar useInsertionEffectAlwaysWithSyncFallback = !isBrowser ? syncFallback : useInsertionEffect || syncFallback;\nvar useInsertionEffectWithLayoutFallback = useInsertionEffect || React.useLayoutEffect;\n\nexport { useInsertionEffectAlwaysWithSyncFallback, useInsertionEffectWithLayoutFallback };\n","import { h as hasOwn, E as Emotion, c as createEmotionProps, w as withEmotionCache, T as ThemeContext, i as isBrowser, a as isDevelopment } from './emotion-element-d59e098f.esm.js';\nexport { C as CacheProvider, T as ThemeContext, b as ThemeProvider, _ as __unsafe_useEmotionCache, u as useTheme, w as withEmotionCache, d as withTheme } from './emotion-element-d59e098f.esm.js';\nimport * as React from 'react';\nimport { insertStyles, registerStyles, getRegisteredStyles } from '@emotion/utils';\nimport { useInsertionEffectWithLayoutFallback, useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\nimport { serializeStyles } from '@emotion/serialize';\nimport '@emotion/cache';\nimport '@babel/runtime/helpers/extends';\nimport '@emotion/weak-memoize';\nimport '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js';\nimport 'hoist-non-react-statics';\n\nvar jsx = function jsx(type, props) {\n // eslint-disable-next-line prefer-rest-params\n var args = arguments;\n\n if (props == null || !hasOwn.call(props, 'css')) {\n return React.createElement.apply(undefined, args);\n }\n\n var argsLength = args.length;\n var createElementArgArray = new Array(argsLength);\n createElementArgArray[0] = Emotion;\n createElementArgArray[1] = createEmotionProps(type, props);\n\n for (var i = 2; i < argsLength; i++) {\n createElementArgArray[i] = args[i];\n }\n\n return React.createElement.apply(null, createElementArgArray);\n};\n\n(function (_jsx) {\n var JSX;\n\n (function (_JSX) {})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));\n})(jsx || (jsx = {}));\n\n// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild\n// initial client-side render from SSR, use place of hydrating tag\n\nvar Global = /* #__PURE__ */withEmotionCache(function (props, cache) {\n\n var styles = props.styles;\n var serialized = serializeStyles([styles], undefined, React.useContext(ThemeContext));\n\n if (!isBrowser) {\n var _ref;\n\n var serializedNames = serialized.name;\n var serializedStyles = serialized.styles;\n var next = serialized.next;\n\n while (next !== undefined) {\n serializedNames += ' ' + next.name;\n serializedStyles += next.styles;\n next = next.next;\n }\n\n var shouldCache = cache.compat === true;\n var rules = cache.insert(\"\", {\n name: serializedNames,\n styles: serializedStyles\n }, cache.sheet, shouldCache);\n\n if (shouldCache) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(\"style\", (_ref = {}, _ref[\"data-emotion\"] = cache.key + \"-global \" + serializedNames, _ref.dangerouslySetInnerHTML = {\n __html: rules\n }, _ref.nonce = cache.sheet.nonce, _ref));\n } // yes, i know these hooks are used conditionally\n // but it is based on a constant that will never change at runtime\n // it's effectively like having two implementations and switching them out\n // so it's not actually breaking anything\n\n\n var sheetRef = React.useRef();\n useInsertionEffectWithLayoutFallback(function () {\n var key = cache.key + \"-global\"; // use case of https://github.com/emotion-js/emotion/issues/2675\n\n var sheet = new cache.sheet.constructor({\n key: key,\n nonce: cache.sheet.nonce,\n container: cache.sheet.container,\n speedy: cache.sheet.isSpeedy\n });\n var rehydrating = false;\n var node = document.querySelector(\"style[data-emotion=\\\"\" + key + \" \" + serialized.name + \"\\\"]\");\n\n if (cache.sheet.tags.length) {\n sheet.before = cache.sheet.tags[0];\n }\n\n if (node !== null) {\n rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other <Global/>s\n\n node.setAttribute('data-emotion', key);\n sheet.hydrate([node]);\n }\n\n sheetRef.current = [sheet, rehydrating];\n return function () {\n sheet.flush();\n };\n }, [cache]);\n useInsertionEffectWithLayoutFallback(function () {\n var sheetRefCurrent = sheetRef.current;\n var sheet = sheetRefCurrent[0],\n rehydrating = sheetRefCurrent[1];\n\n if (rehydrating) {\n sheetRefCurrent[1] = false;\n return;\n }\n\n if (serialized.next !== undefined) {\n // insert keyframes\n insertStyles(cache, serialized.next, true);\n }\n\n if (sheet.tags.length) {\n // if this doesn't exist then it will be null so the style element will be appended\n var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;\n sheet.before = element;\n sheet.flush();\n }\n\n cache.insert(\"\", serialized, sheet, false);\n }, [cache, serialized.name]);\n return null;\n});\n\nfunction css() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return serializeStyles(args);\n}\n\nfunction keyframes() {\n var insertable = css.apply(void 0, arguments);\n var name = \"animation-\" + insertable.name;\n return {\n name: name,\n styles: \"@keyframes \" + name + \"{\" + insertable.styles + \"}\",\n anim: 1,\n toString: function toString() {\n return \"_EMO_\" + this.name + \"_\" + this.styles + \"_EMO_\";\n }\n };\n}\n\nvar classnames = function classnames(args) {\n var len = args.length;\n var i = 0;\n var cls = '';\n\n for (; i < len; i++) {\n var arg = args[i];\n if (arg == null) continue;\n var toAdd = void 0;\n\n switch (typeof arg) {\n case 'boolean':\n break;\n\n case 'object':\n {\n if (Array.isArray(arg)) {\n toAdd = classnames(arg);\n } else {\n\n toAdd = '';\n\n for (var k in arg) {\n if (arg[k] && k) {\n toAdd && (toAdd += ' ');\n toAdd += k;\n }\n }\n }\n\n break;\n }\n\n default:\n {\n toAdd = arg;\n }\n }\n\n if (toAdd) {\n cls && (cls += ' ');\n cls += toAdd;\n }\n }\n\n return cls;\n};\n\nfunction merge(registered, css, className) {\n var registeredStyles = [];\n var rawClassName = getRegisteredStyles(registered, registeredStyles, className);\n\n if (registeredStyles.length < 2) {\n return className;\n }\n\n return rawClassName + css(registeredStyles);\n}\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serializedArr = _ref.serializedArr;\n var rules = useInsertionEffectAlwaysWithSyncFallback(function () {\n var rules = '';\n\n for (var i = 0; i < serializedArr.length; i++) {\n var res = insertStyles(cache, serializedArr[i], false);\n\n if (!isBrowser && res !== undefined) {\n rules += res;\n }\n }\n\n if (!isBrowser) {\n return rules;\n }\n });\n\n if (!isBrowser && rules.length !== 0) {\n var _ref2;\n\n return /*#__PURE__*/React.createElement(\"style\", (_ref2 = {}, _ref2[\"data-emotion\"] = cache.key + \" \" + serializedArr.map(function (serialized) {\n return serialized.name;\n }).join(' '), _ref2.dangerouslySetInnerHTML = {\n __html: rules\n }, _ref2.nonce = cache.sheet.nonce, _ref2));\n }\n\n return null;\n};\n\nvar ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {\n var hasRendered = false;\n var serializedArr = [];\n\n var css = function css() {\n if (hasRendered && isDevelopment) {\n throw new Error('css can only be used during render');\n }\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var serialized = serializeStyles(args, cache.registered);\n serializedArr.push(serialized); // registration has to happen here as the result of this might get consumed by `cx`\n\n registerStyles(cache, serialized, false);\n return cache.key + \"-\" + serialized.name;\n };\n\n var cx = function cx() {\n if (hasRendered && isDevelopment) {\n throw new Error('cx can only be used during render');\n }\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return merge(cache.registered, css, classnames(args));\n };\n\n var content = {\n css: css,\n cx: cx,\n theme: React.useContext(ThemeContext)\n };\n var ele = props.children(content);\n hasRendered = true;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serializedArr: serializedArr\n }), ele);\n});\n\nexport { ClassNames, Global, jsx as createElement, css, jsx, keyframes };\n","import createCache from '@emotion/cache';\nimport { serializeStyles } from '@emotion/serialize';\nimport { getRegisteredStyles, insertStyles } from '@emotion/utils';\n\nfunction insertWithoutScoping(cache, serialized) {\n if (cache.inserted[serialized.name] === undefined) {\n return cache.insert('', serialized, cache.sheet, true);\n }\n}\n\nfunction merge(registered, css, className) {\n var registeredStyles = [];\n var rawClassName = getRegisteredStyles(registered, registeredStyles, className);\n\n if (registeredStyles.length < 2) {\n return className;\n }\n\n return rawClassName + css(registeredStyles);\n}\n\nvar createEmotion = function createEmotion(options) {\n var cache = createCache(options);\n\n cache.sheet.speedy = function (value) {\n\n this.isSpeedy = value;\n };\n\n cache.compat = true;\n\n var css = function css() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var serialized = serializeStyles(args, cache.registered, undefined);\n insertStyles(cache, serialized, false);\n return cache.key + \"-\" + serialized.name;\n };\n\n var keyframes = function keyframes() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n var serialized = serializeStyles(args, cache.registered);\n var animation = \"animation-\" + serialized.name;\n insertWithoutScoping(cache, {\n name: serialized.name,\n styles: \"@keyframes \" + animation + \"{\" + serialized.styles + \"}\"\n });\n return animation;\n };\n\n var injectGlobal = function injectGlobal() {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n var serialized = serializeStyles(args, cache.registered);\n insertWithoutScoping(cache, serialized);\n };\n\n var cx = function cx() {\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n\n return merge(cache.registered, css, classnames(args));\n };\n\n return {\n css: css,\n cx: cx,\n injectGlobal: injectGlobal,\n keyframes: keyframes,\n hydrate: function hydrate(ids) {\n ids.forEach(function (key) {\n cache.inserted[key] = true;\n });\n },\n flush: function flush() {\n cache.registered = {};\n cache.inserted = {};\n cache.sheet.flush();\n },\n sheet: cache.sheet,\n cache: cache,\n getRegisteredStyles: getRegisteredStyles.bind(null, cache.registered),\n merge: merge.bind(null, cache.registered, css)\n };\n};\n\nvar classnames = function classnames(args) {\n var cls = '';\n\n for (var i = 0; i < args.length; i++) {\n var arg = args[i];\n if (arg == null) continue;\n var toAdd = void 0;\n\n switch (typeof arg) {\n case 'boolean':\n break;\n\n case 'object':\n {\n if (Array.isArray(arg)) {\n toAdd = classnames(arg);\n } else {\n toAdd = '';\n\n for (var k in arg) {\n if (arg[k] && k) {\n toAdd && (toAdd += ' ');\n toAdd += k;\n }\n }\n }\n\n break;\n }\n\n default:\n {\n toAdd = arg;\n }\n }\n\n if (toAdd) {\n cls && (cls += ' ');\n cls += toAdd;\n }\n }\n\n return cls;\n};\n\nexport { createEmotion as default };\n","import createEmotion from '../create-instance/dist/emotion-css-create-instance.esm.js';\nimport '@emotion/cache';\nimport '@emotion/serialize';\nimport '@emotion/utils';\n\nvar _createEmotion = createEmotion({\n key: 'css'\n}),\n flush = _createEmotion.flush,\n hydrate = _createEmotion.hydrate,\n cx = _createEmotion.cx,\n merge = _createEmotion.merge,\n getRegisteredStyles = _createEmotion.getRegisteredStyles,\n injectGlobal = _createEmotion.injectGlobal,\n keyframes = _createEmotion.keyframes,\n css = _createEmotion.css,\n sheet = _createEmotion.sheet,\n cache = _createEmotion.cache;\n\nexport { cache, css, cx, flush, getRegisteredStyles, hydrate, injectGlobal, keyframes, merge, sheet };\n","/**\n * External dependencies\n */\nimport { __unsafe_useEmotionCache as useEmotionCache } from '@emotion/react';\nimport { insertStyles } from '@emotion/utils';\n// eslint-disable-next-line no-restricted-imports\nimport { cx as innerCx } from '@emotion/css';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback } from '@wordpress/element';\nconst isSerializedStyles = o => typeof o !== 'undefined' && o !== null && ['name', 'styles'].every(p => typeof o[p] !== 'undefined');\n\n/**\n * Retrieve a `cx` function that knows how to handle `SerializedStyles`\n * returned by the `@emotion/react` `css` function in addition to what\n * `cx` normally knows how to handle. It also hooks into the Emotion\n * Cache, allowing `css` calls to work inside iframes.\n *\n * ```jsx\n * import { css } from '@emotion/react';\n *\n * const styles = css`\n * \tcolor: red\n * `;\n *\n * function RedText( { className, ...props } ) {\n * \tconst cx = useCx();\n *\n * \tconst classes = cx(styles, className);\n *\n * \treturn <span className={classes} {...props} />;\n * }\n * ```\n */\nexport const useCx = () => {\n const cache = useEmotionCache();\n const cx = useCallback((...classNames) => {\n if (cache === null) {\n throw new Error('The `useCx` hook should be only used within a valid Emotion Cache Context');\n }\n return innerCx(...classNames.map(arg => {\n if (isSerializedStyles(arg)) {\n insertStyles(cache, arg, false);\n return `${cache.key}-${arg.name}`;\n }\n return arg;\n }));\n }, [cache]);\n return cx;\n};","/**\n * Memize options object.\n *\n * @typedef MemizeOptions\n *\n * @property {number} [maxSize] Maximum size of the cache.\n */\n\n/**\n * Internal cache entry.\n *\n * @typedef MemizeCacheNode\n *\n * @property {?MemizeCacheNode|undefined} [prev] Previous node.\n * @property {?MemizeCacheNode|undefined} [next] Next node.\n * @property {Array<*>} args Function arguments for cache\n * entry.\n * @property {*} val Function result.\n */\n\n/**\n * Properties of the enhanced function for controlling cache.\n *\n * @typedef MemizeMemoizedFunction\n *\n * @property {()=>void} clear Clear the cache.\n */\n\n/**\n * Accepts a function to be memoized, and returns a new memoized function, with\n * optional options.\n *\n * @template {(...args: any[]) => any} F\n *\n * @param {F} fn Function to memoize.\n * @param {MemizeOptions} [options] Options object.\n *\n * @return {((...args: Parameters<F>) => ReturnType<F>) & MemizeMemoizedFunction} Memoized function.\n */\nfunction memize(fn, options) {\n\tvar size = 0;\n\n\t/** @type {?MemizeCacheNode|undefined} */\n\tvar head;\n\n\t/** @type {?MemizeCacheNode|undefined} */\n\tvar tail;\n\n\toptions = options || {};\n\n\tfunction memoized(/* ...args */) {\n\t\tvar node = head,\n\t\t\tlen = arguments.length,\n\t\t\targs,\n\t\t\ti;\n\n\t\tsearchCache: while (node) {\n\t\t\t// Perform a shallow equality test to confirm that whether the node\n\t\t\t// under test is a candidate for the arguments passed. Two arrays\n\t\t\t// are shallowly equal if their length matches and each entry is\n\t\t\t// strictly equal between the two sets. Avoid abstracting to a\n\t\t\t// function which could incur an arguments leaking deoptimization.\n\n\t\t\t// Check whether node arguments match arguments length\n\t\t\tif (node.args.length !== arguments.length) {\n\t\t\t\tnode = node.next;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Check whether node arguments match arguments values\n\t\t\tfor (i = 0; i < len; i++) {\n\t\t\t\tif (node.args[i] !== arguments[i]) {\n\t\t\t\t\tnode = node.next;\n\t\t\t\t\tcontinue searchCache;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// At this point we can assume we've found a match\n\n\t\t\t// Surface matched node to head if not already\n\t\t\tif (node !== head) {\n\t\t\t\t// As tail, shift to previous. Must only shift if not also\n\t\t\t\t// head, since if both head and tail, there is no previous.\n\t\t\t\tif (node === tail) {\n\t\t\t\t\ttail = node.prev;\n\t\t\t\t}\n\n\t\t\t\t// Adjust siblings to point to each other. If node was tail,\n\t\t\t\t// this also handles new tail's empty `next` assignment.\n\t\t\t\t/** @type {MemizeCacheNode} */ (node.prev).next = node.next;\n\t\t\t\tif (node.next) {\n\t\t\t\t\tnode.next.prev = node.prev;\n\t\t\t\t}\n\n\t\t\t\tnode.next = head;\n\t\t\t\tnode.prev = null;\n\t\t\t\t/** @type {MemizeCacheNode} */ (head).prev = node;\n\t\t\t\thead = node;\n\t\t\t}\n\n\t\t\t// Return immediately\n\t\t\treturn node.val;\n\t\t}\n\n\t\t// No cached value found. Continue to insertion phase:\n\n\t\t// Create a copy of arguments (avoid leaking deoptimization)\n\t\targs = new Array(len);\n\t\tfor (i = 0; i < len; i++) {\n\t\t\targs[i] = arguments[i];\n\t\t}\n\n\t\tnode = {\n\t\t\targs: args,\n\n\t\t\t// Generate the result from original function\n\t\t\tval: fn.apply(null, args),\n\t\t};\n\n\t\t// Don't need to check whether node is already head, since it would\n\t\t// have been returned above already if it was\n\n\t\t// Shift existing head down list\n\t\tif (head) {\n\t\t\thead.prev = node;\n\t\t\tnode.next = head;\n\t\t} else {\n\t\t\t// If no head, follows that there's no tail (at initial or reset)\n\t\t\ttail = node;\n\t\t}\n\n\t\t// Trim tail if we're reached max size and are pending cache insertion\n\t\tif (size === /** @type {MemizeOptions} */ (options).maxSize) {\n\t\t\ttail = /** @type {MemizeCacheNode} */ (tail).prev;\n\t\t\t/** @type {MemizeCacheNode} */ (tail).next = null;\n\t\t} else {\n\t\t\tsize++;\n\t\t}\n\n\t\thead = node;\n\n\t\treturn node.val;\n\t}\n\n\tmemoized.clear = function () {\n\t\thead = null;\n\t\ttail = null;\n\t\tsize = 0;\n\t};\n\n\t// Ignore reason: There's not a clear solution to create an intersection of\n\t// the function with additional properties, where the goal is to retain the\n\t// function signature of the incoming argument and add control properties\n\t// on the return value.\n\n\t// @ts-ignore\n\treturn memoized;\n}\n\nexport { memize as default };\n","var r={grad:.9,turn:360,rad:360/(2*Math.PI)},t=function(r){return\"string\"==typeof r?r.length>0:\"number\"==typeof r},n=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*r)/n+0},e=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),r>n?n:r>t?r:t},u=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},a=function(r){return{r:e(r.r,0,255),g:e(r.g,0,255),b:e(r.b,0,255),a:e(r.a)}},o=function(r){return{r:n(r.r),g:n(r.g),b:n(r.b),a:n(r.a,3)}},i=/^#([0-9a-f]{3,8})$/i,s=function(r){var t=r.toString(16);return t.length<2?\"0\"+t:t},h=function(r){var t=r.r,n=r.g,e=r.b,u=r.a,a=Math.max(t,n,e),o=a-Math.min(t,n,e),i=o?a===t?(n-e)/o:a===n?2+(e-t)/o:4+(t-n)/o:0;return{h:60*(i<0?i+6:i),s:a?o/a*100:0,v:a/255*100,a:u}},b=function(r){var t=r.h,n=r.s,e=r.v,u=r.a;t=t/360*6,n/=100,e/=100;var a=Math.floor(t),o=e*(1-n),i=e*(1-(t-a)*n),s=e*(1-(1-t+a)*n),h=a%6;return{r:255*[e,i,o,o,s,e][h],g:255*[s,e,e,i,o,o][h],b:255*[o,o,s,e,e,i][h],a:u}},g=function(r){return{h:u(r.h),s:e(r.s,0,100),l:e(r.l,0,100),a:e(r.a)}},d=function(r){return{h:n(r.h),s:n(r.s),l:n(r.l),a:n(r.a,3)}},f=function(r){return b((n=(t=r).s,{h:t.h,s:(n*=((e=t.l)<50?e:100-e)/100)>0?2*n/(e+n)*100:0,v:e+n,a:t.a}));var t,n,e},c=function(r){return{h:(t=h(r)).h,s:(u=(200-(n=t.s))*(e=t.v)/100)>0&&u<200?n*e/100/(u<=100?u:200-u)*100:0,l:u/2,a:t.a};var t,n,e,u},l=/^hsla?\\(\\s*([+-]?\\d*\\.?\\d+)(deg|rad|grad|turn)?\\s*,\\s*([+-]?\\d*\\.?\\d+)%\\s*,\\s*([+-]?\\d*\\.?\\d+)%\\s*(?:,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,p=/^hsla?\\(\\s*([+-]?\\d*\\.?\\d+)(deg|rad|grad|turn)?\\s+([+-]?\\d*\\.?\\d+)%\\s+([+-]?\\d*\\.?\\d+)%\\s*(?:\\/\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,v=/^rgba?\\(\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*(?:,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,m=/^rgba?\\(\\s*([+-]?\\d*\\.?\\d+)(%)?\\s+([+-]?\\d*\\.?\\d+)(%)?\\s+([+-]?\\d*\\.?\\d+)(%)?\\s*(?:\\/\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,y={string:[[function(r){var t=i.exec(r);return t?(r=t[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:4===r.length?n(parseInt(r[3]+r[3],16)/255,2):1}:6===r.length||8===r.length?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:8===r.length?n(parseInt(r.substr(6,2),16)/255,2):1}:null:null},\"hex\"],[function(r){var t=v.exec(r)||m.exec(r);return t?t[2]!==t[4]||t[4]!==t[6]?null:a({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},\"rgb\"],[function(t){var n=l.exec(t)||p.exec(t);if(!n)return null;var e,u,a=g({h:(e=n[1],u=n[2],void 0===u&&(u=\"deg\"),Number(e)*(r[u]||1)),s:Number(n[3]),l:Number(n[4]),a:void 0===n[5]?1:Number(n[5])/(n[6]?100:1)});return f(a)},\"hsl\"]],object:[[function(r){var n=r.r,e=r.g,u=r.b,o=r.a,i=void 0===o?1:o;return t(n)&&t(e)&&t(u)?a({r:Number(n),g:Number(e),b:Number(u),a:Number(i)}):null},\"rgb\"],[function(r){var n=r.h,e=r.s,u=r.l,a=r.a,o=void 0===a?1:a;if(!t(n)||!t(e)||!t(u))return null;var i=g({h:Number(n),s:Number(e),l:Number(u),a:Number(o)});return f(i)},\"hsl\"],[function(r){var n=r.h,a=r.s,o=r.v,i=r.a,s=void 0===i?1:i;if(!t(n)||!t(a)||!t(o))return null;var h=function(r){return{h:u(r.h),s:e(r.s,0,100),v:e(r.v,0,100),a:e(r.a)}}({h:Number(n),s:Number(a),v:Number(o),a:Number(s)});return b(h)},\"hsv\"]]},N=function(r,t){for(var n=0;n<t.length;n++){var e=t[n][0](r);if(e)return[e,t[n][1]]}return[null,void 0]},x=function(r){return\"string\"==typeof r?N(r.trim(),y.string):\"object\"==typeof r&&null!==r?N(r,y.object):[null,void 0]},I=function(r){return x(r)[1]},M=function(r,t){var n=c(r);return{h:n.h,s:e(n.s+100*t,0,100),l:n.l,a:n.a}},H=function(r){return(299*r.r+587*r.g+114*r.b)/1e3/255},$=function(r,t){var n=c(r);return{h:n.h,s:n.s,l:e(n.l+100*t,0,100),a:n.a}},j=function(){function r(r){this.parsed=x(r)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return r.prototype.isValid=function(){return null!==this.parsed},r.prototype.brightness=function(){return n(H(this.rgba),2)},r.prototype.isDark=function(){return H(this.rgba)<.5},r.prototype.isLight=function(){return H(this.rgba)>=.5},r.prototype.toHex=function(){return r=o(this.rgba),t=r.r,e=r.g,u=r.b,i=(a=r.a)<1?s(n(255*a)):\"\",\"#\"+s(t)+s(e)+s(u)+i;var r,t,e,u,a,i},r.prototype.toRgb=function(){return o(this.rgba)},r.prototype.toRgbString=function(){return r=o(this.rgba),t=r.r,n=r.g,e=r.b,(u=r.a)<1?\"rgba(\"+t+\", \"+n+\", \"+e+\", \"+u+\")\":\"rgb(\"+t+\", \"+n+\", \"+e+\")\";var r,t,n,e,u},r.prototype.toHsl=function(){return d(c(this.rgba))},r.prototype.toHslString=function(){return r=d(c(this.rgba)),t=r.h,n=r.s,e=r.l,(u=r.a)<1?\"hsla(\"+t+\", \"+n+\"%, \"+e+\"%, \"+u+\")\":\"hsl(\"+t+\", \"+n+\"%, \"+e+\"%)\";var r,t,n,e,u},r.prototype.toHsv=function(){return r=h(this.rgba),{h:n(r.h),s:n(r.s),v:n(r.v),a:n(r.a,3)};var r},r.prototype.invert=function(){return w({r:255-(r=this.rgba).r,g:255-r.g,b:255-r.b,a:r.a});var r},r.prototype.saturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,r))},r.prototype.desaturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,-r))},r.prototype.grayscale=function(){return w(M(this.rgba,-1))},r.prototype.lighten=function(r){return void 0===r&&(r=.1),w($(this.rgba,r))},r.prototype.darken=function(r){return void 0===r&&(r=.1),w($(this.rgba,-r))},r.prototype.rotate=function(r){return void 0===r&&(r=15),this.hue(this.hue()+r)},r.prototype.alpha=function(r){return\"number\"==typeof r?w({r:(t=this.rgba).r,g:t.g,b:t.b,a:r}):n(this.rgba.a,3);var t},r.prototype.hue=function(r){var t=c(this.rgba);return\"number\"==typeof r?w({h:r,s:t.s,l:t.l,a:t.a}):n(t.h)},r.prototype.isEqual=function(r){return this.toHex()===w(r).toHex()},r}(),w=function(r){return r instanceof j?r:new j(r)},S=[],k=function(r){r.forEach(function(r){S.indexOf(r)<0&&(r(j,y),S.push(r))})},E=function(){return new j({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})};export{j as Colord,w as colord,k as extend,I as getFormat,E as random};\n","export default function(e,f){var a={white:\"#ffffff\",bisque:\"#ffe4c4\",blue:\"#0000ff\",cadetblue:\"#5f9ea0\",chartreuse:\"#7fff00\",chocolate:\"#d2691e\",coral:\"#ff7f50\",antiquewhite:\"#faebd7\",aqua:\"#00ffff\",azure:\"#f0ffff\",whitesmoke:\"#f5f5f5\",papayawhip:\"#ffefd5\",plum:\"#dda0dd\",blanchedalmond:\"#ffebcd\",black:\"#000000\",gold:\"#ffd700\",goldenrod:\"#daa520\",gainsboro:\"#dcdcdc\",cornsilk:\"#fff8dc\",cornflowerblue:\"#6495ed\",burlywood:\"#deb887\",aquamarine:\"#7fffd4\",beige:\"#f5f5dc\",crimson:\"#dc143c\",cyan:\"#00ffff\",darkblue:\"#00008b\",darkcyan:\"#008b8b\",darkgoldenrod:\"#b8860b\",darkkhaki:\"#bdb76b\",darkgray:\"#a9a9a9\",darkgreen:\"#006400\",darkgrey:\"#a9a9a9\",peachpuff:\"#ffdab9\",darkmagenta:\"#8b008b\",darkred:\"#8b0000\",darkorchid:\"#9932cc\",darkorange:\"#ff8c00\",darkslateblue:\"#483d8b\",gray:\"#808080\",darkslategray:\"#2f4f4f\",darkslategrey:\"#2f4f4f\",deeppink:\"#ff1493\",deepskyblue:\"#00bfff\",wheat:\"#f5deb3\",firebrick:\"#b22222\",floralwhite:\"#fffaf0\",ghostwhite:\"#f8f8ff\",darkviolet:\"#9400d3\",magenta:\"#ff00ff\",green:\"#008000\",dodgerblue:\"#1e90ff\",grey:\"#808080\",honeydew:\"#f0fff0\",hotpink:\"#ff69b4\",blueviolet:\"#8a2be2\",forestgreen:\"#228b22\",lawngreen:\"#7cfc00\",indianred:\"#cd5c5c\",indigo:\"#4b0082\",fuchsia:\"#ff00ff\",brown:\"#a52a2a\",maroon:\"#800000\",mediumblue:\"#0000cd\",lightcoral:\"#f08080\",darkturquoise:\"#00ced1\",lightcyan:\"#e0ffff\",ivory:\"#fffff0\",lightyellow:\"#ffffe0\",lightsalmon:\"#ffa07a\",lightseagreen:\"#20b2aa\",linen:\"#faf0e6\",mediumaquamarine:\"#66cdaa\",lemonchiffon:\"#fffacd\",lime:\"#00ff00\",khaki:\"#f0e68c\",mediumseagreen:\"#3cb371\",limegreen:\"#32cd32\",mediumspringgreen:\"#00fa9a\",lightskyblue:\"#87cefa\",lightblue:\"#add8e6\",midnightblue:\"#191970\",lightpink:\"#ffb6c1\",mistyrose:\"#ffe4e1\",moccasin:\"#ffe4b5\",mintcream:\"#f5fffa\",lightslategray:\"#778899\",lightslategrey:\"#778899\",navajowhite:\"#ffdead\",navy:\"#000080\",mediumvioletred:\"#c71585\",powderblue:\"#b0e0e6\",palegoldenrod:\"#eee8aa\",oldlace:\"#fdf5e6\",paleturquoise:\"#afeeee\",mediumturquoise:\"#48d1cc\",mediumorchid:\"#ba55d3\",rebeccapurple:\"#663399\",lightsteelblue:\"#b0c4de\",mediumslateblue:\"#7b68ee\",thistle:\"#d8bfd8\",tan:\"#d2b48c\",orchid:\"#da70d6\",mediumpurple:\"#9370db\",purple:\"#800080\",pink:\"#ffc0cb\",skyblue:\"#87ceeb\",springgreen:\"#00ff7f\",palegreen:\"#98fb98\",red:\"#ff0000\",yellow:\"#ffff00\",slateblue:\"#6a5acd\",lavenderblush:\"#fff0f5\",peru:\"#cd853f\",palevioletred:\"#db7093\",violet:\"#ee82ee\",teal:\"#008080\",slategray:\"#708090\",slategrey:\"#708090\",aliceblue:\"#f0f8ff\",darkseagreen:\"#8fbc8f\",darkolivegreen:\"#556b2f\",greenyellow:\"#adff2f\",seagreen:\"#2e8b57\",seashell:\"#fff5ee\",tomato:\"#ff6347\",silver:\"#c0c0c0\",sienna:\"#a0522d\",lavender:\"#e6e6fa\",lightgreen:\"#90ee90\",orange:\"#ffa500\",orangered:\"#ff4500\",steelblue:\"#4682b4\",royalblue:\"#4169e1\",turquoise:\"#40e0d0\",yellowgreen:\"#9acd32\",salmon:\"#fa8072\",saddlebrown:\"#8b4513\",sandybrown:\"#f4a460\",rosybrown:\"#bc8f8f\",darksalmon:\"#e9967a\",lightgoldenrodyellow:\"#fafad2\",snow:\"#fffafa\",lightgrey:\"#d3d3d3\",lightgray:\"#d3d3d3\",dimgray:\"#696969\",dimgrey:\"#696969\",olivedrab:\"#6b8e23\",olive:\"#808000\"},r={};for(var d in a)r[a[d]]=d;var l={};e.prototype.toName=function(f){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return\"transparent\";var d,i,n=r[this.toHex()];if(n)return n;if(null==f?void 0:f.closest){var o=this.toRgb(),t=1/0,b=\"black\";if(!l.length)for(var c in a)l[c]=new e(a[c]).toRgb();for(var g in a){var u=(d=o,i=l[g],Math.pow(d.r-i.r,2)+Math.pow(d.g-i.g,2)+Math.pow(d.b-i.b,2));u<t&&(t=u,b=g)}return b}};f.string.push([function(f){var r=f.toLowerCase(),d=\"transparent\"===r?\"#0000\":a[r];return d?new e(d).toRgb():null},\"name\"])}\n","/**\n * External dependencies\n */\nimport memoize from 'memize';\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\n\n/** @type {HTMLDivElement} */\nlet colorComputationNode;\nextend([namesPlugin]);\n\n/**\n * Generating a CSS compliant rgba() color value.\n *\n * @param {string} hexValue The hex value to convert to rgba().\n * @param {number} alpha The alpha value for opacity.\n * @return {string} The converted rgba() color value.\n *\n * @example\n * rgba( '#000000', 0.5 )\n * // rgba(0, 0, 0, 0.5)\n */\nexport function rgba(hexValue = '', alpha = 1) {\n return colord(hexValue).alpha(alpha).toRgbString();\n}\n\n/**\n * @return {HTMLDivElement | undefined} The HTML element for color computation.\n */\nfunction getColorComputationNode() {\n if (typeof document === 'undefined') {\n return;\n }\n if (!colorComputationNode) {\n // Create a temporary element for style computation.\n const el = document.createElement('div');\n el.setAttribute('data-g2-color-computation-node', '');\n // Inject for window computed style.\n document.body.appendChild(el);\n colorComputationNode = el;\n }\n return colorComputationNode;\n}\n\n/**\n * @param {string | unknown} value\n *\n * @return {boolean} Whether the value is a valid color.\n */\nfunction isColor(value) {\n if (typeof value !== 'string') {\n return false;\n }\n const test = colord(value);\n return test.isValid();\n}\n\n/**\n * Retrieves the computed background color. This is useful for getting the\n * value of a CSS variable color.\n *\n * @param {string | unknown} backgroundColor The background color to compute.\n *\n * @return {string} The computed background color.\n */\nfunction _getComputedBackgroundColor(backgroundColor) {\n if (typeof backgroundColor !== 'string') {\n return '';\n }\n if (isColor(backgroundColor)) {\n return backgroundColor;\n }\n if (!backgroundColor.includes('var(')) {\n return '';\n }\n if (typeof document === 'undefined') {\n return '';\n }\n\n // Attempts to gracefully handle CSS variables color values.\n const el = getColorComputationNode();\n if (!el) {\n return '';\n }\n el.style.background = backgroundColor;\n // Grab the style.\n const computedColor = window?.getComputedStyle(el).background;\n // Reset.\n el.style.background = '';\n return computedColor || '';\n}\nconst getComputedBackgroundColor = memoize(_getComputedBackgroundColor);\n\n/**\n * Get the text shade optimized for readability, based on a background color.\n *\n * @param {string | unknown} backgroundColor The background color.\n *\n * @return {string} The optimized text color (black or white).\n */\nexport function getOptimalTextColor(backgroundColor) {\n const background = getComputedBackgroundColor(backgroundColor);\n return colord(background).isLight() ? '#000000' : '#ffffff';\n}\n\n/**\n * Get the text shade optimized for readability, based on a background color.\n *\n * @param {string | unknown} backgroundColor The background color.\n *\n * @return {string} The optimized text shade (dark or light).\n */\nexport function getOptimalTextShade(backgroundColor) {\n const result = getOptimalTextColor(backgroundColor);\n return result === '#000000' ? 'dark' : 'light';\n}","/**\n * Internal dependencies\n */\nconst white = '#fff';\n\n// Matches the grays in @wordpress/base-styles\nconst GRAY = {\n 900: '#1e1e1e',\n 800: '#2f2f2f',\n /** Meets 4.6:1 text contrast against white. */\n 700: '#757575',\n /** Meets 3:1 UI or large text contrast against white. */\n 600: '#949494',\n 400: '#ccc',\n /** Used for most borders. */\n 300: '#ddd',\n /** Used sparingly for light borders. */\n 200: '#e0e0e0',\n /** Used for light gray backgrounds. */\n 100: '#f0f0f0'\n};\n\n// Matches @wordpress/base-styles\nconst ALERT = {\n yellow: '#f0b849',\n red: '#d94f4f',\n green: '#4ab866'\n};\n\n// Should match packages/components/src/utils/theme-variables.scss\nconst THEME = {\n accent: `var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9))`,\n accentDarker10: `var(--wp-components-color-accent-darker-10, var(--wp-admin-theme-color-darker-10, #2145e6))`,\n accentDarker20: `var(--wp-components-color-accent-darker-20, var(--wp-admin-theme-color-darker-20, #183ad6))`,\n /** Used when placing text on the accent color. */\n accentInverted: `var(--wp-components-color-accent-inverted, ${white})`,\n background: `var(--wp-components-color-background, ${white})`,\n foreground: `var(--wp-components-color-foreground, ${GRAY[900]})`,\n /** Used when placing text on the foreground color. */\n foregroundInverted: `var(--wp-components-color-foreground-inverted, ${white})`,\n gray: {\n /** @deprecated Use `COLORS.theme.foreground` instead. */\n 900: `var(--wp-components-color-foreground, ${GRAY[900]})`,\n 800: `var(--wp-components-color-gray-800, ${GRAY[800]})`,\n 700: `var(--wp-components-color-gray-700, ${GRAY[700]})`,\n 600: `var(--wp-components-color-gray-600, ${GRAY[600]})`,\n 400: `var(--wp-components-color-gray-400, ${GRAY[400]})`,\n 300: `var(--wp-components-color-gray-300, ${GRAY[300]})`,\n 200: `var(--wp-components-color-gray-200, ${GRAY[200]})`,\n 100: `var(--wp-components-color-gray-100, ${GRAY[100]})`\n }\n};\nconst UI = {\n background: THEME.background,\n backgroundDisabled: THEME.gray[100],\n border: THEME.gray[600],\n borderHover: THEME.gray[700],\n borderFocus: THEME.accent,\n borderDisabled: THEME.gray[400],\n textDisabled: THEME.gray[600],\n // Matches @wordpress/base-styles\n darkGrayPlaceholder: `color-mix(in srgb, ${THEME.foreground}, transparent 38%)`,\n lightGrayPlaceholder: `color-mix(in srgb, ${THEME.background}, transparent 35%)`\n};\nexport const COLORS = Object.freeze({\n /**\n * The main gray color object.\n *\n * @deprecated Use semantic aliases in `COLORS.ui` or theme-ready variables in `COLORS.theme.gray`.\n */\n gray: GRAY,\n // TODO: Stop exporting this when everything is migrated to `theme` or `ui`\n /**\n * @deprecated Prefer theme-ready variables in `COLORS.theme`.\n */\n white,\n alert: ALERT,\n /**\n * Theme-ready variables with fallbacks.\n *\n * Prefer semantic aliases in `COLORS.ui` when applicable.\n */\n theme: THEME,\n /**\n * Semantic aliases (prefer these over raw variables when applicable).\n */\n ui: UI\n});\nexport default COLORS;","/**\n * Internal dependencies\n */\nimport { COLORS } from './colors-values';\nconst CONTROL_HEIGHT = '36px';\nconst CONTROL_PROPS = {\n // These values should be shared with TextControl.\n controlPaddingX: 12,\n controlPaddingXSmall: 8,\n controlPaddingXLarge: 12 * 1.3334,\n // TODO: Deprecate\n\n controlBoxShadowFocus: `0 0 0 0.5px ${COLORS.theme.accent}`,\n controlHeight: CONTROL_HEIGHT,\n controlHeightXSmall: `calc( ${CONTROL_HEIGHT} * 0.6 )`,\n controlHeightSmall: `calc( ${CONTROL_HEIGHT} * 0.8 )`,\n controlHeightLarge: `calc( ${CONTROL_HEIGHT} * 1.2 )`,\n controlHeightXLarge: `calc( ${CONTROL_HEIGHT} * 1.4 )`\n};\n\n// Using Object.assign to avoid creating circular references when emitting\n// TypeScript type declarations.\nexport default Object.assign({}, CONTROL_PROPS, {\n colorDivider: 'rgba(0, 0, 0, 0.1)',\n colorScrollbarThumb: 'rgba(0, 0, 0, 0.2)',\n colorScrollbarThumbHover: 'rgba(0, 0, 0, 0.5)',\n colorScrollbarTrack: 'rgba(0, 0, 0, 0.04)',\n elevationIntensity: 1,\n radiusXSmall: '1px',\n radiusSmall: '2px',\n radiusMedium: '4px',\n radiusLarge: '8px',\n radiusFull: '9999px',\n radiusRound: '50%',\n borderWidth: '1px',\n borderWidthFocus: '1.5px',\n borderWidthTab: '4px',\n spinnerSize: 16,\n fontSize: '13px',\n fontSizeH1: 'calc(2.44 * 13px)',\n fontSizeH2: 'calc(1.95 * 13px)',\n fontSizeH3: 'calc(1.56 * 13px)',\n fontSizeH4: 'calc(1.25 * 13px)',\n fontSizeH5: '13px',\n fontSizeH6: 'calc(0.8 * 13px)',\n fontSizeInputMobile: '16px',\n fontSizeMobile: '15px',\n fontSizeSmall: 'calc(0.92 * 13px)',\n fontSizeXSmall: 'calc(0.75 * 13px)',\n fontLineHeightBase: '1.4',\n fontWeight: 'normal',\n fontWeightMedium: '499',\n // ensures fallback to 400 (instead of 600)\n fontWeightHeading: '600',\n gridBase: '4px',\n elevationXSmall: `0 1px 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02), 0 3px 3px rgba(0, 0, 0, 0.02), 0 4px 4px rgba(0, 0, 0, 0.01)`,\n elevationSmall: `0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 3px rgba(0, 0, 0, 0.04), 0 6px 6px rgba(0, 0, 0, 0.03), 0 8px 8px rgba(0, 0, 0, 0.02)`,\n elevationMedium: `0 2px 3px rgba(0, 0, 0, 0.05), 0 4px 5px rgba(0, 0, 0, 0.04), 0 12px 12px rgba(0, 0, 0, 0.03), 0 16px 16px rgba(0, 0, 0, 0.02)`,\n elevationLarge: `0 5px 15px rgba(0, 0, 0, 0.08), 0 15px 27px rgba(0, 0, 0, 0.07), 0 30px 36px rgba(0, 0, 0, 0.04), 0 50px 43px rgba(0, 0, 0, 0.02)`,\n surfaceBackgroundColor: COLORS.white,\n surfaceBackgroundSubtleColor: '#F3F3F3',\n surfaceBackgroundTintColor: '#F5F5F5',\n surfaceBorderColor: 'rgba(0, 0, 0, 0.1)',\n surfaceBorderBoldColor: 'rgba(0, 0, 0, 0.15)',\n surfaceBorderSubtleColor: 'rgba(0, 0, 0, 0.05)',\n surfaceBackgroundTertiaryColor: COLORS.white,\n surfaceColor: COLORS.white,\n transitionDuration: '200ms',\n transitionDurationFast: '160ms',\n transitionDurationFaster: '120ms',\n transitionDurationFastest: '100ms',\n transitionTimingFunction: 'cubic-bezier(0.08, 0.52, 0.52, 1)',\n transitionTimingFunctionControl: 'cubic-bezier(0.12, 0.8, 0.32, 1)'\n});","/**\n * External dependencies\n */\nimport deepmerge from 'deepmerge';\nimport fastDeepEqual from 'fast-deep-equal/es6/index.js';\n// @ts-expect-error https://github.com/jonschlinkert/is-plain-object/pull/47\nimport { isPlainObject } from 'is-plain-object';\n\n/**\n * WordPress dependencies\n */\nimport { createContext, useContext, useRef, useMemo, memo } from '@wordpress/element';\nimport warn from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport { useUpdateEffect } from '../utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const ComponentsContext = createContext(/** @type {Record<string, any>} */{});\nComponentsContext.displayName = 'ComponentsContext';\nexport const useComponentsContext = () => useContext(ComponentsContext);\n\n/**\n * Consolidates incoming ContextSystem values with a (potential) parent ContextSystem value.\n *\n * Note: This function will warn if it detects an un-memoized `value`\n *\n * @param {Object} props\n * @param {Record<string, any>} props.value\n * @return {Record<string, any>} The consolidated value.\n */\nfunction useContextSystemBridge({\n value\n}) {\n const parentContext = useComponentsContext();\n const valueRef = useRef(value);\n useUpdateEffect(() => {\n if (\n // Objects are equivalent.\n fastDeepEqual(valueRef.current, value) &&\n // But not the same reference.\n valueRef.current !== value) {\n globalThis.SCRIPT_DEBUG === true ? warn(`Please memoize your context: ${JSON.stringify(value)}`) : void 0;\n }\n }, [value]);\n\n // `parentContext` will always be memoized (i.e., the result of this hook itself)\n // or the default value from when the `ComponentsContext` was originally\n // initialized (which will never change, it's a static variable)\n // so this memoization will prevent `deepmerge()` from rerunning unless\n // the references to `value` change OR the `parentContext` has an actual material change\n // (because again, it's guaranteed to be memoized or a static reference to the empty object\n // so we know that the only changes for `parentContext` are material ones... i.e., why we\n // don't have to warn in the `useUpdateEffect` hook above for `parentContext` and we only\n // need to bother with the `value`). The `useUpdateEffect` above will ensure that we are\n // correctly warning when the `value` isn't being properly memoized. All of that to say\n // that this should be super safe to assume that `useMemo` will only run on actual\n // changes to the two dependencies, therefore saving us calls to `deepmerge()`!\n const config = useMemo(() => {\n // Deep clone `parentContext` to avoid mutating it later.\n return deepmerge(parentContext ?? {}, value ?? {}, {\n isMergeableObject: isPlainObject\n });\n }, [parentContext, value]);\n return config;\n}\n\n/**\n * A Provider component that can modify props for connected components within\n * the Context system.\n *\n * @example\n * ```jsx\n * <ContextSystemProvider value={{ Button: { size: 'small' }}}>\n * <Button>...</Button>\n * </ContextSystemProvider>\n * ```\n *\n * @template {Record<string, any>} T\n * @param {Object} options\n * @param {React.ReactNode} options.children Children to render.\n * @param {T} options.value Props to render into connected components.\n * @return {React.JSX.Element} A Provider wrapped component.\n */\nconst BaseContextSystemProvider = ({\n children,\n value\n}) => {\n const contextValue = useContextSystemBridge({\n value\n });\n return /*#__PURE__*/_jsx(ComponentsContext.Provider, {\n value: contextValue,\n children: children\n });\n};\nexport const ContextSystemProvider = memo(BaseContextSystemProvider);","/**\n * Object map tracking messages which have been logged, for use in ensuring a\n * message is only logged once.\n */\nexport const logged: Set< string > = new Set();\n","/**\n * Internal dependencies\n */\nimport { logged } from './utils';\n\nfunction isDev(): boolean {\n\t// eslint-disable-next-line @wordpress/wp-global-usage\n\treturn globalThis.SCRIPT_DEBUG === true;\n}\n\n/**\n * Shows a warning with `message` if environment is not `production`.\n *\n * @param message Message to show in the warning.\n *\n * @example\n * ```js\n * import warning from '@wordpress/warning';\n *\n * function MyComponent( props ) {\n * if ( ! props.title ) {\n * warning( '`props.title` was not passed' );\n * }\n * ...\n * }\n * ```\n */\nexport default function warning( message: string ): void {\n\tif ( ! isDev() ) {\n\t\treturn;\n\t}\n\n\t// Skip if already logged.\n\tif ( logged.has( message ) ) {\n\t\treturn;\n\t}\n\n\t// eslint-disable-next-line no-console\n\tconsole.warn( message );\n\n\t// Throwing an error and catching it immediately to improve debugging\n\t// A consumer can use 'pause on caught exceptions'\n\t// https://github.com/facebook/react/issues/4216\n\ttry {\n\t\tthrow Error( message );\n\t} catch ( x ) {\n\t\t// Do nothing.\n\t}\n\tlogged.add( message );\n}\n","export const COMPONENT_NAMESPACE = 'data-wp-component';\nexport const CONNECTED_NAMESPACE = 'data-wp-c16t';\n\n/**\n * Special key where the connected namespaces are stored.\n * This is attached to Context connected components as a static property.\n */\nexport const CONNECT_STATIC_NAMESPACE = '__contextSystemKey__';","/**\n * External dependencies\n */\nimport { paramCase as kebabCase } from 'change-case';\nimport memoize from 'memize';\n\n/**\n * Generates the connected component CSS className based on the namespace.\n *\n * @param namespace The name of the connected component.\n * @return The generated CSS className.\n */\nfunction getStyledClassName(namespace) {\n const kebab = kebabCase(namespace);\n return `components-${kebab}`;\n}\nexport const getStyledClassNameFromKey = memoize(getStyledClassName);","/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport warn from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport { CONNECT_STATIC_NAMESPACE } from './constants';\nimport { getStyledClassNameFromKey } from './get-styled-class-name-from-key';\n/**\n * Forwards ref (React.ForwardRef) and \"Connects\" (or registers) a component\n * within the Context system under a specified namespace.\n *\n * @param Component The component to register into the Context system.\n * @param namespace The namespace to register the component under.\n * @return The connected WordPressComponent\n */\nexport function contextConnect(Component, namespace) {\n return _contextConnect(Component, namespace, {\n forwardsRef: true\n });\n}\n\n/**\n * \"Connects\" (or registers) a component within the Context system under a specified namespace.\n * Does not forward a ref.\n *\n * @param Component The component to register into the Context system.\n * @param namespace The namespace to register the component under.\n * @return The connected WordPressComponent\n */\nexport function contextConnectWithoutRef(Component, namespace) {\n return _contextConnect(Component, namespace);\n}\n\n// This is an (experimental) evolution of the initial connect() HOC.\n// The hope is that we can improve render performance by removing functional\n// component wrappers.\nfunction _contextConnect(Component, namespace, options) {\n const WrappedComponent = options?.forwardsRef ? forwardRef(Component) : Component;\n if (typeof namespace === 'undefined') {\n globalThis.SCRIPT_DEBUG === true ? warn('contextConnect: Please provide a namespace') : void 0;\n }\n\n // @ts-expect-error internal property\n let mergedNamespace = WrappedComponent[CONNECT_STATIC_NAMESPACE] || [namespace];\n\n /**\n * Consolidate (merge) namespaces before attaching it to the WrappedComponent.\n */\n if (Array.isArray(namespace)) {\n mergedNamespace = [...mergedNamespace, ...namespace];\n }\n if (typeof namespace === 'string') {\n mergedNamespace = [...mergedNamespace, namespace];\n }\n\n // @ts-expect-error We can't rely on inferred types here because of the\n // `as` prop polymorphism we're handling in https://github.com/WordPress/gutenberg/blob/4f3a11243c365f94892e479bff0b922ccc4ccda3/packages/components/src/context/wordpress-component.ts#L32-L33\n return Object.assign(WrappedComponent, {\n [CONNECT_STATIC_NAMESPACE]: [...new Set(mergedNamespace)],\n displayName: namespace,\n selector: `.${getStyledClassNameFromKey(namespace)}`\n });\n}\n\n/**\n * Attempts to retrieve the connected namespace from a component.\n *\n * @param Component The component to retrieve a namespace from.\n * @return The connected namespaces.\n */\nexport function getConnectNamespace(Component) {\n if (!Component) {\n return [];\n }\n let namespaces = [];\n\n // @ts-ignore internal property\n if (Component[CONNECT_STATIC_NAMESPACE]) {\n // @ts-ignore internal property\n namespaces = Component[CONNECT_STATIC_NAMESPACE];\n }\n\n // @ts-ignore\n if (Component.type && Component.type[CONNECT_STATIC_NAMESPACE]) {\n // @ts-ignore\n namespaces = Component.type[CONNECT_STATIC_NAMESPACE];\n }\n return namespaces;\n}\n\n/**\n * Checks to see if a component is connected within the Context system.\n *\n * @param Component The component to retrieve a namespace from.\n * @param match The namespace to check.\n */\nexport function hasConnectNamespace(Component, match) {\n if (!Component) {\n return false;\n }\n if (typeof match === 'string') {\n return getConnectNamespace(Component).includes(match);\n }\n if (Array.isArray(match)) {\n return match.some(result => getConnectNamespace(Component).includes(result));\n }\n return false;\n}","/**\n * Internal dependencies\n */\nimport { CONNECTED_NAMESPACE, COMPONENT_NAMESPACE } from './constants';\n\n/**\n * Creates a dedicated context namespace HTML attribute for components.\n * ns is short for \"namespace\"\n *\n * @example\n * ```jsx\n * <div {...ns('Container')} />\n * ```\n *\n * @param {string} componentName The name for the component.\n * @return {Record<string, any>} A props object with the namespaced HTML attribute.\n */\nexport function getNamespace(componentName) {\n return {\n [COMPONENT_NAMESPACE]: componentName\n };\n}\n\n/**\n * Creates a dedicated connected context namespace HTML attribute for components.\n * ns is short for \"namespace\"\n *\n * @example\n * ```jsx\n * <div {...cns()} />\n * ```\n *\n * @return {Record<string, any>} A props object with the namespaced HTML attribute.\n */\nexport function getConnectedNamespace() {\n return {\n [CONNECTED_NAMESPACE]: true\n };\n}","/**\n * WordPress dependencies\n */\nimport warn from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport { useComponentsContext } from './context-system-provider';\nimport { getNamespace, getConnectedNamespace } from './utils';\nimport { getStyledClassNameFromKey } from './get-styled-class-name-from-key';\nimport { useCx } from '../utils/hooks/use-cx';\n\n/**\n * @template TProps\n * @typedef {TProps & { className: string }} ConnectedProps\n */\n\n/**\n * Custom hook that derives registered props from the Context system.\n * These derived props are then consolidated with incoming component props.\n *\n * @template {{ className?: string }} P\n * @param {P} props Incoming props from the component.\n * @param {string} namespace The namespace to register and to derive context props from.\n * @return {ConnectedProps<P>} The connected props.\n */\nexport function useContextSystem(props, namespace) {\n const contextSystemProps = useComponentsContext();\n if (typeof namespace === 'undefined') {\n globalThis.SCRIPT_DEBUG === true ? warn('useContextSystem: Please provide a namespace') : void 0;\n }\n const contextProps = contextSystemProps?.[namespace] || {};\n\n /** @type {ConnectedProps<P>} */\n // @ts-ignore We fill in the missing properties below\n const finalComponentProps = {\n ...getConnectedNamespace(),\n ...getNamespace(namespace)\n };\n const {\n _overrides: overrideProps,\n ...otherContextProps\n } = contextProps;\n const initialMergedProps = Object.entries(otherContextProps).length ? Object.assign({}, otherContextProps, props) : props;\n const cx = useCx();\n const classes = cx(getStyledClassNameFromKey(namespace), props.className);\n\n // Provides the ability to customize the render of the component.\n const rendered = typeof initialMergedProps.renderChildren === 'function' ? initialMergedProps.renderChildren(initialMergedProps) : initialMergedProps.children;\n for (const key in initialMergedProps) {\n // @ts-ignore filling in missing props\n finalComponentProps[key] = initialMergedProps[key];\n }\n for (const key in overrideProps) {\n // @ts-ignore filling in missing props\n finalComponentProps[key] = overrideProps[key];\n }\n\n // Setting an `undefined` explicitly can cause unintended overwrites\n // when a `cloneElement()` is involved.\n if (rendered !== undefined) {\n // @ts-ignore\n finalComponentProps.children = rendered;\n }\n finalComponentProps.className = classes;\n return finalComponentProps;\n}","import _extends from '@babel/runtime/helpers/esm/extends';\nimport { withEmotionCache, ThemeContext } from '@emotion/react';\nimport { serializeStyles } from '@emotion/serialize';\nimport { useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\nimport { getRegisteredStyles, registerStyles, insertStyles } from '@emotion/utils';\nimport * as React from 'react';\nimport isPropValid from '@emotion/is-prop-valid';\n\nvar isBrowser = typeof document !== 'undefined';\n\nvar isDevelopment = false;\n\nvar testOmitPropsOnStringTag = isPropValid;\n\nvar testOmitPropsOnComponent = function testOmitPropsOnComponent(key) {\n return key !== 'theme';\n};\n\nvar getDefaultShouldForwardProp = function getDefaultShouldForwardProp(tag) {\n return typeof tag === 'string' && // 96 is one less than the char code\n // for \"a\" so this is checking that\n // it's a lowercase character\n tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent;\n};\nvar composeShouldForwardProps = function composeShouldForwardProps(tag, options, isReal) {\n var shouldForwardProp;\n\n if (options) {\n var optionsShouldForwardProp = options.shouldForwardProp;\n shouldForwardProp = tag.__emotion_forwardProp && optionsShouldForwardProp ? function (propName) {\n return tag.__emotion_forwardProp(propName) && optionsShouldForwardProp(propName);\n } : optionsShouldForwardProp;\n }\n\n if (typeof shouldForwardProp !== 'function' && isReal) {\n shouldForwardProp = tag.__emotion_forwardProp;\n }\n\n return shouldForwardProp;\n};\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serialized = _ref.serialized,\n isStringTag = _ref.isStringTag;\n registerStyles(cache, serialized, isStringTag);\n var rules = useInsertionEffectAlwaysWithSyncFallback(function () {\n return insertStyles(cache, serialized, isStringTag);\n });\n\n if (!isBrowser && rules !== undefined) {\n var _ref2;\n\n var serializedNames = serialized.name;\n var next = serialized.next;\n\n while (next !== undefined) {\n serializedNames += ' ' + next.name;\n next = next.next;\n }\n\n return /*#__PURE__*/React.createElement(\"style\", (_ref2 = {}, _ref2[\"data-emotion\"] = cache.key + \" \" + serializedNames, _ref2.dangerouslySetInnerHTML = {\n __html: rules\n }, _ref2.nonce = cache.sheet.nonce, _ref2));\n }\n\n return null;\n};\n\nvar createStyled = function createStyled(tag, options) {\n\n var isReal = tag.__emotion_real === tag;\n var baseTag = isReal && tag.__emotion_base || tag;\n var identifierName;\n var targetClassName;\n\n if (options !== undefined) {\n identifierName = options.label;\n targetClassName = options.target;\n }\n\n var shouldForwardProp = composeShouldForwardProps(tag, options, isReal);\n var defaultShouldForwardProp = shouldForwardProp || getDefaultShouldForwardProp(baseTag);\n var shouldUseAs = !defaultShouldForwardProp('as');\n return function () {\n // eslint-disable-next-line prefer-rest-params\n var args = arguments;\n var styles = isReal && tag.__emotion_styles !== undefined ? tag.__emotion_styles.slice(0) : [];\n\n if (identifierName !== undefined) {\n styles.push(\"label:\" + identifierName + \";\");\n }\n\n if (args[0] == null || args[0].raw === undefined) {\n // eslint-disable-next-line prefer-spread\n styles.push.apply(styles, args);\n } else {\n var templateStringsArr = args[0];\n\n styles.push(templateStringsArr[0]);\n var len = args.length;\n var i = 1;\n\n for (; i < len; i++) {\n\n styles.push(args[i], templateStringsArr[i]);\n }\n }\n\n var Styled = withEmotionCache(function (props, cache, ref) {\n var FinalTag = shouldUseAs && props.as || baseTag;\n var className = '';\n var classInterpolations = [];\n var mergedProps = props;\n\n if (props.theme == null) {\n mergedProps = {};\n\n for (var key in props) {\n mergedProps[key] = props[key];\n }\n\n mergedProps.theme = React.useContext(ThemeContext);\n }\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, classInterpolations, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(styles.concat(classInterpolations), cache.registered, mergedProps);\n className += cache.key + \"-\" + serialized.name;\n\n if (targetClassName !== undefined) {\n className += \" \" + targetClassName;\n }\n\n var finalShouldForwardProp = shouldUseAs && shouldForwardProp === undefined ? getDefaultShouldForwardProp(FinalTag) : defaultShouldForwardProp;\n var newProps = {};\n\n for (var _key in props) {\n if (shouldUseAs && _key === 'as') continue;\n\n if (finalShouldForwardProp(_key)) {\n newProps[_key] = props[_key];\n }\n }\n\n newProps.className = className;\n\n if (ref) {\n newProps.ref = ref;\n }\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serialized: serialized,\n isStringTag: typeof FinalTag === 'string'\n }), /*#__PURE__*/React.createElement(FinalTag, newProps));\n });\n Styled.displayName = identifierName !== undefined ? identifierName : \"Styled(\" + (typeof baseTag === 'string' ? baseTag : baseTag.displayName || baseTag.name || 'Component') + \")\";\n Styled.defaultProps = tag.defaultProps;\n Styled.__emotion_real = Styled;\n Styled.__emotion_base = baseTag;\n Styled.__emotion_styles = styles;\n Styled.__emotion_forwardProp = shouldForwardProp;\n Object.defineProperty(Styled, 'toString', {\n value: function value() {\n if (targetClassName === undefined && isDevelopment) {\n return 'NO_COMPONENT_SELECTOR';\n }\n\n return \".\" + targetClassName;\n }\n });\n\n Styled.withComponent = function (nextTag, nextOptions) {\n var newStyled = createStyled(nextTag, _extends({}, options, nextOptions, {\n shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true)\n }));\n return newStyled.apply(void 0, styles);\n };\n\n return Styled;\n };\n};\n\nexport { createStyled as default };\n","import memoize from '@emotion/memoize';\n\n// eslint-disable-next-line no-undef\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar isPropValid = /* #__PURE__ */memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport { isPropValid as default };\n","import _styled from \"@emotion/styled/base\";\n/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst PolymorphicDiv = /*#__PURE__*/_styled(\"div\", process.env.NODE_ENV === \"production\" ? {\n target: \"e19lxcc00\"\n} : {\n target: \"e19lxcc00\",\n label: \"PolymorphicDiv\"\n})(process.env.NODE_ENV === \"production\" ? \"\" : \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbXBvbmVudC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBZWlDIiwiZmlsZSI6ImNvbXBvbmVudC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbi8qKlxuICogV29yZFByZXNzIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBmb3J3YXJkUmVmIH0gZnJvbSAnQHdvcmRwcmVzcy9lbGVtZW50JztcblxuLyoqX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xuZXhwb3J0IGRlZmF1bHQgVmlldztcbiJdfQ== */\");\nfunction UnforwardedView({\n as,\n ...restProps\n}, ref) {\n return /*#__PURE__*/_jsx(PolymorphicDiv, {\n as: as,\n ref: ref,\n ...restProps\n });\n}\n\n/**\n * `View` is a core component that renders everything in the library.\n * It is the principle component in the entire library.\n *\n * ```jsx\n * import { View } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<View>\n * \t\t\t Code is Poetry\n * \t\t</View>\n * \t);\n * }\n * ```\n */\nexport const View = Object.assign(forwardRef(UnforwardedView), {\n selector: '.components-view'\n});\nexport default View;","/**\n * WordPress dependencies\n */\nimport { useEffect, useState } from '@wordpress/element';\nconst breakpoints = ['40em', '52em', '64em'];\nexport const useBreakpointIndex = (options = {}) => {\n const {\n defaultIndex = 0\n } = options;\n if (typeof defaultIndex !== 'number') {\n throw new TypeError(`Default breakpoint index should be a number. Got: ${defaultIndex}, ${typeof defaultIndex}`);\n } else if (defaultIndex < 0 || defaultIndex > breakpoints.length - 1) {\n throw new RangeError(`Default breakpoint index out of range. Theme has ${breakpoints.length} breakpoints, got index ${defaultIndex}`);\n }\n const [value, setValue] = useState(defaultIndex);\n useEffect(() => {\n const getIndex = () => breakpoints.filter(bp => {\n return typeof window !== 'undefined' ? window.matchMedia(`screen and (min-width: ${bp})`).matches : false;\n }).length;\n const onResize = () => {\n const newValue = getIndex();\n if (value !== newValue) {\n setValue(newValue);\n }\n };\n onResize();\n if (typeof window !== 'undefined') {\n window.addEventListener('resize', onResize);\n }\n return () => {\n if (typeof window !== 'undefined') {\n window.removeEventListener('resize', onResize);\n }\n };\n }, [value]);\n return value;\n};\nexport function useResponsiveValue(values, options = {}) {\n const index = useBreakpointIndex(options);\n\n // Allow calling the function with a \"normal\" value without having to check on the outside.\n if (!Array.isArray(values) && typeof values !== 'function') {\n return values;\n }\n const array = values || [];\n return array[index >= array.length ? array.length - 1 : index];\n}","/**\n * The argument value for the `space()` utility function.\n *\n * When this is a number or a numeric string, it will be interpreted as a\n * multiplier for the grid base value (4px). For example, `space( 2 )` will be 8px.\n *\n * Otherwise, it will be interpreted as a literal CSS length value. For example,\n * `space( 'auto' )` will be 'auto', and `space( '2px' )` will be 2px.\n */\n\nconst GRID_BASE = '4px';\n\n/**\n * A function that handles numbers, numeric strings, and unit values.\n *\n * When given a number or a numeric string, it will return the grid-based\n * value as a factor of GRID_BASE, defined above.\n *\n * When given a unit value or one of the named CSS values like `auto`,\n * it will simply return the value back.\n *\n * @param value A number, numeric string, or a unit value.\n */\nexport function space(value) {\n if (typeof value === 'undefined') {\n return undefined;\n }\n\n // Handle empty strings, if it's the number 0 this still works.\n if (!value) {\n return '0';\n }\n const asInt = typeof value === 'number' ? value : Number(value);\n\n // Test if the input has a unit, was NaN, or was one of the named CSS values (like `auto`), in which case just use that value.\n if (typeof window !== 'undefined' && window.CSS?.supports?.('margin', value.toString()) || Number.isNaN(asInt)) {\n return value.toString();\n }\n return `calc(${GRID_BASE} * ${value})`;\n}","function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).\"; }\n/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nexport const Truncate = process.env.NODE_ENV === \"production\" ? {\n name: \"hdknak\",\n styles: \"display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap\"\n} : {\n name: \"abxxyf-Truncate\",\n styles: \"display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;label:Truncate;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLMkIiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG5leHBvcnQgY29uc3QgVHJ1bmNhdGUgPSBjc3NgXG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRvdmVyZmxvdzogaGlkZGVuO1xuXHR0ZXh0LW92ZXJmbG93OiBlbGxpcHNpcztcblx0d2hpdGUtc3BhY2U6IG5vd3JhcDtcbmA7XG4iXX0= */\",\n toString: _EMOTION_STRINGIFIED_CSS_ERROR__\n};","/**\n * Internal dependencies\n */\nimport { isValueDefined } from '../utils/values';\nexport const TRUNCATE_ELLIPSIS = '…';\nexport const TRUNCATE_TYPE = {\n auto: 'auto',\n head: 'head',\n middle: 'middle',\n tail: 'tail',\n none: 'none'\n};\nexport const TRUNCATE_DEFAULT_PROPS = {\n ellipsis: TRUNCATE_ELLIPSIS,\n ellipsizeMode: TRUNCATE_TYPE.auto,\n limit: 0,\n numberOfLines: 0\n};\n\n// Source\n// https://github.com/kahwee/truncate-middle\nexport function truncateMiddle(word, headLength, tailLength, ellipsis) {\n if (typeof word !== 'string') {\n return '';\n }\n const wordLength = word.length;\n // Setting default values\n // eslint-disable-next-line no-bitwise\n const frontLength = ~~headLength; // Will cast to integer\n // eslint-disable-next-line no-bitwise\n const backLength = ~~tailLength;\n /* istanbul ignore next */\n const truncateStr = isValueDefined(ellipsis) ? ellipsis : TRUNCATE_ELLIPSIS;\n if (frontLength === 0 && backLength === 0 || frontLength >= wordLength || backLength >= wordLength || frontLength + backLength >= wordLength) {\n return word;\n } else if (backLength === 0) {\n return word.slice(0, frontLength) + truncateStr;\n }\n return word.slice(0, frontLength) + truncateStr + word.slice(wordLength - backLength);\n}\nexport function truncateContent(words = '', props) {\n const mergedProps = {\n ...TRUNCATE_DEFAULT_PROPS,\n ...props\n };\n const {\n ellipsis,\n ellipsizeMode,\n limit\n } = mergedProps;\n if (ellipsizeMode === TRUNCATE_TYPE.none) {\n return words;\n }\n let truncateHead;\n let truncateTail;\n switch (ellipsizeMode) {\n case TRUNCATE_TYPE.head:\n truncateHead = 0;\n truncateTail = limit;\n break;\n case TRUNCATE_TYPE.middle:\n truncateHead = Math.floor(limit / 2);\n truncateTail = Math.floor(limit / 2);\n break;\n default:\n truncateHead = limit;\n truncateTail = 0;\n }\n const truncatedContent = ellipsizeMode !== TRUNCATE_TYPE.auto ? truncateMiddle(words, truncateHead, truncateTail, ellipsis) : words;\n return truncatedContent;\n}","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nimport { useContextSystem } from '../context';\nimport * as styles from './styles';\nimport { TRUNCATE_ELLIPSIS, TRUNCATE_TYPE, truncateContent } from './utils';\nimport { useCx } from '../utils/hooks/use-cx';\nexport default function useTruncate(props) {\n const {\n className,\n children,\n ellipsis = TRUNCATE_ELLIPSIS,\n ellipsizeMode = TRUNCATE_TYPE.auto,\n limit = 0,\n numberOfLines = 0,\n ...otherProps\n } = useContextSystem(props, 'Truncate');\n const cx = useCx();\n let childrenAsText;\n if (typeof children === 'string') {\n childrenAsText = children;\n } else if (typeof children === 'number') {\n childrenAsText = children.toString();\n }\n const truncatedContent = childrenAsText ? truncateContent(childrenAsText, {\n ellipsis,\n ellipsizeMode,\n limit,\n numberOfLines\n }) : children;\n const shouldTruncate = !!childrenAsText && ellipsizeMode === TRUNCATE_TYPE.auto;\n const classes = useMemo(() => {\n // The `word-break: break-all` property first makes sure a text line\n // breaks even when it contains 'unbreakable' content such as long URLs.\n // See https://github.com/WordPress/gutenberg/issues/60860.\n const truncateLines = /*#__PURE__*/css(numberOfLines === 1 ? 'word-break: break-all;' : '', \" -webkit-box-orient:vertical;-webkit-line-clamp:\", numberOfLines, \";display:-webkit-box;overflow:hidden;\" + (process.env.NODE_ENV === \"production\" ? \"\" : \";label:truncateLines;\"), process.env.NODE_ENV === \"production\" ? \"\" : \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,e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IGl0IGNvbnRhaW5zICd1bmJyZWFrYWJsZScgY29udGVudCBzdWNoIGFzIGxvbmcgVVJMcy5cblx0XHQvLyBTZWUgaHR0cHM6Ly9naXRodWIuY29tL1dvcmRQcmVzcy9ndXRlbmJlcmcvaXNzdWVzLzYwODYwLlxuXHRcdGNvbnN0IHRydW5jYXRlTGluZXMgPSBjc3NgXG5cdFx0XHQkeyBudW1iZXJPZkxpbmVzID09PSAxID8gJ3dvcmQtYnJlYWs6IGJyZWFrLWFsbDsnIDogJycgfVxuXHRcdFx0LXdlYmtpdC1ib3gtb3JpZW50OiB2ZXJ0aWNhbDtcblx0XHRcdC13ZWJraXQtbGluZS1jbGFtcDogJHsgbnVtYmVyT2ZMaW5lcyB9O1xuXHRcdFx0ZGlzcGxheTogLXdlYmtpdC1ib3g7XG5cdFx0XHRvdmVyZmxvdzogaGlkZGVuO1xuXHRcdGA7XG5cblx0XHRyZXR1cm4gY3goXG5cdFx0XHRzaG91bGRUcnVuY2F0ZSAmJiAhIG51bWJlck9mTGluZXMgJiYgc3R5bGVzLlRydW5jYXRlLFxuXHRcdFx0c2hvdWxkVHJ1bmNhdGUgJiYgISEgbnVtYmVyT2ZMaW5lcyAmJiB0cnVuY2F0ZUxpbmVzLFxuXHRcdFx0Y2xhc3NOYW1lXG5cdFx0KTtcblx0fSwgWyBjbGFzc05hbWUsIGN4LCBudW1iZXJPZkxpbmVzLCBzaG91bGRUcnVuY2F0ZSBdICk7XG5cblx0cmV0dXJuIHsgLi4ub3RoZXJQcm9wcywgY2xhc3NOYW1lOiBjbGFzc2VzLCBjaGlsZHJlbjogdHJ1bmNhdGVkQ29udGVudCB9O1xufVxuIl19 */\");\n return cx(shouldTruncate && !numberOfLines && styles.Truncate, shouldTruncate && !!numberOfLines && truncateLines, className);\n }, [className, cx, numberOfLines, shouldTruncate]);\n return {\n ...otherProps,\n className: classes,\n children: truncatedContent\n };\n}","function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).\"; }\n/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { COLORS, CONFIG } from '../utils';\nexport const Text = /*#__PURE__*/css(\"color:\", COLORS.theme.foreground, \";line-height:\", CONFIG.fontLineHeightBase, \";margin:0;text-wrap:pretty;\" + (process.env.NODE_ENV === \"production\" ? \"\" : \";label:Text;\"), process.env.NODE_ENV === \"production\" ? \"\" : \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFVdUIiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGNvbnN0IFRleHQgPSBjc3NgXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZCB9O1xuXHRsaW5lLWhlaWdodDogJHsgQ09ORklHLmZvbnRMaW5lSGVpZ2h0QmFzZSB9O1xuXHRtYXJnaW46IDA7XG5cdHRleHQtd3JhcDogcHJldHR5O1xuYDtcblxuZXhwb3J0IGNvbnN0IGJsb2NrID0gY3NzYFxuXHRkaXNwbGF5OiBibG9jaztcbmA7XG5cbmV4cG9ydCBjb25zdCBwb3NpdGl2ZSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5hbGVydC5ncmVlbiB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IGRlc3RydWN0aXZlID0gY3NzYFxuXHRjb2xvcjogJHsgQ09MT1JTLmFsZXJ0LnJlZCB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IG11dGVkID0gY3NzYFxuXHRjb2xvcjogJHsgQ09MT1JTLmdyYXlbIDcwMCBdIH07XG5gO1xuXG5leHBvcnQgY29uc3QgaGlnaGxpZ2h0ZXJUZXh0ID0gY3NzYFxuXHRtYXJrIHtcblx0XHRiYWNrZ3JvdW5kOiAkeyBDT0xPUlMuYWxlcnQueWVsbG93IH07XG5cdFx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c1NtYWxsIH07XG5cdFx0Ym94LXNoYWRvdzpcblx0XHRcdDAgMCAwIDFweCByZ2JhKCAwLCAwLCAwLCAwLjA1ICkgaW5zZXQsXG5cdFx0XHQwIC0xcHggMCByZ2JhKCAwLCAwLCAwLCAwLjEgKSBpbnNldDtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IHVwcGVyQ2FzZSA9IGNzc2Bcblx0dGV4dC10cmFuc2Zvcm06IHVwcGVyY2FzZTtcbmA7XG4iXX0= */\");\nexport const block = process.env.NODE_ENV === \"production\" ? {\n name: \"4zleql\",\n styles: \"display:block\"\n} : {\n name: \"14aceuy-block\",\n styles: \"display:block;label:block;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQndCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7X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ert.green, \";\" + (process.env.NODE_ENV === \"production\" ? \"\" : \";label:positive;\"), process.env.NODE_ENV === \"production\" ? \"\" : \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxQjJCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBUZXh0ID0gY3NzYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0bGluZS1oZWlnaHQ6ICR7IENPTkZJRy5mb250TGluZUhlaWdodEJhc2UgfTtcblx0bWFyZ2luOiAwO1xuXHR0ZXh0LXdyYXA6IHByZXR0eTtcbmA7XG5cbmV4cG9ydCBjb25zdCBibG9jayA9IGNzc2Bcblx0ZGlzcGxheTogYmxvY2s7XG5gO1xuXG5leHBvcnQgY29uc3QgcG9zaXRpdmUgPSBjc3NgXG5cdGNvbG9yOiAkeyBDT0xPUlMuYWxlcnQuZ3JlZW4gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBkZXN0cnVjdGl2ZSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5hbGVydC5yZWQgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBtdXRlZCA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IGhpZ2hsaWdodGVyVGV4dCA9IGNzc2Bcblx0bWFyayB7XG5cdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLmFsZXJ0LnllbGxvdyB9O1xuXHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRcdGJveC1zaGFkb3c6XG5cdFx0XHQwIDAgMCAxcHggcmdiYSggMCwgMCwgMCwgMC4wNSApIGluc2V0LFxuXHRcdFx0MCAtMXB4IDAgcmdiYSggMCwgMCwgMCwgMC4xICkgaW5zZXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCB1cHBlckNhc2UgPSBjc3NgXG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuIl19 */\");\nexport const destructive = /*#__PURE__*/css(\"color:\", COLORS.alert.red, \";\" + (process.env.NODE_ENV === \"production\" ? \"\" : \";label:destructive;\"), process.env.NODE_ENV === \"production\" ? \"\" : \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF5QjhCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBUZXh0ID0gY3NzYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0bGluZS1oZWlnaHQ6ICR7IENPTkZJRy5mb250TGluZUhlaWdodEJhc2UgfTtcblx0bWFyZ2luOiAwO1xuXHR0ZXh0LXdyYXA6IHByZXR0eTtcbmA7XG5cbmV4cG9ydCBjb25zdCBibG9jayA9IGNzc2Bcblx0ZGlzcGxheTogYmxvY2s7XG5gO1xuXG5leHBvcnQgY29uc3QgcG9zaXRpdmUgPSBjc3NgXG5cdGNvbG9yOiAkeyBDT0xPUlMuYWxlcnQuZ3JlZW4gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBkZXN0cnVjdGl2ZSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5hbGVydC5yZWQgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBtdXRlZCA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IGhpZ2hsaWdodGVyVGV4dCA9IGNzc2Bcblx0bWFyayB7XG5cdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLmFsZXJ0LnllbGxvdyB9O1xuXHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRcdGJveC1zaGFkb3c6XG5cdFx0XHQwIDAgMCAxcHggcmdiYSggMCwgMCwgMCwgMC4wNSApIGluc2V0LFxuXHRcdFx0MCAtMXB4IDAgcmdiYSggMCwgMCwgMCwgMC4xICkgaW5zZXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCB1cHBlckNhc2UgPSBjc3NgXG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuIl19 */\");\nexport const muted = /*#__PURE__*/css(\"color:\", COLORS.gray[700], \";\" + (process.env.NODE_ENV === \"production\" ? \"\" : \";label:muted;\"), process.env.NODE_ENV === \"production\" ? \"\" : \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE2QndCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250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mdiYSggMCwgMCwgMCwgMC4xICkgaW5zZXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCB1cHBlckNhc2UgPSBjc3NgXG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuIl19 */\");\nexport const highlighterText = /*#__PURE__*/css(\"mark{background:\", COLORS.alert.yellow, \";border-radius:\", CONFIG.radiusSmall, \";box-shadow:0 0 0 1px rgba( 0, 0, 0, 0.05 ) inset,0 -1px 0 rgba( 0, 0, 0, 0.1 ) inset;}\" + (process.env.NODE_ENV === \"production\" ? \"\" : \";label:highlighterText;\"), process.env.NODE_ENV === \"production\" ? \"\" : \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQ2tDIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBUZXh0ID0gY3NzYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmZvcmVncm91bmQgfTtcblx0bGluZS1oZWlnaHQ6ICR7IENPTkZJRy5mb250TGluZUhlaWdodEJhc2UgfTtcblx0bWFyZ2luOiAwO1xuXHR0ZXh0LXdyYXA6IHByZXR0eTtcbmA7XG5cbmV4cG9ydCBjb25zdCBibG9jayA9IGNzc2Bcblx0ZGlzcGxheTogYmxvY2s7XG5gO1xuXG5leHBvcnQgY29uc3QgcG9zaXRpdmUgPSBjc3NgXG5cdGNvbG9yOiAkeyBDT0xPUlMuYWxlcnQuZ3JlZW4gfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBkZXN0cnVjdGl2ZSA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5hbGVydC5yZWQgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBtdXRlZCA9IGNzc2Bcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IGhpZ2hsaWdodGVyVGV4dCA9IGNzc2Bcblx0bWFyayB7XG5cdFx0YmFja2dyb3VuZDogJHsgQ09MT1JTLmFsZXJ0LnllbGxvdyB9O1xuXHRcdGJvcmRlci1yYWRpdXM6ICR7IENPTkZJRy5yYWRpdXNTbWFsbCB9O1xuXHRcdGJveC1zaGFkb3c6XG5cdFx0XHQwIDAgMCAxcHggcmdiYSggMCwgMCwgMCwgMC4wNSApIGluc2V0LFxuXHRcdFx0MCAtMXB4IDAgcmdiYSggMCwgMCwgMCwgMC4xICkgaW5zZXQ7XG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCB1cHBlckNhc2UgPSBjc3NgXG5cdHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gO1xuIl19 */\");\nexport const upperCase = process.env.NODE_ENV === \"production\" ? {\n name: \"50zrmy\",\n styles: \"text-transform:uppercase\"\n} : {\n name: \"1mrt3zt-upperCase\",\n styles: \"text-transform:uppercase;label:upperCase;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEyQzRCIiwiZmlsZSI6InN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gK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cHBlcmNhc2U7XG5gO1xuIl19 */\",\n toString: _EMOTION_STRINGIFIED_CSS_ERROR__\n};","/**\n * External dependencies\n */\nimport memoize from 'memize';\nimport { findAll } from 'highlight-words-core';\n\n/**\n * WordPress dependencies\n */\nimport { createElement } from '@wordpress/element';\n\n/**\n * Source:\n * https://github.com/bvaughn/react-highlight-words/blob/HEAD/src/Highlighter.js\n */\n\n/**\n * @typedef Options\n * @property {string} [activeClassName=''] Classname for active highlighted areas.\n * @property {number} [activeIndex=-1] The index of the active highlighted area.\n * @property {React.CSSProperties} [activeStyle] Styles to apply to the active highlighted area.\n * @property {boolean} [autoEscape] Whether to automatically escape text.\n * @property {boolean} [caseSensitive=false] Whether to highlight in a case-sensitive manner.\n * @property {string} children Children to highlight.\n * @property {FindAllArgs['findChunks']} [findChunks] Custom `findChunks` function to pass to `highlight-words-core`.\n * @property {string | Record<string, unknown>} [highlightClassName=''] Classname to apply to highlighted text or a Record of classnames to apply to given text (which should be the key).\n * @property {React.CSSProperties} [highlightStyle={}] Styles to apply to highlighted text.\n * @property {keyof React.JSX.IntrinsicElements} [highlightTag='mark'] Tag to use for the highlighted text.\n * @property {FindAllArgs['sanitize']} [sanitize] Custom `sanitize` function to pass to `highlight-words-core`.\n * @property {string[]} [searchWords=[]] Words to search for and highlight.\n * @property {string} [unhighlightClassName=''] Classname to apply to unhighlighted text.\n * @property {React.CSSProperties} [unhighlightStyle] Style to apply to unhighlighted text.\n */\n\n/**\n * Maps props to lowercase names.\n *\n * @param object Props to map.\n * @return The mapped props.\n */\nconst lowercaseProps = object => {\n const mapped = {};\n for (const key in object) {\n mapped[key.toLowerCase()] = object[key];\n }\n return mapped;\n};\nconst memoizedLowercaseProps = memoize(lowercaseProps);\n\n/**\n * @param options\n * @param options.activeClassName\n * @param options.activeIndex\n * @param options.activeStyle\n * @param options.autoEscape\n * @param options.caseSensitive\n * @param options.children\n * @param options.findChunks\n * @param options.highlightClassName\n * @param options.highlightStyle\n * @param options.highlightTag\n * @param options.sanitize\n * @param options.searchWords\n * @param options.unhighlightClassName\n * @param options.unhighlightStyle\n */\nexport function createHighlighterText({\n activeClassName = '',\n activeIndex = -1,\n activeStyle,\n autoEscape,\n caseSensitive = false,\n children,\n findChunks,\n highlightClassName = '',\n highlightStyle = {},\n highlightTag = 'mark',\n sanitize,\n searchWords = [],\n unhighlightClassName = '',\n unhighlightStyle\n}) {\n if (!children) {\n return null;\n }\n if (typeof children !== 'string') {\n return children;\n }\n const textToHighlight = children;\n const chunks = findAll({\n autoEscape,\n caseSensitive,\n findChunks,\n sanitize,\n searchWords,\n textToHighlight\n });\n const HighlightTag = highlightTag;\n let highlightIndex = -1;\n let highlightClassNames = '';\n let highlightStyles;\n const textContent = chunks.map((chunk, index) => {\n const text = textToHighlight.substr(chunk.start, chunk.end - chunk.start);\n if (chunk.highlight) {\n highlightIndex++;\n let highlightClass;\n if (typeof highlightClassName === 'object') {\n if (!caseSensitive) {\n highlightClassName = memoizedLowercaseProps(highlightClassName);\n highlightClass = highlightClassName[text.toLowerCase()];\n } else {\n highlightClass = highlightClassName[text];\n }\n } else {\n highlightClass = highlightClassName;\n }\n const isActive = highlightIndex === +activeIndex;\n highlightClassNames = `${highlightClass} ${isActive ? activeClassName : ''}`;\n highlightStyles = isActive === true && activeStyle !== null ? Object.assign({}, highlightStyle, activeStyle) : highlightStyle;\n const props = {\n children: text,\n className: highlightClassNames,\n key: index,\n style: highlightStyles\n };\n\n // Don't attach arbitrary props to DOM elements; this triggers React DEV warnings (https://fb.me/react-unknown-prop)\n // Only pass through the highlightIndex attribute for custom components.\n if (typeof HighlightTag !== 'string') {\n props.highlightIndex = highlightIndex;\n }\n return createElement(HighlightTag, props);\n }\n return createElement('span', {\n children: text,\n className: unhighlightClassName,\n key: index,\n style: unhighlightStyle\n });\n });\n return textContent;\n}","/**\n * External dependencies\n */\n\n/**\n * Internal dependencies\n */\nimport CONFIG from './config-values';\nexport const BASE_FONT_SIZE = 13;\nexport const PRESET_FONT_SIZES = {\n body: BASE_FONT_SIZE,\n caption: 10,\n footnote: 11,\n largeTitle: 28,\n subheadline: 12,\n title: 20\n};\nexport const HEADING_FONT_SIZES = [1, 2, 3, 4, 5, 6].flatMap(n => [n, n.toString()]);\nexport function getFontSize(size = BASE_FONT_SIZE) {\n if (size in PRESET_FONT_SIZES) {\n return getFontSize(PRESET_FONT_SIZES[size]);\n }\n if (typeof size !== 'number') {\n const parsed = parseFloat(size);\n if (Number.isNaN(parsed)) {\n return size;\n }\n size = parsed;\n }\n const ratio = `(${size} / ${BASE_FONT_SIZE})`;\n return `calc(${ratio} * ${CONFIG.fontSize})`;\n}\nexport function getHeadingFontSize(size = 3) {\n if (!HEADING_FONT_SIZES.includes(size)) {\n return getFontSize(size);\n }\n const headingSize = `fontSizeH${size}`;\n return CONFIG[headingSize];\n}","/**\n * External dependencies\n */\n\n/**\n * Internal dependencies\n */\n\nimport { space } from '../utils/space';\nimport { CONFIG } from '../utils';\nexport function getLineHeight(adjustLineHeightForInnerControls, lineHeight) {\n if (lineHeight) {\n return lineHeight;\n }\n if (!adjustLineHeightForInnerControls) {\n return;\n }\n let value = `calc(${CONFIG.controlHeight} + ${space(2)})`;\n switch (adjustLineHeightForInnerControls) {\n case 'large':\n value = `calc(${CONFIG.controlHeightLarge} + ${space(2)})`;\n break;\n case 'small':\n value = `calc(${CONFIG.controlHeightSmall} + ${space(2)})`;\n break;\n case 'xSmall':\n value = `calc(${CONFIG.controlHeightXSmall} + ${space(2)})`;\n break;\n default:\n break;\n }\n return value;\n}","function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).\"; }\n/**\n * External dependencies\n */\n\nimport { css } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo, Children, cloneElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nimport { hasConnectNamespace, useContextSystem } from '../context';\nimport { useTruncate } from '../truncate';\nimport { getOptimalTextShade } from '../utils/colors';\nimport * as styles from './styles';\nimport { createHighlighterText } from './utils';\nimport { getFontSize } from '../utils/font-size';\nimport { CONFIG, COLORS } from '../utils';\nimport { getLineHeight } from './get-line-height';\nimport { useCx } from '../utils/hooks/use-cx';\nvar _ref = process.env.NODE_ENV === \"production\" ? {\n name: \"50zrmy\",\n styles: \"text-transform:uppercase\"\n} : {\n name: \"18bqwxz-sx-upperCase\",\n styles: \"text-transform:uppercase;label:sx-upperCase;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBa0dpQiIsImZpbGUiOiJob29rLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBTZXJpYWxpemVkU3R5bGVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIFdvcmRQcmVzcyBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgdXNlTWVtbywgQ2hpbGRyZW4sIGNsb25lRWxlbWVudCB9IGZyb20gJ0B3b3JkcHJlc3MvZWxlbWVudCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IGhhc0Nvbm5lY3ROYW1lc3BhY2UsIHVzZUNvbnRleHRTeXN0ZW0gfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHVzZVRydW5jYXRlIH0gZnJvbSAnLi4vdHJ1bmNhdGUnO1xuaW1wb3J0IH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kge1xuXHRcdFx0XHRyZXR1cm4gY2hpbGQ7XG5cdFx0XHR9XG5cblx0XHRcdGNvbnN0IGlzTGluayA9IGhhc0Nvbm5lY3ROYW1lc3BhY2UoIGNoaWxkLCBbICdMaW5rJyBdICk7XG5cdFx0XHRpZiAoIGlzTGluayApIHtcblx0XHRcdFx0cmV0dXJuIGNsb25lRWxlbWVudCggY2hpbGQsIHtcblx0XHRcdFx0XHRzaXplOiBjaGlsZC5wcm9wcy5zaXplIHx8ICdpbmhlcml0Jyxcblx0XHRcdFx0fSApO1xuXHRcdFx0fVxuXG5cdFx0XHRyZXR1cm4gY2hpbGQ7XG5cdFx0fSApO1xuXHR9XG5cblx0cmV0dXJuIHtcblx0XHQuLi50cnVuY2F0ZVByb3BzLFxuXHRcdGNoaWxkcmVuOiB0cnVuY2F0ZSA/IHRydW5jYXRlUHJvcHMuY2hpbGRyZW4gOiBjb250ZW50LFxuXHR9O1xufVxuIl19 */\",\n toString: _EMOTION_STRINGIFIED_CSS_ERROR__\n};\n/**\n * @param {import('../context').WordPressComponentProps<import('./types').Props, 'span'>} props\n */\nexport default function useText(props) {\n const {\n adjustLineHeightForInnerControls,\n align,\n children,\n className,\n color,\n ellipsizeMode,\n isDestructive = false,\n display,\n highlightEscape = false,\n highlightCaseSensitive = false,\n highlightWords,\n highlightSanitize,\n isBlock = false,\n letterSpacing,\n lineHeight: lineHeightProp,\n optimizeReadabilityFor,\n size,\n truncate = false,\n upperCase = false,\n variant,\n weight = CONFIG.fontWeight,\n ...otherProps\n } = useContextSystem(props, 'Text');\n let content = children;\n const isHighlighter = Array.isArray(highlightWords);\n const isCaption = size === 'caption';\n if (isHighlighter) {\n if (typeof children !== 'string') {\n throw new TypeError('`children` of `Text` must only be `string` types when `highlightWords` is defined');\n }\n content = createHighlighterText({\n autoEscape: highlightEscape,\n children,\n caseSensitive: highlightCaseSensitive,\n searchWords: highlightWords,\n sanitize: highlightSanitize\n });\n }\n const cx = useCx();\n const classes = useMemo(() => {\n const sx = {};\n const lineHeight = getLineHeight(adjustLineHeightForInnerControls, lineHeightProp);\n sx.Base = /*#__PURE__*/css({\n color,\n display,\n fontSize: getFontSize(size),\n fontWeight: weight,\n lineHeight,\n letterSpacing,\n textAlign: align\n }, process.env.NODE_ENV === \"production\" ? \"\" : \";label:sx-Base;\", process.env.NODE_ENV === \"production\" ? \"\" : \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBd0ZZIiwiZmlsZSI6Imhvb2sudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgdHlwZSB7IFNlcmlhbGl6ZWRTdHlsZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogV29yZFByZXNzIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyB1c2VNZW1vLCBDaGlsZHJlbiwgY2xvbmVFbGVtZW50IH0gZnJvbSAnQHdvcmRwcmVzcy9lbGVtZW50JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHR5cGUgeyBXb3JkUHJlc3NDb21wb25lbnRQcm9wcyB9IGZyb20gJy4uL2NvbnRleHQnO1xuaW1wb3J0IHsgaGFzQ29ubmVjdE5hbWVzcGFjZSwgdXNlQ29udGV4dFN5c3RlbSB9IGZyb20gJy4uL2NvbnRleHQnO1xuaW1wb3J0IHsgdXNlVHJ1bmNhdGUgfSBmcm9tICcuLi90cnVuY2F0ZSc7XG5pbXBvcnQgeyBnZXRPcHRpbWFsVGV4dFNoYWRlIH0gZnJvbSAnLi4vdXRpbHMvY29sb3JzJztcbmltcG9ydCAqIGFzIHN0eWxlc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XNMaW5rICkge1xuXHRcdFx0XHRyZXR1cm4gY2xvbmVFbGVtZW50KCBjaGlsZCwge1xuXHRcdFx0XHRcdHNpemU6IGNoaWxkLnByb3BzLnNpemUgfHwgJ2luaGVyaXQnLFxuXHRcdFx0XHR9ICk7XG5cdFx0XHR9XG5cblx0XHRcdHJldHVybiBjaGlsZDtcblx0XHR9ICk7XG5cdH1cblxuXHRyZXR1cm4ge1xuXHRcdC4uLnRydW5jYXRlUHJvcHMsXG5cdFx0Y2hpbGRyZW46IHRydW5jYXRlID8gdHJ1bmNhdGVQcm9wcy5jaGlsZHJlbiA6IGNvbnRlbnQsXG5cdH07XG59XG4iXX0= */\");\n sx.upperCase = _ref;\n sx.optimalTextColor = null;\n if (optimizeReadabilityFor) {\n const isOptimalTextColorDark = getOptimalTextShade(optimizeReadabilityFor) === 'dark';\n\n // Should not use theme colors\n sx.optimalTextColor = isOptimalTextColorDark ? /*#__PURE__*/css({\n color: COLORS.gray[900]\n }, process.env.NODE_ENV === \"production\" ? \"\" : \";label:sx-optimalTextColor;\", process.env.NODE_ENV === \"production\" ? \"\" : \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBNEdNIiwiZmlsZSI6Imhvb2sudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgdHlwZSB7IFNlcmlhbGl6ZWRTdHlsZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogV29yZFByZXNzIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyB1c2VNZW1vLCBDaGlsZHJlbiwgY2xvbmVFbGVtZW50IH0gZnJvbSAnQHdvcmRwcmVzcy9l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IGNoaWxkcmVuICkgKSB7XG5cdFx0Y29udGVudCA9IENoaWxkcmVuLm1hcCggY2hpbGRyZW4sICggY2hpbGQgKSA9PiB7XG5cdFx0XHRpZiAoXG5cdFx0XHRcdHR5cGVvZiBjaGlsZCAhPT0gJ29iamVjdCcgfHxcblx0XHRcdFx0Y2hpbGQgPT09IG51bGwgfHxcblx0XHRcdFx0ISAoICdwcm9wcycgaW4gY2hpbGQgKVxuXHRcdFx0KSB7XG5cdFx0XHRcdHJldHVybiBjaGlsZDtcblx0XHRcdH1cblxuXHRcdFx0Y29uc3QgaXNMaW5rID0gaGFzQ29ubmVjdE5hbWVzcGFjZSggY2hpbGQsIFsgJ0xpbmsnIF0gKTtcblx0XHRcdGlmICggaXNMaW5rICkge1xuXHRcdFx0XHRyZXR1cm4gY2xvbmVFbGVtZW50KCBjaGlsZCwge1xuXHRcdFx0XHRcdHNpemU6IGNoaWxkLnByb3BzLnNpemUgfHwgJ2luaGVyaXQnLFxuXHRcdFx0XHR9ICk7XG5cdFx0XHR9XG5cblx0XHRcdHJldHVybiBjaGlsZDtcblx0XHR9ICk7XG5cdH1cblxuXHRyZXR1cm4ge1xuXHRcdC4uLnRydW5jYXRlUHJvcHMsXG5cdFx0Y2hpbGRyZW46IHRydW5jYXRlID8gdHJ1bmNhdGVQcm9wcy5jaGlsZHJlbiA6IGNvbnRlbnQsXG5cdH07XG59XG4iXX0= */\") : /*#__PURE__*/css({\n color: COLORS.white\n }, process.env.NODE_ENV === \"production\" ? \"\" : \";label:sx-optimalTextColor;\", process.env.NODE_ENV === \"production\" ? \"\" : \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBNkdNIiwiZmlsZSI6Imhvb2sudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbX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bGlwc2l6ZU1vZGUsXG5cdH07XG5cblx0Y29uc3QgdHJ1bmNhdGVQcm9wcyA9IHVzZVRydW5jYXRlKCBmaW5hbENvbXBvbmVudFByb3BzICk7XG5cblx0LyoqXG5cdCAqIEVuaGFuY2UgY2hpbGQgYDxMaW5rIC8+YCBjb21wb25lbnRzIHRvIGluaGVyaXQgZm9udCBzaXplLlxuXHQgKi9cblx0aWYgKCAhIHRydW5jYXRlICYmIEFycmF5LmlzQXJyYXkoIGNoaWxkcmVuICkgKSB7XG5cdFx0Y29udGVudCA9IENoaWxkcmVuLm1hcCggY2hpbGRyZW4sICggY2hpbGQgKSA9PiB7XG5cdFx0XHRpZiAoXG5cdFx0XHRcdHR5cGVvZiBjaGlsZCAhPT0gJ29iamVjdCcgfHxcblx0XHRcdFx0Y2hpbGQgPT09IG51bGwgfHxcblx0XHRcdFx0ISAoICdwcm9wcycgaW4gY2hpbGQgKVxuXHRcdFx0KSB7XG5cdFx0XHRcdHJldHVybiBjaGlsZDtcblx0XHRcdH1cblxuXHRcdFx0Y29uc3QgaXNMaW5rID0gaGFzQ29ubmVjdE5hbWVzcGFjZSggY2hpbGQsIFsgJ0xpbmsnIF0gKTtcblx0XHRcdGlmICggaXNMaW5rICkge1xuXHRcdFx0XHRyZXR1cm4gY2xvbmVFbGVtZW50KCBjaGlsZCwge1xuXHRcdFx0XHRcdHNpemU6IGNoaWxkLnByb3BzLnNpemUgfHwgJ2luaGVyaXQnLFxuXHRcdFx0XHR9ICk7XG5cdFx0XHR9XG5cblx0XHRcdHJldHVybiBjaGlsZDtcblx0XHR9ICk7XG5cdH1cblxuXHRyZXR1cm4ge1xuXHRcdC4uLnRydW5jYXRlUHJvcHMsXG5cdFx0Y2hpbGRyZW46IHRydW5jYXRlID8gdHJ1bmNhdGVQcm9wcy5jaGlsZHJlbiA6IGNvbnRlbnQsXG5cdH07XG59XG4iXX0= */\");\n }\n return cx(styles.Text, sx.Base, sx.optimalTextColor, isDestructive && styles.destructive, !!isHighlighter && styles.highlighterText, isBlock && styles.block, isCaption && styles.muted, variant && styles[variant], upperCase && sx.upperCase, className);\n }, [adjustLineHeightForInnerControls, align, className, color, cx, display, isBlock, isCaption, isDestructive, isHighlighter, letterSpacing, lineHeightProp, optimizeReadabilityFor, size, upperCase, variant, weight]);\n let finalEllipsizeMode;\n if (truncate === true) {\n finalEllipsizeMode = 'auto';\n }\n if (truncate === false) {\n finalEllipsizeMode = 'none';\n }\n const finalComponentProps = {\n ...otherProps,\n className: classes,\n children,\n ellipsizeMode: ellipsizeMode || finalEllipsizeMode\n };\n const truncateProps = useTruncate(finalComponentProps);\n\n /**\n * Enhance child `<Link />` components to inherit font size.\n */\n if (!truncate && Array.isArray(children)) {\n content = Children.map(children, child => {\n if (typeof child !== 'object' || child === null || !('props' in child)) {\n return child;\n }\n const isLink = hasConnectNamespace(child, ['Link']);\n if (isLink) {\n return cloneElement(child, {\n size: child.props.size || 'inherit'\n });\n }\n return child;\n });\n }\n return {\n ...truncateProps,\n children: truncate ? truncateProps.children : content\n };\n}","/**\n * Internal dependencies\n */\n\nimport { contextConnect } from '../context';\nimport { View } from '../view';\nimport useText from './hook';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * @param props\n * @param forwardedRef\n */\nfunction UnconnectedText(props, forwardedRef) {\n const textProps = useText(props);\n return /*#__PURE__*/_jsx(View, {\n as: \"span\",\n ...textProps,\n ref: forwardedRef\n });\n}\n\n/**\n * `Text` is a core component that renders text in the library, using the\n * library's typography system.\n *\n * `Text` can be used to render any text-content, like an HTML `p` or `span`.\n *\n * @example\n *\n * ```jsx\n * import { __experimentalText as Text } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn <Text>Code is Poetry</Text>;\n * }\n * ```\n */\nexport const Text = contextConnect(UnconnectedText, 'Text');\nexport default Text;","/**\n * External dependencies\n */\n\nconst ALIGNMENTS = {\n bottom: {\n alignItems: 'flex-end',\n justifyContent: 'center'\n },\n bottomLeft: {\n alignItems: 'flex-start',\n justifyContent: 'flex-end'\n },\n bottomRight: {\n alignItems: 'flex-end',\n justifyContent: 'flex-end'\n },\n center: {\n alignItems: 'center',\n justifyContent: 'center'\n },\n spaced: {\n alignItems: 'center',\n justifyContent: 'space-between'\n },\n left: {\n alignItems: 'center',\n justifyContent: 'flex-start'\n },\n right: {\n alignItems: 'center',\n justifyContent: 'flex-end'\n },\n stretch: {\n alignItems: 'stretch'\n },\n top: {\n alignItems: 'flex-start',\n justifyContent: 'center'\n },\n topLeft: {\n alignItems: 'flex-start',\n justifyContent: 'flex-start'\n },\n topRight: {\n alignItems: 'flex-start',\n justifyContent: 'flex-end'\n }\n};\nexport function getAlignmentProps(alignment) {\n const alignmentProps = alignment ? ALIGNMENTS[alignment] : {};\n return alignmentProps;\n}","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nimport { useContextSystem } from '../context';\nimport { getAlignmentProps } from './utils';\nimport { useResponsiveValue } from '../utils/use-responsive-value';\nimport CONFIG from '../utils/config-values';\nimport { useCx } from '../utils/hooks/use-cx';\nexport default function useGrid(props) {\n const {\n align,\n alignment,\n className,\n columnGap,\n columns = 2,\n gap = 3,\n isInline = false,\n justify,\n rowGap,\n rows,\n templateColumns,\n templateRows,\n ...otherProps\n } = useContextSystem(props, 'Grid');\n const columnsAsArray = Array.isArray(columns) ? columns : [columns];\n const column = useResponsiveValue(columnsAsArray);\n const rowsAsArray = Array.isArray(rows) ? rows : [rows];\n const row = useResponsiveValue(rowsAsArray);\n const gridTemplateColumns = templateColumns || !!columns && `repeat( ${column}, 1fr )`;\n const gridTemplateRows = templateRows || !!rows && `repeat( ${row}, 1fr )`;\n const cx = useCx();\n const classes = useMemo(() => {\n const alignmentProps = getAlignmentProps(alignment);\n const gridClasses = /*#__PURE__*/css({\n alignItems: align,\n display: isInline ? 'inline-grid' : 'grid',\n gap: `calc( ${CONFIG.gridBase} * ${gap} )`,\n gridTemplateColumns: gridTemplateColumns || undefined,\n gridTemplateRows: gridTemplateRows || undefined,\n gridRowGap: rowGap,\n gridColumnGap: columnGap,\n justifyContent: justify,\n verticalAlign: isInline ? 'middle' : undefined,\n ...alignmentProps\n }, process.env.NODE_ENV === \"production\" ? \"\" : \";label:gridClasses;\", process.env.NODE_ENV === \"production\" ? \"\" : \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBdURzQiIsImZpbGUiOiJob29rLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIFdvcmRQcmVzcyBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgdXNlTWVtbyB9IGZyb20gJ0B3b3JkcHJlc3MvZWxlbWVudCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB0eXBlIHsgV29yZFByZXNzQ29tcG9uZW50UHJvcHMgfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IHVzZUNvbnRleHRTeXN0ZW0gfSBmcm9tICcuLi9jb250ZXh0JztcbmltcG9ydCB7IGdldEFsaWdubWVudFByb3BzIH0gZnJvbSAnLi91dGlscyc7XG5pbXBvcnQgeyB1c2VSZXNwb25zaXZlVmFsdWUgfSBmcm9tICcuLi91dGlscy91c2UtcmVzcG9uc2l2ZS12YWx1ZSc7XG5pbXBvcnQgQ09ORklHIGZyb20gJy4uL3V0aWxzL2NvbmZpZy12YWx1ZXMnO1xuaW1wb3J0IHsgdXNlQ3ggfSBmcm9tICcuLi91dGlscy9ob29rcy91c2UtY3gnO1xuaW1wb3J0IHR5cGUgey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yxcblx0XHRpc0lubGluZSxcblx0XHRqdXN0aWZ5LFxuXHRcdHJvd0dhcCxcblx0XSApO1xuXG5cdHJldHVybiB7IC4uLm90aGVyUHJvcHMsIGNsYXNzTmFtZTogY2xhc3NlcyB9O1xufVxuIl19 */\");\n return cx(gridClasses, className);\n }, [align, alignment, className, columnGap, cx, gap, gridTemplateColumns, gridTemplateRows, isInline, justify, rowGap]);\n return {\n ...otherProps,\n className: classes\n };\n}","/**\n * External dependencies\n */\n\n/**\n * Internal dependencies\n */\n\nimport { contextConnect } from '../context';\nimport { View } from '../view';\nimport useGrid from './hook';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnconnectedGrid(props, forwardedRef) {\n const gridProps = useGrid(props);\n return /*#__PURE__*/_jsx(View, {\n ...gridProps,\n ref: forwardedRef\n });\n}\n\n/**\n * `Grid` is a primitive layout component that can arrange content in a grid configuration.\n *\n * ```jsx\n * import {\n * \t__experimentalGrid as Grid,\n * \t__experimentalText as Text\n * } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<Grid columns={ 3 }>\n * \t\t\t<Text>Code</Text>\n * \t\t\t<Text>is</Text>\n * \t\t\t<Text>Poetry</Text>\n * \t\t</Grid>\n * \t);\n * }\n * ```\n */\nexport const Grid = contextConnect(UnconnectedGrid, 'Grid');\nexport default Grid;","/* eslint-disable @wordpress/no-unsafe-wp-apis */\nimport { __experimentalGrid as Grid, __experimentalText as Text } from '@wordpress/components';\nimport { Fragment } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Stack } from '@wordpress/ui';\nimport clsx from 'clsx';\nimport { useContext, useMemo } from 'react';\nimport { Legend } from '../../components/legend';\nimport { usePrefersReducedMotion } from '../../hooks';\nimport { GlobalChartsContext, GlobalChartsProvider, useChartId, useChartRegistration, useGlobalChartsContext, useGlobalChartsTheme } from '../../providers';\nimport { formatMetricValue, attachSubComponents } from '../../utils';\nimport { useChartChildren } from '../private/chart-composition';\nimport { ChartLayout } from '../private/chart-layout';\nimport { SingleChartContext } from '../private/single-chart-context';\nimport { withResponsive } from '../private/with-responsive';\nimport { useLeaderboardLegendItems } from './hooks';\nimport styles from './leaderboard-chart.module.scss';\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Default value formatter using formatMetricValue\n *\n * @param value - The numeric value to format\n * @return Formatted string representation of the value\n */\nconst defaultValueFormatter = value => {\n return formatMetricValue(value, 'number', {\n useMultipliers: true,\n decimals: 1\n });\n};\n\n/**\n * Default delta formatter using formatMetricValue\n *\n * @param value - The delta value to format\n * @return Formatted percentage string\n */\nconst defaultDeltaFormatter = value => {\n return formatMetricValue(value / 100, 'average', {\n decimals: 0,\n signDisplay: 'exceptZero'\n });\n};\nconst BarLabel = ({\n label\n}) => /*#__PURE__*/_jsx(_Fragment, {\n children: typeof label === 'string' ? /*#__PURE__*/_jsx(Text, {\n className: styles.label,\n children: label\n }) : label\n});\nconst BarWithLabel = ({\n entry,\n withComparison,\n withOverlayLabel,\n primaryColor,\n secondaryColor,\n animation,\n isPrimaryVisible = true,\n isComparisonVisible = true\n}) => /*#__PURE__*/_jsxs(\"div\", {\n className: clsx(styles.barWithLabelContainer, {\n [styles['is-overlay']]: withOverlayLabel\n }),\n children: [/*#__PURE__*/_jsx(BarLabel, {\n label: entry.label\n }), isPrimaryVisible && /*#__PURE__*/_jsx(\"div\", {\n className: clsx(styles.bar, {\n [styles['bar--animated']]: animation\n }),\n style: {\n width: entry.currentShare + '%',\n backgroundColor: primaryColor\n }\n }), withComparison && !withOverlayLabel && isComparisonVisible && /*#__PURE__*/_jsx(\"div\", {\n className: clsx(styles.bar, {\n [styles['bar--animated']]: animation\n }),\n style: {\n width: entry.previousShare + '%',\n backgroundColor: secondaryColor\n }\n })]\n});\n\n/**\n * LeaderboardChart component displays a ranked list of data with progress bars\n * and optional comparison values.\n *\n * @param props - Component props\n * @param props.data - Array of leaderboard entries to display\n * @param props.chartId - Optional unique identifier for the chart\n * @param props.width - Optional width of the chart container in pixels\n * @param props.height - Optional height of the chart container in pixels\n * @param props.withComparison - Whether to show comparison data\n * @param props.withOverlayLabel - Whether to overlay the label on top of the bar\n * @param props.primaryColor - Primary color for current period bars\n * @param props.secondaryColor - Secondary color for comparison period bars\n * @param props.valueFormatter - Custom formatter for values\n * @param props.deltaFormatter - Custom formatter for delta values\n * @param props.loading - Whether the chart is in loading state\n * @param props.animation - Whether the chart should animate on load\n * @param props.showLegend - Whether to show legend\n * @param props.legend - Legend configuration (orientation, position, alignment, shape, shapeStyles, interactive)\n * @param props.legendLabels - Custom labels for legend items\n * @param props.gap - Spacing between legend and chart content\n * @param props.children - Child components for composition API\n * @param props.className - Additional CSS class name\n * @param props.style - Custom styling for the chart container\n * @return JSX element representing the leaderboard chart\n */\nconst LeaderboardChartInternal = ({\n data,\n chartId: providedChartId,\n width: propWidth,\n height: propHeight,\n withComparison = false,\n withOverlayLabel = false,\n primaryColor,\n secondaryColor,\n valueFormatter = defaultValueFormatter,\n deltaFormatter = defaultDeltaFormatter,\n animation,\n loading = false,\n showLegend = false,\n legend = {},\n legendLabels,\n gap = 'md',\n className,\n style,\n children\n}) => {\n const legendInteractive = legend.interactive ?? false;\n const legendPosition = legend.position ?? 'bottom';\n const chartId = useChartId(providedChartId);\n const {\n leaderboardChart: leaderboardChartSettings\n } = useGlobalChartsTheme();\n const legendShapeStyles = {\n width: 8,\n height: 8,\n ...legend.shapeStyles\n };\n\n // Process children to extract compound components\n const {\n legendChildren,\n nonLegendChildren\n } = useChartChildren(children, 'LeaderboardChart');\n const {\n labelSpacing,\n rowGap,\n columnGap,\n primaryColor: settingsPrimaryColor,\n secondaryColor: settingsSecondaryColor,\n deltaColors\n } = leaderboardChartSettings;\n const {\n getElementStyles,\n isSeriesVisible\n } = useGlobalChartsContext();\n const {\n color: resolvedPrimaryColor\n } = getElementStyles({\n index: 0,\n overrideColor: primaryColor || settingsPrimaryColor\n });\n const {\n color: resolvedSecondaryColor\n } = getElementStyles({\n index: 1,\n overrideColor: secondaryColor || settingsSecondaryColor\n });\n\n // Create legend items using the custom hook\n const legendItems = useLeaderboardLegendItems({\n data: data || [],\n primaryColor,\n secondaryColor,\n withComparison,\n withOverlayLabel,\n legendLabels\n });\n\n // Track visibility of primary and comparison series for interactive legends\n const isPrimaryVisible = useMemo(() => {\n if (!chartId || !legendInteractive || legendItems.length === 0) {\n return true;\n }\n return isSeriesVisible(chartId, legendItems[0].label);\n }, [chartId, legendInteractive, legendItems, isSeriesVisible]);\n const isComparisonVisible = useMemo(() => {\n if (!chartId || !legendInteractive || legendItems.length < 2) {\n return true;\n }\n return isSeriesVisible(chartId, legendItems[1].label);\n }, [chartId, legendInteractive, legendItems, isSeriesVisible]);\n\n // Check if all series are hidden\n const allSeriesHidden = useMemo(() => {\n if (!legendInteractive) return false;\n if (withComparison && !withOverlayLabel) {\n return !isPrimaryVisible && !isComparisonVisible;\n }\n return !isPrimaryVisible;\n }, [legendInteractive, isPrimaryVisible, isComparisonVisible, withComparison, withOverlayLabel]);\n\n // Validate data\n const isDataValid = Boolean(data && data.length > 0);\n\n // Memoize metadata to prevent unnecessary re-registration\n const chartMetadata = useMemo(() => ({\n withComparison,\n withOverlayLabel\n }), [withComparison, withOverlayLabel]);\n\n // Register chart with context\n useChartRegistration({\n chartId,\n legendItems,\n chartType: 'leaderboard',\n isDataValid,\n metadata: chartMetadata\n });\n const prefersReducedMotion = usePrefersReducedMotion();\n\n // Handle empty or undefined data\n if (!data || data.length === 0) {\n return /*#__PURE__*/_jsx(SingleChartContext.Provider, {\n value: {\n chartId\n },\n children: /*#__PURE__*/_jsx(ChartLayout, {\n legendPosition: legendPosition,\n legendElement: false,\n legendChildren: legendChildren,\n className: clsx(styles.leaderboardChart, {\n [styles['leaderboardChart--responsive']]: !propWidth && !propHeight,\n [styles['leaderboardChart--loading']]: loading\n }, className),\n gap: gap,\n style: {\n ...style,\n width: propWidth || undefined,\n height: propHeight || undefined\n },\n trailingContent: nonLegendChildren,\n children: /*#__PURE__*/_jsx(\"div\", {\n className: styles.emptyState,\n children: loading ? __('Loading…', 'jetpack-charts') : __('No data available', 'jetpack-charts')\n })\n })\n });\n }\n const legendElement = showLegend && /*#__PURE__*/_jsx(Legend, {\n orientation: legend.orientation ?? 'horizontal',\n position: legendPosition,\n alignment: legend.alignment ?? 'center',\n labelStyles: legend.labelStyles,\n itemClassName: legend.itemClassName,\n itemStyles: legend.itemStyles,\n shape: legend.shape ?? 'circle',\n shapeStyles: legendShapeStyles,\n chartId: chartId,\n interactive: legendInteractive\n });\n return /*#__PURE__*/_jsx(SingleChartContext.Provider, {\n value: {\n chartId\n },\n children: /*#__PURE__*/_jsx(ChartLayout, {\n legendPosition: legendPosition,\n legendElement: legendElement,\n legendChildren: legendChildren,\n className: clsx(styles.leaderboardChart, {\n [styles['leaderboardChart--responsive']]: !propWidth && !propHeight,\n [styles['leaderboardChart--loading']]: loading\n }, className),\n gap: gap,\n style: {\n ...style,\n width: propWidth || undefined,\n height: propHeight || undefined\n },\n trailingContent: nonLegendChildren,\n children: /*#__PURE__*/_jsx(\"div\", {\n className: styles.leaderboardChart__content,\n children: allSeriesHidden ? /*#__PURE__*/_jsx(\"div\", {\n className: styles.emptyState,\n children: __('All series are hidden. Click legend items to show data.', 'jetpack-charts')\n }) : /*#__PURE__*/_jsx(Grid, {\n templateColumns: \"minmax(0, 1fr) auto\",\n rowGap: rowGap,\n columnGap: columnGap,\n children: data.map(entry => {\n const colorIndex = Math.sign(entry.delta) + 1;\n const deltaColor = deltaColors[colorIndex];\n return /*#__PURE__*/_jsxs(Fragment, {\n children: [/*#__PURE__*/_jsx(Stack, {\n direction: \"column\",\n gap: labelSpacing,\n children: /*#__PURE__*/_jsx(BarWithLabel, {\n entry: entry,\n withComparison: withComparison,\n withOverlayLabel: withOverlayLabel,\n primaryColor: resolvedPrimaryColor,\n secondaryColor: resolvedSecondaryColor,\n isPrimaryVisible: isPrimaryVisible,\n isComparisonVisible: isComparisonVisible,\n animation: animation && !loading && !prefersReducedMotion\n })\n }), /*#__PURE__*/_jsxs(Stack, {\n direction: \"row\",\n gap: \"xs\",\n className: clsx(styles.valueContainer, {\n [styles.overlayLabel]: withOverlayLabel\n }),\n children: [isPrimaryVisible && /*#__PURE__*/_jsx(Text, {\n children: valueFormatter(entry.currentValue)\n }), withComparison && isComparisonVisible && /*#__PURE__*/_jsx(Text, {\n style: {\n color: deltaColor\n },\n children: deltaFormatter(entry.delta)\n })]\n })]\n }, entry.id);\n })\n })\n })\n })\n });\n};\nconst LeaderboardChartWithProvider = props => {\n const existingContext = useContext(GlobalChartsContext);\n\n // If we're already in a GlobalChartsProvider context, don't create a new one\n if (existingContext) {\n return /*#__PURE__*/_jsx(LeaderboardChartInternal, {\n ...props\n });\n }\n\n // Otherwise, create our own GlobalChartsProvider\n return /*#__PURE__*/_jsx(GlobalChartsProvider, {\n children: /*#__PURE__*/_jsx(LeaderboardChartInternal, {\n ...props\n })\n });\n};\nLeaderboardChartWithProvider.displayName = 'LeaderboardChart';\n\n// Create LeaderboardChart with composition API\nconst LeaderboardChart = attachSubComponents(LeaderboardChartWithProvider, {\n Legend: Legend\n});\n\n// Create responsive LeaderboardChart with composition API\nconst LeaderboardChartResponsive = attachSubComponents(withResponsive(LeaderboardChartWithProvider), {\n Legend: Legend\n});\nexport { LeaderboardChartResponsive as default, LeaderboardChart as LeaderboardChartUnresponsive };","import { __ } from '@wordpress/i18n';\nimport { useMemo } from 'react';\nimport { useGlobalChartsTheme, useGlobalChartsContext } from '../../../providers';\nimport type { BaseLegendItem } from '../../../components/legend';\nimport type { LeaderboardEntry } from '../../../types';\n\n/**\n * Hook to create legend items from leaderboard data\n * @param root0 - Configuration object\n * @param root0.data - Array of leaderboard entries\n * @param root0.primaryColor - Primary color override\n * @param root0.secondaryColor - Secondary color override\n * @param root0.withComparison - Whether comparison data is shown\n * @param root0.withOverlayLabel - Whether to overlay the label on top of the bar\n * @param root0.legendLabels - Custom labels for legend items\n * @param root0.legendLabels.primary - Label for primary period data\n * @param root0.legendLabels.comparison - Label for comparison period data\n * @return Array of legend items for the leaderboard chart\n */\nexport function useLeaderboardLegendItems( {\n\tdata,\n\tprimaryColor,\n\tsecondaryColor,\n\twithComparison = false,\n\twithOverlayLabel = false,\n\tlegendLabels,\n}: {\n\tdata: LeaderboardEntry[];\n\tprimaryColor?: string;\n\tsecondaryColor?: string;\n\twithComparison: boolean;\n\twithOverlayLabel: boolean;\n\tlegendLabels?: {\n\t\tprimary?: string;\n\t\tcomparison?: string;\n\t};\n} ): BaseLegendItem[] {\n\tconst { leaderboardChart: leaderboardChartSettings } = useGlobalChartsTheme();\n\tconst { getElementStyles } = useGlobalChartsContext();\n\n\treturn useMemo( () => {\n\t\tif ( ! data || data.length === 0 ) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst items: BaseLegendItem[] = [];\n\n\t\t// Add current period legend item\n\t\tconst { color: resolvedPrimaryColor } = getElementStyles( {\n\t\t\tindex: 0,\n\t\t\toverrideColor: primaryColor || leaderboardChartSettings.primaryColor,\n\t\t} );\n\n\t\titems.push( {\n\t\t\tlabel: legendLabels?.primary || __( 'Current period', 'jetpack-charts' ),\n\t\t\tcolor: resolvedPrimaryColor,\n\t\t} );\n\n\t\t// Add comparison period legend item if comparison is enabled and overlay label is not enabled\n\t\tif ( withComparison && ! withOverlayLabel ) {\n\t\t\tconst { color: resolvedSecondaryColor } = getElementStyles( {\n\t\t\t\tindex: 1,\n\t\t\t\toverrideColor: secondaryColor || leaderboardChartSettings.secondaryColor,\n\t\t\t} );\n\n\t\t\titems.push( {\n\t\t\t\tlabel: legendLabels?.comparison || __( 'Previous period', 'jetpack-charts' ),\n\t\t\t\tcolor: resolvedSecondaryColor,\n\t\t\t} );\n\t\t}\n\n\t\treturn items;\n\t}, [\n\t\tdata,\n\t\tprimaryColor,\n\t\tsecondaryColor,\n\t\twithComparison,\n\t\tlegendLabels,\n\t\tleaderboardChartSettings,\n\t\tgetElementStyles,\n\t\twithOverlayLabel,\n\t] );\n}\n","import 'css-chunk:src/charts/leaderboard-chart/leaderboard-chart.module.scss';export default {\n \"leaderboardChart\": \"a8ccharts-V3NYDq\",\n \"leaderboardChart--responsive\": \"a8ccharts-WHNERS\",\n \"leaderboardChart--loading\": \"a8ccharts-JQbl6A\",\n \"leaderboardChart__content\": \"a8ccharts-Ml1kKc\",\n \"barWithLabelContainer\": \"a8ccharts-ETItHW\",\n \"is-overlay\": \"a8ccharts-oA4hdH\",\n \"label\": \"a8ccharts-UciQnF\",\n \"bar\": \"a8ccharts-np8f0T\",\n \"bar--animated\": \"a8ccharts-zq3CmS\",\n \"stretch\": \"a8ccharts-D0Q3w1\",\n \"valueContainer\": \"a8ccharts-B6VcRn\",\n \"overlayLabel\": \"a8ccharts-GB7tyM\",\n \"emptyState\": \"a8ccharts-E0K4Hr\"\n};","import { formatNumberCompact, formatNumber } from '@automattic/number-formatters';\nimport { curveCatmullRom, curveLinear, curveMonotoneX } from '@visx/curve';\nimport { LinearGradient } from '@visx/gradient';\nimport { scaleTime } from '@visx/scale';\nimport { XYChart, AreaSeries, Grid, Axis, DataContext } from '@visx/xychart';\nimport { __ } from '@wordpress/i18n';\nimport clsx from 'clsx';\nimport { differenceInHours, differenceInYears } from 'date-fns';\nimport { useMemo, useContext, forwardRef, useImperativeHandle, useState, useRef, useCallback, createElement as _createElement } from 'react';\nimport { Legend, useChartLegendItems } from '../../components/legend';\nimport { AccessibleTooltip, useKeyboardNavigation } from '../../components/tooltip';\nimport { useXYChartTheme, useChartDataTransform, useChartMargin, usePrefersReducedMotion } from '../../hooks';\nimport { GlobalChartsProvider, GlobalChartsContext, useChartId, useChartRegistration, useGlobalChartsContext, useGlobalChartsTheme } from '../../providers';\nimport { attachSubComponents } from '../../utils';\nimport { useChartChildren } from '../private/chart-composition';\nimport { ChartLayout } from '../private/chart-layout';\nimport { DefaultGlyph } from '../private/default-glyph';\nimport { SingleChartContext } from '../private/single-chart-context';\nimport { SvgEmptyState } from '../private/svg-empty-state';\nimport { withResponsive } from '../private/with-responsive';\nimport styles from './line-chart.module.scss';\nimport { LineChartAnnotation, LineChartAnnotationsOverlay, LineChartGlyph } from './private';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst X_TICK_WIDTH = 60;\nconst defaultRenderGlyph = props => {\n return /*#__PURE__*/_createElement(DefaultGlyph, {\n ...props,\n key: props.key\n });\n};\nconst toNumber = val => {\n const num = typeof val === 'number' ? val : parseFloat(val);\n return isNaN(num) ? undefined : num;\n};\n\n/**\n * Determines the curve type for the line chart based on the provided type and smoothing parameters\n *\n * @param {CurveType} type - The explicit curve type to use\n * @param {boolean} smoothing - Legacy smoothing parameter\n * @return The curve function to use for the line\n */\nconst getCurveType = (type, smoothing) => {\n // If no type specified, use legacy smoothing behavior\n if (!type) {\n return smoothing ? curveCatmullRom : curveLinear;\n }\n\n // Handle explicit curve types\n switch (type) {\n case 'smooth':\n return curveCatmullRom;\n case 'monotone':\n return curveMonotoneX;\n case 'linear':\n return curveLinear;\n default:\n return curveLinear;\n }\n};\nconst renderDefaultTooltip = params => {\n const {\n tooltipData\n } = params;\n const nearestDatum = tooltipData?.nearestDatum?.datum;\n if (!nearestDatum) return null;\n const tooltipPoints = Object.entries(tooltipData?.datumByKey || {}).map(([key, {\n datum\n }]) => ({\n key,\n value: datum.value\n })).sort((a, b) => b.value - a.value);\n return /*#__PURE__*/_jsxs(\"div\", {\n className: styles['line-chart__tooltip'],\n children: [/*#__PURE__*/_jsx(\"div\", {\n className: styles['line-chart__tooltip-date'],\n children: nearestDatum.date?.toLocaleDateString()\n }), tooltipPoints.map(point => /*#__PURE__*/_jsxs(\"div\", {\n className: styles['line-chart__tooltip-row'],\n children: [/*#__PURE__*/_jsxs(\"span\", {\n className: styles['line-chart__tooltip-label'],\n children: [point.key, \":\"]\n }), /*#__PURE__*/_jsx(\"span\", {\n className: styles['line-chart__tooltip-value'],\n children: formatNumber(point.value)\n })]\n }, point.key))]\n });\n};\nconst formatYearTick = timestamp => {\n const date = new Date(timestamp);\n return date.toLocaleDateString(undefined, {\n year: 'numeric'\n });\n};\nconst formatDateTick = timestamp => {\n const date = new Date(timestamp);\n return date.toLocaleDateString(undefined, {\n month: 'short',\n day: 'numeric'\n });\n};\nconst formatHourTick = timestamp => {\n const date = new Date(timestamp);\n return date.toLocaleTimeString(undefined, {\n hour: 'numeric',\n hour12: true\n });\n};\nconst getFormatter = sortedData => {\n const minX = Math.min(...sortedData.map(datom => datom.data.at(0)?.date));\n const maxX = Math.max(...sortedData.map(datom => datom.data.at(-1)?.date));\n const diffInHours = Math.abs(differenceInHours(maxX, minX));\n if (diffInHours <= 24) {\n return formatHourTick;\n }\n const diffInYears = Math.abs(differenceInYears(maxX, minX));\n if (diffInYears <= 1) {\n return formatDateTick;\n }\n return formatYearTick;\n};\nconst guessOptimalNumTicks = (data, chartWidth, tickFormatter) => {\n const minX = Math.min(...data.map(datom => datom.data.at(0)?.date));\n const maxX = Math.max(...data.map(datom => datom.data.at(-1)?.date));\n const xScale = scaleTime({\n domain: [minX, maxX]\n });\n\n // Calculate upper bound of tick numbers based on data points and chart width\n const upperBound = Math.min(data[0]?.data.length || 3,\n // A sane fallback to avoid NaN when no data is present\n Math.ceil(chartWidth / X_TICK_WIDTH));\n let secondBestGuess = 1; // a tick number that's no greater than upperBound\n\n for (let numTicks = upperBound; numTicks > 1; --numTicks) {\n const ticks = xScale.ticks(numTicks).map(d => tickFormatter(d.getTime()));\n\n // The .ticks() function doesn't properly respect the requested number of ticks, so we need to check the length\n if (ticks.length > upperBound) {\n continue;\n }\n secondBestGuess = Math.max(secondBestGuess, ticks.length);\n const uniqueTicks = Array.from(new Set(ticks));\n if (uniqueTicks.length === 1) {\n // All ticks are the same, so skip further processing\n return 1;\n }\n\n // Example: OCT 1 JAN 1 APR 1 JUL 1 OCT 1\n // Here, the two OCTs are not duplicates as they represent October of two different years.\n const hasConsecutiveDuplicate = ticks.some((tick, idx) => idx > 0 && tick === ticks[idx - 1]);\n if (hasConsecutiveDuplicate) {\n continue;\n }\n return ticks.length;\n }\n return secondBestGuess;\n};\nconst validateData = data => {\n if (!data?.length) return 'No data available';\n const hasInvalidData = data.some(series => series.data.some(point => isNaN(point.value) || point.value === null || point.value === undefined || 'date' in point && point.date && isNaN(point.date.getTime())));\n if (hasInvalidData) return 'Invalid data';\n return null;\n};\n\n// Inner component to access DataContext and provide scale data to ref\nconst LineChartScalesRef = ({\n chartRef,\n width,\n height,\n margin\n}) => {\n const context = useContext(DataContext);\n useImperativeHandle(chartRef, () => ({\n getScales: () => {\n if (!context?.xScale || !context?.yScale) {\n return null;\n }\n return {\n xScale: context.xScale,\n yScale: context.yScale\n };\n },\n getChartDimensions: () => ({\n width,\n height,\n margin: margin || {}\n })\n }), [context, width, height, margin]);\n return null; // This component only provides the ref interface\n};\nconst LineChartInternal = /*#__PURE__*/forwardRef(({\n data,\n chartId: providedChartId,\n width,\n height,\n className,\n margin,\n withTooltips = true,\n withTooltipCrosshairs,\n showLegend = false,\n legend = {},\n renderGlyph = defaultRenderGlyph,\n glyphStyle = {},\n withLegendGlyph = false,\n withGradientFill = false,\n smoothing = true,\n curveType,\n renderTooltip = renderDefaultTooltip,\n withStartGlyphs = false,\n withEndGlyphs = false,\n animation,\n options = {},\n onPointerDown = undefined,\n onPointerUp = undefined,\n onPointerMove = undefined,\n onPointerOut = undefined,\n children,\n gridVisibility,\n gap = 'md'\n}, ref) => {\n const legendInteractive = legend.interactive ?? false;\n const legendShape = legend.shape ?? 'line';\n const legendPosition = legend.position ?? 'bottom';\n const providerTheme = useGlobalChartsTheme();\n const theme = useXYChartTheme(data);\n const chartId = useChartId(providedChartId);\n const chartRef = useRef(null);\n const [selectedIndex, setSelectedIndex] = useState(undefined);\n const [isNavigating, setIsNavigating] = useState(false);\n const internalChartRef = useRef(null);\n\n // Process children for composition API (Legend, etc.)\n const {\n legendChildren,\n nonLegendChildren\n } = useChartChildren(children, 'LineChart');\n const [measuredChartHeight, setMeasuredChartHeight] = useState();\n\n // Callback for ChartLayout to notify us when the measured content height changes.\n // We compute chartHeight the same way the render prop does so the context stays in sync.\n const handleContentHeightChange = useCallback(contentHeight => {\n const chartHeight = contentHeight > 0 ? contentHeight : height;\n setMeasuredChartHeight(chartHeight);\n }, [height]);\n\n // Forward the external ref to the internal ref\n useImperativeHandle(ref, () => ({\n getScales: () => internalChartRef.current?.getScales() || null,\n getChartDimensions: () => internalChartRef.current?.getChartDimensions() || {\n width: 0,\n height: 0,\n margin: {}\n }\n }), [internalChartRef]);\n const dataSorted = useChartDataTransform(data);\n const {\n getElementStyles,\n isSeriesVisible\n } = useGlobalChartsContext();\n\n // Add visibility information to series when using interactive legends\n const seriesWithVisibility = useMemo(() => {\n if (!chartId || !legendInteractive) {\n return dataSorted.map((series, index) => ({\n series,\n index,\n isVisible: true\n }));\n }\n return dataSorted.map((series, index) => ({\n series,\n index,\n isVisible: isSeriesVisible(chartId, series.label)\n }));\n }, [dataSorted, chartId, isSeriesVisible, legendInteractive]);\n\n // Check if all series are hidden\n const allSeriesHidden = useMemo(() => {\n return seriesWithVisibility.every(({\n isVisible\n }) => !isVisible);\n }, [seriesWithVisibility]);\n\n // Use the keyboard navigation hook\n const {\n tooltipRef,\n onChartFocus,\n onChartBlur,\n onChartKeyDown\n } = useKeyboardNavigation({\n selectedIndex,\n setSelectedIndex,\n isNavigating,\n setIsNavigating,\n chartRef,\n totalPoints: dataSorted[0]?.data.length || 0\n });\n const chartOptions = useMemo(() => {\n const formatter = options?.axis?.x?.tickFormat || getFormatter(dataSorted);\n return {\n axis: {\n x: {\n orientation: 'bottom',\n numTicks: guessOptimalNumTicks(dataSorted, width, formatter),\n tickFormat: formatter,\n display: true,\n ...options?.axis?.x\n },\n y: {\n orientation: 'left',\n numTicks: 4,\n tickFormat: formatNumberCompact,\n display: true,\n ...options?.axis?.y\n }\n },\n xScale: {\n type: 'time',\n ...options?.xScale\n },\n yScale: {\n type: 'linear',\n nice: true,\n zero: false,\n ...options?.yScale\n }\n };\n }, [options, dataSorted, width]);\n const tooltipRenderGlyph = useMemo(() => {\n return props => {\n const seriesIndex = dataSorted.findIndex(series => series.label === props.key || series.data.includes(props.datum));\n const seriesData = dataSorted[seriesIndex];\n const {\n color,\n glyph: themeGlyph\n } = getElementStyles({\n data: seriesData,\n index: seriesIndex\n });\n const propsWithResolvedColor = {\n ...props,\n color\n };\n return themeGlyph ? themeGlyph(propsWithResolvedColor) : renderGlyph(propsWithResolvedColor);\n };\n }, [dataSorted, renderGlyph, getElementStyles]);\n const defaultMargin = useChartMargin(height, chartOptions, dataSorted, theme);\n const error = validateData(dataSorted);\n const isDataValid = !error;\n\n // Memoize legend options to prevent unnecessary re-calculations\n const legendOptions = useMemo(() => ({\n withGlyph: withLegendGlyph,\n glyphSize: Math.max(0, toNumber(glyphStyle?.radius) ?? 4),\n renderGlyph\n }), [withLegendGlyph, glyphStyle?.radius, renderGlyph]);\n\n // Create legend items using the reusable hook\n const legendItems = useChartLegendItems(dataSorted, legendOptions, legendShape);\n\n // Memoize metadata to prevent unnecessary re-registration\n const chartMetadata = useMemo(() => ({\n withGradientFill,\n smoothing,\n curveType,\n withStartGlyphs,\n withEndGlyphs,\n withLegendGlyph\n }), [withGradientFill, smoothing, curveType, withStartGlyphs, withEndGlyphs, withLegendGlyph]);\n\n // Register chart with context only if data is valid\n useChartRegistration({\n chartId,\n legendItems,\n chartType: 'line',\n isDataValid,\n metadata: chartMetadata\n });\n const prefersReducedMotion = usePrefersReducedMotion();\n const accessors = {\n xAccessor: d => d?.date,\n yAccessor: d => d?.value\n };\n\n // Create a custom renderTooltip that includes focus capability\n if (error) {\n return /*#__PURE__*/_jsx(\"div\", {\n className: clsx('line-chart', styles['line-chart']),\n children: error\n });\n }\n const legendElement = showLegend && /*#__PURE__*/_jsx(Legend, {\n orientation: legend.orientation ?? 'horizontal',\n alignment: legend.alignment ?? 'center',\n position: legendPosition,\n labelStyles: legend.labelStyles,\n itemClassName: legend.itemClassName,\n itemStyles: legend.itemStyles,\n shapeStyles: legend.shapeStyles,\n className: styles['line-chart__legend'],\n shape: legendShape,\n chartId: chartId,\n interactive: legendInteractive\n });\n return /*#__PURE__*/_jsx(SingleChartContext.Provider, {\n value: {\n chartId,\n chartRef: internalChartRef,\n chartWidth: width,\n chartHeight: measuredChartHeight || 0\n },\n children: /*#__PURE__*/_jsx(ChartLayout, {\n legendPosition: legendPosition,\n legendElement: legendElement,\n legendChildren: legendChildren,\n gap: gap,\n className: clsx('line-chart', styles['line-chart'], {\n [styles['line-chart--animated']]: animation && !prefersReducedMotion\n }, className),\n style: {\n width,\n height\n },\n trailingContent: nonLegendChildren,\n onContentHeightChange: handleContentHeightChange,\n children: ({\n contentHeight\n }) => {\n // Use the measured height, falling back to the passed height if provided.\n const chartHeight = contentHeight > 0 ? contentHeight : height;\n return /*#__PURE__*/_jsx(\"div\", {\n role: \"grid\",\n \"aria-label\": __('Line chart', 'jetpack-charts'),\n tabIndex: 0,\n onKeyDown: onChartKeyDown,\n onFocus: onChartFocus,\n onBlur: onChartBlur,\n children: chartHeight > 0 && /*#__PURE__*/_jsx(\"div\", {\n ref: chartRef,\n children: /*#__PURE__*/_jsxs(XYChart, {\n theme: theme,\n width: width,\n height: chartHeight,\n margin: {\n ...defaultMargin,\n ...margin\n }\n // xScale and yScale could be set in Axis as well, but they are `scale` props there.\n ,\n xScale: chartOptions.xScale,\n yScale: chartOptions.yScale,\n onPointerDown: onPointerDown,\n onPointerUp: onPointerUp,\n onPointerMove: onPointerMove,\n onPointerOut: onPointerOut,\n pointerEventsDataKey: \"nearest\",\n children: [gridVisibility !== 'none' && /*#__PURE__*/_jsx(Grid, {\n columns: false,\n numTicks: 4\n }), chartOptions.axis.x.display && /*#__PURE__*/_jsx(Axis, {\n ...chartOptions.axis.x\n }), chartOptions.axis.y.display && /*#__PURE__*/_jsx(Axis, {\n ...chartOptions.axis.y\n }), allSeriesHidden ? /*#__PURE__*/_jsx(SvgEmptyState, {\n x: width / 2,\n y: chartHeight / 2,\n width: width,\n height: chartHeight,\n children: __('All series are hidden. Click legend items to show data.', 'jetpack-charts')\n }) : null, seriesWithVisibility.map(({\n series: seriesData,\n index,\n isVisible\n }) => {\n // Skip rendering invisible series\n if (!isVisible) {\n return null;\n }\n const {\n color,\n lineStyles,\n glyph\n } = getElementStyles({\n data: seriesData,\n index\n });\n const lineProps = {\n stroke: color,\n ...lineStyles\n };\n return /*#__PURE__*/_jsxs(\"g\", {\n children: [withGradientFill && /*#__PURE__*/_jsx(LinearGradient, {\n id: `area-gradient-${chartId}-${index + 1}`,\n from: color,\n fromOpacity: 0.4,\n toOpacity: 0.1,\n to: providerTheme.backgroundColor,\n ...seriesData.options?.gradient,\n children: seriesData.options?.gradient?.stops?.map((stop, stopIndex) => /*#__PURE__*/_jsx(\"stop\", {\n offset: stop.offset,\n stopColor: stop.color || color,\n stopOpacity: stop.opacity ?? 1\n }, `${stop.offset}-${stop.color || color}`))\n }), /*#__PURE__*/_jsx(AreaSeries, {\n dataKey: seriesData?.label,\n data: seriesData.data,\n ...accessors,\n fill: withGradientFill ? `url(#area-gradient-${chartId}-${index + 1})` : 'transparent',\n renderLine: true,\n curve: getCurveType(curveType, smoothing),\n lineProps: lineProps\n }, seriesData?.label), withStartGlyphs && /*#__PURE__*/_jsx(LineChartGlyph, {\n index: index,\n data: seriesData,\n color: color,\n renderGlyph: glyph ?? renderGlyph,\n accessors: accessors,\n glyphStyle: glyphStyle,\n position: \"start\"\n }), withEndGlyphs && /*#__PURE__*/_jsx(LineChartGlyph, {\n index: index,\n data: seriesData,\n color: color,\n renderGlyph: glyph ?? renderGlyph,\n accessors: accessors,\n glyphStyle: glyphStyle,\n position: \"end\"\n })]\n }, seriesData?.label || index);\n }), withTooltips && /*#__PURE__*/_jsx(AccessibleTooltip, {\n detectBounds: true,\n snapTooltipToDatumX: true,\n snapTooltipToDatumY: true,\n showSeriesGlyphs: true,\n renderTooltip: renderTooltip,\n renderGlyph: tooltipRenderGlyph,\n glyphStyle: glyphStyle,\n showVerticalCrosshair: withTooltipCrosshairs?.showVertical,\n showHorizontalCrosshair: withTooltipCrosshairs?.showHorizontal,\n selectedIndex: selectedIndex,\n tooltipRef: tooltipRef,\n keyboardFocusedClassName: styles['line-chart__tooltip--keyboard-focused'],\n series: dataSorted\n }), /*#__PURE__*/_jsx(LineChartScalesRef, {\n chartRef: internalChartRef,\n width: width,\n height: height,\n margin: margin\n })]\n })\n })\n });\n }\n })\n });\n});\n\n// Component type definitions for composition API\n\nconst LineChartWithProvider = /*#__PURE__*/forwardRef((props, ref) => {\n const existingContext = useContext(GlobalChartsContext);\n\n // If we're already in a GlobalChartsProvider context, render the core component directly\n if (existingContext) {\n return /*#__PURE__*/_jsx(LineChartInternal, {\n ...props,\n ref: ref\n });\n }\n\n // Otherwise, wrap with our own GlobalChartsProvider\n return /*#__PURE__*/_jsx(GlobalChartsProvider, {\n children: /*#__PURE__*/_jsx(LineChartInternal, {\n ...props,\n ref: ref\n })\n });\n});\nLineChartWithProvider.displayName = 'LineChart';\nconst LineChart = attachSubComponents(LineChartWithProvider, {\n Legend: Legend,\n AnnotationsOverlay: LineChartAnnotationsOverlay,\n Annotation: LineChartAnnotation\n});\nconst LineChartResponsive = attachSubComponents(withResponsive(LineChartWithProvider), {\n Legend: Legend,\n AnnotationsOverlay: LineChartAnnotationsOverlay,\n Annotation: LineChartAnnotation\n});\nexport { LineChartResponsive as default, LineChart as LineChartUnresponsive };","import { DataContext } from '@visx/xychart';\nimport { useContext } from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const DefaultGlyph = props => {\n const {\n theme\n } = useContext(DataContext) || {};\n const position = props.position || 'start';\n return /*#__PURE__*/_jsx(\"circle\", {\n cx: props.x,\n cy: props.y,\n r: props.size,\n fill: props.color,\n stroke: theme?.backgroundColor,\n strokeWidth: 1.5,\n paintOrder: \"fill\",\n ...props.glyphStyle\n });\n};","import 'css-chunk:src/charts/line-chart/line-chart.module.scss';export default {\n \"line-chart\": \"a8ccharts-v-oO8E\",\n \"line-chart--animated\": \"a8ccharts-QrkuTW\",\n \"rise\": \"a8ccharts--rxDU3\",\n \"line-chart__tooltip\": \"a8ccharts-Tu0rR-\",\n \"line-chart__annotation-label-popover\": \"a8ccharts--RSWXi\",\n \"line-chart__tooltip-date\": \"a8ccharts-Q-b5A1\",\n \"line-chart__tooltip-row\": \"a8ccharts-19N7T9\",\n \"line-chart__tooltip-label\": \"a8ccharts-HOAXrD\",\n \"line-chart__annotations-overlay\": \"a8ccharts-rQiY8O\",\n \"line-chart__annotation-label\": \"a8ccharts-8AKWOe\",\n \"line-chart__annotation-label-trigger-button\": \"a8ccharts-7mh3Cl\",\n \"line-chart__annotation-label-popover--visible\": \"a8ccharts-VAeVuJ\",\n \"line-chart__annotation-label-popover--safari\": \"a8ccharts-TEe-iV\",\n \"line-chart__annotation-label-popover-header\": \"a8ccharts-LAUpx7\",\n \"line-chart__annotation-label-popover-content\": \"a8ccharts-b76gEu\",\n \"line-chart__annotation-label-popover-close-button\": \"a8ccharts-LIpFoS\"\n};","import { __ } from '@wordpress/i18n';\nimport clsx from 'clsx';\nimport Gridicon from 'gridicons';\nimport { useEffect, useId, useRef, useState } from 'react';\nimport { isSafari } from '../../../utils';\nimport styles from '../line-chart.module.scss';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const POPOVER_BUTTON_SIZE = 44;\nconst LineChartAnnotationLabelWithPopover = ({\n title,\n subtitle,\n renderLabel,\n renderLabelPopover\n}) => {\n const popoverId = useId();\n const buttonRef = useRef(null);\n const popoverRef = useRef(null);\n const [isPositioned, setIsPositioned] = useState(false);\n const isBrowserSafari = isSafari();\n useEffect(() => {\n const button = buttonRef.current;\n const popover = popoverRef.current;\n if (!button || !popover) return;\n const positionPopover = () => {\n // Popover positioning in Safari is complicated due to issues with SVG foreign objects (https://bugs.webkit.org/show_bug.cgi?id=23113), so let it be positioned in the centre of the viewport.\n if (!isBrowserSafari) {\n const buttonRect = button.getBoundingClientRect();\n popover.style.left = `${buttonRect.right}px`;\n popover.style.top = `${buttonRect.top}px`;\n }\n setIsPositioned(true);\n };\n\n // Position when popover shows\n popover.addEventListener('toggle', e => {\n if (e.newState === 'open') {\n positionPopover();\n }\n });\n\n // Initial positioning if already open\n try {\n if (popover.matches(':popover-open')) {\n positionPopover();\n }\n } catch {\n // Ignore errors in test environments (e.g., JSDOM does not support :popover-open)\n }\n }, [isBrowserSafari]);\n return /*#__PURE__*/_jsxs(\"div\", {\n className: styles['line-chart__annotation-label'],\n children: [/*#__PURE__*/_jsx(\"button\", {\n ref: buttonRef,\n popovertarget: popoverId,\n className: styles['line-chart__annotation-label-trigger-button'],\n style: {\n width: `${POPOVER_BUTTON_SIZE}px`,\n height: `${POPOVER_BUTTON_SIZE}px`,\n transform: `translate(${POPOVER_BUTTON_SIZE / 2}px, 0)`\n },\n \"aria-label\": title || __('View details', 'jetpack-charts'),\n children: renderLabel({\n title,\n subtitle\n })\n }), /*#__PURE__*/_jsx(\"div\", {\n ref: popoverRef,\n id: popoverId,\n popover: 'auto',\n className: clsx(styles['line-chart__annotation-label-popover'], isPositioned && styles['line-chart__annotation-label-popover--visible'], isBrowserSafari && styles['line-chart__annotation-label-popover--safari']),\n children: /*#__PURE__*/_jsxs(\"div\", {\n className: styles['line-chart__annotation-label-popover-header'],\n children: [/*#__PURE__*/_jsx(\"div\", {\n className: styles['line-chart__annotation-label-popover-content'],\n children: renderLabelPopover({\n title,\n subtitle\n })\n }), /*#__PURE__*/_jsx(\"button\", {\n popovertarget: popoverId,\n popovertargetaction: 'hide',\n className: styles['line-chart__annotation-label-popover-close-button'],\n \"aria-label\": __('Close', 'jetpack-charts'),\n children: /*#__PURE__*/_jsx(Gridicon, {\n icon: \"cross\",\n size: 16\n })\n })]\n })\n })]\n });\n};\nexport default LineChartAnnotationLabelWithPopover;","import { DataContext } from '@visx/xychart';\nimport { useEffect, useState, useCallback } from 'react';\nimport { useSingleChartContext } from '../../private/single-chart-context';\nimport styles from '../line-chart.module.scss';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst LineChartAnnotationsOverlay = ({\n children\n}) => {\n const {\n chartRef,\n chartWidth,\n chartHeight\n } = useSingleChartContext();\n const [scales, setScales] = useState(null);\n const [scalesStable, setScalesStable] = useState(false);\n\n // Create a signature for scale data to enable easy comparison\n const createScaleSignature = useCallback(scaleData => {\n const xDomain = scaleData.xScale.domain();\n const yDomain = scaleData.yScale.domain();\n const xRange = scaleData.xScale.range();\n const yRange = scaleData.yScale.range();\n return `${xDomain.join(',')}-${yDomain.join(',')}-${xRange.join(',')}-${yRange.join(',')}`;\n }, []);\n\n // Get scales from chart ref and return them with signature for comparison\n const getScalesData = useCallback(() => {\n if (chartRef?.current) {\n const scaleData = chartRef.current.getScales();\n if (scaleData) {\n const scaleInfo = {\n xScale: scaleData.xScale,\n yScale: scaleData.yScale\n };\n return {\n scales: scaleInfo,\n signature: createScaleSignature(scaleInfo)\n };\n }\n }\n return null;\n }, [chartRef, createScaleSignature]);\n\n // The chart resizes on render so we need to monitor the scales until they stabilize\n useEffect(() => {\n let timeoutId = null;\n let lastSignature = null;\n let retryCount = 0;\n const maxRetries = 20; // 20 * 50ms = 1 second max\n const checkInterval = 50; // Check every 50ms\n\n // Reset stability state when monitoring starts\n setScalesStable(false);\n const monitorScales = () => {\n const currentScaleData = getScalesData();\n\n // If we got scales, compare signatures\n if (currentScaleData) {\n // Check if scales have settled by comparing signatures\n const scalesSettled = lastSignature && currentScaleData.signature === lastSignature;\n if (scalesSettled) {\n // Scales have stabilized, mark as stable\n setScalesStable(true);\n return;\n }\n\n // Update scales and remember signature for next comparison\n setScales(currentScaleData.scales);\n lastSignature = currentScaleData.signature;\n }\n\n // Continue monitoring if we haven't exceeded max retries\n if (retryCount < maxRetries) {\n retryCount++;\n timeoutId = setTimeout(monitorScales, checkInterval);\n }\n };\n monitorScales();\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n }, [getScalesData, chartWidth, chartHeight]);\n if (!chartRef || !children || !chartWidth || !chartHeight) {\n return null;\n }\n if (!scales || !scalesStable) {\n return null;\n }\n\n // Create a DataContext value that mimics what visx provides\n // We're intentionally providing minimal context for annotations to work\n const dataContextValue = {\n xScale: scales.xScale,\n yScale: scales.yScale,\n margin: {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n },\n width: chartWidth,\n height: chartHeight\n };\n return /*#__PURE__*/_jsx(DataContext.Provider, {\n value: dataContextValue,\n children: /*#__PURE__*/_jsx(\"svg\", {\n width: chartWidth,\n height: chartHeight,\n className: styles['line-chart__annotations-overlay'],\n children: children\n })\n });\n};\nexport default LineChartAnnotationsOverlay;","import { Annotation, CircleSubject, Connector, HtmlLabel, Label, LineSubject } from '@visx/annotation';\nimport { DataContext } from '@visx/xychart';\nimport merge from 'deepmerge';\nimport { useContext, useRef, useEffect, useState, useMemo } from 'react';\nimport { useGlobalChartsTheme } from '../../../providers';\nimport { isSafari } from '../../../utils';\nimport LineChartAnnotationLabelWithPopover, { POPOVER_BUTTON_SIZE } from './line-chart-annotation-label-popover';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst ANNOTATION_MAX_WIDTH = 125; // visx default\nconst ANNOTATION_INIT_HEIGHT = 100;\nexport const getLabelPosition = ({\n subjectType,\n x,\n xMax,\n y,\n yMin,\n yMax,\n maxWidth,\n height\n}) => {\n const annotationMaxWidth = maxWidth ?? ANNOTATION_MAX_WIDTH;\n const annotationHeight = height ?? ANNOTATION_INIT_HEIGHT;\n let dx = 15;\n let dy = 15;\n let isFlippedHorizontally = false;\n let isFlippedVertically = false;\n if (subjectType === 'line-horizontal') {\n dx = 0;\n dy = 20;\n }\n if (subjectType === 'line-vertical') {\n dx = 20;\n dy = 0;\n }\n\n // Smart horizontal positioning: if annotation would extend beyond right edge, position it to the left\n // Account for the connector offset (dx) in boundary calculations\n const effectiveX = x + dx;\n if (effectiveX + annotationMaxWidth > xMax) {\n isFlippedHorizontally = true;\n if (subjectType === 'circle') {\n dx = -dx; // Just flip to the left side with same offset\n } else if (subjectType === 'line-vertical') {\n dx = -20; // Position to the left of the line\n }\n }\n\n // Smart vertical positioning: check both top and bottom edges\n // For circle annotations, they are positioned below by default (dy > 0)\n // Only flip when close to bottom edge to position above\n if (subjectType === 'circle') {\n // Check if positioning below would extend beyond bottom edge\n if (y + dy + annotationHeight > yMin) {\n // Too close to bottom edge, position above\n isFlippedVertically = true;\n dy = -Math.abs(dy); // Ensure negative value to position above the point\n }\n // When close to top edge, keep default below positioning (no flip needed)\n } else if (y - annotationHeight < yMax) {\n // Too close to top edge, position below\n if (subjectType === 'line-horizontal') {\n isFlippedVertically = true;\n dy = Math.abs(dy); // Ensure positive value to position below the point\n } else if (subjectType === 'line-vertical') {\n isFlippedVertically = true; // For anchor adjustment only\n }\n } else if (y + annotationHeight > yMin) {\n // Too close to bottom edge, position above\n if (subjectType === 'line-horizontal') {\n isFlippedVertically = true;\n dy = -Math.abs(dy); // Ensure negative value to position above the point\n } else if (subjectType === 'line-vertical') {\n isFlippedVertically = true; // For anchor adjustment only\n }\n }\n return {\n dx,\n dy,\n isFlippedHorizontally,\n isFlippedVertically\n };\n};\nconst getHorizontalAnchor = (subjectType, isFlippedHorizontally) => {\n if (subjectType === 'line-horizontal') {\n return isFlippedHorizontally ? 'end' : 'start';\n }\n return undefined;\n};\nconst getVerticalAnchor = (subjectType, isFlippedVertically, y, yMax, height) => {\n if (subjectType === 'line-vertical') {\n if (isFlippedVertically) {\n // If flipped due to top edge, anchor to top; if flipped due to bottom edge, anchor to bottom\n return y - height < yMax ? 'start' : 'end';\n }\n return 'start';\n }\n return undefined;\n};\nconst LineChartAnnotation = ({\n datum,\n title,\n subtitle,\n subjectType = 'circle',\n styles: datumStyles,\n testId,\n renderLabel,\n renderLabelPopover\n}) => {\n const providerTheme = useGlobalChartsTheme();\n const {\n xScale,\n yScale\n } = useContext(DataContext) || {};\n const labelRef = useRef(null);\n const [height, setHeight] = useState(null);\n\n // Deep merge styles to preserve nested object properties\n const styles = merge(providerTheme.annotationStyles ?? {}, datumStyles ?? {});\n\n // Measure the label height once after initial render\n useEffect(() => {\n if (labelRef.current?.getBBox) {\n const bbox = labelRef.current.getBBox();\n setHeight(bbox.height);\n }\n }, []);\n const positionData = useMemo(() => {\n if (!datum || !datum.date || datum.value == null || !xScale || !yScale) return null;\n const x = xScale(datum.date);\n const y = yScale(datum.value);\n if (typeof x !== 'number' || typeof y !== 'number') return null;\n const [yMin, yMax] = yScale.range().map(Number);\n const [xMin, xMax] = xScale.range().map(Number);\n\n // If a custom label is provided, use the provided position\n if (renderLabel) {\n return {\n x,\n dx: 0,\n y,\n dy: 0,\n yMin,\n yMax,\n xMin,\n xMax,\n isFlippedHorizontally: false,\n isFlippedVertically: false\n };\n }\n const position = getLabelPosition({\n subjectType,\n x,\n xMax,\n y,\n yMin,\n yMax,\n maxWidth: styles?.label?.maxWidth,\n height\n });\n return {\n x,\n y,\n yMin,\n yMax,\n xMin,\n xMax,\n ...position\n };\n }, [datum, xScale, yScale, subjectType, styles?.label?.maxWidth, height, renderLabel]);\n if (!positionData) return null;\n const {\n x,\n y,\n yMin,\n yMax,\n xMin,\n xMax,\n dx,\n dy,\n isFlippedHorizontally,\n isFlippedVertically\n } = positionData;\n const getLabelY = () => {\n const labelY = styles?.label?.y;\n if (labelY === 'start') return yMax;\n if (labelY === 'end') return yMin;\n return labelY;\n };\n const getLabelX = () => {\n const labelX = styles?.label?.x;\n if (labelX === 'start') return xMin;\n if (labelX === 'end') return xMax;\n return labelX;\n };\n const labelPosition = {\n x: getLabelX(),\n y: getLabelY()\n };\n\n // Safari has a bug where children of an SVG foreignObject are not positioned correctly https://bugs.webkit.org/show_bug.cgi?id=23113\n // This is a workaround to position the label correctly\n const getSafariHTMLLabelPosition = () => {\n const labelWidth = POPOVER_BUTTON_SIZE;\n const labelHeight = POPOVER_BUTTON_SIZE;\n return isSafari() ? {\n transform: `translate(${x + (dx || 0) + (typeof labelPosition.x === 'number' ? labelPosition.x - x : 0) - labelWidth}px, ${y + (dy || 0) + (typeof labelPosition.y === 'number' ? labelPosition.y - y : 0) - labelHeight}px)`,\n width: labelWidth,\n height: labelHeight\n } : undefined;\n };\n return /*#__PURE__*/_jsx(\"g\", {\n children: /*#__PURE__*/_jsxs(Annotation, {\n x: x,\n y: y,\n dx: dx,\n dy: dy,\n children: [/*#__PURE__*/_jsx(Connector, {\n ...styles?.connector\n }), subjectType === 'circle' && /*#__PURE__*/_jsx(CircleSubject, {\n ...styles?.circleSubject\n }), subjectType === 'line-vertical' && /*#__PURE__*/_jsx(LineSubject, {\n min: yMax,\n max: yMin,\n ...styles?.lineSubject,\n orientation: 'vertical'\n }), subjectType === 'line-horizontal' && /*#__PURE__*/_jsx(LineSubject, {\n min: xMin,\n max: xMax,\n ...styles?.lineSubject,\n orientation: 'horizontal'\n }), renderLabel ? /*#__PURE__*/_jsx(HtmlLabel, {\n ...styles?.label,\n ...labelPosition,\n children: /*#__PURE__*/_jsx(\"div\", {\n style: getSafariHTMLLabelPosition(),\n children: renderLabelPopover ? /*#__PURE__*/_jsx(LineChartAnnotationLabelWithPopover, {\n title: title,\n subtitle: subtitle,\n renderLabel: renderLabel,\n renderLabelPopover: renderLabelPopover\n }) : renderLabel({\n title,\n subtitle\n })\n })\n }) : /*#__PURE__*/_jsx(\"g\", {\n ref: labelRef,\n children: /*#__PURE__*/_jsx(Label, {\n title: title,\n subtitle: subtitle,\n ...styles?.label,\n ...labelPosition,\n horizontalAnchor: getHorizontalAnchor(subjectType, isFlippedHorizontally),\n verticalAnchor: getVerticalAnchor(subjectType, isFlippedVertically, y, yMax, height ?? ANNOTATION_INIT_HEIGHT)\n })\n })]\n })\n });\n};\nexport default LineChartAnnotation;","import { DataContext } from '@visx/xychart';\nimport { useContext } from 'react';\nconst toNumber = val => {\n const num = typeof val === 'number' ? val : parseFloat(val);\n return isNaN(num) ? undefined : num;\n};\nconst LineChartGlyph = ({\n data,\n index,\n color,\n glyphStyle,\n renderGlyph,\n accessors,\n position\n}) => {\n const {\n xScale,\n yScale\n } = useContext(DataContext) || {};\n if (!xScale || !yScale) return null;\n if (data.data.length === 0) return null;\n const point = position === 'start' ? data.data[0] : data.data[data.data.length - 1];\n const x = xScale(accessors.xAccessor(point));\n const y = yScale(accessors.yAccessor(point));\n if (typeof x !== 'number' || typeof y !== 'number') return null;\n const size = Math.max(0, toNumber(glyphStyle?.radius) ?? 4);\n return renderGlyph({\n key: `${position}-glyph-${data.label}`,\n index,\n datum: point,\n color,\n size,\n x,\n y,\n glyphStyle,\n position\n });\n};\nexport default LineChartGlyph;","import { Group } from '@visx/group';\nimport { Pie } from '@visx/shape';\nimport { useTooltip, useTooltipInPortal } from '@visx/tooltip';\nimport { __ } from '@wordpress/i18n';\nimport { Stack } from '@wordpress/ui';\nimport clsx from 'clsx';\nimport { useCallback, useContext, useMemo } from 'react';\nimport { Legend, useChartLegendItems } from '../../components/legend';\nimport { BaseTooltip } from '../../components/tooltip';\nimport { useDataWithPercentages, useInteractiveLegendData, usePrefersReducedMotion } from '../../hooks';\nimport { GlobalChartsProvider, useChartId, useChartRegistration, useGlobalChartsContext, useGlobalChartsTheme, GlobalChartsContext } from '../../providers';\nimport { attachSubComponents } from '../../utils';\nimport { getStringWidth } from '../../visx/text';\nimport { ChartSVG, ChartHTML, useChartChildren } from '../private/chart-composition';\nimport { ChartLayout } from '../private/chart-layout';\nimport { RadialWipeAnimation } from '../private/radial-wipe-animation/';\nimport { SingleChartContext } from '../private/single-chart-context';\nimport { SvgEmptyState } from '../private/svg-empty-state';\nimport { withResponsive } from '../private/with-responsive';\nimport styles from './pie-chart.module.scss';\n\n/**\n * Parameters passed to the renderTooltip function for pie charts.\n */\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Default tooltip renderer for pie charts.\n * Renders a BaseTooltip with the hovered segment's data.\n *\n * @param {PieChartRenderTooltipParams} params - The tooltip parameters containing the hovered data point\n * @return {ReactNode} The rendered tooltip content\n */\nconst renderDefaultPieTooltip = ({\n tooltipData\n}) => {\n return /*#__PURE__*/_jsx(BaseTooltip, {\n data: tooltipData,\n top: 0,\n left: 0,\n renderContainer: false\n });\n};\n\n// Base props type with optional responsive properties\n\n// Composition API types\n\n/**\n * Validates the pie chart data\n * @param data - The data to validate\n * @return Object containing validation result and error message\n */\nconst validateData = data => {\n if (!data.length) {\n return {\n isValid: false,\n message: 'No data available'\n };\n }\n\n // Check for negative values\n const hasNegativeValues = data.some(item => item.value < 0);\n if (hasNegativeValues) {\n return {\n isValid: false,\n message: 'Invalid data: Negative values are not allowed'\n };\n }\n\n // Validate total value is greater than 0\n const totalValue = data.reduce((sum, item) => sum + item.value, 0);\n if (totalValue <= 0) {\n return {\n isValid: false,\n message: 'Invalid data: Total value must be greater than 0'\n };\n }\n return {\n isValid: true,\n message: ''\n };\n};\n\n/**\n * Renders a pie or donut chart using the provided data.\n *\n * @param {PieChartProps} props - Component props\n * @return {JSX.Element} The rendered chart component\n */\nconst PieChartInternal = ({\n data,\n chartId: providedChartId,\n withTooltips = false,\n className,\n showLegend = false,\n legend = {},\n width: propWidth,\n height: propHeight,\n size,\n animation,\n thickness = 1,\n padding = 0,\n gapScale = 0,\n cornerScale = 0,\n showLabels = true,\n legendValueDisplay = 'percentage',\n children = null,\n tooltipOffsetX = 0,\n tooltipOffsetY = -15,\n renderTooltip = renderDefaultPieTooltip,\n gap = 'md'\n}) => {\n const legendInteractive = legend.interactive ?? false;\n const legendPosition = legend.position ?? 'bottom';\n const providerTheme = useGlobalChartsTheme();\n const chartId = useChartId(providedChartId);\n const {\n tooltipOpen,\n tooltipLeft,\n tooltipTop,\n tooltipData,\n hideTooltip,\n showTooltip\n } = useTooltip();\n\n // Set up portal tooltip for better z-index handling\n // We get containerBounds to cancel out stale offsets in the position calculation\n const {\n containerRef,\n TooltipInPortal,\n containerBounds\n } = useTooltipInPortal({\n detectBounds: true,\n scroll: true,\n debounce: 0\n });\n const onMouseLeave = useCallback(() => {\n if (!withTooltips) {\n return;\n }\n hideTooltip();\n }, [withTooltips, hideTooltip]);\n const {\n getElementStyles,\n isSeriesVisible\n } = useGlobalChartsContext();\n\n // Calculate percentages from values (single source of truth)\n const dataWithPercentages = useDataWithPercentages(data);\n\n // Filter and recalculate data for interactive legends\n const {\n visibleData,\n allSegmentsHidden,\n legendData\n } = useInteractiveLegendData({\n data: dataWithPercentages,\n chartId,\n legendInteractive,\n isSeriesVisible\n });\n\n // Memoize legend options to prevent unnecessary re-calculations\n const legendOptions = useMemo(() => ({\n showValues: true,\n legendValueDisplay\n }), [legendValueDisplay]);\n\n // Create legend items using legendData (has recalculated percentages for visible items)\n const legendItems = useChartLegendItems(legendData, legendOptions);\n const {\n isValid,\n message\n } = validateData(data);\n\n // Process children to extract compound components\n const {\n svgChildren,\n htmlChildren,\n legendChildren,\n otherChildren\n } = useChartChildren(children, 'PieChart');\n\n // Memoize metadata to prevent unnecessary re-registration\n const chartMetadata = useMemo(() => ({\n thickness,\n gapScale,\n cornerScale\n }), [thickness, gapScale, cornerScale]);\n\n // Register chart with context only if data is valid\n useChartRegistration({\n chartId,\n legendItems,\n chartType: 'pie',\n isDataValid: isValid,\n metadata: chartMetadata\n });\n const prefersReducedMotion = usePrefersReducedMotion();\n if (!isValid) {\n return /*#__PURE__*/_jsx(\"div\", {\n className: clsx('pie-chart', styles['pie-chart'], className),\n children: /*#__PURE__*/_jsx(\"div\", {\n className: styles['error-message'],\n children: message\n })\n });\n }\n\n // Calculate the angle between each (use original data length for consistent spacing)\n const padAngle = gapScale * (2 * Math.PI / data.length);\n\n // Map the data to include index for color assignment\n // When interactive, we need to find the original index to maintain consistent colors\n const dataWithIndex = visibleData.map(d => {\n const originalIndex = data.findIndex(item => item.label === d.label);\n return {\n ...d,\n index: originalIndex >= 0 ? originalIndex : 0\n };\n });\n const accessors = {\n value: d => d.value,\n fill: d => {\n return getElementStyles({\n data: d,\n index: d.index\n }).color;\n }\n };\n const legendElement = showLegend && /*#__PURE__*/_jsx(Legend, {\n orientation: legend.orientation ?? 'horizontal',\n position: legendPosition,\n alignment: legend.alignment ?? 'center',\n labelStyles: legend.labelStyles,\n itemClassName: legend.itemClassName,\n itemStyles: legend.itemStyles,\n shapeStyles: legend.shapeStyles,\n shape: legend.shape ?? 'circle',\n chartId: chartId,\n interactive: legendInteractive\n });\n return /*#__PURE__*/_jsx(SingleChartContext.Provider, {\n value: {\n chartId\n },\n children: /*#__PURE__*/_jsx(ChartLayout, {\n legendPosition: legendPosition,\n legendElement: legendElement,\n legendChildren: legendChildren,\n gap: gap,\n className: clsx('pie-chart', styles['pie-chart'],\n // Fill parent when no explicit dimensions provided\n {\n [styles['pie-chart--responsive']]: !propWidth && !propHeight\n }, className),\n style: {\n width: propWidth || undefined,\n height: propHeight || undefined\n },\n trailingContent: /*#__PURE__*/_jsxs(_Fragment, {\n children: [withTooltips && tooltipOpen && tooltipData && /*#__PURE__*/_jsx(TooltipInPortal, {\n top: tooltipTop || 0,\n left: tooltipLeft || 0,\n children: /*#__PURE__*/_jsx(\"div\", {\n role: \"tooltip\",\n children: renderTooltip({\n tooltipData\n })\n })\n }), htmlChildren, otherChildren]\n }),\n children: ({\n contentWidth,\n contentHeight\n }) => {\n const availableWidth = contentWidth > 0 ? contentWidth : 300;\n const availableHeight = contentHeight > 0 ? contentHeight : 300;\n const availableSize = Math.min(availableWidth, availableHeight);\n const actualSize = size ? Math.min(size, availableSize) : availableSize;\n const width = actualSize;\n const height = actualSize;\n const radius = Math.min(width, height) / 2;\n const centerX = width / 2;\n const centerY = height / 2;\n const outerRadius = radius - padding;\n const innerRadius = thickness === 0 ? 0 : outerRadius * (1 - thickness);\n const maxCornerRadius = (outerRadius - innerRadius) / 2;\n const cornerRadius = cornerScale ? Math.min(cornerScale * outerRadius, maxCornerRadius) : 0;\n return /*#__PURE__*/_jsx(Stack, {\n ref: containerRef,\n align: \"center\",\n justify: \"center\",\n className: styles['pie-chart__centering'],\n children: /*#__PURE__*/_jsxs(\"svg\", {\n viewBox: `0 0 ${width} ${height}`,\n preserveAspectRatio: \"xMidYMid meet\",\n width: width,\n height: height,\n children: [/*#__PURE__*/_jsx(\"defs\", {\n children: /*#__PURE__*/_jsx(RadialWipeAnimation, {\n id: `radial-wipe-${chartId}`,\n radius: outerRadius,\n innerRadius: innerRadius\n })\n }), /*#__PURE__*/_jsxs(Group, {\n top: centerY,\n left: centerX,\n mask: animation && !prefersReducedMotion ? `url(#radial-wipe-${chartId})` : null,\n children: [allSegmentsHidden ? /*#__PURE__*/_jsx(SvgEmptyState, {\n x: 0,\n y: 0,\n width: width,\n height: height,\n children: __('All segments are hidden. Click legend items to show data.', 'jetpack-charts')\n }) : /*#__PURE__*/_jsx(Pie, {\n data: dataWithIndex,\n pieValue: accessors.value,\n outerRadius: outerRadius,\n innerRadius: innerRadius,\n padAngle: padAngle,\n cornerRadius: cornerRadius,\n children: pie => {\n return pie.arcs.map((arc, index) => {\n const [centroidX, centroidY] = pie.path.centroid(arc);\n const hasSpaceForLabel = arc.endAngle - arc.startAngle >= 0.25;\n const handleMouseMove = event => {\n if (!withTooltips) {\n return;\n }\n\n // Don't show tooltip until container bounds are measured\n if (containerBounds.width === 0 || containerBounds.height === 0) {\n return;\n }\n\n // Use clientX/Y and subtract containerBounds to cancel out any stale offset.\n // TooltipInPortal calculates: tooltipLeft + containerBounds.left + scrollX\n // By passing (clientX - containerBounds.left), we get:\n // (clientX - containerBounds.left) + containerBounds.left + scrollX = clientX + scrollX\n // This gives correct page coordinates regardless of stale bounds.\n showTooltip({\n tooltipData: arc.data,\n tooltipLeft: event.clientX - containerBounds.left + tooltipOffsetX,\n tooltipTop: event.clientY - containerBounds.top + tooltipOffsetY\n });\n };\n const pathProps = {\n d: pie.path(arc) || '',\n fill: accessors.fill(arc.data),\n 'data-testid': 'pie-segment'\n };\n const groupProps = {};\n if (withTooltips) {\n groupProps.onMouseMove = handleMouseMove;\n groupProps.onMouseLeave = onMouseLeave;\n }\n\n // Estimate text width more accurately for background sizing\n const fontSize = 12;\n const estimatedTextWidth = getStringWidth(arc.data.label, {\n fontSize\n });\n const labelPadding = 6;\n const backgroundWidth = estimatedTextWidth + labelPadding * 2;\n const backgroundHeight = fontSize + labelPadding * 2;\n return /*#__PURE__*/_jsxs(\"g\", {\n ...groupProps,\n children: [/*#__PURE__*/_jsx(\"path\", {\n ...pathProps\n }), showLabels && hasSpaceForLabel && /*#__PURE__*/_jsxs(\"g\", {\n children: [providerTheme.labelBackgroundColor && /*#__PURE__*/_jsx(\"rect\", {\n x: centroidX - backgroundWidth / 2,\n y: centroidY - backgroundHeight / 2,\n width: backgroundWidth,\n height: backgroundHeight,\n fill: providerTheme.labelBackgroundColor,\n rx: 4,\n ry: 4,\n pointerEvents: \"none\"\n }), /*#__PURE__*/_jsx(\"text\", {\n x: centroidX,\n y: centroidY,\n dy: \".33em\",\n fill: providerTheme.labelTextColor || '#333',\n fontSize: fontSize,\n textAnchor: \"middle\",\n pointerEvents: \"none\",\n children: arc.data.label\n })]\n })]\n }, `arc-${index}`);\n });\n }\n }), !allSegmentsHidden && svgChildren]\n })]\n })\n });\n }\n })\n });\n};\nconst PieChartWithProvider = props => {\n const existingContext = useContext(GlobalChartsContext);\n\n // If we're already in a GlobalChartsProvider context, don't create a new one\n if (existingContext) {\n return /*#__PURE__*/_jsx(PieChartInternal, {\n ...props\n });\n }\n\n // Otherwise, create our own GlobalChartsProvider\n return /*#__PURE__*/_jsx(GlobalChartsProvider, {\n children: /*#__PURE__*/_jsx(PieChartInternal, {\n ...props\n })\n });\n};\nPieChartWithProvider.displayName = 'PieChart';\n\n// Create PieChart with composition API\nconst PieChart = attachSubComponents(PieChartWithProvider, {\n Legend: Legend,\n SVG: ChartSVG,\n HTML: ChartHTML\n});\n\n// Create responsive PieChart with composition API\nconst PieChartResponsive = attachSubComponents(withResponsive(PieChartWithProvider), {\n Legend: Legend,\n SVG: ChartSVG,\n HTML: ChartHTML\n});\nexport { PieChartResponsive as default, PieChart as PieChartUnresponsive };","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * This animation uses the SVG self-drawing technique (source: https://www.joshwcomeau.com/svg/friendly-introduction-to-svg/),\n * leveraging stroke-dasharray and stroke-dashoffset properties to create the effect.\n *\n * Here, we reverse the animation to \"un-draw\" the circle for the revealing / radial wipe effect:\n * - Initially, the entire circle is drawn with a white mask.\n * - The circle's border (stroke) is drawn with a black stroke, wide enough to cover the circle.\n * - The stroke is then \"un-drawn,\" creating the wipe animation.\n * - A white mask makes the area visible, while a black mask makes the area invisible.\n */\n\n/**\n * RadialWipeAnimationProps - SVG mask props that requires a radial wipe animation effect.\n *\n * @param {object} props - The properties object.\n * @param {string} props.id - The unique ID for the mask.\n * @param {number} props.radius - The outer radius of the radial wipe.\n * @param {number} [props.innerRadius=0] - The inner radius of the radial wipe.\n * @param {number} [props.durationMs=1000] - The duration of the animation in milliseconds.\n * @param {number} [props.wipePercentage=100] - The percentage of the wipe animation to complete.\n * @param {'clockwise' | 'counter-clockwise'} [props.direction='clockwise'] - The direction of the wipe animation.\n * @param {Angle} [props.startAngle='-90deg'] - The starting angle of the wipe animation.\n *\n * @return {JSX.Element} The radial wipe mask element.\n */\n\n/**\n * Renders a SVG mask that creates a radial wipe animation effect.\n *\n * @param {RadialWipeAnimationProps} props - Component props\n * @return {JSX.Element} The rendered mask component\n */\nfunction RadialWipeAnimation({\n id,\n radius,\n innerRadius = 0,\n durationMs = 1000,\n wipePercentage = 100,\n direction = 'clockwise',\n startAngle = '-90deg'\n}) {\n const strokeWidth = (radius - innerRadius) * 2 +\n // The stroke is centered on the circumference, so we need to double the width.\n 1; // Added 1 to prevent sub-pixel rendering issues.\n\n const scaleY = direction === 'clockwise' ? -1 : 1;\n const isValidWipePercentage = 0 < wipePercentage && wipePercentage <= 100;\n const animationDuration = `${\n // If wipePercentage is invalid, set animation duration to 0 to disable animation.\n isValidWipePercentage ? durationMs * (100 / wipePercentage) : 0}ms`;\n return /*#__PURE__*/_jsx(\"mask\", {\n id: id,\n children: /*#__PURE__*/_jsx(\"circle\", {\n cx: 0,\n cy: 0,\n r: radius,\n pathLength: \"100\",\n fill: \"white\",\n stroke: \"black\" // The stroke will be un-drawn, hence 'black' mask.\n ,\n strokeWidth: strokeWidth,\n strokeDasharray: \"100, 1000\",\n strokeDashoffset: \"0\",\n style: {\n transform: `rotate(${startAngle}) scaleY(${scaleY})`\n },\n children: /*#__PURE__*/_jsx(\"animate\", {\n attributeName: \"stroke-dashoffset\",\n from: \"0\",\n to: \"100.1\",\n dur: animationDuration,\n fill: \"freeze\" // Same as CSS 'forwards' to retain the final state after animation.\n ,\n calcMode: \"spline\" // custom easing\n ,\n keySplines: \"0.42 0 0.58 1;0 0 1 1\" // ease-in-out ; linear (unimportant)\n ,\n keyTimes: `0;${wipePercentage / 100};1`\n })\n })\n });\n}\nexport default RadialWipeAnimation;","import 'css-chunk:src/charts/pie-chart/pie-chart.module.scss';export default {\n \"pie-chart\": \"a8ccharts-C-n-Gu\",\n \"pie-chart--responsive\": \"a8ccharts-IQVR6j\",\n \"pie-chart__centering\": \"a8ccharts-eGV3AE\"\n};","import { Group } from '@visx/group';\nimport { Pie } from '@visx/shape';\nimport { Text } from '@visx/text';\nimport { useTooltip, useTooltipInPortal } from '@visx/tooltip';\nimport { __ } from '@wordpress/i18n';\nimport { Stack } from '@wordpress/ui';\nimport clsx from 'clsx';\nimport { useCallback, useContext, useMemo } from 'react';\nimport { Legend, useChartLegendItems } from '../../components/legend';\nimport { BaseTooltip } from '../../components/tooltip';\nimport { useDataWithPercentages, useInteractiveLegendData, usePrefersReducedMotion } from '../../hooks';\nimport { GlobalChartsProvider, useChartId, useChartRegistration, useGlobalChartsContext, GlobalChartsContext } from '../../providers';\nimport { attachSubComponents } from '../../utils';\nimport { ChartSVG, ChartHTML, useChartChildren } from '../private/chart-composition';\nimport { ChartLayout } from '../private/chart-layout';\nimport { RadialWipeAnimation } from '../private/radial-wipe-animation';\nimport { SingleChartContext } from '../private/single-chart-context';\nimport { SvgEmptyState } from '../private/svg-empty-state';\nimport { withResponsive } from '../private/with-responsive';\nimport styles from './pie-semi-circle-chart.module.scss';\n\n/**\n * Parameters passed to the renderTooltip function for semi-circle charts.\n */\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Default tooltip renderer for semi-circle pie charts.\n * Renders a BaseTooltip with the hovered segment's data.\n *\n * @param {PieSemiCircleChartRenderTooltipParams} params - The tooltip parameters containing the hovered data point\n * @return {ReactNode} The rendered tooltip content\n */\nconst renderDefaultPieSemiCircleTooltip = ({\n tooltipData\n}) => {\n return /*#__PURE__*/_jsx(BaseTooltip, {\n data: tooltipData,\n top: 0,\n left: 0,\n renderContainer: false\n });\n};\nconst PAD_ANGLE = 0.03; // Padding between segments\nconst DEFAULT_WIDTH = 400;\n\n// Base props type with optional responsive properties\n\n// Composition API types\n\n/**\n * Validates the semi-circle pie chart data\n * @param data - The data to validate\n * @return Object containing validation result and error message\n */\nconst validateData = data => {\n if (!data.length) {\n return {\n isValid: false,\n message: 'No data available'\n };\n }\n\n // Check for negative values\n const hasNegativeValues = data.some(item => item.value < 0);\n if (hasNegativeValues) {\n return {\n isValid: false,\n message: 'Invalid data: Negative values are not allowed'\n };\n }\n\n // Validate total value is greater than 0\n const totalValue = data.reduce((sum, item) => sum + item.value, 0);\n if (totalValue <= 0) {\n return {\n isValid: false,\n message: 'Invalid data: Total value must be greater than 0'\n };\n }\n return {\n isValid: true,\n message: ''\n };\n};\nconst PieSemiCircleChartInternal = ({\n data,\n chartId: providedChartId,\n width: propWidth,\n height: propHeight,\n thickness = 0.4,\n clockwise = true,\n withTooltips = false,\n showLegend = false,\n legend = {},\n legendValueDisplay = 'percentage',\n label,\n animation,\n note,\n className,\n children,\n tooltipOffsetX = 0,\n tooltipOffsetY = -15,\n renderTooltip = renderDefaultPieSemiCircleTooltip,\n gap = 'md'\n}) => {\n const legendInteractive = legend.interactive ?? false;\n const legendPosition = legend.position ?? 'bottom';\n const chartId = useChartId(providedChartId);\n const {\n tooltipOpen,\n tooltipLeft,\n tooltipTop,\n tooltipData,\n hideTooltip,\n showTooltip\n } = useTooltip();\n\n // Set up portal tooltip for better z-index handling\n // We get containerBounds to cancel out stale offsets in the position calculation\n const {\n containerRef,\n TooltipInPortal,\n containerBounds\n } = useTooltipInPortal({\n detectBounds: true,\n scroll: true,\n debounce: 0\n });\n const handleMouseMove = useCallback((event, arc) => {\n // Don't show tooltip until container bounds are measured\n if (containerBounds.width === 0 || containerBounds.height === 0) {\n return;\n }\n\n // Use clientX/Y and subtract containerBounds to cancel out any stale offset.\n // TooltipInPortal calculates: tooltipLeft + containerBounds.left + scrollX\n // By passing (clientX - containerBounds.left), we get:\n // (clientX - containerBounds.left) + containerBounds.left + scrollX = clientX + scrollX\n // This gives correct page coordinates regardless of stale bounds.\n showTooltip({\n tooltipData: arc.data,\n tooltipLeft: event.clientX - containerBounds.left + tooltipOffsetX,\n tooltipTop: event.clientY - containerBounds.top + tooltipOffsetY\n });\n }, [containerBounds.width, containerBounds.height, containerBounds.left, containerBounds.top, showTooltip, tooltipOffsetX, tooltipOffsetY]);\n const handleMouseLeave = useCallback(() => {\n hideTooltip();\n }, [hideTooltip]);\n const handleArcMouseMove = useCallback(arc => event => {\n handleMouseMove(event, arc);\n }, [handleMouseMove]);\n\n // Validate data first to get validation result\n const {\n isValid,\n message\n } = validateData(data);\n const {\n getElementStyles,\n isSeriesVisible\n } = useGlobalChartsContext();\n\n // Calculate percentages from values (single source of truth)\n const dataWithPercentages = useDataWithPercentages(data);\n\n // Filter and recalculate data for interactive legends\n const {\n visibleData,\n allSegmentsHidden,\n legendData\n } = useInteractiveLegendData({\n data: dataWithPercentages,\n chartId,\n legendInteractive,\n isSeriesVisible\n });\n\n // Define accessors with useMemo to avoid changing dependencies\n const accessors = useMemo(() => ({\n value: d => d.value,\n sort: (a, b) => b.value - a.value,\n fill: d => getElementStyles({\n data: d,\n index: d.index\n }).color\n }), [getElementStyles]);\n\n // Memoize legend options to prevent unnecessary re-calculations\n const legendOptions = useMemo(() => ({\n showValues: true,\n legendValueDisplay\n }), [legendValueDisplay]);\n\n // Create legend items using legendData (has recalculated percentages for visible items)\n const legendItems = useChartLegendItems(legendData, legendOptions);\n\n // Process children to extract compound components\n const {\n svgChildren,\n htmlChildren,\n legendChildren,\n otherChildren\n } = useChartChildren(children, 'PieSemiCircleChart');\n\n // Memoize metadata to prevent unnecessary re-registration\n const chartMetadata = useMemo(() => ({\n thickness,\n clockwise\n }), [thickness, clockwise]);\n\n // Register chart with context only if data is valid\n useChartRegistration({\n chartId,\n legendItems,\n chartType: 'pie-semi-circle',\n isDataValid: isValid,\n metadata: chartMetadata\n });\n const prefersReducedMotion = usePrefersReducedMotion();\n const effectiveWidth = propWidth || DEFAULT_WIDTH;\n if (!isValid) {\n const errorWidth = propHeight ? Math.min(propWidth || propHeight * 2, propHeight * 2) : effectiveWidth;\n const errorHeight = errorWidth / 2;\n return /*#__PURE__*/_jsx(\"div\", {\n className: styles['pie-semi-circle-chart'],\n children: /*#__PURE__*/_jsx(\"svg\", {\n width: errorWidth,\n height: errorHeight,\n children: /*#__PURE__*/_jsx(\"text\", {\n x: \"50%\",\n y: \"50%\",\n textAnchor: \"middle\",\n className: styles.error,\n children: message\n })\n })\n });\n }\n\n // Map data with index for color assignment\n // When interactive, we need to find the original index to maintain consistent colors\n const dataWithIndex = visibleData.map(d => {\n const originalIndex = data.findIndex(item => item.label === d.label);\n return {\n ...d,\n index: originalIndex >= 0 ? originalIndex : 0\n };\n });\n\n // Configure pie angles based on clockwise direction\n const startAngle = clockwise ? -Math.PI / 2 : Math.PI / 2;\n const endAngle = clockwise ? Math.PI / 2 : -Math.PI / 2;\n const legendElement = showLegend && /*#__PURE__*/_jsx(Legend, {\n orientation: legend.orientation ?? 'horizontal',\n position: legendPosition,\n alignment: legend.alignment ?? 'center',\n labelStyles: legend.labelStyles,\n itemClassName: legend.itemClassName,\n itemStyles: legend.itemStyles,\n shapeStyles: legend.shapeStyles,\n shape: legend.shape ?? 'circle',\n chartId: chartId,\n interactive: legendInteractive\n });\n return /*#__PURE__*/_jsx(SingleChartContext.Provider, {\n value: {\n chartId\n },\n children: /*#__PURE__*/_jsx(ChartLayout, {\n legendPosition: legendPosition,\n legendElement: legendElement,\n legendChildren: legendChildren,\n gap: gap,\n className: clsx('pie-semi-circle-chart', styles['pie-semi-circle-chart'], {\n [styles['pie-semi-circle-chart--responsive']]: !propWidth && !propHeight\n }, className),\n style: {\n width: propWidth || undefined,\n height: propHeight || undefined\n },\n trailingContent: /*#__PURE__*/_jsxs(_Fragment, {\n children: [withTooltips && tooltipOpen && tooltipData && /*#__PURE__*/_jsx(TooltipInPortal, {\n top: tooltipTop || 0,\n left: tooltipLeft || 0,\n children: /*#__PURE__*/_jsx(\"div\", {\n role: \"tooltip\",\n children: renderTooltip({\n tooltipData\n })\n })\n }), htmlChildren, otherChildren]\n }),\n children: ({\n contentWidth,\n contentHeight\n }) => {\n // Calculate chart dimensions maintaining the 2:1 width-to-height ratio.\n // Use measured dimensions to respect height constraints, falling back\n // to explicit props during initial render before measurement is available.\n const availableWidth = contentWidth > 0 ? contentWidth : effectiveWidth;\n const availableHeight = contentHeight > 0 ? contentHeight : propHeight || effectiveWidth / 2;\n // Constrain width so that height (= width / 2) never exceeds the available height\n const width = Math.min(availableWidth, availableHeight * 2);\n const height = width / 2;\n const radius = height; // For a semi-circle, radius equals the SVG height\n const innerRadius = radius * (1 - thickness);\n return /*#__PURE__*/_jsx(Stack, {\n ref: containerRef,\n align: \"center\",\n justify: \"center\",\n className: styles['pie-semi-circle-chart__centering'],\n children: /*#__PURE__*/_jsxs(\"svg\", {\n width: width,\n height: height,\n viewBox: `0 0 ${width} ${height}`,\n children: [/*#__PURE__*/_jsx(\"defs\", {\n children: /*#__PURE__*/_jsx(RadialWipeAnimation, {\n id: `radial-wipe-${chartId}`,\n radius: radius,\n innerRadius: innerRadius,\n startAngle: \"-180deg\",\n wipePercentage: 50\n })\n }), /*#__PURE__*/_jsx(Group, {\n top: height,\n left: width / 2,\n mask: animation && !prefersReducedMotion ? `url(#radial-wipe-${chartId})` : null,\n children: allSegmentsHidden ? /*#__PURE__*/_jsx(SvgEmptyState, {\n x: 0,\n y: -radius / 2,\n width: width,\n height: height,\n children: __('All segments are hidden. Click legend items to show data.', 'jetpack-charts')\n }) : /*#__PURE__*/_jsxs(_Fragment, {\n children: [/*#__PURE__*/_jsx(Pie, {\n data: dataWithIndex,\n pieValue: accessors.value,\n outerRadius: radius,\n innerRadius: innerRadius,\n cornerRadius: 3,\n padAngle: PAD_ANGLE,\n startAngle: startAngle,\n endAngle: endAngle,\n pieSort: accessors.sort,\n children: pie => {\n return pie.arcs.map(arc => /*#__PURE__*/_jsx(\"g\", {\n onMouseMove: withTooltips ? handleArcMouseMove(arc) : undefined,\n onMouseLeave: withTooltips ? handleMouseLeave : undefined,\n children: /*#__PURE__*/_jsx(\"path\", {\n d: pie.path(arc) || '',\n fill: accessors.fill(arc.data)\n })\n }, arc.data.label));\n }\n }), /*#__PURE__*/_jsxs(Group, {\n children: [/*#__PURE__*/_jsx(Text, {\n textAnchor: \"middle\",\n verticalAnchor: \"start\",\n y: -40 // Position above the chart with space for note\n ,\n className: styles.label,\n children: label\n }), /*#__PURE__*/_jsx(Text, {\n textAnchor: \"middle\",\n verticalAnchor: \"start\",\n y: -20 // Position between label and chart\n ,\n className: styles.note,\n children: note\n })]\n }), !allSegmentsHidden && svgChildren]\n })\n })]\n })\n });\n }\n })\n });\n};\nconst PieSemiCircleChartWithProvider = props => {\n const existingContext = useContext(GlobalChartsContext);\n\n // If we're already in a GlobalChartsProvider context, don't create a new one\n if (existingContext) {\n return /*#__PURE__*/_jsx(PieSemiCircleChartInternal, {\n ...props\n });\n }\n\n // Otherwise, create our own GlobalChartsProvider\n return /*#__PURE__*/_jsx(GlobalChartsProvider, {\n children: /*#__PURE__*/_jsx(PieSemiCircleChartInternal, {\n ...props\n })\n });\n};\nPieSemiCircleChartWithProvider.displayName = 'PieSemiCircleChart';\n\n// Create PieSemiCircleChart with composition API\nconst PieSemiCircleChart = attachSubComponents(PieSemiCircleChartWithProvider, {\n Legend: Legend,\n SVG: ChartSVG,\n HTML: ChartHTML\n});\n\n// Create responsive PieSemiCircleChart with composition API\nconst PieSemiCircleChartResponsive = attachSubComponents(withResponsive(PieSemiCircleChartWithProvider), {\n Legend: Legend,\n SVG: ChartSVG,\n HTML: ChartHTML\n});\nexport { PieSemiCircleChartResponsive as default, PieSemiCircleChart as PieSemiCircleChartUnresponsive };","import 'css-chunk:src/charts/pie-semi-circle-chart/pie-semi-circle-chart.module.scss';export default {\n \"pie-semi-circle-chart--responsive\": \"a8ccharts-V0wiEb\",\n \"pie-semi-circle-chart__centering\": \"a8ccharts-1khYG1\",\n \"pie-semi-circle-chart\": \"a8ccharts-8tyaQj\",\n \"label\": \"a8ccharts-EKZS3j\",\n \"note\": \"a8ccharts-v85A8-\"\n};","import clsx from 'clsx';\nimport { useMemo, forwardRef } from 'react';\nimport { useGlobalChartsTheme } from '../../providers';\nimport { LineChartUnresponsive } from '../line-chart';\nimport { withResponsive } from '../private/with-responsive';\nimport styles from './sparkline.module.scss';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst DEFAULT_WIDTH = 100;\nconst DEFAULT_HEIGHT = 40;\n\n/**\n * Transforms a simple number array into SeriesData format for LineChart.\n * Uses index-based dates to create a linear x-axis.\n *\n * @param data - Array of numeric values to plot\n * @param color - Optional color for the line stroke\n * @param strokeWidth - Optional stroke width for the line\n * @return SeriesData array suitable for LineChart\n */\nconst transformToSeriesData = (data, color, strokeWidth) => {\n // Use a fixed base date and increment by index to create linear spacing\n const baseDate = new Date(2000, 0, 1);\n return [{\n label: 'sparkline',\n data: data.map((value, index) => ({\n date: new Date(baseDate.getTime() + index * 86400000),\n // Add days\n value\n })),\n options: {\n stroke: color,\n seriesLineStyle: strokeWidth ? {\n strokeWidth\n } : undefined\n }\n }];\n};\nconst SparklineComponent = /*#__PURE__*/forwardRef(({\n data,\n width = DEFAULT_WIDTH,\n height = DEFAULT_HEIGHT,\n color,\n strokeWidth: strokeWidthProp,\n withGradientFill = true,\n gradient,\n className,\n chartId,\n margin: marginProp,\n animation\n}, ref) => {\n const theme = useGlobalChartsTheme();\n\n // Get theme defaults for sparkline\n const themeStrokeWidth = theme.sparkline?.strokeWidth ?? 1.5;\n\n // Use prop values or fall back to theme defaults\n const strokeWidth = strokeWidthProp ?? themeStrokeWidth;\n\n // Transform number[] to SeriesData[] for LineChart\n const seriesData = useMemo(() => {\n if (!data || data.length === 0) {\n return [];\n }\n return transformToSeriesData(data, color, strokeWidth);\n }, [data, color, strokeWidth]);\n\n // Merge margins with theme defaults\n const finalMargin = useMemo(() => {\n const themeMargin = theme.sparkline?.margin ?? {\n top: 2,\n right: 2,\n bottom: 2,\n left: 2\n };\n const margin = marginProp ?? themeMargin;\n return {\n ...themeMargin,\n ...margin\n };\n }, [marginProp, theme.sparkline?.margin]);\n\n // Build gradient options for the series if custom gradient is provided\n // Note: This must be called before any early returns to follow React hooks rules\n const seriesWithGradient = useMemo(() => {\n if (!gradient || seriesData.length === 0) {\n return seriesData;\n }\n return seriesData.map(series => ({\n ...series,\n options: {\n ...series.options,\n gradient: {\n from: gradient.from || color || '#000000',\n to: gradient.to || '#ffffff',\n fromOpacity: gradient.fromOpacity ?? 0.5,\n toOpacity: gradient.toOpacity ?? 0.0\n }\n }\n }));\n }, [seriesData, gradient, color]);\n\n // Handle empty data\n if (!data || data.length === 0) {\n return /*#__PURE__*/_jsx(\"div\", {\n ref: ref,\n className: clsx('sparkline', styles.sparkline, styles['sparkline--empty'], className),\n style: {\n width,\n height\n }\n });\n }\n\n // Handle single data point - render a simple dot\n if (data.length === 1) {\n const cx = width / 2;\n const cy = height / 2;\n const resolvedColor = color || '#000000';\n return /*#__PURE__*/_jsx(\"div\", {\n ref: ref,\n className: clsx('sparkline', styles.sparkline, styles['sparkline--single-point'], className),\n style: {\n width,\n height\n },\n children: /*#__PURE__*/_jsx(\"svg\", {\n width: width,\n height: height,\n \"aria-hidden\": \"true\",\n children: /*#__PURE__*/_jsx(\"circle\", {\n cx: cx,\n cy: cy,\n r: strokeWidth * 1.5,\n fill: resolvedColor\n })\n })\n });\n }\n return /*#__PURE__*/_jsx(\"div\", {\n ref: ref,\n className: clsx('sparkline', styles.sparkline, className),\n children: /*#__PURE__*/_jsx(LineChartUnresponsive, {\n data: seriesWithGradient,\n width: width,\n height: height,\n margin: finalMargin,\n chartId: chartId,\n withGradientFill: withGradientFill,\n withTooltips: false,\n showLegend: false,\n gridVisibility: \"none\",\n options: {\n axis: {\n x: {\n display: false\n },\n y: {\n display: false\n }\n }\n },\n curveType: \"monotone\",\n animation: animation\n })\n });\n});\nSparklineComponent.displayName = 'SparklineComponent';\n\n/**\n * Sparkline - A minimal line chart for inline data visualization.\n *\n * Sparklines are compact charts designed to be embedded inline with text or\n * displayed in small spaces like table cells or dashboards. They show trends\n * without axes, labels, or other chart chrome.\n *\n * This component is built on top of LineChart with preconfigured settings\n * for minimal display (no axes, grid, tooltips, or legend).\n */\nconst SparklineUnresponsive = SparklineComponent;\nSparklineUnresponsive.displayName = 'SparklineUnresponsive';\n\n/**\n * Responsive Sparkline chart component\n */\nconst Sparkline = withResponsive(SparklineUnresponsive);\nexport { Sparkline as default, SparklineUnresponsive };","import 'css-chunk:src/charts/sparkline/sparkline.module.scss';export default {\n \"sparkline\": \"a8ccharts-o-3Z8B\",\n \"sparkline--empty\": \"a8ccharts-CbLbcd\"\n};","import clsx from 'clsx';\nimport styles from './trend-indicator.module.scss';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst DIRECTION_LABELS = {\n up: 'Increase',\n down: 'Decrease',\n neutral: 'No change'\n};\nconst Icon = ({\n direction\n}) => {\n if (direction === 'neutral') {\n return null;\n }\n const isUp = direction === 'up';\n return /*#__PURE__*/_jsx(\"svg\", {\n className: styles['trend-indicator__icon'],\n viewBox: \"0 0 16 16\",\n fill: \"none\",\n \"aria-hidden\": \"true\",\n children: /*#__PURE__*/_jsx(\"path\", {\n d: isUp ? 'M8 13V3M4 7l4-4 4 4' : 'M8 3v10M4 9l4 4 4-4',\n stroke: \"currentColor\",\n strokeWidth: \"1.5\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })\n });\n};\n\n/**\n * TrendIndicator displays a directional trend with a value.\n * Used to show percentage changes or growth metrics.\n *\n * @param {TrendIndicatorProps} props - Component props\n * @return {JSX.Element} The rendered trend indicator\n */\nexport function TrendIndicator({\n direction,\n value,\n className,\n style,\n showIcon = true\n}) {\n const ariaLabel = `${DIRECTION_LABELS[direction]}: ${value}`;\n return /*#__PURE__*/_jsxs(\"span\", {\n className: clsx(styles['trend-indicator'], styles[`trend-indicator--${direction}`], className),\n style: style,\n \"aria-label\": ariaLabel,\n children: [showIcon && /*#__PURE__*/_jsx(Icon, {\n direction: direction\n }), /*#__PURE__*/_jsx(\"span\", {\n className: styles['trend-indicator__value'],\n children: value\n })]\n });\n}","import 'css-chunk:src/components/trend-indicator/trend-indicator.module.scss';export default {\n \"trend-indicator\": \"a8ccharts-tGw1PY\",\n \"trend-indicator--up\": \"a8ccharts-Fn-D1W\",\n \"trend-indicator--down\": \"a8ccharts-HqtGQO\",\n \"trend-indicator--neutral\": \"a8ccharts-S10nvO\",\n \"trend-indicator__icon\": \"a8ccharts-5HjpOT\",\n \"trend-indicator__value\": \"a8ccharts-muLL2Q\"\n};"]}