@iota-uz/sdk 0.20.0 → 0.22.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 (347) hide show
  1. package/dist/chat-ui/PHOSPHOR-LICENSE +21 -0
  2. package/dist/chat-ui/animations/index.d.ts +4 -0
  3. package/dist/chat-ui/animations/variants.d.ts +322 -0
  4. package/dist/chat-ui/api/csrf.d.ts +20 -0
  5. package/dist/chat-ui/components/ActivityTrace.d.ts +12 -0
  6. package/dist/chat-ui/components/Alert.d.ts +13 -0
  7. package/dist/chat-ui/components/AllChatsList.d.ts +9 -0
  8. package/dist/chat-ui/components/ArchiveBanner.d.ts +9 -0
  9. package/dist/chat-ui/components/ArchivedChatList.d.ts +12 -0
  10. package/dist/chat-ui/components/AssistantMessage.d.ts +149 -0
  11. package/dist/chat-ui/components/AssistantTurnView.d.ts +25 -0
  12. package/dist/chat-ui/components/AttachmentGrid.d.ts +19 -0
  13. package/dist/chat-ui/components/AttachmentPreview.d.ts +14 -0
  14. package/dist/chat-ui/components/AttachmentUpload.d.ts +14 -0
  15. package/dist/chat-ui/components/AvatarStack.d.ts +21 -0
  16. package/dist/chat-ui/components/BiChatLayout.d.ts +19 -0
  17. package/dist/chat-ui/components/ChartCard.d.ts +17 -0
  18. package/dist/chat-ui/components/ChatHeader.d.ts +31 -0
  19. package/dist/chat-ui/components/ChatSession.d.ts +51 -0
  20. package/dist/chat-ui/components/CodeBlock.d.ts +26 -0
  21. package/dist/chat-ui/components/CodeOutputsPanel.d.ts +8 -0
  22. package/dist/chat-ui/components/CompactionDoodle.d.ts +7 -0
  23. package/dist/chat-ui/components/ConfirmModal.d.ts +23 -0
  24. package/dist/chat-ui/components/ConfirmationStep.d.ts +13 -0
  25. package/dist/chat-ui/components/DataTableCell.d.ts +11 -0
  26. package/dist/chat-ui/components/DataTableFooter.d.ts +9 -0
  27. package/dist/chat-ui/components/DataTableHeader.d.ts +15 -0
  28. package/dist/chat-ui/components/DataTableToolbar.d.ts +17 -0
  29. package/dist/chat-ui/components/DateGroupHeader.d.ts +11 -0
  30. package/dist/chat-ui/components/DateSeparator.d.ts +6 -0
  31. package/dist/chat-ui/components/DebugPanel.d.ts +7 -0
  32. package/dist/chat-ui/components/DownloadCard.d.ts +7 -0
  33. package/dist/chat-ui/components/EditableText.d.ts +30 -0
  34. package/dist/chat-ui/components/EmptyState.d.ts +19 -0
  35. package/dist/chat-ui/components/ErrorBoundary.d.ts +23 -0
  36. package/dist/chat-ui/components/FullscreenOverlay.d.ts +9 -0
  37. package/dist/chat-ui/components/ImageModal.d.ts +13 -0
  38. package/dist/chat-ui/components/InlineDialog.d.ts +16 -0
  39. package/dist/chat-ui/components/InlineQuestionForm.d.ts +7 -0
  40. package/dist/chat-ui/components/InteractiveTableCard.d.ts +18 -0
  41. package/dist/chat-ui/components/LoadingSpinner.d.ts +11 -0
  42. package/dist/chat-ui/components/MarkdownRenderer.d.ts +13 -0
  43. package/dist/chat-ui/components/Menu.d.ts +29 -0
  44. package/dist/chat-ui/components/MessageActions.d.ts +17 -0
  45. package/dist/chat-ui/components/MessageInput.d.ts +39 -0
  46. package/dist/chat-ui/components/MessageList.d.ts +12 -0
  47. package/dist/chat-ui/components/MessageQueueList.d.ts +9 -0
  48. package/dist/chat-ui/components/ModelSelector.d.ts +2 -0
  49. package/dist/chat-ui/components/PermissionGuard.d.ts +47 -0
  50. package/dist/chat-ui/components/QuestionForm.d.ts +10 -0
  51. package/dist/chat-ui/components/QuestionStep.d.ts +15 -0
  52. package/dist/chat-ui/components/RetryActionArea.d.ts +7 -0
  53. package/dist/chat-ui/components/ScreenReaderAnnouncer.d.ts +22 -0
  54. package/dist/chat-ui/components/ScrollToBottomButton.d.ts +12 -0
  55. package/dist/chat-ui/components/SearchInput.d.ts +27 -0
  56. package/dist/chat-ui/components/SessionArtifactList.d.ts +9 -0
  57. package/dist/chat-ui/components/SessionArtifactPreview.d.ts +7 -0
  58. package/dist/chat-ui/components/SessionArtifactPreviewModal.d.ts +13 -0
  59. package/dist/chat-ui/components/SessionArtifactsPanel.d.ts +13 -0
  60. package/dist/chat-ui/components/SessionItem.d.ts +18 -0
  61. package/dist/chat-ui/components/SessionMembersModal.d.ts +10 -0
  62. package/dist/chat-ui/components/SessionSkeleton.d.ts +6 -0
  63. package/dist/chat-ui/components/Sidebar.d.ts +22 -0
  64. package/dist/chat-ui/components/Skeleton.d.ts +63 -0
  65. package/dist/chat-ui/components/SkipLink.d.ts +2 -0
  66. package/dist/chat-ui/components/SourcesPanel.d.ts +7 -0
  67. package/dist/chat-ui/components/StreamError.d.ts +15 -0
  68. package/dist/chat-ui/components/StreamingCursor.d.ts +4 -0
  69. package/dist/chat-ui/components/SystemMessage.d.ts +10 -0
  70. package/dist/chat-ui/components/TabBar.d.ts +15 -0
  71. package/dist/chat-ui/components/TabbedChartGroup.d.ts +6 -0
  72. package/dist/chat-ui/components/TabbedTableGroup.d.ts +8 -0
  73. package/dist/chat-ui/components/TableExportButton.d.ts +13 -0
  74. package/dist/chat-ui/components/TableWithExport.d.ts +15 -0
  75. package/dist/chat-ui/components/Toast.d.ts +15 -0
  76. package/dist/chat-ui/components/ToastContainer.d.ts +10 -0
  77. package/dist/chat-ui/components/TouchContextMenu.d.ts +18 -0
  78. package/dist/chat-ui/components/Transition.d.ts +11 -0
  79. package/dist/chat-ui/components/TurnBubble.d.ts +51 -0
  80. package/dist/chat-ui/components/TypingIndicator.d.ts +13 -0
  81. package/dist/chat-ui/components/UserAvatar.d.ts +21 -0
  82. package/dist/chat-ui/components/UserFilter.d.ts +12 -0
  83. package/dist/chat-ui/components/UserMessage.d.ts +86 -0
  84. package/dist/chat-ui/components/UserTurnView.d.ts +25 -0
  85. package/dist/chat-ui/components/WelcomeContent.d.ts +17 -0
  86. package/dist/chat-ui/config/ConfigContext.d.ts +61 -0
  87. package/dist/chat-ui/context/ChatContext.d.ts +42 -0
  88. package/dist/chat-ui/context/IotaContext.d.ts +21 -0
  89. package/dist/chat-ui/context/chatHelpers.d.ts +18 -0
  90. package/dist/chat-ui/context/externalSnapshot.d.ts +4 -0
  91. package/dist/chat-ui/data/ArtifactManager.d.ts +23 -0
  92. package/dist/chat-ui/data/AttachmentUploader.d.ts +25 -0
  93. package/dist/chat-ui/data/HttpDataSource.d.ts +109 -0
  94. package/dist/chat-ui/data/ManagedHttpDataSource.d.ts +26 -0
  95. package/dist/chat-ui/data/MessageTransport.d.ts +88 -0
  96. package/dist/chat-ui/data/SessionManager.d.ts +52 -0
  97. package/dist/chat-ui/data/applet-rpc.d.ts +29 -0
  98. package/dist/chat-ui/data/mappers.d.ts +33 -0
  99. package/dist/chat-ui/data/openManagedEventSource.d.ts +54 -0
  100. package/dist/chat-ui/data/rpc.generated.d.ts +421 -0
  101. package/dist/chat-ui/hooks/createHorizontalSwipe.d.ts +27 -0
  102. package/dist/chat-ui/hooks/createReducedMotion.d.ts +1 -0
  103. package/dist/chat-ui/hooks/useActiveRuns.d.ts +47 -0
  104. package/dist/chat-ui/hooks/useAttachments.d.ts +80 -0
  105. package/dist/chat-ui/hooks/useAutoScroll.d.ts +51 -0
  106. package/dist/chat-ui/hooks/useBichatRouter.d.ts +40 -0
  107. package/dist/chat-ui/hooks/useBranding.d.ts +16 -0
  108. package/dist/chat-ui/hooks/useDataTable.d.ts +54 -0
  109. package/dist/chat-ui/hooks/useFocusTrap.d.ts +17 -0
  110. package/dist/chat-ui/hooks/useHttpDataSourceConfigFromApplet.d.ts +19 -0
  111. package/dist/chat-ui/hooks/useImageGallery.d.ts +67 -0
  112. package/dist/chat-ui/hooks/useKeyboardShortcuts.d.ts +23 -0
  113. package/dist/chat-ui/hooks/useLongPress.d.ts +22 -0
  114. package/dist/chat-ui/hooks/useMarkdownCopy.d.ts +46 -0
  115. package/dist/chat-ui/hooks/useMessageActions.d.ts +53 -0
  116. package/dist/chat-ui/hooks/useMessageListScroll.d.ts +22 -0
  117. package/dist/chat-ui/hooks/useModalLock.d.ts +1 -0
  118. package/dist/chat-ui/hooks/useScrollToBottom.d.ts +22 -0
  119. package/dist/chat-ui/hooks/useSidebarState.d.ts +8 -0
  120. package/dist/chat-ui/hooks/useToast.d.ts +43 -0
  121. package/dist/chat-ui/hooks/useTranslation.d.ts +4 -0
  122. package/dist/chat-ui/icons/index.d.ts +93 -0
  123. package/dist/chat-ui/icons.js +975 -0
  124. package/dist/chat-ui/index.d.ts +122 -0
  125. package/dist/chat-ui/index.js +51821 -0
  126. package/dist/chat-ui/machine/ChatMachine.d.ts +191 -0
  127. package/dist/chat-ui/machine/hitlLifecycle.d.ts +7 -0
  128. package/dist/chat-ui/machine/index.d.ts +2 -0
  129. package/dist/chat-ui/machine/selectors.d.ts +5 -0
  130. package/dist/chat-ui/machine/types.d.ts +127 -0
  131. package/dist/chat-ui/styles.css +1 -0
  132. package/dist/chat-ui/theme/themes.d.ts +6 -0
  133. package/dist/chat-ui/theme/types.d.ts +38 -0
  134. package/dist/chat-ui/types/applet/index.d.ts +82 -0
  135. package/dist/chat-ui/types/data-source.d.ts +81 -0
  136. package/dist/chat-ui/types/index.d.ts +719 -0
  137. package/dist/chat-ui/types/iota.d.ts +76 -0
  138. package/dist/chat-ui/utils/RateLimiter.d.ts +28 -0
  139. package/dist/chat-ui/utils/activitySteps.d.ts +15 -0
  140. package/dist/chat-ui/utils/artifactHelpers.d.ts +7 -0
  141. package/dist/chat-ui/utils/assistantTurnState.d.ts +4 -0
  142. package/dist/chat-ui/utils/chartSpec.d.ts +15 -0
  143. package/dist/chat-ui/utils/citationProcessor.d.ts +38 -0
  144. package/dist/chat-ui/utils/columnTypes.d.ts +9 -0
  145. package/dist/chat-ui/utils/cssLength.d.ts +1 -0
  146. package/dist/chat-ui/utils/dateFormatting.d.ts +13 -0
  147. package/dist/chat-ui/utils/debugMetrics.d.ts +5 -0
  148. package/dist/chat-ui/utils/debugModeStorage.d.ts +2 -0
  149. package/dist/chat-ui/utils/debugTrace.d.ts +4 -0
  150. package/dist/chat-ui/utils/errorDisplay.d.ts +23 -0
  151. package/dist/chat-ui/utils/eventNames.d.ts +27 -0
  152. package/dist/chat-ui/utils/fileUtils.d.ts +48 -0
  153. package/dist/chat-ui/utils/markdownMath.d.ts +9 -0
  154. package/dist/chat-ui/utils/markdownStream.d.ts +8 -0
  155. package/dist/chat-ui/utils/questionFormUtils.d.ts +18 -0
  156. package/dist/chat-ui/utils/queueStorage.d.ts +4 -0
  157. package/dist/chat-ui/utils/reasoningEffortStorage.d.ts +3 -0
  158. package/dist/chat-ui/utils/sessionGrouping.d.ts +7 -0
  159. package/dist/chat-ui/utils/sseParser.d.ts +34 -0
  160. package/dist/chat-ui/utils/tableSpec.d.ts +6 -0
  161. package/dist/chat-ui/utils/textBlocks.d.ts +43 -0
  162. package/dist/chat-ui/utils/toolLabels.d.ts +17 -0
  163. package/dist/client-host/{applet.d.ts → bichat-config.d.ts} +2 -16
  164. package/dist/client-host/bichat-config.d.ts.map +1 -0
  165. package/dist/client-host/{applet.js → bichat-config.js} +0 -8
  166. package/dist/client-host/identity.d.ts +4 -4
  167. package/dist/client-host/identity.js +2 -2
  168. package/dist/client-host/index.d.ts +7 -4
  169. package/dist/client-host/index.d.ts.map +1 -1
  170. package/dist/client-host/index.js +7 -4
  171. package/dist/client-host/solid-index.d.ts +1 -0
  172. package/dist/client-host/solid-index.d.ts.map +1 -1
  173. package/dist/client-host/solid-index.js +1 -0
  174. package/dist/client-host/solid-streaming.d.ts.map +1 -1
  175. package/dist/lens/CascadePanel-BXaSLD9I.js +700 -0
  176. package/dist/lens/ChartDataEquivalent-Uo4RCCqz.js +92 -0
  177. package/dist/lens/ChartPanel-BYIblvtO.js +981 -0
  178. package/dist/lens/CoveragePanel-CBxW7l_N.js +195 -0
  179. package/dist/lens/DashboardPanels.d.ts +4 -1
  180. package/dist/lens/DashboardPanels.d.ts.map +1 -1
  181. package/dist/lens/GaugePanel-Gm3y4QBi.js +39 -0
  182. package/dist/lens/LensDashboard.d.ts +7 -2
  183. package/dist/lens/LensDashboard.d.ts.map +1 -1
  184. package/dist/lens/MapPanel-Fr67rBRo.js +256 -0
  185. package/dist/lens/MetricFlowPanel-DFGBh3hI.js +135 -0
  186. package/dist/lens/MetricHierarchyPanel-DKiQ8e3m.js +121 -0
  187. package/dist/lens/MetricRelationshipPanel-YC3Cg9Id.js +120 -0
  188. package/dist/lens/PrintReport-BPI_jNyw.js +1876 -0
  189. package/dist/lens/TablePanel-Bh8dWK4d.js +946 -0
  190. package/dist/lens/{adapter-BwEwcw2W.js → adapter-DIzUDxuh.js} +384 -384
  191. package/dist/lens/contract/schemas.d.ts.map +1 -1
  192. package/dist/lens/contract/types.d.ts +1 -1
  193. package/dist/lens/contract/types.d.ts.map +1 -1
  194. package/dist/lens/controls/Calendar.d.ts +1 -1
  195. package/dist/lens/controls/Calendar.d.ts.map +1 -1
  196. package/dist/lens/controls/CompareFilterControl.d.ts +2 -2
  197. package/dist/lens/controls/CompareFilterControl.d.ts.map +1 -1
  198. package/dist/lens/controls/FacetFilterMenu.d.ts +2 -2
  199. package/dist/lens/controls/FacetFilterMenu.d.ts.map +1 -1
  200. package/dist/lens/controls/FilterBar.d.ts +3 -3
  201. package/dist/lens/controls/FilterBar.d.ts.map +1 -1
  202. package/dist/lens/controls/PeriodFilterControl.d.ts +2 -1
  203. package/dist/lens/controls/PeriodFilterControl.d.ts.map +1 -1
  204. package/dist/lens/controls/SegmentedFilterControl.d.ts +2 -2
  205. package/dist/lens/controls/SegmentedFilterControl.d.ts.map +1 -1
  206. package/dist/lens/controls/facetOptions.d.ts +5 -5
  207. package/dist/lens/controls/facetOptions.d.ts.map +1 -1
  208. package/dist/lens/element.d.ts +1 -1
  209. package/dist/lens/element.d.ts.map +1 -1
  210. package/dist/lens/explore/ContextMiniChart.d.ts +2 -1
  211. package/dist/lens/explore/ContextMiniChart.d.ts.map +1 -1
  212. package/dist/lens/explore/DrillOverlay.d.ts +2 -1
  213. package/dist/lens/explore/DrillOverlay.d.ts.map +1 -1
  214. package/dist/lens/explore/ExplorePanel.d.ts +2 -1
  215. package/dist/lens/explore/ExplorePanel.d.ts.map +1 -1
  216. package/dist/lens/explore/FocusContextHeader.d.ts +2 -1
  217. package/dist/lens/explore/FocusContextHeader.d.ts.map +1 -1
  218. package/dist/lens/explore/LensSelector.d.ts +2 -1
  219. package/dist/lens/explore/LensSelector.d.ts.map +1 -1
  220. package/dist/lens/explore/SourceDataDisclosure.d.ts +3 -3
  221. package/dist/lens/explore/SourceDataDisclosure.d.ts.map +1 -1
  222. package/dist/lens/icons.d.ts +36 -35
  223. package/dist/lens/icons.d.ts.map +1 -1
  224. package/dist/lens/{index-B6anZ5Pr.js → index-2qUA4koZ.js} +1 -1
  225. package/dist/lens/index-DW4iQi93.js +13171 -0
  226. package/dist/lens/index.d.ts +3 -1
  227. package/dist/lens/index.d.ts.map +1 -1
  228. package/dist/lens/index.js +14 -9
  229. package/dist/lens/{install-D5OiGDnd.js → install-C-b2Bm4Y.js} +1 -1
  230. package/dist/lens/{install-CsNOaFxV.js → install-C7rGzRvO.js} +1 -1
  231. package/dist/lens/{install-CumkiUJn.js → install-Ce8R_Bl2.js} +1 -1
  232. package/dist/lens/{install-VEXJv-Wi.js → install-Czhlaw4u.js} +1 -1
  233. package/dist/lens/keys-BC7G1vyT.js +91 -0
  234. package/dist/lens/metricViews-DSoDe0GU.js +210 -0
  235. package/dist/lens/panels/CascadePanel.d.ts +1 -1
  236. package/dist/lens/panels/CascadePanel.d.ts.map +1 -1
  237. package/dist/lens/panels/ChartDataEquivalent.d.ts +1 -1
  238. package/dist/lens/panels/ChartDataEquivalent.d.ts.map +1 -1
  239. package/dist/lens/panels/ChartHost.d.ts +1 -1
  240. package/dist/lens/panels/ChartHost.d.ts.map +1 -1
  241. package/dist/lens/panels/ChartPanel.d.ts +2 -1
  242. package/dist/lens/panels/ChartPanel.d.ts.map +1 -1
  243. package/dist/lens/panels/CopyValueButton.d.ts +1 -1
  244. package/dist/lens/panels/CopyValueButton.d.ts.map +1 -1
  245. package/dist/lens/panels/CoveragePanel.d.ts +1 -1
  246. package/dist/lens/panels/CoveragePanel.d.ts.map +1 -1
  247. package/dist/lens/panels/ExportMenu.d.ts +1 -1
  248. package/dist/lens/panels/ExportMenu.d.ts.map +1 -1
  249. package/dist/lens/panels/GaugePanel.d.ts +1 -1
  250. package/dist/lens/panels/GaugePanel.d.ts.map +1 -1
  251. package/dist/lens/panels/InfoTip.d.ts +2 -1
  252. package/dist/lens/panels/InfoTip.d.ts.map +1 -1
  253. package/dist/lens/panels/MapPanel.d.ts +1 -1
  254. package/dist/lens/panels/MapPanel.d.ts.map +1 -1
  255. package/dist/lens/panels/MetricFlowPanel.d.ts +1 -1
  256. package/dist/lens/panels/MetricFlowPanel.d.ts.map +1 -1
  257. package/dist/lens/panels/MetricHierarchyPanel.d.ts +2 -1
  258. package/dist/lens/panels/MetricHierarchyPanel.d.ts.map +1 -1
  259. package/dist/lens/panels/MetricRelationshipPanel.d.ts +1 -1
  260. package/dist/lens/panels/MetricRelationshipPanel.d.ts.map +1 -1
  261. package/dist/lens/panels/PanelExportMenu.d.ts +2 -2
  262. package/dist/lens/panels/PanelExportMenu.d.ts.map +1 -1
  263. package/dist/lens/panels/PanelFrame.d.ts +6 -6
  264. package/dist/lens/panels/PanelFrame.d.ts.map +1 -1
  265. package/dist/lens/panels/PanelOverlay.d.ts +4 -4
  266. package/dist/lens/panels/PanelOverlay.d.ts.map +1 -1
  267. package/dist/lens/panels/QualityChip.d.ts +8 -4
  268. package/dist/lens/panels/QualityChip.d.ts.map +1 -1
  269. package/dist/lens/panels/ShareSliceButton.d.ts +1 -1
  270. package/dist/lens/panels/ShareSliceButton.d.ts.map +1 -1
  271. package/dist/lens/panels/Skeleton.d.ts +13 -13
  272. package/dist/lens/panels/Skeleton.d.ts.map +1 -1
  273. package/dist/lens/panels/StatPanel.d.ts +11 -11
  274. package/dist/lens/panels/StatPanel.d.ts.map +1 -1
  275. package/dist/lens/panels/StatValueTicker.d.ts +2 -2
  276. package/dist/lens/panels/StatValueTicker.d.ts.map +1 -1
  277. package/dist/lens/panels/TablePanel.d.ts +2 -1
  278. package/dist/lens/panels/TablePanel.d.ts.map +1 -1
  279. package/dist/lens/panels/WaterfallPlot.d.ts +3 -3
  280. package/dist/lens/panels/WaterfallPlot.d.ts.map +1 -1
  281. package/dist/lens/panels/actions.d.ts +16 -13
  282. package/dist/lens/panels/actions.d.ts.map +1 -1
  283. package/dist/lens/panels/context.d.ts +5 -5
  284. package/dist/lens/panels/context.d.ts.map +1 -1
  285. package/dist/lens/panels/focusTrap.d.ts +4 -0
  286. package/dist/lens/panels/focusTrap.d.ts.map +1 -0
  287. package/dist/lens/panels/overlayContainer.d.ts +18 -0
  288. package/dist/lens/panels/overlayContainer.d.ts.map +1 -0
  289. package/dist/lens/panels/registry.d.ts +23 -23
  290. package/dist/lens/panels/registry.d.ts.map +1 -1
  291. package/dist/lens/panels/useIsClamped.d.ts +2 -2
  292. package/dist/lens/panels/useIsClamped.d.ts.map +1 -1
  293. package/dist/lens/panels/useMenuButton.d.ts +21 -14
  294. package/dist/lens/panels/useMenuButton.d.ts.map +1 -1
  295. package/dist/lens/{prefetch-C_qYKOTU.js → prefetch-Caqfl7sC.js} +2 -2
  296. package/dist/lens/{prefetchPanels-CD4C-A5q.js → prefetchPanels-B-09akeK.js} +1 -1
  297. package/dist/lens/print/PrintReport.d.ts +4 -3
  298. package/dist/lens/print/PrintReport.d.ts.map +1 -1
  299. package/dist/lens/print/formula.d.ts +3 -2
  300. package/dist/lens/print/formula.d.ts.map +1 -1
  301. package/dist/lens/print/quality.d.ts +3 -2
  302. package/dist/lens/print/quality.d.ts.map +1 -1
  303. package/dist/lens/{print-Iu804kRb.js → print-CcDZyjFC.js} +1 -1
  304. package/dist/lens/reports/contract/schemas.d.ts +17 -0
  305. package/dist/lens/reports/contract/schemas.d.ts.map +1 -0
  306. package/dist/lens/reports/contract/types.d.ts +42 -0
  307. package/dist/lens/reports/contract/types.d.ts.map +1 -0
  308. package/dist/lens/reports/draft.d.ts +28 -0
  309. package/dist/lens/reports/draft.d.ts.map +1 -0
  310. package/dist/lens/runtime/drawer.d.ts +3 -3
  311. package/dist/lens/runtime/drawer.d.ts.map +1 -1
  312. package/dist/lens/runtime/overlayContainer.d.ts +2 -2
  313. package/dist/lens/runtime/overlayContainer.d.ts.map +1 -1
  314. package/dist/lens/runtime/provider.d.ts +23 -23
  315. package/dist/lens/runtime/provider.d.ts.map +1 -1
  316. package/dist/lens/{scales-CWTA0tSQ.js → scales-DOCY7Afr.js} +1 -1
  317. package/dist/lens/style.css +1 -1
  318. package/dist/sdk-identity.cjs +3 -3
  319. package/dist/sdk-identity.js +3 -3
  320. package/dist/sdk-identity.json +2 -2
  321. package/package.json +11 -10
  322. package/dist/client-host/applet.d.ts.map +0 -1
  323. package/dist/client-host/portals.d.ts +0 -30
  324. package/dist/client-host/portals.d.ts.map +0 -1
  325. package/dist/client-host/portals.js +0 -84
  326. package/dist/client-host/route.d.ts +0 -17
  327. package/dist/client-host/route.d.ts.map +0 -1
  328. package/dist/client-host/route.js +0 -19
  329. package/dist/client-host/rpc.d.ts +0 -15
  330. package/dist/client-host/rpc.d.ts.map +0 -1
  331. package/dist/client-host/rpc.js +0 -28
  332. package/dist/lens/CascadePanel-Sd2OKQx-.js +0 -574
  333. package/dist/lens/ChartDataEquivalent-DgCAb4Ov.js +0 -53
  334. package/dist/lens/ChartPanel-CiAahY9O.js +0 -709
  335. package/dist/lens/CoveragePanel-DeeKg8gF.js +0 -131
  336. package/dist/lens/GaugePanel-8rsf_XHS.js +0 -43
  337. package/dist/lens/MapPanel-Bq0mfVCB.js +0 -179
  338. package/dist/lens/MetricFlowPanel-ZBJqPFpc.js +0 -70
  339. package/dist/lens/MetricHierarchyPanel-DStGwvVU.js +0 -72
  340. package/dist/lens/MetricRelationshipPanel-D6ItmGCS.js +0 -54
  341. package/dist/lens/PrintReport-Dr-6xXVr.js +0 -1367
  342. package/dist/lens/TablePanel-CzLP8gG0.js +0 -619
  343. package/dist/lens/index-R9mnOHaj.js +0 -11000
  344. package/dist/lens/keys-6_gqLhcv.js +0 -78
  345. package/dist/lens/metricViews-De-9pff-.js +0 -170
  346. package/dist/lens/runtime/focusTrap.d.ts +0 -4
  347. package/dist/lens/runtime/focusTrap.d.ts.map +0 -1
