@almadar/std 16.173.0 → 16.175.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 (220) hide show
  1. package/behaviors/lolo/infra/atoms/std-cross-reference.lolo +2 -4
  2. package/behaviors/lolo/ui/core/atoms/std-board.lolo +5 -9
  3. package/behaviors/lolo/ui/core/atoms/std-browse.lolo +8 -1
  4. package/behaviors/lolo/ui/core/atoms/std-esign-flow.lolo +2 -2
  5. package/behaviors/lolo/ui/core/atoms/std-event-log.lolo +3 -7
  6. package/behaviors/lolo/ui/core/atoms/std-form-advanced.lolo +1 -1
  7. package/behaviors/lolo/ui/core/atoms/std-image-upload-multi.lolo +1 -1
  8. package/behaviors/lolo/ui/core/atoms/std-list.lolo +3 -3
  9. package/behaviors/lolo/ui/core/atoms/std-modal.lolo +2 -2
  10. package/behaviors/lolo/ui/core/atoms/std-multi-party-flow.lolo +2 -4
  11. package/behaviors/lolo/ui/core/atoms/std-rating-review.lolo +5 -13
  12. package/behaviors/lolo/ui/core/atoms/std-recurrence.lolo +3 -7
  13. package/behaviors/lolo/ui/core/atoms/std-saved-search.lolo +1 -1
  14. package/behaviors/lolo/ui/core/atoms/std-signature-capture.lolo +2 -2
  15. package/behaviors/lolo/ui/core/atoms/std-step-flow.lolo +2 -4
  16. package/behaviors/lolo/ui/core/atoms/std-tag-taxonomy.lolo +1 -1
  17. package/behaviors/lolo/ui/core/atoms/std-thread.lolo +2 -2
  18. package/behaviors/lolo/ui/core/atoms/std-vote.lolo +2 -2
  19. package/behaviors/lolo/ui/core/atoms/std-wizard.lolo +3 -7
  20. package/behaviors/lolo/ui/core/atoms/ui-atlas-image.lolo +1 -1
  21. package/behaviors/lolo/ui/core/atoms/ui-atlas-panel.lolo +1 -1
  22. package/behaviors/lolo/ui/core/atoms/ui-center.lolo +1 -1
  23. package/behaviors/lolo/ui/core/atoms/ui-hstack.lolo +1 -1
  24. package/behaviors/lolo/ui/core/atoms/ui-icon.lolo +1 -1
  25. package/behaviors/lolo/ui/core/atoms/ui-stack.lolo +1 -1
  26. package/behaviors/lolo/ui/core/atoms/ui-typography.lolo +1 -1
  27. package/behaviors/lolo/ui/core/atoms/ui-vstack.lolo +1 -1
  28. package/behaviors/lolo/ui/core/molecules/ui-content-renderer.lolo +1 -1
  29. package/behaviors/lolo/ui/core/molecules/ui-form-layout.lolo +1 -1
  30. package/behaviors/lolo/ui/core/molecules/ui-grid.lolo +1 -1
  31. package/behaviors/lolo/ui/core/molecules/ui-table-view.lolo +4 -9
  32. package/behaviors/lolo/ui/core/organisms/ui-chat-bar.lolo +1 -1
  33. package/behaviors/lolo/ui/core/organisms/ui-dashboard-grid.lolo +1 -1
  34. package/behaviors/lolo/ui/core/organisms/ui-detail-panel.lolo +1 -1
  35. package/behaviors/lolo/ui/core/organisms/ui-entity-cards.lolo +1 -1
  36. package/behaviors/lolo/ui/core/organisms/ui-entity-list.lolo +1 -1
  37. package/behaviors/lolo/ui/core/organisms/ui-entity-table.lolo +1 -1
  38. package/behaviors/lolo/ui/core/organisms/ui-form-section.lolo +9 -3
  39. package/behaviors/lolo/ui/core/organisms/ui-form.lolo +9 -3
  40. package/behaviors/lolo/ui/core/organisms/ui-master-detail.lolo +1 -1
  41. package/behaviors/lolo/ui/core/organisms/ui-media-gallery.lolo +1 -1
  42. package/behaviors/lolo/ui/core/organisms/ui-segment-renderer.lolo +7 -1
  43. package/behaviors/lolo/ui/core/organisms/ui-stat-card.lolo +1 -1
  44. package/behaviors/lolo/ui/core/organisms/ui-subagent-trace-panel.lolo +1 -1
  45. package/behaviors/lolo/ui/game/atoms/ui-action-tile.lolo +1 -1
  46. package/behaviors/lolo/ui/game/atoms/ui-draw-shape-layer.lolo +41 -9
  47. package/behaviors/lolo/ui/game/atoms/ui-draw-shape.lolo +40 -8
  48. package/behaviors/lolo/ui/game/atoms/ui-draw-sprite-layer.lolo +13 -3
  49. package/behaviors/lolo/ui/game/atoms/ui-draw-sprite.lolo +12 -2
  50. package/behaviors/lolo/ui/game/atoms/ui-draw-text-layer.lolo +3 -3
  51. package/behaviors/lolo/ui/game/atoms/ui-draw-text.lolo +2 -2
  52. package/behaviors/lolo/ui/game/organisms/std-tactics-board-3d.lolo +32 -2
  53. package/behaviors/lolo/ui/learning/atoms/std-learn-classify.lolo +133 -23
  54. package/behaviors/lolo/ui/learning/atoms/std-learn-compare.lolo +397 -0
  55. package/behaviors/lolo/ui/learning/atoms/std-learn-coupled-sim.lolo +537 -0
  56. package/behaviors/lolo/ui/learning/atoms/std-learn-derivation.lolo +428 -0
  57. package/behaviors/lolo/ui/learning/atoms/std-learn-doser.lolo +520 -0
  58. package/behaviors/lolo/ui/learning/atoms/std-learn-estimate.lolo +419 -0
  59. package/behaviors/lolo/ui/learning/atoms/std-learn-goal-seek.lolo +591 -0
  60. package/behaviors/lolo/ui/learning/atoms/std-learn-grid-sim.lolo +425 -0
  61. package/behaviors/lolo/ui/learning/atoms/std-learn-hotspot.lolo +398 -0
  62. package/behaviors/lolo/ui/learning/atoms/std-learn-measure.lolo +325 -0
  63. package/behaviors/lolo/ui/learning/atoms/std-learn-perturb.lolo +494 -0
  64. package/behaviors/lolo/ui/learning/atoms/std-learn-predict.lolo +408 -0
  65. package/behaviors/lolo/ui/learning/atoms/std-learn-scatter-fit.lolo +805 -0
  66. package/behaviors/lolo/ui/learning/atoms/std-learn-scenario.lolo +307 -0
  67. package/behaviors/lolo/ui/learning/atoms/std-learn-sim-3d.lolo +318 -0
  68. package/behaviors/lolo/ui/learning/atoms/std-learn-speed-drill.lolo +336 -0
  69. package/behaviors/lolo/ui/learning/atoms/std-learn-tour-3d.lolo +409 -0
  70. package/behaviors/lolo/ui/learning/atoms/std-learn-transport.lolo +186 -0
  71. package/behaviors/lolo/ui/learning/atoms/std-learn-tree.lolo +522 -0
  72. package/behaviors/lolo/ui/learning/atoms/ui-algo-graph-canvas.lolo +192 -0
  73. package/behaviors/lolo/ui/learning/atoms/ui-algorithm-canvas.lolo +111 -2
  74. package/behaviors/lolo/ui/learning/atoms/ui-biology-canvas.lolo +193 -5
  75. package/behaviors/lolo/ui/learning/atoms/ui-chemistry-canvas.lolo +173 -5
  76. package/behaviors/lolo/ui/learning/atoms/ui-learning-canvas.lolo +48 -1
  77. package/behaviors/lolo/ui/learning/atoms/ui-math-canvas.lolo +141 -1
  78. package/behaviors/lolo/ui/learning/atoms/ui-physics-canvas.lolo +242 -5
  79. package/behaviors/lolo/ui/marketing/organisms/ui-book-viewer.lolo +1 -1
  80. package/behaviors/lolo/ui/marketing/organisms/ui-case-study-organism.lolo +1 -1
  81. package/behaviors/lolo/ui/marketing/organisms/ui-feature-grid-organism.lolo +1 -1
  82. package/behaviors/lolo/ui/marketing/organisms/ui-hero-organism.lolo +1 -1
  83. package/behaviors/lolo/ui/marketing/organisms/ui-pricing-organism.lolo +1 -1
  84. package/behaviors/lolo/ui/marketing/organisms/ui-showcase-organism.lolo +1 -1
  85. package/behaviors/lolo/ui/marketing/organisms/ui-stats-organism.lolo +1 -1
  86. package/behaviors/lolo/ui/marketing/organisms/ui-step-flow-organism.lolo +1 -1
  87. package/behaviors/lolo/ui/marketing/organisms/ui-team-organism.lolo +1 -1
  88. package/behaviors/registry/agent/atoms/std-agent-session.orb +22 -1
  89. package/behaviors/registry/agent/atoms/std-agent-tool-call.orb +38 -2
  90. package/behaviors/registry/agent/atoms/std-agent-tool-loop.orb +38 -2
  91. package/behaviors/registry/agent/organisms/std-agent-rabit.orb +23 -1
  92. package/behaviors/registry/infra/atoms/std-approval-gate.orb +8 -16
  93. package/behaviors/registry/infra/atoms/std-cache-aside.orb +31 -62
  94. package/behaviors/registry/infra/atoms/std-circuit-breaker.orb +16 -32
  95. package/behaviors/registry/infra/atoms/std-cross-reference.orb +32 -4
  96. package/behaviors/registry/infra/atoms/std-data-erasure.orb +8 -16
  97. package/behaviors/registry/infra/atoms/std-mod-queue.orb +8 -16
  98. package/behaviors/registry/infra/atoms/std-rate-limiter.orb +14 -28
  99. package/behaviors/registry/infra/atoms/std-row-access-control.orb +30 -2
  100. package/behaviors/registry/ui/core/atoms/std-billable-hour.orb +1 -2
  101. package/behaviors/registry/ui/core/atoms/std-board.orb +19 -5
  102. package/behaviors/registry/ui/core/atoms/std-browse.orb +29 -7
  103. package/behaviors/registry/ui/core/atoms/std-dashboard-grid-embedded.orb +1 -2
  104. package/behaviors/registry/ui/core/atoms/std-esign-flow.orb +3 -5
  105. package/behaviors/registry/ui/core/atoms/std-esign-request.orb +3 -6
  106. package/behaviors/registry/ui/core/atoms/std-event-log.orb +17 -3
  107. package/behaviors/registry/ui/core/atoms/std-export.orb +2 -4
  108. package/behaviors/registry/ui/core/atoms/std-form-advanced.orb +1 -1
  109. package/behaviors/registry/ui/core/atoms/std-gallery.orb +9 -18
  110. package/behaviors/registry/ui/core/atoms/std-graphs.orb +15 -1
  111. package/behaviors/registry/ui/core/atoms/std-import.orb +2 -4
  112. package/behaviors/registry/ui/core/atoms/std-list.orb +4 -6
  113. package/behaviors/registry/ui/core/atoms/std-modal.orb +2 -2
  114. package/behaviors/registry/ui/core/atoms/std-multi-party-flow.orb +16 -2
  115. package/behaviors/registry/ui/core/atoms/std-pagination.orb +15 -1
  116. package/behaviors/registry/ui/core/atoms/std-rating-review.orb +19 -5
  117. package/behaviors/registry/ui/core/atoms/std-recurrence.orb +17 -3
  118. package/behaviors/registry/ui/core/atoms/std-rich-editor.orb +15 -1
  119. package/behaviors/registry/ui/core/atoms/std-scatter.orb +15 -1
  120. package/behaviors/registry/ui/core/atoms/std-signature-capture.orb +2 -2
  121. package/behaviors/registry/ui/core/atoms/std-stats.orb +15 -1
  122. package/behaviors/registry/ui/core/atoms/std-step-flow.orb +16 -2
  123. package/behaviors/registry/ui/core/atoms/std-thread.orb +2 -2
  124. package/behaviors/registry/ui/core/atoms/std-vote.orb +2 -2
  125. package/behaviors/registry/ui/core/atoms/std-wizard.orb +17 -3
  126. package/behaviors/registry/ui/core/atoms/ui-atlas-image.orb +4 -1
  127. package/behaviors/registry/ui/core/atoms/ui-atlas-panel.orb +4 -1
  128. package/behaviors/registry/ui/core/atoms/ui-center.orb +4 -1
  129. package/behaviors/registry/ui/core/atoms/ui-hstack.orb +4 -1
  130. package/behaviors/registry/ui/core/atoms/ui-icon.orb +4 -1
  131. package/behaviors/registry/ui/core/atoms/ui-stack.orb +4 -1
  132. package/behaviors/registry/ui/core/atoms/ui-typography.orb +4 -1
  133. package/behaviors/registry/ui/core/atoms/ui-vstack.orb +4 -1
  134. package/behaviors/registry/ui/core/molecules/ui-accordion.orb +3 -3
  135. package/behaviors/registry/ui/core/molecules/ui-content-renderer.orb +4 -1
  136. package/behaviors/registry/ui/core/molecules/ui-form-layout.orb +4 -1
  137. package/behaviors/registry/ui/core/molecules/ui-grid.orb +4 -1
  138. package/behaviors/registry/ui/core/molecules/ui-table-view.orb +4 -39
  139. package/behaviors/registry/ui/core/molecules/ui-tabs.orb +2 -2
  140. package/behaviors/registry/ui/core/molecules/ui-wizard-container.orb +1 -1
  141. package/behaviors/registry/ui/core/organisms/ui-chat-bar.orb +4 -1
  142. package/behaviors/registry/ui/core/organisms/ui-dashboard-grid.orb +5 -2
  143. package/behaviors/registry/ui/core/organisms/ui-detail-panel.orb +5 -2
  144. package/behaviors/registry/ui/core/organisms/ui-entity-cards.orb +4 -1
  145. package/behaviors/registry/ui/core/organisms/ui-entity-list.orb +4 -1
  146. package/behaviors/registry/ui/core/organisms/ui-entity-table.orb +4 -1
  147. package/behaviors/registry/ui/core/organisms/ui-form-section.orb +34 -2
  148. package/behaviors/registry/ui/core/organisms/ui-form.orb +34 -2
  149. package/behaviors/registry/ui/core/organisms/ui-master-detail.orb +4 -1
  150. package/behaviors/registry/ui/core/organisms/ui-media-gallery.orb +4 -1
  151. package/behaviors/registry/ui/core/organisms/ui-segment-renderer.orb +24 -2
  152. package/behaviors/registry/ui/core/organisms/ui-stat-card.orb +4 -1
  153. package/behaviors/registry/ui/core/organisms/ui-subagent-trace-panel.orb +4 -1
  154. package/behaviors/registry/ui/core/organisms/ui-tabbed-container.orb +1 -1
  155. package/behaviors/registry/ui/core/organisms/ui-ui-slot-renderer.orb +1 -1
  156. package/behaviors/registry/ui/game/atoms/std-fx-particles.orb +35 -1
  157. package/behaviors/registry/ui/game/atoms/ui-action-tile.orb +4 -1
  158. package/behaviors/registry/ui/game/atoms/ui-draw-shape-layer.orb +183 -13
  159. package/behaviors/registry/ui/game/atoms/ui-draw-shape.orb +104 -9
  160. package/behaviors/registry/ui/game/atoms/ui-draw-sprite-layer.orb +56 -2
  161. package/behaviors/registry/ui/game/atoms/ui-draw-sprite.orb +36 -4
  162. package/behaviors/registry/ui/game/atoms/ui-draw-text-layer.orb +21 -2
  163. package/behaviors/registry/ui/game/atoms/ui-draw-text.orb +19 -4
  164. package/behaviors/registry/ui/game/organisms/std-tactics-board-3d.orb +173 -2
  165. package/behaviors/registry/ui/learning/atoms/std-learn-classify.orb +1288 -197
  166. package/behaviors/registry/ui/learning/atoms/std-learn-compare.orb +2814 -0
  167. package/behaviors/registry/ui/learning/atoms/std-learn-coupled-sim.orb +3183 -0
  168. package/behaviors/registry/ui/learning/atoms/std-learn-derivation.orb +2512 -0
  169. package/behaviors/registry/ui/learning/atoms/std-learn-doser.orb +3678 -0
  170. package/behaviors/registry/ui/learning/atoms/std-learn-estimate.orb +2394 -0
  171. package/behaviors/registry/ui/learning/atoms/std-learn-goal-seek.orb +3951 -0
  172. package/behaviors/registry/ui/learning/atoms/std-learn-grid-sim.orb +3458 -0
  173. package/behaviors/registry/ui/learning/atoms/std-learn-hotspot.orb +2646 -0
  174. package/behaviors/registry/ui/learning/atoms/std-learn-measure.orb +1979 -0
  175. package/behaviors/registry/ui/learning/atoms/std-learn-perturb.orb +2994 -0
  176. package/behaviors/registry/ui/learning/atoms/std-learn-predict.orb +2682 -0
  177. package/behaviors/registry/ui/learning/atoms/std-learn-scatter-fit.orb +6539 -0
  178. package/behaviors/registry/ui/learning/atoms/std-learn-scenario.orb +1842 -0
  179. package/behaviors/registry/ui/learning/atoms/std-learn-sim-3d.orb +1648 -0
  180. package/behaviors/registry/ui/learning/atoms/std-learn-speed-drill.orb +2307 -0
  181. package/behaviors/registry/ui/learning/atoms/std-learn-tour-3d.orb +3118 -0
  182. package/behaviors/registry/ui/learning/atoms/std-learn-transport.orb +986 -0
  183. package/behaviors/registry/ui/learning/atoms/std-learn-tree.orb +3333 -0
  184. package/behaviors/registry/ui/learning/atoms/ui-algo-graph-canvas.orb +716 -0
  185. package/behaviors/registry/ui/learning/atoms/ui-algorithm-canvas.orb +679 -5
  186. package/behaviors/registry/ui/learning/atoms/ui-biology-canvas.orb +962 -18
  187. package/behaviors/registry/ui/learning/atoms/ui-chemistry-canvas.orb +919 -30
  188. package/behaviors/registry/ui/learning/atoms/ui-learning-canvas.orb +372 -1
  189. package/behaviors/registry/ui/learning/atoms/ui-math-canvas.orb +936 -16
  190. package/behaviors/registry/ui/learning/atoms/ui-physics-canvas.orb +1328 -43
  191. package/behaviors/registry/ui/marketing/atoms/std-marketing-article.orb +1 -2
  192. package/behaviors/registry/ui/marketing/atoms/std-marketing-footer.orb +1 -2
  193. package/behaviors/registry/ui/marketing/atoms/std-marketing-split.orb +1 -2
  194. package/behaviors/registry/ui/marketing/atoms/std-marketing-stats.orb +1 -2
  195. package/behaviors/registry/ui/marketing/atoms/std-marketing-steps.orb +1 -2
  196. package/behaviors/registry/ui/marketing/atoms/std-marketing-team.orb +1 -2
  197. package/behaviors/registry/ui/marketing/organisms/ui-book-viewer.orb +4 -1
  198. package/behaviors/registry/ui/marketing/organisms/ui-case-study-organism.orb +4 -1
  199. package/behaviors/registry/ui/marketing/organisms/ui-feature-grid-organism.orb +4 -1
  200. package/behaviors/registry/ui/marketing/organisms/ui-hero-organism.orb +4 -1
  201. package/behaviors/registry/ui/marketing/organisms/ui-pricing-organism.orb +4 -1
  202. package/behaviors/registry/ui/marketing/organisms/ui-showcase-organism.orb +4 -1
  203. package/behaviors/registry/ui/marketing/organisms/ui-stats-organism.orb +4 -1
  204. package/behaviors/registry/ui/marketing/organisms/ui-step-flow-organism.orb +4 -1
  205. package/behaviors/registry/ui/marketing/organisms/ui-team-organism.orb +4 -1
  206. package/dist/behaviors/exports-reader.js +3704 -2189
  207. package/dist/behaviors/functions/index.d.ts +2638 -254
  208. package/dist/behaviors/functions/index.js +3648 -2190
  209. package/dist/behaviors/index.d.ts +1 -1
  210. package/dist/behaviors/index.js +3705 -2190
  211. package/dist/behaviors/query.js +3704 -2189
  212. package/dist/behaviors-embeddings.hash.json +3 -3
  213. package/dist/behaviors-embeddings.json +289 -213
  214. package/dist/behaviors-registry.json +7900 -587
  215. package/dist/index.d.ts +1 -1
  216. package/dist/index.js +3705 -2190
  217. package/dist/knob-embeddings.hash.json +3 -3
  218. package/dist/knob-embeddings.json +1 -1
  219. package/dist/registry/factory-signatures.json +1 -1
  220. package/package.json +2 -2
