effect 2.0.0-next.42 → 2.0.0-next.43

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 (669) hide show
  1. package/Bigint/dist/effect-Bigint.cjs.dev.js +365 -28
  2. package/Bigint/dist/effect-Bigint.cjs.prod.js +365 -28
  3. package/Boolean/dist/effect-Boolean.cjs.dev.js +243 -22
  4. package/Boolean/dist/effect-Boolean.cjs.prod.js +243 -22
  5. package/Brand/dist/effect-Brand.cjs.dev.js +221 -26
  6. package/Brand/dist/effect-Brand.cjs.prod.js +221 -26
  7. package/Cache/dist/effect-Cache.cjs.dev.js +181 -76
  8. package/Cache/dist/effect-Cache.cjs.prod.js +181 -76
  9. package/Cause/dist/effect-Cause.cjs.dev.js +754 -93
  10. package/Cause/dist/effect-Cause.cjs.prod.js +754 -93
  11. package/Channel/dist/effect-Channel.cjs.dev.js +1205 -213
  12. package/Channel/dist/effect-Channel.cjs.prod.js +1205 -213
  13. package/ChannelChildExecutorDecision/dist/effect-ChannelChildExecutorDecision.cjs.dev.js +118 -12
  14. package/ChannelChildExecutorDecision/dist/effect-ChannelChildExecutorDecision.cjs.prod.js +118 -12
  15. package/ChannelMergeDecision/dist/effect-ChannelMergeDecision.cjs.dev.js +63 -9
  16. package/ChannelMergeDecision/dist/effect-ChannelMergeDecision.cjs.prod.js +63 -9
  17. package/ChannelMergeState/dist/effect-ChannelMergeState.cjs.dev.js +107 -12
  18. package/ChannelMergeState/dist/effect-ChannelMergeState.cjs.prod.js +107 -12
  19. package/ChannelMergeStrategy/dist/effect-ChannelMergeStrategy.cjs.dev.js +88 -10
  20. package/ChannelMergeStrategy/dist/effect-ChannelMergeStrategy.cjs.prod.js +88 -10
  21. package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.dev.js +130 -89
  22. package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.prod.js +130 -89
  23. package/ChannelUpstreamPullRequest/dist/effect-ChannelUpstreamPullRequest.cjs.dev.js +88 -10
  24. package/ChannelUpstreamPullRequest/dist/effect-ChannelUpstreamPullRequest.cjs.prod.js +88 -10
  25. package/ChannelUpstreamPullStrategy/dist/effect-ChannelUpstreamPullStrategy.cjs.dev.js +87 -10
  26. package/ChannelUpstreamPullStrategy/dist/effect-ChannelUpstreamPullStrategy.cjs.prod.js +87 -10
  27. package/Chunk/dist/effect-Chunk.cjs.dev.js +1170 -101
  28. package/Chunk/dist/effect-Chunk.cjs.prod.js +1170 -101
  29. package/Clock/dist/effect-Clock.cjs.dev.js +120 -49
  30. package/Clock/dist/effect-Clock.cjs.prod.js +120 -49
  31. package/Config/dist/effect-Config.cjs.dev.js +386 -71
  32. package/Config/dist/effect-Config.cjs.prod.js +386 -71
  33. package/ConfigError/dist/effect-ConfigError.cjs.dev.js +219 -40
  34. package/ConfigError/dist/effect-ConfigError.cjs.prod.js +219 -40
  35. package/ConfigProvider/dist/effect-ConfigProvider.cjs.dev.js +250 -58
  36. package/ConfigProvider/dist/effect-ConfigProvider.cjs.prod.js +250 -58
  37. package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.dev.js +92 -28
  38. package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.prod.js +92 -28
  39. package/ConfigSecret/dist/effect-ConfigSecret.cjs.dev.js +85 -28
  40. package/ConfigSecret/dist/effect-ConfigSecret.cjs.prod.js +85 -28
  41. package/Console/dist/effect-Console.cjs.dev.js +315 -105
  42. package/Console/dist/effect-Console.cjs.prod.js +315 -105
  43. package/Context/dist/effect-Context.cjs.dev.js +322 -33
  44. package/Context/dist/effect-Context.cjs.prod.js +322 -33
  45. package/Data/dist/effect-Data.cjs.dev.js +223 -21
  46. package/Data/dist/effect-Data.cjs.prod.js +223 -21
  47. package/DefaultServices/dist/effect-DefaultServices.cjs.dev.js +59 -41
  48. package/DefaultServices/dist/effect-DefaultServices.cjs.prod.js +59 -41
  49. package/Deferred/dist/effect-Deferred.cjs.dev.js +254 -55
  50. package/Deferred/dist/effect-Deferred.cjs.prod.js +254 -55
  51. package/Differ/dist/effect-Differ.cjs.dev.js +985 -42
  52. package/Differ/dist/effect-Differ.cjs.prod.js +985 -42
  53. package/Duration/dist/effect-Duration.cjs.dev.js +476 -51
  54. package/Duration/dist/effect-Duration.cjs.prod.js +476 -51
  55. package/Effect/dist/effect-Effect.cjs.dev.js +3484 -410
  56. package/Effect/dist/effect-Effect.cjs.prod.js +3484 -410
  57. package/Effectable/dist/effect-Effectable.cjs.dev.js +92 -21
  58. package/Effectable/dist/effect-Effectable.cjs.prod.js +92 -21
  59. package/Either/dist/effect-Either.cjs.dev.js +475 -43
  60. package/Either/dist/effect-Either.cjs.prod.js +475 -43
  61. package/Encoding/dist/effect-Encoding.cjs.dev.js +302 -29
  62. package/Encoding/dist/effect-Encoding.cjs.prod.js +302 -29
  63. package/Equal/dist/effect-Equal.cjs.dev.js +61 -10
  64. package/Equal/dist/effect-Equal.cjs.prod.js +61 -10
  65. package/Equivalence/dist/effect-Equivalence.cjs.dev.js +213 -23
  66. package/Equivalence/dist/effect-Equivalence.cjs.prod.js +213 -23
  67. package/Error/dist/effect-Error.cjs.dev.js +130 -90
  68. package/Error/dist/effect-Error.cjs.prod.js +130 -90
  69. package/ExecutionStrategy/dist/effect-ExecutionStrategy.cjs.dev.js +2 -2
  70. package/ExecutionStrategy/dist/effect-ExecutionStrategy.cjs.prod.js +2 -2
  71. package/Exit/dist/effect-Exit.cjs.dev.js +395 -69
  72. package/Exit/dist/effect-Exit.cjs.prod.js +395 -69
  73. package/Fiber/dist/effect-Fiber.cjs.dev.js +537 -123
  74. package/Fiber/dist/effect-Fiber.cjs.prod.js +537 -123
  75. package/FiberId/dist/effect-FiberId.cjs.dev.js +19 -19
  76. package/FiberId/dist/effect-FiberId.cjs.prod.js +19 -19
  77. package/FiberRef/dist/effect-FiberRef.cjs.dev.js +400 -120
  78. package/FiberRef/dist/effect-FiberRef.cjs.prod.js +400 -120
  79. package/FiberRefs/dist/effect-FiberRefs.cjs.dev.js +147 -46
  80. package/FiberRefs/dist/effect-FiberRefs.cjs.prod.js +147 -46
  81. package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.dev.js +110 -40
  82. package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.prod.js +110 -40
  83. package/FiberStatus/dist/effect-FiberStatus.cjs.dev.js +185 -18
  84. package/FiberStatus/dist/effect-FiberStatus.cjs.prod.js +185 -18
  85. package/Function/dist/effect-Function.cjs.dev.js +511 -24
  86. package/Function/dist/effect-Function.cjs.prod.js +511 -24
  87. package/GlobalValue/dist/effect-GlobalValue.cjs.dev.js +18 -3
  88. package/GlobalValue/dist/effect-GlobalValue.cjs.prod.js +18 -3
  89. package/GroupBy/dist/effect-GroupBy.cjs.dev.js +167 -110
  90. package/GroupBy/dist/effect-GroupBy.cjs.prod.js +167 -110
  91. package/Hash/dist/effect-Hash.cjs.dev.js +175 -19
  92. package/Hash/dist/effect-Hash.cjs.prod.js +175 -19
  93. package/HashMap/dist/effect-HashMap.cjs.dev.js +337 -52
  94. package/HashMap/dist/effect-HashMap.cjs.prod.js +337 -52
  95. package/HashSet/dist/effect-HashSet.cjs.dev.js +266 -45
  96. package/HashSet/dist/effect-HashSet.cjs.prod.js +266 -45
  97. package/Hub/dist/effect-Hub.cjs.dev.js +1319 -88
  98. package/Hub/dist/effect-Hub.cjs.prod.js +1319 -88
  99. package/Inspectable/dist/effect-Inspectable.cjs.dev.js +37 -4
  100. package/Inspectable/dist/effect-Inspectable.cjs.prod.js +37 -4
  101. package/KeyedPool/dist/effect-KeyedPool.cjs.dev.js +327 -82
  102. package/KeyedPool/dist/effect-KeyedPool.cjs.prod.js +327 -82
  103. package/Layer/dist/effect-Layer.cjs.dev.js +696 -146
  104. package/Layer/dist/effect-Layer.cjs.prod.js +696 -146
  105. package/List/dist/effect-List.cjs.dev.js +868 -68
  106. package/List/dist/effect-List.cjs.prod.js +868 -68
  107. package/LogLevel/dist/effect-LogLevel.cjs.dev.js +243 -50
  108. package/LogLevel/dist/effect-LogLevel.cjs.prod.js +243 -50
  109. package/LogSpan/dist/effect-LogSpan.cjs.dev.js +34 -3
  110. package/LogSpan/dist/effect-LogSpan.cjs.prod.js +34 -3
  111. package/Logger/dist/effect-Logger.cjs.dev.js +313 -112
  112. package/Logger/dist/effect-Logger.cjs.prod.js +313 -112
  113. package/Metric/dist/effect-Metric.cjs.dev.js +503 -115
  114. package/Metric/dist/effect-Metric.cjs.prod.js +503 -115
  115. package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.dev.js +72 -26
  116. package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.prod.js +72 -26
  117. package/MetricHook/dist/effect-MetricHook.cjs.dev.js +95 -33
  118. package/MetricHook/dist/effect-MetricHook.cjs.prod.js +95 -33
  119. package/MetricKey/dist/effect-MetricKey.cjs.dev.js +133 -35
  120. package/MetricKey/dist/effect-MetricKey.cjs.prod.js +133 -35
  121. package/MetricKeyType/dist/effect-MetricKeyType.cjs.dev.js +179 -38
  122. package/MetricKeyType/dist/effect-MetricKeyType.cjs.prod.js +179 -38
  123. package/MetricLabel/dist/effect-MetricLabel.cjs.dev.js +47 -12
  124. package/MetricLabel/dist/effect-MetricLabel.cjs.prod.js +47 -12
  125. package/MetricPair/dist/effect-MetricPair.cjs.dev.js +38 -6
  126. package/MetricPair/dist/effect-MetricPair.cjs.prod.js +38 -6
  127. package/MetricPolling/dist/effect-MetricPolling.cjs.dev.js +229 -85
  128. package/MetricPolling/dist/effect-MetricPolling.cjs.prod.js +229 -85
  129. package/MetricRegistry/dist/effect-MetricRegistry.cjs.dev.js +55 -33
  130. package/MetricRegistry/dist/effect-MetricRegistry.cjs.prod.js +55 -33
  131. package/MetricState/dist/effect-MetricState.cjs.dev.js +174 -29
  132. package/MetricState/dist/effect-MetricState.cjs.prod.js +174 -29
  133. package/MutableHashMap/dist/effect-MutableHashMap.cjs.dev.js +149 -32
  134. package/MutableHashMap/dist/effect-MutableHashMap.cjs.prod.js +149 -32
  135. package/MutableHashSet/dist/effect-MutableHashSet.cjs.dev.js +111 -30
  136. package/MutableHashSet/dist/effect-MutableHashSet.cjs.prod.js +111 -30
  137. package/MutableList/dist/effect-MutableList.cjs.dev.js +276 -20
  138. package/MutableList/dist/effect-MutableList.cjs.prod.js +276 -20
  139. package/MutableQueue/dist/effect-MutableQueue.cjs.dev.js +209 -32
  140. package/MutableQueue/dist/effect-MutableQueue.cjs.prod.js +209 -32
  141. package/MutableRef/dist/effect-MutableRef.cjs.dev.js +175 -28
  142. package/MutableRef/dist/effect-MutableRef.cjs.prod.js +175 -28
  143. package/NonEmptyIterable/dist/effect-NonEmptyIterable.cjs.dev.js +25 -2
  144. package/NonEmptyIterable/dist/effect-NonEmptyIterable.cjs.prod.js +25 -2
  145. package/Number/dist/effect-Number.cjs.dev.js +389 -29
  146. package/Number/dist/effect-Number.cjs.prod.js +389 -29
  147. package/Option/dist/effect-Option.cjs.dev.js +1137 -79
  148. package/Option/dist/effect-Option.cjs.prod.js +1137 -79
  149. package/Order/dist/effect-Order.cjs.dev.js +288 -31
  150. package/Order/dist/effect-Order.cjs.prod.js +288 -31
  151. package/Ordering/dist/effect-Ordering.cjs.dev.js +89 -7
  152. package/Ordering/dist/effect-Ordering.cjs.prod.js +89 -7
  153. package/Pipeable/dist/effect-Pipeable.cjs.dev.js +41 -2
  154. package/Pipeable/dist/effect-Pipeable.cjs.prod.js +41 -2
  155. package/Pool/dist/effect-Pool.cjs.dev.js +176 -78
  156. package/Pool/dist/effect-Pool.cjs.prod.js +176 -78
  157. package/Predicate/dist/effect-Predicate.cjs.dev.js +672 -44
  158. package/Predicate/dist/effect-Predicate.cjs.prod.js +672 -44
  159. package/Queue/dist/effect-Queue.cjs.dev.js +426 -104
  160. package/Queue/dist/effect-Queue.cjs.prod.js +426 -104
  161. package/Random/dist/effect-Random.cjs.dev.js +126 -50
  162. package/Random/dist/effect-Random.cjs.prod.js +126 -50
  163. package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.dev.js +1589 -157
  164. package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.prod.js +1589 -157
  165. package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.dev.js +552 -42
  166. package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.prod.js +552 -42
  167. package/RedBlackTree/dist/effect-RedBlackTree.cjs.dev.js +1638 -59
  168. package/RedBlackTree/dist/effect-RedBlackTree.cjs.prod.js +1638 -59
  169. package/Ref/dist/effect-Ref.cjs.dev.js +31 -31
  170. package/Ref/dist/effect-Ref.cjs.prod.js +31 -31
  171. package/Reloadable/dist/effect-Reloadable.cjs.dev.js +225 -92
  172. package/Reloadable/dist/effect-Reloadable.cjs.prod.js +225 -92
  173. package/Request/dist/effect-Request.cjs.dev.js +237 -87
  174. package/Request/dist/effect-Request.cjs.prod.js +237 -87
  175. package/RequestBlock/dist/effect-RequestBlock.cjs.dev.js +194 -99
  176. package/RequestBlock/dist/effect-RequestBlock.cjs.prod.js +194 -99
  177. package/RequestResolver/dist/effect-RequestResolver.cjs.dev.js +291 -109
  178. package/RequestResolver/dist/effect-RequestResolver.cjs.prod.js +291 -109
  179. package/Resource/dist/effect-Resource.cjs.dev.js +176 -84
  180. package/Resource/dist/effect-Resource.cjs.prod.js +176 -84
  181. package/Runtime/dist/effect-Runtime.cjs.dev.js +244 -93
  182. package/Runtime/dist/effect-Runtime.cjs.prod.js +244 -93
  183. package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.dev.js +418 -120
  184. package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.prod.js +418 -120
  185. package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.dev.js +25 -25
  186. package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.prod.js +25 -25
  187. package/STM/dist/effect-STM.cjs.dev.js +1420 -236
  188. package/STM/dist/effect-STM.cjs.prod.js +1420 -236
  189. package/Schedule/dist/effect-Schedule.cjs.dev.js +1106 -155
  190. package/Schedule/dist/effect-Schedule.cjs.prod.js +1106 -155
  191. package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.dev.js +111 -28
  192. package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.prod.js +111 -28
  193. package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.dev.js +237 -33
  194. package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.prod.js +237 -33
  195. package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.dev.js +264 -36
  196. package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.prod.js +264 -36
  197. package/Scheduler/dist/effect-Scheduler.cjs.dev.js +365 -48
  198. package/Scheduler/dist/effect-Scheduler.cjs.prod.js +365 -48
  199. package/Scope/dist/effect-Scope.cjs.dev.js +191 -81
  200. package/Scope/dist/effect-Scope.cjs.prod.js +191 -81
  201. package/ScopedCache/dist/effect-ScopedCache.cjs.dev.js +511 -78
  202. package/ScopedCache/dist/effect-ScopedCache.cjs.prod.js +511 -78
  203. package/ScopedRef/dist/effect-ScopedRef.cjs.dev.js +146 -81
  204. package/ScopedRef/dist/effect-ScopedRef.cjs.prod.js +146 -81
  205. package/Sink/dist/effect-Sink.cjs.dev.js +1198 -207
  206. package/Sink/dist/effect-Sink.cjs.prod.js +1198 -207
  207. package/SortedMap/dist/effect-SortedMap.cjs.dev.js +194 -39
  208. package/SortedMap/dist/effect-SortedMap.cjs.prod.js +194 -39
  209. package/SortedSet/dist/effect-SortedSet.cjs.dev.js +293 -42
  210. package/SortedSet/dist/effect-SortedSet.cjs.prod.js +293 -42
  211. package/Stream/dist/effect-Stream.cjs.dev.js +3272 -400
  212. package/Stream/dist/effect-Stream.cjs.prod.js +3272 -400
  213. package/StreamHaltStrategy/dist/effect-StreamHaltStrategy.cjs.dev.js +2 -2
  214. package/StreamHaltStrategy/dist/effect-StreamHaltStrategy.cjs.prod.js +2 -2
  215. package/String/dist/effect-String.cjs.dev.js +652 -64
  216. package/String/dist/effect-String.cjs.prod.js +652 -64
  217. package/Struct/dist/effect-Struct.cjs.dev.js +126 -9
  218. package/Struct/dist/effect-Struct.cjs.prod.js +126 -9
  219. package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.dev.js +336 -130
  220. package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.prod.js +336 -130
  221. package/Supervisor/dist/effect-Supervisor.cjs.dev.js +233 -93
  222. package/Supervisor/dist/effect-Supervisor.cjs.prod.js +233 -93
  223. package/Symbol/dist/effect-Symbol.cjs.dev.js +29 -6
  224. package/Symbol/dist/effect-Symbol.cjs.prod.js +29 -6
  225. package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.dev.js +253 -101
  226. package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.prod.js +253 -101
  227. package/TArray/dist/effect-TArray.cjs.dev.js +516 -155
  228. package/TArray/dist/effect-TArray.cjs.prod.js +516 -155
  229. package/TDeferred/dist/effect-TDeferred.cjs.dev.js +218 -120
  230. package/TDeferred/dist/effect-TDeferred.cjs.prod.js +218 -120
  231. package/THub/dist/effect-THub.cjs.dev.js +650 -130
  232. package/THub/dist/effect-THub.cjs.prod.js +650 -130
  233. package/TMap/dist/effect-TMap.cjs.dev.js +525 -158
  234. package/TMap/dist/effect-TMap.cjs.prod.js +525 -158
  235. package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.dev.js +458 -132
  236. package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.prod.js +458 -132
  237. package/TQueue/dist/effect-TQueue.cjs.dev.js +429 -142
  238. package/TQueue/dist/effect-TQueue.cjs.prod.js +429 -142
  239. package/TRandom/dist/effect-TRandom.cjs.dev.js +289 -123
  240. package/TRandom/dist/effect-TRandom.cjs.prod.js +289 -123
  241. package/TReentrantLock/dist/effect-TReentrantLock.cjs.dev.js +530 -131
  242. package/TReentrantLock/dist/effect-TReentrantLock.cjs.prod.js +530 -131
  243. package/TRef/dist/effect-TRef.cjs.dev.js +237 -127
  244. package/TRef/dist/effect-TRef.cjs.prod.js +237 -127
  245. package/TSemaphore/dist/effect-TSemaphore.cjs.dev.js +282 -126
  246. package/TSemaphore/dist/effect-TSemaphore.cjs.prod.js +282 -126
  247. package/TSet/dist/effect-TSet.cjs.dev.js +514 -146
  248. package/TSet/dist/effect-TSet.cjs.prod.js +514 -146
  249. package/Take/dist/effect-Take.cjs.dev.js +295 -111
  250. package/Take/dist/effect-Take.cjs.prod.js +295 -111
  251. package/TestAnnotation/dist/effect-TestAnnotation.cjs.dev.js +132 -33
  252. package/TestAnnotation/dist/effect-TestAnnotation.cjs.prod.js +132 -33
  253. package/TestAnnotationMap/dist/effect-TestAnnotationMap.cjs.dev.js +106 -11
  254. package/TestAnnotationMap/dist/effect-TestAnnotationMap.cjs.prod.js +106 -11
  255. package/TestAnnotations/dist/effect-TestAnnotations.cjs.dev.js +127 -61
  256. package/TestAnnotations/dist/effect-TestAnnotations.cjs.prod.js +127 -61
  257. package/TestClock/dist/effect-TestClock.cjs.dev.js +623 -101
  258. package/TestClock/dist/effect-TestClock.cjs.prod.js +623 -101
  259. package/TestConfig/dist/effect-TestConfig.cjs.dev.js +41 -20
  260. package/TestConfig/dist/effect-TestConfig.cjs.prod.js +41 -20
  261. package/TestContext/dist/effect-TestContext.cjs.dev.js +117 -98
  262. package/TestContext/dist/effect-TestContext.cjs.prod.js +117 -98
  263. package/TestLive/dist/effect-TestLive.cjs.dev.js +82 -42
  264. package/TestLive/dist/effect-TestLive.cjs.prod.js +82 -42
  265. package/TestServices/dist/effect-TestServices.cjs.dev.js +380 -129
  266. package/TestServices/dist/effect-TestServices.cjs.prod.js +380 -129
  267. package/TestSized/dist/effect-TestSized.cjs.dev.js +78 -35
  268. package/TestSized/dist/effect-TestSized.cjs.prod.js +78 -35
  269. package/Tracer/dist/effect-Tracer.cjs.dev.js +104 -43
  270. package/Tracer/dist/effect-Tracer.cjs.prod.js +104 -43
  271. package/Tuple/dist/effect-Tuple.cjs.dev.js +182 -17
  272. package/Tuple/dist/effect-Tuple.cjs.prod.js +182 -17
  273. package/Unify/dist/effect-Unify.cjs.dev.js +37 -3
  274. package/Unify/dist/effect-Unify.cjs.prod.js +37 -3
  275. package/Utils/dist/effect-Utils.cjs.dev.js +354 -9
  276. package/Utils/dist/effect-Utils.cjs.prod.js +354 -9
  277. package/dist/{Context-f958cabc.cjs.prod.js → Context-01a123ac.cjs.prod.js} +8 -8
  278. package/dist/{Context-96739709.cjs.dev.js → Context-593661f6.cjs.dev.js} +8 -8
  279. package/dist/{Effectable-f867d1cb.cjs.prod.js → Effectable-2f022879.cjs.dev.js} +4 -4
  280. package/dist/{Effectable-a6403e5f.cjs.dev.js → Effectable-cd8f3a96.cjs.prod.js} +4 -4
  281. package/dist/{Either-9c349424.cjs.dev.js → Either-12bbe00c.cjs.dev.js} +5 -5
  282. package/dist/{Either-d03d5f05.cjs.prod.js → Either-7a881c7a.cjs.prod.js} +5 -5
  283. package/dist/{ExecutionStrategy-89fbe735.cjs.dev.js → ExecutionStrategy-14d3053a.cjs.prod.js} +1 -13
  284. package/dist/{ExecutionStrategy-dc778180.cjs.prod.js → ExecutionStrategy-70f1a920.cjs.dev.js} +1 -13
  285. package/dist/{FiberId-929dcce4.cjs.dev.js → FiberId-557db880.cjs.dev.js} +8 -30
  286. package/dist/{FiberId-b79e8047.cjs.prod.js → FiberId-e594f6e8.cjs.prod.js} +8 -30
  287. package/dist/{HashSet-ece2cfe8.cjs.dev.js → HashSet-0b4ff1e4.cjs.dev.js} +7 -7
  288. package/dist/{HashSet-6fe62df2.cjs.prod.js → HashSet-6257b66d.cjs.prod.js} +7 -7
  289. package/dist/{Ref-f41d9514.cjs.dev.js → Ref-74b592a4.cjs.dev.js} +5 -25
  290. package/dist/{Ref-b0f07131.cjs.prod.js → Ref-a3a4e50d.cjs.prod.js} +5 -25
  291. package/dist/{RuntimeFlagsPatch-130e990c.cjs.dev.js → RuntimeFlagsPatch-e2769b87.cjs.prod.js} +2 -24
  292. package/dist/{RuntimeFlagsPatch-5570758d.cjs.prod.js → RuntimeFlagsPatch-ea268c50.cjs.dev.js} +2 -24
  293. package/dist/{StreamHaltStrategy-66a53f66.cjs.dev.js → StreamHaltStrategy-9a61b88d.cjs.dev.js} +1 -16
  294. package/dist/{StreamHaltStrategy-07f544a6.cjs.prod.js → StreamHaltStrategy-b495622b.cjs.prod.js} +1 -16
  295. package/dist/{boundaries-03c7494a.cjs.dev.js → boundaries-20cfad9d.cjs.prod.js} +6 -6
  296. package/dist/{boundaries-5d1a46e1.cjs.prod.js → boundaries-3810d885.cjs.dev.js} +6 -6
  297. package/dist/{cache-debb30b9.cjs.prod.js → cache-3a55a13a.cjs.prod.js} +21 -21
  298. package/dist/{cache-6a9fa3c2.cjs.dev.js → cache-83d14f6e.cjs.dev.js} +21 -21
  299. package/dist/{childExecutorDecision-2b30946c.cjs.prod.js → childExecutorDecision-2eed6e25.cjs.dev.js} +1 -1
  300. package/dist/{childExecutorDecision-ad3db696.cjs.dev.js → childExecutorDecision-b5842db5.cjs.prod.js} +1 -1
  301. package/dist/{circular-e96ed3ce.cjs.dev.js → circular-2162b720.cjs.dev.js} +7 -7
  302. package/dist/{circular-4e4a12d0.cjs.dev.js → circular-a4887ee9.cjs.dev.js} +19 -19
  303. package/dist/{circular-fc9d405f.cjs.prod.js → circular-c3ce70f4.cjs.prod.js} +7 -7
  304. package/dist/{circular-b9af7e3c.cjs.prod.js → circular-f72fcb1d.cjs.prod.js} +19 -19
  305. package/dist/{config-a57559a0.cjs.dev.js → config-80900693.cjs.dev.js} +10 -10
  306. package/dist/{config-e86d2f2c.cjs.prod.js → config-d0ddc159.cjs.prod.js} +10 -10
  307. package/dist/{configError-6a3652f8.cjs.prod.js → configError-240e9b61.cjs.dev.js} +3 -3
  308. package/dist/{configError-1686533e.cjs.dev.js → configError-33e55472.cjs.prod.js} +3 -3
  309. package/dist/{configProvider-91019e0c.cjs.prod.js → configProvider-93617d6d.cjs.prod.js} +13 -13
  310. package/dist/{configProvider-e8277224.cjs.dev.js → configProvider-ce43fdbf.cjs.dev.js} +13 -13
  311. package/dist/{configSecret-ecb6c5b3.cjs.prod.js → configSecret-d1caca55.cjs.prod.js} +4 -4
  312. package/dist/{configSecret-5812fa69.cjs.dev.js → configSecret-e34c1b14.cjs.dev.js} +4 -4
  313. package/dist/{core-99a7f5f2.cjs.prod.js → core-0b0539de.cjs.prod.js} +19 -19
  314. package/dist/{core-3a3a9567.cjs.prod.js → core-8ff5a82c.cjs.prod.js} +14 -14
  315. package/dist/{core-5fb17b79.cjs.dev.js → core-b2dfee8d.cjs.dev.js} +14 -14
  316. package/dist/{core-3ddc73fc.cjs.dev.js → core-b4d7b4f5.cjs.dev.js} +19 -19
  317. package/dist/{core-effect-0b09eb55.cjs.dev.js → core-effect-892f3686.cjs.dev.js} +23 -23
  318. package/dist/{core-effect-0efbe120.cjs.prod.js → core-effect-c65770cd.cjs.prod.js} +23 -23
  319. package/dist/{dataSource-894bb2d1.cjs.dev.js → dataSource-5227437c.cjs.dev.js} +7 -7
  320. package/dist/{dataSource-536382d2.cjs.prod.js → dataSource-837686e6.cjs.prod.js} +7 -7
  321. package/dist/declarations/src/index.d.ts.map +1 -1
  322. package/dist/{defaultServices-85cd09a5.cjs.prod.js → defaultServices-086b8ac9.cjs.prod.js} +10 -10
  323. package/dist/{defaultServices-101983cd.cjs.dev.js → defaultServices-5530ff0e.cjs.dev.js} +10 -10
  324. package/dist/effect.cjs.dev.js +466 -344
  325. package/dist/effect.cjs.prod.js +466 -344
  326. package/dist/effect.esm.js +283 -283
  327. package/dist/{fiber-e68a3beb.cjs.dev.js → fiber-1bfb4c1d.cjs.dev.js} +14 -14
  328. package/dist/{fiber-d61e94dc.cjs.prod.js → fiber-2eb0a4c1.cjs.prod.js} +14 -14
  329. package/dist/{fiberRefs-1a0bda7d.cjs.dev.js → fiberRefs-be4fae6a.cjs.dev.js} +7 -7
  330. package/dist/{fiberRefs-56d69854.cjs.prod.js → fiberRefs-be6b6a70.cjs.prod.js} +7 -7
  331. package/dist/{fiberRuntime-d359f080.cjs.prod.js → fiberRuntime-af2d0ca1.cjs.prod.js} +42 -42
  332. package/dist/{fiberRuntime-9699a6b8.cjs.dev.js → fiberRuntime-e0db0ab6.cjs.dev.js} +42 -42
  333. package/dist/{groupBy-5ec3b13b.cjs.prod.js → groupBy-7ce46ea3.cjs.prod.js} +14 -14
  334. package/dist/{groupBy-83c39612.cjs.dev.js → groupBy-bd943372.cjs.dev.js} +14 -14
  335. package/dist/{hook-822704ea.cjs.dev.js → hook-470b717e.cjs.prod.js} +9 -9
  336. package/dist/{hook-6c7550dc.cjs.prod.js → hook-e72b20fd.cjs.dev.js} +9 -9
  337. package/dist/{key-330b98b1.cjs.prod.js → key-378a6a2c.cjs.prod.js} +8 -8
  338. package/dist/{key-a474fc0d.cjs.dev.js → key-f0a1408a.cjs.dev.js} +8 -8
  339. package/dist/{keyType-1e916ae2.cjs.dev.js → keyType-55f27f07.cjs.dev.js} +5 -5
  340. package/dist/{keyType-8460e792.cjs.prod.js → keyType-cf67c69c.cjs.prod.js} +5 -5
  341. package/dist/{label-3e143765.cjs.prod.js → label-011edbe7.cjs.dev.js} +4 -4
  342. package/dist/{label-246fb11d.cjs.dev.js → label-655343b5.cjs.prod.js} +4 -4
  343. package/dist/{layer-4be7be9b.cjs.prod.js → layer-3b1b0e2e.cjs.prod.js} +19 -19
  344. package/dist/{layer-51422619.cjs.dev.js → layer-9cbb61ce.cjs.dev.js} +19 -19
  345. package/dist/{mergeDecision-e483c280.cjs.prod.js → mergeDecision-07c6b5c9.cjs.prod.js} +1 -1
  346. package/dist/{mergeDecision-e457a76b.cjs.dev.js → mergeDecision-be41e797.cjs.dev.js} +1 -1
  347. package/dist/{mergeState-dba66248.cjs.prod.js → mergeState-75990fa2.cjs.prod.js} +1 -1
  348. package/dist/{mergeState-83204f38.cjs.dev.js → mergeState-8153ce39.cjs.dev.js} +1 -1
  349. package/dist/{mergeStrategy-845a1279.cjs.prod.js → mergeStrategy-3dd6e55f.cjs.prod.js} +1 -1
  350. package/dist/{mergeStrategy-b19dc19a.cjs.dev.js → mergeStrategy-81ea5b80.cjs.dev.js} +1 -1
  351. package/dist/{pair-e5443c93.cjs.prod.js → pair-291b78d7.cjs.dev.js} +1 -1
  352. package/dist/{pair-08a8685e.cjs.dev.js → pair-6254cf85.cjs.prod.js} +1 -1
  353. package/dist/{patch-49a74eb1.cjs.prod.js → patch-a1b2802f.cjs.dev.js} +4 -4
  354. package/dist/{patch-d5f75194.cjs.dev.js → patch-c4d6c61e.cjs.prod.js} +4 -4
  355. package/dist/{pathPatch-e46d4168.cjs.dev.js → pathPatch-15c8d723.cjs.prod.js} +6 -6
  356. package/dist/{pathPatch-ded405f6.cjs.prod.js → pathPatch-d9d41297.cjs.dev.js} +6 -6
  357. package/dist/{pool-2db8a1f2.cjs.dev.js → pool-29b03fb2.cjs.dev.js} +12 -12
  358. package/dist/{pool-bcc71d3b.cjs.prod.js → pool-b5c7d254.cjs.prod.js} +12 -12
  359. package/dist/{query-3599e07d.cjs.dev.js → query-67a7c448.cjs.dev.js} +6 -6
  360. package/dist/{query-096bd104.cjs.prod.js → query-d5eefc43.cjs.prod.js} +6 -6
  361. package/dist/{queue-6ee3ba6c.cjs.prod.js → queue-38614769.cjs.prod.js} +9 -9
  362. package/dist/{queue-5fffc770.cjs.dev.js → queue-997d6e51.cjs.dev.js} +9 -9
  363. package/dist/{registry-29905dcc.cjs.prod.js → registry-013ecdde.cjs.prod.js} +7 -7
  364. package/dist/{registry-c883cf52.cjs.dev.js → registry-1099de3f.cjs.dev.js} +7 -7
  365. package/dist/{runtime-851e8d63.cjs.dev.js → runtime-15cc9cc5.cjs.dev.js} +16 -16
  366. package/dist/{runtime-06e3baba.cjs.prod.js → runtime-3a59f5c4.cjs.prod.js} +16 -16
  367. package/dist/{schedule-eb6e347d.cjs.prod.js → schedule-1d92198c.cjs.prod.js} +22 -22
  368. package/dist/{schedule-63e9a90e.cjs.dev.js → schedule-e0f55cab.cjs.dev.js} +22 -22
  369. package/dist/{scopedRef-365da725.cjs.dev.js → scopedRef-88ae648a.cjs.dev.js} +9 -9
  370. package/dist/{scopedRef-8387a141.cjs.prod.js → scopedRef-a0257d92.cjs.prod.js} +9 -9
  371. package/dist/{singleProducerAsyncInput-9d6d57d6.cjs.dev.js → singleProducerAsyncInput-1c6cc8fb.cjs.prod.js} +13 -13
  372. package/dist/{singleProducerAsyncInput-4035643a.cjs.prod.js → singleProducerAsyncInput-998b8fac.cjs.dev.js} +13 -13
  373. package/dist/{sink-9d318853.cjs.dev.js → sink-1ac24bca.cjs.dev.js} +42 -42
  374. package/dist/{sink-c22afb4c.cjs.prod.js → sink-4d668efb.cjs.prod.js} +42 -42
  375. package/dist/{state-0d29362f.cjs.prod.js → state-8fbec044.cjs.dev.js} +4 -4
  376. package/dist/{state-8a8a647c.cjs.dev.js → state-dd1bd066.cjs.prod.js} +4 -4
  377. package/dist/{stm-25e9f751.cjs.dev.js → stm-fbb398a5.cjs.dev.js} +13 -13
  378. package/dist/{stm-52b6d829.cjs.prod.js → stm-fcac86d5.cjs.prod.js} +13 -13
  379. package/dist/{stream-d0865b79.cjs.dev.js → stream-adef675d.cjs.dev.js} +33 -33
  380. package/dist/{stream-5f118d1a.cjs.prod.js → stream-e670e8fa.cjs.prod.js} +33 -33
  381. package/dist/{synchronizedRef-303ae7ce.cjs.prod.js → synchronizedRef-37e32854.cjs.dev.js} +3 -3
  382. package/dist/{synchronizedRef-5c50013e.cjs.dev.js → synchronizedRef-b4cde4de.cjs.prod.js} +3 -3
  383. package/dist/{tArray-3cd19ff4.cjs.dev.js → tArray-239d37ad.cjs.dev.js} +7 -7
  384. package/dist/{tArray-28dfa8e9.cjs.prod.js → tArray-70de8ec4.cjs.prod.js} +7 -7
  385. package/dist/{tMap-7361e520.cjs.dev.js → tMap-4b27665d.cjs.dev.js} +12 -12
  386. package/dist/{tMap-22aa6411.cjs.prod.js → tMap-a202396b.cjs.prod.js} +12 -12
  387. package/dist/{tQueue-4596ba62.cjs.prod.js → tQueue-004a478e.cjs.dev.js} +8 -8
  388. package/dist/{tQueue-86c4ee3b.cjs.dev.js → tQueue-82c4db95.cjs.prod.js} +8 -8
  389. package/dist/{tRef-0bbb1e7e.cjs.prod.js → tRef-bb7cc73a.cjs.dev.js} +3 -3
  390. package/dist/{tRef-c3fe1748.cjs.dev.js → tRef-ee2c7f44.cjs.prod.js} +3 -3
  391. package/dist/{take-6f424894.cjs.prod.js → take-4857b6af.cjs.dev.js} +7 -7
  392. package/dist/{take-df1858f2.cjs.dev.js → take-9c555b46.cjs.prod.js} +7 -7
  393. package/dist/{upstreamPullRequest-705e868d.cjs.prod.js → upstreamPullRequest-7a694281.cjs.dev.js} +1 -1
  394. package/dist/{upstreamPullRequest-c08f06a4.cjs.dev.js → upstreamPullRequest-c89f818d.cjs.prod.js} +1 -1
  395. package/dist/{upstreamPullStrategy-34452db1.cjs.prod.js → upstreamPullStrategy-63cc8967.cjs.prod.js} +1 -1
  396. package/dist/{upstreamPullStrategy-0ccf2960.cjs.dev.js → upstreamPullStrategy-f9f1ab57.cjs.dev.js} +1 -1
  397. package/package.json +3 -2
  398. package/dist/Bigint-0ebd807c.cjs.dev.js +0 -392
  399. package/dist/Bigint-912c77f3.cjs.prod.js +0 -392
  400. package/dist/Boolean-97839b78.cjs.prod.js +0 -264
  401. package/dist/Boolean-f0bc3abf.cjs.dev.js +0 -264
  402. package/dist/Brand-93578f43.cjs.prod.js +0 -224
  403. package/dist/Brand-b238487d.cjs.dev.js +0 -224
  404. package/dist/Cache-27de64e5.cjs.prod.js +0 -127
  405. package/dist/Cache-b1fd7d93.cjs.dev.js +0 -127
  406. package/dist/Cause-73ebfede.cjs.dev.js +0 -791
  407. package/dist/Cause-f90cc424.cjs.prod.js +0 -791
  408. package/dist/Channel-96c79066.cjs.prod.js +0 -1217
  409. package/dist/Channel-ff137fa2.cjs.dev.js +0 -1217
  410. package/dist/ChannelChildExecutorDecision-168278f6.cjs.prod.js +0 -136
  411. package/dist/ChannelChildExecutorDecision-b0e715de.cjs.dev.js +0 -136
  412. package/dist/ChannelMergeDecision-9c266aeb.cjs.prod.js +0 -78
  413. package/dist/ChannelMergeDecision-eeaf4779.cjs.dev.js +0 -78
  414. package/dist/ChannelMergeState-4366d090.cjs.prod.js +0 -125
  415. package/dist/ChannelMergeState-abce1d88.cjs.dev.js +0 -125
  416. package/dist/ChannelMergeStrategy-6193b8e0.cjs.prod.js +0 -104
  417. package/dist/ChannelMergeStrategy-e7ddbb7a.cjs.dev.js +0 -104
  418. package/dist/ChannelSingleProducerAsyncInput-0fd1d6fd.cjs.prod.js +0 -55
  419. package/dist/ChannelSingleProducerAsyncInput-3a95731f.cjs.dev.js +0 -55
  420. package/dist/ChannelUpstreamPullRequest-1ca7d2bd.cjs.dev.js +0 -104
  421. package/dist/ChannelUpstreamPullRequest-208751c3.cjs.prod.js +0 -104
  422. package/dist/ChannelUpstreamPullStrategy-266b5a77.cjs.prod.js +0 -103
  423. package/dist/ChannelUpstreamPullStrategy-ec57dc70.cjs.dev.js +0 -103
  424. package/dist/Chunk-6cf5a8e6.cjs.prod.js +0 -1248
  425. package/dist/Chunk-bd290b8e.cjs.dev.js +0 -1248
  426. package/dist/Clock-dd715d18.cjs.dev.js +0 -97
  427. package/dist/Clock-fb3f7535.cjs.prod.js +0 -97
  428. package/dist/Config-7f41ea05.cjs.prod.js +0 -393
  429. package/dist/Config-ae8e35fb.cjs.dev.js +0 -393
  430. package/dist/ConfigError-c1f762d2.cjs.dev.js +0 -225
  431. package/dist/ConfigError-cee682fa.cjs.prod.js +0 -225
  432. package/dist/ConfigProvider-58a767e3.cjs.prod.js +0 -240
  433. package/dist/ConfigProvider-88a6a51a.cjs.dev.js +0 -240
  434. package/dist/ConfigProviderPathPatch-52422b32.cjs.prod.js +0 -86
  435. package/dist/ConfigProviderPathPatch-d22442e3.cjs.dev.js +0 -86
  436. package/dist/ConfigSecret-c76717e8.cjs.dev.js +0 -83
  437. package/dist/ConfigSecret-ebab2ae7.cjs.prod.js +0 -83
  438. package/dist/Console-3feb9b13.cjs.dev.js +0 -271
  439. package/dist/Console-ad274f55.cjs.prod.js +0 -271
  440. package/dist/Context-25a49952.cjs.prod.js +0 -327
  441. package/dist/Context-3c9e986b.cjs.dev.js +0 -327
  442. package/dist/Data-07dc27f1.cjs.prod.js +0 -237
  443. package/dist/Data-85559fb3.cjs.dev.js +0 -237
  444. package/dist/DefaultServices-4ff6cd71.cjs.prod.js +0 -34
  445. package/dist/DefaultServices-c2fc760b.cjs.dev.js +0 -34
  446. package/dist/Deferred-33cc0aa3.cjs.prod.js +0 -253
  447. package/dist/Deferred-e92635ac.cjs.dev.js +0 -253
  448. package/dist/Differ-0122f60e.cjs.dev.js +0 -992
  449. package/dist/Differ-0bd34066.cjs.prod.js +0 -992
  450. package/dist/Duration-0bc08d03.cjs.prod.js +0 -508
  451. package/dist/Duration-604874d1.cjs.dev.js +0 -508
  452. package/dist/Effect-880ff8dc.cjs.dev.js +0 -3740
  453. package/dist/Effect-9ed81037.cjs.prod.js +0 -3740
  454. package/dist/Effectable-04f3cd30.cjs.dev.js +0 -99
  455. package/dist/Effectable-8997112d.cjs.prod.js +0 -99
  456. package/dist/Either-3fab3796.cjs.prod.js +0 -502
  457. package/dist/Either-a806809d.cjs.dev.js +0 -502
  458. package/dist/Encoding-0cab52d5.cjs.prod.js +0 -309
  459. package/dist/Encoding-d993b1b0.cjs.dev.js +0 -309
  460. package/dist/Equal-281b6ca8.cjs.dev.js +0 -71
  461. package/dist/Equal-ce9977a8.cjs.prod.js +0 -71
  462. package/dist/Equivalence-0bc84518.cjs.prod.js +0 -238
  463. package/dist/Equivalence-de7a0d51.cjs.dev.js +0 -238
  464. package/dist/Error-2ec0b140.cjs.prod.js +0 -57
  465. package/dist/Error-71850b6f.cjs.dev.js +0 -57
  466. package/dist/Exit-720d2786.cjs.prod.js +0 -408
  467. package/dist/Exit-b702e23f.cjs.dev.js +0 -408
  468. package/dist/Fiber-8c99b572.cjs.prod.js +0 -521
  469. package/dist/Fiber-93d51baf.cjs.dev.js +0 -521
  470. package/dist/FiberRef-8e944b1e.cjs.prod.js +0 -385
  471. package/dist/FiberRef-edb41545.cjs.dev.js +0 -385
  472. package/dist/FiberRefs-802c55f6.cjs.prod.js +0 -135
  473. package/dist/FiberRefs-ec1734cb.cjs.dev.js +0 -135
  474. package/dist/FiberRefsPatch-db52f5a6.cjs.prod.js +0 -90
  475. package/dist/FiberRefsPatch-efbeff91.cjs.dev.js +0 -90
  476. package/dist/FiberStatus-b82dad24.cjs.prod.js +0 -197
  477. package/dist/FiberStatus-bac7d58d.cjs.dev.js +0 -197
  478. package/dist/Function-2e6b0cda.cjs.prod.js +0 -538
  479. package/dist/Function-41ce433d.cjs.dev.js +0 -538
  480. package/dist/GlobalValue-81ab6908.cjs.dev.js +0 -28
  481. package/dist/GlobalValue-cb645c99.cjs.prod.js +0 -28
  482. package/dist/GroupBy-15649e19.cjs.dev.js +0 -79
  483. package/dist/GroupBy-342eec35.cjs.prod.js +0 -79
  484. package/dist/HKT-2cc79e63.cjs.dev.js +0 -7
  485. package/dist/HKT-d682535d.cjs.prod.js +0 -7
  486. package/dist/Hash-1bd73210.cjs.prod.js +0 -192
  487. package/dist/Hash-bd154268.cjs.dev.js +0 -192
  488. package/dist/HashMap-12668911.cjs.prod.js +0 -361
  489. package/dist/HashMap-68e290b6.cjs.dev.js +0 -361
  490. package/dist/HashSet-6978c08e.cjs.dev.js +0 -283
  491. package/dist/HashSet-c40a52b1.cjs.prod.js +0 -283
  492. package/dist/Hub-17f075d3.cjs.dev.js +0 -1280
  493. package/dist/Hub-c89028e9.cjs.prod.js +0 -1280
  494. package/dist/Inspectable-3c4a0f5d.cjs.prod.js +0 -50
  495. package/dist/Inspectable-ac929af4.cjs.dev.js +0 -50
  496. package/dist/KeyedPool-44b820c5.cjs.dev.js +0 -282
  497. package/dist/KeyedPool-89ab8fef.cjs.prod.js +0 -282
  498. package/dist/Layer-1cdc4ae0.cjs.prod.js +0 -688
  499. package/dist/Layer-d30c27fd.cjs.dev.js +0 -688
  500. package/dist/List-c6ea7efe.cjs.dev.js +0 -912
  501. package/dist/List-d9775087.cjs.prod.js +0 -912
  502. package/dist/LogLevel-83df6f42.cjs.prod.js +0 -240
  503. package/dist/LogLevel-91738879.cjs.dev.js +0 -240
  504. package/dist/LogSpan-c905a192.cjs.prod.js +0 -46
  505. package/dist/LogSpan-e345ba58.cjs.dev.js +0 -46
  506. package/dist/Logger-70b9b704.cjs.prod.js +0 -275
  507. package/dist/Logger-e4460422.cjs.dev.js +0 -275
  508. package/dist/Metric-17f4b13c.cjs.prod.js +0 -488
  509. package/dist/Metric-f6bae70a.cjs.dev.js +0 -488
  510. package/dist/MetricBoundaries-cf5df220.cjs.prod.js +0 -68
  511. package/dist/MetricBoundaries-f5f5aae1.cjs.dev.js +0 -68
  512. package/dist/MetricHook-3104e93b.cjs.dev.js +0 -90
  513. package/dist/MetricHook-efd05d72.cjs.prod.js +0 -90
  514. package/dist/MetricKey-9cfcaec8.cjs.prod.js +0 -130
  515. package/dist/MetricKey-c3ba437e.cjs.dev.js +0 -130
  516. package/dist/MetricKeyType-6d2d9036.cjs.prod.js +0 -187
  517. package/dist/MetricKeyType-c1d7ebe8.cjs.dev.js +0 -187
  518. package/dist/MetricLabel-6a1886c6.cjs.dev.js +0 -53
  519. package/dist/MetricLabel-7e1d569e.cjs.prod.js +0 -53
  520. package/dist/MetricPair-658ab13d.cjs.dev.js +0 -50
  521. package/dist/MetricPair-aec13967.cjs.prod.js +0 -50
  522. package/dist/MetricPolling-57dfc966.cjs.dev.js +0 -177
  523. package/dist/MetricPolling-cc8ab4df.cjs.prod.js +0 -177
  524. package/dist/MetricRegistry-e4af936b.cjs.dev.js +0 -38
  525. package/dist/MetricRegistry-ff6df283.cjs.prod.js +0 -38
  526. package/dist/MetricState-b65340a4.cjs.dev.js +0 -191
  527. package/dist/MetricState-bd6a5001.cjs.prod.js +0 -191
  528. package/dist/MutableHashMap-74e83e84.cjs.dev.js +0 -154
  529. package/dist/MutableHashMap-95493edb.cjs.prod.js +0 -154
  530. package/dist/MutableHashSet-780dfd63.cjs.prod.js +0 -110
  531. package/dist/MutableHashSet-ec8d7cc4.cjs.dev.js +0 -110
  532. package/dist/MutableList-58124ef2.cjs.dev.js +0 -296
  533. package/dist/MutableList-732af09a.cjs.prod.js +0 -296
  534. package/dist/MutableQueue-0e9f2466.cjs.dev.js +0 -215
  535. package/dist/MutableQueue-f8aba856.cjs.prod.js +0 -215
  536. package/dist/MutableRef-4a2f1f23.cjs.prod.js +0 -194
  537. package/dist/MutableRef-724c4082.cjs.dev.js +0 -194
  538. package/dist/NonEmptyIterable-418cef14.cjs.prod.js +0 -36
  539. package/dist/NonEmptyIterable-bb452f41.cjs.dev.js +0 -36
  540. package/dist/Number-588f6483.cjs.dev.js +0 -417
  541. package/dist/Number-cb2ba2e8.cjs.prod.js +0 -417
  542. package/dist/Option-02025c86.cjs.prod.js +0 -1198
  543. package/dist/Option-03997d77.cjs.dev.js +0 -1198
  544. package/dist/Order-28bdebd2.cjs.dev.js +0 -321
  545. package/dist/Order-8a112bfb.cjs.prod.js +0 -321
  546. package/dist/Ordering-60bf9127.cjs.prod.js +0 -104
  547. package/dist/Ordering-b955b746.cjs.dev.js +0 -104
  548. package/dist/Pipeable-4698db72.cjs.dev.js +0 -52
  549. package/dist/Pipeable-d3ec6711.cjs.prod.js +0 -52
  550. package/dist/Pool-9d1076d0.cjs.prod.js +0 -122
  551. package/dist/Pool-c55003ad.cjs.dev.js +0 -122
  552. package/dist/Predicate-9e859c9c.cjs.dev.js +0 -718
  553. package/dist/Predicate-daa86e61.cjs.prod.js +0 -718
  554. package/dist/Queue-5cd64a6d.cjs.prod.js +0 -394
  555. package/dist/Queue-bc7bd323.cjs.dev.js +0 -394
  556. package/dist/Random-0645cf02.cjs.prod.js +0 -104
  557. package/dist/Random-a321de88.cjs.dev.js +0 -104
  558. package/dist/ReadonlyArray-48949ee7.cjs.dev.js +0 -1721
  559. package/dist/ReadonlyArray-8157f697.cjs.prod.js +0 -1721
  560. package/dist/ReadonlyRecord-605a625b.cjs.dev.js +0 -568
  561. package/dist/ReadonlyRecord-8db8bada.cjs.prod.js +0 -568
  562. package/dist/RedBlackTree-e6bd147c.cjs.dev.js +0 -1669
  563. package/dist/RedBlackTree-eb41ea8a.cjs.prod.js +0 -1669
  564. package/dist/Reloadable-0edff6c9.cjs.dev.js +0 -169
  565. package/dist/Reloadable-b8258af1.cjs.prod.js +0 -169
  566. package/dist/Request-a6ad9d9b.cjs.prod.js +0 -190
  567. package/dist/Request-e36e5b23.cjs.dev.js +0 -190
  568. package/dist/RequestBlock-2901e863.cjs.dev.js +0 -124
  569. package/dist/RequestBlock-67fcbe9d.cjs.prod.js +0 -124
  570. package/dist/RequestResolver-dd99257a.cjs.prod.js +0 -233
  571. package/dist/RequestResolver-f7c90ef8.cjs.dev.js +0 -233
  572. package/dist/Resource-6244a4a2.cjs.prod.js +0 -118
  573. package/dist/Resource-95a6d6d3.cjs.dev.js +0 -118
  574. package/dist/Runtime-a1902a53.cjs.dev.js +0 -191
  575. package/dist/Runtime-e35482c6.cjs.prod.js +0 -191
  576. package/dist/RuntimeFlags-1bd7be71.cjs.prod.js +0 -381
  577. package/dist/RuntimeFlags-33abd026.cjs.dev.js +0 -381
  578. package/dist/STM-18b06ffb.cjs.dev.js +0 -1447
  579. package/dist/STM-698be88d.cjs.prod.js +0 -1447
  580. package/dist/Schedule-2ab499ea.cjs.dev.js +0 -1159
  581. package/dist/Schedule-2ed66272.cjs.prod.js +0 -1159
  582. package/dist/ScheduleDecision-369f2d2b.cjs.prod.js +0 -106
  583. package/dist/ScheduleDecision-ba8d0e87.cjs.dev.js +0 -106
  584. package/dist/ScheduleInterval-51f42533.cjs.dev.js +0 -244
  585. package/dist/ScheduleInterval-78037484.cjs.prod.js +0 -244
  586. package/dist/ScheduleIntervals-b0bfcf3b.cjs.dev.js +0 -265
  587. package/dist/ScheduleIntervals-db13140c.cjs.prod.js +0 -265
  588. package/dist/Scheduler-23a6506c.cjs.dev.js +0 -358
  589. package/dist/Scheduler-f0877070.cjs.prod.js +0 -358
  590. package/dist/Scope-90083792.cjs.dev.js +0 -143
  591. package/dist/Scope-e35df038.cjs.prod.js +0 -143
  592. package/dist/ScopedCache-514f4e7c.cjs.prod.js +0 -467
  593. package/dist/ScopedCache-74a8fce5.cjs.dev.js +0 -467
  594. package/dist/ScopedRef-aab226df.cjs.prod.js +0 -87
  595. package/dist/ScopedRef-d3264ff1.cjs.dev.js +0 -87
  596. package/dist/Sink-9261d74a.cjs.dev.js +0 -1215
  597. package/dist/Sink-cff4b341.cjs.prod.js +0 -1215
  598. package/dist/SortedMap-bb3311c3.cjs.prod.js +0 -210
  599. package/dist/SortedMap-f452cc44.cjs.dev.js +0 -210
  600. package/dist/SortedSet-424670fe.cjs.prod.js +0 -311
  601. package/dist/SortedSet-f90b14a2.cjs.dev.js +0 -311
  602. package/dist/Stream-6d90b2ae.cjs.prod.js +0 -3469
  603. package/dist/Stream-93b679da.cjs.dev.js +0 -3469
  604. package/dist/StreamEmit-a10e1de5.cjs.prod.js +0 -7
  605. package/dist/StreamEmit-ec1da471.cjs.dev.js +0 -7
  606. package/dist/String-23b18ca9.cjs.prod.js +0 -694
  607. package/dist/String-830aaa3e.cjs.dev.js +0 -694
  608. package/dist/Struct-14648d76.cjs.dev.js +0 -141
  609. package/dist/Struct-c6b00f29.cjs.prod.js +0 -141
  610. package/dist/SubscriptionRef-751fcfe1.cjs.dev.js +0 -269
  611. package/dist/SubscriptionRef-e03f691a.cjs.prod.js +0 -269
  612. package/dist/Supervisor-1b659cf4.cjs.prod.js +0 -170
  613. package/dist/Supervisor-edbd5163.cjs.dev.js +0 -170
  614. package/dist/Symbol-55d0b3d8.cjs.prod.js +0 -40
  615. package/dist/Symbol-5d74a5f2.cjs.dev.js +0 -40
  616. package/dist/SynchronizedRef-55ff7bb2.cjs.prod.js +0 -212
  617. package/dist/SynchronizedRef-61c3bd6d.cjs.dev.js +0 -212
  618. package/dist/TArray-b0c09907.cjs.dev.js +0 -455
  619. package/dist/TArray-cded8951.cjs.prod.js +0 -455
  620. package/dist/TDeferred-030586e1.cjs.dev.js +0 -129
  621. package/dist/TDeferred-f62d1da6.cjs.prod.js +0 -129
  622. package/dist/THub-0321bde2.cjs.dev.js +0 -570
  623. package/dist/THub-634ffcd8.cjs.prod.js +0 -570
  624. package/dist/TMap-67a5ea40.cjs.dev.js +0 -463
  625. package/dist/TMap-8c5c3d9b.cjs.prod.js +0 -463
  626. package/dist/TPriorityQueue-4af362f4.cjs.dev.js +0 -381
  627. package/dist/TPriorityQueue-ec4cfbba.cjs.prod.js +0 -381
  628. package/dist/TQueue-52584284.cjs.dev.js +0 -353
  629. package/dist/TQueue-85f6bcbb.cjs.prod.js +0 -353
  630. package/dist/TRandom-265453cb.cjs.dev.js +0 -203
  631. package/dist/TRandom-d9e010c9.cjs.prod.js +0 -203
  632. package/dist/TReentrantLock-6a3d4156.cjs.dev.js +0 -456
  633. package/dist/TReentrantLock-86796969.cjs.prod.js +0 -456
  634. package/dist/TRef-7eb2bee7.cjs.prod.js +0 -152
  635. package/dist/TRef-c862b660.cjs.dev.js +0 -152
  636. package/dist/TSemaphore-9b7d229c.cjs.prod.js +0 -197
  637. package/dist/TSemaphore-c82fb2cd.cjs.dev.js +0 -197
  638. package/dist/TSet-7324f8a5.cjs.prod.js +0 -444
  639. package/dist/TSet-b13e57f6.cjs.dev.js +0 -444
  640. package/dist/Take-27322346.cjs.dev.js +0 -236
  641. package/dist/Take-f7fb5f03.cjs.prod.js +0 -236
  642. package/dist/TestAnnotation-73be7a68.cjs.dev.js +0 -135
  643. package/dist/TestAnnotation-b9b93d03.cjs.prod.js +0 -135
  644. package/dist/TestAnnotationMap-80c87410.cjs.dev.js +0 -125
  645. package/dist/TestAnnotationMap-e946bab5.cjs.prod.js +0 -125
  646. package/dist/TestAnnotations-10747778.cjs.prod.js +0 -97
  647. package/dist/TestAnnotations-f13982a3.cjs.dev.js +0 -97
  648. package/dist/TestClock-ca77e8d2.cjs.dev.js +0 -581
  649. package/dist/TestClock-d144bba1.cjs.prod.js +0 -581
  650. package/dist/TestConfig-1a73e844.cjs.prod.js +0 -37
  651. package/dist/TestConfig-e5ffa946.cjs.dev.js +0 -37
  652. package/dist/TestContext-955af22b.cjs.prod.js +0 -41
  653. package/dist/TestContext-dd910687.cjs.dev.js +0 -41
  654. package/dist/TestLive-93f78882.cjs.dev.js +0 -60
  655. package/dist/TestLive-ea9968d7.cjs.prod.js +0 -60
  656. package/dist/TestServices-64a29e2a.cjs.prod.js +0 -341
  657. package/dist/TestServices-f88bbc6c.cjs.dev.js +0 -341
  658. package/dist/TestSized-16e67d53.cjs.prod.js +0 -64
  659. package/dist/TestSized-d0b7100b.cjs.dev.js +0 -64
  660. package/dist/Tracer-64cf6419.cjs.prod.js +0 -81
  661. package/dist/Tracer-81751f09.cjs.dev.js +0 -81
  662. package/dist/Tuple-27ecf3a1.cjs.prod.js +0 -199
  663. package/dist/Tuple-75d2a389.cjs.dev.js +0 -199
  664. package/dist/Types-1280d3aa.cjs.dev.js +0 -7
  665. package/dist/Types-3a58df45.cjs.prod.js +0 -7
  666. package/dist/Unify-99be0499.cjs.dev.js +0 -48
  667. package/dist/Unify-e86fd412.cjs.prod.js +0 -48
  668. package/dist/Utils-864e1d48.cjs.prod.js +0 -370
  669. package/dist/Utils-b0c14d1b.cjs.dev.js +0 -370
