@iota-uz/sdk 0.4.43 → 0.5.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 (406) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +11 -142
  3. package/dist/client-host/applet.d.ts +52 -0
  4. package/dist/client-host/applet.d.ts.map +1 -0
  5. package/dist/client-host/applet.js +24 -0
  6. package/dist/client-host/cache.d.ts +15 -0
  7. package/dist/client-host/cache.d.ts.map +1 -0
  8. package/dist/client-host/cache.js +27 -0
  9. package/dist/client-host/errors.d.ts +16 -0
  10. package/dist/client-host/errors.d.ts.map +1 -0
  11. package/dist/client-host/errors.js +45 -0
  12. package/dist/client-host/identity.d.ts +21 -0
  13. package/dist/client-host/identity.d.ts.map +1 -0
  14. package/dist/client-host/identity.js +28 -0
  15. package/dist/client-host/index.d.ts +11 -0
  16. package/dist/client-host/index.d.ts.map +1 -0
  17. package/dist/client-host/index.js +10 -0
  18. package/dist/client-host/portals.d.ts +30 -0
  19. package/dist/client-host/portals.d.ts.map +1 -0
  20. package/dist/client-host/portals.js +149 -0
  21. package/dist/client-host/protocol.d.ts +2 -0
  22. package/dist/client-host/protocol.d.ts.map +1 -0
  23. package/dist/client-host/protocol.js +2 -0
  24. package/dist/client-host/route.d.ts +29 -0
  25. package/dist/client-host/route.d.ts.map +1 -0
  26. package/dist/client-host/route.js +32 -0
  27. package/dist/client-host/rpc.d.ts +46 -0
  28. package/dist/client-host/rpc.d.ts.map +1 -0
  29. package/dist/client-host/rpc.js +90 -0
  30. package/dist/client-host/streaming.d.ts +43 -0
  31. package/dist/client-host/streaming.d.ts.map +1 -0
  32. package/dist/client-host/streaming.js +141 -0
  33. package/dist/client-host/transport.d.ts +26 -0
  34. package/dist/client-host/transport.d.ts.map +1 -0
  35. package/dist/client-host/transport.js +53 -0
  36. package/dist/lens/CascadePanel-DqOZFdR-.js +512 -0
  37. package/dist/lens/ChartDataEquivalent-BFDdHoQn.js +52 -0
  38. package/dist/lens/ChartHost-Bl2lxIqU.js +68 -0
  39. package/dist/lens/ChartPanel-CTIp_4YE.js +720 -0
  40. package/dist/lens/CoveragePanel-DZZWkjSv.js +131 -0
  41. package/dist/lens/DashboardPanels.d.ts +36 -0
  42. package/dist/lens/DashboardPanels.d.ts.map +1 -0
  43. package/dist/lens/GaugePanel-BcNdd_Wj.js +43 -0
  44. package/dist/lens/LensDashboard.d.ts +21 -0
  45. package/dist/lens/LensDashboard.d.ts.map +1 -0
  46. package/dist/lens/MapPanel-6sI_Ei9L.js +178 -0
  47. package/dist/lens/MetricFlowPanel-LzqevSPs.js +70 -0
  48. package/dist/lens/MetricHierarchyPanel-h6tJqRPg.js +72 -0
  49. package/dist/lens/MetricRelationshipPanel-CgckUvvJ.js +54 -0
  50. package/dist/lens/PrintReport-DJv4Rm_U.js +1351 -0
  51. package/dist/lens/TablePanel-Dh6bXlwM.js +619 -0
  52. package/dist/lens/adapter-zBDC8hbZ.js +29093 -0
  53. package/dist/lens/breakpoints.d.ts +37 -0
  54. package/dist/lens/breakpoints.d.ts.map +1 -0
  55. package/dist/lens/charts/adapter.d.ts +157 -0
  56. package/dist/lens/charts/adapter.d.ts.map +1 -0
  57. package/dist/lens/charts/echarts/adapter.d.ts +9 -0
  58. package/dist/lens/charts/echarts/adapter.d.ts.map +1 -0
  59. package/dist/lens/charts/echarts/distributions.d.ts +9 -0
  60. package/dist/lens/charts/echarts/distributions.d.ts.map +1 -0
  61. package/dist/lens/charts/echarts/events.d.ts +7 -0
  62. package/dist/lens/charts/echarts/events.d.ts.map +1 -0
  63. package/dist/lens/charts/echarts/options.d.ts +163 -0
  64. package/dist/lens/charts/echarts/options.d.ts.map +1 -0
  65. package/dist/lens/charts/echarts/theme.d.ts +49 -0
  66. package/dist/lens/charts/echarts/theme.d.ts.map +1 -0
  67. package/dist/lens/charts/echarts/tooltip.d.ts +79 -0
  68. package/dist/lens/charts/echarts/tooltip.d.ts.map +1 -0
  69. package/dist/lens/charts/index.d.ts +9 -0
  70. package/dist/lens/charts/index.d.ts.map +1 -0
  71. package/dist/lens/charts/keys.d.ts +8 -0
  72. package/dist/lens/charts/keys.d.ts.map +1 -0
  73. package/dist/lens/charts/overlays.d.ts +134 -0
  74. package/dist/lens/charts/overlays.d.ts.map +1 -0
  75. package/dist/lens/charts/palette.d.ts +54 -0
  76. package/dist/lens/charts/palette.d.ts.map +1 -0
  77. package/dist/lens/charts/scales.d.ts +26 -0
  78. package/dist/lens/charts/scales.d.ts.map +1 -0
  79. package/dist/lens/charts/shares.d.ts +44 -0
  80. package/dist/lens/charts/shares.d.ts.map +1 -0
  81. package/dist/lens/charts/text.d.ts +23 -0
  82. package/dist/lens/charts/text.d.ts.map +1 -0
  83. package/dist/lens/contract/index.d.ts +4 -0
  84. package/dist/lens/contract/index.d.ts.map +1 -0
  85. package/dist/lens/contract/palette.d.ts +13 -0
  86. package/dist/lens/contract/palette.d.ts.map +1 -0
  87. package/dist/lens/contract/schemas.d.ts +132 -0
  88. package/dist/lens/contract/schemas.d.ts.map +1 -0
  89. package/dist/lens/contract/types.d.ts +788 -0
  90. package/dist/lens/contract/types.d.ts.map +1 -0
  91. package/dist/lens/controls/Calendar.d.ts +24 -0
  92. package/dist/lens/controls/Calendar.d.ts.map +1 -0
  93. package/dist/lens/controls/CompareFilterControl.d.ts +23 -0
  94. package/dist/lens/controls/CompareFilterControl.d.ts.map +1 -0
  95. package/dist/lens/controls/FacetFilterMenu.d.ts +29 -0
  96. package/dist/lens/controls/FacetFilterMenu.d.ts.map +1 -0
  97. package/dist/lens/controls/FilterBar.d.ts +30 -0
  98. package/dist/lens/controls/FilterBar.d.ts.map +1 -0
  99. package/dist/lens/controls/PeriodFilterControl.d.ts +50 -0
  100. package/dist/lens/controls/PeriodFilterControl.d.ts.map +1 -0
  101. package/dist/lens/controls/SegmentedFilterControl.d.ts +22 -0
  102. package/dist/lens/controls/SegmentedFilterControl.d.ts.map +1 -0
  103. package/dist/lens/controls/facetOptions.d.ts +33 -0
  104. package/dist/lens/controls/facetOptions.d.ts.map +1 -0
  105. package/dist/lens/controls/index.d.ts +6 -0
  106. package/dist/lens/controls/index.d.ts.map +1 -0
  107. package/dist/lens/controls/model.d.ts +181 -0
  108. package/dist/lens/controls/model.d.ts.map +1 -0
  109. package/dist/lens/drillPrefetch-Bs-6Oyxa.js +68 -0
  110. package/dist/lens/element.d.ts +12 -0
  111. package/dist/lens/element.d.ts.map +1 -0
  112. package/dist/lens/explore/ContextMiniChart.d.ts +18 -0
  113. package/dist/lens/explore/ContextMiniChart.d.ts.map +1 -0
  114. package/dist/lens/explore/DrillOverlay.d.ts +66 -0
  115. package/dist/lens/explore/DrillOverlay.d.ts.map +1 -0
  116. package/dist/lens/explore/ExplorePanel.d.ts +8 -0
  117. package/dist/lens/explore/ExplorePanel.d.ts.map +1 -0
  118. package/dist/lens/explore/FocusContextHeader.d.ts +20 -0
  119. package/dist/lens/explore/FocusContextHeader.d.ts.map +1 -0
  120. package/dist/lens/explore/LensSelector.d.ts +17 -0
  121. package/dist/lens/explore/LensSelector.d.ts.map +1 -0
  122. package/dist/lens/explore/SourceDataDisclosure.d.ts +15 -0
  123. package/dist/lens/explore/SourceDataDisclosure.d.ts.map +1 -0
  124. package/dist/lens/explore/actions.d.ts +22 -0
  125. package/dist/lens/explore/actions.d.ts.map +1 -0
  126. package/dist/lens/explore/focusModel.d.ts +55 -0
  127. package/dist/lens/explore/focusModel.d.ts.map +1 -0
  128. package/dist/lens/explore/index.d.ts +9 -0
  129. package/dist/lens/explore/index.d.ts.map +1 -0
  130. package/dist/lens/explore/model.d.ts +59 -0
  131. package/dist/lens/explore/model.d.ts.map +1 -0
  132. package/dist/lens/export-B0U20F4u.js +57 -0
  133. package/dist/lens/icons.d.ts +103 -0
  134. package/dist/lens/icons.d.ts.map +1 -0
  135. package/dist/lens/idlePrefetch-Bi4Wk1uR.js +80 -0
  136. package/dist/lens/index-C45DAO6w.js +10883 -0
  137. package/dist/lens/index-CspKnSQn.js +11 -0
  138. package/dist/lens/index.d.ts +7 -0
  139. package/dist/lens/index.d.ts.map +1 -0
  140. package/dist/lens/index.js +17 -0
  141. package/dist/lens/install-3GLgv_LN.js +2028 -0
  142. package/dist/lens/install-B5oSx3pv.js +233 -0
  143. package/dist/lens/install-DT0AQkUj.js +1490 -0
  144. package/dist/lens/install-DyXK20dR.js +307 -0
  145. package/dist/lens/keys-DenV5HsJ.js +12 -0
  146. package/dist/lens/listSearch.d.ts +12 -0
  147. package/dist/lens/listSearch.d.ts.map +1 -0
  148. package/dist/lens/metricViews-QvoFHVdh.js +170 -0
  149. package/dist/lens/panels/CascadePanel.d.ts +138 -0
  150. package/dist/lens/panels/CascadePanel.d.ts.map +1 -0
  151. package/dist/lens/panels/ChartDataEquivalent.d.ts +23 -0
  152. package/dist/lens/panels/ChartDataEquivalent.d.ts.map +1 -0
  153. package/dist/lens/panels/ChartHost.d.ts +14 -0
  154. package/dist/lens/panels/ChartHost.d.ts.map +1 -0
  155. package/dist/lens/panels/ChartPanel.d.ts +29 -0
  156. package/dist/lens/panels/ChartPanel.d.ts.map +1 -0
  157. package/dist/lens/panels/CopyValueButton.d.ts +15 -0
  158. package/dist/lens/panels/CopyValueButton.d.ts.map +1 -0
  159. package/dist/lens/panels/CoveragePanel.d.ts +17 -0
  160. package/dist/lens/panels/CoveragePanel.d.ts.map +1 -0
  161. package/dist/lens/panels/ExportMenu.d.ts +12 -0
  162. package/dist/lens/panels/ExportMenu.d.ts.map +1 -0
  163. package/dist/lens/panels/GaugePanel.d.ts +6 -0
  164. package/dist/lens/panels/GaugePanel.d.ts.map +1 -0
  165. package/dist/lens/panels/InfoTip.d.ts +50 -0
  166. package/dist/lens/panels/InfoTip.d.ts.map +1 -0
  167. package/dist/lens/panels/MapPanel.d.ts +17 -0
  168. package/dist/lens/panels/MapPanel.d.ts.map +1 -0
  169. package/dist/lens/panels/MetricFlowPanel.d.ts +6 -0
  170. package/dist/lens/panels/MetricFlowPanel.d.ts.map +1 -0
  171. package/dist/lens/panels/MetricHierarchyPanel.d.ts +6 -0
  172. package/dist/lens/panels/MetricHierarchyPanel.d.ts.map +1 -0
  173. package/dist/lens/panels/MetricRelationshipPanel.d.ts +14 -0
  174. package/dist/lens/panels/MetricRelationshipPanel.d.ts.map +1 -0
  175. package/dist/lens/panels/PanelExportMenu.d.ts +5 -0
  176. package/dist/lens/panels/PanelExportMenu.d.ts.map +1 -0
  177. package/dist/lens/panels/PanelFrame.d.ts +42 -0
  178. package/dist/lens/panels/PanelFrame.d.ts.map +1 -0
  179. package/dist/lens/panels/PanelOverlay.d.ts +19 -0
  180. package/dist/lens/panels/PanelOverlay.d.ts.map +1 -0
  181. package/dist/lens/panels/QualityChip.d.ts +51 -0
  182. package/dist/lens/panels/QualityChip.d.ts.map +1 -0
  183. package/dist/lens/panels/ShareSliceButton.d.ts +3 -0
  184. package/dist/lens/panels/ShareSliceButton.d.ts.map +1 -0
  185. package/dist/lens/panels/Skeleton.d.ts +67 -0
  186. package/dist/lens/panels/Skeleton.d.ts.map +1 -0
  187. package/dist/lens/panels/StatPanel.d.ts +52 -0
  188. package/dist/lens/panels/StatPanel.d.ts.map +1 -0
  189. package/dist/lens/panels/StatValueTicker.d.ts +27 -0
  190. package/dist/lens/panels/StatValueTicker.d.ts.map +1 -0
  191. package/dist/lens/panels/TablePanel.d.ts +19 -0
  192. package/dist/lens/panels/TablePanel.d.ts.map +1 -0
  193. package/dist/lens/panels/WaterfallPlot.d.ts +51 -0
  194. package/dist/lens/panels/WaterfallPlot.d.ts.map +1 -0
  195. package/dist/lens/panels/actions.d.ts +75 -0
  196. package/dist/lens/panels/actions.d.ts.map +1 -0
  197. package/dist/lens/panels/context.d.ts +32 -0
  198. package/dist/lens/panels/context.d.ts.map +1 -0
  199. package/dist/lens/panels/data.d.ts +95 -0
  200. package/dist/lens/panels/data.d.ts.map +1 -0
  201. package/dist/lens/panels/kinds.d.ts +4 -0
  202. package/dist/lens/panels/kinds.d.ts.map +1 -0
  203. package/dist/lens/panels/metricViews.d.ts +79 -0
  204. package/dist/lens/panels/metricViews.d.ts.map +1 -0
  205. package/dist/lens/panels/registry.d.ts +45 -0
  206. package/dist/lens/panels/registry.d.ts.map +1 -0
  207. package/dist/lens/panels/useIsClamped.d.ts +16 -0
  208. package/dist/lens/panels/useIsClamped.d.ts.map +1 -0
  209. package/dist/lens/panels/useMenuButton.d.ts +68 -0
  210. package/dist/lens/panels/useMenuButton.d.ts.map +1 -0
  211. package/dist/lens/prefetch-Dov5CBoH.js +74 -0
  212. package/dist/lens/prefetchPanels-B7bIY0bM.js +31 -0
  213. package/dist/lens/print/PrintReport.d.ts +12 -0
  214. package/dist/lens/print/PrintReport.d.ts.map +1 -0
  215. package/dist/lens/print/footnotes.d.ts +29 -0
  216. package/dist/lens/print/footnotes.d.ts.map +1 -0
  217. package/dist/lens/print/formula.d.ts +9 -0
  218. package/dist/lens/print/formula.d.ts.map +1 -0
  219. package/dist/lens/print/narrative.d.ts +41 -0
  220. package/dist/lens/print/narrative.d.ts.map +1 -0
  221. package/dist/lens/print/outline.d.ts +94 -0
  222. package/dist/lens/print/outline.d.ts.map +1 -0
  223. package/dist/lens/print/palette.d.ts +23 -0
  224. package/dist/lens/print/palette.d.ts.map +1 -0
  225. package/dist/lens/print/quality.d.ts +32 -0
  226. package/dist/lens/print/quality.d.ts.map +1 -0
  227. package/dist/lens/print/units.d.ts +23 -0
  228. package/dist/lens/print/units.d.ts.map +1 -0
  229. package/dist/lens/print/values.d.ts +28 -0
  230. package/dist/lens/print/values.d.ts.map +1 -0
  231. package/dist/lens/print-CwcB0fug.js +216 -0
  232. package/dist/lens/runtime/clipboard.d.ts +11 -0
  233. package/dist/lens/runtime/clipboard.d.ts.map +1 -0
  234. package/dist/lens/runtime/document.d.ts +9 -0
  235. package/dist/lens/runtime/document.d.ts.map +1 -0
  236. package/dist/lens/runtime/drawer.d.ts +21 -0
  237. package/dist/lens/runtime/drawer.d.ts.map +1 -0
  238. package/dist/lens/runtime/drill.d.ts +54 -0
  239. package/dist/lens/runtime/drill.d.ts.map +1 -0
  240. package/dist/lens/runtime/drillPrefetch.d.ts +22 -0
  241. package/dist/lens/runtime/drillPrefetch.d.ts.map +1 -0
  242. package/dist/lens/runtime/export.d.ts +21 -0
  243. package/dist/lens/runtime/export.d.ts.map +1 -0
  244. package/dist/lens/runtime/filters.d.ts +51 -0
  245. package/dist/lens/runtime/filters.d.ts.map +1 -0
  246. package/dist/lens/runtime/focusTrap.d.ts +4 -0
  247. package/dist/lens/runtime/focusTrap.d.ts.map +1 -0
  248. package/dist/lens/runtime/format.d.ts +81 -0
  249. package/dist/lens/runtime/format.d.ts.map +1 -0
  250. package/dist/lens/runtime/idlePrefetch.d.ts +35 -0
  251. package/dist/lens/runtime/idlePrefetch.d.ts.map +1 -0
  252. package/dist/lens/runtime/index.d.ts +15 -0
  253. package/dist/lens/runtime/index.d.ts.map +1 -0
  254. package/dist/lens/runtime/navigate.d.ts +12 -0
  255. package/dist/lens/runtime/navigate.d.ts.map +1 -0
  256. package/dist/lens/runtime/navigation.d.ts +77 -0
  257. package/dist/lens/runtime/navigation.d.ts.map +1 -0
  258. package/dist/lens/runtime/overlayContainer.d.ts +24 -0
  259. package/dist/lens/runtime/overlayContainer.d.ts.map +1 -0
  260. package/dist/lens/runtime/panel.d.ts +47 -0
  261. package/dist/lens/runtime/panel.d.ts.map +1 -0
  262. package/dist/lens/runtime/panelImage.d.ts +28 -0
  263. package/dist/lens/runtime/panelImage.d.ts.map +1 -0
  264. package/dist/lens/runtime/prefetch.d.ts +48 -0
  265. package/dist/lens/runtime/prefetch.d.ts.map +1 -0
  266. package/dist/lens/runtime/prefetchPanels.d.ts +17 -0
  267. package/dist/lens/runtime/prefetchPanels.d.ts.map +1 -0
  268. package/dist/lens/runtime/print.d.ts +50 -0
  269. package/dist/lens/runtime/print.d.ts.map +1 -0
  270. package/dist/lens/runtime/provider.d.ts +195 -0
  271. package/dist/lens/runtime/provider.d.ts.map +1 -0
  272. package/dist/lens/runtime/query.d.ts +32 -0
  273. package/dist/lens/runtime/query.d.ts.map +1 -0
  274. package/dist/lens/runtime/recovery.d.ts +26 -0
  275. package/dist/lens/runtime/recovery.d.ts.map +1 -0
  276. package/dist/lens/runtime/snapshotLease.d.ts +2 -0
  277. package/dist/lens/runtime/snapshotLease.d.ts.map +1 -0
  278. package/dist/lens/runtime/theme.d.ts +4 -0
  279. package/dist/lens/runtime/theme.d.ts.map +1 -0
  280. package/dist/lens/runtime/url.d.ts +23 -0
  281. package/dist/lens/runtime/url.d.ts.map +1 -0
  282. package/dist/lens/scales-DKkoQGtJ.js +195 -0
  283. package/dist/lens/snapshotLease-LjBaqKs-.js +14 -0
  284. package/dist/lens/style.css +1 -0
  285. package/dist/lens/visualRegression.d.ts +2 -0
  286. package/dist/lens/visualRegression.d.ts.map +1 -0
  287. package/dist/sdk-identity.cjs +6 -0
  288. package/dist/sdk-identity.d.ts +4 -0
  289. package/dist/sdk-identity.js +4 -0
  290. package/dist/sdk-identity.json +5 -0
  291. package/package.json +22 -123
  292. package/assets/fonts/Actay/Actay-Regular.otf +0 -0
  293. package/assets/fonts/Actay/Actay-RegularItalic.otf +0 -0
  294. package/assets/fonts/Actay/ActayCondensed-Thin.otf +0 -0
  295. package/assets/fonts/Actay/ActayCondensed-ThinItalic.otf +0 -0
  296. package/assets/fonts/Actay/ActayWide-Bold.otf +0 -0
  297. package/assets/fonts/Actay/ActayWide-BoldItalic.otf +0 -0
  298. package/assets/fonts/Gilroy/Gilroy-Black.woff2 +0 -0
  299. package/assets/fonts/Gilroy/Gilroy-BlackItalic.woff2 +0 -0
  300. package/assets/fonts/Gilroy/Gilroy-Bold.woff2 +0 -0
  301. package/assets/fonts/Gilroy/Gilroy-BoldItalic.woff2 +0 -0
  302. package/assets/fonts/Gilroy/Gilroy-Extrabold.woff2 +0 -0
  303. package/assets/fonts/Gilroy/Gilroy-ExtraboldItalic.woff2 +0 -0
  304. package/assets/fonts/Gilroy/Gilroy-Heavy.woff2 +0 -0
  305. package/assets/fonts/Gilroy/Gilroy-HeavyItalic.woff2 +0 -0
  306. package/assets/fonts/Gilroy/Gilroy-Light.woff2 +0 -0
  307. package/assets/fonts/Gilroy/Gilroy-LightItalic.woff2 +0 -0
  308. package/assets/fonts/Gilroy/Gilroy-Medium.woff2 +0 -0
  309. package/assets/fonts/Gilroy/Gilroy-MediumItalic.woff2 +0 -0
  310. package/assets/fonts/Gilroy/Gilroy-Regular.woff2 +0 -0
  311. package/assets/fonts/Gilroy/Gilroy-RegularItalic.woff2 +0 -0
  312. package/assets/fonts/Gilroy/Gilroy-Semibold.woff2 +0 -0
  313. package/assets/fonts/Gilroy/Gilroy-SemiboldItalic.woff2 +0 -0
  314. package/assets/fonts/Gilroy/Gilroy-Thin.woff2 +0 -0
  315. package/assets/fonts/Gilroy/Gilroy-ThinItalic.woff2 +0 -0
  316. package/assets/fonts/Gilroy/Gilroy-UltraLight.woff2 +0 -0
  317. package/assets/fonts/Gilroy/Gilroy-UltraLightItalic.woff2 +0 -0
  318. package/assets/fonts/Inter.var.woff2 +0 -0
  319. package/dist/applet/core.cjs +0 -412
  320. package/dist/applet/core.cjs.map +0 -1
  321. package/dist/applet/core.d.cts +0 -187
  322. package/dist/applet/core.d.ts +0 -187
  323. package/dist/applet/core.mjs +0 -396
  324. package/dist/applet/core.mjs.map +0 -1
  325. package/dist/applet/devtools.cjs +0 -147
  326. package/dist/applet/devtools.cjs.map +0 -1
  327. package/dist/applet/devtools.d.cts +0 -7
  328. package/dist/applet/devtools.d.ts +0 -7
  329. package/dist/applet/devtools.mjs +0 -144
  330. package/dist/applet/devtools.mjs.map +0 -1
  331. package/dist/applet/host.cjs +0 -397
  332. package/dist/applet/host.cjs.map +0 -1
  333. package/dist/applet/host.d.cts +0 -42
  334. package/dist/applet/host.d.ts +0 -42
  335. package/dist/applet/host.mjs +0 -392
  336. package/dist/applet/host.mjs.map +0 -1
  337. package/dist/applet/vite.cjs +0 -219
  338. package/dist/applet/vite.cjs.map +0 -1
  339. package/dist/applet/vite.d.cts +0 -99
  340. package/dist/applet/vite.d.ts +0 -99
  341. package/dist/applet/vite.mjs +0 -203
  342. package/dist/applet/vite.mjs.map +0 -1
  343. package/dist/applet-runtime/index.cjs +0 -890
  344. package/dist/applet-runtime/index.cjs.map +0 -1
  345. package/dist/applet-runtime/index.d.cts +0 -191
  346. package/dist/applet-runtime/index.d.ts +0 -191
  347. package/dist/applet-runtime/index.mjs +0 -876
  348. package/dist/applet-runtime/index.mjs.map +0 -1
  349. package/dist/bichat/index.cjs +0 -20774
  350. package/dist/bichat/index.cjs.map +0 -1
  351. package/dist/bichat/index.css +0 -618
  352. package/dist/bichat/index.css.map +0 -1
  353. package/dist/bichat/index.d.cts +0 -4515
  354. package/dist/bichat/index.d.ts +0 -4515
  355. package/dist/bichat/index.mjs +0 -20602
  356. package/dist/bichat/index.mjs.map +0 -1
  357. package/dist/bichat/styles.css +0 -774
  358. package/dist/bichat/tailwind.cjs +0 -103
  359. package/dist/bichat/tailwind.cjs.map +0 -1
  360. package/dist/bichat/tailwind.d.cts +0 -21
  361. package/dist/bichat/tailwind.d.ts +0 -21
  362. package/dist/bichat/tailwind.mjs +0 -95
  363. package/dist/bichat/tailwind.mjs.map +0 -1
  364. package/dist/fonts/Actay/Actay-Regular.otf +0 -0
  365. package/dist/fonts/Actay/Actay-RegularItalic.otf +0 -0
  366. package/dist/fonts/Actay/ActayCondensed-Thin.otf +0 -0
  367. package/dist/fonts/Actay/ActayCondensed-ThinItalic.otf +0 -0
  368. package/dist/fonts/Actay/ActayWide-Bold.otf +0 -0
  369. package/dist/fonts/Actay/ActayWide-BoldItalic.otf +0 -0
  370. package/dist/fonts/Gilroy/Gilroy-Black.woff2 +0 -0
  371. package/dist/fonts/Gilroy/Gilroy-BlackItalic.woff2 +0 -0
  372. package/dist/fonts/Gilroy/Gilroy-Bold.woff2 +0 -0
  373. package/dist/fonts/Gilroy/Gilroy-BoldItalic.woff2 +0 -0
  374. package/dist/fonts/Gilroy/Gilroy-Extrabold.woff2 +0 -0
  375. package/dist/fonts/Gilroy/Gilroy-ExtraboldItalic.woff2 +0 -0
  376. package/dist/fonts/Gilroy/Gilroy-Heavy.woff2 +0 -0
  377. package/dist/fonts/Gilroy/Gilroy-HeavyItalic.woff2 +0 -0
  378. package/dist/fonts/Gilroy/Gilroy-Light.woff2 +0 -0
  379. package/dist/fonts/Gilroy/Gilroy-LightItalic.woff2 +0 -0
  380. package/dist/fonts/Gilroy/Gilroy-Medium.woff2 +0 -0
  381. package/dist/fonts/Gilroy/Gilroy-MediumItalic.woff2 +0 -0
  382. package/dist/fonts/Gilroy/Gilroy-Regular.woff2 +0 -0
  383. package/dist/fonts/Gilroy/Gilroy-RegularItalic.woff2 +0 -0
  384. package/dist/fonts/Gilroy/Gilroy-Semibold.woff2 +0 -0
  385. package/dist/fonts/Gilroy/Gilroy-SemiboldItalic.woff2 +0 -0
  386. package/dist/fonts/Gilroy/Gilroy-Thin.woff2 +0 -0
  387. package/dist/fonts/Gilroy/Gilroy-ThinItalic.woff2 +0 -0
  388. package/dist/fonts/Gilroy/Gilroy-UltraLight.woff2 +0 -0
  389. package/dist/fonts/Gilroy/Gilroy-UltraLightItalic.woff2 +0 -0
  390. package/dist/fonts/Inter.var.woff2 +0 -0
  391. package/dist/index-Cs_xWkhC.d.cts +0 -84
  392. package/dist/index-Cs_xWkhC.d.ts +0 -84
  393. package/dist/index.cjs +0 -777
  394. package/dist/index.cjs.map +0 -1
  395. package/dist/index.d.cts +0 -7
  396. package/dist/index.d.ts +0 -7
  397. package/dist/index.mjs +0 -755
  398. package/dist/index.mjs.map +0 -1
  399. package/dist/rpc-fh942_dj.d.cts +0 -31
  400. package/dist/rpc-fh942_dj.d.ts +0 -31
  401. package/tailwind/compiled.css +0 -2
  402. package/tailwind/create-config.cjs +0 -90
  403. package/tailwind/iota.css +0 -1195
  404. package/tailwind/main.css +0 -2
  405. package/tailwind/sdk-content.cjs +0 -177
  406. package/tailwind/sdk-theme.cjs +0 -120
