brass-runtime 1.14.0 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +6 -3
  2. package/dist/agent/cli/main.cjs +44 -43
  3. package/dist/agent/cli/main.js +5 -4
  4. package/dist/agent/cli/main.mjs +5 -4
  5. package/dist/agent/index.cjs +4 -3
  6. package/dist/agent/index.d.ts +1 -1
  7. package/dist/agent/index.js +3 -2
  8. package/dist/agent/index.mjs +3 -2
  9. package/dist/{chunk-WJESVBWN.js → chunk-3QMOKAS5.js} +9 -7
  10. package/dist/{chunk-BMRF4FN6.js → chunk-4NHES7VK.mjs} +59 -237
  11. package/dist/chunk-AR22SXML.js +1043 -0
  12. package/dist/{chunk-4N2JEK4H.mjs → chunk-BDF4AMWX.mjs} +27 -151
  13. package/dist/chunk-BDYEENHT.js +224 -0
  14. package/dist/{chunk-JT7D6M5H.js → chunk-BMH5AV44.js} +27 -151
  15. package/dist/chunk-ELOOF35R.mjs +131 -0
  16. package/dist/chunk-JFPU5GQI.mjs +1043 -0
  17. package/dist/{chunk-MQF7HZ7Y.mjs → chunk-K6M7MDZ4.mjs} +9 -7
  18. package/dist/chunk-MS34J5LY.cjs +224 -0
  19. package/dist/{chunk-UWMMYKVK.mjs → chunk-PPUXIH5R.js} +59 -237
  20. package/dist/chunk-R3R2FVLG.cjs +131 -0
  21. package/dist/chunk-STVLQ3XD.cjs +489 -0
  22. package/dist/{chunk-BKBFSOGT.cjs → chunk-TGIFUAK4.cjs} +26 -150
  23. package/dist/chunk-TO7IKXYT.js +131 -0
  24. package/dist/chunk-UMAZLXAB.mjs +224 -0
  25. package/dist/{chunk-XTMZTVIT.cjs → chunk-VEZNF5GZ.cjs} +136 -134
  26. package/dist/chunk-XPZNXSVN.cjs +1043 -0
  27. package/dist/core/index.cjs +216 -0
  28. package/dist/core/index.d.ts +673 -0
  29. package/dist/core/index.js +216 -0
  30. package/dist/core/index.mjs +216 -0
  31. package/dist/{effect-DM56H743.d.ts → effect-CMOQKX8y.d.ts} +12 -11
  32. package/dist/http/index.cjs +2557 -235
  33. package/dist/http/index.d.ts +1514 -4
  34. package/dist/http/index.js +2549 -227
  35. package/dist/http/index.mjs +2549 -227
  36. package/dist/index.cjs +237 -1168
  37. package/dist/index.d.ts +7 -673
  38. package/dist/index.js +77 -1008
  39. package/dist/index.mjs +77 -1008
  40. package/dist/stream-FQm9h4Mg.d.ts +74 -0
  41. package/dist/tracing-DNT9jEbr.d.ts +106 -0
  42. package/package.json +11 -3
  43. package/dist/chunk-SKVY72E5.cjs +0 -667
  44. package/dist/stream-Oqe6WeLE.d.ts +0 -173
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2;
2
2
 
3
3
 
4
4
 
@@ -24,7 +24,6 @@
24
24
 
25
25
 
26
26
 
27
- var _chunkSKVY72E5cjs = require('./chunk-SKVY72E5.cjs');
28
27
 
29
28
 
30
29
 
@@ -49,6 +48,7 @@ var _chunkSKVY72E5cjs = require('./chunk-SKVY72E5.cjs');
49
48
 
50
49
 
51
50
 
51
+ var _chunkXPZNXSVNcjs = require('./chunk-XPZNXSVN.cjs');
52
52
 
53
53
 
54
54
 
@@ -69,6 +69,7 @@ var _chunkSKVY72E5cjs = require('./chunk-SKVY72E5.cjs');
69
69
 
70
70
 
71
71
 
72
+ var _chunkSTVLQ3XDcjs = require('./chunk-STVLQ3XD.cjs');
72
73
 
73
74
 
74
75
 
@@ -76,11 +77,17 @@ var _chunkSKVY72E5cjs = require('./chunk-SKVY72E5.cjs');
76
77
 
77
78
 
78
79
 
80
+ var _chunkMS34J5LYcjs = require('./chunk-MS34J5LY.cjs');
79
81
 
80
82
 
81
83
 
82
84
 
83
85
 
86
+ var _chunkR3R2FVLGcjs = require('./chunk-R3R2FVLG.cjs');
87
+
88
+
89
+
90
+
84
91
 
85
92
 
86
93
 
@@ -108,1004 +115,66 @@ var _chunkSKVY72E5cjs = require('./chunk-SKVY72E5.cjs');
108
115
 
109
116
 
110
117
 
111
- var _chunkBKBFSOGTcjs = require('./chunk-BKBFSOGT.cjs');
112
118
 
113
- // src/core/types/cancel.ts
114
- function makeCancelToken() {
115
- let cancelled = false;
116
- const listeners = /* @__PURE__ */ new Set();
117
- const cancel = () => {
118
- if (cancelled) return;
119
- cancelled = true;
120
- listeners.forEach((f) => f());
121
- listeners.clear();
122
- };
123
- return {
124
- isCancelled: () => cancelled,
125
- onCancel: (f) => {
126
- if (cancelled) {
127
- try {
128
- f();
129
- } catch (e2) {
130
- }
131
- return () => {
132
- };
133
- }
134
- listeners.add(f);
135
- return () => {
136
- listeners.delete(f);
137
- };
138
- },
139
- cancel
140
- };
141
- }
142
- function linkAbortController(token, ac) {
143
- return token.onCancel(() => ac.abort());
144
- }
145
119
 
146
- // src/core/runtime/resource.ts
147
- function bracket(acquire, use, release) {
148
- return _chunkBKBFSOGTcjs.async.call(void 0, (env, cb) => {
149
- const runtime = _chunkBKBFSOGTcjs.unsafeGetCurrentRuntime.call(void 0, );
150
- const scope = new (0, _chunkBKBFSOGTcjs.Scope)(runtime);
151
- const acquireFiber = scope.fork(acquire);
152
- acquireFiber.join((acquireExit) => {
153
- if (acquireExit._tag === "Failure") {
154
- scope.close(acquireExit);
155
- cb(acquireExit);
156
- return;
157
- }
158
- const resource = acquireExit.value;
159
- const useFiber = scope.fork(use(resource));
160
- useFiber.join((useExit) => {
161
- const releaseEffect = safeRelease(release, resource, useExit);
162
- const releaseFiber = runtime.fork(releaseEffect);
163
- releaseFiber.join(() => {
164
- scope.close(useExit);
165
- cb(useExit);
166
- });
167
- });
168
- });
169
- return () => {
170
- scope.close(_chunkBKBFSOGTcjs.Exit.failCause(_chunkBKBFSOGTcjs.Cause.interrupt()));
171
- };
172
- });
173
- }
174
- function safeRelease(release, resource, exit) {
175
- return _chunkBKBFSOGTcjs.asyncFold.call(void 0,
176
- (() => {
177
- try {
178
- return release(resource, exit);
179
- } catch (e3) {
180
- return _chunkBKBFSOGTcjs.unit.call(void 0, );
181
- }
182
- })(),
183
- () => _chunkBKBFSOGTcjs.unit.call(void 0, ),
184
- () => _chunkBKBFSOGTcjs.unit.call(void 0, )
185
- );
186
- }
187
- function ensuring(effect, finalizer) {
188
- return _chunkBKBFSOGTcjs.async.call(void 0, (env, cb) => {
189
- const runtime = _chunkBKBFSOGTcjs.unsafeGetCurrentRuntime.call(void 0, );
190
- const fiber = runtime.fork(effect);
191
- fiber.join((exit) => {
192
- const fin = _chunkBKBFSOGTcjs.asyncFold.call(void 0,
193
- (() => {
194
- try {
195
- return finalizer(exit);
196
- } catch (e4) {
197
- return _chunkBKBFSOGTcjs.unit.call(void 0, );
198
- }
199
- })(),
200
- () => _chunkBKBFSOGTcjs.unit.call(void 0, ),
201
- () => _chunkBKBFSOGTcjs.unit.call(void 0, )
202
- );
203
- runtime.fork(fin).join(() => {
204
- cb(exit);
205
- });
206
- });
207
- return () => {
208
- fiber.interrupt();
209
- };
210
- });
211
- }
212
- function managed(acquire, release) {
213
- return {
214
- _tag: "Managed",
215
- acquire,
216
- release: (resource, exit) => release(resource, exit)
217
- };
218
- }
219
- function useManaged(m, body) {
220
- return bracket(m.acquire, body, m.release);
221
- }
222
- function managedAll(manageds) {
223
- const acquire = _chunkBKBFSOGTcjs.async.call(void 0, (env, cb) => {
224
- const runtime = _chunkBKBFSOGTcjs.unsafeGetCurrentRuntime.call(void 0, );
225
- const resources = [];
226
- let i = 0;
227
- const acquireNext = () => {
228
- if (i >= manageds.length) {
229
- cb({ _tag: "Success", value: resources });
230
- return;
231
- }
232
- const m = manageds[i];
233
- const fiber = runtime.fork(m.acquire);
234
- fiber.join((exit) => {
235
- if (exit._tag === "Failure") {
236
- releaseAcquired(runtime, manageds, resources, exit).then(() => {
237
- cb(exit);
238
- });
239
- return;
240
- }
241
- resources.push(exit.value);
242
- i++;
243
- acquireNext();
244
- });
245
- };
246
- acquireNext();
247
- });
248
- const release = (resources, exit) => {
249
- return _chunkBKBFSOGTcjs.async.call(void 0, (_env, cb) => {
250
- const runtime = _chunkBKBFSOGTcjs.unsafeGetCurrentRuntime.call(void 0, );
251
- releaseAcquired(runtime, manageds, resources, exit).then(() => {
252
- cb({ _tag: "Success", value: void 0 });
253
- });
254
- });
255
- };
256
- return { _tag: "Managed", acquire, release };
257
- }
258
- async function releaseAcquired(runtime, manageds, resources, exit) {
259
- for (let i = resources.length - 1; i >= 0; i--) {
260
- try {
261
- const m = manageds[i];
262
- await new Promise((resolve) => {
263
- const releaseEff = _chunkBKBFSOGTcjs.asyncFold.call(void 0,
264
- m.release(resources[i], exit),
265
- () => _chunkBKBFSOGTcjs.unit.call(void 0, ),
266
- () => _chunkBKBFSOGTcjs.unit.call(void 0, )
267
- );
268
- runtime.fork(releaseEff).join(() => resolve());
269
- });
270
- } catch (e5) {
271
- }
272
- }
273
- }
274
120
 
275
- // src/core/runtime/linkedQueue.ts
276
- var LinkedQueue = (_class = class {constructor() { _class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this); }
277
- __init() {this.head = null}
278
- __init2() {this.tail = null}
279
- __init3() {this.len = 0}
280
- get length() {
281
- return this.len;
282
- }
283
- isEmpty() {
284
- return this.len === 0;
285
- }
286
- push(value) {
287
- const node = { value, next: null, prev: this.tail, removed: false };
288
- if (this.tail) this.tail.next = node;
289
- else this.head = node;
290
- this.tail = node;
291
- this.len++;
292
- return node;
293
- }
294
- shift() {
295
- const h = this.head;
296
- if (!h) return void 0;
297
- this.unlink(h);
298
- return h.value;
299
- }
300
- remove(node) {
301
- if (node.removed) return;
302
- this.unlink(node);
303
- }
304
- unlink(node) {
305
- node.removed = true;
306
- const { prev, next } = node;
307
- if (prev) prev.next = next;
308
- else this.head = next;
309
- if (next) next.prev = prev;
310
- else this.tail = prev;
311
- node.next = null;
312
- node.prev = null;
313
- this.len--;
314
- }
315
- }, _class);
316
121
 
317
- // src/core/runtime/semaphore.ts
318
- function makeSemaphore(n) {
319
- const capacity = Math.max(1, Math.floor(n));
320
- let available = capacity;
321
- let totalAcquired = 0;
322
- let totalReleased = 0;
323
- const waiters = new LinkedQueue();
324
- const acquire = () => {
325
- return _chunkBKBFSOGTcjs.async.call(void 0, (_env, cb) => {
326
- if (available > 0) {
327
- available--;
328
- totalAcquired++;
329
- cb({ _tag: "Success", value: void 0 });
330
- return;
331
- }
332
- const node = waiters.push(cb);
333
- return () => {
334
- waiters.remove(node);
335
- };
336
- });
337
- };
338
- const release = () => {
339
- totalReleased++;
340
- if (waiters.length > 0) {
341
- const waiter = waiters.shift();
342
- totalAcquired++;
343
- waiter({ _tag: "Success", value: void 0 });
344
- return;
345
- }
346
- available++;
347
- };
348
- const withPermit = (effect) => {
349
- return _chunkBKBFSOGTcjs.asyncFlatMap.call(void 0,
350
- acquire(),
351
- () => _chunkBKBFSOGTcjs.async.call(void 0, (_env, cb) => {
352
- const runtime = _chunkBKBFSOGTcjs.unsafeGetCurrentRuntime.call(void 0, );
353
- const fiber = runtime.fork(effect);
354
- fiber.join((exit) => {
355
- release();
356
- cb(exit);
357
- });
358
- return () => {
359
- fiber.interrupt();
360
- release();
361
- };
362
- })
363
- );
364
- };
365
- return {
366
- capacity,
367
- available: () => available,
368
- waiting: () => waiters.length,
369
- withPermit,
370
- acquire,
371
- release
372
- };
373
- }
374
122
 
375
- // src/core/runtime/ref.ts
376
- function makeRef(initial) {
377
- let value = initial;
378
- return {
379
- get: () => _chunkBKBFSOGTcjs.asyncSync.call(void 0, () => value),
380
- set: (v) => _chunkBKBFSOGTcjs.asyncSync.call(void 0, () => {
381
- value = v;
382
- }),
383
- update: (f) => _chunkBKBFSOGTcjs.asyncSync.call(void 0, () => {
384
- value = f(value);
385
- return value;
386
- }),
387
- modify: (f) => _chunkBKBFSOGTcjs.asyncSync.call(void 0, () => {
388
- const [result, next] = f(value);
389
- value = next;
390
- return result;
391
- }),
392
- unsafeGet: () => value
393
- };
394
- }
395
- function derivedRef(parent, get, set) {
396
- return {
397
- get: () => _chunkBKBFSOGTcjs.asyncSync.call(void 0, () => get(parent.unsafeGet())),
398
- set: (b) => _chunkBKBFSOGTcjs.asyncSync.call(void 0, () => {
399
- const current = parent.unsafeGet();
400
- parent.set(set(current, b));
401
- }),
402
- update: (f) => _chunkBKBFSOGTcjs.asyncSync.call(void 0, () => {
403
- const parentVal = parent.unsafeGet();
404
- const currentB = get(parentVal);
405
- const newB = f(currentB);
406
- const newParent = set(parentVal, newB);
407
- parent.unsafeGet = () => newParent;
408
- return newB;
409
- }),
410
- modify: (f) => _chunkBKBFSOGTcjs.asyncSync.call(void 0, () => {
411
- const parentVal = parent.unsafeGet();
412
- const currentB = get(parentVal);
413
- const [result, newB] = f(currentB);
414
- const newParent = set(parentVal, newB);
415
- parent.unsafeGet = () => newParent;
416
- return result;
417
- }),
418
- unsafeGet: () => get(parent.unsafeGet())
419
- };
420
- }
421
123
 
