lintje 0.3.0 → 0.4.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 (252) hide show
  1. package/README.md +1 -1
  2. package/dist-elements/actions.js +1 -1
  3. package/dist-elements/chunks/{base-CbmWxUig.js → base-DRGvkF-r.js} +90 -87
  4. package/dist-elements/chunks/{controls-DxmnDSBr.js → controls-_4ac1Lpz.js} +1 -1
  5. package/dist-elements/chunks/{date-format-mHtZyBys.js → date-format-DxP9yfDp.js} +1 -1
  6. package/dist-elements/chunks/{dialog-DChINFxD.js → dialog-B7aRBtjy.js} +2 -2
  7. package/dist-elements/chunks/{disclosure-DLkXPUpV.js → disclosure-DirPLy2E.js} +1 -1
  8. package/dist-elements/chunks/download-C68kcwPj.js +206 -0
  9. package/dist-elements/chunks/{focus-trap-BwOxE5BX.js → focus-trap-Dv8zu64A.js} +1 -1
  10. package/dist-elements/chunks/input-BGMLam-O.js +195 -0
  11. package/dist-elements/chunks/input-lQTmOMOz.js +4 -0
  12. package/dist-elements/chunks/{player-B8QXJ0Z5.js → player-BApadXr8.js} +2 -2
  13. package/dist-elements/chunks/{sentence-B19AyZBS.js → sentence-0wO85ZdJ.js} +1 -1
  14. package/dist-elements/chunks/{stagger-BHoOgy0g.js → stagger-BB_gcxBI.js} +55 -47
  15. package/dist-elements/content.js +1 -0
  16. package/dist-elements/core.js +1 -1
  17. package/dist-elements/custom-elements.json +7635 -6802
  18. package/dist-elements/data-types.json +130 -28
  19. package/dist-elements/feedback.js +1 -1
  20. package/dist-elements/guides/loading.md +3 -3
  21. package/dist-elements/inputs.js +1 -0
  22. package/dist-elements/layout.js +1 -1
  23. package/dist-elements/lintje.js +6301 -5732
  24. package/dist-elements/overlays.js +1 -1
  25. package/dist-elements/tag/activity-log.js +1 -1
  26. package/dist-elements/tag/ai-label.js +1 -1
  27. package/dist-elements/tag/announcement.js +2 -2
  28. package/dist-elements/tag/app-search.js +2 -2
  29. package/dist-elements/tag/audio-player.js +2 -2
  30. package/dist-elements/tag/badge.d.ts +1 -1
  31. package/dist-elements/tag/badge.js +1 -1
  32. package/dist-elements/tag/breadcrumbs.js +1 -1
  33. package/dist-elements/tag/button.d.ts +1 -1
  34. package/dist-elements/tag/button.js +1 -1
  35. package/dist-elements/tag/card-list.js +1 -1
  36. package/dist-elements/tag/card.js +1 -1
  37. package/dist-elements/tag/chart.js +721 -406
  38. package/dist-elements/tag/chat-answer.js +2 -2
  39. package/dist-elements/tag/chat-composer.js +1 -1
  40. package/dist-elements/tag/chat-message.js +1 -1
  41. package/dist-elements/tag/chat-strip.js +1 -1
  42. package/dist-elements/tag/chat-suggestions.js +1 -1
  43. package/dist-elements/tag/chat.js +1 -1
  44. package/dist-elements/tag/checkbox-group.js +3 -2
  45. package/dist-elements/tag/checkbox.js +3 -2
  46. package/dist-elements/tag/code.js +1 -1
  47. package/dist-elements/tag/combobox.js +11 -10
  48. package/dist-elements/tag/conflict-alert.js +1 -1
  49. package/dist-elements/tag/copy-button.js +1 -1
  50. package/dist-elements/tag/data-table.js +137 -137
  51. package/dist-elements/tag/date-input.js +14 -13
  52. package/dist-elements/tag/date-range.js +5 -4
  53. package/dist-elements/tag/description-list.js +1 -1
  54. package/dist-elements/tag/dialog.js +4 -4
  55. package/dist-elements/tag/document-viewer.js +1 -1
  56. package/dist-elements/tag/drawer.js +3 -3
  57. package/dist-elements/tag/empty-state.js +1 -1
  58. package/dist-elements/tag/error-page.js +1 -1
  59. package/dist-elements/tag/error-summary.js +2 -2
  60. package/dist-elements/tag/expander.js +2 -2
  61. package/dist-elements/tag/explainer.js +2 -2
  62. package/dist-elements/tag/field.js +1 -1
  63. package/dist-elements/tag/file-upload.js +4 -3
  64. package/dist-elements/tag/filter-bar.js +2 -2
  65. package/dist-elements/tag/filter-sheet.js +3 -3
  66. package/dist-elements/tag/filter-zone.js +2 -2
  67. package/dist-elements/tag/find.d.ts +1 -0
  68. package/dist-elements/tag/find.js +128 -0
  69. package/dist-elements/tag/footer.js +1 -1
  70. package/dist-elements/tag/form-actions.js +2 -2
  71. package/dist-elements/tag/form-section.js +2 -2
  72. package/dist-elements/tag/form.js +2 -2
  73. package/dist-elements/tag/gallery.js +1 -1
  74. package/dist-elements/tag/grid-item.d.ts +1 -1
  75. package/dist-elements/tag/grid-item.js +1 -1
  76. package/dist-elements/tag/grid.d.ts +1 -1
  77. package/dist-elements/tag/grid.js +1 -1
  78. package/dist-elements/tag/hero.js +1 -1
  79. package/dist-elements/tag/highlight.js +1 -1
  80. package/dist-elements/tag/icon-button.d.ts +1 -1
  81. package/dist-elements/tag/icon-button.js +1 -1
  82. package/dist-elements/tag/icon.d.ts +1 -1
  83. package/dist-elements/tag/icon.js +1 -1
  84. package/dist-elements/tag/job-list.js +1 -1
  85. package/dist-elements/tag/kpi-row.js +1 -1
  86. package/dist-elements/tag/kpi.js +61 -61
  87. package/dist-elements/tag/level-meter.js +1 -1
  88. package/dist-elements/tag/list.js +2 -2
  89. package/dist-elements/tag/logo.js +1 -1
  90. package/dist-elements/tag/map.js +148 -142
  91. package/dist-elements/tag/menu-button.js +1 -1
  92. package/dist-elements/tag/modal.js +2 -2
  93. package/dist-elements/tag/multiselect.js +4 -3
  94. package/dist-elements/tag/note.js +1 -1
  95. package/dist-elements/tag/notifications.js +2 -2
  96. package/dist-elements/tag/number-input.js +3 -2
  97. package/dist-elements/tag/page-header.js +1 -1
  98. package/dist-elements/tag/pagination.js +32 -32
  99. package/dist-elements/tag/popover.d.ts +1 -1
  100. package/dist-elements/tag/popover.js +1 -1
  101. package/dist-elements/tag/progress-bar.d.ts +1 -1
  102. package/dist-elements/tag/progress-bar.js +1 -1
  103. package/dist-elements/tag/prose.js +1 -1
  104. package/dist-elements/tag/qr-code.js +1 -1
  105. package/dist-elements/tag/radio-group.js +3 -2
  106. package/dist-elements/tag/range.js +3 -2
  107. package/dist-elements/tag/recording-status.js +1 -1
  108. package/dist-elements/tag/repeater.js +1 -1
  109. package/dist-elements/tag/segmented.js +3 -2
  110. package/dist-elements/tag/select.js +3 -2
  111. package/dist-elements/tag/shell.js +3 -3
  112. package/dist-elements/tag/skeleton.d.ts +1 -1
  113. package/dist-elements/tag/skeleton.js +1 -1
  114. package/dist-elements/tag/slot-picker.js +4 -3
  115. package/dist-elements/tag/sortable-list.js +1 -1
  116. package/dist-elements/tag/spinner.d.ts +1 -1
  117. package/dist-elements/tag/spinner.js +1 -1
  118. package/dist-elements/tag/split-pane.js +1 -1
  119. package/dist-elements/tag/status-dot.d.ts +1 -1
  120. package/dist-elements/tag/status-dot.js +1 -1
  121. package/dist-elements/tag/stepper.js +1 -1
  122. package/dist-elements/tag/streaming-text.js +1 -1
  123. package/dist-elements/tag/sub-nav.js +1 -1
  124. package/dist-elements/tag/tabs.js +1 -1
  125. package/dist-elements/tag/tag-input.js +11 -10
  126. package/dist-elements/tag/text-editor.js +3 -2
  127. package/dist-elements/tag/text-input.js +3 -2
  128. package/dist-elements/tag/textarea.js +3 -2
  129. package/dist-elements/tag/tile.d.ts +1 -1
  130. package/dist-elements/tag/tile.js +1 -1
  131. package/dist-elements/tag/time-input.js +7 -6
  132. package/dist-elements/tag/toast.js +2 -2
  133. package/dist-elements/tag/toggle.js +3 -2
  134. package/dist-elements/tag/toggletip.js +2 -2
  135. package/dist-elements/tag/token-value.d.ts +1 -0
  136. package/dist-elements/tag/token-value.js +75 -0
  137. package/dist-elements/tag/tooltip.d.ts +1 -1
  138. package/dist-elements/tag/tooltip.js +1 -1
  139. package/dist-elements/tag/transcript.js +1 -1
  140. package/dist-elements/tag/translator.js +1 -1
  141. package/dist-elements/tag/tree-view.js +1 -1
  142. package/dist-elements/tag/user-menu.js +1 -1
  143. package/dist-elements/tag/video-player.js +2 -2
  144. package/dist-elements/tokens.json +1244 -0
  145. package/dist-elements/types/bundle/actions.d.ts +3 -3
  146. package/dist-elements/types/bundle/content.d.ts +1 -0
  147. package/dist-elements/types/bundle/feedback.d.ts +5 -5
  148. package/dist-elements/types/bundle/index.d.ts +0 -10
  149. package/dist-elements/types/bundle/inputs.d.ts +1 -0
  150. package/dist-elements/types/bundle/layout.d.ts +3 -3
  151. package/dist-elements/types/bundle/overlays.d.ts +2 -2
  152. package/dist-elements/types/categories.d.ts +4 -0
  153. package/dist-elements/types/{primitives → components/actions}/button/button.d.ts +1 -1
  154. package/dist-elements/types/components/actions/copy-button/copy-button.d.ts +2 -2
  155. package/dist-elements/types/{icons → components/actions}/icon/icon.d.ts +2 -2
  156. package/dist-elements/types/{primitives → components/actions}/icon-button/icon-button.d.ts +1 -1
  157. package/dist-elements/types/components/actions/menu-button/menu-button.d.ts +3 -3
  158. package/dist-elements/types/components/actions/qr-code/qr-code.d.ts +1 -1
  159. package/dist-elements/types/components/charts/chart/chart.d.ts +1 -1
  160. package/dist-elements/types/components/charts/explainer/explainer.d.ts +1 -1
  161. package/dist-elements/types/components/charts/kpi/kpi.d.ts +3 -3
  162. package/dist-elements/types/components/charts/kpi-row/kpi-row.d.ts +1 -1
  163. package/dist-elements/types/components/charts/note/note.d.ts +1 -1
  164. package/dist-elements/types/components/chat/chat/chat.d.ts +1 -1
  165. package/dist-elements/types/components/chat/chat-answer/chat-answer.d.ts +3 -3
  166. package/dist-elements/types/components/chat/chat-composer/chat-composer.d.ts +2 -2
  167. package/dist-elements/types/components/chat/chat-message/chat-message.d.ts +1 -1
  168. package/dist-elements/types/components/content/audio-player/audio-player.d.ts +5 -5
  169. package/dist-elements/types/components/content/code/code.d.ts +1 -1
  170. package/dist-elements/types/components/content/document-viewer/document-viewer.d.ts +2 -2
  171. package/dist-elements/types/components/content/highlight/highlight.d.ts +1 -1
  172. package/dist-elements/types/components/content/prose/prose.d.ts +1 -1
  173. package/dist-elements/types/components/content/token-value/token-value.d.ts +42 -0
  174. package/dist-elements/types/components/content/transcript/transcript.d.ts +3 -3
  175. package/dist-elements/types/components/content/translator/translator.d.ts +1 -1
  176. package/dist-elements/types/components/content/video-player/video-player.d.ts +1 -1
  177. package/dist-elements/types/components/feedback/announcement/announcement.d.ts +2 -2
  178. package/dist-elements/types/{primitives → components/feedback}/badge/badge.d.ts +2 -2
  179. package/dist-elements/types/components/feedback/conflict-alert/conflict-alert.d.ts +1 -1
  180. package/dist-elements/types/components/feedback/empty-state/empty-state.d.ts +2 -2
  181. package/dist-elements/types/components/feedback/job-list/job-list.d.ts +1 -1
  182. package/dist-elements/types/{primitives → components/feedback}/progress-bar/progress-bar.d.ts +2 -2
  183. package/dist-elements/types/{primitives → components/feedback}/skeleton/skeleton.d.ts +1 -1
  184. package/dist-elements/types/{primitives → components/feedback}/spinner/spinner.d.ts +1 -1
  185. package/dist-elements/types/{primitives → components/feedback}/status-dot/status-dot.d.ts +2 -2
  186. package/dist-elements/types/components/feedback/streaming-text/streaming-text.d.ts +2 -2
  187. package/dist-elements/types/components/filters/filter-sheet/filter-sheet.d.ts +2 -2
  188. package/dist-elements/types/components/forms/error-summary/error-summary.d.ts +1 -1
  189. package/dist-elements/types/components/forms/form-actions/form-actions.d.ts +1 -1
  190. package/dist-elements/types/components/forms/repeater/repeater.d.ts +2 -2
  191. package/dist-elements/types/components/forms/stepper/stepper.d.ts +1 -1
  192. package/dist-elements/types/components/frame/app-search/app-search.d.ts +1 -1
  193. package/dist-elements/types/components/frame/notifications/notifications.d.ts +2 -2
  194. package/dist-elements/types/components/frame/page-header/page-header.d.ts +1 -1
  195. package/dist-elements/types/components/frame/shell/shell.d.ts +1 -1
  196. package/dist-elements/types/components/frame/user-menu/user-menu.d.ts +2 -2
  197. package/dist-elements/types/components/index.d.ts +43 -3
  198. package/dist-elements/types/components/inputs/combobox/combobox.d.ts +2 -2
  199. package/dist-elements/types/components/inputs/date-input/date-input.d.ts +1 -1
  200. package/dist-elements/types/components/inputs/date-range/date-range.d.ts +2 -2
  201. package/dist-elements/types/components/inputs/file-upload/file-upload.d.ts +2 -2
  202. package/dist-elements/types/components/inputs/find/find.d.ts +51 -0
  203. package/dist-elements/types/components/inputs/segmented/segmented.d.ts +1 -1
  204. package/dist-elements/types/components/inputs/shared/input.d.ts +1 -1
  205. package/dist-elements/types/components/inputs/tag-input/tag-input.d.ts +1 -1
  206. package/dist-elements/types/components/inputs/text-editor/text-editor.d.ts +2 -2
  207. package/dist-elements/types/components/inputs/text-input/text-input.d.ts +1 -1
  208. package/dist-elements/types/components/inputs/time-input/time-input.d.ts +1 -1
  209. package/dist-elements/types/components/layout/expander/expander.d.ts +1 -1
  210. package/dist-elements/types/{primitives → components/layout}/grid/grid.d.ts +1 -1
  211. package/dist-elements/types/{primitives → components/layout}/grid-item/grid-item.d.ts +1 -1
  212. package/dist-elements/types/components/layout/tabs/tabs.d.ts +1 -1
  213. package/dist-elements/types/{primitives → components/layout}/tile/tile.d.ts +6 -6
  214. package/dist-elements/types/components/map/map/map.d.ts +2 -2
  215. package/dist-elements/types/components/overlays/modal/modal.d.ts +2 -2
  216. package/dist-elements/types/{primitives → components/overlays}/popover/popover.d.ts +2 -2
  217. package/dist-elements/types/components/overlays/toggletip/toggletip.d.ts +1 -1
  218. package/dist-elements/types/{primitives → components/overlays}/tooltip/tooltip.d.ts +2 -2
  219. package/dist-elements/types/components/shared/charts/index.d.ts +1 -0
  220. package/dist-elements/types/components/shared/charts/kinds.d.ts +6 -0
  221. package/dist-elements/types/components/shared/charts/map-chart/map-chart.d.ts +1 -1
  222. package/dist-elements/types/components/shared/charts/radar-chart/radar-chart.d.ts +31 -0
  223. package/dist-elements/types/components/shared/charts/shared/axes.d.ts +3 -1
  224. package/dist-elements/types/components/shared/charts/shared/controller.d.ts +5 -0
  225. package/dist-elements/types/components/shared/charts/shared/types.d.ts +33 -0
  226. package/dist-elements/types/components/shared/content-tile.d.ts +1 -1
  227. package/dist-elements/types/components/{forms/form → shared}/controls.d.ts +3 -2
  228. package/dist-elements/types/components/shared/overflow.d.ts +1 -1
  229. package/dist-elements/types/components/tables/activity-log/activity-log.d.ts +1 -1
  230. package/dist-elements/types/components/tables/card/card.d.ts +4 -4
  231. package/dist-elements/types/components/tables/data-table/actions.d.ts +1 -1
  232. package/dist-elements/types/components/tables/data-table/data-table.d.ts +3 -3
  233. package/dist-elements/types/components/tables/data-table/editing.d.ts +1 -1
  234. package/dist-elements/types/components/tables/data-table/filters.d.ts +3 -3
  235. package/dist-elements/types/components/tables/description-list/description-list.d.ts +2 -2
  236. package/dist-elements/types/components/tables/list/list.d.ts +4 -4
  237. package/dist-elements/types/components/tables/tree-view/tree-view.d.ts +1 -1
  238. package/dist-elements/types/core/focus.d.ts +1 -1
  239. package/dist-elements/types/types.d.ts +7 -7
  240. package/package.json +1 -1
  241. package/dist-elements/chunks/download-Ct9q2anY.js +0 -206
  242. package/dist-elements/chunks/input-CRW_exv_.js +0 -195
  243. package/dist-elements/types/primitives/index.d.ts +0 -35
  244. /package/dist-elements/types/components/content/{audio-player → shared}/playback.d.ts +0 -0
  245. /package/dist-elements/types/components/content/{audio-player → shared}/player.d.ts +0 -0
  246. /package/dist-elements/types/{primitives → components}/shared/announcement-block.d.ts +0 -0
  247. /package/dist-elements/types/components/{inputs/date-input → shared}/date-format.d.ts +0 -0
  248. /package/dist-elements/types/{primitives → components}/shared/empty-state-block.d.ts +0 -0
  249. /package/dist-elements/types/{primitives → components}/shared/grid-item-element.d.ts +0 -0
  250. /package/dist-elements/types/{primitives → components}/shared/length.d.ts +0 -0
  251. /package/dist-elements/types/{primitives → components}/shared/place.d.ts +0 -0
  252. /package/dist-elements/types/{primitives → components}/shared/tone.d.ts +0 -0
@@ -1,8 +1,8 @@
1
- import { F as e, I as t, Kt as n, O as r, Yt as i, Zt as a, _ as o, bt as s, c, en as l, h as u, i as d, l as f, nn as p, o as m, p as h, r as g, rn as _, s as v, v as y, y as b } from "../chunks/base-CbmWxUig.js";
1
+ import { F as e, I as t, Kt as n, O as r, Yt as i, Zt as a, _ as o, bt as s, c, d as l, en as u, f as d, h as f, nn as p, o as m, p as h, r as g, rn as _, u as v, v as y, y as b } from "../chunks/base-DRGvkF-r.js";
2
2
  import { t as x } from "./announcement.js";
3
3
  import "./segmented.js";
4
- import { a as S, c as C, i as w, n as T, t as E } from "../chunks/download-Ct9q2anY.js";
5
- import { C as D, E as O, S as k, T as A, _ as j, a as M, b as N, c as P, f as F, g as I, h as L, i as R, l as ee, n as z, o as B, p as V, r as H, s as te, t as ne, u as U, v as W, w as G, x as K, y as q } from "../chunks/stagger-BHoOgy0g.js";
4
+ import { a as S, c as C, i as w, n as T, t as E } from "../chunks/download-C68kcwPj.js";
5
+ import { C as D, E as O, S as k, T as A, _ as j, a as M, b as N, c as P, f as F, g as I, h as L, i as R, l as z, n as B, o as V, p as H, r as U, s as ee, t as te, u as W, v as G, w as K, x as q, y as ne } from "../chunks/stagger-BB_gcxBI.js";
6
6
  import "./data-table.js";