@@ -0,0 +1,1351 @@
1
+ import { jsx as s, jsxs as u } from "react/jsx-runtime";
2
+ import { useMemo as A, createContext as pe, useCallback as G, useContext as he, Fragment as fe } from "react";
3
+ import { createPortal as ge } from "react-dom";
4
+ import { W as be, b as ve, a as ye } from "./CascadePanel-DqOZFdR-.js";
5
+ import { C as ke } from "./ChartHost-Bl2lxIqU.js";
6
+ import { u as T, r as Ne, f as M, b as we, a as xe, c as Fe, d as te, e as $e, g as ne, s as Se, h as Me } from "./index-C45DAO6w.js";
7
+ import "@iota-uz/sdk/client-host";
8
+ import { r as B, a as Q, c as Ce, b as De, f as J, d as Te, h as Pe } from "./metricViews-QvoFHVdh.js";
9
+ import { relationshipSentence as Ae } from "./MetricRelationshipPanel-CgckUvvJ.js";
10
+ function Ke(e, t) {
11
+ const n = B(e);
12
+ return n ? t(n.meta.labelKey, n.meta.fallback) : void 0;
13
+ }
14
+ function Re(e, t) {
15
+ const n = B(e);
16
+ if (n) {
17
+ if (n.axis === "availability")
18
+ return t(
19
+ "print.noteUnavailable",
20
+ "Not available: the source is not calculated or not configured, so the figure is shown as a dash rather than as a zero."
21
+ );
22
+ if (n.value === "proxy")
23
+ return t(
24
+ "print.noteProxy",
25
+ "Proxy: a management estimate derived from adjacent data, not a figure taken from the accounting system."
26
+ );
27
+ if (n.value === "requires_reconciliation")
28
+ return t(
29
+ "print.noteReconciliation",
30
+ "Requires reconciliation: a known difference against the accounting system has not been resolved."
31
+ );
32
+ }
33
+ }
34
+ const Y = {
35
+ verified: {
36
+ labelKey: "print.defVerified",
37
+ fallback: "Verified — the figure is taken from the accounting system as recorded, without derivation."
38
+ },
39
+ calculated: {
40
+ labelKey: "print.defCalculated",
41
+ fallback: "Calculated — derived from recorded data by a stated rule; the rule, not the figure, is what to check."
42
+ },
43
+ proxy: {
44
+ labelKey: "print.defProxy",
45
+ fallback: "Proxy — a management estimate from adjacent data, used where the direct source does not exist."
46
+ },
47
+ requires_reconciliation: {
48
+ labelKey: "print.defReconciliation",
49
+ fallback: "Requires reconciliation — a known difference against the accounting system is still open."
50
+ },
51
+ config_required: {
52
+ labelKey: "print.defConfigRequired",
53
+ fallback: "Configuration required — the calculation exists but its parameters have not been set for this period."
54
+ },
55
+ empty_source: {
56
+ labelKey: "print.defEmptySource",
57
+ fallback: "No source data — the source holds no rows for this period, which is not the same as a zero."
58
+ },
59
+ unavailable: {
60
+ labelKey: "print.defUnavailable",
61
+ fallback: "Unavailable — the figure could not be produced, and is shown as a dash rather than as a zero."
62
+ }
63
+ }, Le = /* @__PURE__ */ new Set(["config_required", "empty_source", "unavailable"]);
64
+ function Ve(e, t) {
65
+ const n = /* @__PURE__ */ new Set(), a = Object.keys(Y);
66
+ for (const r of e) {
67
+ const i = B(r);
68
+ i && n.add(i.value);
69
+ }
70
+ return a.filter((r) => n.has(r)).map((r) => {
71
+ const i = Y[r], o = Le.has(r) ? { availability: r } : { confidence: r };
72
+ return {
73
+ value: r,
74
+ label: Ke(o, t) ?? r,
75
+ definition: t(i.labelKey, i.fallback)
76
+ };
77
+ });
78
+ }
79
+ function E({ confidence: e, availability: t }) {
80
+ const n = T(), a = B({ confidence: e, availability: t });
81
+ return a ? /* @__PURE__ */ s("span", { className: "lens-print-chip", "data-quality": a.value, children: n(a.meta.labelKey, a.meta.fallback) }) : null;
82
+ }
83
+ const ae = /* @__PURE__ */ new Set(["pie", "donut", "radial", "bar", "hbar", "line", "area"]), re = /* @__PURE__ */ new Set(["metric_flow", "metric_hierarchy", "metric_relationship"]);
84
+ function q(e) {
85
+ if (typeof e == "number" && Number.isFinite(e)) return e;
86
+ if (typeof e == "string" && e.trim() !== "") {
87
+ const t = Number(e);
88
+ if (Number.isFinite(t)) return t;
89
+ }
90
+ }
91
+ function R(e) {
92
+ return e == null ? "—" : typeof e == "string" ? e || "—" : typeof e == "number" || typeof e == "boolean" || typeof e == "bigint" ? String(e) : "—";
93
+ }
94
+ function C(e, t) {
95
+ return t ? e.columns.findIndex(({ name: n }) => n === t) : -1;
96
+ }
97
+ function qe(e, t) {
98
+ const n = { ...e.format };
99
+ for (const [a, r] of Object.entries(t)) {
100
+ const i = e.encoding[a];
101
+ r && i && e.format[i] && !n[r] && (n[r] = e.format[i]);
102
+ }
103
+ return n;
104
+ }
105
+ function Ie(e, t) {
106
+ return e === "partition" ? ["pie", "donut", "bar", "hbar"].includes(t) ? t : "donut" : e === "reconciliation" ? "cascade" : e === "series" ? "line" : "table";
107
+ }
108
+ function D(e) {
109
+ var i;
110
+ const t = ((i = e.perspective) == null ? void 0 : i.semantics) ?? e.panel.semantics, n = e.level.encoding ?? e.panel.encoding, r = e.root || e.path.length === 0 ? e.panel.kind : e.level.view ?? Ie(t, e.panel.kind);
111
+ return {
112
+ ...Ne(e.panel, r),
113
+ title: e.level.label.trim() || e.panel.title,
114
+ semantics: t,
115
+ encoding: n,
116
+ format: qe(e.panel, n),
117
+ presentation: e.level.presentation ?? e.panel.presentation
118
+ };
119
+ }
120
+ function Be(e) {
121
+ if (!(!e || e.rows.length === 0))
122
+ return JSON.stringify([e.columns.map(({ name: t }) => t), e.rows]);
123
+ }
124
+ function Ee(e) {
125
+ var a, r;
126
+ const t = D(e.section), n = [t];
127
+ for (const i of ((a = t.metricFlow) == null ? void 0 : a.stages) ?? []) n.push(i);
128
+ for (const i of ((r = t.metricHierarchy) == null ? void 0 : r.rows) ?? []) n.push(i);
129
+ return t.metricRelationship && n.push(t.metricRelationship.source, t.metricRelationship.target), n;
130
+ }
131
+ function _e(e) {
132
+ var r;
133
+ const t = D(e.section), n = e.section.frame;
134
+ if (!n || !((r = t.columns) != null && r.length)) return [];
135
+ const a = [];
136
+ for (const i of t.columns) {
137
+ const o = C(n, i.badgeField);
138
+ if (!(o < 0))
139
+ for (const l of n.rows) {
140
+ const d = R(l[o]).trim();
141
+ d && d !== "—" && a.push(d);
142
+ }
143
+ }
144
+ return a;
145
+ }
146
+ function Oe(e, t) {
147
+ var r;
148
+ const n = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
149
+ for (const i of e) {
150
+ const o = D(i.section), l = [], d = (r = o.info) == null ? void 0 : r.trim();
151
+ d && l.push(d);
152
+ for (const p of Ee(i)) {
153
+ const h = Re(p, t);
154
+ h && l.push(h);
155
+ }
156
+ l.push(..._e(i));
157
+ const c = { markers: [], notes: [] };
158
+ for (const p of l) {
159
+ const h = n.get(p);
160
+ if (h !== void 0) {
161
+ c.markers.includes(h) || c.markers.push(h);
162
+ continue;
163
+ }
164
+ const y = n.size + 1;
165
+ n.set(p, y), c.markers.push(y), c.notes.push({ number: y, text: p });
166
+ }
167
+ c.markers.length > 0 && a.set(i.section.id, c);
168
+ }
169
+ return a;
170
+ }
171
+ const je = 1e4, Ue = [1e9, 1e6, 1e3];
172
+ function U(e, t) {
173
+ if (e == null || e === "") return;
174
+ const n = typeof e == "number" ? e : Number(e);
175
+ if (Number.isFinite(n))
176
+ return t.minorUnits && t.kind === "money" ? n / 100 : n;
177
+ }
178
+ function We(e, t) {
179
+ var r;
180
+ return ((r = new Intl.NumberFormat(t, { notation: "compact", compactDisplay: "short" }).formatToParts(e).find((i) => i.type === "compact")) == null ? void 0 : r.value.trim()) || void 0;
181
+ }
182
+ function ze(e, t, n, a) {
183
+ return M(e, {
184
+ ...n,
185
+ kind: "number",
186
+ minorUnits: !1,
187
+ compact: !1,
188
+ currency: void 0,
189
+ symbol: void 0,
190
+ precision: a
191
+ }, t);
192
+ }
193
+ function j(e, t, n) {
194
+ const a = { format: (h) => M(h, t, n) };
195
+ if (!t || t.kind !== "money" && t.kind !== "number") return a;
196
+ const r = e.map((h) => U(h, t)).filter((h) => h !== void 0 && h !== 0);
197
+ if (r.length === 0) return a;
198
+ const i = t.kind === "money" ? (t.currency ?? "").trim() : "", o = r.map((h) => Math.abs(h)), l = Math.max(...o), d = Math.min(...o), c = l / d <= je ? Ue.find((h) => l >= h) : void 0, p = c ? We(c, n) : void 0;
199
+ return c && p ? {
200
+ note: [p, i].filter(Boolean).join(" "),
201
+ format: (h) => {
202
+ const y = U(h, t);
203
+ return y === void 0 ? M(h, t, n) : ze(y / c, n, t, 2);
204
+ }
205
+ } : i ? {
206
+ note: i,
207
+ format: (h) => {
208
+ const y = U(h, t);
209
+ return y === void 0 ? M(h, t, n) : M(y, {
210
+ ...t,
211
+ kind: "number",
212
+ minorUnits: !1,
213
+ currency: void 0,
214
+ symbol: void 0
215
+ }, n);
216
+ }
217
+ } : a;
218
+ }
219
+ function He(e, t) {
220
+ const n = T();
221
+ return A(() => {
222
+ if (t.frame)
223
+ return we(e, t.frame, {
224
+ missingColumn: (a) => n("panel.missingColumn", "Panel data is missing the “{column}” column.", { column: a }),
225
+ duplicateKey: (a) => n("panel.duplicateKey", "Panel data has a duplicate key “{key}”.", { key: a })
226
+ });
227
+ }, [e, t.frame, n]);
228
+ }
229
+ function O(e, t, n = "value") {
230
+ const a = e.encoding[n];
231
+ return A(
232
+ () => (r) => M(r, a ? e.format[a] : void 0, t),
233
+ [a, t, e.format]
234
+ );
235
+ }
236
+ function Ge({ join: e, panel: t, locale: n }) {
237
+ const a = T(), r = O(t, n), i = A(() => {
238
+ const d = [];
239
+ return J(t, e, (c) => (d.push(c), "")), j(d, t.encoding.value ? t.format[t.encoding.value] : void 0, n);
240
+ }, [e, n, t]), o = J(t, e, (d) => i.format(d)), l = Te(t, e);
241
+ return o.length === 0 ? null : /* @__PURE__ */ u("div", { className: "lens-print-formula", children: [
242
+ i.note && /* @__PURE__ */ s("p", { className: "lens-print-formula-unit", children: i.note }),
243
+ /* @__PURE__ */ s("ol", { className: "lens-print-flow", children: o.map((d, c) => /* @__PURE__ */ u(
244
+ "li",
245
+ {
246
+ className: "lens-print-flow-stage",
247
+ "data-result": d.role === "result" || void 0,
248
+ children: [
249
+ /* @__PURE__ */ s("span", { className: "lens-print-flow-op", children: d.operator }),
250
+ /* @__PURE__ */ u("span", { className: "lens-print-flow-label", children: [
251
+ d.stage.label,
252
+ d.stage.caption && /* @__PURE__ */ s("small", { children: d.stage.caption })
253
+ ] }),
254
+ /* @__PURE__ */ u("span", { className: "lens-print-flow-value", children: [
255
+ d.showDash ? "—" : d.text,
256
+ /* @__PURE__ */ s(E, { confidence: d.confidence, availability: d.availability })
257
+ ] })
258
+ ]
259
+ },
260
+ `${d.stage.key}-${c}`
261
+ )) }),
262
+ l !== void 0 && /* @__PURE__ */ s("p", { className: "lens-print-formula-note", children: a("flow.difference", "Difference: {delta}", { delta: r(l) }) })
263
+ ] });
264
+ }
265
+ function Qe({ join: e, panel: t, locale: n }) {
266
+ const a = T(), r = O(t, n), i = O(t, n, "share"), o = Pe(t, e, r, i);
267
+ return o.length === 0 ? null : /* @__PURE__ */ s("div", { className: "lens-print-formula", children: /* @__PURE__ */ s("ul", { className: "lens-print-hierarchy", children: o.map((l) => /* @__PURE__ */ u(
268
+ "li",
269
+ {
270
+ className: "lens-print-hierarchy-row",
271
+ "data-parent": l.isParent || void 0,
272
+ style: { "--lens-depth": l.depth },
273
+ children: [
274
+ /* @__PURE__ */ u("span", { className: "lens-print-hierarchy-label", children: [
275
+ l.row.label,
276
+ l.row.unallocated && /* @__PURE__ */ s("em", { children: a("hierarchy.unallocated", "Unallocated") }),
277
+ l.row.description && /* @__PURE__ */ s("small", { children: l.row.description })
278
+ ] }),
279
+ /* @__PURE__ */ u("span", { className: "lens-print-hierarchy-value", children: [
280
+ l.showDash ? "—" : l.valueText,
281
+ /* @__PURE__ */ s(E, { confidence: l.confidence, availability: l.availability })
282
+ ] }),
283
+ /* @__PURE__ */ s("span", { className: "lens-print-hierarchy-share", children: l.shareText ?? "" }),
284
+ l.reconcile && /* @__PURE__ */ s("span", { className: "lens-print-hierarchy-reconcile", children: l.reconcile.balanced ? a("hierarchy.allocated", "Allocated 100%") : a("hierarchy.difference", "Difference: {delta}", {
285
+ delta: r(l.reconcile.delta)
286
+ }) })
287
+ ]
288
+ },
289
+ l.row.key
290
+ )) }) });
291
+ }
292
+ function Je({ join: e, panel: t, locale: n }) {
293
+ const a = T(), r = O(t, n), i = t.metricRelationship;
294
+ if (!i) return null;
295
+ const o = Q(t, e, i.source, r), l = Q(t, e, i.target, r), d = Ce(i).horizontal;
296
+ return /* @__PURE__ */ u("div", { className: "lens-print-formula lens-print-relationship", children: [
297
+ /* @__PURE__ */ s("p", { className: "lens-print-relationship-claim", children: Ae(a, i, (o == null ? void 0 : o.end.label) ?? "", (l == null ? void 0 : l.end.label) ?? "") }),
298
+ /* @__PURE__ */ s("div", { className: "lens-print-relationship-ends", children: [o, l].map((c, p) => /* @__PURE__ */ u("div", { className: "lens-print-relationship-end", children: [
299
+ /* @__PURE__ */ s("span", { className: "lens-print-relationship-label", children: (c == null ? void 0 : c.end.label) ?? "—" }),
300
+ /* @__PURE__ */ u("span", { className: "lens-print-relationship-value", children: [
301
+ !c || c.showDash ? "—" : c.valueText,
302
+ /* @__PURE__ */ s(E, { confidence: c == null ? void 0 : c.confidence, availability: c == null ? void 0 : c.availability })
303
+ ] }),
304
+ p === 0 && /* @__PURE__ */ s("span", { "aria-hidden": "true", className: "lens-print-relationship-glyph", children: d })
305
+ ] }, (c == null ? void 0 : c.end.key) ?? p)) }),
306
+ /* @__PURE__ */ u("p", { className: "lens-print-formula-note", children: [
307
+ a(`relationship.type.${i.type}`, De[i.type]),
308
+ i.note ? ` · ${i.note}` : ""
309
+ ] })
310
+ ] });
311
+ }
312
+ function ie({ section: e }) {
313
+ const t = A(() => D(e), [e]), n = He(t, e), a = e.document.meta.locale;
314
+ return t.kind === "metric_relationship" ? /* @__PURE__ */ s(Je, { join: n, locale: a, panel: t }) : !n || n.kind !== "ok" ? null : t.kind === "metric_flow" ? /* @__PURE__ */ s(Ge, { join: n, locale: a, panel: t }) : t.kind === "metric_hierarchy" ? /* @__PURE__ */ s(Qe, { join: n, locale: a, panel: t }) : null;
315
+ }
316
+ function _(e, t, n) {
317
+ const a = C(t, e.encoding.label ?? e.encoding.category ?? e.encoding.id), r = C(t, e.encoding.value), i = C(t, e.encoding.series);
318
+ if (r < 0) return [];
319
+ const o = e.encoding.value ? e.format[e.encoding.value] : void 0, l = [];
320
+ return t.rows.forEach((d, c) => {
321
+ const p = q(d[r]);
322
+ p !== void 0 && l.push({
323
+ row: c,
324
+ group: i >= 0 ? R(d[i]) : "",
325
+ label: a >= 0 ? R(d[a]) : R(d[r]),
326
+ value: p,
327
+ formatted: M(d[r], o, n)
328
+ });
329
+ }), l;
330
+ }
331
+ function V(e, t) {
332
+ return new Intl.NumberFormat(e, {
333
+ style: "percent",
334
+ minimumFractionDigits: t >= 0.1 ? 0 : 1,
335
+ maximumFractionDigits: 1
336
+ }).format(t);
337
+ }
338
+ function Ye(e, t, n) {
339
+ const a = _(e, t, n).filter(({ value: p }) => p > 0);
340
+ if (a.length < 2) return;
341
+ const r = [...a].sort((p, h) => h.value - p.value)[0], i = a.filter(({ group: p }) => p === r.group);
342
+ if (i.length < 2) return;
343
+ const o = i.reduce((p, { value: h }) => p + h, 0);
344
+ if (o <= 0) return;
345
+ const l = [...i].sort((p, h) => h.value - p.value), d = l[0];
346
+ if (l.length === 2)
347
+ return {
348
+ labelKey: "print.factPair",
349
+ fallback: "{label} carries {share} of the total; the remainder is {rest}.",
350
+ vars: {
351
+ label: d.label,
352
+ share: V(n, d.value / o),
353
+ rest: l[1].label
354
+ }
355
+ };
356
+ const c = l.slice(0, 3).reduce((p, { value: h }) => p + h, 0);
357
+ return l.length === 3 ? {
358
+ labelKey: "print.factPartitionAll",
359
+ fallback: "{label} is the largest of the three at {share}; together they make the whole.",
360
+ vars: {
361
+ label: d.label,
362
+ share: V(n, d.value / o)
363
+ }
364
+ } : {
365
+ labelKey: "print.factPartition",
366
+ fallback: "{label} is the largest share at {share}; the three largest together make {top}, ahead of {rest} smaller categories.",
367
+ vars: {
368
+ label: d.label,
369
+ share: V(n, d.value / o),
370
+ top: V(n, c / o),
371
+ rest: l.length - 3
372
+ }
373
+ };
374
+ }
375
+ function Xe(e, t, n) {
376
+ var l;
377
+ const a = (l = e.radial) == null ? void 0 : l.max;
378
+ if (!a || a <= 0) return;
379
+ const i = _(e, t, n).reduce((d, { value: c }) => d + Math.max(0, c), 0);
380
+ if (i <= 0) return;
381
+ const o = e.encoding.value ? e.format[e.encoding.value] : void 0;
382
+ return {
383
+ labelKey: "print.factProgress",
384
+ fallback: "{value} of {max} — {share} covered.",
385
+ vars: {
386
+ value: M(i, o, n),
387
+ max: M(a, o, n),
388
+ share: V(n, Math.min(i / a, 1))
389
+ }
390
+ };
391
+ }
392
+ function Ze(e, t, n) {
393
+ const a = _(e, t, n);
394
+ if (a.length < 2) return;
395
+ const r = C(t, e.encoding.final), i = a[0], o = a.find(({ row: c }) => {
396
+ var p;
397
+ return r >= 0 && ((p = t.rows[c]) == null ? void 0 : p[r]) === !0;
398
+ }) ?? a[a.length - 1], l = a.filter((c) => c !== i && c !== o && c.value < 0).sort((c, p) => c.value - p.value)[0];
399
+ if (!l)
400
+ return {
401
+ labelKey: "print.factBridgeEnds",
402
+ fallback: "{start} becomes {end}.",
403
+ vars: { start: i.formatted, end: o.formatted }
404
+ };
405
+ const d = {
406
+ start: i.formatted,
407
+ end: o.formatted,
408
+ label: l.label,
409
+ amount: l.formatted
410
+ };
411
+ return i.value <= 0 ? {
412
+ labelKey: "print.factBridgeBare",
413
+ fallback: "{start} becomes {end}; the largest deduction is {label} at {amount}.",
414
+ vars: d
415
+ } : {
416
+ labelKey: "print.factBridge",
417
+ fallback: "{start} becomes {end}; the largest deduction is {label} at {amount} — {share} of the opening amount.",
418
+ vars: { ...d, share: V(n, Math.abs(l.value) / i.value) }
419
+ };
420
+ }
421
+ function et(e, t, n) {
422
+ const a = _(e, t, n);
423
+ if (a.length < 2) return;
424
+ const r = a[0], i = a[a.length - 1], o = [...a].sort((c, p) => p.value - c.value)[0], l = {
425
+ first: r.formatted,
426
+ firstLabel: r.label,
427
+ last: i.formatted,
428
+ lastLabel: i.label,
429
+ peak: o.formatted,
430
+ peakLabel: o.label
431
+ };
432
+ if (r.value === 0)
433
+ return {
434
+ labelKey: "print.factSeriesBare",
435
+ fallback: "{first} at {firstLabel}, {last} at {lastLabel}; the peak is {peak} at {peakLabel}.",
436
+ vars: l
437
+ };
438
+ const d = (i.value - r.value) / Math.abs(r.value);
439
+ return {
440
+ labelKey: "print.factSeries",
441
+ fallback: "{first} at {firstLabel} to {last} at {lastLabel} ({change}); the peak is {peak} at {peakLabel}.",
442
+ vars: { ...l, change: `${d >= 0 ? "+" : "−"}${V(n, Math.abs(d))}` }
443
+ };
444
+ }
445
+ function tt(e, t, n) {
446
+ if (t.rows.length < 2) return;
447
+ const r = [..._(e, t, n)].sort((i, o) => o.value - i.value)[0];
448
+ return r ? {
449
+ labelKey: "print.factTable",
450
+ fallback: "{rows} rows; the largest is {label} at {value}.",
451
+ vars: { rows: t.rows.length, label: r.label, value: r.formatted }
452
+ } : {
453
+ labelKey: "print.factRows",
454
+ fallback: "{rows} rows.",
455
+ vars: { rows: t.rows.length }
456
+ };
457
+ }
458
+ function nt(e, t, n = 4) {
459
+ var r;
460
+ const a = [];
461
+ for (const i of e) {
462
+ if (a.length >= n) break;
463
+ const { panel: o, frame: l } = i, d = o.encoding.value, c = d ? o.format[d] : void 0, p = l ? C(l, d) : -1, h = (l == null ? void 0 : l.rows.length) === 1 && p >= 0 ? (r = l.rows[0]) == null ? void 0 : r[p] : void 0, y = h !== void 0 ? M(h, c, t) : o.total !== void 0 ? M(o.total, c, t) : void 0;
464
+ y && a.push({ id: i.id, label: o.title, value: y });
465
+ }
466
+ return a.length >= 2 ? a : [];
467
+ }
468
+ function at(e, t, n) {
469
+ var a;
470
+ if (!(!t || t.rows.length === 0))
471
+ return ((a = e.radial) == null ? void 0 : a.mode) === "progress" ? Xe(e, t, n) : e.semantics === "partition" ? Ye(e, t, n) : e.semantics === "reconciliation" ? Ze(e, t, n) : e.semantics === "series" && (e.kind === "line" || e.kind === "area") ? et(e, t, n) : tt(e, t, n);
472
+ }
473
+ function rt(e) {
474
+ var n, a;
475
+ const t = [];
476
+ for (const r of e.panels) {
477
+ t.push(r);
478
+ for (const i of ((n = r.metricFlow) == null ? void 0 : n.stages) ?? []) t.push(i);
479
+ for (const i of ((a = r.metricHierarchy) == null ? void 0 : a.rows) ?? []) t.push(i);
480
+ r.metricRelationship && t.push(r.metricRelationship.source, r.metricRelationship.target);
481
+ }
482
+ return t;
483
+ }
484
+ const it = /* @__PURE__ */ new Set(["stat", "metric_relationship"]);
485
+ function st(e) {
486
+ return e.kind === "stat" || e.kind === "metric_relationship" || e.kind === "pie" || e.kind === "donut" || e.kind === "radial" ? "half" : "full";
487
+ }
488
+ function lt(e) {
489
+ return [...e.groups ?? []].reverse().find((t) => t.label || t.caption);
490
+ }
491
+ function ot(e, t, n) {
492
+ const a = t == null ? void 0 : t.trim();
493
+ return a || (e === 0 ? n : "");
494
+ }
495
+ function ct(e, t, n) {
496
+ const a = e.document, r = [], i = [], o = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set();
497
+ let d = 0;
498
+ const c = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map();
499
+ for (const m of e.sections) {
500
+ if (m.owner) {
501
+ const v = h.get(m.owner) ?? [];
502
+ v.push(m), h.set(m.owner, v);
503
+ continue;
504
+ }
505
+ const f = m.root ? c : p, g = f.get(m.panel.id) ?? [];
506
+ g.push(m), f.set(m.panel.id, g);
507
+ }
508
+ const y = (m, f) => {
509
+ const g = D(m), v = Be(m.frame);
510
+ if (!v)
511
+ return i.push(g.title), !1;
512
+ if (f === "owned") return !0;
513
+ const F = o.get(v);
514
+ return F !== void 0 && (f === "detail" || F === m.panel.id) ? !1 : (F === void 0 && o.set(v, m.panel.id), !0);
515
+ }, b = (m, f) => {
516
+ const g = r[r.length - 1];
517
+ if (!m && g) return g;
518
+ if (g && g.title === m)
519
+ return !g.caption && f && (g.caption = f), g;
520
+ const v = {
521
+ id: `chapter-${r.length + 1}`,
522
+ number: r.length + 1,
523
+ title: m,
524
+ ...f ? { caption: f } : {},
525
+ figures: [],
526
+ details: []
527
+ };
528
+ return r.push(v), v;
529
+ }, k = (m, f, g) => {
530
+ var L;
531
+ if (!y(f, "figure")) return;
532
+ const v = D(f), F = (((L = f.frame) == null ? void 0 : L.rows.length) ?? 0) <= 1, K = (h.get(f.panel.id) ?? []).filter((I) => y(I, "owned") ? (l.add(I), !0) : !1);
533
+ m.figures.push({
534
+ section: f,
535
+ number: `${m.number}.${m.figures.length + 1}`,
536
+ chart: ae.has(v.kind) && !F,
537
+ metric: F,
538
+ // A reading that prints its calculation needs the width to hold it; half
539
+ // a page beside another figure is where the two collide.
540
+ width: K.length > 0 ? "full" : F ? "half" : st(v),
541
+ ...g && (g.label || g.caption) ? { group: { id: g.id, ...g.label ? { label: g.label } : {}, ...g.caption ? { caption: g.caption } : {} } } : {},
542
+ // The opening chapter's single-value readings are the dashboard's
543
+ // headline; the cover carries them so page one is already informative.
544
+ kpi: m.number === 1 && F && it.has(v.kind) && d++ < 6,
545
+ breakdown: K
546
+ });
547
+ }, P = (m, f) => {
548
+ y(f, "detail") && m.details.push({
549
+ section: f,
550
+ number: `A${m.number}.${m.details.length + 1}`,
551
+ // The first segments of the trail repeat the appendix group's own title
552
+ // on every one of its nine details. What locates a detail is where it
553
+ // ends, not the path it shares with its neighbours.
554
+ trail: f.breadcrumb.filter((g, v, F) => g && g !== F[v - 1]).slice(-2).join(" › ")
555
+ });
556
+ }, N = (m, f, g) => {
557
+ for (const v of c.get(f) ?? [])
558
+ l.add(v), k(m, v, g);
559
+ for (const v of p.get(f) ?? [])
560
+ l.add(v), P(m, v);
561
+ };
562
+ for (const m of a.layout.rows) {
563
+ const f = ot(r.length, m.heading, t), g = m.panels.flatMap((F) => F.groups ?? []).map((F) => {
564
+ var K;
565
+ return (K = F.caption) == null ? void 0 : K.trim();
566
+ }).find((F) => !!F), v = b(f, g);
567
+ for (const F of m.panels) N(v, F.panelId, lt(F));
568
+ }
569
+ const S = e.sections.filter((m) => !l.has(m));
570
+ if (S.length > 0) {
571
+ const m = b(n, void 0);
572
+ for (const f of S)
573
+ f.root ? k(m, f) : P(m, f);
574
+ }
575
+ const w = r.flatMap((m) => m.figures.filter(({ kpi: f }) => f)), $ = r.map((m) => ({ ...m, figures: m.figures.filter(({ kpi: f }) => !f) })).filter((m) => m.figures.length > 0 || m.details.length > 0);
576
+ $.forEach((m, f) => {
577
+ m.number = f + 1, m.figures.forEach((g, v) => {
578
+ g.number = `${m.number}.${v + 1}`;
579
+ }), m.details.forEach((g, v) => {
580
+ g.number = `A${m.number}.${v + 1}`;
581
+ });
582
+ });
583
+ const x = [...w, ...$.flatMap((m) => m.figures)].filter(({ section: m }) => {
584
+ const f = D(m), g = B(f);
585
+ return g !== void 0 && g.value !== "verified";
586
+ });
587
+ return {
588
+ chapters: $,
589
+ appendix: $.filter((m) => m.details.length > 0),
590
+ kpis: w,
591
+ notes: dt(a),
592
+ missing: i,
593
+ estimated: x.length,
594
+ qualities: rt(a),
595
+ figureCount: $.reduce((m, f) => m + f.figures.length, 0),
596
+ detailCount: $.reduce((m, f) => m + f.details.length, 0)
597
+ };
598
+ }
599
+ function dt(e) {
600
+ var r, i, o;
601
+ const t = [], n = /* @__PURE__ */ new Set(), a = (l, d) => {
602
+ const c = `${l}::${d ?? ""}`;
603
+ !l.trim() || n.has(c) || (n.add(c), t.push({ id: `note-${t.length + 1}`, label: l, ...d ? { detail: d } : {} }));
604
+ };
605
+ for (const l of e.panels) {
606
+ (r = l.status) != null && r.label && a(l.title, l.status.label), (i = l.metricRelationship) != null && i.note && a(l.title, l.metricRelationship.note);
607
+ for (const d of ((o = l.metricFlow) == null ? void 0 : o.stages) ?? [])
608
+ d.caption && a(`${l.title} · ${d.label}`, d.caption);
609
+ }
610
+ return t;
611
+ }
612
+ function ut(e) {
613
+ const t = e.document.theme, n = Object.values(t.palette).filter((i) => i.trim() !== ""), a = /* @__PURE__ */ new Map();
614
+ if (n.length === 0) return a;
615
+ let r = 0;
616
+ for (const i of e.sections)
617
+ for (const o of mt(i)) {
618
+ if (!o || a.has(o)) continue;
619
+ const l = t.series[o];
620
+ if (l) {
621
+ a.set(o, t.palette[l] ?? l);
622
+ continue;
623
+ }
624
+ a.set(o, n[r % n.length]), r += 1;
625
+ }
626
+ return a;
627
+ }
628
+ function mt(e) {
629
+ const t = e.frame;
630
+ if (!t) return [];
631
+ const n = D(e), a = C(t, n.encoding.label ?? n.encoding.category ?? n.encoding.id);
632
+ return a < 0 ? [] : t.rows.map((r) => R(r[a]).trim());
633
+ }
634
+ function pt(e, t) {
635
+ if (t.size === 0) return e;
636
+ const n = {};
637
+ for (const [a, r] of Object.entries(e.series))
638
+ a.includes(":") || (n[a] = r);
639
+ for (const [a, r] of t) n[a] = r;
640
+ return { ...e, series: n };
641
+ }
642
+ const se = pe(/* @__PURE__ */ new Map());
643
+ function le(e) {
644
+ const t = he(se);
645
+ return A(() => pt(e.document.theme, t), [t, e.document.theme]);
646
+ }
647
+ function ht(e, t, n) {
648
+ var $;
649
+ const a = e.frame;
650
+ if (!a) return { rows: [] };
651
+ const r = D(e), i = C(a, r.encoding.label ?? r.encoding.category ?? r.encoding.id), o = C(a, r.encoding.value), l = C(a, r.encoding.series), d = C(a, r.encoding.id), c = r.encoding.value, p = c ? r.format[c] : void 0, h = a.rows.map((x) => q(x[o])), y = /* @__PURE__ */ new Map(), b = r.encoding.series ? r.format[r.encoding.series] : void 0;
652
+ a.rows.forEach((x, m) => {
653
+ const f = l >= 0 ? R(x[l]) : "", g = h[m];
654
+ g !== void 0 && g >= 0 && y.set(f, (y.get(f) ?? 0) + g);
655
+ });
656
+ for (const x of (($ = r.radial) == null ? void 0 : $.mode) === "partition" ? r.radial.rings ?? [] : [])
657
+ y.has(x.key) && y.set(x.key, x.total);
658
+ const k = r.semantics === "reconciliation" && C(a, r.encoding.cut) >= 0, P = C(a, r.encoding.final), N = (x, m) => {
659
+ const f = o >= 0 ? x[o] : void 0;
660
+ if (!k || m === 0 || P >= 0 && x[P] === !0) return f;
661
+ const g = h[m], v = h[m - 1];
662
+ return g === void 0 || v === void 0 ? f : g - v;
663
+ }, S = Se(n, r, { positional: e.root, labels: Me(a, r) }), w = j(a.rows.map((x, m) => N(x, m)), p, t);
664
+ return { unit: w.note, rows: a.rows.map((x, m) => {
665
+ var I, H;
666
+ const f = N(x, m), g = h[m], v = l >= 0 ? R(x[l]) : "", F = ((I = r.radial) == null ? void 0 : I.mode) === "progress" ? r.radial.max : y.get(v), K = (r.semantics === "partition" || ((H = r.radial) == null ? void 0 : H.mode) === "progress") && g !== void 0 && g >= 0 && F && F > 0 ? g / F : void 0, L = i >= 0 ? R(x[i]) : R(x[d]);
667
+ return {
668
+ key: `${v}:${d >= 0 ? R(x[d]) : m}`,
669
+ ...v && b ? { series: M(x[l], b, t) } : {},
670
+ label: L,
671
+ value: o >= 0 ? w.format(f) : "—",
672
+ exact: o >= 0 ? ne(f, p, t) : void 0,
673
+ ...K === void 0 ? {} : {
674
+ ratio: K,
675
+ // A row worth 1.5 million printed as «0,0 %» reads as nothing at all.
676
+ // Below the resolution of the column, the share says it is below it.
677
+ share: K > 0 && K < 1e-3 ? `< ${new Intl.NumberFormat(t, { style: "percent", minimumFractionDigits: 1 }).format(1e-3)}` : new Intl.NumberFormat(t, {
678
+ style: "percent",
679
+ minimumFractionDigits: 1,
680
+ maximumFractionDigits: 1
681
+ }).format(K)
682
+ },
683
+ color: S(L, m)
684
+ };
685
+ }) };
686
+ }
687
+ function oe({ section: e, height: t }) {
688
+ var l;
689
+ const n = A(() => D(e), [e]), a = le(e), r = G(
690
+ (d, c) => M(c, n.format[d], e.document.meta.locale),
691
+ [n.format, e.document.meta.locale]
692
+ ), i = G(
693
+ (d, c) => $e(c, n.format[d], e.document.meta.locale),
694
+ [n.format, e.document.meta.locale]
695
+ );
696
+ if (!e.frame || e.frame.rows.length <= 1 || !ae.has(n.kind)) return null;
697
+ const o = n.kind === "pie" || n.kind === "donut" || n.kind === "radial" ? {
698
+ ...n.presentation,
699
+ sliceLabels: ((l = n.presentation) == null ? void 0 : l.sliceLabels) ?? "percent",
700
+ // A wider band on paper: the share is written inside the ring, and a
701
+ // thin ring cannot hold five characters.
702
+ fill: !0
703
+ } : n.presentation;
704
+ return /* @__PURE__ */ s("div", { className: "lens-print-chart", style: { height: t }, children: /* @__PURE__ */ s(
705
+ ke,
706
+ {
707
+ input: {
708
+ kind: n.kind,
709
+ frame: e.frame,
710
+ encoding: n.encoding,
711
+ format: r,
712
+ formatAxis: i,
713
+ locale: e.document.meta.locale,
714
+ theme: a,
715
+ presentation: o,
716
+ radial: n.radial
717
+ },
718
+ label: n.title,
719
+ panelId: `print:${e.id}`
720
+ }
721
+ ) });
722
+ }
723
+ function ce(e) {
724
+ const t = D(e), n = e.document.meta.locale;
725
+ return A(() => {
726
+ if (!e.frame) return;
727
+ const a = t.encoding.value ?? "value", r = t.encoding.cut ?? "cut", i = (l) => M(l, t.format[a], n), o = (l) => M(
728
+ l,
729
+ t.format[r] ?? t.format[a],
730
+ n
731
+ );
732
+ return ve(ye(t, e.frame, i, o), i);
733
+ }, [n, t, e.frame]);
734
+ }
735
+ function ft({ section: e }) {
736
+ const t = T(), n = D(e), a = ce(e), r = e.document.meta.locale, i = A(() => {
737
+ if (!a) return;
738
+ const l = a.ticks.length > 5 ? a.ticks.filter((c, p) => p % 2 === 0) : a.ticks, d = new Intl.NumberFormat(r, { notation: "compact", maximumFractionDigits: 1 });
739
+ return {
740
+ ...a,
741
+ ticks: l.map((c, p) => p === 0 ? c : { ...c, label: d.format(c.value) })
742
+ };
743
+ }, [r, a]), o = A(
744
+ () => Array.from(new Set(((i == null ? void 0 : i.items) ?? []).map((l) => l.tone).filter(Boolean))),
745
+ [i]
746
+ );
747
+ return !i || i.items.length === 0 ? null : /* @__PURE__ */ u("div", { className: "lens-print-chart lens-print-chart-waterfall", children: [
748
+ /* @__PURE__ */ s(be, { label: n.title, model: i, splitCallout: "always" }),
749
+ o.length > 1 && /* @__PURE__ */ s("p", { className: "lens-print-tone-key", children: o.map((l) => /* @__PURE__ */ u("span", { children: [
750
+ /* @__PURE__ */ s("i", { "aria-hidden": "true", "data-tone": l }),
751
+ l === "positive" ? t("print.toneFavourable", "favourable") : l === "negative" ? t("print.toneAdverse", "adverse") : t("print.toneNeutral", "neutral")
752
+ ] }, l)) })
753
+ ] });
754
+ }
755
+ function gt({ section: e }) {
756
+ const t = T(), n = D(e), a = ce(e), r = A(
757
+ () => j(
758
+ ((a == null ? void 0 : a.items) ?? []).map((i) => i.value),
759
+ n.encoding.value ? n.format[n.encoding.value] : void 0,
760
+ e.document.meta.locale
761
+ ),
762
+ [a, n, e.document.meta.locale]
763
+ );
764
+ return !a || a.items.length === 0 ? null : /* @__PURE__ */ u("table", { className: "lens-print-data", children: [
765
+ /* @__PURE__ */ s("thead", { children: /* @__PURE__ */ u("tr", { children: [
766
+ /* @__PURE__ */ s("th", { children: t("print.stage", "Stage") }),
767
+ /* @__PURE__ */ u("th", { "data-align": "right", children: [
768
+ t("print.value", "Value"),
769
+ r.note && /* @__PURE__ */ s("small", { children: r.note })
770
+ ] })
771
+ ] }) }),
772
+ /* @__PURE__ */ s("tbody", { children: a.items.map((i, o) => /* @__PURE__ */ u(fe, { children: [
773
+ /* @__PURE__ */ u("tr", { "data-role": i.kind, children: [
774
+ /* @__PURE__ */ s("td", { children: i.label }),
775
+ /* @__PURE__ */ s("td", { "data-align": "right", children: r.format(i.value) })
776
+ ] }),
777
+ i.formattedSplit && /* @__PURE__ */ u("tr", { "data-role": "split", children: [
778
+ /* @__PURE__ */ s("td", { children: i.splitLabel || t("print.splitPart", "of which") }),
779
+ /* @__PURE__ */ s("td", { "data-align": "right", children: i.formattedSplit })
780
+ ] })
781
+ ] }, `${i.label}:${o}`)) })
782
+ ] });
783
+ }
784
+ function bt(e, t) {
785
+ return e.kind === "cascade" && !!t.frame && C(t.frame, e.encoding.cut) >= 0;
786
+ }
787
+ function z({ section: e, dense: t, exact: n }) {
788
+ var d;
789
+ const a = T(), r = le(e), i = A(
790
+ () => ht(e, e.document.meta.locale, r),
791
+ [e, r]
792
+ );
793
+ if (!e.frame) return /* @__PURE__ */ s("p", { className: "lens-print-empty", children: a("print.noData", "No data") });
794
+ const o = D(e);
795
+ if (o.kind === "table" && ((d = o.columns) != null && d.length)) {
796
+ const c = e.frame, p = o.columns, h = p.map(({ field: N }) => C(c, N)), y = e.document.meta.locale, b = p.map((N, S) => {
797
+ const w = h[S];
798
+ return j(
799
+ w >= 0 ? c.rows.map(($) => $[w]) : [],
800
+ o.format[N.field],
801
+ y
802
+ );
803
+ }), k = p.map((N) => {
804
+ var w;
805
+ if (N.align) return N.align;
806
+ const S = (w = o.format[N.field]) == null ? void 0 : w.kind;
807
+ return S === "money" || S === "number" || S === "percent" ? "right" : "left";
808
+ }), P = /* @__PURE__ */ new Map();
809
+ return p.forEach((N, S) => {
810
+ if (N.cell.kind !== "bar") return;
811
+ const w = h[S];
812
+ w < 0 || P.set(N.field, c.rows.reduce(($, x) => {
813
+ const m = q(x[w]);
814
+ return m === void 0 ? $ : Math.max($, Math.abs(m));
815
+ }, 0));
816
+ }), /* @__PURE__ */ u("table", { className: "lens-print-data lens-print-data-wide", children: [
817
+ /* @__PURE__ */ s("thead", { children: /* @__PURE__ */ s("tr", { children: p.map((N, S) => {
818
+ var w, $;
819
+ return /* @__PURE__ */ u("th", { "data-align": k[S], children: [
820
+ N.label,
821
+ ((w = b[S]) == null ? void 0 : w.note) && /* @__PURE__ */ s("small", { children: ($ = b[S]) == null ? void 0 : $.note })
822
+ ] }, N.field);
823
+ }) }) }),
824
+ /* @__PURE__ */ s("tbody", { children: c.rows.map((N, S) => /* @__PURE__ */ s("tr", { children: p.map((w, $) => {
825
+ const x = h[$] >= 0 ? N[h[$]] : void 0, m = b[$].format(x), f = n ? ne(x, o.format[w.field], y) : void 0, g = q(x), v = R(N[C(c, w.cell.toneField)]), F = P.get(w.field), K = C(c, w.cell.secondaryField), L = K >= 0 ? q(N[K]) : void 0;
826
+ return /* @__PURE__ */ u(
827
+ "td",
828
+ {
829
+ "data-align": k[$],
830
+ "data-negative": g !== void 0 && g < 0 ? "" : void 0,
831
+ "data-tone": v === "pos" || v === "warn" || v === "neg" ? v : void 0,
832
+ children: [
833
+ m,
834
+ L !== void 0 && /* @__PURE__ */ s("em", { className: "lens-print-cell-secondary", "data-negative": L < 0 ? "" : void 0, children: te(L) ?? `${L > 0 ? "+" : ""}${M(
835
+ N[K],
836
+ w.cell.secondaryField ? o.format[w.cell.secondaryField] : void 0,
837
+ y
838
+ )}` }),
839
+ F !== void 0 && F > 0 && g !== void 0 && /* @__PURE__ */ s(
840
+ "span",
841
+ {
842
+ "aria-hidden": "true",
843
+ className: "lens-print-cell-bar",
844
+ "data-negative": g < 0 ? "" : void 0,
845
+ style: { width: `${Math.min(100, Math.round(Math.abs(g) / F * 100))}%` }
846
+ }
847
+ ),
848
+ f && f !== m && /* @__PURE__ */ s("small", { children: f })
849
+ ]
850
+ },
851
+ w.field
852
+ );
853
+ }) }, S)) })
854
+ ] });
855
+ }
856
+ const l = i.rows.some(({ share: c }) => c !== void 0);
857
+ return /* @__PURE__ */ u("table", { className: `lens-print-data${t ? " lens-print-data-dense" : ""}`, children: [
858
+ /* @__PURE__ */ s("thead", { children: /* @__PURE__ */ u("tr", { children: [
859
+ /* @__PURE__ */ s("th", { children: a("print.category", "Category") }),
860
+ /* @__PURE__ */ u("th", { "data-align": "right", children: [
861
+ a("print.value", "Value"),
862
+ i.unit && /* @__PURE__ */ s("small", { children: i.unit })
863
+ ] }),
864
+ l && /* @__PURE__ */ s("th", { "data-align": "right", children: a("print.share", "Share") })
865
+ ] }) }),
866
+ /* @__PURE__ */ s("tbody", { children: i.rows.map((c) => /* @__PURE__ */ u("tr", { children: [
867
+ /* @__PURE__ */ u("td", { children: [
868
+ /* @__PURE__ */ s("span", { className: "lens-print-swatch", style: { backgroundColor: c.color } }),
869
+ c.series && /* @__PURE__ */ u("span", { className: "lens-print-series", children: [
870
+ c.series,
871
+ " · "
872
+ ] }),
873
+ c.label
874
+ ] }),
875
+ /* @__PURE__ */ u("td", { "data-align": "right", children: [
876
+ c.value,
877
+ n && c.exact && c.exact !== c.value && /* @__PURE__ */ s("small", { children: c.exact })
878
+ ] }),
879
+ l && /* @__PURE__ */ u("td", { className: "lens-print-share", "data-align": "right", children: [
880
+ c.ratio !== void 0 && /* @__PURE__ */ s(
881
+ "span",
882
+ {
883
+ "aria-hidden": "true",
884
+ className: "lens-print-share-bar",
885
+ style: { width: `${Math.min(100, Math.round(c.ratio * 100))}%` }
886
+ }
887
+ ),
888
+ /* @__PURE__ */ s("span", { children: c.share ?? "—" })
889
+ ] })
890
+ ] }, c.key)) })
891
+ ] });
892
+ }
893
+ function de({ section: e }) {
894
+ const t = T();
895
+ return !e.hasMore || !e.frame ? null : /* @__PURE__ */ s("p", { className: "lens-print-truncated", children: t("print.truncated", "First {rows} rows shown; the level continues in the dashboard.", {
896
+ rows: e.frame.rows.length
897
+ }) });
898
+ }
899
+ function vt({ section: e }) {
900
+ var i;
901
+ const t = T(), n = D(e), a = (i = n.caption) == null ? void 0 : i.trim(), r = A(
902
+ () => at(n, e.frame, e.document.meta.locale),
903
+ [n, e.document.meta.locale, e.frame]
904
+ );
905
+ return !a && !r ? null : /* @__PURE__ */ u("p", { className: "lens-print-figure-note", children: [
906
+ a && /* @__PURE__ */ s("span", { className: "lens-print-figure-authored", children: a }),
907
+ r && /* @__PURE__ */ s("span", { children: t(r.labelKey, r.fallback, r.vars) })
908
+ ] });
909
+ }
910
+ function ue({ footnotes: e }) {
911
+ return !e || e.markers.length === 0 ? null : /* @__PURE__ */ s("sup", { className: "lens-print-footnote-marker", children: e.markers.join(", ") });
912
+ }
913
+ function X({ footnotes: e }) {
914
+ return !e || e.notes.length === 0 ? null : /* @__PURE__ */ s("ol", { className: "lens-print-footnotes", children: e.notes.map((t) => (
915
+ // The number is drawn rather than left to the list marker: a marker is
916
+ // the one glyph a print engine feels free to drop, and a note nobody
917
+ // can tie back to its figure is a note nobody reads.
918
+ /* @__PURE__ */ u("li", { value: t.number, children: [
919
+ /* @__PURE__ */ s("span", { className: "lens-print-footnote-index", children: t.number }),
920
+ t.text
921
+ ] }, t.number)
922
+ )) });
923
+ }
924
+ const W = 8;
925
+ function Z({ sections: e }) {
926
+ const t = T();
927
+ return e.length === 0 ? null : /* @__PURE__ */ u("div", { className: "lens-print-breakdown", children: [
928
+ /* @__PURE__ */ s("p", { className: "lens-print-breakdown-head", children: t("print.breakdown", "How it is calculated") }),
929
+ e.map((n) => {
930
+ var h, y, b, k, P, N;
931
+ const a = D(n), r = n.frame, i = a.kind === "table" && ((h = a.columns) != null && h.length) ? a.columns.length : (r == null ? void 0 : r.columns.length) ?? 0;
932
+ if (r && i <= 1) return null;
933
+ if (re.has(a.kind))
934
+ return /* @__PURE__ */ s(ie, { section: n }, n.id);
935
+ const o = r ? C(r, a.encoding.value) : -1;
936
+ if (r && r.rows.length === 1 && o >= 0)
937
+ return /* @__PURE__ */ u("p", { className: "lens-print-breakdown-term", children: [
938
+ /* @__PURE__ */ s("span", { children: a.title }),
939
+ /* @__PURE__ */ s("span", { children: M(
940
+ (y = r.rows[0]) == null ? void 0 : y[o],
941
+ a.encoding.value ? a.format[a.encoding.value] : void 0,
942
+ n.document.meta.locale
943
+ ) })
944
+ ] }, n.id);
945
+ const l = r && r.rows.length > W, d = l && r ? { ...n, frame: { ...r, rows: r.rows.slice(0, W) } } : n, c = ((b = n.perspective) == null ? void 0 : b.label.trim()) || a.title, p = ((N = (P = (k = a.columns) == null ? void 0 : k[0]) == null ? void 0 : P.label) == null ? void 0 : N.trim().toLowerCase()) === c.trim().toLowerCase();
946
+ return /* @__PURE__ */ u("div", { className: "lens-print-breakdown-part", children: [
947
+ !p && /* @__PURE__ */ s("p", { className: "lens-print-breakdown-title", children: c }),
948
+ /* @__PURE__ */ s(z, { dense: !0, section: d }),
949
+ l && r && // Here the whole term is in hand, so the reader is told what
950
+ // share of it the page keeps rather than merely that it was cut.
951
+ /* @__PURE__ */ s("p", { className: "lens-print-truncated", children: t("print.truncatedOf", "{rows} of {total} rows shown.", {
952
+ rows: W,
953
+ total: r.rows.length
954
+ }) })
955
+ ] }, n.id);
956
+ })
957
+ ] });
958
+ }
959
+ function yt({ figure: e, footnotes: t }) {
960
+ var d;
961
+ const n = T(), { section: a } = e, r = D(a), i = bt(r, a), o = re.has(r.kind);
962
+ if (e.metric)
963
+ return /* @__PURE__ */ u("figure", { className: `lens-print-figure lens-print-figure-${e.width} lens-print-figure-metric`, children: [
964
+ /* @__PURE__ */ s(me, { figure: e, footnotes: t, numbered: !0 }),
965
+ /* @__PURE__ */ s(Z, { sections: e.breakdown }),
966
+ /* @__PURE__ */ s(X, { footnotes: t })
967
+ ] });
968
+ const l = r.total !== void 0 && r.encoding.value ? M(r.total, r.format[r.encoding.value], a.document.meta.locale) : void 0;
969
+ return /* @__PURE__ */ u("figure", { className: `lens-print-figure lens-print-figure-${i || o ? "full" : e.width}`, children: [
970
+ /* @__PURE__ */ u("figcaption", { className: "lens-print-figure-head", children: [
971
+ /* @__PURE__ */ u("p", { className: "lens-print-figure-title", children: [
972
+ /* @__PURE__ */ s("span", { className: "lens-print-figure-number", children: n("print.figure", "Fig. {number}", { number: e.number }) }),
973
+ /* @__PURE__ */ u("h3", { children: [
974
+ r.title,
975
+ /* @__PURE__ */ s(ue, { footnotes: t })
976
+ ] })
977
+ ] }),
978
+ /* @__PURE__ */ u("p", { className: "lens-print-figure-meta", children: [
979
+ ((d = r.status) == null ? void 0 : d.label) && /* @__PURE__ */ s("span", { className: "lens-print-chip", "data-tone": r.status.tone ?? "neutral", children: r.status.label }),
980
+ /* @__PURE__ */ s(E, { availability: r.availability, confidence: r.confidence }),
981
+ a.perspective && /* @__PURE__ */ u("span", { className: "lens-print-chip", "data-tone": "neutral", children: [
982
+ n("print.view", "View"),
983
+ ": ",
984
+ a.perspective.label
985
+ ] }),
986
+ l && /* @__PURE__ */ u("span", { className: "lens-print-figure-total", children: [
987
+ n("print.total", "Total"),
988
+ ": ",
989
+ l
990
+ ] })
991
+ ] })
992
+ ] }),
993
+ o ? /* @__PURE__ */ s(ie, { section: a }) : i ? /* @__PURE__ */ s(ft, { section: a }) : e.chart && /* @__PURE__ */ s(oe, { height: e.width === "half" ? 225 : 235, section: a }),
994
+ /* @__PURE__ */ s(vt, { section: a }),
995
+ !o && (i ? /* @__PURE__ */ s(gt, { section: a }) : /* @__PURE__ */ s(z, { section: a })),
996
+ /* @__PURE__ */ s(de, { section: a }),
997
+ /* @__PURE__ */ s(Z, { sections: e.breakdown }),
998
+ /* @__PURE__ */ s(X, { footnotes: t })
999
+ ] });
1000
+ }
1001
+ function kt({ values: e }) {
1002
+ const t = e.filter((l) => Number.isFinite(l));
1003
+ if (t.length < 2) return null;
1004
+ const n = Math.min(...t), r = Math.max(...t) - n || 1, i = 100 / (t.length - 1), o = t.map((l, d) => `${(d * i).toFixed(2)},${(24 - (l - n) / r * 22).toFixed(2)}`).join(" ");
1005
+ return /* @__PURE__ */ s("svg", { "aria-hidden": "true", className: "lens-print-sparkline", preserveAspectRatio: "none", viewBox: "0 0 100 26", children: /* @__PURE__ */ s("polyline", { fill: "none", points: o, strokeLinecap: "round", strokeLinejoin: "round" }) });
1006
+ }
1007
+ function me({ figure: e, footnotes: t, numbered: n }) {
1008
+ var N, S, w;
1009
+ const a = T(), { section: r } = e, i = D(r), o = r.document.meta.locale, l = r.frame, d = l ? C(l, i.encoding.value) : -1, c = l && d >= 0 ? (N = l.rows[0]) == null ? void 0 : N[d] : void 0, p = i.encoding.value ? i.format[i.encoding.value] : void 0, h = l ? C(l, i.encoding.final) : -1, y = l && h >= 0 ? (S = l.rows[0]) == null ? void 0 : S[h] : void 0, b = q(y), k = i.encoding.final ? i.format[i.encoding.final] : p, P = i.target;
1010
+ return /* @__PURE__ */ u("div", { className: "lens-print-kpi", children: [
1011
+ /* @__PURE__ */ u("p", { className: "lens-print-kpi-label", children: [
1012
+ n && /* @__PURE__ */ s("span", { className: "lens-print-figure-number", children: a("print.figure", "Fig. {number}", { number: e.number }) }),
1013
+ i.title,
1014
+ /* @__PURE__ */ s(ue, { footnotes: t })
1015
+ ] }),
1016
+ /* @__PURE__ */ u("p", { className: "lens-print-kpi-value", children: [
1017
+ M(c, p, o),
1018
+ b !== void 0 && /* @__PURE__ */ u("span", { className: "lens-print-kpi-delta", "data-negative": b < 0 ? "" : void 0, children: [
1019
+ b > 0 ? "+" : "",
1020
+ M(y, k, o)
1021
+ ] })
1022
+ ] }),
1023
+ i.sparkline && /* @__PURE__ */ s(kt, { values: i.sparkline.values }),
1024
+ i.trend && /* @__PURE__ */ u("p", { className: "lens-print-kpi-trend", "data-negative": i.trend.percent < 0 ? "" : void 0, children: [
1025
+ i.trend.percent > 0 ? "+" : "",
1026
+ te(i.trend.percent) ?? `${new Intl.NumberFormat(o, { maximumFractionDigits: 1 }).format(i.trend.percent)}%`,
1027
+ i.trend.label ? ` ${i.trend.label}` : ""
1028
+ ] }),
1029
+ P && /* @__PURE__ */ u("p", { className: "lens-print-kpi-target", children: [
1030
+ a("print.target", "Target"),
1031
+ ": ",
1032
+ M(P.value, p, o),
1033
+ P.label ? ` · ${P.label}` : ""
1034
+ ] }),
1035
+ i.caption && /* @__PURE__ */ s("p", { className: "lens-print-kpi-caption", children: i.caption }),
1036
+ /* @__PURE__ */ u("p", { className: "lens-print-kpi-chips", children: [
1037
+ ((w = i.status) == null ? void 0 : w.label) && /* @__PURE__ */ s("span", { className: "lens-print-chip", "data-tone": i.status.tone ?? "neutral", children: i.status.label }),
1038
+ /* @__PURE__ */ s(E, { availability: i.availability, confidence: i.confidence })
1039
+ ] })
1040
+ ] });
1041
+ }
1042
+ function Nt(e, t) {
1043
+ var o, l;
1044
+ const n = (l = (o = e.filters) == null ? void 0 : o.find((d) => d.kind === "period")) == null ? void 0 : l.period;
1045
+ if (!n) return;
1046
+ const { start: a, end: r } = n.value;
1047
+ if (!a && !r) return t;
1048
+ const i = (d) => {
1049
+ const c = new Date(d);
1050
+ return Number.isNaN(c.getTime()) ? d : new Intl.DateTimeFormat(e.meta.locale, { dateStyle: "medium" }).format(c);
1051
+ };
1052
+ return a && r ? `${i(a)} — ${i(r)}` : i(a || r);
1053
+ }
1054
+ function wt({
1055
+ document: e,
1056
+ outline: t,
1057
+ report: n
1058
+ }) {
1059
+ var o, l;
1060
+ const a = T(), r = t.kpis, i = Nt(e, a("filter.period.allTime", "All time"));
1061
+ return /* @__PURE__ */ u("header", { className: "lens-print-cover", children: [
1062
+ /* @__PURE__ */ u("div", { className: "lens-print-cover-head", children: [
1063
+ /* @__PURE__ */ s("p", { className: "lens-print-kicker", children: a("print.kicker", "Management audit report") }),
1064
+ /* @__PURE__ */ s("h1", { children: ((o = e.header) == null ? void 0 : o.title) || e.meta.title }),
1065
+ ((l = e.header) == null ? void 0 : l.subtitle) && /* @__PURE__ */ s("p", { className: "lens-print-cover-subtitle", children: e.header.subtitle })
1066
+ ] }),
1067
+ /* @__PURE__ */ u("dl", { className: "lens-print-cover-meta", children: [
1068
+ i && /* @__PURE__ */ u("div", { children: [
1069
+ /* @__PURE__ */ s("dt", { children: a("print.period", "Period") }),
1070
+ /* @__PURE__ */ s("dd", { children: i })
1071
+ ] }),
1072
+ /* @__PURE__ */ u("div", { children: [
1073
+ /* @__PURE__ */ s("dt", { children: a("print.generated", "Generated") }),
1074
+ /* @__PURE__ */ s("dd", { children: new Intl.DateTimeFormat(e.meta.locale, {
1075
+ dateStyle: "long",
1076
+ timeStyle: "short"
1077
+ }).format(new Date(e.meta.generatedAt)) })
1078
+ ] }),
1079
+ /* @__PURE__ */ u("div", { children: [
1080
+ /* @__PURE__ */ s("dt", { children: a("print.sections", "Detailed views") }),
1081
+ /* @__PURE__ */ s("dd", { children: t.figureCount + t.detailCount })
1082
+ ] }),
1083
+ (t.estimated > 0 || t.missing.length > 0) && /* @__PURE__ */ u("div", { children: [
1084
+ /* @__PURE__ */ s("dt", { children: a("print.quality", "Data quality") }),
1085
+ /* @__PURE__ */ s("dd", { children: a("print.qualityCount", "{estimated} estimated · {missing} not calculated", {
1086
+ estimated: t.estimated,
1087
+ missing: t.missing.length
1088
+ }) })
1089
+ ] })
1090
+ ] }),
1091
+ r.length > 0 && /* @__PURE__ */ s("div", { className: "lens-print-kpis", children: r.map((d) => /* @__PURE__ */ s(me, { figure: d }, d.section.id)) }),
1092
+ (n.truncated || n.warnings.length > 0 || t.missing.length > 0) && /* @__PURE__ */ s("p", { className: "lens-print-cover-flag", children: a(
1093
+ "print.limitationsFlag",
1094
+ "This report discloses gaps in its data; see the closing appendix."
1095
+ ) })
1096
+ ] });
1097
+ }
1098
+ function xt({ outline: e }) {
1099
+ const t = T();
1100
+ return /* @__PURE__ */ u("section", { className: "lens-print-contents", children: [
1101
+ /* @__PURE__ */ s("h2", { children: t("print.contents", "Contents") }),
1102
+ /* @__PURE__ */ u("ol", { children: [
1103
+ e.chapters.filter(({ figures: n }) => n.length > 0).map((n) => /* @__PURE__ */ u("li", { children: [
1104
+ /* @__PURE__ */ s("span", { className: "lens-print-contents-number", children: n.number }),
1105
+ /* @__PURE__ */ s("span", { className: "lens-print-contents-title", children: n.title }),
1106
+ n.caption && /* @__PURE__ */ s("span", { className: "lens-print-contents-caption", children: n.caption })
1107
+ ] }, n.id)),
1108
+ e.appendix.length > 0 && /* @__PURE__ */ u("li", { children: [
1109
+ /* @__PURE__ */ s("span", { className: "lens-print-contents-number", children: "A" }),
1110
+ /* @__PURE__ */ s("span", { className: "lens-print-contents-title", children: t("print.appendix", "Appendix A. Detailed breakdowns") })
1111
+ ] }),
1112
+ /* @__PURE__ */ u("li", { children: [
1113
+ /* @__PURE__ */ s("span", { className: "lens-print-contents-number", children: "B" }),
1114
+ /* @__PURE__ */ s("span", { className: "lens-print-contents-title", children: t("print.method", "Appendix B. Sources and definitions") })
1115
+ ] })
1116
+ ] }),
1117
+ /* @__PURE__ */ s("p", { className: "lens-print-contents-note", children: t(
1118
+ "print.note",
1119
+ "Every interactive view is expanded below. Values and shares accompany each chart so the report remains self-contained on paper."
1120
+ ) })
1121
+ ] });
1122
+ }
1123
+ function Ft({ chapter: e, title: t }) {
1124
+ const n = T(), a = A(
1125
+ () => {
1126
+ var b;
1127
+ return nt(
1128
+ e.figures.map((k) => ({
1129
+ id: k.section.id,
1130
+ panel: D(k.section),
1131
+ frame: k.section.frame
1132
+ })),
1133
+ ((b = e.figures[0]) == null ? void 0 : b.section.document.meta.locale) ?? "en"
1134
+ );
1135
+ },
1136
+ [e.figures]
1137
+ ), r = Oe(e.figures, n);
1138
+ if (e.figures.length === 0) return null;
1139
+ const i = /* @__PURE__ */ new Set([e.caption ?? ""]), o = [];
1140
+ let l, d;
1141
+ const c = (b) => /* @__PURE__ */ s(yt, { figure: b, footnotes: r.get(b.section.id) }, b.section.id), p = (b) => {
1142
+ if (!d) {
1143
+ o.push(b);
1144
+ return;
1145
+ }
1146
+ const k = d;
1147
+ d = void 0, o.push(
1148
+ /* @__PURE__ */ u("div", { className: "lens-print-lead-group", children: [
1149
+ k,
1150
+ b
1151
+ ] }, `lead-${b.key}`)
1152
+ );
1153
+ }, h = () => {
1154
+ l && (p(c(l)), l = void 0);
1155
+ }, y = (b) => {
1156
+ if (b.width !== "half") {
1157
+ h(), p(c(b));
1158
+ return;
1159
+ }
1160
+ if (!l) {
1161
+ l = b;
1162
+ return;
1163
+ }
1164
+ const k = l;
1165
+ l = void 0, p(
1166
+ /* @__PURE__ */ u("div", { className: "lens-print-pair", children: [
1167
+ c(k),
1168
+ c(b)
1169
+ ] }, `pair-${k.section.id}`)
1170
+ );
1171
+ };
1172
+ for (const b of e.figures) {
1173
+ const k = b.group, P = `${(k == null ? void 0 : k.label) ?? ""}::${(k == null ? void 0 : k.caption) ?? ""}`;
1174
+ k && !i.has(P) && (i.add(P), h(), d = /* @__PURE__ */ u("div", { className: "lens-print-strip", children: [
1175
+ k.label && /* @__PURE__ */ s("h3", { children: k.label }),
1176
+ k.caption && k.caption !== e.caption && /* @__PURE__ */ s("p", { children: k.caption })
1177
+ ] }, `strip-${b.section.id}`)), y(b);
1178
+ }
1179
+ return h(), d && o.push(d), /* @__PURE__ */ u("section", { className: "lens-print-chapter", children: [
1180
+ /* @__PURE__ */ u("header", { className: "lens-print-chapter-head", children: [
1181
+ /* @__PURE__ */ u("p", { className: "lens-print-runninghead", children: [
1182
+ t,
1183
+ " · ",
1184
+ e.number,
1185
+ ". ",
1186
+ e.title
1187
+ ] }),
1188
+ /* @__PURE__ */ u("h2", { children: [
1189
+ /* @__PURE__ */ s("span", { className: "lens-print-chapter-number", children: e.number }),
1190
+ e.title
1191
+ ] }),
1192
+ e.caption && /* @__PURE__ */ s("p", { className: "lens-print-lead", children: e.caption }),
1193
+ a.length > 0 && /* @__PURE__ */ s("p", { className: "lens-print-chapter-headline", children: a.map((b) => /* @__PURE__ */ u("span", { children: [
1194
+ /* @__PURE__ */ s("span", { className: "lens-print-chapter-headline-label", children: b.label }),
1195
+ b.value
1196
+ ] }, b.id)) })
1197
+ ] }),
1198
+ /* @__PURE__ */ s("div", { className: "lens-print-grid", children: o })
1199
+ ] });
1200
+ }
1201
+ const $t = 12, ee = 8;
1202
+ function St({ detail: e }) {
1203
+ var o;
1204
+ const t = T(), n = D(e.section), a = ((o = e.section.frame) == null ? void 0 : o.rows.length) ?? 0, r = n.semantics === "series" && a > $t, i = r && e.section.frame ? {
1205
+ ...e.section,
1206
+ frame: { ...e.section.frame, rows: e.section.frame.rows.slice(-ee) }
1207
+ } : e.section;
1208
+ return /* @__PURE__ */ u("article", { className: "lens-print-detail", children: [
1209
+ /* @__PURE__ */ u("header", { children: [
1210
+ /* @__PURE__ */ s("span", { className: "lens-print-detail-number", children: e.number }),
1211
+ /* @__PURE__ */ s("h4", { children: n.title }),
1212
+ /* @__PURE__ */ s("p", { className: "lens-print-detail-trail", children: e.trail })
1213
+ ] }),
1214
+ r && /* @__PURE__ */ s(oe, { height: 110, section: e.section }),
1215
+ /* @__PURE__ */ s(z, { dense: !0, exact: !0, section: i }),
1216
+ /* @__PURE__ */ s(de, { section: e.section }),
1217
+ r && /* @__PURE__ */ s("p", { className: "lens-print-detail-note", children: t("print.seriesTail", "The chart carries all {rows} periods; the table keeps the most recent {kept}.", {
1218
+ rows: a,
1219
+ kept: ee
1220
+ }) })
1221
+ ] });
1222
+ }
1223
+ function Mt({ outline: e, title: t }) {
1224
+ const n = T();
1225
+ return e.appendix.length === 0 ? null : /* @__PURE__ */ u("section", { className: "lens-print-appendix", children: [
1226
+ /* @__PURE__ */ u("header", { className: "lens-print-chapter-head", children: [
1227
+ /* @__PURE__ */ u("p", { className: "lens-print-runninghead", children: [
1228
+ t,
1229
+ " · ",
1230
+ n("print.appendix", "Appendix A. Detailed breakdowns")
1231
+ ] }),
1232
+ /* @__PURE__ */ u("h2", { children: [
1233
+ /* @__PURE__ */ s("span", { className: "lens-print-chapter-number", children: "A" }),
1234
+ n("print.appendix", "Appendix A. Detailed breakdowns")
1235
+ ] }),
1236
+ /* @__PURE__ */ s("p", { className: "lens-print-lead", children: n(
1237
+ "print.appendixNote",
1238
+ "Each reading below is one step of the drill path printed above it, kept for verification rather than for reading in order."
1239
+ ) })
1240
+ ] }),
1241
+ e.appendix.map((a) => /* @__PURE__ */ u("div", { className: "lens-print-appendix-chapter", children: [
1242
+ /* @__PURE__ */ u("h3", { children: [
1243
+ "A",
1244
+ a.number,
1245
+ ". ",
1246
+ a.title
1247
+ ] }),
1248
+ /* @__PURE__ */ s("div", { className: "lens-print-grid lens-print-grid-dense", children: a.details.map((r) => /* @__PURE__ */ s(St, { detail: r }, r.section.id)) })
1249
+ ] }, a.id))
1250
+ ] });
1251
+ }
1252
+ function Ct({
1253
+ document: e,
1254
+ outline: t,
1255
+ report: n,
1256
+ title: a
1257
+ }) {
1258
+ const r = T(), i = A(
1259
+ () => Ve(t.qualities, r),
1260
+ [t.qualities, r]
1261
+ );
1262
+ return /* @__PURE__ */ u("section", { className: "lens-print-method", children: [
1263
+ /* @__PURE__ */ u("header", { className: "lens-print-chapter-head", children: [
1264
+ /* @__PURE__ */ u("p", { className: "lens-print-runninghead", children: [
1265
+ a,
1266
+ " · ",
1267
+ r("print.method", "Appendix B. Sources and definitions")
1268
+ ] }),
1269
+ /* @__PURE__ */ u("h2", { children: [
1270
+ /* @__PURE__ */ s("span", { className: "lens-print-chapter-number", children: "B" }),
1271
+ r("print.method", "Appendix B. Sources and definitions")
1272
+ ] })
1273
+ ] }),
1274
+ i.length > 0 && /* @__PURE__ */ u("div", { className: "lens-print-glossary", children: [
1275
+ /* @__PURE__ */ s("h3", { children: r("print.qualityTerms", "What the quality marks mean") }),
1276
+ /* @__PURE__ */ s("dl", { children: i.map((o) => /* @__PURE__ */ u("div", { children: [
1277
+ /* @__PURE__ */ s("dt", { children: /* @__PURE__ */ s("span", { className: "lens-print-chip", "data-quality": o.value, children: o.label }) }),
1278
+ /* @__PURE__ */ s("dd", { children: o.definition })
1279
+ ] }, o.value)) })
1280
+ ] }),
1281
+ t.notes.length > 0 && /* @__PURE__ */ s("dl", { className: "lens-print-notes", children: t.notes.map((o) => /* @__PURE__ */ u("div", { children: [
1282
+ /* @__PURE__ */ s("dt", { children: o.label }),
1283
+ /* @__PURE__ */ s("dd", { children: o.detail })
1284
+ ] }, o.id)) }),
1285
+ (t.missing.length > 0 || n.truncated || n.warnings.length > 0) && /* @__PURE__ */ u("div", { className: "lens-print-limits", children: [
1286
+ /* @__PURE__ */ s("h3", { children: r("print.limitations", "Data limitations") }),
1287
+ /* @__PURE__ */ s("p", { children: r(
1288
+ "print.limitationsNote",
1289
+ "The report remains usable, but the following detail views could not be calculated and are explicitly disclosed:"
1290
+ ) }),
1291
+ /* @__PURE__ */ u("ul", { children: [
1292
+ t.missing.length > 0 && /* @__PURE__ */ s("li", { children: r("print.missing", "Not calculated: {names}", { names: t.missing.join(", ") }) }),
1293
+ n.truncated && /* @__PURE__ */ s("li", { children: r(
1294
+ "print.timeLimit",
1295
+ "Further detail was stopped at the preparation time limit; all sections calculated by then are included."
1296
+ ) }),
1297
+ n.warnings.map((o, l) => /* @__PURE__ */ s("li", { children: o }, `${l}:${o}`))
1298
+ ] })
1299
+ ] }),
1300
+ /* @__PURE__ */ u("p", { className: "lens-print-provenance", children: [
1301
+ r("print.snapshot", "Snapshot"),
1302
+ ": ",
1303
+ e.snapshotId,
1304
+ " · ",
1305
+ e.meta.dashboardId,
1306
+ " · ",
1307
+ e.meta.locale
1308
+ ] })
1309
+ ] });
1310
+ }
1311
+ function Dt({ report: e }) {
1312
+ var o;
1313
+ const t = T(), n = e.document, a = ((o = n.header) == null ? void 0 : o.title) || n.meta.title, r = A(() => ut(e), [e]), i = A(
1314
+ () => ct(
1315
+ e,
1316
+ t("print.summary", "Summary"),
1317
+ t("print.other", "Other readings")
1318
+ ),
1319
+ [e, t]
1320
+ );
1321
+ return /* @__PURE__ */ u(se.Provider, { value: r, children: [
1322
+ /* @__PURE__ */ s(wt, { document: n, outline: i, report: e }),
1323
+ /* @__PURE__ */ s(xt, { outline: i }),
1324
+ i.chapters.map((l) => /* @__PURE__ */ s(Ft, { chapter: l, title: a }, l.id)),
1325
+ /* @__PURE__ */ s(Mt, { outline: i, title: a }),
1326
+ /* @__PURE__ */ s(Ct, { document: n, outline: i, report: e, title: a })
1327
+ ] });
1328
+ }
1329
+ function Bt() {
1330
+ const { document: e } = xe(), t = Fe();
1331
+ if (!t.report || typeof globalThis.document > "u") return null;
1332
+ const n = e.theme.palette.accent ?? e.theme.palette.primary;
1333
+ return ge(
1334
+ /* @__PURE__ */ s(
1335
+ "article",
1336
+ {
1337
+ "aria-hidden": !t.active,
1338
+ className: "lens-print-report",
1339
+ "data-preview": t.preview ? "true" : void 0,
1340
+ lang: e.meta.locale,
1341
+ style: n ? { "--lens-accent-500": n } : void 0,
1342
+ children: /* @__PURE__ */ s(Dt, { report: t.report })
1343
+ }
1344
+ ),
1345
+ globalThis.document.body
1346
+ );
1347
+ }
1348
+ export {
1349
+ Bt as PrintReport,
1350
+ Dt as PrintReportView
1351
+ };