@@ -0,0 +1,2307 @@
1
+ {
2
+ "description": "Generic speeded-response drill — a config-declared item roster of prompt + options runs against a live countdown: answering while the clock runs scores the base points plus a speed bonus proportional to the time left, letting the clock hit zero counts as a miss and reveals the answer, and a streak counter rewards consecutive hits with an end-of-round summary of score and best streak. All vocabulary and timing is config-declared, so the same mechanism serves any fluency drill: times tables, sight vocabulary, chemical symbols, flag recognition, interval identification — anywhere fast retrieval is the skill. Standalone by default; behind a lab router set matchMode and it renders only when MODE_SELECTED matches.",
3
+ "ledger": {
4
+ "entries": {
5
+ "ent_01M07581K2W17XA11BNK1FMZGS": {
6
+ "bakedName": "SpeedDrillScene",
7
+ "curName": "SpeedDrillScene",
8
+ "id": "ent_01M07581K2W17XA11BNK1FMZGS",
9
+ "kind": "entity",
10
+ "owner": "workspace",
11
+ "renames": []
12
+ },
13
+ "evt_01M07581K2J8J66ZVYN4B43N01": {
14
+ "bakedName": "INIT",
15
+ "curName": "INIT",
16
+ "id": "evt_01M07581K2J8J66ZVYN4B43N01",
17
+ "kind": "event",
18
+ "owner": "workspace",
19
+ "parent": "trt_01M07581K2JSWMZDZSAVQSR6A2",
20
+ "renames": []
21
+ },
22
+ "evt_01M07581K7405N4D7KZFGQSVC5": {
23
+ "bakedName": "RETRY",
24
+ "curName": "RETRY",
25
+ "id": "evt_01M07581K7405N4D7KZFGQSVC5",
26
+ "kind": "event",
27
+ "owner": "workspace",
28
+ "parent": "trt_01M07581K2JSWMZDZSAVQSR6A2",
29
+ "renames": []
30
+ },
31
+ "evt_01M07581K78GXNST8AG0BTCVS8": {
32
+ "bakedName": "ROUND_RESTARTED",
33
+ "curName": "ROUND_RESTARTED",
34
+ "id": "evt_01M07581K78GXNST8AG0BTCVS8",
35
+ "kind": "event",
36
+ "owner": "workspace",
37
+ "parent": "trt_01M07581K2JSWMZDZSAVQSR6A2",
38
+ "renames": []
39
+ },
40
+ "evt_01M07581K79NFK2TV53DRCRDW8": {
41
+ "bakedName": "MODE_SELECTED",
42
+ "curName": "MODE_SELECTED",
43
+ "id": "evt_01M07581K79NFK2TV53DRCRDW8",
44
+ "kind": "event",
45
+ "owner": "workspace",
46
+ "parent": "trt_01M07581K2JSWMZDZSAVQSR6A2",
47
+ "renames": []
48
+ },
49
+ "evt_01M07581K7FSJ5FS5ZGA7NSXQA": {
50
+ "bakedName": "PROMPT_ADVANCED",
51
+ "curName": "PROMPT_ADVANCED",
52
+ "id": "evt_01M07581K7FSJ5FS5ZGA7NSXQA",
53
+ "kind": "event",
54
+ "owner": "workspace",
55
+ "parent": "trt_01M07581K2JSWMZDZSAVQSR6A2",
56
+ "renames": []
57
+ },
58
+ "evt_01M07581K7H28V8MJMBSBFEGCN": {
59
+ "bakedName": "NEXT",
60
+ "curName": "NEXT",
61
+ "id": "evt_01M07581K7H28V8MJMBSBFEGCN",
62
+ "kind": "event",
63
+ "owner": "workspace",
64
+ "parent": "trt_01M07581K2JSWMZDZSAVQSR6A2",
65
+ "renames": []
66
+ },
67
+ "evt_01M07581K7KS1XANK51S5C3WTP": {
68
+ "bakedName": "ANSWER",
69
+ "curName": "ANSWER",
70
+ "id": "evt_01M07581K7KS1XANK51S5C3WTP",
71
+ "kind": "event",
72
+ "owner": "workspace",
73
+ "parent": "trt_01M07581K2JSWMZDZSAVQSR6A2",
74
+ "renames": []
75
+ },
76
+ "evt_01M07581K7Y94VWHN8SC6JD86W": {
77
+ "bakedName": "ANSWER_JUDGED",
78
+ "curName": "ANSWER_JUDGED",
79
+ "id": "evt_01M07581K7Y94VWHN8SC6JD86W",
80
+ "kind": "event",
81
+ "owner": "workspace",
82
+ "parent": "trt_01M07581K2JSWMZDZSAVQSR6A2",
83
+ "renames": []
84
+ },
85
+ "orb_01M07581K2ME2E69WCC1KWC0X8": {
86
+ "bakedName": "SpeedDrillOrbital",
87
+ "curName": "SpeedDrillOrbital",
88
+ "id": "orb_01M07581K2ME2E69WCC1KWC0X8",
89
+ "kind": "orbital",
90
+ "owner": "workspace",
91
+ "renames": []
92
+ },
93
+ "pag_01M07581K8MQV87WY3RFVT3R3G": {
94
+ "bakedName": "SpeedDrillPage",
95
+ "curName": "SpeedDrillPage",
96
+ "id": "pag_01M07581K8MQV87WY3RFVT3R3G",
97
+ "kind": "page",
98
+ "owner": "workspace",
99
+ "renames": []
100
+ },
101
+ "trt_01M07581K2JSWMZDZSAVQSR6A2": {
102
+ "bakedName": "SpeedDrillSim",
103
+ "curName": "SpeedDrillSim",
104
+ "id": "trt_01M07581K2JSWMZDZSAVQSR6A2",
105
+ "kind": "trait",
106
+ "owner": "workspace",
107
+ "renames": []
108
+ }
109
+ },
110
+ "schemaVersion": 1
111
+ },
112
+ "name": "std-learn-speed-drill",
113
+ "orbitals": [
114
+ {
115
+ "entity": {
116
+ "fields": [
117
+ {
118
+ "name": "id",
119
+ "required": true,
120
+ "type": "string"
121
+ },
122
+ {
123
+ "default": false,
124
+ "name": "active",
125
+ "type": "boolean"
126
+ },
127
+ {
128
+ "name": "title",
129
+ "type": "string"
130
+ },
131
+ {
132
+ "default": 0.0,
133
+ "name": "itemIndex",
134
+ "type": "number"
135
+ },
136
+ {
137
+ "default": 0.0,
138
+ "name": "totalItems",
139
+ "type": "number"
140
+ },
141
+ {
142
+ "default": 0.0,
143
+ "name": "remaining",
144
+ "type": "number"
145
+ },
146
+ {
147
+ "default": false,
148
+ "name": "running",
149
+ "type": "boolean"
150
+ },
151
+ {
152
+ "name": "verdict",
153
+ "type": "string"
154
+ },
155
+ {
156
+ "default": 0.0,
157
+ "name": "score",
158
+ "type": "number"
159
+ },
160
+ {
161
+ "default": 0.0,
162
+ "name": "streak",
163
+ "type": "number"
164
+ },
165
+ {
166
+ "default": 0.0,
167
+ "name": "bestStreak",
168
+ "type": "number"
169
+ },
170
+ {
171
+ "default": false,
172
+ "name": "done",
173
+ "type": "boolean"
174
+ },
175
+ {
176
+ "name": "promptText",
177
+ "type": "string"
178
+ },
179
+ {
180
+ "items": {
181
+ "type": "string"
182
+ },
183
+ "name": "options",
184
+ "type": "array"
185
+ },
186
+ {
187
+ "default": 0.0,
188
+ "name": "correctIndex",
189
+ "type": "number"
190
+ },
191
+ {
192
+ "name": "feedback",
193
+ "type": "string"
194
+ },
195
+ {
196
+ "items": {
197
+ "type": "node"
198
+ },
199
+ "name": "view",
200
+ "type": "array"
201
+ }
202
+ ],
203
+ "id": "ent_01M07581K2W17XA11BNK1FMZGS",
204
+ "name": "SpeedDrillScene",
205
+ "persistence": "runtime"
206
+ },
207
+ "id": "orb_01M07581K2ME2E69WCC1KWC0X8",
208
+ "name": "SpeedDrillOrbital",
209
+ "pages": [
210
+ {
211
+ "id": "pag_01M07581K8MQV87WY3RFVT3R3G",
212
+ "name": "SpeedDrillPage",
213
+ "path": "/learn-speed-drill",
214
+ "traits": [
215
+ {
216
+ "ref": "SpeedDrillSim",
217
+ "refId": "trt_01M07581K2JSWMZDZSAVQSR6A2"
218
+ }
219
+ ]
220
+ }
221
+ ],
222
+ "traits": [
223
+ {
224
+ "category": "interaction",
225
+ "config": {
226
+ "basePoints": {
227
+ "default": 10.0,
228
+ "description": "Points for a correct answer regardless of speed.",
229
+ "label": "Base Points",
230
+ "tier": "domain",
231
+ "type": "number"
232
+ },
233
+ "items": {
234
+ "default": [
235
+ {
236
+ "correctIndex": 1.0,
237
+ "options": [
238
+ "54",
239
+ "56",
240
+ "63",
241
+ "48"
242
+ ],
243
+ "prompt": "7 × 8"
244
+ },
245
+ {
246
+ "correctIndex": 0.0,
247
+ "options": [
248
+ "54",
249
+ "56",
250
+ "45",
251
+ "63"
252
+ ],
253
+ "prompt": "9 × 6"
254
+ },
255
+ {
256
+ "correctIndex": 2.0,
257
+ "options": [
258
+ "124",
259
+ "132",
260
+ "144",
261
+ "148"
262
+ ],
263
+ "prompt": "12 × 12"
264
+ }
265
+ ],
266
+ "description": "The drill roster; each item carries a prompt, its options, and the index of the correct option. Realizations declare their own subject's items here.",
267
+ "items": {
268
+ "properties": {
269
+ "correctIndex": {
270
+ "name": "correctIndex",
271
+ "required": true,
272
+ "type": "number"
273
+ },
274
+ "options": {
275
+ "items": {
276
+ "type": "string"
277
+ },
278
+ "name": "options",
279
+ "required": true,
280
+ "type": "array"
281
+ },
282
+ "prompt": {
283
+ "name": "prompt",
284
+ "required": true,
285
+ "type": "string"
286
+ }
287
+ },
288
+ "type": "object"
289
+ },
290
+ "label": "Items",
291
+ "tier": "domain",
292
+ "type": "[SpeedDrillItem]"
293
+ },
294
+ "matchMode": {
295
+ "default": "",
296
+ "description": "When composed behind a lab router, the MODE_SELECTED mode value this instrument responds to. Empty string means standalone — render immediately on INIT.",
297
+ "label": "Match Mode",
298
+ "tier": "presentation",
299
+ "type": "string"
300
+ },
301
+ "nextLabel": {
302
+ "default": "Next",
303
+ "label": "Next Label",
304
+ "tier": "presentation",
305
+ "type": "string"
306
+ },
307
+ "retryLabel": {
308
+ "default": "Try Again",
309
+ "label": "Retry Label",
310
+ "tier": "presentation",
311
+ "type": "string"
312
+ },
313
+ "speedBonus": {
314
+ "default": 10.0,
315
+ "description": "Maximum extra points awarded in proportion to the time left on the clock.",
316
+ "label": "Speed Bonus",
317
+ "tier": "domain",
318
+ "type": "number"
319
+ },
320
+ "timeLimit": {
321
+ "default": 6.0,
322
+ "description": "Seconds the learner has to answer each item before it counts as a miss.",
323
+ "label": "Time Limit",
324
+ "tier": "domain",
325
+ "type": "number"
326
+ },
327
+ "title": {
328
+ "default": "Speed Drill",
329
+ "description": "Title shown above the drill.",
330
+ "label": "Title",
331
+ "tier": "presentation",
332
+ "type": "string"
333
+ }
334
+ },
335
+ "emits": [
336
+ {
337
+ "description": "The verdict of a speeded answer: correctness, tenths of a second left on the clock, and the running score and streak — a composed listener (coach, grader) can subscribe; a harmless no-op when the atom runs standalone.",
338
+ "event": "ANSWER_JUDGED",
339
+ "eventId": "evt_01M07581K7Y94VWHN8SC6JD86W",
340
+ "payloadSchema": [
341
+ {
342
+ "name": "correct",
343
+ "type": "boolean"
344
+ },
345
+ {
346
+ "name": "timeLeftTenths",
347
+ "type": "number"
348
+ },
349
+ {
350
+ "name": "score",
351
+ "type": "number"
352
+ },
353
+ {
354
+ "name": "streak",
355
+ "type": "number"
356
+ }
357
+ ],
358
+ "scope": "external",
359
+ "synonyms": "speed drill, reaction time, fluency, timed quiz, countdown, rapid recall",
360
+ "tier": "domain"
361
+ },
362
+ {
363
+ "description": "The learner moved to the next item (or completed the round) with the running score.",
364
+ "event": "PROMPT_ADVANCED",
365
+ "eventId": "evt_01M07581K7FSJ5FS5ZGA7NSXQA",
366
+ "payloadSchema": [
367
+ {
368
+ "name": "itemIndex",
369
+ "type": "number"
370
+ },
371
+ {
372
+ "name": "done",
373
+ "type": "boolean"
374
+ },
375
+ {
376
+ "name": "score",
377
+ "type": "number"
378
+ }
379
+ ],
380
+ "scope": "external",
381
+ "tier": "domain"
382
+ },
383
+ {
384
+ "description": "The learner restarted the round from scratch.",
385
+ "event": "ROUND_RESTARTED",
386
+ "eventId": "evt_01M07581K78GXNST8AG0BTCVS8",
387
+ "payloadSchema": [
388
+ {
389
+ "name": "totalItems",
390
+ "type": "number"
391
+ }
392
+ ],
393
+ "scope": "external",
394
+ "tier": "domain"
395
+ }
396
+ ],
397
+ "entityContract": {
398
+ "provides": [
399
+ "active",
400
+ "bestStreak",
401
+ "correctIndex",
402
+ "done",
403
+ "feedback",
404
+ "itemIndex",
405
+ "options",
406
+ "promptText",
407
+ "remaining",
408
+ "running",
409
+ "score",
410
+ "streak",
411
+ "title",
412
+ "totalItems",
413
+ "verdict",
414
+ "view"
415
+ ],
416
+ "requires": []
417
+ },
418
+ "entityRebindable": true,
419
+ "entityRefIds": {
420
+ "SpeedDrillScene": "ent_01M07581K2W17XA11BNK1FMZGS"
421
+ },
422
+ "id": "trt_01M07581K2JSWMZDZSAVQSR6A2",
423
+ "linkedEntity": "SpeedDrillScene",
424
+ "linkedEntityId": "ent_01M07581K2W17XA11BNK1FMZGS",
425
+ "name": "SpeedDrillSim",
426
+ "scope": "instance",
427
+ "stateMachine": {
428
+ "events": [
429
+ {
430
+ "id": "evt_01M07581K2J8J66ZVYN4B43N01",
431
+ "key": "INIT",
432
+ "name": "Initialize"
433
+ },
434
+ {
435
+ "description": "Lab router broadcast naming the active mode; this instrument renders when the mode equals matchMode, otherwise renders null.",
436
+ "id": "evt_01M07581K79NFK2TV53DRCRDW8",
437
+ "key": "MODE_SELECTED",
438
+ "name": "Mode Selected",
439
+ "payloadSchema": [
440
+ {
441
+ "name": "mode",
442
+ "type": "string"
443
+ }
444
+ ],
445
+ "tier": "domain"
446
+ },
447
+ {
448
+ "description": "Learner picked an option while the clock was running — index is the chosen option; it is judged immediately and scored with a speed bonus.",
449
+ "id": "evt_01M07581K7KS1XANK51S5C3WTP",
450
+ "key": "ANSWER",
451
+ "name": "Answer",
452
+ "payloadSchema": [
453
+ {
454
+ "name": "index",
455
+ "type": "number"
456
+ }
457
+ ],
458
+ "tier": "domain"
459
+ },
460
+ {
461
+ "description": "Learner advanced to the next item after a verdict (answered or timed out); past the last item this completes the round.",
462
+ "id": "evt_01M07581K7H28V8MJMBSBFEGCN",
463
+ "key": "NEXT",
464
+ "name": "Next",
465
+ "tier": "domain"
466
+ },
467
+ {
468
+ "description": "Learner restarted the round from the first item with a cleared score and streak.",
469
+ "id": "evt_01M07581K7405N4D7KZFGQSVC5",
470
+ "key": "RETRY",
471
+ "name": "Retry",
472
+ "tier": "domain"
473
+ },
474
+ {
475
+ "description": "The verdict of a speeded answer: correctness, tenths of a second left on the clock, and the running score and streak — a composed listener (coach, grader) can subscribe; a harmless no-op when the atom runs standalone.",
476
+ "id": "evt_01M07581K7Y94VWHN8SC6JD86W",
477
+ "key": "ANSWER_JUDGED",
478
+ "name": "Answer Judged",
479
+ "payloadSchema": [
480
+ {
481
+ "name": "correct",
482
+ "type": "boolean"
483
+ },
484
+ {
485
+ "name": "timeLeftTenths",
486
+ "type": "number"
487
+ },
488
+ {
489
+ "name": "score",
490
+ "type": "number"
491
+ },
492
+ {
493
+ "name": "streak",
494
+ "type": "number"
495
+ }
496
+ ],
497
+ "synonyms": "speed drill, reaction time, fluency, timed quiz, countdown, rapid recall",
498
+ "tier": "domain"
499
+ },
500
+ {
501
+ "description": "The learner moved to the next item (or completed the round) with the running score.",
502
+ "id": "evt_01M07581K7FSJ5FS5ZGA7NSXQA",
503
+ "key": "PROMPT_ADVANCED",
504
+ "name": "Prompt Advanced",
505
+ "payloadSchema": [
506
+ {
507
+ "name": "itemIndex",
508
+ "type": "number"
509
+ },
510
+ {
511
+ "name": "done",
512
+ "type": "boolean"
513
+ },
514
+ {
515
+ "name": "score",
516
+ "type": "number"
517
+ }
518
+ ],
519
+ "tier": "domain"
520
+ },
521
+ {
522
+ "description": "The learner restarted the round from scratch.",
523
+ "id": "evt_01M07581K78GXNST8AG0BTCVS8",
524
+ "key": "ROUND_RESTARTED",
525
+ "name": "Round Restarted",
526
+ "payloadSchema": [
527
+ {
528
+ "name": "totalItems",
529
+ "type": "number"
530
+ }
531
+ ],
532
+ "tier": "domain"
533
+ }
534
+ ],
535
+ "states": [
536
+ {
537
+ "isInitial": true,
538
+ "name": "idle"
539
+ }
540
+ ],
541
+ "transitions": [
542
+ {
543
+ "effects": [
544
+ [
545
+ "let",
546
+ [
547
+ [
548
+ "first",
549
+ [
550
+ "array/nth",
551
+ "@config.items",
552
+ 0.0
553
+ ]
554
+ ]
555
+ ],
556
+ [
557
+ "do",
558
+ [
559
+ "set",
560
+ "@entity.active",
561
+ true
562
+ ],
563
+ [
564
+ "set",
565
+ "@entity.title",
566
+ "@config.title"
567
+ ],
568
+ [
569
+ "set",
570
+ "@entity.itemIndex",
571
+ 0.0
572
+ ],
573
+ [
574
+ "set",
575
+ "@entity.totalItems",
576
+ [
577
+ "array/len",
578
+ "@config.items"
579
+ ]
580
+ ],
581
+ [
582
+ "set",
583
+ "@entity.remaining",
584
+ [
585
+ "*",
586
+ "@config.timeLimit",
587
+ 10.0
588
+ ]
589
+ ],
590
+ [
591
+ "set",
592
+ "@entity.running",
593
+ true
594
+ ],
595
+ [
596
+ "set",
597
+ "@entity.verdict",
598
+ ""
599
+ ],
600
+ [
601
+ "set",
602
+ "@entity.score",
603
+ 0.0
604
+ ],
605
+ [
606
+ "set",
607
+ "@entity.streak",
608
+ 0.0
609
+ ],
610
+ [
611
+ "set",
612
+ "@entity.bestStreak",
613
+ 0.0
614
+ ],
615
+ [
616
+ "set",
617
+ "@entity.done",
618
+ false
619
+ ],
620
+ [
621
+ "set",
622
+ "@entity.promptText",
623
+ [
624
+ "object/get",
625
+ "@first",
626
+ "prompt"
627
+ ]
628
+ ],
629
+ [
630
+ "set",
631
+ "@entity.options",
632
+ [
633
+ "object/get",
634
+ "@first",
635
+ "options"
636
+ ]
637
+ ],
638
+ [
639
+ "set",
640
+ "@entity.correctIndex",
641
+ [
642
+ "object/get",
643
+ "@first",
644
+ "correctIndex"
645
+ ]
646
+ ],
647
+ [
648
+ "set",
649
+ "@entity.feedback",
650
+ ""
651
+ ],
652
+ [
653
+ "set",
654
+ "@entity.view",
655
+ [
656
+ {
657
+ "children": [
658
+ {
659
+ "content": "@entity.promptText",
660
+ "type": "typography",
661
+ "variant": "h4"
662
+ }
663
+ ],
664
+ "padding": "md",
665
+ "type": "card",
666
+ "variant": "bordered"
667
+ }
668
+ ]
669
+ ]
670
+ ]
671
+ ],
672
+ [
673
+ "render-ui",
674
+ "main",
675
+ {
676
+ "children": [
677
+ {
678
+ "children": [
679
+ {
680
+ "content": "@entity.title",
681
+ "type": "typography",
682
+ "variant": "h4"
683
+ },
684
+ {
685
+ "label": [
686
+ "str/concat",
687
+ "Item ",
688
+ [
689
+ "str/concat",
690
+ "",
691
+ [
692
+ "+",
693
+ "@entity.itemIndex",
694
+ 1.0
695
+ ]
696
+ ],
697
+ " of ",
698
+ [
699
+ "str/concat",
700
+ "",
701
+ "@entity.totalItems"
702
+ ]
703
+ ],
704
+ "max": "@entity.totalItems",
705
+ "showPercentage": false,
706
+ "type": "progress-bar",
707
+ "value": [
708
+ "+",
709
+ "@entity.itemIndex",
710
+ 1.0
711
+ ]
712
+ },
713
+ {
714
+ "label": [
715
+ "str/concat",
716
+ "Time left: ",
717
+ [
718
+ "math/round",
719
+ [
720
+ "/",
721
+ "@entity.remaining",
722
+ 10.0
723
+ ],
724
+ 1.0
725
+ ],
726
+ "s"
727
+ ],
728
+ "max": [
729
+ "*",
730
+ "@config.timeLimit",
731
+ 10.0
732
+ ],
733
+ "showPercentage": false,
734
+ "type": "progress-bar",
735
+ "value": "@entity.remaining"
736
+ },
737
+ {
738
+ "children": "@entity.view",
739
+ "direction": "vertical",
740
+ "gap": "md",
741
+ "type": "stack"
742
+ },
743
+ {
744
+ "children": [
745
+ "array/map",
746
+ [
747
+ "array/range",
748
+ 0.0,
749
+ [
750
+ "array/len",
751
+ "@entity.options"
752
+ ]
753
+ ],
754
+ [
755
+ "fn",
756
+ [
757
+ "i"
758
+ ],
759
+ {
760
+ "action": "ANSWER",
761
+ "actionPayload": {
762
+ "index": "@i"
763
+ },
764
+ "disabled": [
765
+ "if",
766
+ "@entity.running",
767
+ false,
768
+ true
769
+ ],
770
+ "label": [
771
+ "array/nth",
772
+ "@entity.options",
773
+ "@i"
774
+ ],
775
+ "size": "sm",
776
+ "type": "button",
777
+ "variant": "secondary"
778
+ }
779
+ ]
780
+ ],
781
+ "direction": "horizontal",
782
+ "gap": "xs",
783
+ "type": "stack"
784
+ },
785
+ {
786
+ "content": "@entity.feedback",
787
+ "type": "typography",
788
+ "variant": "caption"
789
+ },
790
+ {
791
+ "children": [
792
+ {
793
+ "action": "NEXT",
794
+ "disabled": [
795
+ "if",
796
+ [
797
+ "and",
798
+ [
799
+ "==",
800
+ "@entity.running",
801
+ false
802
+ ],
803
+ [
804
+ "and",
805
+ [
806
+ "!=",
807
+ "@entity.verdict",
808
+ ""
809
+ ],
810
+ [
811
+ "==",
812
+ "@entity.done",
813
+ false
814
+ ]
815
+ ]
816
+ ],
817
+ false,
818
+ true
819
+ ],
820
+ "label": "@config.nextLabel",
821
+ "type": "button",
822
+ "variant": "primary"
823
+ },
824
+ {
825
+ "action": "RETRY",
826
+ "disabled": [
827
+ "if",
828
+ "@entity.done",
829
+ false,
830
+ true
831
+ ],
832
+ "label": "@config.retryLabel",
833
+ "type": "button",
834
+ "variant": "ghost"
835
+ }
836
+ ],
837
+ "direction": "horizontal",
838
+ "gap": "sm",
839
+ "type": "stack"
840
+ },
841
+ {
842
+ "label": "Score",
843
+ "max": 0.0,
844
+ "type": "stat-display",
845
+ "value": "@entity.score"
846
+ },
847
+ {
848
+ "content": [
849
+ "str/concat",
850
+ "Streak: ",
851
+ [
852
+ "str/concat",
853
+ "",
854
+ "@entity.streak"
855
+ ],
856
+ " · best: ",
857
+ [
858
+ "str/concat",
859
+ "",
860
+ "@entity.bestStreak"
861
+ ]
862
+ ],
863
+ "type": "typography",
864
+ "variant": "caption"
865
+ }
866
+ ],
867
+ "direction": "vertical",
868
+ "gap": "md",
869
+ "type": "stack"
870
+ }
871
+ ],
872
+ "padding": "md",
873
+ "type": "box"
874
+ }
875
+ ]
876
+ ],
877
+ "event": "INIT",
878
+ "eventId": "evt_01M07581K2J8J66ZVYN4B43N01",
879
+ "from": "idle",
880
+ "guard": [
881
+ "==",
882
+ "@config.matchMode",
883
+ ""
884
+ ],
885
+ "to": "idle"
886
+ },
887
+ {
888
+ "effects": [
889
+ [
890
+ "let",
891
+ [
892
+ [
893
+ "first",
894
+ [
895
+ "array/nth",
896
+ "@config.items",
897
+ 0.0
898
+ ]
899
+ ]
900
+ ],
901
+ [
902
+ "do",
903
+ [
904
+ "set",
905
+ "@entity.active",
906
+ true
907
+ ],
908
+ [
909
+ "set",
910
+ "@entity.title",
911
+ "@config.title"
912
+ ],
913
+ [
914
+ "set",
915
+ "@entity.itemIndex",
916
+ 0.0
917
+ ],
918
+ [
919
+ "set",
920
+ "@entity.totalItems",
921
+ [
922
+ "array/len",
923
+ "@config.items"
924
+ ]
925
+ ],
926
+ [
927
+ "set",
928
+ "@entity.remaining",
929
+ [
930
+ "*",
931
+ "@config.timeLimit",
932
+ 10.0
933
+ ]
934
+ ],
935
+ [
936
+ "set",
937
+ "@entity.running",
938
+ true
939
+ ],
940
+ [
941
+ "set",
942
+ "@entity.verdict",
943
+ ""
944
+ ],
945
+ [
946
+ "set",
947
+ "@entity.score",
948
+ 0.0
949
+ ],
950
+ [
951
+ "set",
952
+ "@entity.streak",
953
+ 0.0
954
+ ],
955
+ [
956
+ "set",
957
+ "@entity.bestStreak",
958
+ 0.0
959
+ ],
960
+ [
961
+ "set",
962
+ "@entity.done",
963
+ false
964
+ ],
965
+ [
966
+ "set",
967
+ "@entity.promptText",
968
+ [
969
+ "object/get",
970
+ "@first",
971
+ "prompt"
972
+ ]
973
+ ],
974
+ [
975
+ "set",
976
+ "@entity.options",
977
+ [
978
+ "object/get",
979
+ "@first",
980
+ "options"
981
+ ]
982
+ ],
983
+ [
984
+ "set",
985
+ "@entity.correctIndex",
986
+ [
987
+ "object/get",
988
+ "@first",
989
+ "correctIndex"
990
+ ]
991
+ ],
992
+ [
993
+ "set",
994
+ "@entity.feedback",
995
+ ""
996
+ ],
997
+ [
998
+ "set",
999
+ "@entity.view",
1000
+ [
1001
+ {
1002
+ "children": [
1003
+ {
1004
+ "content": "@entity.promptText",
1005
+ "type": "typography",
1006
+ "variant": "h4"
1007
+ }
1008
+ ],
1009
+ "padding": "md",
1010
+ "type": "card",
1011
+ "variant": "bordered"
1012
+ }
1013
+ ]
1014
+ ]
1015
+ ]
1016
+ ],
1017
+ [
1018
+ "render-ui",
1019
+ "main",
1020
+ {
1021
+ "children": [
1022
+ {
1023
+ "children": [
1024
+ {
1025
+ "content": "@entity.title",
1026
+ "type": "typography",
1027
+ "variant": "h4"
1028
+ },
1029
+ {
1030
+ "label": [
1031
+ "str/concat",
1032
+ "Item ",
1033
+ [
1034
+ "str/concat",
1035
+ "",
1036
+ [
1037
+ "+",
1038
+ "@entity.itemIndex",
1039
+ 1.0
1040
+ ]
1041
+ ],
1042
+ " of ",
1043
+ [
1044
+ "str/concat",
1045
+ "",
1046
+ "@entity.totalItems"
1047
+ ]
1048
+ ],
1049
+ "max": "@entity.totalItems",
1050
+ "showPercentage": false,
1051
+ "type": "progress-bar",
1052
+ "value": [
1053
+ "+",
1054
+ "@entity.itemIndex",
1055
+ 1.0
1056
+ ]
1057
+ },
1058
+ {
1059
+ "label": [
1060
+ "str/concat",
1061
+ "Time left: ",
1062
+ [
1063
+ "math/round",
1064
+ [
1065
+ "/",
1066
+ "@entity.remaining",
1067
+ 10.0
1068
+ ],
1069
+ 1.0
1070
+ ],
1071
+ "s"
1072
+ ],
1073
+ "max": [
1074
+ "*",
1075
+ "@config.timeLimit",
1076
+ 10.0
1077
+ ],
1078
+ "showPercentage": false,
1079
+ "type": "progress-bar",
1080
+ "value": "@entity.remaining"
1081
+ },
1082
+ {
1083
+ "children": "@entity.view",
1084
+ "direction": "vertical",
1085
+ "gap": "md",
1086
+ "type": "stack"
1087
+ },
1088
+ {
1089
+ "children": [
1090
+ "array/map",
1091
+ [
1092
+ "array/range",
1093
+ 0.0,
1094
+ [
1095
+ "array/len",
1096
+ "@entity.options"
1097
+ ]
1098
+ ],
1099
+ [
1100
+ "fn",
1101
+ [
1102
+ "i"
1103
+ ],
1104
+ {
1105
+ "action": "ANSWER",
1106
+ "actionPayload": {
1107
+ "index": "@i"
1108
+ },
1109
+ "disabled": [
1110
+ "if",
1111
+ "@entity.running",
1112
+ false,
1113
+ true
1114
+ ],
1115
+ "label": [
1116
+ "array/nth",
1117
+ "@entity.options",
1118
+ "@i"
1119
+ ],
1120
+ "size": "sm",
1121
+ "type": "button",
1122
+ "variant": "secondary"
1123
+ }
1124
+ ]
1125
+ ],
1126
+ "direction": "horizontal",
1127
+ "gap": "xs",
1128
+ "type": "stack"
1129
+ },
1130
+ {
1131
+ "content": "@entity.feedback",
1132
+ "type": "typography",
1133
+ "variant": "caption"
1134
+ },
1135
+ {
1136
+ "children": [
1137
+ {
1138
+ "action": "NEXT",
1139
+ "disabled": [
1140
+ "if",
1141
+ [
1142
+ "and",
1143
+ [
1144
+ "==",
1145
+ "@entity.running",
1146
+ false
1147
+ ],
1148
+ [
1149
+ "and",
1150
+ [
1151
+ "!=",
1152
+ "@entity.verdict",
1153
+ ""
1154
+ ],
1155
+ [
1156
+ "==",
1157
+ "@entity.done",
1158
+ false
1159
+ ]
1160
+ ]
1161
+ ],
1162
+ false,
1163
+ true
1164
+ ],
1165
+ "label": "@config.nextLabel",
1166
+ "type": "button",
1167
+ "variant": "primary"
1168
+ },
1169
+ {
1170
+ "action": "RETRY",
1171
+ "disabled": [
1172
+ "if",
1173
+ "@entity.done",
1174
+ false,
1175
+ true
1176
+ ],
1177
+ "label": "@config.retryLabel",
1178
+ "type": "button",
1179
+ "variant": "ghost"
1180
+ }
1181
+ ],
1182
+ "direction": "horizontal",
1183
+ "gap": "sm",
1184
+ "type": "stack"
1185
+ },
1186
+ {
1187
+ "label": "Score",
1188
+ "max": 0.0,
1189
+ "type": "stat-display",
1190
+ "value": "@entity.score"
1191
+ },
1192
+ {
1193
+ "content": [
1194
+ "str/concat",
1195
+ "Streak: ",
1196
+ [
1197
+ "str/concat",
1198
+ "",
1199
+ "@entity.streak"
1200
+ ],
1201
+ " · best: ",
1202
+ [
1203
+ "str/concat",
1204
+ "",
1205
+ "@entity.bestStreak"
1206
+ ]
1207
+ ],
1208
+ "type": "typography",
1209
+ "variant": "caption"
1210
+ }
1211
+ ],
1212
+ "direction": "vertical",
1213
+ "gap": "md",
1214
+ "type": "stack"
1215
+ }
1216
+ ],
1217
+ "padding": "md",
1218
+ "type": "box"
1219
+ }
1220
+ ]
1221
+ ],
1222
+ "event": "MODE_SELECTED",
1223
+ "eventId": "evt_01M07581K79NFK2TV53DRCRDW8",
1224
+ "from": "idle",
1225
+ "guard": [
1226
+ "==",
1227
+ "@payload.mode",
1228
+ "@config.matchMode"
1229
+ ],
1230
+ "to": "idle"
1231
+ },
1232
+ {
1233
+ "effects": [
1234
+ [
1235
+ "let",
1236
+ [
1237
+ [
1238
+ "correct",
1239
+ [
1240
+ "==",
1241
+ "@payload.index",
1242
+ "@entity.correctIndex"
1243
+ ]
1244
+ ],
1245
+ [
1246
+ "bonus",
1247
+ [
1248
+ "math/round",
1249
+ [
1250
+ "/",
1251
+ "@entity.remaining",
1252
+ 10.0
1253
+ ],
1254
+ 1.0
1255
+ ]
1256
+ ],
1257
+ [
1258
+ "points",
1259
+ [
1260
+ "if",
1261
+ "@correct",
1262
+ [
1263
+ "+",
1264
+ "@config.basePoints",
1265
+ [
1266
+ "math/round",
1267
+ [
1268
+ "*",
1269
+ "@config.speedBonus",
1270
+ [
1271
+ "/",
1272
+ "@entity.remaining",
1273
+ [
1274
+ "*",
1275
+ "@config.timeLimit",
1276
+ 10.0
1277
+ ]
1278
+ ]
1279
+ ],
1280
+ 0.0
1281
+ ]
1282
+ ],
1283
+ 0.0
1284
+ ]
1285
+ ],
1286
+ [
1287
+ "newStreak",
1288
+ [
1289
+ "if",
1290
+ "@correct",
1291
+ [
1292
+ "+",
1293
+ "@entity.streak",
1294
+ 1.0
1295
+ ],
1296
+ 0.0
1297
+ ]
1298
+ ]
1299
+ ],
1300
+ [
1301
+ "do",
1302
+ [
1303
+ "set",
1304
+ "@entity.running",
1305
+ false
1306
+ ],
1307
+ [
1308
+ "set",
1309
+ "@entity.verdict",
1310
+ [
1311
+ "if",
1312
+ "@correct",
1313
+ "correct",
1314
+ "wrong"
1315
+ ]
1316
+ ],
1317
+ [
1318
+ "set",
1319
+ "@entity.score",
1320
+ [
1321
+ "+",
1322
+ "@entity.score",
1323
+ "@points"
1324
+ ]
1325
+ ],
1326
+ [
1327
+ "set",
1328
+ "@entity.streak",
1329
+ "@newStreak"
1330
+ ],
1331
+ [
1332
+ "set",
1333
+ "@entity.bestStreak",
1334
+ [
1335
+ "math/max",
1336
+ "@entity.bestStreak",
1337
+ "@newStreak"
1338
+ ]
1339
+ ],
1340
+ [
1341
+ "set",
1342
+ "@entity.feedback",
1343
+ [
1344
+ "if",
1345
+ "@correct",
1346
+ [
1347
+ "str/concat",
1348
+ "Correct with ",
1349
+ "@bonus",
1350
+ "s to spare — +",
1351
+ [
1352
+ "str/concat",
1353
+ "",
1354
+ "@points"
1355
+ ],
1356
+ " points."
1357
+ ],
1358
+ [
1359
+ "str/concat",
1360
+ "Not quite — the answer was: ",
1361
+ [
1362
+ "array/nth",
1363
+ "@entity.options",
1364
+ "@entity.correctIndex"
1365
+ ]
1366
+ ]
1367
+ ]
1368
+ ]
1369
+ ]
1370
+ ],
1371
+ [
1372
+ "emit",
1373
+ "ANSWER_JUDGED",
1374
+ {
1375
+ "correct": [
1376
+ "==",
1377
+ "@entity.verdict",
1378
+ "correct"
1379
+ ],
1380
+ "score": "@entity.score",
1381
+ "streak": "@entity.streak",
1382
+ "timeLeftTenths": "@entity.remaining"
1383
+ }
1384
+ ]
1385
+ ],
1386
+ "event": "ANSWER",
1387
+ "eventId": "evt_01M07581K7KS1XANK51S5C3WTP",
1388
+ "from": "idle",
1389
+ "guard": [
1390
+ "and",
1391
+ [
1392
+ "==",
1393
+ "@entity.active",
1394
+ true
1395
+ ],
1396
+ [
1397
+ "and",
1398
+ [
1399
+ "==",
1400
+ "@entity.running",
1401
+ true
1402
+ ],
1403
+ [
1404
+ "==",
1405
+ "@entity.done",
1406
+ false
1407
+ ]
1408
+ ]
1409
+ ],
1410
+ "to": "idle"
1411
+ },
1412
+ {
1413
+ "effects": [
1414
+ [
1415
+ "let",
1416
+ [
1417
+ [
1418
+ "nextIndex",
1419
+ [
1420
+ "+",
1421
+ "@entity.itemIndex",
1422
+ 1.0
1423
+ ]
1424
+ ],
1425
+ [
1426
+ "finished",
1427
+ [
1428
+ ">=",
1429
+ "@nextIndex",
1430
+ [
1431
+ "array/len",
1432
+ "@config.items"
1433
+ ]
1434
+ ]
1435
+ ],
1436
+ [
1437
+ "next",
1438
+ [
1439
+ "array/nth",
1440
+ "@config.items",
1441
+ [
1442
+ "math/min",
1443
+ "@nextIndex",
1444
+ [
1445
+ "-",
1446
+ [
1447
+ "array/len",
1448
+ "@config.items"
1449
+ ],
1450
+ 1.0
1451
+ ]
1452
+ ]
1453
+ ]
1454
+ ]
1455
+ ],
1456
+ [
1457
+ "do",
1458
+ [
1459
+ "set",
1460
+ "@entity.itemIndex",
1461
+ [
1462
+ "if",
1463
+ "@finished",
1464
+ "@entity.itemIndex",
1465
+ "@nextIndex"
1466
+ ]
1467
+ ],
1468
+ [
1469
+ "set",
1470
+ "@entity.done",
1471
+ [
1472
+ "if",
1473
+ "@finished",
1474
+ true,
1475
+ false
1476
+ ]
1477
+ ],
1478
+ [
1479
+ "set",
1480
+ "@entity.remaining",
1481
+ [
1482
+ "if",
1483
+ "@finished",
1484
+ 0.0,
1485
+ [
1486
+ "*",
1487
+ "@config.timeLimit",
1488
+ 10.0
1489
+ ]
1490
+ ]
1491
+ ],
1492
+ [
1493
+ "set",
1494
+ "@entity.running",
1495
+ [
1496
+ "if",
1497
+ "@finished",
1498
+ false,
1499
+ true
1500
+ ]
1501
+ ],
1502
+ [
1503
+ "set",
1504
+ "@entity.verdict",
1505
+ ""
1506
+ ],
1507
+ [
1508
+ "set",
1509
+ "@entity.promptText",
1510
+ [
1511
+ "if",
1512
+ "@finished",
1513
+ "@entity.promptText",
1514
+ [
1515
+ "object/get",
1516
+ "@next",
1517
+ "prompt"
1518
+ ]
1519
+ ]
1520
+ ],
1521
+ [
1522
+ "set",
1523
+ "@entity.options",
1524
+ [
1525
+ "if",
1526
+ "@finished",
1527
+ [],
1528
+ [
1529
+ "object/get",
1530
+ "@next",
1531
+ "options"
1532
+ ]
1533
+ ]
1534
+ ],
1535
+ [
1536
+ "set",
1537
+ "@entity.correctIndex",
1538
+ [
1539
+ "if",
1540
+ "@finished",
1541
+ "@entity.correctIndex",
1542
+ [
1543
+ "object/get",
1544
+ "@next",
1545
+ "correctIndex"
1546
+ ]
1547
+ ]
1548
+ ],
1549
+ [
1550
+ "set",
1551
+ "@entity.feedback",
1552
+ [
1553
+ "if",
1554
+ "@finished",
1555
+ [
1556
+ "str/concat",
1557
+ "Round complete — final score ",
1558
+ [
1559
+ "str/concat",
1560
+ "",
1561
+ "@entity.score"
1562
+ ],
1563
+ ", best streak ",
1564
+ [
1565
+ "str/concat",
1566
+ "",
1567
+ "@entity.bestStreak"
1568
+ ],
1569
+ "."
1570
+ ],
1571
+ ""
1572
+ ]
1573
+ ],
1574
+ [
1575
+ "set",
1576
+ "@entity.view",
1577
+ [
1578
+ "if",
1579
+ "@finished",
1580
+ [
1581
+ {
1582
+ "content": "Round Complete",
1583
+ "type": "typography",
1584
+ "variant": "h4"
1585
+ },
1586
+ {
1587
+ "label": "Final score",
1588
+ "max": 0.0,
1589
+ "type": "stat-display",
1590
+ "value": "@entity.score"
1591
+ }
1592
+ ],
1593
+ [
1594
+ {
1595
+ "children": [
1596
+ {
1597
+ "content": "@entity.promptText",
1598
+ "type": "typography",
1599
+ "variant": "h4"
1600
+ }
1601
+ ],
1602
+ "padding": "md",
1603
+ "type": "card",
1604
+ "variant": "bordered"
1605
+ }
1606
+ ]
1607
+ ]
1608
+ ]
1609
+ ]
1610
+ ],
1611
+ [
1612
+ "render-ui",
1613
+ "main",
1614
+ {
1615
+ "children": [
1616
+ {
1617
+ "children": [
1618
+ {
1619
+ "content": "@entity.title",
1620
+ "type": "typography",
1621
+ "variant": "h4"
1622
+ },
1623
+ {
1624
+ "label": [
1625
+ "str/concat",
1626
+ "Item ",
1627
+ [
1628
+ "str/concat",
1629
+ "",
1630
+ [
1631
+ "+",
1632
+ "@entity.itemIndex",
1633
+ 1.0
1634
+ ]
1635
+ ],
1636
+ " of ",
1637
+ [
1638
+ "str/concat",
1639
+ "",
1640
+ "@entity.totalItems"
1641
+ ]
1642
+ ],
1643
+ "max": "@entity.totalItems",
1644
+ "showPercentage": false,
1645
+ "type": "progress-bar",
1646
+ "value": [
1647
+ "+",
1648
+ "@entity.itemIndex",
1649
+ 1.0
1650
+ ]
1651
+ },
1652
+ {
1653
+ "label": [
1654
+ "str/concat",
1655
+ "Time left: ",
1656
+ [
1657
+ "math/round",
1658
+ [
1659
+ "/",
1660
+ "@entity.remaining",
1661
+ 10.0
1662
+ ],
1663
+ 1.0
1664
+ ],
1665
+ "s"
1666
+ ],
1667
+ "max": [
1668
+ "*",
1669
+ "@config.timeLimit",
1670
+ 10.0
1671
+ ],
1672
+ "showPercentage": false,
1673
+ "type": "progress-bar",
1674
+ "value": "@entity.remaining"
1675
+ },
1676
+ {
1677
+ "children": "@entity.view",
1678
+ "direction": "vertical",
1679
+ "gap": "md",
1680
+ "type": "stack"
1681
+ },
1682
+ {
1683
+ "children": [
1684
+ "array/map",
1685
+ [
1686
+ "array/range",
1687
+ 0.0,
1688
+ [
1689
+ "array/len",
1690
+ "@entity.options"
1691
+ ]
1692
+ ],
1693
+ [
1694
+ "fn",
1695
+ [
1696
+ "i"
1697
+ ],
1698
+ {
1699
+ "action": "ANSWER",
1700
+ "actionPayload": {
1701
+ "index": "@i"
1702
+ },
1703
+ "disabled": [
1704
+ "if",
1705
+ "@entity.running",
1706
+ false,
1707
+ true
1708
+ ],
1709
+ "label": [
1710
+ "array/nth",
1711
+ "@entity.options",
1712
+ "@i"
1713
+ ],
1714
+ "size": "sm",
1715
+ "type": "button",
1716
+ "variant": "secondary"
1717
+ }
1718
+ ]
1719
+ ],
1720
+ "direction": "horizontal",
1721
+ "gap": "xs",
1722
+ "type": "stack"
1723
+ },
1724
+ {
1725
+ "content": "@entity.feedback",
1726
+ "type": "typography",
1727
+ "variant": "caption"
1728
+ },
1729
+ {
1730
+ "children": [
1731
+ {
1732
+ "action": "NEXT",
1733
+ "disabled": [
1734
+ "if",
1735
+ [
1736
+ "and",
1737
+ [
1738
+ "==",
1739
+ "@entity.running",
1740
+ false
1741
+ ],
1742
+ [
1743
+ "and",
1744
+ [
1745
+ "!=",
1746
+ "@entity.verdict",
1747
+ ""
1748
+ ],
1749
+ [
1750
+ "==",
1751
+ "@entity.done",
1752
+ false
1753
+ ]
1754
+ ]
1755
+ ],
1756
+ false,
1757
+ true
1758
+ ],
1759
+ "label": "@config.nextLabel",
1760
+ "type": "button",
1761
+ "variant": "primary"
1762
+ },
1763
+ {
1764
+ "action": "RETRY",
1765
+ "disabled": [
1766
+ "if",
1767
+ "@entity.done",
1768
+ false,
1769
+ true
1770
+ ],
1771
+ "label": "@config.retryLabel",
1772
+ "type": "button",
1773
+ "variant": "ghost"
1774
+ }
1775
+ ],
1776
+ "direction": "horizontal",
1777
+ "gap": "sm",
1778
+ "type": "stack"
1779
+ },
1780
+ {
1781
+ "label": "Score",
1782
+ "max": 0.0,
1783
+ "type": "stat-display",
1784
+ "value": "@entity.score"
1785
+ },
1786
+ {
1787
+ "content": [
1788
+ "str/concat",
1789
+ "Streak: ",
1790
+ [
1791
+ "str/concat",
1792
+ "",
1793
+ "@entity.streak"
1794
+ ],
1795
+ " · best: ",
1796
+ [
1797
+ "str/concat",
1798
+ "",
1799
+ "@entity.bestStreak"
1800
+ ]
1801
+ ],
1802
+ "type": "typography",
1803
+ "variant": "caption"
1804
+ }
1805
+ ],
1806
+ "direction": "vertical",
1807
+ "gap": "md",
1808
+ "type": "stack"
1809
+ }
1810
+ ],
1811
+ "padding": "md",
1812
+ "type": "box"
1813
+ }
1814
+ ],
1815
+ [
1816
+ "emit",
1817
+ "PROMPT_ADVANCED",
1818
+ {
1819
+ "done": "@entity.done",
1820
+ "itemIndex": "@entity.itemIndex",
1821
+ "score": "@entity.score"
1822
+ }
1823
+ ]
1824
+ ],
1825
+ "event": "NEXT",
1826
+ "eventId": "evt_01M07581K7H28V8MJMBSBFEGCN",
1827
+ "from": "idle",
1828
+ "guard": [
1829
+ "and",
1830
+ [
1831
+ "==",
1832
+ "@entity.active",
1833
+ true
1834
+ ],
1835
+ [
1836
+ "and",
1837
+ [
1838
+ "==",
1839
+ "@entity.running",
1840
+ false
1841
+ ],
1842
+ [
1843
+ "and",
1844
+ [
1845
+ "!=",
1846
+ "@entity.verdict",
1847
+ ""
1848
+ ],
1849
+ [
1850
+ "==",
1851
+ "@entity.done",
1852
+ false
1853
+ ]
1854
+ ]
1855
+ ]
1856
+ ],
1857
+ "to": "idle"
1858
+ },
1859
+ {
1860
+ "effects": [
1861
+ [
1862
+ "let",
1863
+ [
1864
+ [
1865
+ "first",
1866
+ [
1867
+ "array/nth",
1868
+ "@config.items",
1869
+ 0.0
1870
+ ]
1871
+ ]
1872
+ ],
1873
+ [
1874
+ "do",
1875
+ [
1876
+ "set",
1877
+ "@entity.itemIndex",
1878
+ 0.0
1879
+ ],
1880
+ [
1881
+ "set",
1882
+ "@entity.remaining",
1883
+ [
1884
+ "*",
1885
+ "@config.timeLimit",
1886
+ 10.0
1887
+ ]
1888
+ ],
1889
+ [
1890
+ "set",
1891
+ "@entity.running",
1892
+ true
1893
+ ],
1894
+ [
1895
+ "set",
1896
+ "@entity.verdict",
1897
+ ""
1898
+ ],
1899
+ [
1900
+ "set",
1901
+ "@entity.score",
1902
+ 0.0
1903
+ ],
1904
+ [
1905
+ "set",
1906
+ "@entity.streak",
1907
+ 0.0
1908
+ ],
1909
+ [
1910
+ "set",
1911
+ "@entity.bestStreak",
1912
+ 0.0
1913
+ ],
1914
+ [
1915
+ "set",
1916
+ "@entity.done",
1917
+ false
1918
+ ],
1919
+ [
1920
+ "set",
1921
+ "@entity.promptText",
1922
+ [
1923
+ "object/get",
1924
+ "@first",
1925
+ "prompt"
1926
+ ]
1927
+ ],
1928
+ [
1929
+ "set",
1930
+ "@entity.options",
1931
+ [
1932
+ "object/get",
1933
+ "@first",
1934
+ "options"
1935
+ ]
1936
+ ],
1937
+ [
1938
+ "set",
1939
+ "@entity.correctIndex",
1940
+ [
1941
+ "object/get",
1942
+ "@first",
1943
+ "correctIndex"
1944
+ ]
1945
+ ],
1946
+ [
1947
+ "set",
1948
+ "@entity.feedback",
1949
+ ""
1950
+ ],
1951
+ [
1952
+ "set",
1953
+ "@entity.view",
1954
+ [
1955
+ {
1956
+ "children": [
1957
+ {
1958
+ "content": "@entity.promptText",
1959
+ "type": "typography",
1960
+ "variant": "h4"
1961
+ }
1962
+ ],
1963
+ "padding": "md",
1964
+ "type": "card",
1965
+ "variant": "bordered"
1966
+ }
1967
+ ]
1968
+ ]
1969
+ ]
1970
+ ],
1971
+ [
1972
+ "render-ui",
1973
+ "main",
1974
+ {
1975
+ "children": [
1976
+ {
1977
+ "children": [
1978
+ {
1979
+ "content": "@entity.title",
1980
+ "type": "typography",
1981
+ "variant": "h4"
1982
+ },
1983
+ {
1984
+ "label": [
1985
+ "str/concat",
1986
+ "Item ",
1987
+ [
1988
+ "str/concat",
1989
+ "",
1990
+ [
1991
+ "+",
1992
+ "@entity.itemIndex",
1993
+ 1.0
1994
+ ]
1995
+ ],
1996
+ " of ",
1997
+ [
1998
+ "str/concat",
1999
+ "",
2000
+ "@entity.totalItems"
2001
+ ]
2002
+ ],
2003
+ "max": "@entity.totalItems",
2004
+ "showPercentage": false,
2005
+ "type": "progress-bar",
2006
+ "value": [
2007
+ "+",
2008
+ "@entity.itemIndex",
2009
+ 1.0
2010
+ ]
2011
+ },
2012
+ {
2013
+ "label": [
2014
+ "str/concat",
2015
+ "Time left: ",
2016
+ [
2017
+ "math/round",
2018
+ [
2019
+ "/",
2020
+ "@entity.remaining",
2021
+ 10.0
2022
+ ],
2023
+ 1.0
2024
+ ],
2025
+ "s"
2026
+ ],
2027
+ "max": [
2028
+ "*",
2029
+ "@config.timeLimit",
2030
+ 10.0
2031
+ ],
2032
+ "showPercentage": false,
2033
+ "type": "progress-bar",
2034
+ "value": "@entity.remaining"
2035
+ },
2036
+ {
2037
+ "children": "@entity.view",
2038
+ "direction": "vertical",
2039
+ "gap": "md",
2040
+ "type": "stack"
2041
+ },
2042
+ {
2043
+ "children": [
2044
+ "array/map",
2045
+ [
2046
+ "array/range",
2047
+ 0.0,
2048
+ [
2049
+ "array/len",
2050
+ "@entity.options"
2051
+ ]
2052
+ ],
2053
+ [
2054
+ "fn",
2055
+ [
2056
+ "i"
2057
+ ],
2058
+ {
2059
+ "action": "ANSWER",
2060
+ "actionPayload": {
2061
+ "index": "@i"
2062
+ },
2063
+ "disabled": [
2064
+ "if",
2065
+ "@entity.running",
2066
+ false,
2067
+ true
2068
+ ],
2069
+ "label": [
2070
+ "array/nth",
2071
+ "@entity.options",
2072
+ "@i"
2073
+ ],
2074
+ "size": "sm",
2075
+ "type": "button",
2076
+ "variant": "secondary"
2077
+ }
2078
+ ]
2079
+ ],
2080
+ "direction": "horizontal",
2081
+ "gap": "xs",
2082
+ "type": "stack"
2083
+ },
2084
+ {
2085
+ "content": "@entity.feedback",
2086
+ "type": "typography",
2087
+ "variant": "caption"
2088
+ },
2089
+ {
2090
+ "children": [
2091
+ {
2092
+ "action": "NEXT",
2093
+ "disabled": [
2094
+ "if",
2095
+ [
2096
+ "and",
2097
+ [
2098
+ "==",
2099
+ "@entity.running",
2100
+ false
2101
+ ],
2102
+ [
2103
+ "and",
2104
+ [
2105
+ "!=",
2106
+ "@entity.verdict",
2107
+ ""
2108
+ ],
2109
+ [
2110
+ "==",
2111
+ "@entity.done",
2112
+ false
2113
+ ]
2114
+ ]
2115
+ ],
2116
+ false,
2117
+ true
2118
+ ],
2119
+ "label": "@config.nextLabel",
2120
+ "type": "button",
2121
+ "variant": "primary"
2122
+ },
2123
+ {
2124
+ "action": "RETRY",
2125
+ "disabled": [
2126
+ "if",
2127
+ "@entity.done",
2128
+ false,
2129
+ true
2130
+ ],
2131
+ "label": "@config.retryLabel",
2132
+ "type": "button",
2133
+ "variant": "ghost"
2134
+ }
2135
+ ],
2136
+ "direction": "horizontal",
2137
+ "gap": "sm",
2138
+ "type": "stack"
2139
+ },
2140
+ {
2141
+ "label": "Score",
2142
+ "max": 0.0,
2143
+ "type": "stat-display",
2144
+ "value": "@entity.score"
2145
+ },
2146
+ {
2147
+ "content": [
2148
+ "str/concat",
2149
+ "Streak: ",
2150
+ [
2151
+ "str/concat",
2152
+ "",
2153
+ "@entity.streak"
2154
+ ],
2155
+ " · best: ",
2156
+ [
2157
+ "str/concat",
2158
+ "",
2159
+ "@entity.bestStreak"
2160
+ ]
2161
+ ],
2162
+ "type": "typography",
2163
+ "variant": "caption"
2164
+ }
2165
+ ],
2166
+ "direction": "vertical",
2167
+ "gap": "md",
2168
+ "type": "stack"
2169
+ }
2170
+ ],
2171
+ "padding": "md",
2172
+ "type": "box"
2173
+ }
2174
+ ],
2175
+ [
2176
+ "emit",
2177
+ "ROUND_RESTARTED",
2178
+ {
2179
+ "totalItems": "@entity.totalItems"
2180
+ }
2181
+ ]
2182
+ ],
2183
+ "event": "RETRY",
2184
+ "eventId": "evt_01M07581K7405N4D7KZFGQSVC5",
2185
+ "from": "idle",
2186
+ "guard": [
2187
+ "and",
2188
+ [
2189
+ "==",
2190
+ "@entity.active",
2191
+ true
2192
+ ],
2193
+ [
2194
+ "==",
2195
+ "@entity.done",
2196
+ true
2197
+ ]
2198
+ ],
2199
+ "to": "idle"
2200
+ }
2201
+ ]
2202
+ },
2203
+ "ticks": [
2204
+ {
2205
+ "effects": [
2206
+ [
2207
+ "set",
2208
+ "@entity.remaining",
2209
+ [
2210
+ "math/max",
2211
+ 0.0,
2212
+ [
2213
+ "-",
2214
+ "@entity.remaining",
2215
+ 1.0
2216
+ ]
2217
+ ]
2218
+ ],
2219
+ [
2220
+ "set",
2221
+ "@entity.verdict",
2222
+ [
2223
+ "if",
2224
+ [
2225
+ "==",
2226
+ "@entity.remaining",
2227
+ 0.0
2228
+ ],
2229
+ "timeout",
2230
+ "@entity.verdict"
2231
+ ]
2232
+ ],
2233
+ [
2234
+ "set",
2235
+ "@entity.feedback",
2236
+ [
2237
+ "if",
2238
+ [
2239
+ "==",
2240
+ "@entity.remaining",
2241
+ 0.0
2242
+ ],
2243
+ [
2244
+ "str/concat",
2245
+ "Time's up — the answer was: ",
2246
+ [
2247
+ "array/nth",
2248
+ "@entity.options",
2249
+ "@entity.correctIndex"
2250
+ ]
2251
+ ],
2252
+ "@entity.feedback"
2253
+ ]
2254
+ ],
2255
+ [
2256
+ "set",
2257
+ "@entity.streak",
2258
+ [
2259
+ "if",
2260
+ [
2261
+ "==",
2262
+ "@entity.remaining",
2263
+ 0.0
2264
+ ],
2265
+ 0.0,
2266
+ "@entity.streak"
2267
+ ]
2268
+ ],
2269
+ [
2270
+ "set",
2271
+ "@entity.running",
2272
+ [
2273
+ "if",
2274
+ [
2275
+ "==",
2276
+ "@entity.remaining",
2277
+ 0.0
2278
+ ],
2279
+ false,
2280
+ true
2281
+ ]
2282
+ ]
2283
+ ],
2284
+ "guard": [
2285
+ "and",
2286
+ [
2287
+ "==",
2288
+ "@entity.active",
2289
+ true
2290
+ ],
2291
+ [
2292
+ "==",
2293
+ "@entity.running",
2294
+ true
2295
+ ]
2296
+ ],
2297
+ "interval": 100.0,
2298
+ "name": "speedTick"
2299
+ }
2300
+ ]
2301
+ }
2302
+ ]
2303
+ }
2304
+ ],
2305
+ "schemaVersion": 1,
2306
+ "version": "1.0.0"
2307
+ }