clanka 0.8.4 → 0.8.6

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 (36) hide show
  1. package/dist/AgentSkills.test.js +1 -0
  2. package/dist/AgentSkills.test.js.map +1 -1
  3. package/dist/AgentTools.d.ts.map +1 -1
  4. package/dist/AgentTools.js +2 -1
  5. package/dist/AgentTools.js.map +1 -1
  6. package/dist/Compaction.test.js +1 -0
  7. package/dist/Compaction.test.js.map +1 -1
  8. package/dist/CompactionTransport.test.js +1 -1
  9. package/dist/CompactionTransport.test.js.map +1 -1
  10. package/dist/bin/{Effect-BmOuzEIp.mjs → Effect-rADALOOD.mjs} +477 -267
  11. package/dist/bin/Effect-rADALOOD.mjs.map +1 -0
  12. package/dist/bin/{McpClient-CLpFJSre.mjs → McpClient-NazR2OwL.mjs} +219 -63
  13. package/dist/bin/McpClient-NazR2OwL.mjs.map +1 -0
  14. package/dist/bin/{OutputFormatter-C_gdNUl1.mjs → OutputFormatter-BVHbgF2b.mjs} +8 -8
  15. package/dist/bin/OutputFormatter-BVHbgF2b.mjs.map +1 -0
  16. package/dist/bin/{Schema-C7W9nQug.mjs → Schema-C7NXAOWA.mjs} +642 -88
  17. package/dist/bin/Schema-C7NXAOWA.mjs.map +1 -0
  18. package/dist/bin/{SemanticSearch-cqSnq90g.mjs → SemanticSearch-4Jes3jCl.mjs} +135 -90
  19. package/dist/bin/SemanticSearch-4Jes3jCl.mjs.map +1 -0
  20. package/dist/bin/{Stream-BI6Fx9yq.mjs → Stream-CSLA1_GD.mjs} +69 -48
  21. package/dist/bin/Stream-CSLA1_GD.mjs.map +1 -0
  22. package/dist/bin/cli.mjs +2865 -5333
  23. package/dist/bin/cli.mjs.map +1 -1
  24. package/dist/bin/{turndown.cjs-usmCKZ4b.mjs → turndown.cjs-DK29wZw3.mjs} +2 -2
  25. package/dist/bin/{turndown.cjs-usmCKZ4b.mjs.map → turndown.cjs-DK29wZw3.mjs.map} +1 -1
  26. package/package.json +15 -15
  27. package/src/AgentSkills.test.ts +1 -0
  28. package/src/AgentTools.ts +2 -1
  29. package/src/Compaction.test.ts +1 -0
  30. package/src/CompactionTransport.test.ts +1 -1
  31. package/dist/bin/Effect-BmOuzEIp.mjs.map +0 -1
  32. package/dist/bin/McpClient-CLpFJSre.mjs.map +0 -1
  33. package/dist/bin/OutputFormatter-C_gdNUl1.mjs.map +0 -1
  34. package/dist/bin/Schema-C7W9nQug.mjs.map +0 -1
  35. package/dist/bin/SemanticSearch-cqSnq90g.mjs.map +0 -1
  36. package/dist/bin/Stream-BI6Fx9yq.mjs.map +0 -1