@@ -1,1280 +0,0 @@
1
- 'use strict';
2
-
3
- var Chunk_dist_effectChunk = require('./Chunk-bd290b8e.cjs.dev.js');
4
- var Function_dist_effectFunction = require('./Function-41ce433d.cjs.dev.js');
5
- var core = require('./core-3ddc73fc.cjs.dev.js');
6
- var ExecutionStrategy_dist_effectExecutionStrategy = require('./ExecutionStrategy-89fbe735.cjs.dev.js');
7
- var fiberRuntime = require('./fiberRuntime-9699a6b8.cjs.dev.js');
8
- var queue = require('./queue-5fffc770.cjs.dev.js');
9
- var MutableQueue_dist_effectMutableQueue = require('./MutableQueue-0e9f2466.cjs.dev.js');
10
- var MutableRef_dist_effectMutableRef = require('./MutableRef-724c4082.cjs.dev.js');
11
- var Option_dist_effectOption = require('./Option-03997d77.cjs.dev.js');
12
- var Pipeable_dist_effectPipeable = require('./Pipeable-4698db72.cjs.dev.js');
13
-
14
- /** @internal */
15
-
16
- /** @internal */
17
-
18
- /** @internal */
19
-
20
- const addSubscribers = (subscription, pollers) => subscribers => {
21
- if (!subscribers.has(subscription)) {
22
- subscribers.set(subscription, new Set());
23
- }
24
- const set = subscribers.get(subscription);
25
- set.add(pollers);
26
- };
27
- const removeSubscribers = (subscription, pollers) => subscribers => {
28
- if (!subscribers.has(subscription)) {
29
- return;
30
- }
31
- const set = subscribers.get(subscription);
32
- set.delete(pollers);
33
- if (set.size === 0) {
34
- subscribers.delete(subscription);
35
- }
36
- };
37
-
38
- /** @internal */
39
- const bounded$1 = requestedCapacity => Function_dist_effectFunction.pipe(core.sync(() => makeBoundedHub(requestedCapacity)), core.flatMap(atomicHub => makeHub(atomicHub, new BackPressureStrategy())));
40
-
41
- /** @internal */
42
- const dropping$1 = requestedCapacity => Function_dist_effectFunction.pipe(core.sync(() => makeBoundedHub(requestedCapacity)), core.flatMap(atomicHub => makeHub(atomicHub, new DroppingStrategy())));
43
-
44
- /** @internal */
45
- const sliding$1 = requestedCapacity => Function_dist_effectFunction.pipe(core.sync(() => makeBoundedHub(requestedCapacity)), core.flatMap(atomicHub => makeHub(atomicHub, new SlidingStrategy())));
46
-
47
- /** @internal */
48
- const unbounded$1 = () => Function_dist_effectFunction.pipe(core.sync(() => makeUnboundedHub()), core.flatMap(atomicHub => makeHub(atomicHub, new DroppingStrategy())));
49
-
50
- /** @internal */
51
- const capacity$1 = self => self.capacity();
52
-
53
- /** @internal */
54
- const size$1 = self => self.size();
55
-
56
- /** @internal */
57
- const isFull$1 = self => self.isFull();
58
-
59
- /** @internal */
60
- const isEmpty$1 = self => self.isEmpty();
61
-
62
- /** @internal */
63
- const shutdown$1 = self => self.shutdown();
64
-
65
- /** @internal */
66
- const isShutdown$1 = self => self.isShutdown();
67
-
68
- /** @internal */
69
- const awaitShutdown$1 = self => self.awaitShutdown();
70
-
71
- /** @internal */
72
- const publish$1 = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, value) => self.publish(value));
73
-
74
- /** @internal */
75
- const publishAll$1 = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, elements) => self.publishAll(elements));
76
-
77
- /** @internal */
78
- const subscribe$1 = self => self.subscribe();
79
-
80
- /** @internal */
81
- const makeBoundedHub = requestedCapacity => {
82
- ensureCapacity(requestedCapacity);
83
- if (requestedCapacity === 1) {
84
- return new BoundedHubSingle();
85
- } else if (nextPow2(requestedCapacity) === requestedCapacity) {
86
- return new BoundedHubPow2(requestedCapacity);
87
- } else {
88
- return new BoundedHubArb(requestedCapacity);
89
- }
90
- };
91
-
92
- /** @internal */
93
- const makeUnboundedHub = () => {
94
- return new UnboundedHub();
95
- };
96
-
97
- /** @internal */
98
- const makeSubscription = (hub, subscribers, strategy) => core.map(core.deferredMake(), deferred => unsafeMakeSubscription(hub, subscribers, hub.subscribe(), MutableQueue_dist_effectMutableQueue.unbounded(), deferred, MutableRef_dist_effectMutableRef.make(false), strategy));
99
-
100
- /** @internal */
101
- const unsafeMakeSubscription = (hub, subscribers, subscription, pollers, shutdownHook, shutdownFlag, strategy) => {
102
- return new SubscriptionImpl(hub, subscribers, subscription, pollers, shutdownHook, shutdownFlag, strategy);
103
- };
104
-
105
- /** @internal */
106
- class BoundedHubArb {
107
- publisherIndex = 0;
108
- subscriberCount = 0;
109
- subscribersIndex = 0;
110
- constructor(requestedCapacity) {
111
- this.array = Array.from({
112
- length: requestedCapacity
113
- });
114
- this.subscribers = Array.from({
115
- length: requestedCapacity
116
- });
117
- this.capacity = requestedCapacity;
118
- }
119
- isEmpty() {
120
- return this.publisherIndex === this.subscribersIndex;
121
- }
122
- isFull() {
123
- return this.publisherIndex === this.subscribersIndex + this.capacity;
124
- }
125
- size() {
126
- return this.publisherIndex - this.subscribersIndex;
127
- }
128
- publish(value) {
129
- if (this.isFull()) {
130
- return false;
131
- }
132
- if (this.subscriberCount !== 0) {
133
- const index = this.publisherIndex % this.capacity;
134
- this.array[index] = value;
135
- this.subscribers[index] = this.subscriberCount;
136
- this.publisherIndex += 1;
137
- }
138
- return true;
139
- }
140
- publishAll(elements) {
141
- const chunk = Chunk_dist_effectChunk.fromIterable(elements);
142
- const n = chunk.length;
143
- const size = this.publisherIndex - this.subscribersIndex;
144
- const available = this.capacity - size;
145
- const forHub = Math.min(n, available);
146
- if (forHub === 0) {
147
- return chunk;
148
- }
149
- let iteratorIndex = 0;
150
- const publishAllIndex = this.publisherIndex + forHub;
151
- while (this.publisherIndex !== publishAllIndex) {
152
- const a = Chunk_dist_effectChunk.unsafeGet(chunk, iteratorIndex++);
153
- const index = this.publisherIndex % this.capacity;
154
- this.array[index] = a;
155
- this.subscribers[index] = this.subscriberCount;
156
- this.publisherIndex += 1;
157
- }
158
- return Chunk_dist_effectChunk.drop(chunk, iteratorIndex);
159
- }
160
- slide() {
161
- if (this.subscribersIndex !== this.publisherIndex) {
162
- const index = this.subscribersIndex % this.capacity;
163
- this.array[index] = null;
164
- this.subscribers[index] = 0;
165
- this.subscribersIndex += 1;
166
- }
167
- }
168
- subscribe() {
169
- this.subscriberCount += 1;
170
- return new BoundedHubArbSubscription(this, this.publisherIndex, false);
171
- }
172
- }
173
- class BoundedHubArbSubscription {
174
- constructor(self, subscriberIndex, unsubscribed) {
175
- this.self = self;
176
- this.subscriberIndex = subscriberIndex;
177
- this.unsubscribed = unsubscribed;
178
- }
179
- isEmpty() {
180
- return this.unsubscribed || this.self.publisherIndex === this.subscriberIndex || this.self.publisherIndex === this.self.subscribersIndex;
181
- }
182
- size() {
183
- if (this.unsubscribed) {
184
- return 0;
185
- }
186
- return this.self.publisherIndex - Math.max(this.subscriberIndex, this.self.subscribersIndex);
187
- }
188
- poll(default_) {
189
- if (this.unsubscribed) {
190
- return default_;
191
- }
192
- this.subscriberIndex = Math.max(this.subscriberIndex, this.self.subscribersIndex);
193
- if (this.subscriberIndex !== this.self.publisherIndex) {
194
- const index = this.subscriberIndex % this.self.capacity;
195
- const elem = this.self.array[index];
196
- this.self.subscribers[index] -= 1;
197
- if (this.self.subscribers[index] === 0) {
198
- this.self.array[index] = null;
199
- this.self.subscribersIndex += 1;
200
- }
201
- this.subscriberIndex += 1;
202
- return elem;
203
- }
204
- return default_;
205
- }
206
- pollUpTo(n) {
207
- if (this.unsubscribed) {
208
- return Chunk_dist_effectChunk.empty();
209
- }
210
- this.subscriberIndex = Math.max(this.subscriberIndex, this.self.subscribersIndex);
211
- const size = this.self.publisherIndex - this.subscriberIndex;
212
- const toPoll = Math.min(n, size);
213
- if (toPoll <= 0) {
214
- return Chunk_dist_effectChunk.empty();
215
- }
216
- const builder = [];
217
- const pollUpToIndex = this.subscriberIndex + toPoll;
218
- while (this.subscriberIndex !== pollUpToIndex) {
219
- const index = this.subscriberIndex % this.self.capacity;
220
- const a = this.self.array[index];
221
- this.self.subscribers[index] -= 1;
222
- if (this.self.subscribers[index] === 0) {
223
- this.self.array[index] = null;
224
- this.self.subscribersIndex += 1;
225
- }
226
- builder.push(a);
227
- this.subscriberIndex += 1;
228
- }
229
- return Chunk_dist_effectChunk.fromIterable(builder);
230
- }
231
- unsubscribe() {
232
- if (!this.unsubscribed) {
233
- this.unsubscribed = true;
234
- this.self.subscriberCount -= 1;
235
- this.subscriberIndex = Math.max(this.subscriberIndex, this.self.subscribersIndex);
236
- while (this.subscriberIndex !== this.self.publisherIndex) {
237
- const index = this.subscriberIndex % this.self.capacity;
238
- this.self.subscribers[index] -= 1;
239
- if (this.self.subscribers[index] === 0) {
240
- this.self.array[index] = null;
241
- this.self.subscribersIndex += 1;
242
- }
243
- this.subscriberIndex += 1;
244
- }
245
- }
246
- }
247
- }
248
-
249
- /** @internal */
250
- class BoundedHubPow2 {
251
- publisherIndex = 0;
252
- subscriberCount = 0;
253
- subscribersIndex = 0;
254
- constructor(requestedCapacity) {
255
- this.array = Array.from({
256
- length: requestedCapacity
257
- });
258
- this.mask = requestedCapacity - 1;
259
- this.subscribers = Array.from({
260
- length: requestedCapacity
261
- });
262
- this.capacity = requestedCapacity;
263
- }
264
- isEmpty() {
265
- return this.publisherIndex === this.subscribersIndex;
266
- }
267
- isFull() {
268
- return this.publisherIndex === this.subscribersIndex + this.capacity;
269
- }
270
- size() {
271
- return this.publisherIndex - this.subscribersIndex;
272
- }
273
- publish(value) {
274
- if (this.isFull()) {
275
- return false;
276
- }
277
- if (this.subscriberCount !== 0) {
278
- const index = this.publisherIndex & this.mask;
279
- this.array[index] = value;
280
- this.subscribers[index] = this.subscriberCount;
281
- this.publisherIndex += 1;
282
- }
283
- return true;
284
- }
285
- publishAll(elements) {
286
- const chunk = Chunk_dist_effectChunk.fromIterable(elements);
287
- const n = chunk.length;
288
- const size = this.publisherIndex - this.subscribersIndex;
289
- const available = this.capacity - size;
290
- const forHub = Math.min(n, available);
291
- if (forHub === 0) {
292
- return chunk;
293
- }
294
- let iteratorIndex = 0;
295
- const publishAllIndex = this.publisherIndex + forHub;
296
- while (this.publisherIndex !== publishAllIndex) {
297
- const elem = Chunk_dist_effectChunk.unsafeGet(chunk, iteratorIndex++);
298
- const index = this.publisherIndex & this.mask;
299
- this.array[index] = elem;
300
- this.subscribers[index] = this.subscriberCount;
301
- this.publisherIndex += 1;
302
- }
303
- return Chunk_dist_effectChunk.drop(chunk, iteratorIndex);
304
- }
305
- slide() {
306
- if (this.subscribersIndex !== this.publisherIndex) {
307
- const index = this.subscribersIndex & this.mask;
308
- this.array[index] = null;
309
- this.subscribers[index] = 0;
310
- this.subscribersIndex += 1;
311
- }
312
- }
313
- subscribe() {
314
- this.subscriberCount += 1;
315
- return new BoundedHubPow2Subscription(this, this.publisherIndex, false);
316
- }
317
- }
318
-
319
- /** @internal */
320
- class BoundedHubPow2Subscription {
321
- constructor(self, subscriberIndex, unsubscribed) {
322
- this.self = self;
323
- this.subscriberIndex = subscriberIndex;
324
- this.unsubscribed = unsubscribed;
325
- }
326
- isEmpty() {
327
- return this.unsubscribed || this.self.publisherIndex === this.subscriberIndex || this.self.publisherIndex === this.self.subscribersIndex;
328
- }
329
- size() {
330
- if (this.unsubscribed) {
331
- return 0;
332
- }
333
- return this.self.publisherIndex - Math.max(this.subscriberIndex, this.self.subscribersIndex);
334
- }
335
- poll(default_) {
336
- if (this.unsubscribed) {
337
- return default_;
338
- }
339
- this.subscriberIndex = Math.max(this.subscriberIndex, this.self.subscribersIndex);
340
- if (this.subscriberIndex !== this.self.publisherIndex) {
341
- const index = this.subscriberIndex & this.self.mask;
342
- const elem = this.self.array[index];
343
- this.self.subscribers[index] -= 1;
344
- if (this.self.subscribers[index] === 0) {
345
- this.self.array[index] = null;
346
- this.self.subscribersIndex += 1;
347
- }
348
- this.subscriberIndex += 1;
349
- return elem;
350
- }
351
- return default_;
352
- }
353
- pollUpTo(n) {
354
- if (this.unsubscribed) {
355
- return Chunk_dist_effectChunk.empty();
356
- }
357
- this.subscriberIndex = Math.max(this.subscriberIndex, this.self.subscribersIndex);
358
- const size = this.self.publisherIndex - this.subscriberIndex;
359
- const toPoll = Math.min(n, size);
360
- if (toPoll <= 0) {
361
- return Chunk_dist_effectChunk.empty();
362
- }
363
- const builder = [];
364
- const pollUpToIndex = this.subscriberIndex + toPoll;
365
- while (this.subscriberIndex !== pollUpToIndex) {
366
- const index = this.subscriberIndex & this.self.mask;
367
- const elem = this.self.array[index];
368
- this.self.subscribers[index] -= 1;
369
- if (this.self.subscribers[index] === 0) {
370
- this.self.array[index] = null;
371
- this.self.subscribersIndex += 1;
372
- }
373
- builder.push(elem);
374
- this.subscriberIndex += 1;
375
- }
376
- return Chunk_dist_effectChunk.fromIterable(builder);
377
- }
378
- unsubscribe() {
379
- if (!this.unsubscribed) {
380
- this.unsubscribed = true;
381
- this.self.subscriberCount -= 1;
382
- this.subscriberIndex = Math.max(this.subscriberIndex, this.self.subscribersIndex);
383
- while (this.subscriberIndex !== this.self.publisherIndex) {
384
- const index = this.subscriberIndex & this.self.mask;
385
- this.self.subscribers[index] -= 1;
386
- if (this.self.subscribers[index] === 0) {
387
- this.self.array[index] = null;
388
- this.self.subscribersIndex += 1;
389
- }
390
- this.subscriberIndex += 1;
391
- }
392
- }
393
- }
394
- }
395
-
396
- /** @internal */
397
- class BoundedHubSingle {
398
- publisherIndex = 0;
399
- subscriberCount = 0;
400
- subscribers = 0;
401
- value = null;
402
- capacity = 1;
403
- pipe() {
404
- return Pipeable_dist_effectPipeable.pipeArguments(this, arguments);
405
- }
406
- isEmpty() {
407
- return this.subscribers === 0;
408
- }
409
- isFull() {
410
- return !this.isEmpty();
411
- }
412
- size() {
413
- return this.isEmpty() ? 0 : 1;
414
- }
415
- publish(value) {
416
- if (this.isFull()) {
417
- return false;
418
- }
419
- if (this.subscriberCount !== 0) {
420
- this.value = value;
421
- this.subscribers = this.subscriberCount;
422
- this.publisherIndex += 1;
423
- }
424
- return true;
425
- }
426
- publishAll(elements) {
427
- const chunk = Chunk_dist_effectChunk.fromIterable(elements);
428
- if (Chunk_dist_effectChunk.isEmpty(chunk)) {
429
- return chunk;
430
- }
431
- if (this.publish(Chunk_dist_effectChunk.unsafeHead(chunk))) {
432
- return Chunk_dist_effectChunk.drop(chunk, 1);
433
- } else {
434
- return chunk;
435
- }
436
- }
437
- slide() {
438
- if (this.isFull()) {
439
- this.subscribers = 0;
440
- this.value = null;
441
- }
442
- }
443
- subscribe() {
444
- this.subscriberCount += 1;
445
- return new BoundedHubSingleSubscription(this, this.publisherIndex, false);
446
- }
447
- }
448
-
449
- /** @internal */
450
- class BoundedHubSingleSubscription {
451
- constructor(self, subscriberIndex, unsubscribed) {
452
- this.self = self;
453
- this.subscriberIndex = subscriberIndex;
454
- this.unsubscribed = unsubscribed;
455
- }
456
- isEmpty() {
457
- return this.unsubscribed || this.self.subscribers === 0 || this.subscriberIndex === this.self.publisherIndex;
458
- }
459
- size() {
460
- return this.isEmpty() ? 0 : 1;
461
- }
462
- poll(default_) {
463
- if (this.isEmpty()) {
464
- return default_;
465
- }
466
- const elem = this.self.value;
467
- this.self.subscribers -= 1;
468
- if (this.self.subscribers === 0) {
469
- this.self.value = null;
470
- }
471
- this.subscriberIndex += 1;
472
- return elem;
473
- }
474
- pollUpTo(n) {
475
- if (this.isEmpty() || n < 1) {
476
- return Chunk_dist_effectChunk.empty();
477
- }
478
- const a = this.self.value;
479
- this.self.subscribers -= 1;
480
- if (this.self.subscribers === 0) {
481
- this.self.value = null;
482
- }
483
- this.subscriberIndex += 1;
484
- return Chunk_dist_effectChunk.of(a);
485
- }
486
- unsubscribe() {
487
- if (!this.unsubscribed) {
488
- this.unsubscribed = true;
489
- this.self.subscriberCount -= 1;
490
- if (this.subscriberIndex !== this.self.publisherIndex) {
491
- this.self.subscribers -= 1;
492
- if (this.self.subscribers === 0) {
493
- this.self.value = null;
494
- }
495
- }
496
- }
497
- }
498
- }
499
-
500
- /** @internal */
501
- class Node {
502
- constructor(value, subscribers, next) {
503
- this.value = value;
504
- this.subscribers = subscribers;
505
- this.next = next;
506
- }
507
- }
508
-
509
- /** @internal */
510
- class UnboundedHub {
511
- publisherHead = new Node(null, 0, null);
512
- publisherIndex = 0;
513
- subscribersIndex = 0;
514
- capacity = Number.MAX_SAFE_INTEGER;
515
- constructor() {
516
- this.publisherTail = this.publisherHead;
517
- }
518
- isEmpty() {
519
- return this.publisherHead === this.publisherTail;
520
- }
521
- isFull() {
522
- return false;
523
- }
524
- size() {
525
- return this.publisherIndex - this.subscribersIndex;
526
- }
527
- publish(value) {
528
- const subscribers = this.publisherTail.subscribers;
529
- if (subscribers !== 0) {
530
- this.publisherTail.next = new Node(value, subscribers, null);
531
- this.publisherTail = this.publisherTail.next;
532
- this.publisherIndex += 1;
533
- }
534
- return true;
535
- }
536
- publishAll(elements) {
537
- for (const a of elements) {
538
- this.publish(a);
539
- }
540
- return Chunk_dist_effectChunk.empty();
541
- }
542
- slide() {
543
- if (this.publisherHead !== this.publisherTail) {
544
- this.publisherHead = this.publisherHead.next;
545
- this.publisherHead.value = null;
546
- this.subscribersIndex += 1;
547
- }
548
- }
549
- subscribe() {
550
- this.publisherTail.subscribers += 1;
551
- return new UnboundedHubSubscription(this, this.publisherTail, this.publisherIndex, false);
552
- }
553
- }
554
-
555
- /** @internal */
556
- class UnboundedHubSubscription {
557
- constructor(self, subscriberHead, subscriberIndex, unsubscribed) {
558
- this.self = self;
559
- this.subscriberHead = subscriberHead;
560
- this.subscriberIndex = subscriberIndex;
561
- this.unsubscribed = unsubscribed;
562
- }
563
- isEmpty() {
564
- if (this.unsubscribed) {
565
- return true;
566
- }
567
- let empty = true;
568
- let loop = true;
569
- while (loop) {
570
- if (this.subscriberHead === this.self.publisherTail) {
571
- loop = false;
572
- } else {
573
- if (this.subscriberHead.next.value !== null) {
574
- empty = false;
575
- loop = false;
576
- } else {
577
- this.subscriberHead = this.subscriberHead.next;
578
- this.subscriberIndex += 1;
579
- }
580
- }
581
- }
582
- return empty;
583
- }
584
- size() {
585
- if (this.unsubscribed) {
586
- return 0;
587
- }
588
- return this.self.publisherIndex - Math.max(this.subscriberIndex, this.self.subscribersIndex);
589
- }
590
- poll(default_) {
591
- if (this.unsubscribed) {
592
- return default_;
593
- }
594
- let loop = true;
595
- let polled = default_;
596
- while (loop) {
597
- if (this.subscriberHead === this.self.publisherTail) {
598
- loop = false;
599
- } else {
600
- const elem = this.subscriberHead.next.value;
601
- if (elem !== null) {
602
- polled = elem;
603
- this.subscriberHead.subscribers -= 1;
604
- if (this.subscriberHead.subscribers === 0) {
605
- this.self.publisherHead = this.self.publisherHead.next;
606
- this.self.publisherHead.value = null;
607
- this.self.subscribersIndex += 1;
608
- }
609
- loop = false;
610
- }
611
- this.subscriberHead = this.subscriberHead.next;
612
- this.subscriberIndex += 1;
613
- }
614
- }
615
- return polled;
616
- }
617
- pollUpTo(n) {
618
- const builder = [];
619
- const default_ = null;
620
- let i = 0;
621
- while (i !== n) {
622
- const a = this.poll(default_);
623
- if (a === default_) {
624
- i = n;
625
- } else {
626
- builder.push(a);
627
- i += 1;
628
- }
629
- }
630
- return Chunk_dist_effectChunk.fromIterable(builder);
631
- }
632
- unsubscribe() {
633
- if (!this.unsubscribed) {
634
- this.unsubscribed = true;
635
- this.self.publisherTail.subscribers -= 1;
636
- while (this.subscriberHead !== this.self.publisherTail) {
637
- if (this.subscriberHead.next.value !== null) {
638
- this.subscriberHead.subscribers -= 1;
639
- if (this.subscriberHead.subscribers === 0) {
640
- this.self.publisherHead = this.self.publisherHead.next;
641
- this.self.publisherHead.value = null;
642
- this.self.subscribersIndex += 1;
643
- }
644
- }
645
- this.subscriberHead = this.subscriberHead.next;
646
- }
647
- }
648
- }
649
- }
650
-
651
- /** @internal */
652
- class SubscriptionImpl {
653
- [queue.DequeueTypeId] = queue.dequeueVariance;
654
- constructor(hub, subscribers, subscription, pollers, shutdownHook, shutdownFlag, strategy) {
655
- this.hub = hub;
656
- this.subscribers = subscribers;
657
- this.subscription = subscription;
658
- this.pollers = pollers;
659
- this.shutdownHook = shutdownHook;
660
- this.shutdownFlag = shutdownFlag;
661
- this.strategy = strategy;
662
- }
663
- pipe() {
664
- return Pipeable_dist_effectPipeable.pipeArguments(this, arguments);
665
- }
666
- capacity() {
667
- return this.hub.capacity;
668
- }
669
- isActive() {
670
- return !MutableRef_dist_effectMutableRef.get(this.shutdownFlag);
671
- }
672
- size() {
673
- return core.suspend(() => MutableRef_dist_effectMutableRef.get(this.shutdownFlag) ? core.interrupt : core.succeed(this.subscription.size()));
674
- }
675
- unsafeSize() {
676
- if (MutableRef_dist_effectMutableRef.get(this.shutdownFlag)) {
677
- return Option_dist_effectOption.none();
678
- }
679
- return Option_dist_effectOption.some(this.subscription.size());
680
- }
681
- isFull() {
682
- return core.map(this.size(), size => size === this.capacity());
683
- }
684
- isEmpty() {
685
- return core.map(this.size(), size => size === 0);
686
- }
687
- shutdown() {
688
- return core.uninterruptible(core.withFiberRuntime(state => {
689
- MutableRef_dist_effectMutableRef.set(this.shutdownFlag, true);
690
- return Function_dist_effectFunction.pipe(fiberRuntime.forEachParUnbounded(unsafePollAllQueue(this.pollers), d => core.deferredInterruptWith(d, state.id()), false), core.zipRight(core.sync(() => {
691
- this.subscribers.delete(this.subscription);
692
- this.subscription.unsubscribe();
693
- this.strategy.unsafeOnHubEmptySpace(this.hub, this.subscribers);
694
- })), core.whenEffect(core.deferredSucceed(this.shutdownHook, void 0)), core.asUnit);
695
- }));
696
- }
697
- isShutdown() {
698
- return core.sync(() => MutableRef_dist_effectMutableRef.get(this.shutdownFlag));
699
- }
700
- awaitShutdown() {
701
- return core.deferredAwait(this.shutdownHook);
702
- }
703
- take() {
704
- return core.withFiberRuntime(state => {
705
- if (MutableRef_dist_effectMutableRef.get(this.shutdownFlag)) {
706
- return core.interrupt;
707
- }
708
- const message = MutableQueue_dist_effectMutableQueue.isEmpty(this.pollers) ? this.subscription.poll(MutableQueue_dist_effectMutableQueue.EmptyMutableQueue) : MutableQueue_dist_effectMutableQueue.EmptyMutableQueue;
709
- if (message === MutableQueue_dist_effectMutableQueue.EmptyMutableQueue) {
710
- const deferred = core.deferredUnsafeMake(state.id());
711
- return Function_dist_effectFunction.pipe(core.suspend(() => {
712
- Function_dist_effectFunction.pipe(this.pollers, MutableQueue_dist_effectMutableQueue.offer(deferred));
713
- Function_dist_effectFunction.pipe(this.subscribers, addSubscribers(this.subscription, this.pollers));
714
- this.strategy.unsafeCompletePollers(this.hub, this.subscribers, this.subscription, this.pollers);
715
- return MutableRef_dist_effectMutableRef.get(this.shutdownFlag) ? core.interrupt : core.deferredAwait(deferred);
716
- }), core.onInterrupt(() => core.sync(() => unsafeRemove(this.pollers, deferred))));
717
- } else {
718
- this.strategy.unsafeOnHubEmptySpace(this.hub, this.subscribers);
719
- return core.succeed(message);
720
- }
721
- });
722
- }
723
- takeAll() {
724
- return core.suspend(() => {
725
- if (MutableRef_dist_effectMutableRef.get(this.shutdownFlag)) {
726
- return core.interrupt;
727
- }
728
- const as = MutableQueue_dist_effectMutableQueue.isEmpty(this.pollers) ? unsafePollAllSubscription(this.subscription) : Chunk_dist_effectChunk.empty();
729
- this.strategy.unsafeOnHubEmptySpace(this.hub, this.subscribers);
730
- return core.succeed(as);
731
- });
732
- }
733
- takeUpTo(max) {
734
- return core.suspend(() => {
735
- if (MutableRef_dist_effectMutableRef.get(this.shutdownFlag)) {
736
- return core.interrupt;
737
- }
738
- const as = MutableQueue_dist_effectMutableQueue.isEmpty(this.pollers) ? unsafePollN(this.subscription, max) : Chunk_dist_effectChunk.empty();
739
- this.strategy.unsafeOnHubEmptySpace(this.hub, this.subscribers);
740
- return core.succeed(as);
741
- });
742
- }
743
- takeBetween(min, max) {
744
- return core.suspend(() => takeRemainderLoop(this, min, max, Chunk_dist_effectChunk.empty()));
745
- }
746
- }
747
-
748
- /** @internal */
749
- const takeRemainderLoop = (self, min, max, acc) => {
750
- if (max < min) {
751
- return core.succeed(acc);
752
- }
753
- return Function_dist_effectFunction.pipe(self.takeUpTo(max), core.flatMap(bs => {
754
- const remaining = min - bs.length;
755
- if (remaining === 1) {
756
- return Function_dist_effectFunction.pipe(self.take(), core.map(b => Function_dist_effectFunction.pipe(acc, Chunk_dist_effectChunk.appendAll(bs), Chunk_dist_effectChunk.append(b))));
757
- }
758
- if (remaining > 1) {
759
- return Function_dist_effectFunction.pipe(self.take(), core.flatMap(b => takeRemainderLoop(self, remaining - 1, max - bs.length - 1, Function_dist_effectFunction.pipe(acc, Chunk_dist_effectChunk.appendAll(bs), Chunk_dist_effectChunk.append(b)))));
760
- }
761
- return core.succeed(Function_dist_effectFunction.pipe(acc, Chunk_dist_effectChunk.appendAll(bs)));
762
- }));
763
- };
764
-
765
- /** @internal */
766
- class HubImpl {
767
- [queue.EnqueueTypeId] = queue.enqueueVariance;
768
- constructor(hub, subscribers, scope, shutdownHook, shutdownFlag, strategy) {
769
- this.hub = hub;
770
- this.subscribers = subscribers;
771
- this.scope = scope;
772
- this.shutdownHook = shutdownHook;
773
- this.shutdownFlag = shutdownFlag;
774
- this.strategy = strategy;
775
- }
776
- capacity() {
777
- return this.hub.capacity;
778
- }
779
- size() {
780
- return core.suspend(() => MutableRef_dist_effectMutableRef.get(this.shutdownFlag) ? core.interrupt : core.sync(() => this.hub.size()));
781
- }
782
- unsafeSize() {
783
- if (MutableRef_dist_effectMutableRef.get(this.shutdownFlag)) {
784
- return Option_dist_effectOption.none();
785
- }
786
- return Option_dist_effectOption.some(this.hub.size());
787
- }
788
- isFull() {
789
- return core.map(this.size(), size => size === this.capacity());
790
- }
791
- isEmpty() {
792
- return core.map(this.size(), size => size === 0);
793
- }
794
- awaitShutdown() {
795
- return core.deferredAwait(this.shutdownHook);
796
- }
797
- isShutdown() {
798
- return core.sync(() => MutableRef_dist_effectMutableRef.get(this.shutdownFlag));
799
- }
800
- shutdown() {
801
- return core.uninterruptible(core.withFiberRuntime(state => {
802
- Function_dist_effectFunction.pipe(this.shutdownFlag, MutableRef_dist_effectMutableRef.set(true));
803
- return Function_dist_effectFunction.pipe(this.scope.close(core.exitInterrupt(state.id())), core.zipRight(this.strategy.shutdown()), core.whenEffect(core.deferredSucceed(this.shutdownHook, void 0)), core.asUnit);
804
- }));
805
- }
806
- publish(value) {
807
- return core.suspend(() => {
808
- if (MutableRef_dist_effectMutableRef.get(this.shutdownFlag)) {
809
- return core.interrupt;
810
- }
811
- if (this.hub.publish(value)) {
812
- this.strategy.unsafeCompleteSubscribers(this.hub, this.subscribers);
813
- return core.succeed(true);
814
- }
815
- return this.strategy.handleSurplus(this.hub, this.subscribers, Chunk_dist_effectChunk.of(value), this.shutdownFlag);
816
- });
817
- }
818
- isActive() {
819
- return !MutableRef_dist_effectMutableRef.get(this.shutdownFlag);
820
- }
821
- unsafeOffer(value) {
822
- if (MutableRef_dist_effectMutableRef.get(this.shutdownFlag)) {
823
- return false;
824
- }
825
- if (this.hub.publish(value)) {
826
- this.strategy.unsafeCompleteSubscribers(this.hub, this.subscribers);
827
- return true;
828
- }
829
- return false;
830
- }
831
- publishAll(elements) {
832
- return core.suspend(() => {
833
- if (MutableRef_dist_effectMutableRef.get(this.shutdownFlag)) {
834
- return core.interrupt;
835
- }
836
- const surplus = unsafePublishAll(this.hub, elements);
837
- this.strategy.unsafeCompleteSubscribers(this.hub, this.subscribers);
838
- if (Chunk_dist_effectChunk.isEmpty(surplus)) {
839
- return core.succeed(true);
840
- }
841
- return this.strategy.handleSurplus(this.hub, this.subscribers, surplus, this.shutdownFlag);
842
- });
843
- }
844
- subscribe() {
845
- const acquire = core.tap(fiberRuntime.all([this.scope.fork(ExecutionStrategy_dist_effectExecutionStrategy.sequential), makeSubscription(this.hub, this.subscribers, this.strategy)]), tuple => tuple[0].addFinalizer(() => tuple[1].shutdown()));
846
- return core.map(fiberRuntime.acquireRelease(acquire, (tuple, exit) => tuple[0].close(exit)), tuple => tuple[1]);
847
- }
848
- offer(value) {
849
- return this.publish(value);
850
- }
851
- offerAll(elements) {
852
- return this.publishAll(elements);
853
- }
854
- pipe() {
855
- return Pipeable_dist_effectPipeable.pipeArguments(this, arguments);
856
- }
857
- }
858
-
859
- /** @internal */
860
- const makeHub = (hub, strategy) => core.flatMap(fiberRuntime.scopeMake(), scope => core.map(core.deferredMake(), deferred => unsafeMakeHub(hub, new Map(), scope, deferred, MutableRef_dist_effectMutableRef.make(false), strategy)));
861
-
862
- /** @internal */
863
- const unsafeMakeHub = (hub, subscribers, scope, shutdownHook, shutdownFlag, strategy) => {
864
- return new HubImpl(hub, subscribers, scope, shutdownHook, shutdownFlag, strategy);
865
- };
866
-
867
- /** @internal */
868
- const nextPow2 = n => {
869
- const nextPow = Math.ceil(Math.log(n) / Math.log(2.0));
870
- return Math.max(Math.pow(2, nextPow), 2);
871
- };
872
-
873
- /** @internal */
874
- const ensureCapacity = capacity => {
875
- if (capacity <= 0) {
876
- throw core.InvalidHubCapacityException(`Cannot construct Hub with capacity of ${capacity}`);
877
- }
878
- };
879
-
880
- /** @internal */
881
- const unsafeCompleteDeferred = (deferred, a) => {
882
- core.deferredUnsafeDone(deferred, core.succeed(a));
883
- };
884
-
885
- /** @internal */
886
- const unsafeOfferAll = (queue, as) => {
887
- return Function_dist_effectFunction.pipe(queue, MutableQueue_dist_effectMutableQueue.offerAll(as));
888
- };
889
-
890
- /** @internal */
891
- const unsafePollAllQueue = queue => {
892
- return Function_dist_effectFunction.pipe(queue, MutableQueue_dist_effectMutableQueue.pollUpTo(Number.POSITIVE_INFINITY));
893
- };
894
-
895
- /** @internal */
896
- const unsafePollAllSubscription = subscription => {
897
- return subscription.pollUpTo(Number.POSITIVE_INFINITY);
898
- };
899
-
900
- /** @internal */
901
- const unsafePollN = (subscription, max) => {
902
- return subscription.pollUpTo(max);
903
- };
904
-
905
- /** @internal */
906
- const unsafePublishAll = (hub, as) => {
907
- return hub.publishAll(as);
908
- };
909
-
910
- /** @internal */
911
- const unsafeRemove = (queue, value) => {
912
- unsafeOfferAll(queue, Function_dist_effectFunction.pipe(unsafePollAllQueue(queue), Chunk_dist_effectChunk.filter(elem => elem !== value)));
913
- };
914
-
915
- // -----------------------------------------------------------------------------
916
- // Hub.Strategy
917
- // -----------------------------------------------------------------------------
918
-
919
- /**
920
- * A `HubStrategy<A>` describes the protocol for how publishers and subscribers
921
- * will communicate with each other through the hub.
922
- *
923
- * @internal
924
- */
925
- /**
926
- * A strategy that applies back pressure to publishers when the hub is at
927
- * capacity. This guarantees that all subscribers will receive all messages
928
- * published to the hub while they are subscribed. However, it creates the
929
- * risk that a slow subscriber will slow down the rate at which messages
930
- * are published and received by other subscribers.
931
- *
932
- * @internal
933
- */
934
- class BackPressureStrategy {
935
- publishers = MutableQueue_dist_effectMutableQueue.unbounded();
936
- shutdown() {
937
- return core.flatMap(core.fiberId, fiberId => core.flatMap(core.sync(() => unsafePollAllQueue(this.publishers)), publishers => fiberRuntime.forEachParUnboundedDiscard(publishers, ([_, deferred, last]) => last ? Function_dist_effectFunction.pipe(core.deferredInterruptWith(deferred, fiberId), core.asUnit) : core.unit, false)));
938
- }
939
- handleSurplus(hub, subscribers, elements, isShutdown) {
940
- return core.withFiberRuntime(state => {
941
- const deferred = core.deferredUnsafeMake(state.id());
942
- return Function_dist_effectFunction.pipe(core.suspend(() => {
943
- this.unsafeOffer(elements, deferred);
944
- this.unsafeOnHubEmptySpace(hub, subscribers);
945
- this.unsafeCompleteSubscribers(hub, subscribers);
946
- return MutableRef_dist_effectMutableRef.get(isShutdown) ? core.interrupt : core.deferredAwait(deferred);
947
- }), core.onInterrupt(() => core.sync(() => this.unsafeRemove(deferred))));
948
- });
949
- }
950
- unsafeOnHubEmptySpace(hub, subscribers) {
951
- let keepPolling = true;
952
- while (keepPolling && !hub.isFull()) {
953
- const publisher = Function_dist_effectFunction.pipe(this.publishers, MutableQueue_dist_effectMutableQueue.poll(MutableQueue_dist_effectMutableQueue.EmptyMutableQueue));
954
- if (publisher === MutableQueue_dist_effectMutableQueue.EmptyMutableQueue) {
955
- keepPolling = false;
956
- } else {
957
- const published = hub.publish(publisher[0]);
958
- if (published && publisher[2]) {
959
- unsafeCompleteDeferred(publisher[1], true);
960
- } else if (!published) {
961
- unsafeOfferAll(this.publishers, Function_dist_effectFunction.pipe(unsafePollAllQueue(this.publishers), Chunk_dist_effectChunk.prepend(publisher)));
962
- }
963
- this.unsafeCompleteSubscribers(hub, subscribers);
964
- }
965
- }
966
- }
967
- unsafeCompletePollers(hub, subscribers, subscription, pollers) {
968
- return unsafeStrategyCompletePollers(this, hub, subscribers, subscription, pollers);
969
- }
970
- unsafeCompleteSubscribers(hub, subscribers) {
971
- return unsafeStrategyCompleteSubscribers(this, hub, subscribers);
972
- }
973
- unsafeOffer(elements, deferred) {
974
- const iterator = elements[Symbol.iterator]();
975
- let next = iterator.next();
976
- if (!next.done) {
977
- // eslint-disable-next-line no-constant-condition
978
- while (1) {
979
- const value = next.value;
980
- next = iterator.next();
981
- if (next.done) {
982
- Function_dist_effectFunction.pipe(this.publishers, MutableQueue_dist_effectMutableQueue.offer([value, deferred, true]));
983
- break;
984
- }
985
- Function_dist_effectFunction.pipe(this.publishers, MutableQueue_dist_effectMutableQueue.offer([value, deferred, false]));
986
- }
987
- }
988
- }
989
- unsafeRemove(deferred) {
990
- unsafeOfferAll(this.publishers, Function_dist_effectFunction.pipe(unsafePollAllQueue(this.publishers), Chunk_dist_effectChunk.filter(([_, a]) => a !== deferred)));
991
- }
992
- }
993
-
994
- /**
995
- * A strategy that drops new messages when the hub is at capacity. This
996
- * guarantees that a slow subscriber will not slow down the rate at which
997
- * messages are published. However, it creates the risk that a slow
998
- * subscriber will slow down the rate at which messages are received by
999
- * other subscribers and that subscribers may not receive all messages
1000
- * published to the hub while they are subscribed.
1001
- *
1002
- * @internal
1003
- */
1004
- class DroppingStrategy {
1005
- shutdown() {
1006
- return core.unit;
1007
- }
1008
- handleSurplus(_hub, _subscribers, _elements, _isShutdown) {
1009
- return core.succeed(false);
1010
- }
1011
- unsafeOnHubEmptySpace(_hub, _subscribers) {
1012
- //
1013
- }
1014
- unsafeCompletePollers(hub, subscribers, subscription, pollers) {
1015
- return unsafeStrategyCompletePollers(this, hub, subscribers, subscription, pollers);
1016
- }
1017
- unsafeCompleteSubscribers(hub, subscribers) {
1018
- return unsafeStrategyCompleteSubscribers(this, hub, subscribers);
1019
- }
1020
- }
1021
-
1022
- /**
1023
- * A strategy that adds new messages and drops old messages when the hub is
1024
- * at capacity. This guarantees that a slow subscriber will not slow down
1025
- * the rate at which messages are published and received by other
1026
- * subscribers. However, it creates the risk that a slow subscriber will
1027
- * not receive some messages published to the hub while it is subscribed.
1028
- *
1029
- * @internal
1030
- */
1031
- class SlidingStrategy {
1032
- shutdown() {
1033
- return core.unit;
1034
- }
1035
- handleSurplus(hub, subscribers, elements, _isShutdown) {
1036
- return core.sync(() => {
1037
- this.unsafeSlidingPublish(hub, elements);
1038
- this.unsafeCompleteSubscribers(hub, subscribers);
1039
- return true;
1040
- });
1041
- }
1042
- unsafeOnHubEmptySpace(_hub, _subscribers) {
1043
- //
1044
- }
1045
- unsafeCompletePollers(hub, subscribers, subscription, pollers) {
1046
- return unsafeStrategyCompletePollers(this, hub, subscribers, subscription, pollers);
1047
- }
1048
- unsafeCompleteSubscribers(hub, subscribers) {
1049
- return unsafeStrategyCompleteSubscribers(this, hub, subscribers);
1050
- }
1051
- unsafeSlidingPublish(hub, elements) {
1052
- const it = elements[Symbol.iterator]();
1053
- let next = it.next();
1054
- if (!next.done && hub.capacity > 0) {
1055
- let a = next.value;
1056
- let loop = true;
1057
- while (loop) {
1058
- hub.slide();
1059
- const pub = hub.publish(a);
1060
- if (pub && (next = it.next()) && !next.done) {
1061
- a = next.value;
1062
- } else if (pub) {
1063
- loop = false;
1064
- }
1065
- }
1066
- }
1067
- }
1068
- }
1069
-
1070
- /** @internal */
1071
- const unsafeStrategyCompletePollers = (strategy, hub, subscribers, subscription, pollers) => {
1072
- let keepPolling = true;
1073
- while (keepPolling && !subscription.isEmpty()) {
1074
- const poller = Function_dist_effectFunction.pipe(pollers, MutableQueue_dist_effectMutableQueue.poll(MutableQueue_dist_effectMutableQueue.EmptyMutableQueue));
1075
- if (poller === MutableQueue_dist_effectMutableQueue.EmptyMutableQueue) {
1076
- Function_dist_effectFunction.pipe(subscribers, removeSubscribers(subscription, pollers));
1077
- if (MutableQueue_dist_effectMutableQueue.isEmpty(pollers)) {
1078
- keepPolling = false;
1079
- } else {
1080
- Function_dist_effectFunction.pipe(subscribers, addSubscribers(subscription, pollers));
1081
- }
1082
- } else {
1083
- const pollResult = subscription.poll(MutableQueue_dist_effectMutableQueue.EmptyMutableQueue);
1084
- if (pollResult === MutableQueue_dist_effectMutableQueue.EmptyMutableQueue) {
1085
- unsafeOfferAll(pollers, Function_dist_effectFunction.pipe(unsafePollAllQueue(pollers), Chunk_dist_effectChunk.prepend(poller)));
1086
- } else {
1087
- unsafeCompleteDeferred(poller, pollResult);
1088
- strategy.unsafeOnHubEmptySpace(hub, subscribers);
1089
- }
1090
- }
1091
- }
1092
- };
1093
-
1094
- /** @internal */
1095
- const unsafeStrategyCompleteSubscribers = (strategy, hub, subscribers) => {
1096
- for (const [subscription, pollersSet] of subscribers) {
1097
- for (const pollers of pollersSet) {
1098
- strategy.unsafeCompletePollers(hub, subscribers, subscription, pollers);
1099
- }
1100
- }
1101
- };
1102
-
1103
- /**
1104
- * @since 2.0.0
1105
- */
1106
-
1107
- /**
1108
- * A `Hub<A>` is an asynchronous message hub into which publishers can publish
1109
- * messages of type `A` and subscribers can subscribe to take messages of type
1110
- * `A`.
1111
- *
1112
- * @since 2.0.0
1113
- * @category models
1114
- */
1115
-
1116
- /**
1117
- * Creates a bounded hub with the back pressure strategy. The hub will retain
1118
- * messages until they have been taken by all subscribers, applying back
1119
- * pressure to publishers if the hub is at capacity.
1120
- *
1121
- * For best performance use capacities that are powers of two.
1122
- *
1123
- * @since 2.0.0
1124
- * @category constructors
1125
- */
1126
- const bounded = bounded$1;
1127
-
1128
- /**
1129
- * Creates a bounded hub with the dropping strategy. The hub will drop new
1130
- * messages if the hub is at capacity.
1131
- *
1132
- * For best performance use capacities that are powers of two.
1133
- *
1134
- * @since 2.0.0
1135
- * @category constructors
1136
- */
1137
- const dropping = dropping$1;
1138
-
1139
- /**
1140
- * Creates a bounded hub with the sliding strategy. The hub will add new
1141
- * messages and drop old messages if the hub is at capacity.
1142
- *
1143
- * For best performance use capacities that are powers of two.
1144
- *
1145
- * @since 2.0.0
1146
- * @category constructors
1147
- */
1148
- const sliding = sliding$1;
1149
-
1150
- /**
1151
- * Creates an unbounded hub.
1152
- *
1153
- * @since 2.0.0
1154
- * @category constructors
1155
- */
1156
- const unbounded = unbounded$1;
1157
-
1158
- /**
1159
- * Returns the number of elements the queue can hold.
1160
- *
1161
- * @since 2.0.0
1162
- * @category getters
1163
- */
1164
- const capacity = capacity$1;
1165
-
1166
- /**
1167
- * Retrieves the size of the queue, which is equal to the number of elements
1168
- * in the queue. This may be negative if fibers are suspended waiting for
1169
- * elements to be added to the queue.
1170
- *
1171
- * @since 2.0.0
1172
- * @category getters
1173
- */
1174
- const size = size$1;
1175
-
1176
- /**
1177
- * Returns `true` if the `Queue` contains at least one element, `false`
1178
- * otherwise.
1179
- *
1180
- * @since 2.0.0
1181
- * @category getters
1182
- */
1183
- const isFull = isFull$1;
1184
-
1185
- /**
1186
- * Returns `true` if the `Queue` contains zero elements, `false` otherwise.
1187
- *
1188
- * @since 2.0.0
1189
- * @category getters
1190
- */
1191
- const isEmpty = isEmpty$1;
1192
-
1193
- /**
1194
- * Interrupts any fibers that are suspended on `offer` or `take`. Future calls
1195
- * to `offer*` and `take*` will be interrupted immediately.
1196
- *
1197
- * @since 2.0.0
1198
- * @category utils
1199
- */
1200
- const shutdown = shutdown$1;
1201
-
1202
- /**
1203
- * Returns `true` if `shutdown` has been called, otherwise returns `false`.
1204
- *
1205
- * @since 2.0.0
1206
- * @category getters
1207
- */
1208
- const isShutdown = isShutdown$1;
1209
-
1210
- /**
1211
- * Waits until the queue is shutdown. The `Effect` returned by this method will
1212
- * not resume until the queue has been shutdown. If the queue is already
1213
- * shutdown, the `Effect` will resume right away.
1214
- *
1215
- * @since 2.0.0
1216
- * @category utils
1217
- */
1218
- const awaitShutdown = awaitShutdown$1;
1219
-
1220
- /**
1221
- * Publishes a message to the hub, returning whether the message was published
1222
- * to the hub.
1223
- *
1224
- * @since 2.0.0
1225
- * @category utils
1226
- */
1227
- const publish = publish$1;
1228
-
1229
- /**
1230
- * Publishes all of the specified messages to the hub, returning whether they
1231
- * were published to the hub.
1232
- *
1233
- * @since 2.0.0
1234
- * @category utils
1235
- */
1236
- const publishAll = publishAll$1;
1237
-
1238
- /**
1239
- * Subscribes to receive messages from the hub. The resulting subscription can
1240
- * be evaluated multiple times within the scope to take a message from the hub
1241
- * each time.
1242
- *
1243
- * @since 2.0.0
1244
- * @category utils
1245
- */
1246
- const subscribe = subscribe$1;
1247
-
1248
- var Hub = /*#__PURE__*/Object.freeze({
1249
- __proto__: null,
1250
- bounded: bounded,
1251
- dropping: dropping,
1252
- sliding: sliding,
1253
- unbounded: unbounded,
1254
- capacity: capacity,
1255
- size: size,
1256
- isFull: isFull,
1257
- isEmpty: isEmpty,
1258
- shutdown: shutdown,
1259
- isShutdown: isShutdown,
1260
- awaitShutdown: awaitShutdown,
1261
- publish: publish,
1262
- publishAll: publishAll,
1263
- subscribe: subscribe
1264
- });
1265
-
1266
- exports.Hub = Hub;
1267
- exports.awaitShutdown = awaitShutdown;
1268
- exports.bounded = bounded;
1269
- exports.capacity = capacity;
1270
- exports.dropping = dropping;
1271
- exports.isEmpty = isEmpty;
1272
- exports.isFull = isFull;
1273
- exports.isShutdown = isShutdown;
1274
- exports.publish = publish;
1275
- exports.publishAll = publishAll;
1276
- exports.shutdown = shutdown;
1277
- exports.size = size;
1278
- exports.sliding = sliding;
1279
- exports.subscribe = subscribe;
1280
- exports.unbounded = unbounded;