@contember/binding-legacy 2.1.0-alpha.3 → 2.1.0-alpha.35

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 (412) hide show
  1. package/package.json +10 -5
  2. package/src/accessorTree/NormalizedPersistedData.ts +1 -1
  3. package/src/accessors/EntityAccessorImpl.ts +13 -11
  4. package/src/accessors/EntityListAccessorImpl.ts +16 -7
  5. package/src/core/AccessorErrorManager.ts +2 -2
  6. package/src/core/DataBinding.ts +24 -15
  7. package/src/core/ErrorsPreprocessor.ts +4 -5
  8. package/src/core/EventManager.ts +34 -46
  9. package/src/core/MutationGenerator.ts +85 -87
  10. package/src/core/QueryGenerator.ts +4 -5
  11. package/src/core/RealmKeyGenerator.ts +5 -3
  12. package/src/core/RequestResponseNormalizer.ts +3 -8
  13. package/src/core/StateInitializer.ts +10 -18
  14. package/src/core/TreeAugmenter.ts +9 -16
  15. package/src/core/TreeStore.ts +5 -4
  16. package/src/core/operations/EntityOperations.ts +25 -25
  17. package/src/core/operations/FieldOperations.ts +15 -17
  18. package/src/core/operations/ListOperations.ts +15 -15
  19. package/src/core/operations/OperationsHelpers.ts +2 -2
  20. package/src/core/state/EntityListState.ts +3 -9
  21. package/src/fieldHelpers/helpers/TemporalFieldHelper.ts +3 -3
  22. package/src/utils/assertNever.ts +4 -4
  23. package/tests/example.test.ts +2 -2
  24. package/dist/development/index.cjs +0 -34
  25. package/dist/development/index.cjs.map +0 -1
  26. package/dist/development/index.js +0 -28
  27. package/dist/development/index.js.map +0 -1
  28. package/dist/development/src/accessorTree/NormalizedPersistedData.cjs +0 -10
  29. package/dist/development/src/accessorTree/NormalizedPersistedData.cjs.map +0 -1
  30. package/dist/development/src/accessorTree/NormalizedPersistedData.js +0 -10
  31. package/dist/development/src/accessorTree/NormalizedPersistedData.js.map +0 -1
  32. package/dist/development/src/accessors/EntityAccessorImpl.cjs +0 -179
  33. package/dist/development/src/accessors/EntityAccessorImpl.cjs.map +0 -1
  34. package/dist/development/src/accessors/EntityAccessorImpl.js +0 -179
  35. package/dist/development/src/accessors/EntityAccessorImpl.js.map +0 -1
  36. package/dist/development/src/accessors/EntityListAccessorImpl.cjs +0 -112
  37. package/dist/development/src/accessors/EntityListAccessorImpl.cjs.map +0 -1
  38. package/dist/development/src/accessors/EntityListAccessorImpl.js +0 -112
  39. package/dist/development/src/accessors/EntityListAccessorImpl.js.map +0 -1
  40. package/dist/development/src/accessors/FieldAccessorImpl.cjs +0 -54
  41. package/dist/development/src/accessors/FieldAccessorImpl.cjs.map +0 -1
  42. package/dist/development/src/accessors/FieldAccessorImpl.js +0 -54
  43. package/dist/development/src/accessors/FieldAccessorImpl.js.map +0 -1
  44. package/dist/development/src/core/AccessorErrorManager.cjs +0 -200
  45. package/dist/development/src/core/AccessorErrorManager.cjs.map +0 -1
  46. package/dist/development/src/core/AccessorErrorManager.js +0 -200
  47. package/dist/development/src/core/AccessorErrorManager.js.map +0 -1
  48. package/dist/development/src/core/Config.cjs +0 -29
  49. package/dist/development/src/core/Config.cjs.map +0 -1
  50. package/dist/development/src/core/Config.js +0 -29
  51. package/dist/development/src/core/Config.js.map +0 -1
  52. package/dist/development/src/core/DataBinding.cjs +0 -354
  53. package/dist/development/src/core/DataBinding.cjs.map +0 -1
  54. package/dist/development/src/core/DataBinding.js +0 -354
  55. package/dist/development/src/core/DataBinding.js.map +0 -1
  56. package/dist/development/src/core/DirtinessTracker.cjs +0 -26
  57. package/dist/development/src/core/DirtinessTracker.cjs.map +0 -1
  58. package/dist/development/src/core/DirtinessTracker.js +0 -26
  59. package/dist/development/src/core/DirtinessTracker.js.map +0 -1
  60. package/dist/development/src/core/ErrorsPreprocessor.cjs +0 -180
  61. package/dist/development/src/core/ErrorsPreprocessor.cjs.map +0 -1
  62. package/dist/development/src/core/ErrorsPreprocessor.js +0 -180
  63. package/dist/development/src/core/ErrorsPreprocessor.js.map +0 -1
  64. package/dist/development/src/core/EventManager.cjs +0 -439
  65. package/dist/development/src/core/EventManager.cjs.map +0 -1
  66. package/dist/development/src/core/EventManager.js +0 -439
  67. package/dist/development/src/core/EventManager.js.map +0 -1
  68. package/dist/development/src/core/MutationGenerator.cjs +0 -668
  69. package/dist/development/src/core/MutationGenerator.cjs.map +0 -1
  70. package/dist/development/src/core/MutationGenerator.js +0 -668
  71. package/dist/development/src/core/MutationGenerator.js.map +0 -1
  72. package/dist/development/src/core/QueryGenerator.cjs +0 -110
  73. package/dist/development/src/core/QueryGenerator.cjs.map +0 -1
  74. package/dist/development/src/core/QueryGenerator.js +0 -110
  75. package/dist/development/src/core/QueryGenerator.js.map +0 -1
  76. package/dist/development/src/core/RealmKeyGenerator.cjs +0 -42
  77. package/dist/development/src/core/RealmKeyGenerator.cjs.map +0 -1
  78. package/dist/development/src/core/RealmKeyGenerator.js +0 -42
  79. package/dist/development/src/core/RealmKeyGenerator.js.map +0 -1
  80. package/dist/development/src/core/RequestResponseNormalizer.cjs +0 -136
  81. package/dist/development/src/core/RequestResponseNormalizer.cjs.map +0 -1
  82. package/dist/development/src/core/RequestResponseNormalizer.js +0 -136
  83. package/dist/development/src/core/RequestResponseNormalizer.js.map +0 -1
  84. package/dist/development/src/core/StateInitializer.cjs +0 -379
  85. package/dist/development/src/core/StateInitializer.cjs.map +0 -1
  86. package/dist/development/src/core/StateInitializer.js +0 -379
  87. package/dist/development/src/core/StateInitializer.js.map +0 -1
  88. package/dist/development/src/core/TreeAugmenter.cjs +0 -354
  89. package/dist/development/src/core/TreeAugmenter.cjs.map +0 -1
  90. package/dist/development/src/core/TreeAugmenter.js +0 -354
  91. package/dist/development/src/core/TreeAugmenter.js.map +0 -1
  92. package/dist/development/src/core/TreeStore.cjs +0 -172
  93. package/dist/development/src/core/TreeStore.cjs.map +0 -1
  94. package/dist/development/src/core/TreeStore.js +0 -172
  95. package/dist/development/src/core/TreeStore.js.map +0 -1
  96. package/dist/development/src/core/exceptions/ErrorLocator.cjs +0 -59
  97. package/dist/development/src/core/exceptions/ErrorLocator.cjs.map +0 -1
  98. package/dist/development/src/core/exceptions/ErrorLocator.js +0 -59
  99. package/dist/development/src/core/exceptions/ErrorLocator.js.map +0 -1
  100. package/dist/development/src/core/exceptions/MarkerSugarer.cjs +0 -51
  101. package/dist/development/src/core/exceptions/MarkerSugarer.cjs.map +0 -1
  102. package/dist/development/src/core/exceptions/MarkerSugarer.js +0 -51
  103. package/dist/development/src/core/exceptions/MarkerSugarer.js.map +0 -1
  104. package/dist/development/src/core/exceptions/TreeParameterSugarer.cjs +0 -33
  105. package/dist/development/src/core/exceptions/TreeParameterSugarer.cjs.map +0 -1
  106. package/dist/development/src/core/exceptions/TreeParameterSugarer.js +0 -33
  107. package/dist/development/src/core/exceptions/TreeParameterSugarer.js.map +0 -1
  108. package/dist/development/src/core/factories/createBatchUpdatesOptions.cjs +0 -23
  109. package/dist/development/src/core/factories/createBatchUpdatesOptions.cjs.map +0 -1
  110. package/dist/development/src/core/factories/createBatchUpdatesOptions.js +0 -23
  111. package/dist/development/src/core/factories/createBatchUpdatesOptions.js.map +0 -1
  112. package/dist/development/src/core/operations/EntityOperations.cjs +0 -226
  113. package/dist/development/src/core/operations/EntityOperations.cjs.map +0 -1
  114. package/dist/development/src/core/operations/EntityOperations.js +0 -226
  115. package/dist/development/src/core/operations/EntityOperations.js.map +0 -1
  116. package/dist/development/src/core/operations/FieldOperations.cjs +0 -92
  117. package/dist/development/src/core/operations/FieldOperations.cjs.map +0 -1
  118. package/dist/development/src/core/operations/FieldOperations.js +0 -92
  119. package/dist/development/src/core/operations/FieldOperations.js.map +0 -1
  120. package/dist/development/src/core/operations/ListOperations.cjs +0 -158
  121. package/dist/development/src/core/operations/ListOperations.cjs.map +0 -1
  122. package/dist/development/src/core/operations/ListOperations.js +0 -158
  123. package/dist/development/src/core/operations/ListOperations.js.map +0 -1
  124. package/dist/development/src/core/operations/OperationsHelpers.cjs +0 -87
  125. package/dist/development/src/core/operations/OperationsHelpers.cjs.map +0 -1
  126. package/dist/development/src/core/operations/OperationsHelpers.js +0 -87
  127. package/dist/development/src/core/operations/OperationsHelpers.js.map +0 -1
  128. package/dist/development/src/core/requestAliases/MutationAlias.cjs +0 -14
  129. package/dist/development/src/core/requestAliases/MutationAlias.cjs.map +0 -1
  130. package/dist/development/src/core/requestAliases/MutationAlias.js +0 -14
  131. package/dist/development/src/core/requestAliases/MutationAlias.js.map +0 -1
  132. package/dist/development/src/core/state/StateIterator.cjs +0 -100
  133. package/dist/development/src/core/state/StateIterator.cjs.map +0 -1
  134. package/dist/development/src/core/state/StateIterator.js +0 -100
  135. package/dist/development/src/core/state/StateIterator.js.map +0 -1
  136. package/dist/development/src/core/state/getEntityMarker.cjs +0 -5
  137. package/dist/development/src/core/state/getEntityMarker.cjs.map +0 -1
  138. package/dist/development/src/core/state/getEntityMarker.js +0 -5
  139. package/dist/development/src/core/state/getEntityMarker.js.map +0 -1
  140. package/dist/development/src/core/utils/getCombinedSignal.cjs +0 -33
  141. package/dist/development/src/core/utils/getCombinedSignal.cjs.map +0 -1
  142. package/dist/development/src/core/utils/getCombinedSignal.js +0 -33
  143. package/dist/development/src/core/utils/getCombinedSignal.js.map +0 -1
  144. package/dist/development/src/fieldHelpers/helpers/FieldHelper.cjs +0 -13
  145. package/dist/development/src/fieldHelpers/helpers/FieldHelper.cjs.map +0 -1
  146. package/dist/development/src/fieldHelpers/helpers/FieldHelper.js +0 -13
  147. package/dist/development/src/fieldHelpers/helpers/FieldHelper.js.map +0 -1
  148. package/dist/development/src/fieldHelpers/helpers/TemporalFieldHelper.cjs +0 -18
  149. package/dist/development/src/fieldHelpers/helpers/TemporalFieldHelper.cjs.map +0 -1
  150. package/dist/development/src/fieldHelpers/helpers/TemporalFieldHelper.js +0 -18
  151. package/dist/development/src/fieldHelpers/helpers/TemporalFieldHelper.js.map +0 -1
  152. package/dist/development/src/fieldHelpers/helpers/UuidFieldHelper.cjs +0 -16
  153. package/dist/development/src/fieldHelpers/helpers/UuidFieldHelper.cjs.map +0 -1
  154. package/dist/development/src/fieldHelpers/helpers/UuidFieldHelper.js +0 -16
  155. package/dist/development/src/fieldHelpers/helpers/UuidFieldHelper.js.map +0 -1
  156. package/dist/development/src/utils/generateEnumerabilityPreventingEntropy.cjs +0 -7
  157. package/dist/development/src/utils/generateEnumerabilityPreventingEntropy.cjs.map +0 -1
  158. package/dist/development/src/utils/generateEnumerabilityPreventingEntropy.js +0 -7
  159. package/dist/development/src/utils/generateEnumerabilityPreventingEntropy.js.map +0 -1
  160. package/dist/development/src/utils/isEmptyObject.cjs +0 -12
  161. package/dist/development/src/utils/isEmptyObject.cjs.map +0 -1
  162. package/dist/development/src/utils/isEmptyObject.js +0 -12
  163. package/dist/development/src/utils/isEmptyObject.js.map +0 -1
  164. package/dist/production/index.cjs +0 -34
  165. package/dist/production/index.cjs.map +0 -1
  166. package/dist/production/index.js +0 -28
  167. package/dist/production/index.js.map +0 -1
  168. package/dist/production/src/accessorTree/NormalizedPersistedData.cjs +0 -10
  169. package/dist/production/src/accessorTree/NormalizedPersistedData.cjs.map +0 -1
  170. package/dist/production/src/accessorTree/NormalizedPersistedData.js +0 -10
  171. package/dist/production/src/accessorTree/NormalizedPersistedData.js.map +0 -1
  172. package/dist/production/src/accessors/EntityAccessorImpl.cjs +0 -179
  173. package/dist/production/src/accessors/EntityAccessorImpl.cjs.map +0 -1
  174. package/dist/production/src/accessors/EntityAccessorImpl.js +0 -179
  175. package/dist/production/src/accessors/EntityAccessorImpl.js.map +0 -1
  176. package/dist/production/src/accessors/EntityListAccessorImpl.cjs +0 -112
  177. package/dist/production/src/accessors/EntityListAccessorImpl.cjs.map +0 -1
  178. package/dist/production/src/accessors/EntityListAccessorImpl.js +0 -112
  179. package/dist/production/src/accessors/EntityListAccessorImpl.js.map +0 -1
  180. package/dist/production/src/accessors/FieldAccessorImpl.cjs +0 -54
  181. package/dist/production/src/accessors/FieldAccessorImpl.cjs.map +0 -1
  182. package/dist/production/src/accessors/FieldAccessorImpl.js +0 -54
  183. package/dist/production/src/accessors/FieldAccessorImpl.js.map +0 -1
  184. package/dist/production/src/core/AccessorErrorManager.cjs +0 -200
  185. package/dist/production/src/core/AccessorErrorManager.cjs.map +0 -1
  186. package/dist/production/src/core/AccessorErrorManager.js +0 -200
  187. package/dist/production/src/core/AccessorErrorManager.js.map +0 -1
  188. package/dist/production/src/core/Config.cjs +0 -29
  189. package/dist/production/src/core/Config.cjs.map +0 -1
  190. package/dist/production/src/core/Config.js +0 -29
  191. package/dist/production/src/core/Config.js.map +0 -1
  192. package/dist/production/src/core/DataBinding.cjs +0 -354
  193. package/dist/production/src/core/DataBinding.cjs.map +0 -1
  194. package/dist/production/src/core/DataBinding.js +0 -354
  195. package/dist/production/src/core/DataBinding.js.map +0 -1
  196. package/dist/production/src/core/DirtinessTracker.cjs +0 -26
  197. package/dist/production/src/core/DirtinessTracker.cjs.map +0 -1
  198. package/dist/production/src/core/DirtinessTracker.js +0 -26
  199. package/dist/production/src/core/DirtinessTracker.js.map +0 -1
  200. package/dist/production/src/core/ErrorsPreprocessor.cjs +0 -180
  201. package/dist/production/src/core/ErrorsPreprocessor.cjs.map +0 -1
  202. package/dist/production/src/core/ErrorsPreprocessor.js +0 -180
  203. package/dist/production/src/core/ErrorsPreprocessor.js.map +0 -1
  204. package/dist/production/src/core/EventManager.cjs +0 -413
  205. package/dist/production/src/core/EventManager.cjs.map +0 -1
  206. package/dist/production/src/core/EventManager.js +0 -413
  207. package/dist/production/src/core/EventManager.js.map +0 -1
  208. package/dist/production/src/core/MutationGenerator.cjs +0 -668
  209. package/dist/production/src/core/MutationGenerator.cjs.map +0 -1
  210. package/dist/production/src/core/MutationGenerator.js +0 -668
  211. package/dist/production/src/core/MutationGenerator.js.map +0 -1
  212. package/dist/production/src/core/QueryGenerator.cjs +0 -110
  213. package/dist/production/src/core/QueryGenerator.cjs.map +0 -1
  214. package/dist/production/src/core/QueryGenerator.js +0 -110
  215. package/dist/production/src/core/QueryGenerator.js.map +0 -1
  216. package/dist/production/src/core/RealmKeyGenerator.cjs +0 -42
  217. package/dist/production/src/core/RealmKeyGenerator.cjs.map +0 -1
  218. package/dist/production/src/core/RealmKeyGenerator.js +0 -42
  219. package/dist/production/src/core/RealmKeyGenerator.js.map +0 -1
  220. package/dist/production/src/core/RequestResponseNormalizer.cjs +0 -136
  221. package/dist/production/src/core/RequestResponseNormalizer.cjs.map +0 -1
  222. package/dist/production/src/core/RequestResponseNormalizer.js +0 -136
  223. package/dist/production/src/core/RequestResponseNormalizer.js.map +0 -1
  224. package/dist/production/src/core/StateInitializer.cjs +0 -379
  225. package/dist/production/src/core/StateInitializer.cjs.map +0 -1
  226. package/dist/production/src/core/StateInitializer.js +0 -379
  227. package/dist/production/src/core/StateInitializer.js.map +0 -1
  228. package/dist/production/src/core/TreeAugmenter.cjs +0 -354
  229. package/dist/production/src/core/TreeAugmenter.cjs.map +0 -1
  230. package/dist/production/src/core/TreeAugmenter.js +0 -354
  231. package/dist/production/src/core/TreeAugmenter.js.map +0 -1
  232. package/dist/production/src/core/TreeStore.cjs +0 -172
  233. package/dist/production/src/core/TreeStore.cjs.map +0 -1
  234. package/dist/production/src/core/TreeStore.js +0 -172
  235. package/dist/production/src/core/TreeStore.js.map +0 -1
  236. package/dist/production/src/core/exceptions/ErrorLocator.cjs +0 -59
  237. package/dist/production/src/core/exceptions/ErrorLocator.cjs.map +0 -1
  238. package/dist/production/src/core/exceptions/ErrorLocator.js +0 -59
  239. package/dist/production/src/core/exceptions/ErrorLocator.js.map +0 -1
  240. package/dist/production/src/core/exceptions/MarkerSugarer.cjs +0 -51
  241. package/dist/production/src/core/exceptions/MarkerSugarer.cjs.map +0 -1
  242. package/dist/production/src/core/exceptions/MarkerSugarer.js +0 -51
  243. package/dist/production/src/core/exceptions/MarkerSugarer.js.map +0 -1
  244. package/dist/production/src/core/exceptions/TreeParameterSugarer.cjs +0 -33
  245. package/dist/production/src/core/exceptions/TreeParameterSugarer.cjs.map +0 -1
  246. package/dist/production/src/core/exceptions/TreeParameterSugarer.js +0 -33
  247. package/dist/production/src/core/exceptions/TreeParameterSugarer.js.map +0 -1
  248. package/dist/production/src/core/factories/createBatchUpdatesOptions.cjs +0 -23
  249. package/dist/production/src/core/factories/createBatchUpdatesOptions.cjs.map +0 -1
  250. package/dist/production/src/core/factories/createBatchUpdatesOptions.js +0 -23
  251. package/dist/production/src/core/factories/createBatchUpdatesOptions.js.map +0 -1
  252. package/dist/production/src/core/operations/EntityOperations.cjs +0 -226
  253. package/dist/production/src/core/operations/EntityOperations.cjs.map +0 -1
  254. package/dist/production/src/core/operations/EntityOperations.js +0 -226
  255. package/dist/production/src/core/operations/EntityOperations.js.map +0 -1
  256. package/dist/production/src/core/operations/FieldOperations.cjs +0 -73
  257. package/dist/production/src/core/operations/FieldOperations.cjs.map +0 -1
  258. package/dist/production/src/core/operations/FieldOperations.js +0 -73
  259. package/dist/production/src/core/operations/FieldOperations.js.map +0 -1
  260. package/dist/production/src/core/operations/ListOperations.cjs +0 -158
  261. package/dist/production/src/core/operations/ListOperations.cjs.map +0 -1
  262. package/dist/production/src/core/operations/ListOperations.js +0 -158
  263. package/dist/production/src/core/operations/ListOperations.js.map +0 -1
  264. package/dist/production/src/core/operations/OperationsHelpers.cjs +0 -87
  265. package/dist/production/src/core/operations/OperationsHelpers.cjs.map +0 -1
  266. package/dist/production/src/core/operations/OperationsHelpers.js +0 -87
  267. package/dist/production/src/core/operations/OperationsHelpers.js.map +0 -1
  268. package/dist/production/src/core/requestAliases/MutationAlias.cjs +0 -14
  269. package/dist/production/src/core/requestAliases/MutationAlias.cjs.map +0 -1
  270. package/dist/production/src/core/requestAliases/MutationAlias.js +0 -14
  271. package/dist/production/src/core/requestAliases/MutationAlias.js.map +0 -1
  272. package/dist/production/src/core/state/StateIterator.cjs +0 -100
  273. package/dist/production/src/core/state/StateIterator.cjs.map +0 -1
  274. package/dist/production/src/core/state/StateIterator.js +0 -100
  275. package/dist/production/src/core/state/StateIterator.js.map +0 -1
  276. package/dist/production/src/core/state/getEntityMarker.cjs +0 -5
  277. package/dist/production/src/core/state/getEntityMarker.cjs.map +0 -1
  278. package/dist/production/src/core/state/getEntityMarker.js +0 -5
  279. package/dist/production/src/core/state/getEntityMarker.js.map +0 -1
  280. package/dist/production/src/core/utils/getCombinedSignal.cjs +0 -33
  281. package/dist/production/src/core/utils/getCombinedSignal.cjs.map +0 -1
  282. package/dist/production/src/core/utils/getCombinedSignal.js +0 -33
  283. package/dist/production/src/core/utils/getCombinedSignal.js.map +0 -1
  284. package/dist/production/src/fieldHelpers/helpers/FieldHelper.cjs +0 -13
  285. package/dist/production/src/fieldHelpers/helpers/FieldHelper.cjs.map +0 -1
  286. package/dist/production/src/fieldHelpers/helpers/FieldHelper.js +0 -13
  287. package/dist/production/src/fieldHelpers/helpers/FieldHelper.js.map +0 -1
  288. package/dist/production/src/fieldHelpers/helpers/TemporalFieldHelper.cjs +0 -18
  289. package/dist/production/src/fieldHelpers/helpers/TemporalFieldHelper.cjs.map +0 -1
  290. package/dist/production/src/fieldHelpers/helpers/TemporalFieldHelper.js +0 -18
  291. package/dist/production/src/fieldHelpers/helpers/TemporalFieldHelper.js.map +0 -1
  292. package/dist/production/src/fieldHelpers/helpers/UuidFieldHelper.cjs +0 -16
  293. package/dist/production/src/fieldHelpers/helpers/UuidFieldHelper.cjs.map +0 -1
  294. package/dist/production/src/fieldHelpers/helpers/UuidFieldHelper.js +0 -16
  295. package/dist/production/src/fieldHelpers/helpers/UuidFieldHelper.js.map +0 -1
  296. package/dist/production/src/utils/generateEnumerabilityPreventingEntropy.cjs +0 -7
  297. package/dist/production/src/utils/generateEnumerabilityPreventingEntropy.cjs.map +0 -1
  298. package/dist/production/src/utils/generateEnumerabilityPreventingEntropy.js +0 -7
  299. package/dist/production/src/utils/generateEnumerabilityPreventingEntropy.js.map +0 -1
  300. package/dist/production/src/utils/isEmptyObject.cjs +0 -12
  301. package/dist/production/src/utils/isEmptyObject.cjs.map +0 -1
  302. package/dist/production/src/utils/isEmptyObject.js +0 -12
  303. package/dist/production/src/utils/isEmptyObject.js.map +0 -1
  304. package/dist/types/accessorTree/NormalizedPersistedData.d.ts +0 -18
  305. package/dist/types/accessorTree/NormalizedPersistedData.d.ts.map +0 -1
  306. package/dist/types/accessorTree/index.d.ts +0 -2
  307. package/dist/types/accessorTree/index.d.ts.map +0 -1
  308. package/dist/types/accessors/BindingConfig.d.ts +0 -6
  309. package/dist/types/accessors/BindingConfig.d.ts.map +0 -1
  310. package/dist/types/accessors/EntityAccessorImpl.d.ts +0 -56
  311. package/dist/types/accessors/EntityAccessorImpl.d.ts.map +0 -1
  312. package/dist/types/accessors/EntityListAccessorImpl.d.ts +0 -57
  313. package/dist/types/accessors/EntityListAccessorImpl.d.ts.map +0 -1
  314. package/dist/types/accessors/FieldAccessorImpl.d.ts +0 -32
  315. package/dist/types/accessors/FieldAccessorImpl.d.ts.map +0 -1
  316. package/dist/types/accessors/index.d.ts +0 -5
  317. package/dist/types/accessors/index.d.ts.map +0 -1
  318. package/dist/types/core/AccessorErrorManager.d.ts +0 -25
  319. package/dist/types/core/AccessorErrorManager.d.ts.map +0 -1
  320. package/dist/types/core/Config.d.ts +0 -9
  321. package/dist/types/core/Config.d.ts.map +0 -1
  322. package/dist/types/core/DataBinding.d.ts +0 -54
  323. package/dist/types/core/DataBinding.d.ts.map +0 -1
  324. package/dist/types/core/DirtinessTracker.d.ts +0 -9
  325. package/dist/types/core/DirtinessTracker.d.ts.map +0 -1
  326. package/dist/types/core/ErrorsPreprocessor.d.ts +0 -34
  327. package/dist/types/core/ErrorsPreprocessor.d.ts.map +0 -1
  328. package/dist/types/core/EventManager.d.ts +0 -57
  329. package/dist/types/core/EventManager.d.ts.map +0 -1
  330. package/dist/types/core/MutationGenerator.d.ts +0 -49
  331. package/dist/types/core/MutationGenerator.d.ts.map +0 -1
  332. package/dist/types/core/QueryGenerator.d.ts +0 -13
  333. package/dist/types/core/QueryGenerator.d.ts.map +0 -1
  334. package/dist/types/core/RealmKeyGenerator.d.ts +0 -10
  335. package/dist/types/core/RealmKeyGenerator.d.ts.map +0 -1
  336. package/dist/types/core/RequestResponseNormalizer.d.ts +0 -11
  337. package/dist/types/core/RequestResponseNormalizer.d.ts.map +0 -1
  338. package/dist/types/core/StateInitializer.d.ts +0 -34
  339. package/dist/types/core/StateInitializer.d.ts.map +0 -1
  340. package/dist/types/core/TreeAugmenter.d.ts +0 -25
  341. package/dist/types/core/TreeAugmenter.d.ts.map +0 -1
  342. package/dist/types/core/TreeStore.d.ts +0 -30
  343. package/dist/types/core/TreeStore.d.ts.map +0 -1
  344. package/dist/types/core/UpdateMetadata.d.ts +0 -4
  345. package/dist/types/core/UpdateMetadata.d.ts.map +0 -1
  346. package/dist/types/core/exceptions/ErrorLocator.d.ts +0 -8
  347. package/dist/types/core/exceptions/ErrorLocator.d.ts.map +0 -1
  348. package/dist/types/core/exceptions/MarkerSugarer.d.ts +0 -10
  349. package/dist/types/core/exceptions/MarkerSugarer.d.ts.map +0 -1
  350. package/dist/types/core/exceptions/TreeParameterSugarer.d.ts +0 -11
  351. package/dist/types/core/exceptions/TreeParameterSugarer.d.ts.map +0 -1
  352. package/dist/types/core/factories/createBatchUpdatesOptions.d.ts +0 -5
  353. package/dist/types/core/factories/createBatchUpdatesOptions.d.ts.map +0 -1
  354. package/dist/types/core/factories/index.d.ts +0 -2
  355. package/dist/types/core/factories/index.d.ts.map +0 -1
  356. package/dist/types/core/index.d.ts +0 -9
  357. package/dist/types/core/index.d.ts.map +0 -1
  358. package/dist/types/core/operations/EntityOperations.d.ts +0 -26
  359. package/dist/types/core/operations/EntityOperations.d.ts.map +0 -1
  360. package/dist/types/core/operations/FieldOperations.d.ts +0 -22
  361. package/dist/types/core/operations/FieldOperations.d.ts.map +0 -1
  362. package/dist/types/core/operations/ListOperations.d.ts +0 -32
  363. package/dist/types/core/operations/ListOperations.d.ts.map +0 -1
  364. package/dist/types/core/operations/OperationsHelpers.d.ts +0 -14
  365. package/dist/types/core/operations/OperationsHelpers.d.ts.map +0 -1
  366. package/dist/types/core/operations/index.d.ts +0 -4
  367. package/dist/types/core/operations/index.d.ts.map +0 -1
  368. package/dist/types/core/requestAliases/MutationAlias.d.ts +0 -6
  369. package/dist/types/core/requestAliases/MutationAlias.d.ts.map +0 -1
  370. package/dist/types/core/requestAliases/index.d.ts +0 -2
  371. package/dist/types/core/requestAliases/index.d.ts.map +0 -1
  372. package/dist/types/core/state/EntityListState.d.ts +0 -29
  373. package/dist/types/core/state/EntityListState.d.ts.map +0 -1
  374. package/dist/types/core/state/EntityRealmState.d.ts +0 -44
  375. package/dist/types/core/state/EntityRealmState.d.ts.map +0 -1
  376. package/dist/types/core/state/EntityState.d.ts +0 -11
  377. package/dist/types/core/state/EntityState.d.ts.map +0 -1
  378. package/dist/types/core/state/FieldState.d.ts +0 -19
  379. package/dist/types/core/state/FieldState.d.ts.map +0 -1
  380. package/dist/types/core/state/StateIterator.d.ts +0 -14
  381. package/dist/types/core/state/StateIterator.d.ts.map +0 -1
  382. package/dist/types/core/state/StateNode.d.ts +0 -8
  383. package/dist/types/core/state/StateNode.d.ts.map +0 -1
  384. package/dist/types/core/state/getEntityMarker.d.ts +0 -3
  385. package/dist/types/core/state/getEntityMarker.d.ts.map +0 -1
  386. package/dist/types/core/state/index.d.ts +0 -8
  387. package/dist/types/core/state/index.d.ts.map +0 -1
  388. package/dist/types/core/utils/getCombinedSignal.d.ts +0 -2
  389. package/dist/types/core/utils/getCombinedSignal.d.ts.map +0 -1
  390. package/dist/types/core/utils/index.d.ts +0 -2
  391. package/dist/types/core/utils/index.d.ts.map +0 -1
  392. package/dist/types/fieldHelpers/helpers/FieldHelper.d.ts +0 -7
  393. package/dist/types/fieldHelpers/helpers/FieldHelper.d.ts.map +0 -1
  394. package/dist/types/fieldHelpers/helpers/TemporalFieldHelper.d.ts +0 -10
  395. package/dist/types/fieldHelpers/helpers/TemporalFieldHelper.d.ts.map +0 -1
  396. package/dist/types/fieldHelpers/helpers/UuidFieldHelper.d.ts +0 -10
  397. package/dist/types/fieldHelpers/helpers/UuidFieldHelper.d.ts.map +0 -1
  398. package/dist/types/fieldHelpers/helpers/index.d.ts +0 -3
  399. package/dist/types/fieldHelpers/helpers/index.d.ts.map +0 -1
  400. package/dist/types/fieldHelpers/index.d.ts +0 -2
  401. package/dist/types/fieldHelpers/index.d.ts.map +0 -1
  402. package/dist/types/index.d.ts +0 -5
  403. package/dist/types/index.d.ts.map +0 -1
  404. package/dist/types/tsconfig.tsbuildinfo +0 -1
  405. package/dist/types/utils/assertNever.d.ts +0 -2
  406. package/dist/types/utils/assertNever.d.ts.map +0 -1
  407. package/dist/types/utils/generateEnumerabilityPreventingEntropy.d.ts +0 -2
  408. package/dist/types/utils/generateEnumerabilityPreventingEntropy.d.ts.map +0 -1
  409. package/dist/types/utils/index.d.ts +0 -4
  410. package/dist/types/utils/index.d.ts.map +0 -1
  411. package/dist/types/utils/isEmptyObject.d.ts +0 -2
  412. package/dist/types/utils/isEmptyObject.d.ts.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"MutationGenerator.cjs","sources":["../../../../../packages/binding-legacy/src/core/MutationGenerator.ts"],"sourcesContent":["import { ContentMutation, ContentQueryBuilder, Input } from '@contember/client'\nimport { ClientGeneratedUuid, ReceivedEntityData, ServerId } from '@contember/binding-common'\nimport { BindingError } from '@contember/binding-common'\nimport { PRIMARY_KEY_NAME, TYPENAME_KEY_NAME } from '@contember/binding-common'\nimport { EntityFieldMarkers, FieldMarker, HasManyRelationMarker, HasOneRelationMarker } from '@contember/binding-common'\nimport type { EntityId, EntityName, PlaceholderName, UniqueWhere } from '@contember/binding-common'\nimport { isEmptyObject } from '../utils'\nimport { assertNever } from '@contember/binding-common'\nimport { QueryGenerator } from './QueryGenerator'\nimport { MutationAlias } from './requestAliases'\nimport { EntityListState, EntityRealmState, EntityRealmStateStub, EntityState, FieldState, getEntityMarker, StateIterator } from './state'\nimport type { TreeStore } from './TreeStore'\nimport { EntityFieldPersistedData, EntityFieldPersistedValue } from '../accessorTree'\n\n\ntype ProcessedPlaceholdersByEntity = Map<EntityState, Set<PlaceholderName>>\n\nexport type SubMutationOperation =\n\t& {\n\t\talias: string\n\t\tsubTreePlaceholder: PlaceholderName\n\t\tsubTreeType: 'list' | 'single'\n\t}\n\t& (\n\t\t| { type: 'delete'; id: EntityId }\n\t\t| { type: 'update'; markers: EntityFieldMarkers; id: EntityId }\n\t\t| { type: 'create'; markers: EntityFieldMarkers; id: EntityId }\n\t)\n\nexport type PersistMutationResult = {\n\tmutations: Record<string, ContentMutation<ReceivedEntityData>>\n\toperations: SubMutationOperation[]\n}\n\n// TODO enforce correct expected mutations in dev mode.\nexport class MutationGenerator {\n\n\tprivate aliasCounter = 1\n\tprivate processedPlaceholdersByEntity: ProcessedPlaceholdersByEntity = new Map()\n\tprivate processedDeletes = new Set<string>()\n\n\tprivate constructor(\n\t\tprivate readonly treeStore: TreeStore,\n\t\tprivate readonly qb: ContentQueryBuilder,\n\t) {\n\t}\n\n\tpublic static getPersistMutation(treeStore: TreeStore, qb: ContentQueryBuilder): PersistMutationResult {\n\t\treturn new MutationGenerator(treeStore, qb).getPersistMutation()\n\t}\n\n\tprivate getPersistMutation(): PersistMutationResult {\n\t\tconst mutations: Record<string, ContentMutation<any>> = {}\n\t\tconst operations: SubMutationOperation[] = []\n\n\t\tfor (const [treeRootId, rootStates] of this.treeStore.subTreeStatesByRoot.entries()) {\n\t\t\tfor (const [placeholderName, subTreeState] of Array.from(rootStates.entries()).reverse()) {\n\t\t\t\tif (subTreeState.unpersistedChangesCount <= 0) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tif (subTreeState.type === 'entityRealm') {\n\t\t\t\t\tif (subTreeState.blueprint.type === 'subTree' && subTreeState.blueprint.marker.parameters.isCreating && subTreeState.blueprint.marker.parameters.isUnpersisted) {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tconst subMutation = this.createMutation(\n\t\t\t\t\t\tplaceholderName,\n\t\t\t\t\t\t'single',\n\t\t\t\t\t\tsubTreeState.entity.id.value,\n\t\t\t\t\t\tsubTreeState,\n\t\t\t\t\t)\n\t\t\t\t\tif (subMutation) {\n\t\t\t\t\t\tmutations[subMutation[1].alias] = subMutation[0]\n\t\t\t\t\t\toperations.push(subMutation[1])\n\t\t\t\t\t}\n\t\t\t\t} else if (subTreeState.type === 'entityList') {\n\t\t\t\t\tif (subTreeState.blueprint.type === 'subTree' && subTreeState.blueprint.marker.parameters.isCreating && subTreeState.blueprint.marker.parameters.isUnpersisted) {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tfor (const childState of subTreeState.children.values()) {\n\t\t\t\t\t\tif (childState.type === 'entityRealmStub') {\n\t\t\t\t\t\t\t// TODO there can be a forceCreate somewhere in there that we're hereby ignoring.\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst subMutation = this.createMutation(\n\t\t\t\t\t\t\tplaceholderName,\n\t\t\t\t\t\t\t'list',\n\t\t\t\t\t\t\tchildState.entity.id.value,\n\t\t\t\t\t\t\tchildState,\n\t\t\t\t\t\t)\n\t\t\t\t\t\tif (subMutation) {\n\t\t\t\t\t\t\tmutations[subMutation[1].alias] = subMutation[0]\n\t\t\t\t\t\t\toperations.push(subMutation[1])\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (subTreeState.plannedRemovals) {\n\t\t\t\t\t\tfor (const [removedId, removalType] of subTreeState.plannedRemovals) {\n\t\t\t\t\t\t\tif (removalType === 'disconnect') {\n\t\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (removalType === 'delete') {\n\t\t\t\t\t\t\t\tconst key = `${subTreeState.entityName}#${removedId}`\n\t\t\t\t\t\t\t\tif (this.processedDeletes.has(key)) {\n\t\t\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tthis.processedDeletes.add(key)\n\t\t\t\t\t\t\t\tconst alias = this.createAlias()\n\t\t\t\t\t\t\t\tmutations[alias] = this.createDeleteMutation(\n\t\t\t\t\t\t\t\t\tsubTreeState.entityName,\n\t\t\t\t\t\t\t\t\tremovedId,\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\toperations.push({ alias, subTreePlaceholder: placeholderName, subTreeType: 'list', type: 'delete', id: removedId })\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tassertNever(removalType)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tassertNever(subTreeState)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn { mutations, operations }\n\t}\n\n\tprivate createMutation(\n\t\tsubTreePlaceholder: PlaceholderName,\n\t\tsubTreeType: 'list' | 'single',\n\t\tentityId: EntityId,\n\t\trealmState: EntityRealmState,\n\t): [ContentMutation<any>, SubMutationOperation] | undefined {\n\t\tif (realmState.unpersistedChangesCount === 0) {\n\t\t\t// Bail out early\n\t\t\treturn undefined\n\t\t}\n\t\tconst fieldMarkers = getEntityMarker(realmState).fields.markers\n\n\t\tconst alias = this.createAlias()\n\n\t\tif (realmState.entity.isScheduledForDeletion) {\n\t\t\tconst mutation = this.createDeleteMutation(\n\t\t\t\trealmState.entity.entityName,\n\t\t\t\tentityId,\n\t\t\t)\n\t\t\treturn [\n\t\t\t\tmutation,\n\t\t\t\t{\n\t\t\t\t\talias,\n\t\t\t\t\tsubTreePlaceholder,\n\t\t\t\t\tsubTreeType,\n\t\t\t\t\ttype: 'delete',\n\t\t\t\t\tid: entityId,\n\t\t\t\t},\n\t\t\t]\n\t\t} else if (!realmState.entity.id.existsOnServer) {\n\t\t\tconst builder = this.createCreateMutation(\n\t\t\t\trealmState,\n\t\t\t\tfieldMarkers,\n\t\t\t)\n\t\t\tif (!builder) {\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\treturn [\n\t\t\t\tbuilder,\n\t\t\t\t{\n\t\t\t\t\talias,\n\t\t\t\t\tsubTreePlaceholder,\n\t\t\t\t\tsubTreeType,\n\t\t\t\t\ttype: 'create',\n\t\t\t\t\tmarkers: fieldMarkers,\n\t\t\t\t\tid: entityId,\n\t\t\t\t},\n\t\t\t]\n\t\t}\n\t\tconst builder = this.createUpdateMutation(\n\t\t\trealmState,\n\t\t\tfieldMarkers,\n\t\t)\n\t\tif (!builder) {\n\t\t\treturn undefined\n\t\t}\n\t\treturn [\n\t\t\tbuilder,\n\t\t\t{\n\t\t\t\talias,\n\t\t\t\tsubTreePlaceholder,\n\t\t\t\tsubTreeType,\n\t\t\t\ttype: 'update',\n\t\t\t\tid: entityId,\n\t\t\t\tmarkers: fieldMarkers,\n\t\t\t},\n\t\t]\n\t}\n\n\tprivate createDeleteMutation(\n\t\tentityName: EntityName,\n\t\tdeletedId: EntityId,\n\t): ContentMutation<any> {\n\t\treturn this.qb.delete(entityName, {\n\t\t\tby: { [PRIMARY_KEY_NAME]: deletedId },\n\t\t}, it => it.$(PRIMARY_KEY_NAME).$('__typename'))\n\t}\n\n\tprivate createUpdateMutation(\n\t\tentityRealm: EntityRealmState,\n\t\tfieldMarkers: EntityFieldMarkers,\n\t): ContentMutation<any> | undefined {\n\t\tconst input = this.getUpdateDataInput(entityRealm)\n\n\t\tif (input === undefined) {\n\t\t\treturn undefined\n\t\t}\n\n\t\tconst runtimeId = entityRealm.entity.id\n\n\t\tif (!runtimeId.existsOnServer) {\n\t\t\treturn undefined\n\t\t}\n\n\t\treturn this.qb.update(entityRealm.entity.entityName, {\n\t\t\tby: {\n\t\t\t\t[PRIMARY_KEY_NAME]: runtimeId.value,\n\t\t\t},\n\t\t\tdata: input,\n\t\t}, it => QueryGenerator.registerQueryPart(fieldMarkers, it).$(PRIMARY_KEY_NAME).$('__typename'))\n\t}\n\n\tprivate createCreateMutation(\n\t\tentityRealm: EntityRealmState,\n\t\tfieldMarkers: EntityFieldMarkers,\n\t): ContentMutation<any> | undefined {\n\t\tconst input = this.getCreateDataInput(entityRealm)\n\t\tif (input === undefined) {\n\t\t\treturn undefined\n\t\t}\n\n\t\treturn this.qb.create(entityRealm.entity.entityName, {\n\t\t\tdata: input,\n\t\t}, it => QueryGenerator.registerQueryPart(fieldMarkers, it).$(PRIMARY_KEY_NAME).$('__typename'))\n\t}\n\n\tprivate getCreateDataInput(\n\t\tcurrentState: EntityRealmState | EntityRealmStateStub,\n\t): Input.CreateDataInput | undefined {\n\t\tlet processedPlaceholders = this.processedPlaceholdersByEntity.get(currentState.entity)\n\n\t\tif (processedPlaceholders === undefined) {\n\t\t\tthis.processedPlaceholdersByEntity.set(currentState.entity, (processedPlaceholders = new Set()))\n\t\t}\n\n\t\tif (currentState.type === 'entityRealmStub') {\n\t\t\t// TODO If there's a forceCreate, this is wrong.\n\t\t\treturn undefined\n\t\t}\n\n\t\tconst result: Input.CreateDataInput = {}\n\t\tfor (const siblingState of StateIterator.eachSiblingRealm(currentState)) {\n\n\t\t\tconst pathBack = this.treeStore.getPathBackToParent(siblingState)\n\n\t\t\tconst nonbearingFields: Array<| { type: 'field'; marker: FieldMarker; fieldState: FieldState }\n\t\t\t| { type: 'hasOne'; marker: HasOneRelationMarker; fieldState: EntityRealmState | EntityRealmStateStub }\n\t\t\t| { type: 'hasMany'; marker: HasManyRelationMarker; fieldState: EntityListState }> = []\n\n\t\t\tfor (const [placeholderName, fieldState] of siblingState.children) {\n\t\t\t\tif (processedPlaceholders.has(placeholderName)) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tprocessedPlaceholders.add(placeholderName)\n\n\t\t\t\tswitch (fieldState.type) {\n\t\t\t\t\tcase 'field': {\n\t\t\t\t\t\tconst marker = fieldState.fieldMarker\n\t\t\t\t\t\tconst placeholderName = marker.placeholderName\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tplaceholderName === TYPENAME_KEY_NAME ||\n\t\t\t\t\t\t\t(placeholderName === PRIMARY_KEY_NAME && !(siblingState.entity.id instanceof ClientGeneratedUuid))\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (marker.isNonbearing) {\n\t\t\t\t\t\t\tnonbearingFields.push({\n\t\t\t\t\t\t\t\ttype: 'field',\n\t\t\t\t\t\t\t\tmarker,\n\t\t\t\t\t\t\t\tfieldState,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst accessor = fieldState.getAccessor()\n\t\t\t\t\t\tconst value = accessor.value ?? accessor.defaultValue ?? null\n\t\t\t\t\t\tif (value !== undefined && value !== null) {\n\t\t\t\t\t\t\tresult[marker.fieldName] = value\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase 'entityRealmStub':\n\t\t\t\t\tcase 'entityRealm': {\n\t\t\t\t\t\tconst marker = getEntityMarker(fieldState)\n\t\t\t\t\t\tif (!(marker instanceof HasOneRelationMarker)) {\n\t\t\t\t\t\t\tthrow new BindingError()\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (pathBack?.fieldBackToParent === marker.parameters.field) {\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (marker.parameters.isNonbearing) {\n\t\t\t\t\t\t\tnonbearingFields.push({\n\t\t\t\t\t\t\t\ttype: 'hasOne',\n\t\t\t\t\t\t\t\tmarker,\n\t\t\t\t\t\t\t\tfieldState,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst input = this.getCreateOneRelationInput(fieldState, marker)\n\t\t\t\t\t\tif (input !== undefined) {\n\t\t\t\t\t\t\tconst current = result[marker.parameters.field]\n\t\t\t\t\t\t\tif (Array.isArray(input) && Array.isArray(current)) {\n\t\t\t\t\t\t\t\tcurrent.push(...input)\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tresult[marker.parameters.field] = input\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase 'entityList': {\n\t\t\t\t\t\tconst marker = fieldState.blueprint.marker\n\t\t\t\t\t\tif (!(marker instanceof HasManyRelationMarker)) {\n\t\t\t\t\t\t\tthrow new BindingError()\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (pathBack?.fieldBackToParent === marker.parameters.field) {\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (marker.parameters.isNonbearing) {\n\t\t\t\t\t\t\tnonbearingFields.push({\n\t\t\t\t\t\t\t\ttype: 'hasMany',\n\t\t\t\t\t\t\t\tmarker,\n\t\t\t\t\t\t\t\tfieldState,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst input = this.getCreateManyRelationInput(fieldState)\n\t\t\t\t\t\tif (input !== undefined) {\n\t\t\t\t\t\t\tconst current = result[marker.parameters.field]\n\t\t\t\t\t\t\tif (Array.isArray(current)) {\n\t\t\t\t\t\t\t\tcurrent.push(...input)\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tresult[marker.parameters.field] = input\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tdefault: {\n\t\t\t\t\t\treturn assertNever(fieldState)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ((!isEmptyObject(result)) || !getEntityMarker(siblingState).fields.hasAtLeastOneBearingField) {\n\t\t\t\tfor (const field of nonbearingFields) {\n\t\t\t\t\tswitch (field.type) {\n\t\t\t\t\t\tcase 'field': {\n\t\t\t\t\t\t\tconst accessor = field.fieldState.getAccessor()\n\t\t\t\t\t\t\tconst value = accessor.value ?? accessor.defaultValue ?? null\n\t\t\t\t\t\t\tif (value !== undefined) {\n\t\t\t\t\t\t\t\tresult[field.marker.fieldName] = value\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase 'hasOne': {\n\t\t\t\t\t\t\tconst input = this.getCreateOneRelationInput(\n\t\t\t\t\t\t\t\tfield.fieldState,\n\t\t\t\t\t\t\t\tfield.marker,\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\tif (input !== undefined) {\n\t\t\t\t\t\t\t\tconst current = result[field.marker.parameters.field]\n\t\t\t\t\t\t\t\tif (Array.isArray(input) && Array.isArray(current)) {\n\t\t\t\t\t\t\t\t\tcurrent.push(...input)\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tresult[field.marker.parameters.field] = input\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase 'hasMany': {\n\t\t\t\t\t\t\tconst input = this.getCreateManyRelationInput(\n\t\t\t\t\t\t\t\tfield.fieldState,\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\tif (input !== undefined) {\n\t\t\t\t\t\t\t\tconst current = result[field.marker.parameters.field]\n\t\t\t\t\t\t\t\tif (Array.isArray(current)) {\n\t\t\t\t\t\t\t\t\tcurrent.push(...input)\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tresult[field.marker.parameters.field] = input\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tassertNever(field)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst setOnCreate = getEntityMarker(siblingState).parameters.setOnCreate\n\t\t\tif (setOnCreate && !isEmptyObject(result)) {\n\t\t\t\tfor (const key in setOnCreate) {\n\t\t\t\t\tconst field = setOnCreate[key]\n\n\t\t\t\t\tif (\n\t\t\t\t\t\ttypeof field === 'string' ||\n\t\t\t\t\t\ttypeof field === 'number' ||\n\t\t\t\t\t\tfield === null\n\t\t\t\t\t) {\n\t\t\t\t\t\tresult[key] = field\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult[key] = { connect: field }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn isEmptyObject(result) ? undefined : result\n\t}\n\n\tprivate getCreateOneRelationInput(\n\t\tfieldState: EntityRealmState | EntityRealmStateStub,\n\t\tmarker: HasOneRelationMarker,\n\t): Input.CreateOneRelationInput | Input.CreateManyRelationInput | undefined {\n\t\tconst reducedBy = marker.parameters.reducedBy\n\t\tconst runtimeId = fieldState.entity.id\n\n\t\tif (reducedBy === undefined) {\n\t\t\tif (this.shouldConnectInsteadOfCreate(fieldState)) {\n\t\t\t\treturn { connect: { [PRIMARY_KEY_NAME]: runtimeId.value } }\n\t\t\t}\n\n\t\t\tconst createData = this.getCreateDataInput(fieldState)\n\t\t\tif (createData === undefined) {\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\treturn { create: createData }\n\t\t}\n\n\t\tconst alias = MutationAlias.encodeEntityId(runtimeId)\n\t\tif (this.shouldConnectInsteadOfCreate(fieldState)) {\n\t\t\t// TODO also potentially update\n\t\t\treturn [{ connect: { [PRIMARY_KEY_NAME]: runtimeId.value }, alias }]\n\t\t}\n\t\tconst createData = this.getCreateDataInput(fieldState)\n\t\tif (createData === undefined) {\n\t\t\treturn undefined\n\t\t}\n\t\treturn [{ create: createData, alias }]\n\t}\n\n\tprivate getCreateManyRelationInput(fieldState: EntityListState): Input.CreateManyRelationInput | undefined {\n\t\tconst result: Input.CreateManyRelationInput = []\n\t\tfor (const entityRealm of fieldState.children.values()) {\n\t\t\tconst runtimeId = entityRealm.entity.id\n\t\t\tconst alias = MutationAlias.encodeEntityId(runtimeId)\n\t\t\tif (this.shouldConnectInsteadOfCreate(entityRealm)) {\n\t\t\t\tresult.push({\n\t\t\t\t\talias,\n\t\t\t\t\tconnect: { [PRIMARY_KEY_NAME]: runtimeId.value },\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\tconst createData = this.getCreateDataInput(entityRealm)\n\t\t\t\tif (createData === undefined) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tresult.push({\n\t\t\t\t\talias,\n\t\t\t\t\tcreate: createData,\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t\treturn result.length === 0 ? undefined : result\n\t}\n\n\tprivate shouldConnectInsteadOfCreate(currentState: EntityRealmState | EntityRealmStateStub): boolean {\n\t\tconst runtimeId = currentState.entity.id\n\t\tconst processedPlaceholders = this.processedPlaceholdersByEntity.get(currentState.entity)\n\n\t\treturn runtimeId.existsOnServer || (runtimeId instanceof ClientGeneratedUuid && (processedPlaceholders?.has(PRIMARY_KEY_NAME) ?? false))\n\t}\n\n\tprivate getUpdateDataInput(currentState: EntityRealmState): Input.UpdateDataInput | undefined {\n\t\tlet processedPlaceholders = this.processedPlaceholdersByEntity.get(currentState.entity)\n\n\t\tif (processedPlaceholders === undefined) {\n\t\t\tthis.processedPlaceholdersByEntity.set(currentState.entity, (processedPlaceholders = new Set()))\n\t\t}\n\n\t\tconst pathBack = this.treeStore.getPathBackToParent(currentState)\n\t\tconst entityData = this.treeStore.persistedEntityData.get(currentState.entity.id.uniqueValue)\n\n\t\tconst result: Input.UpdateDataInput = {}\n\n\t\tfor (const [placeholderName, fieldState] of currentState.children) {\n\t\t\tif (placeholderName === PRIMARY_KEY_NAME || placeholderName === TYPENAME_KEY_NAME) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif (processedPlaceholders.has(placeholderName)) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tprocessedPlaceholders.add(placeholderName)\n\n\t\t\tswitch (fieldState.type) {\n\t\t\t\tcase 'field': {\n\t\t\t\t\tif (fieldState.persistedValue !== undefined) {\n\t\t\t\t\t\tconst accessor = fieldState.getAccessor()\n\t\t\t\t\t\tconst resolvedValue = accessor.value ?? accessor.defaultValue ?? null\n\t\t\t\t\t\tif (fieldState.persistedValue !== resolvedValue) {\n\t\t\t\t\t\t\tresult[placeholderName] = resolvedValue\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tcase 'entityRealmStub':\n\t\t\t\tcase 'entityRealm': {\n\t\t\t\t\tconst marker = getEntityMarker(fieldState)\n\t\t\t\t\tif (!(marker instanceof HasOneRelationMarker)) {\n\t\t\t\t\t\tthrow new BindingError()\n\t\t\t\t\t}\n\t\t\t\t\tif (pathBack?.fieldBackToParent === marker.parameters.field) {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tconst reducedBy = marker.parameters.reducedBy\n\n\t\t\t\t\tconst persistedValue = entityData?.get?.(placeholderName)?.value\n\t\t\t\t\tif (reducedBy === undefined) {\n\n\t\t\t\t\t\tconst relationData = this.getUpdateOneRelationInput(currentState, fieldState, persistedValue, placeholderName)\n\t\t\t\t\t\tif (relationData !== undefined) {\n\t\t\t\t\t\t\tresult[marker.parameters.field] = relationData\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst relationData = this.getUpdateManyRelationForReducedInput(currentState, fieldState, persistedValue, placeholderName, reducedBy)\n\t\t\t\t\t\tif (relationData !== undefined) {\n\t\t\t\t\t\t\tconst current = result[marker.parameters.field]\n\t\t\t\t\t\t\tif (Array.isArray(current)) {\n\t\t\t\t\t\t\t\tcurrent.push(...relationData)\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tresult[marker.parameters.field] = relationData\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tcase 'entityList': {\n\t\t\t\t\tconst marker = fieldState.blueprint.marker\n\t\t\t\t\tif (!(marker instanceof HasManyRelationMarker)) {\n\t\t\t\t\t\tthrow new BindingError()\n\t\t\t\t\t}\n\t\t\t\t\tif (pathBack?.fieldBackToParent === marker.parameters.field) {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tconst persistedEntityIds = entityData?.get?.(placeholderName)?.value ?? new Set()\n\n\t\t\t\t\tif (!(persistedEntityIds instanceof Set)) {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tconst relationData = this.getUpdateManyRelationInput(fieldState, persistedEntityIds)\n\t\t\t\t\tif (relationData !== undefined) {\n\t\t\t\t\t\tconst current = result[marker.parameters.field]\n\t\t\t\t\t\tif (Array.isArray(current)) {\n\t\t\t\t\t\t\tcurrent.push(...relationData)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tresult[marker.parameters.field] = relationData\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t\treturn assertNever(fieldState)\n\t\t\t}\n\t\t}\n\n\t\treturn isEmptyObject(result) ? undefined : result\n\t}\n\n\tprivate getUpdateOneRelationInput(\n\t\tcurrentState: EntityRealmState,\n\t\tfieldState: EntityRealmState | EntityRealmStateStub,\n\t\tpersistedValue: EntityFieldPersistedValue | undefined,\n\t\tplaceholderName: PlaceholderName,\n\t): Input.UpdateOneRelationInput | undefined {\n\t\tconst runtimeId = fieldState.entity.id\n\t\tif (persistedValue instanceof ServerId) {\n\t\t\tif (persistedValue.value === runtimeId.value) {\n\t\t\t\t// The persisted and currently referenced ids match, and so this is an update.\n\t\t\t\tif (fieldState.type === 'entityRealmStub') {\n\t\t\t\t\treturn undefined// …unless we're dealing with a stub. There cannot be any updates there.\n\t\t\t\t}\n\t\t\t\tconst input = this.getUpdateDataInput(fieldState)\n\t\t\t\tif (input === undefined) {\n\t\t\t\t\treturn undefined\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tupdate: input,\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// There was a referenced entity but currently, there is a different one. Let's investigate:\n\n\t\t\tconst plannedDeletion = currentState.plannedHasOneDeletions?.get(placeholderName)\n\t\t\tif (plannedDeletion !== undefined) {\n\t\t\t\tconst key = `${persistedValue.entityName}#${persistedValue.value}`\n\t\t\t\tif (this.processedDeletes.has(key)) {\n\t\t\t\t\treturn undefined\n\t\t\t\t}\n\t\t\t\tthis.processedDeletes.add(key)\n\n\t\t\t\t// It's planned for deletion.\n\t\t\t\t// TODO also potentially do something about the current entity\n\t\t\t\treturn {\n\t\t\t\t\tdelete: true,\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (runtimeId.existsOnServer) {\n\t\t\t\t// This isn't the persisted entity but it does exist on the server. Thus this is a connect.\n\t\t\t\t// TODO also potentially update\n\t\t\t\treturn {\n\t\t\t\t\tconnect: { [PRIMARY_KEY_NAME]: runtimeId.value },\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t// The currently present entity doesn't exist on the server. Try if creating yields anything…\n\t\t\tconst createInput = this.getCreateDataInput(fieldState)\n\t\t\tif (createInput !== undefined) {\n\t\t\t\treturn {\n\t\t\t\t\tcreate: createInput,\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// …but if it doesn't, we just disconnect.\n\t\t\t\treturn {\n\t\t\t\t\tdisconnect: true,\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (runtimeId.existsOnServer) {\n\t\t\t// There isn't a linked entity on the server but we're seeing one that exists there.\n\t\t\t// Thus this is a connect.\n\t\t\t// TODO also potentially update\n\t\t\treturn {\n\t\t\t\tconnect: { [PRIMARY_KEY_NAME]: runtimeId.value },\n\t\t\t}\n\t\t} else {\n\t\t\tconst input = this.getCreateDataInput(fieldState)\n\t\t\tif (input === undefined) {\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tcreate: input,\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate getUpdateManyRelationForReducedInput(\n\t\tcurrentState: EntityRealmState,\n\t\tfieldState: EntityRealmState | EntityRealmStateStub,\n\t\tpersistedValue: EntityFieldPersistedValue | undefined,\n\t\tplaceholderName: PlaceholderName,\n\t\treducedBy: UniqueWhere,\n\t): Input.UpdateManyRelationInput | undefined {\n\n\t\tconst runtimeId = fieldState.entity.id\n\t\tconst alias = MutationAlias.encodeEntityId(runtimeId)\n\n\t\tif (persistedValue instanceof ServerId) {\n\t\t\tif (persistedValue.value === runtimeId.value) {\n\t\t\t\tif (fieldState.type === 'entityRealmStub') {\n\t\t\t\t\treturn undefined\n\t\t\t\t}\n\t\t\t\tconst updateData = this.getUpdateDataInput(fieldState)\n\t\t\t\tif (updateData === undefined) {\n\t\t\t\t\treturn undefined\n\t\t\t\t}\n\t\t\t\treturn [{\n\t\t\t\t\talias,\n\t\t\t\t\tupdate: {\n\t\t\t\t\t\tby: reducedBy,\n\t\t\t\t\t\tdata: updateData,\n\t\t\t\t\t},\n\t\t\t\t}]\n\t\t\t}\n\t\t\tconst plannedDeletion = currentState.plannedHasOneDeletions?.get(placeholderName)\n\t\t\tif (plannedDeletion !== undefined) {\n\t\t\t\tconst key = `${persistedValue.entityName}#${persistedValue.value}`\n\t\t\t\tif (this.processedDeletes.has(key)) {\n\t\t\t\t\treturn undefined\n\t\t\t\t}\n\t\t\t\tthis.processedDeletes.add(key)\n\t\t\t\treturn [{\n\t\t\t\t\talias,\n\t\t\t\t\tdelete: reducedBy,\n\t\t\t\t}]\n\t\t\t}\n\t\t\tif (runtimeId.existsOnServer) {\n\t\t\t\t// TODO will re-using the alias like this work?\n\t\t\t\t// TODO also potentially update\n\t\t\t\treturn [\n\t\t\t\t\t{\n\t\t\t\t\t\talias,\n\t\t\t\t\t\tdisconnect: reducedBy,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\talias,\n\t\t\t\t\t\tconnect: { [PRIMARY_KEY_NAME]: runtimeId.value },\n\t\t\t\t\t},\n\t\t\t\t]\n\t\t\t}\n\t\t\tconst createInput = this.getCreateDataInput(fieldState)\n\n\t\t\tif (createInput === undefined) {\n\t\t\t\treturn [{\n\t\t\t\t\talias,\n\t\t\t\t\tdisconnect: reducedBy,\n\t\t\t\t}]\n\t\t\t}\n\t\t\treturn [{\n\t\t\t\talias,\n\t\t\t\tcreate: createInput,\n\t\t\t}]\n\t\t} else if (runtimeId.existsOnServer) {\n\t\t\treturn [{\n\t\t\t\talias,\n\t\t\t\tconnect: { [PRIMARY_KEY_NAME]: runtimeId.value },\n\t\t\t}]\n\t\t} else {\n\t\t\tconst createInput = this.getCreateDataInput(fieldState)\n\t\t\tif (createInput === undefined) {\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\treturn [{\n\t\t\t\talias,\n\t\t\t\tcreate: createInput,\n\t\t\t}]\n\t\t}\n\t}\n\n\tprivate getUpdateManyRelationInput(\n\t\tfieldState: EntityListState,\n\t\tpersistedEntityIds: Set<EntityId>,\n\t): Input.UpdateManyRelationInput | undefined {\n\n\t\tconst input: Input.UpdateManyRelationInput = []\n\t\tfor (const childState of fieldState.children.values()) {\n\t\t\tconst runtimeId = childState.entity.id\n\t\t\tconst alias = MutationAlias.encodeEntityId(runtimeId)\n\n\t\t\tif (runtimeId.existsOnServer) {\n\t\t\t\tif (persistedEntityIds.has(runtimeId.value)) {\n\t\t\t\t\tif (childState.type !== 'entityRealmStub') {\n\t\t\t\t\t\tconst dataInput = this.getUpdateDataInput(childState)\n\n\t\t\t\t\t\tif (dataInput !== undefined) {\n\t\t\t\t\t\t\tinput.push({\n\t\t\t\t\t\t\t\talias,\n\t\t\t\t\t\t\t\tupdate: {\n\t\t\t\t\t\t\t\t\tby: { [PRIMARY_KEY_NAME]: runtimeId.value },\n\t\t\t\t\t\t\t\t\tdata: dataInput,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tinput.push({\n\t\t\t\t\t\talias,\n\t\t\t\t\t\tconnect: { [PRIMARY_KEY_NAME]: runtimeId.value },\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst dataInput = this.getCreateDataInput(childState)\n\t\t\t\tif (dataInput !== undefined) {\n\t\t\t\t\tinput.push({\n\t\t\t\t\t\talias,\n\t\t\t\t\t\tcreate: dataInput,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (fieldState.plannedRemovals) {\n\t\t\tfor (const [removedId, removalType] of fieldState.plannedRemovals) {\n\t\t\t\tconst alias = MutationAlias.encodeEntityId(new ServerId(removedId, fieldState.entityName))\n\t\t\t\tif (removalType === 'delete') {\n\t\t\t\t\tconst key = `${fieldState.entityName}#${removedId}`\n\t\t\t\t\tif (this.processedDeletes.has(key)) {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tthis.processedDeletes.add(key)\n\n\t\t\t\t\tinput.push({\n\t\t\t\t\t\talias,\n\t\t\t\t\t\tdelete: { [PRIMARY_KEY_NAME]: removedId },\n\t\t\t\t\t})\n\n\t\t\t\t} else if (removalType === 'disconnect') {\n\t\t\t\t\t// TODO also potentially update\n\n\t\t\t\t\tinput.push({\n\t\t\t\t\t\talias,\n\t\t\t\t\t\tdisconnect: { [PRIMARY_KEY_NAME]: removedId },\n\t\t\t\t\t})\n\t\t\t\t} else {\n\t\t\t\t\tassertNever(removalType)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn input.length === 0 ? undefined : input\n\t}\n\n\n\tprivate createAlias(): string {\n\t\treturn `op_${this.aliasCounter++}`\n\t}\n}\n"],"names":["assertNever","getEntityMarker","builder","PRIMARY_KEY_NAME","QueryGenerator","StateIterator","placeholderName","TYPENAME_KEY_NAME","ClientGeneratedUuid","HasOneRelationMarker","BindingError","HasManyRelationMarker","isEmptyObject","createData","MutationAlias","ServerId"],"mappings":";;;;;;;;;;;AAmCO,MAAM,kBAAkB;AAAA,EAMtB,YACU,WACA,IAChB;AAFgB,SAAA,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