422
- // src/core/runtime/schedule.ts
423
- function recurs(n) {
424
- return {
425
- _tag: "Schedule",
426
- initial: () => 0,
427
- step: (count, _input) => {
428
- const next = count + 1;
429
- return [{ continue: next < n, delayMs: 0 }, next, next];
430
- }
431
- };
432
- }
433
- function fixed(delayMs) {
434
- return {
435
- _tag: "Schedule",
436
- initial: () => 0,
437
- step: (count, _input) => {
438
- return [{ continue: true, delayMs }, count + 1, count + 1];
439
- }
440
- };
441
- }
442
- function exponential(baseMs, maxMs = Infinity) {
443
- return {
444
- _tag: "Schedule",
445
- initial: () => 0,
446
- step: (count, _input) => {
447
- const delay = Math.min(baseMs * Math.pow(2, count), maxMs);
448
- return [{ continue: true, delayMs: delay }, count + 1, count + 1];
449
- }
450
- };
451
- }
452
- function jittered(baseMs, maxMs = Infinity) {
453
- return {
454
- _tag: "Schedule",
455
- initial: () => 0,
456
- step: (count, _input) => {
457
- const cap = Math.min(baseMs * Math.pow(2, count), maxMs);
458
- const delay = Math.floor(Math.random() * cap);
459
- return [{ continue: true, delayMs: delay }, count + 1, count + 1];
460
- }
461
- };
462
- }
463
- function elapsed(maxMs) {
464
- return {
465
- _tag: "Schedule",
466
- initial: () => performance.now(),
467
- step: (startedAt, _input) => {
468
- const el = performance.now() - startedAt;
469
- return [{ continue: el < maxMs, delayMs: 0 }, startedAt, el];
470
- }
471
- };
472
- }
473
- function whileInput(pred) {
474
- return {
475
- _tag: "Schedule",
476
- initial: () => void 0,
477
- step: (_state, input) => {
478
- return [{ continue: pred(input), delayMs: 0 }, void 0, input];
479
- }
480
- };
481
- }
482
- function take(schedule, n) {
483
- return {
484
- _tag: "Schedule",
485
- initial: () => ({ inner: schedule.initial(), count: 0 }),
486
- step: (state, input) => {
487
- if (state.count >= n) return [{ continue: false, delayMs: 0 }, state, void 0];
488
- const [decision, nextInner, output] = schedule.step(state.inner, input);
489
- const nextState = { inner: nextInner, count: state.count + 1 };
490
- return [{ continue: decision.continue && state.count + 1 < n, delayMs: decision.delayMs }, nextState, output];
491
- }
492
- };
493
- }
494
- function andThen(first, second) {
495
- return {
496
- _tag: "Schedule",
497
- initial: () => ({ phase: "first", inner: first.initial() }),
498
- step: (state, input) => {
499
- if (state.phase === "first") {
500
- const [decision2, nextInner2, output2] = first.step(state.inner, input);
501
- if (decision2.continue) {
502
- return [decision2, { phase: "first", inner: nextInner2 }, output2];
503
- }
504
- return [{ continue: true, delayMs: decision2.delayMs }, { phase: "second", inner: second.initial() }, output2];
505
- }
506
- const [decision, nextInner, output] = second.step(state.inner, input);
507
- return [decision, { phase: "second", inner: nextInner }, output];
508
- }
509
- };
510
- }
511
- function intersect(left, right) {
512
- return {
513
- _tag: "Schedule",
514
- initial: () => ({ left: left.initial(), right: right.initial() }),
515
- step: (state, input) => {
516
- const [ld, ls, lo] = left.step(state.left, input);
517
- const [rd, rs, ro] = right.step(state.right, input);
518
- const cont = ld.continue && rd.continue;
519
- const delay = Math.max(ld.delayMs, rd.delayMs);
520
- return [{ continue: cont, delayMs: delay }, { left: ls, right: rs }, [lo, ro]];
521
- }
522
- };
523
- }
524
- function union(left, right) {
525
- return {
526
- _tag: "Schedule",
527
- initial: () => ({ left: left.initial(), right: right.initial() }),
528
- step: (state, input) => {
529
- const [ld, ls, lo] = left.step(state.left, input);
530
- const [rd, rs, ro] = right.step(state.right, input);
531
- const cont = ld.continue || rd.continue;
532
- const delay = Math.min(ld.delayMs, rd.delayMs);
533
- return [{ continue: cont, delayMs: delay }, { left: ls, right: rs }, [lo, ro]];
534
- }
535
- };
536
- }
537
- function retryWithSchedule(effect, schedule) {
538
- const loop = (state) => _chunkBKBFSOGTcjs.asyncFold.call(void 0,
539
- effect,
540
- (error) => {
541
- const [decision, nextState, _output] = schedule.step(state, error);
542
- if (!decision.continue) return _chunkBKBFSOGTcjs.asyncFail.call(void 0, error);
543
- if (decision.delayMs <= 0) return loop(nextState);
544
- return _chunkBKBFSOGTcjs.asyncFlatMap.call(void 0, _chunkSKVY72E5cjs.sleep.call(void 0, decision.delayMs), () => loop(nextState));
545
- },
546
- (value) => _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, value)
547
- );
548
- return loop(schedule.initial());
549
- }
550
- function repeatWithSchedule(effect, schedule) {
551
- const loop = (state, lastValue) => {
552
- const [decision, nextState, _output] = schedule.step(state, lastValue);
553
- if (!decision.continue) return _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, lastValue);
554
- if (decision.delayMs <= 0) {
555
- return _chunkBKBFSOGTcjs.asyncFold.call(void 0,
556
- effect,
557
- (error) => _chunkBKBFSOGTcjs.asyncFail.call(void 0, error),
558
- (value) => loop(nextState, value)
559
- );
560
- }
561
- return _chunkBKBFSOGTcjs.asyncFlatMap.call(void 0,
562
- _chunkSKVY72E5cjs.sleep.call(void 0, decision.delayMs),
563
- () => _chunkBKBFSOGTcjs.asyncFold.call(void 0,
564
- effect,
565
- (error) => _chunkBKBFSOGTcjs.asyncFail.call(void 0, error),
566
- (value) => loop(nextState, value)
567
- )
568
- );
569
- };
570
- return _chunkBKBFSOGTcjs.asyncFold.call(void 0,
571
- effect,
572
- (error) => _chunkBKBFSOGTcjs.asyncFail.call(void 0, error),
573
- (value) => loop(schedule.initial(), value)
574
- );
575
- }
576
124
 
577
- // src/core/runtime/shutdown.ts
578
- async function gracefulShutdown(runtime, config = {}) {
579
- const timeoutMs = _nullishCoalesce(config.timeoutMs, () => ( 3e4));
580
- const startedAt = Date.now();
581
- _optionalChain([config, 'access', _2 => _2.onStart, 'optionalCall', _3 => _3()]);
582
- let timedOut = false;
583
- const shutdownPromise = (_chunkBKBFSOGTcjs.async.call(void 0, ) => {
584
- try {
585
- await runtime.shutdown();
586
- } catch (e6) {
587
- }
588
- })();
589
- const timeoutPromise = new Promise((resolve) => {
590
- setTimeout(() => {
591
- timedOut = true;
592
- resolve();
593
- }, timeoutMs);
594
- });
595
- await Promise.race([shutdownPromise, timeoutPromise]);
596
- const completedAt = Date.now();
597
- const stats = {
598
- startedAt,
599
- completedAt,
600
- elapsedMs: completedAt - startedAt,
601
- timedOut
602
- };
603
- if (timedOut) {
604
- _optionalChain([config, 'access', _4 => _4.onTimeout, 'optionalCall', _5 => _5(stats)]);
605
- } else {
606
- _optionalChain([config, 'access', _6 => _6.onComplete, 'optionalCall', _7 => _7(stats)]);
607
- }
608
- return stats;
609
- }
610
- function registerShutdownHooks(runtime, config = {}) {
611
- let shuttingDown = false;
612
- const handler = (signal) => {
613
- if (shuttingDown) {
614
- process.exit(1);
615
- }
616
- shuttingDown = true;
617
- console.log(`
618
- [brass-runtime] Received ${signal}, shutting down gracefully...`);
619
- gracefulShutdown(runtime, {
620
- ...config,
621
- onComplete: (stats) => {
622
- _optionalChain([config, 'access', _8 => _8.onComplete, 'optionalCall', _9 => _9(stats)]);
623
- if (!config.onComplete) {
624
- console.log(`[brass-runtime] Shutdown complete (${stats.elapsedMs}ms)`);
625
- process.exit(0);
626
- }
627
- },
628
- onTimeout: (stats) => {
629
- _optionalChain([config, 'access', _10 => _10.onTimeout, 'optionalCall', _11 => _11(stats)]);
630
- if (!config.onTimeout) {
631
- console.log(`[brass-runtime] Shutdown timed out after ${stats.elapsedMs}ms, forcing exit`);
632
- process.exit(1);
633
- }
634
- }
635
- });
636
- };
637
- process.on("SIGTERM", () => handler("SIGTERM"));
638
- process.on("SIGINT", () => handler("SIGINT"));
639
- return () => {
640
- process.removeAllListeners("SIGTERM");
641
- process.removeAllListeners("SIGINT");
642
- };
643
- }
644
125
 
645
- // src/core/runtime/testing.ts
646
- function makeTestRuntime(env, options) {
647
- const runtime = _chunkBKBFSOGTcjs.Runtime.make(_nullishCoalesce(env, () => ( {})));
648
- const run = (effect) => runtime.toPromise(effect);
649
- const runExit = (effect) => new Promise((resolve) => {
650
- runtime.unsafeRunAsync(effect, resolve);
651
- });
652
- return { runtime, run, runExit };
653
- }
654
- async function assertSucceeds(effect, expected, runtime) {
655
- const rt = _nullishCoalesce(runtime, () => ( _chunkBKBFSOGTcjs.Runtime.make({})));
656
- const exit = await new Promise((resolve) => {
657
- rt.unsafeRunAsync(effect, resolve);
658
- });
659
- if (exit._tag !== "Success") {
660
- throw new Error(`Expected success with ${JSON.stringify(expected)}, got failure: ${JSON.stringify(exit.cause)}`);
661
- }
662
- if (JSON.stringify(exit.value) !== JSON.stringify(expected)) {
663
- throw new Error(`Expected ${JSON.stringify(expected)}, got ${JSON.stringify(exit.value)}`);
664
- }
665
- }
666
- async function assertFails(effect, expectedError, runtime) {
667
- const rt = _nullishCoalesce(runtime, () => ( _chunkBKBFSOGTcjs.Runtime.make({})));
668
- const exit = await new Promise((resolve) => {
669
- rt.unsafeRunAsync(effect, resolve);
670
- });
671
- if (exit._tag !== "Failure") {
672
- throw new Error(`Expected failure with ${JSON.stringify(expectedError)}, got success: ${JSON.stringify(exit.value)}`);
673
- }
674
- const error = exit.cause.error;
675
- if (JSON.stringify(error) !== JSON.stringify(expectedError)) {
676
- throw new Error(`Expected error ${JSON.stringify(expectedError)}, got ${JSON.stringify(error)}`);
677
- }
678
- }
679
- async function assertFailsWith(effect, predicate, runtime) {
680
- const rt = _nullishCoalesce(runtime, () => ( _chunkBKBFSOGTcjs.Runtime.make({})));
681
- const exit = await new Promise((resolve) => {
682
- rt.unsafeRunAsync(effect, resolve);
683
- });
684
- if (exit._tag !== "Failure") {
685
- throw new Error(`Expected failure, got success: ${JSON.stringify(exit.value)}`);
686
- }
687
- const error = exit.cause.error;
688
- if (!predicate(error)) {
689
- throw new Error(`Error did not match predicate: ${JSON.stringify(error)}`);
690
- }
691
- }
692
- async function assertCompletesWithin(effect, maxMs, runtime) {
693
- const rt = _nullishCoalesce(runtime, () => ( _chunkBKBFSOGTcjs.Runtime.make({})));
694
- const start = performance.now();
695
- const result = await rt.toPromise(effect);
696
- const elapsed2 = performance.now() - start;
697
- if (elapsed2 > maxMs) {
698
- throw new Error(`Effect took ${elapsed2.toFixed(1)}ms, expected < ${maxMs}ms`);
699
- }
700
- return result;
701
- }
702
- function flakyEffect(failCount, successValue, errorValue) {
703
- let calls = 0;
704
- return _chunkBKBFSOGTcjs.async.call(void 0, (_env, cb) => {
705
- calls++;
706
- if (calls <= failCount) {
707
- cb({ _tag: "Failure", cause: { _tag: "Fail", error: errorValue } });
708
- } else {
709
- cb({ _tag: "Success", value: successValue });
710
- }
711
- });
712
- }
713
- function delayedEffect(ms, value) {
714
- return _chunkBKBFSOGTcjs.async.call(void 0, (_env, cb) => {
715
- const id = setTimeout(() => cb({ _tag: "Success", value }), ms);
716
- return () => clearTimeout(id);
717
- });
718
- }
719
- function neverEffect() {
720
- return _chunkBKBFSOGTcjs.async.call(void 0, () => {
721
- return () => {
722
- };
723
- });
724
- }
725
126
 