7
7
  //#region src/components/shared/charts/shared/plot-keys.ts
8
8
  var J = /* @__PURE__ */ new Set(["ArrowRight", "ArrowDown"]), Y = /* @__PURE__ */ new Set(["ArrowLeft", "ArrowUp"]);
@@ -55,26 +55,26 @@ function oe(e) {
55
55
  });
56
56
  }
57
57
  function se(e, t) {
58
- let { controller: n, description: r } = t, { labels: i, axisTitle: a, unit: o, asOfIndex: c, asOfLabel: u, pendingHours: d = 0, fixedMax: m, small: g = !1 } = e, y = (e.events ?? []).filter((e) => Number.isInteger(e.index) && e.index >= 0 && e.index < i.length).sort((e, t) => e.index - t.index).map((e, t) => ({
58
+ let { controller: n, description: r } = t, { labels: i, axisTitle: a, unit: o, asOfIndex: c, asOfLabel: d, pendingHours: f = 0, fixedMax: g, small: v = !1 } = e, y = (e.events ?? []).filter((e) => Number.isInteger(e.index) && e.index >= 0 && e.index < i.length).sort((e, t) => e.index - t.index).map((e, t) => ({
59
59
  ...e,
60
60
  number: t + 1
61
61
  })), b = n.id;
62
62
  n.measure({
63
63
  width: !0,
64
- height: t.height ?? (g ? "--chart-h-small" : "--chart-h-main"),
64
+ height: t.height ?? (v ? "--chart-h-small" : "--chart-h-main"),
65
65
  fit: !!t.expanded && !t.mobile
66
66
  });
67
67
  let x = e.series.filter((e) => !e.comparison).length > 1, S = 0, C = e.series.map((e) => ({
68
68
  ...e,
69
69
  color: F(e.color),
70
70
  symbol: x && !e.comparison ? I(e.color) ? e.color : L[S++ % L.length] : void 0
71
- })), w = C.filter((e) => !n.hiddenSeries.includes(e.label)), T = w.flatMap((e) => e.values).filter((e) => e != null), { max: E, ticks: k } = K(m ?? Math.max(...T, 1)), M = N(k, n.width, {
71
+ })), w = C.filter((e) => !n.hiddenSeries.includes(e.label)), T = w.flatMap((e) => e.values).filter((e) => e != null), { max: E, ticks: k } = q(g ?? Math.max(...T, 1)), M = N(k, n.width, {
72
72
  fontFamily: n.fontFamily,
73
- minimum: Math.ceil(f(i[0] ?? "", n.fontFamily) / 2)
74
- }), P = q(t, { left: M.width }), R = y.map((e) => Math.min(P.width - $ / 2, Math.max($ / 2, A(e.index, i.length, P)))), z = oe(R), ne = z.length ? Math.max(...z) + 1 : 0, U = q(t, {
73
+ minimum: Math.ceil(h(i[0] ?? "", n.fontFamily) / 2)
74
+ }), P = ne(t, { left: M.width }), R = y.map((e) => Math.min(P.width - $ / 2, Math.max($ / 2, A(e.index, i.length, P)))), B = oe(R), te = B.length ? Math.max(...B) + 1 : 0, W = ne(t, {
75
75
  left: M.width,
76
- ...ne ? { top: ne * 22 + ae } : {}
77
- }), W = (e) => ie + z[e] * 22, G = d > 6, J = c ?? i.length - 1, Y = (e) => e.comparison ? "var(--color-chart-secondary)" : e.color ?? "var(--color-chart-default)", re = C.map((e) => ({
76
+ ...te ? { top: te * 22 + ae } : {}
77
+ }), G = (e) => ie + B[e] * 22, K = f > 6, J = c ?? i.length - 1, Y = (e) => e.comparison ? "var(--color-chart-secondary)" : e.color ?? "var(--color-chart-default)", re = C.map((e) => ({
78
78
  label: e.label,
79
79
  color: Y(e),
80
80
  shape: e.comparison ? "dashed" : "line",
@@ -82,7 +82,7 @@ function se(e, t) {
82
82
  hidden: n.hiddenSeries.includes(e.label)
83
83
  })), X = Math.max(1, Math.ceil(i.length / 8)), se = i.map((e, t) => ({
84
84
  label: e,
85
- x: A(t, i.length, U),
85
+ x: A(t, i.length, W),
86
86
  i: t
87
87
  })).filter((e) => e.i % X === 0);
88
88
  function ce(e) {
@@ -91,7 +91,7 @@ function se(e, t) {
91
91
  title: i[e],
92
92
  rows: w.map((t) => ({
93
93
  label: t.label,
94
- value: t.values[e] == null ? "geen gegevens" : v(t.values[e]),
94
+ value: t.values[e] == null ? "geen gegevens" : l(t.values[e]),
95
95
  color: Y(t)
96
96
  })),
97
97
  ...t.length ? { events: t } : {}
@@ -100,86 +100,86 @@ function se(e, t) {
100
100
  let le = Z(n, i.length, (e) => {
101
101
  let t = w.map((t) => t.values[e]).filter((e) => e != null);
102
102
  return {
103
- x: A(e, i.length, U),
104
- y: t.length ? O(Math.max(...t), E, U) : U.top,
103
+ x: A(e, i.length, W),
104
+ y: t.length ? O(Math.max(...t), E, W) : W.top,
105
105
  content: ce(e)
106
106
  };
107
107
  }), ue = [
108
- d > 0 ? (() => {
109
- let e = A(J, i.length, U), t = G ? D(U) / (i.length - 1) : U.width - U.right - e;
110
- return _`<rect x=${e} y=${U.top} width=${Math.max(0, t)}
111
- height=${U.height - U.top - U.bottom}
108
+ f > 0 ? (() => {
109
+ let e = A(J, i.length, W), t = K ? D(W) / (i.length - 1) : W.width - W.right - e;
110
+ return _`<rect x=${e} y=${W.top} width=${Math.max(0, t)}
111
+ height=${W.height - W.top - W.bottom}
112
112
  fill="url(#hatch-${b})" />`;
113
- })() : l,
113
+ })() : u,
114
114
  y.length ? _`<g>
115
115
  ${y.map((e, t) => {
116
- let n = A(e.index, i.length, U);
116
+ let n = A(e.index, i.length, W);
117
117
  return _`<line class="lintje-chart__event-line" x1=${n} x2=${n}
118
- y1=${W(t) + $} y2=${U.height - U.bottom} />`;
118
+ y1=${G(t) + $} y2=${W.height - W.bottom} />`;
119
119
  })}
120
120
  ${y.map((e, t) => _`
121
- <rect class="lintje-chart__event-chip" x=${R[t] - $ / 2} y=${W(t)}
121
+ <rect class="lintje-chart__event-chip" x=${R[t] - $ / 2} y=${G(t)}
122
122
  width=${$} height=${$} />
123
- <text class="lintje-chart__event-number" x=${R[t]} y=${W(t) + $ / 2}
123
+ <text class="lintje-chart__event-number" x=${R[t]} y=${G(t) + $ / 2}
124
124
  text-anchor="middle" dominant-baseline="central">${e.number}</text>
125
125
  `)}
126
- </g>` : l,
126
+ </g>` : u,
127
127
  _`<g class="lintje-chart__reveal">
128
128
  ${w.map((e) => {
129
- let t = Y(e), n = e.comparison ? void 0 : V(t), r = [[]];
129
+ let t = Y(e), n = e.comparison ? void 0 : H(t), r = [[]];
130
130
  e.values.forEach((e, t) => {
131
- e == null || G && t > J ? r[r.length - 1].length && r.push([]) : r[r.length - 1].push({
132
- x: A(t, i.length, U),
133
- y: O(e, E, U)
131
+ e == null || K && t > J ? r[r.length - 1].length && r.push([]) : r[r.length - 1].push({
132
+ x: A(t, i.length, W),
133
+ y: O(e, E, W)
134
134
  });
135
135
  });
136
136
  let a = r.filter((e) => e.length > 0);
137
- if (a.length === 0) return l;
138
- let o = a[a.length - 1], s = o[o.length - 1], c = U.height - U.bottom;
137
+ if (a.length === 0) return u;
138
+ let o = a[a.length - 1], s = o[o.length - 1], c = W.height - W.bottom;
139
139
  return _`
140
140
  <g>
141
141
  ${a.map((r) => {
142
142
  let i = r.map((e) => `${e.x},${e.y}`).join(" ");
143
143
  return _`
144
144
  ${e.area && !e.comparison ? _`<polygon fill=${t} fill-opacity=".14"
145
- points=${`${r[0].x},${c} ${i} ${r[r.length - 1].x},${c}`} />` : l}
146
- ${n && r.length > 1 ? _`<polyline class="lintje-chart__line lintje-chart__line--casing" points=${i} stroke=${n} />` : l}
145
+ points=${`${r[0].x},${c} ${i} ${r[r.length - 1].x},${c}`} />` : u}
146
+ ${n && r.length > 1 ? _`<polyline class="lintje-chart__line lintje-chart__line--casing" points=${i} stroke=${n} />` : u}
147
147
  ${r.length === 1 ? _`<circle cx=${r[0].x} cy=${r[0].y} r="2.5" fill=${t} />` : _`<polyline
148
148
  class="lintje-chart__line"
149
149
  points=${i}
150
150
  stroke=${t}
151
- stroke-dasharray=${e.comparison ? "5 4" : l}
151
+ stroke-dasharray=${e.comparison ? "5 4" : u}
152
152
  opacity=${e.comparison ? .9 : 1} />`}
153
153
  `;
154
154
  })}
155
155
  <!-- The line's own shape at its end; a 4 px point there at an early as-of time. -->
156
- ${e.symbol ? _`<path class="lintje-chart__line-end" d=${j(e.symbol, 4.5, s.x, s.y)} fill=${t} />` : G && !e.comparison ? _`<circle cx=${s.x} cy=${s.y} r="4" fill=${t} />` : l}
156
+ ${e.symbol ? _`<path class="lintje-chart__line-end" d=${j(e.symbol, 4.5, s.x, s.y)} fill=${t} />` : K && !e.comparison ? _`<circle cx=${s.x} cy=${s.y} r="4" fill=${t} />` : u}
157
157
  </g>
158
158
  `;
159
159
  })}
160
160
  </g>`,
161
- G && u ? B({
162
- area: U,
161
+ K && d ? V({
162
+ area: W,
163
163
  index: J,
164
164
  count: i.length,
165
- label: `peilmoment ${u}`,
166
- pendingHours: d,
165
+ label: `peilmoment ${d}`,
166
+ pendingHours: f,
167
167
  lastValue: (() => {
168
168
  let e = w.find((e) => !e.comparison)?.values[J];
169
- return e == null ? void 0 : `${v(e)}${o ? ` ${o}` : ""}`;
169
+ return e == null ? void 0 : `${l(e)}${o ? ` ${o}` : ""}`;
170
170
  })()
171
- }) : l,
172
- n.hoverIndex == null ? l : w.map((e) => {
171
+ }) : u,
172
+ n.hoverIndex == null ? u : w.map((e) => {
173
173
  let t = n.hoverIndex, r = e.values[t];
174
- return r == null || G && t > J ? l : _`<circle class="lintje-chart__hover-point" r="4" fill=${Y(e)}
175
- cx=${A(t, i.length, U)}
176
- cy=${O(r, E, U)} />`;
174
+ return r == null || K && t > J ? u : _`<circle class="lintje-chart__hover-point" r="4" fill=${Y(e)}
175
+ cx=${A(t, i.length, W)}
176
+ cy=${O(r, E, W)} />`;
177
177
  }),
178
178
  i.map((e, t) => {
179
- let r = A(t, i.length, U), a = D(U) / Math.max(1, i.length - 1);
179
+ let r = A(t, i.length, W), a = D(W) / Math.max(1, i.length - 1);
180
180
  return _`
181
- <rect x=${r - a / 2} y=${U.top} width=${a}
182
- height=${U.height - U.top - U.bottom}
181
+ <rect x=${r - a / 2} y=${W.top} width=${a}
182
+ height=${W.height - W.top - W.bottom}
183
183
  fill="transparent"
184
184
  @mousemove=${(e) => n.hoverAt(t, e, ce(t))}
185
185
  @mouseleave=${() => n.hoverAt(null)} />
@@ -187,20 +187,20 @@ function se(e, t) {
187
187
  })
188
188
  ];
189
189
  return p`
190
- <div class="lintje-chart-wrap ${g ? "lintje-chart--small" : ""}"
190
+ <div class="lintje-chart-wrap ${v ? "lintje-chart--small" : ""}"
191
191
  ${s({ "--lintje-event-size": `${$}px` })}
192
- ${h(n.attach)} ?data-in-view=${n.inView} data-tooltip-anchor
192
+ ${m(n.attach)} ?data-in-view=${n.inView} data-tooltip-anchor
193
193
  @keydown=${(e) => n.dismiss(e)}>
194
- ${ee({
194
+ ${z({
195
195
  items: re,
196
196
  onToggle: (e) => n.toggleSeries(e)
197
197
  })}
198
- ${te({
198
+ ${ee({
199
199
  fontFamily: n.fontFamily,
200
200
  id: b,
201
201
  ticks: k,
202
202
  max: E,
203
- area: U,
203
+ area: W,
204
204
  formatTick: M.format,
205
205
  axisTitle: a ?? o,
206
206
  xLabels: se,
@@ -213,8 +213,8 @@ function se(e, t) {
213
213
  <span><span class="lintje-chart-events__category">${i[e.index]}</span> ·
214
214
  ${e.label}</span>
215
215
  </li>`)}
216
- </ol>` : l}
217
- ${H(n)}
216
+ </ol>` : u}
217
+ ${U(n)}
218
218
  ${Q(n)}
219
219
  </div>
220
220
  `;
@@ -224,13 +224,13 @@ function se(e, t) {
224
224
  var ce = {
225
225
  clickable: !1,
226
226
  state: "",
227
- markId: l,
228
- role: l,
229
- tabIndex: l,
230
- pressed: l,
231
- label: l,
232
- click: l,
233
- keydown: l
227
+ markId: u,
228
+ role: u,
229
+ tabIndex: u,
230
+ pressed: u,
231
+ label: u,
232
+ click: u,
233
+ keydown: u
234
234
  };
235
235
  function le(e, t) {
236
236
  let n = /* @__PURE__ */ new Set();
@@ -283,17 +283,17 @@ var ue = [
283
283
  "var(--color-chart-tint-5)"
284
284
  ];
285
285
  function de(e, t) {
286
- let { controller: n, description: r } = t, { labels: i, values: a, axisTitle: o, trend: c, dataLabels: u = !0, small: f = !1, links: g } = e, y = F(e.color) ?? "var(--color-chart-default)", b = n.id, x = le(t, g ?? []);
286
+ let { controller: n, description: r } = t, { labels: i, values: a, axisTitle: o, trend: d, dataLabels: f = !0, small: h = !1, links: g } = e, y = F(e.color) ?? "var(--color-chart-default)", b = n.id, x = le(t, g ?? []);
287
287
  n.measure({
288
288
  width: !0,
289
- height: t.height ?? (f ? "--chart-h-small" : "--chart-h-main"),
289
+ height: t.height ?? (h ? "--chart-h-small" : "--chart-h-main"),
290
290
  fit: !!t.expanded && !t.mobile
291
291
  });
292
- let S = a.filter((e) => e != null), { max: C, ticks: w } = K(Math.max(...S, 1)), T = N(w, n.width, { fontFamily: n.fontFamily }), E = q(t, { left: T.width }), D = E.height - E.bottom, { width: A, bandWidth: j } = k(0, i.length, E), M = u && a.every((e) => e == null || d(m(e, A), j - 4)), P = (e) => ({
292
+ let S = a.filter((e) => e != null), { max: C, ticks: w } = q(Math.max(...S, 1)), T = N(w, n.width, { fontFamily: n.fontFamily }), E = ne(t, { left: T.width }), D = E.height - E.bottom, { width: A, bandWidth: j } = k(0, i.length, E), M = f && a.every((e) => e == null || c(v(e, A), j - 4)), P = (e) => ({
293
293
  title: i[e],
294
294
  rows: [{
295
295
  label: o ?? "Waarde",
296
- value: a[e] == null ? "geen gegevens" : v(a[e]),
296
+ value: a[e] == null ? "geen gegevens" : l(a[e]),
297
297
  color: y
298
298
  }]
299
299
  }), I = Z(n, i.length, (e) => ({
@@ -306,10 +306,10 @@ function de(e, t) {
306
306
  height=${Math.max(0, D - E.top)} fill="url(#hatch-${b})"
307
307
  @mousemove=${(e) => n.showTooltip(e, P(t))}
308
308
  @mouseleave=${() => n.hideTooltip()} />`;
309
- let a = O(e, C, E), o = x.of(g?.[t], i[t], `${i[t]}: ${v(e)}`);
309
+ let a = O(e, C, E), o = x.of(g?.[t], i[t], `${i[t]}: ${l(e)}`);
310
310
  return _`
311
311
  <g class="lintje-chart__bar-group ${n.hoverIndex === t ? "is-hovered" : ""}"
312
- ${s(z(t, i.length))}
312
+ ${s(B(t, i.length))}
313
313
  @mousemove=${(e) => n.showTooltip(e, P(t))}
314
314
  @mouseleave=${() => n.hideTooltip()}>
315
315
  <rect class="lintje-chart__bar lintje-chart__mark ${o.state}"
@@ -318,18 +318,18 @@ function de(e, t) {
318
318
  aria-pressed=${o.pressed} aria-label=${o.label}
319
319
  @click=${o.click} @keydown=${o.keydown} />
320
320
  ${M ? _`<text x=${r.center} y=${a - 5} text-anchor="middle" class="lintje-chart__data-label">
321
- ${m(e, r.width)}
322
- </text>` : l}
321
+ ${v(e, r.width)}
322
+ </text>` : u}
323
323
  </g>
324
324
  `;
325
- }), c ? _`<polyline
325
+ }), d ? _`<polyline
326
326
  fill="none" stroke="var(--color-chart-emphasis)" stroke-width="1.5" stroke-dasharray="5 4"
327
- points=${c.map((e, t) => e == null ? null : `${k(t, i.length, E).center},${O(e, C, E)}`).filter(Boolean).join(" ")} />` : l];
327
+ points=${d.map((e, t) => e == null ? null : `${k(t, i.length, E).center},${O(e, C, E)}`).filter(Boolean).join(" ")} />` : u];
328
328
  return p`
329
- <div class="lintje-chart-wrap ${f ? "lintje-chart--small" : ""}"
330
- ${h(n.attach)} ?data-in-view=${n.inView} data-tooltip-anchor
329
+ <div class="lintje-chart-wrap ${h ? "lintje-chart--small" : ""}"
330
+ ${m(n.attach)} ?data-in-view=${n.inView} data-tooltip-anchor
331
331
  @keydown=${(e) => n.dismiss(e) || x.escape(e)}>
332
- ${te({
332
+ ${ee({
333
333
  fontFamily: n.fontFamily,
334
334
  id: b,
335
335
  ticks: w,
@@ -345,7 +345,7 @@ function de(e, t) {
345
345
  interactive: x.interactive,
346
346
  keys: I
347
347
  }, L)}
348
- ${H(n)}
348
+ ${U(n)}
349
349
  ${Q(n)}
350
350
  </div>
351
351
  `;
@@ -356,22 +356,22 @@ function fe(e) {
356
356
  return e * 26 + 24;
357
357
  }
358
358
  function pe(e, t) {
359
- let { controller: n, description: r } = t, { rows: i, threshold: a, thresholdLabel: o, unit: c } = e, u = F(e.color) ?? "var(--color-chart-dark-yellow)", d = F(e.aboveThresholdColor) ?? "var(--color-chart-red)", f = n.id, m = i.map((e) => e.href ? {
359
+ let { controller: n, description: r } = t, { rows: i, threshold: a, thresholdLabel: o, unit: c } = e, d = F(e.color) ?? "var(--color-chart-dark-yellow)", f = F(e.aboveThresholdColor) ?? "var(--color-chart-red)", h = n.id, g = i.map((e) => e.href ? {
360
360
  id: e.id ?? e.label,
361
361
  href: e.href
362
- } : null), g = le(t, m), y = fe(i.length);
362
+ } : null), v = le(t, g), y = fe(i.length);
363
363
  n.measure({
364
364
  width: !0,
365
365
  height: y
366
366
  });
367
- let b = n.width, x = G(i.map((e) => e.label), b, { fontFamily: n.fontFamily }), { labelEnd: S, barStart: C } = x, w = Math.max(...i.map((e) => e.value), a ?? 0) * 1.15, T = (e) => Math.max(40, b - C - 60) * e / w, E = (e) => `${v(e)}${c ? ` ${c}` : ""}`, D = (e) => {
367
+ let b = n.width, x = K(i.map((e) => e.label), b, { fontFamily: n.fontFamily }), { labelEnd: S, barStart: C } = x, w = Math.max(...i.map((e) => e.value), a ?? 0) * 1.15, T = (e) => Math.max(40, b - C - 60) * e / w, E = (e) => `${l(e)}${c ? ` ${c}` : ""}`, D = (e) => {
368
368
  let t = i[e], n = a != null && t.value > a;
369
369
  return {
370
370
  title: t.label,
371
371
  rows: [{
372
372
  label: "Waarde",
373
373
  value: E(t.value),
374
- color: n ? d : u
374
+ color: n ? f : d
375
375
  }, ...a == null ? [] : [{
376
376
  label: "Norm",
377
377
  value: E(a),
@@ -384,27 +384,27 @@ function pe(e, t) {
384
384
  content: D(e)
385
385
  }));
386
386
  return p`
387
- <figure class="lintje-chart lintje-chart--rows" ${h(n.attach)} ?data-in-view=${n.inView}
387
+ <figure class="lintje-chart lintje-chart--rows" ${m(n.attach)} ?data-in-view=${n.inView}
388
388
  data-tooltip-anchor
389
- @keydown=${(e) => n.dismiss(e) || g.escape(e)}>
390
- <svg viewBox="0 0 ${b} ${y}" class="lintje-chart__svg" role=${R(g.interactive)}
391
- aria-labelledby="${f}-desc" width=${b} height=${y}
389
+ @keydown=${(e) => n.dismiss(e) || v.escape(e)}>
390
+ <svg viewBox="0 0 ${b} ${y}" class="lintje-chart__svg" role=${R(v.interactive)}
391
+ aria-labelledby="${h}-desc" width=${b} height=${y}
392
392
  ${s({
393
393
  height: `${y}px`,
394
- ...M(f)
394
+ ...M(h)
395
395
  })}
396
396
  tabindex="0" @keydown=${O.keydown} @focus=${O.focus} @blur=${O.blur}>
397
- <desc id="${f}-desc">${r}</desc>
398
- <defs>${P(f)}</defs>
399
- ${a == null ? l : _`
397
+ <desc id="${h}-desc">${r}</desc>
398
+ <defs>${P(h)}</defs>
399
+ ${a == null ? u : _`
400
400
  <line x1=${C + T(a)} x2=${C + T(a)} y1=${4} y2=${i.length * 26 + 2}
401
401
  stroke="var(--color-chart-emphasis)" stroke-width="1" stroke-dasharray="3 3" />
402
402
  <text x=${C + T(a) + 6} y=${i.length * 26 + 16} class="lintje-chart__axis-label">
403
- ${o ?? `norm ${v(a)}`}
403
+ ${o ?? `norm ${l(a)}`}
404
404
  </text>
405
405
  `}
406
406
  ${i.map((e, t) => {
407
- let r = t * 26 + 4, o = a != null && e.value > a, l = T(e.value), f = g.of(m[t], e.label, `${e.label}: ${v(e.value)}${c ? ` ${c}` : ""}`);
407
+ let r = t * 26 + 4, o = a != null && e.value > a, u = T(e.value), p = v.of(g[t], e.label, `${e.label}: ${l(e.value)}${c ? ` ${c}` : ""}`);
408
408
  return _`
409
409
  <g class="lintje-chart__bar-row ${n.hoverIndex === t ? "is-hovered" : ""}"
410
410
  @mousemove=${(e) => n.showTooltip(e, D(t))}
@@ -412,22 +412,22 @@ function pe(e, t) {
412
412
  <!-- Hit area across the whole row, so the tooltip doesn't flicker between bars. -->
413
413
  <rect x=${0} y=${r - 5} width=${b} height=${26} fill="transparent" />
414
414
  <text x=${S} y=${r + 16 - 3} text-anchor="end" class="lintje-chart__axis-label">${x.fit(e.label)}</text>
415
- <rect class="lintje-chart__bar lintje-chart__bar--horizontal lintje-chart__mark ${f.state}"
416
- ${s(z(t, i.length))}
417
- x=${C} y=${r} width=${Math.max(0, l)} height=${16}
418
- fill=${o ? d : u}
419
- data-mark-id=${f.markId} role=${f.role} tabindex=${f.tabIndex}
420
- aria-pressed=${f.pressed} aria-label=${f.label}
421
- @click=${f.click} @keydown=${f.keydown} />
422
- <text x=${C + l + 6} y=${r + 16 - 3} font-weight="700"
415
+ <rect class="lintje-chart__bar lintje-chart__bar--horizontal lintje-chart__mark ${p.state}"
416
+ ${s(B(t, i.length))}
417
+ x=${C} y=${r} width=${Math.max(0, u)} height=${16}
418
+ fill=${o ? f : d}
419
+ data-mark-id=${p.markId} role=${p.role} tabindex=${p.tabIndex}
420
+ aria-pressed=${p.pressed} aria-label=${p.label}
421
+ @click=${p.click} @keydown=${p.keydown} />
422
+ <text x=${C + u + 6} y=${r + 16 - 3} font-weight="700"
423
423
  class="lintje-chart__data-label ${a == null ? "" : "lintje-chart__data-label--halo"}">
424
- ${v(e.value)}${c ? ` ${c}` : ""}
424
+ ${l(e.value)}${c ? ` ${c}` : ""}
425
425
  </text>
426
426
  </g>
427
427
  `;
428
428
  })}
429
429
  </svg>
430
- ${H(n)}
430
+ ${U(n)}
431
431
  ${Q(n)}
432
432
  </figure>
433
433
  `;
@@ -435,47 +435,47 @@ function pe(e, t) {
435
435
  //#endregion
436
436
  //#region src/components/shared/charts/target-progress-chart/target-progress-chart.ts
437
437
  function me(e, t) {
438
- let { controller: n, description: r } = t, { rows: i, target: a = 100 } = e, o = n.id, l = fe(i.length);
438
+ let { controller: n, description: r } = t, { rows: i, target: a = 100 } = e, o = n.id, c = fe(i.length);
439
439
  n.measure({
440
440
  width: !0,
441
- height: l
441
+ height: c
442
442
  });
443
- let u = n.width, d = G(i.map((e) => e.label), u, { fontFamily: n.fontFamily }), { labelEnd: f, barStart: m } = d, g = (e) => Math.max(40, u - m - 70) * e / 110, v = m + g(a), y = (e) => e >= a ? "var(--color-chart-green)" : "var(--color-attention)", b = (e) => ({
443
+ let l = n.width, u = K(i.map((e) => e.label), l, { fontFamily: n.fontFamily }), { labelEnd: f, barStart: h } = u, g = (e) => Math.max(40, l - h - 70) * e / 110, v = h + g(a), y = (e) => e >= a ? "var(--color-chart-green)" : "var(--color-attention)", b = (e) => ({
444
444
  title: i[e].label,
445
445
  rows: [{
446
446
  label: "Voortgang",
447
- value: c(i[e].value),
447
+ value: d(i[e].value),
448
448
  color: y(i[e].value)
449
449
  }, {
450
450
  label: "Doel",
451
- value: c(a),
451
+ value: d(a),
452
452
  color: "var(--color-chart-emphasis)"
453
453
  }]
454
454
  }), x = Z(n, i.length, (e) => ({
455
- x: m + g(i[e].value),
455
+ x: h + g(i[e].value),
456
456
  y: e * 26 + 4,
457
457
  content: b(e)
458
458
  }));
459
459
  return p`
460
- <figure class="lintje-chart lintje-chart--rows" ${h(n.attach)} ?data-in-view=${n.inView}
460
+ <figure class="lintje-chart lintje-chart--rows" ${m(n.attach)} ?data-in-view=${n.inView}
461
461
  data-tooltip-anchor @keydown=${(e) => n.dismiss(e)}>
462
- <svg viewBox="0 0 ${u} ${l}" class="lintje-chart__svg" role="img"
463
- aria-labelledby="${o}-desc" width=${u} height=${l} ${s({ height: `${l}px` })}
462
+ <svg viewBox="0 0 ${l} ${c}" class="lintje-chart__svg" role="img"
463
+ aria-labelledby="${o}-desc" width=${l} height=${c} ${s({ height: `${c}px` })}
464
464
  tabindex="0" @keydown=${x.keydown} @focus=${x.focus} @blur=${x.blur}>
465
465
  <desc id="${o}-desc">${r}</desc>
466
466
  ${i.map((e, t) => {
467
- let r = t * 26 + 4, o = g(e.value), l = y(e.value), p = m + o + 46 > u, h = e.value >= a ? "lintje-chart__data-label--inside" : "lintje-chart__data-label--inside-light";
467
+ let r = t * 26 + 4, o = g(e.value), c = y(e.value), p = h + o + 46 > l, m = e.value >= a ? "lintje-chart__data-label--inside" : "lintje-chart__data-label--inside-light";
468
468
  return _`
469
469
  <g class="lintje-chart__bar-row ${n.hoverIndex === t ? "is-hovered" : ""}"
470
470
  @mousemove=${(e) => n.showTooltip(e, b(t))}
471
471
  @mouseleave=${() => n.hideTooltip()}>
472
- <rect x=${0} y=${r - 5} width=${u} height=${26} fill="transparent" />
473
- <text x=${f} y=${r + 16 - 3} text-anchor="end" class="lintje-chart__axis-label">${d.fit(e.label)}</text>
474
- <rect class="lintje-chart__bar lintje-chart__bar--horizontal" ${s(z(t, i.length))}
475
- x=${m} y=${r} width=${Math.max(0, o)} height=${16} fill=${l} />
476
- <text x=${p ? m + o - 6 : m + o + 6} y=${r + 16 - 3}
472
+ <rect x=${0} y=${r - 5} width=${l} height=${26} fill="transparent" />
473
+ <text x=${f} y=${r + 16 - 3} text-anchor="end" class="lintje-chart__axis-label">${u.fit(e.label)}</text>
474
+ <rect class="lintje-chart__bar lintje-chart__bar--horizontal" ${s(B(t, i.length))}
475
+ x=${h} y=${r} width=${Math.max(0, o)} height=${16} fill=${c} />
476
+ <text x=${p ? h + o - 6 : h + o + 6} y=${r + 16 - 3}
477
477
  text-anchor=${p ? "end" : "start"}
478
- class="lintje-chart__data-label ${p ? h : ""}" font-weight="700">${c(e.value)}</text>
478
+ class="lintje-chart__data-label ${p ? m : ""}" font-weight="700">${d(e.value)}</text>
479
479
  </g>
480
480
  `;
481
481
  })}
@@ -483,7 +483,7 @@ function me(e, t) {
483
483
  stroke="var(--color-chart-emphasis)" stroke-width="1" stroke-dasharray="3 3" />
484
484
  <text x=${v + 6} y=${i.length * 26 + 16} class="lintje-chart__axis-label">norm ${a}</text>
485
485
  </svg>
486
- ${H(n)}
486
+ ${U(n)}
487
487
  ${Q(n)}
488
488
  </figure>
489
489
  `;
@@ -491,40 +491,40 @@ function me(e, t) {
491
491
  //#endregion
492
492
  //#region src/components/shared/charts/grouped-bar-chart/grouped-bar-chart.ts
493
493
  function he(e, t) {
494
- let { controller: n, description: r } = t, { labels: i, axisTitle: a, small: o = !1 } = e, c = n.id;
494
+ let { controller: n, description: r } = t, { labels: i, axisTitle: a, small: o = !1 } = e, d = n.id;
495
495
  n.measure({
496
496
  width: !0,
497
497
  height: t.height ?? (o ? "--chart-h-small" : "--chart-h-main"),
498
498
  fit: !!t.expanded && !t.mobile
499
499
  });
500
- let u = e.series.map((e) => ({
500
+ let f = e.series.map((e) => ({
501
501
  ...e,
502
502
  color: F(e.color)
503
- })), f = u.filter((e) => !n.hiddenSeries.includes(e.label)), g = le(t, f.flatMap((e) => e.links ?? [])), { max: y, ticks: b } = K(Math.max(...f.flatMap((e) => e.values), 1)), x = N(b, n.width, { fontFamily: n.fontFamily }), S = q(t, { left: x.width }), C = S.height - S.bottom, w = k(0, i.length, S).width / Math.max(1, f.length), T = f.every((e) => e.values.every((e) => d(m(e, w), w - 2))), E = u.map((e, t) => ({
503
+ })), h = f.filter((e) => !n.hiddenSeries.includes(e.label)), g = le(t, h.flatMap((e) => e.links ?? [])), { max: y, ticks: b } = q(Math.max(...h.flatMap((e) => e.values), 1)), x = N(b, n.width, { fontFamily: n.fontFamily }), S = ne(t, { left: x.width }), C = S.height - S.bottom, w = k(0, i.length, S).width / Math.max(1, h.length), T = h.every((e) => e.values.every((e) => c(v(e, w), w - 2))), E = f.map((e, t) => ({
504
504
  label: e.label,
505
505
  color: e.color ?? (t === 0 ? "var(--color-chart-default)" : "var(--color-chart-secondary)"),
506
506
  shape: "square",
507
507
  hidden: n.hiddenSeries.includes(e.label)
508
- })), D = (e, t) => E[u.indexOf(e)]?.color ?? ue[t], A = (e) => ({
508
+ })), D = (e, t) => E[f.indexOf(e)]?.color ?? ue[t], A = (e) => ({
509
509
  title: i[e],
510
- rows: f.map((t, n) => ({
510
+ rows: h.map((t, n) => ({
511
511
  label: t.label,
512
- value: v(t.values[e]),
512
+ value: l(t.values[e]),
513
513
  color: D(t, n)
514
514
  }))
515
515
  }), j = Z(n, i.length, (e) => ({
516
516
  x: k(e, i.length, S).center,
517
- y: O(Math.max(0, ...f.map((t) => t.values[e])), y, S),
517
+ y: O(Math.max(0, ...h.map((t) => t.values[e])), y, S),
518
518
  content: A(e)
519
519
  })), M = i.map((e, t) => {
520
520
  let r = k(t, i.length, S);
521
521
  return _`
522
522
  <g class="lintje-chart__bar-group ${n.hoverIndex === t ? "is-hovered" : ""}"
523
- ${s(z(t, i.length))}
523
+ ${s(B(t, i.length))}
524
524
  @mousemove=${(e) => n.showTooltip(e, A(t))}
525
525
  @mouseleave=${() => n.hideTooltip()}>
526
- ${f.map((n, i) => {
527
- let a = n.values[t], o = O(a, y, S), s = D(n, i), c = g.of(n.links?.[t], `${e} · ${n.label}`, `${e}, ${n.label}: ${v(a)}`);
526
+ ${h.map((n, i) => {
527
+ let a = n.values[t], o = O(a, y, S), s = D(n, i), c = g.of(n.links?.[t], `${e} · ${n.label}`, `${e}, ${n.label}: ${l(a)}`);
528
528
  return _`
529
529
  <g>
530
530
  <rect class="lintje-chart__bar lintje-chart__mark ${c.state}"
@@ -534,7 +534,7 @@ function he(e, t) {
534
534
  aria-pressed=${c.pressed} aria-label=${c.label}
535
535
  @click=${c.click} @keydown=${c.keydown} />
536
536
  ${T ? _`<text x=${r.x + i * w + (w - 2) / 2} y=${o - 4}
537
- text-anchor="middle" class="lintje-chart__data-label">${m(a, w)}</text>` : l}
537
+ text-anchor="middle" class="lintje-chart__data-label">${v(a, w)}</text>` : u}
538
538
  </g>
539
539
  `;
540
540
  })}
@@ -543,15 +543,15 @@ function he(e, t) {
543
543
  });
544
544
  return p`
545
545
  <div class="lintje-chart-wrap ${o ? "lintje-chart--small" : ""}"
546
- ${h(n.attach)} ?data-in-view=${n.inView} data-tooltip-anchor
546
+ ${m(n.attach)} ?data-in-view=${n.inView} data-tooltip-anchor
547
547
  @keydown=${(e) => n.dismiss(e) || g.escape(e)}>
548
- ${ee({
548
+ ${z({
549
549
  items: E,
550
550
  onToggle: (e) => n.toggleSeries(e)
551
551
  })}
552
- ${te({
552
+ ${ee({
553
553
  fontFamily: n.fontFamily,
554
- id: c,
554
+ id: d,
555
555
  ticks: b,
556
556
  max: y,
557
557
  area: S,
@@ -565,7 +565,7 @@ function he(e, t) {
565
565
  interactive: g.interactive,
566
566
  keys: j
567
567
  }, M)}
568
- ${H(n)}
568
+ ${U(n)}
569
569
  ${Q(n)}
570
570
  </div>
571
571
  `;
@@ -615,10 +615,10 @@ var ve = /* @__PURE__ */ new Set([
615
615
  "moss-green"
616
616
  ]);
617
617
  function ye(e, t) {
618
- let { controller: n, description: r } = t, { labels: i, axisTitle: a, normalized: o = !1, totalOnTop: u = !0, small: f = !1 } = e, g = n.id;
618
+ let { controller: n, description: r } = t, { labels: i, axisTitle: a, normalized: o = !1, totalOnTop: f = !0, small: h = !1 } = e, g = n.id;
619
619
  n.measure({
620
620
  width: !0,
621
- height: t.height ?? (f ? "--chart-h-small" : "--chart-h-main"),
621
+ height: t.height ?? (h ? "--chart-h-small" : "--chart-h-main"),
622
622
  fit: !!t.expanded && !t.mobile
623
623
  });
624
624
  let y = e.series.map((e) => ({
@@ -633,26 +633,26 @@ function ye(e, t) {
633
633
  75,
634
634
  100
635
635
  ]
636
- } : K(Math.max(...x, 1)), w = N(C, n.width, { fontFamily: n.fontFamily }), T = q(t, { left: w.width }), E = T.height - T.bottom, { width: D, bandWidth: A } = k(0, i.length, T), j = u && !o && x.every((e) => d(m(e, A), A - 4)), M = _e(y.length), P = (e, t) => e.color ?? M[Math.min(t, M.length - 1)], I = (t) => {
636
+ } : q(Math.max(...x, 1)), w = N(C, n.width, { fontFamily: n.fontFamily }), T = ne(t, { left: w.width }), E = T.height - T.bottom, { width: D, bandWidth: A } = k(0, i.length, T), j = f && !o && x.every((e) => c(v(e, A), A - 4)), M = _e(y.length), P = (e, t) => e.color ?? M[Math.min(t, M.length - 1)], I = (t) => {
637
637
  let n = e.series[t].color;
638
638
  return (n == null ? t === 0 : ve.has(n)) ? "lintje-chart__data-label--inside" : "lintje-chart__data-label--inside-light";
639
639
  }, L = (e) => ({
640
640
  title: i[e],
641
641
  rows: y.map((t, n) => ({
642
642
  label: t.label,
643
- value: o ? c(t.values[e] / x[e] * 100) : v(t.values[e]),
643
+ value: o ? d(t.values[e] / x[e] * 100) : l(t.values[e]),
644
644
  color: P(t, n)
645
645
  }))
646
646
  }), R = Z(n, i.length, (e) => ({
647
647
  x: k(e, i.length, T).center,
648
648
  y: O(o ? S : x[e], S, T),
649
649
  content: L(e)
650
- })), B = y.map((e, t) => ({
650
+ })), V = y.map((e, t) => ({
651
651
  label: e.label,
652
652
  color: P(e, t),
653
653
  shape: "square"
654
- })), V = i.map((e, t) => {
655
- let r = k(t, i.length, T), a = 0, u = y.map((e, n) => {
654
+ })), H = i.map((e, t) => {
655
+ let r = k(t, i.length, T), a = 0, f = y.map((e, n) => {
656
656
  let r = e.values[t], i = o ? r / x[t] * 100 : r, s = O(a, S, T);
657
657
  a += i;
658
658
  let c = O(a, S, T);
@@ -666,7 +666,7 @@ function ye(e, t) {
666
666
  });
667
667
  return _`
668
668
  <g class="lintje-chart__bar-group ${n.hoverIndex === t ? "is-hovered" : ""}"
669
- ${s(z(t, i.length))}
669
+ ${s(B(t, i.length))}
670
670
  @mousemove=${(e) => n.showTooltip(e, L(t))}
671
671
  @mouseleave=${() => n.hideTooltip()}>
672
672
  <!-- The hit area under the whole column, so the tooltip also follows the empty
@@ -675,8 +675,8 @@ function ye(e, t) {
675
675
  <rect x=${r.x} y=${T.top} width=${r.width} height=${E - T.top} fill="transparent" />
676
676
  <!-- The segments in one group, so the column lifts on hover as a whole. -->
677
677
  <g class="lintje-chart__bar">
678
- ${u.map((n) => {
679
- let i = b.of(n.row.links?.[t], `${e} · ${n.row.label}`, `${e}, ${n.row.label}: ${v(n.row.values[t])}`);
678
+ ${f.map((n) => {
679
+ let i = b.of(n.row.links?.[t], `${e} · ${n.row.label}`, `${e}, ${n.row.label}: ${l(n.row.values[t])}`);
680
680
  return _`
681
681
  <rect class="lintje-chart__mark lintje-chart__segment ${i.state}"
682
682
  x=${r.x} y=${n.y1} width=${r.width} height=${n.height}
@@ -688,19 +688,19 @@ function ye(e, t) {
688
688
  })}
689
689
  </g>
690
690
  <!-- Percentages inside the segments when they are >= 16 px tall and fit the width. -->
691
- ${o ? u.map((e) => e.height >= 16 && d(c(e.value), D - 4) ? _`<text x=${r.center} y=${e.y1 + e.height / 2 + 4} text-anchor="middle"
692
- class="lintje-chart__data-label ${I(e.j)}">${c(e.value)}</text>` : l) : l}
691
+ ${o ? f.map((e) => e.height >= 16 && c(d(e.value), D - 4) ? _`<text x=${r.center} y=${e.y1 + e.height / 2 + 4} text-anchor="middle"
692
+ class="lintje-chart__data-label ${I(e.j)}">${d(e.value)}</text>` : u) : u}
693
693
  ${j ? _`<text x=${r.center} y=${O(x[t], S, T) - 5} text-anchor="middle"
694
- class="lintje-chart__data-label" font-weight="700">${m(x[t], r.bandWidth)}</text>` : l}
694
+ class="lintje-chart__data-label" font-weight="700">${v(x[t], r.bandWidth)}</text>` : u}
695
695
  </g>
696
696
  `;
697
697
  });
698
698
  return p`
699
- <div class="lintje-chart-wrap ${f ? "lintje-chart--small" : ""}"
700
- ${h(n.attach)} ?data-in-view=${n.inView} data-tooltip-anchor
699
+ <div class="lintje-chart-wrap ${h ? "lintje-chart--small" : ""}"
700
+ ${m(n.attach)} ?data-in-view=${n.inView} data-tooltip-anchor
701
701
  @keydown=${(e) => n.dismiss(e) || b.escape(e)}>
702
- ${ee({ items: B })}
703
- ${te({
702
+ ${z({ items: V })}
703
+ ${ee({
704
704
  fontFamily: n.fontFamily,
705
705
  id: g,
706
706
  ticks: C,
@@ -715,8 +715,8 @@ function ye(e, t) {
715
715
  })),
716
716
  interactive: b.interactive,
717
717
  keys: R
718
- }, V)}
719
- ${H(n)}
718
+ }, H)}
719
+ ${U(n)}
720
720
  ${Q(n)}
721
721
  </div>
722
722
  `;
@@ -764,38 +764,38 @@ function we(e, t, n) {
764
764
  return Ce(i, r);
765
765
  }
766
766
  function Te(e, t) {
767
- let { controller: n, description: r } = t, { labels: i, axisTitle: a, unit: o, small: s = !1 } = e, c = n.id, u = i.length;
767
+ let { controller: n, description: r } = t, { labels: i, axisTitle: a, unit: o, small: s = !1 } = e, c = n.id, d = i.length;
768
768
  n.measure({
769
769
  width: !0,
770
770
  height: t.height ?? (s ? "--chart-h-small" : "--chart-h-main"),
771
771
  fit: !!t.expanded && !t.mobile
772
772
  });
773
- let d = _e(e.series.length, e.color), m = e.series.map((e, t) => ({
773
+ let f = _e(e.series.length, e.color), g = e.series.map((e, t) => ({
774
774
  ...e,
775
- color: d[Math.min(t, d.length - 1)],
775
+ color: f[Math.min(t, f.length - 1)],
776
776
  hidden: n.hiddenSeries.includes(e.label)
777
- })), g = m.filter((e) => !e.hidden), y = we(n, m.map((e) => e.label).join("\0"), m.map((e) => +!e.hidden)), b = y.some((e, t) => e !== +!m[t].hidden), x = xe.get(n), S = m.map(() => i.map(() => !1)), C = m.map(() => i.map(() => 0)), w = m.map(() => i.map(() => 0)), T = i.map(() => !1);
777
+ })), v = g.filter((e) => !e.hidden), y = we(n, g.map((e) => e.label).join("\0"), g.map((e) => +!e.hidden)), b = y.some((e, t) => e !== +!g[t].hidden), x = xe.get(n), S = g.map(() => i.map(() => !1)), C = g.map(() => i.map(() => 0)), w = g.map(() => i.map(() => 0)), T = i.map(() => !1);
778
778
  i.forEach((e, t) => {
779
779
  let n = 0;
780
- m.forEach((e, r) => {
780
+ g.forEach((e, r) => {
781
781
  if (y[r] === 0) return;
782
782
  let i = e.values[t];
783
783
  T[t] || i == null ? T[t] = !0 : (S[r][t] = !0, C[r][t] = n, n += i * y[r], w[r][t] = n);
784
784
  });
785
785
  });
786
- let E = y.some((e) => e > 0), k = i.map((e, t) => m.map((e) => e.values[t]).filter((e) => e != null)).filter((e) => e.length > 0).map((e) => e.reduce((e, t) => e + t, 0)), { max: j, ticks: M } = K(Math.max(...k, 1)), P = N(M, n.width, {
786
+ let E = y.some((e) => e > 0), k = i.map((e, t) => g.map((e) => e.values[t]).filter((e) => e != null)).filter((e) => e.length > 0).map((e) => e.reduce((e, t) => e + t, 0)), { max: j, ticks: M } = q(Math.max(...k, 1)), P = N(M, n.width, {
787
787
  fontFamily: n.fontFamily,
788
- minimum: Math.ceil(f(i[0] ?? "", n.fontFamily) / 2)
789
- }), F = q(t, { left: P.width }), I = F.height - F.bottom, L = (e) => A(e, u, F), R = (e) => O(e, j, F), z = (e) => {
788
+ minimum: Math.ceil(h(i[0] ?? "", n.fontFamily) / 2)
789
+ }), F = ne(t, { left: P.width }), I = F.height - F.bottom, L = (e) => A(e, d, F), R = (e) => O(e, j, F), B = (e) => {
790
790
  let t = [];
791
791
  return i.forEach((n, r) => {
792
792
  if (!e(r)) return;
793
793
  let i = t[t.length - 1];
794
794
  i && i[i.length - 1] === r - 1 ? i.push(r) : t.push([r]);
795
795
  }), t;
796
- }, B = i.map((e, t) => {
796
+ }, V = i.map((e, t) => {
797
797
  let n = 0;
798
- for (let e of g) {
798
+ for (let e of v) {
799
799
  let r = e.values[t];
800
800
  if (r == null) return {
801
801
  level: n,
@@ -805,43 +805,43 @@ function Te(e, t) {
805
805
  }
806
806
  return {
807
807
  level: n,
808
- complete: g.length > 0
808
+ complete: v.length > 0
809
809
  };
810
- }), V = m.map((e) => ({
810
+ }), H = g.map((e) => ({
811
811
  label: e.label,
812
812
  color: e.color,
813
813
  shape: "square",
814
814
  hidden: e.hidden
815
- })), ne = Math.max(1, Math.ceil(u / 8)), U = i.map((e, t) => ({
815
+ })), te = Math.max(1, Math.ceil(d / 8)), W = i.map((e, t) => ({
816
816
  label: e,
817
817
  x: L(t),
818
818
  i: t
819
- })).filter((e) => e.i % ne === 0), W = g.length < m.length ? "Totaal getoond" : "Totaal";
820
- function G(e) {
819
+ })).filter((e) => e.i % te === 0), G = v.length < g.length ? "Totaal getoond" : "Totaal";
820
+ function K(e) {
821
821
  return {
822
822
  title: i[e],
823
- rows: [...[...g].reverse().map((t) => ({
823
+ rows: [...[...v].reverse().map((t) => ({
824
824
  label: t.label,
825
- value: t.values[e] == null ? be : v(t.values[e]),
825
+ value: t.values[e] == null ? be : l(t.values[e]),
826
826
  color: t.color
827
- })), ...g.length > 0 ? [{
828
- label: W,
829
- value: B[e].complete ? v(B[e].level) : be,
827
+ })), ...v.length > 0 ? [{
828
+ label: G,
829
+ value: V[e].complete ? l(V[e].level) : be,
830
830
  divider: !0
831
831
  }] : []]
832
832
  };
833
833
  }
834
- let J = Z(n, u, (e) => ({
834
+ let J = Z(n, d, (e) => ({
835
835
  x: L(e),
836
- y: B[e].level > 0 ? R(B[e].level) : F.top,
837
- content: G(e)
836
+ y: V[e].level > 0 ? R(V[e].level) : F.top,
837
+ content: K(e)
838
838
  })), Y = (e) => {
839
839
  let t = [0, 0];
840
- return m.forEach((n, r) => {
840
+ return g.forEach((n, r) => {
841
841
  S[r][e] && S[r][e + 1] && (t = [w[r][e], w[r][e + 1]]);
842
842
  }), t;
843
- }, re = (E ? z((e) => T[e]) : []).map((e) => {
844
- let t = Math.max(0, e[0] - 1), r = Math.min(u - 1, e[e.length - 1] + 1), i = Array.from({ length: r - t }, (e, n) => t + n).map((e) => {
843
+ }, re = (E ? B((e) => T[e]) : []).map((e) => {
844
+ let t = Math.max(0, e[0] - 1), r = Math.min(d - 1, e[e.length - 1] + 1), i = Array.from({ length: r - t }, (e, n) => t + n).map((e) => {
845
845
  let [t, n] = Y(e);
846
846
  return {
847
847
  k: e,
@@ -854,7 +854,7 @@ function Te(e, t) {
854
854
  from: a,
855
855
  width: o,
856
856
  ceiling: s,
857
- fits: f(be, n.fontFamily) + 8 <= o && s - F.top >= 20
857
+ fits: h(be, n.fontFamily) + 8 <= o && s - F.top >= 20
858
858
  };
859
859
  }), X = (e, t) => t.map((t) => `${L(t)},${R(e[t])}`), $ = [
860
860
  re.map((e) => _`
@@ -862,41 +862,41 @@ function Te(e, t) {
862
862
  points=${`${L(e.k)},${F.top} ${L(e.k + 1)},${F.top} ${L(e.k + 1)},${e.right} ${L(e.k)},${e.left}`} />`)}
863
863
  ${e.fits ? _`<text x=${e.from + e.width / 2} y=${(F.top + e.ceiling) / 2 + 4}
864
864
  text-anchor="middle"
865
- class="lintje-chart__as-of-note lintje-chart__data-label--halo">${be}</text>` : l}
865
+ class="lintje-chart__as-of-note lintje-chart__data-label--halo">${be}</text>` : u}
866
866
  `),
867
- _`<g class="lintje-chart__reveal" ${h(x.attach)}>
868
- ${m.map((e, t) => {
869
- let n = z((e) => S[t][e]);
867
+ _`<g class="lintje-chart__reveal" ${m(x.attach)}>
868
+ ${g.map((e, t) => {
869
+ let n = B((e) => S[t][e]);
870
870
  return _`<g>
871
871
  ${n.map((n) => n.length === 1 ? _`<circle cx=${L(n[0])} cy=${R(w[t][n[0]])} r="2.5" fill=${e.color} />` : _`<polygon fill=${e.color}
872
872
  points=${[...X(w[t], n), ...X(C[t], n).reverse()].join(" ")} />`)}
873
873
  </g>`;
874
874
  })}
875
875
  <!-- Between two parts a 1 px line in the surface: along each part's lower edge, not the floor. -->
876
- ${m.map((e, t) => z((e) => S[t][e] && C[t][e] > 0).filter((e) => e.length > 1).map((e) => _`<polyline class="lintje-chart__segment" fill="none" points=${X(C[t], e).join(" ")} />`))}
876
+ ${g.map((e, t) => B((e) => S[t][e] && C[t][e] > 0).filter((e) => e.length > 1).map((e) => _`<polyline class="lintje-chart__segment" fill="none" points=${X(C[t], e).join(" ")} />`))}
877
877
  </g>`,
878
- n.hoverIndex != null && !b ? m.map((e, t) => S[t][n.hoverIndex] ? _`<circle class="lintje-chart__hover-point" r="4" fill=${e.color}
879
- cx=${L(n.hoverIndex)} cy=${R(w[t][n.hoverIndex])} />` : l) : l,
878
+ n.hoverIndex != null && !b ? g.map((e, t) => S[t][n.hoverIndex] ? _`<circle class="lintje-chart__hover-point" r="4" fill=${e.color}
879
+ cx=${L(n.hoverIndex)} cy=${R(w[t][n.hoverIndex])} />` : u) : u,
880
880
  i.map((e, t) => {
881
- let r = D(F) / Math.max(1, u - 1);
881
+ let r = D(F) / Math.max(1, d - 1);
882
882
  return _`
883
883
  <rect x=${L(t) - r / 2} y=${F.top} width=${r}
884
884
  height=${I - F.top}
885
885
  fill="transparent"
886
- @mousemove=${(e) => n.hoverAt(t, e, G(t))}
886
+ @mousemove=${(e) => n.hoverAt(t, e, K(t))}
887
887
  @mouseleave=${() => n.hoverAt(null)} />
888
888
  `;
889
889
  })
890
890
  ];
891
891
  return p`
892
892
  <div class="lintje-chart-wrap ${s ? "lintje-chart--small" : ""}"
893
- ${h(n.attach)} ?data-in-view=${n.inView} data-tooltip-anchor
893
+ ${m(n.attach)} ?data-in-view=${n.inView} data-tooltip-anchor
894
894
  @keydown=${(e) => n.dismiss(e)}>
895
- ${ee({
896
- items: V,
895
+ ${z({
896
+ items: H,
897
897
  onToggle: (e) => n.toggleSeries(e)
898
898
  })}
899
- ${te({
899
+ ${ee({
900
900
  fontFamily: n.fontFamily,
901
901
  id: c,
902
902
  ticks: M,
@@ -904,11 +904,11 @@ function Te(e, t) {
904
904
  area: F,
905
905
  formatTick: P.format,
906
906
  axisTitle: a ?? o,
907
- xLabels: U,
907
+ xLabels: W,
908
908
  description: r,
909
909
  keys: J
910
910
  }, $)}
911
- ${H(n)}
911
+ ${U(n)}
912
912
  ${Q(n)}
913
913
  </div>
914
914
  `;
@@ -942,21 +942,21 @@ function ke(e) {
942
942
  ];
943
943
  }
944
944
  function Ae(e, t) {
945
- let { controller: n, description: r } = t, { donut: i = !1, centerValue: a, centerLabel: o, legendTable: u = !0, labelHeader: d = "Categorie" } = e, f = n.id, m = ke(e.segments).map((e) => ({
945
+ let { controller: n, description: r } = t, { donut: i = !1, centerValue: a, centerLabel: o, legendTable: c = !0, labelHeader: f = "Categorie" } = e, h = n.id, g = ke(e.segments).map((e) => ({
946
946
  ...e,
947
947
  color: F(e.color)
948
- })), g = m.map((e) => e.href ? {
948
+ })), v = g.map((e) => e.href ? {
949
949
  id: e.id ?? e.label,
950
950
  href: e.href
951
- } : null), y = le(t, g), b = (e) => {
952
- let t = y.of(g[e], m[e].label, m[e].label).state;
951
+ } : null), y = le(t, v), b = (e) => {
952
+ let t = y.of(v[e], g[e].label, g[e].label).state;
953
953
  return t.includes("is-selected") ? "is-selected" : t.includes("is-muted") ? "is-muted" : "";
954
954
  }, x = !!t.expanded;
955
955
  n.measure(x ? {
956
956
  width: !0,
957
957
  height: "--chart-h-main"
958
958
  } : {});
959
- let S = x ? Math.max(240, Math.min(560, n.height - 24)) : e.size ?? 200, C = m.reduce((e, t) => e + t.value, 0), w = S / 2, T = i ? w * .62 : 0, E = _e(m.filter(Oe).length, e.color), D = -1, O = m.map((e) => (Oe(e) && (D += 1), e.color ?? (e.remainder ? "var(--color-chart-remainder)" : De(e) ? "var(--color-chart-other)" : E[Math.min(D, E.length - 1)]))), k = -90, A = m.map((e, t) => {
959
+ let S = x ? Math.max(240, Math.min(560, n.height - 24)) : e.size ?? 200, C = g.reduce((e, t) => e + t.value, 0), w = S / 2, T = i ? w * .62 : 0, E = _e(g.filter(Oe).length, e.color), D = -1, O = g.map((e) => (Oe(e) && (D += 1), e.color ?? (e.remainder ? "var(--color-chart-remainder)" : De(e) ? "var(--color-chart-other)" : E[Math.min(D, E.length - 1)]))), k = -90, A = g.map((e, t) => {
960
960
  let n = e.value / C, r = k, a = k + n * 360;
961
961
  k = a;
962
962
  let o = +(n > .5), s = (e, t) => [w + t * Math.cos(e * Math.PI / 180), w + t * Math.sin(e * Math.PI / 180)], [c, l] = s(r, w), [u, d] = s(a, w);
@@ -973,15 +973,15 @@ function Ae(e, t) {
973
973
  n.hoverSegment = e, n.requestUpdate();
974
974
  };
975
975
  return p`
976
- <div class="lintje-pie-chart ${x ? "lintje-pie-chart--expanded" : ""}" ${h(n.attach)}
976
+ <div class="lintje-pie-chart ${x ? "lintje-pie-chart--expanded" : ""}" ${m(n.attach)}
977
977
  ?data-in-view=${n.inView} data-tooltip-anchor
978
978
  @keydown=${(e) => n.dismiss(e) || y.escape(e)}>
979
979
  <svg viewBox="0 0 ${S} ${S}" width=${S} height=${S} role=${R(y.interactive)}
980
- class="lintje-pie-chart__svg" aria-labelledby="${f}-desc" ${s(M(f))}>
981
- <desc id="${f}-desc">${r}</desc>
982
- <defs>${P(f)}</defs>
980
+ class="lintje-pie-chart__svg" aria-labelledby="${h}-desc" ${s(M(h))}>
981
+ <desc id="${h}-desc">${r}</desc>
982
+ <defs>${P(h)}</defs>
983
983
  ${A.map(({ segment: e, i: t, d: r, color: i }) => {
984
- let a = y.of(g[t], e.label, `${e.label}: ${v(e.value)} · ${c(e.value / C * 100)}`);
984
+ let a = y.of(v[t], e.label, `${e.label}: ${l(e.value)} · ${d(e.value / C * 100)}`);
985
985
  return _`
986
986
  <path d=${r} fill=${i}
987
987
  class="lintje-pie-chart__segment lintje-chart__mark lintje-chart__segment ${j === t ? "is-hovered" : ""} ${a.state}"
@@ -994,7 +994,7 @@ function Ae(e, t) {
994
994
  title: e.label,
995
995
  rows: [{
996
996
  label: "Aantal",
997
- value: `${v(e.value)} · ${c(e.value / C * 100)}`,
997
+ value: `${l(e.value)} · ${d(e.value / C * 100)}`,
998
998
  color: i
999
999
  }]
1000
1000
  });
@@ -1007,74 +1007,74 @@ function Ae(e, t) {
1007
1007
  <!-- The hovered segment once more on top, lifted with a light shadow: in place, the
1008
1008
  next segment would cover that shadow on one side (user test 13 Sep). -->
1009
1009
  ${N ? _`<path d=${N.d} fill=${N.color} class="lintje-pie-chart__lift lintje-chart__segment"
1010
- ${s({ "transform-origin": `${w}px ${w}px` })} aria-hidden="true" />` : l}
1010
+ ${s({ "transform-origin": `${w}px ${w}px` })} aria-hidden="true" />` : u}
1011
1011
  ${i && a ? _`
1012
1012
  <text x=${w} y=${w + 2} text-anchor="middle" class="lintje-pie-chart__center">${a}</text>
1013
- ${o ? _`<text x=${w} y=${w + 20} text-anchor="middle" class="lintje-chart__axis-label">${o}</text>` : l}
1014
- ` : l}
1013
+ ${o ? _`<text x=${w} y=${w + 20} text-anchor="middle" class="lintje-chart__axis-label">${o}</text>` : u}
1014
+ ` : u}
1015
1015
  </svg>
1016
1016
 
1017
- ${u ? p`
1017
+ ${c ? p`
1018
1018
  <table class="lintje-pie-chart__table">
1019
1019
  <caption class="visually-hidden">Legenda: ${r}</caption>
1020
1020
  <thead>
1021
1021
  <tr>
1022
- <th scope="col" class="lintje-pie-chart__column-label">${d}</th>
1022
+ <th scope="col" class="lintje-pie-chart__column-label">${f}</th>
1023
1023
  <th scope="col" class="lintje-pie-chart__column-label lintje-pie-chart__column-label--numeric">aantal</th>
1024
1024
  <th scope="col" class="lintje-pie-chart__column-label lintje-pie-chart__column-label--numeric">%</th>
1025
1025
  </tr>
1026
1026
  </thead>
1027
1027
  <tbody>
1028
- ${m.map((e, t) => p`
1028
+ ${g.map((e, t) => p`
1029
1029
  <tr class="lintje-pie-chart__row ${j === t ? "is-hovered" : ""} ${b(t)}"
1030
1030
  @mouseenter=${() => I(t)} @mouseleave=${() => I(null)}>
1031
1031
  <th scope="row" class="lintje-pie-chart__label">
1032
1032
  <span class="lintje-pie-chart__marker" ${s({ background: O[t] })}></span>${e.label}
1033
1033
  </th>
1034
- <td class="lintje-pie-chart__value">${v(e.value)}</td>
1035
- <td class="lintje-pie-chart__value">${c(e.value / C * 100)}</td>
1034
+ <td class="lintje-pie-chart__value">${l(e.value)}</td>
1035
+ <td class="lintje-pie-chart__value">${d(e.value / C * 100)}</td>
1036
1036
  </tr>
1037
1037
  `)}
1038
1038
  </tbody>
1039
1039
  <tfoot>
1040
1040
  <tr>
1041
1041
  <th scope="row" class="lintje-pie-chart__total-label">Totaal</th>
1042
- <td class="lintje-pie-chart__total">${v(C)}</td>
1042
+ <td class="lintje-pie-chart__total">${l(C)}</td>
1043
1043
  <td class="lintje-pie-chart__total"></td>
1044
1044
  </tr>
1045
1045
  </tfoot>
1046
1046
  </table>
1047
- ` : l}
1048
- ${H(n)}
1047
+ ` : u}
1048
+ ${U(n)}
1049
1049
  </div>
1050
1050
  `;
1051
1051
  }
1052
1052
  //#endregion
1053
1053
  //#region src/components/shared/charts/dual-axis-chart/dual-axis-chart.ts
1054
1054
  function je(e, t) {
1055
- let { controller: n, description: r } = t, { labels: i, threshold: a, thresholdLabel: o, small: c = !1, pendingHours: u = 0 } = e, d = {
1055
+ let { controller: n, description: r } = t, { labels: i, threshold: a, thresholdLabel: o, small: c = !1, pendingHours: d = 0 } = e, f = {
1056
1056
  ...e.left,
1057
1057
  color: F(e.left.color)
1058
- }, f = {
1058
+ }, h = {
1059
1059
  ...e.right,
1060
1060
  color: F(e.right.color)
1061
- }, m = n.id;
1061
+ }, g = n.id;
1062
1062
  n.measure({
1063
1063
  width: !0,
1064
1064
  height: t.height ?? (c ? "--chart-h-small" : "--chart-h-main"),
1065
1065
  fit: !!t.expanded && !t.mobile
1066
1066
  });
1067
- let g = d.color ?? "var(--color-chart-default)", y = f.color ?? "var(--color-chart-dark-yellow)", b = K(Math.max(...d.values.filter((e) => e != null), 1)), x = K(Math.max(...f.values.filter((e) => e != null), a ?? 0, 1)), S = N(b.ticks, n.width, { fontFamily: n.fontFamily }), C = N(x.ticks, n.width, { fontFamily: n.fontFamily }), w = q(t, {
1067
+ let v = f.color ?? "var(--color-chart-default)", y = h.color ?? "var(--color-chart-dark-yellow)", b = q(Math.max(...f.values.filter((e) => e != null), 1)), x = q(Math.max(...h.values.filter((e) => e != null), a ?? 0, 1)), S = N(b.ticks, n.width, { fontFamily: n.fontFamily }), C = N(x.ticks, n.width, { fontFamily: n.fontFamily }), w = ne(t, {
1068
1068
  left: S.width,
1069
1069
  right: C.width
1070
1070
  }), T = w.height - w.bottom, E = [
1071
1071
  {
1072
- label: `${d.label} (linkeras)`,
1073
- color: g,
1072
+ label: `${f.label} (linkeras)`,
1073
+ color: v,
1074
1074
  shape: "square"
1075
1075
  },
1076
1076
  {
1077
- label: `${f.label} (rechteras)`,
1077
+ label: `${h.label} (rechteras)`,
1078
1078
  color: y,
1079
1079
  shape: "line"
1080
1080
  },
@@ -1083,48 +1083,48 @@ function je(e, t) {
1083
1083
  color: "var(--color-chart-emphasis)",
1084
1084
  shape: "dashed"
1085
1085
  }]
1086
- ], D = Math.max(1, Math.ceil(i.length / 8)), A = n.hoverIndex, j = V(y), M = [[]];
1087
- f.values.forEach((e, t) => {
1086
+ ], D = Math.max(1, Math.ceil(i.length / 8)), A = n.hoverIndex, j = H(y), M = [[]];
1087
+ h.values.forEach((e, t) => {
1088
1088
  e == null ? M[M.length - 1].length && M.push([]) : M[M.length - 1].push(`${k(t, i.length, w).center},${O(e, x.max, w)}`);
1089
1089
  });
1090
- let P = (e, t) => e == null ? "geen gegevens" : `${v(e)}${t ? ` ${t}` : ""}`, I = (e) => ({
1090
+ let P = (e, t) => e == null ? "geen gegevens" : `${l(e)}${t ? ` ${t}` : ""}`, I = (e) => ({
1091
1091
  title: i[e],
1092
1092
  rows: [{
1093
- label: d.label,
1094
- value: P(d.values[e], d.unit),
1095
- color: g
1096
- }, {
1097
1093
  label: f.label,
1098
1094
  value: P(f.values[e], f.unit),
1095
+ color: v
1096
+ }, {
1097
+ label: h.label,
1098
+ value: P(h.values[e], h.unit),
1099
1099
  color: y
1100
1100
  }]
1101
1101
  }), L = Z(n, i.length, (e) => ({
1102
1102
  x: k(e, i.length, w).center,
1103
- y: Math.min(d.values[e] == null ? T : O(d.values[e], b.max, w), f.values[e] == null ? T : O(f.values[e], x.max, w)),
1103
+ y: Math.min(f.values[e] == null ? T : O(f.values[e], b.max, w), h.values[e] == null ? T : O(h.values[e], x.max, w)),
1104
1104
  content: I(e)
1105
1105
  }));
1106
1106
  return p`
1107
1107
  <div class="lintje-chart-wrap ${c ? "lintje-chart--small" : ""}"
1108
- ${h(n.attach)} ?data-in-view=${n.inView} data-tooltip-anchor
1108
+ ${m(n.attach)} ?data-in-view=${n.inView} data-tooltip-anchor
1109
1109
  @keydown=${(e) => n.dismiss(e)}>
1110
- ${ee({ items: E })}
1110
+ ${z({ items: E })}
1111
1111
  <figure class="lintje-chart">
1112
1112
  <svg viewBox="0 0 ${w.width} ${w.height}" class="lintje-chart__svg" role=${R(!1)}
1113
- aria-labelledby="${m}-desc" width=${w.width} height=${w.height}
1113
+ aria-labelledby="${g}-desc" width=${w.width} height=${w.height}
1114
1114
  tabindex="0" @keydown=${L.keydown} @focus=${L.focus} @blur=${L.blur}>
1115
- <desc id="${m}-desc">${r}</desc>
1115
+ <desc id="${g}-desc">${r}</desc>
1116
1116
  <defs>
1117
- <pattern id="hatch-${m}" width="6" height="6" patternUnits="userSpaceOnUse" patternTransform="rotate(45)">
1117
+ <pattern id="hatch-${g}" width="6" height="6" patternUnits="userSpaceOnUse" patternTransform="rotate(45)">
1118
1118
  <line x1="0" y1="0" x2="0" y2="6" stroke="var(--color-chart-hatch)" stroke-width="2" />
1119
1119
  </pattern>
1120
1120
  </defs>
1121
1121
  <!-- Incomplete hours at the end: hatched, never drawn as zero. -->
1122
- ${u > 0 ? (() => {
1123
- let e = k(i.length - u, i.length, w);
1122
+ ${d > 0 ? (() => {
1123
+ let e = k(i.length - d, i.length, w);
1124
1124
  return _`<rect x=${e.x - (e.bandWidth - e.width) / 2} y=${w.top}
1125
1125
  width=${w.width - w.right - e.x + (e.bandWidth - e.width) / 2}
1126
- height=${T - w.top} fill="url(#hatch-${m})" />`;
1127
- })() : l}
1126
+ height=${T - w.top} fill="url(#hatch-${g})" />`;
1127
+ })() : u}
1128
1128
 
1129
1129
  ${b.ticks.map((e) => {
1130
1130
  let t = O(e, b.max, w), n = e === 0;
@@ -1133,7 +1133,7 @@ function je(e, t) {
1133
1133
  <line x1=${w.left} x2=${w.width - w.right} y1=${t} y2=${t}
1134
1134
  stroke=${n ? "var(--color-chart-zero)" : "var(--color-chart-grid)"}
1135
1135
  stroke-width=${n ? 1.5 : 1} />
1136
- <text x=${w.left - 8} y=${t + 4} text-anchor="end" class="lintje-chart__axis-label" fill=${g}>
1136
+ <text x=${w.left - 8} y=${t + 4} text-anchor="end" class="lintje-chart__axis-label" fill=${v}>
1137
1137
  ${S.format(e)}
1138
1138
  </text>
1139
1139
  </g>
@@ -1145,27 +1145,27 @@ function je(e, t) {
1145
1145
  `)}
1146
1146
 
1147
1147
  <!-- 2 px axis lines in the color of their series -->
1148
- <line x1=${w.left} x2=${w.left} y1=${w.top} y2=${T} stroke=${g} stroke-width="2" />
1148
+ <line x1=${w.left} x2=${w.left} y1=${w.top} y2=${T} stroke=${v} stroke-width="2" />
1149
1149
  <line x1=${w.width - w.right} x2=${w.width - w.right} y1=${w.top} y2=${T}
1150
1150
  stroke=${y} stroke-width="2" />
1151
1151
 
1152
1152
  <!-- Bars grow in one after another; the hit areas below sit on top, so hover comes
1153
1153
  from hoverIndex rather than :hover. -->
1154
- ${d.values.map((e, t) => {
1154
+ ${f.values.map((e, t) => {
1155
1155
  let n = k(t, i.length, w);
1156
1156
  if (e == null) return _`<rect class="lintje-chart__missing" x=${n.x} y=${w.top} width=${n.width}
1157
- height=${Math.max(0, T - w.top)} fill="url(#hatch-${m})" />`;
1157
+ height=${Math.max(0, T - w.top)} fill="url(#hatch-${g})" />`;
1158
1158
  let r = O(e, b.max, w);
1159
1159
  return _`
1160
1160
  <g class="lintje-chart__bar-group ${A === t ? "is-hovered" : ""}"
1161
- ${s(z(t, i.length))}>
1161
+ ${s(B(t, i.length))}>
1162
1162
  <rect class="lintje-chart__bar" x=${n.x} y=${r} width=${n.width}
1163
- height=${Math.max(0, T - r)} fill=${g} />
1163
+ height=${Math.max(0, T - r)} fill=${v} />
1164
1164
  </g>
1165
1165
  `;
1166
1166
  })}
1167
1167
 
1168
- ${a == null ? l : _`<line x1=${w.left} x2=${w.width - w.right}
1168
+ ${a == null ? u : _`<line x1=${w.left} x2=${w.width - w.right}
1169
1169
  y1=${O(a, x.max, w)} y2=${O(a, x.max, w)}
1170
1170
  stroke="var(--color-chart-emphasis)" stroke-width="1" stroke-dasharray="4 3" />`}
1171
1171
 
@@ -1174,7 +1174,7 @@ function je(e, t) {
1174
1174
  let t = e.join(" "), [n, r] = e[0].split(",");
1175
1175
  return _`
1176
1176
  ${j && e.length > 1 ? _`<polyline class="lintje-chart__line lintje-chart__line--casing"
1177
- stroke=${j} points=${t} />` : l}
1177
+ stroke=${j} points=${t} />` : u}
1178
1178
  ${e.length === 1 ? _`<circle cx=${n} cy=${r} r="2.5" fill=${y} />` : _`<polyline class="lintje-chart__line" stroke=${y} points=${t} />`}
1179
1179
  `;
1180
1180
  })}
@@ -1186,9 +1186,9 @@ function je(e, t) {
1186
1186
  `)}
1187
1187
 
1188
1188
  <!-- Hover point on the right-axis line; no point for a missing value. -->
1189
- ${A != null && f.values[A] != null ? _`<circle class="lintje-chart__hover-point" r="4" fill=${y}
1189
+ ${A != null && h.values[A] != null ? _`<circle class="lintje-chart__hover-point" r="4" fill=${y}
1190
1190
  cx=${k(A, i.length, w).center}
1191
- cy=${O(f.values[A], x.max, w)} />` : l}
1191
+ cy=${O(h.values[A], x.max, w)} />` : u}
1192
1192
  ${i.map((e, t) => {
1193
1193
  let r = k(t, i.length, w);
1194
1194
  return _`
@@ -1200,7 +1200,7 @@ function je(e, t) {
1200
1200
  })}
1201
1201
  </svg>
1202
1202
  </figure>
1203
- ${H(n)}
1203
+ ${U(n)}
1204
1204
  ${Q(n)}
1205
1205
  </div>
1206
1206
  `;
@@ -1212,7 +1212,7 @@ function Le(e, t, n, r) {
1212
1212
  let i = 5.5, a = [];
1213
1213
  for (let [o, s] of e.entries()) {
1214
1214
  if (!t.includes(s.label)) continue;
1215
- let c = f(s.label, r, 700), l = s.y - 9, u = l - 12, d = l + 3, p = [{
1215
+ let c = h(s.label, r, 700), l = s.y - 9, u = l - 12, d = l + 3, f = [{
1216
1216
  anchor: "end",
1217
1217
  x: s.x - Fe,
1218
1218
  left: s.x - Fe - c
@@ -1231,9 +1231,9 @@ function Le(e, t, n, r) {
1231
1231
  top: e.y - i,
1232
1232
  bottom: e.y + i
1233
1233
  })));
1234
- if (!p) return [];
1234
+ if (!f) return [];
1235
1235
  a.push({
1236
- ...p,
1236
+ ...f,
1237
1237
  label: s.label,
1238
1238
  y: l
1239
1239
  });
@@ -1245,7 +1245,7 @@ function Le(e, t, n, r) {
1245
1245
  anchor: r
1246
1246
  }));
1247
1247
  }
1248
- var Re = (e) => e.charAt(0).toUpperCase() + e.slice(1), ze = (e, t) => `${v(e)}${t ? ` ${t}` : ""}`;
1248
+ var Re = (e) => e.charAt(0).toUpperCase() + e.slice(1), ze = (e, t) => `${l(e)}${t ? ` ${t}` : ""}`;
1249
1249
  function Be(e) {
1250
1250
  let t = new Set(e.series.map((e) => e.color).filter(I)), n = L.filter((e) => !t.has(e)), r = 0;
1251
1251
  return e.series.map((e) => {
@@ -1257,10 +1257,10 @@ function Be(e) {
1257
1257
  });
1258
1258
  }
1259
1259
  function Ve(e, n) {
1260
- let { controller: r, description: i } = n, { axisTitle: a, unit: o, xTitle: c, xUnit: d, threshold: f, thresholdLabel: m, small: g = !1 } = e, y = r.id;
1260
+ let { controller: r, description: i } = n, { axisTitle: a, unit: o, xTitle: c, xUnit: d, threshold: h, thresholdLabel: g, small: v = !1 } = e, y = r.id;
1261
1261
  r.measure({
1262
1262
  width: !0,
1263
- height: n.height ?? (g ? "--chart-h-small" : "--chart-h-main"),
1263
+ height: n.height ?? (v ? "--chart-h-small" : "--chart-h-main"),
1264
1264
  fit: !!n.expanded && !n.mobile
1265
1265
  });
1266
1266
  let b = Be(e), x = e.series.map((e, t) => ({
@@ -1270,11 +1270,11 @@ function Ve(e, n) {
1270
1270
  point: n,
1271
1271
  row: e,
1272
1272
  key: `${t}:${r}`
1273
- })).filter((e) => e.point.x != null && e.point.y != null)).sort((e, t) => e.point.x - t.point.x || e.point.y - t.point.y), w = C.filter(({ row: e }) => !S(e)), T = new Map(w.map((e, t) => [e.key, t])), E = K(Math.max(...w.map(({ point: e }) => e.x), 1), n.mobile ? 3 : 6), k = K(Math.max(...w.map(({ point: e }) => e.y), f ?? 0, 1)), A = N(k.ticks, r.width, { fontFamily: r.fontFamily }), M = q(n, {
1273
+ })).filter((e) => e.point.x != null && e.point.y != null)).sort((e, t) => e.point.x - t.point.x || e.point.y - t.point.y), w = C.filter(({ row: e }) => !S(e)), T = new Map(w.map((e, t) => [e.key, t])), E = q(Math.max(...w.map(({ point: e }) => e.x), 1), n.mobile ? 3 : 6), k = q(Math.max(...w.map(({ point: e }) => e.y), h ?? 0, 1)), A = N(k.ticks, r.width, { fontFamily: r.fontFamily }), M = ne(n, {
1274
1274
  left: A.width,
1275
1275
  bottom: Pe
1276
1276
  }), P = (e) => M.left + D(M) * e / E.max, F = E.ticks.map((e, t) => ({
1277
- label: v(e),
1277
+ label: l(e),
1278
1278
  x: P(e),
1279
1279
  anchor: t === E.ticks.length - 1 ? "end" : "middle"
1280
1280
  })), I = [...x.map((e) => ({
@@ -1283,8 +1283,8 @@ function Ve(e, n) {
1283
1283
  shape: "point",
1284
1284
  symbol: e.symbol,
1285
1285
  hidden: S(e)
1286
- })), ...f == null ? [] : [{
1287
- label: m ?? "Norm",
1286
+ })), ...h == null ? [] : [{
1287
+ label: g ?? "Norm",
1288
1288
  color: "var(--color-chart-emphasis)",
1289
1289
  shape: "dashed",
1290
1290
  fixed: !0
@@ -1314,54 +1314,54 @@ function Ve(e, n) {
1314
1314
  let R = (e) => ({
1315
1315
  x: P(e.x),
1316
1316
  y: O(e.y, k.max, M)
1317
- }), B = (e) => R(w[e].point), ne = Z(r, w.length, (e) => ({
1318
- ...B(e),
1317
+ }), V = (e) => R(w[e].point), te = Z(r, w.length, (e) => ({
1318
+ ...V(e),
1319
1319
  content: L(e)
1320
- })), U = w.map(({ point: e, row: t }) => e.href ? {
1320
+ })), W = w.map(({ point: e, row: t }) => e.href ? {
1321
1321
  id: e.id ?? `${t.label} · ${e.label}`,
1322
1322
  href: e.href
1323
- } : null), W = le(n, U), G = w.map(({ point: e }, t) => W.of(U[t], e.label, re(L(t)))), J = Le(w.map((e, t) => ({
1323
+ } : null), G = le(n, W), K = w.map(({ point: e }, t) => G.of(W[t], e.label, re(L(t)))), J = Le(w.map((e, t) => ({
1324
1324
  label: e.point.label,
1325
- ...B(t)
1326
- })), e.dataLabels ?? [], M, r.fontFamily), Y = f == null ? 0 : O(f, k.max, M), X = r.hoverIndex == null ? void 0 : w[r.hoverIndex], $ = (e) => {
1325
+ ...V(t)
1326
+ })), e.dataLabels ?? [], M, r.fontFamily), Y = h == null ? 0 : O(h, k.max, M), X = r.hoverIndex == null ? void 0 : w[r.hoverIndex], $ = (e) => {
1327
1327
  let n = e.target.closest?.("[data-point]");
1328
1328
  if (n) return Number(n.getAttribute("data-point"));
1329
1329
  let r = e.currentTarget, i = r.ownerSVGElement?.getBoundingClientRect(), a = i && i.width > 0 ? M.width / i.width : 1, o = (e.clientX - (i?.left ?? 0)) * a, s = (e.clientY - (i?.top ?? 0)) * a, c = t(r, "--h-target", 48) / 2, l = null, u = c;
1330
1330
  return w.forEach((e, t) => {
1331
- let { x: n, y: r } = B(t), i = Math.hypot(n - o, r - s);
1331
+ let { x: n, y: r } = V(t), i = Math.hypot(n - o, r - s);
1332
1332
  i <= u && (l = t, u = i);
1333
1333
  }), l;
1334
1334
  }, ie = (e) => {
1335
1335
  let t = $(e);
1336
1336
  t == null ? (r.hoverIndex != null || r.tooltip) && r.hoverAt(null) : r.hoverAt(t, e, L(t));
1337
1337
  }, ae = (e) => {
1338
- let t = $(e), n = t == null ? null : G[t];
1339
- n?.clickable && n.click !== l && n.click();
1340
- }, oe = X != null && G[r.hoverIndex]?.clickable, se = [f == null ? l : _`
1338
+ let t = $(e), n = t == null ? null : K[t];
1339
+ n?.clickable && n.click !== u && n.click();
1340
+ }, oe = X != null && K[r.hoverIndex]?.clickable, se = [h == null ? u : _`
1341
1341
  <g class="lintje-chart__reference">
1342
1342
  <line x1=${M.left} x2=${M.width - M.right} y1=${Y} y2=${Y}
1343
1343
  stroke="var(--color-chart-emphasis)" stroke-width="1" stroke-dasharray="3 3" />
1344
1344
  <text x=${M.left + 6} y=${Y - 6}
1345
1345
  class="lintje-chart__axis-label lintje-chart__axis-label--halo">
1346
- ${m ?? `norm ${ze(f, o)}`}
1346
+ ${g ?? `norm ${ze(h, o)}`}
1347
1347
  </text>
1348
1348
  </g>
1349
1349
  `, _`<g @mousemove=${ie} @mouseleave=${() => r.hoverAt(null)} @click=${ae}>
1350
1350
  <rect class="lintje-chart__hit ${oe ? "is-clickable" : ""}"
1351
1351
  x="0" y="0" width=${M.width} height=${M.height} />
1352
1352
  <g>
1353
- ${u(C, (e) => e.key, ({ point: e, row: t, key: n }, r) => {
1354
- let { x: i, y: a } = R(e), o = V(t.color), c = T.get(n), u = c == null ? void 0 : G[c];
1353
+ ${f(C, (e) => e.key, ({ point: e, row: t, key: n }, r) => {
1354
+ let { x: i, y: a } = R(e), o = H(t.color), c = T.get(n), l = c == null ? void 0 : K[c];
1355
1355
  return _`
1356
- <path class="lintje-chart__point lintje-chart__mark ${o ? "" : "lintje-chart__segment"} ${u?.state ?? "is-hidden"}"
1357
- ${s(z(r, C.length))}
1356
+ <path class="lintje-chart__point lintje-chart__mark ${o ? "" : "lintje-chart__segment"} ${l?.state ?? "is-hidden"}"
1357
+ ${s(B(r, C.length))}
1358
1358
  d=${j(t.symbol, Me, i, a)} fill=${t.color}
1359
- stroke=${o ?? l} stroke-width=${o ? 1 : l}
1360
- data-point=${c ?? l}
1361
- data-mark-id=${u?.markId ?? l} role=${u?.role ?? l}
1362
- tabindex=${u?.tabIndex ?? l}
1363
- aria-pressed=${u?.pressed ?? l} aria-label=${u?.label ?? l}
1364
- @keydown=${u?.keydown ?? l} />
1359
+ stroke=${o ?? u} stroke-width=${o ? 1 : u}
1360
+ data-point=${c ?? u}
1361
+ data-mark-id=${l?.markId ?? u} role=${l?.role ?? u}
1362
+ tabindex=${l?.tabIndex ?? u}
1363
+ aria-pressed=${l?.pressed ?? u} aria-label=${l?.label ?? u}
1364
+ @keydown=${l?.keydown ?? u} />
1365
1365
  `;
1366
1366
  })}
1367
1367
  </g>
@@ -1373,22 +1373,22 @@ function Ve(e, n) {
1373
1373
 
1374
1374
  <!-- The point under the pointer or the keyboard, raised with a ring in the surface. -->
1375
1375
  ${X ? (() => {
1376
- let { x: e, y: t } = B(r.hoverIndex), n = V(X.row.color), i = j(X.row.symbol, Ne, e, t);
1376
+ let { x: e, y: t } = V(r.hoverIndex), n = H(X.row.color), i = j(X.row.symbol, Ne, e, t);
1377
1377
  return _`
1378
1378
  <path class="lintje-chart__hover-point" d=${i} fill=${X.row.color} />
1379
- ${n ? _`<path class="lintje-chart__hover-casing" d=${i} stroke=${n} />` : l}
1379
+ ${n ? _`<path class="lintje-chart__hover-casing" d=${i} stroke=${n} />` : u}
1380
1380
  `;
1381
- })() : l}
1381
+ })() : u}
1382
1382
  </g>`];
1383
1383
  return p`
1384
- <div class="lintje-chart-wrap ${g ? "lintje-chart--small" : ""}"
1385
- ${h(r.attach)} ?data-in-view=${r.inView} data-tooltip-anchor
1386
- @keydown=${(e) => r.dismiss(e) || W.escape(e)}>
1387
- ${ee({
1384
+ <div class="lintje-chart-wrap ${v ? "lintje-chart--small" : ""}"
1385
+ ${m(r.attach)} ?data-in-view=${r.inView} data-tooltip-anchor
1386
+ @keydown=${(e) => r.dismiss(e) || G.escape(e)}>
1387
+ ${z({
1388
1388
  items: I,
1389
1389
  onToggle: (e) => r.toggleSeries(e)
1390
1390
  })}
1391
- ${te({
1391
+ ${ee({
1392
1392
  fontFamily: r.fontFamily,
1393
1393
  id: y,
1394
1394
  ticks: k.ticks,
@@ -1399,10 +1399,10 @@ function Ve(e, n) {
1399
1399
  xLabels: F,
1400
1400
  xTitle: c,
1401
1401
  description: i,
1402
- interactive: W.interactive,
1403
- keys: ne
1402
+ interactive: G.interactive,
1403
+ keys: te
1404
1404
  }, se)}
1405
- ${H(r)}
1405
+ ${U(r)}
1406
1406
  ${Q(r)}
1407
1407
  </div>
1408
1408
  `;
@@ -1452,7 +1452,7 @@ function qe(e) {
1452
1452
  return s;
1453
1453
  }
1454
1454
  function Je(e, t, n = 0) {
1455
- let r = v(e, n), i = t?.trim() ?? "";
1455
+ let r = l(e, n), i = t?.trim() ?? "";
1456
1456
  return i ? i === "%" ? `${r}%` : `${r} ${i}` : r;
1457
1457
  }
1458
1458
  function Ye(e) {
@@ -1464,7 +1464,7 @@ function Ye(e) {
1464
1464
  return Math.min(t, 4);
1465
1465
  }
1466
1466
  function Xe(e, t = {}) {
1467
- let n = (t.bounds?.length ? t.bounds.slice(0, Ue - 1) : null) ?? qe(e), r = Ye(n), i = (e) => Je(e, t.unit, r), a = (e) => v(e, r);
1467
+ let n = (t.bounds?.length ? t.bounds.slice(0, Ue - 1) : null) ?? qe(e), r = Ye(n), i = (e) => Je(e, t.unit, r), a = (e) => l(e, r);
1468
1468
  if (n.length === 0) {
1469
1469
  let e = He.length - 1;
1470
1470
  return [{
@@ -1515,16 +1515,16 @@ function $e(e) {
1515
1515
  };
1516
1516
  }
1517
1517
  function et(e, t) {
1518
- let { controller: n, description: r, mobile: i = !1 } = t, a = i ? $e(e) : void 0, o = a?.columnLabels ?? e.columnLabels, c = a?.rowLabels ?? e.rowLabels, u = a?.values ?? e.values, d = a ? a.links : e.links, f = a ? !0 : e.compact ?? !1, { unit: m } = e, g = le(t, (d ?? []).flat()), _ = Xe(u, {
1518
+ let { controller: n, description: r, mobile: i = !1 } = t, a = i ? $e(e) : void 0, o = a?.columnLabels ?? e.columnLabels, c = a?.rowLabels ?? e.rowLabels, d = a?.values ?? e.values, f = a ? a.links : e.links, h = a ? !0 : e.compact ?? !1, { unit: g } = e, _ = le(t, (f ?? []).flat()), v = Xe(d, {
1519
1519
  bounds: e.bounds,
1520
- unit: m
1521
- }), y = (e) => Ze(_, e);
1520
+ unit: g
1521
+ }), y = (e) => Ze(v, e);
1522
1522
  n.measure({});
1523
1523
  let b = n.selectedCell, x = n.dimmedClass;
1524
1524
  return p`
1525
- <div class="lintje-heatmap" ${h(n.attach)} ?data-in-view=${n.inView}
1526
- data-tooltip-anchor @keydown=${g.escape}>
1527
- <table class="lintje-heatmap__grid ${f ? "is-compact" : ""}">
1525
+ <div class="lintje-heatmap" ${m(n.attach)} ?data-in-view=${n.inView}
1526
+ data-tooltip-anchor @keydown=${_.escape}>
1527
+ <table class="lintje-heatmap__grid ${h ? "is-compact" : ""}">
1528
1528
  <caption class="visually-hidden">${r}</caption>
1529
1529
  <thead>
1530
1530
  <tr>
@@ -1539,7 +1539,7 @@ function et(e, t) {
1539
1539
  <span class="lintje-heatmap__row-label-text">${e}</span>
1540
1540
  </th>
1541
1541
  ${o.map((r, i) => {
1542
- let a = u[t]?.[i];
1542
+ let a = d[t]?.[i];
1543
1543
  if (a == null) return p`
1544
1544
  <td class="lintje-heatmap__slot">
1545
1545
  <div class="lintje-heatmap__cell is-empty"
@@ -1548,35 +1548,35 @@ function et(e, t) {
1548
1548
  </div>
1549
1549
  </td>
1550
1550
  `;
1551
- let l = y(a), h = g.of(d?.[t]?.[i], `${e} · ${o[i]}`), S = !h.clickable && b?.row === t && b?.column === i;
1551
+ let u = y(a), m = _.of(f?.[t]?.[i], `${e} · ${o[i]}`), S = !m.clickable && b?.row === t && b?.column === i;
1552
1552
  return p`
1553
1553
  <td class="lintje-heatmap__slot">
1554
1554
  <button
1555
1555
  type="button"
1556
- class="lintje-heatmap__cell lintje-heatmap__cell--class-${_[l].ramp} ${S ? "is-selected" : ""} ${x != null && x !== l ? "is-dimmed" : ""} ${h.state}"
1557
- data-mark-id=${h.markId}
1556
+ class="lintje-heatmap__cell lintje-heatmap__cell--class-${v[u].ramp} ${S ? "is-selected" : ""} ${x != null && x !== u ? "is-dimmed" : ""} ${m.state}"
1557
+ data-mark-id=${m.markId}
1558
1558
  ${s({
1559
- "--lintje-cell": _[l].color,
1560
- ...ne(i, t, o.length, c.length)
1559
+ "--lintje-cell": v[u].color,
1560
+ ...te(i, t, o.length, c.length)
1561
1561
  })}
1562
- @click=${h.clickable ? h.click : () => {
1562
+ @click=${m.clickable ? m.click : () => {
1563
1563
  n.selectedCell = S ? null : {
1564
1564
  row: t,
1565
1565
  column: i
1566
1566
  }, n.requestUpdate();
1567
1567
  }}
1568
- @mousemove=${f ? void 0 : (t) => n.showTooltip(t, {
1568
+ @mousemove=${h ? void 0 : (t) => n.showTooltip(t, {
1569
1569
  title: `${e} · ${o[i]}`,
1570
1570
  rows: [{
1571
- label: `klasse ${_[l].label}`,
1572
- value: Je(a, m),
1573
- color: _[l].color
1571
+ label: `klasse ${v[u].label}`,
1572
+ value: Je(a, g),
1573
+ color: v[u].color
1574
1574
  }]
1575
1575
  })}
1576
- @mouseleave=${f ? void 0 : () => n.hideTooltip()}
1577
- aria-pressed=${h.clickable ? h.pressed : S}
1578
- aria-label="${e} ${o[i]}: ${Je(a, m)}, klasse ${_[l].label}"
1579
- >${v(a)}</button>
1576
+ @mouseleave=${h ? void 0 : () => n.hideTooltip()}
1577
+ aria-pressed=${m.clickable ? m.pressed : S}
1578
+ aria-label="${e} ${o[i]}: ${Je(a, g)}, klasse ${v[u].label}"
1579
+ >${l(a)}</button>
1580
1580
  </td>
1581
1581
  `;
1582
1582
  })}
@@ -1586,17 +1586,17 @@ function et(e, t) {
1586
1586
  </table>
1587
1587
 
1588
1588
  <!-- Selected cell: a 48 px line with day, block, value, class. -->
1589
- ${b && u[b.row]?.[b.column] != null ? p`
1589
+ ${b && d[b.row]?.[b.column] != null ? p`
1590
1590
  <p class="lintje-heatmap__selection">
1591
1591
  <b>${c[b.row]} ${o[b.column]}</b> ·
1592
- ${Je(u[b.row][b.column], m)} · klasse
1593
- ${_[y(u[b.row][b.column])].label}
1592
+ ${Je(d[b.row][b.column], g)} · klasse
1593
+ ${v[y(d[b.row][b.column])].label}
1594
1594
  </p>
1595
- ` : l}
1595
+ ` : u}
1596
1596
 
1597
1597
  <!-- Class legend: clickable, dims the other classes to .25. -->
1598
1598
  <ul class="lintje-heatmap__legend">
1599
- ${_.map((e, t) => p`
1599
+ ${v.map((e, t) => p`
1600
1600
  <li>
1601
1601
  <button type="button" class="lintje-heatmap__legend-item ${x != null && x !== t ? "is-dimmed" : ""}"
1602
1602
  @click=${() => {
@@ -1609,7 +1609,7 @@ function et(e, t) {
1609
1609
  </li>
1610
1610
  `)}
1611
1611
  </ul>
1612
- ${H(n)}
1612
+ ${U(n)}
1613
1613
  </div>
1614
1614
  `;
1615
1615
  }
@@ -1617,7 +1617,7 @@ function et(e, t) {
1617
1617
  //#region src/components/shared/charts/histogram-chart/histogram-chart.ts
1618
1618
  var tt = 16, nt = 56, rt = 8, it = 18;
1619
1619
  function at(e) {
1620
- return v(e, +!Number.isInteger(e));
1620
+ return l(e, +!Number.isInteger(e));
1621
1621
  }
1622
1622
  function ot(e, t) {
1623
1623
  let n = t ? ` ${t}` : "";
@@ -1625,7 +1625,7 @@ function ot(e, t) {
1625
1625
  }
1626
1626
  function st(e, t, n = "") {
1627
1627
  let r = t.width, i = e.map((e) => {
1628
- let t = f(e.text, n, e.bold ? 700 : 400), i = e.x + 6 + t <= r;
1628
+ let t = h(e.text, n, e.bold ? 700 : 400), i = e.x + 6 + t <= r;
1629
1629
  return {
1630
1630
  x: i ? e.x + 6 : e.x - 6,
1631
1631
  anchor: i ? "start" : "end",
@@ -1640,56 +1640,56 @@ function st(e, t, n = "") {
1640
1640
  }));
1641
1641
  }
1642
1642
  function ct(e, t) {
1643
- let { controller: n, description: r } = t, { bins: i, axisTitle: a, xTitle: o, unit: u, median: d, threshold: m, small: g = !1 } = e, y = e.label ?? "Aantal", b = F(e.color) ?? "var(--color-chart-default)", x = n.id, S = (e) => u ? `${e} ${u}` : e;
1643
+ let { controller: n, description: r } = t, { bins: i, axisTitle: a, xTitle: o, unit: c, median: f, threshold: g, small: v = !1 } = e, y = e.label ?? "Aantal", b = F(e.color) ?? "var(--color-chart-default)", x = n.id, S = (e) => c ? `${e} ${c}` : e;
1644
1644
  n.measure({
1645
1645
  width: !0,
1646
- height: t.height ?? (g ? "--chart-h-small" : "--chart-h-main"),
1646
+ height: t.height ?? (v ? "--chart-h-small" : "--chart-h-main"),
1647
1647
  fit: !!t.expanded && !t.mobile
1648
1648
  });
1649
- let C = i.map((e) => e.count).filter((e) => e != null), w = C.length === i.length ? C.reduce((e, t) => e + t, 0) : null, { max: T, ticks: E } = K(Math.max(...C, 1)), D = N(E, n.width, { fontFamily: n.fontFamily }), k = q(t), A = q(t, {
1649
+ let C = i.map((e) => e.count).filter((e) => e != null), w = C.length === i.length ? C.reduce((e, t) => e + t, 0) : null, { max: T, ticks: E } = q(Math.max(...C, 1)), D = N(E, n.width, { fontFamily: n.fontFamily }), k = ne(t), A = ne(t, {
1650
1650
  left: D.width,
1651
1651
  bottom: k.bottom + (o ? tt : 0)
1652
- }), j = A.height - A.bottom, M = A.width - A.right, P = i[0]?.from ?? 0, I = i[i.length - 1], L = i.length > 1 ? i[i.length - 1].from - i[i.length - 2].from : 1, R = I ? I.to ?? I.from + L : 1, B = (e) => A.left + (e - P) / Math.max(R - P, 2 ** -52) * (M - A.left), V = i.map((e) => {
1653
- let t = B(e.from), n = B(e.to ?? R) - t;
1652
+ }), j = A.height - A.bottom, M = A.width - A.right, P = i[0]?.from ?? 0, I = i[i.length - 1], L = i.length > 1 ? i[i.length - 1].from - i[i.length - 2].from : 1, R = I ? I.to ?? I.from + L : 1, V = (e) => A.left + (e - P) / Math.max(R - P, 2 ** -52) * (M - A.left), H = i.map((e) => {
1653
+ let t = V(e.from), n = V(e.to ?? R) - t;
1654
1654
  return {
1655
1655
  x: t,
1656
1656
  width: n,
1657
1657
  center: t + n / 2
1658
1658
  };
1659
- }), ne = (e) => {
1659
+ }), te = (e) => {
1660
1660
  let t = i[e].count;
1661
1661
  return {
1662
- title: ot(i[e], u),
1662
+ title: ot(i[e], c),
1663
1663
  rows: [{
1664
1664
  label: y,
1665
- value: t == null ? "geen gegevens" : v(t),
1665
+ value: t == null ? "geen gegevens" : l(t),
1666
1666
  color: b
1667
1667
  }, ...t != null && w != null && w > 0 ? [{
1668
1668
  label: "Aandeel",
1669
- value: c(t / w * 100, 1),
1669
+ value: d(t / w * 100, 1),
1670
1670
  color: b
1671
1671
  }] : []]
1672
1672
  };
1673
- }, W = Z(n, i.length, (e) => ({
1674
- x: V[e].center,
1673
+ }, G = Z(n, i.length, (e) => ({
1674
+ x: H[e].center,
1675
1675
  y: i[e].count == null ? A.top : O(i[e].count, T, A),
1676
- content: ne(e)
1677
- })), G = I?.to == null && i.length > 0, J = [...i.slice(0, G ? -1 : void 0).map((e) => e.from), ...G ? [] : I ? [I.to] : []].map((e) => ({
1676
+ content: te(e)
1677
+ })), K = I?.to == null && i.length > 0, J = [...i.slice(0, K ? -1 : void 0).map((e) => e.from), ...K ? [] : I ? [I.to] : []].map((e) => ({
1678
1678
  label: at(e),
1679
- x: B(e)
1680
- })), Y = G ? {
1679
+ x: V(e)
1680
+ })), Y = K ? {
1681
1681
  label: `${at(I.from)}+`,
1682
- x: V[V.length - 1].center
1683
- } : null, re = J.length > 1 ? (J[J.length - 1].x - J[0].x) / (J.length - 1) : 1, X = Math.max(1, Math.ceil(nt / re)), $ = U(J.filter((e, t) => t % X === 0), n.fontFamily), ie = (e, t) => Math.abs(t.x - e.x) < (f(e.label, n.fontFamily) + f(t.label, n.fontFamily)) / 2 + rt, ae = G ? Y : J[J.length - 1];
1684
- ae && !$.includes(ae) && ($.length && ie($[$.length - 1], ae) && ($ = $.slice(0, -1)), G || ($ = [...$, ae]));
1685
- let oe = G ? I.from : R, se = (e) => e != null && e >= P && e <= oe, ce = [...se(d) ? [{
1686
- x: B(d),
1687
- text: e.medianLabel ?? S(`mediaan ${at(d)}`),
1682
+ x: H[H.length - 1].center
1683
+ } : null, re = J.length > 1 ? (J[J.length - 1].x - J[0].x) / (J.length - 1) : 1, X = Math.max(1, Math.ceil(nt / re)), $ = W(J.filter((e, t) => t % X === 0), n.fontFamily), ie = (e, t) => Math.abs(t.x - e.x) < (h(e.label, n.fontFamily) + h(t.label, n.fontFamily)) / 2 + rt, ae = K ? Y : J[J.length - 1];
1684
+ ae && !$.includes(ae) && ($.length && ie($[$.length - 1], ae) && ($ = $.slice(0, -1)), K || ($ = [...$, ae]));
1685
+ let oe = K ? I.from : R, se = (e) => e != null && e >= P && e <= oe, ce = [...se(f) ? [{
1686
+ x: V(f),
1687
+ text: e.medianLabel ?? S(`mediaan ${at(f)}`),
1688
1688
  bold: !0,
1689
1689
  dashed: !1
1690
- }] : [], ...se(m) ? [{
1691
- x: B(m),
1692
- text: e.thresholdLabel ?? S(`norm ${at(m)}`),
1690
+ }] : [], ...se(g) ? [{
1691
+ x: V(g),
1692
+ text: e.thresholdLabel ?? S(`norm ${at(g)}`),
1693
1693
  bold: !1,
1694
1694
  dashed: !0
1695
1695
  }] : []], le = st(ce, A, n.fontFamily), ue = (e) => e.charAt(0).toUpperCase() + e.slice(1), de = [
@@ -1698,23 +1698,23 @@ function ct(e, t) {
1698
1698
  color: b,
1699
1699
  shape: "square"
1700
1700
  },
1701
- ...se(d) ? [{
1701
+ ...se(f) ? [{
1702
1702
  label: ue(e.medianLabel ?? "Mediaan"),
1703
1703
  color: "var(--color-chart-emphasis)",
1704
1704
  shape: "line"
1705
1705
  }] : [],
1706
- ...se(m) ? [{
1706
+ ...se(g) ? [{
1707
1707
  label: ue(e.thresholdLabel ?? "Norm"),
1708
1708
  color: "var(--color-chart-emphasis)",
1709
1709
  shape: "dashed"
1710
1710
  }] : []
1711
1711
  ], fe = (e) => {
1712
- let t = V[e], n = i[e].count;
1712
+ let t = H[e], n = i[e].count;
1713
1713
  if (n == null) return _`<rect class="lintje-chart__missing" x=${t.x} y=${A.top} width=${t.width}
1714
1714
  height=${Math.max(0, j - A.top)} fill="url(#hatch-${x})" />`;
1715
1715
  let r = O(n, T, A);
1716
1716
  return _`
1717
- <g class="lintje-chart__bar-group" ${s(z(e, i.length))}>
1717
+ <g class="lintje-chart__bar-group" ${s(B(e, i.length))}>
1718
1718
  <rect class="lintje-chart__bar lintje-chart__segment" x=${t.x} y=${r} width=${t.width}
1719
1719
  height=${Math.max(0, j - r)} fill=${b} />
1720
1720
  </g>
@@ -1722,39 +1722,39 @@ function ct(e, t) {
1722
1722
  }, pe = n.hoverIndex, me = pe == null ? null : i[pe]?.count, he = [
1723
1723
  i.map((e, t) => fe(t)),
1724
1724
  pe != null && me != null ? _`<rect class="lintje-chart__bar lintje-chart__bar--lifted lintje-chart__segment"
1725
- x=${V[pe].x} y=${O(me, T, A)} width=${V[pe].width}
1726
- height=${Math.max(0, j - O(me, T, A))} fill=${b} />` : l,
1725
+ x=${H[pe].x} y=${O(me, T, A)} width=${H[pe].width}
1726
+ height=${Math.max(0, j - O(me, T, A))} fill=${b} />` : u,
1727
1727
  $.map((e) => _`
1728
1728
  <line x1=${e.x} x2=${e.x} y1=${j} y2=${j + 4}
1729
1729
  stroke="var(--color-chart-zero)" stroke-width="1" />
1730
1730
  <text x=${e.x} y=${j + 20} text-anchor="middle" class="lintje-chart__axis-label">${e.label}</text>
1731
1731
  `),
1732
- Y ? _`<text x=${Y.x} y=${j + 20} text-anchor="middle" class="lintje-chart__axis-label">${Y.label}</text>` : l,
1732
+ Y ? _`<text x=${Y.x} y=${j + 20} text-anchor="middle" class="lintje-chart__axis-label">${Y.label}</text>` : u,
1733
1733
  ce.map((e, t) => {
1734
1734
  let n = le[t];
1735
1735
  return _`
1736
1736
  <g class="lintje-chart__reference">
1737
1737
  <line x1=${e.x} x2=${e.x} y1=${A.top} y2=${j}
1738
1738
  stroke="var(--color-chart-emphasis)" stroke-width=${e.dashed ? 1 : 1.5}
1739
- stroke-dasharray=${e.dashed ? "3 3" : l} />
1739
+ stroke-dasharray=${e.dashed ? "3 3" : u} />
1740
1740
  <text x=${n.x} y=${n.y} text-anchor=${n.anchor}
1741
1741
  class=${e.bold ? "lintje-chart__data-label lintje-chart__data-label--halo" : "lintje-chart__axis-label lintje-chart__axis-label--halo"}>${e.text}</text>
1742
1742
  </g>
1743
1743
  `;
1744
1744
  }),
1745
- V.map((e, t) => _`
1745
+ H.map((e, t) => _`
1746
1746
  <rect x=${e.x} y=${A.top} width=${e.width} height=${Math.max(0, j - A.top)}
1747
1747
  fill="transparent"
1748
- @mousemove=${(e) => n.hoverAt(t, e, ne(t))}
1748
+ @mousemove=${(e) => n.hoverAt(t, e, te(t))}
1749
1749
  @mouseleave=${() => n.hoverAt(null)} />
1750
1750
  `)
1751
1751
  ];
1752
1752
  return p`
1753
- <div class="lintje-chart-wrap ${g ? "lintje-chart--small" : ""}"
1754
- ${h(n.attach)} ?data-in-view=${n.inView} data-tooltip-anchor
1753
+ <div class="lintje-chart-wrap ${v ? "lintje-chart--small" : ""}"
1754
+ ${m(n.attach)} ?data-in-view=${n.inView} data-tooltip-anchor
1755
1755
  @keydown=${(e) => n.dismiss(e)}>
1756
- ${ee({ items: de })}
1757
- ${te({
1756
+ ${z({ items: de })}
1757
+ ${ee({
1758
1758
  fontFamily: n.fontFamily,
1759
1759
  id: x,
1760
1760
  ticks: E,
@@ -1764,16 +1764,317 @@ function ct(e, t) {
1764
1764
  xTitle: o,
1765
1765
  description: r,
1766
1766
  formatTick: D.format,
1767
- keys: W
1767
+ keys: G
1768
1768
  }, he)}
1769
- ${H(n)}
1769
+ ${U(n)}
1770
1770
  ${Q(n)}
1771
1771
  </div>
1772
1772
  `;
1773
1773
  }
1774
1774
  //#endregion
1775
+ //#region src/components/shared/charts/radar-chart/radar-chart.ts
1776
+ var lt = 16, ut = 6, dt = 18, ft = 16, pt = 3, mt = 4, ht = 8, gt = 40, _t = .7, vt = 420, yt = 12, bt = 2;
1777
+ function xt(e) {
1778
+ let t = new Set(e.series.map((e) => e.color).filter(I)), n = L.filter((e) => !t.has(e)), r = 0;
1779
+ return e.series.map((t) => {
1780
+ let i = e.axes.map((e, n) => t.values[n] ?? null);
1781
+ if (t.comparison) return {
1782
+ label: t.label,
1783
+ values: i,
1784
+ comparison: !0,
1785
+ color: "var(--color-chart-secondary)"
1786
+ };
1787
+ let a = I(t.color) ? t.color : n[r++ % n.length];
1788
+ return {
1789
+ label: t.label,
1790
+ values: i,
1791
+ comparison: !1,
1792
+ color: F(t.color ?? a),
1793
+ symbol: a
1794
+ };
1795
+ });
1796
+ }
1797
+ function St(e) {
1798
+ let t = e.length, n = e.findIndex((e) => e == null);
1799
+ if (n === -1) return {
1800
+ closed: !0,
1801
+ runs: [e.map((e, t) => t)]
1802
+ };
1803
+ let r = [], i = [];
1804
+ for (let a = 1; a <= t; a++) {
1805
+ let o = (n + a) % t;
1806
+ e[o] == null ? (i.length && r.push(i), i = []) : i.push(o);
1807
+ }
1808
+ return i.length && r.push(i), {
1809
+ closed: !1,
1810
+ runs: r
1811
+ };
1812
+ }
1813
+ function Ct(e, t = e / 5) {
1814
+ let n = [];
1815
+ for (let r = 1; r * t < e - t * 1e-6; r++) n.push(Math.round(r * t * 1e6) / 1e6);
1816
+ return [...n, e];
1817
+ }
1818
+ var wt = (e) => Number.isInteger(e) ? 0 : String(e).split(".")[1]?.length ?? 0;
1819
+ function Tt(e, t, n) {
1820
+ let r = e.area ?? "emphasis", i = t.filter((e) => !e.comparison);
1821
+ return new Set(i.filter((e) => e.complete && r !== "never" && (r === "always" || i.length === 1 || e.label === n)).map((e) => e.label));
1822
+ }
1823
+ function Et(e, t) {
1824
+ let { controller: n, description: r, mobile: i = !1 } = t, { axes: a, unit: o, threshold: c, small: u = !1 } = e, d = a.length, f = xt(e), h = (e) => n.hiddenSeries.includes(e.label), g = f.filter((e) => !h(e)), _ = f.filter((e) => !e.comparison), v = g.filter((e) => !e.comparison), y = Math.min(2, Math.max(0, ...f.flatMap((e) => e.values.filter((e) => e != null)).map(wt), ...c == null ? [] : [wt(c)])), b = (e) => l(e, y), x = (e) => `${b(e)}${o ? ` ${o}` : ""}`, S = (e) => {
1825
+ let t = Math.round(e * 10 ** y) / 10 ** y;
1826
+ return t === 0 ? b(0) : `${t > 0 ? "+" : "−"}${b(Math.abs(t))}`;
1827
+ }, C = v.length > 1 && v.some((e) => e.label === n.emphasis) ? n.emphasis : null, w = Tt(e, g.map((e) => ({
1828
+ ...e,
1829
+ complete: e.values.every((e) => e != null)
1830
+ })), C), T = a.map((e, t) => f.some((e) => e.values[t] == null)), E = e.dataLabels !== !1 && _.length === 1, D = E && !h(_[0]), O = [
1831
+ ...f.map((e) => e.comparison ? {
1832
+ label: e.label,
1833
+ color: e.color,
1834
+ shape: "line",
1835
+ hidden: h(e)
1836
+ } : {
1837
+ label: e.label,
1838
+ color: e.color,
1839
+ shape: "line",
1840
+ symbol: e.symbol,
1841
+ hidden: h(e)
1842
+ }),
1843
+ ...c == null ? [] : [{
1844
+ label: e.thresholdLabel ?? `Norm ${x(c)}`,
1845
+ color: "var(--color-chart-emphasis)",
1846
+ shape: "dashed",
1847
+ fixed: !0
1848
+ }],
1849
+ ...T.some(Boolean) ? [{
1850
+ label: "Geen gegevens",
1851
+ shape: "hatch",
1852
+ fixed: !0
1853
+ }] : []
1854
+ ];
1855
+ function k(t) {
1856
+ let n = g.map((e) => {
1857
+ let n = e.values[t];
1858
+ return {
1859
+ label: e.label,
1860
+ value: n == null ? "geen gegevens" : x(n),
1861
+ color: e.color,
1862
+ symbol: e.symbol,
1863
+ marker: e.comparison ? "line" : void 0
1864
+ };
1865
+ });
1866
+ c != null && n.push({
1867
+ label: e.thresholdLabel ?? "Norm",
1868
+ value: x(c),
1869
+ color: "var(--color-chart-emphasis)",
1870
+ marker: "dashed"
1871
+ });
1872
+ let [r] = v, i = v.length === 1 ? r.values[t] : null;
1873
+ if (i != null) {
1874
+ let e = g.find((e) => e.comparison), r = e?.values[t];
1875
+ e && r != null && n.push({
1876
+ label: `t.o.v. ${e.label}`,
1877
+ value: S(i - r),
1878
+ divider: !0
1879
+ }), c != null && n.push({
1880
+ label: "t.o.v. norm",
1881
+ value: S(i - c),
1882
+ divider: !(e && r != null)
1883
+ });
1884
+ }
1885
+ return {
1886
+ title: a[t],
1887
+ rows: n
1888
+ };
1889
+ }
1890
+ let { width: A, height: j, body: M, at: N } = (i ? Ot : Dt)({
1891
+ spec: e,
1892
+ controller: n,
1893
+ options: t,
1894
+ layers: f,
1895
+ shown: g,
1896
+ fills: w,
1897
+ emphasis: C,
1898
+ missing: T,
1899
+ reserve: E,
1900
+ labelled: D,
1901
+ hidden: h,
1902
+ format: b,
1903
+ contentAt: k
1904
+ }), P = Z(n, d, (e) => ({
1905
+ ...N(e),
1906
+ content: k(e)
1907
+ }));
1908
+ return p`
1909
+ <div class="lintje-chart-wrap ${u ? "lintje-chart--small" : ""}"
1910
+ ${m(n.attach)} ?data-in-view=${n.inView} data-tooltip-anchor
1911
+ @keydown=${(e) => n.dismiss(e)}>
1912
+ ${z({
1913
+ items: O,
1914
+ onToggle: (e) => n.toggleSeries(e),
1915
+ onEmphasis: _.length > 1 ? (e) => n.emphasise(e) : void 0
1916
+ })}
1917
+ <figure class="lintje-chart">
1918
+ <svg viewBox="0 0 ${A} ${j}" width=${A} height=${j}
1919
+ class="lintje-chart__svg lintje-radar ${i ? "lintje-radar--rows" : ""}"
1920
+ ${s({ height: `${j}px` })}
1921
+ role=${R(!1)} aria-labelledby="${n.id}-desc" tabindex="0"
1922
+ @keydown=${P.keydown} @focus=${P.focus} @blur=${P.blur}>
1923
+ <desc id="${n.id}-desc">${r}</desc>
1924
+ <defs>
1925
+ <pattern id="hatch-${n.id}" width="6" height="6" patternUnits="userSpaceOnUse"
1926
+ patternTransform="rotate(45)">
1927
+ <line x1="0" y1="0" x2="0" y2="6" stroke="var(--color-chart-hatch)" stroke-width="2" />
1928
+ </pattern>
1929
+ </defs>
1930
+ ${M}
1931
+ </svg>
1932
+ </figure>
1933
+ ${U(n)}
1934
+ ${Q(n)}
1935
+ </div>
1936
+ `;
1937
+ }
1938
+ function Dt({ spec: e, controller: t, options: n, layers: r, shown: i, fills: a, emphasis: o, missing: c, reserve: d, labelled: f, hidden: p, format: m, contentAt: g }) {
1939
+ let { axes: v, max: y, threshold: b, small: x = !1 } = e, S = v.length, C = x ? "--chart-h-small" : "--chart-h-main";
1940
+ t.measure({
1941
+ width: !0,
1942
+ height: n.height ?? C,
1943
+ fit: !!n.expanded
1944
+ });
1945
+ let w = t.width, T = n.height ?? (n.expanded || x ? t.height : Math.max(t.height, Math.min(vt, Math.round(w * _t)))), E = (e) => -Math.PI / 2 + 2 * Math.PI * e / S, D = t.fontFamily, O = (e) => h(e, D) * 14 / 12, k = Math.max(0, ...v.map((e, t) => Math.abs(Math.cos(E(t))) < .1 ? 0 : O(e) + ut + 2)), A = 24 + (d ? ft : 0), M = Math.max(gt, Math.min(w / 2 - k - lt, T / 2 - A - lt)), N = w / 2, P = T / 2, F = (e, t) => ({
1946
+ x: N + t * Math.cos(E(e)),
1947
+ y: P + t * Math.sin(E(e))
1948
+ }), I = (e) => Math.max(0, Math.min(e, y)) / y * M, L = (e) => e.map((e) => `${e.x},${e.y}`).join(" "), R = (e) => L(v.map((t, n) => F(n, I(e)))), z = Ct(y, e.step), B = Math.max(0, ...z.map(wt)), V = t.hoverIndex, U = (e) => {
1949
+ let t = i.map((t) => t.values[e]).filter((e) => e != null);
1950
+ return F(e, t.length ? I(Math.max(...t)) : M / 2);
1951
+ }, ee = [...r.filter((e) => e.comparison), ...r.filter((e) => !e.comparison)], te = (e) => o != null && e.label !== o, W = s({ "transform-origin": `${N}px ${P}px` }), G = v.map((e, t) => {
1952
+ let n = Math.cos(E(t)), i = Math.sin(E(t)), a = F(t, M + lt + ut), o = Math.abs(n) < .1, s = o ? "middle" : n > 0 ? "start" : "end", c;
1953
+ c = o && i < 0 ? a.y - 4 - (d ? ft : 0) : o ? a.y + 12 : d ? a.y - 2 : a.y + 5;
1954
+ let l = d ? r.find((e) => !e.comparison)?.values[t] : void 0;
1955
+ return _`
1956
+ <text x=${a.x} y=${c} text-anchor=${s} class="lintje-radar__name">${e}</text>
1957
+ ${d ? _`<text x=${a.x} y=${c + ft} text-anchor=${s}
1958
+ class="lintje-chart__data-label lintje-radar__value ${l == null ? "lintje-radar__no-value" : ""} ${f ? "" : "is-hidden"}">
1959
+ ${l == null ? "geen gegevens" : m(l)}</text>` : u}
1960
+ `;
1961
+ }), K = (e, t) => {
1962
+ let n = p(e) ? "is-hidden" : "", r = e.values.map((e, t) => e == null ? null : F(t, I(e)));
1963
+ if (t === "area") return e.comparison || r.some((e) => e == null) ? u : _`<g class="lintje-radar__layer ${n}" ${W}>
1964
+ <polygon class="lintje-radar__area ${a.has(e.label) ? "is-filled" : ""}"
1965
+ points=${L(r)} fill=${e.color} />
1966
+ </g>`;
1967
+ let { closed: i, runs: o } = St(e.values), s = e.comparison ? void 0 : H(e.color), c = o.map((t) => {
1968
+ let n = t.map((e) => r[e]), a = L(i ? [...n, n[0]] : n);
1969
+ return n.length === 1 ? e.comparison ? _`<circle cx=${n[0].x} cy=${n[0].y} r="2.5" fill=${e.color} />` : u : _`
1970
+ ${s ? _`<polyline class="lintje-chart__line lintje-chart__line--casing" points=${a} stroke=${s} />` : u}
1971
+ <polyline class="lintje-chart__line" points=${a} stroke=${e.color} />
1972
+ `;
1973
+ }), l = e.symbol ? r.map((t) => t ? _`<path d=${j(e.symbol, pt, t.x, t.y)} fill=${e.color}
1974
+ stroke=${s ?? u} stroke-width=${s ? 1 : u} />` : u) : u;
1975
+ return t === "lift" ? _`<g class="lintje-radar__lift" aria-hidden="true">${c}${l}</g>` : _`<g class="lintje-radar__layer ${n} ${te(e) ? "is-muted" : ""}" ${W}>
1976
+ ${c}${l}
1977
+ </g>`;
1978
+ }, q = (e) => {
1979
+ let t = M + lt, n = Math.PI / S, r = (e) => `${N + t * Math.cos(e)},${P + t * Math.sin(e)}`;
1980
+ return `${N},${P} ${r(E(e) - n)} ${r(E(e))} ${r(E(e) + n)}`;
1981
+ };
1982
+ return {
1983
+ width: w,
1984
+ height: T,
1985
+ body: [
1986
+ z.map((e) => _`<polygon class="lintje-radar__ring" points=${R(e)} />`),
1987
+ c.map((e, n) => {
1988
+ if (!e) return u;
1989
+ let r = E(n), i = -Math.sin(r) * 5, a = Math.cos(r) * 5, o = F(n, M);
1990
+ return _`<polygon class="lintje-radar__gap" fill="url(#hatch-${t.id})"
1991
+ points=${`${N + i},${P + a} ${o.x + i},${o.y + a} ${o.x - i},${o.y - a} ${N - i},${P - a}`} />`;
1992
+ }),
1993
+ v.map((e, t) => {
1994
+ let n = F(t, M + lt);
1995
+ return _`<line class="lintje-radar__spoke ${V === t ? "is-active" : ""}"
1996
+ x1=${N} y1=${P} x2=${n.x} y2=${n.y} />`;
1997
+ }),
1998
+ z.map((e) => {
1999
+ let t = F(0, I(e));
2000
+ return _`<text x=${t.x + ht / 2} y=${t.y + 4}
2001
+ class="lintje-chart__axis-label lintje-chart__axis-label--halo">${l(e, B)}</text>`;
2002
+ }),
2003
+ b == null ? u : _`<polygon class="lintje-chart__reference lintje-radar__norm" points=${R(b)} />`,
2004
+ ee.map((e) => K(e, "area")),
2005
+ ee.map((e) => K(e, "line")),
2006
+ o == null ? u : K(r.find((e) => e.label === o), "lift"),
2007
+ G,
2008
+ V == null ? u : i.map((e) => {
2009
+ let t = e.values[V];
2010
+ if (t == null) return u;
2011
+ let n = F(V, I(t)), r = e.comparison ? void 0 : H(e.color), i = j(e.symbol, mt, n.x, n.y);
2012
+ return _`
2013
+ <path class="lintje-chart__hover-point" d=${i} fill=${e.color} />
2014
+ ${r ? _`<path class="lintje-chart__hover-casing" d=${i} stroke=${r} />` : u}
2015
+ `;
2016
+ }),
2017
+ _`<g @mouseleave=${() => t.hoverAt(null)}>
2018
+ ${v.map((e, n) => _`<polygon class="lintje-chart__hit" points=${q(n)}
2019
+ @mousemove=${(e) => t.hoverAt(n, e, g(n))} />`)}
2020
+ </g>`
2021
+ ],
2022
+ at: U
2023
+ };
2024
+ }
2025
+ function Ot({ spec: e, controller: t, layers: n, shown: r, reserve: i, labelled: a, hidden: o, format: c, contentAt: d }) {
2026
+ let { axes: f, max: p, threshold: m } = e;
2027
+ t.measure({ width: !0 });
2028
+ let g = t.width, v = g - 1, y = n.filter((e) => !e.comparison), b = [...y.map((e) => ({
2029
+ layer: e,
2030
+ size: y.length === 1 ? 8 : 6
2031
+ })), ...n.filter((e) => e.comparison).map((e) => ({
2032
+ layer: e,
2033
+ size: 4
2034
+ }))], x = b.reduce((e, t) => e + t.size, 0) + bt * Math.max(0, b.length - 1), S = 22 + x + yt, C = f.length * S, w = C + 16, T = (e) => .5 + Math.max(0, Math.min(e, p)) / p * v, E = t.fontFamily, D = n.find((e) => !e.comparison), O = r.find((e) => !e.comparison), k = t.hoverIndex, A = (e) => {
2035
+ let t = O?.values[e];
2036
+ return {
2037
+ x: t == null ? g / 2 : T(t),
2038
+ y: e * S + dt + 4
2039
+ };
2040
+ }, j = f.map((e, n) => {
2041
+ let r = n * S, l = r + dt + 4, p = i ? D?.values[n] : void 0, y = i ? p == null ? "geen gegevens" : c(p) : "", C = i && p != null && m != null && p < m, w = a ? "" : "is-hidden", O = l;
2042
+ return _`
2043
+ <g class="lintje-radar__row ${k === n ? "is-active" : ""}">
2044
+ <text x="0" y=${r + 14} class="lintje-radar__name">${e}</text>
2045
+ ${i ? _`<text x=${g} y=${r + 14} text-anchor="end"
2046
+ class="lintje-chart__data-label lintje-radar__value ${p == null ? "lintje-radar__no-value" : ""} ${w}">${y}</text>` : u}
2047
+ ${C ? _`<text x=${g - h(y, E, 700) - 6} y=${r + 14} text-anchor="end"
2048
+ class="lintje-chart__axis-label lintje-radar__value ${w}">onder norm</text>` : u}
2049
+ ${b.map(({ layer: e, size: r }) => {
2050
+ let i = O;
2051
+ O += r + bt;
2052
+ let a = e.values[n], c = o(e) ? "is-hidden" : "";
2053
+ return a == null ? _`<rect class="lintje-radar__bar ${c}" x="0.5" y=${i} width=${v} height=${r}
2054
+ fill="url(#hatch-${t.id})" />` : _`<rect class="lintje-chart__bar lintje-chart__bar--horizontal lintje-radar__bar ${c}" x="0.5" y=${i}
2055
+ width=${Math.max(0, T(a) - .5)} height=${r} fill=${e.color}
2056
+ ${s(B(n, f.length))} />`;
2057
+ })}
2058
+ <line class="lintje-radar__zero" x1="0.5" x2="0.5" y1=${l - 2} y2=${l + x + 2} />
2059
+ ${m == null ? u : _`<line class="lintje-chart__reference lintje-radar__norm" x1=${T(m)} x2=${T(m)}
2060
+ y1=${l - 3} y2=${l + x + 3} />`}
2061
+ <rect class="lintje-chart__hit" x="0" y=${r} width=${g} height=${S}
2062
+ @mousemove=${(e) => t.hoverAt(n, e, d(n))} />
2063
+ </g>
2064
+ `;
2065
+ }), M = [0, ...Ct(p, e.step)], N = Math.max(0, ...M.map(wt)), P = M.map((e, t) => _`<text x=${T(e)} y=${C + 12}
2066
+ text-anchor=${t === 0 ? "start" : t === M.length - 1 ? "end" : "middle"}
2067
+ class="lintje-chart__axis-label">${l(e, N)}</text>`);
2068
+ return {
2069
+ width: g,
2070
+ height: w,
2071
+ body: _`<g @mouseleave=${() => t.hoverAt(null)}>${j}</g>${P}`,
2072
+ at: A
2073
+ };
2074
+ }
2075
+ //#endregion
1775
2076
  //#region src/components/shared/charts/shared/render-chart.ts
1776
- function lt(e, t) {
2077
+ function kt(e, t) {
1777
2078
  switch (e.kind) {
1778
2079
  case "line": return se(e, t);
1779
2080
  case "bar": return de(e, t);
@@ -1787,32 +2088,34 @@ function lt(e, t) {
1787
2088
  case "scatter": return Ve(e, t);
1788
2089
  case "heatmap": return et(e, t);
1789
2090
  case "histogram": return ct(e, t);
2091
+ case "radar": return Et(e, t);
1790
2092
  }
1791
2093
  }
1792
2094
  //#endregion
1793
2095
  //#region src/components/charts/chart/chart.css?inline
1794
- var ut = "/* ------------------------------------------------------------------------ */\n\n.lintje-chart__view { flex: none; }\n\n/* Below 768 px it is a row of its own at the touch height. */\n@media screen and (max-width: 767px) {\n .lintje-chart__view { --h-control: var(--h-touch); width: 100%; }\n}\n", dt = ".lintje-chart__svg, .lintje-pie-chart__svg", ft = [{
2096
+ var At = "/* ------------------------------------------------------------------------ */\n\n.lintje-chart__view { flex: none; }\n\n/* Below 768 px it is a row of its own at the touch height. */\n@media screen and (max-width: 767px) {\n .lintje-chart__view { --h-control: var(--h-touch); width: 100%; }\n}\n", jt = ".lintje-chart__svg, .lintje-pie-chart__svg", Mt = [{
1795
2097
  value: "chart",
1796
2098
  label: "Grafiek"
1797
2099
  }, {
1798
2100
  value: "table",
1799
2101
  label: "Tabel"
1800
2102
  }];
1801
- function pt(e) {
2103
+ function Nt(e) {
1802
2104
  return (e ?? "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "grafiek";
1803
2105
  }
1804
- function mt(e) {
2106
+ function Pt(e) {
1805
2107
  switch (e.kind) {
1806
2108
  case "line":
1807
2109
  case "stacked-area":
1808
2110
  case "dual-axis":
1809
2111
  case "scatter": return "line";
1810
2112
  case "pie": return e.donut ? "donut" : "pie";
2113
+ case "radar": return "pie";
1811
2114
  case "heatmap": return "heatmap";
1812
2115
  default: return "bar";
1813
2116
  }
1814
2117
  }
1815
- function ht(e) {
2118
+ function Ft(e) {
1816
2119
  switch (e.kind) {
1817
2120
  case "horizontal-bar":
1818
2121
  case "target-progress": return e.rows.length ? `${fe(e.rows.length)}px` : void 0;
@@ -1821,7 +2124,7 @@ function ht(e) {
1821
2124
  default: return e.small ? "var(--chart-h-small)" : void 0;
1822
2125
  }
1823
2126
  }
1824
- function gt(e) {
2127
+ function It(e) {
1825
2128
  switch (e.kind) {
1826
2129
  case "line": {
1827
2130
  let t = e.events ?? [], n = (e) => t.filter((t) => t.index === e).map((e) => e.label).join("; ");
@@ -1861,7 +2164,7 @@ function gt(e) {
1861
2164
  ...e.series.map((e) => e.label),
1862
2165
  "Totaal"
1863
2166
  ], ...e.labels.map((t, n) => {
1864
- let r = e.series.map((e) => e.values[n]), i = r.some((e) => e == null) ? null : Number(r.reduce((e, t) => e + t, 0).toFixed(_t(r)));
2167
+ let r = e.series.map((e) => e.values[n]), i = r.some((e) => e == null) ? null : Number(r.reduce((e, t) => e + t, 0).toFixed(Lt(r)));
1865
2168
  return [
1866
2169
  t,
1867
2170
  ...r,
@@ -1899,6 +2202,18 @@ function gt(e) {
1899
2202
  ]))];
1900
2203
  }
1901
2204
  case "heatmap": return [["", ...e.columnLabels], ...e.rowLabels.map((t, n) => [t, ...e.values[n] ?? []])];
2205
+ case "radar": {
2206
+ let t = e.threshold == null ? [] : [e.thresholdLabel ?? "Norm"];
2207
+ return [[
2208
+ "",
2209
+ ...e.series.map((e) => e.label),
2210
+ ...t
2211
+ ], ...e.axes.map((t, n) => [
2212
+ t,
2213
+ ...e.series.map((e) => e.values[n] ?? null),
2214
+ ...e.threshold == null ? [] : [e.threshold]
2215
+ ])];
2216
+ }
1902
2217
  case "histogram": {
1903
2218
  let t = (t) => e.unit ? `${t} (${e.unit})` : t;
1904
2219
  return [[
@@ -1915,15 +2230,15 @@ function gt(e) {
1915
2230
  }
1916
2231
  }
1917
2232
  }
1918
- function _t(e) {
2233
+ function Lt(e) {
1919
2234
  return e.reduce((e, t) => {
1920
2235
  if (typeof t != "number" || Number.isInteger(t)) return e;
1921
2236
  let n = String(t).split(".")[1] ?? "";
1922
2237
  return Math.max(e, n.length);
1923
2238
  }, 0);
1924
2239
  }
1925
- function vt(e, t) {
1926
- let [n = [], ...r] = gt(e), i = n.map((e, t) => {
2240
+ function Rt(e, t) {
2241
+ let [n = [], ...r] = It(e), i = n.map((e, t) => {
1927
2242
  let n = r.map((e) => e[t] ?? null);
1928
2243
  return t === 0 || n.some((e) => typeof e == "string" && e !== "") ? {
1929
2244
  key: `c${t}`,
@@ -1934,7 +2249,7 @@ function vt(e, t) {
1934
2249
  key: `c${t}`,
1935
2250
  header: String(e ?? ""),
1936
2251
  format: "decimal",
1937
- decimals: _t(n),
2252
+ decimals: Lt(n),
1938
2253
  align: "right",
1939
2254
  sortable: !1
1940
2255
  };
@@ -1954,9 +2269,9 @@ function vt(e, t) {
1954
2269
  pageSize: Math.max(r.length, 1)
1955
2270
  };
1956
2271
  }
1957
- var yt = class extends C {
2272
+ var zt = class extends C {
1958
2273
  constructor(...e) {
1959
- super(...e), this.view = "chart", this.#e = new W(() => this.requestUpdate()), this.#t = null, this.#n = new n(this);
2274
+ super(...e), this.view = "chart", this.#e = new G(() => this.requestUpdate()), this.#t = null, this.#n = new n(this);
1960
2275
  }
1961
2276
  static {
1962
2277
  this.styles = [
@@ -1964,7 +2279,7 @@ var yt = class extends C {
1964
2279
  a(x),
1965
2280
  a(r),
1966
2281
  ...w,
1967
- a(ut)
2282
+ a(At)
1968
2283
  ];
1969
2284
  }
1970
2285
  static {
@@ -1993,40 +2308,40 @@ var yt = class extends C {
1993
2308
  }
1994
2309
  get downloadName() {
1995
2310
  let e = this.data?.download;
1996
- return e === !1 ? null : e?.filename ?? pt(this.data?.title);
2311
+ return e === !1 ? null : e?.filename ?? Nt(this.data?.title);
1997
2312
  }
1998
2313
  csv() {
1999
2314
  let e = this.data, t = this.downloadName;
2000
- e && t !== null && E(t, gt(e.chart));
2315
+ e && t !== null && E(t, It(e.chart));
2001
2316
  }
2002
2317
  png() {
2003
2318
  let e = this.data;
2004
2319
  if (!e) return;
2005
- let t = this.renderRoot.querySelector(this.expanded ? "lintje-modal" : "lintje-tile")?.querySelector(dt);
2006
- t && T(this.downloadName ?? pt(e.title), t);
2320
+ let t = this.renderRoot.querySelector(this.expanded ? "lintje-modal" : "lintje-tile")?.querySelector(jt);
2321
+ t && T(this.downloadName ?? Nt(e.title), t);
2007
2322
  }
2008
2323
  expandChanged(e) {
2009
- e ? this.#t ??= new W(() => this.requestUpdate()) : (this.#t?.detach(), this.#t = null);
2324
+ e ? this.#t ??= new G(() => this.requestUpdate()) : (this.#t?.detach(), this.#t = null);
2010
2325
  }
2011
2326
  render() {
2012
2327
  let e = this.data;
2013
- if (!e) return l;
2014
- let t = this.ready, n = this.#n.matches && e.mobileSubtitle ? e.mobileSubtitle : e.subtitle, r = this.id ? `${this.id}-tile` : void 0, i = e.tableSwitch && t ? this.viewSwitch() : l, a = this.showsTable;
2328
+ if (!e) return u;
2329
+ let t = this.ready, n = this.#n.matches && e.mobileSubtitle ? e.mobileSubtitle : e.subtitle, r = this.id ? `${this.id}-tile` : void 0, i = e.tableSwitch && t ? this.viewSwitch() : u, a = this.showsTable;
2015
2330
  return p`<lintje-tile
2016
- id=${r ?? l}
2017
- span=${e.span ?? l}
2018
- heading=${e.title ?? l}
2019
- icon=${e.icon ?? l}
2020
- subtitle=${n ?? l}
2021
- intro=${e.intro ?? l}
2022
- footnote=${e.footnote ?? l}
2331
+ id=${r ?? u}
2332
+ span=${e.span ?? u}
2333
+ heading=${e.title ?? u}
2334
+ icon=${e.icon ?? u}
2335
+ subtitle=${n ?? u}
2336
+ intro=${e.intro ?? u}
2337
+ footnote=${e.footnote ?? u}
2023
2338
  ?legend-below=${!!e.legendBelow}
2024
2339
  ?expandable=${this.expandable && t}
2025
2340
  ?download=${this.downloadName !== null && t}
2026
2341
  state=${e.state ?? "ready"}
2027
- message=${e.message ?? l}
2028
- last-known=${e.lastKnown ?? l}
2029
- content-height=${ht(e.chart) ?? l}
2342
+ message=${e.message ?? u}
2343
+ last-known=${e.lastKnown ?? u}
2344
+ content-height=${Ft(e.chart) ?? u}
2030
2345
  @lintje-tile-expand=${(e) => {
2031
2346
  e.stopPropagation(), this.expand(!0);
2032
2347
  }}
@@ -2039,14 +2354,14 @@ var yt = class extends C {
2039
2354
  slot="notice"
2040
2355
  compact
2041
2356
  .data=${e.notice}
2042
- ></lintje-announcement>` : l}
2357
+ ></lintje-announcement>` : u}
2043
2358
  ${this.content()}
2044
2359
  </lintje-tile>
2045
2360
 
2046
- ${this.renderExpandModal(this.expanded ? a ? this.table() : this.#t ? lt(e.chart, {
2361
+ ${this.renderExpandModal(this.expanded ? a ? this.table() : this.#t ? kt(e.chart, {
2047
2362
  ...this.chartOptions(this.#t),
2048
2363
  expanded: !0
2049
- }) : l : l, {
2364
+ }) : u : u, {
2050
2365
  heading: e.title,
2051
2366
  subtitle: n,
2052
2367
  footnote: e.footnote,
@@ -2059,14 +2374,14 @@ var yt = class extends C {
2059
2374
  switch (e.state ?? "ready") {
2060
2375
  case "loading": return p`<div slot="loading">
2061
2376
  ${S({
2062
- kind: mt(e.chart),
2063
- height: ht(e.chart),
2377
+ kind: Pt(e.chart),
2378
+ height: Ft(e.chart),
2064
2379
  status: !1
2065
2380
  })}
2066
2381
  </div>`;
2067
2382
  case "empty":
2068
- case "error": return l;
2069
- default: return this.showsTable ? this.table() : lt(e.chart, this.chartOptions(this.#e));
2383
+ case "error": return u;
2384
+ default: return this.showsTable ? this.table() : kt(e.chart, this.chartOptions(this.#e));
2070
2385
  }
2071
2386
  }
2072
2387
  viewSwitch() {
@@ -2078,7 +2393,7 @@ var yt = class extends C {
2078
2393
  hide-label
2079
2394
  ?stacked=${e}
2080
2395
  .value=${this.view}
2081
- .options=${ft}
2396
+ .options=${Mt}
2082
2397
  @lintje-change=${(e) => {
2083
2398
  e.stopPropagation(), this.view = e.detail === "table" ? "table" : "chart";
2084
2399
  }}
@@ -2089,12 +2404,12 @@ var yt = class extends C {
2089
2404
  return p`<lintje-data-table
2090
2405
  class="lintje-chart__table"
2091
2406
  bare
2092
- .data=${vt(e.chart, t)}
2407
+ .data=${Rt(e.chart, t)}
2093
2408
  ></lintje-data-table>`;
2094
2409
  }
2095
2410
  async focusMark(e) {
2096
2411
  await this.updateComplete;
2097
- let t = this.renderRoot.querySelector(this.expanded ? "lintje-modal" : "lintje-tile"), n = t?.querySelector(`[data-mark-id="${CSS.escape(e)}"]`) ?? t?.querySelector(`${dt}, .lintje-heatmap`);
2412
+ let t = this.renderRoot.querySelector(this.expanded ? "lintje-modal" : "lintje-tile"), n = t?.querySelector(`[data-mark-id="${CSS.escape(e)}"]`) ?? t?.querySelector(`${jt}, .lintje-heatmap`);
2098
2413
  n && !n.hasAttribute("tabindex") && n.setAttribute("tabindex", "-1"), n?.focus();
2099
2414
  }
2100
2415
  chartOptions(e) {
@@ -2118,6 +2433,6 @@ var yt = class extends C {
2118
2433
  };
2119
2434
  }
2120
2435
  };
2121
- i("lintje-chart", yt);
2436
+ i("lintje-chart", zt);
2122
2437
  //#endregion
2123
- export { yt as LintjeChart };
2438
+ export { zt as LintjeChart };