@elaraai/east-ui 1.0.67 → 1.0.69

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 (306) hide show
  1. package/README.md +2 -2
  2. package/dist/src/charts/chart/index.d.ts +39 -4
  3. package/dist/src/charts/chart/index.d.ts.map +1 -1
  4. package/dist/src/charts/chart/index.js +3 -3
  5. package/dist/src/charts/chart/index.js.map +1 -1
  6. package/dist/src/charts/spec/index.d.ts +61 -3
  7. package/dist/src/charts/spec/index.d.ts.map +1 -1
  8. package/dist/src/charts/spec/types.d.ts +1 -1
  9. package/dist/src/charts/spec/types.js +1 -1
  10. package/dist/src/collections/blend/index.d.ts +1 -1
  11. package/dist/src/collections/blend/index.d.ts.map +1 -1
  12. package/dist/src/collections/blend/index.js +1 -1
  13. package/dist/src/collections/blend/index.js.map +1 -1
  14. package/dist/src/collections/blend/types.js +1 -1
  15. package/dist/src/collections/blend/types.js.map +1 -1
  16. package/dist/src/collections/board/index.d.ts +4 -4
  17. package/dist/src/collections/board/index.d.ts.map +1 -1
  18. package/dist/src/collections/board/index.js +1 -1
  19. package/dist/src/collections/board/index.js.map +1 -1
  20. package/dist/src/collections/board/types.js +1 -1
  21. package/dist/src/collections/board/types.js.map +1 -1
  22. package/dist/src/collections/calendar/index.d.ts +1 -1
  23. package/dist/src/collections/calendar/index.d.ts.map +1 -1
  24. package/dist/src/collections/deck/index.d.ts +58 -0
  25. package/dist/src/collections/deck/index.d.ts.map +1 -1
  26. package/dist/src/collections/index.d.ts +1 -2
  27. package/dist/src/collections/index.d.ts.map +1 -1
  28. package/dist/src/collections/index.js +1 -2
  29. package/dist/src/collections/index.js.map +1 -1
  30. package/dist/src/collections/library/index.d.ts +29 -0
  31. package/dist/src/collections/library/index.d.ts.map +1 -1
  32. package/dist/src/collections/library/types.d.ts +29 -0
  33. package/dist/src/collections/library/types.d.ts.map +1 -1
  34. package/dist/src/collections/matrix/index.d.ts +1 -1
  35. package/dist/src/collections/matrix/index.d.ts.map +1 -1
  36. package/dist/src/collections/plan/assemble.d.ts +3732 -0
  37. package/dist/src/collections/plan/assemble.d.ts.map +1 -0
  38. package/dist/src/collections/plan/assemble.js +187 -0
  39. package/dist/src/collections/plan/assemble.js.map +1 -0
  40. package/dist/src/collections/plan/builders.d.ts +612 -0
  41. package/dist/src/collections/plan/builders.d.ts.map +1 -0
  42. package/dist/src/collections/plan/builders.js +543 -0
  43. package/dist/src/collections/plan/builders.js.map +1 -0
  44. package/dist/src/collections/plan/data-forms.d.ts +332 -0
  45. package/dist/src/collections/plan/data-forms.d.ts.map +1 -0
  46. package/dist/src/collections/plan/data-forms.js +212 -0
  47. package/dist/src/collections/plan/data-forms.js.map +1 -0
  48. package/dist/src/collections/plan/factories.d.ts +338 -0
  49. package/dist/src/collections/plan/factories.d.ts.map +1 -0
  50. package/dist/src/collections/plan/factories.js +414 -0
  51. package/dist/src/collections/plan/factories.js.map +1 -0
  52. package/dist/src/collections/plan/index.d.ts +271 -0
  53. package/dist/src/collections/plan/index.d.ts.map +1 -0
  54. package/dist/src/collections/plan/index.js +162 -0
  55. package/dist/src/collections/plan/index.js.map +1 -0
  56. package/dist/src/collections/plan/ir.d.ts +3496 -0
  57. package/dist/src/collections/plan/ir.d.ts.map +1 -0
  58. package/dist/src/collections/plan/ir.js +83 -0
  59. package/dist/src/collections/plan/ir.js.map +1 -0
  60. package/dist/src/collections/plan/pick.d.ts +115 -0
  61. package/dist/src/collections/plan/pick.d.ts.map +1 -0
  62. package/dist/src/collections/plan/pick.js +193 -0
  63. package/dist/src/collections/plan/pick.js.map +1 -0
  64. package/dist/src/collections/plan/root.d.ts +210 -0
  65. package/dist/src/collections/plan/root.d.ts.map +1 -0
  66. package/dist/src/collections/plan/root.js +146 -0
  67. package/dist/src/collections/plan/root.js.map +1 -0
  68. package/dist/src/collections/plan/series.d.ts +11890 -0
  69. package/dist/src/collections/plan/series.d.ts.map +1 -0
  70. package/dist/src/collections/plan/series.js +412 -0
  71. package/dist/src/collections/plan/series.js.map +1 -0
  72. package/dist/src/collections/plan/types.d.ts +9291 -0
  73. package/dist/src/collections/plan/types.d.ts.map +1 -0
  74. package/dist/src/collections/plan/types.js +940 -0
  75. package/dist/src/collections/plan/types.js.map +1 -0
  76. package/dist/src/collections/roster/index.d.ts +4 -4
  77. package/dist/src/collections/roster/index.d.ts.map +1 -1
  78. package/dist/src/collections/roster/index.js +1 -1
  79. package/dist/src/collections/roster/index.js.map +1 -1
  80. package/dist/src/collections/roster/types.d.ts +1 -1
  81. package/dist/src/collections/roster/types.d.ts.map +1 -1
  82. package/dist/src/collections/roster/types.js +4 -3
  83. package/dist/src/collections/roster/types.js.map +1 -1
  84. package/dist/src/collections/table/index.d.ts +70 -2
  85. package/dist/src/collections/table/index.d.ts.map +1 -1
  86. package/dist/src/collections/table/index.js +55 -11
  87. package/dist/src/collections/table/index.js.map +1 -1
  88. package/dist/src/collections/table/types.d.ts +1 -1
  89. package/dist/src/collections/table/types.d.ts.map +1 -1
  90. package/dist/src/component.d.ts +3898 -1339
  91. package/dist/src/component.d.ts.map +1 -1
  92. package/dist/src/component.js +83 -146
  93. package/dist/src/component.js.map +1 -1
  94. package/dist/src/container/card/types.d.ts +1 -1
  95. package/dist/src/container/card/types.d.ts.map +1 -1
  96. package/dist/src/contracts/approval.d.ts +117 -0
  97. package/dist/src/contracts/approval.d.ts.map +1 -0
  98. package/dist/src/contracts/approval.js +105 -0
  99. package/dist/src/contracts/approval.js.map +1 -0
  100. package/dist/src/contracts/drag.d.ts +3 -3
  101. package/dist/src/contracts/drag.d.ts.map +1 -1
  102. package/dist/src/contracts/drag.js +23 -10
  103. package/dist/src/contracts/drag.js.map +1 -1
  104. package/dist/src/contracts/index.d.ts +4 -1
  105. package/dist/src/contracts/index.d.ts.map +1 -1
  106. package/dist/src/contracts/index.js +4 -1
  107. package/dist/src/contracts/index.js.map +1 -1
  108. package/dist/src/contracts/pick.d.ts +705 -0
  109. package/dist/src/contracts/pick.d.ts.map +1 -0
  110. package/dist/src/contracts/pick.js +360 -0
  111. package/dist/src/contracts/pick.js.map +1 -0
  112. package/dist/src/contracts/review.d.ts +7 -99
  113. package/dist/src/contracts/review.d.ts.map +1 -1
  114. package/dist/src/contracts/review.js +11 -85
  115. package/dist/src/contracts/review.js.map +1 -1
  116. package/dist/src/contracts/slice-affordances.d.ts +13 -4
  117. package/dist/src/contracts/slice-affordances.d.ts.map +1 -1
  118. package/dist/src/contracts/slice-affordances.js +13 -3
  119. package/dist/src/contracts/slice-affordances.js.map +1 -1
  120. package/dist/src/contracts/source.d.ts +432 -0
  121. package/dist/src/contracts/source.d.ts.map +1 -0
  122. package/dist/src/contracts/source.js +505 -0
  123. package/dist/src/contracts/source.js.map +1 -0
  124. package/dist/src/contracts/states.d.ts +130 -0
  125. package/dist/src/contracts/states.d.ts.map +1 -1
  126. package/dist/src/contracts/states.js +122 -0
  127. package/dist/src/contracts/states.js.map +1 -1
  128. package/dist/src/contracts/time.d.ts +76 -0
  129. package/dist/src/contracts/time.d.ts.map +1 -0
  130. package/dist/src/contracts/time.js +78 -0
  131. package/dist/src/contracts/time.js.map +1 -0
  132. package/dist/src/display/trace/types.d.ts +1 -1
  133. package/dist/src/display/trace/types.d.ts.map +1 -1
  134. package/dist/src/index.d.ts +10 -2
  135. package/dist/src/index.d.ts.map +1 -1
  136. package/dist/src/index.js +22 -2
  137. package/dist/src/index.js.map +1 -1
  138. package/dist/src/internal.d.ts +5 -3
  139. package/dist/src/internal.d.ts.map +1 -1
  140. package/dist/src/internal.js +4 -3
  141. package/dist/src/internal.js.map +1 -1
  142. package/dist/src/layout/dock/index.d.ts +1 -1
  143. package/dist/src/layout/dock/index.js +1 -1
  144. package/dist/src/layout/index.d.ts +0 -1
  145. package/dist/src/layout/index.d.ts.map +1 -1
  146. package/dist/src/layout/index.js +0 -1
  147. package/dist/src/layout/index.js.map +1 -1
  148. package/dist/src/overlays/drawer/types.d.ts +1 -1
  149. package/dist/src/overlays/drawer/types.d.ts.map +1 -1
  150. package/dist/src/pick/index.d.ts +443 -0
  151. package/dist/src/pick/index.d.ts.map +1 -0
  152. package/dist/src/pick/index.js +64 -0
  153. package/dist/src/pick/index.js.map +1 -0
  154. package/dist/src/pick/panel/index.d.ts +64 -0
  155. package/dist/src/pick/panel/index.d.ts.map +1 -0
  156. package/dist/src/pick/panel/index.js +61 -0
  157. package/dist/src/pick/panel/index.js.map +1 -0
  158. package/dist/src/platform/slice/index.d.ts +291 -0
  159. package/dist/src/platform/slice/index.d.ts.map +1 -1
  160. package/dist/src/platform/slice/index.js +16 -0
  161. package/dist/src/platform/slice/index.js.map +1 -1
  162. package/dist/src/runtime/collections/deck.d.ts +29 -0
  163. package/dist/src/runtime/collections/deck.d.ts.map +1 -1
  164. package/dist/src/runtime/collections/index.d.ts +1 -2
  165. package/dist/src/runtime/collections/index.d.ts.map +1 -1
  166. package/dist/src/runtime/collections/index.js +1 -2
  167. package/dist/src/runtime/collections/index.js.map +1 -1
  168. package/dist/src/runtime/collections/library.d.ts +1 -1
  169. package/dist/src/runtime/collections/library.js +1 -1
  170. package/dist/src/runtime/collections/plan.d.ts +98 -0
  171. package/dist/src/runtime/collections/plan.d.ts.map +1 -0
  172. package/dist/src/runtime/collections/plan.js +98 -0
  173. package/dist/src/runtime/collections/plan.js.map +1 -0
  174. package/dist/src/runtime/collections/schematic.d.ts +1 -1
  175. package/dist/src/runtime/collections/schematic.js +1 -1
  176. package/dist/src/runtime/collections/table.d.ts +9 -1
  177. package/dist/src/runtime/collections/table.d.ts.map +1 -1
  178. package/dist/src/runtime/collections/table.js +1 -7
  179. package/dist/src/runtime/collections/table.js.map +1 -1
  180. package/dist/src/runtime/layout/dock.d.ts +2 -2
  181. package/dist/src/runtime/layout/dock.js +2 -2
  182. package/dist/src/runtime/layout/index.d.ts +0 -1
  183. package/dist/src/runtime/layout/index.d.ts.map +1 -1
  184. package/dist/src/runtime/layout/index.js +0 -1
  185. package/dist/src/runtime/layout/index.js.map +1 -1
  186. package/dist/src/shared/plot-gutter.d.ts +6 -23
  187. package/dist/src/shared/plot-gutter.d.ts.map +1 -1
  188. package/dist/src/shared/plot-gutter.js +6 -19
  189. package/dist/src/shared/plot-gutter.js.map +1 -1
  190. package/dist/src/shared/reify.d.ts +47 -4
  191. package/dist/src/shared/reify.d.ts.map +1 -1
  192. package/dist/src/shared/reify.js +62 -4
  193. package/dist/src/shared/reify.js.map +1 -1
  194. package/dist/src/slice/breakdown/index.d.ts +27 -0
  195. package/dist/src/slice/breakdown/index.d.ts.map +1 -1
  196. package/dist/src/slice/breakdown/types.d.ts +27 -0
  197. package/dist/src/slice/breakdown/types.d.ts.map +1 -1
  198. package/dist/src/slice/cohort/index.d.ts +54 -0
  199. package/dist/src/slice/cohort/index.d.ts.map +1 -1
  200. package/dist/src/slice/cohort/types.d.ts +27 -0
  201. package/dist/src/slice/cohort/types.d.ts.map +1 -1
  202. package/dist/src/slice/filter/index.d.ts +27 -0
  203. package/dist/src/slice/filter/index.d.ts.map +1 -1
  204. package/dist/src/slice/filter/types.d.ts +27 -0
  205. package/dist/src/slice/filter/types.d.ts.map +1 -1
  206. package/dist/src/slice/index.d.ts +405 -0
  207. package/dist/src/slice/index.d.ts.map +1 -1
  208. package/dist/src/slice/legend/index.d.ts +27 -0
  209. package/dist/src/slice/legend/index.d.ts.map +1 -1
  210. package/dist/src/slice/legend/types.d.ts +27 -0
  211. package/dist/src/slice/legend/types.d.ts.map +1 -1
  212. package/dist/src/slice/range/index.d.ts +60 -18
  213. package/dist/src/slice/range/index.d.ts.map +1 -1
  214. package/dist/src/slice/range/index.js +9 -1
  215. package/dist/src/slice/range/index.js.map +1 -1
  216. package/dist/src/slice/range/types.d.ts +63 -22
  217. package/dist/src/slice/range/types.d.ts.map +1 -1
  218. package/dist/src/slice/range/types.js +12 -5
  219. package/dist/src/slice/range/types.js.map +1 -1
  220. package/dist/src/slice/search/index.d.ts +27 -0
  221. package/dist/src/slice/search/index.d.ts.map +1 -1
  222. package/dist/src/slice/search/types.d.ts +27 -0
  223. package/dist/src/slice/search/types.d.ts.map +1 -1
  224. package/dist/src/slice/summary/index.d.ts +27 -0
  225. package/dist/src/slice/summary/index.d.ts.map +1 -1
  226. package/dist/src/slice/summary/types.d.ts +27 -0
  227. package/dist/src/slice/summary/types.d.ts.map +1 -1
  228. package/dist/src/style/content.d.ts +4 -6
  229. package/dist/src/style/content.d.ts.map +1 -1
  230. package/dist/src/style/content.js +4 -6
  231. package/dist/src/style/content.js.map +1 -1
  232. package/dist/src/style/scheme.js +1 -1
  233. package/dist/src/style/scheme.js.map +1 -1
  234. package/dist/test/collections/index.d.ts +2 -2
  235. package/dist/test/collections/index.d.ts.map +1 -1
  236. package/dist/test/collections/index.js +2 -2
  237. package/dist/test/collections/index.js.map +1 -1
  238. package/dist/test/collections/paged-source.examples.d.ts +9 -0
  239. package/dist/test/collections/paged-source.examples.d.ts.map +1 -0
  240. package/dist/test/collections/paged-source.examples.js +136 -0
  241. package/dist/test/collections/paged-source.examples.js.map +1 -0
  242. package/dist/test/collections/plan.examples.d.ts +125 -0
  243. package/dist/test/collections/plan.examples.d.ts.map +1 -0
  244. package/dist/test/collections/plan.examples.js +2939 -0
  245. package/dist/test/collections/plan.examples.js.map +1 -0
  246. package/dist/test/contracts/pick.examples.d.ts +6 -0
  247. package/dist/test/contracts/pick.examples.d.ts.map +1 -0
  248. package/dist/test/contracts/pick.examples.js +89 -0
  249. package/dist/test/contracts/pick.examples.js.map +1 -0
  250. package/dist/test/layout/dock.examples.d.ts +4 -4
  251. package/dist/test/layout/dock.examples.d.ts.map +1 -1
  252. package/dist/test/layout/dock.examples.js +34 -16
  253. package/dist/test/layout/dock.examples.js.map +1 -1
  254. package/dist/test/slice/slice.examples.d.ts +2 -1
  255. package/dist/test/slice/slice.examples.d.ts.map +1 -1
  256. package/dist/test/slice/slice.examples.js +67 -9
  257. package/dist/test/slice/slice.examples.js.map +1 -1
  258. package/package.json +3 -3
  259. package/dist/src/collections/gantt/index.d.ts +0 -377
  260. package/dist/src/collections/gantt/index.d.ts.map +0 -1
  261. package/dist/src/collections/gantt/index.js +0 -896
  262. package/dist/src/collections/gantt/index.js.map +0 -1
  263. package/dist/src/collections/gantt/types.d.ts +0 -353
  264. package/dist/src/collections/gantt/types.d.ts.map +0 -1
  265. package/dist/src/collections/gantt/types.js +0 -207
  266. package/dist/src/collections/gantt/types.js.map +0 -1
  267. package/dist/src/collections/planner/index.d.ts +0 -624
  268. package/dist/src/collections/planner/index.d.ts.map +0 -1
  269. package/dist/src/collections/planner/index.js +0 -941
  270. package/dist/src/collections/planner/index.js.map +0 -1
  271. package/dist/src/collections/planner/types.d.ts +0 -615
  272. package/dist/src/collections/planner/types.d.ts.map +0 -1
  273. package/dist/src/collections/planner/types.js +0 -423
  274. package/dist/src/collections/planner/types.js.map +0 -1
  275. package/dist/src/layout/aligned-stack/index.d.ts +0 -101
  276. package/dist/src/layout/aligned-stack/index.d.ts.map +0 -1
  277. package/dist/src/layout/aligned-stack/index.js +0 -105
  278. package/dist/src/layout/aligned-stack/index.js.map +0 -1
  279. package/dist/src/layout/aligned-stack/types.d.ts +0 -50
  280. package/dist/src/layout/aligned-stack/types.d.ts.map +0 -1
  281. package/dist/src/layout/aligned-stack/types.js +0 -24
  282. package/dist/src/layout/aligned-stack/types.js.map +0 -1
  283. package/dist/src/runtime/collections/gantt.d.ts +0 -67
  284. package/dist/src/runtime/collections/gantt.d.ts.map +0 -1
  285. package/dist/src/runtime/collections/gantt.js +0 -58
  286. package/dist/src/runtime/collections/gantt.js.map +0 -1
  287. package/dist/src/runtime/collections/planner.d.ts +0 -80
  288. package/dist/src/runtime/collections/planner.d.ts.map +0 -1
  289. package/dist/src/runtime/collections/planner.js +0 -76
  290. package/dist/src/runtime/collections/planner.js.map +0 -1
  291. package/dist/src/runtime/layout/aligned-stack.d.ts +0 -38
  292. package/dist/src/runtime/layout/aligned-stack.d.ts.map +0 -1
  293. package/dist/src/runtime/layout/aligned-stack.js +0 -36
  294. package/dist/src/runtime/layout/aligned-stack.js.map +0 -1
  295. package/dist/test/collections/gantt.examples.d.ts +0 -33
  296. package/dist/test/collections/gantt.examples.d.ts.map +0 -1
  297. package/dist/test/collections/gantt.examples.js +0 -359
  298. package/dist/test/collections/gantt.examples.js.map +0 -1
  299. package/dist/test/collections/planner.examples.d.ts +0 -47
  300. package/dist/test/collections/planner.examples.d.ts.map +0 -1
  301. package/dist/test/collections/planner.examples.js +0 -546
  302. package/dist/test/collections/planner.examples.js.map +0 -1
  303. package/dist/test/layout/aligned-stack.examples.d.ts +0 -25
  304. package/dist/test/layout/aligned-stack.examples.d.ts.map +0 -1
  305. package/dist/test/layout/aligned-stack.examples.js +0 -294
  306. package/dist/test/layout/aligned-stack.examples.js.map +0 -1
