@jam-overture/loom 0.1.0 → 0.3.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 (414) hide show
  1. package/README.md +3 -1
  2. package/dist/application/application.d.ts +109 -0
  3. package/dist/application/application.js +97 -0
  4. package/dist/application/memory.d.ts +20 -0
  5. package/dist/application/memory.js +79 -0
  6. package/dist/application/store.d.ts +101 -0
  7. package/dist/application/store.js +25 -0
  8. package/dist/audience/audience.d.ts +36 -0
  9. package/dist/audience/audience.js +41 -0
  10. package/dist/audience/compose.d.ts +112 -0
  11. package/dist/audience/compose.js +134 -0
  12. package/dist/audience/memory.d.ts +14 -0
  13. package/dist/audience/memory.js +71 -0
  14. package/dist/audience/overlay-store.d.ts +343 -0
  15. package/dist/audience/overlay-store.js +217 -0
  16. package/dist/audience/rule.d.ts +121 -0
  17. package/dist/audience/rule.js +78 -0
  18. package/dist/cli/index.d.ts +3 -4
  19. package/dist/cli/index.js +3 -4
  20. package/dist/cli/templates.js +19 -0
  21. package/dist/data/adapter.d.ts +9 -1
  22. package/dist/data/adapter.js +2 -0
  23. package/dist/data/plan.js +0 -0
  24. package/dist/data/resolution.d.ts +23 -1
  25. package/dist/data/resolve.d.ts +31 -4
  26. package/dist/data/resolve.js +11 -3
  27. package/dist/ids.d.ts +10 -0
  28. package/dist/ids.js +11 -1
  29. package/dist/index.d.ts +1 -0
  30. package/dist/index.js +1 -0
  31. package/dist/interpretation/anthropic.d.ts +1 -1
  32. package/dist/interpretation/anthropic.js +2 -22
  33. package/dist/interpretation/client.d.ts +1 -1
  34. package/dist/interpretation/materialize.js +67 -22
  35. package/dist/interpretation/openai-compatible.d.ts +36 -0
  36. package/dist/interpretation/openai-compatible.js +79 -0
  37. package/dist/interpretation/status.d.ts +19 -0
  38. package/dist/interpretation/status.js +26 -0
  39. package/dist/live/index.d.ts +73 -0
  40. package/dist/live/index.js +73 -0
  41. package/dist/live/pages.d.ts +187 -0
  42. package/dist/live/pages.js +161 -0
  43. package/dist/live/pull.d.ts +147 -0
  44. package/dist/live/pull.js +398 -0
  45. package/dist/live/pulling.d.ts +79 -0
  46. package/dist/live/pulling.js +117 -0
  47. package/dist/live/window.d.ts +129 -0
  48. package/dist/live/window.js +132 -0
  49. package/dist/patch.d.ts +54 -0
  50. package/dist/patch.js +44 -0
  51. package/dist/project/closing.d.ts +51 -0
  52. package/dist/project/closing.js +53 -0
  53. package/dist/project/memory.d.ts +20 -0
  54. package/dist/project/memory.js +97 -0
  55. package/dist/project/project.d.ts +90 -0
  56. package/dist/project/project.js +91 -0
  57. package/dist/project/store.d.ts +135 -0
  58. package/dist/project/store.js +41 -0
  59. package/dist/registered.d.ts +64 -0
  60. package/dist/registered.js +118 -0
  61. package/dist/render/addressed.d.ts +35 -0
  62. package/dist/render/addressed.js +79 -0
  63. package/dist/render/behaviour-adjust.d.ts +11 -19
  64. package/dist/render/behaviour-adjust.js +75 -21
  65. package/dist/render/behaviour-present.d.ts +8 -0
  66. package/dist/render/behaviour-present.js +57 -6
  67. package/dist/render/behaviour.d.ts +98 -17
  68. package/dist/render/behaviour.js +91 -26
  69. package/dist/render/control-name.d.ts +68 -0
  70. package/dist/render/control-name.js +37 -0
  71. package/dist/render/diagnostics.d.ts +72 -0
  72. package/dist/render/diagnostics.js +7 -0
  73. package/dist/render/document-theme.d.ts +70 -0
  74. package/dist/render/document-theme.js +139 -0
  75. package/dist/render/editable.d.ts +15 -1
  76. package/dist/render/editable.js +13 -1
  77. package/dist/render/expected.d.ts +98 -0
  78. package/dist/render/expected.js +88 -0
  79. package/dist/render/index.d.ts +4 -0
  80. package/dist/render/index.js +4 -0
  81. package/dist/render/reads.d.ts +11 -0
  82. package/dist/render/reads.js +12 -1
  83. package/dist/render/render.d.ts +11 -0
  84. package/dist/render/render.js +294 -53
  85. package/dist/render/request.d.ts +8 -1
  86. package/dist/render/request.js +1 -0
  87. package/dist/render/slots.d.ts +52 -0
  88. package/dist/render/slots.js +24 -0
  89. package/dist/render/theme.d.ts +54 -1
  90. package/dist/render/theme.js +23 -1
  91. package/dist/render/unshown.d.ts +152 -0
  92. package/dist/render/unshown.js +80 -0
  93. package/dist/runtime/analysis.d.ts +94 -9
  94. package/dist/runtime/analysis.js +54 -9
  95. package/dist/runtime/assessment.d.ts +36 -2
  96. package/dist/runtime/assessment.js +27 -2
  97. package/dist/runtime/auto-apply-ceiling.d.ts +54 -0
  98. package/dist/runtime/auto-apply-ceiling.js +66 -0
  99. package/dist/runtime/checks.d.ts +148 -0
  100. package/dist/runtime/checks.js +112 -0
  101. package/dist/runtime/disposition.d.ts +96 -0
  102. package/dist/runtime/disposition.js +46 -0
  103. package/dist/runtime/gate.js +91 -10
  104. package/dist/runtime/index.d.ts +4 -0
  105. package/dist/runtime/index.js +4 -0
  106. package/dist/runtime/irreversibility.d.ts +64 -0
  107. package/dist/runtime/irreversibility.js +45 -0
  108. package/dist/runtime/nesting.d.ts +13 -1
  109. package/dist/runtime/nesting.js +41 -24
  110. package/dist/runtime/pipeline.d.ts +43 -0
  111. package/dist/runtime/pipeline.js +10 -2
  112. package/dist/runtime/policy-change.d.ts +93 -0
  113. package/dist/runtime/policy-change.js +305 -0
  114. package/dist/runtime/policy-log.d.ts +406 -0
  115. package/dist/runtime/policy-log.js +285 -0
  116. package/dist/runtime/policy.d.ts +8 -6
  117. package/dist/runtime/policy.js +5 -2
  118. package/dist/runtime/repointing.js +0 -0
  119. package/dist/runtime/reversibility.d.ts +11 -9
  120. package/dist/runtime/stakes.d.ts +129 -1
  121. package/dist/runtime/stakes.js +240 -26
  122. package/dist/runtime/vocabulary.d.ts +164 -7
  123. package/dist/runtime/vocabulary.js +181 -8
  124. package/dist/sdk/audit.d.ts +174 -3
  125. package/dist/sdk/audit.js +176 -17
  126. package/dist/sdk/catalogue.d.ts +9 -1
  127. package/dist/sdk/conformance.d.ts +37 -3
  128. package/dist/sdk/conformance.js +25 -4
  129. package/dist/sdk/definition.d.ts +129 -5
  130. package/dist/sdk/definition.js +66 -0
  131. package/dist/sdk/registry.d.ts +45 -2
  132. package/dist/sdk/registry.js +102 -1
  133. package/dist/signals/acted.contract.d.ts +21 -0
  134. package/dist/signals/acted.contract.js +236 -0
  135. package/dist/signals/acted.d.ts +359 -0
  136. package/dist/signals/acted.js +135 -0
  137. package/dist/signals/action-change.d.ts +507 -0
  138. package/dist/signals/action-change.js +265 -0
  139. package/dist/signals/action.d.ts +331 -0
  140. package/dist/signals/action.js +182 -0
  141. package/dist/signals/agenda.d.ts +585 -0
  142. package/dist/signals/agenda.js +295 -0
  143. package/dist/signals/applied-window.contract.d.ts +23 -0
  144. package/dist/signals/applied-window.contract.js +160 -0
  145. package/dist/signals/arrivals.contract.d.ts +21 -0
  146. package/dist/signals/arrivals.contract.js +180 -0
  147. package/dist/signals/arrivals.d.ts +375 -0
  148. package/dist/signals/arrivals.js +254 -0
  149. package/dist/signals/arriving.d.ts +210 -0
  150. package/dist/signals/arriving.js +133 -0
  151. package/dist/signals/audiences.d.ts +528 -0
  152. package/dist/signals/audiences.js +255 -0
  153. package/dist/signals/broadcast.d.ts +33 -17
  154. package/dist/signals/broadcast.js +255 -32
  155. package/dist/signals/change.d.ts +378 -0
  156. package/dist/signals/change.js +327 -0
  157. package/dist/signals/collect.d.ts +169 -34
  158. package/dist/signals/collect.js +186 -38
  159. package/dist/signals/conversion.d.ts +348 -0
  160. package/dist/signals/conversion.js +235 -0
  161. package/dist/signals/copy-change.d.ts +553 -0
  162. package/dist/signals/copy-change.js +377 -0
  163. package/dist/signals/copy.d.ts +337 -0
  164. package/dist/signals/copy.js +211 -0
  165. package/dist/signals/correlated.contract.d.ts +24 -0
  166. package/dist/signals/correlated.contract.js +94 -0
  167. package/dist/signals/counters.d.ts +97 -0
  168. package/dist/signals/counters.js +160 -0
  169. package/dist/signals/deliver.d.ts +23 -4
  170. package/dist/signals/deliver.js +34 -6
  171. package/dist/signals/deployment-change.d.ts +395 -0
  172. package/dist/signals/deployment-change.js +309 -0
  173. package/dist/signals/deployment.d.ts +278 -0
  174. package/dist/signals/deployment.js +178 -0
  175. package/dist/signals/door.d.ts +114 -0
  176. package/dist/signals/door.js +77 -0
  177. package/dist/signals/expire.d.ts +192 -0
  178. package/dist/signals/expire.js +213 -0
  179. package/dist/signals/fold.d.ts +10 -0
  180. package/dist/signals/fold.js +5 -1
  181. package/dist/signals/form-action.d.ts +302 -0
  182. package/dist/signals/form-action.js +169 -0
  183. package/dist/signals/form-copy.d.ts +523 -0
  184. package/dist/signals/form-copy.js +346 -0
  185. package/dist/signals/forms.d.ts +247 -0
  186. package/dist/signals/forms.js +147 -0
  187. package/dist/signals/frontier.d.ts +268 -0
  188. package/dist/signals/frontier.js +145 -0
  189. package/dist/signals/funnel-change.d.ts +548 -0
  190. package/dist/signals/funnel-change.js +361 -0
  191. package/dist/signals/funnel-hours.contract.d.ts +21 -0
  192. package/dist/signals/funnel-hours.contract.js +221 -0
  193. package/dist/signals/funnel-hours.d.ts +293 -0
  194. package/dist/signals/funnel-hours.js +99 -0
  195. package/dist/signals/funnel.d.ts +592 -0
  196. package/dist/signals/funnel.js +231 -0
  197. package/dist/signals/health.d.ts +694 -0
  198. package/dist/signals/health.js +573 -0
  199. package/dist/signals/index.d.ts +60 -0
  200. package/dist/signals/index.js +60 -0
  201. package/dist/signals/ingest.d.ts +56 -1
  202. package/dist/signals/ingest.js +91 -1
  203. package/dist/signals/inside.d.ts +190 -0
  204. package/dist/signals/inside.js +263 -0
  205. package/dist/signals/join.d.ts +56 -0
  206. package/dist/signals/join.js +60 -0
  207. package/dist/signals/journal.d.ts +123 -9
  208. package/dist/signals/kept.contract.d.ts +22 -0
  209. package/dist/signals/kept.contract.js +111 -0
  210. package/dist/signals/kinds.d.ts +8 -6
  211. package/dist/signals/kinds.js +14 -6
  212. package/dist/signals/library-action.d.ts +430 -0
  213. package/dist/signals/library-action.js +336 -0
  214. package/dist/signals/library-agenda-change.d.ts +324 -0
  215. package/dist/signals/library-agenda-change.js +199 -0
  216. package/dist/signals/library-agenda.d.ts +258 -0
  217. package/dist/signals/library-agenda.js +167 -0
  218. package/dist/signals/library-change.d.ts +477 -0
  219. package/dist/signals/library-change.js +335 -0
  220. package/dist/signals/library-copy-change.d.ts +498 -0
  221. package/dist/signals/library-copy-change.js +476 -0
  222. package/dist/signals/library-pace.d.ts +319 -0
  223. package/dist/signals/library-pace.js +305 -0
  224. package/dist/signals/library-reach-change.d.ts +646 -0
  225. package/dist/signals/library-reach-change.js +542 -0
  226. package/dist/signals/library-reach.d.ts +377 -0
  227. package/dist/signals/library-reach.js +227 -0
  228. package/dist/signals/library-senders-change.d.ts +457 -0
  229. package/dist/signals/library-senders-change.js +367 -0
  230. package/dist/signals/library-senders-reach-change.d.ts +486 -0
  231. package/dist/signals/library-senders-reach-change.js +538 -0
  232. package/dist/signals/library-senders-reach.d.ts +340 -0
  233. package/dist/signals/library-senders-reach.js +252 -0
  234. package/dist/signals/library-senders.d.ts +271 -0
  235. package/dist/signals/library-senders.js +180 -0
  236. package/dist/signals/library-word-reach-change.d.ts +567 -0
  237. package/dist/signals/library-word-reach-change.js +564 -0
  238. package/dist/signals/library.d.ts +306 -0
  239. package/dist/signals/library.js +178 -0
  240. package/dist/signals/memory.d.ts +9 -0
  241. package/dist/signals/memory.js +246 -14
  242. package/dist/signals/migrate.d.ts +20 -4
  243. package/dist/signals/migrate.js +269 -8
  244. package/dist/signals/notice.d.ts +389 -0
  245. package/dist/signals/notice.js +250 -0
  246. package/dist/signals/pace-change.d.ts +501 -0
  247. package/dist/signals/pace-change.js +310 -0
  248. package/dist/signals/pace.d.ts +296 -0
  249. package/dist/signals/pace.js +291 -0
  250. package/dist/signals/page-views.d.ts +365 -0
  251. package/dist/signals/page-views.js +218 -0
  252. package/dist/signals/part-pace.d.ts +378 -0
  253. package/dist/signals/part-pace.js +333 -0
  254. package/dist/signals/parts.d.ts +354 -0
  255. package/dist/signals/parts.js +232 -0
  256. package/dist/signals/postgres.d.ts +16 -2
  257. package/dist/signals/postgres.js +753 -76
  258. package/dist/signals/progress.d.ts +212 -0
  259. package/dist/signals/progress.js +150 -0
  260. package/dist/signals/ratios.d.ts +108 -0
  261. package/dist/signals/ratios.js +40 -0
  262. package/dist/signals/reach.d.ts +309 -0
  263. package/dist/signals/reach.js +93 -0
  264. package/dist/signals/readable.d.ts +34 -0
  265. package/dist/signals/readable.js +34 -0
  266. package/dist/signals/readership.d.ts +381 -0
  267. package/dist/signals/readership.js +308 -0
  268. package/dist/signals/region-pages.d.ts +173 -0
  269. package/dist/signals/region-pages.js +62 -0
  270. package/dist/signals/region.d.ts +287 -0
  271. package/dist/signals/region.js +198 -0
  272. package/dist/signals/retention.d.ts +163 -0
  273. package/dist/signals/retention.js +75 -0
  274. package/dist/signals/rhythm.d.ts +302 -0
  275. package/dist/signals/rhythm.js +262 -0
  276. package/dist/signals/rollup.d.ts +194 -4
  277. package/dist/signals/rollup.js +0 -0
  278. package/dist/signals/schema.d.ts +1069 -1
  279. package/dist/signals/schema.js +393 -3
  280. package/dist/signals/signal.d.ts +237 -11
  281. package/dist/signals/signal.js +70 -10
  282. package/dist/signals/silence-census.d.ts +205 -0
  283. package/dist/signals/silence-census.js +87 -0
  284. package/dist/signals/silences.d.ts +1147 -0
  285. package/dist/signals/silences.js +996 -0
  286. package/dist/signals/subtrees.d.ts +123 -0
  287. package/dist/signals/subtrees.js +102 -0
  288. package/dist/signals/tally.d.ts +262 -12
  289. package/dist/signals/unread.d.ts +292 -0
  290. package/dist/signals/unread.js +137 -0
  291. package/dist/signals/window-agenda.d.ts +276 -0
  292. package/dist/signals/window-agenda.js +83 -0
  293. package/dist/signals/window-figures.d.ts +148 -0
  294. package/dist/signals/window-figures.js +42 -0
  295. package/dist/signals/window-funnels.d.ts +88 -0
  296. package/dist/signals/window-funnels.js +47 -0
  297. package/dist/signals/window.d.ts +866 -0
  298. package/dist/signals/window.js +693 -0
  299. package/dist/signals/words.d.ts +24 -0
  300. package/dist/signals/words.js +24 -0
  301. package/dist/store/cache.d.ts +101 -0
  302. package/dist/store/cache.js +149 -0
  303. package/dist/store/history.d.ts +82 -0
  304. package/dist/store/history.js +36 -0
  305. package/dist/store/index.d.ts +30 -0
  306. package/dist/store/index.js +30 -0
  307. package/dist/store/memory.d.ts +2 -1
  308. package/dist/store/memory.js +48 -12
  309. package/dist/store/migrate.d.ts +106 -0
  310. package/dist/store/migrate.js +323 -7
  311. package/dist/store/postgres-applications.d.ts +4 -0
  312. package/dist/store/postgres-applications.js +197 -0
  313. package/dist/store/postgres-audience.d.ts +14 -0
  314. package/dist/store/postgres-audience.js +272 -0
  315. package/dist/store/postgres-holds.d.ts +10 -1
  316. package/dist/store/postgres-holds.js +116 -101
  317. package/dist/store/postgres-policy-log.d.ts +14 -0
  318. package/dist/store/postgres-policy-log.js +240 -0
  319. package/dist/store/postgres-projects.d.ts +4 -0
  320. package/dist/store/postgres-projects.js +217 -0
  321. package/dist/store/postgres.d.ts +17 -1
  322. package/dist/store/postgres.js +60 -9
  323. package/dist/store/replay.d.ts +102 -1
  324. package/dist/store/replay.js +190 -19
  325. package/dist/store/reseed.d.ts +238 -0
  326. package/dist/store/reseed.js +308 -0
  327. package/dist/store/schema.d.ts +762 -2
  328. package/dist/store/schema.js +218 -5
  329. package/dist/store/source.d.ts +57 -1
  330. package/dist/store/source.js +65 -1
  331. package/dist/store/store.d.ts +29 -6
  332. package/dist/submit/resolve.d.ts +1 -1
  333. package/dist/submit/resolve.js +2 -1
  334. package/dist/telemetry/calibration.d.ts +25 -0
  335. package/dist/telemetry/calibration.js +27 -1
  336. package/dist/telemetry/event.d.ts +391 -33
  337. package/dist/telemetry/event.js +84 -20
  338. package/dist/telemetry/index.d.ts +2 -0
  339. package/dist/telemetry/index.js +2 -0
  340. package/dist/telemetry/journal.d.ts +104 -3
  341. package/dist/telemetry/journal.js +9 -0
  342. package/dist/telemetry/lookup.d.ts +27 -0
  343. package/dist/telemetry/lookup.js +18 -0
  344. package/dist/telemetry/memory.js +33 -1
  345. package/dist/telemetry/migrate.js +22 -1
  346. package/dist/telemetry/postgres.d.ts +10 -1
  347. package/dist/telemetry/postgres.js +188 -90
  348. package/dist/telemetry/remeasure.d.ts +78 -0
  349. package/dist/telemetry/remeasure.js +83 -0
  350. package/dist/telemetry/retention.d.ts +2 -2
  351. package/dist/telemetry/schema.d.ts +17 -0
  352. package/dist/telemetry/schema.js +27 -1
  353. package/dist/telemetry/sink.d.ts +2 -2
  354. package/dist/telemetry/window.d.ts +135 -0
  355. package/dist/telemetry/window.js +101 -0
  356. package/dist/testing/application-contract.d.ts +14 -0
  357. package/dist/testing/application-contract.js +270 -0
  358. package/dist/testing/audience-overlay-contract.d.ts +31 -0
  359. package/dist/testing/audience-overlay-contract.js +354 -0
  360. package/dist/testing/contracts.d.ts +13 -7
  361. package/dist/testing/contracts.js +13 -7
  362. package/dist/testing/definitions.d.ts +78 -0
  363. package/dist/testing/definitions.js +134 -9
  364. package/dist/testing/doubles.d.ts +103 -0
  365. package/dist/testing/doubles.js +143 -0
  366. package/dist/testing/index.d.ts +2 -2
  367. package/dist/testing/index.js +2 -2
  368. package/dist/testing/journal-contract.js +297 -6
  369. package/dist/testing/model-contract.d.ts +110 -0
  370. package/dist/testing/model-contract.js +150 -0
  371. package/dist/testing/policy-log-contract.d.ts +26 -0
  372. package/dist/testing/policy-log-contract.js +344 -0
  373. package/dist/testing/project-contract.d.ts +14 -0
  374. package/dist/testing/project-contract.js +266 -0
  375. package/dist/testing/reader-signal-contract.d.ts +27 -2
  376. package/dist/testing/reader-signal-contract.js +475 -5
  377. package/dist/testing/store-contract.d.ts +7 -1
  378. package/dist/testing/store-contract.js +84 -3
  379. package/dist/theme/apply.d.ts +20 -1
  380. package/dist/theme/apply.js +5 -3
  381. package/dist/theme/contrast.d.ts +19 -14
  382. package/dist/theme/contrast.js +181 -17
  383. package/dist/theme/derive.d.ts +22 -0
  384. package/dist/theme/derive.js +54 -1
  385. package/dist/theme/library.js +1 -1
  386. package/dist/theme/measure.d.ts +34 -0
  387. package/dist/theme/measure.js +30 -1
  388. package/dist/theme/palettes.js +7 -7
  389. package/dist/theme/ramp.d.ts +64 -0
  390. package/dist/theme/ramp.js +114 -0
  391. package/dist/theme/registry.d.ts +9 -0
  392. package/dist/theme/registry.js +11 -1
  393. package/dist/theme/separation.d.ts +97 -3
  394. package/dist/theme/separation.js +75 -0
  395. package/dist/tree/apply.js +13 -0
  396. package/dist/tree/compare.d.ts +9 -0
  397. package/dist/tree/compare.js +18 -0
  398. package/dist/tree/mutation.d.ts +18 -0
  399. package/dist/tree/mutation.js +24 -12
  400. package/dist/tree/navigation.d.ts +5 -0
  401. package/dist/tree/navigation.js +32 -10
  402. package/dist/tree/outline.d.ts +7 -0
  403. package/dist/tree/outline.js +9 -5
  404. package/dist/write/computed.d.ts +60 -0
  405. package/dist/write/computed.js +61 -0
  406. package/dist/write/held.d.ts +59 -0
  407. package/dist/write/index.d.ts +5 -2
  408. package/dist/write/index.js +5 -2
  409. package/dist/write/reseed.d.ts +151 -0
  410. package/dist/write/reseed.js +184 -0
  411. package/dist/write/revert.js +2 -16
  412. package/package.json +25 -3
  413. package/dist/runtime/inverse-interpreter.d.ts +0 -90
  414. package/dist/runtime/inverse-interpreter.js +0 -56
