@prisma/orm-framework 0.16.0-dev.36

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 (332) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +27 -0
  3. package/dist/abortable-CQO6uG9F.mjs +39 -0
  4. package/dist/abortable-CQO6uG9F.mjs.map +1 -0
  5. package/dist/abortable-DBbAaT_4.d.mts +29 -0
  6. package/dist/abortable-DBbAaT_4.d.mts.map +1 -0
  7. package/dist/apply-specifier-default-control-policy-CAxiXxKg.d.mts +7 -0
  8. package/dist/apply-specifier-default-control-policy-CAxiXxKg.d.mts.map +1 -0
  9. package/dist/apply-specifier-default-control-policy-CsYHsfTF.mjs +12 -0
  10. package/dist/apply-specifier-default-control-policy-CsYHsfTF.mjs.map +1 -0
  11. package/dist/array-equal-28xupwIB.mjs +26 -0
  12. package/dist/array-equal-28xupwIB.mjs.map +1 -0
  13. package/dist/array-equal-dUd-VPlk.d.mts +22 -0
  14. package/dist/array-equal-dUd-VPlk.d.mts.map +1 -0
  15. package/dist/assertions-BEQnOIQd.d.mts +31 -0
  16. package/dist/assertions-BEQnOIQd.d.mts.map +1 -0
  17. package/dist/assertions-Cz-GWH8P.mjs +36 -0
  18. package/dist/assertions-Cz-GWH8P.mjs.map +1 -0
  19. package/dist/authoring-Dd7p6pTS.d.mts +1 -0
  20. package/dist/canonical-stringify-Bl6agy_g.d.mts +51 -0
  21. package/dist/canonical-stringify-Bl6agy_g.d.mts.map +1 -0
  22. package/dist/canonical-stringify-DY4NaAJi.mjs +104 -0
  23. package/dist/canonical-stringify-DY4NaAJi.mjs.map +1 -0
  24. package/dist/canonicalization-DFpB09nP-4OdB2nsy.d.mts +69 -0
  25. package/dist/canonicalization-DFpB09nP-4OdB2nsy.d.mts.map +1 -0
  26. package/dist/canonicalization-path-match-CNgHuwM_-CCPBeUuk.mjs +25 -0
  27. package/dist/canonicalization-path-match-CNgHuwM_-CCPBeUuk.mjs.map +1 -0
  28. package/dist/capabilities-CPj7MfXO-GRkp0Q_D.mjs +64 -0
  29. package/dist/capabilities-CPj7MfXO-GRkp0Q_D.mjs.map +1 -0
  30. package/dist/capabilities-Cupq4-1--C71ORI3N.d.mts +34 -0
  31. package/dist/capabilities-Cupq4-1--C71ORI3N.d.mts.map +1 -0
  32. package/dist/casts-D29CHGrr.d.mts +78 -0
  33. package/dist/casts-D29CHGrr.d.mts.map +1 -0
  34. package/dist/casts-DpaahrlC-Bd5n2coI.mjs +82 -0
  35. package/dist/casts-DpaahrlC-Bd5n2coI.mjs.map +1 -0
  36. package/dist/codec-Cly9VPoA.mjs +78 -0
  37. package/dist/codec-Cly9VPoA.mjs.map +1 -0
  38. package/dist/codec-D3GVAkR_.d.mts +116 -0
  39. package/dist/codec-D3GVAkR_.d.mts.map +1 -0
  40. package/dist/codec-types-XJO6eC9U-B_K2q0zm.d.mts +221 -0
  41. package/dist/codec-types-XJO6eC9U-B_K2q0zm.d.mts.map +1 -0
  42. package/dist/components-CawuxTia.d.mts +1 -0
  43. package/dist/components.d.mts +20 -0
  44. package/dist/components.mjs +15 -0
  45. package/dist/components__authoring.d.mts +3 -0
  46. package/dist/components__authoring.mjs +2 -0
  47. package/dist/components__codec.d.mts +3 -0
  48. package/dist/components__codec.mjs +3 -0
  49. package/dist/components__components.d.mts +4 -0
  50. package/dist/components__components.mjs +3 -0
  51. package/dist/components__control.d.mts +4 -0
  52. package/dist/components__control.mjs +2 -0
  53. package/dist/components__emission.d.mts +4 -0
  54. package/dist/components__emission.mjs +2 -0
  55. package/dist/components__execution.d.mts +2 -0
  56. package/dist/components__execution.mjs +2 -0
  57. package/dist/components__ir.d.mts +3 -0
  58. package/dist/components__ir.mjs +3 -0
  59. package/dist/components__psl-ast.d.mts +4 -0
  60. package/dist/components__psl-ast.mjs +2 -0
  61. package/dist/components__runtime.d.mts +2 -0
  62. package/dist/components__runtime.mjs +3 -0
  63. package/dist/components__utils.d.mts +2 -0
  64. package/dist/components__utils.mjs +2 -0
  65. package/dist/config-errors-CBdiX587-DwIyJIX9.mjs +9 -0
  66. package/dist/config-errors-CBdiX587-DwIyJIX9.mjs.map +1 -0
  67. package/dist/config-types-Cf9lVsHR.mjs +62 -0
  68. package/dist/config-types-Cf9lVsHR.mjs.map +1 -0
  69. package/dist/config-types-W-87vhZ4-BgYaH8YO.d.mts +162 -0
  70. package/dist/config-types-W-87vhZ4-BgYaH8YO.d.mts.map +1 -0
  71. package/dist/config-types-zrHI32Om.d.mts +1 -0
  72. package/dist/config-validation-ByGTw6zQ.mjs +99 -0
  73. package/dist/config-validation-ByGTw6zQ.mjs.map +1 -0
  74. package/dist/config-validation-DXggMTZf.d.mts +14 -0
  75. package/dist/config-validation-DXggMTZf.d.mts.map +1 -0
  76. package/dist/config.d.mts +4 -0
  77. package/dist/config.mjs +3 -0
  78. package/dist/config__config-types.d.mts +3 -0
  79. package/dist/config__config-types.mjs +2 -0
  80. package/dist/config__config-validation.d.mts +2 -0
  81. package/dist/config__config-validation.mjs +2 -0
  82. package/dist/contract-authoring.d.mts +213 -0
  83. package/dist/contract-authoring.d.mts.map +1 -0
  84. package/dist/contract-authoring.mjs +133 -0
  85. package/dist/contract-authoring.mjs.map +1 -0
  86. package/dist/contract-types-CkdMH7F7-9EHXSwbH.d.mts +77 -0
  87. package/dist/contract-types-CkdMH7F7-9EHXSwbH.d.mts.map +1 -0
  88. package/dist/contract-validation-error-DEiWp_EI-CRwtUgRw.mjs +14 -0
  89. package/dist/contract-validation-error-DEiWp_EI-CRwtUgRw.mjs.map +1 -0
  90. package/dist/contract-validation-error-R7cMoK04.d.mts +11 -0
  91. package/dist/contract-validation-error-R7cMoK04.d.mts.map +1 -0
  92. package/dist/contract.d.mts +14 -0
  93. package/dist/contract.mjs +13 -0
  94. package/dist/contract__apply-specifier-default-control-policy.d.mts +2 -0
  95. package/dist/contract__apply-specifier-default-control-policy.mjs +2 -0
  96. package/dist/contract__contract-validation-error.d.mts +2 -0
  97. package/dist/contract__contract-validation-error.mjs +2 -0
  98. package/dist/contract__default-namespace.d.mts +2 -0
  99. package/dist/contract__default-namespace.mjs +2 -0
  100. package/dist/contract__enum-accessor.d.mts +2 -0
  101. package/dist/contract__enum-accessor.mjs +2 -0
  102. package/dist/contract__hashing-utils.d.mts +2 -0
  103. package/dist/contract__hashing-utils.mjs +3 -0
  104. package/dist/contract__hashing.d.mts +3 -0
  105. package/dist/contract__hashing.mjs +2 -0
  106. package/dist/contract__is-plain-record.d.mts +2 -0
  107. package/dist/contract__is-plain-record.mjs +2 -0
  108. package/dist/contract__resolve-domain-model.d.mts +2 -0
  109. package/dist/contract__resolve-domain-model.mjs +2 -0
  110. package/dist/contract__types.d.mts +6 -0
  111. package/dist/contract__types.mjs +5 -0
  112. package/dist/contract__validate-domain.d.mts +2 -0
  113. package/dist/contract__validate-domain.mjs +2 -0
  114. package/dist/control-B87KWI_K-C_R8WfEr.d.mts +213 -0
  115. package/dist/control-B87KWI_K-C_R8WfEr.d.mts.map +1 -0
  116. package/dist/control-CBvTj7Ia.d.mts +1383 -0
  117. package/dist/control-CBvTj7Ia.d.mts.map +1 -0
  118. package/dist/control-DTouE89s.mjs +621 -0
  119. package/dist/control-DTouE89s.mjs.map +1 -0
  120. package/dist/control-Ftiau058-CCeJcAVQ.mjs +284 -0
  121. package/dist/control-Ftiau058-CCeJcAVQ.mjs.map +1 -0
  122. package/dist/declarations-DR6To8_k-BFwkCGeP.mjs +1046 -0
  123. package/dist/declarations-DR6To8_k-BFwkCGeP.mjs.map +1 -0
  124. package/dist/default-namespace-D4vCwkXg-BaiW8LNK.mjs +39 -0
  125. package/dist/default-namespace-D4vCwkXg-BaiW8LNK.mjs.map +1 -0
  126. package/dist/default-namespace-D5X_k6hJ-GH8P1ror.d.mts +26 -0
  127. package/dist/default-namespace-D5X_k6hJ-GH8P1ror.d.mts.map +1 -0
  128. package/dist/defined-BQWA85QH-BRSBMULx.mjs +31 -0
  129. package/dist/defined-BQWA85QH-BRSBMULx.mjs.map +1 -0
  130. package/dist/defined-BSXuxrnl.d.mts +28 -0
  131. package/dist/defined-BSXuxrnl.d.mts.map +1 -0
  132. package/dist/domain-envelope-D6Wn9AmZ-BqZKTT9U.d.mts +359 -0
  133. package/dist/domain-envelope-D6Wn9AmZ-BqZKTT9U.d.mts.map +1 -0
  134. package/dist/emission-CeoAV9mj.mjs +26 -0
  135. package/dist/emission-CeoAV9mj.mjs.map +1 -0
  136. package/dist/emission-DeoQufVd.d.mts +1 -0
  137. package/dist/emission-types-hfRVB_Yw-DpQ3hISB.d.mts +75 -0
  138. package/dist/emission-types-hfRVB_Yw-DpQ3hISB.d.mts.map +1 -0
  139. package/dist/enum-accessor-Db5DaTNX.mjs +35 -0
  140. package/dist/enum-accessor-Db5DaTNX.mjs.map +1 -0
  141. package/dist/enum-accessor-PH5vjghI.d.mts +85 -0
  142. package/dist/enum-accessor-PH5vjghI.d.mts.map +1 -0
  143. package/dist/errors.d.mts +4 -0
  144. package/dist/errors.mjs +4 -0
  145. package/dist/errors__control.d.mts +2 -0
  146. package/dist/errors__control.mjs +2 -0
  147. package/dist/errors__execution.d.mts +2 -0
  148. package/dist/errors__execution.mjs +2 -0
  149. package/dist/errors__migration.d.mts +2 -0
  150. package/dist/errors__migration.mjs +2 -0
  151. package/dist/execution-BNwBzmRd.mjs +40 -0
  152. package/dist/execution-BNwBzmRd.mjs.map +1 -0
  153. package/dist/execution-BbOD4GyR.mjs +164 -0
  154. package/dist/execution-BbOD4GyR.mjs.map +1 -0
  155. package/dist/execution-Bo5Bu2Ys.d.mts +79 -0
  156. package/dist/execution-Bo5Bu2Ys.d.mts.map +1 -0
  157. package/dist/execution-MOde1lmD.d.mts +98 -0
  158. package/dist/execution-MOde1lmD.d.mts.map +1 -0
  159. package/dist/framework-authoring-7YMP9TwM-C9P-N6_a.d.mts +777 -0
  160. package/dist/framework-authoring-7YMP9TwM-C9P-N6_a.d.mts.map +1 -0
  161. package/dist/framework-authoring-CDEvlouU-mlMWSksD.mjs +698 -0
  162. package/dist/framework-authoring-CDEvlouU-mlMWSksD.mjs.map +1 -0
  163. package/dist/framework-components-D6j4Y5K7-RW9H184y.mjs +27 -0
  164. package/dist/framework-components-D6j4Y5K7-RW9H184y.mjs.map +1 -0
  165. package/dist/framework-components-MFoo0sYx-G_6k9jt4.d.mts +388 -0
  166. package/dist/framework-components-MFoo0sYx-G_6k9jt4.d.mts.map +1 -0
  167. package/dist/hash-content-Bugg_nZn.mjs +63 -0
  168. package/dist/hash-content-Bugg_nZn.mjs.map +1 -0
  169. package/dist/hash-content-DwEUh-Rx.d.mts +59 -0
  170. package/dist/hash-content-DwEUh-Rx.d.mts.map +1 -0
  171. package/dist/hashing-BtIZVNYX.mjs +199 -0
  172. package/dist/hashing-BtIZVNYX.mjs.map +1 -0
  173. package/dist/hashing-CccSPELN.d.mts +25 -0
  174. package/dist/hashing-CccSPELN.d.mts.map +1 -0
  175. package/dist/hashing-utils-DQgS3nOe.mjs +48 -0
  176. package/dist/hashing-utils-DQgS3nOe.mjs.map +1 -0
  177. package/dist/hashing-utils-qKu59RSC.d.mts +19 -0
  178. package/dist/hashing-utils-qKu59RSC.d.mts.map +1 -0
  179. package/dist/ids.d.mts +44 -0
  180. package/dist/ids.d.mts.map +1 -0
  181. package/dist/ids.mjs +96 -0
  182. package/dist/ids.mjs.map +1 -0
  183. package/dist/ids__runtime.d.mts +7 -0
  184. package/dist/ids__runtime.d.mts.map +1 -0
  185. package/dist/ids__runtime.mjs +31 -0
  186. package/dist/ids__runtime.mjs.map +1 -0
  187. package/dist/index-GY2oGH9L.d.mts +120 -0
  188. package/dist/index-GY2oGH9L.d.mts.map +1 -0
  189. package/dist/internal-error-BIc-ehme-ouBQPoEL.mjs +24 -0
  190. package/dist/internal-error-BIc-ehme-ouBQPoEL.mjs.map +1 -0
  191. package/dist/internal-error-kK8QvlDE.d.mts +19 -0
  192. package/dist/internal-error-kK8QvlDE.d.mts.map +1 -0
  193. package/dist/ir-BvE7L9FK.d.mts +359 -0
  194. package/dist/ir-BvE7L9FK.d.mts.map +1 -0
  195. package/dist/ir-ChmSSAhX.mjs +200 -0
  196. package/dist/ir-ChmSSAhX.mjs.map +1 -0
  197. package/dist/is-plain-record-C9BWiqcw.d.mts +12 -0
  198. package/dist/is-plain-record-C9BWiqcw.d.mts.map +1 -0
  199. package/dist/is-plain-record-CUofyVQ7-DWEzdhIx.mjs +16 -0
  200. package/dist/is-plain-record-CUofyVQ7-DWEzdhIx.mjs.map +1 -0
  201. package/dist/json-Dkqr3say.d.mts +26 -0
  202. package/dist/json-Dkqr3say.d.mts.map +1 -0
  203. package/dist/migration-4VOHVEzx.mjs +118 -0
  204. package/dist/migration-4VOHVEzx.mjs.map +1 -0
  205. package/dist/migration-DKbDzBwy.d.mts +74 -0
  206. package/dist/migration-DKbDzBwy.d.mts.map +1 -0
  207. package/dist/namespace-id-asbWpwMw-3yxn-tRe.mjs +9 -0
  208. package/dist/namespace-id-asbWpwMw-3yxn-tRe.mjs.map +1 -0
  209. package/dist/operations.d.mts +46 -0
  210. package/dist/operations.d.mts.map +1 -0
  211. package/dist/operations.mjs +28 -0
  212. package/dist/operations.mjs.map +1 -0
  213. package/dist/parse-0ZJjj_2N-WZZ1nlrv.d.mts +427 -0
  214. package/dist/parse-0ZJjj_2N-WZZ1nlrv.d.mts.map +1 -0
  215. package/dist/parse-GbZGfMUj-BFSrD2AN.mjs +621 -0
  216. package/dist/parse-GbZGfMUj-BFSrD2AN.mjs.map +1 -0
  217. package/dist/promise-D8meygPf.mjs +13 -0
  218. package/dist/promise-D8meygPf.mjs.map +1 -0
  219. package/dist/promise-DHJWZv49.d.mts +11 -0
  220. package/dist/promise-DHJWZv49.d.mts.map +1 -0
  221. package/dist/psl-ast-BEwO80EH.d.mts +37 -0
  222. package/dist/psl-ast-BEwO80EH.d.mts.map +1 -0
  223. package/dist/psl-ast-Chgi8e4o-rSlBk1UV.d.mts +259 -0
  224. package/dist/psl-ast-Chgi8e4o-rSlBk1UV.d.mts.map +1 -0
  225. package/dist/psl-ast-DUCvVXbB.mjs +239 -0
  226. package/dist/psl-ast-DUCvVXbB.mjs.map +1 -0
  227. package/dist/psl-parser.d.mts +158 -0
  228. package/dist/psl-parser.d.mts.map +1 -0
  229. package/dist/psl-parser.mjs +804 -0
  230. package/dist/psl-parser.mjs.map +1 -0
  231. package/dist/psl-parser__format.d.mts +12 -0
  232. package/dist/psl-parser__format.d.mts.map +1 -0
  233. package/dist/psl-parser__format.mjs +464 -0
  234. package/dist/psl-parser__format.mjs.map +1 -0
  235. package/dist/psl-parser__interpret.d.mts +40 -0
  236. package/dist/psl-parser__interpret.d.mts.map +1 -0
  237. package/dist/psl-parser__interpret.mjs +25 -0
  238. package/dist/psl-parser__interpret.mjs.map +1 -0
  239. package/dist/psl-parser__syntax.d.mts +31 -0
  240. package/dist/psl-parser__syntax.d.mts.map +1 -0
  241. package/dist/psl-parser__syntax.mjs +43 -0
  242. package/dist/psl-parser__syntax.mjs.map +1 -0
  243. package/dist/psl-parser__tokenizer.d.mts +2 -0
  244. package/dist/psl-parser__tokenizer.mjs +2 -0
  245. package/dist/psl-printer.d.mts +37 -0
  246. package/dist/psl-printer.d.mts.map +1 -0
  247. package/dist/psl-printer.mjs +393 -0
  248. package/dist/psl-printer.mjs.map +1 -0
  249. package/dist/redact-db-url-BlaloOwt.d.mts +22 -0
  250. package/dist/redact-db-url-BlaloOwt.d.mts.map +1 -0
  251. package/dist/redact-db-url-CRWJWdB1.mjs +26 -0
  252. package/dist/redact-db-url-CRWJWdB1.mjs.map +1 -0
  253. package/dist/resolve-codec-BZF8TZh_-D-xORT9Q.mjs +59 -0
  254. package/dist/resolve-codec-BZF8TZh_-D-xORT9Q.mjs.map +1 -0
  255. package/dist/resolve-domain-model-BVSb5wS5-C6Yq0dsD.d.mts +17 -0
  256. package/dist/resolve-domain-model-BVSb5wS5-C6Yq0dsD.d.mts.map +1 -0
  257. package/dist/resolve-domain-model-BovPAsW2-8rwyzjxp.mjs +20 -0
  258. package/dist/resolve-domain-model-BovPAsW2-8rwyzjxp.mjs.map +1 -0
  259. package/dist/result-Bpupv5vO.d.mts +54 -0
  260. package/dist/result-Bpupv5vO.d.mts.map +1 -0
  261. package/dist/result-CBZ8X9mU.mjs +92 -0
  262. package/dist/result-CBZ8X9mU.mjs.map +1 -0
  263. package/dist/runtime--RZXG1zP.d.mts +901 -0
  264. package/dist/runtime--RZXG1zP.d.mts.map +1 -0
  265. package/dist/runtime-DYTFHGwh.mjs +516 -0
  266. package/dist/runtime-DYTFHGwh.mjs.map +1 -0
  267. package/dist/runtime-error-BA9d7XjZ-BlT8t6LB.mjs +40 -0
  268. package/dist/runtime-error-BA9d7XjZ-BlT8t6LB.mjs.map +1 -0
  269. package/dist/simplify-deep-Dw9I_ZUl.d.mts +6 -0
  270. package/dist/simplify-deep-Dw9I_ZUl.d.mts.map +1 -0
  271. package/dist/structured-error-BVmv2aPB.d.mts +34 -0
  272. package/dist/structured-error-BVmv2aPB.d.mts.map +1 -0
  273. package/dist/structured-error-H6WU9Kjt.mjs +31 -0
  274. package/dist/structured-error-H6WU9Kjt.mjs.map +1 -0
  275. package/dist/symbol-table-CZ7EVCTL-oYQtrmzq.d.mts +125 -0
  276. package/dist/symbol-table-CZ7EVCTL-oYQtrmzq.d.mts.map +1 -0
  277. package/dist/tokenizer-1hAHZzmp-QGPORvmA.mjs +228 -0
  278. package/dist/tokenizer-1hAHZzmp-QGPORvmA.mjs.map +1 -0
  279. package/dist/tokenizer-DcYI0Xrq-C-nNE9mE.d.mts +16 -0
  280. package/dist/tokenizer-DcYI0Xrq-C-nNE9mE.d.mts.map +1 -0
  281. package/dist/ts-render.d.mts +2 -0
  282. package/dist/ts-render.mjs +240 -0
  283. package/dist/ts-render.mjs.map +1 -0
  284. package/dist/types-ByeQhU9p.d.mts +17 -0
  285. package/dist/types-ByeQhU9p.d.mts.map +1 -0
  286. package/dist/types-DGxlljKG.d.mts +7 -0
  287. package/dist/types-DGxlljKG.d.mts.map +1 -0
  288. package/dist/types-DgdgskBY.mjs +96 -0
  289. package/dist/types-DgdgskBY.mjs.map +1 -0
  290. package/dist/types-import-spec-DRKzrJ20-WYwyCtil.d.mts +14 -0
  291. package/dist/types-import-spec-DRKzrJ20-WYwyCtil.d.mts.map +1 -0
  292. package/dist/utils-DMAM0unR.mjs +20 -0
  293. package/dist/utils-DMAM0unR.mjs.map +1 -0
  294. package/dist/utils-DeWL_zD9.d.mts +11 -0
  295. package/dist/utils-DeWL_zD9.d.mts.map +1 -0
  296. package/dist/utils.d.mts +16 -0
  297. package/dist/utils.mjs +13 -0
  298. package/dist/utils__abortable.d.mts +2 -0
  299. package/dist/utils__abortable.mjs +2 -0
  300. package/dist/utils__array-equal.d.mts +2 -0
  301. package/dist/utils__array-equal.mjs +2 -0
  302. package/dist/utils__assertions.d.mts +2 -0
  303. package/dist/utils__assertions.mjs +2 -0
  304. package/dist/utils__canonical-stringify.d.mts +2 -0
  305. package/dist/utils__canonical-stringify.mjs +2 -0
  306. package/dist/utils__casts.d.mts +2 -0
  307. package/dist/utils__casts.mjs +2 -0
  308. package/dist/utils__defined.d.mts +2 -0
  309. package/dist/utils__defined.mjs +2 -0
  310. package/dist/utils__hash-content.d.mts +2 -0
  311. package/dist/utils__hash-content.mjs +2 -0
  312. package/dist/utils__internal-error.d.mts +2 -0
  313. package/dist/utils__internal-error.mjs +2 -0
  314. package/dist/utils__json.d.mts +2 -0
  315. package/dist/utils__json.mjs +1 -0
  316. package/dist/utils__promise.d.mts +2 -0
  317. package/dist/utils__promise.mjs +2 -0
  318. package/dist/utils__redact-db-url.d.mts +2 -0
  319. package/dist/utils__redact-db-url.mjs +2 -0
  320. package/dist/utils__result.d.mts +2 -0
  321. package/dist/utils__result.mjs +2 -0
  322. package/dist/utils__simplify-deep.d.mts +2 -0
  323. package/dist/utils__simplify-deep.mjs +1 -0
  324. package/dist/utils__structured-error.d.mts +2 -0
  325. package/dist/utils__structured-error.mjs +2 -0
  326. package/dist/utils__types.d.mts +2 -0
  327. package/dist/utils__types.mjs +1 -0
  328. package/dist/validate-domain-BNBs-TVv.d.mts +22 -0
  329. package/dist/validate-domain-BNBs-TVv.d.mts.map +1 -0
  330. package/dist/validate-domain-BkvFlY3B.mjs +143 -0
  331. package/dist/validate-domain-BkvFlY3B.mjs.map +1 -0
  332. package/package.json +114 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"declarations-DR6To8_k-BFwkCGeP.mjs","names":["#state","#segmentBefore","#segmentAfter","#separatorCount"],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/declarations-DR6To8_k.mjs"],"sourcesContent":["//#region src/syntax/red.ts\n/**\n* A token in the red tree. Unlike the green-layer {@link Token} (kind + text\n* only), a red token also carries its absolute `offset` within the source and a\n* link back to its `parent` {@link SyntaxNode}, so a cursor anchored on a token\n* can walk outward (parent, previous/next token, siblings) without re-scanning\n* from the document root.\n*/\nvar SyntaxToken = class {\n\tgreen;\n\tkind;\n\ttext;\n\toffset;\n\tparent;\n\t/** Position within the parent's children, enabling O(1) sibling navigation without rescanning the green layer. */\n\tindex;\n\tconstructor(green, offset, parent, index) {\n\t\tthis.green = green;\n\t\tthis.kind = green.kind;\n\t\tthis.text = green.text;\n\t\tthis.offset = offset;\n\t\tthis.parent = parent;\n\t\tthis.index = index;\n\t}\n\tget textLength() {\n\t\treturn this.text.length;\n\t}\n\tget endOffset() {\n\t\treturn this.offset + this.textLength;\n\t}\n\t/** Whether `offset` falls within this token, inclusive of both ends. */\n\tisInside(offset) {\n\t\treturn offset >= this.offset && offset <= this.endOffset;\n\t}\n\tisOutside(offset) {\n\t\treturn !this.isInside(offset);\n\t}\n\t/** The sibling element immediately after this token within its parent. */\n\tget nextSiblingOrToken() {\n\t\treturn childAt(this.parent, this.index + 1);\n\t}\n\t/** The sibling element immediately before this token within its parent. */\n\tget prevSiblingOrToken() {\n\t\treturn childAt(this.parent, this.index - 1);\n\t}\n\t/** The next token in document order, crossing node boundaries. */\n\tget nextToken() {\n\t\tfor (let el = climbingNext(this); el !== void 0; el = climbingNext(el)) {\n\t\t\tconst token = firstToken(el);\n\t\t\tif (token !== void 0) return token;\n\t\t}\n\t}\n\t/** The previous token in document order, crossing node boundaries. */\n\tget prevToken() {\n\t\tfor (let el = climbingPrev(this); el !== void 0; el = climbingPrev(el)) {\n\t\t\tconst token = lastToken(el);\n\t\t\tif (token !== void 0) return token;\n\t\t}\n\t}\n};\nvar TokenAtOffset = class TokenAtOffset {\n\t#state;\n\tconstructor(state) {\n\t\tthis.#state = state;\n\t}\n\tstatic none() {\n\t\treturn new TokenAtOffset({ kind: \"none\" });\n\t}\n\tstatic single(token) {\n\t\treturn new TokenAtOffset({\n\t\t\tkind: \"single\",\n\t\t\ttoken\n\t\t});\n\t}\n\tstatic between(left, right) {\n\t\treturn new TokenAtOffset({\n\t\t\tkind: \"between\",\n\t\t\tleft,\n\t\t\tright\n\t\t});\n\t}\n\tget isEmpty() {\n\t\treturn this.#state.kind === \"none\";\n\t}\n\tget isBetween() {\n\t\treturn this.#state.kind === \"between\";\n\t}\n\tleftBiased() {\n\t\tswitch (this.#state.kind) {\n\t\t\tcase \"none\": return;\n\t\t\tcase \"single\": return this.#state.token;\n\t\t\tcase \"between\": return this.#state.left;\n\t\t}\n\t}\n\trightBiased() {\n\t\tswitch (this.#state.kind) {\n\t\t\tcase \"none\": return;\n\t\t\tcase \"single\": return this.#state.token;\n\t\t\tcase \"between\": return this.#state.right;\n\t\t}\n\t}\n};\nvar SyntaxNode = class SyntaxNode {\n\tgreen;\n\toffset;\n\tparent;\n\t/** Position within the parent's children, enabling O(1) sibling navigation without rescanning the green layer. */\n\tindex;\n\tconstructor(green, offset, parent, index) {\n\t\tthis.green = green;\n\t\tthis.offset = offset;\n\t\tthis.parent = parent;\n\t\tthis.index = index;\n\t}\n\tget kind() {\n\t\treturn this.green.kind;\n\t}\n\tget textLength() {\n\t\treturn this.green.textLength;\n\t}\n\tget endOffset() {\n\t\treturn this.offset + this.textLength;\n\t}\n\t/** Whether `offset` falls within this node, inclusive of both ends. */\n\tisInside(offset) {\n\t\treturn offset >= this.offset && offset <= this.endOffset;\n\t}\n\tisOutside(offset) {\n\t\treturn !this.isInside(offset);\n\t}\n\tget firstChild() {\n\t\treturn childAt(this, 0);\n\t}\n\tget lastChild() {\n\t\tconst len = this.green.children.length;\n\t\tif (len === 0) return void 0;\n\t\treturn childAt(this, len - 1);\n\t}\n\tget nextSibling() {\n\t\treturn this.parent === void 0 ? void 0 : childAt(this.parent, this.index + 1);\n\t}\n\tget prevSibling() {\n\t\treturn this.parent === void 0 ? void 0 : childAt(this.parent, this.index - 1);\n\t}\n\t/** The sibling element immediately after this node within its parent. */\n\tget nextSiblingOrToken() {\n\t\treturn this.nextSibling;\n\t}\n\t/** The sibling element immediately before this node within its parent. */\n\tget prevSiblingOrToken() {\n\t\treturn this.prevSibling;\n\t}\n\t/** The first token in this subtree (depth-first), or `undefined` if empty. */\n\tget firstToken() {\n\t\treturn firstToken(this);\n\t}\n\t/** The last token in this subtree (depth-first), or `undefined` if empty. */\n\tget lastToken() {\n\t\treturn lastToken(this);\n\t}\n\t*children() {\n\t\tlet offset = this.offset;\n\t\tlet index = 0;\n\t\tfor (const child of this.green.children) {\n\t\t\tyield wrapElement(child, offset, this, index);\n\t\t\toffset += elementTextLength(child);\n\t\t\tindex++;\n\t\t}\n\t}\n\t*childNodes() {\n\t\tfor (const child of this.children()) if (child instanceof SyntaxNode) yield child;\n\t}\n\t*ancestors() {\n\t\tlet current = this.parent;\n\t\twhile (current) {\n\t\t\tyield current;\n\t\t\tcurrent = current.parent;\n\t\t}\n\t}\n\t/** The nearest match, testing this node itself before walking its ancestors. */\n\tfindAncestor(cast) {\n\t\tconst self = cast(this);\n\t\tif (self !== void 0) return self;\n\t\tfor (const ancestor of this.ancestors()) {\n\t\t\tconst result = cast(ancestor);\n\t\t\tif (result !== void 0) return result;\n\t\t}\n\t}\n\t*descendants() {\n\t\tconst stack = [this];\n\t\tfor (let el = stack.pop(); el !== void 0; el = stack.pop()) {\n\t\t\tyield el;\n\t\t\tif (el instanceof SyntaxNode) {\n\t\t\t\tconst children = Array.from(el.children());\n\t\t\t\tfor (let i = children.length - 1; i >= 0; i--) {\n\t\t\t\t\tconst child = children[i];\n\t\t\t\t\tif (child !== void 0) stack.push(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t*tokens() {\n\t\tfor (const el of this.descendants()) if (el instanceof SyntaxToken) yield el;\n\t}\n\t/**\n\t* The token(s) at `offset`. The between-two-tokens case (offset exactly on a\n\t* token seam) is represented explicitly so callers can left/right bias.\n\t*/\n\ttokenAtOffset(offset) {\n\t\treturn tokenAtOffsetOf(this, offset);\n\t}\n\t/**\n\t* The smallest element fully containing the range `[start, end]`. At a seam\n\t* (and for empty ranges) the left-hand element is preferred, matching\n\t* {@link containsOffset}'s inclusive span.\n\t*/\n\tcoveringElement(start, end) {\n\t\tlet result = this;\n\t\tfor (;;) {\n\t\t\tif (result instanceof SyntaxToken) return result;\n\t\t\tlet next;\n\t\t\tfor (const child of result.children()) if (containsRange(child, start, end)) {\n\t\t\t\tnext = child;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (next === void 0) return result;\n\t\t\tresult = next;\n\t\t}\n\t}\n};\nfunction elementTextLength(el) {\n\treturn el.type === \"token\" ? el.text.length : el.textLength;\n}\nfunction elementLength(el) {\n\treturn el instanceof SyntaxToken ? el.text.length : el.textLength;\n}\n/**\n* Whether `el` contains `offset`. The span is inclusive on both ends so a seam\n* offset touches both neighbours.\n*/\nfunction containsOffset(el, offset) {\n\tconst start = el.offset;\n\tconst len = elementLength(el);\n\treturn offset >= start && offset <= start + len;\n}\nfunction containsRange(el, start, end) {\n\tconst elStart = el.offset;\n\tconst len = elementLength(el);\n\treturn elStart <= start && end <= elStart + len;\n}\nfunction tokenAtOffsetOf(el, offset) {\n\tif (el instanceof SyntaxToken) return TokenAtOffset.single(el);\n\tlet left;\n\tlet right;\n\tfor (const child of el.children()) {\n\t\tif (!containsOffset(child, offset)) continue;\n\t\tif (left === void 0) left = child;\n\t\telse {\n\t\t\tright = child;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (left === void 0) return TokenAtOffset.none();\n\tif (right === void 0) return tokenAtOffsetOf(left, offset);\n\tconst leftToken = tokenAtOffsetOf(left, offset).rightBiased();\n\tconst rightToken = tokenAtOffsetOf(right, offset).leftBiased();\n\tif (leftToken !== void 0 && rightToken !== void 0) return TokenAtOffset.between(leftToken, rightToken);\n\tif (leftToken !== void 0) return TokenAtOffset.single(leftToken);\n\tif (rightToken !== void 0) return TokenAtOffset.single(rightToken);\n\treturn TokenAtOffset.none();\n}\nfunction firstToken(el) {\n\tif (el instanceof SyntaxToken) return el;\n\tfor (const child of el.children()) {\n\t\tconst token = firstToken(child);\n\t\tif (token !== void 0) return token;\n\t}\n}\nfunction lastToken(el) {\n\tif (el instanceof SyntaxToken) return el;\n\tconst children = Array.from(el.children());\n\tfor (let i = children.length - 1; i >= 0; i--) {\n\t\tconst child = children[i];\n\t\tif (child !== void 0) {\n\t\t\tconst token = lastToken(child);\n\t\t\tif (token !== void 0) return token;\n\t\t}\n\t}\n}\nfunction climbingNext(el) {\n\tlet current = el;\n\tfor (;;) {\n\t\tconst parent = current.parent;\n\t\tif (parent === void 0) return void 0;\n\t\tconst sibling = childAt(parent, current.index + 1);\n\t\tif (sibling !== void 0) return sibling;\n\t\tcurrent = parent;\n\t}\n}\nfunction climbingPrev(el) {\n\tlet current = el;\n\tfor (;;) {\n\t\tconst parent = current.parent;\n\t\tif (parent === void 0) return void 0;\n\t\tconst sibling = childAt(parent, current.index - 1);\n\t\tif (sibling !== void 0) return sibling;\n\t\tcurrent = parent;\n\t}\n}\nfunction wrapElement(green, offset, parent, index) {\n\tif (green.type === \"token\") return new SyntaxToken(green, offset, parent, index);\n\treturn new SyntaxNode(green, offset, parent, index);\n}\nfunction childAt(node, index) {\n\tconst children = node.green.children;\n\tconst target = children[index];\n\tif (target === void 0) return void 0;\n\tlet offset = node.offset;\n\tfor (let i = 0; i < index; i++) {\n\t\tconst child = children[i];\n\t\tif (child !== void 0) offset += elementTextLength(child);\n\t}\n\treturn wrapElement(target, offset, node, index);\n}\nfunction createSyntaxTree(green) {\n\treturn new SyntaxNode(green, 0, void 0, 0);\n}\n//#endregion\n//#region src/syntax/ast-helpers.ts\nfunction findChildToken(node, kind) {\n\tfor (const child of node.children()) if (!(child instanceof SyntaxNode) && child.kind === kind) return child;\n}\nfunction findFirstChild(node, cast) {\n\tfor (const child of node.childNodes()) {\n\t\tconst result = cast(child);\n\t\tif (result !== void 0) return result;\n\t}\n}\nfunction* filterChildren(node, cast) {\n\tfor (const child of node.childNodes()) {\n\t\tconst result = cast(child);\n\t\tif (result !== void 0) yield result;\n\t}\n}\nfunction any(...casts) {\n\treturn (node) => {\n\t\tfor (const cast of casts) {\n\t\t\tconst result = cast(node);\n\t\t\tif (result !== void 0) return result;\n\t\t}\n\t};\n}\n/**\n* Raw source text of a CST node, verbatim (quotes and brackets preserved). For\n* the decoded value of a string literal, decode it instead.\n*/\nfunction printSyntax(node) {\n\tlet text = \"\";\n\tfor (const token of node.tokens()) text += token.text;\n\treturn text;\n}\n//#endregion\n//#region src/syntax/ast/identifier.ts\nvar IdentifierAst = class IdentifierAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\ttoken() {\n\t\treturn findChildToken(this.syntax, \"Ident\");\n\t}\n\tname() {\n\t\treturn this.token()?.text;\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"Identifier\" ? new IdentifierAst(node) : void 0;\n\t}\n};\n//#endregion\n//#region src/syntax/ast/qualified-name.ts\n/** A namespace-qualified name, e.g. `pgvector.Vector` or `supabase:auth.User`. */\nvar QualifiedNameAst = class QualifiedNameAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\t#segmentBefore(boundary) {\n\t\tlet found;\n\t\tfor (const segment of filterChildren(this.syntax, IdentifierAst.cast)) {\n\t\t\tif (segment.syntax.offset >= boundary) break;\n\t\t\tfound = segment;\n\t\t}\n\t\treturn found;\n\t}\n\t#segmentAfter(boundary) {\n\t\tfor (const segment of filterChildren(this.syntax, IdentifierAst.cast)) if (segment.syntax.offset > boundary) return segment;\n\t}\n\t#separatorCount(kind) {\n\t\tlet count = 0;\n\t\tfor (const child of this.syntax.children()) if (!(child instanceof SyntaxNode) && child.kind === kind) count++;\n\t\treturn count;\n\t}\n\tcolon() {\n\t\treturn findChildToken(this.syntax, \"Colon\");\n\t}\n\tdot() {\n\t\treturn findChildToken(this.syntax, \"Dot\");\n\t}\n\tspace() {\n\t\tconst colon = this.colon();\n\t\tif (!colon) return void 0;\n\t\treturn this.#segmentBefore(colon.offset);\n\t}\n\tnamespace() {\n\t\tconst dot = this.dot();\n\t\tif (!dot) return void 0;\n\t\treturn this.#segmentBefore(dot.offset);\n\t}\n\tidentifier() {\n\t\tconst dot = this.dot();\n\t\tif (dot) return this.#segmentAfter(dot.offset);\n\t\tconst colon = this.colon();\n\t\tif (colon) return this.#segmentAfter(colon.offset);\n\t\treturn findFirstChild(this.syntax, IdentifierAst.cast);\n\t}\n\t/**\n\t* Every identifier segment, in source order. A bare `Vector` yields\n\t* `['Vector']`; a qualified `pgvector.Vector` yields `['pgvector', 'Vector']`.\n\t*/\n\tpath() {\n\t\tconst segments = [];\n\t\tfor (const segment of filterChildren(this.syntax, IdentifierAst.cast)) {\n\t\t\tconst text = segment.token()?.text;\n\t\t\tif (text !== void 0) segments.push(text);\n\t\t}\n\t\treturn segments;\n\t}\n\t/** True iff this is a single unqualified identifier whose text equals `name`. */\n\tisSimpleName(name) {\n\t\tif (this.dot() !== void 0 || this.colon() !== void 0) return false;\n\t\treturn this.identifier()?.token()?.text === name;\n\t}\n\t/**\n\t* Flags a malformed name with more qualifier segments than allowed (a second\n\t* `:`-space or a second `.`-namespace).\n\t*/\n\tisOverQualified() {\n\t\treturn this.#separatorCount(\"Dot\") > 1 || this.#separatorCount(\"Colon\") > 1;\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"QualifiedName\" ? new QualifiedNameAst(node) : void 0;\n\t}\n};\n//#endregion\n//#region src/syntax/ast/expressions.ts\nvar FunctionCallAst = class FunctionCallAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\t/** The qualified-name callee, or `undefined` when identifier segments sit directly under the node. */\n\tname() {\n\t\treturn findFirstChild(this.syntax, QualifiedNameAst.cast);\n\t}\n\t/**\n\t* The dotted call path, in source order. A bare `Vector(…)` yields\n\t* `['Vector']`; a namespace-qualified `pgvector.Vector(…)` yields\n\t* `['pgvector', 'Vector']`. Empty when the call carries no identifier.\n\t*/\n\tpath() {\n\t\tconst qualified = this.name();\n\t\tconst segments = [];\n\t\tfor (const segment of filterChildren(qualified?.syntax ?? this.syntax, IdentifierAst.cast)) {\n\t\t\tconst text = segment.token()?.text;\n\t\t\tif (text !== void 0) segments.push(text);\n\t\t}\n\t\treturn segments;\n\t}\n\tlparen() {\n\t\treturn findChildToken(this.syntax, \"LParen\");\n\t}\n\trparen() {\n\t\treturn findChildToken(this.syntax, \"RParen\");\n\t}\n\t*args() {\n\t\tyield* filterChildren(this.syntax, AttributeArgAst.cast);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"FunctionCall\" ? new FunctionCallAst(node) : void 0;\n\t}\n};\nvar ArrayLiteralAst = class ArrayLiteralAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tlbracket() {\n\t\treturn findChildToken(this.syntax, \"LBracket\");\n\t}\n\trbracket() {\n\t\treturn findChildToken(this.syntax, \"RBracket\");\n\t}\n\t*elements() {\n\t\tyield* filterChildren(this.syntax, castExpression);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"ArrayLiteral\" ? new ArrayLiteralAst(node) : void 0;\n\t}\n};\nconst HEX = /^[0-9a-fA-F]+$/;\nfunction decodeFixedHex(raw, start, width) {\n\tif (start + width > raw.length) return void 0;\n\tconst hex = raw.slice(start, start + width);\n\tif (!HEX.test(hex)) return void 0;\n\treturn String.fromCharCode(Number.parseInt(hex, 16));\n}\nfunction decodeStringLiteral(raw) {\n\tlet out = \"\";\n\tlet i = 0;\n\twhile (i < raw.length) {\n\t\tconst ch = raw.charAt(i);\n\t\tif (ch !== \"\\\\\" || i + 1 >= raw.length) {\n\t\t\tout += ch;\n\t\t\ti++;\n\t\t\tcontinue;\n\t\t}\n\t\tconst next = raw.charAt(i + 1);\n\t\tswitch (next) {\n\t\t\tcase \"n\":\n\t\t\t\tout += \"\\n\";\n\t\t\t\ti += 2;\n\t\t\t\tcontinue;\n\t\t\tcase \"r\":\n\t\t\t\tout += \"\\r\";\n\t\t\t\ti += 2;\n\t\t\t\tcontinue;\n\t\t\tcase \"t\":\n\t\t\t\tout += \"\t\";\n\t\t\t\ti += 2;\n\t\t\t\tcontinue;\n\t\t\tcase \"\\\"\":\n\t\t\t\tout += \"\\\"\";\n\t\t\t\ti += 2;\n\t\t\t\tcontinue;\n\t\t\tcase \"'\":\n\t\t\t\tout += \"'\";\n\t\t\t\ti += 2;\n\t\t\t\tcontinue;\n\t\t\tcase \"\\\\\":\n\t\t\t\tout += \"\\\\\";\n\t\t\t\ti += 2;\n\t\t\t\tcontinue;\n\t\t\tcase \"x\": {\n\t\t\t\tconst decoded = decodeFixedHex(raw, i + 2, 2);\n\t\t\t\tif (decoded === void 0) {\n\t\t\t\t\tout += \"\\\\x\";\n\t\t\t\t\ti += 2;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tout += decoded;\n\t\t\t\ti += 4;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tcase \"u\": {\n\t\t\t\tconst decoded = decodeFixedHex(raw, i + 2, 4);\n\t\t\t\tif (decoded === void 0) {\n\t\t\t\t\tout += \"\\\\u\";\n\t\t\t\t\ti += 2;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tout += decoded;\n\t\t\t\ti += 6;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\tout += `\\\\${next}`;\n\t\t\t\ti += 2;\n\t\t\t\tcontinue;\n\t\t}\n\t}\n\treturn out;\n}\nvar StringLiteralExprAst = class StringLiteralExprAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\ttoken() {\n\t\treturn findChildToken(this.syntax, \"StringLiteral\");\n\t}\n\tvalue() {\n\t\tconst tok = this.token();\n\t\tif (!tok) return void 0;\n\t\treturn decodeStringLiteral(tok.text.slice(1, -1));\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"StringLiteralExpr\" ? new StringLiteralExprAst(node) : void 0;\n\t}\n};\nvar NumberLiteralExprAst = class NumberLiteralExprAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\ttoken() {\n\t\treturn findChildToken(this.syntax, \"NumberLiteral\");\n\t}\n\tvalue() {\n\t\tconst tok = this.token();\n\t\tif (!tok) return void 0;\n\t\treturn Number(tok.text);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"NumberLiteralExpr\" ? new NumberLiteralExprAst(node) : void 0;\n\t}\n};\nvar BooleanLiteralExprAst = class BooleanLiteralExprAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\ttoken() {\n\t\treturn findChildToken(this.syntax, \"Ident\");\n\t}\n\tvalue() {\n\t\tconst tok = this.token();\n\t\tif (!tok) return void 0;\n\t\tif (tok.text === \"true\") return true;\n\t\tif (tok.text === \"false\") return false;\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"BooleanLiteralExpr\" ? new BooleanLiteralExprAst(node) : void 0;\n\t}\n};\nvar ObjectLiteralExprAst = class ObjectLiteralExprAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tlbrace() {\n\t\treturn findChildToken(this.syntax, \"LBrace\");\n\t}\n\trbrace() {\n\t\treturn findChildToken(this.syntax, \"RBrace\");\n\t}\n\t*fields() {\n\t\tyield* filterChildren(this.syntax, ObjectFieldAst.cast);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"ObjectLiteralExpr\" ? new ObjectLiteralExprAst(node) : void 0;\n\t}\n};\nvar ObjectFieldAst = class ObjectFieldAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tkey() {\n\t\tfor (const child of this.syntax.children()) {\n\t\t\tif (!(child instanceof SyntaxNode)) {\n\t\t\t\tif (child.kind === \"Colon\") break;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn IdentifierAst.cast(child);\n\t\t}\n\t}\n\t/**\n\t* The field's logical key name, unquoted. An identifier key (`length:`) yields\n\t* its text; a string-literal key (`\"length\":`) yields the decoded string.\n\t* `undefined` when the field carries no key node.\n\t*/\n\tkeyName() {\n\t\tfor (const child of this.syntax.children()) {\n\t\t\tif (!(child instanceof SyntaxNode)) {\n\t\t\t\tif (child.kind === \"Colon\") break;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst identifier = IdentifierAst.cast(child);\n\t\t\tif (identifier) return identifier.token()?.text;\n\t\t\tconst stringKey = StringLiteralExprAst.cast(child);\n\t\t\tif (stringKey) return stringKey.value();\n\t\t\treturn;\n\t\t}\n\t}\n\tcolon() {\n\t\treturn findChildToken(this.syntax, \"Colon\");\n\t}\n\tvalue() {\n\t\tif (this.colon()) {\n\t\t\tlet pastColon = false;\n\t\t\tfor (const child of this.syntax.children()) {\n\t\t\t\tif (!(child instanceof SyntaxNode)) {\n\t\t\t\t\tif (child.kind === \"Colon\") pastColon = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (pastColon) {\n\t\t\t\t\tconst expr = castExpression(child);\n\t\t\t\t\tif (expr) return expr;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\treturn findFirstChild(this.syntax, castExpression);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"ObjectField\" ? new ObjectFieldAst(node) : void 0;\n\t}\n};\nfunction castExpression(node) {\n\treturn FunctionCallAst.cast(node) ?? ArrayLiteralAst.cast(node) ?? StringLiteralExprAst.cast(node) ?? NumberLiteralExprAst.cast(node) ?? BooleanLiteralExprAst.cast(node) ?? ObjectLiteralExprAst.cast(node) ?? IdentifierAst.cast(node);\n}\nvar AttributeArgAst = class AttributeArgAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tname() {\n\t\tif (!this.colon()) return void 0;\n\t\treturn findFirstChild(this.syntax, IdentifierAst.cast);\n\t}\n\tcolon() {\n\t\treturn findChildToken(this.syntax, \"Colon\");\n\t}\n\tvalue() {\n\t\tif (this.colon()) {\n\t\t\tlet pastColon = false;\n\t\t\tfor (const child of this.syntax.children()) {\n\t\t\t\tif (!(child instanceof SyntaxNode)) {\n\t\t\t\t\tif (child.kind === \"Colon\") pastColon = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (pastColon) {\n\t\t\t\t\tconst expr = castExpression(child);\n\t\t\t\t\tif (expr) return expr;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\treturn findFirstChild(this.syntax, castExpression);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"AttributeArg\" ? new AttributeArgAst(node) : void 0;\n\t}\n};\n//#endregion\n//#region src/syntax/ast/attributes.ts\nvar AttributeArgListAst = class AttributeArgListAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tlparen() {\n\t\treturn findChildToken(this.syntax, \"LParen\");\n\t}\n\trparen() {\n\t\treturn findChildToken(this.syntax, \"RParen\");\n\t}\n\t*args() {\n\t\tyield* filterChildren(this.syntax, AttributeArgAst.cast);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"AttributeArgList\" ? new AttributeArgListAst(node) : void 0;\n\t}\n};\nvar FieldAttributeAst = class FieldAttributeAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tat() {\n\t\treturn findChildToken(this.syntax, \"At\");\n\t}\n\tname() {\n\t\treturn findFirstChild(this.syntax, QualifiedNameAst.cast);\n\t}\n\targList() {\n\t\treturn findFirstChild(this.syntax, AttributeArgListAst.cast);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"FieldAttribute\" ? new FieldAttributeAst(node) : void 0;\n\t}\n};\nvar ModelAttributeAst = class ModelAttributeAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tdoubleAt() {\n\t\treturn findChildToken(this.syntax, \"DoubleAt\");\n\t}\n\tname() {\n\t\treturn findFirstChild(this.syntax, QualifiedNameAst.cast);\n\t}\n\targList() {\n\t\treturn findFirstChild(this.syntax, AttributeArgListAst.cast);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"ModelAttribute\" ? new ModelAttributeAst(node) : void 0;\n\t}\n};\n//#endregion\n//#region src/syntax/ast/type-annotation.ts\nvar TypeAnnotationAst = class TypeAnnotationAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\t/** The annotation's reference, doubling as the constructor callee when an {@link argList} follows. */\n\tname() {\n\t\treturn findFirstChild(this.syntax, QualifiedNameAst.cast);\n\t}\n\t/** Present when the annotation is a constructor (`Vector(1536)`) rather than a plain reference. */\n\targList() {\n\t\treturn findFirstChild(this.syntax, AttributeArgListAst.cast);\n\t}\n\tisConstructor() {\n\t\treturn this.argList() !== void 0;\n\t}\n\tlbracket() {\n\t\treturn findChildToken(this.syntax, \"LBracket\");\n\t}\n\trbracket() {\n\t\treturn findChildToken(this.syntax, \"RBracket\");\n\t}\n\tquestionMark() {\n\t\treturn findChildToken(this.syntax, \"Question\");\n\t}\n\tisList() {\n\t\treturn this.lbracket() !== void 0;\n\t}\n\tisOptional() {\n\t\treturn this.questionMark() !== void 0;\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"TypeAnnotation\" ? new TypeAnnotationAst(node) : void 0;\n\t}\n};\n//#endregion\n//#region src/syntax/ast/declarations.ts\nfunction castNamespaceMember(node) {\n\treturn ModelDeclarationAst.cast(node) ?? CompositeTypeDeclarationAst.cast(node) ?? GenericBlockDeclarationAst.cast(node);\n}\nvar DocumentAst = class DocumentAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\t*declarations() {\n\t\tyield* filterChildren(this.syntax, (node) => castNamespaceMember(node) ?? TypesBlockAst.cast(node) ?? NamespaceDeclarationAst.cast(node));\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"Document\" ? new DocumentAst(node) : void 0;\n\t}\n};\nvar ModelDeclarationAst = class ModelDeclarationAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tkeyword() {\n\t\treturn findChildToken(this.syntax, \"Ident\");\n\t}\n\tname() {\n\t\treturn findFirstChild(this.syntax, IdentifierAst.cast);\n\t}\n\tlbrace() {\n\t\treturn findChildToken(this.syntax, \"LBrace\");\n\t}\n\trbrace() {\n\t\treturn findChildToken(this.syntax, \"RBrace\");\n\t}\n\t*fields() {\n\t\tyield* filterChildren(this.syntax, FieldDeclarationAst.cast);\n\t}\n\t*attributes() {\n\t\tyield* filterChildren(this.syntax, ModelAttributeAst.cast);\n\t}\n\t*members() {\n\t\tyield* filterChildren(this.syntax, (node) => FieldDeclarationAst.cast(node) ?? ModelAttributeAst.cast(node));\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"ModelDeclaration\" ? new ModelDeclarationAst(node) : void 0;\n\t}\n};\nvar CompositeTypeDeclarationAst = class CompositeTypeDeclarationAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tkeyword() {\n\t\treturn findChildToken(this.syntax, \"Ident\");\n\t}\n\tname() {\n\t\treturn findFirstChild(this.syntax, IdentifierAst.cast);\n\t}\n\tlbrace() {\n\t\treturn findChildToken(this.syntax, \"LBrace\");\n\t}\n\trbrace() {\n\t\treturn findChildToken(this.syntax, \"RBrace\");\n\t}\n\t*fields() {\n\t\tyield* filterChildren(this.syntax, FieldDeclarationAst.cast);\n\t}\n\t*attributes() {\n\t\tyield* filterChildren(this.syntax, ModelAttributeAst.cast);\n\t}\n\t*members() {\n\t\tyield* filterChildren(this.syntax, (node) => FieldDeclarationAst.cast(node) ?? ModelAttributeAst.cast(node));\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"CompositeTypeDeclaration\" ? new CompositeTypeDeclarationAst(node) : void 0;\n\t}\n};\nvar NamespaceDeclarationAst = class NamespaceDeclarationAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tkeyword() {\n\t\treturn findChildToken(this.syntax, \"Ident\");\n\t}\n\tname() {\n\t\treturn findFirstChild(this.syntax, IdentifierAst.cast);\n\t}\n\tlbrace() {\n\t\treturn findChildToken(this.syntax, \"LBrace\");\n\t}\n\trbrace() {\n\t\treturn findChildToken(this.syntax, \"RBrace\");\n\t}\n\t*declarations() {\n\t\tyield* filterChildren(this.syntax, castNamespaceMember);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"Namespace\" ? new NamespaceDeclarationAst(node) : void 0;\n\t}\n};\nvar TypesBlockAst = class TypesBlockAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tkeyword() {\n\t\treturn findChildToken(this.syntax, \"Ident\");\n\t}\n\tlbrace() {\n\t\treturn findChildToken(this.syntax, \"LBrace\");\n\t}\n\trbrace() {\n\t\treturn findChildToken(this.syntax, \"RBrace\");\n\t}\n\t*declarations() {\n\t\tyield* filterChildren(this.syntax, NamedTypeDeclarationAst.cast);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"TypesBlock\" ? new TypesBlockAst(node) : void 0;\n\t}\n};\nvar GenericBlockDeclarationAst = class GenericBlockDeclarationAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tkeyword() {\n\t\treturn findChildToken(this.syntax, \"Ident\");\n\t}\n\tname() {\n\t\treturn findFirstChild(this.syntax, IdentifierAst.cast);\n\t}\n\tlbrace() {\n\t\treturn findChildToken(this.syntax, \"LBrace\");\n\t}\n\trbrace() {\n\t\treturn findChildToken(this.syntax, \"RBrace\");\n\t}\n\t*entries() {\n\t\tyield* filterChildren(this.syntax, KeyValuePairAst.cast);\n\t}\n\t*attributes() {\n\t\tyield* filterChildren(this.syntax, ModelAttributeAst.cast);\n\t}\n\t*members() {\n\t\tyield* filterChildren(this.syntax, (node) => KeyValuePairAst.cast(node) ?? ModelAttributeAst.cast(node));\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"GenericBlockDeclaration\" ? new GenericBlockDeclarationAst(node) : void 0;\n\t}\n};\nvar KeyValuePairAst = class KeyValuePairAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tkey() {\n\t\treturn findFirstChild(this.syntax, IdentifierAst.cast);\n\t}\n\tequals() {\n\t\treturn findChildToken(this.syntax, \"Equals\");\n\t}\n\tvalue() {\n\t\tlet pastEquals = false;\n\t\tfor (const child of this.syntax.children()) {\n\t\t\tif (!(child instanceof SyntaxNode)) {\n\t\t\t\tif (child.kind === \"Equals\") pastEquals = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (pastEquals) {\n\t\t\t\tconst expr = castExpression(child);\n\t\t\t\tif (expr) return expr;\n\t\t\t}\n\t\t}\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"KeyValuePair\" ? new KeyValuePairAst(node) : void 0;\n\t}\n};\nvar FieldDeclarationAst = class FieldDeclarationAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tname() {\n\t\treturn findFirstChild(this.syntax, IdentifierAst.cast);\n\t}\n\ttypeAnnotation() {\n\t\treturn findFirstChild(this.syntax, TypeAnnotationAst.cast);\n\t}\n\t*attributes() {\n\t\tyield* filterChildren(this.syntax, FieldAttributeAst.cast);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"FieldDeclaration\" ? new FieldDeclarationAst(node) : void 0;\n\t}\n};\nvar NamedTypeDeclarationAst = class NamedTypeDeclarationAst {\n\tsyntax;\n\tconstructor(syntax) {\n\t\tthis.syntax = syntax;\n\t}\n\tname() {\n\t\treturn findFirstChild(this.syntax, IdentifierAst.cast);\n\t}\n\tequals() {\n\t\treturn findChildToken(this.syntax, \"Equals\");\n\t}\n\ttypeAnnotation() {\n\t\treturn findFirstChild(this.syntax, TypeAnnotationAst.cast);\n\t}\n\t*attributes() {\n\t\tyield* filterChildren(this.syntax, FieldAttributeAst.cast);\n\t}\n\tstatic cast(node) {\n\t\treturn node.kind === \"NamedTypeDeclaration\" ? new NamedTypeDeclarationAst(node) : void 0;\n\t}\n};\n//#endregion\nexport { SyntaxNode as A, QualifiedNameAst as C, findChildToken as D, filterChildren as E, TokenAtOffset as M, createSyntaxTree as N, findFirstChild as O, castExpression as S, any as T, FunctionCallAst as _, KeyValuePairAst as a, ObjectLiteralExprAst as b, NamespaceDeclarationAst as c, AttributeArgListAst as d, FieldAttributeAst as f, BooleanLiteralExprAst as g, AttributeArgAst as h, GenericBlockDeclarationAst as i, SyntaxToken as j, printSyntax as k, TypesBlockAst as l, ArrayLiteralAst as m, DocumentAst as n, ModelDeclarationAst as o, ModelAttributeAst as p, FieldDeclarationAst as r, NamedTypeDeclarationAst as s, CompositeTypeDeclarationAst as t, TypeAnnotationAst as u, NumberLiteralExprAst as v, IdentifierAst as w, StringLiteralExprAst as x, ObjectFieldAst as y };\n\n//# sourceMappingURL=declarations-DR6To8_k.mjs.map"],"mappings":";;;;;;;;AAQA,IAAI,cAAc,MAAM;CACvB;CACA;CACA;CACA;CACA;;CAEA;C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AQ,cAAc,IAAI;CACtD;CACA,SAAS;EACR,OAAO,eAAe,KAAK,QAAQ,QAAQ;CAC5C;CACA,iBAAiB;EAChB,OAAO,eAAe,KAAK,QAAQ,kBAAkB,IAAI;CAC1D;CACA,CAAC,aAAa;EACb,OAAO,eAAe,KAAK,QAAQ,kBAAkB,IAAI;CAC1D;CACA,OAAO,KAAK,MAAM;EACjB,OAAO,KAAK,SAAS,yBAAyB,IAAI,wBAAwB,IAAI,IAAI,KAAK;CACxF;AACD"}