@@ -1,4 +1,4 @@
1
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Pipeable.js
1
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Pipeable.js
2
2
  const pipeArguments = (self, args) => {
3
3
  switch (args.length) {
4
4
  case 0: return self;
@@ -27,7 +27,7 @@ const Class$2 = function() {
27
27
  return PipeableBase;
28
28
  }();
29
29
  //#endregion
30
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Function.js
30
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Function.js
31
31
  const dual = function(arity, body) {
32
32
  if (typeof arity === "function") return function() {
33
33
  return arity(arguments) ? body.apply(this, arguments) : (self) => body(self, ...arguments);
@@ -117,7 +117,7 @@ function memoizeIdempotent(f) {
117
117
  };
118
118
  }
119
119
  //#endregion
120
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/equal.js
120
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/equal.js
121
121
  const getAllObjectKeys = (obj) => {
122
122
  const keys = new Set(Reflect.ownKeys(obj));
123
123
  if (obj.constructor === Object) return keys;
@@ -135,13 +135,13 @@ const getAllObjectKeys = (obj) => {
135
135
  const byReferenceInstances = new WeakSet();
136
136
  const viewBytes = (view) => new Uint8Array(view.buffer, view.byteOffset, view.byteLength);
137
137
  //#endregion
138
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/hash.js
138
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/hash.js
139
139
  let backEdges = 0;
140
140
  const addBackEdge = () => {
141
141
  backEdges++;
142
142
  };
143
143
  //#endregion
144
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Predicate.js
144
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Predicate.js
145
145
  function isString(input) {
146
146
  return typeof input === "string";
147
147
  }
@@ -203,7 +203,7 @@ function isIterable(input) {
203
203
  }
204
204
  const or = dual(2, (self, that) => (a) => self(a) || that(a));
205
205
  //#endregion
206
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Hash.js
206
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Hash.js
207
207
  const symbol$1 = "~effect/Hash";
208
208
  const hash = (self) => {
209
209
  switch (typeof self) {
@@ -255,14 +255,14 @@ const mix = (h) => {
255
255
  h = Math.imul(h, 3266489909);
256
256
  return h ^ h >>> 16;
257
257
  };
258
- const combine = dual(2, (self, b) => mix(Math.imul(self, 2654435761) + Math.imul(b, 2246822507)));
258
+ const combine$1 = dual(2, (self, b) => mix(Math.imul(self, 2654435761) + Math.imul(b, 2246822507)));
259
259
  const optimize = (n) => n & 3221225471 | n >>> 1 & 1073741824;
260
260
  const float64 = new DataView(new ArrayBuffer(8));
261
261
  const number = (n) => {
262
262
  const h = n | 0;
263
263
  if (h === n) return optimize(h);
264
264
  float64.setFloat64(0, n !== n ? NaN : n);
265
- return optimize(combine(float64.getInt32(0), float64.getInt32(4)));
265
+ return optimize(combine$1(float64.getInt32(0), float64.getInt32(4)));
266
266
  };
267
267
  const string = (str) => {
268
268
  let h = 5381, i = str.length;
@@ -271,7 +271,7 @@ const string = (str) => {
271
271
  };
272
272
  const structureKeys = (o, keys) => {
273
273
  let h = 12289;
274
- for (const key of keys) h ^= combine(hash(key), hash(o[key]));
274
+ for (const key of keys) h ^= combine$1(hash(key), hash(o[key]));
275
275
  return optimize(h);
276
276
  };
277
277
  const structure = (o) => structureKeys(o, getAllObjectKeys(o));
@@ -282,17 +282,17 @@ const unordered = (seed, f) => (iter) => {
282
282
  };
283
283
  const array = (arr) => {
284
284
  let h = 6151;
285
- for (const element of arr) h = combine(h, hash(element));
285
+ for (const element of arr) h = combine$1(h, hash(element));
286
286
  return optimize(h);
287
287
  };
288
- const hashMap = unordered(string("Map"), ([k, v]) => combine(hash(k), hash(v)));
288
+ const hashMap = unordered(string("Map"), ([k, v]) => combine$1(hash(k), hash(v)));
289
289
  const setSeed = string("Set");
290
- const hashSet = unordered(setSeed, (element) => combine(setSeed, hash(element)));
290
+ const hashSet = unordered(setSeed, (element) => combine$1(setSeed, hash(element)));
291
291
  const randomHashCache = new WeakMap();
292
292
  const hashCache = new WeakMap();
293
293
  const visitedObjects = new WeakSet();
294
294
  //#endregion
295
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Equal.js
295
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Equal.js
296
296
  const symbol = "~effect/Equal";
297
297
  function equals$1() {
298
298
  if (arguments.length === 1) return (self) => compareBoth(self, arguments[0]);
@@ -377,11 +377,13 @@ function compareRecords(self, that) {
377
377
  }
378
378
  function compareHashed(self, that, hashOf, equivalent) {
379
379
  const groups = new Map();
380
+ let remaining = 0;
380
381
  for (const item of that) {
381
382
  const h = hashOf(item);
382
383
  const group = groups.get(h);
383
384
  if (group) group.push(item);
384
385
  else groups.set(h, [item]);
386
+ remaining++;
385
387
  }
386
388
  outer: for (const item of self) {
387
389
  const group = groups.get(hashOf(item));
@@ -389,12 +391,13 @@ function compareHashed(self, that, hashOf, equivalent) {
389
391
  for (let i = 0; i < group.length; i++) if (equivalent(item, group[i])) {
390
392
  group[i] = group[group.length - 1];
391
393
  group.pop();
394
+ remaining--;
392
395
  continue outer;
393
396
  }
394
397
  }
395
398
  return false;
396
399
  }
397
- return true;
400
+ return remaining === 0;
398
401
  }
399
402
  const entryHash = (entry) => hash(entry[0]);
400
403
  const equalEntries = (self, that) => compareBoth(self[0], that[0]) && compareBoth(self[1], that[1]);
@@ -404,7 +407,7 @@ const byReferenceUnsafe = (obj) => {
404
407
  return obj;
405
408
  };
406
409
  //#endregion
407
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Redactable.js
410
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Redactable.js
408
411
  const symbolRedactable = Symbol.for("~effect/Redactable");
409
412
  const isRedactable = (u) => hasProperty(u, symbolRedactable);
410
413
  function redact(u) {
@@ -426,7 +429,7 @@ const emptyContext$1 = {
426
429
  }
427
430
  };
428
431
  //#endregion
429
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Formatter.js
432
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Formatter.js
430
433
  function format$1(input, options) {
431
434
  const space = options?.space ?? 0;
432
435
  const ancestors = new WeakSet();
@@ -528,11 +531,32 @@ function formatJson(input, options) {
528
531
  if (ancestors.includes(redacted)) return;
529
532
  ancestors.push(redacted);
530
533
  if (current !== redacted) ancestors.push(current);
531
- return current;
534
+ if (!hasGetter(current) || isJsonPrimitiveWrapper(current)) return current;
535
+ const serialized = new Proxy(current, { get(target, key) {
536
+ const value = Reflect.get(target, key, target);
537
+ return Object.getOwnPropertyDescriptor(target, key)?.get !== void 0 ? redact(value) : value;
538
+ } });
539
+ ancestors.push(serialized);
540
+ return serialized;
532
541
  }, options?.space) ?? "null";
533
542
  }
543
+ function hasGetter(object) {
544
+ for (const key of Object.getOwnPropertyNames(object)) if (Object.getOwnPropertyDescriptor(object, key)?.get !== void 0) return true;
545
+ return false;
546
+ }
547
+ function isJsonPrimitiveWrapper(object) {
548
+ for (const valueOf of [
549
+ Number.prototype.valueOf,
550
+ Boolean.prototype.valueOf,
551
+ String.prototype.valueOf
552
+ ]) try {
553
+ Reflect.apply(valueOf, object, []);
554
+ return true;
555
+ } catch {}
556
+ return false;
557
+ }
534
558
  //#endregion
535
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Inspectable.js
559
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Inspectable.js
536
560
  const NodeInspectSymbol = Symbol.for("nodejs.util.inspect.custom");
537
561
  const toJson = (input) => {
538
562
  try {
@@ -572,7 +596,7 @@ var Class$1 = class {
572
596
  }
573
597
  };
574
598
  //#endregion
575
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/stackTraceLimit.js
599
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/stackTraceLimit.js
576
600
  const isStackTraceLimitWritable = () => {
577
601
  const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
578
602
  if (desc === void 0) return Object.isExtensible(Error);
@@ -584,7 +608,7 @@ const setStackTraceLimit = (value) => {
584
608
  if (canWriteStackTraceLimit) Error.stackTraceLimit = value;
585
609
  };
586
610
  //#endregion
587
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Utils.js
611
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Utils.js
588
612
  var SingleShotGen = class {
589
613
  constructor(self) {
590
614
  this.value = self;
@@ -612,11 +636,16 @@ const pickInternalCall = () => {
612
636
  return body();
613
637
  } finally {}
614
638
  } };
615
- return getStackTraceLimit() !== 0 && standard[InternalTypeId](() => new Error().stack)?.includes(InternalTypeId) === true ? standard[InternalTypeId] : forced[InternalTypeId];
639
+ const limit = getStackTraceLimit();
640
+ if (limit === 0) return forced[InternalTypeId];
641
+ setStackTraceLimit(2);
642
+ const error = standard[InternalTypeId](() => new Error());
643
+ setStackTraceLimit(limit);
644
+ return error.stack?.includes(InternalTypeId) === true ? standard[InternalTypeId] : forced[InternalTypeId];
616
645
  };
617
646
  const internalCall = pickInternalCall();
618
647
  //#endregion
619
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/record.js
648
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/record.js
620
649
  function assignProperty(self, key, value) {
621
650
  if (key === "__proto__") Object.defineProperty(self, key, {
622
651
  value,
@@ -630,7 +659,7 @@ function assignProperties(self, source) {
630
659
  for (const key of Reflect.ownKeys(source)) if (Object.prototype.propertyIsEnumerable.call(source, key)) assignProperty(self, key, source[key]);
631
660
  }
632
661
  //#endregion
633
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/core.js
662
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/core.js
634
663
  const EffectTypeId = `~effect/Effect`;
635
664
  const ExitTypeId = `~effect/Exit`;
636
665
  const effectVariance = {
@@ -776,10 +805,29 @@ var Fail = class extends ReasonBase {
776
805
  return isFailReason$1(that) && equals$1(this.error, that.error) && equals$1(this.annotations, that.annotations);
777
806
  }
778
807
  [symbol$1]() {
779
- return combine(string(this._tag))(combine(hash(this.error))(hash(this.annotations)));
808
+ return combine$1(string(this._tag))(combine$1(hash(this.error))(hash(this.annotations)));
780
809
  }
781
810
  };
782
811
  const causeFromReasons = (reasons) => new CauseImpl(reasons);
812
+ const dedupeReasons = (self, that) => {
813
+ const buckets = new Map();
814
+ const out = [];
815
+ for (const reason of self.concat(that)) {
816
+ const hash$6 = hash(reason);
817
+ const bucket = buckets.get(hash$6);
818
+ if (bucket === void 0) buckets.set(hash$6, [reason]);
819
+ else if (bucket.some((previous) => equals$1(previous, reason))) continue;
820
+ else bucket.push(reason);
821
+ out.push(reason);
822
+ }
823
+ return out;
824
+ };
825
+ const causeCombine = dual(2, (self, that) => {
826
+ if (self.reasons.length === 0) return that;
827
+ else if (that.reasons.length === 0) return self;
828
+ const newCause = new CauseImpl(dedupeReasons(self.reasons, that.reasons));
829
+ return equals$1(self, newCause) ? self : newCause;
830
+ });
783
831
  const causeEmpty = new CauseImpl([]);
784
832
  const causeFail = (error) => new CauseImpl([new Fail(error)]);
785
833
  var Die = class extends ReasonBase {
@@ -797,10 +845,10 @@ var Die = class extends ReasonBase {
797
845
  };
798
846
  }
799
847
  [symbol](that) {
800
- return isDieReason(that) && equals$1(this.defect, that.defect) && equals$1(this.annotations, that.annotations);
848
+ return isDieReason$1(that) && equals$1(this.defect, that.defect) && equals$1(this.annotations, that.annotations);
801
849
  }
802
850
  [symbol$1]() {
803
- return combine(string(this._tag))(combine(hash(this.defect))(hash(this.annotations)));
851
+ return combine$1(string(this._tag))(combine$1(hash(this.defect))(hash(this.annotations)));
804
852
  }
805
853
  };
806
854
  const causeDie = (defect) => new CauseImpl([new Die(defect)]);
@@ -809,7 +857,7 @@ const causeAnnotate = dual((args) => isCause$1(args[0]), (self, annotations, opt
809
857
  return new CauseImpl(self.reasons.map((f) => f.annotate(annotations, options)));
810
858
  });
811
859
  const isFailReason$1 = (self) => self._tag === "Fail";
812
- const isDieReason = (self) => self._tag === "Die";
860
+ const isDieReason$1 = (self) => self._tag === "Die";
813
861
  const isInterruptReason = (self) => self._tag === "Interrupt";
814
862
  function defaultEvaluate(_fiber) {
815
863
  return exitDie(`Effect.evaluate: Not implemented`);
@@ -854,7 +902,7 @@ const makeExit = (options) => {
854
902
  return isExit$1(that) && that._tag === this._tag && equals$1(this[args], that[args]);
855
903
  },
856
904
  [symbol$1]() {
857
- return combine(string(options.op), hash(this[args]));
905
+ return combine$1(string(options.op), hash(this[args]));
858
906
  }
859
907
  };
860
908
  const ExitPrimitive = function(value) {
@@ -886,7 +934,17 @@ const exitFailCause = makeExit({
886
934
  annotated = true;
887
935
  }
888
936
  let cont = fiber.getCont(contE);
889
- while (fiber.interruptible && fiber._interruptedCause && cont) cont = fiber.getCont(contE);
937
+ const interruptedCause = fiber._interruptedCause;
938
+ if (interruptedCause && fiber.interruptible) {
939
+ let skippedHandler = false;
940
+ while (cont && fiber.interruptible) {
941
+ skippedHandler ||= identifier in cont;
942
+ cont = fiber.getCont(contE);
943
+ }
944
+ if (skippedHandler) cause = causeFromReasons(cause.reasons.filter((reason) => reason._tag !== "Fail"));
945
+ cause = causeCombine(cause, interruptedCause);
946
+ annotated = true;
947
+ }
890
948
  return cont ? cont[contE](cause, fiber, annotated ? void 0 : this) : fiber.yieldWith(annotated ? exitFailCause(cause) : this);
891
949
  }
892
950
  });
@@ -967,35 +1025,35 @@ const done$2 = (value) => {
967
1025
  return exitFail(Done$1(value));
968
1026
  };
969
1027
  //#endregion
970
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Effectable.js
1028
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Effectable.js
971
1029
  const Prototype = (options) => makePrimitiveProto({
972
1030
  op: options.label,
973
1031
  [evaluate]: options.evaluate
974
1032
  });
975
1033
  //#endregion
976
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Equivalence.js
977
- const make$5 = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
1034
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Equivalence.js
1035
+ const make$6 = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
978
1036
  const isStrictEquivalent = (x, y) => x === y;
979
1037
  const strictEqual = () => isStrictEquivalent;
980
1038
  function Tuple(elements) {
981
- return make$5((self, that) => {
1039
+ return make$6((self, that) => {
982
1040
  if (self.length !== that.length) return false;
983
1041
  for (let i = 0; i < self.length; i++) if (!elements[i](self[i], that[i])) return false;
984
1042
  return true;
985
1043
  });
986
1044
  }
987
1045
  function Array_(item) {
988
- return make$5((self, that) => {
1046
+ return make$6((self, that) => {
989
1047
  if (self.length !== that.length) return false;
990
1048
  for (let i = 0; i < self.length; i++) if (!item(self[i], that[i])) return false;
991
1049
  return true;
992
1050
  });
993
1051
  }
994
1052
  //#endregion
995
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/option.js
996
- const TypeId$7 = "~effect/Option";
1053
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/option.js
1054
+ const TypeId$8 = "~effect/Option";
997
1055
  const CommonProto$1 = {
998
- [TypeId$7]: { _A: (_) => _ },
1056
+ [TypeId$8]: { _A: (_) => _ },
999
1057
  ...PipeInspectableProto,
1000
1058
  [Symbol.iterator]() {
1001
1059
  return new SingleShotGen(this);
@@ -1008,7 +1066,7 @@ const SomeProto = Object.defineProperty(Object.assign(Object.create(CommonProto$
1008
1066
  return isOption$1(that) && isSome$1(that) && equals$1(this.value, that.value);
1009
1067
  },
1010
1068
  [symbol$1]() {
1011
- return combine(hash(this._tag))(hash(this.value));
1069
+ return combine$1(hash(this._tag))(hash(this.value));
1012
1070
  },
1013
1071
  toString() {
1014
1072
  return `some(${format$1(this.value)})`;
@@ -1044,7 +1102,7 @@ const NoneProto = Object.assign(Object.create(CommonProto$1), {
1044
1102
  };
1045
1103
  }
1046
1104
  });
1047
- const isOption$1 = (input) => hasProperty(input, TypeId$7);
1105
+ const isOption$1 = (input) => hasProperty(input, TypeId$8);
1048
1106
  const isNone$1 = (fa) => fa._tag === "None";
1049
1107
  const isSome$1 = (fa) => fa._tag === "Some";
1050
1108
  const none$1 = Object.create(NoneProto);
@@ -1054,10 +1112,10 @@ const SomeImpl = function(value) {
1054
1112
  SomeImpl.prototype = SomeProto;
1055
1113
  const some$1 = (value) => new SomeImpl(value);
1056
1114
  //#endregion
1057
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/result.js
1058
- const TypeId$6 = "~effect/Result";
1115
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/result.js
1116
+ const TypeId$7 = "~effect/Result";
1059
1117
  const CommonProto = {
1060
- [TypeId$6]: {
1118
+ [TypeId$7]: {
1061
1119
  _A: (_) => _,
1062
1120
  _E: (_) => _
1063
1121
  },
@@ -1073,7 +1131,7 @@ const SuccessProto = Object.assign(Object.create(CommonProto), {
1073
1131
  return isResult(that) && isSuccess$2(that) && equals$1(this.success, that.success);
1074
1132
  },
1075
1133
  [symbol$1]() {
1076
- return combine(hash(this._tag))(hash(this.success));
1134
+ return combine$1(hash(this._tag))(hash(this.success));
1077
1135
  },
1078
1136
  toString() {
1079
1137
  return `success(${format$1(this.success)})`;
@@ -1093,7 +1151,7 @@ const FailureProto = Object.assign(Object.create(CommonProto), {
1093
1151
  return isResult(that) && isFailure$2(that) && equals$1(this.failure, that.failure);
1094
1152
  },
1095
1153
  [symbol$1]() {
1096
- return combine(hash(this._tag))(hash(this.failure));
1154
+ return combine$1(hash(this._tag))(hash(this.failure));
1097
1155
  },
1098
1156
  toString() {
1099
1157
  return `failure(${format$1(this.failure)})`;
@@ -1106,7 +1164,7 @@ const FailureProto = Object.assign(Object.create(CommonProto), {
1106
1164
  };
1107
1165
  }
1108
1166
  });
1109
- const isResult = (input) => hasProperty(input, TypeId$6);
1167
+ const isResult = (input) => hasProperty(input, TypeId$7);
1110
1168
  const isFailure$2 = (result) => result._tag === "Failure";
1111
1169
  const isSuccess$2 = (result) => result._tag === "Success";
1112
1170
  const FailureImpl = function(failure) {
@@ -1120,27 +1178,28 @@ const SuccessImpl = function(success) {
1120
1178
  SuccessImpl.prototype = SuccessProto;
1121
1179
  const succeed$5 = (success) => new SuccessImpl(success);
1122
1180
  //#endregion
1123
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Order.js
1124
- function make$4(compare) {
1181
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Order.js
1182
+ function make$5(compare) {
1125
1183
  return (self, that) => self === that ? 0 : compare(self, that);
1126
1184
  }
1127
- const String$1 = make$4((self, that) => self < that ? -1 : 1);
1128
- const Number$1 = make$4((self, that) => {
1185
+ const String$1 = make$5((self, that) => self < that ? -1 : 1);
1186
+ const Number$1 = make$5((self, that) => {
1129
1187
  if (globalThis.Number.isNaN(self) && globalThis.Number.isNaN(that)) return 0;
1130
1188
  if (globalThis.Number.isNaN(self)) return -1;
1131
1189
  if (globalThis.Number.isNaN(that)) return 1;
1132
1190
  return self < that ? -1 : 1;
1133
1191
  });
1134
- const BigInt$1 = make$4((self, that) => self < that ? -1 : 1);
1135
- const mapInput = dual(2, (self, f) => make$4((b1, b2) => self(f(b1), f(b2))));
1192
+ const BigInt$1 = make$5((self, that) => self < that ? -1 : 1);
1193
+ const mapInput = dual(2, (self, f) => make$5((b1, b2) => self(f(b1), f(b2))));
1136
1194
  const Date$1 = mapInput(Number$1, (date) => date.getTime());
1137
1195
  const isLessThan = (O) => dual(2, (self, that) => O(self, that) === -1);
1138
1196
  const isGreaterThan = (O) => dual(2, (self, that) => O(self, that) === 1);
1139
1197
  const isLessThanOrEqualTo = (O) => dual(2, (self, that) => O(self, that) !== 1);
1140
1198
  const isGreaterThanOrEqualTo = (O) => dual(2, (self, that) => O(self, that) !== -1);
1141
1199
  const min$2 = (O) => dual(2, (self, that) => self === that || O(self, that) < 1 ? self : that);
1200
+ const max$1 = (O) => dual(2, (self, that) => self === that || O(self, that) > -1 ? self : that);
1142
1201
  //#endregion
1143
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Option.js
1202
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Option.js
1144
1203
  const none = () => none$1;
1145
1204
  const some = some$1;
1146
1205
  const isOption = isOption$1;
@@ -1168,9 +1227,9 @@ const getOrThrowWith$1 = dual(2, (self, onNone) => {
1168
1227
  });
1169
1228
  const getOrThrow$1 = getOrThrowWith$1(() => new Error("getOrThrow called on a None"));
1170
1229
  const map$5 = dual(2, (self, f) => isNone(self) ? none() : some(f(self.value)));
1171
- const flatMap$4 = dual(2, (self, f) => isNone(self) ? none() : f(self.value));
1230
+ const flatMap$5 = dual(2, (self, f) => isNone(self) ? none() : f(self.value));
1172
1231
  const flatMapNullishOr$1 = dual(2, (self, f) => isNone(self) ? none() : fromNullishOr$1(f(self.value)));
1173
- const flatten$3 = flatMap$4(identity);
1232
+ const flatten$3 = flatMap$5(identity);
1174
1233
  const all$2 = (input) => {
1175
1234
  if (Symbol.iterator in input) {
1176
1235
  const out = [];
@@ -1192,7 +1251,7 @@ const toArray = (self) => isNone(self) ? [] : [self.value];
1192
1251
  const filter = dual(2, (self, predicate) => isNone(self) ? none() : predicate(self.value) ? some(self.value) : none());
1193
1252
  const exists = dual(2, (self, refinement) => isNone(self) ? false : refinement(self.value));
1194
1253
  //#endregion
1195
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Context.js
1254
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Context.js
1196
1255
  const ServiceTypeId = "~effect/Context/Service";
1197
1256
  const Service = function() {
1198
1257
  function KeyClass() {}
@@ -1215,7 +1274,7 @@ const ServiceProto = {
1215
1274
  ...Prototype({
1216
1275
  label: "Service",
1217
1276
  evaluate(fiber) {
1218
- return exitSucceed(get(fiber.context, this));
1277
+ return exitSucceed(get$1(fiber.context, this));
1219
1278
  }
1220
1279
  }),
1221
1280
  toJSON() {
@@ -1228,18 +1287,18 @@ const ServiceProto = {
1228
1287
  return self;
1229
1288
  },
1230
1289
  context(self) {
1231
- return make$3(this, self);
1290
+ return make$4(this, self);
1232
1291
  },
1233
1292
  use(f) {
1234
- return withFiber$1((fiber) => f(get(fiber.context, this)));
1293
+ return withFiber$1((fiber) => f(get$1(fiber.context, this)));
1235
1294
  },
1236
1295
  useSync(f) {
1237
- return withFiber$1((fiber) => exitSucceed(f(get(fiber.context, this))));
1296
+ return withFiber$1((fiber) => exitSucceed(f(get$1(fiber.context, this))));
1238
1297
  }
1239
1298
  };
1240
1299
  const cacheKeys = new Set();
1241
1300
  const ReferenceTypeId = "~effect/Context/Reference";
1242
- const TypeId$5 = "~effect/Context";
1301
+ const TypeId$6 = "~effect/Context";
1243
1302
  const MaxDepth = 8;
1244
1303
  const FlattenAfterBaseHits = 8;
1245
1304
  const makeImpl = (cacheRoot, base, overlay, depth) => {
@@ -1288,7 +1347,7 @@ const Proto = {
1288
1347
  return flatten$2(this);
1289
1348
  },
1290
1349
  ...PipeInspectableProto,
1291
- [TypeId$5]: { _Services: (_) => _ },
1350
+ [TypeId$6]: { _Services: (_) => _ },
1292
1351
  toJSON() {
1293
1352
  return {
1294
1353
  _id: "Context",
@@ -1311,17 +1370,18 @@ const Proto = {
1311
1370
  }
1312
1371
  };
1313
1372
  const hasSameCache = (self, that) => self.cacheRoot === that.cacheRoot;
1314
- const isContext = (u) => hasProperty(u, TypeId$5);
1373
+ const isContext = (u) => hasProperty(u, TypeId$6);
1315
1374
  const isReference = (u) => !!u[ReferenceTypeId];
1316
- const empty$3 = () => emptyContext;
1375
+ const empty$4 = () => emptyContext;
1317
1376
  const emptyContext = makeUnsafe$2(new Map());
1318
- const make$3 = (key, service) => makeUnsafe$2(new Map([[key.key, service]]));
1377
+ const make$4 = (key, service) => makeUnsafe$2(new Map([[key.key, service]]));
1319
1378
  const add = dual(3, (self, key, service) => addUnsafe(self, key.key, service));
1320
1379
  const addUnsafe = (self, key, service) => {
1321
1380
  const impl = self;
1322
1381
  const cacheRoot = cacheKeys.has(key) ? void 0 : impl.cacheRoot;
1323
1382
  if (impl.depth >= MaxDepth) {
1324
- const map = new Map(impl.mapUnsafe);
1383
+ const map = new Map(impl._flat ?? impl.base);
1384
+ if (!impl._flat) applyOverlays(map, impl.overlay);
1325
1385
  map.set(key, service);
1326
1386
  return makeImpl(cacheRoot, map, void 0, 0);
1327
1387
  }
@@ -1344,7 +1404,7 @@ const getUnsafe$1 = dual(2, (self, service) => {
1344
1404
  }
1345
1405
  return value;
1346
1406
  });
1347
- const get = getUnsafe$1;
1407
+ const get$1 = getUnsafe$1;
1348
1408
  const defaultValueCacheKey = "~effect/Context/defaultValue";
1349
1409
  const getDefaultValue = (ref) => {
1350
1410
  if (defaultValueCacheKey in ref) return ref[defaultValueCacheKey];
@@ -1378,8 +1438,8 @@ const mergeAll$1 = (...ctxs) => {
1378
1438
  };
1379
1439
  const Reference = Service;
1380
1440
  //#endregion
1381
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Duration.js
1382
- const TypeId$4 = "~effect/Duration";
1441
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Duration.js
1442
+ const TypeId$5 = "~effect/Duration";
1383
1443
  const bigint0$1 = BigInt(0);
1384
1444
  const bigint1 = BigInt(1);
1385
1445
  const bigint2 = BigInt(2);
@@ -1388,8 +1448,9 @@ const bigint24 = BigInt(24);
1388
1448
  const bigint60 = BigInt(60);
1389
1449
  const bigint1e3 = BigInt(1e3);
1390
1450
  const bigint1e6 = BigInt(1e6);
1391
- const roundTiesAwayFromZero = (input) => BigInt(input < 0 ? Math.ceil(input - .5) : Math.floor(input + .5));
1451
+ const roundTiesAwayFromZero = (input) => BigInt(Math.sign(input) * Math.round(Math.abs(input)));
1392
1452
  const roundMillisToNanos = (millis) => roundTiesAwayFromZero(millis * 1e6);
1453
+ const fromNanosNumber = (nanos) => make$3(Number.isFinite(nanos) ? roundTiesAwayFromZero(nanos) : nanos);
1393
1454
  const parseNanos = (input, scale) => {
1394
1455
  const decimalIndex = input.indexOf(".");
1395
1456
  if (decimalIndex === -1) return BigInt(input) * scale;
@@ -1397,8 +1458,12 @@ const parseNanos = (input, scale) => {
1397
1458
  const fractional = input.slice(decimalIndex + 1);
1398
1459
  const fractionalScale = bigint10 ** BigInt(fractional.length);
1399
1460
  const scaled = (BigInt(input.slice(isNegative ? 1 : 0, decimalIndex)) * fractionalScale + BigInt(fractional)) * scale;
1400
- const rounded = scaled / fractionalScale + (scaled % fractionalScale * bigint2 >= fractionalScale ? bigint1 : bigint0$1);
1401
- return isNegative ? -rounded : rounded;
1461
+ return divideTiesAwayFromZero(isNegative ? -scaled : scaled, fractionalScale);
1462
+ };
1463
+ const divideTiesAwayFromZero = (numerator, denominator) => {
1464
+ const absolute = numerator < bigint0$1 ? -numerator : numerator;
1465
+ const rounded = absolute / denominator + (absolute % denominator * bigint2 >= denominator ? bigint1 : bigint0$1);
1466
+ return numerator < bigint0$1 ? -rounded : rounded;
1402
1467
  };
1403
1468
  const DURATION_REGEXP = /^(-?\d+(?:\.\d+)?)\s+(nanos?|micros?|millis?|seconds?|minutes?|hours?|days?|weeks?)$/;
1404
1469
  const fromInputUnsafe = (input) => {
@@ -1432,13 +1497,13 @@ const fromInputUnsafe = (input) => {
1432
1497
  }
1433
1498
  case "object": {
1434
1499
  if (input === null) break;
1435
- if (TypeId$4 in input) return input;
1500
+ if (TypeId$5 in input) return input;
1436
1501
  if (Array.isArray(input)) {
1437
1502
  if (input.length !== 2 || !input.every(isNumber)) return invalid(input);
1438
1503
  if (Number.isNaN(input[0]) || Number.isNaN(input[1])) return zero;
1439
1504
  if (input[0] === -Infinity || input[1] === -Infinity) return negativeInfinity;
1440
1505
  if (input[0] === Infinity || input[1] === Infinity) return infinity;
1441
- return make$2(roundTiesAwayFromZero(input[0] * 1e9 + input[1]));
1506
+ return fromNanosNumber(input[0] * 1e9 + input[1]);
1442
1507
  }
1443
1508
  const obj = input;
1444
1509
  let millis = 0;
@@ -1448,8 +1513,8 @@ const fromInputUnsafe = (input) => {
1448
1513
  if (obj.minutes) millis += obj.minutes * 6e4;
1449
1514
  if (obj.seconds) millis += obj.seconds * 1e3;
1450
1515
  if (obj.milliseconds) millis += obj.milliseconds;
1451
- if (!obj.microseconds && !obj.nanoseconds) return make$2(millis);
1452
- return make$2(roundTiesAwayFromZero(millis * 1e6 + (obj.microseconds ?? 0) * 1e3 + (obj.nanoseconds ?? 0)));
1516
+ if (!obj.microseconds && !obj.nanoseconds) return make$3(millis);
1517
+ return fromNanosNumber(millis * 1e6 + (obj.microseconds ?? 0) * 1e3 + (obj.nanoseconds ?? 0));
1453
1518
  }
1454
1519
  }
1455
1520
  return invalid(input);
@@ -1464,7 +1529,7 @@ const zeroDurationValue = {
1464
1529
  const infinityDurationValue = { _tag: "Infinity" };
1465
1530
  const negativeInfinityDurationValue = { _tag: "NegativeInfinity" };
1466
1531
  const DurationProto = {
1467
- [TypeId$4]: TypeId$4,
1532
+ [TypeId$5]: TypeId$5,
1468
1533
  [symbol$1]() {
1469
1534
  switch (this.value._tag) {
1470
1535
  case "Millis": {
@@ -1515,7 +1580,7 @@ const DurationProto = {
1515
1580
  return pipeArguments(this, arguments);
1516
1581
  }
1517
1582
  };
1518
- const make$2 = (input) => {
1583
+ const make$3 = (input) => {
1519
1584
  const duration = Object.create(DurationProto);
1520
1585
  if (typeof input === "number") {
1521
1586
  if (isNaN(input) || input === 0 || Object.is(input, -0)) duration.value = zeroDurationValue;
@@ -1535,7 +1600,7 @@ const make$2 = (input) => {
1535
1600
  };
1536
1601
  return duration;
1537
1602
  };
1538
- const isDuration = (u) => hasProperty(u, TypeId$4);
1603
+ const isDuration = (u) => hasProperty(u, TypeId$5);
1539
1604
  const isFinite = (self) => self.value._tag !== "Infinity" && self.value._tag !== "NegativeInfinity";
1540
1605
  const isZero = (self) => {
1541
1606
  switch (self.value._tag) {
@@ -1557,20 +1622,20 @@ const abs = (self) => {
1557
1622
  switch (self.value._tag) {
1558
1623
  case "Infinity":
1559
1624
  case "NegativeInfinity": return infinity;
1560
- case "Millis": return self.value.millis < 0 ? make$2(-self.value.millis) : self;
1561
- case "Nanos": return self.value.nanos < bigint0$1 ? make$2(-self.value.nanos) : self;
1562
- }
1563
- };
1564
- const zero = make$2(0);
1565
- const infinity = make$2(Infinity);
1566
- const negativeInfinity = make$2(-Infinity);
1567
- const nanos = (nanos) => make$2(nanos);
1568
- const millis = (millis) => make$2(millis);
1569
- const seconds = (seconds) => make$2(seconds * 1e3);
1570
- const minutes = (minutes) => make$2(minutes * 6e4);
1571
- const hours = (hours) => make$2(hours * 36e5);
1572
- const days = (days) => make$2(days * 864e5);
1573
- const weeks = (weeks) => make$2(weeks * 6048e5);
1625
+ case "Millis": return self.value.millis < 0 ? make$3(-self.value.millis) : self;
1626
+ case "Nanos": return self.value.nanos < bigint0$1 ? make$3(-self.value.nanos) : self;
1627
+ }
1628
+ };
1629
+ const zero = make$3(0);
1630
+ const infinity = make$3(Infinity);
1631
+ const negativeInfinity = make$3(-Infinity);
1632
+ const nanos = (nanos) => make$3(nanos);
1633
+ const millis = (millis) => make$3(millis);
1634
+ const seconds = (seconds) => make$3(seconds * 1e3);
1635
+ const minutes = (minutes) => make$3(minutes * 6e4);
1636
+ const hours = (hours) => make$3(hours * 36e5);
1637
+ const days = (days) => make$3(days * 864e5);
1638
+ const weeks = (weeks) => make$3(weeks * 6048e5);
1574
1639
  const toMillis = (self) => match$4(fromInputUnsafe(self), {
1575
1640
  onMillis: identity,
1576
1641
  onNanos: (nanos) => Number(nanos) / 1e6,
@@ -1605,7 +1670,7 @@ const matchPair = dual(3, (self, that, options) => {
1605
1670
  if (self.value._tag === "Millis") return that.value._tag === "Millis" ? options.onMillis(self.value.millis, that.value.millis) : options.onNanos(toNanosUnsafe(self), that.value.nanos);
1606
1671
  else return options.onNanos(self.value.nanos, toNanosUnsafe(that));
1607
1672
  });
1608
- const Order = make$4((self, that) => matchPair(self, that, {
1673
+ const Order = make$5((self, that) => matchPair(self, that, {
1609
1674
  onMillis: (self, that) => self < that ? -1 : self > that ? 1 : 0,
1610
1675
  onNanos: (self, that) => self < that ? -1 : self > that ? 1 : 0,
1611
1676
  onInfinity: (self, that) => {
@@ -1622,6 +1687,7 @@ const Equivalence = (self, that) => matchPair(self, that, {
1622
1687
  onInfinity: (self, that) => self.value._tag === that.value._tag
1623
1688
  });
1624
1689
  const min$1 = min$2(Order);
1690
+ const max = max$1(Order);
1625
1691
  const equals = dual(2, (self, that) => Equivalence(self, that));
1626
1692
  const parts = (self) => {
1627
1693
  if (self.value._tag === "Infinity") return {
@@ -1674,10 +1740,10 @@ const format = (self) => {
1674
1740
  return pieces.join(" ");
1675
1741
  };
1676
1742
  //#endregion
1677
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/array.js
1743
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/array.js
1678
1744
  const isArrayNonEmpty$1 = (self) => self.length > 0;
1679
1745
  //#endregion
1680
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Result.js
1746
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Result.js
1681
1747
  const succeed$4 = succeed$5;
1682
1748
  const fail$4 = fail$5;
1683
1749
  const failVoid = fail$4(void 0);
@@ -1704,8 +1770,9 @@ const getOrThrowWith = dual(2, (self, onFailure) => {
1704
1770
  throw onFailure(self.failure);
1705
1771
  });
1706
1772
  const getOrThrow = getOrThrowWith(identity);
1773
+ const flatMap$4 = dual(2, (self, f) => isFailure$1(self) ? fail$4(self.failure) : f(self.success));
1707
1774
  //#endregion
1708
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Iterable.js
1775
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Iterable.js
1709
1776
  const headUnsafe = (self) => {
1710
1777
  const result = self[Symbol.iterator]().next();
1711
1778
  if (result.done) throw new Error("headUnsafe: empty iterable");
@@ -1731,14 +1798,14 @@ const constEmptyIterator = { next() {
1731
1798
  value: void 0
1732
1799
  };
1733
1800
  } };
1734
- const empty$2 = () => constEmpty;
1801
+ const empty$3 = () => constEmpty;
1735
1802
  //#endregion
1736
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Array.js
1803
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Array.js
1737
1804
  const Array$1 = globalThis.Array;
1738
- const fromIterable = (collection) => Array$1.isArray(collection) ? collection : Array$1.from(collection);
1805
+ const fromIterable$1 = (collection) => Array$1.isArray(collection) ? collection : Array$1.from(collection);
1739
1806
  const match$2 = dual(2, (self, { onEmpty, onNonEmpty }) => isReadonlyArrayNonEmpty(self) ? onNonEmpty(self) : onEmpty());
1740
1807
  const append = dual(2, (self, last) => [...self, last]);
1741
- const appendAll = dual(2, (self, that) => fromIterable(self).concat(fromIterable(that)));
1808
+ const appendAll = dual(2, (self, that) => fromIterable$1(self).concat(fromIterable$1(that)));
1742
1809
  const isArray = Array$1.isArray;
1743
1810
  const isArrayEmpty = (self) => self.length === 0;
1744
1811
  const isReadonlyArrayEmpty = isArrayEmpty;
@@ -1769,7 +1836,7 @@ const findFirstIndex = dual(2, (self, predicate) => {
1769
1836
  });
1770
1837
  const findFirst = findFirst$1;
1771
1838
  const findLast = dual(2, (self, f) => {
1772
- const input = fromIterable(self);
1839
+ const input = fromIterable$1(self);
1773
1840
  for (let i = input.length - 1; i >= 0; i--) {
1774
1841
  const a = input[i];
1775
1842
  const o = f(a, i);
@@ -1784,7 +1851,7 @@ const sort = dual(2, (self, O) => {
1784
1851
  out.sort(O);
1785
1852
  return out;
1786
1853
  });
1787
- const empty$1 = () => [];
1854
+ const empty$2 = () => [];
1788
1855
  const of = (a) => [a];
1789
1856
  const map$3 = dual(2, (self, f) => self.map(f));
1790
1857
  const flatMap$3 = dual(2, (self, f) => {
@@ -1796,13 +1863,26 @@ const flatMap$3 = dual(2, (self, f) => {
1796
1863
  }
1797
1864
  return out;
1798
1865
  });
1799
- const reduce = dual(3, (self, b, f) => fromIterable(self).reduce((b, a, i) => f(b, a, i), b));
1800
- const fromNullishOr = (a) => a == null ? empty$1() : [a];
1866
+ const reduce = dual(3, (self, b, f) => fromIterable$1(self).reduce((b, a, i) => f(b, a, i), b));
1867
+ const fromNullishOr = (a) => a == null ? empty$2() : [a];
1801
1868
  const flatMapNullishOr = dual(2, (self, f) => flatMap$3(self, (a) => fromNullishOr(f(a))));
1802
1869
  const makeEquivalence = Array_;
1803
- const join = dual(2, (self, sep) => fromIterable(self).join(sep));
1870
+ const join = dual(2, (self, sep) => fromIterable$1(self).join(sep));
1871
+ //#endregion
1872
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Filter.js
1873
+ const toPredicate = (self) => (input) => !isFailure$1(self(input));
1874
+ const has$1 = (key) => (input) => input.has(key) ? succeed$4(input) : fail$4(input);
1875
+ const compose = dual(2, (left, right) => (input) => {
1876
+ const leftOut = left(input);
1877
+ if (isFailure$1(leftOut)) return leftOut;
1878
+ return right(leftOut.success);
1879
+ });
1880
+ const toOption = (self) => (input) => {
1881
+ const result = self(input);
1882
+ return isFailure$1(result) ? none() : some(result.success);
1883
+ };
1804
1884
  //#endregion
1805
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Scheduler.js
1885
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Scheduler.js
1806
1886
  const Scheduler = Reference("effect/Scheduler", {
1807
1887
  fiberCached: true,
1808
1888
  defaultValue: () => new MixedScheduler()
@@ -1906,7 +1986,8 @@ const PreventSchedulerYield = Reference("effect/Scheduler/PreventSchedulerYield"
1906
1986
  defaultValue: () => false
1907
1987
  });
1908
1988
  //#endregion
1909
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/encoding/Hex.js
1989
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/encoding/Hex.js
1990
+ const encode = (input) => typeof input === "string" ? hexEncodeUint8Array(encoder.encode(input)) : hexEncodeUint8Array(input);
1910
1991
  const random = (length) => {
1911
1992
  switch (length) {
1912
1993
  case 16: return random16();
@@ -1936,16 +2017,23 @@ const random32 = () => {
1936
2017
  const d = randomWord();
1937
2018
  return String.fromCharCode(hexCharCodes[a >>> 28], hexCharCodes[a >>> 24 & 15], hexCharCodes[a >>> 20 & 15], hexCharCodes[a >>> 16 & 15], hexCharCodes[a >>> 12 & 15], hexCharCodes[a >>> 8 & 15], hexCharCodes[a >>> 4 & 15], hexCharCodes[a & 15], hexCharCodes[b >>> 28], hexCharCodes[b >>> 24 & 15], hexCharCodes[b >>> 20 & 15], hexCharCodes[b >>> 16 & 15], hexCharCodes[b >>> 12 & 15], hexCharCodes[b >>> 8 & 15], hexCharCodes[b >>> 4 & 15], hexCharCodes[b & 15], hexCharCodes[c >>> 28], hexCharCodes[c >>> 24 & 15], hexCharCodes[c >>> 20 & 15], hexCharCodes[c >>> 16 & 15], hexCharCodes[c >>> 12 & 15], hexCharCodes[c >>> 8 & 15], hexCharCodes[c >>> 4 & 15], hexCharCodes[c & 15], hexCharCodes[d >>> 28], hexCharCodes[d >>> 24 & 15], hexCharCodes[d >>> 20 & 15], hexCharCodes[d >>> 16 & 15], hexCharCodes[d >>> 12 & 15], hexCharCodes[d >>> 8 & 15], hexCharCodes[d >>> 4 & 15], hexCharCodes[d & 15]);
1938
2019
  };
2020
+ const encoder = new TextEncoder();
2021
+ const byteToHex = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
2022
+ const hexEncodeUint8Array = (bytes) => {
2023
+ let result = "";
2024
+ for (let i = 0; i < bytes.length; i++) result += byteToHex[bytes[i]];
2025
+ return result;
2026
+ };
1939
2027
  //#endregion
1940
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Tracer.js
2028
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Tracer.js
1941
2029
  const ParentSpanKey = "effect/Tracer/ParentSpan";
1942
2030
  var ParentSpan = class extends Service()(ParentSpanKey, { fiberCached: true }) {};
1943
- const make$1 = (options) => options;
2031
+ const make$2 = (options) => options;
1944
2032
  const DisablePropagation = Reference("effect/Tracer/DisablePropagation", { defaultValue: constFalse });
1945
2033
  const CurrentTraceLevel = Reference("effect/Tracer/CurrentTraceLevel", { defaultValue: () => "Info" });
1946
2034
  const MinimumTraceLevel = Reference("effect/Tracer/MinimumTraceLevel", { defaultValue: () => "All" });
1947
2035
  const TracerKey = "effect/Tracer";
1948
- const nativeTracer = make$1({ span: (options) => new NativeSpan(options) });
2036
+ const nativeTracer = make$2({ span: (options) => new NativeSpan(options) });
1949
2037
  var NativeSpan = class {
1950
2038
  _tag = "Span";
1951
2039
  sampled;
@@ -2008,10 +2096,10 @@ var NativeSpan = class {
2008
2096
  }
2009
2097
  };
2010
2098
  //#endregion
2011
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/metric.js
2099
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/metric.js
2012
2100
  const FiberRuntimeMetricsKey = "effect/Metric/FiberRuntimeMetrics";
2013
2101
  //#endregion
2014
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/references.js
2102
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/references.js
2015
2103
  const CurrentStackFrame = Reference("effect/References/CurrentStackFrame", {
2016
2104
  fiberCached: true,
2017
2105
  defaultValue: constUndefined
@@ -2034,7 +2122,7 @@ const MinimumLogLevel$1 = Reference("effect/References/MinimumLogLevel", {
2034
2122
  });
2035
2123
  const CurrentLogSpans$1 = Reference("effect/References/CurrentLogSpans", { defaultValue: () => [] });
2036
2124
  //#endregion
2037
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/tracer.js
2125
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/tracer.js
2038
2126
  const addSpanStackTrace = (options) => {
2039
2127
  if (options?.captureStackTrace === false) return options;
2040
2128
  else if (options?.captureStackTrace !== void 0 && typeof options.captureStackTrace !== "boolean") return options;
@@ -2066,7 +2154,7 @@ const makeStackCleaner = (line) => (stack) => {
2066
2154
  };
2067
2155
  const spanCleaner = makeStackCleaner(3);
2068
2156
  //#endregion
2069
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/effect.js
2157
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/effect.js
2070
2158
  var Interrupt = class extends ReasonBase {
2071
2159
  constructor(fiberId, annotations = constEmptyAnnotations) {
2072
2160
  super("Interrupt", annotations, "Interrupted");
@@ -2085,7 +2173,7 @@ var Interrupt = class extends ReasonBase {
2085
2173
  return isInterruptReason(that) && this.fiberId === that.fiberId && this.annotations === that.annotations;
2086
2174
  }
2087
2175
  [symbol$1]() {
2088
- return combine(string(`${this._tag}:${this.fiberId}`))(random$1(this.annotations));
2176
+ return combine$1(string(`${this._tag}:${this.fiberId}`))(random$1(this.annotations));
2089
2177
  }
2090
2178
  };
2091
2179
  const makeInterruptReason$1 = (fiberId) => new Interrupt(fiberId);
@@ -2101,8 +2189,9 @@ const findError$1 = (self) => {
2101
2189
  }
2102
2190
  return fail$4(self);
2103
2191
  };
2192
+ const findErrorOption$1 = toOption(findError$1);
2104
2193
  const findDefect = (self) => {
2105
- const reason = self.reasons.find(isDieReason);
2194
+ const reason = self.reasons.find(isDieReason$1);
2106
2195
  return reason ? succeed$4(reason.defect) : fail$4(self);
2107
2196
  };
2108
2197
  const hasInterrupts$1 = (self) => self.reasons.some(isInterruptReason);
@@ -2122,25 +2211,7 @@ const causeInterruptors = (self) => {
2122
2211
  };
2123
2212
  const emptySet = new Set();
2124
2213
  const hasInterruptsOnly$1 = (self) => self.reasons.length > 0 && self.reasons.every(isInterruptReason);
2125
- const dedupeReasons = (self, that) => {
2126
- const buckets = new Map();
2127
- const out = [];
2128
- for (const reason of self.concat(that)) {
2129
- const hash$1 = hash(reason);
2130
- const bucket = buckets.get(hash$1);
2131
- if (bucket === void 0) buckets.set(hash$1, [reason]);
2132
- else if (bucket.some((previous) => equals$1(previous, reason))) continue;
2133
- else bucket.push(reason);
2134
- out.push(reason);
2135
- }
2136
- return out;
2137
- };
2138
- const causeCombine = dual(2, (self, that) => {
2139
- if (self.reasons.length === 0) return that;
2140
- else if (that.reasons.length === 0) return self;
2141
- const newCause = new CauseImpl(dedupeReasons(self.reasons, that.reasons));
2142
- return equals$1(self, newCause) ? self : newCause;
2143
- });
2214
+ const reasonAnnotations$1 = (self) => makeUnsafe$2(self.annotations);
2144
2215
  const causeMap = dual(2, (self, f) => {
2145
2216
  let hasFail = false;
2146
2217
  const failures = self.reasons.map((failure) => {
@@ -2203,7 +2274,11 @@ const causePrettyError = (original, annotations, options) => {
2203
2274
  }
2204
2275
  if (options?.includeCauseInStack) error.stack = renderPrettyError(error);
2205
2276
  for (const key of Object.keys(original)) if (!(key in error)) error[key] = original[key];
2206
- } else error = new globalThis.Error(!original ? `Unknown error: ${original}` : kind === "string" ? original : formatJson(original));
2277
+ } else {
2278
+ error = new globalThis.Error(!original ? `Unknown error: ${original}` : kind === "string" ? original : formatJson(original));
2279
+ const stack = `${error.name}: ${error.message}`;
2280
+ error.stack = annotations ? addStackAnnotations(stack, annotations) : stack;
2281
+ }
2207
2282
  return error;
2208
2283
  };
2209
2284
  const causePrettyMessage = (u) => {
@@ -2274,6 +2349,14 @@ const fiberVariance = {
2274
2349
  _E: identity
2275
2350
  };
2276
2351
  const fiberIdStore = { id: 0 };
2352
+ const AsyncResource = (() => {
2353
+ try {
2354
+ return globalThis.process?.getBuiltinModule?.("node:async_hooks")?.AsyncResource;
2355
+ } catch {
2356
+ return;
2357
+ }
2358
+ })();
2359
+ const captureAsyncContext = () => AsyncResource === void 0 ? void 0 : new AsyncResource("effect/Fiber");
2277
2360
  const getCurrentFiber = () => globalThis[currentFiberTypeId];
2278
2361
  var FiberImpl = class {
2279
2362
  constructor(context, interruptible = true) {
@@ -2290,6 +2373,7 @@ var FiberImpl = class {
2290
2373
  this._running = false;
2291
2374
  this._deferredInterrupt = false;
2292
2375
  this._parent = void 0;
2376
+ this._asyncContext = void 0;
2293
2377
  this.cache.runtimeMetrics?.recordFiberStart(this.context);
2294
2378
  }
2295
2379
  get [FiberTypeId]() {
@@ -2299,7 +2383,7 @@ var FiberImpl = class {
2299
2383
  return this._dispatcher ??= this.cache.scheduler.makeDispatcher();
2300
2384
  }
2301
2385
  getRef(ref) {
2302
- return get(this.context, ref);
2386
+ return get$1(this.context, ref);
2303
2387
  }
2304
2388
  addObserver(cb) {
2305
2389
  if (this._exit) {
@@ -2318,7 +2402,7 @@ var FiberImpl = class {
2318
2402
  interruptUnsafe(fiberId, annotations) {
2319
2403
  if (this._exit) return;
2320
2404
  let cause = causeInterrupt(fiberId);
2321
- if (this.cache.stackFrame) cause = causeAnnotate(cause, make$3(StackTraceKey, this.cache.stackFrame));
2405
+ if (this.cache.stackFrame) cause = causeAnnotate(cause, make$4(StackTraceKey, this.cache.stackFrame));
2322
2406
  if (annotations) cause = causeAnnotate(cause, annotations);
2323
2407
  this._interruptedCause = this._interruptedCause ? causeCombine(this._interruptedCause, cause) : cause;
2324
2408
  if (this.interruptible) {
@@ -2331,13 +2415,20 @@ var FiberImpl = class {
2331
2415
  }
2332
2416
  evaluate(effect) {
2333
2417
  if (this._exit) return;
2334
- else if (this._yielded !== void 0) {
2418
+ else if (this._asyncContext !== void 0) {
2419
+ const asyncContext = this._asyncContext;
2420
+ this._asyncContext = void 0;
2421
+ return asyncContext.runInAsyncScope(this.evaluate, this, effect);
2422
+ } else if (this._yielded !== void 0) {
2335
2423
  const yielded = this._yielded;
2336
2424
  this._yielded = void 0;
2337
2425
  yielded();
2338
2426
  }
2339
2427
  const exit = this.runLoop(effect);
2340
- if (exit === Yield) return;
2428
+ if (exit === Yield) {
2429
+ this._asyncContext = captureAsyncContext();
2430
+ return;
2431
+ }
2341
2432
  const interruptChildren = fiberMiddleware.interruptChildren && fiberMiddleware.interruptChildren(this);
2342
2433
  if (interruptChildren !== void 0) return this.evaluate(flatMap$2(interruptChildren, () => exit));
2343
2434
  this._exit = exit;
@@ -2353,7 +2444,7 @@ var FiberImpl = class {
2353
2444
  }
2354
2445
  this._stack.length = 0;
2355
2446
  this._children = void 0;
2356
- this.context = empty$3();
2447
+ this.context = empty$4();
2357
2448
  }
2358
2449
  runLoop(effect) {
2359
2450
  const prevFiber = globalThis[currentFiberTypeId];
@@ -2364,7 +2455,7 @@ var FiberImpl = class {
2364
2455
  let current = effect;
2365
2456
  this.currentOpCount = 0;
2366
2457
  try {
2367
- while (true) {
2458
+ while (true) try {
2368
2459
  if (this._deferredInterrupt) {
2369
2460
  this._deferredInterrupt = false;
2370
2461
  current = failCause$3(this._interruptedCause);
@@ -2390,10 +2481,10 @@ var FiberImpl = class {
2390
2481
  }
2391
2482
  return Yield;
2392
2483
  }
2484
+ } catch (error) {
2485
+ if (!hasProperty(current, evaluate)) return exitDie(`Fiber.runLoop: Not a valid effect: ${String(current)}`);
2486
+ current = exitDie(error);
2393
2487
  }
2394
- } catch (error) {
2395
- if (!hasProperty(current, evaluate)) return exitDie(`Fiber.runLoop: Not a valid effect: ${String(current)}`);
2396
- return this.runLoop(exitDie(error));
2397
2488
  } finally {
2398
2489
  this._running = prevRunning;
2399
2490
  globalThis[currentFiberTypeId] = prevFiber;
@@ -2450,17 +2541,17 @@ var FiberImpl = class {
2450
2541
  const makeFiberContextCache = (context) => {
2451
2542
  const currentTracer = getOrUndefinedUnsafe(context, TracerKey);
2452
2543
  return {
2453
- scheduler: get(context, Scheduler),
2544
+ scheduler: get$1(context, Scheduler),
2454
2545
  tracer: currentTracer,
2455
2546
  tracerContext: currentTracer ? currentTracer["context"] : void 0,
2456
- tracerEnabled: get(context, TracerEnabled),
2547
+ tracerEnabled: get$1(context, TracerEnabled),
2457
2548
  span: getOrUndefinedUnsafe(context, ParentSpanKey),
2458
- logLevel: get(context, CurrentLogLevel),
2459
- minimumLogLevel: get(context, MinimumLogLevel$1),
2460
- stackFrame: get(context, CurrentStackFrame),
2549
+ logLevel: get$1(context, CurrentLogLevel),
2550
+ minimumLogLevel: get$1(context, MinimumLogLevel$1),
2551
+ stackFrame: get$1(context, CurrentStackFrame),
2461
2552
  runtimeMetrics: getOrUndefinedUnsafe(context, FiberRuntimeMetricsKey),
2462
- maxOpsBeforeYield: get(context, MaxOpsBeforeYield),
2463
- preventYield: get(context, PreventSchedulerYield)
2553
+ maxOpsBeforeYield: get$1(context, MaxOpsBeforeYield),
2554
+ preventYield: get$1(context, PreventSchedulerYield)
2464
2555
  };
2465
2556
  };
2466
2557
  const deferredInterruptCont = {
@@ -2531,7 +2622,7 @@ const fiberInterruptAs = dual((args) => hasProperty(args[0], FiberTypeId), (self
2531
2622
  }));
2532
2623
  const fiberInterruptAll = (fibers) => withFiber$1((parent) => {
2533
2624
  const annotations = fiberStackAnnotations(parent);
2534
- let fiberArr = empty$1();
2625
+ let fiberArr = empty$2();
2535
2626
  for (const fiber of fibers) {
2536
2627
  fiber.interruptUnsafe(parent.id, annotations);
2537
2628
  fiberArr.push(fiber);
@@ -2540,7 +2631,7 @@ const fiberInterruptAll = (fibers) => withFiber$1((parent) => {
2540
2631
  });
2541
2632
  const fiberInterruptAllAs = dual(2, (fibers, fiberId) => withFiber$1((parent) => {
2542
2633
  const annotations = fiberStackAnnotations(parent);
2543
- const fiberArr = empty$1();
2634
+ const fiberArr = empty$2();
2544
2635
  for (const fiber of fibers) {
2545
2636
  fiber.interruptUnsafe(fiberId, annotations);
2546
2637
  fiberArr.push(fiber);
@@ -2607,17 +2698,17 @@ const tryPromise$1 = (options) => {
2607
2698
  const f = typeof options === "function" ? options : options.try;
2608
2699
  const catcher = typeof options === "function" ? (cause) => new UnknownError$1(cause, "An error occurred in Effect.tryPromise") : options.catch;
2609
2700
  return callbackOptions(function(resume, signal) {
2610
- const failWithCatch = (cause) => {
2701
+ const failWithCatch = (cause) => suspend$1(() => {
2611
2702
  try {
2612
- resume(fail$3(internalCall(() => catcher(cause))));
2703
+ return fail$3(internalCall(() => catcher(cause)));
2613
2704
  } catch (err) {
2614
- resume(die$3(err));
2705
+ return die$3(err);
2615
2706
  }
2616
- };
2707
+ });
2617
2708
  try {
2618
- f(signal).then((a) => resume(succeed$3(a)), failWithCatch);
2709
+ f(signal).then((a) => resume(succeed$3(a)), (e) => resume(failWithCatch(e)));
2619
2710
  } catch (err) {
2620
- failWithCatch(err);
2711
+ resume(failWithCatch(err));
2621
2712
  }
2622
2713
  }, f.length !== 0);
2623
2714
  };
@@ -2821,10 +2912,16 @@ const succeedPayload = function(_value, fiber) {
2821
2912
  return fiber.succeedWith(this.payload);
2822
2913
  };
2823
2914
  const continuationMarksStack = (() => {
2915
+ const limit = getStackTraceLimit();
2916
+ if (limit === 0) return false;
2824
2917
  const marker = "~effect/Effect/stackProbe";
2825
- return { [marker]: function stackProbe() {
2826
- return new Error().stack;
2827
- } }[marker]()?.includes("[as " + marker + "]") === true;
2918
+ const probe = { [marker]: function stackProbe() {
2919
+ return new Error();
2920
+ } };
2921
+ setStackTraceLimit(1);
2922
+ const error = probe[marker]();
2923
+ setStackTraceLimit(limit);
2924
+ return error.stack?.includes("[as " + marker + "]") === true;
2828
2925
  })();
2829
2926
  const mapCont = function(value, fiber) {
2830
2927
  const f = this.payload;
@@ -2963,6 +3060,10 @@ const OnFailureImpl = function(self, f) {
2963
3060
  this[contE] = f;
2964
3061
  };
2965
3062
  OnFailureImpl.prototype = OnFailureProto;
3063
+ const catchCauseIf$1 = dual(3, (self, predicate, f) => catchCause$1(self, (cause) => {
3064
+ if (!predicate(cause)) return failCause$3(cause);
3065
+ return f(cause);
3066
+ }));
2966
3067
  const catchCauseFilter = dual(3, (self, filter, f) => catchCause$1(self, (cause) => {
2967
3068
  const eb = filter(cause);
2968
3069
  return isFailure$1(eb) ? failCause$3(eb.failure) : f(eb.success, cause);
@@ -3125,10 +3226,8 @@ const ScopeTypeId = "~effect/Scope";
3125
3226
  const ScopeCloseableTypeId = "~effect/Scope/Closeable";
3126
3227
  const scopeTag = Service("effect/Scope");
3127
3228
  const scopeClose = (self, exit_) => withFiber$1((fiber) => {
3128
- const close = scopeCloseUnsafe(self, exit_);
3129
- if (close === void 0) return void_$2;
3130
3229
  fiberEnterUninterruptibleUnsafe(fiber);
3131
- return close;
3230
+ return scopeCloseUnsafe(self, exit_) ?? void_$2;
3132
3231
  });
3133
3232
  const scopeCloseUnsafe = (self, exit_) => {
3134
3233
  const state = self.state;
@@ -3296,58 +3395,47 @@ const onErrorFilter = dual(3, (self, filter, f) => onExit$1(self, (exit) => {
3296
3395
  }));
3297
3396
  const onInterrupt$1 = dual(2, (self, finalizer) => onErrorFilter(causeFilterInterruptors, finalizer)(self));
3298
3397
  const acquireUseRelease$1 = (acquire, use, release) => uninterruptibleMask$1((restore) => flatMap$2(acquire, (a) => onExitPrimitive$1(suspend$1(() => restore(use(a))), (exit) => release(a, exit), true)));
3299
- const cachedInvalidateWithTTL = dual(2, (self, ttl) => sync$1(() => {
3300
- const ttlMillis = typeof ttl === "function" ? (exit) => toMillis(fromInputUnsafe(ttl(exit))) : constant(toMillis(fromInputUnsafe(ttl)));
3301
- const latch = makeLatchUnsafe(false);
3398
+ const cachedInvalidateWithTTL = dual(2, (self, ttl) => sync$1(() => makeCachedUnsafe(self, typeof ttl === "function" ? (exit) => toMillis(fromInputUnsafe(ttl(exit))) : constant(toMillis(fromInputUnsafe(ttl))))));
3399
+ const infiniteTTL = constant(Infinity);
3400
+ const makeCachedUnsafe = (self, ttlMillis) => {
3302
3401
  let expiresAt = 0;
3303
- let running = false;
3304
3402
  let exit;
3305
- const wait = flatMap$2(latch.await, () => exit);
3403
+ let current;
3404
+ const join = (fiber, run) => {
3405
+ run.awaiters++;
3406
+ onExitUnsafe(fiber, () => {
3407
+ if (--run.awaiters > 0 || current !== run) return;
3408
+ current = void 0;
3409
+ return fiberInterrupt(run.fiber);
3410
+ });
3411
+ return fiberJoin(run.fiber);
3412
+ };
3306
3413
  return [withFiber$1((fiber) => {
3307
- const clock = fiber.getRef(ClockRef);
3308
- const now = expiresAt === Infinity ? 0 : clock.currentTimeMillisUnsafe();
3309
- if (running || now < expiresAt) return exit ?? wait;
3310
- running = true;
3311
- latch.closeUnsafe();
3414
+ if (current !== void 0) return fiber === current.fiber ? fiberJoin(current.fiber) : join(fiber, current);
3415
+ if (exit !== void 0 && (expiresAt === Infinity || fiber.getRef(ClockRef).currentTimeMillisUnsafe() < expiresAt)) return exit;
3312
3416
  exit = void 0;
3313
- onExitUnsafe(fiber, (exit_) => sync$1(() => {
3314
- try {
3315
- const duration = ttlMillis(exit_);
3316
- expiresAt = clock.currentTimeMillisUnsafe() + duration;
3317
- exit = exit_;
3318
- } catch (error) {
3319
- const cause = causeDie(error);
3320
- exit = exitFailCause(exitIsFailure(exit_) ? causeCombine(exit_.cause, cause) : cause);
3321
- throw error;
3322
- } finally {
3323
- running = false;
3324
- latch.openUnsafe();
3325
- }
3417
+ const clock = fiber.getRef(ClockRef);
3418
+ const run = {
3419
+ fiber: new FiberImpl(fiber.context),
3420
+ awaiters: 0
3421
+ };
3422
+ current = run;
3423
+ const joined = join(fiber, run);
3424
+ run.fiber.evaluate(onExitPrimitive$1(self, (exit_) => {
3425
+ if (current !== run) return;
3426
+ current = void 0;
3427
+ if (exitHasInterrupts(exit_)) return;
3428
+ const duration = ttlMillis(exit_);
3429
+ expiresAt = duration === Infinity ? Infinity : clock.currentTimeMillisUnsafe() + duration;
3430
+ exit = exit_;
3326
3431
  }));
3327
- return self;
3432
+ return run.fiber._exit ?? joined;
3328
3433
  }), sync$1(() => {
3329
- expiresAt = 0;
3330
- latch.closeUnsafe();
3331
3434
  exit = void 0;
3332
3435
  })];
3333
- }));
3436
+ };
3334
3437
  const cachedWithTTL$1 = dual(2, (self, timeToLive) => map$2(cachedInvalidateWithTTL(self, timeToLive), (tuple) => tuple[0]));
3335
- const cached$1 = (self) => sync$1(() => {
3336
- const latch = makeLatchUnsafe(false);
3337
- let started = false;
3338
- let exit;
3339
- const wait = flatMap$2(latch.await, () => exit);
3340
- return withFiber$1((fiber) => {
3341
- if (exit !== void 0) return exit;
3342
- if (started) return wait;
3343
- started = true;
3344
- onExitUnsafe(fiber, (result) => sync$1(() => {
3345
- exit = result;
3346
- latch.openUnsafe();
3347
- }));
3348
- return self;
3349
- });
3350
- });
3438
+ const cached$1 = (self) => sync$1(() => makeCachedUnsafe(self, infiniteTTL)[0]);
3351
3439
  const interrupt$2 = withFiber$1((fiber) => failCause$3(causeInterrupt(fiber.id)));
3352
3440
  const uninterruptible$1 = (self) => withFiber$1((fiber) => {
3353
3441
  if (!fiber.interruptible) return self;
@@ -3386,11 +3474,11 @@ const uninterruptibleMask$1 = (f) => withFiber$1((fiber) => {
3386
3474
  return f(interruptible$1);
3387
3475
  });
3388
3476
  const all$1 = (arg, options) => {
3389
- if (isIterable(arg)) return options?.mode === "result" ? forEach$1(arg, result$1, options) : forEach$1(arg, identity, options);
3390
- else if (options?.discard) return options.mode === "result" ? forEach$1(Object.values(arg), result$1, options) : forEach$1(Object.values(arg), identity, options);
3477
+ if (isIterable(arg)) return options?.mode === "result" ? forEach$2(arg, result$1, options) : forEach$2(arg, identity, options);
3478
+ else if (options?.discard) return options.mode === "result" ? forEach$2(Object.values(arg), result$1, options) : forEach$2(Object.values(arg), identity, options);
3391
3479
  return suspend$1(() => {
3392
3480
  const out = {};
3393
- return as$1(forEach$1(Object.entries(arg), ([key, effect]) => map$2(options?.mode === "result" ? result$1(effect) : effect, (value) => {
3481
+ return as$1(forEach$2(Object.entries(arg), ([key, effect]) => map$2(options?.mode === "result" ? result$1(effect) : effect, (value) => {
3394
3482
  assignProperty(out, key, value);
3395
3483
  }), {
3396
3484
  discard: true,
@@ -3416,10 +3504,10 @@ const whileLoop$1 = makePrimitive({
3416
3504
  return exitVoid;
3417
3505
  }
3418
3506
  });
3419
- const forEach$1 = dual((args) => typeof args[1] === "function", (iterable, f, options) => suspend$1(() => {
3507
+ const forEach$2 = dual((args) => typeof args[1] === "function", (iterable, f, options) => suspend$1(() => {
3420
3508
  const concurrency = resolveConcurrency(options?.concurrency);
3421
3509
  if (concurrency === 1) return forEachSequential(iterable, f, options);
3422
- const items = fromIterable(iterable);
3510
+ const items = fromIterable$1(iterable);
3423
3511
  let length = items.length;
3424
3512
  if (length === 0) return options?.discard ? void_$2 : succeed$3([]);
3425
3513
  const out = options?.discard ? void 0 : new Array(length);
@@ -3580,12 +3668,15 @@ const forkUnsafe$1 = (parent, effect, immediate = false, daemon = false, uninter
3580
3668
  const parentRuntime = parent;
3581
3669
  const interruptible = uninterruptible === "inherit" ? parentRuntime.interruptible : !uninterruptible;
3582
3670
  const child = new FiberImpl(parentRuntime.context, interruptible);
3583
- if (immediate) child.evaluate(effect);
3584
- else parentRuntime.currentDispatcher.scheduleTask(() => child.evaluate(effect), 0);
3585
- if (!daemon && !child._exit) {
3671
+ if (!daemon) {
3586
3672
  parentRuntime.children().add(child);
3587
3673
  child._parent = parentRuntime;
3588
3674
  }
3675
+ if (immediate) child.evaluate(effect);
3676
+ else {
3677
+ child._asyncContext = captureAsyncContext();
3678
+ parentRuntime.currentDispatcher.scheduleTask(() => child.evaluate(effect), 0);
3679
+ }
3589
3680
  return child;
3590
3681
  };
3591
3682
  const forkIn$1 = dual((args) => isEffect$1(args[0]), (self, scope, options) => withFiber$1((parent) => {
@@ -3622,12 +3713,12 @@ const fiberRunIn = dual(2, (self, scope) => {
3622
3713
  self.interruptUnsafe(self.id);
3623
3714
  return self;
3624
3715
  }
3625
- const key = {};
3626
- scopeAddFinalizerUnsafe(scope, key, () => fiberInterrupt(self));
3627
- self.addObserver(() => scopeRemoveFinalizerUnsafe(scope, key));
3716
+ scopeRemoveFinalizerUnsafe(scope, self);
3717
+ scopeAddFinalizerUnsafe(scope, self, () => fiberInterrupt(self));
3718
+ self.addObserver(() => scopeRemoveFinalizerUnsafe(scope, self));
3628
3719
  return self;
3629
3720
  });
3630
- const runFork$1 = runForkWith$1(empty$3());
3721
+ const runFork$1 = runForkWith$1(empty$4());
3631
3722
  const runSyncExitWith = (context) => {
3632
3723
  const runFork = runForkWith$1(context);
3633
3724
  return (effect) => {
@@ -3638,7 +3729,7 @@ const runSyncExitWith = (context) => {
3638
3729
  return fiber._exit ?? exitDie(new AsyncFiberError(fiber));
3639
3730
  };
3640
3731
  };
3641
- const runSyncExit$1 = runSyncExitWith(empty$3());
3732
+ const runSyncExit$1 = runSyncExitWith(empty$4());
3642
3733
  const runSyncWith = (context) => {
3643
3734
  const runSyncExit = runSyncExitWith(context);
3644
3735
  return (effect) => {
@@ -3647,7 +3738,7 @@ const runSyncWith = (context) => {
3647
3738
  return exit.value;
3648
3739
  };
3649
3740
  };
3650
- const runSync$1 = runSyncWith(empty$3());
3741
+ const runSync$1 = runSyncWith(empty$4());
3651
3742
  const succeedTrue = succeed$3(true);
3652
3743
  const succeedFalse = succeed$3(false);
3653
3744
  var Latch = class {
@@ -3738,16 +3829,16 @@ const NoopSpanProto = {
3738
3829
  const noopSpan = (options) => Object.assign(Object.create(NoopSpanProto), options);
3739
3830
  const filterDisablePropagation = (span) => {
3740
3831
  if (!span) return none();
3741
- return get(span.annotations, DisablePropagation) ? span._tag === "Span" ? filterDisablePropagation(getOrUndefined$2(span.parent)) : none() : some(span);
3832
+ return get$1(span.annotations, DisablePropagation) ? span._tag === "Span" ? filterDisablePropagation(getOrUndefined$2(span.parent)) : none() : some(span);
3742
3833
  };
3743
3834
  const makeSpanUnsafe = (fiber, name, options) => {
3744
- const disablePropagation = !fiber.cache.tracerEnabled || options?.annotations && get(options.annotations, DisablePropagation);
3835
+ const disablePropagation = !fiber.cache.tracerEnabled || options?.annotations && get$1(options.annotations, DisablePropagation);
3745
3836
  const parent = options?.parent !== void 0 ? some(options.parent) : options?.root ? none() : filterDisablePropagation(fiber.cache.span);
3746
3837
  let span;
3747
3838
  if (disablePropagation) span = noopSpan({
3748
3839
  name,
3749
3840
  parent,
3750
- annotations: add(options?.annotations ?? empty$3(), DisablePropagation, true)
3841
+ annotations: add(options?.annotations ?? empty$4(), DisablePropagation, true)
3751
3842
  });
3752
3843
  else {
3753
3844
  const tracer = fiber.cache.tracer ?? nativeTracer;
@@ -3760,11 +3851,11 @@ const makeSpanUnsafe = (fiber, name, options) => {
3760
3851
  span = tracer.span({
3761
3852
  name,
3762
3853
  parent,
3763
- annotations: options?.annotations ?? empty$3(),
3854
+ annotations: options?.annotations ?? empty$4(),
3764
3855
  links,
3765
3856
  startTime: timingEnabled ? clock.currentTimeNanosUnsafe() : bigint0,
3766
3857
  kind: options?.kind ?? "internal",
3767
- root: options?.root ?? isNone(parent),
3858
+ root: options?.root ?? false,
3768
3859
  sampled: options?.sampled ?? (isSome(parent) && parent.value.sampled === false ? false : !isLogLevelGreaterThan(fiber.getRef(MinimumTraceLevel), level))
3769
3860
  });
3770
3861
  for (const key in annotationsFromEnv) span.attribute(key, annotationsFromEnv[key]);
@@ -3892,6 +3983,7 @@ const wallTimeNanos = function() {
3892
3983
  const clockWith$1 = (f) => withFiber$1((fiber) => f(fiber.getRef(ClockRef)));
3893
3984
  const sleep$1 = (duration) => clockWith$1((clock) => clock.sleep(fromInputUnsafe(duration)));
3894
3985
  const currentTimeMillis = clockWith$1((clock) => clock.currentTimeMillis);
3986
+ const monotonicTimeNanos = clockWith$1((clock) => clock.monotonicTimeNanos);
3895
3987
  const TimeoutErrorTypeId = "~effect/Cause/TimeoutError";
3896
3988
  const isTimeoutError$1 = (u) => hasProperty(u, TimeoutErrorTypeId);
3897
3989
  var TimeoutError$1 = class extends TaggedError("TimeoutError") {
@@ -4045,7 +4137,7 @@ function interruptChildrenPatch() {
4045
4137
  }
4046
4138
  const undefined_$1 = succeed$3(void 0);
4047
4139
  //#endregion
4048
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Exit.js
4140
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Exit.js
4049
4141
  const isExit = isExit$1;
4050
4142
  const succeed$2 = exitSucceed;
4051
4143
  const failCause$2 = exitFailCause;
@@ -4055,11 +4147,12 @@ const interrupt$1 = exitInterrupt;
4055
4147
  const void_$1 = exitVoid;
4056
4148
  const isSuccess = exitIsSuccess;
4057
4149
  const isFailure = exitIsFailure;
4150
+ const asVoidAll = exitAsVoidAll;
4058
4151
  //#endregion
4059
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Deferred.js
4060
- const TypeId$3 = "~effect/Deferred";
4152
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Deferred.js
4153
+ const TypeId$4 = "~effect/Deferred";
4061
4154
  const DeferredProto = {
4062
- [TypeId$3]: {
4155
+ [TypeId$4]: {
4063
4156
  _A: identity,
4064
4157
  _E: identity
4065
4158
  },
@@ -4102,15 +4195,15 @@ const doneUnsafe = (self, effect) => {
4102
4195
  };
4103
4196
  const into = dual(2, (self, deferred) => uninterruptibleMask$1((restore) => flatMap$2(exit$1(restore(self)), (exit) => done$1(deferred, exit))));
4104
4197
  //#endregion
4105
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/References.js
4198
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/References.js
4106
4199
  const CurrentLogAnnotations = CurrentLogAnnotations$1;
4107
4200
  const CurrentLogSpans = CurrentLogSpans$1;
4108
4201
  const MinimumLogLevel = MinimumLogLevel$1;
4109
4202
  const TracerTimingEnabled = TracerTimingEnabled$1;
4110
4203
  //#endregion
4111
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Scope.js
4204
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Scope.js
4112
4205
  const Scope = scopeTag;
4113
- const make = scopeMake;
4206
+ const make$1 = scopeMake;
4114
4207
  const makeUnsafe = scopeMakeUnsafe;
4115
4208
  const provide$3 = provideScope;
4116
4209
  const addFinalizerExit = scopeAddFinalizerExit;
@@ -4118,8 +4211,8 @@ const addFinalizer$1 = scopeAddFinalizer;
4118
4211
  const forkUnsafe = scopeForkUnsafe;
4119
4212
  const close = scopeClose;
4120
4213
  //#endregion
4121
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Layer.js
4122
- const TypeId$2 = "~effect/Layer";
4214
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Layer.js
4215
+ const TypeId$3 = "~effect/Layer";
4123
4216
  const MemoMapTypeId = "~effect/Layer/MemoMap";
4124
4217
  const makeMemoMapEntry = (memoMap, layer) => {
4125
4218
  const entry = {
@@ -4141,7 +4234,7 @@ const memoMapObserve = (entry, scope) => {
4141
4234
  return true;
4142
4235
  };
4143
4236
  const LayerProto = {
4144
- [TypeId$2]: {
4237
+ [TypeId$3]: {
4145
4238
  _ROut: identity,
4146
4239
  _E: identity,
4147
4240
  _RIn: identity
@@ -4205,26 +4298,26 @@ var CurrentMemoMap = class CurrentMemoMap extends Service()("effect/Layer/Curren
4205
4298
  return current ? forkMemoMapUnsafe(current) : makeMemoMapUnsafe();
4206
4299
  }
4207
4300
  };
4208
- const buildWithMemoMap = dual(3, (self, memoMap, scope) => provideService$1(map$2(self.build(memoMap, scope), add(CurrentMemoMap, memoMap)), CurrentMemoMap, memoMap));
4301
+ const buildWithMemoMap = dual(3, (self, memoMap, scope) => provideService$1(map$2(suspend$1(() => self.build(memoMap, scope)), add(CurrentMemoMap, memoMap)), CurrentMemoMap, memoMap));
4209
4302
  const buildWithScope = dual(2, (self, scope) => withFiber$1((fiber) => buildWithMemoMap(self, CurrentMemoMap.forkOrCreate(fiber.context), scope)));
4210
4303
  const succeed$1 = function() {
4211
- if (arguments.length === 1) return (resource) => succeedContext(make$3(arguments[0], resource));
4212
- return succeedContext(make$3(arguments[0], arguments[1]));
4304
+ if (arguments.length === 1) return (resource) => succeedContext(make$4(arguments[0], resource));
4305
+ return succeedContext(make$4(arguments[0], arguments[1]));
4213
4306
  };
4214
4307
  const succeedContext = (context) => fromBuildUnsafe(constant(succeed$3(context)));
4215
- const empty = succeedContext(empty$3());
4308
+ const empty$1 = succeedContext(empty$4());
4216
4309
  const effect = function() {
4217
4310
  if (arguments.length === 1) return (effect) => effectImpl(arguments[0], effect);
4218
4311
  return effectImpl(arguments[0], arguments[1]);
4219
4312
  };
4220
- const effectImpl = (service, effect) => effectContext(map$2(effect, (value) => make$3(service, value)));
4313
+ const effectImpl = (service, effect) => effectContext(map$2(effect, (value) => make$4(service, value)));
4221
4314
  const effectContext = (effect) => fromBuildMemo((_, scope) => provide$3(effect, scope));
4222
- const effectDiscard = (effect) => effectContext(as$1(effect, empty$3()));
4315
+ const effectDiscard = (effect) => effectContext(as$1(effect, empty$4()));
4223
4316
  const unwrapKey = Service("effect/Layer/unwrap");
4224
- const unwrap = (self) => flatMap$1(effect(unwrapKey)(self), get(unwrapKey));
4317
+ const unwrap = (self) => flatMap$1(effect(unwrapKey)(self), get$1(unwrapKey));
4225
4318
  const mergeAllEffect = (layers, memoMap, scope) => {
4226
4319
  const parentScope = forkUnsafe(scope, "parallel");
4227
- return forEach$1(layers, (layer) => layer.build(memoMap, forkUnsafe(parentScope, "sequential")), { concurrency: layers.length }).pipe(map$2((context) => mergeAll$1(...context)));
4320
+ return forEach$2(layers, (layer) => layer.build(memoMap, forkUnsafe(parentScope, "sequential")), { concurrency: layers.length }).pipe(map$2((context) => mergeAll$1(...context)));
4228
4321
  };
4229
4322
  const mergeAll = (...layers) => fromBuild((memoMap, scope) => mergeAllEffect(layers, memoMap, scope));
4230
4323
  const merge = dual(2, (self, that) => mergeAll(self, ...Array.isArray(that) ? that : [that]));
@@ -4273,10 +4366,11 @@ const makeUnimplemented = (error) => {
4273
4366
  const StreamTypeId = "~effect/Stream";
4274
4367
  const ChannelTypeId = "~effect/Channel";
4275
4368
  //#endregion
4276
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Cause.js
4369
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Cause.js
4277
4370
  const isCause = isCause$1;
4278
4371
  const isReason = isCauseReason;
4279
4372
  const isFailReason = isFailReason$1;
4373
+ const isDieReason = isDieReason$1;
4280
4374
  const fromReasons = causeFromReasons;
4281
4375
  const fail$1 = causeFail;
4282
4376
  const die$1 = causeDie;
@@ -4285,8 +4379,10 @@ const makeDieReason = (defect) => new Die(defect);
4285
4379
  const makeInterruptReason = makeInterruptReason$1;
4286
4380
  const hasInterruptsOnly = hasInterruptsOnly$1;
4287
4381
  const map$1 = causeMap;
4382
+ const combine = causeCombine;
4288
4383
  const squash = causeSquash;
4289
4384
  const findError = findError$1;
4385
+ const findErrorOption = findErrorOption$1;
4290
4386
  const hasInterrupts = hasInterrupts$1;
4291
4387
  const interruptors = causeInterruptors;
4292
4388
  const filterInterruptors = causeFilterInterruptors;
@@ -4300,9 +4396,10 @@ const TimeoutError = TimeoutError$1;
4300
4396
  const IllegalArgumentError = IllegalArgumentError$1;
4301
4397
  const UnknownError = UnknownError$1;
4302
4398
  const annotate = causeAnnotate;
4399
+ const reasonAnnotations = reasonAnnotations$1;
4303
4400
  var StackTrace = class extends Service()("effect/Cause/StackTrace") {};
4304
4401
  //#endregion
4305
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/random.js
4402
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/random.js
4306
4403
  const Random = Reference("effect/Random", { defaultValue: () => ({
4307
4404
  nextIntUnsafe() {
4308
4405
  return Math.floor(Math.random() * (Number.MAX_SAFE_INTEGER - Number.MIN_SAFE_INTEGER + 1)) + Number.MIN_SAFE_INTEGER;
@@ -4322,7 +4419,7 @@ const nextBetween = (min, max, draw) => {
4322
4419
  return view.getFloat64(0);
4323
4420
  };
4324
4421
  //#endregion
4325
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Pull.js
4422
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Pull.js
4326
4423
  const catchDone = dual(2, (effect, f) => catchCauseFilter(effect, filterDoneLeftover, (l) => f(l)));
4327
4424
  const isDoneCause = (cause) => cause.reasons.some(isDoneFailure);
4328
4425
  const isDoneFailure = (failure) => failure._tag === "Fail" && isDone(failure.error);
@@ -4350,8 +4447,8 @@ const matchEffect$1 = dual(2, (self, options) => matchCauseEffect$1(self, {
4350
4447
  }
4351
4448
  }));
4352
4449
  //#endregion
4353
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Schedule.js
4354
- const TypeId$1 = "~effect/Schedule";
4450
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Schedule.js
4451
+ const TypeId$2 = "~effect/Schedule";
4355
4452
  const randomNext = Random.useSync((random) => random.nextDoubleUnsafe());
4356
4453
  const CurrentMetadata = Reference("effect/Schedule/CurrentMetadata", { defaultValue: constant({
4357
4454
  input: void 0,
@@ -4364,7 +4461,7 @@ const CurrentMetadata = Reference("effect/Schedule/CurrentMetadata", { defaultVa
4364
4461
  elapsedSincePrevious: 0
4365
4462
  }) });
4366
4463
  const ScheduleProto = {
4367
- [TypeId$1]: {
4464
+ [TypeId$2]: {
4368
4465
  _Out: identity,
4369
4466
  _In: identity,
4370
4467
  _Env: identity
@@ -4373,7 +4470,7 @@ const ScheduleProto = {
4373
4470
  return pipeArguments(this, arguments);
4374
4471
  }
4375
4472
  };
4376
- const isSchedule = (u) => hasProperty(u, TypeId$1);
4473
+ const isSchedule = (u) => hasProperty(u, TypeId$2);
4377
4474
  const fromStep = (step) => {
4378
4475
  const self = Object.create(ScheduleProto);
4379
4476
  self.step = step;
@@ -4415,7 +4512,7 @@ const toStepWithMetadata = (schedule) => clockWith$1((clock) => map$2(toStep(sch
4415
4512
  });
4416
4513
  });
4417
4514
  }));
4418
- const min = (schedules) => fromStep(map$2(all$1(schedules.map(toStep)), (steps) => (now, input) => flatMap$2(forEach$1(steps, (step) => matchEffect$1(step(now, input), {
4515
+ const min = (schedules) => fromStep(map$2(all$1(schedules.map(toStep)), (steps) => (now, input) => flatMap$2(forEach$2(steps, (step) => matchEffect$1(step(now, input), {
4419
4516
  onSuccess: (result) => succeed$3(result[1]),
4420
4517
  onDone: () => undefined_$1,
4421
4518
  onFailure: failCause$3
@@ -4474,21 +4571,22 @@ const while_ = dual(2, (self, predicate) => fromStep(map$2(toStep(self), (step)
4474
4571
  })));
4475
4572
  const forever$1 = spaced(zero);
4476
4573
  //#endregion
4477
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/layer.js
4574
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/layer.js
4478
4575
  const provideLayer = (self, layer, options) => scopedWith$1((scope) => flatMap$2(options?.local ? buildWithMemoMap(layer, makeMemoMapUnsafe(), scope) : buildWithScope(layer, scope), (context) => provideContext$1(self, context)));
4479
4576
  const provide$1 = dual((args) => isEffect$1(args[0]), (self, source, options) => isContext(source) ? provideContext$1(self, source) : provideLayer(self, Array.isArray(source) ? mergeAll(...source) : source, options));
4480
4577
  //#endregion
4481
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/schedule.js
4578
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/schedule.js
4579
+ const findErrorOnly = (cause) => cause.reasons.every(isFailReason$1) ? findError$1(cause) : fail$4(cause);
4482
4580
  const repeatOrElse = dual(3, (self, schedule, orElse) => flatMap$2(toStepWithMetadata(schedule), (step) => {
4483
4581
  let meta = CurrentMetadata.defaultValue();
4484
- return catch_$1(forever$2(tap$1(flatMap$2(suspend$1(() => provideService$1(self, CurrentMetadata, meta)), step), (meta_) => sync$1(() => {
4582
+ return catchCauseFilter(catchDone(forever$2(tap$1(flatMap$2(suspend$1(() => provideService$1(self, CurrentMetadata, meta)), step), (meta_) => sync$1(() => {
4485
4583
  meta = meta_;
4486
- })), { disableYield: true }), (error) => isDone$2(error) ? succeed$3(error.value) : orElse(error, meta.attempt === 0 ? none() : some(meta)));
4584
+ })), { disableYield: true }), (out) => succeed$3(out)), findErrorOnly, (error) => orElse(error, meta.attempt === 0 ? none() : some(meta)));
4487
4585
  }));
4488
4586
  const retryOrElse = dual(3, (self, policy, orElse) => flatMap$2(toStepWithMetadata(policy), (step) => {
4489
4587
  let meta = CurrentMetadata.defaultValue();
4490
4588
  let lastError;
4491
- const loop = catch_$1(suspend$1(() => provideService$1(self, CurrentMetadata, meta)), (error) => {
4589
+ const loop = catchCauseFilter(suspend$1(() => provideService$1(self, CurrentMetadata, meta)), findErrorOnly, (error) => {
4492
4590
  lastError = error;
4493
4591
  return flatMap$2(step(error), (meta_) => {
4494
4592
  meta = meta_;
@@ -4520,7 +4618,107 @@ const buildFromOptions = (options) => {
4520
4618
  return schedule;
4521
4619
  };
4522
4620
  //#endregion
4523
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Request.js
4621
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/MutableHashMap.js
4622
+ const TypeId$1 = "~effect/MutableHashMap";
4623
+ const MutableHashMapProto = {
4624
+ [TypeId$1]: TypeId$1,
4625
+ [Symbol.iterator]() {
4626
+ return this.backing[Symbol.iterator]();
4627
+ },
4628
+ toString() {
4629
+ return `MutableHashMap(${format$1(Array.from(this))})`;
4630
+ },
4631
+ toJSON() {
4632
+ return {
4633
+ _id: "MutableHashMap",
4634
+ values: toJson(Array.from(this))
4635
+ };
4636
+ },
4637
+ [NodeInspectSymbol]() {
4638
+ return this.toJSON();
4639
+ },
4640
+ pipe() {
4641
+ return pipeArguments(this, arguments);
4642
+ }
4643
+ };
4644
+ const empty = () => {
4645
+ const self = Object.create(MutableHashMapProto);
4646
+ self.backing = new Map();
4647
+ self.buckets = new Map();
4648
+ return self;
4649
+ };
4650
+ const make = (...entries) => fromIterable(entries);
4651
+ const fromIterable = (entries) => {
4652
+ const self = empty();
4653
+ for (const [key, value] of entries) set(self, key, value);
4654
+ return self;
4655
+ };
4656
+ const get = dual(2, (self, key) => {
4657
+ if (self.backing.has(key)) return some(self.backing.get(key));
4658
+ else if (isSimpleKey(key)) return none();
4659
+ const hash$2 = hash(key);
4660
+ const bucket = self.buckets.get(hash$2);
4661
+ if (bucket === void 0) return none();
4662
+ return getFromBucket(self, bucket, key);
4663
+ });
4664
+ const isSimpleKey = (u) => typeof u !== "object" && typeof u !== "function";
4665
+ const getFromBucket = (self, bucket, key) => {
4666
+ for (let i = 0, len = bucket.length; i < len; i++) if (equals$1(key, bucket[i])) {
4667
+ const refKey = bucket[i];
4668
+ return some(self.backing.get(refKey));
4669
+ }
4670
+ return none();
4671
+ };
4672
+ const has = dual(2, (self, key) => isSome(get(self, key)));
4673
+ const set = dual(3, (self, key, value) => {
4674
+ if (self.backing.has(key) || isSimpleKey(key)) {
4675
+ self.backing.set(key, value);
4676
+ return self;
4677
+ }
4678
+ const hash$4 = hash(key);
4679
+ const bucket = self.buckets.get(hash$4);
4680
+ if (bucket === void 0) {
4681
+ self.buckets.set(hash$4, [key]);
4682
+ self.backing.set(key, value);
4683
+ return self;
4684
+ }
4685
+ let refKey = getRefKey(bucket, key);
4686
+ if (refKey === void 0) {
4687
+ bucket.push(key);
4688
+ refKey = key;
4689
+ }
4690
+ self.backing.set(refKey, value);
4691
+ return self;
4692
+ });
4693
+ const getRefKey = (bucket, key) => {
4694
+ for (let i = 0, len = bucket.length; i < len; i++) if (equals$1(key, bucket[i])) return bucket[i];
4695
+ };
4696
+ const remove = dual(2, (self, key_) => {
4697
+ if (isSimpleKey(key_)) {
4698
+ self.backing.delete(key_);
4699
+ return self;
4700
+ }
4701
+ const hash$1 = hash(key_);
4702
+ const bucket = self.buckets.get(hash$1);
4703
+ if (bucket === void 0) return self;
4704
+ for (let i = 0, len = bucket.length; i < len; i++) {
4705
+ const bkey = bucket[i];
4706
+ if (bkey === key_ || equals$1(key_, bkey)) {
4707
+ self.backing.delete(bkey);
4708
+ bucket.splice(i, 1);
4709
+ break;
4710
+ }
4711
+ }
4712
+ if (bucket.length === 0) self.buckets.delete(hash$1);
4713
+ return self;
4714
+ });
4715
+ const size = (self) => self.backing.size;
4716
+ const isEmpty = (self) => self.backing.size === 0;
4717
+ const forEach$1 = dual(2, (self, f) => {
4718
+ self.backing.forEach(f);
4719
+ });
4720
+ //#endregion
4721
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Request.js
4524
4722
  const TypeId = "~effect/Request";
4525
4723
  const requestVariance = byReferenceUnsafe({
4526
4724
  _E: (_) => _,
@@ -4545,7 +4743,7 @@ const TaggedClass = (tag) => {
4545
4743
  };
4546
4744
  const makeEntry = (options) => options;
4547
4745
  //#endregion
4548
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/internal/request.js
4746
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/internal/request.js
4549
4747
  const request$1 = dual(2, (self, resolver) => {
4550
4748
  const withResolver = (resolver) => callback$1((resume) => {
4551
4749
  const entry = addEntry(resolver, self, resume, getCurrentFiber());
@@ -4553,12 +4751,23 @@ const request$1 = dual(2, (self, resolver) => {
4553
4751
  });
4554
4752
  return isEffect$1(resolver) ? flatMap$2(resolver, withResolver) : withResolver(resolver);
4555
4753
  });
4754
+ const equalBatchKeys = new WeakSet();
4755
+ const makeBatchMap = (resolver) => {
4756
+ if (!equalBatchKeys.has(resolver.batchKey)) return new Map();
4757
+ const map = empty();
4758
+ return {
4759
+ get: (key) => getOrUndefined$2(get(map, key)),
4760
+ has: (key) => has(map, key),
4761
+ set: (key, batch) => set(map, key, batch),
4762
+ delete: (key) => remove(map, key)
4763
+ };
4764
+ };
4556
4765
  const batchPool = [];
4557
4766
  const pendingBatches = new WeakMap();
4558
4767
  const addEntry = (resolver, request, resume, fiber) => {
4559
4768
  let batchMap = pendingBatches.get(resolver);
4560
4769
  if (!batchMap) {
4561
- batchMap = new Map();
4770
+ batchMap = makeBatchMap(resolver);
4562
4771
  pendingBatches.set(resolver, batchMap);
4563
4772
  }
4564
4773
  let batch;
@@ -4641,10 +4850,10 @@ function runBatch(batch) {
4641
4850
  return batch.run;
4642
4851
  }
4643
4852
  //#endregion
4644
- //#region node_modules/.pnpm/effect@4.0.0/node_modules/effect/dist/Effect.js
4853
+ //#region node_modules/.pnpm/effect@4.0.4/node_modules/effect/dist/Effect.js
4645
4854
  const isEffect = isEffect$1;
4646
4855
  const all = all$1;
4647
- const forEach = forEach$1;
4856
+ const forEach = forEach$2;
4648
4857
  const whileLoop = whileLoop$1;
4649
4858
  const promise = promise$1;
4650
4859
  const tryPromise = tryPromise$1;
@@ -4687,6 +4896,7 @@ const catchDefect = catchDefect$1;
4687
4896
  const catchIf = catchIf$1;
4688
4897
  const catchFilter = catchFilter$1;
4689
4898
  const catchNoSuchElement = catchNoSuchElement$1;
4899
+ const catchCauseIf = catchCauseIf$1;
4690
4900
  const mapError = mapError$1;
4691
4901
  const orDie = orDie$2;
4692
4902
  const tapCause = tapCause$1;
@@ -4767,7 +4977,7 @@ const withLogSpan = dual(2, (effect, label) => flatMap$2(currentTimeMillis, (now
4767
4977
  const effectify = (fn, onError, onSyncError) => (...args) => callback((resume) => {
4768
4978
  try {
4769
4979
  fn(...args, (err, result) => {
4770
- if (err) resume(fail(onError ? onError(err, args) : err));
4980
+ if (err) resume(onError ? suspend(() => fail(onError(err, args))) : fail(err));
4771
4981
  else resume(succeed(result));
4772
4982
  });
4773
4983
  } catch (err) {
@@ -4781,6 +4991,6 @@ const flatMapEager = flatMapEager$1;
4781
4991
  const catchEager = catchEager$1;
4782
4992
  const fnUntracedEager = fnUntracedEager$1;
4783
4993
  //#endregion
4784
- export { isEffect as $, match$5 as $a, fail$4 as $i, buildWithScope as $n, hasProperty as $o, exitInterrupt as $r, uninterruptibleMask as $t, ensuring as A, getOrUndefinedUnsafe as Aa, Array$1 as Ai, StackTrace as An, getStackTraceLimit as Ao, isDone$1 as Ar, pipe as As, result as At, fnUntraced as B, flatten$3 as Ba, isArrayNonEmpty as Bi, hasInterrupts as Bn, formatPropertyKey as Bo, succeed$2 as Br, sleep as Bt, catch_ as C, Reference as Ca, suspend$1 as Ci, isDoneCause as Cn, causeFail as Co, MinimumLogLevel as Cr, constVoid as Cs, promise as Ct, delay as D, get as Da, void_$2 as Di, Done as Dn, withFiber$1 as Do, doneUnsafe as Dr, identity as Ds, raceFirst as Dt, contextWith as E, empty$3 as Ea, updateContext$1 as Ei, nextBetween as En, exitSucceed as Eo, done$1 as Er, flow as Es, provideService as Et, filterOrFail as F, all$2 as Fa, findFirstIndex as Fi, done as Fn, toJson as Fo, failCause$2 as Fr, runSyncExit as Ft, forkIn as G, getOrNull as Ga, makeEquivalence as Gi, isReason as Gn, symbol as Go, andThen$1 as Gr, tap as Gt, forEach as H, fromNullishOr$1 as Ha, isReadonlyArrayNonEmpty as Hi, interruptors as Hn, symbolRedactable as Ho, ClockRef as Hr, succeedNone as Ht, flatMap as I, exists as Ia, findLast as Ii, fail$1 as In, format$1 as Io, interrupt$1 as Ir, scope as It, fromResult as J, isNone as Ja, of as Ji, makeFailReason as Jn, hash as Jo, contextWith$1 as Jr, timeoutOrElse as Jt, forkScoped as K, getOrThrow$1 as Ka, map$3 as Ki, isTimeoutError as Kn, array as Ko, asSome$1 as Kr, tapCause as Kt, flatMapEager as L, filter as La, flatMapNullishOr as Li, filterInterruptors as Ln, formatDate as Lo, isExit as Lr, scoped as Lt, fail as M, make$3 as Ma, appendAll as Mi, UnknownError as Mn, BaseProto as Mo, makeUnsafe$1 as Mr, Prototype$1 as Ms, runFork as Mt, failCause as N, makeUnsafe$2 as Na, empty$1 as Ni, annotate as Nn, Class$1 as No, die$2 as Nr, pipeArguments as Ns, runForkWith as Nt, die as O, getOption as Oa, DisablePropagation as Oi, IllegalArgumentError as On, assignProperties as Oo, interruptWith as Or, memoize as Os, repeat as Ot, failCauseSync as P, merge$1 as Pa, findFirst as Pi, die$1 as Pn, NodeInspectSymbol as Po, fail$2 as Pr, runSync as Pt, interruptible as Q, map$5 as Qa, headUnsafe as Qi, squash as Qn, symbol$1 as Qo, exitHasInterrupts as Qr, uninterruptible as Qt, flatten as R, flatMap$4 as Ra, fromIterable as Ri, findError as Rn, formatJson as Ro, isFailure as Rr, scopedWith as Rt, catchTags as S, zero as Sa, succeedNone$1 as Si, filterDone as Sn, args as So, CurrentLogAnnotations as Sr, constUndefined as Ss, orElseSucceed as St, context as T, add as Ta, uninterruptibleMask$1 as Ti, Random as Tn, exitFailCause as To, _await as Tr, dual as Ts, provideContext as Tt, forever as U, fromUndefinedOr as Ua, join as Ui, isCause as Un, byReferenceUnsafe as Uo, ConsoleRef as Ur, suspend as Ut, fnUntracedEager as V, fromNullOr as Va, isCanonicalArrayIndex as Vi, hasInterruptsOnly as Vn, redact as Vo, void_$1 as Vr, succeed as Vt, forkChild as W, getOrElse$1 as Wa, last as Wi, isFailReason as Wn, equals$1 as Wo, LogToStderr as Wr, sync as Wt, ignore as X, isSome as Xa, sort as Xi, map$1 as Xn, string as Xo, effectIsExit as Xr, try_ as Xt, gen as Y, isOption as Ya, reduce as Yi, makeInterruptReason as Yn, number as Yo, currentTimeMillis as Yr, tryPromise as Yt, interrupt as Z, liftThrowable as Za, empty$2 as Zi, pretty as Zn, structure as Zo, endSpan as Zr, undefined_ as Zt, catchFilter as _, nanos as _a, map$2 as _i, min as _n, Prototype as _o, close as _r, isUndefined as _s, onExit as _t, andThen as a, map$4 as aa, fiberInterruptAllAs as ai, whileLoop as an, BigInt$1 as ao, merge as ar, isNever as as, makeSpanScoped as at, catchReason as b, toMillis as ba, resolveConcurrency as bi, catchDone as bn, PipeInspectableProto as bo, makeUnsafe as br, constFalse as bs, option as bt, as as c, try_$2 as ca, fiberRunIn as ci, withParentSpan as cn, String$1 as co, orDie$1 as cr, isNotUndefined as cs, mapEager as ct, cached as d, infinity as da, getCurrentFiber as di, zipWith as dn, isLessThan as do, succeed$1 as dr, isNumber as ds, match as dt, failVoid as ea, exitVoid as ei, updateContext as en, none as eo, effect as er, isBigInt as es, logDebug as et, cachedWithTTL as f, isDuration as fa, iterateConcurrent as fi, Class as fn, isLessThanOrEqualTo as fo, succeedContext as fr, isObject as fs, matchCauseEager as ft, catchEager as g, minutes as ga, makeSpanUnsafe as gi, jittered as gn, strictEqual as go, addFinalizerExit as gr, isTagged as gs, onError as gt, catchDefect as h, millis as ha, makeLatchUnsafe as hi, isSchedule as hn, make$5 as ho, addFinalizer$1 as hr, isString as hs, never as ht, all as i, isSuccess$1 as ia, fiberInterruptAll as ii, when as in, toArray as io, fresh as ir, isIterable as is, logWarning as it, exit as j, getUnsafe$1 as ja, append as ji, TimeoutError as jn, setStackTraceLimit as jo, isDoneUnsafe as jr, Class$2 as js, retry as jt, effectify as k, getOrUndefined$1 as ka, ParentSpan as ki, NoSuchElementError as kn, assignProperty as ko, into as kr, memoizeIdempotent as ks, request as kt, asSome as l, format as la, flatMap$2 as li, withSpan as ln, isGreaterThan as lo, provide$2 as lr, isNull as ls, mapError as lt, catchCause as m, isZero as ma, makeLatch as mi, exponential as mn, Tuple as mo, Scope as mr, isPropertyKey as ms, matchEffect as mt, acquireUseRelease as n, getOrUndefined as na, fiberAwait as ni, useSpan as nn, orElseSome as no, effectDiscard as nr, isError as ns, logFatal as nt, annotateCurrentSpan as o, match$3 as oa, fiberInterruptAs as oi, withFiber as on, Date$1 as oo, mergeAll as or, isNotNull as os, map as ot, callback as p, isFinite as pa, iterateEager as pi, TaggedClass as pn, make$4 as po, unwrap as pr, isObjectKeyword as ps, matchCauseEffect as pt, fromOption as q, getOrUndefined$2 as qa, match$2 as qi, makeDieReason as qn, combine as qo, callback$1 as qr, timeout as qt, addFinalizer as r, isFailure$1 as ra, fiberInterrupt as ri, void_ as rn, some as ro, empty as rr, isFunction as rs, logInfo as rt, annotateLogs as s, succeed$4 as sa, fiberJoin as si, withLogSpan as sn, Number$1 as so, mock as sr, isNotNullish as ss, mapBothEager as st, acquireRelease as t, getOrThrow as ta, exitZipRight as ti, updateService as tn, orElse as to, effectContext as tr, isBoolean as ts, logError as tt, asVoid as u, fromInputUnsafe as ua, forkUnsafe$1 as ui, yieldNow as un, isGreaterThanOrEqualTo as uo, provideMerge as ur, isNullish as us, mapErrorEager as ut, catchIf as v, negativeInfinity as va, onExit$1 as vi, passthrough as vn, Done$1 as vo, forkUnsafe as vr, isUnknown as vs, onExitPrimitive as vt, clockWith as w, Service as wa, sync$1 as wi, matchEffect$1 as wn, exitFail as wo, TracerTimingEnabled as wr, constant as ws, provide as wt, catchTag as x, toSeconds as xa, succeed$3 as xi, doneExitFromCause as xn, TaggedError as xo, provide$3 as xr, constTrue as xs, orDie as xt, catchNoSuchElement as y, seconds as ya, onExitPrimitive$1 as yi, spaced as yn, Error$1 as yo, make as yr, or as ys, onInterrupt as yt, fn as z, flatMapNullishOr$1 as za, headNonEmpty as zi, fromReasons as zn, formatPath as zo, isSuccess as zr, serviceOption as zt };
4994
+ export { interruptible as $, getOrUndefined$1 as $a, append as $i, fromReasons as $n, makePrimitive as $o, interrupt$1 as $r, constant as $s, uninterruptible as $t, effectify as A, succeed$4 as Aa, iterateEager as Ai, spaced as An, Date$1 as Ao, Scope as Ar, isBoolean as As, request as At, fn as B, minutes as Ba, succeedNone$1 as Bi, IllegalArgumentError as Bn, strictEqual as Bo, TracerTimingEnabled as Br, isNumber as Bs, serviceOption as Bt, catchTags as C, flatMap$4 as Ca, fiberInterruptAs as Ci, size as Cn, match$5 as Co, mock as Cr, optimize as Cs, orElseSucceed as Ct, contextWith as D, isSuccess$1 as Da, forkUnsafe$1 as Di, isSchedule as Dn, some as Do, succeed$1 as Dr, symbol$1 as Ds, provideService as Dt, context as E, isFailure$1 as Ea, flatMap$2 as Ei, fromStep as En, orElseSome as Eo, provideMerge as Er, structureKeys as Es, provideContext as Et, failCauseSync as F, isDuration as Fa, monotonicTimeNanos as Fi, isDoneCause as Fn, isLessThan as Fo, make$1 as Fr, isNotNull as Fs, runSync as Ft, forkChild as G, toSeconds as Ga, void_$2 as Gi, annotate as Gn, TaggedError as Go, into as Gr, isTagged as Gs, sync as Gt, fnUntracedEager as H, negativeInfinity as Ha, sync$1 as Hi, StackTrace as Hn, Done$1 as Ho, done$1 as Hr, isObjectKeyword as Hs, succeed as Ht, filterOrFail as I, isFinite as Ia, onExitPrimitive$1 as Ii, matchEffect$1 as In, isLessThanOrEqualTo as Io, makeUnsafe as Ir, isNotNullish as Is, runSyncExit as It, fromOption as J, Service as Ja, encode as Ji, done as Jn, evaluate as Jo, makeUnsafe$1 as Jr, or as Js, timeout as Jt, forkIn as K, zero as Ka, DisablePropagation as Ki, combine as Kn, args as Ko, isDone$1 as Kr, isUndefined as Ks, tap as Kt, flatMap as L, isZero as La, onExitUnsafe as Li, Random as Ln, make$5 as Lo, provide$3 as Lr, isNotUndefined as Ls, scope as Lt, exit as M, format as Ma, makeLatchUnsafe as Mi, catchDone as Mn, String$1 as Mo, addFinalizerExit as Mr, isFunction as Ms, retry as Mt, fail as N, fromInputUnsafe as Na, makeSpanUnsafe as Ni, doneExitFromCause as Nn, isGreaterThan as No, close as Nr, isIterable as Ns, runFork as Nt, delay as O, map$4 as Oa, getCurrentFiber as Oi, jittered as On, toArray as Oo, succeedContext as Or, hasProperty as Os, raceFirst as Ot, failCause as P, infinity as Pa, map$2 as Pi, filterDone as Pn, isGreaterThanOrEqualTo as Po, forkUnsafe as Pr, isNever as Ps, runForkWith as Pt, interrupt as Q, getOption as Qa, Array$1 as Qi, findErrorOption as Qn, isExit$1 as Qo, failCause$2 as Qr, constVoid as Qs, undefined_ as Qt, flatMapEager as R, max as Ra, resolveConcurrency as Ri, nextBetween as Rn, Tuple as Ro, CurrentLogAnnotations as Rr, isNull as Rs, scoped as Rt, catchTag as S, failVoid as Sa, fiberInterruptAllAs as Si, set as Sn, map$5 as So, mergeAll as Sr, number as Ss, orDie as St, clockWith as T, getOrUndefined as Ta, fiberRunIn as Ti, forever$1 as Tn, orElse as To, provide$2 as Tr, structure as Ts, provide as Tt, forEach as U, seconds as Ua, uninterruptibleMask$1 as Ui, TimeoutError as Un, Error$1 as Uo, doneUnsafe as Ur, isPropertyKey as Us, succeedNone as Ut, fnUntraced as V, nanos as Va, suspend$1 as Vi, NoSuchElementError as Vn, Prototype as Vo, _await as Vr, isObject as Vs, sleep as Vt, forever as W, toMillis as Wa, updateContext$1 as Wi, UnknownError as Wn, PipeInspectableProto as Wo, interruptWith as Wr, isString as Ws, suspend as Wt, gen as X, empty$4 as Xa, has$1 as Xi, filterInterruptors as Xn, exitFailCause as Xo, die$2 as Xr, constTrue as Xs, tryPromise as Xt, fromResult as Y, add as Ya, compose as Yi, fail$1 as Yn, exitFail as Yo, asVoidAll as Yr, constFalse as Ys, timeoutOrElse as Yt, ignore as Z, get$1 as Za, toPredicate as Zi, findError as Zn, exitSucceed as Zo, fail$2 as Zr, constUndefined as Zs, try_ as Zt, catchEager as _, reduce as _a, exitVoid as _i, forEach$1 as _n, getOrUndefined$2 as _o, effectContext as _r, equals$1 as _s, onError as _t, andThen as a, flatMapNullishOr as aa, pipe as ac, ClockRef as ai, when as an, all$2 as ao, isFailReason as ar, BaseProto as as, logWarning as at, catchNoSuchElement as b, headUnsafe as ba, fiberInterrupt as bi, make as bn, isSome as bo, fresh as br, combine$1 as bs, onInterrupt as bt, as as c, isArrayNonEmpty as ca, pipeArguments as cc, andThen$1 as ci, withLogSpan as cn, flatMap$5 as co, makeDieReason as cr, toJson as cs, mapBothEager as ct, cached as d, join as da, contextWith$1 as di, yieldNow as dn, fromNullOr as do, map$1 as dr, formatJson as ds, mapErrorEager as dt, appendAll as ea, dual as ec, isExit as ei, uninterruptibleMask as en, getOrUndefinedUnsafe as eo, hasInterrupts as er, withFiber$1 as es, isEffect as et, cachedWithTTL as f, last as fa, currentTimeMillis as fi, zipWith as fn, fromNullishOr$1 as fo, pretty as fr, formatPath as fs, match as ft, catchDefect as g, of as ga, exitInterrupt as gi, empty as gn, getOrThrow$1 as go, effect as gr, byReferenceUnsafe as gs, never as gt, catchCauseIf as h, match$2 as ha, exitHasInterrupts as hi, TaggedClass as hn, getOrNull as ho, buildWithScope as hr, symbolRedactable as hs, matchEffect as ht, all as i, findLast as ia, memoizeIdempotent as ic, void_$1 as ii, void_ as in, merge$1 as io, isDieReason as ir, setStackTraceLimit as is, logInfo as it, ensuring as j, try_$2 as ja, makeLatch as ji, toStep as jn, Number$1 as jo, addFinalizer$1 as jr, isError as js, result as jt, die as k, match$3 as ka, iterateConcurrent as ki, min as kn, BigInt$1 as ko, unwrap as kr, isBigInt as ks, repeat as kt, asSome as l, isCanonicalArrayIndex as la, asSome$1 as li, withParentSpan as ln, flatMapNullishOr$1 as lo, makeFailReason as lr, format$1 as ls, mapEager as lt, catchCause as m, map$3 as ma, endSpan as mi, Class as mn, getOrElse$1 as mo, squash as mr, redact as ms, matchCauseEffect as mt, acquireUseRelease as n, findFirst as na, identity as nc, isSuccess as ni, updateService as nn, make$4 as no, interruptors as nr, assignProperty as ns, logError as nt, annotateCurrentSpan as o, fromIterable$1 as oa, Class$2 as oc, ConsoleRef as oi, whileLoop as on, exists as oo, isReason as or, Class$1 as os, makeSpanScoped as ot, callback as p, makeEquivalence as pa, effectIsExit as pi, equalBatchKeys as pn, fromUndefinedOr as po, reasonAnnotations as pr, formatPropertyKey as ps, matchCauseEager as pt, forkScoped as q, Reference as qa, ParentSpan as qi, die$1 as qn, causeFail as qo, isDoneUnsafe as qr, isUnknown as qs, tapCause as qt, addFinalizer as r, findFirstIndex as ra, memoize as rc, succeed$2 as ri, useSpan as rn, makeUnsafe$2 as ro, isCause as rr, getStackTraceLimit as rs, logFatal as rt, annotateLogs as s, headNonEmpty as sa, Prototype$1 as sc, LogToStderr as si, withFiber as sn, filter as so, isTimeoutError as sr, NodeInspectSymbol as ss, map as st, acquireRelease as t, empty$2 as ta, flow as tc, isFailure as ti, updateContext as tn, getUnsafe$1 as to, hasInterruptsOnly as tr, assignProperties as ts, logDebug as tt, asVoid as u, isReadonlyArrayNonEmpty as ua, callback$1 as ui, withSpan as un, flatten$3 as uo, makeInterruptReason as ur, formatDate as us, mapError as ut, catchFilter as v, sort as va, exitZipRight as vi, get as vn, isNone as vo, effectDiscard as vr, symbol as vs, onExit as vt, catch_ as w, getOrThrow as wa, fiberJoin as wi, exponential as wn, none as wo, orDie$1 as wr, string as ws, promise as wt, catchReason as x, fail$4 as xa, fiberInterruptAll as xi, remove as xn, liftThrowable as xo, merge as xr, hash as xs, option as xt, catchIf as y, empty$3 as ya, fiberAwait as yi, isEmpty as yn, isOption as yo, empty$1 as yr, array as ys, onExitPrimitive as yt, flatten as z, millis as za, succeed$3 as zi, Done as zn, make$6 as zo, MinimumLogLevel as zr, isNullish as zs, scopedWith as zt };
4785
4995
 
4786
- //# sourceMappingURL=Effect-BmOuzEIp.mjs.map
4996
+ //# sourceMappingURL=Effect-rADALOOD.mjs.map