@@ -0,0 +1,340 @@
1
+ import type { PrimitiveType } from "../primitive-type.js";
2
+ import { type PrimitiveRole } from "../role.js";
3
+ import type { UnscaledPage } from "./library-reach.js";
4
+ import { type KindKey } from "./library.js";
5
+ import type { SenderSilence } from "./library-senders.js";
6
+ import { type StoredPageViews } from "./page-views.js";
7
+ import type { PageReading } from "./parts.js";
8
+ /**
9
+ * **Whether a silent component is worth fixing.**
10
+ *
11
+ * [0393](../../decisions/0393-a-silent-component-is-a-census-over-the-placements-the-defect-could-be-seen-on-and-the-share-is-bracketed.md)
12
+ * says which of a deployment's components are silent — *`loom.accordion` is
13
+ * silent in thirty-one of the thirty-four places it stands, across nineteen of
14
+ * your pages* — and
15
+ * [0394](../../decisions/0394-what-a-fix-to-a-silent-component-was-worth-is-read-over-the-places-both-windows-could-check.md)
16
+ * says what fixing one was worth. Both are counts of **places**, and both were
17
+ * explicit that the question an operator asks next is the one neither answers:
18
+ * a component silent in thirty-one places nobody ever scrolled to costs a
19
+ * deployment nothing, and one silent in two places every reader passes through
20
+ * is the measurement hole worth a release.
21
+ *
22
+ * This is that figure, and the sentence is *of the readings that reached inside
23
+ * your accordion, four in ten reached a copy of it that never reported itself*.
24
+ * It is the **twenty-sixth** reading taken out of the server-side join of 0212
25
+ * rather than collected: no payload field, no counter, no column, no table, no
26
+ * byte on any wire, and nothing in a reader's browser.
27
+ *
28
+ * ## The population is the readers we can show were inside, and it is a
29
+ * different population from the census's
30
+ *
31
+ * The census's denominator is the placements the defect **could be seen on** —
32
+ * places holding parts that something below reported reach at. That is already
33
+ * a statement about readers, which is what makes the reader-weighted version a
34
+ * different artefact rather than the same one with weights on it: it is not a
35
+ * second reading over one population, and the two must never be added.
36
+ *
37
+ * So the unit here is **one page view's reading of one place this kind stands**,
38
+ * and a placement's weight is the reach reported *strictly inside* it, put on
39
+ * the scale its page's door counts in. What that weighs is the thing the defect
40
+ * costs: a reader who got inside a band and whose band said nothing is a reading
41
+ * the deployment cannot attribute, and a reader who never got there lost
42
+ * nothing.
43
+ *
44
+ * **The weight is `insideReach` and never the placement's own `reached`.** Its
45
+ * own counter is precisely what is missing at a silent placement — that is the
46
+ * defect — so taking a reporting placement's own reach and a silent one's
47
+ * inside reach would weigh the two sides of one share with two different
48
+ * measurements, and the answer would move with the mix. One measurement on both
49
+ * sides, taken from the one spelling in [`subtrees.ts`](subtrees.ts), is the
50
+ * whole of why this share means anything.
51
+ *
52
+ * **It is the largest count below and never the sum**, because `reached` counts
53
+ * distinct page views per part: adding a subtree's counters multiplies one
54
+ * reader by how finely the page was built. The maximum is a **floor** on the
55
+ * page views that got inside, so every figure here is a floor — which is the
56
+ * direction a census of a quiet deployment is allowed to be wrong in.
57
+ *
58
+ * ## Every term is on the door's scale, which is what lets two pages be added
59
+ *
60
+ * A count taken against one page carries that page's own straddle
61
+ * ([0229](../../decisions/0229-a-share-of-readers-is-estimated-against-the-appearances-and-bounded-against-the-openings.md)),
62
+ * and the straddle rate is each page's own
63
+ * ([0250](../../decisions/0250-a-deployment-is-ordered-by-readers-lost-at-the-doors-scale-and-a-page-the-door-cannot-scale-is-out-of-the-order.md)).
64
+ * So each placement's weight is `atDoorScale(insideReach, door)` — the rule
65
+ * spelled once in [`door.ts`](door.ts) and imported, not a sixth hand-written
66
+ * copy of it — and what comes out is a weighted figure a deployment cannot move
67
+ * by shortening its rollup window.
68
+ *
69
+ * **A kind standing on a page the door cannot scale has no share at all**, for
70
+ * the reason a kind's share of readers has none
71
+ * ([0256](../../decisions/0256-a-kinds-share-of-the-readers-who-met-it-is-a-weighted-mean-of-sound-shares-at-the-doors-scale.md)):
72
+ * a weighted figure over the subset that could be priced is a figure whose
73
+ * denominator nobody named. The share is withheld for the whole kind, the reason
74
+ * is on the row, and the pages that caused it are published once for the reading
75
+ * with **their own** vocabulary's reason on them.
76
+ *
77
+ * ## This share cannot exceed 1, and that is not an accident worth relying on
78
+ *
79
+ * {@link KindSenderReach.unreported} is a sum of the same weights
80
+ * {@link KindSenderReach.inside} is a sum of, over a subset of the same
81
+ * placements, so the quotient is bounded by construction — unlike a share of
82
+ * readers, which goes above 1 exactly where a counter is older than its door's
83
+ * column. That failure still happens here and is still worth saying, so it is
84
+ * {@link KindSenderReach.unreconciled} and it bears on whether the **weights**
85
+ * are trustworthy rather than on whether the share is possible.
86
+ *
87
+ * ## What is deliberately not published
88
+ *
89
+ * **No deployment-wide share.** A share over every kind at once counts one page
90
+ * view once per place it passed through, so a page built out of forty parts
91
+ * weighs forty times one band — a denominator that is an artefact of how finely
92
+ * the pages were written. The artefact is a set of rows, exactly as in a kind's
93
+ * share of readers.
94
+ *
95
+ * **No headcount.** The weights are page views at the door's scale and are
96
+ * deliberately not rounded into people: a share of one part of a page
97
+ * multiplied back up was a count of readers larger than the page had, found on
98
+ * a reader card on 8 October.
99
+ *
100
+ * **Nothing the comparison says.** What a fix was worth across two windows is
101
+ * `librarySendersChangeOf` and is not restated here. The places this reading
102
+ * does carry — {@link KindSenderReach.witnessed},
103
+ * {@link KindSenderReach.silent} and {@link KindSenderReach.indeterminate} —
104
+ * are the census's own counts rather than a second derivation of them, because a
105
+ * weight with no population beside it is a number a surface cannot caption, and
106
+ * they are asserted to reproduce the census term for term.
107
+ *
108
+ * Pure. It reaches no store, no clock and no DOM, it is linear in the parts of
109
+ * the readings times the rows handed in, and nothing in it survives into a
110
+ * browser bundle.
111
+ */
112
+ /** Why a kind has no reader-weighted share of its silent places. */
113
+ export type SenderReachSilence =
114
+ /**
115
+ * The census's own three reasons, which are already a kind's.
116
+ *
117
+ * Reused as **values** rather than said again, the way a kind's share of
118
+ * readers reuses the census of standings: nothing of the kind, a kind
119
+ * standing only in places that hold nothing, and a kind nothing has been
120
+ * under yet are states of the library at this reading's own subject, and a
121
+ * second spelling of them would make a surface drawing both readings print
122
+ * two words for one state.
123
+ */
124
+ SenderSilence
125
+ /**
126
+ * A page bearing a checkable place of this kind has no page-view row at the
127
+ * door, so no weight of it can be put on a scale another page's could be
128
+ * added to.
129
+ *
130
+ * Same state of the world as a page's own reading calls `unmeasured` and a
131
+ * kind's share of readers calls `unscaled`, at this reading's subject.
132
+ */
133
+ | "unscaled"
134
+ /**
135
+ * A page bearing a checkable place of this kind has a row and nothing in it
136
+ * says a page view ever began.
137
+ *
138
+ * Kept apart from `unscaled` because the remedy is the opposite: a missing
139
+ * row is retention or an upgrade, and this is senders that are not marking
140
+ * their openings.
141
+ */
142
+ | "unopened"
143
+ /**
144
+ * A page bearing a checkable place of this kind has openings and no rollup
145
+ * has folded a window of them yet.
146
+ *
147
+ * The one reason here that resolves itself.
148
+ */
149
+ | "uncounted";
150
+ export declare const SENDER_REACH_SILENCES: readonly SenderReachSilence[];
151
+ /** One line per silence, for a surface saying why a kind has no reader-weighted share. */
152
+ export declare const describeSenderReachSilence: (silence: SenderReachSilence) => string;
153
+ /**
154
+ * One kind of part, against the readings that got inside the places it stands.
155
+ *
156
+ * Identity and the census's place counts travel with the weights, so a surface
157
+ * drawing this never holds two lists side by side to find out how much is behind
158
+ * a share. Everything else the census says about the kind — its leaves, the
159
+ * trees it is silent across, the example nodes — stays in the census and is
160
+ * paired on {@link kindKeyOf}.
161
+ */
162
+ export type KindSenderReach = {
163
+ readonly kind: KindKey;
164
+ /** What part a type plays (0114), or `null`. Always `null` on a role row, which carries it as its key. */
165
+ readonly role: PrimitiveRole | null;
166
+ /** Element nodes of this kind across the readings, as the census counts them. */
167
+ readonly placements: number;
168
+ /**
169
+ * Placements the defect could be seen on, which is the census's own count and
170
+ * the population every weight below is taken over.
171
+ *
172
+ * A place holding nothing, and a place nothing has been under in this window,
173
+ * are outside it — so every figure here is a floor for the two reasons the
174
+ * census's own share is one.
175
+ */
176
+ readonly witnessed: number;
177
+ /** Checkable placements that reported no view of themselves, which is the defect (0382). */
178
+ readonly silent: number;
179
+ /** Checkable placements that reported something that was not a view, which is no claim either way (0282). */
180
+ readonly indeterminate: number;
181
+ /** Revisions bearing at least one checkable placement of it. */
182
+ readonly pages: number;
183
+ /**
184
+ * The readings that reached inside a checkable place of this kind, at the
185
+ * door's scale — the denominator, and the figure that says whether any of this
186
+ * is worth an operator's afternoon.
187
+ *
188
+ * `inside = reported + unreported + unclaimed` is published as an identity
189
+ * rather than described. `null` where {@link silence} says why not.
190
+ */
191
+ readonly inside: number | null;
192
+ /** Of those, the ones that reached a place which reported itself. `null` with {@link inside}. */
193
+ readonly reported: number | null;
194
+ /**
195
+ * Of those, the ones that reached a place which said nothing — **the readings
196
+ * this component's silence cost the deployment.**
197
+ *
198
+ * The figure the two censuses of places could not give, and the one a fix is
199
+ * worth doing for. `null` with {@link inside}.
200
+ */
201
+ readonly unreported: number | null;
202
+ /**
203
+ * Of those, the ones that reached a place which reported something that was
204
+ * not a view.
205
+ *
206
+ * Plausibly the same defect and never claimed as it: the gap between
207
+ * {@link share} and {@link atMost}. `null` with {@link inside}.
208
+ */
209
+ readonly unclaimed: number | null;
210
+ /**
211
+ * `unreported ÷ inside` — of the readings that got inside this kind, the share
212
+ * that got inside a copy of it that never reported itself.
213
+ *
214
+ * A **floor**, for the two reasons the census's is, and bounded by 1 by
215
+ * construction. `null` where {@link silence} says why not.
216
+ */
217
+ readonly share: number | null;
218
+ /**
219
+ * `(unreported + unclaimed) ÷ inside`, the other end of the bracket.
220
+ *
221
+ * Equal to {@link share} where nothing is unclaimed, which is what a
222
+ * deployment with working senders publishes.
223
+ */
224
+ readonly atMost: number | null;
225
+ /**
226
+ * Appearances in excess of openings across the bearing pages — the straddle
227
+ * that was divided out of each page's weight before the pages met.
228
+ *
229
+ * Added once per checkable placement, the way a kind's share of readers adds
230
+ * it: it is a statement about the evidence behind the figure rather than a
231
+ * term of it.
232
+ */
233
+ readonly drift: number;
234
+ /** Openings across the bearing pages whose reading no rollup has folded yet. */
235
+ readonly pending: number;
236
+ /**
237
+ * Checkable placements where more reach was reported inside them than their
238
+ * page had appearances, which no rollup produces.
239
+ *
240
+ * Node counters older than the page-view column, or a caller that
241
+ * concatenated two reads. It cannot put {@link share} above 1 and it still
242
+ * means the weights are not to be trusted.
243
+ */
244
+ readonly unreconciled: number;
245
+ /** Nothing straddled, nothing is pending and nothing is unreconciled, so the weights are exact. */
246
+ readonly exact: boolean;
247
+ readonly silence: SenderReachSilence | null;
248
+ };
249
+ /** What a deployment's silent components cost the readers who met them, by kind of part. */
250
+ export type LibrarySendersReach = {
251
+ /**
252
+ * Every type that stands anywhere, most readings lost first.
253
+ *
254
+ * Then the higher share, then by type, so two kinds that cost the same do not
255
+ * reorder on a refresh. A kind with no share sorts after one whose share is
256
+ * nought, because `null` is *nothing can be said* and not *every sender
257
+ * works*.
258
+ */
259
+ readonly byType: readonly KindSenderReach[];
260
+ /** Every role in the vocabulary that stands anywhere, then the row for parts whose type declared none. */
261
+ readonly byRole: readonly KindSenderReach[];
262
+ /** Readings counted, which is revisions of pages and not trees. */
263
+ readonly pages: number;
264
+ /** Distinct trees across them. */
265
+ readonly trees: number;
266
+ /** Element nodes across them, which is the sum of every type row's placements. */
267
+ readonly placements: number;
268
+ /**
269
+ * Page views counted at the door across the pages read, added **once per
270
+ * page**.
271
+ *
272
+ * Addable for the reason no other count here is: a page view began on one
273
+ * revision of one tree and was counted once (0219). It is the weight behind
274
+ * the whole reading and is the denominator of nothing.
275
+ */
276
+ readonly arrivals: number;
277
+ /** Pages the door could scale, which is where every weight here comes from. */
278
+ readonly scaled: number;
279
+ /**
280
+ * The pages bearing a checkable placement that the door could not scale, by
281
+ * tree and newest revision first.
282
+ *
283
+ * The actionable half of every door silence on a row above, in the vocabulary
284
+ * whose subject is a page (0240) and in the type a kind's share of readers
285
+ * already publishes. Empty is the healthy state.
286
+ */
287
+ readonly unscaled: readonly UnscaledPage[];
288
+ /**
289
+ * The type whose silence cost the most readings, which is the component to fix
290
+ * first.
291
+ *
292
+ * By the **count** of readings lost and not by the share, for the reason a
293
+ * page's falls are ranked by the readers they lose (0221): a kind silent in
294
+ * its one quiet place is a perfect share and a smaller problem. **This is the
295
+ * reading's whole argument with the census**, whose `worstSender` is the kind
296
+ * silent in the most *places* — the two orders disagree exactly where a
297
+ * deployment would have fixed the wrong thing, and a surface should say which
298
+ * one it is drawing.
299
+ *
300
+ * A type and never a role, because a type is the thing an author can replace.
301
+ */
302
+ readonly costliestSender: KindSenderReach | null;
303
+ /**
304
+ * Readings of a revision beyond the first, which were dropped.
305
+ *
306
+ * A page twice is the one way a weighted figure can lie about how much weight
307
+ * is behind it (0158).
308
+ */
309
+ readonly duplicated: number;
310
+ /**
311
+ * Door rows for one revision beyond the first, which were ignored.
312
+ *
313
+ * A store keeps one row per revision and audience, so this is a caller's two
314
+ * reads again — and adding them would double a page's arrivals and halve every
315
+ * weight taken against it.
316
+ */
317
+ readonly duplicatedRows: number;
318
+ /**
319
+ * Types whose readings disagreed about the role they play, where the first
320
+ * reading's answer stands.
321
+ *
322
+ * Two registries read as one library, which makes every role row above about
323
+ * neither (0114).
324
+ */
325
+ readonly roleDisagreed: readonly PrimitiveType[];
326
+ };
327
+ /**
328
+ * What a deployment's silent components cost the readers who met them.
329
+ *
330
+ * Takes the readings and the whole window of page-view rows a deployment holds —
331
+ * each page's own row is picked out of them by the published matching rule
332
+ * (`pageViewsFor`) rather than by another hand-written copy of it, because the
333
+ * pairing is the part of every join here that fails quietly when it is got
334
+ * wrong.
335
+ *
336
+ * Linear in the parts of the readings times the rows, with one pass that fills
337
+ * both groupings.
338
+ */
339
+ export declare const librarySendersReachOf: (readings: readonly PageReading[], rows: readonly StoredPageViews[]) => LibrarySendersReach;
340
+ //# sourceMappingURL=library-senders-reach.d.ts.map
@@ -0,0 +1,252 @@
1
+ import { everyMemberOf } from "../closed-set.js";
2
+ import { PRIMITIVE_ROLES } from "../role.js";
3
+ import { readingKeyOf } from "./audiences.js";
4
+ import { atDoorScale, doorOf } from "./door.js";
5
+ import { kindKeyOf } from "./library.js";
6
+ import { pageViewsFor } from "./page-views.js";
7
+ import { senderStatesOf, witnessedState } from "./subtrees.js";
8
+ export const SENDER_REACH_SILENCES = everyMemberOf()([
9
+ "unplaced",
10
+ "unwitnessable",
11
+ "unwitnessed",
12
+ "unscaled",
13
+ "unopened",
14
+ "uncounted",
15
+ ]);
16
+ /** One line per silence, for a surface saying why a kind has no reader-weighted share. */
17
+ export const describeSenderReachSilence = (silence) => {
18
+ switch (silence) {
19
+ case "unplaced":
20
+ return "nothing in the pages read is of this kind";
21
+ case "unwitnessable":
22
+ return "every place this kind stands holds nothing, so a silent sender could not be seen there";
23
+ case "unwitnessed":
24
+ return "nothing reported reach inside any place this kind stands, so nothing could witness it";
25
+ case "unscaled":
26
+ return "a page it stands on has no page views counted at the door, so its weight is not comparable";
27
+ case "unopened":
28
+ return "a page it stands on has a row and nothing has said a page view began";
29
+ case "uncounted":
30
+ return "a page it stands on has readers and no window of their reading has been counted yet";
31
+ }
32
+ };
33
+ /** The kind-level reason a page's reason causes, which is the same state at the other subject. */
34
+ const SENDER_REACH_OF_DOOR = Object.freeze({
35
+ unmeasured: "unscaled",
36
+ unopened: "unopened",
37
+ uncounted: "uncounted",
38
+ });
39
+ const tallying = (kind) => ({
40
+ kind,
41
+ role: null,
42
+ placements: 0,
43
+ leaves: 0,
44
+ unwitnessed: 0,
45
+ witnessed: 0,
46
+ silent: 0,
47
+ indeterminate: 0,
48
+ pages: new Set(),
49
+ inside: 0,
50
+ reported: 0,
51
+ unreported: 0,
52
+ unclaimed: 0,
53
+ drift: 0,
54
+ pending: 0,
55
+ unreconciled: 0,
56
+ blocked: null,
57
+ });
58
+ /**
59
+ * One placement's contribution, which is nothing at all unless the defect could
60
+ * be seen there.
61
+ *
62
+ * The door's reason is taken only from a page bearing a **checkable** placement,
63
+ * for the reason a kind's share of readers takes it only from a page bearing a
64
+ * verdict: a kind nothing has been under is `unwitnessed` and not `unscaled`,
65
+ * because *nobody has stood under it* is the better answer and the door has
66
+ * nothing to weigh either way.
67
+ */
68
+ const add = (into, at, door, revision) => {
69
+ into.placements += 1;
70
+ if (!witnessedState(at.state)) {
71
+ if (at.state === "leaf")
72
+ into.leaves += 1;
73
+ else
74
+ into.unwitnessed += 1;
75
+ return;
76
+ }
77
+ into.witnessed += 1;
78
+ into.pages.add(revision);
79
+ if (at.state === "silent")
80
+ into.silent += 1;
81
+ if (at.state === "indeterminate")
82
+ into.indeterminate += 1;
83
+ if (door.silence !== null) {
84
+ into.blocked ??= door.silence;
85
+ return;
86
+ }
87
+ const weight = atDoorScale(at.insideReach, door);
88
+ into.inside += weight;
89
+ into.drift += door.drift;
90
+ into.pending += door.pending;
91
+ into.unreconciled += at.insideReach > door.appearances ? 1 : 0;
92
+ if (at.state === "silent")
93
+ into.unreported += weight;
94
+ else if (at.state === "indeterminate")
95
+ into.unclaimed += weight;
96
+ else
97
+ into.reported += weight;
98
+ };
99
+ /**
100
+ * The silence, with the reasons tried in the order they have to be tried in.
101
+ *
102
+ * Nothing of the kind first, because *there is no such part in this library* is a
103
+ * better answer than anything about readers. Then the census's two, structural
104
+ * before measurement, because a kind standing only in leaves is unwitnessable
105
+ * however many readers arrive. The door last, because a kind nothing could
106
+ * witness has no weight whether or not its pages could be scaled.
107
+ */
108
+ const silenceOf = (of) => {
109
+ if (of.placements === 0)
110
+ return "unplaced";
111
+ if (of.witnessed === 0)
112
+ return of.unwitnessed === 0 ? "unwitnessable" : "unwitnessed";
113
+ return of.blocked === null ? null : SENDER_REACH_OF_DOOR[of.blocked];
114
+ };
115
+ const rowOf = (of) => {
116
+ const silence = silenceOf(of);
117
+ const measured = silence === null;
118
+ return {
119
+ kind: of.kind,
120
+ role: of.kind.by === "type" ? of.role : null,
121
+ placements: of.placements,
122
+ witnessed: of.witnessed,
123
+ silent: of.silent,
124
+ indeterminate: of.indeterminate,
125
+ pages: of.pages.size,
126
+ inside: measured ? of.inside : null,
127
+ reported: measured ? of.reported : null,
128
+ unreported: measured ? of.unreported : null,
129
+ unclaimed: measured ? of.unclaimed : null,
130
+ share: measured ? of.unreported / of.inside : null,
131
+ atMost: measured ? (of.unreported + of.unclaimed) / of.inside : null,
132
+ drift: of.drift,
133
+ pending: of.pending,
134
+ unreconciled: of.unreconciled,
135
+ exact: measured && of.drift === 0 && of.pending === 0 && of.unreconciled === 0,
136
+ silence,
137
+ };
138
+ };
139
+ /** The name a row is ordered by, which is the key's own and never the row's position. */
140
+ const nameOf = (kind) => (kind.by === "type" ? kind.type : (kind.role ?? ""));
141
+ /**
142
+ * The worse of two, which is the ranking rule spelled once.
143
+ *
144
+ * Most readings lost, then the higher share, then by name — so a kind with no
145
+ * share at all sorts after one with a share of nought rather than above it.
146
+ */
147
+ const worseOf = (one, other) => (other.unreported ?? -1) - (one.unreported ?? -1) ||
148
+ (other.share ?? -1) - (one.share ?? -1) ||
149
+ nameOf(one.kind).localeCompare(nameOf(other.kind));
150
+ /** Tree id, then newest revision first, which is the order the page-view rows are read in. */
151
+ const byPage = (one, other) => one.treeId.localeCompare(other.treeId) || other.revision - one.revision;
152
+ /**
153
+ * What a deployment's silent components cost the readers who met them.
154
+ *
155
+ * Takes the readings and the whole window of page-view rows a deployment holds —
156
+ * each page's own row is picked out of them by the published matching rule
157
+ * (`pageViewsFor`) rather than by another hand-written copy of it, because the
158
+ * pairing is the part of every join here that fails quietly when it is got
159
+ * wrong.
160
+ *
161
+ * Linear in the parts of the readings times the rows, with one pass that fills
162
+ * both groupings.
163
+ */
164
+ export const librarySendersReachOf = (readings, rows) => {
165
+ const tallies = new Map();
166
+ const seen = new Set();
167
+ const trees = new Set();
168
+ const unscaled = [];
169
+ const disagreed = new Set();
170
+ let pages = 0;
171
+ let placements = 0;
172
+ let arrivals = 0;
173
+ let scaled = 0;
174
+ let duplicated = 0;
175
+ let duplicatedRows = 0;
176
+ /**
177
+ * Every role in the vocabulary gets a row whether or not anything plays it,
178
+ * the way the census's role rows do: a role nothing in the library plays is a
179
+ * fact about the library worth having, and a surface that had to tell a
180
+ * missing row from an empty one would be reading the vocabulary itself.
181
+ */
182
+ for (const role of [...PRIMITIVE_ROLES, null]) {
183
+ const kind = { by: "role", role };
184
+ tallies.set(kindKeyOf(kind), tallying(kind));
185
+ }
186
+ for (const reading of readings) {
187
+ const revision = readingKeyOf(reading);
188
+ if (seen.has(revision)) {
189
+ duplicated += 1;
190
+ continue;
191
+ }
192
+ seen.add(revision);
193
+ trees.add(reading.treeId);
194
+ pages += 1;
195
+ const found = pageViewsFor(reading, rows);
196
+ const door = doorOf(found.measured);
197
+ const states = senderStatesOf(reading.parts);
198
+ duplicatedRows += found.duplicated;
199
+ arrivals += door.opened;
200
+ if (door.silence === null)
201
+ scaled += 1;
202
+ /**
203
+ * A page the door cannot scale is listed only where the defect could be
204
+ * seen somewhere on it: a page nothing has been read under is not a page
205
+ * whose readers could not be counted, and listing it would put the
206
+ * commonest healthy state on the one list here that is meant to be empty.
207
+ */
208
+ if (door.silence !== null && states.some((at) => witnessedState(at.state))) {
209
+ unscaled.push({
210
+ treeId: reading.treeId,
211
+ revision: reading.revision,
212
+ silence: door.silence,
213
+ });
214
+ }
215
+ for (const at of states) {
216
+ const keys = [
217
+ { by: "type", type: at.part.type },
218
+ { by: "role", role: at.part.role },
219
+ ];
220
+ placements += 1;
221
+ for (const kind of keys) {
222
+ const key = kindKeyOf(kind);
223
+ const tally = tallies.get(key) ?? tallying(kind);
224
+ if (kind.by === "type") {
225
+ if (tally.placements === 0)
226
+ tally.role = at.part.role;
227
+ else if (tally.role !== at.part.role)
228
+ disagreed.add(at.part.type);
229
+ }
230
+ add(tally, at, door, revision);
231
+ tallies.set(key, tally);
232
+ }
233
+ }
234
+ }
235
+ const built = [...tallies.values()].map(rowOf);
236
+ const byType = built.filter((row) => row.kind.by === "type").sort(worseOf);
237
+ return {
238
+ byType,
239
+ byRole: built.filter((row) => row.kind.by === "role").sort(worseOf),
240
+ pages,
241
+ trees: trees.size,
242
+ placements,
243
+ arrivals,
244
+ scaled,
245
+ unscaled: [...unscaled].sort(byPage),
246
+ costliestSender: byType.find((row) => (row.unreported ?? 0) > 0) ?? null,
247
+ duplicated,
248
+ duplicatedRows,
249
+ roleDisagreed: [...disagreed].sort((one, other) => one.localeCompare(other)),
250
+ };
251
+ };
252
+ //# sourceMappingURL=library-senders-reach.js.map