@@ -0,0 +1,505 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ /**
6
+ * The ROW-SOURCE contract (#567) — how a collection component takes its rows.
7
+ *
8
+ * A component's `rows` / `data` prop accepts an inline collection or a WINDOWED
9
+ * source, and this module is the one place that vocabulary is spelled. Both are
10
+ * parameterised on the COLLECTION the component speaks — an `Array<Row>` for a
11
+ * positional surface, a `Dict<String, Row>` for a keyed one (#568). east-ui
12
+ * declares the shape; whoever can actually fetch windows produces a value of
13
+ * it. `Data.bindPaged` in `@elaraai/e3-ui` is the production implementation
14
+ * (dataset windows over an e3 workspace) and {@link Paged.of} is the in-memory
15
+ * one; neither is named here, and **nothing in this file imports e3**.
16
+ *
17
+ * # Why a variant, not a narrow struct
18
+ *
19
+ * East struct subtyping is EXACT — same arity, same field names, same order
20
+ * (`types.ts`'s `isSubtypeImpl`: `if (e1.length !== e2.length) return false`).
21
+ * Variants get width subtyping. So a narrow "source" struct could never be
22
+ * *satisfied* by a wider handle, and there is no `extends` to lean on. The
23
+ * component prop therefore takes a {@link RowSourceType} VARIANT, and the
24
+ * factory wraps whatever it was handed into the right arm at build time
25
+ * ({@link resolveRowSource}) — the same shape `Plan`'s rows channel already
26
+ * uses. What lands in the IR is a tagged union the renderer matches
27
+ * exhaustively, never a shape it has to sniff.
28
+ *
29
+ * @packageDocumentation
30
+ */
31
+ import { East, Expr, ArrayType, BooleanType, DictType, FunctionType, IntegerType, OptionType, StringType, StructType, VariantType, variant, some, none, } from "@elaraai/east";
32
+ // ============================================================================
33
+ // Seek — where a key lands in a source's row space
34
+ // ============================================================================
35
+ /**
36
+ * Where a key query landed in a source's canonical row order.
37
+ *
38
+ * @remarks
39
+ * The RANGE, not just a row: a prefix query matches a contiguous run, and the
40
+ * search chrome needs `count` for its "k of n" indicator and its prev/next
41
+ * stepping. `found: false` still carries a `row` — the query's insertion point
42
+ * — so a miss can still position the viewport.
43
+ *
44
+ * @property found - Whether any row matched.
45
+ * @property row - First matched row (a miss carries the insertion row).
46
+ * @property count - Number of matched rows (1/0 for an exact key).
47
+ */
48
+ export const SeekRangeType = StructType({
49
+ found: BooleanType,
50
+ row: IntegerType,
51
+ count: IntegerType,
52
+ });
53
+ /**
54
+ * A key query, in the one form every key-ordered source understands.
55
+ *
56
+ * @remarks
57
+ * Three shapes, because a key is not always one string: an exact whole-key
58
+ * literal, a String prefix, or — for STRUCT keys — exact leading fields with an
59
+ * optional prefix continuing into the next String field. Every shape addresses
60
+ * ONE CONTIGUOUS RANGE in the canonical key order, which is what makes a hit a
61
+ * `row` + `count` rather than a set of scattered matches.
62
+ *
63
+ * Literals are canonical `.east` text of already-validated values, so the query
64
+ * is plain serializable data at any key type — no type-specific wire format,
65
+ * and the search chrome parses the user's text against the key type it was
66
+ * handed ({@link SeekType.keyType}) before it ever gets here.
67
+ *
68
+ * Deliberately the same three shapes as e3's `DatasetFindQuery`, so a bound
69
+ * source forwards a query rather than translating one.
70
+ *
71
+ * @property key - A whole-key `.east` literal — an exact lookup, any key type.
72
+ * @property prefix - A String prefix (String keys, or a Struct key's first
73
+ * field when it is a String).
74
+ * @property fields - Struct keys: `.east` literals of exact leading fields in
75
+ * declaration order (`values`), optionally continuing into the next String
76
+ * field (`prefix`).
77
+ */
78
+ export const SeekQueryType = VariantType({
79
+ key: StringType,
80
+ prefix: StringType,
81
+ fields: StructType({ values: ArrayType(StringType), prefix: OptionType(StringType) }),
82
+ });
83
+ /**
84
+ * The KEY TYPE is deliberately NOT part of this contract.
85
+ *
86
+ * A first design carried it here (`seek: Option<{ keyType: EastTypeType, find }>`)
87
+ * so a component could compose a typed query with no authoring-time knowledge
88
+ * of the dataset's schema. Two things ruled it out:
89
+ *
90
+ * - `EastTypeType` is a `RecursiveType`, and the generic-platform type
91
+ * substituter walks output types structurally — `applyTypeArgs`
92
+ * (`east/src/expr/block.ts`) recurses forever through the marker and blows
93
+ * the stack the moment `Data.bindPaged` instantiates its handle. A recursive
94
+ * type cannot ride a generic platform's output.
95
+ * - It has no consumer. The hosts that mount key search — `<DatasetPreview>`,
96
+ * `<PagedDatasetPreview>` — hold the dataset's `EastTypeValue` already and
97
+ * pass it as a prop; a keyed component's own keys are Strings, whose search
98
+ * input is a plain prefix.
99
+ *
100
+ * So the QUERY is data ({@link SeekQueryType}, `.east` literals as text) and the
101
+ * key type stays with whoever knows the schema. Revisit only with a real
102
+ * component-level consumer, and then as printed type text, not a recursive
103
+ * value.
104
+ */
105
+ // ============================================================================
106
+ // The paged source
107
+ // ============================================================================
108
+ /**
109
+ * A WINDOWED view of a row collection — the contract a component consumes when
110
+ * the source is too large to hold whole.
111
+ *
112
+ * @remarks
113
+ * Deliberately read-only: a window is not a value you can diff or stage.
114
+ *
115
+ * Parameterised on the COLLECTION, not on the row: a window of an `Array<R>`
116
+ * dataset is an `Array<R>`, a window of a `Dict<K, V>` dataset is a
117
+ * `Dict<K, V>`, and the Plan's canvas windows are `Dict<String, PlanRow>`
118
+ * (#568). That is what `Data.bindPaged` already produces — it returns
119
+ * `Option<T>` at the dataset's own type — so the contract matches the producer
120
+ * instead of narrowing it to arrays.
121
+ *
122
+ * `page` and `total` follow the in-flight-is-`none` convention: a window still
123
+ * being fetched reads `none` and the call re-fires when it lands, so the reads
124
+ * belong inside a tracked evaluation. An EMPTY window (`some([])`) means the
125
+ * source is exhausted at that offset — a reader that walks offsets terminates
126
+ * on an empty window, never on `none`.
127
+ *
128
+ * @typeParam C - The collection type one window carries.
129
+ * @param c - The collection type value.
130
+ * @returns The concrete `StructType` of a paged source over `c`.
131
+ *
132
+ * @property id - Comparable identity (a dataset path, a fixture name). East
133
+ * compares every function as EQUAL, so a struct of nothing but closures is
134
+ * indistinguishable from any other — without this field a memoized component
135
+ * never re-renders when the source is swapped, and a window cache cannot key
136
+ * itself. Two sources with the same `id` must serve the same rows.
137
+ * @property page - `(offset, limit)` → that window's elements as a value of the
138
+ * collection type; `none` while in flight, an EMPTY collection at exhaustion.
139
+ * @property total - The source's total element count, once known; `none` until then.
140
+ * @property seek - The source's key-search capability ({@link SeekType}) —
141
+ * `none` when the source is not key-ordered (an Array-backed source cannot
142
+ * seek; there is nothing to binary-search).
143
+ */
144
+ export const PagedSourceType = (c) => StructType({
145
+ id: StringType,
146
+ page: FunctionType([IntegerType, IntegerType], OptionType(c)),
147
+ total: FunctionType([], OptionType(IntegerType)),
148
+ seek: OptionType(FunctionType([SeekQueryType], OptionType(SeekRangeType))),
149
+ });
150
+ // ============================================================================
151
+ // The row-source variant — what components actually store
152
+ // ============================================================================
153
+ /**
154
+ * How a component's rows arrive: inline, or from a windowed source.
155
+ *
156
+ * @remarks
157
+ * Both arms speak the same COLLECTION type — inline is the whole of it, paged
158
+ * is a window of it — so a component that keys its rows (the Plan's
159
+ * `Dict<String, PlanRow>`) and one that positions them (`Array<Row>`) share one
160
+ * vocabulary without either shape leaking into the arm names (#568).
161
+ *
162
+ * @typeParam C - The collection type.
163
+ * @param c - The collection type value.
164
+ * @returns The concrete `VariantType` of a row source over `c`.
165
+ *
166
+ * @property inline - The whole collection, already in hand.
167
+ * @property paged - A {@link PagedSourceType} fetched a window at a time.
168
+ */
169
+ export const RowSourceType = (c) => VariantType({
170
+ inline: c,
171
+ paged: PagedSourceType(c),
172
+ });
173
+ /** A struct expression's field types, or undefined when it isn't a struct. */
174
+ function structFields(t) {
175
+ const type = t;
176
+ return type.type === "Struct" ? (type.fields ?? {}) : undefined;
177
+ }
178
+ /**
179
+ * A collection type's ELEMENT type — what one row of it is. `undefined` for
180
+ * anything that is not a collection.
181
+ */
182
+ function elementTypeOf(t) {
183
+ const type = t;
184
+ if (type === undefined)
185
+ return undefined;
186
+ if (type.type === "Array")
187
+ return type.value;
188
+ if (type.type === "Dict")
189
+ return type.value;
190
+ if (type.type === "Set")
191
+ return type.key;
192
+ return undefined;
193
+ }
194
+ /**
195
+ * A collection type's KEY type — a `Dict`'s key, a `Set`'s element (a set IS
196
+ * its keys). `undefined` for an `Array`, which is positional and has none.
197
+ */
198
+ function keyTypeOf(t) {
199
+ const type = t;
200
+ if (type === undefined)
201
+ return undefined;
202
+ if (type.type === "Dict" || type.type === "Set")
203
+ return type.key;
204
+ return undefined;
205
+ }
206
+ /**
207
+ * Classify a component's rows prop at BUILD time — the one dispatch every
208
+ * collection shares, so no component re-sniffs shapes of its own.
209
+ *
210
+ * Accepted shapes, in order:
211
+ * - a collection expression / value (`Array<R>`, `Dict<K, V>`, `Set<R>`) ⇒ `inline`;
212
+ * - a struct carrying `page` + `total` ⇒ `paged` (a {@link PagedSourceType},
213
+ * or anything structurally matching it — `Data.bindPaged`'s handle);
214
+ * - a struct carrying `read` ⇒ a whole-value bind handle, which resolves by
215
+ * CALLING `read()` and recursing. The call becomes part of the surrounding
216
+ * East expression, so it is evaluated inside the component's reactive render
217
+ * and re-fires like any other tracked read — `rows={handle}` and
218
+ * `rows={handle.read()}` build the same IR.
219
+ *
220
+ * @param data - The rows prop as the author passed it
221
+ * @param label - Component name for the error message (`"Plan"`, `"Table"`)
222
+ * @returns The resolved arm — see {@link ResolvedRowSource}
223
+ * @throws Error when the expression is none of the accepted shapes
224
+ */
225
+ export function resolveRowSource(data, label) {
226
+ const expr = East.value(data);
227
+ const t = Expr.type(expr);
228
+ const inlineElement = elementTypeOf(t);
229
+ if (inlineElement !== undefined) {
230
+ return { kind: "inline", rows: expr, collectionType: t, elementType: inlineElement, keyType: keyTypeOf(t) };
231
+ }
232
+ const fields = structFields(t);
233
+ if (fields !== undefined && fields["page"] !== undefined && fields["total"] !== undefined) {
234
+ // `page: Fn([Int, Int], Option<C>)` — recover the COLLECTION through
235
+ // it, then its element type. An Option is a VARIANT (`cases.some`), not
236
+ // a struct, so the collection hangs off the `some` case.
237
+ const page = fields["page"];
238
+ const collectionType = page.output?.cases?.some;
239
+ const elementType = elementTypeOf(collectionType);
240
+ if (collectionType === undefined || elementType === undefined) {
241
+ throw new Error(`${label}: the paged source's \`page\` must return \`Option<Collection>\` ` +
242
+ `(an Array, Dict or Set) — got ${JSON.stringify(page)}`);
243
+ }
244
+ return {
245
+ kind: "paged", source: expr,
246
+ collectionType, elementType, keyType: keyTypeOf(collectionType),
247
+ };
248
+ }
249
+ if (fields !== undefined && fields["read"] !== undefined) {
250
+ // A whole-value bind handle (`Data.bind`) — read it here, in the
251
+ // surrounding East expression, and resolve the result.
252
+ const handle = expr;
253
+ return resolveRowSource(handle.read(), label);
254
+ }
255
+ throw new Error(`${label}: rows must be a collection, a paged source (\`{ id, page, total }\` — e.g. Data.bindPaged), ` +
256
+ `or a bound value (\`{ read }\` — e.g. Data.bind); got a ${t.type}`);
257
+ }
258
+ /**
259
+ * Wrap a resolved rows prop into the {@link RowSourceType} arm a component
260
+ * stores, mapping each window through the same `make` the inline arm applies
261
+ * to the whole collection.
262
+ *
263
+ * @remarks
264
+ * `make` is the component's own row-construction pipeline (Table's
265
+ * `rows_mapped`, Plan's `applySeries`). Applying it inside `page` is the single
266
+ * point where the DOMAIN collection is erased to the component's row
267
+ * COLLECTION, so everything downstream — the renderer, the window cache — sees
268
+ * one row space.
269
+ *
270
+ * It is handed the source's COLLECTION, not a flattened element array: a keyed
271
+ * component's rows inherit the source's keys, and flattening at the boundary
272
+ * would throw away exactly what makes a window's rows addressable (#568). A
273
+ * positional component (Table) receives its `Array<Row>`; a keyed one (Plan) a
274
+ * `Dict<String, R>`.
275
+ *
276
+ * @typeParam Out - The component's own row COLLECTION type.
277
+ * @param resolved - The output of {@link resolveRowSource}
278
+ * @param outType - The component's row collection type
279
+ * @param make - The source collection → the component's row collection
280
+ * @param idSuffix - Appended to the paged source's `id` — see below
281
+ * @returns The `RowSourceType(outType)` value to store in the IR
282
+ *
283
+ * @remarks
284
+ * `idSuffix` exists because `make` is part of what the derived source SERVES.
285
+ * {@link PagedSourceType} requires that two sources sharing an `id` serve the
286
+ * same rows, and a component whose `make` changes — a Plan whose series list was
287
+ * narrowed by a pick — now serves different rows from the same underlying
288
+ * handle. Since a window cache keys on `id` alone and resident windows are never
289
+ * re-read, an unsigned id leaves the previous rows on screen forever. A
290
+ * component that can vary its `make` must pass a signature of what varied.
291
+ */
292
+ export function buildRowSource(resolved, outType, make, idSuffix) {
293
+ const sourceType = RowSourceType(outType);
294
+ if (resolved.kind === "inline") {
295
+ return East.value(variant("inline", make(resolved.rows)), sourceType);
296
+ }
297
+ const handle = resolved.source;
298
+ // Erased locally: the window type is `Out`, but TS cannot see through the
299
+ // generic to unify `Option<Out>`'s arms — the East type is what types it.
300
+ const winType = outType;
301
+ const page = East.function([IntegerType, IntegerType], OptionType(winType), ($, offset, limit) => {
302
+ const empty = $.const(none, OptionType(winType));
303
+ const win = $.let(handle.page(offset, limit));
304
+ return win.match({
305
+ some: ($, window) => {
306
+ const built = $.let(make(window), outType);
307
+ return $.const(some(built), OptionType(winType));
308
+ },
309
+ none: (_$) => empty,
310
+ });
311
+ });
312
+ // A source predating the contract carries no `id` / `seek`; fall back to a
313
+ // constant identity (it still compares equal to itself) and no seek.
314
+ const fields = structFields(Expr.type(resolved.source)) ?? {};
315
+ const baseId = fields["id"] !== undefined ? handle.id : East.value("", StringType);
316
+ const id = idSuffix !== undefined
317
+ ? East.str `${baseId}#${East.value(idSuffix, StringType)}`
318
+ : baseId;
319
+ const seek = fields["seek"] !== undefined
320
+ ? handle.seek
321
+ : East.value(none, OptionType(FunctionType([SeekQueryType], OptionType(SeekRangeType))));
322
+ return East.value(variant("paged", { id, page, total: handle.total, seek }), sourceType);
323
+ }
324
+ function createPagedOf(id, collection, options) {
325
+ const collectionExpr = East.value(collection);
326
+ if (Expr.type(collectionExpr).type === "Dict") {
327
+ return keyedPagedOf(id, collectionExpr);
328
+ }
329
+ return arrayPagedOf(id, collectionExpr, options);
330
+ }
331
+ /**
332
+ * The KEYED in-memory source — dict windows in canonical key order, with
333
+ * `seek` derived from the keys themselves (a keyed collection needs no key
334
+ * accessor: it already is one).
335
+ */
336
+ function keyedPagedOf(id, collection) {
337
+ const all = collection;
338
+ const valueType = Expr.type(all).value;
339
+ const dictType = DictType(StringType, valueType);
340
+ const entryType = StructType({ key: StringType, value: valueType });
341
+ const entriesType = ArrayType(entryType);
342
+ // Built OUTSIDE every block (an East macro inside one splices per use).
343
+ const keyOfEntry = East.function([entryType], StringType, (_$, e) => e.key);
344
+ const page = East.function([IntegerType, IntegerType], OptionType(dictType), ($, offset, limit) => {
345
+ const src = $.const(all, dictType);
346
+ // `toArray` walks the dictionary in key order, so the window a given
347
+ // offset serves is the window a keyed dataset would serve.
348
+ const entries = $.let(src.toArray(($2, v, k) => $2.const({ key: k, value: v }, entryType)), entriesType);
349
+ const n = $.let(entries.length(), IntegerType);
350
+ const start = $.let(offset.less(n).ifElse(() => offset, () => n), IntegerType);
351
+ const rawEnd = $.let(offset.add(limit), IntegerType);
352
+ const end = $.let(rawEnd.less(n).ifElse(() => rawEnd, () => n), IntegerType);
353
+ // In-memory windows are never in flight; an exhausted offset yields
354
+ // the EMPTY window, which is how a walking reader terminates.
355
+ const win = $.let(entries.slice(start, end), entriesType);
356
+ return some(win.toDict((_$, e) => e.key, (_$, e) => e.value));
357
+ });
358
+ const total = East.function([], OptionType(IntegerType), ($) => {
359
+ const src = $.const(all, dictType);
360
+ return some(src.size());
361
+ });
362
+ // Key order ⇒ the first entry at-or-after the query starts the matching
363
+ // run, and the run is contiguous, so counting the entries that still carry
364
+ // the prefix counts exactly the matches. Both ranges are real
365
+ // `East.function`s built OUTSIDE every block, then CALLED per arm.
366
+ const prefixRange = East.function([entriesType, StringType], SeekRangeType, ($, entries, p) => {
367
+ const by = $.const(keyOfEntry);
368
+ const first = $.let(entries.findSortedFirst(p, by), IntegerType);
369
+ const tail = $.let(entries.slice(first, entries.length()), entriesType);
370
+ const matched = $.let(tail.filter((_$, e) => e.key.startsWith(p)), entriesType);
371
+ const count = $.let(matched.length(), IntegerType);
372
+ return $.let({ found: count.greater(0n), row: first, count }, SeekRangeType);
373
+ });
374
+ const exactRange = East.function([entriesType, StringType], SeekRangeType, ($, entries, k) => {
375
+ const by = $.const(keyOfEntry);
376
+ const first = $.let(entries.findSortedFirst(k, by), IntegerType);
377
+ const tail = $.let(entries.slice(first, entries.length()), entriesType);
378
+ const matched = $.let(tail.filter((_$, e) => East.equal(e.key, k)), entriesType);
379
+ const count = $.let(matched.length(), IntegerType);
380
+ return $.let({ found: count.greater(0n), row: first, count }, SeekRangeType);
381
+ });
382
+ const find = East.function([SeekQueryType], OptionType(SeekRangeType), ($, query) => {
383
+ const src = $.const(all, dictType);
384
+ const entries = $.let(src.toArray(($2, v, k) => $2.const({ key: k, value: v }, entryType)), entriesType);
385
+ const prefixOf = $.const(prefixRange);
386
+ const exactOf = $.const(exactRange);
387
+ // In-memory sources are never in flight, so every arm resolves to
388
+ // `some` immediately — `none` is reserved for a fetch in progress.
389
+ return query.match({
390
+ prefix: ($2, p) => $2.const(some(prefixOf(entries, p)), OptionType(SeekRangeType)),
391
+ // The whole-key `.east` literal of a String key is its quoted text.
392
+ key: ($2, literal) => $2.const(some(exactOf(entries, literal.parse(StringType))), OptionType(SeekRangeType)),
393
+ // Leading FIELDS address a struct key; these keys are Strings, so a
394
+ // leading-field query can only match when it names none of them —
395
+ // then it is just its prefix.
396
+ fields: ($2, f) => {
397
+ const empty = $2.const({ found: false, row: 0n, count: 0n }, SeekRangeType);
398
+ const range = $2.let(f.values.length().equal(0n).ifElse(() => f.prefix.match({
399
+ some: ($3, p) => $3.const(prefixOf(entries, p), SeekRangeType),
400
+ none: ($3) => $3.const(prefixOf(entries, ""), SeekRangeType),
401
+ }), () => empty), SeekRangeType);
402
+ return $2.const(some(range), OptionType(SeekRangeType));
403
+ },
404
+ });
405
+ });
406
+ const seek = some(find);
407
+ return East.value({ id, page, total, seek }, PagedSourceType(dictType));
408
+ }
409
+ /** The POSITIONAL in-memory source — array windows in stream order. */
410
+ function arrayPagedOf(id, rows, options) {
411
+ const all = rows;
412
+ const rowType = Expr.type(all).value;
413
+ const rowsType = ArrayType(rowType);
414
+ // Built OUTSIDE every block: constructing East IR inside one is an
415
+ // authoring-time macro. Inside, each body binds it once with `$.const`.
416
+ const keyOf = options?.key;
417
+ const byFn = keyOf === undefined
418
+ ? undefined
419
+ : East.function([rowType], StringType, (_$, r) => keyOf(r));
420
+ const page = East.function([IntegerType, IntegerType], OptionType(rowsType), ($, offset, limit) => {
421
+ const src = $.const(all, rowsType);
422
+ const n = $.let(src.length(), IntegerType);
423
+ const start = $.let(offset.less(n).ifElse(() => offset, () => n), IntegerType);
424
+ const rawEnd = $.let(offset.add(limit), IntegerType);
425
+ const end = $.let(rawEnd.less(n).ifElse(() => rawEnd, () => n), IntegerType);
426
+ // In-memory windows are never in flight; an exhausted offset yields
427
+ // the EMPTY window, which is how a walking reader terminates.
428
+ const win = $.let(src.slice(start, end), rowsType);
429
+ return some(win);
430
+ });
431
+ const total = East.function([], OptionType(IntegerType), ($) => {
432
+ const src = $.const(all, rowsType);
433
+ return some(src.length());
434
+ });
435
+ // Sorted by key ⇒ the first row at-or-after the query starts the matching
436
+ // run, and the run is contiguous, so counting the rows that still carry the
437
+ // prefix counts exactly the matches. Built as real `East.function`s outside
438
+ // every block, then CALLED per query arm.
439
+ const prefixRange = byFn === undefined ? undefined
440
+ : East.function([rowsType, StringType], SeekRangeType, ($, rows, p) => {
441
+ const by = $.const(byFn);
442
+ const first = $.let(rows.findSortedFirst(p, by), IntegerType);
443
+ const tail = $.let(rows.slice(first, rows.length()), rowsType);
444
+ const matched = $.let(tail.filter((_$, r) => by(r).startsWith(p)), rowsType);
445
+ const count = $.let(matched.length(), IntegerType);
446
+ return $.let({ found: count.greater(0n), row: first, count }, SeekRangeType);
447
+ });
448
+ const exactRange = byFn === undefined ? undefined
449
+ : East.function([rowsType, StringType], SeekRangeType, ($, rows, k) => {
450
+ const by = $.const(byFn);
451
+ const first = $.let(rows.findSortedFirst(k, by), IntegerType);
452
+ const tail = $.let(rows.slice(first, rows.length()), rowsType);
453
+ const matched = $.let(tail.filter((_$, r) => East.equal(by(r), k)), rowsType);
454
+ const count = $.let(matched.length(), IntegerType);
455
+ return $.let({ found: count.greater(0n), row: first, count }, SeekRangeType);
456
+ });
457
+ const seek = prefixRange === undefined || exactRange === undefined
458
+ ? East.value(none, OptionType(FunctionType([SeekQueryType], OptionType(SeekRangeType))))
459
+ : some(East.function([SeekQueryType], OptionType(SeekRangeType), ($, query) => {
460
+ const src = $.const(all, rowsType);
461
+ const prefixOf = $.const(prefixRange);
462
+ const exactOf = $.const(exactRange);
463
+ return query.match({
464
+ prefix: ($2, p) => $2.const(some(prefixOf(src, p)), OptionType(SeekRangeType)),
465
+ key: ($2, literal) => $2.const(some(exactOf(src, literal.parse(StringType))), OptionType(SeekRangeType)),
466
+ fields: ($2, f) => {
467
+ const empty = $2.const({ found: false, row: 0n, count: 0n }, SeekRangeType);
468
+ const range = $2.let(f.values.length().equal(0n).ifElse(() => f.prefix.match({
469
+ some: ($3, p) => $3.const(prefixOf(src, p), SeekRangeType),
470
+ none: ($3) => $3.const(prefixOf(src, ""), SeekRangeType),
471
+ }), () => empty), SeekRangeType);
472
+ return $2.const(some(range), OptionType(SeekRangeType));
473
+ },
474
+ });
475
+ }));
476
+ // Two-step cast (the `Data.bindPaged` idiom): the members are built
477
+ // against the row type recovered from the expression, which TS sees as the
478
+ // erased `EastType` rather than the caller's `R`. The East-side type —
479
+ // `PagedSourceType(rowsType)` — is what actually types the value.
480
+ return East.value({ id, page, total, seek }, PagedSourceType(rowsType));
481
+ }
482
+ /**
483
+ * The `Paged` namespace — building a {@link PagedSourceType} without a server.
484
+ *
485
+ * @remarks
486
+ * The contract itself is what components consume; this namespace is the
487
+ * in-memory producer. Production sources come from the platform that owns the
488
+ * data (`Data.bindPaged` in `@elaraai/e3-ui`).
489
+ */
490
+ export const Paged = {
491
+ /** Build an in-memory paged source over a collection already in hand. */
492
+ of: createPagedOf,
493
+ /** East types — the contract, for `$.const` / `$.let` annotations. */
494
+ Types: {
495
+ /** A windowed row source over a collection type. */
496
+ Source: PagedSourceType,
497
+ /** Where a key query landed in a source's row order. */
498
+ SeekRange: SeekRangeType,
499
+ /** A key query — exact literal, String prefix, or leading struct fields. */
500
+ SeekQuery: SeekQueryType,
501
+ /** How a component's rows arrive (inline / paged), at a collection type. */
502
+ RowSource: RowSourceType,
503
+ },
504
+ };
505
+ //# sourceMappingURL=source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source.js","sourceRoot":"","sources":["../../../src/contracts/source.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAIH,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,EACX,OAAO,EACP,IAAI,EACJ,IAAI,GACP,MAAM,eAAe,CAAC;AAEvB,+EAA+E;AAC/E,mDAAmD;AACnD,+EAA+E;AAE/E;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CAAC;IACpC,KAAK,EAAE,WAAW;IAClB,GAAG,EAAI,WAAW;IAClB,KAAK,EAAE,WAAW;CACrB,CAAC,CAAC;AAIH;;;;;;;;;;;;;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