726
- // src/core/runtime/layer.ts
727
- function layer(acquire, release) {
728
- return {
729
- _tag: "Layer",
730
- build: (_deps) => _chunkBKBFSOGTcjs.asyncFlatMap.call(void 0, acquire(), (service) => _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, {
731
- service,
732
- release: release ? () => release(service) : () => _chunkBKBFSOGTcjs.unit.call(void 0, )
733
- }))
734
- };
735
- }
736
- function layerFrom() {
737
- return (acquire, release) => ({
738
- _tag: "Layer",
739
- build: (deps) => _chunkBKBFSOGTcjs.asyncFlatMap.call(void 0, acquire(deps), (service) => _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, {
740
- service,
741
- release: release ? () => release(service) : () => _chunkBKBFSOGTcjs.unit.call(void 0, )
742
- }))
743
- });
744
- }
745
- function layerSucceed(value) {
746
- return {
747
- _tag: "Layer",
748
- build: () => _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, { service: value, release: () => _chunkBKBFSOGTcjs.unit.call(void 0, ) })
749
- };
750
- }
751
- function layerFail(error) {
752
- return {
753
- _tag: "Layer",
754
- build: () => _chunkBKBFSOGTcjs.asyncFail.call(void 0, error)
755
- };
756
- }
757
- function compose(from, to) {
758
- return {
759
- _tag: "Layer",
760
- build: (deps) => _chunkBKBFSOGTcjs.asyncFlatMap.call(void 0,
761
- from.build(deps),
762
- ({ service: mid, release: releaseMid }) => _chunkBKBFSOGTcjs.asyncFold.call(void 0,
763
- to.build(mid),
764
- (error) => _chunkBKBFSOGTcjs.asyncFlatMap.call(void 0, releaseMid(), () => _chunkBKBFSOGTcjs.asyncFail.call(void 0, error)),
765
- ({ service: out, release: releaseOut }) => _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, {
766
- service: out,
767
- release: () => _chunkBKBFSOGTcjs.asyncFlatMap.call(void 0, releaseOut(), () => releaseMid())
768
- })
769
- )
770
- )
771
- };
772
- }
773
- function merge2(left, right) {
774
- return {
775
- _tag: "Layer",
776
- build: (deps) => _chunkBKBFSOGTcjs.asyncFlatMap.call(void 0,
777
- left.build(deps),
778
- ({ service: a, release: releaseA }) => _chunkBKBFSOGTcjs.asyncFold.call(void 0,
779
- right.build(deps),
780
- (error) => _chunkBKBFSOGTcjs.asyncFlatMap.call(void 0, releaseA(), () => _chunkBKBFSOGTcjs.asyncFail.call(void 0, error)),
781
- ({ service: b, release: releaseB }) => _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, {
782
- service: { ...a, ...b },
783
- release: () => _chunkBKBFSOGTcjs.asyncFlatMap.call(void 0, releaseB(), () => releaseA())
784
- })
785
- )
786
- )
787
- };
788
- }
789
- function mapLayer(l, f) {
790
- return {
791
- _tag: "Layer",
792
- build: (deps) => _chunkBKBFSOGTcjs.asyncFlatMap.call(void 0,
793
- l.build(deps),
794
- ({ service, release }) => _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, { service: f(service), release })
795
- )
796
- };
797
- }
798
- function provideLayer(l, use, deps) {
799
- return _chunkBKBFSOGTcjs.asyncFlatMap.call(void 0,
800
- l.build(_nullishCoalesce(deps, () => ( {}))),
801
- ({ service, release }) => _chunkBKBFSOGTcjs.asyncFold.call(void 0,
802
- use(service),
803
- (error) => _chunkBKBFSOGTcjs.asyncFlatMap.call(void 0, release(), () => _chunkBKBFSOGTcjs.asyncFail.call(void 0, error)),
804
- (value) => _chunkBKBFSOGTcjs.asyncFlatMap.call(void 0, release(), () => _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, value))
805
- )
806
- );
807
- }
808
127
 
809
- // src/core/runtime/workerPool.ts
810
- function makeWorkerPool(config = {}) {
811
- const size = _nullishCoalesce(config.size, () => ( 4));
812
- const maxQueue = _nullishCoalesce(config.maxQueue, () => ( 1e3));
813
- const taskTimeoutMs = _nullishCoalesce(config.taskTimeoutMs, () => ( 3e4));
814
- let closed = false;
815
- let busy = 0;
816
- let completed = 0;
817
- let failed = 0;
818
- let timedOut = 0;
819
- const queue = [];
820
- const processNext = () => {
821
- if (queue.length === 0 || busy >= size) return;
822
- const task = queue.shift();
823
- busy++;
824
- setImmediate(() => {
825
- if (task.timeoutId) clearTimeout(task.timeoutId);
826
- try {
827
- const result = task.fn();
828
- busy--;
829
- completed++;
830
- task.resolve(result);
831
- processNext();
832
- } catch (e) {
833
- busy--;
834
- failed++;
835
- task.reject({ _tag: "WorkerTaskError", message: String(e) });
836
- processNext();
837
- }
838
- });
839
- };
840
- const execute = (fn) => {
841
- if (closed) return _chunkBKBFSOGTcjs.asyncFail.call(void 0, { _tag: "WorkerPoolClosed" });
842
- if (queue.length >= maxQueue) {
843
- return _chunkBKBFSOGTcjs.asyncFail.call(void 0, { _tag: "WorkerPoolFull", queued: queue.length });
844
- }
845
- return _chunkBKBFSOGTcjs.async.call(void 0, (_env, cb) => {
846
- const task = {
847
- fn,
848
- resolve: (value) => cb({ _tag: "Success", value }),
849
- reject: (error) => cb({ _tag: "Failure", cause: { _tag: "Fail", error } })
850
- };
851
- task.timeoutId = setTimeout(() => {
852
- const idx = queue.indexOf(task);
853
- if (idx >= 0) {
854
- queue.splice(idx, 1);
855
- timedOut++;
856
- task.reject({ _tag: "WorkerTaskTimeout", ms: taskTimeoutMs });
857
- }
858
- }, taskTimeoutMs);
859
- queue.push(task);
860
- processNext();
861
- return () => {
862
- const idx = queue.indexOf(task);
863
- if (idx >= 0) {
864
- queue.splice(idx, 1);
865
- if (task.timeoutId) clearTimeout(task.timeoutId);
866
- }
867
- };
868
- });
869
- };
870
- const run = (taskSource, args = []) => {
871
- return execute(() => {
872
- const fn = new Function(...args.map((_, i) => `arg${i}`), taskSource);
873
- return fn(...args);
874
- });
875
- };
876
- return {
877
- execute,
878
- run,
879
- stats: () => ({
880
- size,
881
- busy,
882
- idle: size - busy,
883
- queued: queue.length,
884
- completed,
885
- failed,
886
- timedOut
887
- }),
888
- shutdown: _chunkBKBFSOGTcjs.async.call(void 0, ) => {
889
- closed = true;
890
- while (queue.length > 0) {
891
- const task = queue.shift();
892
- if (task.timeoutId) clearTimeout(task.timeoutId);
893
- task.reject({ _tag: "WorkerPoolClosed" });
894
- }
895
- }
896
- };
897
- }
898
128
 
899
- // src/core/runtime/tracing.ts
900
- var idCounter = 0;
901
- function generateId() {
902
- return (++idCounter).toString(16).padStart(16, "0");
903
- }
904
- function makeTracer(config) {
905
- const completedSpans = [];
906
- const sampleRate = _nullishCoalesce(config.sampleRate, () => ( 1));
907
- const shouldSample = () => {
908
- if (sampleRate >= 1) return true;
909
- if (sampleRate <= 0) return false;
910
- return Math.random() < sampleRate;
911
- };
912
- const span = (name, effect, attributes) => {
913
- if (!shouldSample()) return effect;
914
- const spanObj = {
915
- name,
916
- context: {
917
- traceId: generateId(),
918
- spanId: generateId()
919
- },
920
- startTime: performance.now(),
921
- status: "unset",
922
- attributes: { "service.name": config.serviceName, ...attributes },
923
- events: []
924
- };
925
- return _chunkBKBFSOGTcjs.asyncFold.call(void 0,
926
- effect,
927
- (error) => {
928
- spanObj.endTime = performance.now();
929
- spanObj.status = "error";
930
- spanObj.events.push({
931
- name: "error",
932
- time: performance.now(),
933
- attributes: { "error.message": String(error) }
934
- });
935
- completedSpans.push(spanObj);
936
- _optionalChain([config, 'access', _12 => _12.onSpanEnd, 'optionalCall', _13 => _13(spanObj)]);
937
- return _chunkBKBFSOGTcjs.asyncFail.call(void 0, error);
938
- },
939
- (value) => {
940
- spanObj.endTime = performance.now();
941
- spanObj.status = "ok";
942
- completedSpans.push(spanObj);
943
- _optionalChain([config, 'access', _14 => _14.onSpanEnd, 'optionalCall', _15 => _15(spanObj)]);
944
- return _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, value);
945
- }
946
- );
947
- };
948
- return {
949
- span,
950
- spans: () => completedSpans,
951
- clear: () => {
952
- completedSpans.length = 0;
953
- }
954
- };
955
- }
956
129
 
957
- // src/core/runtime/metrics.ts
958
- var DEFAULT_BOUNDARIES = [1, 5, 10, 25, 50, 100, 250, 500, 1e3, 5e3, 1e4];
959
- function makeMetrics() {
960
- const counters = /* @__PURE__ */ new Map();
961
- const gauges = /* @__PURE__ */ new Map();
962
- const histograms = /* @__PURE__ */ new Map();
963
- const key = (name, labels) => labels ? `${name}|${Object.entries(labels).sort().map(([k, v]) => `${k}=${v}`).join(",")}` : name;
964
- const counter = (name, labels = {}) => {
965
- const k = key(name, labels);
966
- if (!counters.has(k)) counters.set(k, { labels, value: 0 });
967
- const entry = counters.get(k);
968
- return {
969
- increment: (n = 1) => {
970
- entry.value += Math.max(0, n);
971
- },
972
- value: () => entry.value
973
- };
974
- };
975
- const gauge = (name, labels = {}) => {
976
- const k = key(name, labels);
977
- if (!gauges.has(k)) gauges.set(k, { labels, value: 0 });
978
- const entry = gauges.get(k);
979
- return {
980
- set: (v) => {
981
- entry.value = v;
982
- },
983
- increment: (n = 1) => {
984
- entry.value += n;
985
- },
986
- decrement: (n = 1) => {
987
- entry.value -= n;
988
- },
989
- value: () => entry.value
990
- };
991
- };
992
- const histogram = (name, boundaries = DEFAULT_BOUNDARIES, labels = {}) => {
993
- const k = key(name, labels);
994
- if (!histograms.has(k)) {
995
- const sorted = [...boundaries].sort((a, b) => a - b);
996
- histograms.set(k, {
997
- labels,
998
- boundaries: sorted,
999
- data: { boundaries: sorted, counts: new Array(sorted.length + 1).fill(0), sum: 0, count: 0, min: Infinity, max: -Infinity }
1000
- });
1001
- }
1002
- const entry = histograms.get(k);
1003
- return {
1004
- observe: (value) => {
1005
- entry.data.sum += value;
1006
- entry.data.count++;
1007
- entry.data.min = Math.min(entry.data.min, value);
1008
- entry.data.max = Math.max(entry.data.max, value);
1009
- let placed = false;
1010
- for (let i = 0; i < entry.boundaries.length; i++) {
1011
- if (value <= entry.boundaries[i]) {
1012
- entry.data.counts[i]++;
1013
- placed = true;
1014
- break;
1015
- }
1016
- }
1017
- if (!placed) entry.data.counts[entry.boundaries.length]++;
1018
- },
1019
- buckets: () => ({ ...entry.data }),
1020
- percentile: (p) => {
1021
- const target = Math.ceil(entry.data.count * (p / 100));
1022
- let cumulative = 0;
1023
- for (let i = 0; i < entry.boundaries.length; i++) {
1024
- cumulative += entry.data.counts[i];
1025
- if (cumulative >= target) return entry.boundaries[i];
1026
- }
1027
- return entry.data.max;
1028
- }
1029
- };
1030
- };
1031
- return {
1032
- counter,
1033
- gauge,
1034
- histogram,
1035
- snapshot: () => ({
1036
- counters: Array.from(counters.entries()).map(([k, v]) => ({ name: k.split("|")[0], labels: v.labels, value: v.value })),
1037
- gauges: Array.from(gauges.entries()).map(([k, v]) => ({ name: k.split("|")[0], labels: v.labels, value: v.value })),
1038
- histograms: Array.from(histograms.entries()).map(([k, v]) => ({ name: k.split("|")[0], labels: v.labels, buckets: v.data }))
1039
- }),
1040
- reset: () => {
1041
- counters.clear();
1042
- gauges.clear();
1043
- histograms.clear();
1044
- }
1045
- };
1046
- }
1047
130
 
1048
- // src/core/types/typedError.ts
1049
- function catchTag(effect, tag, handler) {
1050
- return _chunkBKBFSOGTcjs.asyncFold.call(void 0,
1051
- effect,
1052
- (error) => {
1053
- if (typeof error === "object" && error !== null && "_tag" in error && error._tag === tag) {
1054
- return handler(error);
1055
- }
1056
- return _chunkBKBFSOGTcjs.asyncFail.call(void 0, error);
1057
- },
1058
- (value) => _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, value)
1059
- );
1060
- }
1061
- function catchTags(effect, handlers) {
1062
- return _chunkBKBFSOGTcjs.asyncFold.call(void 0,
1063
- effect,
1064
- (error) => {
1065
- if (typeof error === "object" && error !== null && "_tag" in error) {
1066
- const handler = handlers[error._tag];
1067
- if (handler) return handler(error);
1068
- }
1069
- return _chunkBKBFSOGTcjs.asyncFail.call(void 0, error);
1070
- },
1071
- (value) => _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, value)
1072
- );
1073
- }
1074
- function mapError2(effect, f) {
1075
- return _chunkBKBFSOGTcjs.asyncFold.call(void 0,
1076
- effect,
1077
- (error) => _chunkBKBFSOGTcjs.asyncFail.call(void 0, f(error)),
1078
- (value) => _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, value)
1079
- );
1080
- }
1081
- function tagError(effect, tag, enrich) {
1082
- return _chunkBKBFSOGTcjs.asyncFold.call(void 0,
1083
- effect,
1084
- (error) => {
1085
- const fields = enrich ? enrich(error) : {};
1086
- return _chunkBKBFSOGTcjs.asyncFail.call(void 0, { _tag: tag, ...fields });
1087
- },
1088
- (value) => _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, value)
1089
- );
1090
- }
1091
- function orElse(effect, fallback) {
1092
- return _chunkBKBFSOGTcjs.asyncFold.call(void 0,
1093
- effect,
1094
- (error) => fallback(error),
1095
- (value) => _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, value)
1096
- );
1097
- }
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+ var _chunkTGIFUAK4cjs = require('./chunk-TGIFUAK4.cjs');
1098
167
 
1099
168
  // src/core/stream/queue.ts
1100
169
  function bounded(capacity, strategy = "backpressure", options = {}) {
1101
- return _chunkBKBFSOGTcjs.asyncSync.call(void 0, () => makeQueue(capacity, strategy, options));
170
+ return _chunkTGIFUAK4cjs.asyncSync.call(void 0, () => makeQueue(capacity, strategy, options));
1102
171
  }