@@ -0,0 +1,1876 @@
1
+ import { createComponent as d, insert as r, effect as I, setAttribute as R, template as g, memo as E, style as _e, Portal as je, setStyleProperty as ee, className as oe } from "solid-js/web";
2
+ import { Show as y, createMemo as j, For as L, createContext as Be, useContext as Ee } from "solid-js";
3
+ import { W as Oe, b as Ue, a as We } from "./CascadePanel-BXaSLD9I.js";
4
+ import { C as ze, m as le, f as He } from "./keys-BC7G1vyT.js";
5
+ import { u as q, r as Ge, f as K, b as Qe, a as Je, c as Ye, d as we, e as ye, g as ke, h as xe, i as Ce, j as Xe } from "./index-DW4iQi93.js";
6
+ import { r as Y, a as pe, c as Ze, b as et, f as me, d as tt, h as nt } from "./metricViews-DSoDe0GU.js";
7
+ import { relationshipSentence as rt } from "./MetricRelationshipPanel-YC3Cg9Id.js";
8
+ var lt = /* @__PURE__ */ g("<span class=lens-print-chip>");
9
+ function it(e, t) {
10
+ const l = Y(e);
11
+ return l ? t(l.meta.labelKey, l.meta.fallback) : void 0;
12
+ }
13
+ function at(e, t) {
14
+ const l = Y(e);
15
+ if (l) {
16
+ if (l.axis === "availability")
17
+ return t("print.noteUnavailable", "Not available: the source is not calculated or not configured, so the figure is shown as a dash rather than as a zero.");
18
+ if (l.value === "proxy")
19
+ return t("print.noteProxy", "Proxy: a management estimate derived from adjacent data, not a figure taken from the accounting system.");
20
+ if (l.value === "requires_reconciliation")
21
+ return t("print.noteReconciliation", "Requires reconciliation: a known difference against the accounting system has not been resolved.");
22
+ }
23
+ }
24
+ const ge = {
25
+ verified: {
26
+ labelKey: "print.defVerified",
27
+ fallback: "Verified — the figure is taken from the accounting system as recorded, without derivation."
28
+ },
29
+ calculated: {
30
+ labelKey: "print.defCalculated",
31
+ fallback: "Calculated — derived from recorded data by a stated rule; the rule, not the figure, is what to check."
32
+ },
33
+ proxy: {
34
+ labelKey: "print.defProxy",
35
+ fallback: "Proxy — a management estimate from adjacent data, used where the direct source does not exist."
36
+ },
37
+ requires_reconciliation: {
38
+ labelKey: "print.defReconciliation",
39
+ fallback: "Requires reconciliation — a known difference against the accounting system is still open."
40
+ },
41
+ config_required: {
42
+ labelKey: "print.defConfigRequired",
43
+ fallback: "Configuration required — the calculation exists but its parameters have not been set for this period."
44
+ },
45
+ empty_source: {
46
+ labelKey: "print.defEmptySource",
47
+ fallback: "No source data — the source holds no rows for this period, which is not the same as a zero."
48
+ },
49
+ unavailable: {
50
+ labelKey: "print.defUnavailable",
51
+ fallback: "Unavailable — the figure could not be produced, and is shown as a dash rather than as a zero."
52
+ }
53
+ }, st = /* @__PURE__ */ new Set(["config_required", "empty_source", "unavailable"]);
54
+ function ot(e, t) {
55
+ const l = /* @__PURE__ */ new Set(), i = Object.keys(ge);
56
+ for (const n of e) {
57
+ const a = Y(n);
58
+ a && l.add(a.value);
59
+ }
60
+ return i.filter((n) => l.has(n)).map((n) => {
61
+ const a = ge[n], c = st.has(n) ? {
62
+ availability: n
63
+ } : {
64
+ confidence: n
65
+ };
66
+ return {
67
+ value: n,
68
+ label: it(c, t) ?? n,
69
+ definition: t(a.labelKey, a.fallback)
70
+ };
71
+ });
72
+ }
73
+ function X(e) {
74
+ const t = q(), l = Y({
75
+ confidence: e.confidence,
76
+ availability: e.availability
77
+ });
78
+ return d(y, {
79
+ when: l,
80
+ children: (i) => (() => {
81
+ var n = lt();
82
+ return r(n, () => t(i().meta.labelKey, i().meta.fallback)), I(() => R(n, "data-quality", i().value)), n;
83
+ })()
84
+ });
85
+ }
86
+ const Se = /* @__PURE__ */ new Set(["pie", "donut", "radial", "bar", "hbar", "line", "area"]), Fe = /* @__PURE__ */ new Set(["metric_flow", "metric_hierarchy", "metric_relationship"]);
87
+ function Q(e) {
88
+ if (typeof e == "number" && Number.isFinite(e)) return e;
89
+ if (typeof e == "string" && e.trim() !== "") {
90
+ const t = Number(e);
91
+ if (Number.isFinite(t)) return t;
92
+ }
93
+ }
94
+ function W(e) {
95
+ return e == null ? "—" : typeof e == "string" ? e || "—" : typeof e == "number" || typeof e == "boolean" || typeof e == "bigint" ? String(e) : "—";
96
+ }
97
+ function A(e, t) {
98
+ return t ? e.columns.findIndex(({ name: l }) => l === t) : -1;
99
+ }
100
+ function ct(e, t) {
101
+ const l = { ...e.format };
102
+ for (const [i, n] of Object.entries(t)) {
103
+ const a = e.encoding[i];
104
+ n && a && e.format[a] && !l[n] && (l[n] = e.format[a]);
105
+ }
106
+ return l;
107
+ }
108
+ function ut(e, t) {
109
+ return e === "partition" ? ["pie", "donut", "bar", "hbar"].includes(t) ? t : "donut" : e === "reconciliation" ? "cascade" : e === "series" ? "line" : "table";
110
+ }
111
+ function V(e) {
112
+ var a;
113
+ const t = ((a = e.perspective) == null ? void 0 : a.semantics) ?? e.panel.semantics, l = e.level.encoding ?? e.panel.encoding, n = e.root || e.path.length === 0 ? e.panel.kind : e.level.view ?? ut(t, e.panel.kind);
114
+ return {
115
+ ...Ge(e.panel, n),
116
+ title: e.level.label.trim() || e.panel.title,
117
+ semantics: t,
118
+ encoding: l,
119
+ format: ct(e.panel, l),
120
+ presentation: e.level.presentation ?? e.panel.presentation
121
+ };
122
+ }
123
+ function dt(e) {
124
+ if (!(!e || e.rows.length === 0))
125
+ return JSON.stringify([e.columns.map(({ name: t }) => t), e.rows]);
126
+ }
127
+ function ht(e) {
128
+ var i, n;
129
+ const t = V(e.section), l = [t];
130
+ for (const a of ((i = t.metricFlow) == null ? void 0 : i.stages) ?? []) l.push(a);
131
+ for (const a of ((n = t.metricHierarchy) == null ? void 0 : n.rows) ?? []) l.push(a);
132
+ return t.metricRelationship && l.push(t.metricRelationship.source, t.metricRelationship.target), l;
133
+ }
134
+ function ft(e) {
135
+ var n;
136
+ const t = V(e.section), l = e.section.frame;
137
+ if (!l || !((n = t.columns) != null && n.length)) return [];
138
+ const i = [];
139
+ for (const a of t.columns) {
140
+ const c = A(l, a.badgeField);
141
+ if (!(c < 0))
142
+ for (const s of l.rows) {
143
+ const o = W(s[c]).trim();
144
+ o && o !== "—" && i.push(o);
145
+ }
146
+ }
147
+ return i;
148
+ }
149
+ function pt(e, t) {
150
+ var n;
151
+ const l = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
152
+ for (const a of e) {
153
+ const c = V(a.section), s = [], o = (n = c.info) == null ? void 0 : n.trim();
154
+ o && s.push(o);
155
+ for (const f of ht(a)) {
156
+ const p = at(f, t);
157
+ p && s.push(p);
158
+ }
159
+ s.push(...ft(a));
160
+ const h = { markers: [], notes: [] };
161
+ for (const f of s) {
162
+ const p = l.get(f);
163
+ if (p !== void 0) {
164
+ h.markers.includes(p) || h.markers.push(p);
165
+ continue;
166
+ }
167
+ const m = l.size + 1;
168
+ l.set(f, m), h.markers.push(m), h.notes.push({ number: m, text: f });
169
+ }
170
+ h.markers.length > 0 && i.set(a.section.id, h);
171
+ }
172
+ return i;
173
+ }
174
+ const mt = 1e4, gt = [1e9, 1e6, 1e3];
175
+ function ie(e, t) {
176
+ if (e == null || e === "") return;
177
+ const l = typeof e == "number" ? e : Number(e);
178
+ if (Number.isFinite(l))
179
+ return t.minorUnits && t.kind === "money" ? l / 100 : l;
180
+ }
181
+ function bt(e, t) {
182
+ var n;
183
+ return ((n = new Intl.NumberFormat(t, { notation: "compact", compactDisplay: "short" }).formatToParts(e).find((a) => a.type === "compact")) == null ? void 0 : n.value.trim()) || void 0;
184
+ }
185
+ function vt(e, t, l, i) {
186
+ return K(e, {
187
+ ...l,
188
+ kind: "number",
189
+ minorUnits: !1,
190
+ compact: !1,
191
+ currency: void 0,
192
+ symbol: void 0,
193
+ precision: i
194
+ }, t);
195
+ }
196
+ function ne(e, t, l) {
197
+ const i = { format: (p) => K(p, t, l) };
198
+ if (!t || t.kind !== "money" && t.kind !== "number") return i;
199
+ const n = e.map((p) => ie(p, t)).filter((p) => p !== void 0 && p !== 0);
200
+ if (n.length === 0) return i;
201
+ const a = t.kind === "money" ? (t.currency ?? "").trim() : "", c = n.map((p) => Math.abs(p)), s = Math.max(...c), o = Math.min(...c), h = s / o <= mt ? gt.find((p) => s >= p) : void 0, f = h ? bt(h, l) : void 0;
202
+ return h && f ? {
203
+ note: [f, a].filter(Boolean).join(" "),
204
+ format: (p) => {
205
+ const m = ie(p, t);
206
+ return m === void 0 ? K(p, t, l) : vt(m / h, l, t, 2);
207
+ }
208
+ } : a ? {
209
+ note: a,
210
+ format: (p) => {
211
+ const m = ie(p, t);
212
+ return m === void 0 ? K(p, t, l) : K(m, {
213
+ ...t,
214
+ kind: "number",
215
+ minorUnits: !1,
216
+ currency: void 0,
217
+ symbol: void 0
218
+ }, l);
219
+ }
220
+ } : i;
221
+ }
222
+ var $t = /* @__PURE__ */ g("<p class=lens-print-formula-unit>"), _t = /* @__PURE__ */ g("<p class=lens-print-formula-note>"), wt = /* @__PURE__ */ g("<div class=lens-print-formula><ol class=lens-print-flow>"), Me = /* @__PURE__ */ g("<small>"), yt = /* @__PURE__ */ g("<li class=lens-print-flow-stage><span class=lens-print-flow-op></span><span class=lens-print-flow-label></span><span class=lens-print-flow-value>"), kt = /* @__PURE__ */ g("<div class=lens-print-formula><ul class=lens-print-hierarchy>"), xt = /* @__PURE__ */ g("<em>"), Ct = /* @__PURE__ */ g("<span class=lens-print-hierarchy-reconcile>"), St = /* @__PURE__ */ g("<li class=lens-print-hierarchy-row><span class=lens-print-hierarchy-label></span><span class=lens-print-hierarchy-value></span><span class=lens-print-hierarchy-share>"), Ft = /* @__PURE__ */ g('<div class="lens-print-formula lens-print-relationship"><p class=lens-print-relationship-claim></p><div class=lens-print-relationship-ends></div><p class=lens-print-formula-note>'), Mt = /* @__PURE__ */ g("<span aria-hidden=true class=lens-print-relationship-glyph>"), Dt = /* @__PURE__ */ g("<div class=lens-print-relationship-end><span class=lens-print-relationship-label></span><span class=lens-print-relationship-value>");
223
+ function Pt(e, t) {
224
+ const l = q();
225
+ return j(() => {
226
+ if (t.frame)
227
+ return Qe(e, t.frame, {
228
+ missingColumn: (i) => l("panel.missingColumn", "Panel data is missing the “{column}” column.", {
229
+ column: i
230
+ }),
231
+ duplicateKey: (i) => l("panel.duplicateKey", "Panel data has a duplicate key “{key}”.", {
232
+ key: i
233
+ })
234
+ });
235
+ })();
236
+ }
237
+ function te(e, t, l = "value") {
238
+ const i = e.encoding[l];
239
+ return (n) => K(n, i ? e.format[i] : void 0, t);
240
+ }
241
+ function Tt(e) {
242
+ const t = q(), l = te(e.panel, e.locale), i = j(() => {
243
+ const c = [];
244
+ return me(e.panel, e.join, (s) => (c.push(s), "")), ne(c, e.panel.encoding.value ? e.panel.format[e.panel.encoding.value] : void 0, e.locale);
245
+ }), n = j(() => me(e.panel, e.join, (c) => i().format(c))), a = j(() => tt(e.panel, e.join));
246
+ return d(y, {
247
+ get when() {
248
+ return n().length > 0;
249
+ },
250
+ get children() {
251
+ var c = wt(), s = c.firstChild;
252
+ return r(c, d(y, {
253
+ get when() {
254
+ return i().note;
255
+ },
256
+ get children() {
257
+ var o = $t();
258
+ return r(o, () => i().note), o;
259
+ }
260
+ }), s), r(s, d(L, {
261
+ get each() {
262
+ return n();
263
+ },
264
+ children: (o) => (() => {
265
+ var h = yt(), f = h.firstChild, p = f.nextSibling, m = p.nextSibling;
266
+ return r(f, () => o.operator), r(p, () => o.stage.label, null), r(p, d(y, {
267
+ get when() {
268
+ return o.stage.caption;
269
+ },
270
+ get children() {
271
+ var $ = Me();
272
+ return r($, () => o.stage.caption), $;
273
+ }
274
+ }), null), r(m, (() => {
275
+ var $ = E(() => !!o.showDash);
276
+ return () => $() ? "—" : o.text;
277
+ })(), null), r(m, d(X, {
278
+ get confidence() {
279
+ return o.confidence;
280
+ },
281
+ get availability() {
282
+ return o.availability;
283
+ }
284
+ }), null), I(() => R(h, "data-result", o.role === "result" || void 0)), h;
285
+ })()
286
+ })), r(c, d(y, {
287
+ get when() {
288
+ return a() !== void 0;
289
+ },
290
+ get children() {
291
+ var o = _t();
292
+ return r(o, () => t("flow.difference", "Difference: {delta}", {
293
+ delta: l(a())
294
+ })), o;
295
+ }
296
+ }), null), c;
297
+ }
298
+ });
299
+ }
300
+ function At(e) {
301
+ const t = q(), l = te(e.panel, e.locale), i = te(e.panel, e.locale, "share"), n = j(() => nt(e.panel, e.join, l, i));
302
+ return d(y, {
303
+ get when() {
304
+ return n().length > 0;
305
+ },
306
+ get children() {
307
+ var a = kt(), c = a.firstChild;
308
+ return r(c, d(L, {
309
+ get each() {
310
+ return n();
311
+ },
312
+ children: (s) => (() => {
313
+ var o = St(), h = o.firstChild, f = h.nextSibling, p = f.nextSibling;
314
+ return r(h, () => s.row.label, null), r(h, d(y, {
315
+ get when() {
316
+ return s.row.unallocated;
317
+ },
318
+ get children() {
319
+ var m = xt();
320
+ return r(m, () => t("hierarchy.unallocated", "Unallocated")), m;
321
+ }
322
+ }), null), r(h, d(y, {
323
+ get when() {
324
+ return s.row.description;
325
+ },
326
+ get children() {
327
+ var m = Me();
328
+ return r(m, () => s.row.description), m;
329
+ }
330
+ }), null), r(f, (() => {
331
+ var m = E(() => !!s.showDash);
332
+ return () => m() ? "—" : s.valueText;
333
+ })(), null), r(f, d(X, {
334
+ get confidence() {
335
+ return s.confidence;
336
+ },
337
+ get availability() {
338
+ return s.availability;
339
+ }
340
+ }), null), r(p, () => s.shareText ?? ""), r(o, d(y, {
341
+ get when() {
342
+ return s.reconcile;
343
+ },
344
+ get children() {
345
+ var m = Ct();
346
+ return r(m, (() => {
347
+ var $ = E(() => !!s.reconcile.balanced);
348
+ return () => $() ? t("hierarchy.allocated", "Allocated 100%") : t("hierarchy.difference", "Difference: {delta}", {
349
+ delta: l(s.reconcile.delta)
350
+ });
351
+ })()), m;
352
+ }
353
+ }), null), I((m) => {
354
+ var $ = s.isParent || void 0, b = {
355
+ "--lens-depth": s.depth
356
+ };
357
+ return $ !== m.e && R(o, "data-parent", m.e = $), m.t = _e(o, b, m.t), m;
358
+ }, {
359
+ e: void 0,
360
+ t: void 0
361
+ }), o;
362
+ })()
363
+ })), a;
364
+ }
365
+ });
366
+ }
367
+ function Kt(e) {
368
+ const t = q(), l = te(e.panel, e.locale), i = e.panel.metricRelationship;
369
+ return d(y, {
370
+ when: i,
371
+ children: (n) => {
372
+ const a = pe(e.panel, e.join, n().source, l), c = pe(e.panel, e.join, n().target, l), s = Ze(n()).horizontal;
373
+ return (() => {
374
+ var o = Ft(), h = o.firstChild, f = h.nextSibling, p = f.nextSibling;
375
+ return r(h, () => rt(t, n(), (a == null ? void 0 : a.end.label) ?? "", (c == null ? void 0 : c.end.label) ?? "")), r(f, d(L, {
376
+ each: [a, c],
377
+ children: (m, $) => (() => {
378
+ var b = Dt(), x = b.firstChild, v = x.nextSibling;
379
+ return r(x, () => (m == null ? void 0 : m.end.label) ?? "—"), r(v, (() => {
380
+ var _ = E(() => !!(!m || m.showDash));
381
+ return () => _() ? "—" : m.valueText;
382
+ })(), null), r(v, d(X, {
383
+ get confidence() {
384
+ return m == null ? void 0 : m.confidence;
385
+ },
386
+ get availability() {
387
+ return m == null ? void 0 : m.availability;
388
+ }
389
+ }), null), r(b, d(y, {
390
+ get when() {
391
+ return $() === 0;
392
+ },
393
+ get children() {
394
+ var _ = Mt();
395
+ return r(_, s), _;
396
+ }
397
+ }), null), b;
398
+ })()
399
+ })), r(p, () => t(`relationship.type.${n().type}`, et[n().type]), null), r(p, (() => {
400
+ var m = E(() => !!n().note);
401
+ return () => m() ? ` · ${n().note}` : "";
402
+ })(), null), o;
403
+ })();
404
+ }
405
+ });
406
+ }
407
+ function De(e) {
408
+ const t = j(() => V(e.section)), l = Pt(t(), e.section), i = e.section.document.meta.locale;
409
+ return t().kind === "metric_relationship" ? d(Kt, {
410
+ join: l,
411
+ locale: i,
412
+ get panel() {
413
+ return t();
414
+ }
415
+ }) : !l || l.kind !== "ok" ? null : t().kind === "metric_flow" ? d(Tt, {
416
+ join: l,
417
+ locale: i,
418
+ get panel() {
419
+ return t();
420
+ }
421
+ }) : t().kind === "metric_hierarchy" ? d(At, {
422
+ join: l,
423
+ locale: i,
424
+ get panel() {
425
+ return t();
426
+ }
427
+ }) : null;
428
+ }
429
+ function Z(e, t, l) {
430
+ const i = A(t, e.encoding.label ?? e.encoding.category ?? e.encoding.id), n = A(t, e.encoding.value), a = A(t, e.encoding.series);
431
+ if (n < 0) return [];
432
+ const c = e.encoding.value ? e.format[e.encoding.value] : void 0, s = [];
433
+ return t.rows.forEach((o, h) => {
434
+ const f = Q(o[n]);
435
+ f !== void 0 && s.push({
436
+ row: h,
437
+ group: a >= 0 ? W(o[a]) : "",
438
+ label: i >= 0 ? W(o[i]) : W(o[n]),
439
+ value: f,
440
+ formatted: K(o[n], c, l)
441
+ });
442
+ }), s;
443
+ }
444
+ function G(e, t) {
445
+ return new Intl.NumberFormat(e, {
446
+ style: "percent",
447
+ minimumFractionDigits: t >= 0.1 ? 0 : 1,
448
+ maximumFractionDigits: 1
449
+ }).format(t);
450
+ }
451
+ function Nt(e, t, l) {
452
+ const i = Z(e, t, l).filter(({ value: f }) => f > 0);
453
+ if (i.length < 2) return;
454
+ const n = [...i].sort((f, p) => p.value - f.value)[0], a = i.filter(({ group: f }) => f === n.group);
455
+ if (a.length < 2) return;
456
+ const c = a.reduce((f, { value: p }) => f + p, 0);
457
+ if (c <= 0) return;
458
+ const s = [...a].sort((f, p) => p.value - f.value), o = s[0];
459
+ if (s.length === 2)
460
+ return {
461
+ labelKey: "print.factPair",
462
+ fallback: "{label} carries {share} of the total; the remainder is {rest}.",
463
+ vars: {
464
+ label: o.label,
465
+ share: G(l, o.value / c),
466
+ rest: s[1].label
467
+ }
468
+ };
469
+ const h = s.slice(0, 3).reduce((f, { value: p }) => f + p, 0);
470
+ return s.length === 3 ? {
471
+ labelKey: "print.factPartitionAll",
472
+ fallback: "{label} is the largest of the three at {share}; together they make the whole.",
473
+ vars: {
474
+ label: o.label,
475
+ share: G(l, o.value / c)
476
+ }
477
+ } : {
478
+ labelKey: "print.factPartition",
479
+ fallback: "{label} is the largest share at {share}; the three largest together make {top}, ahead of {rest} smaller categories.",
480
+ vars: {
481
+ label: o.label,
482
+ share: G(l, o.value / c),
483
+ top: G(l, h / c),
484
+ rest: s.length - 3
485
+ }
486
+ };
487
+ }
488
+ function Rt(e, t, l) {
489
+ var s;
490
+ const i = (s = e.radial) == null ? void 0 : s.max;
491
+ if (!i || i <= 0) return;
492
+ const a = Z(e, t, l).reduce((o, { value: h }) => o + Math.max(0, h), 0);
493
+ if (a <= 0) return;
494
+ const c = e.encoding.value ? e.format[e.encoding.value] : void 0;
495
+ return {
496
+ labelKey: "print.factProgress",
497
+ fallback: "{value} of {max} — {share} covered.",
498
+ vars: {
499
+ value: K(a, c, l),
500
+ max: K(i, c, l),
501
+ share: G(l, Math.min(a / i, 1))
502
+ }
503
+ };
504
+ }
505
+ function Lt(e, t, l) {
506
+ const i = Z(e, t, l);
507
+ if (i.length < 2) return;
508
+ const n = A(t, e.encoding.final), a = i[0], c = i.find(({ row: h }) => {
509
+ var f;
510
+ return n >= 0 && ((f = t.rows[h]) == null ? void 0 : f[n]) === !0;
511
+ }) ?? i[i.length - 1], s = i.filter((h) => h !== a && h !== c && h.value < 0).sort((h, f) => h.value - f.value)[0];
512
+ if (!s)
513
+ return {
514
+ labelKey: "print.factBridgeEnds",
515
+ fallback: "{start} becomes {end}.",
516
+ vars: { start: a.formatted, end: c.formatted }
517
+ };
518
+ const o = {
519
+ start: a.formatted,
520
+ end: c.formatted,
521
+ label: s.label,
522
+ amount: s.formatted
523
+ };
524
+ return a.value <= 0 ? {
525
+ labelKey: "print.factBridgeBare",
526
+ fallback: "{start} becomes {end}; the largest deduction is {label} at {amount}.",
527
+ vars: o
528
+ } : {
529
+ labelKey: "print.factBridge",
530
+ fallback: "{start} becomes {end}; the largest deduction is {label} at {amount} — {share} of the opening amount.",
531
+ vars: { ...o, share: G(l, Math.abs(s.value) / a.value) }
532
+ };
533
+ }
534
+ function Vt(e, t, l) {
535
+ const i = Z(e, t, l);
536
+ if (i.length < 2) return;
537
+ const n = i[0], a = i[i.length - 1], c = [...i].sort((h, f) => f.value - h.value)[0], s = {
538
+ first: n.formatted,
539
+ firstLabel: n.label,
540
+ last: a.formatted,
541
+ lastLabel: a.label,
542
+ peak: c.formatted,
543
+ peakLabel: c.label
544
+ };
545
+ if (n.value === 0)
546
+ return {
547
+ labelKey: "print.factSeriesBare",
548
+ fallback: "{first} at {firstLabel}, {last} at {lastLabel}; the peak is {peak} at {peakLabel}.",
549
+ vars: s
550
+ };
551
+ const o = (a.value - n.value) / Math.abs(n.value);
552
+ return {
553
+ labelKey: "print.factSeries",
554
+ fallback: "{first} at {firstLabel} to {last} at {lastLabel} ({change}); the peak is {peak} at {peakLabel}.",
555
+ vars: { ...s, change: `${o >= 0 ? "+" : "−"}${G(l, Math.abs(o))}` }
556
+ };
557
+ }
558
+ function qt(e, t, l) {
559
+ if (t.rows.length < 2) return;
560
+ const n = [...Z(e, t, l)].sort((a, c) => c.value - a.value)[0];
561
+ return n ? {
562
+ labelKey: "print.factTable",
563
+ fallback: "{rows} rows; the largest is {label} at {value}.",
564
+ vars: { rows: t.rows.length, label: n.label, value: n.formatted }
565
+ } : {
566
+ labelKey: "print.factRows",
567
+ fallback: "{rows} rows.",
568
+ vars: { rows: t.rows.length }
569
+ };
570
+ }
571
+ function It(e, t, l = 4) {
572
+ var n;
573
+ const i = [];
574
+ for (const a of e) {
575
+ if (i.length >= l) break;
576
+ const { panel: c, frame: s } = a, o = c.encoding.value, h = o ? c.format[o] : void 0, f = s ? A(s, o) : -1, p = (s == null ? void 0 : s.rows.length) === 1 && f >= 0 ? (n = s.rows[0]) == null ? void 0 : n[f] : void 0, m = p !== void 0 ? K(p, h, t) : c.total !== void 0 ? K(c.total, h, t) : void 0;
577
+ m && i.push({ id: a.id, label: c.title, value: m });
578
+ }
579
+ return i.length >= 2 ? i : [];
580
+ }
581
+ function jt(e, t, l) {
582
+ var i;
583
+ if (!(!t || t.rows.length === 0))
584
+ return ((i = e.radial) == null ? void 0 : i.mode) === "progress" ? Rt(e, t, l) : e.semantics === "partition" ? Nt(e, t, l) : e.semantics === "reconciliation" ? Lt(e, t, l) : e.semantics === "series" && (e.kind === "line" || e.kind === "area") ? Vt(e, t, l) : qt(e, t, l);
585
+ }
586
+ function Bt(e) {
587
+ var l, i;
588
+ const t = [];
589
+ for (const n of e.panels) {
590
+ t.push(n);
591
+ for (const a of ((l = n.metricFlow) == null ? void 0 : l.stages) ?? []) t.push(a);
592
+ for (const a of ((i = n.metricHierarchy) == null ? void 0 : i.rows) ?? []) t.push(a);
593
+ n.metricRelationship && t.push(n.metricRelationship.source, n.metricRelationship.target);
594
+ }
595
+ return t;
596
+ }
597
+ const Et = /* @__PURE__ */ new Set(["stat", "metric_relationship"]);
598
+ function Ot(e) {
599
+ return e.kind === "stat" || e.kind === "metric_relationship" || e.kind === "pie" || e.kind === "donut" || e.kind === "radial" ? "half" : "full";
600
+ }
601
+ function Ut(e) {
602
+ return [...e.groups ?? []].reverse().find((t) => t.label || t.caption);
603
+ }
604
+ function Wt(e, t, l) {
605
+ const i = t == null ? void 0 : t.trim();
606
+ return i || (e === 0 ? l : "");
607
+ }
608
+ function zt(e, t, l) {
609
+ const i = e.document, n = [], a = [], c = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set();
610
+ let o = 0;
611
+ const h = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map();
612
+ for (const u of e.sections) {
613
+ if (u.owner) {
614
+ const F = p.get(u.owner) ?? [];
615
+ F.push(u), p.set(u.owner, F);
616
+ continue;
617
+ }
618
+ const w = u.root ? h : f, k = w.get(u.panel.id) ?? [];
619
+ k.push(u), w.set(u.panel.id, k);
620
+ }
621
+ const m = (u, w) => {
622
+ const k = V(u), F = dt(u.frame);
623
+ if (!F)
624
+ return a.push(k.title), !1;
625
+ if (w === "owned") return !0;
626
+ const C = c.get(F);
627
+ return C !== void 0 && (w === "detail" || C === u.panel.id) ? !1 : (C === void 0 && c.set(F, u.panel.id), !0);
628
+ }, $ = (u, w) => {
629
+ const k = n[n.length - 1];
630
+ if (!u && k) return k;
631
+ if (k && k.title === u)
632
+ return !k.caption && w && (k.caption = w), k;
633
+ const F = {
634
+ id: `chapter-${n.length + 1}`,
635
+ number: n.length + 1,
636
+ title: u,
637
+ ...w ? { caption: w } : {},
638
+ figures: [],
639
+ details: []
640
+ };
641
+ return n.push(F), F;
642
+ }, b = (u, w, k) => {
643
+ var T;
644
+ if (!m(w, "figure")) return;
645
+ const F = V(w), C = (((T = w.frame) == null ? void 0 : T.rows.length) ?? 0) <= 1, P = (p.get(w.panel.id) ?? []).filter((N) => m(N, "owned") ? (s.add(N), !0) : !1);
646
+ u.figures.push({
647
+ section: w,
648
+ number: `${u.number}.${u.figures.length + 1}`,
649
+ chart: Se.has(F.kind) && !C,
650
+ metric: C,
651
+ // A reading that prints its calculation needs the width to hold it; half
652
+ // a page beside another figure is where the two collide.
653
+ width: P.length > 0 ? "full" : C ? "half" : Ot(F),
654
+ ...k && (k.label || k.caption) ? { group: { id: k.id, ...k.label ? { label: k.label } : {}, ...k.caption ? { caption: k.caption } : {} } } : {},
655
+ // The opening chapter's single-value readings are the dashboard's
656
+ // headline; the cover carries them so page one is already informative.
657
+ kpi: u.number === 1 && C && Et.has(F.kind) && o++ < 6,
658
+ breakdown: P
659
+ });
660
+ }, x = (u, w) => {
661
+ m(w, "detail") && u.details.push({
662
+ section: w,
663
+ number: `A${u.number}.${u.details.length + 1}`,
664
+ // The first segments of the trail repeat the appendix group's own title
665
+ // on every one of its nine details. What locates a detail is where it
666
+ // ends, not the path it shares with its neighbours.
667
+ trail: w.breadcrumb.filter((k, F, C) => k && k !== C[F - 1]).slice(-2).join(" › ")
668
+ });
669
+ }, v = (u, w, k) => {
670
+ for (const F of h.get(w) ?? [])
671
+ s.add(F), b(u, F, k);
672
+ for (const F of f.get(w) ?? [])
673
+ s.add(F), x(u, F);
674
+ };
675
+ for (const u of i.layout.rows) {
676
+ const w = Wt(n.length, u.heading, t), k = u.panels.flatMap((C) => C.groups ?? []).map((C) => {
677
+ var P;
678
+ return (P = C.caption) == null ? void 0 : P.trim();
679
+ }).find((C) => !!C), F = $(w, k);
680
+ for (const C of u.panels) v(F, C.panelId, Ut(C));
681
+ }
682
+ const _ = e.sections.filter((u) => !s.has(u));
683
+ if (_.length > 0) {
684
+ const u = $(l, void 0);
685
+ for (const w of _)
686
+ w.root ? b(u, w) : x(u, w);
687
+ }
688
+ const S = n.flatMap((u) => u.figures.filter(({ kpi: w }) => w)), M = n.map((u) => ({ ...u, figures: u.figures.filter(({ kpi: w }) => !w) })).filter((u) => u.figures.length > 0 || u.details.length > 0);
689
+ M.forEach((u, w) => {
690
+ u.number = w + 1, u.figures.forEach((k, F) => {
691
+ k.number = `${u.number}.${F + 1}`;
692
+ }), u.details.forEach((k, F) => {
693
+ k.number = `A${u.number}.${F + 1}`;
694
+ });
695
+ });
696
+ const D = [...S, ...M.flatMap((u) => u.figures)].filter(({ section: u }) => {
697
+ const w = V(u), k = Y(w);
698
+ return k !== void 0 && k.value !== "verified";
699
+ });
700
+ return {
701
+ chapters: M,
702
+ appendix: M.filter((u) => u.details.length > 0),
703
+ kpis: S,
704
+ notes: Ht(i),
705
+ missing: a,
706
+ estimated: D.length,
707
+ qualities: Bt(i),
708
+ figureCount: M.reduce((u, w) => u + w.figures.length, 0),
709
+ detailCount: M.reduce((u, w) => u + w.details.length, 0)
710
+ };
711
+ }
712
+ function Ht(e) {
713
+ var n, a, c;
714
+ const t = [], l = /* @__PURE__ */ new Set(), i = (s, o) => {
715
+ const h = `${s}::${o ?? ""}`;
716
+ !s.trim() || l.has(h) || (l.add(h), t.push({ id: `note-${t.length + 1}`, label: s, ...o ? { detail: o } : {} }));
717
+ };
718
+ for (const s of e.panels) {
719
+ (n = s.status) != null && n.label && i(s.title, s.status.label), (a = s.metricRelationship) != null && a.note && i(s.title, s.metricRelationship.note);
720
+ for (const o of ((c = s.metricFlow) == null ? void 0 : c.stages) ?? [])
721
+ o.caption && i(`${s.title} · ${o.label}`, o.caption);
722
+ }
723
+ return t;
724
+ }
725
+ function Gt(e) {
726
+ const t = e.document.theme, l = Object.values(t.palette).filter((a) => a.trim() !== ""), i = /* @__PURE__ */ new Map();
727
+ if (l.length === 0) return i;
728
+ let n = 0;
729
+ for (const a of e.sections)
730
+ for (const c of Qt(a)) {
731
+ if (!c || i.has(c)) continue;
732
+ const s = t.series[c];
733
+ if (s) {
734
+ i.set(c, t.palette[s] ?? s);
735
+ continue;
736
+ }
737
+ i.set(c, l[n % l.length]), n += 1;
738
+ }
739
+ return i;
740
+ }
741
+ function Qt(e) {
742
+ const t = e.frame;
743
+ if (!t) return [];
744
+ const l = V(e), i = A(t, l.encoding.label ?? l.encoding.category ?? l.encoding.id);
745
+ return i < 0 ? [] : t.rows.map((n) => W(n[i]).trim());
746
+ }
747
+ function Jt(e, t) {
748
+ if (t.size === 0) return e;
749
+ const l = {};
750
+ for (const [i, n] of Object.entries(e.series))
751
+ i.includes(":") || (l[i] = n);
752
+ for (const [i, n] of t) l[i] = n;
753
+ return { ...e, series: l };
754
+ }
755
+ var Yt = /* @__PURE__ */ g("<div class=lens-print-chart>"), Xt = /* @__PURE__ */ g("<p class=lens-print-tone-key>"), Zt = /* @__PURE__ */ g('<div class="lens-print-chart lens-print-chart-waterfall">'), en = /* @__PURE__ */ g("<span><i aria-hidden=true>"), tn = /* @__PURE__ */ g("<table class=lens-print-data><thead><tr><th></th><th data-align=right></th></tr></thead><tbody>"), J = /* @__PURE__ */ g("<small>"), nn = /* @__PURE__ */ g("<tr><td></td><td data-align=right>"), rn = /* @__PURE__ */ g("<tr data-role=split><td></td><td data-align=right>"), ln = /* @__PURE__ */ g("<p class=lens-print-empty>"), an = /* @__PURE__ */ g('<table class="lens-print-data lens-print-data-wide"><thead><tr></tr></thead><tbody>'), sn = /* @__PURE__ */ g("<th>"), on = /* @__PURE__ */ g("<tr>"), cn = /* @__PURE__ */ g("<em class=lens-print-cell-secondary>"), un = /* @__PURE__ */ g("<span aria-hidden=true class=lens-print-cell-bar>"), dn = /* @__PURE__ */ g("<td>"), hn = /* @__PURE__ */ g("<th data-align=right>"), fn = /* @__PURE__ */ g("<table><thead><tr><th></th><th data-align=right></th></tr></thead><tbody>"), pn = /* @__PURE__ */ g("<span class=lens-print-series> · "), mn = /* @__PURE__ */ g("<span aria-hidden=true class=lens-print-share-bar>"), gn = /* @__PURE__ */ g("<td class=lens-print-share data-align=right><span>"), bn = /* @__PURE__ */ g("<tr><td><span class=lens-print-swatch></span></td><td data-align=right>"), Pe = /* @__PURE__ */ g("<p class=lens-print-truncated>"), vn = /* @__PURE__ */ g("<span class=lens-print-figure-authored>"), $n = /* @__PURE__ */ g("<span>"), _n = /* @__PURE__ */ g("<p class=lens-print-figure-note>"), wn = /* @__PURE__ */ g("<sup class=lens-print-footnote-marker>"), yn = /* @__PURE__ */ g("<ol class=lens-print-footnotes>"), kn = /* @__PURE__ */ g("<li><span class=lens-print-footnote-index>"), xn = /* @__PURE__ */ g("<div class=lens-print-breakdown><p class=lens-print-breakdown-head>"), Cn = /* @__PURE__ */ g("<p class=lens-print-breakdown-term><span></span><span>"), Sn = /* @__PURE__ */ g("<p class=lens-print-breakdown-title>"), Fn = /* @__PURE__ */ g("<div class=lens-print-breakdown-part>"), Mn = /* @__PURE__ */ g("<figure>"), Te = /* @__PURE__ */ g("<span class=lens-print-chip>"), Dn = /* @__PURE__ */ g("<span class=lens-print-chip data-tone=neutral>: "), Pn = /* @__PURE__ */ g("<span class=lens-print-figure-total>: "), Tn = /* @__PURE__ */ g("<figure><figcaption class=lens-print-figure-head><div class=lens-print-figure-title><span class=lens-print-figure-number></span><h3></h3></div><p class=lens-print-figure-meta>"), An = /* @__PURE__ */ g('<svg aria-hidden=true class=lens-print-sparkline preserveAspectRatio=none viewBox="0 0 100 26"><polyline fill=none stroke-linecap=round stroke-linejoin=round>'), Kn = /* @__PURE__ */ g("<span class=lens-print-figure-number>"), Nn = /* @__PURE__ */ g("<span class=lens-print-kpi-delta>"), Rn = /* @__PURE__ */ g("<p class=lens-print-kpi-trend>"), Ln = /* @__PURE__ */ g("<p class=lens-print-kpi-target>: "), Vn = /* @__PURE__ */ g("<p class=lens-print-kpi-caption>"), qn = /* @__PURE__ */ g("<div class=lens-print-kpi><p class=lens-print-kpi-label></p><p class=lens-print-kpi-value></p><p class=lens-print-kpi-chips>"), In = /* @__PURE__ */ g("<p class=lens-print-cover-subtitle>"), ce = /* @__PURE__ */ g("<div><dt></dt><dd>"), jn = /* @__PURE__ */ g("<div class=lens-print-kpis>"), Bn = /* @__PURE__ */ g("<p class=lens-print-cover-flag>"), En = /* @__PURE__ */ g("<header class=lens-print-cover><div class=lens-print-cover-head><p class=lens-print-kicker></p><h1></h1></div><dl class=lens-print-cover-meta><div><dt></dt><dd></dd></div><div><dt></dt><dd>"), On = /* @__PURE__ */ g("<li><span class=lens-print-contents-number>A</span><span class=lens-print-contents-title>"), Un = /* @__PURE__ */ g("<section class=lens-print-contents><h2></h2><ol><li><span class=lens-print-contents-number>B</span><span class=lens-print-contents-title></span></li></ol><p class=lens-print-contents-note>"), Wn = /* @__PURE__ */ g("<span class=lens-print-contents-caption>"), zn = /* @__PURE__ */ g("<li><span class=lens-print-contents-number></span><span class=lens-print-contents-title>"), Hn = /* @__PURE__ */ g("<div class=lens-print-lead-group>"), Gn = /* @__PURE__ */ g("<div class=lens-print-pair>"), Qn = /* @__PURE__ */ g("<h3>"), Jn = /* @__PURE__ */ g("<p>"), Yn = /* @__PURE__ */ g("<div class=lens-print-strip>"), Xn = /* @__PURE__ */ g("<p class=lens-print-lead>"), Zn = /* @__PURE__ */ g("<p class=lens-print-chapter-headline>"), er = /* @__PURE__ */ g("<section class=lens-print-chapter><header class=lens-print-chapter-head><p class=lens-print-runninghead> · <!>. </p><h2><span class=lens-print-chapter-number></span></h2></header><div class=lens-print-grid>"), tr = /* @__PURE__ */ g("<span><span class=lens-print-chapter-headline-label>"), nr = /* @__PURE__ */ g("<p class=lens-print-detail-note>"), rr = /* @__PURE__ */ g("<article class=lens-print-detail><header><span class=lens-print-detail-number></span><h4></h4><p class=lens-print-detail-trail>"), lr = /* @__PURE__ */ g("<section class=lens-print-appendix><header class=lens-print-chapter-head><p class=lens-print-runninghead> · </p><h2><span class=lens-print-chapter-number>A</span></h2><p class=lens-print-lead>"), ir = /* @__PURE__ */ g('<div class=lens-print-appendix-chapter><h3>A<!>. </h3><div class="lens-print-grid lens-print-grid-dense">'), ar = /* @__PURE__ */ g("<div class=lens-print-glossary><h3></h3><dl>"), sr = /* @__PURE__ */ g("<dl class=lens-print-notes>"), ae = /* @__PURE__ */ g("<li>"), or = /* @__PURE__ */ g("<div class=lens-print-limits><h3></h3><p></p><ul>"), cr = /* @__PURE__ */ g("<section class=lens-print-method><header class=lens-print-chapter-head><p class=lens-print-runninghead> · </p><h2><span class=lens-print-chapter-number>B</span></h2></header><p class=lens-print-provenance>: <!> · <!> · "), ur = /* @__PURE__ */ g("<div><dt><span class=lens-print-chip></span></dt><dd>"), dr = /* @__PURE__ */ g("<article class=lens-print-report>");
756
+ const Ae = Be(/* @__PURE__ */ new Map());
757
+ function Ke(e) {
758
+ const t = Ee(Ae);
759
+ return j(() => Jt(e.document.theme, t))();
760
+ }
761
+ function hr(e, t, l) {
762
+ var F;
763
+ const i = e.frame;
764
+ if (!i) return {
765
+ rows: []
766
+ };
767
+ const n = V(e), a = A(i, n.encoding.label ?? n.encoding.category ?? n.encoding.id), c = A(i, n.encoding.value), s = A(i, n.encoding.series), o = A(i, n.encoding.id), h = n.encoding.value, f = h ? n.format[h] : void 0, p = i.rows.map((C) => Q(C[c])), m = /* @__PURE__ */ new Map(), $ = n.encoding.series ? n.format[n.encoding.series] : void 0;
768
+ i.rows.forEach((C, P) => {
769
+ const T = s >= 0 ? W(C[s]) : "", N = p[P];
770
+ N !== void 0 && N >= 0 && m.set(T, (m.get(T) ?? 0) + N);
771
+ });
772
+ for (const C of ((F = n.radial) == null ? void 0 : F.mode) === "partition" ? n.radial.rings ?? [] : [])
773
+ m.has(C.key) && m.set(C.key, C.total);
774
+ const b = n.semantics === "reconciliation" && A(i, n.encoding.cut) >= 0, x = A(i, n.encoding.final), v = (C, P) => {
775
+ const T = c >= 0 ? C[c] : void 0;
776
+ if (!b || P === 0 || x >= 0 && C[x] === !0) return T;
777
+ const N = p[P], B = p[P - 1];
778
+ return N === void 0 || B === void 0 ? T : N - B;
779
+ }, _ = A(i, n.encoding.category), S = n.kind === "pie" || n.kind === "donut" || n.kind === "radial", M = i.rows.map((C) => {
780
+ var B;
781
+ const P = le(C[_ >= 0 ? _ : a]), T = o >= 0 ? le(C[o]) : "", N = s >= 0 ? le(C[s]) : "";
782
+ return {
783
+ category: P,
784
+ nodeKey: T || He(P, ((B = n.radial) == null ? void 0 : B.mode) === "partition" ? "" : N)
785
+ };
786
+ }), D = /* @__PURE__ */ new Map();
787
+ M.forEach(({
788
+ nodeKey: C,
789
+ category: P
790
+ }) => {
791
+ const T = C ?? P;
792
+ D.has(T) || D.set(T, D.size);
793
+ });
794
+ const u = xe(l, n, i, e.root), w = ye(l, n, {
795
+ colors: i.colors,
796
+ positional: e.root,
797
+ labels: ke(i, n)
798
+ }), k = ne(i.rows.map((C, P) => v(C, P)), f, t);
799
+ return {
800
+ unit: k.note,
801
+ rows: i.rows.map((C, P) => {
802
+ var de, he, fe;
803
+ const T = v(C, P), N = p[P], B = s >= 0 ? W(C[s]) : "", H = ((de = n.radial) == null ? void 0 : de.mode) === "progress" ? n.radial.max : m.get(B), z = (n.semantics === "partition" || ((he = n.radial) == null ? void 0 : he.mode) === "progress") && N !== void 0 && N >= 0 && H && H > 0 ? N / H : void 0, U = a >= 0 ? W(C[a]) : W(C[o]), {
804
+ category: O,
805
+ nodeKey: re
806
+ } = M[P], Ie = ((fe = n.radial) == null ? void 0 : fe.mode) === "partition" ? D.get(re ?? O) : P;
807
+ return {
808
+ key: `${B}:${o >= 0 ? W(C[o]) : P}`,
809
+ ...B && $ ? {
810
+ series: K(C[s], $, t)
811
+ } : {},
812
+ label: U,
813
+ value: c >= 0 ? k.format(T) : "—",
814
+ exact: c >= 0 ? Ce(T, f, t) : void 0,
815
+ ...z === void 0 ? {} : {
816
+ ratio: z,
817
+ // A row worth 1.5 million printed as «0,0 %» reads as nothing at all.
818
+ // Below the resolution of the column, the share says it is below it.
819
+ share: z > 0 && z < 1e-3 ? `< ${new Intl.NumberFormat(t, {
820
+ style: "percent",
821
+ minimumFractionDigits: 1
822
+ }).format(1e-3)}` : new Intl.NumberFormat(t, {
823
+ style: "percent",
824
+ minimumFractionDigits: 1,
825
+ maximumFractionDigits: 1
826
+ }).format(z)
827
+ },
828
+ color: S ? w(O, Ie, re) : s >= 0 ? u(B, P) : w(U, P)
829
+ };
830
+ })
831
+ };
832
+ }
833
+ function Ne(e) {
834
+ var s;
835
+ const t = j(() => V(e.section))(), l = Ke(e.section), i = (o, h) => K(h, t.format[o], e.section.document.meta.locale), n = (o, h) => Xe(h, t.format[o], e.section.document.meta.locale), a = e.section;
836
+ if (!a.frame || a.frame.rows.length <= 1 || !Se.has(t.kind)) return null;
837
+ const c = t.kind === "pie" || t.kind === "donut" || t.kind === "radial" ? {
838
+ ...t.presentation,
839
+ sliceLabels: ((s = t.presentation) == null ? void 0 : s.sliceLabels) ?? "percent",
840
+ // A wider band on paper: the share is written inside the ring, and a
841
+ // thin ring cannot hold five characters.
842
+ fill: !0
843
+ } : t.presentation;
844
+ return (() => {
845
+ var o = Yt();
846
+ return r(o, d(ze, {
847
+ get input() {
848
+ return {
849
+ kind: t.kind,
850
+ frame: a.frame,
851
+ encoding: t.encoding,
852
+ seriesColor: xe(l, t, a.frame, a.root),
853
+ rowColor: ye(l, t, {
854
+ colors: a.frame.colors,
855
+ positional: a.root,
856
+ labels: ke(a.frame, t)
857
+ }),
858
+ labels: {
859
+ noData: a.document.i18n["panel.empty"] ?? "No data",
860
+ current: a.document.i18n["chart.series.current"] ?? "Current period",
861
+ previous: a.document.i18n["chart.series.previous"] ?? "Previous"
862
+ },
863
+ format: i,
864
+ formatAxis: n,
865
+ locale: a.document.meta.locale,
866
+ theme: l,
867
+ presentation: c,
868
+ radial: t.radial
869
+ };
870
+ },
871
+ get label() {
872
+ return t.title;
873
+ },
874
+ get panelId() {
875
+ return `print:${a.id}`;
876
+ }
877
+ })), I((h) => ee(o, "height", `${e.height}px`)), o;
878
+ })();
879
+ }
880
+ function Re(e) {
881
+ const t = V(e), l = e.document.meta.locale;
882
+ return j(() => {
883
+ if (!e.frame) return;
884
+ const i = t.encoding.value ?? "value", n = t.encoding.cut ?? "cut", a = (s) => K(s, t.format[i], l), c = (s) => K(s, t.format[n] ?? t.format[i], l);
885
+ return Ue(We(t, e.frame, a, c), a);
886
+ })();
887
+ }
888
+ function fr(e) {
889
+ const t = q(), l = V(e.section), i = Re(e.section), n = e.section.document.meta.locale, a = j(() => {
890
+ if (!i) return;
891
+ const s = i.ticks.length > 5 ? i.ticks.filter((h, f) => f % 2 === 0) : i.ticks, o = new Intl.NumberFormat(n, {
892
+ notation: "compact",
893
+ maximumFractionDigits: 1
894
+ });
895
+ return {
896
+ ...i,
897
+ ticks: s.map((h, f) => f === 0 ? h : {
898
+ ...h,
899
+ label: o.format(h.value)
900
+ })
901
+ };
902
+ }), c = j(() => {
903
+ var s;
904
+ return Array.from(new Set((((s = a()) == null ? void 0 : s.items) ?? []).map((o) => o.tone).filter(Boolean)));
905
+ });
906
+ return d(y, {
907
+ get when() {
908
+ return E(() => !!a())() && a().items.length > 0;
909
+ },
910
+ get children() {
911
+ var s = Zt();
912
+ return r(s, d(Oe, {
913
+ get label() {
914
+ return l.title;
915
+ },
916
+ get model() {
917
+ return a();
918
+ },
919
+ splitCallout: "always"
920
+ }), null), r(s, d(y, {
921
+ get when() {
922
+ return c().length > 1;
923
+ },
924
+ get children() {
925
+ var o = Xt();
926
+ return r(o, d(L, {
927
+ get each() {
928
+ return c();
929
+ },
930
+ children: (h) => (() => {
931
+ var f = en(), p = f.firstChild;
932
+ return R(p, "data-tone", h), r(f, () => h === "positive" ? t("print.toneFavourable", "favourable") : h === "negative" ? t("print.toneAdverse", "adverse") : t("print.toneNeutral", "neutral"), null), f;
933
+ })()
934
+ })), o;
935
+ }
936
+ }), null), s;
937
+ }
938
+ });
939
+ }
940
+ function pr(e) {
941
+ const t = q(), l = V(e.section), i = Re(e.section), n = j(() => ne(((i == null ? void 0 : i.items) ?? []).map((a) => a.value), l.encoding.value ? l.format[l.encoding.value] : void 0, e.section.document.meta.locale));
942
+ return d(y, {
943
+ get when() {
944
+ return i && i.items.length > 0;
945
+ },
946
+ get children() {
947
+ var a = tn(), c = a.firstChild, s = c.firstChild, o = s.firstChild, h = o.nextSibling, f = c.nextSibling;
948
+ return r(o, () => t("print.stage", "Stage")), r(h, () => t("print.value", "Value"), null), r(h, (() => {
949
+ var p = E(() => !!n().note);
950
+ return () => p() && (() => {
951
+ var m = J();
952
+ return r(m, () => n().note), m;
953
+ })();
954
+ })(), null), r(f, d(L, {
955
+ get each() {
956
+ return i.items;
957
+ },
958
+ children: (p) => [(() => {
959
+ var m = nn(), $ = m.firstChild, b = $.nextSibling;
960
+ return r($, () => p.label), r(b, () => n().format(p.value)), I(() => R(m, "data-role", p.kind)), m;
961
+ })(), d(y, {
962
+ get when() {
963
+ return p.formattedSplit;
964
+ },
965
+ get children() {
966
+ var m = rn(), $ = m.firstChild, b = $.nextSibling;
967
+ return r($, () => p.splitLabel || t("print.splitPart", "of which")), r(b, () => p.formattedSplit), m;
968
+ }
969
+ })]
970
+ })), a;
971
+ }
972
+ });
973
+ }
974
+ function mr(e, t) {
975
+ return e.kind === "cascade" && !!t.frame && A(t.frame, e.encoding.cut) >= 0;
976
+ }
977
+ function ue(e) {
978
+ var h;
979
+ const t = q(), l = Ke(e.section), i = e.section, n = e.exact, a = j(() => hr(i, i.document.meta.locale, l));
980
+ if (!i.frame) return (() => {
981
+ var f = ln();
982
+ return r(f, () => t("print.noData", "No data")), f;
983
+ })();
984
+ const c = V(i), s = i.frame;
985
+ if (c.kind === "table" && ((h = c.columns) != null && h.length)) {
986
+ const f = c.columns, p = f.map(({
987
+ field: v
988
+ }) => A(s, v)), m = i.document.meta.locale, $ = f.map((v, _) => {
989
+ const S = p[_];
990
+ return ne(S >= 0 ? s.rows.map((M) => M[S]) : [], c.format[v.field], m);
991
+ }), b = f.map((v) => {
992
+ var S;
993
+ if (v.align) return v.align;
994
+ const _ = (S = c.format[v.field]) == null ? void 0 : S.kind;
995
+ return _ === "money" || _ === "number" || _ === "percent" ? "right" : "left";
996
+ }), x = /* @__PURE__ */ new Map();
997
+ return f.forEach((v, _) => {
998
+ if (v.cell.kind !== "bar") return;
999
+ const S = p[_];
1000
+ S < 0 || x.set(v.field, s.rows.reduce((M, D) => {
1001
+ const u = Q(D[S]);
1002
+ return u === void 0 ? M : Math.max(M, Math.abs(u));
1003
+ }, 0));
1004
+ }), (() => {
1005
+ var v = an(), _ = v.firstChild, S = _.firstChild, M = _.nextSibling;
1006
+ return r(S, d(L, {
1007
+ each: f,
1008
+ children: (D, u) => (() => {
1009
+ var w = sn();
1010
+ return r(w, () => D.label, null), r(w, d(y, {
1011
+ get when() {
1012
+ var k;
1013
+ return (k = $[u()]) == null ? void 0 : k.note;
1014
+ },
1015
+ get children() {
1016
+ var k = J();
1017
+ return r(k, () => {
1018
+ var F;
1019
+ return (F = $[u()]) == null ? void 0 : F.note;
1020
+ }), k;
1021
+ }
1022
+ }), null), I(() => R(w, "data-align", b[u()])), w;
1023
+ })()
1024
+ })), r(M, d(L, {
1025
+ get each() {
1026
+ return s.rows;
1027
+ },
1028
+ children: (D) => (() => {
1029
+ var u = on();
1030
+ return r(u, d(L, {
1031
+ each: f,
1032
+ children: (w, k) => {
1033
+ const F = p[k()] >= 0 ? D[p[k()]] : void 0, C = $[k()].format(F), P = n ? Ce(F, c.format[w.field], m) : void 0, T = Q(F), N = W(D[A(s, w.cell.toneField)]), B = x.get(w.field), H = A(s, w.cell.secondaryField), z = H >= 0 ? Q(D[H]) : void 0;
1034
+ return (() => {
1035
+ var U = dn();
1036
+ return R(U, "data-negative", T !== void 0 && T < 0 ? "" : void 0), R(U, "data-tone", N === "pos" || N === "warn" || N === "neg" ? N : void 0), r(U, C, null), r(U, d(y, {
1037
+ when: z !== void 0,
1038
+ get children() {
1039
+ var O = cn();
1040
+ return R(O, "data-negative", z < 0 ? "" : void 0), r(O, () => we(z) ?? `${z > 0 ? "+" : ""}${K(D[H], w.cell.secondaryField ? c.format[w.cell.secondaryField] : void 0, m)}`), O;
1041
+ }
1042
+ }), null), r(U, d(y, {
1043
+ when: B !== void 0 && B > 0 && T !== void 0,
1044
+ get children() {
1045
+ var O = un();
1046
+ return R(O, "data-negative", T < 0 ? "" : void 0), I((re) => ee(O, "width", `${Math.min(100, Math.round(Math.abs(T) / B * 100))}%`)), O;
1047
+ }
1048
+ }), null), r(U, d(y, {
1049
+ when: P && P !== C,
1050
+ get children() {
1051
+ var O = J();
1052
+ return r(O, P), O;
1053
+ }
1054
+ }), null), I(() => R(U, "data-align", b[k()])), U;
1055
+ })();
1056
+ }
1057
+ })), u;
1058
+ })()
1059
+ })), v;
1060
+ })();
1061
+ }
1062
+ const o = a().rows.some(({
1063
+ share: f
1064
+ }) => f !== void 0);
1065
+ return (() => {
1066
+ var f = fn(), p = f.firstChild, m = p.firstChild, $ = m.firstChild, b = $.nextSibling, x = p.nextSibling;
1067
+ return r($, () => t("print.category", "Category")), r(b, () => t("print.value", "Value"), null), r(b, d(y, {
1068
+ get when() {
1069
+ return a().unit;
1070
+ },
1071
+ get children() {
1072
+ var v = J();
1073
+ return r(v, () => a().unit), v;
1074
+ }
1075
+ }), null), r(m, d(y, {
1076
+ when: o,
1077
+ get children() {
1078
+ var v = hn();
1079
+ return r(v, () => t("print.share", "Share")), v;
1080
+ }
1081
+ }), null), r(x, d(L, {
1082
+ get each() {
1083
+ return a().rows;
1084
+ },
1085
+ children: (v) => (() => {
1086
+ var _ = bn(), S = _.firstChild, M = S.firstChild, D = S.nextSibling;
1087
+ return r(S, d(y, {
1088
+ get when() {
1089
+ return v.series;
1090
+ },
1091
+ get children() {
1092
+ var u = pn(), w = u.firstChild;
1093
+ return r(u, () => v.series, w), u;
1094
+ }
1095
+ }), null), r(S, () => v.label, null), r(D, () => v.value, null), r(D, d(y, {
1096
+ get when() {
1097
+ return E(() => !!(n && v.exact))() && v.exact !== v.value;
1098
+ },
1099
+ get children() {
1100
+ var u = J();
1101
+ return r(u, () => v.exact), u;
1102
+ }
1103
+ }), null), r(_, d(y, {
1104
+ when: o,
1105
+ get children() {
1106
+ var u = gn(), w = u.firstChild;
1107
+ return r(u, d(y, {
1108
+ get when() {
1109
+ return v.ratio !== void 0;
1110
+ },
1111
+ get children() {
1112
+ var k = mn();
1113
+ return I((F) => ee(k, "width", `${Math.min(100, Math.round(v.ratio * 100))}%`)), k;
1114
+ }
1115
+ }), w), r(w, () => v.share ?? "—"), u;
1116
+ }
1117
+ }), null), I((u) => ee(M, "background-color", v.color)), _;
1118
+ })()
1119
+ })), I(() => oe(f, `lens-print-data${e.dense ? " lens-print-data-dense" : ""}`)), f;
1120
+ })();
1121
+ }
1122
+ function Le(e) {
1123
+ const t = q();
1124
+ return d(y, {
1125
+ get when() {
1126
+ return E(() => !!e.section.hasMore)() && e.section.frame;
1127
+ },
1128
+ get children() {
1129
+ var l = Pe();
1130
+ return r(l, () => t("print.truncated", "First {rows} rows shown; the level continues in the dashboard.", {
1131
+ rows: e.section.frame.rows.length
1132
+ })), l;
1133
+ }
1134
+ });
1135
+ }
1136
+ function gr(e) {
1137
+ var a;
1138
+ const t = q(), l = V(e.section), i = (a = l.caption) == null ? void 0 : a.trim(), n = j(() => jt(l, e.section.frame, e.section.document.meta.locale))();
1139
+ return d(y, {
1140
+ get when() {
1141
+ return !!i || !!n;
1142
+ },
1143
+ get children() {
1144
+ var c = _n();
1145
+ return r(c, d(y, {
1146
+ when: i,
1147
+ get children() {
1148
+ var s = vn();
1149
+ return r(s, i), s;
1150
+ }
1151
+ }), null), r(c, d(y, {
1152
+ when: n,
1153
+ get children() {
1154
+ var s = $n();
1155
+ return r(s, () => t(n.labelKey, n.fallback, n.vars)), s;
1156
+ }
1157
+ }), null), c;
1158
+ }
1159
+ });
1160
+ }
1161
+ function Ve(e) {
1162
+ return d(y, {
1163
+ get when() {
1164
+ return E(() => !!e.footnotes)() && e.footnotes.markers.length > 0;
1165
+ },
1166
+ get children() {
1167
+ var t = wn();
1168
+ return r(t, () => e.footnotes.markers.join(", ")), t;
1169
+ }
1170
+ });
1171
+ }
1172
+ function be(e) {
1173
+ return d(y, {
1174
+ get when() {
1175
+ return E(() => !!e.footnotes)() && e.footnotes.notes.length > 0;
1176
+ },
1177
+ get children() {
1178
+ var t = yn();
1179
+ return r(t, d(L, {
1180
+ get each() {
1181
+ return e.footnotes.notes;
1182
+ },
1183
+ children: (l) => (
1184
+ // The number is drawn rather than left to the list marker: a marker is
1185
+ // the one glyph a print engine feels free to drop, and a note nobody
1186
+ // can tie back to its figure is a note nobody reads.
1187
+ (() => {
1188
+ var i = kn(), n = i.firstChild;
1189
+ return r(n, () => l.number), r(i, () => l.text, null), I(() => i.value = l.number), i;
1190
+ })()
1191
+ )
1192
+ })), t;
1193
+ }
1194
+ });
1195
+ }
1196
+ const se = 8;
1197
+ function ve(e) {
1198
+ const t = q();
1199
+ return d(y, {
1200
+ get when() {
1201
+ return e.sections.length > 0;
1202
+ },
1203
+ get children() {
1204
+ var l = xn(), i = l.firstChild;
1205
+ return r(i, () => t("print.breakdown", "How it is calculated")), r(l, d(L, {
1206
+ get each() {
1207
+ return e.sections;
1208
+ },
1209
+ children: (n) => {
1210
+ var $, b, x, v, _;
1211
+ const a = V(n), c = n.frame, s = a.kind === "table" && (($ = a.columns) != null && $.length) ? a.columns.length : (c == null ? void 0 : c.columns.length) ?? 0;
1212
+ if (c && s <= 1) return null;
1213
+ if (Fe.has(a.kind))
1214
+ return d(De, {
1215
+ section: n
1216
+ });
1217
+ const o = c ? A(c, a.encoding.value) : -1;
1218
+ if (c && c.rows.length === 1 && o >= 0)
1219
+ return (() => {
1220
+ var S = Cn(), M = S.firstChild, D = M.nextSibling;
1221
+ return r(M, () => a.title), r(D, () => {
1222
+ var u;
1223
+ return K((u = c.rows[0]) == null ? void 0 : u[o], a.encoding.value ? a.format[a.encoding.value] : void 0, n.document.meta.locale);
1224
+ }), S;
1225
+ })();
1226
+ const h = !!(c && c.rows.length > se), f = h && c ? {
1227
+ ...n,
1228
+ frame: {
1229
+ ...c,
1230
+ rows: c.rows.slice(0, se)
1231
+ }
1232
+ } : n, p = ((b = n.perspective) == null ? void 0 : b.label.trim()) || a.title, m = ((_ = (v = (x = a.columns) == null ? void 0 : x[0]) == null ? void 0 : v.label) == null ? void 0 : _.trim().toLowerCase()) === p.trim().toLowerCase();
1233
+ return (() => {
1234
+ var S = Fn();
1235
+ return r(S, d(y, {
1236
+ when: !m,
1237
+ get children() {
1238
+ var M = Sn();
1239
+ return r(M, p), M;
1240
+ }
1241
+ }), null), r(S, d(ue, {
1242
+ dense: !0,
1243
+ section: f
1244
+ }), null), r(S, d(y, {
1245
+ when: h && c,
1246
+ get children() {
1247
+ var M = Pe();
1248
+ return r(M, () => t("print.truncatedOf", "{rows} of {total} rows shown.", {
1249
+ rows: se,
1250
+ total: c.rows.length
1251
+ })), M;
1252
+ }
1253
+ }), null), S;
1254
+ })();
1255
+ }
1256
+ }), null), l;
1257
+ }
1258
+ });
1259
+ }
1260
+ function br(e) {
1261
+ const t = q(), l = e.figure, i = l.section, n = V(i), a = mr(n, i), c = Fe.has(n.kind);
1262
+ if (l.metric)
1263
+ return (() => {
1264
+ var o = Mn();
1265
+ return r(o, d(qe, {
1266
+ figure: l,
1267
+ get footnotes() {
1268
+ return e.footnotes;
1269
+ },
1270
+ numbered: !0
1271
+ }), null), r(o, d(ve, {
1272
+ get sections() {
1273
+ return l.breakdown;
1274
+ }
1275
+ }), null), r(o, d(be, {
1276
+ get footnotes() {
1277
+ return e.footnotes;
1278
+ }
1279
+ }), null), I(() => oe(o, `lens-print-figure lens-print-figure-${l.width} lens-print-figure-metric`)), o;
1280
+ })();
1281
+ const s = n.total !== void 0 && n.encoding.value ? K(n.total, n.format[n.encoding.value], i.document.meta.locale) : void 0;
1282
+ return (() => {
1283
+ var o = Tn(), h = o.firstChild, f = h.firstChild, p = f.firstChild, m = p.nextSibling, $ = f.nextSibling;
1284
+ return r(p, () => t("print.figure", "Fig. {number}", {
1285
+ number: l.number
1286
+ })), r(m, () => n.title, null), r(m, d(Ve, {
1287
+ get footnotes() {
1288
+ return e.footnotes;
1289
+ }
1290
+ }), null), r($, d(y, {
1291
+ get when() {
1292
+ var b;
1293
+ return (b = n.status) == null ? void 0 : b.label;
1294
+ },
1295
+ get children() {
1296
+ var b = Te();
1297
+ return r(b, () => n.status.label), I(() => R(b, "data-tone", n.status.tone ?? "neutral")), b;
1298
+ }
1299
+ }), null), r($, d(X, {
1300
+ get availability() {
1301
+ return n.availability;
1302
+ },
1303
+ get confidence() {
1304
+ return n.confidence;
1305
+ }
1306
+ }), null), r($, d(y, {
1307
+ get when() {
1308
+ return i.perspective;
1309
+ },
1310
+ get children() {
1311
+ var b = Dn(), x = b.firstChild;
1312
+ return r(b, () => t("print.view", "View"), x), r(b, () => i.perspective.label, null), b;
1313
+ }
1314
+ }), null), r($, d(y, {
1315
+ when: s,
1316
+ get children() {
1317
+ var b = Pn(), x = b.firstChild;
1318
+ return r(b, () => t("print.total", "Total"), x), r(b, s, null), b;
1319
+ }
1320
+ }), null), r(o, () => c ? d(De, {
1321
+ section: i
1322
+ }) : a ? d(fr, {
1323
+ section: i
1324
+ }) : l.chart && d(Ne, {
1325
+ get height() {
1326
+ return l.width === "half" ? 225 : 235;
1327
+ },
1328
+ section: i
1329
+ }), null), r(o, d(gr, {
1330
+ section: i
1331
+ }), null), r(o, !c && (a ? d(pr, {
1332
+ section: i
1333
+ }) : d(ue, {
1334
+ section: i
1335
+ })), null), r(o, d(Le, {
1336
+ section: i
1337
+ }), null), r(o, d(ve, {
1338
+ get sections() {
1339
+ return l.breakdown;
1340
+ }
1341
+ }), null), r(o, d(be, {
1342
+ get footnotes() {
1343
+ return e.footnotes;
1344
+ }
1345
+ }), null), I(() => oe(o, `lens-print-figure lens-print-figure-${a || c ? "full" : l.width}`)), o;
1346
+ })();
1347
+ }
1348
+ function vr(e) {
1349
+ const t = e.values.filter((s) => Number.isFinite(s));
1350
+ if (t.length < 2) return null;
1351
+ const l = Math.min(...t), n = Math.max(...t) - l || 1, a = 100 / (t.length - 1), c = t.map((s, o) => `${(o * a).toFixed(2)},${(24 - (s - l) / n * 22).toFixed(2)}`).join(" ");
1352
+ return (() => {
1353
+ var s = An(), o = s.firstChild;
1354
+ return R(o, "points", c), s;
1355
+ })();
1356
+ }
1357
+ function qe(e) {
1358
+ var x, v;
1359
+ const t = q(), l = e.figure, i = l.section, n = V(i), a = i.document.meta.locale, c = i.frame, s = c ? A(c, n.encoding.value) : -1, o = c && s >= 0 ? (x = c.rows[0]) == null ? void 0 : x[s] : void 0, h = n.encoding.value ? n.format[n.encoding.value] : void 0, f = c ? A(c, n.encoding.final) : -1, p = c && f >= 0 ? (v = c.rows[0]) == null ? void 0 : v[f] : void 0, m = Q(p), $ = n.encoding.final ? n.format[n.encoding.final] : h, b = n.target;
1360
+ return (() => {
1361
+ var _ = qn(), S = _.firstChild, M = S.nextSibling, D = M.nextSibling;
1362
+ return r(S, d(y, {
1363
+ get when() {
1364
+ return e.numbered;
1365
+ },
1366
+ get children() {
1367
+ var u = Kn();
1368
+ return r(u, () => t("print.figure", "Fig. {number}", {
1369
+ number: l.number
1370
+ })), u;
1371
+ }
1372
+ }), null), r(S, () => n.title, null), r(S, d(Ve, {
1373
+ get footnotes() {
1374
+ return e.footnotes;
1375
+ }
1376
+ }), null), r(M, () => K(o, h, a), null), r(M, d(y, {
1377
+ when: m !== void 0,
1378
+ get children() {
1379
+ var u = Nn();
1380
+ return R(u, "data-negative", m < 0 ? "" : void 0), r(u, m > 0 ? "+" : "", null), r(u, () => K(p, $, a), null), u;
1381
+ }
1382
+ }), null), r(_, d(y, {
1383
+ get when() {
1384
+ return n.sparkline;
1385
+ },
1386
+ get children() {
1387
+ return d(vr, {
1388
+ get values() {
1389
+ return n.sparkline.values;
1390
+ }
1391
+ });
1392
+ }
1393
+ }), D), r(_, d(y, {
1394
+ get when() {
1395
+ return n.trend;
1396
+ },
1397
+ get children() {
1398
+ var u = Rn();
1399
+ return r(u, () => n.trend.percent > 0 ? "+" : "", null), r(u, () => we(n.trend.percent) ?? `${new Intl.NumberFormat(a, {
1400
+ maximumFractionDigits: 1
1401
+ }).format(n.trend.percent)}%`, null), r(u, (() => {
1402
+ var w = E(() => !!n.trend.label);
1403
+ return () => w() ? ` ${n.trend.label}` : "";
1404
+ })(), null), I(() => R(u, "data-negative", n.trend.percent < 0 ? "" : void 0)), u;
1405
+ }
1406
+ }), D), r(_, d(y, {
1407
+ when: b,
1408
+ get children() {
1409
+ var u = Ln(), w = u.firstChild;
1410
+ return r(u, () => t("print.target", "Target"), w), r(u, () => K(b.value, h, a), null), r(u, (() => {
1411
+ var k = E(() => !!b.label);
1412
+ return () => k() ? ` · ${b.label}` : "";
1413
+ })(), null), u;
1414
+ }
1415
+ }), D), r(_, d(y, {
1416
+ get when() {
1417
+ return n.caption;
1418
+ },
1419
+ get children() {
1420
+ var u = Vn();
1421
+ return r(u, () => n.caption), u;
1422
+ }
1423
+ }), D), r(D, d(y, {
1424
+ get when() {
1425
+ var u;
1426
+ return (u = n.status) == null ? void 0 : u.label;
1427
+ },
1428
+ get children() {
1429
+ var u = Te();
1430
+ return r(u, () => n.status.label), I(() => R(u, "data-tone", n.status.tone ?? "neutral")), u;
1431
+ }
1432
+ }), null), r(D, d(X, {
1433
+ get availability() {
1434
+ return n.availability;
1435
+ },
1436
+ get confidence() {
1437
+ return n.confidence;
1438
+ }
1439
+ }), null), _;
1440
+ })();
1441
+ }
1442
+ function $r(e, t) {
1443
+ var c, s;
1444
+ const l = (s = (c = e.filters) == null ? void 0 : c.find((o) => o.kind === "period")) == null ? void 0 : s.period;
1445
+ if (!l) return;
1446
+ const {
1447
+ start: i,
1448
+ end: n
1449
+ } = l.value;
1450
+ if (!i && !n) return t;
1451
+ const a = (o) => {
1452
+ const h = new Date(o);
1453
+ return Number.isNaN(h.getTime()) ? o : new Intl.DateTimeFormat(e.meta.locale, {
1454
+ dateStyle: "medium"
1455
+ }).format(h);
1456
+ };
1457
+ return i && n ? `${a(i)} — ${a(n)}` : a(i || n);
1458
+ }
1459
+ function _r(e) {
1460
+ const t = q(), l = e.outline.kpis, i = e.document, n = $r(i, t("filter.period.allTime", "All time"));
1461
+ return (() => {
1462
+ var a = En(), c = a.firstChild, s = c.firstChild, o = s.nextSibling, h = c.nextSibling, f = h.firstChild, p = f.firstChild, m = p.nextSibling, $ = f.nextSibling, b = $.firstChild, x = b.nextSibling;
1463
+ return r(s, () => t("print.kicker", "Management audit report")), r(o, () => {
1464
+ var v;
1465
+ return ((v = i.header) == null ? void 0 : v.title) || i.meta.title;
1466
+ }), r(c, d(y, {
1467
+ get when() {
1468
+ var v;
1469
+ return (v = i.header) == null ? void 0 : v.subtitle;
1470
+ },
1471
+ get children() {
1472
+ var v = In();
1473
+ return r(v, () => {
1474
+ var _;
1475
+ return (_ = i.header) == null ? void 0 : _.subtitle;
1476
+ }), v;
1477
+ }
1478
+ }), null), r(h, d(y, {
1479
+ when: n,
1480
+ get children() {
1481
+ var v = ce(), _ = v.firstChild, S = _.nextSibling;
1482
+ return r(_, () => t("print.period", "Period")), r(S, n), v;
1483
+ }
1484
+ }), f), r(p, () => t("print.generated", "Generated")), r(m, () => new Intl.DateTimeFormat(i.meta.locale, {
1485
+ dateStyle: "long",
1486
+ timeStyle: "short"
1487
+ }).format(new Date(i.meta.generatedAt))), r(b, () => t("print.sections", "Detailed views")), r(x, () => e.outline.figureCount + e.outline.detailCount), r(h, d(y, {
1488
+ get when() {
1489
+ return e.outline.estimated > 0 || e.outline.missing.length > 0;
1490
+ },
1491
+ get children() {
1492
+ var v = ce(), _ = v.firstChild, S = _.nextSibling;
1493
+ return r(_, () => t("print.quality", "Data quality")), r(S, () => t("print.qualityCount", "{estimated} estimated · {missing} not calculated", {
1494
+ estimated: e.outline.estimated,
1495
+ missing: e.outline.missing.length
1496
+ })), v;
1497
+ }
1498
+ }), null), r(a, d(y, {
1499
+ get when() {
1500
+ return l.length > 0;
1501
+ },
1502
+ get children() {
1503
+ var v = jn();
1504
+ return r(v, d(L, {
1505
+ each: l,
1506
+ children: (_) => d(qe, {
1507
+ figure: _
1508
+ })
1509
+ })), v;
1510
+ }
1511
+ }), null), r(a, d(y, {
1512
+ get when() {
1513
+ return e.report.truncated || e.report.warnings.length > 0 || e.outline.missing.length > 0;
1514
+ },
1515
+ get children() {
1516
+ var v = Bn();
1517
+ return r(v, () => t("print.limitationsFlag", "This report discloses gaps in its data; see the closing appendix.")), v;
1518
+ }
1519
+ }), null), a;
1520
+ })();
1521
+ }
1522
+ function wr(e) {
1523
+ const t = q();
1524
+ return (() => {
1525
+ var l = Un(), i = l.firstChild, n = i.nextSibling, a = n.firstChild, c = a.firstChild, s = c.nextSibling, o = n.nextSibling;
1526
+ return r(i, () => t("print.contents", "Contents")), r(n, d(L, {
1527
+ get each() {
1528
+ return e.outline.chapters.filter(({
1529
+ figures: h
1530
+ }) => h.length > 0);
1531
+ },
1532
+ children: (h) => (() => {
1533
+ var f = zn(), p = f.firstChild, m = p.nextSibling;
1534
+ return r(p, () => h.number), r(m, () => h.title), r(f, d(y, {
1535
+ get when() {
1536
+ return h.caption;
1537
+ },
1538
+ get children() {
1539
+ var $ = Wn();
1540
+ return r($, () => h.caption), $;
1541
+ }
1542
+ }), null), f;
1543
+ })()
1544
+ }), a), r(n, d(y, {
1545
+ get when() {
1546
+ return e.outline.appendix.length > 0;
1547
+ },
1548
+ get children() {
1549
+ var h = On(), f = h.firstChild, p = f.nextSibling;
1550
+ return r(p, () => t("print.appendix", "Appendix A. Detailed breakdowns")), h;
1551
+ }
1552
+ }), a), r(s, () => t("print.method", "Appendix B. Sources and definitions")), r(o, () => t("print.note", "Every interactive view is expanded below. Values and shares accompany each chart so the report remains self-contained on paper.")), l;
1553
+ })();
1554
+ }
1555
+ function yr(e) {
1556
+ const t = q(), l = e.chapter, i = j(() => {
1557
+ var $;
1558
+ return It(l.figures.map((b) => ({
1559
+ id: b.section.id,
1560
+ panel: V(b.section),
1561
+ frame: b.section.frame
1562
+ })), (($ = l.figures[0]) == null ? void 0 : $.section.document.meta.locale) ?? "en");
1563
+ }), n = pt(l.figures, t);
1564
+ if (l.figures.length === 0) return null;
1565
+ const a = /* @__PURE__ */ new Set([l.caption ?? ""]), c = [];
1566
+ let s, o;
1567
+ const h = ($) => d(br, {
1568
+ figure: $,
1569
+ get footnotes() {
1570
+ return n.get($.section.id);
1571
+ }
1572
+ }), f = ($) => {
1573
+ if (!o) {
1574
+ c.push($);
1575
+ return;
1576
+ }
1577
+ const b = o;
1578
+ o = void 0, c.push((() => {
1579
+ var x = Hn();
1580
+ return r(x, b, null), r(x, $, null), x;
1581
+ })());
1582
+ }, p = () => {
1583
+ s && (f(h(s)), s = void 0);
1584
+ }, m = ($) => {
1585
+ if ($.width !== "half") {
1586
+ p(), f(h($));
1587
+ return;
1588
+ }
1589
+ if (!s) {
1590
+ s = $;
1591
+ return;
1592
+ }
1593
+ const b = s;
1594
+ s = void 0, f((() => {
1595
+ var x = Gn();
1596
+ return r(x, () => h(b), null), r(x, () => h($), null), x;
1597
+ })());
1598
+ };
1599
+ for (const $ of l.figures) {
1600
+ const b = $.group, x = `${(b == null ? void 0 : b.label) ?? ""}::${(b == null ? void 0 : b.caption) ?? ""}`;
1601
+ b && !a.has(x) && (a.add(x), p(), o = (() => {
1602
+ var v = Yn();
1603
+ return r(v, d(y, {
1604
+ get when() {
1605
+ return b.label;
1606
+ },
1607
+ get children() {
1608
+ var _ = Qn();
1609
+ return r(_, () => b.label), _;
1610
+ }
1611
+ }), null), r(v, d(y, {
1612
+ get when() {
1613
+ return E(() => !!b.caption)() && b.caption !== l.caption;
1614
+ },
1615
+ get children() {
1616
+ var _ = Jn();
1617
+ return r(_, () => b.caption), _;
1618
+ }
1619
+ }), null), v;
1620
+ })()), m($);
1621
+ }
1622
+ return p(), o && c.push(o), (() => {
1623
+ var $ = er(), b = $.firstChild, x = b.firstChild, v = x.firstChild, _ = v.nextSibling;
1624
+ _.nextSibling;
1625
+ var S = x.nextSibling, M = S.firstChild, D = b.nextSibling;
1626
+ return r(x, () => e.title, v), r(x, () => l.number, _), r(x, () => l.title, null), r(M, () => l.number), r(S, () => l.title, null), r(b, d(y, {
1627
+ get when() {
1628
+ return l.caption;
1629
+ },
1630
+ get children() {
1631
+ var u = Xn();
1632
+ return r(u, () => l.caption), u;
1633
+ }
1634
+ }), null), r(b, d(y, {
1635
+ get when() {
1636
+ return i().length > 0;
1637
+ },
1638
+ get children() {
1639
+ var u = Zn();
1640
+ return r(u, d(L, {
1641
+ get each() {
1642
+ return i();
1643
+ },
1644
+ children: (w) => (() => {
1645
+ var k = tr(), F = k.firstChild;
1646
+ return r(F, () => w.label), r(k, () => w.value, null), k;
1647
+ })()
1648
+ })), u;
1649
+ }
1650
+ }), null), r(D, c), $;
1651
+ })();
1652
+ }
1653
+ const kr = 12, $e = 8;
1654
+ function xr(e) {
1655
+ var s;
1656
+ const t = q(), l = e.detail, i = V(l.section), n = ((s = l.section.frame) == null ? void 0 : s.rows.length) ?? 0, a = i.semantics === "series" && n > kr, c = a && l.section.frame ? {
1657
+ ...l.section,
1658
+ frame: {
1659
+ ...l.section.frame,
1660
+ rows: l.section.frame.rows.slice(-$e)
1661
+ }
1662
+ } : l.section;
1663
+ return (() => {
1664
+ var o = rr(), h = o.firstChild, f = h.firstChild, p = f.nextSibling, m = p.nextSibling;
1665
+ return r(f, () => l.number), r(p, () => i.title), r(m, () => l.trail), r(o, d(y, {
1666
+ when: a,
1667
+ get children() {
1668
+ return d(Ne, {
1669
+ height: 110,
1670
+ get section() {
1671
+ return l.section;
1672
+ }
1673
+ });
1674
+ }
1675
+ }), null), r(o, d(ue, {
1676
+ dense: !0,
1677
+ exact: !0,
1678
+ section: c
1679
+ }), null), r(o, d(Le, {
1680
+ get section() {
1681
+ return l.section;
1682
+ }
1683
+ }), null), r(o, d(y, {
1684
+ when: a,
1685
+ get children() {
1686
+ var $ = nr();
1687
+ return r($, () => t("print.seriesTail", "The chart carries all {rows} periods; the table keeps the most recent {kept}.", {
1688
+ rows: n,
1689
+ kept: $e
1690
+ })), $;
1691
+ }
1692
+ }), null), o;
1693
+ })();
1694
+ }
1695
+ function Cr(e) {
1696
+ const t = q();
1697
+ return d(y, {
1698
+ get when() {
1699
+ return e.outline.appendix.length > 0;
1700
+ },
1701
+ get children() {
1702
+ var l = lr(), i = l.firstChild, n = i.firstChild, a = n.firstChild, c = n.nextSibling;
1703
+ c.firstChild;
1704
+ var s = c.nextSibling;
1705
+ return r(n, () => e.title, a), r(n, () => t("print.appendix", "Appendix A. Detailed breakdowns"), null), r(c, () => t("print.appendix", "Appendix A. Detailed breakdowns"), null), r(s, () => t("print.appendixNote", "Each reading below is one step of the drill path printed above it, kept for verification rather than for reading in order.")), r(l, d(L, {
1706
+ get each() {
1707
+ return e.outline.appendix;
1708
+ },
1709
+ children: (o) => (() => {
1710
+ var h = ir(), f = h.firstChild, p = f.firstChild, m = p.nextSibling;
1711
+ m.nextSibling;
1712
+ var $ = f.nextSibling;
1713
+ return r(f, () => o.number, m), r(f, () => o.title, null), r($, d(L, {
1714
+ get each() {
1715
+ return o.details;
1716
+ },
1717
+ children: (b) => d(xr, {
1718
+ detail: b
1719
+ })
1720
+ })), h;
1721
+ })()
1722
+ }), null), l;
1723
+ }
1724
+ });
1725
+ }
1726
+ function Sr(e) {
1727
+ const t = q(), l = j(() => ot(e.outline.qualities, t));
1728
+ return (() => {
1729
+ var i = cr(), n = i.firstChild, a = n.firstChild, c = a.firstChild, s = a.nextSibling;
1730
+ s.firstChild;
1731
+ var o = n.nextSibling, h = o.firstChild, f = h.nextSibling, p = f.nextSibling, m = p.nextSibling;
1732
+ return m.nextSibling, r(a, () => e.title, c), r(a, () => t("print.method", "Appendix B. Sources and definitions"), null), r(s, () => t("print.method", "Appendix B. Sources and definitions"), null), r(i, d(y, {
1733
+ get when() {
1734
+ return l().length > 0;
1735
+ },
1736
+ get children() {
1737
+ var $ = ar(), b = $.firstChild, x = b.nextSibling;
1738
+ return r(b, () => t("print.qualityTerms", "What the quality marks mean")), r(x, d(L, {
1739
+ get each() {
1740
+ return l();
1741
+ },
1742
+ children: (v) => (() => {
1743
+ var _ = ur(), S = _.firstChild, M = S.firstChild, D = S.nextSibling;
1744
+ return r(M, () => v.label), r(D, () => v.definition), I(() => R(M, "data-quality", v.value)), _;
1745
+ })()
1746
+ })), $;
1747
+ }
1748
+ }), o), r(i, d(y, {
1749
+ get when() {
1750
+ return e.outline.notes.length > 0;
1751
+ },
1752
+ get children() {
1753
+ var $ = sr();
1754
+ return r($, d(L, {
1755
+ get each() {
1756
+ return e.outline.notes;
1757
+ },
1758
+ children: (b) => (() => {
1759
+ var x = ce(), v = x.firstChild, _ = v.nextSibling;
1760
+ return r(v, () => b.label), r(_, () => b.detail), x;
1761
+ })()
1762
+ })), $;
1763
+ }
1764
+ }), o), r(i, d(y, {
1765
+ get when() {
1766
+ return e.outline.missing.length > 0 || e.report.truncated || e.report.warnings.length > 0;
1767
+ },
1768
+ get children() {
1769
+ var $ = or(), b = $.firstChild, x = b.nextSibling, v = x.nextSibling;
1770
+ return r(b, () => t("print.limitations", "Data limitations")), r(x, () => t("print.limitationsNote", "The report remains usable, but the following detail views could not be calculated and are explicitly disclosed:")), r(v, d(y, {
1771
+ get when() {
1772
+ return e.outline.missing.length > 0;
1773
+ },
1774
+ get children() {
1775
+ var _ = ae();
1776
+ return r(_, () => t("print.missing", "Not calculated: {names}", {
1777
+ names: e.outline.missing.join(", ")
1778
+ })), _;
1779
+ }
1780
+ }), null), r(v, d(y, {
1781
+ get when() {
1782
+ return e.report.truncated;
1783
+ },
1784
+ get children() {
1785
+ var _ = ae();
1786
+ return r(_, () => t("print.timeLimit", "Further detail was stopped at the preparation time limit; all sections calculated by then are included.")), _;
1787
+ }
1788
+ }), null), r(v, d(L, {
1789
+ get each() {
1790
+ return e.report.warnings;
1791
+ },
1792
+ children: (_) => (() => {
1793
+ var S = ae();
1794
+ return r(S, _), S;
1795
+ })()
1796
+ }), null), $;
1797
+ }
1798
+ }), o), r(o, () => t("print.snapshot", "Snapshot"), h), r(o, () => e.document.snapshotId, f), r(o, () => e.document.meta.dashboardId, m), r(o, () => e.document.meta.locale, null), i;
1799
+ })();
1800
+ }
1801
+ function Fr(e) {
1802
+ var c;
1803
+ const t = q(), l = e.report.document, i = ((c = l.header) == null ? void 0 : c.title) || l.meta.title, n = j(() => Gt(e.report))(), a = j(() => zt(e.report, t("print.summary", "Summary"), t("print.other", "Other readings")))();
1804
+ return d(Ae.Provider, {
1805
+ value: n,
1806
+ get children() {
1807
+ return [d(_r, {
1808
+ document: l,
1809
+ outline: a,
1810
+ get report() {
1811
+ return e.report;
1812
+ }
1813
+ }), d(wr, {
1814
+ outline: a
1815
+ }), d(L, {
1816
+ get each() {
1817
+ return a.chapters;
1818
+ },
1819
+ children: (s) => d(yr, {
1820
+ chapter: s,
1821
+ title: i
1822
+ })
1823
+ }), d(Cr, {
1824
+ outline: a,
1825
+ title: i
1826
+ }), d(Sr, {
1827
+ document: l,
1828
+ outline: a,
1829
+ get report() {
1830
+ return e.report;
1831
+ },
1832
+ title: i
1833
+ })];
1834
+ }
1835
+ });
1836
+ }
1837
+ function Rr() {
1838
+ const {
1839
+ document: e
1840
+ } = Je(), t = Ye();
1841
+ return typeof globalThis.document > "u" ? null : d(y, {
1842
+ get when() {
1843
+ return t.report;
1844
+ },
1845
+ children: (l) => {
1846
+ const i = e.theme.palette.accent ?? e.theme.palette.primary;
1847
+ return d(je, {
1848
+ get mount() {
1849
+ return globalThis.document.body;
1850
+ },
1851
+ get children() {
1852
+ var n = dr();
1853
+ return r(n, d(Fr, {
1854
+ get report() {
1855
+ return l();
1856
+ }
1857
+ })), I((a) => {
1858
+ var c = !t.active, s = t.preview ? "true" : void 0, o = e.meta.locale, h = i ? {
1859
+ "--lens-accent-500": i
1860
+ } : void 0;
1861
+ return c !== a.e && R(n, "aria-hidden", a.e = c), s !== a.t && R(n, "data-preview", a.t = s), o !== a.a && R(n, "lang", a.a = o), a.o = _e(n, h, a.o), a;
1862
+ }, {
1863
+ e: void 0,
1864
+ t: void 0,
1865
+ a: void 0,
1866
+ o: void 0
1867
+ }), n;
1868
+ }
1869
+ });
1870
+ }
1871
+ });
1872
+ }
1873
+ export {
1874
+ Rr as PrintReport,
1875
+ Fr as PrintReportView
1876
+ };