@@ -0,0 +1,39 @@
1
+ import { a as structuredError } from "./structured-error-H6WU9Kjt.mjs";
2
+ //#region ../../../1-framework/0-foundation/contract/dist/default-namespace-D4vCwkXg.mjs
3
+ function contractError(code, message, options) {
4
+ return structuredError(code, message, options);
5
+ }
6
+ /**
7
+ * Reserved sentinel domain namespace id for the late-bound application-domain
8
+ * slot — the namespace a model lands in when it is authored without an explicit
9
+ * namespace. This is target-agnostic: targets that allow un-namespaced
10
+ * authoring (e.g. Mongo, SQLite) declare this id as their default on the target
11
+ * descriptor; the framework names the sentinel, never a target. Mirrors
12
+ * storage's `UNBOUND_NAMESPACE_ID` on the domain plane.
13
+ */
14
+ const UNBOUND_DOMAIN_NAMESPACE_ID = "__unbound__";
15
+ /**
16
+ * Resolve the single domain namespace of a single-namespace contract.
17
+ *
18
+ * Bare-name access (`db.User`) reads "the contract's one namespace". Every
19
+ * contract in scope today declares exactly one domain namespace, so this is
20
+ * exact — there is nothing to infer. A contract that declares more than one
21
+ * namespace is ambiguous for a bare name, so rather than silently pick one this
22
+ * throws; cross-namespace selection is made explicit (TML-2550).
23
+ */
24
+ function soleDomainNamespaceId(domain) {
25
+ const [soleNamespaceId, ...rest] = Object.keys(domain.namespaces);
26
+ if (soleNamespaceId === void 0) throw contractError("CONTRACT.NAMESPACE_INVALID", "domain has no namespaces", { meta: { reason: "no-domain-namespaces" } });
27
+ if (rest.length > 0) {
28
+ const all = [soleNamespaceId, ...rest];
29
+ throw contractError("CONTRACT.NAMESPACE_INVALID", `bare-name resolution requires exactly one domain namespace, found ${all.length} (${all.join(", ")}); select a namespace explicitly`, { meta: {
30
+ reason: "multiple-domain-namespaces",
31
+ namespaceIds: all
32
+ } });
33
+ }
34
+ return soleNamespaceId;
35
+ }
36
+ //#endregion
37
+ export { contractError as n, soleDomainNamespaceId as r, UNBOUND_DOMAIN_NAMESPACE_ID as t };
38
+
39
+ //# sourceMappingURL=default-namespace-D4vCwkXg-BaiW8LNK.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-namespace-D4vCwkXg-BaiW8LNK.mjs","names":[],"sources":["../../../../1-framework/0-foundation/contract/dist/default-namespace-D4vCwkXg.mjs"],"sourcesContent":["import { structuredError } from \"@internal/utils/structured-error\";\n//#region src/contract-errors.ts\nfunction contractError(code, message, options) {\n\treturn structuredError(code, message, options);\n}\n//#endregion\n//#region src/default-namespace.ts\n/**\n* Reserved sentinel domain namespace id for the late-bound application-domain\n* slot — the namespace a model lands in when it is authored without an explicit\n* namespace. This is target-agnostic: targets that allow un-namespaced\n* authoring (e.g. Mongo, SQLite) declare this id as their default on the target\n* descriptor; the framework names the sentinel, never a target. Mirrors\n* storage's `UNBOUND_NAMESPACE_ID` on the domain plane.\n*/\nconst UNBOUND_DOMAIN_NAMESPACE_ID = \"__unbound__\";\n/**\n* Resolve the single domain namespace of a single-namespace contract.\n*\n* Bare-name access (`db.User`) reads \"the contract's one namespace\". Every\n* contract in scope today declares exactly one domain namespace, so this is\n* exact — there is nothing to infer. A contract that declares more than one\n* namespace is ambiguous for a bare name, so rather than silently pick one this\n* throws; cross-namespace selection is made explicit (TML-2550).\n*/\nfunction soleDomainNamespaceId(domain) {\n\tconst [soleNamespaceId, ...rest] = Object.keys(domain.namespaces);\n\tif (soleNamespaceId === void 0) throw contractError(\"CONTRACT.NAMESPACE_INVALID\", \"domain has no namespaces\", { meta: { reason: \"no-domain-namespaces\" } });\n\tif (rest.length > 0) {\n\t\tconst all = [soleNamespaceId, ...rest];\n\t\tthrow contractError(\"CONTRACT.NAMESPACE_INVALID\", `bare-name resolution requires exactly one domain namespace, found ${all.length} (${all.join(\", \")}); select a namespace explicitly`, { meta: {\n\t\t\treason: \"multiple-domain-namespaces\",\n\t\t\tnamespaceIds: all\n\t\t} });\n\t}\n\treturn soleNamespaceId;\n}\n//#endregion\nexport { soleDomainNamespaceId as n, contractError as r, UNBOUND_DOMAIN_NAMESPACE_ID as t };\n\n//# sourceMappingURL=default-namespace-D4vCwkXg.mjs.map"],"mappings":";;AAEA,SAAS,cAAc,MAAM,SAAS,SAAS;CAC9C,OAAO,gBAAgB,MAAM,SAAS,OAAO;AAC9C;;;;;;;;;AAWA,MAAM,8BAA8B;;;;;;;;;;AAUpC,SAAS,sBAAsB,QAAQ;CACtC,MAAM,CAAC,iBAAiB,GAAG,QAAQ,OAAO,KAAK,OAAO,UAAU;CAChE,IAAI,oBAAoB,KAAK,GAAG,MAAM,cAAc,8BAA8B,4BAA4B,EAAE,MAAM,EAAE,QAAQ,uBAAuB,EAAE,CAAC;CAC1J,IAAI,KAAK,SAAS,GAAG;EACpB,MAAM,MAAM,CAAC,iBAAiB,GAAG,IAAI;EACrC,MAAM,cAAc,8BAA8B,qEAAqE,IAAI,OAAO,IAAI,IAAI,KAAK,IAAI,EAAE,mCAAmC,EAAE,MAAM;GAC/L,QAAQ;GACR,cAAc;EACf,EAAE,CAAC;CACJ;CACA,OAAO;AACR"}
@@ -0,0 +1,26 @@
1
+ //#region ../../../1-framework/0-foundation/contract/dist/default-namespace-D5X_k6hJ.d.mts
2
+ //#region src/default-namespace.d.ts
3
+ /**
4
+ * Reserved sentinel domain namespace id for the late-bound application-domain
5
+ * slot — the namespace a model lands in when it is authored without an explicit
6
+ * namespace. This is target-agnostic: targets that allow un-namespaced
7
+ * authoring (e.g. Mongo, SQLite) declare this id as their default on the target
8
+ * descriptor; the framework names the sentinel, never a target. Mirrors
9
+ * storage's `UNBOUND_NAMESPACE_ID` on the domain plane.
10
+ */
11
+ declare const UNBOUND_DOMAIN_NAMESPACE_ID: "__unbound__";
12
+ /**
13
+ * Resolve the single domain namespace of a single-namespace contract.
14
+ *
15
+ * Bare-name access (`db.User`) reads "the contract's one namespace". Every
16
+ * contract in scope today declares exactly one domain namespace, so this is
17
+ * exact — there is nothing to infer. A contract that declares more than one
18
+ * namespace is ambiguous for a bare name, so rather than silently pick one this
19
+ * throws; cross-namespace selection is made explicit (TML-2550).
20
+ */
21
+ declare function soleDomainNamespaceId(domain: {
22
+ readonly namespaces: Readonly<Record<string, unknown>>;
23
+ }): string;
24
+ //#endregion
25
+ export { soleDomainNamespaceId as n, UNBOUND_DOMAIN_NAMESPACE_ID as t };
26
+ //# sourceMappingURL=default-namespace-D5X_k6hJ-GH8P1ror.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-namespace-D5X_k6hJ-GH8P1ror.d.mts","names":[],"sources":["../../../../1-framework/0-foundation/contract/dist/default-namespace-D5X_k6hJ.d.mts"],"mappings":";;;;;;;;;;cASc;;;;;;;;;;iBAUG,sBAAsB;WAC5B,YAAY,SAAS"}
@@ -0,0 +1,31 @@
1
+ import { t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
2
+ //#region ../../../1-framework/0-foundation/utils/dist/defined-BQWA85QH.mjs
3
+ /**
4
+ * Returns an object with the key/value if value is defined, otherwise an empty object.
5
+ *
6
+ * Use with spread to conditionally include optional properties while satisfying
7
+ * exactOptionalPropertyTypes. This is explicit about which properties are optional
8
+ * and won't inadvertently strip other undefined values.
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * // Instead of:
13
+ * const obj = {
14
+ * required: 'value',
15
+ * ...(optional ? { optional } : {}),
16
+ * };
17
+ *
18
+ * // Use:
19
+ * const obj = {
20
+ * required: 'value',
21
+ * ...ifDefined('optional', optional),
22
+ * };
23
+ * ```
24
+ */
25
+ function ifDefined(key, value) {
26
+ return value !== void 0 ? blindCast({ [key]: value }) : {};
27
+ }
28
+ //#endregion
29
+ export { ifDefined as t };
30
+
31
+ //# sourceMappingURL=defined-BQWA85QH-BRSBMULx.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defined-BQWA85QH-BRSBMULx.mjs","names":[],"sources":["../../../../1-framework/0-foundation/utils/dist/defined-BQWA85QH.mjs"],"sourcesContent":["import { t as blindCast } from \"./casts-DpaahrlC.mjs\";\n//#region src/defined.ts\n/**\n* Returns an object with the key/value if value is defined, otherwise an empty object.\n*\n* Use with spread to conditionally include optional properties while satisfying\n* exactOptionalPropertyTypes. This is explicit about which properties are optional\n* and won't inadvertently strip other undefined values.\n*\n* @example\n* ```typescript\n* // Instead of:\n* const obj = {\n* required: 'value',\n* ...(optional ? { optional } : {}),\n* };\n*\n* // Use:\n* const obj = {\n* required: 'value',\n* ...ifDefined('optional', optional),\n* };\n* ```\n*/\nfunction ifDefined(key, value) {\n\treturn value !== void 0 ? blindCast({ [key]: value }) : {};\n}\n//#endregion\nexport { ifDefined as t };\n\n//# sourceMappingURL=defined-BQWA85QH.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAwBA,SAAS,UAAU,KAAK,OAAO;CAC9B,OAAO,UAAU,KAAK,IAAI,UAAU,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC;AAC1D"}
@@ -0,0 +1,28 @@
1
+ //#region ../../../1-framework/0-foundation/utils/dist/defined.d.mts
2
+ //#region src/defined.d.ts
3
+ /**
4
+ * Returns an object with the key/value if value is defined, otherwise an empty object.
5
+ *
6
+ * Use with spread to conditionally include optional properties while satisfying
7
+ * exactOptionalPropertyTypes. This is explicit about which properties are optional
8
+ * and won't inadvertently strip other undefined values.
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * // Instead of:
13
+ * const obj = {
14
+ * required: 'value',
15
+ * ...(optional ? { optional } : {}),
16
+ * };
17
+ *
18
+ * // Use:
19
+ * const obj = {
20
+ * required: 'value',
21
+ * ...ifDefined('optional', optional),
22
+ * };
23
+ * ```
24
+ */
25
+ declare function ifDefined<K extends string, V>(key: K, value: V | undefined): Record<never, never> | { [P in K]: V; };
26
+ //#endregion
27
+ export { ifDefined as t };
28
+ //# sourceMappingURL=defined-BSXuxrnl.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defined-BSXuxrnl.d.mts","names":[],"sources":["../../../../1-framework/0-foundation/utils/dist/defined.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;iBAuBiB,UAAU,kBAAkB,GAAG,KAAK,GAAG,OAAO,gBAAgB,0BAA0B,KAAK,IAAI"}
@@ -0,0 +1,359 @@
1
+ //#region ../../../1-framework/0-foundation/contract/dist/domain-envelope-D6Wn9AmZ.d.mts
2
+ //#region src/namespace-id.d.ts
3
+ type NamespaceId = string & {
4
+ readonly __brand: 'NamespaceId';
5
+ };
6
+ declare function asNamespaceId(value: string): NamespaceId;
7
+ //#endregion
8
+ //#region src/cross-reference.d.ts
9
+ interface CrossReference {
10
+ readonly namespace: NamespaceId;
11
+ readonly model: string;
12
+ /**
13
+ * Contract-space identity for cross-space relations. When present, the
14
+ * referenced model lives in a different contract space. Absent for local
15
+ * (same-space) relations.
16
+ */
17
+ readonly space?: string;
18
+ }
19
+ declare const CrossReferenceSchema: import("arktype/internal/variants/object.ts").ObjectType<CrossReference, {}>;
20
+ declare function crossRef(model: string, namespace?: string, space?: string): CrossReference;
21
+ //#endregion
22
+ //#region src/types.d.ts
23
+ /**
24
+ * Unique symbol used as the key for branding types.
25
+ */
26
+ declare const $: unique symbol;
27
+ /**
28
+ * A helper type to brand a given type with a unique identifier.
29
+ *
30
+ * @template TKey Text used as the brand key.
31
+ * @template TValue Optional value associated with the brand key. Defaults to `true`.
32
+ */
33
+ type Brand<TKey extends string | number | symbol, TValue = true> = {
34
+ [$]: { [K in TKey]: TValue; };
35
+ };
36
+ /**
37
+ * Base type for storage contract hashes.
38
+ * Emitted contract.d.ts files use this with the hash value as a type parameter:
39
+ * `type StorageHash = StorageHashBase<'abc123...'>`
40
+ */
41
+ type StorageHashBase<THash extends string> = THash & Brand<'StorageHash'>;
42
+ /**
43
+ * Base type for execution contract hashes.
44
+ * Emitted contract.d.ts files use this with the hash value as a type parameter:
45
+ * `type ExecutionHash = ExecutionHashBase<'def456...'>`
46
+ */
47
+ type ExecutionHashBase<THash extends string> = THash & Brand<'ExecutionHash'>;
48
+ declare function executionHash<const T extends string>(value: T): ExecutionHashBase<T>;
49
+ declare function coreHash<const T extends string>(value: T): StorageHashBase<T>;
50
+ /**
51
+ * Base type for profile contract hashes.
52
+ * Emitted contract.d.ts files use this with the hash value as a type parameter:
53
+ * `type ProfileHash = ProfileHashBase<'def456...'>`
54
+ */
55
+ type ProfileHashBase<THash extends string> = THash & Brand<'ProfileHash'>;
56
+ declare function profileHash<const T extends string>(value: T): ProfileHashBase<T>;
57
+ /**
58
+ * One entity-kind slot in a namespace — a map of entity name to entry.
59
+ * Values are opaque at the foundation layer; family and target concretions
60
+ * refine them to typed IR classes.
61
+ */
62
+ type StorageEntitySlot = Readonly<Record<string, unknown>>;
63
+ /**
64
+ * Plain-data namespace entry in a storage block. Every hydrated contract
65
+ * carries at least `id` plus entity-kind slot maps under `entries`
66
+ * (`table`, `collection`, …). Foundation declares only this shape — no IR
67
+ * machinery.
68
+ */
69
+ interface StorageNamespace {
70
+ readonly id: string;
71
+ readonly entries: Readonly<Record<string, StorageEntitySlot>>;
72
+ }
73
+ /**
74
+ * Base type for family-specific storage blocks.
75
+ * Family storage types (SqlStorage, MongoStorage, etc.) extend this to carry the
76
+ * storage hash alongside family-specific data (tables, collections, etc.).
77
+ *
78
+ * The `namespaces` map is carried by every hydrated storage block. Serialized
79
+ * envelope shape is target-owned; this types the in-memory contract after
80
+ * `deserializeContract`.
81
+ */
82
+ interface StorageBase<THash extends string = string> {
83
+ readonly storageHash: StorageHashBase<THash>;
84
+ readonly namespaces: Readonly<Record<string, StorageNamespace>>;
85
+ }
86
+ interface FieldType {
87
+ readonly type: string;
88
+ readonly nullable: boolean;
89
+ readonly items?: FieldType;
90
+ readonly properties?: Record<string, FieldType>;
91
+ }
92
+ type GeneratedValueSpec = {
93
+ readonly id: string;
94
+ readonly params?: Record<string, unknown>;
95
+ };
96
+ type JsonPrimitive = string | number | boolean | null;
97
+ type JsonValue = JsonPrimitive | {
98
+ readonly [key: string]: JsonValue;
99
+ } | readonly JsonValue[];
100
+ type ColumnDefaultLiteralValue = JsonValue;
101
+ type ColumnDefaultLiteralInputValue = ColumnDefaultLiteralValue | Date;
102
+ /**
103
+ * Runtime predicate for `ColumnDefaultLiteralInputValue`. Authoring layers
104
+ * resolve template values from caller-supplied args (typed `unknown` at the
105
+ * boundary) and need to validate before constructing a `ColumnDefault`.
106
+ * Accepts JSON primitives, plain arrays/objects of JSON values, and `Date`
107
+ * instances. Rejects functions, class instances (other than `Date`),
108
+ * `undefined`, `bigint`, `symbol`, and arrays/objects containing those.
109
+ */
110
+ declare function isColumnDefaultLiteralInputValue(value: unknown): value is ColumnDefaultLiteralInputValue;
111
+ type ColumnDefault = {
112
+ readonly kind: 'literal';
113
+ readonly value: ColumnDefaultLiteralInputValue;
114
+ } | {
115
+ readonly kind: 'function';
116
+ readonly expression: string;
117
+ };
118
+ declare function isColumnDefault(value: unknown): value is ColumnDefault;
119
+ type ExecutionMutationDefaultValue = {
120
+ readonly kind: 'generator';
121
+ readonly id: GeneratedValueSpec['id'];
122
+ readonly params?: Record<string, unknown>;
123
+ };
124
+ declare function isExecutionMutationDefaultValue(value: unknown): value is ExecutionMutationDefaultValue;
125
+ type ExecutionMutationDefault = {
126
+ readonly ref: {
127
+ readonly namespace: string;
128
+ readonly table: string;
129
+ readonly column: string;
130
+ };
131
+ readonly onCreate?: ExecutionMutationDefaultValue;
132
+ readonly onUpdate?: ExecutionMutationDefaultValue;
133
+ };
134
+ /**
135
+ * `ExecutionMutationDefault` minus its `ref` — the per-field phases value
136
+ * authoring layers attach to a column before the column ref is known.
137
+ */
138
+ type ExecutionMutationDefaultPhases = Omit<ExecutionMutationDefault, 'ref'>;
139
+ type ExecutionSection<THash extends string = string> = {
140
+ readonly executionHash: ExecutionHashBase<THash>;
141
+ readonly mutations: {
142
+ readonly defaults: ReadonlyArray<ExecutionMutationDefault>;
143
+ };
144
+ };
145
+ interface Source {
146
+ readonly readOnly: boolean;
147
+ readonly projection: Record<string, FieldType>;
148
+ readonly origin?: Record<string, unknown>;
149
+ readonly capabilities?: Record<string, boolean>;
150
+ }
151
+ interface DocIndex {
152
+ readonly name: string;
153
+ readonly keys: Record<string, 'asc' | 'desc'>;
154
+ readonly unique?: boolean;
155
+ readonly where?: Expr;
156
+ }
157
+ type Expr = {
158
+ readonly kind: 'eq';
159
+ readonly path: ReadonlyArray<string>;
160
+ readonly value: unknown;
161
+ } | {
162
+ readonly kind: 'exists';
163
+ readonly path: ReadonlyArray<string>;
164
+ };
165
+ interface DocCollection {
166
+ readonly name: string;
167
+ readonly id?: {
168
+ readonly strategy: 'auto' | 'client' | 'uuid' | 'objectId';
169
+ };
170
+ readonly fields: Record<string, FieldType>;
171
+ readonly indexes?: ReadonlyArray<DocIndex>;
172
+ readonly readOnly?: boolean;
173
+ }
174
+ interface PlanMeta {
175
+ readonly target: string;
176
+ readonly targetFamily?: string;
177
+ readonly storageHash: string;
178
+ readonly profileHash?: string;
179
+ readonly lane: string;
180
+ readonly annotations?: {
181
+ readonly [key: string]: unknown;
182
+ };
183
+ }
184
+ /**
185
+ * Contract marker record stored in the database.
186
+ * Represents the current contract identity for a database.
187
+ */
188
+ interface ContractMarkerRecord {
189
+ readonly storageHash: string;
190
+ readonly profileHash: string;
191
+ readonly contractJson: unknown | null;
192
+ readonly canonicalVersion: number | null;
193
+ readonly updatedAt: Date;
194
+ readonly appTag: string | null;
195
+ readonly meta: Record<string, unknown>;
196
+ readonly invariants: readonly string[];
197
+ }
198
+ /**
199
+ * One applied migration edge from the per-space ledger journal.
200
+ * Returned by `readLedger` in append (apply) order.
201
+ */
202
+ interface LedgerEntryRecord {
203
+ readonly space: string;
204
+ readonly migrationName: string;
205
+ readonly migrationHash: string;
206
+ readonly from: string | null;
207
+ readonly to: string;
208
+ readonly appliedAt: Date;
209
+ readonly operationCount: number;
210
+ }
211
+ //#endregion
212
+ //#region src/value-set-ref.d.ts
213
+ /**
214
+ * Entity coordinate for a domain enum or storage value-set reference.
215
+ *
216
+ * Field-name identity with the framework's `EntityCoordinate` type
217
+ * (packages/1-framework/1-core/framework-components/src/ir/storage.ts).
218
+ * Foundation-contract cannot import framework-components (dependency points
219
+ * the other way), so this is a standalone mirror of that shape plus the
220
+ * cross-space discriminator.
221
+ *
222
+ * One-vocabulary rule (ADR 224): `entityKind` is equal to the entries slot
223
+ * key the referenced entity lives under — `'enum'` for domain's `enum` slot,
224
+ * `'valueSet'` for storage's `entries.valueSet` slot. No consumer-side
225
+ * translation between the kind string and the slot key.
226
+ *
227
+ * Every `valueSet` reference is intra-plane (domain field → domain enum;
228
+ * storage column/check → storage value-set). The directional invariant:
229
+ * domain may reference storage; storage may never reference domain.
230
+ *
231
+ * `namespaceId` admits the `UNBOUND_NAMESPACE_ID` (`__unbound__`) sentinel
232
+ * for single-namespace (unbound) references.
233
+ *
234
+ * `spaceId` is the cross-space discriminator: absent ⇒ local (same
235
+ * contract-space); present ⇒ cross-space. No separate tag field.
236
+ */
237
+ interface ValueSetRef {
238
+ readonly plane: 'domain' | 'storage';
239
+ readonly namespaceId: string;
240
+ readonly entityKind: 'enum' | 'valueSet';
241
+ readonly entityName: string;
242
+ readonly spaceId?: string;
243
+ }
244
+ //#endregion
245
+ //#region src/domain-types.d.ts
246
+ type ScalarFieldType = {
247
+ readonly kind: 'scalar';
248
+ readonly codecId: string;
249
+ readonly typeParams?: Record<string, unknown>;
250
+ };
251
+ type ValueObjectFieldType = {
252
+ readonly kind: 'valueObject';
253
+ readonly name: string;
254
+ };
255
+ type UnionFieldType = {
256
+ readonly kind: 'union';
257
+ readonly members: ReadonlyArray<ScalarFieldType | ValueObjectFieldType>;
258
+ };
259
+ type ContractFieldType = ScalarFieldType | ValueObjectFieldType | UnionFieldType;
260
+ type ContractField = {
261
+ readonly nullable: boolean;
262
+ readonly type: ContractFieldType;
263
+ readonly many?: true;
264
+ readonly dict?: true;
265
+ readonly valueSet?: ValueSetRef;
266
+ };
267
+ /**
268
+ * A domain enum: an ordered set of named members, each with a codec-encoded
269
+ * value. The `codecId` identifies the codec used to encode member values in
270
+ * storage. The `members` array is ordered (declaration order is preserved).
271
+ */
272
+ type ContractEnum = {
273
+ readonly codecId: string;
274
+ readonly members: readonly {
275
+ readonly name: string;
276
+ readonly value: JsonValue;
277
+ }[];
278
+ };
279
+ type ContractRelationOn = {
280
+ readonly localFields: readonly string[];
281
+ readonly targetFields: readonly string[];
282
+ };
283
+ type ContractRelationThrough = {
284
+ readonly table: string;
285
+ readonly namespaceId: string;
286
+ readonly parentColumns: readonly string[];
287
+ readonly childColumns: readonly string[];
288
+ readonly targetColumns: readonly string[];
289
+ };
290
+ type ContractManyToManyRelation = {
291
+ readonly to: CrossReference;
292
+ readonly cardinality: 'N:M';
293
+ readonly on: ContractRelationOn;
294
+ readonly through: ContractRelationThrough;
295
+ };
296
+ type ContractNonJunctionRelation = {
297
+ readonly to: CrossReference;
298
+ readonly cardinality: '1:1' | '1:N' | 'N:1';
299
+ readonly on: ContractRelationOn;
300
+ readonly through?: never;
301
+ };
302
+ type ContractReferenceRelation = ContractManyToManyRelation | ContractNonJunctionRelation;
303
+ type ContractEmbedRelation = {
304
+ readonly to: CrossReference;
305
+ readonly cardinality: '1:1' | '1:N';
306
+ };
307
+ type ContractRelation = ContractReferenceRelation | ContractEmbedRelation;
308
+ type ContractDiscriminator = {
309
+ readonly field: string;
310
+ };
311
+ type ContractVariantEntry = {
312
+ readonly value: string;
313
+ };
314
+ type ContractValueObject = {
315
+ readonly fields: Record<string, ContractField>;
316
+ };
317
+ type ModelStorageBase = Readonly<Record<string, unknown>>;
318
+ interface ContractModelBase<TModelStorage extends ModelStorageBase = ModelStorageBase> {
319
+ readonly fields: Record<string, ContractField>;
320
+ readonly relations: Record<string, ContractRelation>;
321
+ readonly storage: TModelStorage;
322
+ readonly discriminator?: ContractDiscriminator;
323
+ readonly variants?: Record<string, ContractVariantEntry>;
324
+ readonly base?: CrossReference;
325
+ readonly owner?: string;
326
+ }
327
+ interface ContractModel<TModelStorage extends ModelStorageBase = ModelStorageBase> extends ContractModelBase<TModelStorage> {
328
+ readonly fields: Record<string, ContractField>;
329
+ }
330
+ type ReferenceRelationKeys<TModels extends Record<string, {
331
+ readonly relations: Record<string, ContractRelation>;
332
+ }>, ModelName extends string & keyof TModels> = { [K in keyof TModels[ModelName]['relations']]: TModels[ModelName]['relations'][K] extends ContractReferenceRelation ? K : never; }[keyof TModels[ModelName]['relations']];
333
+ type EmbedRelationKeys<TModels extends Record<string, {
334
+ readonly relations: Record<string, ContractRelation>;
335
+ }>, ModelName extends string & keyof TModels> = { [K in keyof TModels[ModelName]['relations']]: TModels[ModelName]['relations'][K] extends ContractReferenceRelation ? never : K; }[keyof TModels[ModelName]['relations']];
336
+ //#endregion
337
+ //#region src/domain-envelope.d.ts
338
+ /**
339
+ * One namespace's application-domain entities — models and optional value
340
+ * objects keyed by entity name within that namespace coordinate.
341
+ */
342
+ interface ApplicationDomainNamespace {
343
+ readonly models: Record<string, ContractModelBase>;
344
+ readonly valueObjects?: Record<string, ContractValueObject>;
345
+ readonly enum?: Record<string, ContractEnum>;
346
+ }
347
+ /**
348
+ * Application-domain envelope: entity content keyed by namespace id.
349
+ * Mirrors the storage plane's `namespaces` segment (ADR 221).
350
+ */
351
+ interface ApplicationDomain {
352
+ readonly namespaces: Readonly<Record<string, ApplicationDomainNamespace>>;
353
+ }
354
+ type ContractWithDomain = {
355
+ readonly domain: ApplicationDomain;
356
+ };
357
+ //#endregion
358
+ export { ValueObjectFieldType as $, ExecutionHashBase as A, LedgerEntryRecord as B, ContractVariantEntry as C, DocCollection as D, CrossReferenceSchema as E, Expr as F, ReferenceRelationKeys as G, NamespaceId as H, FieldType as I, StorageBase as J, ScalarFieldType as K, GeneratedValueSpec as L, ExecutionMutationDefaultPhases as M, ExecutionMutationDefaultValue as N, DocIndex as O, ExecutionSection as P, UnionFieldType as Q, JsonPrimitive as R, ContractValueObject as S, CrossReference as T, PlanMeta as U, ModelStorageBase as V, ProfileHashBase as W, StorageHashBase as X, StorageEntitySlot as Y, StorageNamespace as Z, ContractNonJunctionRelation as _, ColumnDefault as a, isColumnDefault as at, ContractRelationOn as b, ContractDiscriminator as c, profileHash as ct, ContractField as d, ValueSetRef as et, ContractFieldType as f, ContractModelBase as g, ContractModel as h, Brand as i, executionHash as it, ExecutionMutationDefault as j, EmbedRelationKeys as k, ContractEmbedRelation as l, ContractMarkerRecord as m, ApplicationDomain as n, coreHash as nt, ColumnDefaultLiteralInputValue as o, isColumnDefaultLiteralInputValue as ot, ContractManyToManyRelation as p, Source as q, ApplicationDomainNamespace as r, crossRef as rt, ColumnDefaultLiteralValue as s, isExecutionMutationDefaultValue as st, $ as t, asNamespaceId as tt, ContractEnum as u, ContractReferenceRelation as v, ContractWithDomain as w, ContractRelationThrough as x, ContractRelation as y, JsonValue as z };
359
+ //# sourceMappingURL=domain-envelope-D6Wn9AmZ-BqZKTT9U.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domain-envelope-D6Wn9AmZ-BqZKTT9U.d.mts","names":[],"sources":["../../../../1-framework/0-foundation/contract/dist/domain-envelope-D6Wn9AmZ.d.mts"],"mappings":";;KACK;WACM;;iBAEM,cAAc,gBAAgB;;;UAGrC;WACC,WAAW;WACX;;;;;;WAMA;;cAEG,oEAAoE,WAAW;iBAC5E,SAAS,eAAe,oBAAoB,iBAAiB;;;;;;cAMhE;;;;;;;KAOT,MAAM,uCAAuC;GAC/C,OAAO,KAAK,OAAO;;;;;;;KAOjB,gBAAgB,wBAAwB,QAAQ;;;;;;KAMhD,kBAAkB,wBAAwB,QAAQ;iBACtC,oBAAoB,kBAAkB,OAAO,IAAI,kBAAkB;iBACnE,eAAe,kBAAkB,OAAO,IAAI,g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