1103
172
  function makeQueue(capacity, strategy, options) {
1104
- const items = _chunkBKBFSOGTcjs.makeBoundedRingBuffer.call(void 0, capacity, capacity, options);
173
+ const items = _chunkTGIFUAK4cjs.makeBoundedRingBuffer.call(void 0, capacity, capacity, options);
1105
174
  let closed = false;
1106
175
  const QueueClosedErr = { _tag: "QueueClosed" };
1107
- const offerWaiters = new LinkedQueue();
1108
- const takers = new LinkedQueue();
176
+ const offerWaiters = new (0, _chunkXPZNXSVNcjs.LinkedQueue)();
177
+ const takers = new (0, _chunkXPZNXSVNcjs.LinkedQueue)();
1109
178
  const shutdown = () => {
1110
179
  if (closed) return;
1111
180
  closed = true;
@@ -1122,7 +191,7 @@ function makeQueue(capacity, strategy, options) {
1122
191
  return {
1123
192
  size: () => items.length,
1124
193
  shutdown,
1125
- offer: (a) => _chunkBKBFSOGTcjs.async.call(void 0, (_env, cb) => {
194
+ offer: (a) => _chunkTGIFUAK4cjs.asyncEffect.call(void 0, (_env, cb) => {
1126
195
  if (closed) {
1127
196
  cb({ _tag: "Success", value: false });
1128
197
  return;
@@ -1157,7 +226,7 @@ function makeQueue(capacity, strategy, options) {
1157
226
  };
1158
227
  return canceler;
1159
228
  }),
1160
- take: () => _chunkBKBFSOGTcjs.async.call(void 0, (_env, cb) => {
229
+ take: () => _chunkTGIFUAK4cjs.asyncEffect.call(void 0, (_env, cb) => {
1161
230
  if (items.length > 0) {
1162
231
  const a = items.shift();
1163
232
  cb({ _tag: "Success", value: a });
@@ -1184,7 +253,7 @@ function makeQueue(capacity, strategy, options) {
1184
253
  };
1185
254
  return canceler;
1186
255
  }),
1187
- offerBatch: (values) => _chunkBKBFSOGTcjs.asyncSync.call(void 0, () => {
256
+ offerBatch: (values) => _chunkTGIFUAK4cjs.asyncSync.call(void 0, () => {
1188
257
  const results = [];
1189
258
  for (let i = 0; i < values.length; i++) {
1190
259
  if (closed) {
@@ -1215,7 +284,7 @@ function makeQueue(capacity, strategy, options) {
1215
284
  }
1216
285
  return results;
1217
286
  }),
1218
- takeBatch: (n) => _chunkBKBFSOGTcjs.asyncSync.call(void 0, () => {
287
+ takeBatch: (n) => _chunkTGIFUAK4cjs.asyncSync.call(void 0, () => {
1219
288
  const results = [];
1220
289
  const count = Math.min(n, items.length + offerWaiters.length);
1221
290
  for (let i = 0; i < count; i++) {
@@ -1249,34 +318,34 @@ function buffer(stream, capacity, strategy = "backpressure") {
1249
318
  let q = null;
1250
319
  let producer = null;
1251
320
  let upstream = stream;
1252
- const onUpstreamFailure = (opt) => _chunkBKBFSOGTcjs.asyncSucceed.call(void 0,
321
+ const onUpstreamFailure = (opt) => _chunkTGIFUAK4cjs.asyncSucceed.call(void 0,
1253
322
  opt._tag === "None" ? SIGNAL_END : { _tag: "Fail", error: opt.value }
1254
323
  );
1255
- const onUpstreamSuccess = ([a, tail]) => _chunkBKBFSOGTcjs.asyncSync.call(void 0, () => {
324
+ const onUpstreamSuccess = ([a, tail]) => _chunkTGIFUAK4cjs.asyncSync.call(void 0, () => {
1256
325
  upstream = tail;
1257
326
  return { _tag: "Elem", value: a };
1258
327
  });
1259
- const nextSignal = () => _chunkBKBFSOGTcjs.asyncFold.call(void 0,
1260
- _chunkSKVY72E5cjs.uncons.call(void 0, upstream),
328
+ const nextSignal = () => _chunkTGIFUAK4cjs.asyncFold.call(void 0,
329
+ _chunkSTVLQ3XDcjs.uncons.call(void 0, upstream),
1261
330
  onUpstreamFailure,
1262
331
  onUpstreamSuccess
1263
332
  );
1264
- const start = (env) => _chunkBKBFSOGTcjs.asyncFlatMap.call(void 0, bounded(capacity, strategy), (_q) => {
333
+ const start = (env) => _chunkTGIFUAK4cjs.asyncFlatMap.call(void 0, bounded(capacity, strategy), (_q) => {
1265
334
  q = _q;
1266
335
  let lastSig;
1267
336
  const afterOffer = () => {
1268
337
  if (lastSig._tag !== "Elem") {
1269
- return _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, void 0);
338
+ return _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, void 0);
1270
339
  }
1271
340
  return loop();
1272
341
  };
1273
342
  const onSignal = (sig) => {
1274
343
  lastSig = sig;
1275
- return _chunkBKBFSOGTcjs.asyncFlatMap.call(void 0, q.offer(sig), afterOffer);
344
+ return _chunkTGIFUAK4cjs.asyncFlatMap.call(void 0, q.offer(sig), afterOffer);
1276
345
  };
1277
- const loop = () => _chunkBKBFSOGTcjs.asyncFlatMap.call(void 0, nextSignal(), onSignal);
1278
- producer = _chunkBKBFSOGTcjs.fork.call(void 0, loop(), env);
1279
- return _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, void 0);
346
+ const loop = () => _chunkTGIFUAK4cjs.asyncFlatMap.call(void 0, nextSignal(), onSignal);
347
+ producer = _chunkTGIFUAK4cjs.fork.call(void 0, loop(), env);
348
+ return _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, void 0);
1280
349
  });
1281
350
  const pullDown = {
1282
351
  _tag: "Async",
@@ -1284,7 +353,7 @@ function buffer(stream, capacity, strategy = "backpressure") {
1284
353
  const go = () => {
1285
354
  if (!started) {
1286
355
  started = true;
1287
- _chunkBKBFSOGTcjs.unsafeGetCurrentRuntime.call(void 0, ).fork(start(env)).join(() => {
356
+ _chunkTGIFUAK4cjs.unsafeGetCurrentRuntime.call(void 0, ).fork(start(env)).join(() => {
1288
357
  pullFromQueue(env, cb);
1289
358
  });
1290
359
  return;
@@ -1296,25 +365,25 @@ function buffer(stream, capacity, strategy = "backpressure") {
1296
365
  };
1297
366
  function pullFromQueue(env, cb) {
1298
367
  const takeEff = q.take();
1299
- _chunkBKBFSOGTcjs.unsafeGetCurrentRuntime.call(void 0, ).fork(takeEff).join((ex) => {
368
+ _chunkTGIFUAK4cjs.unsafeGetCurrentRuntime.call(void 0, ).fork(takeEff).join((ex) => {
1300
369
  if (ex._tag !== "Success") return;
1301
370
  const sig = ex.value;
1302
371
  switch (sig._tag) {
1303
372
  case "Elem":
1304
- cb({ _tag: "Success", value: [sig.value, _chunkSKVY72E5cjs.fromPull.call(void 0, pullDown)] });
373
+ cb({ _tag: "Success", value: [sig.value, _chunkSTVLQ3XDcjs.fromPull.call(void 0, pullDown)] });
1305
374
  return;
1306
375
  case "End":
1307
- _optionalChain([producer, 'optionalAccess', _16 => _16.interrupt, 'optionalCall', _17 => _17()]);
1308
- cb({ _tag: "Failure", cause: { _tag: "Fail", error: _chunkBKBFSOGTcjs.none } });
376
+ _optionalChain([producer, 'optionalAccess', _ => _.interrupt, 'optionalCall', _2 => _2()]);
377
+ cb({ _tag: "Failure", cause: { _tag: "Fail", error: _chunkTGIFUAK4cjs.none } });
1309
378
  return;
1310
379
  case "Fail":
1311
- _optionalChain([producer, 'optionalAccess', _18 => _18.interrupt, 'optionalCall', _19 => _19()]);
1312
- cb({ _tag: "Failure", cause: { _tag: "Fail", error: _chunkBKBFSOGTcjs.some.call(void 0, sig.error) } });
380
+ _optionalChain([producer, 'optionalAccess', _3 => _3.interrupt, 'optionalCall', _4 => _4()]);
381
+ cb({ _tag: "Failure", cause: { _tag: "Fail", error: _chunkTGIFUAK4cjs.some.call(void 0, sig.error) } });
1313
382
  return;
1314
383
  }
1315
384
  });
1316
385
  }
1317
- return _chunkSKVY72E5cjs.fromPull.call(void 0, pullDown);
386
+ return _chunkSTVLQ3XDcjs.fromPull.call(void 0, pullDown);
1318
387
  }
1319
388
 
1320
389
  // src/core/stream/hub.ts
@@ -1323,45 +392,45 @@ function makeHub(capacity, strategy = "BackPressure") {
1323
392
  const queues = /* @__PURE__ */ new Set();
1324
393
  let closed = false;
1325
394
  const publish = (a) => {
1326
- if (closed) return _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, false);
395
+ if (closed) return _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, false);
1327
396
  const size = queues.size;
1328
- if (size === 0) return _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, true);
397
+ if (size === 0) return _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, true);
1329
398
  if (size === 1) {
1330
399
  const q = queues.values().next().value;
1331
400
  return q.offer(a);
1332
401
  }
1333
- let eff = _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, true);
402
+ let eff = _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, true);
1334
403
  for (const q of queues) {
1335
- eff = _chunkBKBFSOGTcjs.asyncFlatMap.call(void 0,
404
+ eff = _chunkTGIFUAK4cjs.asyncFlatMap.call(void 0,
1336
405
  eff,
1337
- (okSoFar) => _chunkBKBFSOGTcjs.asyncFlatMap.call(void 0, q.offer(a), (ok) => _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, okSoFar && ok))
406
+ (okSoFar) => _chunkTGIFUAK4cjs.asyncFlatMap.call(void 0, q.offer(a), (ok) => _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, okSoFar && ok))
1338
407
  );
1339
408
  }
1340
409
  return eff;
1341
410
  };
1342
411
  const publishAll = (as) => {
1343
- let eff = _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, true);
412
+ let eff = _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, true);
1344
413
  const it = as[Symbol.iterator]();
1345
414
  while (true) {
1346
415
  const n = it.next();
1347
416
  if (n.done) break;
1348
417
  const a = n.value;
1349
- eff = _chunkBKBFSOGTcjs.asyncFlatMap.call(void 0,
418
+ eff = _chunkTGIFUAK4cjs.asyncFlatMap.call(void 0,
1350
419
  eff,
1351
- (okSoFar) => _chunkBKBFSOGTcjs.asyncFlatMap.call(void 0, publish(a), (ok) => _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, okSoFar && ok))
420
+ (okSoFar) => _chunkTGIFUAK4cjs.asyncFlatMap.call(void 0, publish(a), (ok) => _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, okSoFar && ok))
1352
421
  );
1353
422
  }
1354
423
  return eff;
1355
424
  };
1356
425
  const subscribe = () => {
1357
426
  if (closed) {
1358
- return _chunkBKBFSOGTcjs.asyncTotal.call(void 0, () => {
427
+ return _chunkTGIFUAK4cjs.asyncTotal.call(void 0, () => {
1359
428
  throw { _tag: "HubClosed" };
1360
429
  });
1361
430
  }
1362
- return _chunkBKBFSOGTcjs.asyncFlatMap.call(void 0,
431
+ return _chunkTGIFUAK4cjs.asyncFlatMap.call(void 0,
1363
432
  bounded(capacity, toQueueStrategy(strategy)),
1364
- (q) => _chunkBKBFSOGTcjs.asyncSync.call(void 0, () => {
433
+ (q) => _chunkTGIFUAK4cjs.asyncSync.call(void 0, () => {
1365
434
  queues.add(q);
1366
435
  return {
1367
436
  ...q,
@@ -1374,7 +443,7 @@ function makeHub(capacity, strategy = "BackPressure") {
1374
443
  })
1375
444
  );
1376
445
  };
1377
- const shutdown = () => _chunkBKBFSOGTcjs.asyncSync.call(void 0, () => {
446
+ const shutdown = () => _chunkTGIFUAK4cjs.asyncSync.call(void 0, () => {
1378
447
  if (closed) return;
1379
448
  closed = true;
1380
449
  for (const q of queues) q.shutdown();
@@ -1389,23 +458,23 @@ function makeHub(capacity, strategy = "BackPressure") {
1389
458
  }
1390
459
  var broadcast = makeHub;
1391
460
  function broadcastToHub(stream, hub) {
1392
- return _chunkSKVY72E5cjs.foreachStream.call(void 0,
461
+ return _chunkSTVLQ3XDcjs.foreachStream.call(void 0,
1393
462
  stream,
1394
- (a) => _chunkBKBFSOGTcjs.asyncFlatMap.call(void 0, hub.publish(a), () => _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, void 0))
463
+ (a) => _chunkTGIFUAK4cjs.asyncFlatMap.call(void 0, hub.publish(a), () => _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, void 0))
1395
464
  );
1396
465
  }
1397
466
  function fromHub(hub) {
1398
- return _chunkSKVY72E5cjs.managedStream.call(void 0,
1399
- _chunkBKBFSOGTcjs.asyncFlatMap.call(void 0, hub.subscribe(), (sub) => {
1400
- const loop = _chunkSKVY72E5cjs.fromPull.call(void 0,
1401
- _chunkBKBFSOGTcjs.asyncFlatMap.call(void 0,
1402
- _chunkBKBFSOGTcjs.asyncMapError.call(void 0, sub.take(), (_queueClosed) => _chunkBKBFSOGTcjs.none),
1403
- (a) => _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, [a, loop])
467
+ return _chunkSTVLQ3XDcjs.managedStream.call(void 0,
468
+ _chunkTGIFUAK4cjs.asyncFlatMap.call(void 0, hub.subscribe(), (sub) => {
469
+ const loop = _chunkSTVLQ3XDcjs.fromPull.call(void 0,
470
+ _chunkTGIFUAK4cjs.asyncFlatMap.call(void 0,
471
+ _chunkTGIFUAK4cjs.asyncMapError.call(void 0, sub.take(), (_queueClosed) => _chunkTGIFUAK4cjs.none),
472
+ (a) => _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, [a, loop])
1404
473
  )
1405
474
  );
1406
- return _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, {
475
+ return _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, {
1407
476
  stream: loop,
1408
- release: (_exit) => _chunkBKBFSOGTcjs.asyncSync.call(void 0, () => sub.unsubscribe())
477
+ release: (_exit) => _chunkTGIFUAK4cjs.asyncSync.call(void 0, () => sub.unsubscribe())
1409
478
  });
1410
479
  })
1411
480
  );
@@ -1415,20 +484,20 @@ function fromHub(hub) {
1415
484
  var cachedWasmChunkCtor;
1416
485
  function resolveWasmChunkBuffer() {
1417
486
  if (cachedWasmChunkCtor !== void 0) return cachedWasmChunkCtor;
1418
- const mod = _chunkBKBFSOGTcjs.resolveWasmModule.call(void 0, );
1419
- cachedWasmChunkCtor = _nullishCoalesce(_optionalChain([mod, 'optionalAccess', _20 => _20.BrassWasmChunkBuffer]), () => ( null));
487
+ const mod = _chunkTGIFUAK4cjs.resolveWasmModule.call(void 0, );
488
+ cachedWasmChunkCtor = _nullishCoalesce(_optionalChain([mod, 'optionalAccess', _5 => _5.BrassWasmChunkBuffer]), () => ( null));
1420
489
  return cachedWasmChunkCtor;
1421
490
  }
1422
- var TsChunker = (_class2 = class {
1423
- constructor(maxChunkSize) {;_class2.prototype.__init4.call(this);_class2.prototype.__init5.call(this);_class2.prototype.__init6.call(this);_class2.prototype.__init7.call(this);_class2.prototype.__init8.call(this);
491
+ var TsChunker = (_class = class {
492
+ constructor(maxChunkSize) {;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);_class.prototype.__init4.call(this);_class.prototype.__init5.call(this);
1424
493
  this.maxChunkSize = maxChunkSize;
1425
494
  }
1426
495
 
1427
- __init4() {this.engine = "ts"}
1428
- __init5() {this.values = []}
1429
- __init6() {this.emittedChunks = 0}
1430
- __init7() {this.emittedItems = 0}
1431
- __init8() {this.flushes = 0}
496
+ __init() {this.engine = "ts"}
497
+ __init2() {this.values = []}
498
+ __init3() {this.emittedChunks = 0}
499
+ __init4() {this.emittedItems = 0}
500
+ __init5() {this.flushes = 0}
1432
501
  get length() {
1433
502
  return this.values.length;
1434
503
  }
@@ -1469,12 +538,12 @@ var TsChunker = (_class2 = class {
1469
538
  }
1470
539
  };
1471
540
  }
1472
- }, _class2);
1473
- var WasmChunker = (_class3 = class {
1474
- __init9() {this.engine = "wasm"}
1475
- __init10() {this.fallbackUsed = false}
541
+ }, _class);
542
+ var WasmChunker = (_class2 = class {
543
+ __init6() {this.engine = "wasm"}
544
+ __init7() {this.fallbackUsed = false}
1476
545
 
1477
- constructor(maxChunkSize) {;_class3.prototype.__init9.call(this);_class3.prototype.__init10.call(this);
546
+ constructor(maxChunkSize) {;_class2.prototype.__init6.call(this);_class2.prototype.__init7.call(this);
1478
547
  const Ctor = resolveWasmChunkBuffer();
1479
548
  if (!Ctor) {
1480
549
  throw new Error("brass-runtime wasm chunk buffer is not available. Run npm run build:wasm first.");
@@ -1505,7 +574,7 @@ var WasmChunker = (_class3 = class {
1505
574
  stats() {
1506
575
  return { engine: "wasm", fallbackUsed: false, data: JSON.parse(this.inner.stats_json()) };
1507
576
  }
1508
- }, _class3);
577
+ }, _class2);
1509
578
  function makeStreamChunker(chunkSize, options = {}) {
1510
579
  const size = Math.max(1, chunkSize | 0);
1511
580
  const engine = _nullishCoalesce(options.engine, () => ( "ts"));
@@ -1515,19 +584,19 @@ function makeStreamChunker(chunkSize, options = {}) {
1515
584
  }
1516
585
  function chunks(input, chunkSize, options = {}) {
1517
586
  const size = Math.max(1, chunkSize | 0);
1518
- const loop = (cur) => _chunkSKVY72E5cjs.fromPull.call(void 0, fillChunk(cur, makeStreamChunker(size, options)));
1519
- const fillChunk = (cur, chunker) => _chunkBKBFSOGTcjs.asyncFold.call(void 0,
1520
- _chunkSKVY72E5cjs.uncons.call(void 0, cur),
587
+ const loop = (cur) => _chunkSTVLQ3XDcjs.fromPull.call(void 0, fillChunk(cur, makeStreamChunker(size, options)));
588
+ const fillChunk = (cur, chunker) => _chunkTGIFUAK4cjs.asyncFold.call(void 0,
589
+ _chunkSTVLQ3XDcjs.uncons.call(void 0, cur),
1521
590
  (opt) => {
1522
591
  if (opt._tag === "None" && !chunker.isEmpty()) {
1523
- return _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, [chunker.takeChunk(), _chunkSKVY72E5cjs.fromPull.call(void 0, _chunkBKBFSOGTcjs.asyncFail.call(void 0, _chunkBKBFSOGTcjs.none))]);
592
+ return _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, [chunker.takeChunk(), _chunkSTVLQ3XDcjs.fromPull.call(void 0, _chunkTGIFUAK4cjs.asyncFail.call(void 0, _chunkTGIFUAK4cjs.none))]);
1524
593
  }
1525
- return _chunkBKBFSOGTcjs.asyncFail.call(void 0, opt);
594
+ return _chunkTGIFUAK4cjs.asyncFail.call(void 0, opt);
1526
595
  },
1527
596
  ([a, tail]) => {
1528
597
  chunker.push(a);
1529
598
  if (chunker.isFull()) {
1530
- return _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, [chunker.takeChunk(), loop(tail)]);
599
+ return _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, [chunker.takeChunk(), loop(tail)]);
1531
600
  }
1532
601
  return fillChunk(tail, chunker);
1533
602
  }
@@ -1538,15 +607,15 @@ function mapChunks(input, chunkSize, f, options = {}) {
1538
607
  const pullOne = (pending, rest) => {
1539
608
  if (pending.length > 0) {
1540
609
  const [head, ...tail] = pending;
1541
- return _chunkSKVY72E5cjs.fromPull.call(void 0, _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, [head, pullOne(tail, rest)]));
610
+ return _chunkSTVLQ3XDcjs.fromPull.call(void 0, _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, [head, pullOne(tail, rest)]));
1542
611
  }
1543
- return _chunkSKVY72E5cjs.fromPull.call(void 0,
1544
- _chunkBKBFSOGTcjs.asyncFold.call(void 0,
1545
- _chunkSKVY72E5cjs.uncons.call(void 0, rest),
1546
- (opt) => _chunkBKBFSOGTcjs.asyncFail.call(void 0, opt),
612
+ return _chunkSTVLQ3XDcjs.fromPull.call(void 0,
613
+ _chunkTGIFUAK4cjs.asyncFold.call(void 0,
614
+ _chunkSTVLQ3XDcjs.uncons.call(void 0, rest),
615
+ (opt) => _chunkTGIFUAK4cjs.asyncFail.call(void 0, opt),
1547
616
  ([chunk, tail]) => {
1548
617
  const mapped = f(chunk);
1549
- return _chunkSKVY72E5cjs.uncons.call(void 0, pullOne(mapped, tail));
618
+ return _chunkSTVLQ3XDcjs.uncons.call(void 0, pullOne(mapped, tail));
1550
619
  }
1551
620
  )
1552
621
  );
@@ -1559,16 +628,16 @@ function mapChunksEffect(chunkSize, f, options = {}) {
1559
628
  const pullOne = (pending, rest) => {
1560
629
  if (pending.length > 0) {
1561
630
  const [head, ...tail] = pending;
1562
- return _chunkSKVY72E5cjs.fromPull.call(void 0, _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, [head, pullOne(tail, rest)]));
631
+ return _chunkSTVLQ3XDcjs.fromPull.call(void 0, _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, [head, pullOne(tail, rest)]));
1563
632
  }
1564
- return _chunkSKVY72E5cjs.fromPull.call(void 0,
1565
- _chunkBKBFSOGTcjs.asyncFold.call(void 0,
1566
- _chunkBKBFSOGTcjs.asyncMapError.call(void 0, _chunkSKVY72E5cjs.uncons.call(void 0, rest), (opt) => _chunkSKVY72E5cjs.widenOpt.call(void 0, opt)),
1567
- (opt) => _chunkBKBFSOGTcjs.asyncFail.call(void 0, opt),
1568
- ([chunk, tail]) => _chunkBKBFSOGTcjs.asyncFold.call(void 0,
1569
- _chunkBKBFSOGTcjs.asyncMapError.call(void 0, f(chunk), (e) => ({ _tag: "Some", value: e })),
1570
- (opt) => _chunkBKBFSOGTcjs.asyncFail.call(void 0, opt),
1571
- (mapped) => _chunkSKVY72E5cjs.uncons.call(void 0, pullOne(mapped, tail))
633
+ return _chunkSTVLQ3XDcjs.fromPull.call(void 0,
634
+ _chunkTGIFUAK4cjs.asyncFold.call(void 0,
635
+ _chunkTGIFUAK4cjs.asyncMapError.call(void 0, _chunkSTVLQ3XDcjs.uncons.call(void 0, rest), (opt) => _chunkSTVLQ3XDcjs.widenOpt.call(void 0, opt)),
636
+ (opt) => _chunkTGIFUAK4cjs.asyncFail.call(void 0, opt),
637
+ ([chunk, tail]) => _chunkTGIFUAK4cjs.asyncFold.call(void 0,
638
+ _chunkTGIFUAK4cjs.asyncMapError.call(void 0, f(chunk), (e) => ({ _tag: "Some", value: e })),
639
+ (opt) => _chunkTGIFUAK4cjs.asyncFail.call(void 0, opt),
640
+ (mapped) => _chunkSTVLQ3XDcjs.uncons.call(void 0, pullOne(mapped, tail))
1572
641
  )
1573
642
  )
1574
643
  );
@@ -1693,8 +762,8 @@ function countCounters(metas) {
1693
762
  return count;
1694
763
  }
1695
764
  function fuse(pipeline, options) {
1696
- const verbose = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _21 => _21.verbose]), () => ( _fusionVerbose));
1697
- if (_optionalChain([options, 'optionalAccess', _22 => _22.enabled]) === false || !_fusionEnabled && _optionalChain([options, 'optionalAccess', _23 => _23.enabled]) !== true) {
765
+ const verbose = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _6 => _6.verbose]), () => ( _fusionVerbose));
766
+ if (_optionalChain([options, 'optionalAccess', _7 => _7.enabled]) === false || !_fusionEnabled && _optionalChain([options, 'optionalAccess', _8 => _8.enabled]) !== true) {
1698
767
  if (verbose) {
1699
768
  console.log("[FusionEngine] Fusion disabled by options");
1700
769
  }
@@ -1802,20 +871,20 @@ function applyFused(stream, fused) {
1802
871
  return arrayToStream(outputArray);
1803
872
  }
1804
873
  const state = fused.initState();
1805
- const loop = (cur) => _chunkSKVY72E5cjs.fromPull.call(void 0,
1806
- _chunkBKBFSOGTcjs.asyncFold.call(void 0,
1807
- _chunkSKVY72E5cjs.uncons.call(void 0, cur),
874
+ const loop = (cur) => _chunkSTVLQ3XDcjs.fromPull.call(void 0,
875
+ _chunkTGIFUAK4cjs.asyncFold.call(void 0,
876
+ _chunkSTVLQ3XDcjs.uncons.call(void 0, cur),
1808
877
  // End-of-stream or error: propagate
1809
- (opt) => _chunkBKBFSOGTcjs.asyncFail.call(void 0, opt),
878
+ (opt) => _chunkTGIFUAK4cjs.asyncFail.call(void 0, opt),
1810
879
  ([a, tail]) => {
1811
880
  const result = fused.step(a, state);
1812
881
  switch (result.tag) {
1813
882
  case "emit":
1814
- return _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, [result.value, loop(tail)]);
883
+ return _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, [result.value, loop(tail)]);
1815
884
  case "skip":
1816
- return _chunkSKVY72E5cjs.uncons.call(void 0, loop(tail));
885
+ return _chunkSTVLQ3XDcjs.uncons.call(void 0, loop(tail));
1817
886
  case "halt":
1818
- return _chunkBKBFSOGTcjs.asyncFail.call(void 0, _chunkBKBFSOGTcjs.none);
887
+ return _chunkTGIFUAK4cjs.asyncFail.call(void 0, _chunkTGIFUAK4cjs.none);
1819
888
  }
1820
889
  }
1821
890
  )
@@ -1890,7 +959,7 @@ function deserializeFusedPipeline(serialized) {
1890
959
  }
1891
960
  const carrier = createDeserializedCarrier(metas);
1892
961
  return carrier;
1893
- } catch (e7) {
962
+ } catch (e2) {
1894
963
  return null;
1895
964
  }
1896
965
  }
@@ -2001,10 +1070,10 @@ function identity() {
2001
1070
  }
2002
1071
  function mapP(f) {
2003
1072
  const pipeline = ((input) => {
2004
- const onError = (opt) => _chunkBKBFSOGTcjs.asyncFail.call(void 0, opt);
2005
- const onSuccess = ([a, tail]) => _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, [f(a), loop(tail)]);
2006
- const loop = (cur) => _chunkSKVY72E5cjs.fromPull.call(void 0,
2007
- _chunkBKBFSOGTcjs.asyncFold.call(void 0, _chunkSKVY72E5cjs.uncons.call(void 0, cur), onError, onSuccess)
1073
+ const onError = (opt) => _chunkTGIFUAK4cjs.asyncFail.call(void 0, opt);
1074
+ const onSuccess = ([a, tail]) => _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, [f(a), loop(tail)]);
1075
+ const loop = (cur) => _chunkSTVLQ3XDcjs.fromPull.call(void 0,
1076
+ _chunkTGIFUAK4cjs.asyncFold.call(void 0, _chunkSTVLQ3XDcjs.uncons.call(void 0, cur), onError, onSuccess)
2008
1077
  );
2009
1078
  return loop(input);
2010
1079
  });
@@ -2013,10 +1082,10 @@ function mapP(f) {
2013
1082
  }
2014
1083
  function filterP(pred) {
2015
1084
  const pipeline = ((input) => {
2016
- const onError = (opt) => _chunkBKBFSOGTcjs.asyncFail.call(void 0, opt);
2017
- const onSuccess = ([a, tail]) => pred(a) ? _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, [a, loop(tail)]) : next(tail);
2018
- const next = (cur) => _chunkBKBFSOGTcjs.asyncFold.call(void 0, _chunkSKVY72E5cjs.uncons.call(void 0, cur), onError, onSuccess);
2019
- const loop = (cur) => _chunkSKVY72E5cjs.fromPull.call(void 0, next(cur));
1085
+ const onError = (opt) => _chunkTGIFUAK4cjs.asyncFail.call(void 0, opt);
1086
+ const onSuccess = ([a, tail]) => pred(a) ? _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, [a, loop(tail)]) : next(tail);
1087
+ const next = (cur) => _chunkTGIFUAK4cjs.asyncFold.call(void 0, _chunkSTVLQ3XDcjs.uncons.call(void 0, cur), onError, onSuccess);
1088
+ const loop = (cur) => _chunkSTVLQ3XDcjs.fromPull.call(void 0, next(cur));
2020
1089
  return loop(input);
2021
1090
  });
2022
1091
  pipeline[PURE_PIPELINE_TAG] = { kind: "filter", pred };
@@ -2024,16 +1093,16 @@ function filterP(pred) {
2024
1093
  }
2025
1094
  function filterMapP(f) {
2026
1095
  return ((input) => {
2027
- const onError = (opt) => _chunkBKBFSOGTcjs.asyncFail.call(void 0, opt);
2028
- const next = (cur) => _chunkBKBFSOGTcjs.asyncFold.call(void 0,
2029
- _chunkSKVY72E5cjs.uncons.call(void 0, cur),
1096
+ const onError = (opt) => _chunkTGIFUAK4cjs.asyncFail.call(void 0, opt);
1097
+ const next = (cur) => _chunkTGIFUAK4cjs.asyncFold.call(void 0,
1098
+ _chunkSTVLQ3XDcjs.uncons.call(void 0, cur),
2030
1099
  onError,
2031
1100
  ([a, tail]) => {
2032
1101
  const ob = f(a);
2033
- return ob._tag === "Some" ? _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, [ob.value, loop(tail)]) : next(tail);
1102
+ return ob._tag === "Some" ? _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, [ob.value, loop(tail)]) : next(tail);
2034
1103
  }
2035
1104
  );
2036
- const loop = (cur) => _chunkSKVY72E5cjs.fromPull.call(void 0, next(cur));
1105
+ const loop = (cur) => _chunkSTVLQ3XDcjs.fromPull.call(void 0, next(cur));
2037
1106
  return loop(input);
2038
1107
  });
2039
1108
  }
@@ -2041,12 +1110,12 @@ function takeP(n) {
2041
1110
  const m = Math.max(0, n | 0);
2042
1111
  const pipeline = ((input) => {
2043
1112
  const loop = (cur, remaining) => {
2044
- if (remaining <= 0) return _chunkSKVY72E5cjs.emptyStream.call(void 0, );
2045
- return _chunkSKVY72E5cjs.fromPull.call(void 0,
2046
- _chunkBKBFSOGTcjs.asyncFold.call(void 0,
2047
- _chunkSKVY72E5cjs.uncons.call(void 0, cur),
2048
- (opt) => _chunkBKBFSOGTcjs.asyncFail.call(void 0, opt),
2049
- ([a, tail]) => _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, [a, loop(tail, remaining - 1)])
1113
+ if (remaining <= 0) return _chunkSTVLQ3XDcjs.emptyStream.call(void 0, );
1114
+ return _chunkSTVLQ3XDcjs.fromPull.call(void 0,
1115
+ _chunkTGIFUAK4cjs.asyncFold.call(void 0,
1116
+ _chunkSTVLQ3XDcjs.uncons.call(void 0, cur),
1117
+ (opt) => _chunkTGIFUAK4cjs.asyncFail.call(void 0, opt),
1118
+ ([a, tail]) => _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, [a, loop(tail, remaining - 1)])
2050
1119
  )
2051
1120
  );
2052
1121
  };
@@ -2060,11 +1129,11 @@ function dropP(n) {
2060
1129
  const pipeline = ((input) => {
2061
1130
  const skip = (cur, remaining) => {
2062
1131
  if (remaining <= 0) return cur;
2063
- return _chunkSKVY72E5cjs.fromPull.call(void 0,
2064
- _chunkBKBFSOGTcjs.asyncFold.call(void 0,
2065
- _chunkSKVY72E5cjs.uncons.call(void 0, cur),
2066
- (opt) => _chunkBKBFSOGTcjs.asyncFail.call(void 0, opt),
2067
- ([_a, tail]) => _chunkSKVY72E5cjs.uncons.call(void 0, skip(tail, remaining - 1))
1132
+ return _chunkSTVLQ3XDcjs.fromPull.call(void 0,
1133
+ _chunkTGIFUAK4cjs.asyncFold.call(void 0,
1134
+ _chunkSTVLQ3XDcjs.uncons.call(void 0, cur),
1135
+ (opt) => _chunkTGIFUAK4cjs.asyncFail.call(void 0, opt),
1136
+ ([_a, tail]) => _chunkSTVLQ3XDcjs.uncons.call(void 0, skip(tail, remaining - 1))
2068
1137
  )
2069
1138
  );
2070
1139
  };
@@ -2075,19 +1144,19 @@ function dropP(n) {
2075
1144
  }
2076
1145
  function mapEffectP(f) {
2077
1146
  return ((input) => {
2078
- const raiseToOpt = (fa) => _chunkBKBFSOGTcjs.asyncMapError.call(void 0, fa, (e) => _chunkBKBFSOGTcjs.some.call(void 0, e));
2079
- const loop = (cur) => _chunkSKVY72E5cjs.fromPull.call(void 0,
2080
- _chunkBKBFSOGTcjs.asyncFold.call(void 0,
2081
- _chunkBKBFSOGTcjs.asyncMapError.call(void 0,
2082
- _chunkSKVY72E5cjs.uncons.call(void 0, cur),
2083
- (opt) => _chunkSKVY72E5cjs.widenOpt.call(void 0, opt)
1147
+ const raiseToOpt = (fa) => _chunkTGIFUAK4cjs.asyncMapError.call(void 0, fa, (e) => _chunkTGIFUAK4cjs.some.call(void 0, e));
1148
+ const loop = (cur) => _chunkSTVLQ3XDcjs.fromPull.call(void 0,
1149
+ _chunkTGIFUAK4cjs.asyncFold.call(void 0,
1150
+ _chunkTGIFUAK4cjs.asyncMapError.call(void 0,
1151
+ _chunkSTVLQ3XDcjs.uncons.call(void 0, cur),
1152
+ (opt) => _chunkSTVLQ3XDcjs.widenOpt.call(void 0, opt)
2084
1153
  ),
2085
- (opt) => _chunkBKBFSOGTcjs.asyncFail.call(void 0, opt),
2086
- ([a, tail]) => _chunkBKBFSOGTcjs.asyncFold.call(void 0,
1154
+ (opt) => _chunkTGIFUAK4cjs.asyncFail.call(void 0, opt),
1155
+ ([a, tail]) => _chunkTGIFUAK4cjs.asyncFold.call(void 0,
2087
1156
  raiseToOpt(f(a)),
2088
1157
  // Async<Rp, ...>
2089
- (opt2) => _chunkBKBFSOGTcjs.asyncFail.call(void 0, opt2),
2090
- (b) => _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, [b, loop(tail)])
1158
+ (opt2) => _chunkTGIFUAK4cjs.asyncFail.call(void 0, opt2),
1159
+ (b) => _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, [b, loop(tail)])
2091
1160
  )
2092
1161
  )
2093
1162
  );
@@ -2095,7 +1164,7 @@ function mapEffectP(f) {
2095
1164
  });
2096
1165
  }
2097
1166
  function tapEffectP(f) {
2098
- return mapEffectP((a) => _chunkBKBFSOGTcjs.asyncFlatMap.call(void 0, f(a), () => _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, a)));
1167
+ return mapEffectP((a) => _chunkTGIFUAK4cjs.asyncFlatMap.call(void 0, f(a), () => _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, a)));
2099
1168
  }
2100
1169
  function chunksP(chunkSize, options = {}) {
2101
1170
  return ((input) => chunks(input, chunkSize, options));
@@ -2110,23 +1179,23 @@ function groupedP(n) {
2110
1179
  const size = Math.max(1, n | 0);
2111
1180
  return ((input) => {
2112
1181
  const gather = (cur, remaining, acc) => {
2113
- if (remaining <= 0) return _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, { chunk: acc, rest: cur });
2114
- return _chunkBKBFSOGTcjs.asyncFold.call(void 0,
2115
- _chunkSKVY72E5cjs.uncons.call(void 0, cur),
1182
+ if (remaining <= 0) return _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, { chunk: acc, rest: cur });
1183
+ return _chunkTGIFUAK4cjs.asyncFold.call(void 0,
1184
+ _chunkSTVLQ3XDcjs.uncons.call(void 0, cur),
2116
1185
  (opt) => {
2117
- if (opt._tag === "None") return _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, { chunk: acc, rest: _chunkSKVY72E5cjs.emptyStream.call(void 0, ) });
2118
- return _chunkBKBFSOGTcjs.asyncFail.call(void 0, opt);
1186
+ if (opt._tag === "None") return _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, { chunk: acc, rest: _chunkSTVLQ3XDcjs.emptyStream.call(void 0, ) });
1187
+ return _chunkTGIFUAK4cjs.asyncFail.call(void 0, opt);
2119
1188
  },
2120
1189
  ([a, tail]) => gather(tail, remaining - 1, [...acc, a])
2121
1190
  );
2122
1191
  };
2123
- const loop = (cur) => _chunkSKVY72E5cjs.fromPull.call(void 0,
2124
- _chunkBKBFSOGTcjs.asyncFold.call(void 0,
2125
- _chunkSKVY72E5cjs.uncons.call(void 0, cur),
2126
- (opt) => _chunkBKBFSOGTcjs.asyncFail.call(void 0, opt),
2127
- ([a, tail]) => _chunkBKBFSOGTcjs.asyncFlatMap.call(void 0,
1192
+ const loop = (cur) => _chunkSTVLQ3XDcjs.fromPull.call(void 0,
1193
+ _chunkTGIFUAK4cjs.asyncFold.call(void 0,
1194
+ _chunkSTVLQ3XDcjs.uncons.call(void 0, cur),
1195
+ (opt) => _chunkTGIFUAK4cjs.asyncFail.call(void 0, opt),
1196
+ ([a, tail]) => _chunkTGIFUAK4cjs.asyncFlatMap.call(void 0,
2128
1197
  gather(tail, size - 1, [a]),
2129
- ({ chunk, rest }) => _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, [chunk, loop(rest)])
1198
+ ({ chunk, rest }) => _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, [chunk, loop(rest)])
2130
1199
  )
2131
1200
  )
2132
1201
  );
@@ -2137,25 +1206,25 @@ function groupedP(n) {
2137
1206
  // src/core/stream/operators.ts
2138
1207
  function throttle(stream, intervalMs) {
2139
1208
  let lastEmitTime = 0;
2140
- const loop = (cur) => _chunkSKVY72E5cjs.fromPull.call(void 0,
2141
- _chunkBKBFSOGTcjs.asyncFold.call(void 0,
2142
- _chunkSKVY72E5cjs.uncons.call(void 0, cur),
2143
- (opt) => _chunkBKBFSOGTcjs.asyncFail.call(void 0, opt),
1209
+ const loop = (cur) => _chunkSTVLQ3XDcjs.fromPull.call(void 0,
1210
+ _chunkTGIFUAK4cjs.asyncFold.call(void 0,
1211
+ _chunkSTVLQ3XDcjs.uncons.call(void 0, cur),
1212
+ (opt) => _chunkTGIFUAK4cjs.asyncFail.call(void 0, opt),
2144
1213
  ([a, tail]) => {
2145
1214
  const now = Date.now();
2146
1215
  if (now - lastEmitTime >= intervalMs) {
2147
1216
  lastEmitTime = now;
2148
- return _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, [a, loop(tail)]);
1217
+ return _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, [a, loop(tail)]);
2149
1218
  }
2150
- return _chunkSKVY72E5cjs.uncons.call(void 0, loop(tail));
1219
+ return _chunkSTVLQ3XDcjs.uncons.call(void 0, loop(tail));
2151
1220
  }
2152
1221
  )
2153
1222
  );
2154
1223
  return loop(stream);
2155
1224
  }
2156
1225
  function debounce(stream, delayMs) {
2157
- return _chunkSKVY72E5cjs.fromPull.call(void 0,
2158
- _chunkBKBFSOGTcjs.async.call(void 0, (_env, cb) => {
1226
+ return _chunkSTVLQ3XDcjs.fromPull.call(void 0,
1227
+ _chunkTGIFUAK4cjs.asyncEffect.call(void 0, (_env, cb) => {
2159
1228
  let lastValue;
2160
1229
  let hasValue = false;
2161
1230
  let timerId;
@@ -2163,15 +1232,15 @@ function debounce(stream, delayMs) {
2163
1232
  let tail = stream;
2164
1233
  const pullNext = () => {
2165
1234
  if (done) return;
2166
- const pull = _chunkSKVY72E5cjs.uncons.call(void 0, tail);
2167
- pull(_env, (exit) => {
1235
+ const pull = _chunkSTVLQ3XDcjs.uncons.call(void 0, tail);
1236
+ _chunkTGIFUAK4cjs.unsafeRunAsync.call(void 0, pull, _env, (exit) => {
2168
1237
  if (done) return;
2169
1238
  if (exit._tag === "Failure") {
2170
1239
  if (hasValue) {
2171
1240
  const value = lastValue;
2172
1241
  hasValue = false;
2173
1242
  clearTimeout(timerId);
2174
- cb({ _tag: "Success", value: [value, _chunkSKVY72E5cjs.emptyStream.call(void 0, )] });
1243
+ cb({ _tag: "Success", value: [value, _chunkSTVLQ3XDcjs.emptyStream.call(void 0, )] });
2175
1244
  } else {
2176
1245
  cb(exit);
2177
1246
  }
@@ -2201,73 +1270,73 @@ function debounce(stream, delayMs) {
2201
1270
  );
2202
1271
  }
2203
1272
  function zip2(left, right) {
2204
- const loop = (l, r) => _chunkSKVY72E5cjs.fromPull.call(void 0,
2205
- _chunkBKBFSOGTcjs.asyncFold.call(void 0,
2206
- _chunkSKVY72E5cjs.uncons.call(void 0, l),
2207
- (opt) => _chunkBKBFSOGTcjs.asyncFail.call(void 0, opt),
2208
- ([a, lTail]) => _chunkBKBFSOGTcjs.asyncFold.call(void 0,
2209
- _chunkSKVY72E5cjs.uncons.call(void 0, r),
2210
- (opt) => _chunkBKBFSOGTcjs.asyncFail.call(void 0, opt),
2211
- ([b, rTail]) => _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, [[a, b], loop(lTail, rTail)])
1273
+ const loop = (l, r) => _chunkSTVLQ3XDcjs.fromPull.call(void 0,
1274
+ _chunkTGIFUAK4cjs.asyncFold.call(void 0,
1275
+ _chunkSTVLQ3XDcjs.uncons.call(void 0, l),
1276
+ (opt) => _chunkTGIFUAK4cjs.asyncFail.call(void 0, opt),
1277
+ ([a, lTail]) => _chunkTGIFUAK4cjs.asyncFold.call(void 0,
1278
+ _chunkSTVLQ3XDcjs.uncons.call(void 0, r),
1279
+ (opt) => _chunkTGIFUAK4cjs.asyncFail.call(void 0, opt),
1280
+ ([b, rTail]) => _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, [[a, b], loop(lTail, rTail)])
2212
1281
  )
2213
1282
  )
2214
1283
  );
2215
1284
  return loop(left, right);
2216
1285
  }
2217
1286
  function zipWith(left, right, f) {
2218
- const loop = (l, r) => _chunkSKVY72E5cjs.fromPull.call(void 0,
2219
- _chunkBKBFSOGTcjs.asyncFold.call(void 0,
2220
- _chunkSKVY72E5cjs.uncons.call(void 0, l),
2221
- (opt) => _chunkBKBFSOGTcjs.asyncFail.call(void 0, opt),
2222
- ([a, lTail]) => _chunkBKBFSOGTcjs.asyncFold.call(void 0,
2223
- _chunkSKVY72E5cjs.uncons.call(void 0, r),
2224
- (opt) => _chunkBKBFSOGTcjs.asyncFail.call(void 0, opt),
2225
- ([b, rTail]) => _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, [f(a, b), loop(lTail, rTail)])
1287
+ const loop = (l, r) => _chunkSTVLQ3XDcjs.fromPull.call(void 0,
1288
+ _chunkTGIFUAK4cjs.asyncFold.call(void 0,
1289
+ _chunkSTVLQ3XDcjs.uncons.call(void 0, l),
1290
+ (opt) => _chunkTGIFUAK4cjs.asyncFail.call(void 0, opt),
1291
+ ([a, lTail]) => _chunkTGIFUAK4cjs.asyncFold.call(void 0,
1292
+ _chunkSTVLQ3XDcjs.uncons.call(void 0, r),
1293
+ (opt) => _chunkTGIFUAK4cjs.asyncFail.call(void 0, opt),
1294
+ ([b, rTail]) => _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, [f(a, b), loop(lTail, rTail)])
2226
1295
  )
2227
1296
  )
2228
1297
  );
2229
1298
  return loop(left, right);
2230
1299
  }
2231
1300
  function scan(stream, initial, f) {
2232
- const loop = (cur, acc) => _chunkSKVY72E5cjs.fromPull.call(void 0,
2233
- _chunkBKBFSOGTcjs.asyncFold.call(void 0,
2234
- _chunkSKVY72E5cjs.uncons.call(void 0, cur),
2235
- (opt) => _chunkBKBFSOGTcjs.asyncFail.call(void 0, opt),
1301
+ const loop = (cur, acc) => _chunkSTVLQ3XDcjs.fromPull.call(void 0,
1302
+ _chunkTGIFUAK4cjs.asyncFold.call(void 0,
1303
+ _chunkSTVLQ3XDcjs.uncons.call(void 0, cur),
1304
+ (opt) => _chunkTGIFUAK4cjs.asyncFail.call(void 0, opt),
2236
1305
  ([a, tail]) => {
2237
1306
  const next = f(acc, a);
2238
- return _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, [next, loop(tail, next)]);
1307
+ return _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, [next, loop(tail, next)]);
2239
1308
  }
2240
1309
  )
2241
1310
  );
2242
- return _chunkSKVY72E5cjs.concatStream.call(void 0,
2243
- _chunkSKVY72E5cjs.emitStream.call(void 0, _chunkBKBFSOGTcjs.succeed.call(void 0, initial)),
1311
+ return _chunkSTVLQ3XDcjs.concatStream.call(void 0,
1312
+ _chunkSTVLQ3XDcjs.emitStream.call(void 0, _chunkTGIFUAK4cjs.succeed.call(void 0, initial)),
2244
1313
  loop(stream, initial)
2245
1314
  );
2246
1315
  }
2247
1316
  function interleave(left, right) {
2248
- const loop = (l, r, pickLeft) => _chunkSKVY72E5cjs.fromPull.call(void 0,
2249
- _chunkBKBFSOGTcjs.asyncFold.call(void 0,
2250
- _chunkSKVY72E5cjs.uncons.call(void 0, pickLeft ? l : r),
1317
+ const loop = (l, r, pickLeft) => _chunkSTVLQ3XDcjs.fromPull.call(void 0,
1318
+ _chunkTGIFUAK4cjs.asyncFold.call(void 0,
1319
+ _chunkSTVLQ3XDcjs.uncons.call(void 0, pickLeft ? l : r),
2251
1320
  // Current stream ended — drain the other
2252
- (_opt) => _chunkSKVY72E5cjs.uncons.call(void 0, pickLeft ? r : l),
1321
+ (_opt) => _chunkSTVLQ3XDcjs.uncons.call(void 0, pickLeft ? r : l),
2253
1322
  ([a, tail]) => {
2254
1323
  const nextL = pickLeft ? tail : l;
2255
1324
  const nextR = pickLeft ? r : tail;
2256
- return _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, [a, loop(nextL, nextR, !pickLeft)]);
1325
+ return _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, [a, loop(nextL, nextR, !pickLeft)]);
2257
1326
  }
2258
1327
  )
2259
1328
  );
2260
1329
  return loop(left, right, true);
2261
1330
  }
2262
1331
  function take2(stream, n) {
2263
- if (n <= 0) return _chunkSKVY72E5cjs.emptyStream.call(void 0, );
1332
+ if (n <= 0) return _chunkSTVLQ3XDcjs.emptyStream.call(void 0, );
2264
1333
  const loop = (cur, remaining) => {
2265
- if (remaining <= 0) return _chunkSKVY72E5cjs.emptyStream.call(void 0, );
2266
- return _chunkSKVY72E5cjs.fromPull.call(void 0,
2267
- _chunkBKBFSOGTcjs.asyncFold.call(void 0,
2268
- _chunkSKVY72E5cjs.uncons.call(void 0, cur),
2269
- (opt) => _chunkBKBFSOGTcjs.asyncFail.call(void 0, opt),
2270
- ([a, tail]) => _chunkBKBFSOGTcjs.asyncSucceed.call(void 0, [a, loop(tail, remaining - 1)])
1334
+ if (remaining <= 0) return _chunkSTVLQ3XDcjs.emptyStream.call(void 0, );
1335
+ return _chunkSTVLQ3XDcjs.fromPull.call(void 0,
1336
+ _chunkTGIFUAK4cjs.asyncFold.call(void 0,
1337
+ _chunkSTVLQ3XDcjs.uncons.call(void 0, cur),
1338
+ (opt) => _chunkTGIFUAK4cjs.asyncFail.call(void 0, opt),
1339
+ ([a, tail]) => _chunkTGIFUAK4cjs.asyncSucceed.call(void 0, [a, loop(tail, remaining - 1)])
2271
1340
  )
2272
1341
  );
2273
1342
  };
@@ -2277,11 +1346,11 @@ function drop(stream, n) {
2277
1346
  if (n <= 0) return stream;
2278
1347
  const skip = (cur, remaining) => {
2279
1348
  if (remaining <= 0) return cur;
2280
- return _chunkSKVY72E5cjs.fromPull.call(void 0,
2281
- _chunkBKBFSOGTcjs.asyncFold.call(void 0,
2282
- _chunkSKVY72E5cjs.uncons.call(void 0, cur),
2283
- (opt) => _chunkBKBFSOGTcjs.asyncFail.call(void 0, opt),
2284
- ([_a, tail]) => _chunkSKVY72E5cjs.uncons.call(void 0, skip(tail, remaining - 1))
1349
+ return _chunkSTVLQ3XDcjs.fromPull.call(void 0,
1350
+ _chunkTGIFUAK4cjs.asyncFold.call(void 0,
1351
+ _chunkSTVLQ3XDcjs.uncons.call(void 0, cur),
1352
+ (opt) => _chunkTGIFUAK4cjs.asyncFail.call(void 0, opt),
1353
+ ([_a, tail]) => _chunkSTVLQ3XDcjs.uncons.call(void 0, skip(tail, remaining - 1))
2285
1354
  )
2286
1355
  );
2287
1356
  };
@@ -2500,4 +1569,4 @@ function selectedEngineStats(requested, engine, data) {
2500
1569
 
2501
1570
 
2502
1571
 
2503
- exports.ABI_VERSION = _chunkBKBFSOGTcjs.ABI_VERSION; exports.Async = _chunkBKBFSOGTcjs.Async; exports.Cause = _chunkBKBFSOGTcjs.Cause; exports.DefaultHostExecutor = _chunkBKBFSOGTcjs.DefaultHostExecutor; exports.EVENT_WORDS = _chunkBKBFSOGTcjs.EVENT_WORDS; exports.EngineFiberHandle = _chunkBKBFSOGTcjs.EngineFiberHandle; exports.EventKindCode = _chunkBKBFSOGTcjs.EventKindCode; exports.Exit = _chunkBKBFSOGTcjs.Exit; exports.HostRegistry = _chunkBKBFSOGTcjs.HostRegistry; exports.JsFiberEngine = _chunkBKBFSOGTcjs.JsFiberEngine; exports.NONE_U32 = _chunkBKBFSOGTcjs.NONE_U32; exports.NoopHooks = _chunkBKBFSOGTcjs.NoopHooks; exports.OpcodeTagCode = _chunkBKBFSOGTcjs.OpcodeTagCode; exports.PURE_PIPELINE_TAG = PURE_PIPELINE_TAG; exports.ProgramBuilder = _chunkBKBFSOGTcjs.ProgramBuilder; exports.PushStatus = _chunkBKBFSOGTcjs.PushStatus; exports.RingBuffer = _chunkBKBFSOGTcjs.RingBuffer; exports.Runtime = _chunkBKBFSOGTcjs.Runtime; exports.RuntimeFiber = _chunkBKBFSOGTcjs.RuntimeFiber; exports.Scheduler = _chunkBKBFSOGTcjs.Scheduler; exports.Scope = _chunkBKBFSOGTcjs.Scope; exports.WasmFiberEngine = _chunkBKBFSOGTcjs.WasmFiberEngine; exports.WasmFiberRegistryBridge = _chunkBKBFSOGTcjs.WasmFiberRegistryBridge; exports.WasmPackFiberBridge = _chunkBKBFSOGTcjs.WasmPackFiberBridge; exports.abortablePromiseStats = _chunkBKBFSOGTcjs.abortablePromiseStats; exports.acquireRelease = _chunkBKBFSOGTcjs.acquireRelease; exports.andThen = andThen2; exports.andThenSchedule = andThen; exports.applyFused = applyFused; exports.assertCompletesWithin = assertCompletesWithin; exports.assertFails = assertFails; exports.assertFailsWith = assertFailsWith; exports.assertNever = _chunkSKVY72E5cjs.assertNever; exports.assertSucceeds = assertSucceeds; exports.async = _chunkBKBFSOGTcjs.async; exports.asyncCatchAll = _chunkBKBFSOGTcjs.asyncCatchAll; exports.asyncFail = _chunkBKBFSOGTcjs.asyncFail; exports.asyncFlatMap = _chunkBKBFSOGTcjs.asyncFlatMap; exports.asyncFold = _chunkBKBFSOGTcjs.asyncFold; exports.asyncInterruptible = _chunkBKBFSOGTcjs.asyncInterruptible; exports.asyncMap = _chunkBKBFSOGTcjs.asyncMap; exports.asyncMapError = _chunkBKBFSOGTcjs.asyncMapError; exports.asyncSucceed = _chunkBKBFSOGTcjs.asyncSucceed; exports.asyncSync = _chunkBKBFSOGTcjs.asyncSync; exports.asyncTotal = _chunkBKBFSOGTcjs.asyncTotal; exports.bounded = bounded; exports.bracket = bracket; exports.broadcast = broadcast; exports.broadcastToHub = broadcastToHub; exports.buffer = buffer; exports.bufferP = bufferP; exports.catchAll = _chunkBKBFSOGTcjs.catchAll; exports.catchTag = catchTag; exports.catchTags = catchTags; exports.chunks = chunks; exports.chunksP = chunksP; exports.collectAllPar = _chunkBKBFSOGTcjs.collectAllPar; exports.collectStream = _chunkSKVY72E5cjs.collectStream; exports.compose = compose2; exports.composeLayer = compose; exports.concatStream = _chunkSKVY72E5cjs.concatStream; exports.debounce = debounce; exports.decodeEvent = _chunkBKBFSOGTcjs.decodeEvent; exports.decodeEventBatch = _chunkBKBFSOGTcjs.decodeEventBatch; exports.delayedEffect = delayedEffect; exports.derivedRef = derivedRef; exports.deserializeFusedPipeline = deserializeFusedPipeline; exports.dropP = dropP; exports.dropStream = drop; exports.elapsed = elapsed; exports.emitStream = _chunkSKVY72E5cjs.emitStream; exports.emptyStream = _chunkSKVY72E5cjs.emptyStream; exports.encodeOpcodeNodes = _chunkBKBFSOGTcjs.encodeOpcodeNodes; exports.encodeOpcodeProgram = _chunkBKBFSOGTcjs.encodeOpcodeProgram; exports.end = _chunkBKBFSOGTcjs.end; exports.engineStats = engineStats; exports.ensuring = ensuring; exports.exponential = exponential; exports.fail = _chunkBKBFSOGTcjs.fail; exports.filterMapP = filterMapP; exports.filterP = filterP; exports.fixed = fixed; exports.flakyEffect = flakyEffect; exports.flatMap = _chunkBKBFSOGTcjs.flatMap; exports.flattenStream = _chunkSKVY72E5cjs.flattenStream; exports.foreachStream = _chunkSKVY72E5cjs.foreachStream; exports.fork = _chunkBKBFSOGTcjs.fork; exports.fromArray = _chunkSKVY72E5cjs.fromArray; exports.fromHub = fromHub; exports.fromPromiseAbortable = _chunkBKBFSOGTcjs.fromPromiseAbortable; exports.fromPull = _chunkSKVY72E5cjs.fromPull; exports.fuse = fuse; exports.getBenchmarkBudget = _chunkBKBFSOGTcjs.getBenchmarkBudget; exports.getCurrentFiber = _chunkBKBFSOGTcjs.getCurrentFiber; exports.getStats = getStats; exports.globalScheduler = _chunkBKBFSOGTcjs.globalScheduler; exports.gracefulShutdown = gracefulShutdown; exports.groupedP = groupedP; exports.identity = identity; exports.inferCallerLaneFromStack = _chunkBKBFSOGTcjs.inferCallerLaneFromStack; exports.initState = initState; exports.interleave = interleave; exports.intersect = intersect; exports.isFusionEnabled = isFusionEnabled; exports.isFusionVerbose = isFusionVerbose; exports.jittered = jittered; exports.laneTag = _chunkBKBFSOGTcjs.laneTag; exports.layer = layer; exports.layerFail = layerFail; exports.layerFrom = layerFrom; exports.layerSucceed = layerSucceed; exports.linkAbortController = linkAbortController; exports.makeBoundedRingBuffer = _chunkBKBFSOGTcjs.makeBoundedRingBuffer; exports.makeCancelToken = makeCancelToken; exports.makeCircuitBreaker = _chunkSKVY72E5cjs.makeCircuitBreaker; exports.makeFiberReadyQueue = _chunkBKBFSOGTcjs.makeFiberReadyQueue; exports.makeHub = makeHub; exports.makeMetrics = makeMetrics; exports.makeRef = makeRef; exports.makeSemaphore = makeSemaphore; exports.makeStreamChunker = makeStreamChunker; exports.makeTestRuntime = makeTestRuntime; exports.makeTracer = makeTracer; exports.makeWorkerPool = makeWorkerPool; exports.managed = managed; exports.managedAll = managedAll; exports.managedStream = _chunkSKVY72E5cjs.managedStream; exports.map = _chunkBKBFSOGTcjs.map; exports.mapAsync = _chunkBKBFSOGTcjs.mapAsync; exports.mapChunks = mapChunks; exports.mapChunksEffect = mapChunksEffect; exports.mapChunksEffectP = mapChunksEffectP; exports.mapEffectP = mapEffectP; exports.mapError = _chunkBKBFSOGTcjs.mapError; exports.mapErrorTyped = mapError2; exports.mapLayer = mapLayer; exports.mapP = mapP; exports.mapStream = _chunkSKVY72E5cjs.mapStream; exports.mapTryAsync = _chunkBKBFSOGTcjs.mapTryAsync; exports.merge = _chunkSKVY72E5cjs.merge; exports.mergeLayer = merge2; exports.mergeStream = _chunkSKVY72E5cjs.mergeStream; exports.neverEffect = neverEffect; exports.none = _chunkBKBFSOGTcjs.none; exports.orElse = orElse; exports.orElseOptional = _chunkBKBFSOGTcjs.orElseOptional; exports.provideLayer = provideLayer; exports.race = _chunkBKBFSOGTcjs.race; exports.raceWith = _chunkBKBFSOGTcjs.raceWith; exports.rangeStream = _chunkSKVY72E5cjs.rangeStream; exports.recurs = recurs; exports.registerShutdownHooks = registerShutdownHooks; exports.repeatWithSchedule = repeatWithSchedule; exports.resetAbortablePromiseStats = _chunkBKBFSOGTcjs.resetAbortablePromiseStats; exports.retry = _chunkSKVY72E5cjs.retry; exports.retryN = _chunkSKVY72E5cjs.retryN; exports.retryWithBackoff = _chunkSKVY72E5cjs.retryWithBackoff; exports.retryWithSchedule = retryWithSchedule; exports.runFusedArray = runFusedArray; exports.runtimeCapabilities = _chunkBKBFSOGTcjs.runtimeCapabilities; exports.runtimeForCaller = _chunkBKBFSOGTcjs.runtimeForCaller; exports.sanitizeLaneKey = _chunkBKBFSOGTcjs.sanitizeLaneKey; exports.scan = scan; exports.selectedEngineStats = selectedEngineStats; exports.serializeFusedPipeline = serializeFusedPipeline; exports.setBenchmarkBudget = _chunkBKBFSOGTcjs.setBenchmarkBudget; exports.setFusionEnabled = setFusionEnabled; exports.setFusionVerbose = setFusionVerbose; exports.sleep = _chunkSKVY72E5cjs.sleep; exports.some = _chunkBKBFSOGTcjs.some; exports.streamFromReadableStream = _chunkSKVY72E5cjs.streamFromReadableStream; exports.succeed = _chunkBKBFSOGTcjs.succeed; exports.sync = _chunkBKBFSOGTcjs.sync; exports.tagError = tagError; exports.takeP = takeP; exports.takeSchedule = take; exports.takeStream = take2; exports.tapEffectP = tapEffectP; exports.throttle = throttle; exports.timeout = _chunkSKVY72E5cjs.timeout; exports.toPromise = _chunkBKBFSOGTcjs.toPromise; exports.toPromiseByCaller = _chunkBKBFSOGTcjs.toPromiseByCaller; exports.uncons = _chunkSKVY72E5cjs.uncons; exports.union = union; exports.unit = _chunkBKBFSOGTcjs.unit; exports.unsafeGetCurrentRuntime = _chunkBKBFSOGTcjs.unsafeGetCurrentRuntime; exports.unsafeRunAsync = _chunkBKBFSOGTcjs.unsafeRunAsync; exports.unsafeRunFoldWithEnv = _chunkBKBFSOGTcjs.unsafeRunFoldWithEnv; exports.unwrapScoped = _chunkSKVY72E5cjs.unwrapScoped; exports.useManaged = useManaged; exports.via = via; exports.whileInput = whileInput; exports.widenOpt = _chunkSKVY72E5cjs.widenOpt; exports.withAsyncPromise = _chunkBKBFSOGTcjs.withAsyncPromise; exports.withCurrentFiber = _chunkBKBFSOGTcjs.withCurrentFiber; exports.withScope = _chunkBKBFSOGTcjs.withScope; exports.withScopeAsync = _chunkBKBFSOGTcjs.withScopeAsync; exports.zip = _chunkSKVY72E5cjs.zip; exports.zipPar = _chunkBKBFSOGTcjs.zipPar; exports.zipStream = zip2; exports.zipWith = zipWith;
1572
+ exports.ABI_VERSION = _chunkTGIFUAK4cjs.ABI_VERSION; exports.Async = _chunkTGIFUAK4cjs.Async; exports.Cause = _chunkTGIFUAK4cjs.Cause; exports.DefaultHostExecutor = _chunkTGIFUAK4cjs.DefaultHostExecutor; exports.EVENT_WORDS = _chunkTGIFUAK4cjs.EVENT_WORDS; exports.EngineFiberHandle = _chunkTGIFUAK4cjs.EngineFiberHandle; exports.EventKindCode = _chunkTGIFUAK4cjs.EventKindCode; exports.Exit = _chunkTGIFUAK4cjs.Exit; exports.HostRegistry = _chunkTGIFUAK4cjs.HostRegistry; exports.JsFiberEngine = _chunkTGIFUAK4cjs.JsFiberEngine; exports.NONE_U32 = _chunkTGIFUAK4cjs.NONE_U32; exports.NoopHooks = _chunkTGIFUAK4cjs.NoopHooks; exports.OpcodeTagCode = _chunkTGIFUAK4cjs.OpcodeTagCode; exports.PURE_PIPELINE_TAG = PURE_PIPELINE_TAG; exports.ProgramBuilder = _chunkTGIFUAK4cjs.ProgramBuilder; exports.PushStatus = _chunkTGIFUAK4cjs.PushStatus; exports.RingBuffer = _chunkTGIFUAK4cjs.RingBuffer; exports.Runtime = _chunkTGIFUAK4cjs.Runtime; exports.RuntimeFiber = _chunkTGIFUAK4cjs.RuntimeFiber; exports.Scheduler = _chunkTGIFUAK4cjs.Scheduler; exports.Scope = _chunkTGIFUAK4cjs.Scope; exports.WasmFiberEngine = _chunkTGIFUAK4cjs.WasmFiberEngine; exports.WasmFiberRegistryBridge = _chunkTGIFUAK4cjs.WasmFiberRegistryBridge; exports.WasmPackFiberBridge = _chunkTGIFUAK4cjs.WasmPackFiberBridge; exports.abortablePromiseStats = _chunkTGIFUAK4cjs.abortablePromiseStats; exports.acquireRelease = _chunkTGIFUAK4cjs.acquireRelease; exports.andThen = andThen2; exports.andThenSchedule = _chunkXPZNXSVNcjs.andThen; exports.applyFused = applyFused; exports.assertCompletesWithin = _chunkXPZNXSVNcjs.assertCompletesWithin; exports.assertFails = _chunkXPZNXSVNcjs.assertFails; exports.assertFailsWith = _chunkXPZNXSVNcjs.assertFailsWith; exports.assertNever = _chunkSTVLQ3XDcjs.assertNever; exports.assertSucceeds = _chunkXPZNXSVNcjs.assertSucceeds; exports.async = _chunkTGIFUAK4cjs.asyncEffect; exports.asyncCatchAll = _chunkTGIFUAK4cjs.asyncCatchAll; exports.asyncFail = _chunkTGIFUAK4cjs.asyncFail; exports.asyncFlatMap = _chunkTGIFUAK4cjs.asyncFlatMap; exports.asyncFold = _chunkTGIFUAK4cjs.asyncFold; exports.asyncInterruptible = _chunkTGIFUAK4cjs.asyncInterruptible; exports.asyncMap = _chunkTGIFUAK4cjs.asyncMap; exports.asyncMapError = _chunkTGIFUAK4cjs.asyncMapError; exports.asyncSucceed = _chunkTGIFUAK4cjs.asyncSucceed; exports.asyncSync = _chunkTGIFUAK4cjs.asyncSync; exports.asyncTotal = _chunkTGIFUAK4cjs.asyncTotal; exports.bounded = bounded; exports.bracket = _chunkXPZNXSVNcjs.bracket; exports.broadcast = broadcast; exports.broadcastToHub = broadcastToHub; exports.buffer = buffer; exports.bufferP = bufferP; exports.catchAll = _chunkTGIFUAK4cjs.catchAll; exports.catchTag = _chunkXPZNXSVNcjs.catchTag; exports.catchTags = _chunkXPZNXSVNcjs.catchTags; exports.chunks = chunks; exports.chunksP = chunksP; exports.collectAllPar = _chunkR3R2FVLGcjs.collectAllPar; exports.collectStream = _chunkSTVLQ3XDcjs.collectStream; exports.compose = compose2; exports.composeLayer = _chunkXPZNXSVNcjs.compose; exports.concatStream = _chunkSTVLQ3XDcjs.concatStream; exports.debounce = debounce; exports.decodeEvent = _chunkTGIFUAK4cjs.decodeEvent; exports.decodeEventBatch = _chunkTGIFUAK4cjs.decodeEventBatch; exports.delayedEffect = _chunkXPZNXSVNcjs.delayedEffect; exports.derivedRef = _chunkXPZNXSVNcjs.derivedRef; exports.deserializeFusedPipeline = deserializeFusedPipeline; exports.dropP = dropP; exports.dropStream = drop; exports.elapsed = _chunkXPZNXSVNcjs.elapsed; exports.emitStream = _chunkSTVLQ3XDcjs.emitStream; exports.emptyStream = _chunkSTVLQ3XDcjs.emptyStream; exports.encodeOpcodeNodes = _chunkTGIFUAK4cjs.encodeOpcodeNodes; exports.encodeOpcodeProgram = _chunkTGIFUAK4cjs.encodeOpcodeProgram; exports.end = _chunkTGIFUAK4cjs.end; exports.engineStats = engineStats; exports.ensuring = _chunkXPZNXSVNcjs.ensuring; exports.exponential = _chunkXPZNXSVNcjs.exponential; exports.fail = _chunkTGIFUAK4cjs.fail; exports.filterMapP = filterMapP; exports.filterP = filterP; exports.fixed = _chunkXPZNXSVNcjs.fixed; exports.flakyEffect = _chunkXPZNXSVNcjs.flakyEffect; exports.flatMap = _chunkTGIFUAK4cjs.flatMap; exports.flattenStream = _chunkSTVLQ3XDcjs.flattenStream; exports.foreachStream = _chunkSTVLQ3XDcjs.foreachStream; exports.fork = _chunkTGIFUAK4cjs.fork; exports.fromArray = _chunkSTVLQ3XDcjs.fromArray; exports.fromHub = fromHub; exports.fromPromiseAbortable = _chunkTGIFUAK4cjs.fromPromiseAbortable; exports.fromPull = _chunkSTVLQ3XDcjs.fromPull; exports.fuse = fuse; exports.getBenchmarkBudget = _chunkTGIFUAK4cjs.getBenchmarkBudget; exports.getCurrentFiber = _chunkTGIFUAK4cjs.getCurrentFiber; exports.getStats = getStats; exports.globalScheduler = _chunkTGIFUAK4cjs.globalScheduler; exports.gracefulShutdown = _chunkXPZNXSVNcjs.gracefulShutdown; exports.groupedP = groupedP; exports.identity = identity; exports.inferCallerLaneFromStack = _chunkTGIFUAK4cjs.inferCallerLaneFromStack; exports.initState = initState; exports.interleave = interleave; exports.intersect = _chunkXPZNXSVNcjs.intersect; exports.isFusionEnabled = isFusionEnabled; exports.isFusionVerbose = isFusionVerbose; exports.jittered = _chunkXPZNXSVNcjs.jittered; exports.laneTag = _chunkTGIFUAK4cjs.laneTag; exports.layer = _chunkXPZNXSVNcjs.layer; exports.layerFail = _chunkXPZNXSVNcjs.layerFail; exports.layerFrom = _chunkXPZNXSVNcjs.layerFrom; exports.layerSucceed = _chunkXPZNXSVNcjs.layerSucceed; exports.linkAbortController = _chunkXPZNXSVNcjs.linkAbortController; exports.makeBoundedRingBuffer = _chunkTGIFUAK4cjs.makeBoundedRingBuffer; exports.makeCancelToken = _chunkXPZNXSVNcjs.makeCancelToken; exports.makeCircuitBreaker = _chunkMS34J5LYcjs.makeCircuitBreaker; exports.makeFiberReadyQueue = _chunkTGIFUAK4cjs.makeFiberReadyQueue; exports.makeHub = makeHub; exports.makeMetrics = _chunkXPZNXSVNcjs.makeMetrics; exports.makeRef = _chunkXPZNXSVNcjs.makeRef; exports.makeSemaphore = _chunkXPZNXSVNcjs.makeSemaphore; exports.makeStreamChunker = makeStreamChunker; exports.makeTestRuntime = _chunkXPZNXSVNcjs.makeTestRuntime; exports.makeTracer = _chunkXPZNXSVNcjs.makeTracer; exports.makeWorkerPool = _chunkXPZNXSVNcjs.makeWorkerPool; exports.managed = _chunkXPZNXSVNcjs.managed; exports.managedAll = _chunkXPZNXSVNcjs.managedAll; exports.managedStream = _chunkSTVLQ3XDcjs.managedStream; exports.map = _chunkTGIFUAK4cjs.map; exports.mapAsync = _chunkTGIFUAK4cjs.mapAsync; exports.mapChunks = mapChunks; exports.mapChunksEffect = mapChunksEffect; exports.mapChunksEffectP = mapChunksEffectP; exports.mapEffectP = mapEffectP; exports.mapError = _chunkTGIFUAK4cjs.mapError; exports.mapErrorTyped = _chunkXPZNXSVNcjs.mapError; exports.mapLayer = _chunkXPZNXSVNcjs.mapLayer; exports.mapP = mapP; exports.mapStream = _chunkSTVLQ3XDcjs.mapStream; exports.mapTryAsync = _chunkTGIFUAK4cjs.mapTryAsync; exports.merge = _chunkSTVLQ3XDcjs.merge; exports.mergeLayer = _chunkXPZNXSVNcjs.merge; exports.mergeStream = _chunkSTVLQ3XDcjs.mergeStream; exports.neverEffect = _chunkXPZNXSVNcjs.neverEffect; exports.none = _chunkTGIFUAK4cjs.none; exports.orElse = _chunkXPZNXSVNcjs.orElse; exports.orElseOptional = _chunkTGIFUAK4cjs.orElseOptional; exports.provideLayer = _chunkXPZNXSVNcjs.provideLayer; exports.race = _chunkR3R2FVLGcjs.race; exports.raceWith = _chunkR3R2FVLGcjs.raceWith; exports.rangeStream = _chunkSTVLQ3XDcjs.rangeStream; exports.recurs = _chunkXPZNXSVNcjs.recurs; exports.registerShutdownHooks = _chunkXPZNXSVNcjs.registerShutdownHooks; exports.repeatWithSchedule = _chunkXPZNXSVNcjs.repeatWithSchedule; exports.resetAbortablePromiseStats = _chunkTGIFUAK4cjs.resetAbortablePromiseStats; exports.retry = _chunkMS34J5LYcjs.retry; exports.retryN = _chunkMS34J5LYcjs.retryN; exports.retryWithBackoff = _chunkMS34J5LYcjs.retryWithBackoff; exports.retryWithSchedule = _chunkXPZNXSVNcjs.retryWithSchedule; exports.runFusedArray = runFusedArray; exports.runtimeCapabilities = _chunkTGIFUAK4cjs.runtimeCapabilities; exports.runtimeForCaller = _chunkTGIFUAK4cjs.runtimeForCaller; exports.sanitizeLaneKey = _chunkTGIFUAK4cjs.sanitizeLaneKey; exports.scan = scan; exports.selectedEngineStats = selectedEngineStats; exports.serializeFusedPipeline = serializeFusedPipeline; exports.setBenchmarkBudget = _chunkTGIFUAK4cjs.setBenchmarkBudget; exports.setFusionEnabled = setFusionEnabled; exports.setFusionVerbose = setFusionVerbose; exports.sleep = _chunkMS34J5LYcjs.sleep; exports.some = _chunkTGIFUAK4cjs.some; exports.streamFromReadableStream = _chunkSTVLQ3XDcjs.streamFromReadableStream; exports.succeed = _chunkTGIFUAK4cjs.succeed; exports.sync = _chunkTGIFUAK4cjs.sync; exports.tagError = _chunkXPZNXSVNcjs.tagError; exports.takeP = takeP; exports.takeSchedule = _chunkXPZNXSVNcjs.take; exports.takeStream = take2; exports.tapEffectP = tapEffectP; exports.throttle = throttle; exports.timeout = _chunkMS34J5LYcjs.timeout; exports.toPromise = _chunkTGIFUAK4cjs.toPromise; exports.toPromiseByCaller = _chunkTGIFUAK4cjs.toPromiseByCaller; exports.uncons = _chunkSTVLQ3XDcjs.uncons; exports.union = _chunkXPZNXSVNcjs.union; exports.unit = _chunkTGIFUAK4cjs.unit; exports.unsafeGetCurrentRuntime = _chunkTGIFUAK4cjs.unsafeGetCurrentRuntime; exports.unsafeRunAsync = _chunkTGIFUAK4cjs.unsafeRunAsync; exports.unsafeRunFoldWithEnv = _chunkTGIFUAK4cjs.unsafeRunFoldWithEnv; exports.unwrapScoped = _chunkSTVLQ3XDcjs.unwrapScoped; exports.useManaged = _chunkXPZNXSVNcjs.useManaged; exports.via = via; exports.whileInput = _chunkXPZNXSVNcjs.whileInput; exports.widenOpt = _chunkSTVLQ3XDcjs.widenOpt; exports.withAsyncPromise = _chunkTGIFUAK4cjs.withAsyncPromise; exports.withCurrentFiber = _chunkTGIFUAK4cjs.withCurrentFiber; exports.withScope = _chunkTGIFUAK4cjs.withScope; exports.withScopeAsync = _chunkTGIFUAK4cjs.withScopeAsync; exports.zip = _chunkSTVLQ3XDcjs.zip; exports.zipPar = _chunkR3R2FVLGcjs.zipPar; exports.zipStream = zip2; exports.zipWith = zipWith;