@graphrefly/graphrefly 0.43.0 → 0.45.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 (422) hide show
  1. package/README.md +21 -17
  2. package/dist/compat/index.cjs +20 -10
  3. package/dist/compat/index.cjs.map +1 -0
  4. package/dist/compat/index.d.cts +1 -22
  5. package/dist/compat/index.d.ts +1 -22
  6. package/dist/compat/index.js +3 -1
  7. package/dist/compat/index.js.map +1 -0
  8. package/dist/compat/jotai/index.cjs +21 -1
  9. package/dist/compat/jotai/index.cjs.map +1 -0
  10. package/dist/compat/jotai/index.d.cts +1 -2
  11. package/dist/compat/jotai/index.d.ts +1 -2
  12. package/dist/compat/jotai/index.js +3 -1
  13. package/dist/compat/jotai/index.js.map +1 -0
  14. package/dist/compat/nanostores/index.cjs +21 -1
  15. package/dist/compat/nanostores/index.cjs.map +1 -0
  16. package/dist/compat/nanostores/index.d.cts +1 -2
  17. package/dist/compat/nanostores/index.d.ts +1 -2
  18. package/dist/compat/nanostores/index.js +3 -1
  19. package/dist/compat/nanostores/index.js.map +1 -0
  20. package/dist/compat/nestjs/index.cjs +20 -10
  21. package/dist/compat/nestjs/index.cjs.map +1 -0
  22. package/dist/compat/nestjs/index.d.cts +1 -13
  23. package/dist/compat/nestjs/index.d.ts +1 -13
  24. package/dist/compat/nestjs/index.js +3 -1
  25. package/dist/compat/nestjs/index.js.map +1 -0
  26. package/dist/compat/react/index.cjs +21 -1
  27. package/dist/compat/react/index.cjs.map +1 -0
  28. package/dist/compat/react/index.d.cts +1 -2
  29. package/dist/compat/react/index.d.ts +1 -2
  30. package/dist/compat/react/index.js +3 -1
  31. package/dist/compat/react/index.js.map +1 -0
  32. package/dist/compat/solid/index.cjs +21 -1
  33. package/dist/compat/solid/index.cjs.map +1 -0
  34. package/dist/compat/solid/index.d.cts +1 -2
  35. package/dist/compat/solid/index.d.ts +1 -2
  36. package/dist/compat/solid/index.js +3 -1
  37. package/dist/compat/solid/index.js.map +1 -0
  38. package/dist/compat/svelte/index.cjs +21 -1
  39. package/dist/compat/svelte/index.cjs.map +1 -0
  40. package/dist/compat/svelte/index.d.cts +1 -2
  41. package/dist/compat/svelte/index.d.ts +1 -2
  42. package/dist/compat/svelte/index.js +3 -1
  43. package/dist/compat/svelte/index.js.map +1 -0
  44. package/dist/compat/vue/index.cjs +21 -1
  45. package/dist/compat/vue/index.cjs.map +1 -0
  46. package/dist/compat/vue/index.d.cts +1 -3
  47. package/dist/compat/vue/index.d.ts +1 -3
  48. package/dist/compat/vue/index.js +3 -1
  49. package/dist/compat/vue/index.js.map +1 -0
  50. package/dist/compat/zustand/index.cjs +21 -3
  51. package/dist/compat/zustand/index.cjs.map +1 -0
  52. package/dist/compat/zustand/index.d.cts +1 -6
  53. package/dist/compat/zustand/index.d.ts +1 -6
  54. package/dist/compat/zustand/index.js +3 -1
  55. package/dist/compat/zustand/index.js.map +1 -0
  56. package/dist/core/index.cjs +21 -1
  57. package/dist/core/index.cjs.map +1 -0
  58. package/dist/core/index.d.cts +1 -4
  59. package/dist/core/index.d.ts +1 -4
  60. package/dist/core/index.js +3 -1
  61. package/dist/core/index.js.map +1 -0
  62. package/dist/extra/browser.cjs +21 -1
  63. package/dist/extra/browser.cjs.map +1 -0
  64. package/dist/extra/browser.d.cts +1 -4
  65. package/dist/extra/browser.d.ts +1 -4
  66. package/dist/extra/browser.js +3 -1
  67. package/dist/extra/browser.js.map +1 -0
  68. package/dist/extra/index.cjs +20 -19
  69. package/dist/extra/index.cjs.map +1 -0
  70. package/dist/extra/index.d.cts +1 -17
  71. package/dist/extra/index.d.ts +1 -17
  72. package/dist/extra/index.js +3 -1
  73. package/dist/extra/index.js.map +1 -0
  74. package/dist/extra/node.cjs +21 -2
  75. package/dist/extra/node.cjs.map +1 -0
  76. package/dist/extra/node.d.cts +1 -187
  77. package/dist/extra/node.d.ts +1 -187
  78. package/dist/extra/node.js +3 -2
  79. package/dist/extra/node.js.map +1 -0
  80. package/dist/extra/operators.cjs +21 -1
  81. package/dist/extra/operators.cjs.map +1 -0
  82. package/dist/extra/operators.d.cts +1 -950
  83. package/dist/extra/operators.d.ts +1 -950
  84. package/dist/extra/operators.js +3 -1
  85. package/dist/extra/operators.js.map +1 -0
  86. package/dist/extra/reactive.cjs +21 -1
  87. package/dist/extra/reactive.cjs.map +1 -0
  88. package/dist/extra/reactive.d.cts +1 -353
  89. package/dist/extra/reactive.d.ts +1 -353
  90. package/dist/extra/reactive.js +3 -1
  91. package/dist/extra/reactive.js.map +1 -0
  92. package/dist/extra/render/index.cjs +21 -5
  93. package/dist/extra/render/index.cjs.map +1 -0
  94. package/dist/extra/render/index.d.cts +1 -183
  95. package/dist/extra/render/index.d.ts +1 -183
  96. package/dist/extra/render/index.js +3 -1
  97. package/dist/extra/render/index.js.map +1 -0
  98. package/dist/extra/sources.cjs +21 -3
  99. package/dist/extra/sources.cjs.map +1 -0
  100. package/dist/extra/sources.d.cts +1 -584
  101. package/dist/extra/sources.d.ts +1 -584
  102. package/dist/extra/sources.js +3 -1
  103. package/dist/extra/sources.js.map +1 -0
  104. package/dist/extra/storage-browser.cjs +21 -1
  105. package/dist/extra/storage-browser.cjs.map +1 -0
  106. package/dist/extra/storage-browser.d.cts +1 -37
  107. package/dist/extra/storage-browser.d.ts +1 -37
  108. package/dist/extra/storage-browser.js +3 -1
  109. package/dist/extra/storage-browser.js.map +1 -0
  110. package/dist/extra/storage-core.cjs +21 -1
  111. package/dist/extra/storage-core.cjs.map +1 -0
  112. package/dist/extra/storage-core.d.cts +1 -28
  113. package/dist/extra/storage-core.d.ts +1 -28
  114. package/dist/extra/storage-core.js +3 -1
  115. package/dist/extra/storage-core.js.map +1 -0
  116. package/dist/extra/storage-node.cjs +20 -0
  117. package/dist/extra/storage-node.cjs.map +1 -0
  118. package/dist/extra/storage-node.d.cts +1 -2
  119. package/dist/extra/storage-node.d.ts +1 -2
  120. package/dist/extra/storage-node.js +3 -0
  121. package/dist/extra/storage-node.js.map +1 -0
  122. package/dist/extra/storage-tiers-browser.cjs +21 -1
  123. package/dist/extra/storage-tiers-browser.cjs.map +1 -0
  124. package/dist/extra/storage-tiers-browser.d.cts +1 -120
  125. package/dist/extra/storage-tiers-browser.d.ts +1 -120
  126. package/dist/extra/storage-tiers-browser.js +3 -1
  127. package/dist/extra/storage-tiers-browser.js.map +1 -0
  128. package/dist/extra/storage-tiers-node.cjs +21 -1
  129. package/dist/extra/storage-tiers-node.cjs.map +1 -0
  130. package/dist/extra/storage-tiers-node.d.cts +1 -210
  131. package/dist/extra/storage-tiers-node.d.ts +1 -210
  132. package/dist/extra/storage-tiers-node.js +3 -1
  133. package/dist/extra/storage-tiers-node.js.map +1 -0
  134. package/dist/extra/storage-tiers.cjs +21 -1
  135. package/dist/extra/storage-tiers.cjs.map +1 -0
  136. package/dist/extra/storage-tiers.d.cts +1 -412
  137. package/dist/extra/storage-tiers.d.ts +1 -412
  138. package/dist/extra/storage-tiers.js +3 -1
  139. package/dist/extra/storage-tiers.js.map +1 -0
  140. package/dist/extra/storage-wal.cjs +21 -0
  141. package/dist/extra/storage-wal.cjs.map +1 -0
  142. package/dist/extra/storage-wal.d.cts +1 -0
  143. package/dist/extra/storage-wal.d.ts +1 -0
  144. package/dist/extra/storage-wal.js +3 -0
  145. package/dist/extra/storage-wal.js.map +1 -0
  146. package/dist/graph/index.cjs +21 -7
  147. package/dist/graph/index.cjs.map +1 -0
  148. package/dist/graph/index.d.cts +1 -7
  149. package/dist/graph/index.d.ts +1 -7
  150. package/dist/graph/index.js +3 -1
  151. package/dist/graph/index.js.map +1 -0
  152. package/dist/index.cjs +20 -227
  153. package/dist/index.cjs.map +1 -0
  154. package/dist/index.d.cts +45 -96
  155. package/dist/index.d.ts +45 -96
  156. package/dist/index.js +3 -1
  157. package/dist/index.js.map +1 -0
  158. package/dist/patterns/ai/browser.cjs +20 -7
  159. package/dist/patterns/ai/browser.cjs.map +1 -0
  160. package/dist/patterns/ai/browser.d.cts +1 -127
  161. package/dist/patterns/ai/browser.d.ts +1 -127
  162. package/dist/patterns/ai/browser.js +3 -3
  163. package/dist/patterns/ai/browser.js.map +1 -0
  164. package/dist/patterns/ai/index.cjs +20 -73
  165. package/dist/patterns/ai/index.cjs.map +1 -0
  166. package/dist/patterns/ai/index.d.cts +1 -21
  167. package/dist/patterns/ai/index.d.ts +1 -21
  168. package/dist/patterns/ai/index.js +3 -1
  169. package/dist/patterns/ai/index.js.map +1 -0
  170. package/dist/patterns/ai/node.cjs +21 -1
  171. package/dist/patterns/ai/node.cjs.map +1 -0
  172. package/dist/patterns/ai/node.d.cts +1 -59
  173. package/dist/patterns/ai/node.d.ts +1 -59
  174. package/dist/patterns/ai/node.js +3 -1
  175. package/dist/patterns/ai/node.js.map +1 -0
  176. package/dist/patterns/cqrs/index.cjs +21 -3
  177. package/dist/patterns/cqrs/index.cjs.map +1 -0
  178. package/dist/patterns/cqrs/index.d.cts +1 -8
  179. package/dist/patterns/cqrs/index.d.ts +1 -8
  180. package/dist/patterns/cqrs/index.js +3 -1
  181. package/dist/patterns/cqrs/index.js.map +1 -0
  182. package/dist/patterns/demo-shell/index.cjs +21 -5
  183. package/dist/patterns/demo-shell/index.cjs.map +1 -0
  184. package/dist/patterns/demo-shell/index.d.cts +1 -7
  185. package/dist/patterns/demo-shell/index.d.ts +1 -7
  186. package/dist/patterns/demo-shell/index.js +3 -1
  187. package/dist/patterns/demo-shell/index.js.map +1 -0
  188. package/dist/patterns/domain-templates/index.cjs +21 -3
  189. package/dist/patterns/domain-templates/index.cjs.map +1 -0
  190. package/dist/patterns/domain-templates/index.d.cts +1 -6
  191. package/dist/patterns/domain-templates/index.d.ts +1 -6
  192. package/dist/patterns/domain-templates/index.js +3 -1
  193. package/dist/patterns/domain-templates/index.js.map +1 -0
  194. package/dist/patterns/graphspec/index.cjs +21 -86
  195. package/dist/patterns/graphspec/index.cjs.map +1 -0
  196. package/dist/patterns/graphspec/index.d.cts +1 -8
  197. package/dist/patterns/graphspec/index.d.ts +1 -8
  198. package/dist/patterns/graphspec/index.js +3 -1
  199. package/dist/patterns/graphspec/index.js.map +1 -0
  200. package/dist/patterns/harness/index.cjs +21 -48
  201. package/dist/patterns/harness/index.cjs.map +1 -0
  202. package/dist/patterns/harness/index.d.cts +1 -14
  203. package/dist/patterns/harness/index.d.ts +1 -14
  204. package/dist/patterns/harness/index.js +3 -1
  205. package/dist/patterns/harness/index.js.map +1 -0
  206. package/dist/patterns/inspect/index.cjs +21 -3
  207. package/dist/patterns/inspect/index.cjs.map +1 -0
  208. package/dist/patterns/inspect/index.d.cts +1 -9
  209. package/dist/patterns/inspect/index.d.ts +1 -9
  210. package/dist/patterns/inspect/index.js +3 -1
  211. package/dist/patterns/inspect/index.js.map +1 -0
  212. package/dist/patterns/job-queue/index.cjs +21 -3
  213. package/dist/patterns/job-queue/index.cjs.map +1 -0
  214. package/dist/patterns/job-queue/index.d.cts +1 -9
  215. package/dist/patterns/job-queue/index.d.ts +1 -9
  216. package/dist/patterns/job-queue/index.js +3 -1
  217. package/dist/patterns/job-queue/index.js.map +1 -0
  218. package/dist/patterns/memory/index.cjs +21 -3
  219. package/dist/patterns/memory/index.cjs.map +1 -0
  220. package/dist/patterns/memory/index.d.cts +1 -8
  221. package/dist/patterns/memory/index.d.ts +1 -8
  222. package/dist/patterns/memory/index.js +3 -1
  223. package/dist/patterns/memory/index.js.map +1 -0
  224. package/dist/patterns/messaging/index.cjs +21 -3
  225. package/dist/patterns/messaging/index.cjs.map +1 -0
  226. package/dist/patterns/messaging/index.d.cts +1 -7
  227. package/dist/patterns/messaging/index.d.ts +1 -7
  228. package/dist/patterns/messaging/index.js +3 -1
  229. package/dist/patterns/messaging/index.js.map +1 -0
  230. package/dist/patterns/orchestration/index.cjs +21 -3
  231. package/dist/patterns/orchestration/index.cjs.map +1 -0
  232. package/dist/patterns/orchestration/index.d.cts +1 -9
  233. package/dist/patterns/orchestration/index.d.ts +1 -9
  234. package/dist/patterns/orchestration/index.js +3 -1
  235. package/dist/patterns/orchestration/index.js.map +1 -0
  236. package/dist/patterns/process/index.cjs +21 -1
  237. package/dist/patterns/process/index.cjs.map +1 -0
  238. package/dist/patterns/process/index.d.cts +1 -10
  239. package/dist/patterns/process/index.d.ts +1 -10
  240. package/dist/patterns/process/index.js +3 -1
  241. package/dist/patterns/process/index.js.map +1 -0
  242. package/dist/patterns/reactive-layout/index.cjs +21 -4
  243. package/dist/patterns/reactive-layout/index.cjs.map +1 -0
  244. package/dist/patterns/reactive-layout/index.d.cts +1 -7
  245. package/dist/patterns/reactive-layout/index.d.ts +1 -7
  246. package/dist/patterns/reactive-layout/index.js +3 -1
  247. package/dist/patterns/reactive-layout/index.js.map +1 -0
  248. package/dist/patterns/reduction/index.cjs +21 -3
  249. package/dist/patterns/reduction/index.cjs.map +1 -0
  250. package/dist/patterns/reduction/index.d.cts +1 -6
  251. package/dist/patterns/reduction/index.d.ts +1 -6
  252. package/dist/patterns/reduction/index.js +3 -1
  253. package/dist/patterns/reduction/index.js.map +1 -0
  254. package/dist/patterns/surface/index.cjs +21 -13
  255. package/dist/patterns/surface/index.cjs.map +1 -0
  256. package/dist/patterns/surface/index.d.cts +1 -9
  257. package/dist/patterns/surface/index.d.ts +1 -9
  258. package/dist/patterns/surface/index.js +3 -1
  259. package/dist/patterns/surface/index.js.map +1 -0
  260. package/dist/patterns/topology-view/index.cjs +21 -0
  261. package/dist/patterns/topology-view/index.cjs.map +1 -0
  262. package/dist/patterns/topology-view/index.d.cts +1 -0
  263. package/dist/patterns/topology-view/index.d.ts +1 -0
  264. package/dist/patterns/topology-view/index.js +3 -0
  265. package/dist/patterns/topology-view/index.js.map +1 -0
  266. package/dist/testing/index.cjs +21 -0
  267. package/dist/testing/index.cjs.map +1 -0
  268. package/dist/testing/index.d.cts +1 -0
  269. package/dist/testing/index.d.ts +1 -0
  270. package/dist/testing/index.js +3 -0
  271. package/dist/testing/index.js.map +1 -0
  272. package/package.json +608 -584
  273. package/dist/backoff-HPZMEZNF.js +0 -1
  274. package/dist/cascading-CH-_VwG9.d.cts +0 -199
  275. package/dist/cascading-OgKQZjsa.d.ts +0 -199
  276. package/dist/chunk-35JTVPOX.js +0 -1
  277. package/dist/chunk-3G5U5QNE.js +0 -5
  278. package/dist/chunk-3XDYJRYU.js +0 -1
  279. package/dist/chunk-4I45FVQS.js +0 -1
  280. package/dist/chunk-4VVTGLXJ.js +0 -1
  281. package/dist/chunk-4YAN45KM.js +0 -1
  282. package/dist/chunk-5QDBSZBV.js +0 -1
  283. package/dist/chunk-626TESAC.js +0 -3
  284. package/dist/chunk-6HOSXQKF.js +0 -1
  285. package/dist/chunk-6QZNQS5B.js +0 -1
  286. package/dist/chunk-C72GO4IZ.js +0 -1
  287. package/dist/chunk-CE72X3WO.js +0 -1
  288. package/dist/chunk-CK2E7BTU.js +0 -1
  289. package/dist/chunk-CLD3F4R5.js +0 -1
  290. package/dist/chunk-CUNIRONA.js +0 -1
  291. package/dist/chunk-D27JNOLZ.js +0 -1
  292. package/dist/chunk-D5RFJOZ2.js +0 -1
  293. package/dist/chunk-EBW4V6JN.js +0 -1
  294. package/dist/chunk-ESMPEKEV.js +0 -1
  295. package/dist/chunk-F3IGTWCQ.js +0 -1
  296. package/dist/chunk-F672GV32.js +0 -1
  297. package/dist/chunk-FDQGFWLF.js +0 -1
  298. package/dist/chunk-FG4TKHMC.js +0 -1
  299. package/dist/chunk-GPW2V3RE.js +0 -1
  300. package/dist/chunk-I7IGYPSL.js +0 -1
  301. package/dist/chunk-INQD2KRQ.js +0 -1
  302. package/dist/chunk-JNWRYDJN.js +0 -1
  303. package/dist/chunk-JQFH2DV6.js +0 -1
  304. package/dist/chunk-K2Q24F5T.js +0 -1
  305. package/dist/chunk-KGKJCHEK.js +0 -1
  306. package/dist/chunk-KRH66M4O.js +0 -1
  307. package/dist/chunk-KVV66NN2.js +0 -1
  308. package/dist/chunk-L6NSJVJZ.js +0 -1
  309. package/dist/chunk-LYCLF26R.js +0 -1
  310. package/dist/chunk-NNKJUORL.js +0 -1
  311. package/dist/chunk-NON4NLIC.js +0 -45
  312. package/dist/chunk-O2BLLH7M.js +0 -18
  313. package/dist/chunk-OCKEEPRJ.js +0 -2
  314. package/dist/chunk-OFZG3TB3.js +0 -9
  315. package/dist/chunk-OYJKFY7V.js +0 -1
  316. package/dist/chunk-P6C4WHZO.js +0 -5
  317. package/dist/chunk-PT7W5FCD.js +0 -5
  318. package/dist/chunk-Q4U3A3L5.js +0 -1
  319. package/dist/chunk-QE4IGY7I.js +0 -61
  320. package/dist/chunk-QYADASLV.js +0 -1
  321. package/dist/chunk-QYVXF7GW.js +0 -1
  322. package/dist/chunk-S3EEIPO7.js +0 -1
  323. package/dist/chunk-SUWT3ZON.js +0 -1
  324. package/dist/chunk-TPKQW72B.js +0 -1
  325. package/dist/chunk-TSOYJ743.js +0 -1
  326. package/dist/chunk-TZQPPQEQ.js +0 -1
  327. package/dist/chunk-V5A7M7RJ.js +0 -1
  328. package/dist/chunk-VIMF6LGM.js +0 -1
  329. package/dist/chunk-VJLMUKOI.js +0 -1
  330. package/dist/chunk-VN6RDSK2.js +0 -1
  331. package/dist/chunk-VNC3TMVY.js +0 -1
  332. package/dist/chunk-VOPGGIL7.js +0 -1
  333. package/dist/chunk-VQ4A6T2A.js +0 -1
  334. package/dist/chunk-XG62INFA.js +0 -1
  335. package/dist/chunk-Y4NI3X7O.js +0 -84
  336. package/dist/content-addressed-storage-4-ST1tYk.d.cts +0 -124
  337. package/dist/content-addressed-storage-DuYMjV7o.d.ts +0 -124
  338. package/dist/decay-2ZukgQ4o.d.cts +0 -112
  339. package/dist/decay-CdEBmDIs.d.ts +0 -112
  340. package/dist/fallback-CqYVLL6X.d.ts +0 -250
  341. package/dist/fallback-Ctlj2tMY.d.cts +0 -250
  342. package/dist/graph-7VguS7a4.d.ts +0 -1668
  343. package/dist/graph-C4SHb3Ly.d.cts +0 -1668
  344. package/dist/index-0rKFCVFp.d.cts +0 -557
  345. package/dist/index-B-i4_g3k.d.ts +0 -651
  346. package/dist/index-B5iz82A3.d.cts +0 -2655
  347. package/dist/index-BAOD98JD.d.cts +0 -754
  348. package/dist/index-BG0BN3PB.d.ts +0 -44
  349. package/dist/index-BJX94aud.d.cts +0 -34
  350. package/dist/index-BP8a88zx.d.ts +0 -385
  351. package/dist/index-BTQtTb_H.d.cts +0 -301
  352. package/dist/index-BVpm6noz.d.cts +0 -36
  353. package/dist/index-Bc41FuHp.d.cts +0 -291
  354. package/dist/index-BdGtBX-X.d.cts +0 -515
  355. package/dist/index-Bf7eqeSF.d.ts +0 -113
  356. package/dist/index-BiX1Nkgx.d.cts +0 -1844
  357. package/dist/index-BoLv_OfD.d.cts +0 -651
  358. package/dist/index-BojK2fwH.d.cts +0 -299
  359. package/dist/index-BsT7F2et.d.ts +0 -291
  360. package/dist/index-BwLvVVsy.d.cts +0 -189
  361. package/dist/index-C59mYFKp.d.ts +0 -121
  362. package/dist/index-C7O6r5fV.d.ts +0 -37
  363. package/dist/index-C9kSENB4.d.cts +0 -127
  364. package/dist/index-C9pjcz3l.d.cts +0 -209
  365. package/dist/index-CAC_rNzm.d.ts +0 -189
  366. package/dist/index-CCq87F7t.d.ts +0 -127
  367. package/dist/index-CDXc9zKM.d.cts +0 -26
  368. package/dist/index-CJK1JkYy.d.ts +0 -36
  369. package/dist/index-CLon-IWF.d.cts +0 -374
  370. package/dist/index-COD1kVoS.d.cts +0 -468
  371. package/dist/index-CPT7C_f1.d.ts +0 -374
  372. package/dist/index-CQG3D1cp.d.ts +0 -468
  373. package/dist/index-CZQXo5tH.d.ts +0 -209
  374. package/dist/index-CZjOhcBy.d.cts +0 -113
  375. package/dist/index-ChOyVLKm.d.cts +0 -86
  376. package/dist/index-CvrqGfNS.d.ts +0 -34
  377. package/dist/index-D-AEQVLo.d.ts +0 -2655
  378. package/dist/index-D4Y1cMG0.d.ts +0 -26
  379. package/dist/index-DBHK8O6H.d.ts +0 -301
  380. package/dist/index-DBevwHj_.d.ts +0 -515
  381. package/dist/index-DIOoAZUX.d.ts +0 -45
  382. package/dist/index-DSZ3ZCHF.d.ts +0 -3402
  383. package/dist/index-Dgs8zcj7.d.ts +0 -102
  384. package/dist/index-Dh_HJ82K.d.ts +0 -299
  385. package/dist/index-Dhc7a7Xo.d.cts +0 -102
  386. package/dist/index-Dmqp7KjD.d.ts +0 -86
  387. package/dist/index-Dn-wI9g4.d.ts +0 -231
  388. package/dist/index-Du7u1lSf.d.cts +0 -385
  389. package/dist/index-DwigL4lY.d.ts +0 -1844
  390. package/dist/index-DyR7eU5S.d.cts +0 -779
  391. package/dist/index-JZUPJIJy.d.ts +0 -779
  392. package/dist/index-K0_0eR8g.d.ts +0 -557
  393. package/dist/index-O16yXPK4.d.cts +0 -3402
  394. package/dist/index-O7fucFrU.d.cts +0 -121
  395. package/dist/index-RV_yDjOX.d.cts +0 -198
  396. package/dist/index-cm1GNcWE.d.ts +0 -754
  397. package/dist/index-f5IivDUX.d.cts +0 -37
  398. package/dist/index-hHcaFlJX.d.cts +0 -45
  399. package/dist/index-tJoTcnHh.d.cts +0 -231
  400. package/dist/index-wAzD9yVj.d.ts +0 -198
  401. package/dist/index-z96luz5O.d.cts +0 -44
  402. package/dist/meta-BgVAsg9j.d.ts +0 -102
  403. package/dist/meta-vE8bxW1E.d.cts +0 -102
  404. package/dist/node-ClS5yC-B.d.cts +0 -1347
  405. package/dist/node-ClS5yC-B.d.ts +0 -1347
  406. package/dist/observable-BsBzUrcI.d.ts +0 -36
  407. package/dist/observable-DLGPPtb8.d.cts +0 -36
  408. package/dist/pipeline-graph-DPqKDk59.d.cts +0 -137
  409. package/dist/pipeline-graph-loP57TBA.d.ts +0 -137
  410. package/dist/reactive-layout-Dsvob4zD.d.cts +0 -183
  411. package/dist/reactive-layout-v7KPvxoc.d.ts +0 -183
  412. package/dist/reactive-log-B00laMSQ.d.cts +0 -223
  413. package/dist/reactive-log-BezYsbA_.d.ts +0 -223
  414. package/dist/reactive-map-48mnZ-nu.d.cts +0 -296
  415. package/dist/reactive-map-BVVPdvmi.d.ts +0 -296
  416. package/dist/resilience-YIWPK4YC.js +0 -1
  417. package/dist/sugar-DLwvMr3F.d.ts +0 -223
  418. package/dist/sugar-DyVGtczU.d.cts +0 -223
  419. package/dist/topology-tree-BNGvuG82.d.ts +0 -25
  420. package/dist/topology-tree-BSdfSwMi.d.cts +0 -25
  421. package/dist/types-B1jDWVsM.d.cts +0 -442
  422. package/dist/types-DkzUUs0H.d.ts +0 -442
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/compat/solid/index.ts"],"sourcesContent":["// Phase 13.9.A shim — re-export from pure-TS sibling until\n// @graphrefly/native (napi binding) and per-milestone swap-overs land.\nexport * from \"@graphrefly/pure-ts/compat/solid\";\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAEA,0BAAc,6CAFd;","names":[]}
@@ -1,2 +1 @@
1
- import '../../node-ClS5yC-B.cjs';
2
- export { A as Accessor, N as NodeFactory, u as useStore, a as useSubscribe, b as useSubscribeRecord } from '../../index-BVpm6noz.cjs';
1
+ export * from '@graphrefly/pure-ts/compat/solid';
@@ -1,2 +1 @@
1
- import '../../node-ClS5yC-B.js';
2
- export { A as Accessor, N as NodeFactory, u as useStore, a as useSubscribe, b as useSubscribeRecord } from '../../index-CJK1JkYy.js';
1
+ export * from '@graphrefly/pure-ts/compat/solid';
@@ -1 +1,3 @@
1
- import{a,b,c}from"../../chunk-VIMF6LGM.js";import"../../chunk-CK2E7BTU.js";import"../../chunk-QYADASLV.js";export{b as useStore,a as useSubscribe,c as useSubscribeRecord};
1
+ // src/compat/solid/index.ts
2
+ export * from "@graphrefly/pure-ts/compat/solid";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/compat/solid/index.ts"],"sourcesContent":["// Phase 13.9.A shim — re-export from pure-TS sibling until\n// @graphrefly/native (napi binding) and per-milestone swap-overs land.\nexport * from \"@graphrefly/pure-ts/compat/solid\";\n"],"mappings":";AAEA,cAAc;","names":[]}
@@ -1 +1,21 @@
1
- "use strict";var i=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var M=Object.prototype.hasOwnProperty;var S=(e,s)=>{for(var o in s)i(e,o,{get:s[o],enumerable:!0})},x=(e,s,o,a)=>{if(s&&typeof s=="object"||typeof s=="function")for(let r of y(s))!M.call(e,r)&&r!==o&&i(e,r,{get:()=>s[r],enumerable:!(a=g(s,r))||a.enumerable});return e};var E=e=>x(i({},"__esModule",{value:!0}),e);var C={};S(C,{useStore:()=>I,useSubscribe:()=>j,useSubscribeRecord:()=>z});module.exports=E(C);var O=Symbol.for("graphrefly/START"),b=Symbol.for("graphrefly/DATA"),f=Symbol.for("graphrefly/DIRTY"),p=Symbol.for("graphrefly/RESOLVED"),A=Symbol.for("graphrefly/INVALIDATE");var h=Symbol.for("graphrefly/TEARDOWN"),v=Symbol.for("graphrefly/COMPLETE");var D=Object.freeze([f]),m=Object.freeze([p]),L=Object.freeze([A]),P=Object.freeze([O]),N=Object.freeze([v]),_=Object.freeze([h]),Y=Object.freeze([D]),V=Object.freeze([m]),k=Object.freeze([L]),G=Object.freeze([N]),W=Object.freeze([_]);function j(e){return{subscribe(s){let o=e.subscribe(()=>{s(e.cache)});return s(e.cache),o}}}function I(e){return{subscribe(s){let o=e.subscribe(()=>{s(e.cache)});return s(e.cache),o},set(s){e.down([[f],[b,s]])},update(s){let o=s(e.cache);e.down([[f],[b,o]])}}}function z(e,s){return{subscribe(o){let a=[],r=()=>{for(let t of a)t();a=[]},R=()=>{let t={};for(let n of e.cache??[]){let c=s(n),l={};for(let u of Object.keys(c))l[u]=c[u].cache;t[n]=l}return t},T=t=>{r();for(let n of t){let c=s(n);for(let l of Object.keys(c)){let u=c[l].subscribe(()=>{o(R())});a.push(u)}}o(R())},d=e.subscribe(t=>{t.some(n=>n[0]===b||n[0]===p)&&T(e.cache??[])});return T(e.cache??[]),()=>{d(),r()}}}}0&&(module.exports={useStore,useSubscribe,useSubscribeRecord});
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+
17
+ // src/compat/svelte/index.ts
18
+ var svelte_exports = {};
19
+ module.exports = __toCommonJS(svelte_exports);
20
+ __reExport(svelte_exports, require("@graphrefly/pure-ts/compat/svelte"), module.exports);
21
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/compat/svelte/index.ts"],"sourcesContent":["// Phase 13.9.A shim — re-export from pure-TS sibling until\n// @graphrefly/native (napi binding) and per-milestone swap-overs land.\nexport * from \"@graphrefly/pure-ts/compat/svelte\";\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAEA,2BAAc,8CAFd;","names":[]}
@@ -1,2 +1 @@
1
- import '../../node-ClS5yC-B.cjs';
2
- export { N as NodeFactory, S as SvelteReadable, a as SvelteWritable, u as useStore, b as useSubscribe, c as useSubscribeRecord } from '../../index-hHcaFlJX.cjs';
1
+ export * from '@graphrefly/pure-ts/compat/svelte';
@@ -1,2 +1 @@
1
- import '../../node-ClS5yC-B.js';
2
- export { N as NodeFactory, S as SvelteReadable, a as SvelteWritable, u as useStore, b as useSubscribe, c as useSubscribeRecord } from '../../index-DIOoAZUX.js';
1
+ export * from '@graphrefly/pure-ts/compat/svelte';
@@ -1 +1,3 @@
1
- import{a,b,c}from"../../chunk-6QZNQS5B.js";import"../../chunk-CK2E7BTU.js";import"../../chunk-QYADASLV.js";export{b as useStore,a as useSubscribe,c as useSubscribeRecord};
1
+ // src/compat/svelte/index.ts
2
+ export * from "@graphrefly/pure-ts/compat/svelte";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/compat/svelte/index.ts"],"sourcesContent":["// Phase 13.9.A shim — re-export from pure-TS sibling until\n// @graphrefly/native (napi binding) and per-milestone swap-overs land.\nexport * from \"@graphrefly/pure-ts/compat/svelte\";\n"],"mappings":";AAEA,cAAc;","names":[]}
@@ -1 +1,21 @@
1
- "use strict";var R=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var E=Object.prototype.hasOwnProperty;var O=(e,o)=>{for(var r in o)R(e,r,{get:o[r],enumerable:!0})},A=(e,o,r,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let c of x(o))!E.call(e,c)&&c!==r&&R(e,c,{get:()=>o[c],enumerable:!(t=S(o,c))||t.enumerable});return e};var h=e=>A(R({},"__esModule",{value:!0}),e);var P={};O(P,{useStore:()=>z,useSubscribe:()=>C,useSubscribeRecord:()=>V});module.exports=h(P);var s=require("vue");var m=Symbol.for("graphrefly/START"),b=Symbol.for("graphrefly/DATA"),d=Symbol.for("graphrefly/DIRTY"),D=Symbol.for("graphrefly/RESOLVED"),N=Symbol.for("graphrefly/INVALIDATE");var L=Symbol.for("graphrefly/TEARDOWN"),K=Symbol.for("graphrefly/COMPLETE");var _=Object.freeze([d]),v=Object.freeze([D]),I=Object.freeze([N]),G=Object.freeze([m]),j=Object.freeze([K]),w=Object.freeze([L]),W=Object.freeze([_]),B=Object.freeze([v]),H=Object.freeze([I]),U=Object.freeze([j]),F=Object.freeze([w]);function C(e){let o=(0,s.shallowRef)(e.cache),r=e.subscribe(()=>{o.value=e.cache});return(0,s.getCurrentScope)()?(0,s.onScopeDispose)(()=>r()):typeof console<"u"&&console.warn("[graphrefly-ts] useSubscribe called outside a Vue scope \u2014 subscription will not be auto-disposed."),(0,s.readonly)(o)}function z(e){let o=(0,s.shallowRef)(e.cache),r=e.subscribe(()=>{o.value=e.cache});return(0,s.getCurrentScope)()?(0,s.onScopeDispose)(()=>r()):typeof console<"u"&&console.warn("[graphrefly-ts] useStore called outside a Vue scope \u2014 subscription will not be auto-disposed."),(0,s.computed)({get:()=>o.value,set:t=>{e.down([[d],[b,t]])}})}function V(e,o){let r=(0,s.shallowRef)({}),t=new Map;function c(){let n={};for(let[f,a]of t)n[f]={...a.values};r.value=n}function g(n){for(let a of t.values())for(let u of a.subs)u();t.clear();for(let a of n){let u=o(a),T=Object.keys(u),l={},y=[];for(let p of T){let i=u[p];l[p]=i.cache;let M=i.subscribe(()=>{l[p]=i.cache,c()});y.push(M)}t.set(a,{subs:y,values:l})}let f={};for(let[a,u]of t)f[a]={...u.values};r.value=f}return(0,s.watch)(()=>[...(typeof e=="function"?e():(0,s.isRef)(e)?e.value:e)??[]],n=>g(n??[]),{immediate:!0}),(0,s.getCurrentScope)()?(0,s.onScopeDispose)(()=>{for(let n of t.values())for(let f of n.subs)f();t.clear()}):typeof console<"u"&&console.warn("[graphrefly-ts] useSubscribeRecord called outside a Vue scope \u2014 subscription will not be auto-disposed."),(0,s.readonly)(r)}0&&(module.exports={useStore,useSubscribe,useSubscribeRecord});
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+
17
+ // src/compat/vue/index.ts
18
+ var vue_exports = {};
19
+ module.exports = __toCommonJS(vue_exports);
20
+ __reExport(vue_exports, require("@graphrefly/pure-ts/compat/vue"), module.exports);
21
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/compat/vue/index.ts"],"sourcesContent":["// Phase 13.9.A shim — re-export from pure-TS sibling until\n// @graphrefly/native (napi binding) and per-milestone swap-overs land.\nexport * from \"@graphrefly/pure-ts/compat/vue\";\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAEA,wBAAc,2CAFd;","names":[]}
@@ -1,3 +1 @@
1
- import 'vue';
2
- import '../../node-ClS5yC-B.cjs';
3
- export { N as NodeFactory, u as useStore, a as useSubscribe, b as useSubscribeRecord } from '../../index-BJX94aud.cjs';
1
+ export * from '@graphrefly/pure-ts/compat/vue';
@@ -1,3 +1 @@
1
- import 'vue';
2
- import '../../node-ClS5yC-B.js';
3
- export { N as NodeFactory, u as useStore, a as useSubscribe, b as useSubscribeRecord } from '../../index-CvrqGfNS.js';
1
+ export * from '@graphrefly/pure-ts/compat/vue';
@@ -1 +1,3 @@
1
- import{a,b,c}from"../../chunk-GPW2V3RE.js";import"../../chunk-CK2E7BTU.js";import"../../chunk-QYADASLV.js";export{b as useStore,a as useSubscribe,c as useSubscribeRecord};
1
+ // src/compat/vue/index.ts
2
+ export * from "@graphrefly/pure-ts/compat/vue";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/compat/vue/index.ts"],"sourcesContent":["// Phase 13.9.A shim — re-export from pure-TS sibling until\n// @graphrefly/native (napi binding) and per-milestone swap-overs land.\nexport * from \"@graphrefly/pure-ts/compat/vue\";\n"],"mappings":";AAEA,cAAc;","names":[]}
@@ -1,3 +1,21 @@
1
- "use strict";var He=Object.defineProperty;var rn=Object.getOwnPropertyDescriptor;var sn=Object.getOwnPropertyNames;var on=Object.prototype.hasOwnProperty;var P=(r,e)=>()=>(r&&(e=r(r=0)),e);var an=(r,e)=>{for(var t in e)He(r,t,{get:e[t],enumerable:!0})},un=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of sn(e))!on.call(r,s)&&s!==t&&He(r,s,{get:()=>e[s],enumerable:!(n=rn(e,s))||n.enumerable});return r};var dn=r=>un(He({},"__esModule",{value:!0}),r);var pe,F,K,Y,W,J,Z,j,H,M,oe,Be,cn,ze,ln,fn,Ue,gt,mt,bt,We,he=P(()=>{"use strict";pe=Symbol.for("graphrefly/START"),F=Symbol.for("graphrefly/DATA"),K=Symbol.for("graphrefly/DIRTY"),Y=Symbol.for("graphrefly/RESOLVED"),W=Symbol.for("graphrefly/INVALIDATE"),J=Symbol.for("graphrefly/PAUSE"),Z=Symbol.for("graphrefly/RESUME"),j=Symbol.for("graphrefly/TEARDOWN"),H=Symbol.for("graphrefly/COMPLETE"),M=Symbol.for("graphrefly/ERROR"),oe=Object.freeze([K]),Be=Object.freeze([Y]),cn=Object.freeze([W]),ze=Object.freeze([pe]),ln=Object.freeze([H]),fn=Object.freeze([j]),Ue=Object.freeze([oe]),gt=Object.freeze([Be]),mt=Object.freeze([cn]),bt=Object.freeze([ln]),We=Object.freeze([fn])});function vt(r,e){let t=new TextEncoder().encode(r.name);if(t.length===0||t.length>255)throw new Error(`encodeEnvelope: codec name "${r.name}" encodes to ${t.length} bytes (must be 1\u2013255)`);let n=r.version;if(!Number.isInteger(n)||n<0||n>65535)throw new Error(`encodeEnvelope: codec.version ${n} out of u16 range (expected integer 0\u201365535)`);let s=2+t.length+2+e.length;if(s>4294967295)throw new Error(`encodeEnvelope: total envelope size ${s} exceeds 2^32-1 bytes (payload ${e.length} bytes)`);let o=new Uint8Array(s),i=0;return o[i++]=qe,o[i++]=t.length,o.set(t,i),i+=t.length,o[i++]=n>>>8&255,o[i++]=n&255,o.set(e,i),o}function _t(r,e){if(r.length<yt)throw new Error(`decodeEnvelope: bytes too short (${r.length} < ${yt})`);let t=0,n=r[t++];if(n!==qe)throw new Error(`decodeEnvelope: unsupported envelope version ${n} (expected ${qe})`);let s=r[t++];if(s===0)throw new Error("decodeEnvelope: name_len must be >= 1");if(t+s+2>r.length)throw new Error(`decodeEnvelope: envelope truncated (need ${t+s+2} bytes, have ${r.length})`);let o=new TextDecoder().decode(r.subarray(t,t+s));t+=s;let i=(r[t]<<8|r[t+1])>>>0;t+=2;let a=r.subarray(t),d=e.lookupCodec(o);if(d==null)throw new Error(`decodeEnvelope: codec "${o}" not registered (envelope codec_v=${i})`);return{codec:d,codecVersion:i,payload:a}}function wt(r){r.registerCodec(pn)}var pn,qe,yt,Ke=P(()=>{"use strict";pn={name:"json",version:1,contentType:"application/json",encode(r){let e=JSON.stringify(r);return new TextEncoder().encode(e)},decode(r,e){let t=new TextDecoder().decode(r);return JSON.parse(t)}},qe=1,yt=4});function Te(r){if(r==null)return ie;let{type:e,id:t,...n}=r;return{type:e??"system",id:t??"",...n}}var ie,Ye=P(()=>{"use strict";ie={type:"system",id:""}});function Oe(){return ae>0||ge}function Tt(){return ae>0}function de(r){ae>0?me.push(r):r()}function Ot(r){ae+=1;let e=!1;try{r()}catch(t){throw e=!0,t}finally{if(ae-=1,ae===0)if(e){if(!ge){let t=me.splice(0);for(let n of t)try{n()}catch{}ee.length=0,te.length=0,ue.length=0}}else hn()}}function hn(){let r=!ge;r&&(ge=!0);let e=[],t=0;try{for(;ee.length>0||te.length>0||ue.length>0||r&&me.length>0;){if(r&&me.length>0){let o=me.splice(0);for(let i of o)try{i()}catch(a){e.push(a)}continue}if(t+=1,t>1e3)throw ee.length=0,te.length=0,ue.length=0,new Error("batch drain exceeded 1000 iterations \u2014 likely a reactive cycle");let s=(ee.length>0?ee:te.length>0?te:ue).splice(0);for(let o of s)try{o()}catch(i){e.push(i)}}}finally{r&&(ge=!1)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"batch drain: multiple callbacks threw")}function Ne(r,e,t){if(e.length===0)return;if(e.length===1){let u=t(e[0][0]);if(u<3||!Oe()){r(e);return}(u>=5?ue:u===4?te:ee).push(()=>r(e));return}let n=e.length,s=n,o=n,i=n,a=0;for(;a<n&&t(e[a][0])<3;)a++;for(s=a;a<n&&t(e[a][0])===3;)a++;for(o=a;a<n&&t(e[a][0])===4;)a++;i=a;let d=Oe();if(s>0){let u=e.slice(0,s);r(u)}if(o>s){let u=e.slice(s,o);d?ee.push(()=>r(u)):r(u)}if(i>o){let u=e.slice(o,i);d?te.push(()=>r(u)):r(u)}if(n>i){let u=e.slice(i,n);d?ue.push(()=>r(u)):r(u)}}var ae,ge,ee,te,ue,me,Je=P(()=>{"use strict";ae=0,ge=!1,ee=[],te=[],ue=[],me=[]});function X(){return Math.trunc(performance.now()*1e6)}function xe(){return Date.now()*1e6}var ke=P(()=>{"use strict"});function Nt(r){r.registerMessageType(pe,{tier:0,wireCrossing:!1}),r.registerMessageType(K,{tier:1,wireCrossing:!1}),r.registerMessageType(W,{tier:1,wireCrossing:!1,metaPassthrough:!1}),r.registerMessageType(J,{tier:2,wireCrossing:!1}),r.registerMessageType(Z,{tier:2,wireCrossing:!1}),r.registerMessageType(F,{tier:3,wireCrossing:!0}),r.registerMessageType(Y,{tier:3,wireCrossing:!0}),r.registerMessageType(H,{tier:4,wireCrossing:!0,metaPassthrough:!1}),r.registerMessageType(M,{tier:4,wireCrossing:!0,metaPassthrough:!1}),r.registerMessageType(j,{tier:5,wireCrossing:!0,metaPassthrough:!1})}var Ee,xt=P(()=>{"use strict";he();Ee=class{_messageTypes=new Map;_codecs=new Map;_onMessage;_onSubscribe;_defaultVersioning;_defaultHashFn;_inspectorEnabled=!(typeof process<"u"&&process.env?.NODE_ENV==="production");_globalInspector;_rigorRecorder;_frozen=!1;tierOf;constructor(e){this._onMessage=e.onMessage,this._onSubscribe=e.onSubscribe,this._defaultVersioning=e.defaultVersioning,this._defaultHashFn=e.defaultHashFn,this.tierOf=t=>{let n=this._messageTypes.get(t);return n!=null?n.tier:1}}get onMessage(){return this._frozen=!0,this._onMessage}get onSubscribe(){return this._frozen=!0,this._onSubscribe}set onMessage(e){this._assertUnfrozen(),this._onMessage=e}set onSubscribe(e){this._assertUnfrozen(),this._onSubscribe=e}get defaultVersioning(){return this._defaultVersioning}set defaultVersioning(e){this._assertUnfrozen(),this._defaultVersioning=e}get defaultHashFn(){return this._defaultHashFn}set defaultHashFn(e){this._assertUnfrozen(),this._defaultHashFn=e}get inspectorEnabled(){return this._inspectorEnabled}set inspectorEnabled(e){this._inspectorEnabled=e}get globalInspector(){return this._globalInspector}set globalInspector(e){this._globalInspector=e}get rigorRecorder(){return this._rigorRecorder}set rigorRecorder(e){this._rigorRecorder=e}registerMessageType(e,t){return this._assertUnfrozen(),this._messageTypes.set(e,{tier:t.tier,wireCrossing:t.wireCrossing??t.tier>=3,metaPassthrough:t.metaPassthrough??!0}),this}messageTier(e){let t=this._messageTypes.get(e);return t!=null?t.tier:1}isWireCrossing(e){let t=this._messageTypes.get(e);return t!=null?t.wireCrossing:!0}isLocalOnly(e){return!this.isWireCrossing(e)}isMetaPassthrough(e){let t=this._messageTypes.get(e);return t!=null?t.metaPassthrough:!0}isKnownMessageType(e){return this._messageTypes.has(e)}registerCodec(e){return this._assertUnfrozen(),this._codecs.set(e.name,e),this}lookupCodec(e){return this._codecs.get(e)}_isFrozen(){return this._frozen}_assertUnfrozen(){if(this._frozen)throw new Error("GraphReFlyConfig is frozen: a node has already captured this config. Register custom types and set hooks before creating any node.")}}});function Xe(r){let e=gn.filter(t=>r({type:t,id:""},"write"));return e.length===0?"restricted":e.includes("human")&&e.includes("llm")&&e.every(t=>t==="human"||t==="llm"||t==="system")?"both":e.length===1?e[0]:e.join("+")}var U,gn,Se=P(()=>{"use strict";U=class extends Error{actor;action;nodeName;constructor(e,t){super(t??`GuardDenied: action "${String(e.action)}" denied for actor type "${String(e.actor.type)}"`),this.name="GuardDenied",this.actor=e.actor,this.action=e.action,this.nodeName=e.nodeName}get node(){return this.nodeName}},gn=["human","llm","wallet","system"]});function Ze(r){if(r===void 0)return null;if(typeof r=="number"){if(!Number.isFinite(r))throw new TypeError(`Cannot hash non-finite number: ${r}`);if(Number.isInteger(r)&&!Number.isSafeInteger(r))throw new TypeError(`Cannot hash integer outside safe range (|n| > 2^53-1): ${r}. Cross-language cid parity is not guaranteed for unsafe integers.`);return r}if(typeof r=="string"||typeof r=="boolean"||r===null)return r;if(Array.isArray(r))return r.map(Ze);if(typeof r=="object"&&r!==null){let e={};for(let t of Object.keys(r).sort())e[t]=Ze(r[t]);return e}return null}function yn(r){let e=bn.encode(r),t=e.length,n=t*8,s=t+9+63&-64,o=new Uint8Array(s);o.set(e),o[t]=128;let i=new DataView(o.buffer);i.setUint32(s-4,n>>>0,!1),i.setUint32(s-8,Math.floor(n/4294967296)>>>0,!1);let a=1779033703,d=3144134277,u=1013904242,l=2773480762,g=1359893119,p=2600822924,f=528734635,c=1541459225,v=new Uint32Array(64),h=(b,m)=>b>>>m|b<<32-m;for(let b=0;b<s;b+=64){for(let O=0;O<16;O++)v[O]=i.getUint32(b+O*4,!1);for(let O=16;O<64;O++){let L=v[O-15],G=v[O-2],R=h(L,7)^h(L,18)^L>>>3,se=h(G,17)^h(G,19)^G>>>10;v[O]=v[O-16]+R+v[O-7]+se>>>0}let m=a,y=d,_=u,N=l,x=g,k=p,E=f,S=c;for(let O=0;O<64;O++){let L=h(x,6)^h(x,11)^h(x,25),G=x&k^~x&E,R=S+L+G+mn[O]+v[O]>>>0,se=h(m,2)^h(m,13)^h(m,22),Ie=m&y^m&_^y&_,_e=se+Ie>>>0;S=E,E=k,k=x,x=N+R>>>0,N=_,_=y,y=m,m=R+_e>>>0}a=a+m>>>0,d=d+y>>>0,u=u+_>>>0,l=l+N>>>0,g=g+x>>>0,p=p+k>>>0,f=f+E>>>0,c=c+S>>>0}let w=b=>b.toString(16).padStart(8,"0");return w(a)+w(d)+w(u)+w(l)+w(g)+w(p)+w(f)+w(c)}function Qe(r){let e=Ze(r??null),t=JSON.stringify(e);return yn(t).slice(0,16)}function vn(){let r=globalThis.crypto;if(r?.randomUUID)return r.randomUUID();let e=()=>Math.floor(Math.random()*4294967296).toString(16).padStart(8,"0"),t=e()+e()+e()+e();return`${t.slice(0,8)}-${t.slice(8,12)}-4${t.slice(13,16)}-${(parseInt(t.slice(16,17),16)&3|8).toString(16)}${t.slice(17,20)}-${t.slice(20,32)}`}function et(r,e,t){let n=t?.id??vn();if(r===0)return{id:n,version:0};let o=(t?.hash??Qe)(e);return{id:n,version:0,cid:o,prev:null}}function kt(r,e,t){r.version+=1,"cid"in r&&(r.prev=r.cid,r.cid=t(e))}var mn,bn,Et=P(()=>{"use strict";mn=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),bn=new TextEncoder});function Rt(r){return{node:r,unsub:null,prevData:void 0,dirty:!1,involvedThisWave:!1,dataBatch:[],terminal:void 0}}function tt(r){r.prevData=void 0,r.dirty=!1,r.involvedThisWave=!1,r.dataBatch.length=0,r.terminal=void 0}function Ae(r){return r.length===0?r:typeof r[0]=="symbol"?[r]:r}function Re(r,e,t){let n=Dt(r)?r:[],s=typeof r=="function"?r:typeof e=="function"?e:void 0,o={};return Dt(r)?o=(nt(e)?e:t)??{}:nt(r)?o=r:o=(nt(e)?e:t)??{},new $(n,s,o)}var St,At,_n,wn,ce,$,Dt,nt,be=P(()=>{"use strict";Ke();Ye();Je();ke();xt();Se();he();Et();St=()=>{},At=100;_n=(r,e,t,n)=>{t.direction==="down-in"&&r._onDepMessage(t.depIndex,e)},wn=(r,e,t,n)=>{let s=r;if(s._status==="completed"||s._status==="errored")return;let o=s._cached,i=o===void 0?[ze]:[ze,[F,o]];s._status==="dirty"&&i.push(oe),Ne(e,i,s._config.tierOf)},ce=new Ee({onMessage:_n,onSubscribe:wn});Nt(ce);wt(ce);$=class r{_optsName;_describeKind;meta;_hasMeta;_config;_deps;_sinks=null;_sinkCount=0;_cached;_status;_cleanup;_store={};_waveHasNewData=!1;_hasNewTerminal=!1;_hasCalledFnOnce=!1;_paused=!1;_pendingWave=!1;_isExecutingFn=!1;_pendingRerun=!1;_rerunDepth=0;_dirtyDepCount=0;_batchPendingMessages=null;_pauseLocks=null;_pauseBuffer=null;_fn;_equals;_resubscribable;_resetOnTeardown;_autoComplete;_autoError;_pausable;_partial;_guard;_extraGuards;_hashFn;_versioning;_versioningLevel;_lastMutation;_inspectorHooks;_actions;constructor(e,t,n){this._config=n.config??ce,this._config.onMessage,this._optsName=n.name,this._describeKind=n.describeKind,this._equals=n.equals??Object.is,this._resubscribable=n.resubscribable??!1,this._resetOnTeardown=n.resetOnTeardown??!1,this._autoComplete=n.completeWhenDepsComplete??!0,this._autoError=n.errorWhenDepsError??!0,this._pausable=n.pausable??!0,this._guard=n.guard,this._fn=t,this._partial=n.partial??!1,this._cached=n.initial!==void 0?n.initial:void 0,this._status=e.length===0&&t==null&&this._cached!==void 0?"settled":"sentinel",this._hashFn=n.versioningHash??this._config.defaultHashFn??Qe;let s=n.versioning??this._config.defaultVersioning;this._versioningLevel=s,this._versioning=s!=null?et(s,this._cached===void 0?void 0:this._cached,{id:n.versioningId,hash:this._hashFn}):void 0,this._deps=e.map(Rt);let o={};for(let[a,d]of Object.entries(n.meta??{})){let u={initial:d,name:`${n.name??"node"}:meta:${a}`,describeKind:"state",config:this._config};n.guard!=null&&(u.guard=n.guard),o[a]=new r([],void 0,u)}Object.freeze(o),this.meta=o,this._hasMeta=Object.keys(o).length>0;let i=this;this._actions={emit(a){i._emit([[F,a]])},down(a){i._emit(Ae(a))},up(a){i._emitUp(Ae(a))}},this.down=this.down.bind(this),this.up=this.up.bind(this)}get _isTerminal(){return this._status==="completed"||this._status==="errored"}get name(){return this._optsName}get status(){return this._status}get cache(){return this._cached===void 0?void 0:this._cached}get lastMutation(){return this._lastMutation}get v(){return this._versioning}hasGuard(){return this._guard!=null}_applyVersioning(e,t){if(this._isExecutingFn)throw new Error(`Node "${this.name}": _applyVersioning cannot run mid-fn \u2014 call it outside of \`_execFn\` (typically at graph setup time before the first subscribe).`);let n=this._versioningLevel;if(n!=null&&e<=n)return;let s=t?.hash??this._hashFn;s!==this._hashFn&&(this._hashFn=s);let o=this._cached===void 0?void 0:this._cached,i=this._versioning,a=i?.id??t?.id,d=i?.version??0,u=et(e,o,{id:a,hash:s});u.version=d,this._versioning=u,this._versioningLevel=e}_setInspectorHook(e){return e==null?()=>{}:(this._inspectorHooks==null&&(this._inspectorHooks=new Set),this._inspectorHooks.add(e),()=>{this._inspectorHooks?.delete(e),this._inspectorHooks?.size===0&&(this._inspectorHooks=void 0)})}_pushGuard(e){return this._extraGuards==null&&(this._extraGuards=new Set),this._extraGuards.add(e),()=>{this._extraGuards?.delete(e),this._extraGuards?.size===0&&(this._extraGuards=void 0)}}allowsObserve(e){if(this._guard==null&&this._extraGuards==null)return!0;let t=Te(e);if(this._guard!=null&&!this._guard(t,"observe"))return!1;if(this._extraGuards!=null){for(let n of this._extraGuards)if(!n(t,"observe"))return!1}return!0}_checkGuard(e){if(e?.internal)return;let t=this._guard!=null||this._extraGuards!=null,n=e?.actor!=null;if(!t&&!n)return;let s=Te(e?.actor),o=e?.delivery==="signal"?"signal":"write";if(this._guard!=null&&!this._guard(s,o))throw new U({actor:s,action:o,nodeName:this.name});if(this._extraGuards!=null){for(let i of this._extraGuards)if(!i(s,o))throw new U({actor:s,action:o,nodeName:this.name})}this._lastMutation={actor:s,timestamp_ns:xe()}}down(e,t){let n=Ae(e);n.length!==0&&(this._checkGuard(t),this._emit(n))}emit(e,t){this._checkGuard(t),this._emit([[F,e]])}up(e,t){if(this._deps.length===0)return;let n=Ae(e);if(n.length===0)return;this._checkGuard(t);let s=t??{internal:!0};this._validateUpTiers(n);for(let o of this._deps)o.node.up?.(n,s)}_emitUp(e){if(this._deps.length!==0&&e.length!==0){this._validateUpTiers(e);for(let t of this._deps)t.node.up?.(e,{internal:!0})}}_validateUpTiers(e){let t=this._config.tierOf;for(let n of e){let s=t(n[0]);if(s===3||s===4)throw new Error(`Node "${this.name}": tier-${s} messages cannot flow up \u2014 DATA/RESOLVED/COMPLETE/ERROR are downstream-only. Use \`down(...)\` for value delivery; \`up(...)\` is for control signals (DIRTY, INVALIDATE, PAUSE, RESUME, TEARDOWN).`)}}subscribe(e,t){if(t!=null&&this._guard!=null){let d=Te(t);if(!this._guard(d,"observe"))throw new U({actor:d,action:"observe",nodeName:this.name})}let s=this._isTerminal&&this._resubscribable;if(s){this._cached=void 0,this._status="sentinel",this._store={},this._hasCalledFnOnce=!1,this._waveHasNewData=!1,this._hasNewTerminal=!1,this._paused=!1,this._pendingWave=!1,this._pendingRerun=!1,this._isExecutingFn=!1,this._rerunDepth=0,this._dirtyDepCount=0,this._pauseLocks=null,this._pauseBuffer=null;for(let d of this._deps)tt(d);if(this._partial===!1){for(let d of this._deps)if(d.prevData!==void 0||d.dataBatch.length!==0||d.terminal!==void 0||d.dirty)throw new Error(`resubscribable-reset invariant: DepRecord not fully reset for node ${this._optsName??"(anonymous)"}`)}}this._sinkCount+=1;let o;try{o=this._config.onSubscribe(this,e,{sinkCount:this._sinkCount,afterTerminalReset:s},this._actions)}catch(d){throw this._sinkCount-=1,d}this._sinks==null?this._sinks=e:typeof this._sinks=="function"?this._sinks=new Set([this._sinks,e]):this._sinks.add(e);let i=this._isTerminal;if(this._sinkCount===1&&!i)try{this._activate()}catch(d){if(this._sinkCount-=1,this._removeSink(e),this._sinkCount===0&&(this._status="sentinel"),typeof o=="function")try{o()}catch{}throw d}this._status==="sentinel"&&this._cached===void 0&&(this._status="pending");let a=!1;return()=>{a||(a=!0,this._sinkCount-=1,this._removeSink(e),typeof o=="function"&&o(),this._sinks==null&&this._deactivate())}}_removeSink(e){if(this._sinks===e)this._sinks=null;else if(this._sinks!=null&&typeof this._sinks!="function")if(this._sinks.delete(e),this._sinks.size===1){let[t]=this._sinks;this._sinks=t}else this._sinks.size===0&&(this._sinks=null)}_activate(){if(this._deps.length===0){this._fn&&this._execFn();return}this._dirtyDepCount=0;let e=this._deps.length,t=0;try{for(let n=0;n<e;n++){let s=n,o=this._deps[n];o.unsub=St,o.unsub=o.node.subscribe(i=>{if(o.unsub===null)return;let a=this._config.tierOf,d=!1;for(let u of i)a(u[0])>=3&&(d=!0),this._config.onMessage(this,u,{direction:"down-in",depIndex:s},this._actions);d&&this._maybeRunFnOnSettlement()}),t++}}catch(n){this._deps[t].unsub=null;for(let s=0;s<t;s++){let o=this._deps[s];if(o.unsub!=null){let i=o.unsub;o.unsub=null;try{i()}catch{}tt(o)}}throw this._dirtyDepCount=0,n}}_addDep(e){for(let s=0;s<this._deps.length;s++)if(this._deps[s].node===e)return s;let t=this._deps.length,n=Rt(e);if(this._deps.push(n),this._sinks==null)return t;n.dirty=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(Ue),n.unsub=St;try{n.unsub=e.subscribe(s=>{if(n.unsub===null)return;let o=this._config.tierOf,i=!1;for(let a of s)o(a[0])>=3&&(i=!0),this._config.onMessage(this,a,{direction:"down-in",depIndex:t},this._actions);i&&this._maybeRunFnOnSettlement()})}catch(s){throw n.unsub=null,this._deps.pop(),this._dirtyDepCount--,s}return t}_deactivate(e=!1){let t=this._cleanup;if(this._cleanup=void 0,typeof t=="function")try{t()}catch(n){this._emit([[M,this._wrapFnError("cleanup threw",n)]])}else if(t!=null&&typeof t=="object"){let n=t.deactivate;if(typeof n=="function")try{n()}catch(s){this._emit([[M,this._wrapFnError("cleanup.deactivate threw",s)]])}}for(let n of this._deps){if(n.unsub!=null){let s=n.unsub;n.unsub=null;try{s()}catch{}}tt(n)}this._waveHasNewData=!1,this._hasNewTerminal=!1,this._hasCalledFnOnce=!1,this._paused=!1,this._pendingWave=!1,this._pendingRerun=!1,this._rerunDepth=0,this._store={},this._dirtyDepCount=0,this._pauseLocks=null,this._pauseBuffer=null,this._fn!=null&&(this._cached=void 0),e||(this._fn!=null||this._deps.length>0)&&(!this._isTerminal||this._resubscribable)&&(this._status="sentinel")}_onDepMessage(e,t){let n=this._deps[e],s=t[0];if(this._inspectorHooks!=null){let o={kind:"dep_message",depIndex:e,message:t};for(let i of this._inspectorHooks)i(o)}if(s!==pe){if(s===K){this._depDirtied(n);return}if(s===W){if(this._depInvalidated(n),this._cached===void 0)return;this._emit(mt);return}if(s===J||s===Z){this._emit([t]);return}if(s===j){this._emit(We);return}if(s===F)this._depSettledAsData(n,t[1]);else if(s===Y)this._depSettledAsResolved(n);else if(s===H)this._depSettledAsTerminal(n,!0);else if(s===M)this._depSettledAsTerminal(n,t[1]);else{this._emit([t]);return}if(!this._fn){(s===F||s===Y)&&this._emit([t]),(s===H||s===M)&&this._maybeAutoTerminalAfterWave();return}}}_depDirtied(e){e.dirty||(e.dirty=!0,e.involvedThisWave=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(Ue))}_depSettledAsData(e,t){e.dirty&&(e.dirty=!1,this._dirtyDepCount--),e.involvedThisWave=!0,e.dataBatch.push(t),this._waveHasNewData=!0}_depSettledAsResolved(e){e.dirty&&(e.dirty=!1,this._dirtyDepCount--)}_depSettledAsTerminal(e,t){e.dirty&&(e.dirty=!1,this._dirtyDepCount--),e.terminal=t,e.involvedThisWave=!0,this._hasNewTerminal=!0}_depInvalidated(e){e.prevData=void 0,e.terminal=void 0,e.dataBatch.length=0,e.dirty?e.involvedThisWave=!1:(e.dirty=!0,e.involvedThisWave=!0,this._dirtyDepCount++)}_maybeRunFnOnSettlement(){if(!(this._isTerminal&&!this._resubscribable)&&!(this._dirtyDepCount>0)){if(!this._partial&&!this._hasCalledFnOnce)for(let e=0;e<this._deps.length;e++){let t=this._deps[e];if(t.dataBatch.length===0&&t.prevData===void 0&&t.terminal===void 0){this._maybeAutoTerminalAfterWave();return}}if(this._paused){this._pendingWave=!0;return}if(!this._waveHasNewData&&!this._hasNewTerminal&&this._hasCalledFnOnce){this._clearWaveFlags(),this._emit(gt),this._maybeAutoTerminalAfterWave();return}this._fn&&this._execFn(),this._maybeAutoTerminalAfterWave()}}_maybeAutoTerminalAfterWave(){if(this._deps.length===0||this._isTerminal)return;let e=this._deps.find(t=>t.terminal!==void 0&&t.terminal!==!0);if(e!=null){this._autoError&&this._emit([[M,e.terminal]]);return}this._autoComplete&&this._deps.every(t=>t.terminal!==void 0)&&this._emit(bt)}_execFn(){if(!this._fn||this._isTerminal&&!this._resubscribable)return;if(this._isExecutingFn){this._pendingRerun=!0;return}let e=this._cleanup;if(typeof e=="function"){this._cleanup=void 0;try{e()}catch(i){this._emit([[M,this._wrapFnError("cleanup threw",i)]]);return}}else if(e!=null&&typeof e=="object"){let i=e.beforeRun;if(typeof i=="function"){e.beforeRun=void 0;try{i()}catch(a){this._emit([[M,this._wrapFnError("cleanup.beforeRun threw",a)]]);return}}}let t=this._deps.map(i=>i.involvedThisWave?i.dataBatch.length>0?[...i.dataBatch]:[]:void 0),n=this._deps.map(i=>i.prevData);for(let i=0;i<this._deps.length;i++){let a=t[i];a!=null&&a.length>0&&(this._deps[i].prevData=a[a.length-1])}let s=this._deps.map(i=>i.terminal),o={prevData:n,terminalDeps:s,store:this._store};if(this._hasCalledFnOnce=!0,this._clearWaveFlags(),this._inspectorHooks!=null){let i={kind:"run",batchData:t,prevData:n};for(let a of this._inspectorHooks)a(i)}this._isExecutingFn=!0;try{let i=this._fn(t,this._actions,o);if(typeof i=="function")this._cleanup=i;else if(i!=null&&typeof i=="object"){let a=i;(typeof a.beforeRun=="function"||typeof a.deactivate=="function"||typeof a.invalidate=="function")&&(this._cleanup=i)}}catch(i){this._emit([[M,this._wrapFnError("fn threw",i)]])}finally{this._isExecutingFn=!1,this._pendingRerun?(this._pendingRerun=!1,this._rerunDepth+=1,this._rerunDepth>At?(this._rerunDepth=0,this._emit([[M,new Error(`Node "${this.name}": _pendingRerun depth exceeded ${At} \u2014 likely a reactive cycle`)]])):this._maybeRunFnOnSettlement()):this._rerunDepth=0,this._clearWaveFlags()}}_clearWaveFlags(){this._waveHasNewData=!1,this._hasNewTerminal=!1;for(let e of this._deps)e.involvedThisWave=!1,e.dataBatch.length=0}_wrapFnError(e,t){let n=t instanceof Error?t.message:String(t);return new Error(`Node "${this.name}": ${e}: ${n}`,{cause:t})}_frameBatch(e){let t=this._config.tierOf;if(e.length===1)return t(e[0][0])===3&&this._status!=="dirty"?[oe,e[0]]:e;let n=!0,s=!1,o=!1,i=-1;for(let d of e){let u=t(d[0]);u<i&&(n=!1),u===3&&(s=!0),d[0]===K&&(o=!0),i=u}let a=e;if(!n){let d=e.map((u,l)=>({m:u,i:l,tier:t(u[0])}));d.sort((u,l)=>u.tier-l.tier||u.i-l.i),a=d.map(u=>u.m)}if(s&&!o&&this._status!=="dirty"){let d=0;for(;d<a.length&&t(a[d][0])===0;)d++;return d===0?[oe,...a]:[...a.slice(0,d),oe,...a.slice(d)]}return a}_emit(e){if(e.length===0)return;for(let a=0;a<e.length;a++){let d=e[a];if(d[0]===M&&d[1]===void 0)throw new TypeError('[ERROR, payload] requires a non-undefined payload (spec \xA71.2). Pass an Error object or domain tag instead \u2014 e.g. node.down([[ERROR, new Error("reason")]])')}let t=e;if(this._isTerminal&&!this._resubscribable){let a=e.filter(d=>d[0]===j||d[0]===W);if(a.length===0)return;t=a}t=this._frameBatch(t);let s=null;for(let a=0;a<t.length;a++){let d=t[a],u=d[0];if(u!==J&&u!==Z){s?.push(d);continue}if(d.length<2)throw new Error(`Node "${this.name}": [[${u===J?"PAUSE":"RESUME"}]] must carry a lockId payload \u2014 bare PAUSE/RESUME is a protocol violation (C0 rule). Use \`[[PAUSE, lockId]]\` / \`[[RESUME, lockId]]\`.`);let l=!0;if(this._pausable!==!1){let g=d[1];if(u===J)this._pauseLocks==null&&(this._pauseLocks=new Set),this._pauseLocks.add(g),this._paused=!0,this._pausable==="resumeAll"&&this._pauseBuffer==null&&(this._pauseBuffer=[]);else if(this._pauseLocks==null||!this._pauseLocks.has(g))l=!1;else if(this._pauseLocks.delete(g),this._pauseLocks.size===0){if(this._paused=!1,this._pauseBuffer!=null&&this._pauseBuffer.length>0){let p=this._pauseBuffer;this._pauseBuffer=[],this._emit(p)}this._pendingWave&&(this._pendingWave=!1,this._maybeRunFnOnSettlement())}}l?s?.push(d):s==null&&(s=t.slice(0,a))}if(s!=null){if(s.length===0)return;t=s}if(this._hasMeta&&t.some(a=>a[0]===j))for(let a of Object.keys(this.meta))try{this.meta[a]._emit(We)}catch{}let{finalMessages:o,equalsError:i}=this._updateState(t);if(o.length>0&&this._config.inspectorEnabled){let a=this._config.globalInspector;if(a!=null)try{a({kind:"emit",node:this,messages:o})}catch{}}if(o.length>0)if(this._paused&&this._pausable==="resumeAll"&&this._pauseBuffer!=null){let a=this._config.tierOf,d=[];for(let u of o)a(u[0])===3?this._pauseBuffer.push(u):d.push(u);d.length>0&&this._dispatchOrAccumulate(d)}else this._dispatchOrAccumulate(o);i!=null&&this._emit([[M,i]])}_updateState(e){let t=this._config.tierOf,n,s,o=-1,i=0;for(let l of e)t(l[0])===3&&i++;let a=i<=1,d=-1;if(this._versioning!=null&&i>1){for(let l=e.length-1;l>=0;l--)if(e[l][0]===F){d=l;break}}for(let l=0;l<e.length;l++){let g=e[l],p=g[0];if(p===F){if(g.length>=2){let f=!1;if(a&&this._cached!==void 0)try{f=this._equals(this._cached,g[1])}catch(c){s=this._wrapFnError("equals threw",c),o=l;break}if(f){n==null&&(n=e.slice(0,l)),n.push(Be),this._status="resolved";continue}this._cached=g[1],this._versioning!=null&&(d<0||l===d)&&kt(this._versioning,g[1],this._hashFn)}this._status="settled",n?.push(g)}else if(n?.push(g),p===K)this._status="dirty";else if(p===Y)this._status="resolved";else if(p===H){this._status="completed";{let f=this._config.rigorRecorder;if(f!=null)try{f.onTerminalTransition(this,"completed",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(p===M){this._status="errored";{let f=this._config.rigorRecorder;if(f!=null)try{f.onTerminalTransition(this,"errored",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(p===W){if(this._cached!==void 0){let c=this._config.rigorRecorder;if(c!=null)try{c.onNonVacuousInvalidate(this,this._cached)}catch{}}this._cached=void 0,this._status="dirty";let f=this._cleanup;if(typeof f=="function"){this._cleanup=void 0;try{f()}catch{}}else if(f!=null&&typeof f=="object"){let c=f.invalidate;if(typeof c=="function")try{c()}catch{}}}else p===j&&(this._resetOnTeardown&&(this._cached=void 0),this._deactivate(!0),this._status="sentinel")}let u=o>=0?n??e.slice(0,o):n??e;return s!=null?{finalMessages:u,equalsError:s}:{finalMessages:u}}_deliverToSinks=e=>{if(this._sinks==null)return;if(typeof this._sinks=="function"){this._sinks(e);return}let t=[...this._sinks];for(let n of t)n(e)};_dispatchOrAccumulate(e){if(Tt()){this._batchPendingMessages===null&&(this._batchPendingMessages=[],de(()=>this._flushBatchPending()));for(let t of e)this._batchPendingMessages.push(t);return}Ne(this._deliverToSinks,e,this._config.tierOf)}_flushBatchPending(){let e=this._batchPendingMessages;if(e===null||(this._batchPendingMessages=null,e.length===0))return;let t=this._frameBatch(e);Ne(this._deliverToSinks,t,this._config.tierOf)}},Dt=r=>Array.isArray(r),nt=r=>typeof r=="object"&&r!=null&&!Array.isArray(r)});function ne(r,e){return Re([],{...e,initial:r})}function rt(r,e){return Re((n,s,o)=>r(s,o)??void 0,{describeKind:"producer",...e})}function st(r,e,t){return Re(r,(s,o,i)=>{let a=s.map((d,u)=>d!=null&&d.length>0?d.at(-1):i.prevData[u]);o.emit(e(a,i))},{describeKind:"derived",...t})}var ot=P(()=>{"use strict";be()});function it(r,e){if(e!=null&&e.length>0)return new Set(e);switch(r){case"standard":return new Set(["type","status","value","deps","meta","v"]);case"full":return null;case"spec":return new Set(["type","deps","meta","value"]);default:return new Set(["type","deps"])}}function Tn(r){return r._describeKind!=null?r._describeKind:r._deps.length>0?"derived":r._fn!=null?"producer":"state"}function On(r){let e={};for(let[t,n]of Object.entries(r.meta))try{e[t]=n.cache}catch{}return e}function at(r,e,t){let n=e==null,s=!n&&e!=null?[...e].filter(l=>l.startsWith("meta.")).map(l=>l.slice(5)):null,o=n||e.has("meta")||s!=null&&s.length>0,i="state",a=[];r instanceof $&&(i=Tn(r),a=r._deps.map(l=>l.node.name??""));let d={type:i,deps:a};(n||e.has("status"))&&(d.status=r.status);let u=r instanceof $?r._guard:void 0;if(o){let l={...On(r)};if(u!=null&&l.access===void 0&&(l.access=Xe(u)),s!=null&&s.length>0&&!e.has("meta")){let g={};for(let p of s)p in l&&(g[p]=l[p]);d.meta=g}else d.meta=l}if(r.name!=null&&(d.name=r.name),(n||e.has("value"))&&(!t||i==="state")){r.status==="sentinel"&&(d.sentinel=!0);try{d.value=r.cache}catch{}}if((n||e.has("v"))&&r.v!=null){let l={id:r.v.id,version:r.v.version};"cid"in r.v&&(l.cid=r.v.cid,l.prev=r.v.prev),d.v=l}return(n||e.has("guard"))&&u!=null&&(d.guard=Xe(u)),(n||e.has("lastMutation"))&&r.lastMutation!=null&&(d.lastMutation=r.lastMutation),d}var Ct=P(()=>{"use strict";Se();be()});function ut(r,e){if(Object.is(r,e))return!0;if(r==null||e==null||typeof r!="object"||typeof e!="object")return!1;if(Array.isArray(r)){if(!Array.isArray(e)||r.length!==e.length)return!1;for(let o=0;o<r.length;o++)if(!ut(r[o],e[o]))return!1;return!0}if(Array.isArray(e))return!1;let t=Object.keys(r),n=Object.keys(e);if(t.length!==n.length)return!1;let s=new Set(n);for(let o of t)if(!s.has(o)||!ut(r[o],e[o]))return!1;return!0}function Mt(r,e){return`${r}\0${e}`}function dt(r,e){let t=[],n=new Set(r.subgraphs),s=new Set(e.subgraphs),o=[];for(let h of s)n.has(h)||o.push(h);o.sort();for(let h of o)t.push({type:"subgraph-mounted",path:h});let i=new Set(Object.keys(r.nodes)),a=new Set(Object.keys(e.nodes)),d=[];for(let h of a)i.has(h)||d.push(h);d.sort();for(let h of d)t.push({type:"node-added",path:h,node:{...e.nodes[h]}});let u=[];for(let h of a){if(!i.has(h))continue;let w=r.nodes[h]?.meta,b=e.nodes[h]?.meta;w==null&&b==null||ut(w??{},b??{})||u.push(h)}u.sort();for(let h of u)t.push({type:"node-meta-changed",path:h,prevMeta:r.nodes[h]?.meta??{},nextMeta:e.nodes[h]?.meta??{}});let l=new Map;for(let h of r.edges)l.set(Mt(h.from,h.to),h);let g=new Map;for(let h of e.edges)g.set(Mt(h.from,h.to),h);let p=[];for(let[h,w]of g)l.has(h)||p.push(w);p.sort((h,w)=>h.from<w.from?-1:h.from>w.from?1:h.to<w.to?-1:h.to>w.to?1:0);for(let h of p)t.push({type:"edge-added",from:h.from,to:h.to});let f=[];for(let[h,w]of l)g.has(h)||f.push(w);f.sort((h,w)=>h.from<w.from?-1:h.from>w.from?1:h.to<w.to?-1:h.to>w.to?1:0);for(let h of f)t.push({type:"edge-removed",from:h.from,to:h.to});let c=[];for(let h of i)a.has(h)||c.push(h);c.sort();for(let h of c)t.push({type:"node-removed",path:h});let v=[];for(let h of n)s.has(h)||v.push(h);v.sort();for(let h of v)t.push({type:"subgraph-unmounted",path:h});return{events:t,flushedAt_ns:X()}}var Gt=P(()=>{"use strict";ke()});function De(r){return r.subscribe(()=>{})}var Pt=P(()=>{"use strict"});var $t=P(()=>{"use strict";Pt()});var Ce,It=P(()=>{"use strict";Ce=class{_timer;_gen=0;start(e,t){this.cancel(),this._gen+=1;let n=this._gen;this._timer=setTimeout(()=>{this._timer=void 0,n===this._gen&&t()},e)}cancel(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}get pending(){return this._timer!==void 0}}});var ye,Ft=P(()=>{"use strict";ye=class{constructor(e){this.capacity=e;if(!Number.isInteger(e)||e<=0)throw new Error(`RingBuffer capacity must be a positive integer (got ${e})`);this.buf=new Array(e)}buf;head=0;_size=0;get size(){return this._size}get maxSize(){return this.capacity}push(e){let t=(this.head+this._size)%this.capacity;this.buf[t]=e,this._size<this.capacity?this._size++:this.head=(this.head+1)%this.capacity}shift(){if(this._size===0)return;let e=this.buf[this.head];return this.buf[this.head]=void 0,this.head=(this.head+1)%this.capacity,this._size--,e}at(e){if(this._size===0)return;let t=e<0?this._size+e:e;if(!(t<0||t>=this._size))return this.buf[(this.head+t)%this.capacity]}toArray(){let e=new Array(this._size);for(let t=0;t<this._size;t++)e[t]=this.buf[(this.head+t)%this.capacity];return e}clear(){for(let e=0;e<this._size;e++)this.buf[(this.head+e)%this.capacity]=void 0;this.head=0,this._size=0}}});function Lt(r,e,t,n={}){let s=e in r.nodes,o=t in r.nodes;if(!s)return Me(e,t,"no-such-from");if(!o)return Me(e,t,"no-such-to");let i=n.maxDepth;if(i!=null&&(!Number.isInteger(i)||i<0))throw new Error("explainPath: maxDepth must be an integer >= 0");if(e===t){if(n.findCycle===!0){let u=Nn(r,e,n);if(u!=null)return u}let d=Ge(e,r.nodes[e],0,n);return Pe(e,t,[d])}if(i===0)return Me(e,t,"no-path");let a=jt(r,e,t,i);return a.found?Pe(e,t,Vt(r,a.pathOrder,n)):Me(e,t,a.truncated?"max-depth-exceeded":"no-path")}function jt(r,e,t,n){let s=new Map,o=[{path:t,depth:0}],i=new Set([t]),a=0,d=!1;for(;a<o.length;){let g=o[a++];if(g.path===e)break;if(n!=null&&g.depth>=n){let v=r.nodes[g.path];v?.deps&&v.deps.length>0&&(d=!0);continue}let p=r.nodes[g.path];if(p==null)continue;let f=p.deps??[],c=new Map;for(let v=0;v<f.length;v++){let h=f[v];if(!h)continue;let w=c.get(h);w==null&&(w=[],c.set(h,w)),w.push(v)}for(let[v,h]of c)i.has(v)||(i.add(v),s.set(v,{from:g.path,depIndices:h}),o.push({path:v,depth:g.depth+1}))}if(!s.has(e))return{found:!1,pathOrder:[],truncated:d};let u=[{path:e}],l=e;for(;l!==t;){let g=s.get(l);if(g==null)return{found:!1,pathOrder:[],truncated:!1};u[u.length-1].depIndices=g.depIndices,u.push({path:g.from}),l=g.from}return{found:!0,pathOrder:u,truncated:!1}}function Nn(r,e,t){let n=r.nodes[e];if(n==null)return null;let s=n.deps??[],o=[];for(let a=0;a<s.length;a++)s[a]===e&&o.push(a);if(o.length>0){let a=Ge(e,n,0,t);a.dep_index=o[0];let d=Ge(e,n,1,t);return Pe(e,e,[a,d])}let i=null;for(let a=0;a<s.length;a++){let d=s[a];if(!d||d===e)continue;let u=jt(r,d,e,t.maxDepth);u.found&&(i==null||u.pathOrder.length<i.pathOrder.length)&&(i=u,i={found:!0,pathOrder:[{path:e,depIndices:[a]},...u.pathOrder],truncated:!1})}return i==null?null:Pe(e,e,Vt(r,i.pathOrder,t))}function Vt(r,e,t){return e.map((n,s)=>{let o=r.nodes[n.path],i=Ge(n.path,o,s,t);return n.depIndices!=null&&n.depIndices.length>0&&(i.dep_index=n.depIndices[0],n.depIndices.length>1&&(i.dep_indices=[...n.depIndices])),i})}function Ge(r,e,t,n){let s={path:r,type:e.type,hop:t};e.status!==void 0&&(s.status=e.status),"value"in e&&(s.value=e.value),e.v!=null&&(s.v=e.v);let o=n.annotations?.get(r)??e.annotation;o!=null&&(s.annotation=o);let i=n.lastMutations?.get(r)??e.lastMutation;return i!=null&&(s.lastMutation=i),s}function Pe(r,e,t){return Ht(r,e,!0,"ok",t)}function Me(r,e,t){return Ht(r,e,!1,t,[])}function Ht(r,e,t,n,s){let o=xn(r,e,t,n,s);return{from:r,to:e,found:t,reason:n,steps:s,text:o,toJSON(){return{from:r,to:e,found:t,reason:n,steps:s}}}}function xn(r,e,t,n,s){if(!t)switch(n){case"no-such-from":return`explainPath: no node named "${r}"`;case"no-such-to":return`explainPath: no node named "${e}"`;case"max-depth-exceeded":return`explainPath: no path from "${r}" to "${e}" within maxDepth`;default:return`explainPath: no path from "${r}" to "${e}"`}let o=[`Causal path: ${r} \u2192 ${e} (${s.length} step(s))`];for(let i of s){let d=` ${i.hop===0?"\xB7":"\u2193"} ${i.path} (${i.type}${i.status?`/${i.status}`:""})`;if(o.push(d),"value"in i&&o.push(` value: ${kn(i.value)}`),i.annotation!=null&&o.push(` annotation: ${i.annotation}`),i.lastMutation!=null){let u=i.lastMutation.actor;o.push(` actor: ${u.type}${u.id?`:${u.id}`:""}`)}}return o.join(`
2
- `)}function kn(r){if(r===void 0)return"<sentinel>";if(r===null)return"null";if(typeof r=="string")return JSON.stringify(r);if(typeof r=="number"||typeof r=="boolean"||typeof r=="bigint")return String(r);try{let e=JSON.stringify(r);return e.length>80?`${e.slice(0,77)}...`:e}catch{return String(r)}}var Bt=P(()=>{"use strict"});function zt(r){let e=new WeakSet,t=new WeakSet,n=[r],s=0;for(;n.length>0;){let o=n.pop();s+=Sn(o,e,t,n)}return s}function Sn(r,e,t,n){if(r==null)return 0;switch(typeof r){case"number":return I.number;case"boolean":return I.boolean;case"string":return I.string+r.length*2;case"bigint":return I.bigint+An(r);case"symbol":return I.symbol;case"function":return e.has(r)?0:(e.add(r),I.function);case"undefined":return 0}let o=r;if(e.has(o))return 0;e.add(o);let i=o[En];if(typeof i=="function")try{let u=i.call(o);if(typeof u=="number"&&Number.isFinite(u))return u}catch{}if(o instanceof Date)return I.date;if(o instanceof RegExp)return I.regexp+o.source.length*2;if(o instanceof Error){let u=o.message?o.message.length*2:0,l=o.stack?o.stack.length*2:0;return I.error+u+l}if(typeof URL<"u"&&o instanceof URL)return I.url+o.href.length*2;if(typeof Promise<"u"&&o instanceof Promise)return I.promise;if(o instanceof WeakMap)return I.weakmap;if(o instanceof WeakSet)return I.weakset;if(o instanceof Map){let u=I.map;for(let[l,g]of o)u+=I.mapEntry,n.push(l),n.push(g);return u}if(o instanceof Set){let u=I.set;for(let l of o)u+=I.setEntry,n.push(l);return u}if(Array.isArray(o)){let u=I.array+o.length*8;for(let l of o)n.push(l);return u}if(o instanceof ArrayBuffer)return t.has(o)?0:(t.add(o),o.byteLength);if(ArrayBuffer.isView(o)){let u=o;return t.has(u.buffer)?48:(t.add(u.buffer),u.buffer.byteLength+48)}let a=I.object,d=Object.keys(o);for(let u of d){a+=I.string+u.length*2;try{n.push(o[u])}catch{}}return a}function An(r){let e=r<0n?-r:r;if(e===0n)return 0;let t=e.toString(2).length;return Math.ceil(t/32)*8}var I,En,Ut=P(()=>{"use strict";I={object:56,array:64,string:40,number:8,boolean:4,null:0,undefined:0,symbol:40,bigint:16,function:120,map:72,set:72,mapEntry:40,setEntry:24,date:24,regexp:48,error:64,url:80,promise:48,weakmap:40,weakset:40},En=Symbol.for("sizeof")});function Wt(r,e){let t=e?.topN??10,n=r.describe({detail:"standard"}),s=[],o=r._collectObserveTargets;typeof o=="function"&&o.call(r,"",s);let i=new Map;for(let[p,f]of s)i.set(p,f);let a=[];for(let[p,f]of Object.entries(n.nodes)){let c=i.get(p),v=c instanceof $?c:null,h=v?zt(v.cache):0,w=v?v._sinkCount:0,b=f.deps?.length??0,m=f.type==="effect"&&w===0,y=w===0?f.type==="effect"?"orphan-effect":f.type==="derived"?"idle-derived":f.type==="producer"?"idle-producer":null:null;a.push({path:p,type:f.type,status:f.status??"unknown",valueSizeBytes:h,subscriberCount:w,depCount:b,isOrphanEffect:m,orphanKind:y})}let d=a.reduce((p,f)=>p+f.valueSizeBytes,0),u=(p,f)=>[...a].sort(f??((c,v)=>v[p]-c[p])).slice(0,t),l=a.filter(p=>p.orphanKind!=null),g=a.filter(p=>p.isOrphanEffect);return{nodeCount:a.length,edgeCount:n.edges.length,subgraphCount:n.subgraphs.length,nodes:a,totalValueSizeBytes:d,hotspots:{byValueSize:u("valueSizeBytes"),bySubscriberCount:u("subscriberCount"),byDepCount:u("depCount")},orphans:l,orphanEffects:g}}var qt=P(()=>{"use strict";be();Ut()});function Kt(r,e){let t=Math.max(16,r.size*4),n=0;for(;r.size>0;){if(n++>=t){console.error(`[Graph "${e}".destroy] disposer drain exceeded cap (${t}); ${r.size} disposer(s) discarded`),r.clear();return}let s=r.values().next();if(s.done)return;let o=s.value;r.delete(o);try{o()}catch(i){console.error(`[Graph "${e}".destroy] disposer threw:`,i)}}}function en(r){return r!=null&&typeof r=="object"&&"cache"in r&&typeof r.subscribe=="function"&&typeof r.down=="function"}function Rn(r){if(r!=null)return en(r)?r.cache:r}function re(r){return r!=null&&typeof r=="object"&&"cache"in r&&typeof r.subscribe=="function"&&typeof r.down=="function"}function Q(r){return re(r)?r.cache??"":r}function Yt(r){return re(r)?r.cache??0:r}function Jt(r){return re(r)?r.cache??!1:r}function Dn(r){let e=[];for(let t of Object.keys(r).sort()){let n=r[t].v;n!=null&&e.push(`${t} ${n.id} ${n.version}`)}return e.join(`
3
- `)}function Xt(r){if(r.version!==le)throw new Error(`unsupported snapshot version ${String(r.version)} (expected ${le})`);for(let e of["name","nodes","edges","subgraphs"])if(!(e in r))throw new Error(`snapshot missing required key "${e}"`);if(typeof r.name!="string")throw new TypeError("snapshot 'name' must be a string");if(typeof r.nodes!="object"||r.nodes===null||Array.isArray(r.nodes))throw new TypeError("snapshot 'nodes' must be an object");if(!Array.isArray(r.edges))throw new TypeError("snapshot 'edges' must be an array");if(!Array.isArray(r.subgraphs))throw new TypeError("snapshot 'subgraphs' must be an array")}function Cn(r,e){let t=new WeakMap,n=(s,o)=>{if(Object.is(s,o))return!0;if(s==null||o==null||typeof s!="object"||typeof o!="object")return!1;let i=t.get(s);if(i==null&&(i=new WeakSet,t.set(s,i)),i.has(o))return!0;i.add(o);let a=s.constructor,d=o.constructor;if(a!==d)return!1;if(s instanceof Date)return s.getTime()===o.getTime();if(s instanceof RegExp)return s.source===o.source&&s.flags===o.flags;if(Array.isArray(s)){let p=o;if(s.length!==p.length)return!1;for(let f=0;f<s.length;f++)if(!n(s[f],p[f]))return!1;return!0}if(s instanceof Map){let p=o;if(s.size!==p.size)return!1;for(let[f,c]of s)if(!p.has(f)||!n(c,p.get(f)))return!1;return!0}if(s instanceof Set){let p=o;if(s.size!==p.size)return!1;for(let f of s){let c=!1;for(let v of p)if(n(f,v)){c=!0;break}if(!c)return!1}return!0}if(ArrayBuffer.isView(s)){let p=s,f=o;if(p.length!==f.length)return!1;for(let c=0;c<p.length;c++)if(p[c]!==f[c])return!1;return!0}let u=Object.keys(s),l=Object.keys(o);if(u.length!==l.length)return!1;let g=new Set(l);for(let p of u)if(!g.has(p)||!n(s[p],o[p]))return!1;return!0};return n(r,e)}function Mn(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function $e(r){let e="^";for(let t=0;t<r.length;t+=1){let n=r[t];if(n==="*"){e+=".*";continue}if(n==="?"){e+=".";continue}if(n==="["){let s=r.indexOf("]",t+1);if(s<=t+1){e+="\\[";continue}let o=r.slice(t+1,s);o.startsWith("!")&&(o=`^${o.slice(1)}`),o=o.replace(/\\/g,"\\\\"),e+=`[${o}]`,t=s;continue}e+=Mn(n)}return e+="$",new RegExp(e)}function ct(r){if(typeof r=="string")return JSON.stringify(r);if(typeof r=="number"||typeof r=="boolean"||r==null)return String(r);try{return JSON.stringify(r)}catch{return"[unserializable]"}}function $n(r){return r==="none"?Pn:r==="ansi"||r==null?Gn:{data:r.data??"",dirty:r.dirty??"",resolved:r.resolved??"",invalidate:r.invalidate??"",pause:r.pause??"",resume:r.resume??"",complete:r.complete??"",error:r.error??"",teardown:r.teardown??"",derived:r.derived??"",path:r.path??"",reset:r.reset??""}}function Zt(r){if(r==null)return{};let e=r.detail;return e==="full"?{...r,structured:r.structured??!0,timeline:r.timeline??!0,causal:r.causal??!0,derived:r.derived??!0}:e==="minimal"?{...r,structured:r.structured??!0}:r.format==="stage-log"?{...r,structured:r.structured??!0,timeline:r.timeline??!0}:r}function In(r,e,t){for(let n=0;n<r.length;n++){let s=r.charCodeAt(n);if(s<32||s===127)throw new Error(`Graph "${e}": ${t} "${r}" must not contain control character (U+${s.toString(16).padStart(4,"0").toUpperCase()} at index ${n})`)}}function lt(r,e,t){if(r==="")throw new Error(`Graph "${e}": ${t} name must be non-empty`);if(r.includes(C))throw new Error(`Graph "${e}": ${t} "${r}" must not contain '${C}' (path separator)`);if(r===q)throw new Error(`Graph "${e}": ${t} name "${q}" is reserved for meta companion paths`);In(r,e,t)}function Fn(r,e){if(r==="")throw new Error(`Graph "${e}": resolve path must be non-empty`);let t=r.split(C);for(let n of t)if(n==="")throw new Error(`Graph "${e}": resolve path has empty segment`);return t}function Ln(r,e){let t=!1;for(let s of r)if(!e.isMetaPassthrough(s[0])){t=!0;break}return t?r.filter(s=>e.isMetaPassthrough(s[0])):r}function tn(r){for(let e of r._mounts.values())tn(e);for(let e of r._nodes.values())try{e.down([[j]],{internal:!0})}catch{}}function jn(r,e){let t=ve.diff(r,e),n={};for(let s of t.nodesAdded){let o=e.nodes[s];o!=null&&(n[s]=o)}return{...t,nodesAddedFull:n}}function Qt(r,e,t,n={}){let s={paths:[],depths:new Map,truncated:!1};if(!e)return n.withDetail?s:[];if(!n.both&&t!=="upstream"&&t!=="downstream")throw new Error('reachable: direction must be "upstream" or "downstream"');let o=n.maxDepth;if(o!=null&&(!Number.isInteger(o)||o<0))throw new Error("reachable: maxDepth must be an integer >= 0");if(o===0)return n.withDetail?s:[];let i=new Map,a=new Map,d=new Map,u=new Map,l=new Set;for(let[m,y]of Object.entries(r.nodes)){if(!m)continue;l.add(m);let _=y.deps??[];i.set(m,_);for(let N of _)N&&(l.add(N),a.has(N)||a.set(N,new Set),a.get(N).add(m))}for(let m of r.edges){if(m==null||typeof m!="object")continue;let y=typeof m.from=="string"?m.from:"",_=typeof m.to=="string"?m.to:"";!y||!_||(l.add(y),l.add(_),u.has(y)||u.set(y,new Set),u.get(y).add(_),d.has(_)||d.set(_,new Set),d.get(_).add(y))}if(!l.has(e))return n.withDetail?s:[];let g=n.both===!0,p=m=>{if(g){let x=i.get(m)??[],k=d.get(m),E=a.get(m),S=u.get(m),O=[...x];return k&&O.push(...k),E&&O.push(...E),S&&O.push(...S),O}if(t==="upstream"){let x=i.get(m)??[],k=d.get(m);return k?[...x,...k]:x}let y=a.get(m),_=u.get(m),N=y?[...y]:[];return _&&N.push(..._),N},f=new Set([e]),c=new Map,v=[{path:e,depth:0}],h=0,w=!1;for(;h<v.length;){let m=v[h++];if(o!=null&&m.depth>=o){p(m.path).length>0&&(w=!0);continue}for(let y of p(m.path))!y||f.has(y)||(f.add(y),c.set(y,m.depth+1),v.push({path:y,depth:m.depth+1}))}let b=[...c.keys()].sort((m,y)=>m<y?-1:m>y?1:0);return n.withDetail?{paths:b,depths:c,truncated:w}:b}function Vn(r,e){if(r.length!==e.length)return!1;for(let t=0;t<r.length;t++){let n=r[t],s=e[t];if(n.path!==s.path||n.type!==s.type||n.status!==s.status||n.hop!==s.hop||n.dep_index!==s.dep_index||n.annotation!==s.annotation||n.value!==s.value||n.lastMutation!==s.lastMutation)return!1;let o=n.v,i=s.v;if(o!==i&&(o==null||i==null||o.id!==i.id||o.version!==i.version))return!1}return!0}var C,q,le,Gn,Pn,ve,nn=P(()=>{"use strict";Ye();Je();ke();Se();he();Ct();be();ot();Gt();$t();It();Ft();Ke();Bt();qt();C="::",q="__meta__",le=1;Gn={data:"\x1B[32m",dirty:"\x1B[33m",resolved:"\x1B[36m",invalidate:"\x1B[93m",pause:"\x1B[90m",resume:"\x1B[96m",complete:"\x1B[34m",error:"\x1B[31m",teardown:"\x1B[91m",derived:"\x1B[35m",path:"\x1B[90m",reset:"\x1B[0m"},Pn={data:"",dirty:"",resolved:"",invalidate:"",pause:"",resume:"",complete:"",error:"",teardown:"",derived:"",path:"",reset:""};ve=class r{name;opts;config;_nodes=new Map;_nodeToName=new WeakMap;_mounts=new Map;_parent=void 0;_storageDisposers=new Set;_disposers=new Set;_destroyed=!1;_topology;_topologyEmitters=new Set;_factory;_factoryArgs;constructor(e,t){if(e==="")throw new Error("Graph name must be non-empty");if(e.includes(C))throw new Error(`Graph name must not contain '${C}' (got "${e}")`);if(e===q)throw new Error(`Graph name "${q}" is reserved for meta companion paths`);this.name=e,this.opts=Object.freeze({...t??{}}),this.config=t?.config??ce,this._traceRing=new ye(t?.traceCapacity??1e3),t?.versioning!=null&&this.setVersioning(t.versioning),typeof t?.factory=="string"&&(this._factory=t.factory,t.factoryArgs!==void 0&&(this._factoryArgs=t.factoryArgs))}tagFactory(e,t){return this._factory=e,this._factoryArgs=t,this}ancestors(e=!0){let t=[],n=e?this:this._parent;for(;n!=null;)t.push(n),n=n._parent;return t}get topology(){return this._topology==null&&(this._topology=rt(e=>{let t=n=>{e.emit(n)};return this._topologyEmitters.add(t),()=>{this._topologyEmitters.delete(t)}},{name:`${this.name}_topology`})),this._topology}_emitTopology(e){if(!(this._topology==null||this._topologyEmitters.size===0))for(let t of this._topologyEmitters)t(e)}nameOf(e){return this._nodeToName.get(e)}add(e,t){let n=e.name,s=t?.name??n;if(s==null||s==="")throw new Error(`Graph "${this.name}": graph.add requires a non-empty name \u2014 pass via opts.name or set it on the node (e.g. state(0, { name: "x" }))`);let o=s,i=t?.annotation;if(lt(o,this.name,"add"),this._mounts.has(o))throw new Error(`Graph "${this.name}": name "${o}" is already a mount point`);if(this._nodes.has(o))throw new Error(`Graph "${this.name}": node "${o}" already exists`);let a=this._nodeToName.get(e);if(a!==void 0)throw new Error(`Graph "${this.name}": node instance already registered as "${a}"`);return this._nodes.set(o,e),this._nodeToName.set(e,o),this._emitTopology({kind:"added",name:o,nodeKind:"node"}),i!=null&&(this._annotations.set(o,i),this.config.inspectorEnabled&&this._traceRing.push({path:o,annotation:i,timestamp_ns:X()})),e}setVersioning(e){if(e!=null)for(let t of this._nodes.values())t instanceof $&&t._applyVersioning(e)}remove(e){lt(e,this.name,"remove");let t=this._mounts.get(e);if(t){let o={kind:"mount",nodes:[],mounts:[]},i=[];t._collectObserveTargets("",i);for(let[a,d]of i)a.includes(`${C}${q}${C}`)||o.nodes.push(a);return o.nodes.sort(),o.mounts.push(e),o.mounts.push(...t._collectSubgraphs(`${e}${C}`)),this._mounts.delete(e),t._parent=void 0,tn(t),this._emitTopology({kind:"removed",name:e,nodeKind:"mount",audit:o}),o}let n=this._nodes.get(e);if(!n)throw new Error(`Graph "${this.name}": unknown node or mount "${e}"`);this._nodes.delete(e),this._nodeToName.delete(n),n.down([[j]],{internal:!0});let s={kind:"node",nodes:[e],mounts:[]};return this._emitTopology({kind:"removed",name:e,nodeKind:"node",audit:s}),s}removeAll(e){let t=typeof e=="function"?e:(()=>{let o=$e(e);return i=>o.test(i)})(),n={kind:"mount",nodes:[],mounts:[]},s=[...this._nodes.keys(),...this._mounts.keys()].filter(o=>t(o));for(let o of s){let i=this.remove(o);n.nodes.push(...i.nodes),n.mounts.push(...i.mounts)}return n.nodes.sort(),n.mounts.sort(),n}[Symbol.iterator](){let e=[...this._nodes.keys()].sort(),t=this._nodes,n=0;return{[Symbol.iterator](){return this},next(){if(n>=e.length)return{value:void 0,done:!0};let s=e[n++];return{value:[s,t.get(s)],done:!1}}}}node(e){if(e==="")throw new Error(`Graph "${this.name}": node name must be non-empty`);if(e.includes(C))return this.resolve(e);let t=this._nodes.get(e);if(!t)throw new Error(`Graph "${this.name}": unknown node "${e}"`);return t}get(e){return this.node(e).cache}set(e,t,n){let s=n?.internal===!0;this.node(e).down([[F,t]],{actor:n?.actor,internal:s,delivery:"write"})}setAll(e,t){let n=Symbol.iterator in e?e:Object.entries(e);Ot(()=>{for(let[s,o]of n)this.set(s,o,t)})}invalidate(e,t){let n=t?.internal===!0;this.node(e).down([[W]],{actor:t?.actor,internal:n,delivery:"write"})}error(e,t,n){let s=n?.internal===!0;this.node(e).down([[M,t]],{actor:n?.actor,internal:s,delivery:"write"})}complete(e,t){let n=t?.internal===!0;this.node(e).down([[H]],{actor:t?.actor,internal:n,delivery:"write"})}edges(e){let t=e?.recursive===!0,n=new Map;if(!t){for(let[d,u]of this._nodes)n.set(u,d);let a=[];for(let[d,u]of this._nodes)if(u instanceof $)for(let l of u._deps){let g=n.get(l.node);g!=null&&a.push([g,d])}return a.sort((d,u)=>d[0]<u[0]?-1:d[0]>u[0]?1:d[1]<u[1]?-1:d[1]>u[1]?1:0),a}let s=[];this._collectObserveTargets("",s);let o=new Map;for(let[a,d]of s)o.set(d,a);let i=[];for(let[a,d]of s)if(d instanceof $)for(let u of d._deps){let l=o.get(u.node);l!=null&&i.push([l,a])}return i.sort((a,d)=>a[0]<d[0]?-1:a[0]>d[0]?1:a[1]<d[1]?-1:a[1]>d[1]?1:0),i}mount(e,t){if(t===void 0){let s=new r(e);return this.mount(e,s)}if(typeof t=="function"){let s=new r(e);return t(s),this.mount(e,s)}let n=t;if(lt(e,this.name,"mount"),this._nodes.has(e))throw new Error(`Graph "${this.name}": cannot mount at "${e}" \u2014 node with that name exists`);if(this._mounts.has(e))throw new Error(`Graph "${this.name}": mount "${e}" already exists`);if(n===this)throw new Error(`Graph "${this.name}": cannot mount a graph into itself`);if(n._parent!=null)throw new Error(`Graph "${this.name}": this child graph is already mounted on "${n._parent.name}"`);for(let s=this;s!=null;s=s._parent)if(s===n)throw new Error(`Graph "${this.name}": mount("${e}", \u2026) would create a mount cycle`);return this._mounts.set(e,n),n._parent=this,this._emitTopology({kind:"added",name:e,nodeKind:"mount"}),n}resolve(e){let t=Fn(e,this.name);return this._resolveFromSegments(t)}tryResolve(e){try{return this.resolve(e)}catch{return}}_resolveFromSegments(e){let t=e;if(t[0]===this.name&&(t=t.slice(1),t.length===0))throw new Error(`Graph "${this.name}": resolve path ends at graph name only`);let n=t[0],s=t.slice(1);if(s.length===0){let a=this._nodes.get(n);if(a)return a;throw this._mounts.has(n)?new Error(`Graph "${this.name}": path ends at subgraph "${n}" \u2014 not a node (GRAPHREFLY-SPEC \xA73.5)`):new Error(`Graph "${this.name}": unknown name "${n}"`)}let o=this._nodes.get(n);if(o&&s.length>0&&s[0]===q)return this._resolveMetaChainFromNode(o,s,t.join(C));let i=this._mounts.get(n);if(!i)throw this._nodes.has(n)?new Error(`Graph "${this.name}": "${n}" is a node; trailing path "${s.join(C)}" is invalid`):new Error(`Graph "${this.name}": unknown mount or node "${n}"`);return i.resolve(s.join(C))}_resolveMetaChainFromNode(e,t,n){let s=e,o=0,i=[...t];for(;o<i.length;){if(i[o]!==q)throw new Error(`Graph "${this.name}": expected ${q} segment in meta path "${n}"`);if(o+1>=i.length)throw new Error(`Graph "${this.name}": meta path requires a key after ${q} in "${n}"`);let a=i[o+1],d=s.meta[a];if(!d)throw new Error(`Graph "${this.name}": unknown meta "${a}" in path "${n}"`);s=d,o+=2}return s}signal(e,t){if(t?.internal!==!0){for(let s of e)if(this.config.messageTier(s[0])===3)throw new Error(`Graph "${this.name}": Graph.signal() rejects tier-3 messages (DATA / RESOLVED). Broadcast is for control-plane tiers (START / DIRTY / INVALIDATE / PAUSE / RESUME / COMPLETE / ERROR / TEARDOWN). For per-node value writes, use Graph.set or graph.node(name).down(...).`)}let n=[];if(this._signalDeliver(e,t??{},new Set,n),n.length>0)throw n[0]}_signalDeliver(e,t,n,s){for(let d of this._mounts.values())d._signalDeliver(e,t,n,s);let i=t.internal===!0?{internal:!0}:{actor:t.actor,delivery:"signal"},a=Ln(e,this.config);for(let d of[...this._nodes.keys()].sort()){let u=this._nodes.get(d);if(!n.has(u)){n.add(u);try{u.down(e,i)}catch(l){if(l instanceof U)throw l;s.push(l)}a.length!==0&&this._signalMetaSubtree(u,a,n,i,s)}}}_signalMetaSubtree(e,t,n,s,o){for(let i of Object.keys(e.meta).sort()){let a=e.meta[i];if(!n.has(a)){n.add(a);try{a.down(t,s)}catch(d){if(d instanceof U)throw d;o.push(d)}this._signalMetaSubtree(a,t,n,s,o)}}}describe(e){if(e?.reactive==="diff")return this._describeReactiveDiff(e);if(e?.reactive===!0)return this._describeReactive(e);let t=Rn(e?.actor),n=e?.filter;if(e?.detail!=null&&e?.fields!=null)throw new TypeError("Graph.describe(): pass either `detail` or `fields`, not both. `detail: 'spec'` is the canonical spec projection; use `fields` only when you need a custom subset.");let s=it(e?.detail,e?.fields),o=e?.detail==="spec",i=s,a=[];this._collectObserveTargets("",a);let d=new Map;for(let[y,_]of a)d.set(_,y);let u=[];{let y=a.map(([,x])=>x),_=new Set(d.values()),N=0;for(;y.length>0;){let x=y.shift();if(x instanceof $)for(let k of x._deps){let E=k.node;if(d.has(E))continue;let S=E.name??"",O=S;if(!O||_.has(O))if(S){let L=2;for(;_.has(`${S}#${L}`);)L++;O=`${S}#${L}`}else for(O=`__internal__/${N++}`;_.has(O);)O=`__internal__/${N++}`;d.set(E,O),_.add(O),u.push([O,E]),y.push(E)}}}let l=[...a,...u],g={};for(let[y,_]of l){if(t!=null&&!_.allowsObserve(t))continue;let N=at(_,i,o),x=_ instanceof $?_._deps.map(O=>d.get(O.node)??O.node.name??""):[],{name:k,...E}=N,S={...E,deps:x};if(!o){let O=this._annotations.get(y);O!=null&&(S.annotation=O)}if(n!=null)if(typeof n=="function"){let O=n;if(!(O.length>=2?O(y,S):O(S)))continue}else{let O=!0;for(let[L,G]of Object.entries(n)){let R=L==="deps_includes"?"depsIncludes":L==="meta_has"?"metaHas":L;if(R==="depsIncludes"){if(!S.deps.includes(String(G))){O=!1;break}continue}if(R==="metaHas"){if(!Object.hasOwn(S.meta??{},String(G))){O=!1;break}continue}if(S[R]!==G){O=!1;break}}if(!O)continue}g[y]=S}let p=new Set(Object.keys(g)),f=[];for(let[y,_]of l)if(_ instanceof $)for(let N of _._deps){let x=d.get(N.node);x!=null&&f.push([x,y])}f.sort((y,_)=>y[0]<_[0]?-1:y[0]>_[0]?1:y[1]<_[1]?-1:y[1]>_[1]?1:0);let c=f.map(([y,_])=>({from:y,to:_}));(t!=null||n!=null)&&(c=c.filter(y=>p.has(y.from)&&p.has(y.to)));let v=this._collectSubgraphs(""),h=t!=null||n!=null?v.filter(y=>{let _=`${y}${C}`;return[...p].some(N=>N===y||N.startsWith(_))}):v,w=this,b=e;return{name:this.name,nodes:g,edges:c,subgraphs:h,...this._factory!==void 0?{factory:this._factory}:{},...this._factoryArgs!==void 0?{factoryArgs:this._factoryArgs}:{},expand(y){let _={...b};return Array.isArray(y)?(_.fields=y,_.detail=void 0):(_.detail=y,_.fields=void 0),w.describe(_)}}}_collectSubgraphs(e){let t=[];for(let n of[...this._mounts.keys()].sort()){let s=e===""?n:`${e}${n}`;t.push(s),t.push(...this._mounts.get(n)._collectSubgraphs(`${s}${C}`))}return t}resourceProfile(e){return Wt(this,e)}reachable(e,t,n={}){return n.withDetail===!0?Qt(this.describe(),e,t,{...n,withDetail:!0}):Qt(this.describe(),e,t,n)}explain(e,t,n){return n?.reactive===!0?this._explainReactive(e,t,n):this._explainStatic(Q(e),Q(t),{...n?.maxDepth!==void 0?{maxDepth:Yt(n.maxDepth)}:{},...n?.findCycle!==void 0?{findCycle:Jt(n.findCycle)}:{}})}_explainStatic(e,t,n){let s=this.describe({detail:"full"}),o=new Map(this._annotations),i=new Map;for(let[a,d]of Object.entries(s.nodes))d.lastMutation!=null&&i.set(a,d.lastMutation);return Lt(s,e,t,{...n?.maxDepth!=null?{maxDepth:n.maxDepth}:{},...n?.findCycle===!0?{findCycle:!0}:{},annotations:o,lastMutations:i})}_describeReactive(e){let t={...e,reactive:!1},n=e.reactiveName??"describe",s=0,o=ne(s,{name:`${n}_version`}),i=this.observe({timeline:!0,structured:!0}),a=!1,d=!1,u=()=>{a||d||(a=!0,de(()=>{a=!1,!d&&(s+=1,o.emit(s))}))},l=i.onEvent(b=>{let m=b.type;m!=="data"&&m!=="error"&&m!=="complete"&&m!=="teardown"||u()}),g=[],p=new WeakSet,f=b=>{if(p.has(b)||d)return;p.add(b);let m=b.topology.subscribe(y=>{for(let _ of y){if(_[0]!==F)continue;let N=_[1];if(u(),N.kind==="added"&&N.nodeKind==="mount"){let x=b._mounts.get(N.name);x!=null&&f(x)}}});g.push(m);for(let y of b._mounts.keys()){let _=b._mounts.get(y);_!=null&&f(_)}};f(this);let c,v=e.actor;en(v)&&(c=v.subscribe(b=>{let m=!1,y=!1;for(let _ of b){let N=_[0];N===F?m=!0:(N===H||N===M||N===j)&&(y=!0)}m&&u(),y&&(c?.(),c=void 0,u())}));let h;try{h=st([o],()=>this.describe(t),{name:n,describeKind:"derived",meta:{domain:"audit",kind:"describe"},equals:(b,m)=>b===m})}catch(b){l(),c?.();for(let m of g)m();throw i.dispose(),b}let w=De(h);return{node:h,dispose(){d=!0,l(),c?.();for(let b of g)b();g.length=0,i.dispose(),w()}}}_describeReactiveDiff(e){let t={...e,reactive:!1},n=e.reactiveName??"describe-diff",s={name:this.name,nodes:{},edges:[],subgraphs:[]},o=this.describe(t),i=dt(s,o),a=ne(i,{name:n,meta:{domain:"audit",kind:"describe-diff"},equals:(p,f)=>p===f}),d=this._describeReactive({...e,reactiveName:void 0}),u=!1,l=d.node.subscribe(p=>{if(!u)for(let f of p){if(f[0]!==F)continue;let c=f[1],v=dt(o,c);o=c,v.events.length!==0&&a.emit(v)}}),g=De(a);return{node:a,dispose(){u=!0,l(),d.dispose(),a.down([[j,"describe-diff disposed"]]),g()}}}_explainReactive(e,t,n){let s=0,o=ne(s,{name:"explain_version"}),i=this.observe({timeline:!0,structured:!0}),a=!1,d=!1,u=()=>{a||d||(a=!0,de(()=>{a=!1,!d&&(s+=1,o.emit(s))}))},l=i.onEvent(b=>{let m=b.type;m!=="data"&&m!=="error"&&m!=="complete"&&m!=="teardown"||u()}),g=[];e!=null&&re(e)&&g.push(e),t!=null&&re(t)&&g.push(t),n?.maxDepth!=null&&re(n.maxDepth)&&g.push(n.maxDepth),n?.findCycle!=null&&re(n.findCycle)&&g.push(n.findCycle);let p=()=>{for(let b of g)if(b.cache===void 0)return!1;return!0},f=()=>{let b=Q(e),m=Q(t);return{from:b,to:m,found:!1,reason:"pending",steps:[],text:"(awaiting reactive args)",toJSON:()=>({from:b,to:m,found:!1,reason:"pending",steps:[]})}},c;try{c=st([o],()=>{if(!p())return f();let b=Q(e),m=Q(t),y={...n?.maxDepth!==void 0?{maxDepth:Yt(n.maxDepth)}:{},...n?.findCycle!==void 0?{findCycle:Jt(n.findCycle)}:{}};return this._explainStatic(b,m,y)},{name:n?.name??"explain",describeKind:"derived",meta:{domain:"audit",kind:"explain_path",from:Q(e),to:Q(t)},equals:(b,m)=>b.found===m.found&&b.reason===m.reason&&b.steps.length===m.steps.length&&Vn(b.steps,m.steps)})}catch(b){throw l(),i.dispose(),b}let v=De(c),h=[],w=b=>{let m;return m=b.subscribe(y=>{let _=!1,N=!1;for(let x of y){let k=x[0];k===F?_=!0:(k===H||k===M||k===j)&&(N=!0)}(_||N)&&u(),N&&m&&(m(),m=void 0)}),()=>{m&&(m(),m=void 0)}};for(let b of g)h.push(w(b));return{node:c,dispose(){d=!0,l();for(let b of h)b?.();h.length=0,i.dispose(),v()}}}_pathsMatching(e){let t=$e(e),n=[];return this._collectObserveTargets("",n),n.map(([s])=>s).filter(s=>t.test(s))}_collectObserveTargets(e,t){for(let n of[...this._mounts.keys()].sort()){let s=e===""?n:`${e}${C}${n}`;this._mounts.get(n)._collectObserveTargets(s,t)}for(let n of[...this._nodes.keys()].sort()){let s=this._nodes.get(n),o=e===""?n:`${e}${C}${n}`;t.push([o,s]),this._appendMetaObserveTargets(o,s,t)}}_appendMetaObserveTargets(e,t,n){for(let s of Object.keys(t.meta).sort()){let o=t.meta[s],i=`${e}${C}${q}${C}${s}`;n.push([i,o]),this._appendMetaObserveTargets(i,o,n)}}observe(e,t){let n=typeof e=="string",o=Zt(n?t:e);if(o.reactive===!0)return this._observeReactive(n?e:void 0,o);let i=o.structured===!0||o.timeline===!0||o.causal===!0||o.derived===!0||o.detail==="minimal"||o.detail==="full"||o.format!=null,a=o.actor;if(n){let l=e,g=this.resolve(l);if(a!=null&&!g.allowsObserve(a))throw new U({actor:a,action:"observe",nodeName:l});return i?this._buildStructuredObserver([[l,g]],o,"one"):{subscribe(p){return g.subscribe(p)},up(p){try{g.up?.(p)}catch(f){if(f instanceof U)return;throw f}}}}let d=[];this._collectObserveTargets("",d),d.sort((l,g)=>l[0]<g[0]?-1:l[0]>g[0]?1:0);let u=a==null?d:d.filter(([,l])=>l.allowsObserve(a));return i?this._buildStructuredObserver(u,o,"all"):{subscribe:l=>{let g=u.map(([p,f])=>f.subscribe(c=>{l(p,c)}));return()=>{for(let p of g)p()}},up:(l,g)=>{try{this.resolve(l).up?.(g)}catch(p){if(p instanceof U)return;throw p}}}}_observeReactive(e,t){let n=t.tiers,s=n!=null?new Set(n):null,o=t.reactiveName??"observe";return rt(i=>{let a=[],d=!1,u=!1,l=()=>{if(a.length===0||u)return;let v={events:a.slice(),flushedAt_ns:X()};a.length=0,i.emit(v)},g={...t,reactive:!1,structured:!0,timeline:!0},p=e!=null?this.observe(e,g):this.observe(g),f=v=>{u||(a.push(v),!d&&(d=!0,de(()=>{d=!1,l()})))};for(let v of p.events)f(v);let c=p.onEvent(f);return()=>{u=!0,c(),p.dispose()}},{name:o,meta:{domain:"audit",kind:"observe-reactive"}})}_buildStructuredObserver(e,t,n){let s=n==="one"?e[0]?.[0]:void 0,o=i=>{if(n==="one"&&s!=null){let l=this.resolve(s);return this._buildStructuredObserver([[s,l]],i,"one")}let a=[];this._collectObserveTargets("",a),a.sort((l,g)=>l[0]<g[0]?-1:l[0]>g[0]?1:0);let d=i.actor,u=d==null?a:a.filter(([,l])=>l.allowsObserve(d));return this._buildStructuredObserver(u,i,"all")};return this._createObserveResult(e,t,o)}_createObserveResult(e,t,n){let s=t.timeline===!0,o=t.causal===!0,i=t.derived===!0,a=t.detail==="minimal",d=this.config.inspectorEnabled,u=(o||i)&&d,l=t.maxEvents,g=l!=null&&l>0?new ye(l):null,p=[],f=new Set,c=t.tiers!=null?new Set(t.tiers):null,v={},h=new Set,w=0,b=0,m=0,y=0,_=0,N=0,x=!1,k=!1,E=0,S=new Map,O=new Map,L=new Map,G=T=>{if(!(c!=null&&!c.has(T.type))){g?g.push(T):p.push(T);for(let D of f)D(T)}},R=T=>c==null||c.has(T),se=()=>s?{timestamp_ns:X(),in_batch:Oe(),batch_id:E}:{},Ie=(T,D)=>{if(!(!u||!(T instanceof $)))return T._setInspectorHook(B=>{if(B.kind==="dep_message")S.set(T,B.depIndex);else if(B.kind==="run"){let fe=B.batchData.map((A,V)=>A!=null&&A.length>0?A.at(-1):B.prevData[V]);O.set(T,fe);let z=B.batchData.map(A=>A!=null?[...A]:void 0);L.set(T,z),i&&G({type:"derived",path:D,dep_values:fe,dep_batches:z,...se()})}})},_e=T=>{let D=S.get(T),B=O.get(T);if(!o||B==null)return{};let z=(D!=null&&D>=0&&T instanceof $?T._deps[D]:void 0)?.node,A=z?.v,V=L.get(T);return{trigger_dep_index:D,trigger_dep_name:z?.name,...A!=null?{trigger_version:{id:A.id,version:A.version}}:{},dep_values:[...B],...V!=null?{dep_batches:V}:{}}},ft=[],pt=[];for(let[T,D]of e){let B=Ie(D,T);B&&ft.push(B),pt.push(D.subscribe(fe=>{E++;for(let z of fe){let A=z[0],V=se();if(A===F){v[T]=z[1];let Ve=D instanceof $?D.lastMutation?.actor??ie:ie;G({type:"data",path:T,data:z[1],actor:Ve,...V,..._e(D)})}else if(a)A===K?R("dirty")&&w++:A===Y?R("resolved")&&b++:A===W?R("invalidate")&&m++:A===J?R("pause")&&y++:A===Z?R("resume")&&_++:A===j?R("teardown")&&N++:A===H&&!h.has(T)?R("complete")&&(x=!0):A===M&&R("error")&&(k=!0,h.add(T));else if(A===K)R("dirty")&&w++,G({type:"dirty",path:T,...V});else if(A===Y)R("resolved")&&b++,G({type:"resolved",path:T,...V,..._e(D)});else if(A===W)R("invalidate")&&m++,G({type:"invalidate",path:T,...V});else if(A===J)R("pause")&&y++,G({type:"pause",path:T,lockId:z[1],...V});else if(A===Z)R("resume")&&_++,G({type:"resume",path:T,lockId:z[1],...V});else if(A===H)R("complete")&&!h.has(T)&&(x=!0),G({type:"complete",path:T,...V});else if(A===M){R("error")&&(k=!0,h.add(T));let Ve=D instanceof $?D.lastMutation?.actor??ie:ie;G({type:"error",path:T,data:z[1],actor:Ve,...V})}else A===j&&(R("teardown")&&N++,G({type:"teardown",path:T,...V}))}}))}let Fe=!1,Le=()=>{if(!Fe){Fe=!0;for(let T of pt)T();for(let T of ft)T();for(let T of we)T({value:void 0,done:!0});we.length=0}},je=[],we=[];f.add(T=>{let D=we.shift();D?D({value:T,done:!1}):je.push(T)});let ht={get values(){return v},get dirtyCount(){return w},get resolvedCount(){return b},get invalidateCount(){return m},get pauseCount(){return y},get resumeCount(){return _},get teardownCount(){return N},get events(){return g?g.toArray():[...p]},get anyCompletedCleanly(){return x},get anyErrored(){return k},get completedWithoutErrors(){return x&&!k},onEvent(T){return f.add(T),()=>f.delete(T)},dispose:Le,expand(T){Le();let D={...t};return typeof T=="string"?D.detail=T:Object.assign(D,T),n(Zt(D))},[Symbol.asyncIterator](){return{next(){return je.length>0?Promise.resolve({value:je.shift(),done:!1}):Fe?Promise.resolve({value:void 0,done:!0}):new Promise(T=>we.push(T))},return(){return Le(),Promise.resolve({value:void 0,done:!0})}}}};return t.format!=null&&this._attachFormatLogger(ht,t),ht}_attachFormatLogger(e,t){let n=t.format;if(n==null)return;let s=t.logger??(c=>console.log(c)),o=t.includeTypes?new Set(t.includeTypes):null,i=t.excludeTypes?new Set(t.excludeTypes):null,a=o==null&&i==null?()=>!0:c=>(o==null||o.has(c))&&(i==null||!i.has(c)),d=$n(t.theme),u=n==="stage-log"?X():0,l=c=>c==null?"":t.stageLabels?.[c]??c,g=(c,v)=>c.length>v?`${c.slice(0,v-1)}\u2026`:c,p=c=>c.type==="data"||c.type==="error"?g(ct(c.data),120):"",f=c=>{if(n==="stage-log"){let x=(X()-u)/1e9,k=l(c.path).padEnd(9);if(c.type==="data"){let E=p(c);return`[${x.toFixed(3)}s] ${k} \u2190${E?` ${E}`:""}`}if(c.type==="error"){let E=p(c);return`[${x.toFixed(3)}s] ${k} \u2717${E?` ${E}`:""}`}return c.type==="complete"?`[${x.toFixed(3)}s] ${k} \u25A0 complete`:`[${x.toFixed(3)}s] ${k} ${c.type}`}if(n==="json")try{return JSON.stringify(c)}catch{return JSON.stringify({type:c.type,path:c.path,data:"[unserializable]"})}let v=d[c.type]??"",h=c.path?`${d.path}${c.path}${d.reset} `:"",w=c.type==="data"||c.type==="error",b=c.type==="pause"||c.type==="resume",m=w?` ${ct(c.data)}`:b?` ${ct(c.lockId)}`:"",y=c.type==="data"||c.type==="resolved"||c.type==="derived"?c:void 0,_=y?.trigger_dep_name!=null?` <- ${y.trigger_dep_name}`:y?.trigger_dep_index!=null?` <- #${y.trigger_dep_index}`:"",N=c.in_batch?" [batch]":"";return`${h}${v}${c.type.toUpperCase()}${d.reset}${m}${_}${N}`};e.onEvent(c=>{a(c.type)&&s(f(c),c)})}addDisposer(e){return this._disposers.add(e),()=>{this._disposers.delete(e)}}destroy(){Kt(this._disposers,this.name),this.signal([[j]],{internal:!0}),Kt(this._storageDisposers,this.name);for(let e of[...this._mounts.values()])e._parent=void 0,e._destroyClearOnly();this._mounts.clear(),this._nodes.clear(),this._parent=void 0,this._destroyed=!0}get destroyed(){return this._destroyed}_destroyClearOnly(){for(let e of[...this._mounts.values()])e._parent=void 0,e._destroyClearOnly();this._mounts.clear(),this._nodes.clear(),this._parent=void 0,this._destroyed=!0}snapshot(e){let{expand:t,...n}=this.describe({detail:"full"}),s={};for(let a of Object.keys(n.nodes).sort()){let{lastMutation:d,guard:u,...l}=n.nodes[a];s[a]=l}let o=[...n.subgraphs].sort(),i={...n,version:1,nodes:s,subgraphs:o};if(e?.format==null)return i;if(e.format==="json-string")return JSON.stringify(i);if(e.format==="bytes"){if(e.codec==null)throw new Error("snapshot({format: 'bytes'}) requires a `codec` name");let a=this.config.lookupCodec(e.codec);if(a==null)throw new Error(`snapshot: codec "${e.codec}" is not registered on this graph's config. Call config.registerCodec(...) before creating nodes.`);return vt(a,a.encode(i))}throw new Error(`snapshot: unknown format "${String(e.format)}"`)}static decode(e,t){let n=t?.config??ce,{codec:s,codecVersion:o,payload:i}=_t(e,n);return s.decode(i,o)}restore(e,t){if(Xt(e),e.name!==this.name)throw new Error(`Graph "${this.name}": restore snapshot name "${e.name}" does not match this graph`);let n=t?.only==null?null:(Array.isArray(t.only)?t.only:[t.only]).map(o=>$e(o)),s=t?.includeProducers===!0;for(let o of Object.keys(e.nodes).sort()){if(n!==null&&!n.some(a=>a.test(o)))continue;let i=e.nodes[o];if(i!==void 0){if(!("value"in i)||i.value===void 0){"value"in i&&i.value===void 0&&t?.onError?.(o,new Error(`restore: slice.value is undefined for "${o}" (undefined is the global SENTINEL; not valid DATA)`));continue}if(!(i.type==="derived"||i.type==="effect")&&!(i.type==="producer"&&!s)){if(i.v!=null){let d=this.tryResolve(o)?.v;if(d!=null&&d.id===i.v.id&&d.version===i.v.version)continue}try{this.set(o,i.value)}catch(a){t?.onError?.(o,a)}}}}}static fromSnapshot(e,t){Xt(e);let n=typeof t=="function"?t:t?.build,s=typeof t=="function"?void 0:t?.factories,o=new r(e.name);if(n)return n(o),o.restore(e),o;for(let f of[...e.subgraphs].sort((c,v)=>{let h=c.split(C).length,w=v.split(C).length;return h!==w?h-w:c<v?-1:c>v?1:0})){let c=f.split(C),v=o;for(let h of c)v._mounts.has(h)||v.mount(h,new r(h)),v=v._mounts.get(h)}let i=s?Object.entries(s).map(([f,c])=>({re:$e(f),factory:c})):[],a=f=>{for(let c of i)if(c.re.test(f))return c.factory},d=f=>{let c=f.split(C),v=c.pop();if(v==null||v.length===0)throw new Error(`invalid snapshot path "${f}"`);let h=o;for(let w of c){let b=h._mounts.get(w);if(!b)throw new Error(`unknown mount "${w}" in path "${f}"`);h=b}return[h,v]},u=Object.entries(e.nodes).filter(([f])=>!f.includes(`${C}${q}${C}`)).sort((f,c)=>f[0]<c[0]?-1:f[0]>c[0]?1:0),l=new Map(u),g=new Map,p=!0;for(;l.size>0&&p;){p=!1;for(let[f,c]of[...l.entries()]){let v=c?.deps??[];if(!v.every(_=>g.has(_)))continue;let[h,w]=d(f),b={...c?.meta??{}},m=a(f),y;if(c?.type==="state")y=ne(c.value,{meta:b});else{if(m==null)continue;y=m(w,{path:f,type:c.type,value:c.value,meta:b,deps:v,resolvedDeps:v.map(_=>g.get(_))})}h.add(y,{name:w}),g.set(f,y),l.delete(f),p=!0}}if(l.size>0){let f=[...l.keys()].sort().join(", ");throw new Error(`Graph.fromSnapshot could not reconstruct nodes without build callback: ${f}. Pass matching factories via fromSnapshot(data, { factories: { pattern: factoryFn } }).`)}return o.restore(e),o}toJSON(){return this.snapshot()}attachSnapshotStorage(e,t={}){let n=e.map(u=>({tier:u,debounceMs:Math.max(0,u.debounceMs??0),compactEvery:Math.max(1,u.compactEvery??10),timer:void 0,seq:0,lastSnapshot:void 0,lastFingerprint:"",disposed:!1,savePending:void 0}));t.autoRestore===!0&&this._cascadeRestore(e,t.onError);let s=(u,l)=>{if(u.disposed)return;let g=Dn(l.nodes);if(u.lastSnapshot!=null&&g!==""&&g===u.lastFingerprint)return;let p=u.seq+1,f=xe(),h=u.lastSnapshot==null||p%u.compactEvery===0?{name:this.name,mode:"full",snapshot:l,seq:p,timestamp_ns:f,format_version:le}:{name:this.name,mode:"diff",diff:jn(u.lastSnapshot,l),seq:p,timestamp_ns:f,format_version:le};if(u.tier.filter&&!u.tier.filter(h))return;let w;try{w=u.tier.save(h)}catch(b){t.onError?.(b,u.tier);return}if(w&&typeof w.then=="function"){let y=(u.savePending??Promise.resolve()).then(()=>w,()=>w).then(()=>{u.disposed||(u.seq=p,u.lastSnapshot=l,u.lastFingerprint=g)},_=>{t.onError?.(_,u.tier)});u.savePending=y.finally(()=>{u.savePending===y&&(u.savePending=void 0)})}else u.seq=p,u.lastSnapshot=l,u.lastFingerprint=g},o=(u,l)=>{try{s(u,l)}catch(g){t.onError?.(g,u.tier)}},i=(u,l)=>{if(!l.some(c=>{let v=this.config.messageTier(c[0]);return v>=3&&v<5}))return;if(t.filter){let c=this.tryResolve(u);if(c==null)return;let v=at(c,it("standard"));if(!t.filter(u,v))return}let p,f=()=>(p==null&&(p=this.snapshot()),p);for(let c of n)c.disposed||(c.debounceMs===0?o(c,f()):(c.timer==null&&(c.timer=new Ce),c.timer.start(c.debounceMs,()=>{c.disposed||o(c,this.snapshot())})))},a;if(t.paths!=null){let l=(typeof t.paths=="string"?this._pathsMatching(t.paths):t.paths).map(g=>{let p=this.tryResolve(g);return p==null?()=>{}:p.subscribe(f=>i(g,f))});a=()=>{for(let g of l)g()}}else a=this.observe().subscribe((u,l)=>i(u,l));let d=()=>{a();for(let u of n)u.disposed=!0,u.timer?.cancel();this._storageDisposers.delete(d)};return this._storageDisposers.add(d),{dispose:d}}async _cascadeRestore(e,t){for(let n of e){let s;try{s=await n.load?.()}catch(i){t?.(i,n);continue}if(s==null||typeof s!="object"||Array.isArray(s))continue;let o=s;try{if(o.mode==="full"&&o.snapshot!=null)return this.restore(o.snapshot),!0;if(o.version===le&&o.nodes!=null)return this.restore(o),!0}catch(i){t?.(i,n)}}return!1}static async fromStorage(e,t,n){for(let s of t){let o;try{o=await s.load?.()}catch(d){n?.onError?.(d,s);continue}if(o==null||typeof o!="object"||Array.isArray(o))continue;let i=o,a=i.mode==="full"&&i.snapshot!=null?i.snapshot:i.version===le&&i.nodes!=null?i:void 0;if(a!=null)try{return r.fromSnapshot(a,n)}catch(d){n?.onError?.(d,s)}}throw new Error(`Graph.fromStorage: no tier held a restorable record for "${e}" across ${t.length} tier(s)`)}_annotations=new Map;_traceRing;trace(e,t,n){if(e!=null&&t!=null){if(this.tryResolve(e)==null)return;if(this._annotations.set(e,t),this.config.inspectorEnabled){let s={path:e,annotation:t,timestamp_ns:X(),...n?.actor!=null?{actor:n.actor}:{}};this._traceRing.push(s)}return}return e!=null?this.config.inspectorEnabled?this._annotations.get(e):void 0:this.config.inspectorEnabled?this._traceRing.toArray():[]}annotation(e){return this._annotations.get(e)}clearTrace(){this._annotations.clear(),this._traceRing.clear()}pruneTrace(e){let t=this._traceRing.toArray().filter(s=>!e(s)),n=this._traceRing.size-t.length;this._traceRing.clear();for(let s of t)this._traceRing.push(s);return n}static diff(e,t){let n=new Set(Object.keys(e.nodes)),s=new Set(Object.keys(t.nodes)),o=[...s].filter(b=>!n.has(b)).sort(),i=[...n].filter(b=>!s.has(b)).sort(),a=[],d=[];for(let b of n){if(!s.has(b))continue;let m=e.nodes[b],y=t.nodes[b],_=m.v,N=y.v;_!=null&&N!=null&&_.id===N.id&&_.version!==N.version&&d.push({path:b,id:_.id,from:_.version,to:N.version});let x=_!=null&&N!=null&&_.id===N.id&&_.version===N.version;for(let k of["type","status","sentinel"]){let E=m[k],S=y[k];E!==S&&a.push({path:b,field:k,from:E,to:S})}if(!x)for(let k of["value","meta"]){let E=m[k],S=y[k];Cn(E,S)||a.push({path:b,field:k,from:E,to:S})}}let u=b=>`${b.from} ${b.to}`,l=new Set(e.edges.map(u)),g=new Set(t.edges.map(u)),p=t.edges.filter(b=>!l.has(u(b))),f=e.edges.filter(b=>!g.has(u(b))),c=new Set(e.subgraphs),v=new Set(t.subgraphs),h=[...v].filter(b=>!c.has(b)).sort(),w=[...c].filter(b=>!v.has(b)).sort();return{nodesAdded:o,nodesRemoved:i,nodesChanged:a,versionChanges:d,edgesAdded:p,edgesRemoved:f,subgraphsAdded:h,subgraphsRemoved:w}}}});var zn={};an(zn,{create:()=>Bn});module.exports=dn(zn);he();ot();nn();var Hn=()=>!1;function Bn(r){let e=new ve("zustand"),t=ne(void 0,{name:"state",equals:Hn});e.add(t,{name:"state"});let n=()=>t.cache,s=(a,d)=>{let u=t.cache,l=typeof a=="function"?a(u):a;t.emit(d?l:{...u,...l})},o={getState:n,setState:s,getInitialState:()=>i,subscribe:a=>{let d=!0,u=t.cache;return t.subscribe(l=>{for(let[g,p]of l)if(g===F){if(d){d=!1;continue}a(p,u),u=p}})},destroy:e.destroy.bind(e)},i=r(s,n,o);return t.emit(i),Object.assign(e,o)}0&&(module.exports={create});
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+
17
+ // src/compat/zustand/index.ts
18
+ var zustand_exports = {};
19
+ module.exports = __toCommonJS(zustand_exports);
20
+ __reExport(zustand_exports, require("@graphrefly/pure-ts/compat/zustand"), module.exports);
21
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/compat/zustand/index.ts"],"sourcesContent":["// Phase 13.9.A shim — re-export from pure-TS sibling until\n// @graphrefly/native (napi binding) and per-milestone swap-overs land.\nexport * from \"@graphrefly/pure-ts/compat/zustand\";\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAEA,4BAAc,+CAFd;","names":[]}
@@ -1,6 +1 @@
1
- import '../../graph-C4SHb3Ly.cjs';
2
- export { S as StateCreator, a as StoreApi, c as create } from '../../index-f5IivDUX.cjs';
3
- import '../../node-ClS5yC-B.cjs';
4
- import '../../meta-vE8bxW1E.cjs';
5
- import '../../extra/storage-core.cjs';
6
- import '../../extra/storage-tiers.cjs';
1
+ export * from '@graphrefly/pure-ts/compat/zustand';
@@ -1,6 +1 @@
1
- import '../../graph-7VguS7a4.js';
2
- export { S as StateCreator, a as StoreApi, c as create } from '../../index-C7O6r5fV.js';
3
- import '../../node-ClS5yC-B.js';
4
- import '../../meta-BgVAsg9j.js';
5
- import '../../extra/storage-core.js';
6
- import '../../extra/storage-tiers.js';
1
+ export * from '@graphrefly/pure-ts/compat/zustand';
@@ -1 +1,3 @@
1
- import{a}from"../../chunk-TPKQW72B.js";import"../../chunk-626TESAC.js";import"../../chunk-ESMPEKEV.js";import"../../chunk-35JTVPOX.js";import"../../chunk-V5A7M7RJ.js";import"../../chunk-LYCLF26R.js";import"../../chunk-CK2E7BTU.js";import"../../chunk-QYADASLV.js";export{a as create};
1
+ // src/compat/zustand/index.ts
2
+ export * from "@graphrefly/pure-ts/compat/zustand";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/compat/zustand/index.ts"],"sourcesContent":["// Phase 13.9.A shim — re-export from pure-TS sibling until\n// @graphrefly/native (napi binding) and per-milestone swap-overs land.\nexport * from \"@graphrefly/pure-ts/compat/zustand\";\n"],"mappings":";AAEA,cAAc;","names":[]}
@@ -1 +1,21 @@
1
- "use strict";var _e=Object.defineProperty;var Xe=Object.getOwnPropertyDescriptor;var Ze=Object.getOwnPropertyNames;var Qe=Object.prototype.hasOwnProperty;var et=(n,e)=>{for(var t in e)_e(n,t,{get:e[t],enumerable:!0})},tt=(n,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Ze(e))!Qe.call(n,r)&&r!==t&&_e(n,r,{get:()=>e[r],enumerable:!(s=Xe(e,r))||s.enumerable});return n};var nt=n=>tt(_e({},"__esModule",{value:!0}),n);var gt={};et(gt,{COMPLETE:()=>k,COMPLETE_MSG:()=>be,COMPLETE_ONLY_BATCH:()=>ce,DATA:()=>y,DEFAULT_ACTOR:()=>ke,DIRTY:()=>w,DIRTY_MSG:()=>R,DIRTY_ONLY_BATCH:()=>Z,ERROR:()=>p,GraphReFlyConfig:()=>W,GuardDenied:()=>F,INVALIDATE:()=>T,INVALIDATE_MSG:()=>ye,INVALIDATE_ONLY_BATCH:()=>de,NodeImpl:()=>V,PAUSE:()=>N,RESOLVED:()=>x,RESOLVED_MSG:()=>J,RESOLVED_ONLY_BATCH:()=>ae,RESUME:()=>I,START:()=>C,START_MSG:()=>X,TEARDOWN:()=>v,TEARDOWN_MSG:()=>me,TEARDOWN_ONLY_BATCH:()=>Q,accessHintForGuard:()=>at,advanceVersion:()=>ue,autoTrackNode:()=>Ye,batch:()=>Me,configure:()=>He,createVersioning:()=>te,defaultConfig:()=>G,defaultHash:()=>ee,derived:()=>Ne,downWithBatch:()=>U,dynamicNode:()=>$e,effect:()=>ze,factoryTag:()=>We,isBatching:()=>oe,isV1:()=>Ce,monotonicNs:()=>Re,node:()=>H,normalizeActor:()=>Y,pipe:()=>qe,placeholderArgs:()=>Pe,policy:()=>De,policyFromRules:()=>ot,producer:()=>je,registerBuiltins:()=>le,resolveDescribeFields:()=>Le,state:()=>Be,wallClockNs:()=>ie});module.exports=nt(gt);var ke={type:"system",id:""};function Y(n){if(n==null)return ke;let{type:e,id:t,...s}=n;return{type:e??"system",id:t??"",...s}}var L=0,q=!1,D=[],O=[],P=[],K=[];function oe(){return L>0||q}function Ae(){return L>0}function Ee(n){L>0?K.push(n):n()}function Me(n){L+=1;let e=!1;try{n()}catch(t){throw e=!0,t}finally{if(L-=1,L===0)if(e){if(!q){let t=K.splice(0);for(let s of t)try{s()}catch{}D.length=0,O.length=0,P.length=0}}else st()}}function st(){let n=!q;n&&(q=!0);let e=[],t=0;try{for(;D.length>0||O.length>0||P.length>0||n&&K.length>0;){if(n&&K.length>0){let i=K.splice(0);for(let a of i)try{a()}catch(o){e.push(o)}continue}if(t+=1,t>1e3)throw D.length=0,O.length=0,P.length=0,new Error("batch drain exceeded 1000 iterations \u2014 likely a reactive cycle");let r=(D.length>0?D:O.length>0?O:P).splice(0);for(let i of r)try{i()}catch(a){e.push(a)}}}finally{n&&(q=!1)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"batch drain: multiple callbacks threw")}function U(n,e,t){if(e.length===0)return;if(e.length===1){let c=t(e[0][0]);if(c<3||!oe()){n(e);return}(c>=5?P:c===4?O:D).push(()=>n(e));return}let s=e.length,r=s,i=s,a=s,o=0;for(;o<s&&t(e[o][0])<3;)o++;for(r=o;o<s&&t(e[o][0])===3;)o++;for(i=o;o<s&&t(e[o][0])===4;)o++;a=o;let d=oe();if(r>0){let c=e.slice(0,r);n(c)}if(i>r){let c=e.slice(r,i);d?D.push(()=>n(c)):n(c)}if(a>i){let c=e.slice(i,a);d?O.push(()=>n(c)):n(c)}if(s>a){let c=e.slice(a,s);d?P.push(()=>n(c)):n(c)}}function Re(){return Math.trunc(performance.now()*1e6)}function ie(){return Date.now()*1e6}var C=Symbol.for("graphrefly/START"),y=Symbol.for("graphrefly/DATA"),w=Symbol.for("graphrefly/DIRTY"),x=Symbol.for("graphrefly/RESOLVED"),T=Symbol.for("graphrefly/INVALIDATE"),N=Symbol.for("graphrefly/PAUSE"),I=Symbol.for("graphrefly/RESUME"),v=Symbol.for("graphrefly/TEARDOWN"),k=Symbol.for("graphrefly/COMPLETE"),p=Symbol.for("graphrefly/ERROR"),R=Object.freeze([w]),J=Object.freeze([x]),ye=Object.freeze([T]),X=Object.freeze([C]),be=Object.freeze([k]),me=Object.freeze([v]),Z=Object.freeze([R]),ae=Object.freeze([J]),de=Object.freeze([ye]),ce=Object.freeze([be]),Q=Object.freeze([me]);var W=class{_messageTypes=new Map;_codecs=new Map;_onMessage;_onSubscribe;_defaultVersioning;_defaultHashFn;_inspectorEnabled=!(typeof process<"u"&&process.env?.NODE_ENV==="production");_globalInspector;_rigorRecorder;_frozen=!1;tierOf;constructor(e){this._onMessage=e.onMessage,this._onSubscribe=e.onSubscribe,this._defaultVersioning=e.defaultVersioning,this._defaultHashFn=e.defaultHashFn,this.tierOf=t=>{let s=this._messageTypes.get(t);return s!=null?s.tier:1}}get onMessage(){return this._frozen=!0,this._onMessage}get onSubscribe(){return this._frozen=!0,this._onSubscribe}set onMessage(e){this._assertUnfrozen(),this._onMessage=e}set onSubscribe(e){this._assertUnfrozen(),this._onSubscribe=e}get defaultVersioning(){return this._defaultVersioning}set defaultVersioning(e){this._assertUnfrozen(),this._defaultVersioning=e}get defaultHashFn(){return this._defaultHashFn}set defaultHashFn(e){this._assertUnfrozen(),this._defaultHashFn=e}get inspectorEnabled(){return this._inspectorEnabled}set inspectorEnabled(e){this._inspectorEnabled=e}get globalInspector(){return this._globalInspector}set globalInspector(e){this._globalInspector=e}get rigorRecorder(){return this._rigorRecorder}set rigorRecorder(e){this._rigorRecorder=e}registerMessageType(e,t){return this._assertUnfrozen(),this._messageTypes.set(e,{tier:t.tier,wireCrossing:t.wireCrossing??t.tier>=3,metaPassthrough:t.metaPassthrough??!0}),this}messageTier(e){let t=this._messageTypes.get(e);return t!=null?t.tier:1}isWireCrossing(e){let t=this._messageTypes.get(e);return t!=null?t.wireCrossing:!0}isLocalOnly(e){return!this.isWireCrossing(e)}isMetaPassthrough(e){let t=this._messageTypes.get(e);return t!=null?t.metaPassthrough:!0}isKnownMessageType(e){return this._messageTypes.has(e)}registerCodec(e){return this._assertUnfrozen(),this._codecs.set(e.name,e),this}lookupCodec(e){return this._codecs.get(e)}_isFrozen(){return this._frozen}_assertUnfrozen(){if(this._frozen)throw new Error("GraphReFlyConfig is frozen: a node has already captured this config. Register custom types and set hooks before creating any node.")}};function le(n){n.registerMessageType(C,{tier:0,wireCrossing:!1}),n.registerMessageType(w,{tier:1,wireCrossing:!1}),n.registerMessageType(T,{tier:1,wireCrossing:!1,metaPassthrough:!1}),n.registerMessageType(N,{tier:2,wireCrossing:!1}),n.registerMessageType(I,{tier:2,wireCrossing:!1}),n.registerMessageType(y,{tier:3,wireCrossing:!0}),n.registerMessageType(x,{tier:3,wireCrossing:!0}),n.registerMessageType(k,{tier:4,wireCrossing:!0,metaPassthrough:!1}),n.registerMessageType(p,{tier:4,wireCrossing:!0,metaPassthrough:!1}),n.registerMessageType(v,{tier:5,wireCrossing:!0,metaPassthrough:!1})}var F=class extends Error{actor;action;nodeName;constructor(e,t){super(t??`GuardDenied: action "${String(e.action)}" denied for actor type "${String(e.actor.type)}"`),this.name="GuardDenied",this.actor=e.actor,this.action=e.action,this.nodeName=e.nodeName}get node(){return this.nodeName}};function Se(n){return Array.isArray(n)?[...n]:[n]}function rt(n,e){return n.has(e)||n.has("*")}function De(n){let e=[];return n((r,i)=>{e.push({kind:"allow",actions:new Set(Se(r)),where:i?.where??(()=>!0)})},(r,i)=>{e.push({kind:"deny",actions:new Set(Se(r)),where:i?.where??(()=>!0)})}),(r,i)=>{let a=!1,o=!1;for(let d of e)rt(d.actions,i)&&d.where(r)&&(d.kind==="deny"?a=!0:o=!0);return a?!1:o}}function ot(n){return De((e,t)=>{for(let s of n){let r=s.actorType==null?null:new Set(Array.isArray(s.actorType)?s.actorType:[s.actorType]),i=s.actorId==null?null:new Set(Array.isArray(s.actorId)?s.actorId:[s.actorId]),a=Object.entries(s.claims??{}),o=d=>{if(r!==null&&!r.has(String(d.type))||i!==null&&!i.has(String(d.id??"")))return!1;for(let[c,l]of a)if(d[c]!==l)return!1;return!0};s.effect==="deny"?t(s.action,{where:o}):e(s.action,{where:o})}})}var it=["human","llm","wallet","system"];function at(n){let e=it.filter(t=>n({type:t,id:""},"write"));return e.length===0?"restricted":e.includes("human")&&e.includes("llm")&&e.every(t=>t==="human"||t==="llm"||t==="system")?"both":e.length===1?e[0]:e.join("+")}var dt={name:"json",version:1,contentType:"application/json",encode(n){let e=JSON.stringify(n);return new TextEncoder().encode(e)},decode(n,e){let t=new TextDecoder().decode(n);return JSON.parse(t)}};function Oe(n){n.registerCodec(dt)}function ve(n){if(n===void 0)return null;if(typeof n=="number"){if(!Number.isFinite(n))throw new TypeError(`Cannot hash non-finite number: ${n}`);if(Number.isInteger(n)&&!Number.isSafeInteger(n))throw new TypeError(`Cannot hash integer outside safe range (|n| > 2^53-1): ${n}. Cross-language cid parity is not guaranteed for unsafe integers.`);return n}if(typeof n=="string"||typeof n=="boolean"||n===null)return n;if(Array.isArray(n))return n.map(ve);if(typeof n=="object"&&n!==null){let e={};for(let t of Object.keys(n).sort())e[t]=ve(n[t]);return e}return null}var ct=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),lt=new TextEncoder;function ut(n){let e=lt.encode(n),t=e.length,s=t*8,r=t+9+63&-64,i=new Uint8Array(r);i.set(e),i[t]=128;let a=new DataView(i.buffer);a.setUint32(r-4,s>>>0,!1),a.setUint32(r-8,Math.floor(s/4294967296)>>>0,!1);let o=1779033703,d=3144134277,c=1013904242,l=2773480762,f=1359893119,g=2600822924,u=528734635,_=1541459225,S=new Uint32Array(64),m=(E,b)=>E>>>b|E<<32-b;for(let E=0;E<r;E+=64){for(let h=0;h<16;h++)S[h]=a.getUint32(E+h*4,!1);for(let h=16;h<64;h++){let z=S[h-15],$=S[h-2],re=m(z,7)^m(z,18)^z>>>3,ge=m($,17)^m($,19)^$>>>10;S[h]=S[h-16]+re+S[h-7]+ge>>>0}let b=o,B=d,j=c,he=l,M=f,ne=g,se=u,pe=_;for(let h=0;h<64;h++){let z=m(M,6)^m(M,11)^m(M,25),$=M&ne^~M&se,re=pe+z+$+ct[h]+S[h]>>>0,ge=m(b,2)^m(b,13)^m(b,22),Ke=b&B^b&j^B&j,Je=ge+Ke>>>0;pe=se,se=ne,ne=M,M=he+re>>>0,he=j,j=B,B=b,b=re+Je>>>0}o=o+b>>>0,d=d+B>>>0,c=c+j>>>0,l=l+he>>>0,f=f+M>>>0,g=g+ne>>>0,u=u+se>>>0,_=_+pe>>>0}let A=E=>E.toString(16).padStart(8,"0");return A(o)+A(d)+A(c)+A(l)+A(f)+A(g)+A(u)+A(_)}function ee(n){let e=ve(n??null),t=JSON.stringify(e);return ut(t).slice(0,16)}function ft(){let n=globalThis.crypto;if(n?.randomUUID)return n.randomUUID();let e=()=>Math.floor(Math.random()*4294967296).toString(16).padStart(8,"0"),t=e()+e()+e()+e();return`${t.slice(0,8)}-${t.slice(8,12)}-4${t.slice(13,16)}-${(parseInt(t.slice(16,17),16)&3|8).toString(16)}${t.slice(17,20)}-${t.slice(20,32)}`}function te(n,e,t){let s=t?.id??ft();if(n===0)return{id:s,version:0};let i=(t?.hash??ee)(e);return{id:s,version:0,cid:i,prev:null}}function ue(n,e,t){n.version+=1,"cid"in n&&(n.prev=n.cid,n.cid=t(e))}function Ce(n){return"cid"in n}var Ie=()=>{},Fe=100;function Ge(n){return{node:n,unsub:null,prevData:void 0,dirty:!1,involvedThisWave:!1,dataBatch:[],terminal:void 0}}function we(n){n.prevData=void 0,n.dirty=!1,n.involvedThisWave=!1,n.dataBatch.length=0,n.terminal=void 0}function fe(n){return n.length===0?n:typeof n[0]=="symbol"?[n]:n}var ht=(n,e,t,s)=>{t.direction==="down-in"&&n._onDepMessage(t.depIndex,e)},pt=(n,e,t,s)=>{let r=n;if(r._status==="completed"||r._status==="errored")return;let i=r._cached,a=i===void 0?[X]:[X,[y,i]];r._status==="dirty"&&a.push(R),U(e,a,r._config.tierOf)},G=new W({onMessage:ht,onSubscribe:pt});le(G);Oe(G);function He(n){if(G._isFrozen())throw new Error("configure() called after a node was created \u2014 the default GraphReFlyConfig is frozen. Call configure(...) at application startup, before any node factories run.");n(G)}var V=class n{_optsName;_describeKind;meta;_hasMeta;_config;_deps;_sinks=null;_sinkCount=0;_cached;_status;_cleanup;_store={};_waveHasNewData=!1;_hasNewTerminal=!1;_hasCalledFnOnce=!1;_paused=!1;_pendingWave=!1;_isExecutingFn=!1;_pendingRerun=!1;_rerunDepth=0;_dirtyDepCount=0;_batchPendingMessages=null;_pauseLocks=null;_pauseBuffer=null;_fn;_equals;_resubscribable;_resetOnTeardown;_autoComplete;_autoError;_pausable;_partial;_guard;_extraGuards;_hashFn;_versioning;_versioningLevel;_lastMutation;_inspectorHooks;_actions;constructor(e,t,s){this._config=s.config??G,this._config.onMessage,this._optsName=s.name,this._describeKind=s.describeKind,this._equals=s.equals??Object.is,this._resubscribable=s.resubscribable??!1,this._resetOnTeardown=s.resetOnTeardown??!1,this._autoComplete=s.completeWhenDepsComplete??!0,this._autoError=s.errorWhenDepsError??!0,this._pausable=s.pausable??!0,this._guard=s.guard,this._fn=t,this._partial=s.partial??!1,this._cached=s.initial!==void 0?s.initial:void 0,this._status=e.length===0&&t==null&&this._cached!==void 0?"settled":"sentinel",this._hashFn=s.versioningHash??this._config.defaultHashFn??ee;let r=s.versioning??this._config.defaultVersioning;this._versioningLevel=r,this._versioning=r!=null?te(r,this._cached===void 0?void 0:this._cached,{id:s.versioningId,hash:this._hashFn}):void 0,this._deps=e.map(Ge);let i={};for(let[o,d]of Object.entries(s.meta??{})){let c={initial:d,name:`${s.name??"node"}:meta:${o}`,describeKind:"state",config:this._config};s.guard!=null&&(c.guard=s.guard),i[o]=new n([],void 0,c)}Object.freeze(i),this.meta=i,this._hasMeta=Object.keys(i).length>0;let a=this;this._actions={emit(o){a._emit([[y,o]])},down(o){a._emit(fe(o))},up(o){a._emitUp(fe(o))}},this.down=this.down.bind(this),this.up=this.up.bind(this)}get _isTerminal(){return this._status==="completed"||this._status==="errored"}get name(){return this._optsName}get status(){return this._status}get cache(){return this._cached===void 0?void 0:this._cached}get lastMutation(){return this._lastMutation}get v(){return this._versioning}hasGuard(){return this._guard!=null}_applyVersioning(e,t){if(this._isExecutingFn)throw new Error(`Node "${this.name}": _applyVersioning cannot run mid-fn \u2014 call it outside of \`_execFn\` (typically at graph setup time before the first subscribe).`);let s=this._versioningLevel;if(s!=null&&e<=s)return;let r=t?.hash??this._hashFn;r!==this._hashFn&&(this._hashFn=r);let i=this._cached===void 0?void 0:this._cached,a=this._versioning,o=a?.id??t?.id,d=a?.version??0,c=te(e,i,{id:o,hash:r});c.version=d,this._versioning=c,this._versioningLevel=e}_setInspectorHook(e){return e==null?()=>{}:(this._inspectorHooks==null&&(this._inspectorHooks=new Set),this._inspectorHooks.add(e),()=>{this._inspectorHooks?.delete(e),this._inspectorHooks?.size===0&&(this._inspectorHooks=void 0)})}_pushGuard(e){return this._extraGuards==null&&(this._extraGuards=new Set),this._extraGuards.add(e),()=>{this._extraGuards?.delete(e),this._extraGuards?.size===0&&(this._extraGuards=void 0)}}allowsObserve(e){if(this._guard==null&&this._extraGuards==null)return!0;let t=Y(e);if(this._guard!=null&&!this._guard(t,"observe"))return!1;if(this._extraGuards!=null){for(let s of this._extraGuards)if(!s(t,"observe"))return!1}return!0}_checkGuard(e){if(e?.internal)return;let t=this._guard!=null||this._extraGuards!=null,s=e?.actor!=null;if(!t&&!s)return;let r=Y(e?.actor),i=e?.delivery==="signal"?"signal":"write";if(this._guard!=null&&!this._guard(r,i))throw new F({actor:r,action:i,nodeName:this.name});if(this._extraGuards!=null){for(let a of this._extraGuards)if(!a(r,i))throw new F({actor:r,action:i,nodeName:this.name})}this._lastMutation={actor:r,timestamp_ns:ie()}}down(e,t){let s=fe(e);s.length!==0&&(this._checkGuard(t),this._emit(s))}emit(e,t){this._checkGuard(t),this._emit([[y,e]])}up(e,t){if(this._deps.length===0)return;let s=fe(e);if(s.length===0)return;this._checkGuard(t);let r=t??{internal:!0};this._validateUpTiers(s);for(let i of this._deps)i.node.up?.(s,r)}_emitUp(e){if(this._deps.length!==0&&e.length!==0){this._validateUpTiers(e);for(let t of this._deps)t.node.up?.(e,{internal:!0})}}_validateUpTiers(e){let t=this._config.tierOf;for(let s of e){let r=t(s[0]);if(r===3||r===4)throw new Error(`Node "${this.name}": tier-${r} messages cannot flow up \u2014 DATA/RESOLVED/COMPLETE/ERROR are downstream-only. Use \`down(...)\` for value delivery; \`up(...)\` is for control signals (DIRTY, INVALIDATE, PAUSE, RESUME, TEARDOWN).`)}}subscribe(e,t){if(t!=null&&this._guard!=null){let d=Y(t);if(!this._guard(d,"observe"))throw new F({actor:d,action:"observe",nodeName:this.name})}let r=this._isTerminal&&this._resubscribable;if(r){this._cached=void 0,this._status="sentinel",this._store={},this._hasCalledFnOnce=!1,this._waveHasNewData=!1,this._hasNewTerminal=!1,this._paused=!1,this._pendingWave=!1,this._pendingRerun=!1,this._isExecutingFn=!1,this._rerunDepth=0,this._dirtyDepCount=0,this._pauseLocks=null,this._pauseBuffer=null;for(let d of this._deps)we(d);if(this._partial===!1){for(let d of this._deps)if(d.prevData!==void 0||d.dataBatch.length!==0||d.terminal!==void 0||d.dirty)throw new Error(`resubscribable-reset invariant: DepRecord not fully reset for node ${this._optsName??"(anonymous)"}`)}}this._sinkCount+=1;let i;try{i=this._config.onSubscribe(this,e,{sinkCount:this._sinkCount,afterTerminalReset:r},this._actions)}catch(d){throw this._sinkCount-=1,d}this._sinks==null?this._sinks=e:typeof this._sinks=="function"?this._sinks=new Set([this._sinks,e]):this._sinks.add(e);let a=this._isTerminal;if(this._sinkCount===1&&!a)try{this._activate()}catch(d){if(this._sinkCount-=1,this._removeSink(e),this._sinkCount===0&&(this._status="sentinel"),typeof i=="function")try{i()}catch{}throw d}this._status==="sentinel"&&this._cached===void 0&&(this._status="pending");let o=!1;return()=>{o||(o=!0,this._sinkCount-=1,this._removeSink(e),typeof i=="function"&&i(),this._sinks==null&&this._deactivate())}}_removeSink(e){if(this._sinks===e)this._sinks=null;else if(this._sinks!=null&&typeof this._sinks!="function")if(this._sinks.delete(e),this._sinks.size===1){let[t]=this._sinks;this._sinks=t}else this._sinks.size===0&&(this._sinks=null)}_activate(){if(this._deps.length===0){this._fn&&this._execFn();return}this._dirtyDepCount=0;let e=this._deps.length,t=0;try{for(let s=0;s<e;s++){let r=s,i=this._deps[s];i.unsub=Ie,i.unsub=i.node.subscribe(a=>{if(i.unsub===null)return;let o=this._config.tierOf,d=!1;for(let c of a)o(c[0])>=3&&(d=!0),this._config.onMessage(this,c,{direction:"down-in",depIndex:r},this._actions);d&&this._maybeRunFnOnSettlement()}),t++}}catch(s){this._deps[t].unsub=null;for(let r=0;r<t;r++){let i=this._deps[r];if(i.unsub!=null){let a=i.unsub;i.unsub=null;try{a()}catch{}we(i)}}throw this._dirtyDepCount=0,s}}_addDep(e){for(let r=0;r<this._deps.length;r++)if(this._deps[r].node===e)return r;let t=this._deps.length,s=Ge(e);if(this._deps.push(s),this._sinks==null)return t;s.dirty=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(Z),s.unsub=Ie;try{s.unsub=e.subscribe(r=>{if(s.unsub===null)return;let i=this._config.tierOf,a=!1;for(let o of r)i(o[0])>=3&&(a=!0),this._config.onMessage(this,o,{direction:"down-in",depIndex:t},this._actions);a&&this._maybeRunFnOnSettlement()})}catch(r){throw s.unsub=null,this._deps.pop(),this._dirtyDepCount--,r}return t}_deactivate(e=!1){let t=this._cleanup;if(this._cleanup=void 0,typeof t=="function")try{t()}catch(s){this._emit([[p,this._wrapFnError("cleanup threw",s)]])}else if(t!=null&&typeof t=="object"){let s=t.deactivate;if(typeof s=="function")try{s()}catch(r){this._emit([[p,this._wrapFnError("cleanup.deactivate threw",r)]])}}for(let s of this._deps){if(s.unsub!=null){let r=s.unsub;s.unsub=null;try{r()}catch{}}we(s)}this._waveHasNewData=!1,this._hasNewTerminal=!1,this._hasCalledFnOnce=!1,this._paused=!1,this._pendingWave=!1,this._pendingRerun=!1,this._rerunDepth=0,this._store={},this._dirtyDepCount=0,this._pauseLocks=null,this._pauseBuffer=null,this._fn!=null&&(this._cached=void 0),e||(this._fn!=null||this._deps.length>0)&&(!this._isTerminal||this._resubscribable)&&(this._status="sentinel")}_onDepMessage(e,t){let s=this._deps[e],r=t[0];if(this._inspectorHooks!=null){let i={kind:"dep_message",depIndex:e,message:t};for(let a of this._inspectorHooks)a(i)}if(r!==C){if(r===w){this._depDirtied(s);return}if(r===T){if(this._depInvalidated(s),this._cached===void 0)return;this._emit(de);return}if(r===N||r===I){this._emit([t]);return}if(r===v){this._emit(Q);return}if(r===y)this._depSettledAsData(s,t[1]);else if(r===x)this._depSettledAsResolved(s);else if(r===k)this._depSettledAsTerminal(s,!0);else if(r===p)this._depSettledAsTerminal(s,t[1]);else{this._emit([t]);return}if(!this._fn){(r===y||r===x)&&this._emit([t]),(r===k||r===p)&&this._maybeAutoTerminalAfterWave();return}}}_depDirtied(e){e.dirty||(e.dirty=!0,e.involvedThisWave=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(Z))}_depSettledAsData(e,t){e.dirty&&(e.dirty=!1,this._dirtyDepCount--),e.involvedThisWave=!0,e.dataBatch.push(t),this._waveHasNewData=!0}_depSettledAsResolved(e){e.dirty&&(e.dirty=!1,this._dirtyDepCount--)}_depSettledAsTerminal(e,t){e.dirty&&(e.dirty=!1,this._dirtyDepCount--),e.terminal=t,e.involvedThisWave=!0,this._hasNewTerminal=!0}_depInvalidated(e){e.prevData=void 0,e.terminal=void 0,e.dataBatch.length=0,e.dirty?e.involvedThisWave=!1:(e.dirty=!0,e.involvedThisWave=!0,this._dirtyDepCount++)}_maybeRunFnOnSettlement(){if(!(this._isTerminal&&!this._resubscribable)&&!(this._dirtyDepCount>0)){if(!this._partial&&!this._hasCalledFnOnce)for(let e=0;e<this._deps.length;e++){let t=this._deps[e];if(t.dataBatch.length===0&&t.prevData===void 0&&t.terminal===void 0){this._maybeAutoTerminalAfterWave();return}}if(this._paused){this._pendingWave=!0;return}if(!this._waveHasNewData&&!this._hasNewTerminal&&this._hasCalledFnOnce){this._clearWaveFlags(),this._emit(ae),this._maybeAutoTerminalAfterWave();return}this._fn&&this._execFn(),this._maybeAutoTerminalAfterWave()}}_maybeAutoTerminalAfterWave(){if(this._deps.length===0||this._isTerminal)return;let e=this._deps.find(t=>t.terminal!==void 0&&t.terminal!==!0);if(e!=null){this._autoError&&this._emit([[p,e.terminal]]);return}this._autoComplete&&this._deps.every(t=>t.terminal!==void 0)&&this._emit(ce)}_execFn(){if(!this._fn||this._isTerminal&&!this._resubscribable)return;if(this._isExecutingFn){this._pendingRerun=!0;return}let e=this._cleanup;if(typeof e=="function"){this._cleanup=void 0;try{e()}catch(a){this._emit([[p,this._wrapFnError("cleanup threw",a)]]);return}}else if(e!=null&&typeof e=="object"){let a=e.beforeRun;if(typeof a=="function"){e.beforeRun=void 0;try{a()}catch(o){this._emit([[p,this._wrapFnError("cleanup.beforeRun threw",o)]]);return}}}let t=this._deps.map(a=>a.involvedThisWave?a.dataBatch.length>0?[...a.dataBatch]:[]:void 0),s=this._deps.map(a=>a.prevData);for(let a=0;a<this._deps.length;a++){let o=t[a];o!=null&&o.length>0&&(this._deps[a].prevData=o[o.length-1])}let r=this._deps.map(a=>a.terminal),i={prevData:s,terminalDeps:r,store:this._store};if(this._hasCalledFnOnce=!0,this._clearWaveFlags(),this._inspectorHooks!=null){let a={kind:"run",batchData:t,prevData:s};for(let o of this._inspectorHooks)o(a)}this._isExecutingFn=!0;try{let a=this._fn(t,this._actions,i);if(typeof a=="function")this._cleanup=a;else if(a!=null&&typeof a=="object"){let o=a;(typeof o.beforeRun=="function"||typeof o.deactivate=="function"||typeof o.invalidate=="function")&&(this._cleanup=a)}}catch(a){this._emit([[p,this._wrapFnError("fn threw",a)]])}finally{this._isExecutingFn=!1,this._pendingRerun?(this._pendingRerun=!1,this._rerunDepth+=1,this._rerunDepth>Fe?(this._rerunDepth=0,this._emit([[p,new Error(`Node "${this.name}": _pendingRerun depth exceeded ${Fe} \u2014 likely a reactive cycle`)]])):this._maybeRunFnOnSettlement()):this._rerunDepth=0,this._clearWaveFlags()}}_clearWaveFlags(){this._waveHasNewData=!1,this._hasNewTerminal=!1;for(let e of this._deps)e.involvedThisWave=!1,e.dataBatch.length=0}_wrapFnError(e,t){let s=t instanceof Error?t.message:String(t);return new Error(`Node "${this.name}": ${e}: ${s}`,{cause:t})}_frameBatch(e){let t=this._config.tierOf;if(e.length===1)return t(e[0][0])===3&&this._status!=="dirty"?[R,e[0]]:e;let s=!0,r=!1,i=!1,a=-1;for(let d of e){let c=t(d[0]);c<a&&(s=!1),c===3&&(r=!0),d[0]===w&&(i=!0),a=c}let o=e;if(!s){let d=e.map((c,l)=>({m:c,i:l,tier:t(c[0])}));d.sort((c,l)=>c.tier-l.tier||c.i-l.i),o=d.map(c=>c.m)}if(r&&!i&&this._status!=="dirty"){let d=0;for(;d<o.length&&t(o[d][0])===0;)d++;return d===0?[R,...o]:[...o.slice(0,d),R,...o.slice(d)]}return o}_emit(e){if(e.length===0)return;for(let o=0;o<e.length;o++){let d=e[o];if(d[0]===p&&d[1]===void 0)throw new TypeError('[ERROR, payload] requires a non-undefined payload (spec \xA71.2). Pass an Error object or domain tag instead \u2014 e.g. node.down([[ERROR, new Error("reason")]])')}let t=e;if(this._isTerminal&&!this._resubscribable){let o=e.filter(d=>d[0]===v||d[0]===T);if(o.length===0)return;t=o}t=this._frameBatch(t);let r=null;for(let o=0;o<t.length;o++){let d=t[o],c=d[0];if(c!==N&&c!==I){r?.push(d);continue}if(d.length<2)throw new Error(`Node "${this.name}": [[${c===N?"PAUSE":"RESUME"}]] must carry a lockId payload \u2014 bare PAUSE/RESUME is a protocol violation (C0 rule). Use \`[[PAUSE, lockId]]\` / \`[[RESUME, lockId]]\`.`);let l=!0;if(this._pausable!==!1){let f=d[1];if(c===N)this._pauseLocks==null&&(this._pauseLocks=new Set),this._pauseLocks.add(f),this._paused=!0,this._pausable==="resumeAll"&&this._pauseBuffer==null&&(this._pauseBuffer=[]);else if(this._pauseLocks==null||!this._pauseLocks.has(f))l=!1;else if(this._pauseLocks.delete(f),this._pauseLocks.size===0){if(this._paused=!1,this._pauseBuffer!=null&&this._pauseBuffer.length>0){let g=this._pauseBuffer;this._pauseBuffer=[],this._emit(g)}this._pendingWave&&(this._pendingWave=!1,this._maybeRunFnOnSettlement())}}l?r?.push(d):r==null&&(r=t.slice(0,o))}if(r!=null){if(r.length===0)return;t=r}if(this._hasMeta&&t.some(o=>o[0]===v))for(let o of Object.keys(this.meta))try{this.meta[o]._emit(Q)}catch{}let{finalMessages:i,equalsError:a}=this._updateState(t);if(i.length>0&&this._config.inspectorEnabled){let o=this._config.globalInspector;if(o!=null)try{o({kind:"emit",node:this,messages:i})}catch{}}if(i.length>0)if(this._paused&&this._pausable==="resumeAll"&&this._pauseBuffer!=null){let o=this._config.tierOf,d=[];for(let c of i)o(c[0])===3?this._pauseBuffer.push(c):d.push(c);d.length>0&&this._dispatchOrAccumulate(d)}else this._dispatchOrAccumulate(i);a!=null&&this._emit([[p,a]])}_updateState(e){let t=this._config.tierOf,s,r,i=-1,a=0;for(let l of e)t(l[0])===3&&a++;let o=a<=1,d=-1;if(this._versioning!=null&&a>1){for(let l=e.length-1;l>=0;l--)if(e[l][0]===y){d=l;break}}for(let l=0;l<e.length;l++){let f=e[l],g=f[0];if(g===y){if(f.length>=2){let u=!1;if(o&&this._cached!==void 0)try{u=this._equals(this._cached,f[1])}catch(_){r=this._wrapFnError("equals threw",_),i=l;break}if(u){s==null&&(s=e.slice(0,l)),s.push(J),this._status="resolved";continue}this._cached=f[1],this._versioning!=null&&(d<0||l===d)&&ue(this._versioning,f[1],this._hashFn)}this._status="settled",s?.push(f)}else if(s?.push(f),g===w)this._status="dirty";else if(g===x)this._status="resolved";else if(g===k){this._status="completed";{let u=this._config.rigorRecorder;if(u!=null)try{u.onTerminalTransition(this,"completed",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(g===p){this._status="errored";{let u=this._config.rigorRecorder;if(u!=null)try{u.onTerminalTransition(this,"errored",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(g===T){if(this._cached!==void 0){let _=this._config.rigorRecorder;if(_!=null)try{_.onNonVacuousInvalidate(this,this._cached)}catch{}}this._cached=void 0,this._status="dirty";let u=this._cleanup;if(typeof u=="function"){this._cleanup=void 0;try{u()}catch{}}else if(u!=null&&typeof u=="object"){let _=u.invalidate;if(typeof _=="function")try{_()}catch{}}}else g===v&&(this._resetOnTeardown&&(this._cached=void 0),this._deactivate(!0),this._status="sentinel")}let c=i>=0?s??e.slice(0,i):s??e;return r!=null?{finalMessages:c,equalsError:r}:{finalMessages:c}}_deliverToSinks=e=>{if(this._sinks==null)return;if(typeof this._sinks=="function"){this._sinks(e);return}let t=[...this._sinks];for(let s of t)s(e)};_dispatchOrAccumulate(e){if(Ae()){this._batchPendingMessages===null&&(this._batchPendingMessages=[],Ee(()=>this._flushBatchPending()));for(let t of e)this._batchPendingMessages.push(t);return}U(this._deliverToSinks,e,this._config.tierOf)}_flushBatchPending(){let e=this._batchPendingMessages;if(e===null||(this._batchPendingMessages=null,e.length===0))return;let t=this._frameBatch(e);U(this._deliverToSinks,t,this._config.tierOf)}},Ve=n=>Array.isArray(n),xe=n=>typeof n=="object"&&n!=null&&!Array.isArray(n);function H(n,e,t){let s=Ve(n)?n:[],r=typeof n=="function"?n:typeof e=="function"?e:void 0,i={};return Ve(n)?i=(xe(e)?e:t)??{}:xe(n)?i=n:i=(xe(e)?e:t)??{},new V(s,r,i)}function Le(n,e){if(e!=null&&e.length>0)return new Set(e);switch(n){case"standard":return new Set(["type","status","value","deps","meta","v"]);case"full":return null;case"spec":return new Set(["type","deps","meta","value"]);default:return new Set(["type","deps"])}}function Pe(n){let e=new WeakSet,t={};for(let[s,r]of Ue(n))t[s]=Te(r,e);return t}function Te(n,e){if(n==null)return n;let t=typeof n;if(t==="boolean"||t==="number"||t==="string")return n;if(t==="function")return"<function>";if(Array.isArray(n))return e.has(n)?"<cycle>":(e.add(n),n.map(s=>Te(s,e)));if(t==="object"){let s=n;if(e.has(s))return"<cycle>";e.add(s);try{if(typeof s.subscribe=="function"&&"cache"in s)return"<Node>"}catch{return"<unserializable>"}let r={};for(let[i,a]of Ue(s))r[i]=Te(a,e);return r}return"<unserializable>"}function Ue(n){let e=[],t;try{t=Object.keys(n)}catch{return e}for(let s of t)try{e.push([s,n[s]])}catch{e.push([s,"<unserializable>"])}return e}function We(n,e){let t={factory:n};return e!==void 0&&(t.factoryArgs=e),t}function Be(n,e){return H([],{...e,initial:n})}function je(n,e){return H((s,r,i)=>n(r,i)??void 0,{describeKind:"producer",...e})}function Ne(n,e,t){return H(n,(r,i,a)=>{let o=r.map((d,c)=>d!=null&&d.length>0?d.at(-1):a.prevData[c]);i.emit(e(o,a))},{describeKind:"derived",...t})}function ze(n,e,t){return H(n,(r,i,a)=>{let o=r.map((d,c)=>d!=null&&d.length>0?d.at(-1):a.prevData[c]);return e(o,i,a)??void 0},{describeKind:"effect",...t})}function $e(n,e,t){let s=new Map;return n.forEach((r,i)=>{s.set(r,i)}),Ne(n,(r,i)=>e(o=>{let d=s.get(o);if(d==null)throw new Error(`dynamicNode: untracked dep "${o.name??"<unnamed>"}"`);return r[d]},i),t)}function Ye(n,e){let t,s=new Map,r=(i,a,o)=>{let d=!1,c=l=>{let f=s.get(l);if(f!==void 0){if(f<i.length){let u=i[f];return u!=null&&u.length>0?u.at(-1):o.prevData[f]}return l.cache}d=!0;let g=t._addDep(l);return s.set(l,g),l.cache};try{let l=n(c,o);d||(a.emit(l),o.store.__autoTrackLastDiscoveryError!=null&&delete o.store.__autoTrackLastDiscoveryError)}catch(l){if(!d)throw l;o.store.__autoTrackLastDiscoveryError=l}};return t=new V([],r,{describeKind:"derived",...e}),t}function qe(n,...e){let t=n;for(let s of e)t=s(t);return t}0&&(module.exports={COMPLETE,COMPLETE_MSG,COMPLETE_ONLY_BATCH,DATA,DEFAULT_ACTOR,DIRTY,DIRTY_MSG,DIRTY_ONLY_BATCH,ERROR,GraphReFlyConfig,GuardDenied,INVALIDATE,INVALIDATE_MSG,INVALIDATE_ONLY_BATCH,NodeImpl,PAUSE,RESOLVED,RESOLVED_MSG,RESOLVED_ONLY_BATCH,RESUME,START,START_MSG,TEARDOWN,TEARDOWN_MSG,TEARDOWN_ONLY_BATCH,accessHintForGuard,advanceVersion,autoTrackNode,batch,configure,createVersioning,defaultConfig,defaultHash,derived,downWithBatch,dynamicNode,effect,factoryTag,isBatching,isV1,monotonicNs,node,normalizeActor,pipe,placeholderArgs,policy,policyFromRules,producer,registerBuiltins,resolveDescribeFields,state,wallClockNs});
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+
17
+ // src/core/index.ts
18
+ var core_exports = {};
19
+ module.exports = __toCommonJS(core_exports);
20
+ __reExport(core_exports, require("@graphrefly/pure-ts/core"), module.exports);
21
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/index.ts"],"sourcesContent":["// Phase 13.9.A shim — re-export from pure-TS sibling until\n// @graphrefly/native (napi binding) and per-milestone swap-overs land.\nexport * from \"@graphrefly/pure-ts/core\";\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAEA,yBAAc,qCAFd;","names":[]}
@@ -1,4 +1 @@
1
- export { A as Actor, C as COMPLETE, f as COMPLETE_MSG, g as COMPLETE_ONLY_BATCH, D as DATA, h as DEFAULT_ACTOR, i as DIRTY, j as DIRTY_MSG, k as DIRTY_ONLY_BATCH, l as DepRecord, E as ERROR, F as FnCtx, G as GlobalInspectorEvent, m as GlobalInspectorHook, n as GraphReFlyConfig, o as GuardAction, p as GuardDenied, q as GuardDeniedDetails, H as HashFn, I as INVALIDATE, r as INVALIDATE_MSG, s as INVALIDATE_ONLY_BATCH, t as Message, u as MessageContext, v as MessageTypeRegistration, w as MessageTypeRegistrationInput, M as Messages, N as Node, c as NodeActions, x as NodeCtx, e as NodeDescribeKind, y as NodeFn, d as NodeFnCleanup, b as NodeGuard, z as NodeImpl, B as NodeInspectorHook, J as NodeInspectorHookEvent, a as NodeOptions, K as NodeSink, L as NodeStatus, O as NodeTransportOptions, P as NodeVersionInfo, Q as OnMessageHandler, R as OnSubscribeHandler, S as PAUSE, T as PolicyAllow, U as PolicyDeny, W as PolicyRuleData, X as RESOLVED, Y as RESOLVED_MSG, Z as RESOLVED_ONLY_BATCH, _ as RESUME, $ as RigorRecorder, a0 as START, a1 as START_MSG, a2 as SubscribeContext, a3 as TEARDOWN, a4 as TEARDOWN_MSG, a5 as TEARDOWN_ONLY_BATCH, a6 as V0, a7 as V1, V as VersioningLevel, a8 as VersioningOptions, a9 as accessHintForGuard, aa as advanceVersion, ab as configure, ac as createVersioning, ad as defaultConfig, ae as defaultHash, af as isV1, ag as node, ah as normalizeActor, ai as policy, aj as policyFromRules, ak as registerBuiltins } from '../node-ClS5yC-B.cjs';
2
- export { b as batch, d as downWithBatch, a as isBatching, m as monotonicNs, w as wallClockNs } from '../index-RV_yDjOX.cjs';
3
- export { a as DescribeDetail, b as DescribeField, D as DescribeNodeOutput, f as factoryTag, p as placeholderArgs, r as resolveDescribeFields } from '../meta-vE8bxW1E.cjs';
4
- export { A as AutoTrackOptions, D as DerivedFn, a as DynamicFn, E as EffectFn, P as PipeOperator, b as ProducerFn, T as TrackFn, c as autoTrackNode, d as derived, e as dynamicNode, f as effect, p as pipe, g as producer, s as state } from '../sugar-DyVGtczU.cjs';
1
+ export * from '@graphrefly/pure-ts/core';
@@ -1,4 +1 @@
1
- export { A as Actor, C as COMPLETE, f as COMPLETE_MSG, g as COMPLETE_ONLY_BATCH, D as DATA, h as DEFAULT_ACTOR, i as DIRTY, j as DIRTY_MSG, k as DIRTY_ONLY_BATCH, l as DepRecord, E as ERROR, F as FnCtx, G as GlobalInspectorEvent, m as GlobalInspectorHook, n as GraphReFlyConfig, o as GuardAction, p as GuardDenied, q as GuardDeniedDetails, H as HashFn, I as INVALIDATE, r as INVALIDATE_MSG, s as INVALIDATE_ONLY_BATCH, t as Message, u as MessageContext, v as MessageTypeRegistration, w as MessageTypeRegistrationInput, M as Messages, N as Node, c as NodeActions, x as NodeCtx, e as NodeDescribeKind, y as NodeFn, d as NodeFnCleanup, b as NodeGuard, z as NodeImpl, B as NodeInspectorHook, J as NodeInspectorHookEvent, a as NodeOptions, K as NodeSink, L as NodeStatus, O as NodeTransportOptions, P as NodeVersionInfo, Q as OnMessageHandler, R as OnSubscribeHandler, S as PAUSE, T as PolicyAllow, U as PolicyDeny, W as PolicyRuleData, X as RESOLVED, Y as RESOLVED_MSG, Z as RESOLVED_ONLY_BATCH, _ as RESUME, $ as RigorRecorder, a0 as START, a1 as START_MSG, a2 as SubscribeContext, a3 as TEARDOWN, a4 as TEARDOWN_MSG, a5 as TEARDOWN_ONLY_BATCH, a6 as V0, a7 as V1, V as VersioningLevel, a8 as VersioningOptions, a9 as accessHintForGuard, aa as advanceVersion, ab as configure, ac as createVersioning, ad as defaultConfig, ae as defaultHash, af as isV1, ag as node, ah as normalizeActor, ai as policy, aj as policyFromRules, ak as registerBuiltins } from '../node-ClS5yC-B.js';
2
- export { b as batch, d as downWithBatch, a as isBatching, m as monotonicNs, w as wallClockNs } from '../index-wAzD9yVj.js';
3
- export { a as DescribeDetail, b as DescribeField, D as DescribeNodeOutput, f as factoryTag, p as placeholderArgs, r as resolveDescribeFields } from '../meta-BgVAsg9j.js';
4
- export { A as AutoTrackOptions, D as DerivedFn, a as DynamicFn, E as EffectFn, P as PipeOperator, b as ProducerFn, T as TrackFn, c as autoTrackNode, d as derived, e as dynamicNode, f as effect, p as pipe, g as producer, s as state } from '../sugar-DLwvMr3F.js';
1
+ export * from '@graphrefly/pure-ts/core';
@@ -1 +1,3 @@
1
- import"../chunk-4I45FVQS.js";import{a as X,b as Y,c as Z}from"../chunk-35JTVPOX.js";import{A as M,B as N,C as O,D as P,E as Q,F as R,G as S,H as T,I as U,J as V,K as W,i as v,j as w,k as x,m as y,n as z,o as A,p as B,q as C,r as D,s as E,t as F,u as G,v as H,w as I,x as J,y as K,z as L}from"../chunk-LYCLF26R.js";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u}from"../chunk-CK2E7BTU.js";import"../chunk-QYADASLV.js";export{i as COMPLETE,o as COMPLETE_MSG,t as COMPLETE_ONLY_BATCH,b as DATA,v as DEFAULT_ACTOR,c as DIRTY,k as DIRTY_MSG,q as DIRTY_ONLY_BATCH,j as ERROR,C as GraphReFlyConfig,E as GuardDenied,e as INVALIDATE,m as INVALIDATE_MSG,s as INVALIDATE_ONLY_BATCH,O as NodeImpl,f as PAUSE,d as RESOLVED,l as RESOLVED_MSG,r as RESOLVED_ONLY_BATCH,g as RESUME,a as START,n as START_MSG,h as TEARDOWN,p as TEARDOWN_MSG,u as TEARDOWN_ONLY_BATCH,H as accessHintForGuard,K as advanceVersion,V as autoTrackNode,y as batch,N as configure,J as createVersioning,M as defaultConfig,I as defaultHash,S as derived,z as downWithBatch,U as dynamicNode,T as effect,Z as factoryTag,x as isBatching,L as isV1,A as monotonicNs,P as node,w as normalizeActor,W as pipe,Y as placeholderArgs,F as policy,G as policyFromRules,R as producer,D as registerBuiltins,X as resolveDescribeFields,Q as state,B as wallClockNs};
1
+ // src/core/index.ts
2
+ export * from "@graphrefly/pure-ts/core";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/index.ts"],"sourcesContent":["// Phase 13.9.A shim — re-export from pure-TS sibling until\n// @graphrefly/native (napi binding) and per-milestone swap-overs land.\nexport * from \"@graphrefly/pure-ts/core\";\n"],"mappings":";AAEA,cAAc;","names":[]}