lalph 0.1.35 → 0.1.37

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.
package/dist/cli.mjs CHANGED
@@ -891,15 +891,15 @@ const symbol$3 = "~effect/interfaces/Hash";
891
891
  const hash = (self$1) => {
892
892
  switch (typeof self$1) {
893
893
  case "number": return number$2(self$1);
894
- case "bigint": return string$6(self$1.toString(10));
895
- case "boolean": return string$6(String(self$1));
896
- case "symbol": return string$6(String(self$1));
897
- case "string": return string$6(self$1);
898
- case "undefined": return string$6("undefined");
894
+ case "bigint": return string$7(self$1.toString(10));
895
+ case "boolean": return string$7(String(self$1));
896
+ case "symbol": return string$7(String(self$1));
897
+ case "string": return string$7(self$1);
898
+ case "undefined": return string$7("undefined");
899
899
  case "function":
900
- case "object": if (self$1 === null) return string$6("null");
901
- else if (self$1 instanceof Date) return string$6(self$1.toISOString());
902
- else if (self$1 instanceof RegExp) return string$6(self$1.toString());
900
+ case "object": if (self$1 === null) return string$7("null");
901
+ else if (self$1 instanceof Date) return string$7(self$1.toISOString());
902
+ else if (self$1 instanceof RegExp) return string$7(self$1.toString());
903
903
  else {
904
904
  if (byReferenceInstances.has(self$1)) return random(self$1);
905
905
  if (hashCache.has(self$1)) return hashCache.get(self$1);
@@ -1044,9 +1044,9 @@ const isHash = (u) => hasProperty(u, symbol$3);
1044
1044
  * @since 2.0.0
1045
1045
  */
1046
1046
  const number$2 = (n) => {
1047
- if (n !== n) return string$6("NaN");
1048
- if (n === Infinity) return string$6("Infinity");
1049
- if (n === -Infinity) return string$6("-Infinity");
1047
+ if (n !== n) return string$7("NaN");
1048
+ if (n === Infinity) return string$7("Infinity");
1049
+ if (n === -Infinity) return string$7("-Infinity");
1050
1050
  let h = n | 0;
1051
1051
  if (h !== n) h ^= n * 4294967295;
1052
1052
  while (n > 4294967295) h ^= n /= 4294967295;
@@ -1074,7 +1074,7 @@ const number$2 = (n) => {
1074
1074
  * @category hashing
1075
1075
  * @since 2.0.0
1076
1076
  */
1077
- const string$6 = (str) => {
1077
+ const string$7 = (str) => {
1078
1078
  let h = 5381, i = str.length;
1079
1079
  while (i) h = h * 33 ^ str.charCodeAt(--i);
1080
1080
  return optimize(h);
@@ -1173,13 +1173,13 @@ const iterableWith = (seed, f) => (iter) => {
1173
1173
  * @since 2.0.0
1174
1174
  */
1175
1175
  const array = /* @__PURE__ */ iterableWith(6151, hash);
1176
- const hashMap = /* @__PURE__ */ iterableWith(/* @__PURE__ */ string$6("Map"), ([k, v]) => combine$1(hash(k), hash(v)));
1177
- const hashSet = /* @__PURE__ */ iterableWith(/* @__PURE__ */ string$6("Set"), hash);
1176
+ const hashMap = /* @__PURE__ */ iterableWith(/* @__PURE__ */ string$7("Map"), ([k, v]) => combine$1(hash(k), hash(v)));
1177
+ const hashSet = /* @__PURE__ */ iterableWith(/* @__PURE__ */ string$7("Set"), hash);
1178
1178
  const randomHashCache = /* @__PURE__ */ new WeakMap();
1179
1179
  const hashCache = /* @__PURE__ */ new WeakMap();
1180
1180
  const visitedObjects = /* @__PURE__ */ new WeakSet();
1181
1181
  function withVisitedTracking$1(obj, fn$2) {
1182
- if (visitedObjects.has(obj)) return string$6("[Circular]");
1182
+ if (visitedObjects.has(obj)) return string$7("[Circular]");
1183
1183
  visitedObjects.add(obj);
1184
1184
  const result$2 = fn$2();
1185
1185
  visitedObjects.delete(obj);
@@ -1535,18 +1535,18 @@ function format$2(input, options) {
1535
1535
  return ["[ownKeys threw]"];
1536
1536
  }
1537
1537
  };
1538
- function recur$1(v, d = 0) {
1538
+ function recur$2(v, d = 0) {
1539
1539
  if (Array.isArray(v)) {
1540
1540
  if (seen.has(v)) return CIRCULAR;
1541
1541
  seen.add(v);
1542
- if (!gap || v.length <= 1) return `[${v.map((x) => recur$1(x, d)).join(",")}]`;
1543
- const inner = v.map((x) => recur$1(x, d + 1)).join(",\n" + ind(d + 1));
1542
+ if (!gap || v.length <= 1) return `[${v.map((x) => recur$2(x, d)).join(",")}]`;
1543
+ const inner = v.map((x) => recur$2(x, d + 1)).join(",\n" + ind(d + 1));
1544
1544
  return `[\n${ind(d + 1)}${inner}\n${ind(d)}]`;
1545
1545
  }
1546
1546
  if (v instanceof Date) return formatDate(v);
1547
1547
  if (!options?.ignoreToString && hasProperty(v, "toString") && typeof v["toString"] === "function" && v["toString"] !== Object.prototype.toString && v["toString"] !== Array.prototype.toString) {
1548
1548
  const s = safeToString(v);
1549
- if (v instanceof Error && v.cause) return `${s} (cause: ${recur$1(v.cause, d)})`;
1549
+ if (v instanceof Error && v.cause) return `${s} (cause: ${recur$2(v.cause, d)})`;
1550
1550
  return s;
1551
1551
  }
1552
1552
  if (typeof v === "string") return JSON.stringify(v);
@@ -1556,14 +1556,14 @@ function format$2(input, options) {
1556
1556
  if (seen.has(v)) return CIRCULAR;
1557
1557
  seen.add(v);
1558
1558
  if (symbolRedactable in v) return format$2(getRedacted(v));
1559
- if (Symbol.iterator in v) return `${v.constructor.name}(${recur$1(Array.from(v), d)})`;
1559
+ if (Symbol.iterator in v) return `${v.constructor.name}(${recur$2(Array.from(v), d)})`;
1560
1560
  const keys$1 = ownKeys(v);
1561
- if (!gap || keys$1.length <= 1) return wrap(v, `{${keys$1.map((k) => `${formatPropertyKey(k)}:${recur$1(v[k], d)}`).join(",")}}`);
1562
- return wrap(v, `{\n${keys$1.map((k) => `${ind(d + 1)}${formatPropertyKey(k)}: ${recur$1(v[k], d + 1)}`).join(",\n")}\n${ind(d)}}`);
1561
+ if (!gap || keys$1.length <= 1) return wrap(v, `{${keys$1.map((k) => `${formatPropertyKey(k)}:${recur$2(v[k], d)}`).join(",")}}`);
1562
+ return wrap(v, `{\n${keys$1.map((k) => `${ind(d + 1)}${formatPropertyKey(k)}: ${recur$2(v[k], d + 1)}`).join(",\n")}\n${ind(d)}}`);
1563
1563
  }
1564
1564
  return String(v);
1565
1565
  }
1566
- return recur$1(input, 0);
1566
+ return recur$2(input, 0);
1567
1567
  }
1568
1568
  const CIRCULAR = "[Circular]";
1569
1569
  /**
@@ -1941,7 +1941,7 @@ var Class$2 = class {
1941
1941
  * @category constructors
1942
1942
  * @since 2.0.0
1943
1943
  */
1944
- function make$49(compare) {
1944
+ function make$50(compare) {
1945
1945
  return (self$1, that) => self$1 === that ? 0 : compare(self$1, that);
1946
1946
  }
1947
1947
  /**
@@ -1975,7 +1975,7 @@ function make$49(compare) {
1975
1975
  * @category instances
1976
1976
  * @since 4.0.0
1977
1977
  */
1978
- const String$5 = /* @__PURE__ */ make$49((self$1, that) => self$1 < that ? -1 : 1);
1978
+ const String$5 = /* @__PURE__ */ make$50((self$1, that) => self$1 < that ? -1 : 1);
1979
1979
  /**
1980
1980
  * An `Order` instance for numbers that compares them numerically.
1981
1981
  *
@@ -2011,7 +2011,7 @@ const String$5 = /* @__PURE__ */ make$49((self$1, that) => self$1 < that ? -1 :
2011
2011
  * @category instances
2012
2012
  * @since 4.0.0
2013
2013
  */
2014
- const Number$4 = /* @__PURE__ */ make$49((self$1, that) => {
2014
+ const Number$4 = /* @__PURE__ */ make$50((self$1, that) => {
2015
2015
  if (globalThis.Number.isNaN(self$1) && globalThis.Number.isNaN(that)) return 0;
2016
2016
  if (globalThis.Number.isNaN(self$1)) return -1;
2017
2017
  if (globalThis.Number.isNaN(that)) return 1;
@@ -2047,7 +2047,7 @@ const Number$4 = /* @__PURE__ */ make$49((self$1, that) => {
2047
2047
  * @category instances
2048
2048
  * @since 4.0.0
2049
2049
  */
2050
- const BigInt$3 = /* @__PURE__ */ make$49((self$1, that) => self$1 < that ? -1 : 1);
2050
+ const BigInt$3 = /* @__PURE__ */ make$50((self$1, that) => self$1 < that ? -1 : 1);
2051
2051
  /**
2052
2052
  * Transforms an `Order` on type `A` into an `Order` on type `B` by providing a function that
2053
2053
  * maps values of type `B` to values of type `A`.
@@ -2082,7 +2082,7 @@ const BigInt$3 = /* @__PURE__ */ make$49((self$1, that) => self$1 < that ? -1 :
2082
2082
  * @category mapping
2083
2083
  * @since 2.0.0
2084
2084
  */
2085
- const mapInput = /* @__PURE__ */ dual(2, (self$1, f) => make$49((b1, b2) => self$1(f(b1), f(b2))));
2085
+ const mapInput = /* @__PURE__ */ dual(2, (self$1, f) => make$50((b1, b2) => self$1(f(b1), f(b2))));
2086
2086
  /**
2087
2087
  * An `Order` instance for `Date` objects that compares them chronologically by their timestamp.
2088
2088
  *
@@ -2151,7 +2151,7 @@ const Date$2 = /* @__PURE__ */ mapInput(Number$4, (date$2) => date$2.getTime());
2151
2151
  * @since 4.0.0
2152
2152
  */
2153
2153
  function Tuple$2(elements) {
2154
- return make$49((self$1, that) => {
2154
+ return make$50((self$1, that) => {
2155
2155
  const len = elements.length;
2156
2156
  for (let i = 0; i < len; i++) {
2157
2157
  const o = elements[i](self$1[i], that[i]);
@@ -2195,7 +2195,7 @@ function Tuple$2(elements) {
2195
2195
  * @since 4.0.0
2196
2196
  */
2197
2197
  function Array$4(O) {
2198
- return make$49((self$1, that) => {
2198
+ return make$50((self$1, that) => {
2199
2199
  const aLen = self$1.length;
2200
2200
  const bLen = that.length;
2201
2201
  const len = Math.min(aLen, bLen);
@@ -2249,7 +2249,7 @@ function Array$4(O) {
2249
2249
  */
2250
2250
  function Struct$2(fields) {
2251
2251
  const keys$1 = Object.keys(fields);
2252
- return make$49((self$1, that) => {
2252
+ return make$50((self$1, that) => {
2253
2253
  for (const key of keys$1) {
2254
2254
  const o = fields[key](self$1[key], that[key]);
2255
2255
  if (o !== 0) return o;
@@ -2680,7 +2680,7 @@ const DurationProto = {
2680
2680
  return pipeArguments(this, arguments);
2681
2681
  }
2682
2682
  };
2683
- const make$48 = (input) => {
2683
+ const make$49 = (input) => {
2684
2684
  const duration = Object.create(DurationProto);
2685
2685
  if (isNumber(input)) if (isNaN(input) || input <= 0) duration.value = zeroDurationValue;
2686
2686
  else if (!Number.isFinite(input)) duration.value = infinityDurationValue;
@@ -2763,7 +2763,7 @@ const isZero = (self$1) => {
2763
2763
  * @since 2.0.0
2764
2764
  * @category constructors
2765
2765
  */
2766
- const zero = /* @__PURE__ */ make$48(0);
2766
+ const zero = /* @__PURE__ */ make$49(0);
2767
2767
  /**
2768
2768
  * A Duration representing infinite time.
2769
2769
  *
@@ -2777,7 +2777,7 @@ const zero = /* @__PURE__ */ make$48(0);
2777
2777
  * @since 2.0.0
2778
2778
  * @category constructors
2779
2779
  */
2780
- const infinity = /* @__PURE__ */ make$48(Infinity);
2780
+ const infinity = /* @__PURE__ */ make$49(Infinity);
2781
2781
  /**
2782
2782
  * Creates a Duration from nanoseconds.
2783
2783
  *
@@ -2792,7 +2792,7 @@ const infinity = /* @__PURE__ */ make$48(Infinity);
2792
2792
  * @since 2.0.0
2793
2793
  * @category constructors
2794
2794
  */
2795
- const nanos = (nanos$1) => make$48(nanos$1);
2795
+ const nanos = (nanos$1) => make$49(nanos$1);
2796
2796
  /**
2797
2797
  * Creates a Duration from microseconds.
2798
2798
  *
@@ -2807,7 +2807,7 @@ const nanos = (nanos$1) => make$48(nanos$1);
2807
2807
  * @since 2.0.0
2808
2808
  * @category constructors
2809
2809
  */
2810
- const micros = (micros$1) => make$48(micros$1 * bigint1e3);
2810
+ const micros = (micros$1) => make$49(micros$1 * bigint1e3);
2811
2811
  /**
2812
2812
  * Creates a Duration from milliseconds.
2813
2813
  *
@@ -2822,7 +2822,7 @@ const micros = (micros$1) => make$48(micros$1 * bigint1e3);
2822
2822
  * @since 2.0.0
2823
2823
  * @category constructors
2824
2824
  */
2825
- const millis = (millis$1) => make$48(millis$1);
2825
+ const millis = (millis$1) => make$49(millis$1);
2826
2826
  /**
2827
2827
  * Creates a Duration from seconds.
2828
2828
  *
@@ -2837,7 +2837,7 @@ const millis = (millis$1) => make$48(millis$1);
2837
2837
  * @since 2.0.0
2838
2838
  * @category constructors
2839
2839
  */
2840
- const seconds = (seconds$1) => make$48(seconds$1 * 1e3);
2840
+ const seconds = (seconds$1) => make$49(seconds$1 * 1e3);
2841
2841
  /**
2842
2842
  * Creates a Duration from minutes.
2843
2843
  *
@@ -2852,7 +2852,7 @@ const seconds = (seconds$1) => make$48(seconds$1 * 1e3);
2852
2852
  * @since 2.0.0
2853
2853
  * @category constructors
2854
2854
  */
2855
- const minutes = (minutes$1) => make$48(minutes$1 * 6e4);
2855
+ const minutes = (minutes$1) => make$49(minutes$1 * 6e4);
2856
2856
  /**
2857
2857
  * Creates a Duration from hours.
2858
2858
  *
@@ -2867,7 +2867,7 @@ const minutes = (minutes$1) => make$48(minutes$1 * 6e4);
2867
2867
  * @since 2.0.0
2868
2868
  * @category constructors
2869
2869
  */
2870
- const hours = (hours$1) => make$48(hours$1 * 36e5);
2870
+ const hours = (hours$1) => make$49(hours$1 * 36e5);
2871
2871
  /**
2872
2872
  * Creates a Duration from days.
2873
2873
  *
@@ -2882,7 +2882,7 @@ const hours = (hours$1) => make$48(hours$1 * 36e5);
2882
2882
  * @since 2.0.0
2883
2883
  * @category constructors
2884
2884
  */
2885
- const days = (days$1) => make$48(days$1 * 864e5);
2885
+ const days = (days$1) => make$49(days$1 * 864e5);
2886
2886
  /**
2887
2887
  * Creates a Duration from weeks.
2888
2888
  *
@@ -2897,7 +2897,7 @@ const days = (days$1) => make$48(days$1 * 864e5);
2897
2897
  * @since 2.0.0
2898
2898
  * @category constructors
2899
2899
  */
2900
- const weeks = (weeks$1) => make$48(weeks$1 * 6048e5);
2900
+ const weeks = (weeks$1) => make$49(weeks$1 * 6048e5);
2901
2901
  /**
2902
2902
  * Converts a Duration to milliseconds.
2903
2903
  *
@@ -3325,7 +3325,7 @@ var Fail = class extends FailureBase {
3325
3325
  return failureIsFail$1(that) && equals$1(this.error, that.error) && equals$1(this.annotations, that.annotations);
3326
3326
  }
3327
3327
  [symbol$3]() {
3328
- return combine$1(string$6(this._tag))(combine$1(hash(this.error))(hash(this.annotations)));
3328
+ return combine$1(string$7(this._tag))(combine$1(hash(this.error))(hash(this.annotations)));
3329
3329
  }
3330
3330
  };
3331
3331
  /** @internal */
@@ -3354,7 +3354,7 @@ var Die = class extends FailureBase {
3354
3354
  return failureIsDie$1(that) && equals$1(this.defect, that.defect) && equals$1(this.annotations, that.annotations);
3355
3355
  }
3356
3356
  [symbol$3]() {
3357
- return combine$1(string$6(this._tag))(combine$1(hash(this.defect))(hash(this.annotations)));
3357
+ return combine$1(string$7(this._tag))(combine$1(hash(this.defect))(hash(this.annotations)));
3358
3358
  }
3359
3359
  };
3360
3360
  /** @internal */
@@ -3414,7 +3414,7 @@ const makeExit = (options) => {
3414
3414
  return isExit$1(that) && that._tag === this._tag && equals$1(this[args], that[args]);
3415
3415
  },
3416
3416
  [symbol$3]() {
3417
- return combine$1(string$6(options.op), hash(this[args]));
3417
+ return combine$1(string$7(options.op), hash(this[args]));
3418
3418
  }
3419
3419
  };
3420
3420
  return function(value) {
@@ -3567,7 +3567,7 @@ var NoSuchElementError$1 = class extends TaggedError$1("NoSuchElementError") {
3567
3567
  * @category constructors
3568
3568
  * @since 2.0.0
3569
3569
  */
3570
- const make$47 = (isEquivalent) => (self$1, that) => self$1 === that || isEquivalent(self$1, that);
3570
+ const make$48 = (isEquivalent) => (self$1, that) => self$1 === that || isEquivalent(self$1, that);
3571
3571
  const isStrictEquivalent = (x, y) => x === y;
3572
3572
  /**
3573
3573
  * Creates an equivalence relation that uses strict equality (`===`) to compare values.
@@ -3677,7 +3677,7 @@ const strictEqual = () => isStrictEquivalent;
3677
3677
  * @since 4.0.0
3678
3678
  */
3679
3679
  function Tuple$1(elements) {
3680
- return make$47((self$1, that) => {
3680
+ return make$48((self$1, that) => {
3681
3681
  if (self$1.length !== that.length) return false;
3682
3682
  for (let i = 0; i < self$1.length; i++) if (!elements[i](self$1[i], that[i])) return false;
3683
3683
  return true;
@@ -3734,7 +3734,7 @@ function Tuple$1(elements) {
3734
3734
  * @since 4.0.0
3735
3735
  */
3736
3736
  function Array$3(item) {
3737
- return make$47((self$1, that) => {
3737
+ return make$48((self$1, that) => {
3738
3738
  if (self$1.length !== that.length) return false;
3739
3739
  for (let i = 0; i < self$1.length; i++) if (!item(self$1[i], that[i])) return false;
3740
3740
  return true;
@@ -3810,7 +3810,7 @@ function Array$3(item) {
3810
3810
  */
3811
3811
  function Struct$1(fields) {
3812
3812
  const keys$1 = Reflect.ownKeys(fields);
3813
- return make$47((self$1, that) => {
3813
+ return make$48((self$1, that) => {
3814
3814
  for (const key of keys$1) if (!fields[key](self$1[key], that[key])) return false;
3815
3815
  return true;
3816
3816
  });
@@ -3952,13 +3952,13 @@ const isFailure$5 = (result$2) => result$2._tag === "Failure";
3952
3952
  /** @internal */
3953
3953
  const isSuccess$5 = (result$2) => result$2._tag === "Success";
3954
3954
  /** @internal */
3955
- const fail$9 = (failure) => {
3955
+ const fail$10 = (failure) => {
3956
3956
  const a = Object.create(FailureProto);
3957
3957
  a.failure = failure;
3958
3958
  return a;
3959
3959
  };
3960
3960
  /** @internal */
3961
- const succeed$6 = (success) => {
3961
+ const succeed$7 = (success) => {
3962
3962
  const a = Object.create(SuccessProto);
3963
3963
  a.success = success;
3964
3964
  return a;
@@ -3968,7 +3968,7 @@ const getFailure$2 = (self$1) => isSuccess$5(self$1) ? none$4 : some$1(self$1.fa
3968
3968
  /** @internal */
3969
3969
  const getSuccess$3 = (self$1) => isFailure$5(self$1) ? none$4 : some$1(self$1.success);
3970
3970
  /** @internal */
3971
- const fromOption$4 = /* @__PURE__ */ dual(2, (self$1, onNone) => isNone$1(self$1) ? fail$9(onNone()) : succeed$6(self$1.value));
3971
+ const fromOption$4 = /* @__PURE__ */ dual(2, (self$1, onNone) => isNone$1(self$1) ? fail$10(onNone()) : succeed$7(self$1.value));
3972
3972
 
3973
3973
  //#endregion
3974
3974
  //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@004c047_46460a9e85a4dd43b15f8b036d8d1a97/node_modules/effect/dist/Option.js
@@ -4562,7 +4562,7 @@ const filter$5 = /* @__PURE__ */ dual(2, (self$1, predicate) => filterMap(self$1
4562
4562
  * @category Equivalence
4563
4563
  * @since 2.0.0
4564
4564
  */
4565
- const makeEquivalence$4 = (isEquivalent) => make$47((x, y) => isNone(x) ? isNone(y) : isNone(y) ? false : isEquivalent(x.value, y.value));
4565
+ const makeEquivalence$4 = (isEquivalent) => make$48((x, y) => isNone(x) ? isNone(y) : isNone(y) ? false : isEquivalent(x.value, y.value));
4566
4566
 
4567
4567
  //#endregion
4568
4568
  //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@004c047_46460a9e85a4dd43b15f8b036d8d1a97/node_modules/effect/dist/Result.js
@@ -4584,7 +4584,7 @@ const makeEquivalence$4 = (isEquivalent) => make$47((x, y) => isNone(x) ? isNone
4584
4584
  * @category Constructors
4585
4585
  * @since 4.0.0
4586
4586
  */
4587
- const succeed$5 = succeed$6;
4587
+ const succeed$6 = succeed$7;
4588
4588
  /**
4589
4589
  * Constructs a new `Result` holding a `Failure` value.
4590
4590
  *
@@ -4603,7 +4603,7 @@ const succeed$5 = succeed$6;
4603
4603
  * @category Constructors
4604
4604
  * @since 4.0.0
4605
4605
  */
4606
- const fail$8 = fail$9;
4606
+ const fail$9 = fail$10;
4607
4607
  /**
4608
4608
  * @example
4609
4609
  * ```ts
@@ -4735,7 +4735,7 @@ const getFailure = getFailure$2;
4735
4735
  * @category Mapping
4736
4736
  * @since 4.0.0
4737
4737
  */
4738
- const mapError$5 = /* @__PURE__ */ dual(2, (self$1, f) => isFailure$4(self$1) ? fail$8(f(self$1.failure)) : succeed$5(self$1.success));
4738
+ const mapError$5 = /* @__PURE__ */ dual(2, (self$1, f) => isFailure$4(self$1) ? fail$9(f(self$1.failure)) : succeed$6(self$1.success));
4739
4739
  /**
4740
4740
  * Takes two functions and an `Result` value, if the value is a `Failure` the inner
4741
4741
  * value is applied to the `onFailure function, if the value is a `Success` the inner
@@ -4830,7 +4830,7 @@ const getOrThrow = /* @__PURE__ */ getOrThrowWith(identity);
4830
4830
  * @category Constructors
4831
4831
  * @since 4.0.0
4832
4832
  */
4833
- const succeedNone$2 = /* @__PURE__ */ succeed$5(none$4);
4833
+ const succeedNone$2 = /* @__PURE__ */ succeed$6(none$4);
4834
4834
 
4835
4835
  //#endregion
4836
4836
  //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@004c047_46460a9e85a4dd43b15f8b036d8d1a97/node_modules/effect/dist/Filter.js
@@ -4839,7 +4839,7 @@ const FailTypeId = "~effect/data/Filter/fail";
4839
4839
  * @since 4.0.0
4840
4840
  * @category fail
4841
4841
  */
4842
- const fail$7 = (value) => ({
4842
+ const fail$8 = (value) => ({
4843
4843
  [FailTypeId]: FailTypeId,
4844
4844
  fail: value
4845
4845
  });
@@ -4847,7 +4847,7 @@ const fail$7 = (value) => ({
4847
4847
  * @since 4.0.0
4848
4848
  * @category fail
4849
4849
  */
4850
- const failVoid = /* @__PURE__ */ fail$7(void 0);
4850
+ const failVoid = /* @__PURE__ */ fail$8(void 0);
4851
4851
  /**
4852
4852
  * @since 4.0.0
4853
4853
  * @category fail
@@ -4859,7 +4859,7 @@ const isFail = (u) => u === failVoid || typeof u === "object" && u !== null && F
4859
4859
  */
4860
4860
  const mapFail = /* @__PURE__ */ dual(2, (self$1, f) => (input) => {
4861
4861
  const result$2 = self$1(input);
4862
- return isFail(result$2) ? fail$7(f(result$2.fail)) : result$2;
4862
+ return isFail(result$2) ? fail$8(f(result$2.fail)) : result$2;
4863
4863
  });
4864
4864
  /**
4865
4865
  * Creates a Filter from a predicate or refinement function.
@@ -4890,7 +4890,7 @@ const mapFail = /* @__PURE__ */ dual(2, (self$1, f) => (input) => {
4890
4890
  * @since 4.0.0
4891
4891
  * @category Constructors
4892
4892
  */
4893
- const fromPredicate = (predicate) => (input) => predicate(input) ? input : fail$7(input);
4893
+ const fromPredicate = (predicate) => (input) => predicate(input) ? input : fail$8(input);
4894
4894
  /**
4895
4895
  * Converts a Filter into a predicate function.
4896
4896
  *
@@ -4923,12 +4923,12 @@ const toPredicate = (self$1) => (input) => !isFail(self$1(input));
4923
4923
  * @since 4.0.0
4924
4924
  * @category Constructors
4925
4925
  */
4926
- const string$5 = /* @__PURE__ */ fromPredicate(isString$1);
4926
+ const string$6 = /* @__PURE__ */ fromPredicate(isString$1);
4927
4927
  /**
4928
4928
  * @since 4.0.0
4929
4929
  * @category Constructors
4930
4930
  */
4931
- const has$2 = (key) => (input) => input.has(key) ? input : fail$7(input);
4931
+ const has$2 = (key) => (input) => input.has(key) ? input : fail$8(input);
4932
4932
  /**
4933
4933
  * A predefined filter that only passes through number values.
4934
4934
  *
@@ -5062,9 +5062,9 @@ const compose = /* @__PURE__ */ dual(2, (left, right) => (input) => {
5062
5062
  */
5063
5063
  const composePassthrough = /* @__PURE__ */ dual(2, (left, right) => (input) => {
5064
5064
  const leftOut = left(input);
5065
- if (isFail(leftOut)) return fail$7(input);
5065
+ if (isFail(leftOut)) return fail$8(input);
5066
5066
  const rightOut = right(leftOut);
5067
- if (isFail(rightOut)) return fail$7(input);
5067
+ if (isFail(rightOut)) return fail$8(input);
5068
5068
  return rightOut;
5069
5069
  });
5070
5070
  /**
@@ -6002,7 +6002,7 @@ const ServiceProto = {
6002
6002
  return self$1;
6003
6003
  },
6004
6004
  serviceMap(self$1) {
6005
- return make$46(this, self$1);
6005
+ return make$47(this, self$1);
6006
6006
  },
6007
6007
  use(f) {
6008
6008
  return withFiber$1((fiber$2) => f(get$7(fiber$2.services, this)));
@@ -6124,7 +6124,7 @@ const emptyServiceMap = /* @__PURE__ */ makeUnsafe$7(/* @__PURE__ */ new Map());
6124
6124
  * @since 4.0.0
6125
6125
  * @category Constructors
6126
6126
  */
6127
- const make$46 = (key, service$2) => makeUnsafe$7(new Map([[key.key, service$2]]));
6127
+ const make$47 = (key, service$2) => makeUnsafe$7(new Map([[key.key, service$2]]));
6128
6128
  /**
6129
6129
  * Adds a service to a given `ServiceMap`.
6130
6130
  *
@@ -6668,7 +6668,7 @@ var ParentSpan = class extends Service()(ParentSpanKey) {};
6668
6668
  * })
6669
6669
  * ```
6670
6670
  */
6671
- const make$45 = (options) => options;
6671
+ const make$46 = (options) => options;
6672
6672
  /**
6673
6673
  * @since 2.0.0
6674
6674
  * @category constructors
@@ -6737,7 +6737,7 @@ const TracerKey = "effect/Tracer";
6737
6737
  * })
6738
6738
  * ```
6739
6739
  */
6740
- const Tracer = /* @__PURE__ */ Reference(TracerKey, { defaultValue: () => make$45({ span: (name, parent, services$2, links, startTime, kind) => new NativeSpan(name, parent, services$2, links.slice(), startTime, kind) }) });
6740
+ const Tracer = /* @__PURE__ */ Reference(TracerKey, { defaultValue: () => make$46({ span: (name, parent, services$2, links, startTime, kind) => new NativeSpan(name, parent, services$2, links.slice(), startTime, kind) }) });
6741
6741
  /**
6742
6742
  * @since 4.0.0
6743
6743
  * @category native tracer
@@ -7346,7 +7346,7 @@ var Interrupt = class extends FailureBase {
7346
7346
  return failureIsInterrupt$1(that) && this.fiberId === that.fiberId && this.annotations === that.annotations;
7347
7347
  }
7348
7348
  [symbol$3]() {
7349
- return combine$1(string$6(`${this._tag}:${this.fiberId}`))(random(this.annotations));
7349
+ return combine$1(string$7(`${this._tag}:${this.fiberId}`))(random(this.annotations));
7350
7350
  }
7351
7351
  };
7352
7352
  /** @internal */
@@ -7358,7 +7358,7 @@ const causeHasFail = (self$1) => self$1.failures.some(failureIsFail$1);
7358
7358
  /** @internal */
7359
7359
  const causeFilterFail = (self$1) => {
7360
7360
  const failure = self$1.failures.find(failureIsFail$1);
7361
- return failure ? failure : fail$7(self$1);
7361
+ return failure ? failure : fail$8(self$1);
7362
7362
  };
7363
7363
  /** @internal */
7364
7364
  const causeFilterError = (self$1) => {
@@ -7366,7 +7366,7 @@ const causeFilterError = (self$1) => {
7366
7366
  const failure = self$1.failures[i];
7367
7367
  if (failure._tag === "Fail") return failure.error;
7368
7368
  }
7369
- return fail$7(self$1);
7369
+ return fail$8(self$1);
7370
7370
  };
7371
7371
  /** @internal */
7372
7372
  const causeErrorOption = /* @__PURE__ */ toOption(causeFilterError);
@@ -7375,19 +7375,19 @@ const causeHasDie = (self$1) => self$1.failures.some(failureIsDie$1);
7375
7375
  /** @internal */
7376
7376
  const causeFilterDie = (self$1) => {
7377
7377
  const failure = self$1.failures.find(failureIsDie$1);
7378
- return failure ? failure : fail$7(self$1);
7378
+ return failure ? failure : fail$8(self$1);
7379
7379
  };
7380
7380
  /** @internal */
7381
7381
  const causeFilterDefect = (self$1) => {
7382
7382
  const failure = self$1.failures.find(failureIsDie$1);
7383
- return failure ? failure.defect : fail$7(self$1);
7383
+ return failure ? failure.defect : fail$8(self$1);
7384
7384
  };
7385
7385
  /** @internal */
7386
7386
  const causeHasInterrupt = (self$1) => self$1.failures.some(failureIsInterrupt$1);
7387
7387
  /** @internal */
7388
7388
  const causeFilterInterrupt = (self$1) => {
7389
7389
  const failure = self$1.failures.find(failureIsInterrupt$1);
7390
- return failure ? failure : fail$7(self$1);
7390
+ return failure ? failure : fail$8(self$1);
7391
7391
  };
7392
7392
  /** @internal */
7393
7393
  const causeFilterInterruptors = (self$1) => {
@@ -7398,7 +7398,7 @@ const causeFilterInterruptors = (self$1) => {
7398
7398
  interruptors$1 ??= /* @__PURE__ */ new Set();
7399
7399
  if (f.fiberId !== void 0) interruptors$1.add(f.fiberId);
7400
7400
  }
7401
- return interruptors$1 ? interruptors$1 : fail$7(self$1);
7401
+ return interruptors$1 ? interruptors$1 : fail$8(self$1);
7402
7402
  };
7403
7403
  /** @internal */
7404
7404
  const causeInterruptors = (self$1) => {
@@ -7637,7 +7637,7 @@ var FiberImpl = class {
7637
7637
  interruptUnsafe(fiberId$2, annotations$1) {
7638
7638
  if (this._exit) return;
7639
7639
  let cause = causeInterrupt(fiberId$2);
7640
- if (this.currentStackFrame) cause = causeAnnotate(cause, make$46(StackTraceKey, this.currentStackFrame));
7640
+ if (this.currentStackFrame) cause = causeAnnotate(cause, make$47(StackTraceKey, this.currentStackFrame));
7641
7641
  if (annotations$1) cause = causeAnnotate(cause, annotations$1);
7642
7642
  this._interruptedCause = this._interruptedCause ? causeMerge(this._interruptedCause, cause) : cause;
7643
7643
  if (this.interruptible) this.evaluate(failCause$4(this._interruptedCause));
@@ -7742,10 +7742,10 @@ const fiberInterruptChildren = (fiber$2) => {
7742
7742
  /** @internal */
7743
7743
  const fiberAwait = (self$1) => {
7744
7744
  const impl = self$1;
7745
- if (impl._exit) return succeed$4(impl._exit);
7745
+ if (impl._exit) return succeed$5(impl._exit);
7746
7746
  return callback$2((resume) => {
7747
- if (impl._exit) return resume(succeed$4(impl._exit));
7748
- return sync$1(self$1.addObserver((exit$2) => resume(succeed$4(exit$2))));
7747
+ if (impl._exit) return resume(succeed$5(impl._exit));
7748
+ return sync$1(self$1.addObserver((exit$2) => resume(succeed$5(exit$2))));
7749
7749
  });
7750
7750
  };
7751
7751
  /** @internal */
@@ -7767,7 +7767,7 @@ const fiberAwaitAll = (self$1) => callback$2((resume) => {
7767
7767
  });
7768
7768
  return;
7769
7769
  }
7770
- resume(succeed$4(exits));
7770
+ resume(succeed$5(exits));
7771
7771
  }
7772
7772
  loop();
7773
7773
  return sync$1(() => cancel?.());
@@ -7798,7 +7798,7 @@ const fiberJoinAll = (self$1) => callback$2((resume) => {
7798
7798
  return resume(exit$2);
7799
7799
  }
7800
7800
  out[i] = exit$2.value;
7801
- if (done$2 === fibers.length) resume(succeed$4(out));
7801
+ if (done$2 === fibers.length) resume(succeed$5(out));
7802
7802
  }));
7803
7803
  }
7804
7804
  });
@@ -7822,11 +7822,11 @@ const fiberInterruptAllAs = /* @__PURE__ */ dual(2, (fibers, fiberId$2) => withF
7822
7822
  return asVoid$2(fiberAwaitAll(fibers));
7823
7823
  }));
7824
7824
  /** @internal */
7825
- const succeed$4 = exitSucceed;
7825
+ const succeed$5 = exitSucceed;
7826
7826
  /** @internal */
7827
7827
  const failCause$4 = exitFailCause;
7828
7828
  /** @internal */
7829
- const fail$6 = exitFail;
7829
+ const fail$7 = exitFail;
7830
7830
  /** @internal */
7831
7831
  const sync$1 = /* @__PURE__ */ makePrimitive$1({
7832
7832
  op: "Sync",
@@ -7850,7 +7850,7 @@ const fromOption$1 = fromYieldable$1;
7850
7850
  /** @internal */
7851
7851
  const fromResult$1 = fromYieldable$1;
7852
7852
  /** @internal */
7853
- const fromNullishOr$1 = (value) => value == null ? fail$6(new NoSuchElementError$1()) : succeed$4(value);
7853
+ const fromNullishOr$1 = (value) => value == null ? fail$7(new NoSuchElementError$1()) : succeed$5(value);
7854
7854
  /** @internal */
7855
7855
  const yieldNowWith$1 = /* @__PURE__ */ makePrimitive$1({
7856
7856
  op: "Yield",
@@ -7868,28 +7868,28 @@ const yieldNowWith$1 = /* @__PURE__ */ makePrimitive$1({
7868
7868
  /** @internal */
7869
7869
  const yieldNow$1 = /* @__PURE__ */ yieldNowWith$1(0);
7870
7870
  /** @internal */
7871
- const succeedSome$1 = (a) => succeed$4(some(a));
7871
+ const succeedSome$1 = (a) => succeed$5(some(a));
7872
7872
  /** @internal */
7873
- const succeedNone$1 = /* @__PURE__ */ succeed$4(/* @__PURE__ */ none$3());
7873
+ const succeedNone$1 = /* @__PURE__ */ succeed$5(/* @__PURE__ */ none$3());
7874
7874
  /** @internal */
7875
7875
  const failCauseSync$1 = (evaluate$1) => suspend$3(() => failCause$4(internalCall(evaluate$1)));
7876
7876
  /** @internal */
7877
7877
  const die$4 = (defect) => exitDie(defect);
7878
7878
  /** @internal */
7879
- const failSync$1 = (error$1) => suspend$3(() => fail$6(internalCall(error$1)));
7879
+ const failSync$1 = (error$1) => suspend$3(() => fail$7(internalCall(error$1)));
7880
7880
  /** @internal */
7881
- const void_$3 = /* @__PURE__ */ succeed$4(void 0);
7881
+ const void_$3 = /* @__PURE__ */ succeed$5(void 0);
7882
7882
  /** @internal */
7883
7883
  const try_$1 = (options) => suspend$3(() => {
7884
7884
  try {
7885
- return succeed$4(internalCall(options.try));
7885
+ return succeed$5(internalCall(options.try));
7886
7886
  } catch (err) {
7887
- return fail$6(internalCall(() => options.catch(err)));
7887
+ return fail$7(internalCall(() => options.catch(err)));
7888
7888
  }
7889
7889
  });
7890
7890
  /** @internal */
7891
7891
  const promise$1 = (evaluate$1) => callbackOptions(function(resume, signal) {
7892
- internalCall(() => evaluate$1(signal)).then((a) => resume(succeed$4(a)), (e) => resume(die$4(e)));
7892
+ internalCall(() => evaluate$1(signal)).then((a) => resume(succeed$5(a)), (e) => resume(die$4(e)));
7893
7893
  }, evaluate$1.length !== 0);
7894
7894
  /** @internal */
7895
7895
  const tryPromise$1 = (options) => {
@@ -7897,18 +7897,18 @@ const tryPromise$1 = (options) => {
7897
7897
  const catcher = typeof options === "function" ? (cause) => new UnknownError$1(cause, "An error occurred in Effect.tryPromise") : options.catch;
7898
7898
  return callbackOptions(function(resume, signal) {
7899
7899
  try {
7900
- internalCall(() => f(signal)).then((a) => resume(succeed$4(a)), (e) => resume(fail$6(internalCall(() => catcher(e)))));
7900
+ internalCall(() => f(signal)).then((a) => resume(succeed$5(a)), (e) => resume(fail$7(internalCall(() => catcher(e)))));
7901
7901
  } catch (err) {
7902
- resume(fail$6(internalCall(() => catcher(err))));
7902
+ resume(fail$7(internalCall(() => catcher(err))));
7903
7903
  }
7904
7904
  }, eval.length !== 0);
7905
7905
  };
7906
7906
  /** @internal */
7907
7907
  const withFiberId = (f) => withFiber$1((fiber$2) => f(fiber$2.id));
7908
7908
  /** @internal */
7909
- const fiber$1 = /* @__PURE__ */ withFiber$1(succeed$4);
7909
+ const fiber$1 = /* @__PURE__ */ withFiber$1(succeed$5);
7910
7910
  /** @internal */
7911
- const fiberId$1 = /* @__PURE__ */ withFiberId(succeed$4);
7911
+ const fiberId$1 = /* @__PURE__ */ withFiberId(succeed$5);
7912
7912
  const callbackOptions = /* @__PURE__ */ makePrimitive$1({
7913
7913
  op: "Async",
7914
7914
  single: false,
@@ -8015,7 +8015,7 @@ const fromIteratorEagerUnsafe = (evaluate$1) => {
8015
8015
  let value = void 0;
8016
8016
  while (true) {
8017
8017
  const state = iterator$1.next(value);
8018
- if (state.done) return succeed$4(state.value);
8018
+ if (state.done) return succeed$5(state.value);
8019
8019
  const effect$1 = state.value.asEffect();
8020
8020
  const primitive = effect$1;
8021
8021
  if (primitive && primitive._tag === "Success") {
@@ -8043,7 +8043,7 @@ const fromIteratorUnsafe = /* @__PURE__ */ makePrimitive$1({
8043
8043
  const iter = this[args][0];
8044
8044
  while (true) {
8045
8045
  const state = iter.next(value);
8046
- if (state.done) return succeed$4(state.value);
8046
+ if (state.done) return succeed$5(state.value);
8047
8047
  const eff = state.value.asEffect();
8048
8048
  if (!effectIsExit(eff)) {
8049
8049
  fiber$2._stack.push(this);
@@ -8058,31 +8058,31 @@ const fromIteratorUnsafe = /* @__PURE__ */ makePrimitive$1({
8058
8058
  });
8059
8059
  /** @internal */
8060
8060
  const as$1 = /* @__PURE__ */ dual(2, (self$1, value) => {
8061
- const b = succeed$4(value);
8061
+ const b = succeed$5(value);
8062
8062
  return flatMap$2(self$1, (_) => b);
8063
8063
  });
8064
8064
  /** @internal */
8065
8065
  const asSome$1 = (self$1) => map$7(self$1, some);
8066
8066
  /** @internal */
8067
8067
  const flip$2 = (self$1) => matchEffect$2(self$1, {
8068
- onFailure: succeed$4,
8069
- onSuccess: fail$6
8068
+ onFailure: succeed$5,
8069
+ onSuccess: fail$7
8070
8070
  });
8071
8071
  /** @internal */
8072
8072
  const andThen$1 = /* @__PURE__ */ dual(2, (self$1, f) => flatMap$2(self$1, (a) => {
8073
8073
  if (isEffect$1(f)) return f;
8074
8074
  const value = typeof f === "function" ? internalCall(() => f(a)) : f;
8075
- return isEffect$1(value) ? value : succeed$4(value);
8075
+ return isEffect$1(value) ? value : succeed$5(value);
8076
8076
  }));
8077
8077
  /** @internal */
8078
8078
  const tap$1 = /* @__PURE__ */ dual(2, (self$1, f) => flatMap$2(self$1, (a) => {
8079
8079
  const value = isEffect$1(f) ? f : typeof f === "function" ? internalCall(() => f(a)) : f;
8080
- return isEffect$1(value) ? as$1(value, a) : succeed$4(a);
8080
+ return isEffect$1(value) ? as$1(value, a) : succeed$5(a);
8081
8081
  }));
8082
8082
  /** @internal */
8083
8083
  const asVoid$2 = (self$1) => flatMap$2(self$1, (_) => exitVoid);
8084
8084
  /** @internal */
8085
- const sandbox$1 = (self$1) => catchCause$2(self$1, fail$6);
8085
+ const sandbox$1 = (self$1) => catchCause$2(self$1, fail$7);
8086
8086
  /** @internal */
8087
8087
  const raceAll$1 = (all$2, options) => withFiber$1((parent) => callback$2((resume) => {
8088
8088
  const effects = fromIterable$2(all$2);
@@ -8176,7 +8176,7 @@ const flatMapEager$1 = /* @__PURE__ */ dual(2, (self$1, f) => {
8176
8176
  /** @internal */
8177
8177
  const flatten$1 = (self$1) => flatMap$2(self$1, identity);
8178
8178
  /** @internal */
8179
- const map$7 = /* @__PURE__ */ dual(2, (self$1, f) => flatMap$2(self$1, (a) => succeed$4(internalCall(() => f(a)))));
8179
+ const map$7 = /* @__PURE__ */ dual(2, (self$1, f) => flatMap$2(self$1, (a) => succeed$5(internalCall(() => f(a)))));
8180
8180
  /** @internal */
8181
8181
  const mapEager$1 = /* @__PURE__ */ dual(2, (self$1, f) => effectIsExit(self$1) ? exitMap(self$1, f) : map$7(self$1, f));
8182
8182
  /** @internal */
@@ -8198,15 +8198,15 @@ const exitInterrupt$1 = (fiberId$2) => exitFailCause(causeInterrupt(fiberId$2));
8198
8198
  /** @internal */
8199
8199
  const exitIsSuccess = (self$1) => self$1._tag === "Success";
8200
8200
  /** @internal */
8201
- const exitFilterSuccess = (self$1) => self$1._tag === "Success" ? self$1 : fail$7(self$1);
8201
+ const exitFilterSuccess = (self$1) => self$1._tag === "Success" ? self$1 : fail$8(self$1);
8202
8202
  /** @internal */
8203
- const exitFilterValue = (self$1) => self$1._tag === "Success" ? self$1.value : fail$7(self$1);
8203
+ const exitFilterValue = (self$1) => self$1._tag === "Success" ? self$1.value : fail$8(self$1);
8204
8204
  /** @internal */
8205
8205
  const exitIsFailure = (self$1) => self$1._tag === "Failure";
8206
8206
  /** @internal */
8207
- const exitFilterFailure = (self$1) => self$1._tag === "Failure" ? self$1 : fail$7(self$1);
8207
+ const exitFilterFailure = (self$1) => self$1._tag === "Failure" ? self$1 : fail$8(self$1);
8208
8208
  /** @internal */
8209
- const exitFilterCause = (self$1) => self$1._tag === "Failure" ? self$1.cause : fail$7(self$1);
8209
+ const exitFilterCause = (self$1) => self$1._tag === "Failure" ? self$1.cause : fail$8(self$1);
8210
8210
  /** @internal */
8211
8211
  const exitFilterError = /* @__PURE__ */ composePassthrough(exitFilterCause, causeFilterError);
8212
8212
  /** @internal */
@@ -8261,9 +8261,9 @@ const exitGetError = (self$1) => {
8261
8261
  /** @internal */
8262
8262
  const service$1 = fromYieldable$1;
8263
8263
  /** @internal */
8264
- const serviceOption$1 = (service$2) => withFiber$1((fiber$2) => succeed$4(getOption(fiber$2.services, service$2)));
8264
+ const serviceOption$1 = (service$2) => withFiber$1((fiber$2) => succeed$5(getOption(fiber$2.services, service$2)));
8265
8265
  /** @internal */
8266
- const serviceOptional = (service$2) => withFiber$1((fiber$2) => fiber$2.services.mapUnsafe.has(service$2.key) ? succeed$4(getUnsafe(fiber$2.services, service$2)) : fail$6(new NoSuchElementError$1()));
8266
+ const serviceOptional = (service$2) => withFiber$1((fiber$2) => fiber$2.services.mapUnsafe.has(service$2.key) ? succeed$5(getUnsafe(fiber$2.services, service$2)) : fail$7(new NoSuchElementError$1()));
8267
8267
  /** @internal */
8268
8268
  const updateServices$1 = /* @__PURE__ */ dual(2, (self$1, f) => withFiber$1((fiber$2) => {
8269
8269
  const prev = fiber$2.services;
@@ -8288,7 +8288,7 @@ const updateService$1 = /* @__PURE__ */ dual(3, (self$1, service$2, f) => withFi
8288
8288
  }));
8289
8289
  /** @internal */
8290
8290
  const services$1 = () => getServiceMap;
8291
- const getServiceMap = /* @__PURE__ */ withFiber$1((fiber$2) => succeed$4(fiber$2.services));
8291
+ const getServiceMap = /* @__PURE__ */ withFiber$1((fiber$2) => succeed$5(fiber$2.services));
8292
8292
  /** @internal */
8293
8293
  const servicesWith$1 = (f) => withFiber$1((fiber$2) => f(fiber$2.services));
8294
8294
  /** @internal */
@@ -8314,7 +8314,7 @@ const withConcurrency$1 = /* @__PURE__ */ provideService$1(CurrentConcurrency);
8314
8314
  const zip$1 = /* @__PURE__ */ dual((args$1) => isEffect$1(args$1[1]), (self$1, that, options) => zipWith$1(self$1, that, (a, a2) => [a, a2], options));
8315
8315
  /** @internal */
8316
8316
  const zipWith$1 = /* @__PURE__ */ dual((args$1) => isEffect$1(args$1[1]), (self$1, that, f, options) => options?.concurrent ? map$7(all$1([self$1, that], { concurrency: 2 }), ([a, a2]) => internalCall(() => f(a, a2))) : flatMap$2(self$1, (a) => map$7(that, (a2) => internalCall(() => f(a, a2)))));
8317
- const filterOrFail$1 = /* @__PURE__ */ dual((args$1) => isEffect$1(args$1[0]), (self$1, predicate, orFailWith) => filterOrElse$1(self$1, predicate, orFailWith ? (a) => fail$6(orFailWith(a)) : () => fail$6(new NoSuchElementError$1())));
8317
+ const filterOrFail$1 = /* @__PURE__ */ dual((args$1) => isEffect$1(args$1[0]), (self$1, predicate, orFailWith) => filterOrElse$1(self$1, predicate, orFailWith ? (a) => fail$7(orFailWith(a)) : () => fail$7(new NoSuchElementError$1())));
8318
8318
  /** @internal */
8319
8319
  const when$1 = /* @__PURE__ */ dual(2, (self$1, condition) => flatMap$2(isEffect$1(condition) ? condition : sync$1(condition), (pass) => pass ? asSome$1(self$1) : succeedNone$1));
8320
8320
  /** @internal */
@@ -8355,7 +8355,7 @@ const tapCause$1 = /* @__PURE__ */ dual(2, (self$1, f) => catchCause$2(self$1, (
8355
8355
  /** @internal */
8356
8356
  const tapCauseFilter$1 = /* @__PURE__ */ dual(3, (self$1, filter$6, f) => catchCauseFilter$2(self$1, (cause) => {
8357
8357
  const result$2 = filter$6(cause);
8358
- return isFail(result$2) ? fail$7(cause) : result$2;
8358
+ return isFail(result$2) ? fail$8(cause) : result$2;
8359
8359
  }, (failure, cause) => andThen$1(internalCall(() => f(failure, cause)), failCause$4(cause))));
8360
8360
  /** @internal */
8361
8361
  const tapError$1 = /* @__PURE__ */ dual(2, (self$1, f) => tapCauseFilter$1(self$1, causeFilterError, (e) => f(e)));
@@ -8373,13 +8373,13 @@ const catchTags$1 = /* @__PURE__ */ dual(2, (self$1, cases) => {
8373
8373
  let keys$1;
8374
8374
  return catchFilter$1(self$1, (e) => {
8375
8375
  keys$1 ??= Object.keys(cases);
8376
- return hasProperty(e, "_tag") && isString$1(e["_tag"]) && keys$1.includes(e["_tag"]) ? e : fail$7(e);
8376
+ return hasProperty(e, "_tag") && isString$1(e["_tag"]) && keys$1.includes(e["_tag"]) ? e : fail$8(e);
8377
8377
  }, (e) => internalCall(() => cases[e["_tag"]](e)));
8378
8378
  });
8379
8379
  /** @internal */
8380
8380
  const catchReason$1 = /* @__PURE__ */ dual(4, (self$1, errorTag, reasonTag, f) => catchFilter$1(self$1, (e) => {
8381
8381
  if (isTagged(e, errorTag) && hasProperty(e, "reason") && isTagged(e.reason, reasonTag)) return e.reason;
8382
- return fail$7(e);
8382
+ return fail$8(e);
8383
8383
  }, f));
8384
8384
  /** @internal */
8385
8385
  const catchReasons$1 = /* @__PURE__ */ dual(3, (self$1, errorTag, cases) => {
@@ -8387,14 +8387,14 @@ const catchReasons$1 = /* @__PURE__ */ dual(3, (self$1, errorTag, cases) => {
8387
8387
  return catchFilter$1(self$1, (e) => {
8388
8388
  keys$1 ??= Object.keys(cases);
8389
8389
  if (isTagged(e, errorTag) && hasProperty(e, "reason") && hasProperty(e.reason, "_tag") && isString$1(e.reason._tag) && keys$1.includes(e.reason._tag)) return e.reason;
8390
- return fail$7(e);
8390
+ return fail$8(e);
8391
8391
  }, (reason) => internalCall(() => cases[reason._tag](reason)));
8392
8392
  });
8393
8393
  /** @internal */
8394
8394
  const unwrapReason$1 = /* @__PURE__ */ dual(2, (self$1, errorTag) => catchFilter$1(self$1, (e) => {
8395
8395
  if (isTagged(e, errorTag) && hasProperty(e, "reason")) return e.reason;
8396
- return fail$7(e);
8397
- }, fail$6));
8396
+ return fail$8(e);
8397
+ }, fail$7));
8398
8398
  /** @internal */
8399
8399
  const mapError$4 = /* @__PURE__ */ dual(2, (self$1, f) => catch_$2(self$1, (error$1) => failSync$1(() => f(error$1))));
8400
8400
  const mapBoth$2 = /* @__PURE__ */ dual(2, (self$1, options) => matchEffect$2(self$1, {
@@ -8419,8 +8419,8 @@ const option$1 = (self$1) => match$4(self$1, {
8419
8419
  });
8420
8420
  /** @internal */
8421
8421
  const result$1 = (self$1) => matchEager$1(self$1, {
8422
- onFailure: fail$8,
8423
- onSuccess: succeed$5
8422
+ onFailure: fail$9,
8423
+ onSuccess: succeed$6
8424
8424
  });
8425
8425
  /** @internal */
8426
8426
  const matchCauseEffect$1 = /* @__PURE__ */ dual(2, (self$1, options) => {
@@ -8445,8 +8445,8 @@ const matchCause$1 = /* @__PURE__ */ dual(2, (self$1, options) => matchCauseEffe
8445
8445
  /** @internal */
8446
8446
  const matchEffect$2 = /* @__PURE__ */ dual(2, (self$1, options) => matchCauseEffect$1(self$1, {
8447
8447
  onFailure: (cause) => {
8448
- const fail$10 = cause.failures.find(failureIsFail$1);
8449
- return fail$10 ? internalCall(() => options.onFailure(fail$10.error)) : failCause$4(cause);
8448
+ const fail$11 = cause.failures.find(failureIsFail$1);
8449
+ return fail$11 ? internalCall(() => options.onFailure(fail$11.error)) : failCause$4(cause);
8450
8450
  },
8451
8451
  onSuccess: options.onSuccess
8452
8452
  }));
@@ -8482,10 +8482,10 @@ const exitPrimitive = /* @__PURE__ */ makePrimitive$1({
8482
8482
  return this[args];
8483
8483
  },
8484
8484
  [contA](value, _, exit$2) {
8485
- return succeed$4(exit$2 ?? exitSucceed(value));
8485
+ return succeed$5(exit$2 ?? exitSucceed(value));
8486
8486
  },
8487
8487
  [contE](cause, _, exit$2) {
8488
- return succeed$4(exit$2 ?? exitFailCause(cause));
8488
+ return succeed$5(exit$2 ?? exitFailCause(cause));
8489
8489
  }
8490
8490
  });
8491
8491
  /** @internal */
@@ -8505,7 +8505,7 @@ const timeoutOrElse$1 = /* @__PURE__ */ dual(2, (self$1, options) => raceFirst$1
8505
8505
  /** @internal */
8506
8506
  const timeout$1 = /* @__PURE__ */ dual(2, (self$1, duration) => timeoutOrElse$1(self$1, {
8507
8507
  duration,
8508
- onTimeout: () => fail$6(new TimeoutError$1())
8508
+ onTimeout: () => fail$7(new TimeoutError$1())
8509
8509
  }));
8510
8510
  /** @internal */
8511
8511
  const timeoutOption$1 = /* @__PURE__ */ dual(2, (self$1, duration) => raceFirst$1(asSome$1(self$1), as$1(sleep$1(duration), none$3())));
@@ -8777,7 +8777,7 @@ const forEach$2 = /* @__PURE__ */ dual((args$1) => typeof args$1[1] === "functio
8777
8777
  if (concurrency$1 === 1) return forEachSequential(iterable, f, options);
8778
8778
  const items = fromIterable$2(iterable);
8779
8779
  let length = items.length;
8780
- if (length === 0) return options?.discard ? void_$3 : succeed$4([]);
8780
+ if (length === 0) return options?.discard ? void_$3 : succeed$5([]);
8781
8781
  const out = options?.discard ? void 0 : new Array(length);
8782
8782
  let index = 0;
8783
8783
  const annotations$1 = fiberStackAnnotations(parent);
@@ -8814,7 +8814,7 @@ const forEach$2 = /* @__PURE__ */ dual((args$1) => typeof args$1[1] === "functio
8814
8814
  else if (out !== void 0) out[currentIndex] = exit$2.value;
8815
8815
  doneCount++;
8816
8816
  inProgress--;
8817
- if (doneCount === length) resume(failures.length > 0 ? exitFailCause(causeFromFailures(failures)) : succeed$4(out));
8817
+ if (doneCount === length) resume(failures.length > 0 ? exitFailCause(causeFromFailures(failures)) : succeed$5(out));
8818
8818
  else if (!pumping && !failed && inProgress < concurrency$1) pump();
8819
8819
  });
8820
8820
  } catch (err) {
@@ -8848,7 +8848,7 @@ const forEachSequential = (iterable, f, options) => suspend$3(() => {
8848
8848
  }
8849
8849
  }), out);
8850
8850
  });
8851
- const filterOrElse$1 = /* @__PURE__ */ dual(3, (self$1, predicate, orElse) => flatMap$2(self$1, (a) => predicate(a) ? succeed$4(a) : orElse(a)));
8851
+ const filterOrElse$1 = /* @__PURE__ */ dual(3, (self$1, predicate, orElse$1) => flatMap$2(self$1, (a) => predicate(a) ? succeed$5(a) : orElse$1(a)));
8852
8852
  /** @internal */
8853
8853
  const filter$2 = /* @__PURE__ */ dual((args$1) => isIterable(args$1[0]) && !isEffect$1(args$1[0]), (elements, predicate, options) => suspend$3(() => {
8854
8854
  const out = [];
@@ -8862,7 +8862,7 @@ const filter$2 = /* @__PURE__ */ dual((args$1) => isIterable(args$1[0]) && !isEf
8862
8862
  /** @internal */
8863
8863
  const forkChild$1 = /* @__PURE__ */ dual((args$1) => isEffect$1(args$1[0]), (self$1, options) => withFiber$1((fiber$2) => {
8864
8864
  interruptChildrenPatch();
8865
- return succeed$4(forkUnsafe$1(fiber$2, self$1, options?.startImmediately, false, options?.uninterruptible ?? false));
8865
+ return succeed$5(forkUnsafe$1(fiber$2, self$1, options?.startImmediately, false, options?.uninterruptible ?? false));
8866
8866
  }));
8867
8867
  /** @internal */
8868
8868
  const forkUnsafe$1 = (parent, effect$1, immediate = false, daemon = false, uninterruptible$2 = false) => {
@@ -8877,7 +8877,7 @@ const forkUnsafe$1 = (parent, effect$1, immediate = false, daemon = false, unint
8877
8877
  return child;
8878
8878
  };
8879
8879
  /** @internal */
8880
- const forkDetach$1 = /* @__PURE__ */ dual((args$1) => isEffect$1(args$1[0]), (self$1, options) => withFiber$1((fiber$2) => succeed$4(forkUnsafe$1(fiber$2, self$1, options?.startImmediately, true, options?.uninterruptible))));
8880
+ const forkDetach$1 = /* @__PURE__ */ dual((args$1) => isEffect$1(args$1[0]), (self$1, options) => withFiber$1((fiber$2) => succeed$5(forkUnsafe$1(fiber$2, self$1, options?.startImmediately, true, options?.uninterruptible))));
8881
8881
  /** @internal */
8882
8882
  const forkIn$1 = /* @__PURE__ */ dual((args$1) => isEffect$1(args$1[0]), (self$1, scope$2, options) => withFiber$1((parent) => {
8883
8883
  const fiber$2 = forkUnsafe$1(parent, self$1, options?.startImmediately, true, options?.uninterruptible);
@@ -8887,7 +8887,7 @@ const forkIn$1 = /* @__PURE__ */ dual((args$1) => isEffect$1(args$1[0]), (self$1
8887
8887
  scopeAddFinalizerUnsafe(scope$2, key, finalizer);
8888
8888
  fiber$2.addObserver(() => scopeRemoveFinalizerUnsafe(scope$2, key));
8889
8889
  } else fiber$2.interruptUnsafe(parent.id, fiberStackAnnotations(parent));
8890
- return succeed$4(fiber$2);
8890
+ return succeed$5(fiber$2);
8891
8891
  }));
8892
8892
  /** @internal */
8893
8893
  const forkScoped$1 = /* @__PURE__ */ dual((args$1) => isEffect$1(args$1[0]), (self$1, options) => flatMap$2(scope$1, (scope$2) => forkIn$1(self$1, scope$2, options)));
@@ -8995,7 +8995,7 @@ var Semaphore = class {
8995
8995
  if (this.free < n) return;
8996
8996
  this.waiters.delete(observer);
8997
8997
  this.taken += n;
8998
- resume(succeed$4(n));
8998
+ resume(succeed$5(n));
8999
8999
  };
9000
9000
  this.waiters.add(observer);
9001
9001
  return sync$1(() => {
@@ -9003,7 +9003,7 @@ var Semaphore = class {
9003
9003
  });
9004
9004
  }
9005
9005
  this.taken += n;
9006
- return resume(succeed$4(n));
9006
+ return resume(succeed$5(n));
9007
9007
  });
9008
9008
  updateTakenUnsafe(fiber$2, f) {
9009
9009
  this.taken = f(this.taken);
@@ -9015,7 +9015,7 @@ var Semaphore = class {
9015
9015
  item = iter.next();
9016
9016
  }
9017
9017
  }, 0);
9018
- return succeed$4(this.free);
9018
+ return succeed$5(this.free);
9019
9019
  }
9020
9020
  updateTaken(f) {
9021
9021
  return withFiber$1((fiber$2) => this.updateTakenUnsafe(fiber$2, f));
@@ -9039,8 +9039,8 @@ var Semaphore = class {
9039
9039
  const makeSemaphoreUnsafe$1 = (permits) => new Semaphore(permits);
9040
9040
  /** @internal */
9041
9041
  const makeSemaphore$1 = (permits) => sync$1(() => makeSemaphoreUnsafe$1(permits));
9042
- const succeedTrue = /* @__PURE__ */ succeed$4(true);
9043
- const succeedFalse = /* @__PURE__ */ succeed$4(false);
9042
+ const succeedTrue = /* @__PURE__ */ succeed$5(true);
9043
+ const succeedFalse = /* @__PURE__ */ succeed$5(false);
9044
9044
  var Latch = class {
9045
9045
  waiters = [];
9046
9046
  scheduled = false;
@@ -9093,7 +9093,7 @@ const makeLatchUnsafe$1 = (open$1) => new Latch(open$1 ?? false);
9093
9093
  /** @internal */
9094
9094
  const makeLatch$1 = (open$1) => sync$1(() => makeLatchUnsafe$1(open$1));
9095
9095
  /** @internal */
9096
- const tracer$2 = /* @__PURE__ */ withFiber$1((fiber$2) => succeed$4(fiber$2.getRef(Tracer)));
9096
+ const tracer$2 = /* @__PURE__ */ withFiber$1((fiber$2) => succeed$5(fiber$2.getRef(Tracer)));
9097
9097
  /** @internal */
9098
9098
  const withTracer$1 = /* @__PURE__ */ dual(2, (effect$1, tracer$3) => provideService$1(effect$1, Tracer, tracer$3));
9099
9099
  /** @internal */
@@ -9149,7 +9149,7 @@ const makeSpanUnsafe = (fiber$2, name, options) => {
9149
9149
  return span;
9150
9150
  };
9151
9151
  /** @internal */
9152
- const makeSpan$1 = (name, options) => withFiber$1((fiber$2) => succeed$4(makeSpanUnsafe(fiber$2, name, options)));
9152
+ const makeSpan$1 = (name, options) => withFiber$1((fiber$2) => succeed$5(makeSpanUnsafe(fiber$2, name, options)));
9153
9153
  /** @internal */
9154
9154
  const makeSpanScoped$1 = (name, options) => uninterruptible$1(withFiber$1((fiber$2) => {
9155
9155
  const scope$2 = getUnsafe(fiber$2.services, scopeTag);
@@ -9251,7 +9251,7 @@ const annotateCurrentSpan$1 = (...args$1) => withFiber$1((fiber$2) => {
9251
9251
  /** @internal */
9252
9252
  const currentSpan$1 = /* @__PURE__ */ withFiber$1((fiber$2) => {
9253
9253
  const span = fiber$2.currentSpanLocal;
9254
- return span ? succeed$4(span) : fail$6(new NoSuchElementError$1());
9254
+ return span ? succeed$5(span) : fail$7(new NoSuchElementError$1());
9255
9255
  });
9256
9256
  /** @internal */
9257
9257
  const currentParentSpan$1 = /* @__PURE__ */ serviceOptional(ParentSpan);
@@ -9488,7 +9488,7 @@ function interruptChildrenPatch() {
9488
9488
  fiberMiddleware.interruptChildren ??= fiberInterruptChildren;
9489
9489
  }
9490
9490
  /** @internal */
9491
- const undefined_$2 = /* @__PURE__ */ succeed$4(void 0);
9491
+ const undefined_$2 = /* @__PURE__ */ succeed$5(void 0);
9492
9492
 
9493
9493
  //#endregion
9494
9494
  //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@004c047_46460a9e85a4dd43b15f8b036d8d1a97/node_modules/effect/dist/Exit.js
@@ -9527,7 +9527,7 @@ const isExit = isExit$1;
9527
9527
  * @category constructors
9528
9528
  * @since 2.0.0
9529
9529
  */
9530
- const succeed$3 = exitSucceed;
9530
+ const succeed$4 = exitSucceed;
9531
9531
  /**
9532
9532
  * Creates a failed `Exit` from a `Cause`.
9533
9533
  *
@@ -9558,7 +9558,7 @@ const failCause$3 = exitFailCause;
9558
9558
  * @category constructors
9559
9559
  * @since 2.0.0
9560
9560
  */
9561
- const fail$5 = exitFail;
9561
+ const fail$6 = exitFail;
9562
9562
  /**
9563
9563
  * Creates a failed `Exit` from a defect (unexpected error).
9564
9564
  *
@@ -9913,7 +9913,7 @@ const makeUnsafe$6 = () => {
9913
9913
  * @since 2.0.0
9914
9914
  * @category constructors
9915
9915
  */
9916
- const make$44 = () => sync$1(() => makeUnsafe$6());
9916
+ const make$45 = () => sync$1(() => makeUnsafe$6());
9917
9917
  const _await = (self$1) => callback$2((resume) => {
9918
9918
  if (self$1.effect) return resume(self$1.effect);
9919
9919
  self$1.resumes ??= [];
@@ -10016,7 +10016,7 @@ const isDoneUnsafe = (self$1) => self$1.effect !== void 0;
10016
10016
  * @since 2.0.0
10017
10017
  * @category utils
10018
10018
  */
10019
- const succeed$2 = /* @__PURE__ */ dual(2, (self$1, value) => done$1(self$1, exitSucceed(value)));
10019
+ const succeed$3 = /* @__PURE__ */ dual(2, (self$1, value) => done$1(self$1, exitSucceed(value)));
10020
10020
  /**
10021
10021
  * Unsafely exits the `Deferred` with the specified `Exit` value, which will be
10022
10022
  * propagated to all fibers waiting on the value of the `Deferred`.
@@ -10150,7 +10150,7 @@ const Scope = scopeTag;
10150
10150
  * @category constructors
10151
10151
  * @since 2.0.0
10152
10152
  */
10153
- const make$43 = scopeMake;
10153
+ const make$44 = scopeMake;
10154
10154
  /**
10155
10155
  * Creates a new `Scope` synchronously without wrapping it in an `Effect`.
10156
10156
  * This is useful when you need a scope immediately but should be used with caution
@@ -10702,9 +10702,9 @@ const buildWithScope = /* @__PURE__ */ dual(2, (self$1, scope$2) => suspend$3(()
10702
10702
  * @since 2.0.0
10703
10703
  * @category constructors
10704
10704
  */
10705
- const succeed$1 = function() {
10706
- if (arguments.length === 1) return (resource) => succeedServices(make$46(arguments[0], resource));
10707
- return succeedServices(make$46(arguments[0], arguments[1]));
10705
+ const succeed$2 = function() {
10706
+ if (arguments.length === 1) return (resource) => succeedServices(make$47(arguments[0], resource));
10707
+ return succeedServices(make$47(arguments[0], arguments[1]));
10708
10708
  };
10709
10709
  /**
10710
10710
  * Constructs a layer from the specified value, which must return one or more
@@ -10740,7 +10740,7 @@ const succeed$1 = function() {
10740
10740
  * @since 2.0.0
10741
10741
  * @category constructors
10742
10742
  */
10743
- const succeedServices = (services$2) => fromBuildUnsafe(constant(succeed$4(services$2)));
10743
+ const succeedServices = (services$2) => fromBuildUnsafe(constant(succeed$5(services$2)));
10744
10744
  /**
10745
10745
  * Constructs a layer from the specified scoped effect.
10746
10746
  *
@@ -10771,7 +10771,7 @@ const effect = function() {
10771
10771
  const effectOrFn = arguments[1];
10772
10772
  return typeof effectOrFn === "function" ? (...args$1) => effectImpl(arguments[0], suspend$3(() => effectOrFn(...args$1))) : effectImpl(arguments[0], effectOrFn);
10773
10773
  };
10774
- const effectImpl = (service$2, effect$1) => effectServices(map$7(effect$1, (value) => make$46(service$2, value)));
10774
+ const effectImpl = (service$2, effect$1) => effectServices(map$7(effect$1, (value) => make$47(service$2, value)));
10775
10775
  /**
10776
10776
  * Constructs a layer from the specified scoped effect, which must return one
10777
10777
  * or more services.
@@ -11161,7 +11161,7 @@ const Proto$17 = {
11161
11161
  [TypeId$49]: TypeId$49,
11162
11162
  get withRequirements() {
11163
11163
  const self$1 = this;
11164
- return servicesWith$1((services$2) => succeed$4(makeProto$1(self$1.steps.map((step) => ({
11164
+ return servicesWith$1((services$2) => succeed$5(makeProto$1(self$1.steps.map((step) => ({
11165
11165
  ...step,
11166
11166
  provide: isLayer(step.provide) ? provide$3(step.provide, succeedServices(services$2)) : step.provide
11167
11167
  })))));
@@ -11452,7 +11452,7 @@ const empty$9 = causeEmpty;
11452
11452
  * @category constructors
11453
11453
  * @since 2.0.0
11454
11454
  */
11455
- const fail$4 = causeFail;
11455
+ const fail$5 = causeFail;
11456
11456
  /**
11457
11457
  * Creates a `Cause` that represents an unrecoverable defect.
11458
11458
  *
@@ -12000,7 +12000,7 @@ const ProtoTimeZoneNamed = {
12000
12000
  ...ProtoTimeZone,
12001
12001
  _tag: "Named",
12002
12002
  [symbol$3]() {
12003
- return string$6(`Named:${this.id}`);
12003
+ return string$7(`Named:${this.id}`);
12004
12004
  },
12005
12005
  [symbol$2](that) {
12006
12006
  return isTimeZone$1(that) && that._tag === "Named" && this.id === that.id;
@@ -12020,7 +12020,7 @@ const ProtoTimeZoneOffset = {
12020
12020
  ...ProtoTimeZone,
12021
12021
  _tag: "Offset",
12022
12022
  [symbol$3]() {
12023
- return string$6(`Offset:${this.offset}`);
12023
+ return string$7(`Offset:${this.offset}`);
12024
12024
  },
12025
12025
  [symbol$2](that) {
12026
12026
  return isTimeZone$1(that) && that._tag === "Offset" && this.offset === that.offset;
@@ -12072,9 +12072,9 @@ const isUtc$1 = (self$1) => self$1._tag === "Utc";
12072
12072
  /** @internal */
12073
12073
  const isZoned$1 = (self$1) => self$1._tag === "Zoned";
12074
12074
  /** @internal */
12075
- const Equivalence$3 = /* @__PURE__ */ make$47((a, b) => a.epochMillis === b.epochMillis);
12075
+ const Equivalence$3 = /* @__PURE__ */ make$48((a, b) => a.epochMillis === b.epochMillis);
12076
12076
  /** @internal */
12077
- const Order$3 = /* @__PURE__ */ make$49((self$1, that) => self$1.epochMillis < that.epochMillis ? -1 : self$1.epochMillis > that.epochMillis ? 1 : 0);
12077
+ const Order$3 = /* @__PURE__ */ make$50((self$1, that) => self$1.epochMillis < that.epochMillis ? -1 : self$1.epochMillis > that.epochMillis ? 1 : 0);
12078
12078
  /** @internal */
12079
12079
  const clamp$1 = /* @__PURE__ */ clamp$2(Order$3);
12080
12080
  const makeUtc = (epochMillis) => {
@@ -12127,7 +12127,7 @@ const makeZonedUnsafe$1 = (input, options) => {
12127
12127
  /** @internal */
12128
12128
  const makeZoned$1 = /* @__PURE__ */ liftThrowable(makeZonedUnsafe$1);
12129
12129
  /** @internal */
12130
- const make$42 = /* @__PURE__ */ liftThrowable(makeUnsafe$4);
12130
+ const make$43 = /* @__PURE__ */ liftThrowable(makeUnsafe$4);
12131
12131
  const zonedStringRegExp = /^(.{17,35})\[(.+)\]$/;
12132
12132
  /** @internal */
12133
12133
  const makeZonedFromString$1 = (input) => {
@@ -12222,7 +12222,7 @@ const distance$1 = /* @__PURE__ */ dual(2, (self$1, other) => toEpochMillis$1(ot
12222
12222
  /** @internal */
12223
12223
  const distanceDurationResult$1 = /* @__PURE__ */ dual(2, (self$1, other) => {
12224
12224
  const diffMillis = distance$1(self$1, other);
12225
- return diffMillis > 0 ? succeed$5(millis(diffMillis)) : fail$8(millis(-diffMillis));
12225
+ return diffMillis > 0 ? succeed$6(millis(diffMillis)) : fail$9(millis(-diffMillis));
12226
12226
  });
12227
12227
  /** @internal */
12228
12228
  const distanceDuration$1 = /* @__PURE__ */ dual(2, (self$1, other) => millis(Math.abs(distance$1(self$1, other))));
@@ -12741,7 +12741,7 @@ const isHaltFailure = (failure) => failure._tag === "Fail" && isHalt(failure.err
12741
12741
  * @since 4.0.0
12742
12742
  * @category Halt
12743
12743
  */
12744
- const filterHalt = /* @__PURE__ */ composePassthrough(filterError, (e) => isHalt(e) ? e : fail$7(e));
12744
+ const filterHalt = /* @__PURE__ */ composePassthrough(filterError, (e) => isHalt(e) ? e : fail$8(e));
12745
12745
  /**
12746
12746
  * Filters a Cause to extract the leftover value from halt errors.
12747
12747
  *
@@ -12759,7 +12759,7 @@ const filterHalt = /* @__PURE__ */ composePassthrough(filterError, (e) => isHalt
12759
12759
  * @since 4.0.0
12760
12760
  * @category Halt
12761
12761
  */
12762
- const filterHaltLeftover = /* @__PURE__ */ composePassthrough(filterError, (e) => isHalt(e) ? e.leftover : fail$7(e));
12762
+ const filterHaltLeftover = /* @__PURE__ */ composePassthrough(filterError, (e) => isHalt(e) ? e.leftover : fail$8(e));
12763
12763
  /**
12764
12764
  * Creates a Pull that halts with the specified leftover value.
12765
12765
  *
@@ -12777,7 +12777,7 @@ const filterHaltLeftover = /* @__PURE__ */ composePassthrough(filterError, (e) =
12777
12777
  * @since 4.0.0
12778
12778
  * @category Halt
12779
12779
  */
12780
- const halt = (leftover) => fail$6(new Halt(leftover));
12780
+ const halt = (leftover) => fail$7(new Halt(leftover));
12781
12781
  /**
12782
12782
  * A pre-defined halt with void leftover, commonly used to signal completion.
12783
12783
  *
@@ -12795,7 +12795,7 @@ const halt = (leftover) => fail$6(new Halt(leftover));
12795
12795
  * @since 4.0.0
12796
12796
  * @category Halt
12797
12797
  */
12798
- const haltVoid = /* @__PURE__ */ fail$6(/* @__PURE__ */ new Halt(void 0));
12798
+ const haltVoid = /* @__PURE__ */ fail$7(/* @__PURE__ */ new Halt(void 0));
12799
12799
  /**
12800
12800
  * Converts a Cause into an Exit, extracting halt leftovers as success values.
12801
12801
  *
@@ -12815,7 +12815,7 @@ const haltVoid = /* @__PURE__ */ fail$6(/* @__PURE__ */ new Halt(void 0));
12815
12815
  */
12816
12816
  const haltExitFromCause = (cause) => {
12817
12817
  const halt$1 = filterHalt(cause);
12818
- return !isFail(halt$1) ? succeed$3(halt$1.leftover) : failCause$3(halt$1.fail);
12818
+ return !isFail(halt$1) ? succeed$4(halt$1.leftover) : failCause$3(halt$1.fail);
12819
12819
  };
12820
12820
  /**
12821
12821
  * Pattern matches on a Pull, handling success, failure, and halt cases.
@@ -12991,7 +12991,7 @@ const fromStepWithMetadata = (step) => fromStep(map$7(step, (f) => {
12991
12991
  * @since 4.0.0
12992
12992
  * @category destructors
12993
12993
  */
12994
- const toStep = (schedule) => catchCause$2(schedule.step, (cause) => succeed$4(() => failCause$4(cause)));
12994
+ const toStep = (schedule) => catchCause$2(schedule.step, (cause) => succeed$5(() => failCause$4(cause)));
12995
12995
  /**
12996
12996
  * Extracts a step function from a Schedule that provides metadata about each
12997
12997
  * execution. It will also handle sleeping for the computed delay.
@@ -13040,7 +13040,7 @@ const toStepWithMetadata = (schedule) => clockWith$2((clock) => map$7(toStep(sch
13040
13040
  * @category utilities
13041
13041
  */
13042
13042
  const passthrough$2 = (self$1) => fromStep(map$7(toStep(self$1), (step) => (now$2, input) => matchEffect$1(step(now$2, input), {
13043
- onSuccess: (result$2) => succeed$4([input, result$2[1]]),
13043
+ onSuccess: (result$2) => succeed$5([input, result$2[1]]),
13044
13044
  onFailure: failCause$4,
13045
13045
  onHalt: () => halt(input)
13046
13046
  })));
@@ -13150,7 +13150,7 @@ const recurs = (times) => while_(forever$1, ({ attempt }) => attempt <= times);
13150
13150
  */
13151
13151
  const spaced = (duration) => {
13152
13152
  const decoded = fromDurationInputUnsafe(duration);
13153
- return fromStepWithMetadata(succeed$4((meta) => succeed$4([meta.attempt - 1, decoded])));
13153
+ return fromStepWithMetadata(succeed$5((meta) => succeed$5([meta.attempt - 1, decoded])));
13154
13154
  };
13155
13155
  const while_ = /* @__PURE__ */ dual(2, (self$1, predicate) => fromStep(map$7(toStep(self$1), (step) => {
13156
13156
  const meta = metadataFn();
@@ -13161,7 +13161,7 @@ const while_ = /* @__PURE__ */ dual(2, (self$1, predicate) => fromStep(map$7(toS
13161
13161
  output,
13162
13162
  duration
13163
13163
  });
13164
- return isEffect$1(check) ? flatMap$2(check, (check$1) => check$1 ? succeed$4(result$2) : halt(output)) : check ? succeed$4(result$2) : halt(output);
13164
+ return isEffect$1(check) ? flatMap$2(check, (check$1) => check$1 ? succeed$5(result$2) : halt(output)) : check ? succeed$5(result$2) : halt(output);
13165
13165
  });
13166
13166
  })));
13167
13167
  /**
@@ -13202,14 +13202,14 @@ const provide$2 = /* @__PURE__ */ dual(2, (self$1, source) => isServiceMap(sourc
13202
13202
  //#endregion
13203
13203
  //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@004c047_46460a9e85a4dd43b15f8b036d8d1a97/node_modules/effect/dist/internal/schedule.js
13204
13204
  /** @internal */
13205
- const repeatOrElse$1 = /* @__PURE__ */ dual(3, (self$1, schedule, orElse) => flatMap$2(toStepWithMetadata(schedule), (step) => {
13205
+ const repeatOrElse$1 = /* @__PURE__ */ dual(3, (self$1, schedule, orElse$1) => flatMap$2(toStepWithMetadata(schedule), (step) => {
13206
13206
  let meta = CurrentMetadata.defaultValue();
13207
13207
  return catch_$2(forever$2(tap$1(flatMap$2(suspend$3(() => provideService$1(self$1, CurrentMetadata, meta)), step), (meta_) => {
13208
13208
  meta = meta_;
13209
- }), { autoYield: false }), (error$1) => isHalt(error$1) ? succeed$4(error$1.leftover) : orElse(error$1, meta.attempt === 0 ? none$3() : some(meta)));
13209
+ }), { autoYield: false }), (error$1) => isHalt(error$1) ? succeed$5(error$1.leftover) : orElse$1(error$1, meta.attempt === 0 ? none$3() : some(meta)));
13210
13210
  }));
13211
13211
  /** @internal */
13212
- const retryOrElse$1 = /* @__PURE__ */ dual(3, (self$1, policy, orElse) => flatMap$2(toStepWithMetadata(policy), (step) => {
13212
+ const retryOrElse$1 = /* @__PURE__ */ dual(3, (self$1, policy, orElse$1) => flatMap$2(toStepWithMetadata(policy), (step) => {
13213
13213
  let meta = CurrentMetadata.defaultValue();
13214
13214
  let lastError;
13215
13215
  const loop = catch_$2(suspend$3(() => provideService$1(self$1, CurrentMetadata, meta)), (error$1) => {
@@ -13219,12 +13219,12 @@ const retryOrElse$1 = /* @__PURE__ */ dual(3, (self$1, policy, orElse) => flatMa
13219
13219
  return loop;
13220
13220
  });
13221
13221
  });
13222
- return catchHalt(loop, (out) => internalCall(() => orElse(lastError, out)));
13222
+ return catchHalt(loop, (out) => internalCall(() => orElse$1(lastError, out)));
13223
13223
  }));
13224
13224
  /** @internal */
13225
- const repeat$1 = /* @__PURE__ */ dual(2, (self$1, options) => repeatOrElse$1(self$1, isSchedule(options) ? options : buildFromOptions(options), fail$6));
13225
+ const repeat$1 = /* @__PURE__ */ dual(2, (self$1, options) => repeatOrElse$1(self$1, isSchedule(options) ? options : buildFromOptions(options), fail$7));
13226
13226
  /** @internal */
13227
- const retry$2 = /* @__PURE__ */ dual(2, (self$1, options) => retryOrElse$1(self$1, isSchedule(options) ? options : buildFromOptions(options), fail$6));
13227
+ const retry$2 = /* @__PURE__ */ dual(2, (self$1, options) => retryOrElse$1(self$1, isSchedule(options) ? options : buildFromOptions(options), fail$7));
13228
13228
  /** @internal */
13229
13229
  const scheduleFrom$1 = /* @__PURE__ */ dual(3, (self$1, initial, schedule) => flatMap$2(toStepWithMetadata(schedule), (step) => {
13230
13230
  let meta = CurrentMetadata.defaultValue();
@@ -13239,7 +13239,7 @@ const scheduleFrom$1 = /* @__PURE__ */ dual(3, (self$1, initial, schedule) => fl
13239
13239
  meta = meta_$1;
13240
13240
  }
13241
13241
  });
13242
- }), (error$1) => isHalt(error$1) ? succeed$4(error$1.leftover) : fail$6(error$1));
13242
+ }), (error$1) => isHalt(error$1) ? succeed$5(error$1.leftover) : fail$7(error$1));
13243
13243
  }));
13244
13244
  const passthroughForever = /* @__PURE__ */ passthrough$2(forever$1);
13245
13245
  /** @internal */
@@ -13843,7 +13843,7 @@ const tryPromise = tryPromise$1;
13843
13843
  * @since 2.0.0
13844
13844
  * @category Creating Effects
13845
13845
  */
13846
- const succeed = succeed$4;
13846
+ const succeed$1 = succeed$5;
13847
13847
  /**
13848
13848
  * Returns an effect which succeeds with `None`.
13849
13849
  *
@@ -14142,7 +14142,7 @@ const gen = gen$1;
14142
14142
  * @since 2.0.0
14143
14143
  * @category Creating Effects
14144
14144
  */
14145
- const fail$3 = fail$6;
14145
+ const fail$4 = fail$7;
14146
14146
  /**
14147
14147
  * Creates an `Effect` that represents a recoverable error using a lazy evaluation.
14148
14148
  *
@@ -19198,11 +19198,11 @@ const withLogSpan = /* @__PURE__ */ dual(2, (effect$1, label) => flatMap$2(curre
19198
19198
  const effectify = (fn$2, onError$2, onSyncError) => (...args$1) => callback$1((resume) => {
19199
19199
  try {
19200
19200
  fn$2(...args$1, (err, result$2) => {
19201
- if (err) resume(fail$3(onError$2 ? onError$2(err, args$1) : err));
19202
- else resume(succeed(result$2));
19201
+ if (err) resume(fail$4(onError$2 ? onError$2(err, args$1) : err));
19202
+ else resume(succeed$1(result$2));
19203
19203
  });
19204
19204
  } catch (err) {
19205
- resume(onSyncError ? fail$3(onSyncError(err, args$1)) : die$1(err));
19205
+ resume(onSyncError ? fail$4(onSyncError(err, args$1)) : die$1(err));
19206
19206
  }
19207
19207
  });
19208
19208
  /**
@@ -19653,7 +19653,7 @@ const makeZoned = makeZoned$1;
19653
19653
  * DateTime.make("2024-01-01")
19654
19654
  * ```
19655
19655
  */
19656
- const make$41 = make$42;
19656
+ const make$42 = make$43;
19657
19657
  /**
19658
19658
  * Create a `DateTime.Zoned` from a string.
19659
19659
  *
@@ -21122,14 +21122,14 @@ const encodeUint8Array$1 = (bytes) => {
21122
21122
  const decode$1 = (str) => {
21123
21123
  const stripped = stripCrlf(str);
21124
21124
  const length = stripped.length;
21125
- if (length % 4 !== 0) return fail$8(new EncodingError({
21125
+ if (length % 4 !== 0) return fail$9(new EncodingError({
21126
21126
  reason: "Decode",
21127
21127
  module: "Base64",
21128
21128
  input: stripped,
21129
21129
  message: `Length must be a multiple of 4, but is ${length}`
21130
21130
  }));
21131
21131
  const index = stripped.indexOf("=");
21132
- if (index !== -1 && (index < length - 2 || index === length - 2 && stripped[length - 1] !== "=")) return fail$8(new EncodingError({
21132
+ if (index !== -1 && (index < length - 2 || index === length - 2 && stripped[length - 1] !== "=")) return fail$9(new EncodingError({
21133
21133
  reason: "Decode",
21134
21134
  module: "Base64",
21135
21135
  input: stripped,
@@ -21144,9 +21144,9 @@ const decode$1 = (str) => {
21144
21144
  result$2[j + 1] = buffer$1 >> 8 & 255;
21145
21145
  result$2[j + 2] = buffer$1 & 255;
21146
21146
  }
21147
- return succeed$5(result$2);
21147
+ return succeed$6(result$2);
21148
21148
  } catch (e) {
21149
- return fail$8(new EncodingError({
21149
+ return fail$9(new EncodingError({
21150
21150
  reason: "Decode",
21151
21151
  module: "Base64",
21152
21152
  input: stripped,
@@ -21445,7 +21445,7 @@ const isRegExp = isRegExp$1;
21445
21445
  * @category utilities
21446
21446
  * @since 2.0.0
21447
21447
  */
21448
- const escape = (string$7) => string$7.replace(/[/\\^$*+?.()|[\]{}]/g, "\\$&");
21448
+ const escape = (string$8) => string$8.replace(/[/\\^$*+?.()|[\]{}]/g, "\\$&");
21449
21449
 
21450
21450
  //#endregion
21451
21451
  //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@004c047_46460a9e85a4dd43b15f8b036d8d1a97/node_modules/effect/dist/encoding/Base64Url.js
@@ -21753,7 +21753,7 @@ var OneOf = class extends Base$1 {
21753
21753
  }
21754
21754
  };
21755
21755
  /** @internal */
21756
- function make$40(input, out) {
21756
+ function make$41(input, out) {
21757
21757
  if (isIssue(out)) return out;
21758
21758
  if (out === void 0) return;
21759
21759
  if (typeof out === "boolean") return out ? void 0 : new InvalidValue$1(some(input));
@@ -21906,17 +21906,17 @@ var Getter = class Getter extends Class$3 {
21906
21906
  * @category Constructors
21907
21907
  * @since 4.0.0
21908
21908
  */
21909
- function fail$2(f) {
21910
- return new Getter((oe) => fail$3(f(oe)));
21909
+ function fail$3(f) {
21910
+ return new Getter((oe) => fail$4(f(oe)));
21911
21911
  }
21912
21912
  /**
21913
21913
  * @category Constructors
21914
21914
  * @since 4.0.0
21915
21915
  */
21916
21916
  function forbidden(message) {
21917
- return fail$2((oe) => new Forbidden(oe, { message: message(oe) }));
21917
+ return fail$3((oe) => new Forbidden(oe, { message: message(oe) }));
21918
21918
  }
21919
- const passthrough_$1 = /* @__PURE__ */ new Getter(succeed);
21919
+ const passthrough_$1 = /* @__PURE__ */ new Getter(succeed$1);
21920
21920
  function isPassthrough(getter) {
21921
21921
  return getter.run === passthrough_$1.run;
21922
21922
  }
@@ -21958,7 +21958,7 @@ function transformOrFail$1(f) {
21958
21958
  * @since 4.0.0
21959
21959
  */
21960
21960
  function transformOptional(f) {
21961
- return new Getter((oe) => succeed(f(oe)));
21961
+ return new Getter((oe) => succeed$1(f(oe)));
21962
21962
  }
21963
21963
  /**
21964
21964
  * @category Coercions
@@ -22022,8 +22022,8 @@ function decodeBase64() {
22022
22022
  */
22023
22023
  function dateTimeUtcFromInput() {
22024
22024
  return transformOrFail$1((input) => {
22025
- const dt = make$41(input);
22026
- return dt ? succeed(toUtc(dt)) : fail$3(new InvalidValue$1(some(input), { message: "Invalid DateTime input" }));
22025
+ const dt = make$42(input);
22026
+ return dt ? succeed$1(toUtc(dt)) : fail$4(new InvalidValue$1(some(input), { message: "Invalid DateTime input" }));
22027
22027
  });
22028
22028
  }
22029
22029
  const collectURLSearchParamsEntries = /* @__PURE__ */ collectBracketPathEntries(isString$1);
@@ -22087,7 +22087,7 @@ function isTransformation(u) {
22087
22087
  /**
22088
22088
  * @since 4.0.0
22089
22089
  */
22090
- const make$39 = (options) => {
22090
+ const make$40 = (options) => {
22091
22091
  if (isTransformation(options)) return options;
22092
22092
  return new Transformation(options.decode, options.encode);
22093
22093
  };
@@ -22116,11 +22116,11 @@ const numberFromString = /* @__PURE__ */ new Transformation(/* @__PURE__ */ Numb
22116
22116
  * @since 4.0.0
22117
22117
  */
22118
22118
  const durationFromNanos = /* @__PURE__ */ transformOrFail({
22119
- decode: (i) => succeed(nanos(i)),
22119
+ decode: (i) => succeed$1(nanos(i)),
22120
22120
  encode: (a) => {
22121
22121
  const nanos$1 = toNanos(a);
22122
- if (isUndefined(nanos$1)) return fail$3(new InvalidValue$1(some(a), { message: `Unable to encode ${a} into a bigint` }));
22123
- return succeed(nanos$1);
22122
+ if (isUndefined(nanos$1)) return fail$4(new InvalidValue$1(some(a), { message: `Unable to encode ${a} into a bigint` }));
22123
+ return succeed$1(nanos$1);
22124
22124
  }
22125
22125
  });
22126
22126
  /**
@@ -22153,7 +22153,7 @@ const urlFromString = /* @__PURE__ */ transformOrFail({
22153
22153
  try: () => new URL(s),
22154
22154
  catch: (e) => new InvalidValue$1(some(s), { message: globalThis.String(e) })
22155
22155
  }),
22156
- encode: (url) => succeed(url.href)
22156
+ encode: (url) => succeed$1(url.href)
22157
22157
  });
22158
22158
  /**
22159
22159
  * @since 4.0.0
@@ -22283,8 +22283,8 @@ var Declaration = class Declaration extends Base {
22283
22283
  };
22284
22284
  }
22285
22285
  /** @internal */
22286
- recur(recur$1) {
22287
- const tps = mapOrSame(this.typeParameters, recur$1);
22286
+ recur(recur$2) {
22287
+ const tps = mapOrSame(this.typeParameters, recur$2);
22288
22288
  return tps === this.typeParameters ? this : new Declaration(tps, this.run, this.annotations, this.checks, void 0, this.context);
22289
22289
  }
22290
22290
  /** @internal */
@@ -22478,7 +22478,7 @@ var String$2 = class extends Base {
22478
22478
  /**
22479
22479
  * @since 4.0.0
22480
22480
  */
22481
- const string$4 = /* @__PURE__ */ new String$2();
22481
+ const string$5 = /* @__PURE__ */ new String$2();
22482
22482
  /**
22483
22483
  * **Default Json Serializer**
22484
22484
  *
@@ -22607,21 +22607,21 @@ var Arrays = class Arrays extends Base {
22607
22607
  if (rest.length > 1 && rest.slice(1).some(isOptional)) throw new Error("An optional element cannot follow a rest element. ts(1266)");
22608
22608
  }
22609
22609
  /** @internal */
22610
- getParser(recur$1) {
22610
+ getParser(recur$2) {
22611
22611
  const ast = this;
22612
22612
  const elements = ast.elements.map((ast$1) => ({
22613
22613
  ast: ast$1,
22614
- parser: recur$1(ast$1)
22614
+ parser: recur$2(ast$1)
22615
22615
  }));
22616
22616
  const rest = ast.rest.map((ast$1) => ({
22617
22617
  ast: ast$1,
22618
- parser: recur$1(ast$1)
22618
+ parser: recur$2(ast$1)
22619
22619
  }));
22620
22620
  const elementLen = elements.length;
22621
22621
  return fnUntracedEager(function* (oinput, options) {
22622
22622
  if (oinput._tag === "None") return oinput;
22623
22623
  const input = oinput.value;
22624
- if (!Array.isArray(input)) return yield* fail$3(new InvalidType(ast, oinput));
22624
+ if (!Array.isArray(input)) return yield* fail$4(new InvalidType(ast, oinput));
22625
22625
  const output = [];
22626
22626
  let issues;
22627
22627
  const errorsAllOption = options.errors === "all";
@@ -22637,13 +22637,13 @@ var Arrays = class Arrays extends Base {
22637
22637
  const issue = new Pointer([i], issueElement);
22638
22638
  if (errorsAllOption) if (issues) issues.push(issue);
22639
22639
  else issues = [issue];
22640
- else return yield* fail$3(new Composite(ast, oinput, [issue]));
22640
+ else return yield* fail$4(new Composite(ast, oinput, [issue]));
22641
22641
  } else if (exit$2.value._tag === "Some") output[i] = exit$2.value.value;
22642
22642
  else if (!isOptional(e.ast)) {
22643
22643
  const issue = new Pointer([i], new MissingKey(e.ast.context?.annotations));
22644
22644
  if (errorsAllOption) if (issues) issues.push(issue);
22645
22645
  else issues = [issue];
22646
- else return yield* fail$3(new Composite(ast, oinput, [issue]));
22646
+ else return yield* fail$4(new Composite(ast, oinput, [issue]));
22647
22647
  }
22648
22648
  }
22649
22649
  const len = input.length;
@@ -22659,13 +22659,13 @@ var Arrays = class Arrays extends Base {
22659
22659
  const issue = new Pointer([i], issueRest);
22660
22660
  if (errorsAllOption) if (issues) issues.push(issue);
22661
22661
  else issues = [issue];
22662
- else return yield* fail$3(new Composite(ast, oinput, [issue]));
22662
+ else return yield* fail$4(new Composite(ast, oinput, [issue]));
22663
22663
  } else if (exit$2.value._tag === "Some") output[i] = exit$2.value.value;
22664
22664
  else {
22665
22665
  const issue = new Pointer([i], new MissingKey(keyAnnotations));
22666
22666
  if (errorsAllOption) if (issues) issues.push(issue);
22667
22667
  else issues = [issue];
22668
- else return yield* fail$3(new Composite(ast, oinput, [issue]));
22668
+ else return yield* fail$4(new Composite(ast, oinput, [issue]));
22669
22669
  }
22670
22670
  }
22671
22671
  for (let j = 0; j < tail.length; j++) if (len < i + 1) continue;
@@ -22680,29 +22680,29 @@ var Arrays = class Arrays extends Base {
22680
22680
  const issue = new Pointer([i], issueRest);
22681
22681
  if (errorsAllOption) if (issues) issues.push(issue);
22682
22682
  else issues = [issue];
22683
- else return yield* fail$3(new Composite(ast, oinput, [issue]));
22683
+ else return yield* fail$4(new Composite(ast, oinput, [issue]));
22684
22684
  } else if (exit$2.value._tag === "Some") output[i] = exit$2.value.value;
22685
22685
  else {
22686
22686
  const issue = new Pointer([i], new MissingKey(keyAnnotations$1));
22687
22687
  if (errorsAllOption) if (issues) issues.push(issue);
22688
22688
  else issues = [issue];
22689
- else return yield* fail$3(new Composite(ast, oinput, [issue]));
22689
+ else return yield* fail$4(new Composite(ast, oinput, [issue]));
22690
22690
  }
22691
22691
  }
22692
22692
  } else for (let i$1 = elementLen; i$1 <= len - 1; i$1++) {
22693
22693
  const issue = new Pointer([i$1], new UnexpectedKey(ast, input[i$1]));
22694
22694
  if (errorsAllOption) if (issues) issues.push(issue);
22695
22695
  else issues = [issue];
22696
- else return yield* fail$3(new Composite(ast, oinput, [issue]));
22696
+ else return yield* fail$4(new Composite(ast, oinput, [issue]));
22697
22697
  }
22698
- if (issues) return yield* fail$3(new Composite(ast, oinput, issues));
22698
+ if (issues) return yield* fail$4(new Composite(ast, oinput, issues));
22699
22699
  return some(output);
22700
22700
  });
22701
22701
  }
22702
22702
  /** @internal */
22703
- recur(recur$1) {
22704
- const elements = mapOrSame(this.elements, recur$1);
22705
- const rest = mapOrSame(this.rest, recur$1);
22703
+ recur(recur$2) {
22704
+ const elements = mapOrSame(this.elements, recur$2);
22705
+ const rest = mapOrSame(this.rest, recur$2);
22706
22706
  return elements === this.elements && rest === this.rest ? this : new Arrays(this.isMutable, elements, rest, this.annotations, this.checks, void 0, this.context);
22707
22707
  }
22708
22708
  /** @internal */
@@ -22795,7 +22795,7 @@ var Objects = class Objects extends Base {
22795
22795
  if (duplicates.length > 0) throw new Error(`Duplicate identifiers: ${JSON.stringify(duplicates)}. ts(2300)`);
22796
22796
  }
22797
22797
  /** @internal */
22798
- getParser(recur$1) {
22798
+ getParser(recur$2) {
22799
22799
  const ast = this;
22800
22800
  const expectedKeys = [];
22801
22801
  const expectedKeysSet = /* @__PURE__ */ new Set();
@@ -22806,7 +22806,7 @@ var Objects = class Objects extends Base {
22806
22806
  expectedKeysSet.add(ps.name);
22807
22807
  properties.push({
22808
22808
  ps,
22809
- parser: recur$1(ps.type),
22809
+ parser: recur$2(ps.type),
22810
22810
  name: ps.name,
22811
22811
  type: ps.type
22812
22812
  });
@@ -22816,7 +22816,7 @@ var Objects = class Objects extends Base {
22816
22816
  return fnUntracedEager(function* (oinput, options) {
22817
22817
  if (oinput._tag === "None") return oinput;
22818
22818
  const input = oinput.value;
22819
- if (!(typeof input === "object" && input !== null && !Array.isArray(input))) return yield* fail$3(new InvalidType(ast, oinput));
22819
+ if (!(typeof input === "object" && input !== null && !Array.isArray(input))) return yield* fail$4(new InvalidType(ast, oinput));
22820
22820
  const out = {};
22821
22821
  let issues;
22822
22822
  const errorsAllOption = options.errors === "all";
@@ -22833,7 +22833,7 @@ var Objects = class Objects extends Base {
22833
22833
  if (issues) issues.push(issue);
22834
22834
  else issues = [issue];
22835
22835
  continue;
22836
- } else return yield* fail$3(new Composite(ast, oinput, [issue]));
22836
+ } else return yield* fail$4(new Composite(ast, oinput, [issue]));
22837
22837
  } else set$5(out, key, input[key]);
22838
22838
  }
22839
22839
  }
@@ -22850,7 +22850,7 @@ var Objects = class Objects extends Base {
22850
22850
  if (issues) issues.push(issue);
22851
22851
  else issues = [issue];
22852
22852
  continue;
22853
- } else return yield* fail$3(new Composite(ast, oinput, [issue]));
22853
+ } else return yield* fail$4(new Composite(ast, oinput, [issue]));
22854
22854
  } else if (exit$2.value._tag === "Some") set$5(out, p.name, exit$2.value.value);
22855
22855
  else if (!isOptional(p.type)) {
22856
22856
  const issue = new Pointer([p.name], new MissingKey(p.type.context?.annotations));
@@ -22858,7 +22858,7 @@ var Objects = class Objects extends Base {
22858
22858
  if (issues) issues.push(issue);
22859
22859
  else issues = [issue];
22860
22860
  continue;
22861
- } else return yield* fail$3(new Composite(ast, oinput, [issue]));
22861
+ } else return yield* fail$4(new Composite(ast, oinput, [issue]));
22862
22862
  }
22863
22863
  }
22864
22864
  if (indexCount > 0) for (let i = 0; i < indexCount; i++) {
@@ -22866,7 +22866,7 @@ var Objects = class Objects extends Base {
22866
22866
  const keys$1 = getIndexSignatureKeys(input, is$2.parameter);
22867
22867
  for (let j = 0; j < keys$1.length; j++) {
22868
22868
  const key = keys$1[j];
22869
- const effKey = recur$1(indexSignatureParameterFromString(is$2.parameter))(some(key), options);
22869
+ const effKey = recur$2(indexSignatureParameterFromString(is$2.parameter))(some(key), options);
22870
22870
  const exitKey = effectIsExit(effKey) ? effKey : yield* exit(effKey);
22871
22871
  if (exitKey._tag === "Failure") {
22872
22872
  const issueKey = filterError(exitKey.cause);
@@ -22877,10 +22877,10 @@ var Objects = class Objects extends Base {
22877
22877
  else issues = [issue];
22878
22878
  continue;
22879
22879
  }
22880
- return yield* fail$3(new Composite(ast, oinput, [issue]));
22880
+ return yield* fail$4(new Composite(ast, oinput, [issue]));
22881
22881
  }
22882
22882
  const value = some(input[key]);
22883
- const effValue = recur$1(is$2.type)(value, options);
22883
+ const effValue = recur$2(is$2.type)(value, options);
22884
22884
  const exitValue = effectIsExit(effValue) ? effValue : yield* exit(effValue);
22885
22885
  if (exitValue._tag === "Failure") {
22886
22886
  const issueValue = filterError(exitValue.cause);
@@ -22890,7 +22890,7 @@ var Objects = class Objects extends Base {
22890
22890
  if (issues) issues.push(issue);
22891
22891
  else issues = [issue];
22892
22892
  continue;
22893
- } else return yield* fail$3(new Composite(ast, oinput, [issue]));
22893
+ } else return yield* fail$4(new Composite(ast, oinput, [issue]));
22894
22894
  } else if (exitKey.value._tag === "Some" && exitValue.value._tag === "Some") {
22895
22895
  const k2 = exitKey.value.value;
22896
22896
  const v2 = exitValue.value.value;
@@ -22901,7 +22901,7 @@ var Objects = class Objects extends Base {
22901
22901
  }
22902
22902
  }
22903
22903
  }
22904
- if (issues) return yield* fail$3(new Composite(ast, oinput, issues));
22904
+ if (issues) return yield* fail$4(new Composite(ast, oinput, issues));
22905
22905
  if (options.propertyOrder === "original") {
22906
22906
  const keys$1 = (inputKeys ?? Reflect.ownKeys(input)).concat(expectedKeys);
22907
22907
  const preserved = {};
@@ -22911,26 +22911,26 @@ var Objects = class Objects extends Base {
22911
22911
  return some(out);
22912
22912
  });
22913
22913
  }
22914
- rebuild(recur$1, flipMerge) {
22914
+ rebuild(recur$2, flipMerge) {
22915
22915
  const props = mapOrSame(this.propertySignatures, (ps) => {
22916
- const t = recur$1(ps.type);
22916
+ const t = recur$2(ps.type);
22917
22917
  return t === ps.type ? ps : new PropertySignature(ps.name, t);
22918
22918
  });
22919
22919
  const indexes = mapOrSame(this.indexSignatures, (is$2) => {
22920
- const p = recur$1(is$2.parameter);
22921
- const t = recur$1(is$2.type);
22920
+ const p = recur$2(is$2.parameter);
22921
+ const t = recur$2(is$2.type);
22922
22922
  const merge$6 = flipMerge ? is$2.merge?.flip() : is$2.merge;
22923
22923
  return p === is$2.parameter && t === is$2.type && merge$6 === is$2.merge ? is$2 : new IndexSignature(p, t, merge$6);
22924
22924
  });
22925
22925
  return props === this.propertySignatures && indexes === this.indexSignatures ? this : new Objects(props, indexes, this.annotations, this.checks, void 0, this.context);
22926
22926
  }
22927
22927
  /** @internal */
22928
- flip(recur$1) {
22929
- return this.rebuild(recur$1, true);
22928
+ flip(recur$2) {
22929
+ return this.rebuild(recur$2, true);
22930
22930
  }
22931
22931
  /** @internal */
22932
- recur(recur$1) {
22933
- return this.rebuild(recur$1, false);
22932
+ recur(recur$2) {
22933
+ return this.rebuild(recur$2, false);
22934
22934
  }
22935
22935
  /** @internal */
22936
22936
  getExpected() {
@@ -23086,7 +23086,7 @@ var Union$1 = class Union$1 extends Base {
23086
23086
  this.mode = mode;
23087
23087
  }
23088
23088
  /** @internal */
23089
- getParser(recur$1) {
23089
+ getParser(recur$2) {
23090
23090
  const ast = this;
23091
23091
  return fnUntracedEager(function* (oinput, options) {
23092
23092
  if (oinput._tag === "None") return oinput;
@@ -23100,7 +23100,7 @@ var Union$1 = class Union$1 extends Base {
23100
23100
  };
23101
23101
  for (let i = 0; i < candidates.length; i++) {
23102
23102
  const candidate = candidates[i];
23103
- const eff = recur$1(candidate)(oinput, options);
23103
+ const eff = recur$2(candidate)(oinput, options);
23104
23104
  const exit$2 = effectIsExit(eff) ? eff : yield* exit(eff);
23105
23105
  if (exit$2._tag === "Failure") {
23106
23106
  const issue = filterError(exit$2.cause);
@@ -23111,7 +23111,7 @@ var Union$1 = class Union$1 extends Base {
23111
23111
  } else {
23112
23112
  if (tracking.out && oneOf) {
23113
23113
  tracking.successes.push(candidate);
23114
- return yield* fail$3(new OneOf(ast, input, tracking.successes));
23114
+ return yield* fail$4(new OneOf(ast, input, tracking.successes));
23115
23115
  }
23116
23116
  tracking.out = exit$2.value;
23117
23117
  tracking.successes.push(candidate);
@@ -23119,12 +23119,12 @@ var Union$1 = class Union$1 extends Base {
23119
23119
  }
23120
23120
  }
23121
23121
  if (tracking.out) return tracking.out;
23122
- else return yield* fail$3(new AnyOf(ast, input, issues ?? []));
23122
+ else return yield* fail$4(new AnyOf(ast, input, issues ?? []));
23123
23123
  });
23124
23124
  }
23125
23125
  /** @internal */
23126
- recur(recur$1) {
23127
- const types$2 = mapOrSame(this.types, recur$1);
23126
+ recur(recur$2) {
23127
+ const types$2 = mapOrSame(this.types, recur$2);
23128
23128
  return types$2 === this.types ? this : new Union$1(types$2, this.mode, this.annotations, this.checks, void 0, this.context);
23129
23129
  }
23130
23130
  /** @internal */
@@ -23219,7 +23219,7 @@ var FilterGroup = class FilterGroup extends Class$3 {
23219
23219
  };
23220
23220
  /** @internal */
23221
23221
  function makeFilter$1(filter$6, annotations$1, aborted = false) {
23222
- return new Filter((input, ast, options) => make$40(input, filter$6(input, ast, options)), annotations$1, aborted);
23222
+ return new Filter((input, ast, options) => make$41(input, filter$6(input, ast, options)), annotations$1, aborted);
23223
23223
  }
23224
23224
  /** @internal */
23225
23225
  function makeRefinedByGuard$1(is$2, annotations$1) {
@@ -23332,8 +23332,8 @@ function withConstructorDefault$1(ast, defaultValue) {
23332
23332
  const encoding = [new Link(unknown, new Transformation(new Getter((o) => {
23333
23333
  if (isNone(filter$5(o, isNotUndefined$2))) {
23334
23334
  const oe = defaultValue(o);
23335
- return isEffect(oe) ? oe : succeed(oe);
23336
- } else return succeed(o);
23335
+ return isEffect(oe) ? oe : succeed$1(oe);
23336
+ } else return succeed$1(o);
23337
23337
  }), passthrough$1()))];
23338
23338
  return replaceContext(ast, ast.context ? new Context(ast.context.isOptional, ast.context.isMutable, encoding, ast.context.annotations) : new Context(false, false, encoding));
23339
23339
  }
@@ -23455,16 +23455,16 @@ function handleTemplateLiteralASTPartParens(part, s, top) {
23455
23455
  return `(${s})`;
23456
23456
  }
23457
23457
  function fromConst(ast, value) {
23458
- const succeed$7 = succeedSome(value);
23458
+ const succeed$8 = succeedSome(value);
23459
23459
  return (oinput) => {
23460
23460
  if (oinput._tag === "None") return succeedNone;
23461
- return oinput.value === value ? succeed$7 : fail$3(new InvalidType(ast, oinput));
23461
+ return oinput.value === value ? succeed$8 : fail$4(new InvalidType(ast, oinput));
23462
23462
  };
23463
23463
  }
23464
23464
  function fromRefinement(ast, refinement) {
23465
23465
  return (oinput) => {
23466
23466
  if (oinput._tag === "None") return succeedNone;
23467
- return refinement(oinput.value) ? succeed(oinput) : fail$3(new InvalidType(ast, oinput));
23467
+ return refinement(oinput.value) ? succeed$1(oinput) : fail$4(new InvalidType(ast, oinput));
23468
23468
  };
23469
23469
  }
23470
23470
  /** @internal */
@@ -23498,7 +23498,7 @@ function isStringFinite$1(annotations$1) {
23498
23498
  ...annotations$1
23499
23499
  });
23500
23500
  }
23501
- const finiteString = /* @__PURE__ */ appendChecks(string$4, [/* @__PURE__ */ isStringFinite$1()]);
23501
+ const finiteString = /* @__PURE__ */ appendChecks(string$5, [/* @__PURE__ */ isStringFinite$1()]);
23502
23502
  const finiteToString = /* @__PURE__ */ new Link(finiteString, numberFromString);
23503
23503
  const numberToString = /* @__PURE__ */ new Link(/* @__PURE__ */ new Union$1([finiteString, nonFiniteLiterals], "anyOf"), numberFromString);
23504
23504
  /**
@@ -23518,17 +23518,17 @@ function isStringBigInt$1(annotations$1) {
23518
23518
  });
23519
23519
  }
23520
23520
  /** @internal */
23521
- const bigIntString = /* @__PURE__ */ appendChecks(string$4, [/* @__PURE__ */ isStringBigInt$1()]);
23521
+ const bigIntString = /* @__PURE__ */ appendChecks(string$5, [/* @__PURE__ */ isStringBigInt$1()]);
23522
23522
  const bigIntToString = /* @__PURE__ */ new Link(bigIntString, /* @__PURE__ */ new Transformation(/* @__PURE__ */ transform$1(globalThis.BigInt), /* @__PURE__ */ String$3()));
23523
23523
  const isStringSymbolRegExp = /* @__PURE__ */ new globalThis.RegExp(`^Symbol\\((.*)\\)$`);
23524
23524
  /** @internal */
23525
- const symbolString = /* @__PURE__ */ appendChecks(string$4, [/* @__PURE__ */ isStringSymbol$1()]);
23525
+ const symbolString = /* @__PURE__ */ appendChecks(string$5, [/* @__PURE__ */ isStringSymbol$1()]);
23526
23526
  /**
23527
23527
  * to distinguish between Symbol and String, we need to add a check to the string keyword
23528
23528
  */
23529
23529
  const symbolToString = /* @__PURE__ */ new Link(symbolString, /* @__PURE__ */ new Transformation(/* @__PURE__ */ transform$1((description) => globalThis.Symbol.for(isStringSymbolRegExp.exec(description)[1])), /* @__PURE__ */ transformOrFail$1((sym) => {
23530
- if (globalThis.Symbol.keyFor(sym) !== void 0) return succeed(globalThis.String(sym));
23531
- return fail$3(new Forbidden(some(sym), { message: "cannot serialize to string, Symbol is not registered" }));
23530
+ if (globalThis.Symbol.keyFor(sym) !== void 0) return succeed$1(globalThis.String(sym));
23531
+ return fail$4(new Forbidden(some(sym), { message: "cannot serialize to string, Symbol is not registered" }));
23532
23532
  })));
23533
23533
  /** @internal */
23534
23534
  function isStringSymbol$1(annotations$1) {
@@ -23691,8 +23691,8 @@ const recurDefaults = /* @__PURE__ */ memoize((ast) => {
23691
23691
  * @category Constructing
23692
23692
  * @since 4.0.0
23693
23693
  */
23694
- function makeEffect(schema) {
23695
- const parser = run$5(recurDefaults(toType(schema.ast)));
23694
+ function makeEffect(schema$1) {
23695
+ const parser = run$5(recurDefaults(toType(schema$1.ast)));
23696
23696
  return (input, options) => {
23697
23697
  return parser(input, options?.parseOptions);
23698
23698
  };
@@ -23701,8 +23701,8 @@ function makeEffect(schema) {
23701
23701
  * @category Constructing
23702
23702
  * @since 4.0.0
23703
23703
  */
23704
- function makeUnsafe$2(schema) {
23705
- const parser = makeEffect(schema);
23704
+ function makeUnsafe$2(schema$1) {
23705
+ const parser = makeEffect(schema$1);
23706
23706
  return (input, options) => {
23707
23707
  return runSync(mapErrorEager(parser(input, options), (issue) => new Error(issue.toString(), { cause: issue })));
23708
23708
  };
@@ -23711,8 +23711,8 @@ function makeUnsafe$2(schema) {
23711
23711
  * @category Asserting
23712
23712
  * @since 4.0.0
23713
23713
  */
23714
- function is$1(schema) {
23715
- return _is(schema.ast);
23714
+ function is$1(schema$1) {
23715
+ return _is(schema$1.ast);
23716
23716
  }
23717
23717
  /** @internal */
23718
23718
  function _is(ast) {
@@ -23725,8 +23725,8 @@ function _is(ast) {
23725
23725
  * @category Asserting
23726
23726
  * @since 4.0.0
23727
23727
  */
23728
- function asserts$1(schema) {
23729
- const parser = asExit(run$5(toType(schema.ast)));
23728
+ function asserts$1(schema$1) {
23729
+ const parser = asExit(run$5(toType(schema$1.ast)));
23730
23730
  return (input) => {
23731
23731
  const exit$2 = parser(input, defaultParseOptions);
23732
23732
  if (isFailure$2(exit$2)) {
@@ -23740,8 +23740,8 @@ function asserts$1(schema) {
23740
23740
  * @category Decoding
23741
23741
  * @since 4.0.0
23742
23742
  */
23743
- function decodeUnknownEffect$1(schema) {
23744
- return run$5(schema.ast);
23743
+ function decodeUnknownEffect$1(schema$1) {
23744
+ return run$5(schema$1.ast);
23745
23745
  }
23746
23746
  /**
23747
23747
  * @category Decoding
@@ -23752,22 +23752,22 @@ const decodeEffect$1 = decodeUnknownEffect$1;
23752
23752
  * @category Decoding
23753
23753
  * @since 4.0.0
23754
23754
  */
23755
- function decodeUnknownPromise$1(schema) {
23756
- return asPromise(decodeUnknownEffect$1(schema));
23755
+ function decodeUnknownPromise$1(schema$1) {
23756
+ return asPromise(decodeUnknownEffect$1(schema$1));
23757
23757
  }
23758
23758
  /**
23759
23759
  * @category Decoding
23760
23760
  * @since 4.0.0
23761
23761
  */
23762
- function decodePromise$1(schema) {
23763
- return asPromise(decodeEffect$1(schema));
23762
+ function decodePromise$1(schema$1) {
23763
+ return asPromise(decodeEffect$1(schema$1));
23764
23764
  }
23765
23765
  /**
23766
23766
  * @category Decoding
23767
23767
  * @since 4.0.0
23768
23768
  */
23769
- function decodeUnknownOption$1(schema) {
23770
- return asOption(decodeUnknownEffect$1(schema));
23769
+ function decodeUnknownOption$1(schema$1) {
23770
+ return asOption(decodeUnknownEffect$1(schema$1));
23771
23771
  }
23772
23772
  /**
23773
23773
  * @category Decoding
@@ -23778,8 +23778,8 @@ const decodeOption$1 = decodeUnknownOption$1;
23778
23778
  * @category Decoding
23779
23779
  * @since 4.0.0
23780
23780
  */
23781
- function decodeUnknownSync$1(schema) {
23782
- return asSync(decodeUnknownEffect$1(schema));
23781
+ function decodeUnknownSync$1(schema$1) {
23782
+ return asSync(decodeUnknownEffect$1(schema$1));
23783
23783
  }
23784
23784
  /**
23785
23785
  * @category Decoding
@@ -23790,14 +23790,14 @@ const decodeSync$1 = decodeUnknownSync$1;
23790
23790
  * @category Encoding
23791
23791
  * @since 4.0.0
23792
23792
  */
23793
- function encodeUnknownEffect$1(schema) {
23794
- return run$5(flip(schema.ast));
23793
+ function encodeUnknownEffect$1(schema$1) {
23794
+ return run$5(flip(schema$1.ast));
23795
23795
  }
23796
23796
  /**
23797
23797
  * @category Encoding
23798
23798
  * @since 4.0.0
23799
23799
  */
23800
- const encodeUnknownPromise$1 = (schema) => asPromise(encodeUnknownEffect$1(schema));
23800
+ const encodeUnknownPromise$1 = (schema$1) => asPromise(encodeUnknownEffect$1(schema$1));
23801
23801
  /**
23802
23802
  * @category Encoding
23803
23803
  * @since 4.0.0
@@ -23807,8 +23807,8 @@ const encodePromise$1 = encodeUnknownPromise$1;
23807
23807
  * @category Encoding
23808
23808
  * @since 4.0.0
23809
23809
  */
23810
- function encodeUnknownOption$1(schema) {
23811
- return asOption(encodeUnknownEffect$1(schema));
23810
+ function encodeUnknownOption$1(schema$1) {
23811
+ return asOption(encodeUnknownEffect$1(schema$1));
23812
23812
  }
23813
23813
  /**
23814
23814
  * @category Encoding
@@ -23819,8 +23819,8 @@ const encodeOption$1 = encodeUnknownOption$1;
23819
23819
  * @category Encoding
23820
23820
  * @since 4.0.0
23821
23821
  */
23822
- function encodeUnknownSync$1(schema) {
23823
- return asSync(encodeUnknownEffect$1(schema));
23822
+ function encodeUnknownSync$1(schema$1) {
23823
+ return asSync(encodeUnknownEffect$1(schema$1));
23824
23824
  }
23825
23825
  /**
23826
23826
  * @category Encoding
@@ -23829,10 +23829,10 @@ function encodeUnknownSync$1(schema) {
23829
23829
  const encodeSync$1 = encodeUnknownSync$1;
23830
23830
  /** @internal */
23831
23831
  function run$5(ast) {
23832
- const parser = recur(ast);
23832
+ const parser = recur$1(ast);
23833
23833
  return (input, options) => flatMapEager(parser(some(input), options ?? defaultParseOptions), (oa) => {
23834
- if (oa._tag === "None") return fail$3(new InvalidValue$1(oa));
23835
- return succeed(oa.value);
23834
+ if (oa._tag === "None") return fail$4(new InvalidValue$1(oa));
23835
+ return succeed$1(oa.value);
23836
23836
  });
23837
23837
  }
23838
23838
  function asPromise(parser) {
@@ -23849,10 +23849,10 @@ function asOption(parser) {
23849
23849
  function asSync(parser) {
23850
23850
  return (input, options) => runSync(mapErrorEager(parser(input, options), (issue) => new Error(issue.toString(), { cause: issue })));
23851
23851
  }
23852
- const recur = /* @__PURE__ */ memoize((ast) => {
23852
+ const recur$1 = /* @__PURE__ */ memoize((ast) => {
23853
23853
  let parser;
23854
23854
  if (!ast.context && !ast.encoding && !ast.checks) return (ou, options) => {
23855
- parser ??= ast.getParser(recur);
23855
+ parser ??= ast.getParser(recur$1);
23856
23856
  return parser(ou, resolve$2(ast)?.["parseOptions"] ?? options);
23857
23857
  };
23858
23858
  const isStructural = isArrays(ast) || isObjects(ast) || isDeclaration(ast) && ast.typeParameters.length > 0;
@@ -23866,7 +23866,7 @@ const recur = /* @__PURE__ */ memoize((ast) => {
23866
23866
  for (let i = len - 1; i >= 0; i--) {
23867
23867
  const link$2 = links[i];
23868
23868
  const to = link$2.to;
23869
- const parser$1 = recur(to);
23869
+ const parser$1 = recur$1(to);
23870
23870
  srou = srou ? flatMapEager(srou, (ou$1) => parser$1(ou$1, options)) : parser$1(ou, options);
23871
23871
  if (link$2.transformation._tag === "Transformation") {
23872
23872
  const getter = link$2.transformation.decode;
@@ -23875,7 +23875,7 @@ const recur = /* @__PURE__ */ memoize((ast) => {
23875
23875
  }
23876
23876
  srou = mapErrorEager(srou, (issue) => new Encoding(ast, ou, issue));
23877
23877
  }
23878
- parser ??= ast.getParser(recur);
23878
+ parser ??= ast.getParser(recur$1);
23879
23879
  let sroa = srou ? flatMapEager(srou, (ou$1) => parser(ou$1, options)) : parser(ou, options);
23880
23880
  if (ast.checks) {
23881
23881
  const checks = ast.checks;
@@ -23883,16 +23883,16 @@ const recur = /* @__PURE__ */ memoize((ast) => {
23883
23883
  const issues = [];
23884
23884
  collectIssues(checks.filter((check) => check.annotations?.[STRUCTURAL_ANNOTATION_KEY]), ou.value, issues, ast, options);
23885
23885
  const out = isArrayNonEmpty(issues) ? issue._tag === "Composite" && issue.ast === ast ? new Composite(ast, issue.actual, [...issue.issues, ...issues]) : new Composite(ast, ou, [issue, ...issues]) : issue;
23886
- return fail$3(out);
23886
+ return fail$4(out);
23887
23887
  });
23888
23888
  sroa = flatMapEager(sroa, (oa) => {
23889
23889
  if (isSome(oa)) {
23890
23890
  const value = oa.value;
23891
23891
  const issues = [];
23892
23892
  collectIssues(checks, value, issues, ast, options);
23893
- if (isArrayNonEmpty(issues)) return fail$3(new Composite(ast, oa, issues));
23893
+ if (isArrayNonEmpty(issues)) return fail$4(new Composite(ast, oa, issues));
23894
23894
  }
23895
- return succeed(oa);
23895
+ return succeed$1(oa);
23896
23896
  });
23897
23897
  }
23898
23898
  return sroa;
@@ -24013,11 +24013,11 @@ const SchemaProto = {
24013
24013
  }
24014
24014
  };
24015
24015
  /** @internal */
24016
- function make$38(ast, options) {
24016
+ function make$39(ast, options) {
24017
24017
  const self$1 = Object.create(SchemaProto);
24018
24018
  if (options) Object.assign(self$1, options);
24019
24019
  self$1.ast = ast;
24020
- self$1.rebuild = (ast$1) => make$38(ast$1, options);
24020
+ self$1.rebuild = (ast$1) => make$39(ast$1, options);
24021
24021
  self$1.makeUnsafe = makeUnsafe$2(self$1);
24022
24022
  return self$1;
24023
24023
  }
@@ -24037,7 +24037,7 @@ function toCodecJsonBase(ast) {
24037
24037
  case "Declaration": {
24038
24038
  const getLink = ast.annotations?.toCodecJson ?? ast.annotations?.toCodec;
24039
24039
  if (isFunction(getLink)) {
24040
- const link$2 = getLink(isDeclaration(ast) ? ast.typeParameters.map((tp) => make$38(toEncoded(tp))) : []);
24040
+ const link$2 = getLink(isDeclaration(ast) ? ast.typeParameters.map((tp) => make$39(toEncoded(tp))) : []);
24041
24041
  const to = toCodecJson$1(link$2.to);
24042
24042
  return replaceEncoding(ast, to === link$2.to ? [link$2] : [new Link(to, link$2.transformation)]);
24043
24043
  }
@@ -24108,7 +24108,7 @@ function fromASTs(asts) {
24108
24108
  const referenceMap = /* @__PURE__ */ new Map();
24109
24109
  const uniqueReferences = /* @__PURE__ */ new Set();
24110
24110
  const usedReferences = /* @__PURE__ */ new Set();
24111
- const schemas = map$8(asts, (ast) => recur$1(ast));
24111
+ const schemas = map$8(asts, (ast) => recur$2(ast));
24112
24112
  return {
24113
24113
  representations: map$8(schemas, compact),
24114
24114
  references: map$9(filter$4(references, (_, k) => !isCompactable(k)), compact)
@@ -24188,7 +24188,7 @@ function fromASTs(asts) {
24188
24188
  uniqueReferences.add(candidate);
24189
24189
  return candidate;
24190
24190
  }
24191
- function recur$1(ast, prefix$1) {
24191
+ function recur$2(ast, prefix$1) {
24192
24192
  const found = referenceMap.get(ast);
24193
24193
  if (found !== void 0) {
24194
24194
  usedReferences.add(found);
@@ -24207,7 +24207,7 @@ function fromASTs(asts) {
24207
24207
  _tag: "Reference",
24208
24208
  $ref: reference
24209
24209
  };
24210
- } else return recur$1(last$1, resolveIdentifier$1(ast) ?? prefix$1);
24210
+ } else return recur$2(last$1, resolveIdentifier$1(ast) ?? prefix$1);
24211
24211
  }
24212
24212
  function getLastEncoding(ast) {
24213
24213
  return ast.encoding ? ast.encoding[ast.encoding.length - 1].to : ast;
@@ -24215,7 +24215,7 @@ function fromASTs(asts) {
24215
24215
  function getEncodedSchema(last$1) {
24216
24216
  const getLink = last$1.annotations?.toCodecJson ?? last$1.annotations?.toCodec;
24217
24217
  if (isFunction(getLink)) {
24218
- const link$2 = getLink(last$1.typeParameters.map((tp) => make$38(toEncoded(tp))));
24218
+ const link$2 = getLink(last$1.typeParameters.map((tp) => make$39(toEncoded(tp))));
24219
24219
  return replaceEncoding(last$1, [link$2]);
24220
24220
  }
24221
24221
  return null_;
@@ -24224,10 +24224,10 @@ function fromASTs(asts) {
24224
24224
  const annotations$1 = fromASTAnnotations(last$1.annotations);
24225
24225
  switch (last$1._tag) {
24226
24226
  case "Declaration": {
24227
- const encodedSchema = recur$1(getEncodedSchema(last$1), encodedSchemaPrefix);
24227
+ const encodedSchema = recur$2(getEncodedSchema(last$1), encodedSchemaPrefix);
24228
24228
  return {
24229
24229
  _tag: "Declaration",
24230
- typeParameters: last$1.typeParameters.map((ast) => recur$1(ast)),
24230
+ typeParameters: last$1.typeParameters.map((ast) => recur$2(ast)),
24231
24231
  encodedSchema,
24232
24232
  checks: fromASTChecks(last$1.checks),
24233
24233
  ...annotations$1
@@ -24253,7 +24253,7 @@ function fromASTs(asts) {
24253
24253
  ...annotations$1,
24254
24254
  ...typeof contentMediaType === "string" && isAST(contentSchema) ? {
24255
24255
  contentMediaType,
24256
- contentSchema: recur$1(contentSchema)
24256
+ contentSchema: recur$2(contentSchema)
24257
24257
  } : void 0
24258
24258
  };
24259
24259
  }
@@ -24284,7 +24284,7 @@ function fromASTs(asts) {
24284
24284
  };
24285
24285
  case "TemplateLiteral": return {
24286
24286
  _tag: last$1._tag,
24287
- parts: last$1.parts.map((ast) => recur$1(ast)),
24287
+ parts: last$1.parts.map((ast) => recur$2(ast)),
24288
24288
  ...annotations$1
24289
24289
  };
24290
24290
  case "Arrays": return {
@@ -24293,11 +24293,11 @@ function fromASTs(asts) {
24293
24293
  const last$2 = getLastEncoding(e);
24294
24294
  return {
24295
24295
  isOptional: isOptional(last$2),
24296
- type: recur$1(e),
24296
+ type: recur$2(e),
24297
24297
  ...fromASTAnnotations(last$2.context?.annotations)
24298
24298
  };
24299
24299
  }),
24300
- rest: last$1.rest.map((ast) => recur$1(ast)),
24300
+ rest: last$1.rest.map((ast) => recur$2(ast)),
24301
24301
  checks: fromASTChecks(last$1.checks),
24302
24302
  ...annotations$1
24303
24303
  };
@@ -24307,15 +24307,15 @@ function fromASTs(asts) {
24307
24307
  const last$2 = getLastEncoding(ps.type);
24308
24308
  return {
24309
24309
  name: ps.name,
24310
- type: recur$1(ps.type),
24310
+ type: recur$2(ps.type),
24311
24311
  isOptional: isOptional(last$2),
24312
24312
  isMutable: isMutable(last$2),
24313
24313
  ...fromASTAnnotations(last$2.context?.annotations)
24314
24314
  };
24315
24315
  }),
24316
24316
  indexSignatures: last$1.indexSignatures.map((is$2) => ({
24317
- parameter: recur$1(is$2.parameter),
24318
- type: recur$1(is$2.type)
24317
+ parameter: recur$2(is$2.parameter),
24318
+ type: recur$2(is$2.type)
24319
24319
  })),
24320
24320
  checks: fromASTChecks(last$1.checks),
24321
24321
  ...annotations$1
@@ -24324,7 +24324,7 @@ function fromASTs(asts) {
24324
24324
  const types$2 = jsonReorder(last$1.types);
24325
24325
  return {
24326
24326
  _tag: last$1._tag,
24327
- types: types$2.map((ast) => recur$1(ast)),
24327
+ types: types$2.map((ast) => recur$2(ast)),
24328
24328
  mode: last$1.mode,
24329
24329
  ...annotations$1
24330
24330
  };
@@ -24332,7 +24332,7 @@ function fromASTs(asts) {
24332
24332
  case "Suspend": return {
24333
24333
  _tag: "Suspend",
24334
24334
  checks: [],
24335
- thunk: recur$1(last$1.thunk()),
24335
+ thunk: recur$2(last$1.thunk()),
24336
24336
  ...annotations$1
24337
24337
  };
24338
24338
  }
@@ -24348,7 +24348,7 @@ function fromASTs(asts) {
24348
24348
  _tag: "Filter",
24349
24349
  meta: meta._tag === "isPropertyNames" ? {
24350
24350
  _tag: "isPropertyNames",
24351
- propertyNames: recur$1(meta.propertyNames)
24351
+ propertyNames: recur$2(meta.propertyNames)
24352
24352
  } : meta,
24353
24353
  ...fromASTAnnotations(c.annotations)
24354
24354
  };
@@ -24401,13 +24401,13 @@ function toJsonSchemaDocument$1(document, options) {
24401
24401
  function toJsonSchemaMultiDocument(multiDocument, options) {
24402
24402
  const generateDescriptions = options?.generateDescriptions ?? false;
24403
24403
  const additionalProperties = options?.additionalProperties ?? false;
24404
- const definitions = map$9(multiDocument.references, (d) => recur$1(d));
24404
+ const definitions = map$9(multiDocument.references, (d) => recur$2(d));
24405
24405
  return {
24406
24406
  dialect: "draft-2020-12",
24407
- schemas: map$8(multiDocument.representations, (s) => recur$1(s)),
24407
+ schemas: map$8(multiDocument.representations, (s) => recur$2(s)),
24408
24408
  definitions
24409
24409
  };
24410
- function recur$1(s) {
24410
+ function recur$2(s) {
24411
24411
  let js = on(s);
24412
24412
  if ("annotations" in s) {
24413
24413
  const a = collectJsonSchemaAnnotations(s.annotations);
@@ -24422,8 +24422,8 @@ function toJsonSchemaMultiDocument(multiDocument, options) {
24422
24422
  }
24423
24423
  return js;
24424
24424
  }
24425
- function on(schema) {
24426
- switch (schema._tag) {
24425
+ function on(schema$1) {
24426
+ switch (schema$1._tag) {
24427
24427
  case "Any": return {};
24428
24428
  case "Unknown":
24429
24429
  case "Void":
@@ -24438,18 +24438,18 @@ function toJsonSchemaMultiDocument(multiDocument, options) {
24438
24438
  "type": "string",
24439
24439
  "allOf": [{ "pattern": "^Symbol\\((.*)\\)$" }]
24440
24440
  };
24441
- case "Declaration": return recur$1(schema.encodedSchema);
24442
- case "Suspend": return recur$1(schema.thunk);
24443
- case "Reference": return { $ref: `#/$defs/${escapeToken(schema.$ref)}` };
24441
+ case "Declaration": return recur$2(schema$1.encodedSchema);
24442
+ case "Suspend": return recur$2(schema$1.thunk);
24443
+ case "Reference": return { $ref: `#/$defs/${escapeToken(schema$1.$ref)}` };
24444
24444
  case "Null": return { type: "null" };
24445
24445
  case "Never": return { not: {} };
24446
24446
  case "String": {
24447
24447
  const out = { type: "string" };
24448
- if (schema.contentMediaType !== void 0) out.contentMediaType = schema.contentMediaType;
24449
- if (schema.contentSchema !== void 0) out.contentSchema = recur$1(schema.contentSchema);
24448
+ if (schema$1.contentMediaType !== void 0) out.contentMediaType = schema$1.contentMediaType;
24449
+ if (schema$1.contentSchema !== void 0) out.contentSchema = recur$2(schema$1.contentSchema);
24450
24450
  return out;
24451
24451
  }
24452
- case "Number": return hasCheck(schema.checks, "isInt") ? { type: "integer" } : hasCheck(schema.checks, "isFinite") ? { type: "number" } : { "anyOf": [
24452
+ case "Number": return hasCheck(schema$1.checks, "isInt") ? { type: "integer" } : hasCheck(schema$1.checks, "isFinite") ? { type: "number" } : { "anyOf": [
24453
24453
  { type: "number" },
24454
24454
  {
24455
24455
  type: "string",
@@ -24466,7 +24466,7 @@ function toJsonSchemaMultiDocument(multiDocument, options) {
24466
24466
  ] };
24467
24467
  case "Boolean": return { type: "boolean" };
24468
24468
  case "Literal": {
24469
- const literal = schema.literal;
24469
+ const literal = schema$1.literal;
24470
24470
  if (typeof literal === "string") return {
24471
24471
  type: "string",
24472
24472
  enum: [literal]
@@ -24484,52 +24484,52 @@ function toJsonSchemaMultiDocument(multiDocument, options) {
24484
24484
  enum: [String(literal)]
24485
24485
  };
24486
24486
  }
24487
- case "Enum": return recur$1({
24487
+ case "Enum": return recur$2({
24488
24488
  _tag: "Union",
24489
- types: schema.enums.map(([title, value]) => ({
24489
+ types: schema$1.enums.map(([title, value]) => ({
24490
24490
  _tag: "Literal",
24491
24491
  literal: value,
24492
24492
  annotations: { title }
24493
24493
  })),
24494
24494
  mode: "anyOf",
24495
- annotations: schema.annotations
24495
+ annotations: schema$1.annotations
24496
24496
  });
24497
24497
  case "TemplateLiteral": return {
24498
24498
  type: "string",
24499
- pattern: `^${schema.parts.map(getPartPattern).join("")}$`
24499
+ pattern: `^${schema$1.parts.map(getPartPattern).join("")}$`
24500
24500
  };
24501
24501
  case "Arrays": {
24502
- if (schema.rest.length > 1) throw new globalThis.Error("Generating a JSON Schema for post-rest elements is not supported");
24502
+ if (schema$1.rest.length > 1) throw new globalThis.Error("Generating a JSON Schema for post-rest elements is not supported");
24503
24503
  const out = { type: "array" };
24504
- let minItems = schema.elements.length;
24505
- const prefixItems = schema.elements.map((e) => {
24504
+ let minItems = schema$1.elements.length;
24505
+ const prefixItems = schema$1.elements.map((e) => {
24506
24506
  if (e.isOptional) minItems--;
24507
- const v = recur$1(e.type);
24507
+ const v = recur$2(e.type);
24508
24508
  const a = collectJsonSchemaAnnotations(e.annotations);
24509
24509
  return a ? appendJsonSchema(v, a) : v;
24510
24510
  });
24511
24511
  if (prefixItems.length > 0) {
24512
24512
  out.prefixItems = prefixItems;
24513
- out.maxItems = schema.elements.length;
24513
+ out.maxItems = schema$1.elements.length;
24514
24514
  if (minItems > 0) out.minItems = minItems;
24515
24515
  } else out.items = false;
24516
- if (schema.rest.length > 0) {
24516
+ if (schema$1.rest.length > 0) {
24517
24517
  delete out.maxItems;
24518
- const rest = recur$1(schema.rest[0]);
24518
+ const rest = recur$2(schema$1.rest[0]);
24519
24519
  if (Object.keys(rest).length > 0) out.items = rest;
24520
24520
  else delete out.items;
24521
24521
  }
24522
24522
  return out;
24523
24523
  }
24524
24524
  case "Objects": {
24525
- if (schema.propertySignatures.length === 0 && schema.indexSignatures.length === 0) return { anyOf: [{ type: "object" }, { type: "array" }] };
24525
+ if (schema$1.propertySignatures.length === 0 && schema$1.indexSignatures.length === 0) return { anyOf: [{ type: "object" }, { type: "array" }] };
24526
24526
  const out = { type: "object" };
24527
24527
  const properties = {};
24528
24528
  const required = [];
24529
- for (const ps of schema.propertySignatures) {
24529
+ for (const ps of schema$1.propertySignatures) {
24530
24530
  const name = ps.name;
24531
24531
  if (typeof name !== "string") throw new globalThis.Error(`Unsupported property signature name: ${format$2(name)}`);
24532
- const v = recur$1(ps.type);
24532
+ const v = recur$2(ps.type);
24533
24533
  const a = collectJsonSchemaAnnotations(ps.annotations);
24534
24534
  properties[name] = a ? appendJsonSchema(v, a) : v;
24535
24535
  if (!ps.isOptional) required.push(name);
@@ -24538,8 +24538,8 @@ function toJsonSchemaMultiDocument(multiDocument, options) {
24538
24538
  if (required.length > 0) out.required = required;
24539
24539
  out.additionalProperties = additionalProperties;
24540
24540
  const patternProperties = {};
24541
- for (const is$2 of schema.indexSignatures) {
24542
- const type = recur$1(is$2.type);
24541
+ for (const is$2 of schema$1.indexSignatures) {
24542
+ const type = recur$2(is$2.type);
24543
24543
  const patterns = getParameterPatterns(is$2.parameter);
24544
24544
  if (patterns.length > 0) for (const pattern of patterns) patternProperties[pattern] = type;
24545
24545
  else out.additionalProperties = type;
@@ -24552,9 +24552,9 @@ function toJsonSchemaMultiDocument(multiDocument, options) {
24552
24552
  return out;
24553
24553
  }
24554
24554
  case "Union": {
24555
- const types$2 = schema.types.map(recur$1);
24555
+ const types$2 = schema$1.types.map(recur$2);
24556
24556
  if (types$2.length === 0) return { not: {} };
24557
- return schema.mode === "anyOf" ? { anyOf: types$2 } : { oneOf: types$2 };
24557
+ return schema$1.mode === "anyOf" ? { anyOf: types$2 } : { oneOf: types$2 };
24558
24558
  }
24559
24559
  }
24560
24560
  }
@@ -24642,7 +24642,7 @@ function toJsonSchemaMultiDocument(multiDocument, options) {
24642
24642
  minProperties: meta$1.length,
24643
24643
  maxProperties: meta$1.length
24644
24644
  };
24645
- case "isPropertyNames": return { propertyNames: recur$1(meta$1.propertyNames) };
24645
+ case "isPropertyNames": return { propertyNames: recur$2(meta$1.propertyNames) };
24646
24646
  case "isDateValid": return { format: "date-time" };
24647
24647
  }
24648
24648
  }
@@ -24658,14 +24658,14 @@ function toJsonSchemaMultiDocument(multiDocument, options) {
24658
24658
  }
24659
24659
  }
24660
24660
  function getPatterns(s) {
24661
- return recur$1(s.checks);
24662
- function recur$1(checks) {
24661
+ return recur$2(s.checks);
24662
+ function recur$2(checks) {
24663
24663
  return checks.flatMap((c) => {
24664
24664
  switch (c._tag) {
24665
24665
  case "Filter":
24666
24666
  if ("regExp" in c.meta) return [c.meta.regExp.source];
24667
24667
  return [];
24668
- case "FilterGroup": return recur$1(c.checks);
24668
+ case "FilterGroup": return recur$2(c.checks);
24669
24669
  }
24670
24670
  });
24671
24671
  }
@@ -24750,7 +24750,7 @@ const isRedacted = (u) => hasProperty(u, TypeId$39);
24750
24750
  * @since 3.3.0
24751
24751
  * @category constructors
24752
24752
  */
24753
- const make$37 = (value, options) => {
24753
+ const make$38 = (value, options) => {
24754
24754
  const redacted = Object.create(Proto$15);
24755
24755
  if (options?.label) redacted.label = options.label;
24756
24756
  redactedRegistry.set(redacted, value);
@@ -24787,7 +24787,7 @@ const TypeId$38 = TypeId$40;
24787
24787
  */
24788
24788
  function declareConstructor() {
24789
24789
  return (typeParameters, run$6, annotations$1) => {
24790
- return make$36(new Declaration(typeParameters.map(getAST), (typeParameters$1) => run$6(typeParameters$1.map((ast) => make$36(ast))), annotations$1));
24790
+ return make$37(new Declaration(typeParameters.map(getAST), (typeParameters$1) => run$6(typeParameters$1.map((ast) => make$37(ast))), annotations$1));
24791
24791
  };
24792
24792
  }
24793
24793
  /**
@@ -24798,7 +24798,7 @@ function declareConstructor() {
24798
24798
  * @since 4.0.0
24799
24799
  */
24800
24800
  function declare(is$2, annotations$1) {
24801
- return declareConstructor()([], () => (input, ast) => is$2(input) ? succeed(input) : fail$3(new InvalidType(ast, some(input))), annotations$1);
24801
+ return declareConstructor()([], () => (input, ast) => is$2(input) ? succeed$1(input) : fail$4(new InvalidType(ast, some(input))), annotations$1);
24802
24802
  }
24803
24803
  /**
24804
24804
  * Adds metadata annotations to a schema without changing its runtime behavior.
@@ -24916,8 +24916,8 @@ const asserts = asserts$1;
24916
24916
  * @category Decoding
24917
24917
  * @since 4.0.0
24918
24918
  */
24919
- function decodeUnknownEffect(schema) {
24920
- const parser = decodeUnknownEffect$1(schema);
24919
+ function decodeUnknownEffect(schema$1) {
24920
+ const parser = decodeUnknownEffect$1(schema$1);
24921
24921
  return (input, options) => {
24922
24922
  return mapErrorEager(parser(input, options), (issue) => new SchemaError(issue));
24923
24923
  };
@@ -24961,8 +24961,8 @@ const decodeSync = decodeSync$1;
24961
24961
  * @category Encoding
24962
24962
  * @since 4.0.0
24963
24963
  */
24964
- function encodeUnknownEffect(schema) {
24965
- const parser = encodeUnknownEffect$1(schema);
24964
+ function encodeUnknownEffect(schema$1) {
24965
+ const parser = encodeUnknownEffect$1(schema$1);
24966
24966
  return (input, options) => {
24967
24967
  return mapErrorEager(parser(input, options), (issue) => new SchemaError(issue));
24968
24968
  };
@@ -25017,7 +25017,7 @@ const encodeSync = encodeSync$1;
25017
25017
  * @category Constructors
25018
25018
  * @since 4.0.0
25019
25019
  */
25020
- const make$36 = make$38;
25020
+ const make$37 = make$39;
25021
25021
  /**
25022
25022
  * Tests if a value is a `Schema`.
25023
25023
  *
@@ -25048,7 +25048,7 @@ function isSchema(u) {
25048
25048
  *
25049
25049
  * @since 4.0.0
25050
25050
  */
25051
- const optionalKey = /* @__PURE__ */ lambda((schema) => make$36(optionalKey$1(schema.ast), { schema }));
25051
+ const optionalKey = /* @__PURE__ */ lambda((schema$1) => make$37(optionalKey$1(schema$1.ast), { schema: schema$1 }));
25052
25052
  /**
25053
25053
  * Creates an optional schema field that allows both the specified type and
25054
25054
  * `undefined`.
@@ -25083,7 +25083,7 @@ const optional$2 = /* @__PURE__ */ lambda((self$1) => optionalKey(UndefinedOr(se
25083
25083
  * @since 4.0.0
25084
25084
  */
25085
25085
  function Literal(literal) {
25086
- const out = make$36(new Literal$1(literal), {
25086
+ const out = make$37(new Literal$1(literal), {
25087
25087
  literal,
25088
25088
  transform(to) {
25089
25089
  return out.pipe(decodeTo(Literal(to), {
@@ -25097,29 +25097,29 @@ function Literal(literal) {
25097
25097
  /**
25098
25098
  * @since 4.0.0
25099
25099
  */
25100
- const Never = /* @__PURE__ */ make$36(never$3);
25100
+ const Never = /* @__PURE__ */ make$37(never$3);
25101
25101
  /**
25102
25102
  * @since 4.0.0
25103
25103
  */
25104
- const Any = /* @__PURE__ */ make$36(any);
25104
+ const Any = /* @__PURE__ */ make$37(any);
25105
25105
  /**
25106
25106
  * @since 4.0.0
25107
25107
  */
25108
- const Unknown = /* @__PURE__ */ make$36(unknown);
25108
+ const Unknown = /* @__PURE__ */ make$37(unknown);
25109
25109
  /**
25110
25110
  * @since 4.0.0
25111
25111
  */
25112
- const Null = /* @__PURE__ */ make$36(null_);
25112
+ const Null = /* @__PURE__ */ make$37(null_);
25113
25113
  /**
25114
25114
  * @since 4.0.0
25115
25115
  */
25116
- const Undefined = /* @__PURE__ */ make$36(undefined_);
25116
+ const Undefined = /* @__PURE__ */ make$37(undefined_);
25117
25117
  /**
25118
25118
  * A schema for all strings.
25119
25119
  *
25120
25120
  * @since 4.0.0
25121
25121
  */
25122
- const String$1 = /* @__PURE__ */ make$36(string$4);
25122
+ const String$1 = /* @__PURE__ */ make$37(string$5);
25123
25123
  /**
25124
25124
  * A schema for all numbers, including `NaN`, `Infinity`, and `-Infinity`.
25125
25125
  *
@@ -25130,40 +25130,40 @@ const String$1 = /* @__PURE__ */ make$36(string$4);
25130
25130
  *
25131
25131
  * @since 4.0.0
25132
25132
  */
25133
- const Number$1 = /* @__PURE__ */ make$36(number);
25133
+ const Number$1 = /* @__PURE__ */ make$37(number);
25134
25134
  /**
25135
25135
  * A schema for all booleans.
25136
25136
  *
25137
25137
  * @category Boolean
25138
25138
  * @since 4.0.0
25139
25139
  */
25140
- const Boolean$2 = /* @__PURE__ */ make$36(boolean$3);
25140
+ const Boolean$2 = /* @__PURE__ */ make$37(boolean$3);
25141
25141
  /**
25142
25142
  * A schema for all symbols.
25143
25143
  *
25144
25144
  * @since 4.0.0
25145
25145
  */
25146
- const Symbol$1 = /* @__PURE__ */ make$36(symbol);
25146
+ const Symbol$1 = /* @__PURE__ */ make$37(symbol);
25147
25147
  /**
25148
25148
  * A schema for all bigints.
25149
25149
  *
25150
25150
  * @since 4.0.0
25151
25151
  */
25152
- const BigInt$1 = /* @__PURE__ */ make$36(bigInt);
25152
+ const BigInt$1 = /* @__PURE__ */ make$37(bigInt);
25153
25153
  /**
25154
25154
  * A schema for the `void` type.
25155
25155
  *
25156
25156
  * @since 4.0.0
25157
25157
  */
25158
- const Void = /* @__PURE__ */ make$36(void_);
25158
+ const Void = /* @__PURE__ */ make$37(void_);
25159
25159
  /**
25160
25160
  * A schema for the `object` type.
25161
25161
  *
25162
25162
  * @since 4.0.0
25163
25163
  */
25164
- const ObjectKeyword = /* @__PURE__ */ make$36(objectKeyword);
25164
+ const ObjectKeyword = /* @__PURE__ */ make$37(objectKeyword);
25165
25165
  function makeStruct(ast, fields) {
25166
- return make$36(ast, {
25166
+ return make$37(ast, {
25167
25167
  fields,
25168
25168
  mapFields(f, options) {
25169
25169
  const fields$1 = f(this.fields);
@@ -25182,13 +25182,13 @@ function Struct(fields) {
25182
25182
  */
25183
25183
  function Record(key, value, options) {
25184
25184
  const keyValueCombiner = options?.keyValueCombiner?.decode || options?.keyValueCombiner?.encode ? new KeyValueCombiner(options.keyValueCombiner.decode, options.keyValueCombiner.encode) : void 0;
25185
- return make$36(record(key.ast, value.ast, keyValueCombiner), {
25185
+ return make$37(record(key.ast, value.ast, keyValueCombiner), {
25186
25186
  key,
25187
25187
  value
25188
25188
  });
25189
25189
  }
25190
25190
  function makeTuple(ast, elements) {
25191
- return make$36(ast, {
25191
+ return make$37(ast, {
25192
25192
  elements,
25193
25193
  mapElements(f, options) {
25194
25194
  const elements$1 = f(this.elements);
@@ -25207,14 +25207,14 @@ function Tuple(elements) {
25207
25207
  * @category Constructors
25208
25208
  * @since 4.0.0
25209
25209
  */
25210
- const Array$1 = /* @__PURE__ */ lambda((schema) => make$36(new Arrays(false, [], [schema.ast]), { schema }));
25210
+ const Array$1 = /* @__PURE__ */ lambda((schema$1) => make$37(new Arrays(false, [], [schema$1.ast]), { schema: schema$1 }));
25211
25211
  /**
25212
25212
  * @category Constructors
25213
25213
  * @since 4.0.0
25214
25214
  */
25215
- const NonEmptyArray = /* @__PURE__ */ lambda((schema) => make$36(new Arrays(false, [schema.ast], [schema.ast]), { schema }));
25215
+ const NonEmptyArray = /* @__PURE__ */ lambda((schema$1) => make$37(new Arrays(false, [schema$1.ast], [schema$1.ast]), { schema: schema$1 }));
25216
25216
  function makeUnion(ast, members) {
25217
- return make$36(ast, {
25217
+ return make$37(ast, {
25218
25218
  members,
25219
25219
  mapMembers(f, options) {
25220
25220
  const members$1 = f(this.members);
@@ -25243,7 +25243,7 @@ function Union(members, options) {
25243
25243
  */
25244
25244
  function Literals(literals) {
25245
25245
  const members = literals.map(Literal);
25246
- return make$36(union(members, "anyOf", void 0), {
25246
+ return make$37(union(members, "anyOf", void 0), {
25247
25247
  literals,
25248
25248
  members,
25249
25249
  mapMembers(f) {
@@ -25269,7 +25269,7 @@ const NullOr = /* @__PURE__ */ lambda((self$1) => Union([self$1, Null]));
25269
25269
  const UndefinedOr = /* @__PURE__ */ lambda((self$1) => Union([self$1, Undefined]));
25270
25270
  function decodeTo(to, transformation) {
25271
25271
  return (from) => {
25272
- return make$36(decodeTo$1(from.ast, to.ast, transformation ? make$39(transformation) : passthrough()), {
25272
+ return make$37(decodeTo$1(from.ast, to.ast, transformation ? make$40(transformation) : passthrough()), {
25273
25273
  from,
25274
25274
  to
25275
25275
  });
@@ -25279,8 +25279,8 @@ function decodeTo(to, transformation) {
25279
25279
  * @since 4.0.0
25280
25280
  */
25281
25281
  function withConstructorDefault(defaultValue) {
25282
- return (schema) => {
25283
- return make$36(withConstructorDefault$1(schema.ast, defaultValue), { schema });
25282
+ return (schema$1) => {
25283
+ return make$37(withConstructorDefault$1(schema$1.ast, defaultValue), { schema: schema$1 });
25284
25284
  };
25285
25285
  }
25286
25286
  /**
@@ -25312,7 +25312,7 @@ function instanceOf(constructor, annotations$1) {
25312
25312
  */
25313
25313
  function link$1() {
25314
25314
  return (encodeTo, transformation) => {
25315
- return new Link(encodeTo.ast, make$39(transformation));
25315
+ return new Link(encodeTo.ast, make$40(transformation));
25316
25316
  };
25317
25317
  }
25318
25318
  /**
@@ -26000,7 +26000,7 @@ const isNotUndefined = isNotUndefined$1;
26000
26000
  * @since 4.0.0
26001
26001
  */
26002
26002
  function Option(value) {
26003
- return make$36(declareConstructor()([value], ([value$1]) => (input, ast, options) => {
26003
+ return make$37(declareConstructor()([value], ([value$1]) => (input, ast, options) => {
26004
26004
  if (isOption(input)) {
26005
26005
  if (isNone(input)) return succeedNone;
26006
26006
  return mapBothEager(decodeUnknownEffect$1(value$1)(input.value, options), {
@@ -26008,7 +26008,7 @@ function Option(value) {
26008
26008
  onFailure: (issue) => new Composite(ast, some(input), [new Pointer(["value"], issue)])
26009
26009
  });
26010
26010
  }
26011
- return fail$3(new InvalidType(ast, some(input)));
26011
+ return fail$4(new InvalidType(ast, some(input)));
26012
26012
  }, {
26013
26013
  typeConstructor: { _tag: "effect/Option" },
26014
26014
  generation: {
@@ -26099,7 +26099,7 @@ const RegExp$1 = /* @__PURE__ */ instanceOf(globalThis.RegExp, {
26099
26099
  try: () => new globalThis.RegExp(e.source, e.flags),
26100
26100
  catch: (e$1) => new InvalidValue$1(some(e$1), { message: globalThis.String(e$1) })
26101
26101
  }),
26102
- encode: (regExp) => succeed({
26102
+ encode: (regExp) => succeed$1({
26103
26103
  source: regExp.source,
26104
26104
  flags: regExp.flags
26105
26105
  })
@@ -26321,12 +26321,12 @@ const DurationFromMillis = /* @__PURE__ */ Number$1.check(isGreaterThanOrEqualTo
26321
26321
  *
26322
26322
  * @since 4.0.0
26323
26323
  */
26324
- function fromJsonString(schema) {
26324
+ function fromJsonString(schema$1) {
26325
26325
  return String$1.annotate({
26326
26326
  expected: "a string that will be decoded as JSON",
26327
26327
  contentMediaType: "application/json",
26328
- contentSchema: toEncoded(schema.ast)
26329
- }).pipe(decodeTo(schema, fromJsonString$1));
26328
+ contentSchema: toEncoded(schema$1.ast)
26329
+ }).pipe(decodeTo(schema$1, fromJsonString$1));
26330
26330
  }
26331
26331
  /**
26332
26332
  * @since 4.0.0
@@ -26345,10 +26345,10 @@ const File = /* @__PURE__ */ instanceOf(globalThis.File, {
26345
26345
  lastModified: Number$1
26346
26346
  }), transformOrFail({
26347
26347
  decode: (e) => match$6(decode$1(e.data), {
26348
- onFailure: (error$1) => fail$3(new InvalidValue$1(some(e.data), { message: error$1.message })),
26348
+ onFailure: (error$1) => fail$4(new InvalidValue$1(some(e.data), { message: error$1.message })),
26349
26349
  onSuccess: (bytes) => {
26350
26350
  const buffer$1 = new globalThis.Uint8Array(bytes);
26351
- return succeed(new globalThis.File([buffer$1], e.name, {
26351
+ return succeed$1(new globalThis.File([buffer$1], e.name, {
26352
26352
  type: e.type,
26353
26353
  lastModified: e.lastModified
26354
26354
  }));
@@ -26388,10 +26388,10 @@ const FormData$1 = /* @__PURE__ */ instanceOf(globalThis.FormData, {
26388
26388
  decode: (e) => {
26389
26389
  const out = new globalThis.FormData();
26390
26390
  for (const [key, entry] of e) out.append(key, entry.value);
26391
- return succeed(out);
26391
+ return succeed$1(out);
26392
26392
  },
26393
26393
  encode: (formData) => {
26394
- return succeed(globalThis.Array.from(formData.entries()).map(([key, value]) => {
26394
+ return succeed$1(globalThis.Array.from(formData.entries()).map(([key, value]) => {
26395
26395
  if (typeof value === "string") return [key, {
26396
26396
  _tag: "String",
26397
26397
  value
@@ -26643,8 +26643,8 @@ function getClassSchemaFactory(from, identifier$1, annotations$1) {
26643
26643
  return (self$1) => {
26644
26644
  if (memo === void 0) {
26645
26645
  const transformation = getClassTransformation(self$1);
26646
- const to = make$36(new Declaration([from.ast], () => (input, ast) => {
26647
- return input instanceof self$1 || hasProperty(input, getClassTypeId(identifier$1)) ? succeed(input) : fail$3(new InvalidType(ast, some(input)));
26646
+ const to = make$37(new Declaration([from.ast], () => (input, ast) => {
26647
+ return input instanceof self$1 || hasProperty(input, getClassTypeId(identifier$1)) ? succeed$1(input) : fail$4(new InvalidType(ast, some(input)));
26648
26648
  }, {
26649
26649
  identifier: identifier$1,
26650
26650
  [ClassTypeId]: ([from$1]) => new Link(from$1, transformation),
@@ -26658,31 +26658,31 @@ function getClassSchemaFactory(from, identifier$1, annotations$1) {
26658
26658
  return memo;
26659
26659
  };
26660
26660
  }
26661
- function isStruct(schema) {
26662
- return isSchema(schema);
26661
+ function isStruct(schema$1) {
26662
+ return isSchema(schema$1);
26663
26663
  }
26664
26664
  /**
26665
26665
  * @category Constructors
26666
26666
  * @since 4.0.0
26667
26667
  */
26668
- const Class = (identifier$1) => (schema, annotations$1) => {
26669
- const struct$1 = isStruct(schema) ? schema : Struct(schema);
26668
+ const Class = (identifier$1) => (schema$1, annotations$1) => {
26669
+ const struct$1 = isStruct(schema$1) ? schema$1 : Struct(schema$1);
26670
26670
  return makeClass(Class$1, identifier$1, struct$1, annotations$1);
26671
26671
  };
26672
26672
  /**
26673
26673
  * @category Constructors
26674
26674
  * @since 4.0.0
26675
26675
  */
26676
- const ErrorClass = (identifier$1) => (schema, annotations$1) => {
26677
- const struct$1 = isStruct(schema) ? schema : Struct(schema);
26676
+ const ErrorClass = (identifier$1) => (schema$1, annotations$1) => {
26677
+ const struct$1 = isStruct(schema$1) ? schema$1 : Struct(schema$1);
26678
26678
  return makeClass(Error$3, identifier$1, struct$1, annotations$1);
26679
26679
  };
26680
26680
  /**
26681
26681
  * @category Representation
26682
26682
  * @since 4.0.0
26683
26683
  */
26684
- function toRepresentation(schema) {
26685
- return fromAST(schema.ast);
26684
+ function toRepresentation(schema$1) {
26685
+ return fromAST(schema$1.ast);
26686
26686
  }
26687
26687
  /**
26688
26688
  * Returns a JSON Schema Document (draft-2020-12).
@@ -26692,8 +26692,8 @@ function toRepresentation(schema) {
26692
26692
  * @category JsonSchema
26693
26693
  * @since 4.0.0
26694
26694
  */
26695
- function toJsonSchemaDocument(schema, options) {
26696
- const sd = toRepresentation(schema);
26695
+ function toJsonSchemaDocument(schema$1, options) {
26696
+ const sd = toRepresentation(schema$1);
26697
26697
  const jd = toJsonSchemaDocument$1(sd, options);
26698
26698
  return {
26699
26699
  dialect: "draft-2020-12",
@@ -26705,12 +26705,12 @@ function toJsonSchemaDocument(schema, options) {
26705
26705
  * @category Serializer
26706
26706
  * @since 4.0.0
26707
26707
  */
26708
- function toCodecJson(schema) {
26709
- return make$36(toCodecJson$1(schema.ast));
26708
+ function toCodecJson(schema$1) {
26709
+ return make$37(toCodecJson$1(schema$1.ast));
26710
26710
  }
26711
- function toCodecStringTree(schema, options) {
26712
- if (options?.keepDeclarations === true) return make$36(toCodecEnsureArray(serializerStringTreeKeepDeclarations(schema.ast)));
26713
- else return make$36(toCodecEnsureArray(serializerStringTree(schema.ast)));
26711
+ function toCodecStringTree(schema$1, options) {
26712
+ if (options?.keepDeclarations === true) return make$37(toCodecEnsureArray(serializerStringTreeKeepDeclarations(schema$1.ast)));
26713
+ else return make$37(toCodecEnsureArray(serializerStringTree(schema$1.ast)));
26714
26714
  }
26715
26715
  function getStringTreePriority(ast) {
26716
26716
  switch (ast._tag) {
@@ -26724,15 +26724,15 @@ function getStringTreePriority(ast) {
26724
26724
  }
26725
26725
  }
26726
26726
  const treeReorder = /* @__PURE__ */ makeReorder(getStringTreePriority);
26727
- function serializerTree(ast, recur$1, onMissingAnnotation) {
26727
+ function serializerTree(ast, recur$2, onMissingAnnotation) {
26728
26728
  switch (ast._tag) {
26729
26729
  case "Unknown":
26730
26730
  case "ObjectKeyword":
26731
26731
  case "Declaration": {
26732
26732
  const getLink = ast.annotations?.toCodecJson ?? ast.annotations?.toCodec;
26733
26733
  if (isFunction(getLink)) {
26734
- const link$2 = getLink(isDeclaration(ast) ? ast.typeParameters.map((tp) => make$36(recur$1(toEncoded(tp)))) : []);
26735
- const to = recur$1(link$2.to);
26734
+ const link$2 = getLink(isDeclaration(ast) ? ast.typeParameters.map((tp) => make$37(recur$2(toEncoded(tp)))) : []);
26735
+ const to = recur$2(link$2.to);
26736
26736
  return replaceEncoding(ast, to === link$2.to ? [link$2] : [new Link(to, link$2.transformation)]);
26737
26737
  }
26738
26738
  return onMissingAnnotation(ast);
@@ -26747,14 +26747,14 @@ function serializerTree(ast, recur$1, onMissingAnnotation) {
26747
26747
  case "BigInt": return ast.toCodecStringTree();
26748
26748
  case "Objects":
26749
26749
  if (ast.propertySignatures.some((ps) => typeof ps.name !== "string")) throw new globalThis.Error("Objects property names must be strings", { cause: ast });
26750
- return ast.recur(recur$1);
26750
+ return ast.recur(recur$2);
26751
26751
  case "Union": {
26752
26752
  const sortedTypes = treeReorder(ast.types);
26753
- if (sortedTypes !== ast.types) return new Union$1(sortedTypes, ast.mode, ast.annotations, ast.checks, ast.encoding, ast.context).recur(recur$1);
26754
- return ast.recur(recur$1);
26753
+ if (sortedTypes !== ast.types) return new Union$1(sortedTypes, ast.mode, ast.annotations, ast.checks, ast.encoding, ast.context).recur(recur$2);
26754
+ return ast.recur(recur$2);
26755
26755
  }
26756
26756
  case "Arrays":
26757
- case "Suspend": return ast.recur(recur$1);
26757
+ case "Suspend": return ast.recur(recur$2);
26758
26758
  }
26759
26759
  return ast;
26760
26760
  }
@@ -26776,7 +26776,7 @@ const toCodecEnsureArray = /* @__PURE__ */ toCodec((ast) => {
26776
26776
  if (isUnion(ast) && ast.annotations?.[SERIALIZER_ENSURE_ARRAY]) return ast;
26777
26777
  const out = onSerializerEnsureArray(ast);
26778
26778
  if (isArrays(out)) {
26779
- const ensure = new Union$1([out, decodeTo$1(string$4, out, new Transformation(split(), passthrough$1()))], "anyOf", { [SERIALIZER_ENSURE_ARRAY]: true });
26779
+ const ensure = new Union$1([out, decodeTo$1(string$5, out, new Transformation(split(), passthrough$1()))], "anyOf", { [SERIALIZER_ENSURE_ARRAY]: true });
26780
26780
  return isOptional(ast) ? optionalKey$1(ensure) : ensure;
26781
26781
  }
26782
26782
  return out;
@@ -31878,7 +31878,7 @@ var require_createNode = /* @__PURE__ */ __commonJSMin$1(((exports) => {
31878
31878
  return map$12;
31879
31879
  }
31880
31880
  if (value instanceof String || value instanceof Number || value instanceof Boolean || typeof BigInt !== "undefined" && value instanceof BigInt) value = value.valueOf();
31881
- const { aliasDuplicateObjects, onAnchor, onTagObj, schema, sourceObjects } = ctx;
31881
+ const { aliasDuplicateObjects, onAnchor, onTagObj, schema: schema$1, sourceObjects } = ctx;
31882
31882
  let ref = void 0;
31883
31883
  if (aliasDuplicateObjects && value && typeof value === "object") {
31884
31884
  ref = sourceObjects.get(value);
@@ -31894,7 +31894,7 @@ var require_createNode = /* @__PURE__ */ __commonJSMin$1(((exports) => {
31894
31894
  }
31895
31895
  }
31896
31896
  if (tagName?.startsWith("!!")) tagName = defaultTagPrefix + tagName.slice(2);
31897
- let tagObj = findTagObject(value, tagName, schema.tags);
31897
+ let tagObj = findTagObject(value, tagName, schema$1.tags);
31898
31898
  if (!tagObj) {
31899
31899
  if (value && typeof value.toJSON === "function") value = value.toJSON();
31900
31900
  if (!value || typeof value !== "object") {
@@ -31902,7 +31902,7 @@ var require_createNode = /* @__PURE__ */ __commonJSMin$1(((exports) => {
31902
31902
  if (ref) ref.node = node$1;
31903
31903
  return node$1;
31904
31904
  }
31905
- tagObj = value instanceof Map ? schema[identity.MAP] : Symbol.iterator in Object(value) ? schema[identity.SEQ] : schema[identity.MAP];
31905
+ tagObj = value instanceof Map ? schema$1[identity.MAP] : Symbol.iterator in Object(value) ? schema$1[identity.SEQ] : schema$1[identity.MAP];
31906
31906
  }
31907
31907
  if (onTagObj) {
31908
31908
  onTagObj(tagObj);
@@ -31923,7 +31923,7 @@ var require_Collection = /* @__PURE__ */ __commonJSMin$1(((exports) => {
31923
31923
  var createNode = require_createNode();
31924
31924
  var identity = require_identity();
31925
31925
  var Node = require_Node();
31926
- function collectionFromPath(schema, path$2, value) {
31926
+ function collectionFromPath(schema$1, path$2, value) {
31927
31927
  let v = value;
31928
31928
  for (let i = path$2.length - 1; i >= 0; --i) {
31929
31929
  const k = path$2[i];
@@ -31939,16 +31939,16 @@ var require_Collection = /* @__PURE__ */ __commonJSMin$1(((exports) => {
31939
31939
  onAnchor: () => {
31940
31940
  throw new Error("This should not happen, please report a bug.");
31941
31941
  },
31942
- schema,
31942
+ schema: schema$1,
31943
31943
  sourceObjects: /* @__PURE__ */ new Map()
31944
31944
  });
31945
31945
  }
31946
31946
  const isEmptyPath = (path$2) => path$2 == null || typeof path$2 === "object" && !!path$2[Symbol.iterator]().next().done;
31947
31947
  var Collection = class extends Node.NodeBase {
31948
- constructor(type, schema) {
31948
+ constructor(type, schema$1) {
31949
31949
  super(type);
31950
31950
  Object.defineProperty(this, "schema", {
31951
- value: schema,
31951
+ value: schema$1,
31952
31952
  configurable: true,
31953
31953
  enumerable: false,
31954
31954
  writable: true
@@ -31959,10 +31959,10 @@ var require_Collection = /* @__PURE__ */ __commonJSMin$1(((exports) => {
31959
31959
  *
31960
31960
  * @param schema - If defined, overwrites the original's schema
31961
31961
  */
31962
- clone(schema) {
31962
+ clone(schema$1) {
31963
31963
  const copy$1 = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
31964
- if (schema) copy$1.schema = schema;
31965
- copy$1.items = copy$1.items.map((it) => identity.isNode(it) || identity.isPair(it) ? it.clone(schema) : it);
31964
+ if (schema$1) copy$1.schema = schema$1;
31965
+ copy$1.items = copy$1.items.map((it) => identity.isNode(it) || identity.isPair(it) ? it.clone(schema$1) : it);
31966
31966
  if (this.range) copy$1.range = this.range.slice();
31967
31967
  return copy$1;
31968
31968
  }
@@ -32732,10 +32732,10 @@ var require_Pair = /* @__PURE__ */ __commonJSMin$1(((exports) => {
32732
32732
  this.key = key;
32733
32733
  this.value = value;
32734
32734
  }
32735
- clone(schema) {
32735
+ clone(schema$1) {
32736
32736
  let { key, value } = this;
32737
- if (identity.isNode(key)) key = key.clone(schema);
32738
- if (identity.isNode(value)) value = value.clone(schema);
32737
+ if (identity.isNode(key)) key = key.clone(schema$1);
32738
+ if (identity.isNode(value)) value = value.clone(schema$1);
32739
32739
  return new Pair(key, value);
32740
32740
  }
32741
32741
  toJSON(_, ctx) {
@@ -32885,17 +32885,17 @@ var require_YAMLMap = /* @__PURE__ */ __commonJSMin$1(((exports) => {
32885
32885
  static get tagName() {
32886
32886
  return "tag:yaml.org,2002:map";
32887
32887
  }
32888
- constructor(schema) {
32889
- super(identity.MAP, schema);
32888
+ constructor(schema$1) {
32889
+ super(identity.MAP, schema$1);
32890
32890
  this.items = [];
32891
32891
  }
32892
32892
  /**
32893
32893
  * A generic collection parsing method that can be extended
32894
32894
  * to other node classes that inherit from YAMLMap
32895
32895
  */
32896
- static from(schema, obj, ctx) {
32896
+ static from(schema$1, obj, ctx) {
32897
32897
  const { keepUndefined, replacer } = ctx;
32898
- const map$12 = new this(schema);
32898
+ const map$12 = new this(schema$1);
32899
32899
  const add$4 = (key, value) => {
32900
32900
  if (typeof replacer === "function") value = replacer.call(obj, key, value);
32901
32901
  else if (Array.isArray(replacer) && !replacer.includes(key)) return;
@@ -32903,7 +32903,7 @@ var require_YAMLMap = /* @__PURE__ */ __commonJSMin$1(((exports) => {
32903
32903
  };
32904
32904
  if (obj instanceof Map) for (const [key, value] of obj) add$4(key, value);
32905
32905
  else if (obj && typeof obj === "object") for (const key of Object.keys(obj)) add$4(key, obj[key]);
32906
- if (typeof schema.sortMapEntries === "function") map$12.items.sort(schema.sortMapEntries);
32906
+ if (typeof schema$1.sortMapEntries === "function") map$12.items.sort(schema$1.sortMapEntries);
32907
32907
  return map$12;
32908
32908
  }
32909
32909
  /**
@@ -32989,7 +32989,7 @@ var require_map = /* @__PURE__ */ __commonJSMin$1(((exports) => {
32989
32989
  if (!identity.isMap(map$12)) onError$2("Expected a mapping for this tag");
32990
32990
  return map$12;
32991
32991
  },
32992
- createNode: (schema, obj, ctx) => YAMLMap.YAMLMap.from(schema, obj, ctx)
32992
+ createNode: (schema$1, obj, ctx) => YAMLMap.YAMLMap.from(schema$1, obj, ctx)
32993
32993
  };
32994
32994
  exports.map = map;
32995
32995
  }));
@@ -33007,8 +33007,8 @@ var require_YAMLSeq = /* @__PURE__ */ __commonJSMin$1(((exports) => {
33007
33007
  static get tagName() {
33008
33008
  return "tag:yaml.org,2002:seq";
33009
33009
  }
33010
- constructor(schema) {
33011
- super(identity.SEQ, schema);
33010
+ constructor(schema$1) {
33011
+ super(identity.SEQ, schema$1);
33012
33012
  this.items = [];
33013
33013
  }
33014
33014
  add(value) {
@@ -33077,9 +33077,9 @@ var require_YAMLSeq = /* @__PURE__ */ __commonJSMin$1(((exports) => {
33077
33077
  onComment
33078
33078
  });
33079
33079
  }
33080
- static from(schema, obj, ctx) {
33080
+ static from(schema$1, obj, ctx) {
33081
33081
  const { replacer } = ctx;
33082
- const seq = new this(schema);
33082
+ const seq = new this(schema$1);
33083
33083
  if (obj && Symbol.iterator in Object(obj)) {
33084
33084
  let i = 0;
33085
33085
  for (let it of obj) {
@@ -33115,7 +33115,7 @@ var require_seq = /* @__PURE__ */ __commonJSMin$1(((exports) => {
33115
33115
  if (!identity.isSeq(seq)) onError$2("Expected a sequence for this tag");
33116
33116
  return seq;
33117
33117
  },
33118
- createNode: (schema, obj, ctx) => YAMLSeq.YAMLSeq.from(schema, obj, ctx)
33118
+ createNode: (schema$1, obj, ctx) => YAMLSeq.YAMLSeq.from(schema$1, obj, ctx)
33119
33119
  };
33120
33120
  exports.seq = seq;
33121
33121
  }));
@@ -33446,9 +33446,9 @@ var require_pairs = /* @__PURE__ */ __commonJSMin$1(((exports) => {
33446
33446
  else onError$2("Expected a sequence for this tag");
33447
33447
  return seq;
33448
33448
  }
33449
- function createPairs(schema, iterable, ctx) {
33449
+ function createPairs(schema$1, iterable, ctx) {
33450
33450
  const { replacer } = ctx;
33451
- const pairs = new YAMLSeq.YAMLSeq(schema);
33451
+ const pairs = new YAMLSeq.YAMLSeq(schema$1);
33452
33452
  pairs.tag = "tag:yaml.org,2002:pairs";
33453
33453
  let i = 0;
33454
33454
  if (iterable && Symbol.iterator in Object(iterable)) for (let it of iterable) {
@@ -33518,8 +33518,8 @@ var require_omap = /* @__PURE__ */ __commonJSMin$1(((exports) => {
33518
33518
  }
33519
33519
  return map$12;
33520
33520
  }
33521
- static from(schema, iterable, ctx) {
33522
- const pairs$1 = pairs.createPairs(schema, iterable, ctx);
33521
+ static from(schema$1, iterable, ctx) {
33522
+ const pairs$1 = pairs.createPairs(schema$1, iterable, ctx);
33523
33523
  const omap = new this();
33524
33524
  omap.items = pairs$1.items;
33525
33525
  return omap;
@@ -33539,7 +33539,7 @@ var require_omap = /* @__PURE__ */ __commonJSMin$1(((exports) => {
33539
33539
  else seenKeys.push(key.value);
33540
33540
  return Object.assign(new YAMLOMap(), pairs$1);
33541
33541
  },
33542
- createNode: (schema, iterable, ctx) => YAMLOMap.from(schema, iterable, ctx)
33542
+ createNode: (schema$1, iterable, ctx) => YAMLOMap.from(schema$1, iterable, ctx)
33543
33543
  };
33544
33544
  exports.YAMLOMap = YAMLOMap;
33545
33545
  exports.omap = omap;
@@ -33702,8 +33702,8 @@ var require_set = /* @__PURE__ */ __commonJSMin$1(((exports) => {
33702
33702
  var Pair = require_Pair();
33703
33703
  var YAMLMap = require_YAMLMap();
33704
33704
  var YAMLSet = class YAMLSet extends YAMLMap.YAMLMap {
33705
- constructor(schema) {
33706
- super(schema);
33705
+ constructor(schema$1) {
33706
+ super(schema$1);
33707
33707
  this.tag = YAMLSet.tag;
33708
33708
  }
33709
33709
  add(key) {
@@ -33735,9 +33735,9 @@ var require_set = /* @__PURE__ */ __commonJSMin$1(((exports) => {
33735
33735
  if (this.hasAllNullValues(true)) return super.toString(Object.assign({}, ctx, { allNullValues: true }), onComment, onChompKeep);
33736
33736
  else throw new Error("Set items must all have null values");
33737
33737
  }
33738
- static from(schema, iterable, ctx) {
33738
+ static from(schema$1, iterable, ctx) {
33739
33739
  const { replacer } = ctx;
33740
- const set$6 = new this(schema);
33740
+ const set$6 = new this(schema$1);
33741
33741
  if (iterable && Symbol.iterator in Object(iterable)) for (let value of iterable) {
33742
33742
  if (typeof replacer === "function") value = replacer.call(iterable, value, value);
33743
33743
  set$6.items.push(Pair.createPair(value, null, ctx));
@@ -33752,7 +33752,7 @@ var require_set = /* @__PURE__ */ __commonJSMin$1(((exports) => {
33752
33752
  nodeClass: YAMLSet,
33753
33753
  default: false,
33754
33754
  tag: "tag:yaml.org,2002:set",
33755
- createNode: (schema, iterable, ctx) => YAMLSet.from(schema, iterable, ctx),
33755
+ createNode: (schema$1, iterable, ctx) => YAMLSet.from(schema$1, iterable, ctx),
33756
33756
  resolve(map$12, onError$2) {
33757
33757
  if (identity.isMap(map$12)) if (map$12.hasAllNullValues(true)) return Object.assign(new YAMLSet(), map$12);
33758
33758
  else onError$2("Set items must all have null values");
@@ -33985,9 +33985,9 @@ var require_Schema = /* @__PURE__ */ __commonJSMin$1(((exports) => {
33985
33985
  var tags = require_tags();
33986
33986
  const sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
33987
33987
  var Schema = class Schema {
33988
- constructor({ compat, customTags, merge: merge$6, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
33988
+ constructor({ compat, customTags, merge: merge$6, resolveKnownTags, schema: schema$1, sortMapEntries, toStringDefaults }) {
33989
33989
  this.compat = Array.isArray(compat) ? tags.getTags(compat, "compat") : compat ? tags.getTags(null, compat) : null;
33990
- this.name = typeof schema === "string" && schema || "core";
33990
+ this.name = typeof schema$1 === "string" && schema$1 || "core";
33991
33991
  this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};
33992
33992
  this.tags = tags.getTags(customTags, this.name, merge$6);
33993
33993
  this.toStringOptions = toStringDefaults ?? null;
@@ -35358,27 +35358,27 @@ var require_compose_scalar = /* @__PURE__ */ __commonJSMin$1(((exports) => {
35358
35358
  if (comment) scalar.comment = comment;
35359
35359
  return scalar;
35360
35360
  }
35361
- function findScalarTagByName(schema, value, tagName, tagToken, onError$2) {
35362
- if (tagName === "!") return schema[identity.SCALAR];
35361
+ function findScalarTagByName(schema$1, value, tagName, tagToken, onError$2) {
35362
+ if (tagName === "!") return schema$1[identity.SCALAR];
35363
35363
  const matchWithTest = [];
35364
- for (const tag$1 of schema.tags) if (!tag$1.collection && tag$1.tag === tagName) if (tag$1.default && tag$1.test) matchWithTest.push(tag$1);
35364
+ for (const tag$1 of schema$1.tags) if (!tag$1.collection && tag$1.tag === tagName) if (tag$1.default && tag$1.test) matchWithTest.push(tag$1);
35365
35365
  else return tag$1;
35366
35366
  for (const tag$1 of matchWithTest) if (tag$1.test?.test(value)) return tag$1;
35367
- const kt = schema.knownTags[tagName];
35367
+ const kt = schema$1.knownTags[tagName];
35368
35368
  if (kt && !kt.collection) {
35369
- schema.tags.push(Object.assign({}, kt, {
35369
+ schema$1.tags.push(Object.assign({}, kt, {
35370
35370
  default: false,
35371
35371
  test: void 0
35372
35372
  }));
35373
35373
  return kt;
35374
35374
  }
35375
35375
  onError$2(tagToken, "TAG_RESOLVE_FAILED", `Unresolved tag: ${tagName}`, tagName !== "tag:yaml.org,2002:str");
35376
- return schema[identity.SCALAR];
35376
+ return schema$1[identity.SCALAR];
35377
35377
  }
35378
- function findScalarTagByTest({ atKey, directives, schema }, value, token, onError$2) {
35379
- const tag$1 = schema.tags.find((tag$2) => (tag$2.default === true || atKey && tag$2.default === "key") && tag$2.test?.test(value)) || schema[identity.SCALAR];
35380
- if (schema.compat) {
35381
- const compat = schema.compat.find((tag$2) => tag$2.default && tag$2.test?.test(value)) ?? schema[identity.SCALAR];
35378
+ function findScalarTagByTest({ atKey, directives, schema: schema$1 }, value, token, onError$2) {
35379
+ const tag$1 = schema$1.tags.find((tag$2) => (tag$2.default === true || atKey && tag$2.default === "key") && tag$2.test?.test(value)) || schema$1[identity.SCALAR];
35380
+ if (schema$1.compat) {
35381
+ const compat = schema$1.compat.find((tag$2) => tag$2.default && tag$2.test?.test(value)) ?? schema$1[identity.SCALAR];
35382
35382
  if (tag$1.tag !== compat.tag) onError$2(token, "TAG_RESOLVE_FAILED", `Value may be parsed as either ${directives.tagString(tag$1.tag)} or ${directives.tagString(compat.tag)}`, true);
35383
35383
  }
35384
35384
  return tag$1;
@@ -37815,7 +37815,7 @@ var require_dist = /* @__PURE__ */ __commonJSMin$1(((exports) => {
37815
37815
  function nominal() {
37816
37816
  return Object.assign((input) => input, {
37817
37817
  option: (input) => some(input),
37818
- result: (input) => succeed$5(input),
37818
+ result: (input) => succeed$6(input),
37819
37819
  is: (_) => true
37820
37820
  });
37821
37821
  }
@@ -38171,7 +38171,7 @@ const Empty$2 = /* @__PURE__ */ Symbol.for("effect/MutableList/Empty");
38171
38171
  * @since 4.0.0
38172
38172
  * @category constructors
38173
38173
  */
38174
- const make$35 = () => ({
38174
+ const make$36 = () => ({
38175
38175
  head: void 0,
38176
38176
  tail: void 0,
38177
38177
  length: 0
@@ -38510,7 +38510,7 @@ const MutableRefProto = {
38510
38510
  * @since 2.0.0
38511
38511
  * @category constructors
38512
38512
  */
38513
- const make$34 = (value) => {
38513
+ const make$35 = (value) => {
38514
38514
  const ref = Object.create(MutableRefProto);
38515
38515
  ref.current = value;
38516
38516
  return ref;
@@ -38604,12 +38604,12 @@ const QueueProto = {
38604
38604
  * })
38605
38605
  * ```
38606
38606
  */
38607
- const make$33 = (options) => withFiber$1((fiber$2) => {
38607
+ const make$34 = (options) => withFiber$1((fiber$2) => {
38608
38608
  const self$1 = Object.create(QueueProto);
38609
38609
  self$1.scheduler = fiber$2.currentScheduler;
38610
38610
  self$1.capacity = options?.capacity ?? Number.POSITIVE_INFINITY;
38611
38611
  self$1.strategy = options?.strategy ?? "suspend";
38612
- self$1.messages = make$35();
38612
+ self$1.messages = make$36();
38613
38613
  self$1.scheduleRunning = false;
38614
38614
  self$1.state = {
38615
38615
  _tag: "Open",
@@ -38617,7 +38617,7 @@ const make$33 = (options) => withFiber$1((fiber$2) => {
38617
38617
  offers: /* @__PURE__ */ new Set(),
38618
38618
  awaiters: /* @__PURE__ */ new Set()
38619
38619
  };
38620
- return succeed$4(self$1);
38620
+ return succeed$5(self$1);
38621
38621
  });
38622
38622
  /**
38623
38623
  * Creates a bounded queue with the specified capacity that uses backpressure strategy.
@@ -38647,7 +38647,7 @@ const make$33 = (options) => withFiber$1((fiber$2) => {
38647
38647
  * @since 2.0.0
38648
38648
  * @category constructors
38649
38649
  */
38650
- const bounded = (capacity) => make$33({ capacity });
38650
+ const bounded = (capacity) => make$34({ capacity });
38651
38651
  /**
38652
38652
  * Add a message to the queue. Returns `false` if the queue is done.
38653
38653
  *
@@ -38775,10 +38775,10 @@ const offerUnsafe = (self$1, message) => {
38775
38775
  * @since 4.0.0
38776
38776
  */
38777
38777
  const offerAll = (self$1, messages) => suspend$3(() => {
38778
- if (self$1.state._tag !== "Open") return succeed$4(fromIterable$2(messages));
38778
+ if (self$1.state._tag !== "Open") return succeed$5(fromIterable$2(messages));
38779
38779
  const remaining = offerAllUnsafe(self$1, messages);
38780
38780
  if (remaining.length === 0) return exitSucceed([]);
38781
- else if (self$1.strategy === "dropping") return succeed$4(remaining);
38781
+ else if (self$1.strategy === "dropping") return succeed$5(remaining);
38782
38782
  return offerRemainingArray(self$1, remaining);
38783
38783
  });
38784
38784
  /**
@@ -38982,15 +38982,15 @@ const done = (self$1, exit$2) => sync$1(() => doneUnsafe(self$1, exit$2));
38982
38982
  */
38983
38983
  const doneUnsafe = (self$1, exit$2) => {
38984
38984
  if (self$1.state._tag !== "Open") return false;
38985
- const fail$10 = exitZipRight(exit$2, exitFailDone);
38985
+ const fail$11 = exitZipRight(exit$2, exitFailDone);
38986
38986
  if (self$1.state.offers.size === 0 && self$1.messages.length === 0) {
38987
- finalize(self$1, fail$10);
38987
+ finalize(self$1, fail$11);
38988
38988
  return true;
38989
38989
  }
38990
38990
  self$1.state = {
38991
38991
  ...self$1.state,
38992
38992
  _tag: "Closing",
38993
- exit: fail$10
38993
+ exit: fail$11
38994
38994
  };
38995
38995
  return true;
38996
38996
  };
@@ -39545,7 +39545,7 @@ const ChannelProto = {
39545
39545
  */
39546
39546
  const fromTransform$1 = (transform$2) => {
39547
39547
  const self$1 = Object.create(ChannelProto);
39548
- self$1.transform = (upstream, scope$2) => catchCause$1(transform$2(upstream, scope$2), (cause) => succeed(failCause$2(cause)));
39548
+ self$1.transform = (upstream, scope$2) => catchCause$1(transform$2(upstream, scope$2), (cause) => succeed$1(failCause$2(cause)));
39549
39549
  return self$1;
39550
39550
  };
39551
39551
  /**
@@ -39632,7 +39632,7 @@ const toTransform = (channel) => channel.transform;
39632
39632
  * @since 2.0.0
39633
39633
  */
39634
39634
  const DefaultChunkSize$1 = 4096;
39635
- const asyncQueue = (scope$2, f, options) => make$33({
39635
+ const asyncQueue = (scope$2, f, options) => make$34({
39636
39636
  capacity: options?.bufferSize,
39637
39637
  strategy: options?.strategy
39638
39638
  }).pipe(tap((queue) => addFinalizer$1(scope$2, shutdown(queue))), tap((queue) => {
@@ -39694,7 +39694,7 @@ const suspend$1 = (evaluate$1) => fromTransform$1((upstream, scope$2) => suspend
39694
39694
  * @since 2.0.0
39695
39695
  * @category constructors
39696
39696
  */
39697
- const empty$8 = /* @__PURE__ */ fromPull$1(/* @__PURE__ */ succeed(haltVoid));
39697
+ const empty$8 = /* @__PURE__ */ fromPull$1(/* @__PURE__ */ succeed$1(haltVoid));
39698
39698
  /**
39699
39699
  * Represents an Channel that never completes
39700
39700
  *
@@ -39719,7 +39719,7 @@ const empty$8 = /* @__PURE__ */ fromPull$1(/* @__PURE__ */ succeed(haltVoid));
39719
39719
  * @since 2.0.0
39720
39720
  * @category constructors
39721
39721
  */
39722
- const never$2 = /* @__PURE__ */ fromPull$1(/* @__PURE__ */ succeed(never$4));
39722
+ const never$2 = /* @__PURE__ */ fromPull$1(/* @__PURE__ */ succeed$1(never$4));
39723
39723
  /**
39724
39724
  * Constructs a channel that fails immediately with the specified error.
39725
39725
  *
@@ -39749,7 +39749,7 @@ const never$2 = /* @__PURE__ */ fromPull$1(/* @__PURE__ */ succeed(never$4));
39749
39749
  * @since 2.0.0
39750
39750
  * @category constructors
39751
39751
  */
39752
- const fail$1 = (error$1) => fromPull$1(succeed(fail$3(error$1)));
39752
+ const fail$2 = (error$1) => fromPull$1(succeed$1(fail$4(error$1)));
39753
39753
  /**
39754
39754
  * Constructs a channel that fails immediately with the specified `Cause`.
39755
39755
  *
@@ -39846,14 +39846,14 @@ const map$3 = /* @__PURE__ */ dual(2, (self$1, f) => transformPull$1(self$1, (pu
39846
39846
  * @since 2.0.0
39847
39847
  * @category Sequencing
39848
39848
  */
39849
- const mapDone = /* @__PURE__ */ dual(2, (self$1, f) => mapDoneEffect(self$1, (o) => succeed(f(o))));
39849
+ const mapDone = /* @__PURE__ */ dual(2, (self$1, f) => mapDoneEffect(self$1, (o) => succeed$1(f(o))));
39850
39850
  /**
39851
39851
  * Maps the done value of this channel using the specified effectful function.
39852
39852
  *
39853
39853
  * @since 2.0.0
39854
39854
  * @category Sequencing
39855
39855
  */
39856
- const mapDoneEffect = /* @__PURE__ */ dual(2, (self$1, f) => transformPull$1(self$1, (pull) => succeed(catchHalt(pull, (done$2) => flatMap(f(done$2), halt)))));
39856
+ const mapDoneEffect = /* @__PURE__ */ dual(2, (self$1, f) => transformPull$1(self$1, (pull) => succeed$1(catchHalt(pull, (done$2) => flatMap(f(done$2), halt)))));
39857
39857
  const concurrencyIsSequential = (concurrency$1) => concurrency$1 === void 0 || concurrency$1 !== "unbounded" && concurrency$1 <= 1;
39858
39858
  /**
39859
39859
  * Returns a new channel, which sequentially combines this channel, together
@@ -39980,10 +39980,10 @@ const flattenArray = (self$1) => transformPull$1(self$1, (pull) => {
39980
39980
  if (array$1 === void 0) return flatMap(pull, (array_) => {
39981
39981
  switch (array_.length) {
39982
39982
  case 0: return loop();
39983
- case 1: return succeed(array_[0]);
39983
+ case 1: return succeed$1(array_[0]);
39984
39984
  default:
39985
39985
  array$1 = array_;
39986
- return succeed(array_[index++]);
39986
+ return succeed$1(array_[index++]);
39987
39987
  }
39988
39988
  });
39989
39989
  const next = array$1[index++];
@@ -39991,9 +39991,9 @@ const flattenArray = (self$1) => transformPull$1(self$1, (pull) => {
39991
39991
  array$1 = void 0;
39992
39992
  index = 0;
39993
39993
  }
39994
- return succeed(next);
39994
+ return succeed$1(next);
39995
39995
  });
39996
- return succeed(pump);
39996
+ return succeed$1(pump);
39997
39997
  });
39998
39998
  /**
39999
39999
  * Filters arrays of elements emitted by a channel, applying the filter
@@ -40030,9 +40030,9 @@ const flattenArray = (self$1) => transformPull$1(self$1, (pull) => {
40030
40030
  * @since 4.0.0
40031
40031
  * @category Filtering
40032
40032
  */
40033
- const filterArray = /* @__PURE__ */ dual(2, (self$1, predicate) => transformPull$1(self$1, (pull) => succeed(flatMap(pull, function loop(arr) {
40033
+ const filterArray = /* @__PURE__ */ dual(2, (self$1, predicate) => transformPull$1(self$1, (pull) => succeed$1(flatMap(pull, function loop(arr) {
40034
40034
  const filtered = filter$3(arr, predicate);
40035
- return isReadonlyArrayNonEmpty(filtered) ? succeed(filtered) : flatMap(pull, loop);
40035
+ return isReadonlyArrayNonEmpty(filtered) ? succeed$1(filtered) : flatMap(pull, loop);
40036
40036
  }))));
40037
40037
  /**
40038
40038
  * Catches any cause of failure from the channel and allows recovery by
@@ -40104,7 +40104,7 @@ const catch_ = /* @__PURE__ */ dual(2, (self$1, f) => catchCauseFilter(self$1, f
40104
40104
  * @since 2.0.0
40105
40105
  * @category Error handling
40106
40106
  */
40107
- const mapError$1 = /* @__PURE__ */ dual(2, (self$1, f) => catch_(self$1, (err) => fail$1(f(err))));
40107
+ const mapError$1 = /* @__PURE__ */ dual(2, (self$1, f) => catch_(self$1, (err) => fail$2(f(err))));
40108
40108
  /**
40109
40109
  * Converts all errors in the channel to defects (unrecoverable failures).
40110
40110
  * This is useful when you want to treat errors as programming errors.
@@ -40234,7 +40234,7 @@ const pipeTo = /* @__PURE__ */ dual(2, (self$1, that) => fromTransform$1((upstre
40234
40234
  */
40235
40235
  const unwrap$2 = (channel) => fromTransform$1((upstream, scope$2) => {
40236
40236
  let pull;
40237
- return succeed(suspend$2(() => {
40237
+ return succeed$1(suspend$2(() => {
40238
40238
  if (pull) return pull;
40239
40239
  return channel.pipe(provide$4(scope$2), flatMap((channel$1) => toTransform(channel$1)(upstream, scope$2)), flatMap((pull_) => pull = pull_));
40240
40240
  }));
@@ -40248,7 +40248,7 @@ const unwrap$2 = (channel) => fromTransform$1((upstream, scope$2) => {
40248
40248
  */
40249
40249
  const bufferArray = /* @__PURE__ */ dual(2, (self$1, options) => fromTransform$1(fnUntraced(function* (upstream, scope$2) {
40250
40250
  const pull = yield* toTransform(self$1)(upstream, scope$2);
40251
- const queue = yield* make$33({
40251
+ const queue = yield* make$34({
40252
40252
  capacity: options.capacity === "unbounded" ? void 0 : options.capacity,
40253
40253
  strategy: options.capacity === "unbounded" ? void 0 : options.strategy
40254
40254
  });
@@ -40289,7 +40289,7 @@ const onExit$1 = /* @__PURE__ */ dual(2, (self$1, finalizer) => fromTransformBra
40289
40289
  const runWith$1 = (self$1, f, onHalt) => suspend$2(() => {
40290
40290
  const scope$2 = makeUnsafe$5();
40291
40291
  const makePull = toTransform(self$1)(haltVoid, scope$2);
40292
- return catchHalt(flatMap(makePull, f), onHalt ? onHalt : succeed).pipe(onExit$2((exit$2) => close(scope$2, exit$2)));
40292
+ return catchHalt(flatMap(makePull, f), onHalt ? onHalt : succeed$1).pipe(onExit$2((exit$2) => close(scope$2, exit$2)));
40293
40293
  });
40294
40294
  /**
40295
40295
  * Runs a channel and applies an effect to each output element.
@@ -40349,7 +40349,7 @@ const runFold = /* @__PURE__ */ dual(3, (self$1, initial, f) => suspend$2(() =>
40349
40349
  step: (value) => {
40350
40350
  state = f(state, value);
40351
40351
  }
40352
- }), () => succeed(state));
40352
+ }), () => succeed$1(state));
40353
40353
  }));
40354
40354
  /**
40355
40355
  * Converts a channel to a Pull within an existing scope.
@@ -40402,7 +40402,7 @@ const fromChannel$2 = (channel) => {
40402
40402
  //#endregion
40403
40403
  //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@004c047_46460a9e85a4dd43b15f8b036d8d1a97/node_modules/effect/dist/Sink.js
40404
40404
  const TypeId$31 = "~effect/Sink";
40405
- const endVoid = /* @__PURE__ */ succeed([void 0]);
40405
+ const endVoid = /* @__PURE__ */ succeed$1([void 0]);
40406
40406
  const sinkVariance = {
40407
40407
  _A: identity,
40408
40408
  _In: identity,
@@ -40440,7 +40440,7 @@ const isSink = (u) => hasProperty(u, TypeId$31);
40440
40440
  * @since 2.0.0
40441
40441
  * @category constructors
40442
40442
  */
40443
- const fromChannel$1 = (channel) => fromTransform((upstream, scope$2) => toTransform(channel)(upstream, scope$2).pipe(flatMap(forever({ autoYield: false })), catchHalt(succeed)));
40443
+ const fromChannel$1 = (channel) => fromTransform((upstream, scope$2) => toTransform(channel)(upstream, scope$2).pipe(flatMap(forever({ autoYield: false })), catchHalt(succeed$1)));
40444
40444
  /**
40445
40445
  * @since 4.0.0
40446
40446
  * @category constructors
@@ -40465,7 +40465,7 @@ const fromTransform = (transform$2) => {
40465
40465
  * @since 2.0.0
40466
40466
  * @category constructors
40467
40467
  */
40468
- const toChannel$1 = (self$1) => fromTransform$1((upstream, scope$2) => succeed(flatMap(self$1.transform(upstream, scope$2), halt)));
40468
+ const toChannel$1 = (self$1) => fromTransform$1((upstream, scope$2) => succeed$1(flatMap(self$1.transform(upstream, scope$2), halt)));
40469
40469
  /**
40470
40470
  * @since 4.0.0
40471
40471
  * @category constructors
@@ -40495,7 +40495,7 @@ const drain = /* @__PURE__ */ fromTransform((upstream) => catchHalt(forever(upst
40495
40495
  const reduceWhile = (initial, predicate, f) => fromTransform((upstream) => {
40496
40496
  let state = initial();
40497
40497
  let leftover = void 0;
40498
- if (!predicate(state)) return succeed([state]);
40498
+ if (!predicate(state)) return succeed$1([state]);
40499
40499
  return upstream.pipe(flatMap((arr) => {
40500
40500
  for (let i = 0; i < arr.length; i++) {
40501
40501
  state = f(state, arr[i]);
@@ -40505,7 +40505,7 @@ const reduceWhile = (initial, predicate, f) => fromTransform((upstream) => {
40505
40505
  }
40506
40506
  }
40507
40507
  return void_$1;
40508
- }), forever({ autoYield: false }), catchHalt(() => succeed([state, leftover])));
40508
+ }), forever({ autoYield: false }), catchHalt(() => succeed$1([state, leftover])));
40509
40509
  });
40510
40510
  /**
40511
40511
  * A sink that reduces its inputs using the provided function `f` starting from
@@ -40519,7 +40519,7 @@ const reduceArray = (initial, f) => fromTransform((upstream) => {
40519
40519
  return upstream.pipe(flatMap((arr) => {
40520
40520
  state = f(state, arr);
40521
40521
  return void_$1;
40522
- }), forever({ autoYield: false }), catchHalt(() => succeed([state])));
40522
+ }), forever({ autoYield: false }), catchHalt(() => succeed$1([state])));
40523
40523
  });
40524
40524
  const head_ = /* @__PURE__ */ reduceWhile(none$3, isNone, (_, in_) => some(in_));
40525
40525
  const last_ = /* @__PURE__ */ reduceArray(none$3, (_, arr) => last(arr));
@@ -40674,7 +40674,7 @@ const empty$7 = () => {
40674
40674
  * @since 2.0.0
40675
40675
  * @category constructors
40676
40676
  */
40677
- const make$32 = (...entries) => fromIterable$1(entries);
40677
+ const make$33 = (...entries) => fromIterable$1(entries);
40678
40678
  /**
40679
40679
  * Creates a MutableHashMap from an iterable collection of key-value pairs.
40680
40680
  *
@@ -41000,7 +41000,7 @@ const makeUnsafe$1 = (options) => ({
41000
41000
  * })
41001
41001
  * ```
41002
41002
  */
41003
- const make$31 = (options) => withFiber((fiber$2) => {
41003
+ const make$32 = (options) => withFiber((fiber$2) => {
41004
41004
  const services$2 = fiber$2.services;
41005
41005
  const scope$2 = get$7(services$2, Scope);
41006
41006
  const self$1 = makeUnsafe$1({
@@ -41054,7 +41054,7 @@ const get$5 = /* @__PURE__ */ dual(2, (self$1, key) => uninterruptibleMask((rest
41054
41054
  if (o._tag === "Some") {
41055
41055
  entry = o.value;
41056
41056
  entry.refCount++;
41057
- } else if (Number.isFinite(self$1.capacity) && size(self$1.state.map) >= self$1.capacity) return fail$3(new ExceededCapacityError(`RcMap attempted to exceed capacity of ${self$1.capacity}`));
41057
+ } else if (Number.isFinite(self$1.capacity) && size(self$1.state.map) >= self$1.capacity) return fail$4(new ExceededCapacityError(`RcMap attempted to exceed capacity of ${self$1.capacity}`));
41058
41058
  else {
41059
41059
  entry = {
41060
41060
  deferred: makeUnsafe$6(),
@@ -41168,7 +41168,7 @@ var RcRefImpl = class {
41168
41168
  }
41169
41169
  };
41170
41170
  /** @internal */
41171
- const make$30 = (options) => withFiber((fiber$2) => {
41171
+ const make$31 = (options) => withFiber((fiber$2) => {
41172
41172
  const services$2 = fiber$2.services;
41173
41173
  const scope$2 = get$7(services$2, Scope);
41174
41174
  const ref = new RcRefImpl(options.acquire, services$2, scope$2, options.idleTimeToLive ? fromDurationInputUnsafe(options.idleTimeToLive) : void 0);
@@ -41183,7 +41183,7 @@ const getState = (self$1) => uninterruptibleMask((restore) => {
41183
41183
  case "Closed": return interrupt$1;
41184
41184
  case "Acquired":
41185
41185
  self$1.state.refCount++;
41186
- return self$1.state.fiber ? as(interrupt(self$1.state.fiber), self$1.state) : succeed(self$1.state);
41186
+ return self$1.state.fiber ? as(interrupt(self$1.state.fiber), self$1.state) : succeed$1(self$1.state);
41187
41187
  case "Empty": {
41188
41188
  const scope$2 = makeUnsafe$5();
41189
41189
  return self$1.semaphore.withPermits(1)(restore(provideServices(self$1.acquire, add$3(self$1.services, Scope, scope$2))).pipe(map$4((value) => {
@@ -41276,7 +41276,7 @@ const invalidate$1 = (self_) => {
41276
41276
  * })
41277
41277
  * ```
41278
41278
  */
41279
- const make$29 = make$30;
41279
+ const make$30 = make$31;
41280
41280
  /**
41281
41281
  * Get the value from an RcRef.
41282
41282
  *
@@ -41523,7 +41523,7 @@ const suspend = (stream$3) => fromChannel(suspend$1(() => stream$3().channel));
41523
41523
  * @since 2.0.0
41524
41524
  * @category constructors
41525
41525
  */
41526
- const fail = (error$1) => fromChannel(fail$1(error$1));
41526
+ const fail$1 = (error$1) => fromChannel(fail$2(error$1));
41527
41527
  /**
41528
41528
  * Creates a stream from a ReadableStream.
41529
41529
  *
@@ -41555,7 +41555,7 @@ const fromReadableStream = (options) => fromChannel(fromTransform$1(fnUntraced(f
41555
41555
  return flatMap(tryPromise({
41556
41556
  try: () => reader.read(),
41557
41557
  catch: (reason) => options.onError(reason)
41558
- }), ({ done: done$2, value }) => done$2 ? haltVoid : succeed(of(value)));
41558
+ }), ({ done: done$2, value }) => done$2 ? haltVoid : succeed$1(of(value)));
41559
41559
  })));
41560
41560
  /**
41561
41561
  * Create a stream that allows you to wrap a paginated resource.
@@ -41585,11 +41585,11 @@ const paginate$1 = (s, f) => fromPull(sync(() => {
41585
41585
  return suspend$2(function loop() {
41586
41586
  if (done$2) return haltVoid;
41587
41587
  const result$2 = f(state);
41588
- return flatMap(isEffect(result$2) ? result$2 : succeed(result$2), ([a, s$1]) => {
41588
+ return flatMap(isEffect(result$2) ? result$2 : succeed$1(result$2), ([a, s$1]) => {
41589
41589
  if (isNone(s$1)) done$2 = true;
41590
41590
  else state = s$1.value;
41591
41591
  if (!isReadonlyArrayNonEmpty(a)) return loop();
41592
- return succeed(a);
41592
+ return succeed$1(a);
41593
41593
  });
41594
41594
  });
41595
41595
  }));
@@ -41739,11 +41739,11 @@ const transduce = /* @__PURE__ */ dual(2, (self$1, sink) => transformPull(self$1
41739
41739
  if (leftover !== void 0) {
41740
41740
  const chunk = leftover;
41741
41741
  leftover = void 0;
41742
- return succeed(chunk);
41742
+ return succeed$1(chunk);
41743
41743
  }
41744
41744
  return upstream;
41745
41745
  }).pipe(catch_$1((error$1) => {
41746
- done$2 = fail$5(error$1);
41746
+ done$2 = fail$6(error$1);
41747
41747
  return haltVoid;
41748
41748
  }));
41749
41749
  const pull = map$4(suspend$2(() => sink.transform(upstreamWithLeftover, scope$2)), ([value, leftover_]) => {
@@ -42178,10 +42178,10 @@ const FileSystem = /* @__PURE__ */ Service("effect/platform/FileSystem");
42178
42178
  * @since 4.0.0
42179
42179
  * @category constructor
42180
42180
  */
42181
- const make$28 = (impl) => FileSystem.of({
42181
+ const make$29 = (impl) => FileSystem.of({
42182
42182
  ...impl,
42183
42183
  [TypeId$26]: TypeId$26,
42184
- exists: (path$2) => pipe(impl.access(path$2), as(true), catchTag("PlatformError", (e) => e.reason === "NotFound" ? succeed(false) : fail$3(e))),
42184
+ exists: (path$2) => pipe(impl.access(path$2), as(true), catchTag("PlatformError", (e) => e.reason === "NotFound" ? succeed$1(false) : fail$4(e))),
42185
42185
  readFileString: (path$2, encoding) => flatMap(impl.readFile(path$2), (_) => try_({
42186
42186
  try: () => new TextDecoder(encoding).decode(_),
42187
42187
  catch: (cause) => new BadArgument({
@@ -42197,14 +42197,14 @@ const make$28 = (impl) => FileSystem.of({
42197
42197
  const bytesToRead = options?.bytesToRead !== void 0 ? Size(options.bytesToRead) : void 0;
42198
42198
  let totalBytesRead = BigInt(0);
42199
42199
  const chunkSize = Size(options?.chunkSize ?? 64 * 1024);
42200
- return fromPull(succeed(flatMap(suspend$2(() => {
42200
+ return fromPull(succeed$1(flatMap(suspend$2(() => {
42201
42201
  if (bytesToRead !== void 0 && bytesToRead <= totalBytesRead) return haltVoid;
42202
42202
  const toRead = bytesToRead !== void 0 && bytesToRead - totalBytesRead < chunkSize ? bytesToRead - totalBytesRead : chunkSize;
42203
42203
  return file.readAlloc(toRead);
42204
42204
  }), (buf) => {
42205
42205
  if (!buf) return haltVoid;
42206
42206
  totalBytesRead += BigInt(buf.length);
42207
- return succeed(of(buf));
42207
+ return succeed$1(of(buf));
42208
42208
  })));
42209
42209
  }, unwrap),
42210
42210
  sink: (path$2, options) => pipe(impl.open(path$2, {
@@ -42410,12 +42410,12 @@ function _format(sep$1, pathObject) {
42410
42410
  return dir + sep$1 + base;
42411
42411
  }
42412
42412
  function fromFileUrl$1(url) {
42413
- if (url.protocol !== "file:") return fail$3(new BadArgument({
42413
+ if (url.protocol !== "file:") return fail$4(new BadArgument({
42414
42414
  module: "Path",
42415
42415
  method: "fromFileUrl",
42416
42416
  description: "URL must be of scheme file"
42417
42417
  }));
42418
- else if (url.hostname !== "") return fail$3(new BadArgument({
42418
+ else if (url.hostname !== "") return fail$4(new BadArgument({
42419
42419
  module: "Path",
42420
42420
  method: "fromFileUrl",
42421
42421
  description: "Invalid file URL host"
@@ -42423,13 +42423,13 @@ function fromFileUrl$1(url) {
42423
42423
  const pathname = url.pathname;
42424
42424
  for (let n = 0; n < pathname.length; n++) if (pathname[n] === "%") {
42425
42425
  const third = pathname.codePointAt(n + 2) | 32;
42426
- if (pathname[n + 1] === "2" && third === 102) return fail$3(new BadArgument({
42426
+ if (pathname[n + 1] === "2" && third === 102) return fail$4(new BadArgument({
42427
42427
  module: "Path",
42428
42428
  method: "fromFileUrl",
42429
42429
  description: "must not include encoded / characters"
42430
42430
  }));
42431
42431
  }
42432
- return succeed(decodeURIComponent(pathname));
42432
+ return succeed$1(decodeURIComponent(pathname));
42433
42433
  }
42434
42434
  const resolve = function resolve$3() {
42435
42435
  let resolvedPath = "";
@@ -42459,7 +42459,7 @@ function toFileUrl$1(filepath) {
42459
42459
  let resolved = resolve(filepath);
42460
42460
  if (filepath.charCodeAt(filepath.length - 1) === CHAR_FORWARD_SLASH && resolved[resolved.length - 1] !== "/") resolved += "/";
42461
42461
  outURL.pathname = encodePathChars(resolved);
42462
- return succeed(outURL);
42462
+ return succeed$1(outURL);
42463
42463
  }
42464
42464
  const percentRegExp = /%/g;
42465
42465
  const backslashRegExp = /\\/g;
@@ -42749,7 +42749,7 @@ const Proto$14 = {
42749
42749
  * @category Constructors
42750
42750
  * @since 4.0.0
42751
42751
  */
42752
- function make$27(get$8, mapInput$1, prefix$1) {
42752
+ function make$28(get$8, mapInput$1, prefix$1) {
42753
42753
  const self$1 = Object.create(Proto$14);
42754
42754
  self$1.get = get$8;
42755
42755
  self$1.mapInput = mapInput$1;
@@ -42776,7 +42776,7 @@ function fromEnv(options) {
42776
42776
  ...import.meta?.env
42777
42777
  };
42778
42778
  const trie = buildEnvTrie(env);
42779
- return make$27((path$2) => succeed(nodeAtEnv(trie, env, path$2)));
42779
+ return make$28((path$2) => succeed$1(nodeAtEnv(trie, env, path$2)));
42780
42780
  }
42781
42781
  function buildEnvTrie(env) {
42782
42782
  const root$1 = {};
@@ -42983,6 +42983,24 @@ const isGreaterThan = isLogLevelGreaterThan;
42983
42983
  //#endregion
42984
42984
  //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@004c047_46460a9e85a4dd43b15f8b036d8d1a97/node_modules/effect/dist/Config.js
42985
42985
  const TypeId$24 = "~effect/Config";
42986
+ /**
42987
+ * @since 4.0.0
42988
+ * @category Models
42989
+ */
42990
+ var ConfigError = class {
42991
+ _tag = "ConfigError";
42992
+ name = "ConfigError";
42993
+ cause;
42994
+ constructor(cause) {
42995
+ this.cause = cause;
42996
+ }
42997
+ get message() {
42998
+ return this.cause.toString();
42999
+ }
43000
+ toString() {
43001
+ return `ConfigError(${this.message})`;
43002
+ }
43003
+ };
42986
43004
  const Proto$13 = {
42987
43005
  ...PipeInspectableProto,
42988
43006
  ...YieldableProto,
@@ -42994,6 +43012,140 @@ const Proto$13 = {
42994
43012
  return { _id: "Config" };
42995
43013
  }
42996
43014
  };
43015
+ /**
43016
+ * Constructs a low-level Config from a parsing function.
43017
+ *
43018
+ * This is the primitive constructor used internally by other Config constructors
43019
+ * to create custom configuration parsers. It provides direct access to the
43020
+ * configuration provider and allows for fine-grained control over parsing behavior.
43021
+ *
43022
+ * @category Constructors
43023
+ * @since 4.0.0
43024
+ */
43025
+ function make$27(parse$3) {
43026
+ const self$1 = Object.create(Proto$13);
43027
+ self$1.parse = parse$3;
43028
+ return self$1;
43029
+ }
43030
+ /**
43031
+ * Returns a config that falls back to the specified config if there is an error
43032
+ * reading from this config.
43033
+ *
43034
+ * @since 4.0.0
43035
+ */
43036
+ const orElse = /* @__PURE__ */ dual(2, (self$1, that) => {
43037
+ return make$27((provider) => catch_$1(self$1.parse(provider), (error$1) => that(error$1).parse(provider)));
43038
+ });
43039
+ function isMissingDataOnly(issue) {
43040
+ switch (issue._tag) {
43041
+ case "MissingKey": return true;
43042
+ case "InvalidType": return isSome(issue.actual) && issue.actual.value === void 0;
43043
+ case "InvalidValue":
43044
+ case "OneOf": return issue.actual === void 0;
43045
+ case "Encoding":
43046
+ case "Pointer":
43047
+ case "Filter": return isMissingDataOnly(issue.issue);
43048
+ case "UnexpectedKey": return false;
43049
+ case "Forbidden": return false;
43050
+ case "Composite":
43051
+ case "AnyOf": return issue.issues.every(isMissingDataOnly);
43052
+ }
43053
+ }
43054
+ /**
43055
+ * Provides a default value for a configuration when it fails to load due to
43056
+ * missing data.
43057
+ *
43058
+ * This function is useful for providing fallback values when configuration
43059
+ * sources are incomplete or missing. It only applies the default when the
43060
+ * configuration error is specifically a `SchemaError` caused by missing data -
43061
+ * other types of errors will still fail.
43062
+ *
43063
+ * @since 4.0.0
43064
+ */
43065
+ const withDefault$2 = /* @__PURE__ */ dual(2, (self$1, defaultValue) => {
43066
+ return orElse(self$1, (err) => {
43067
+ if (isSchemaError(err.cause)) {
43068
+ const issue = err.cause.issue;
43069
+ if (isMissingDataOnly(issue)) return succeed(defaultValue());
43070
+ }
43071
+ return fail(err.cause);
43072
+ });
43073
+ });
43074
+ const dump = /* @__PURE__ */ fnUntraced(function* (provider, path$2) {
43075
+ const stat$1 = yield* provider.load(path$2);
43076
+ if (stat$1 === void 0) return void 0;
43077
+ switch (stat$1._tag) {
43078
+ case "Value": return stat$1.value;
43079
+ case "Record": {
43080
+ if (stat$1.value !== void 0) return stat$1.value;
43081
+ const out = {};
43082
+ for (const key of stat$1.keys) {
43083
+ const child = yield* dump(provider, [...path$2, key]);
43084
+ if (child !== void 0) out[key] = child;
43085
+ }
43086
+ return out;
43087
+ }
43088
+ case "Array": {
43089
+ if (stat$1.value !== void 0) return stat$1.value;
43090
+ const out = [];
43091
+ for (let i = 0; i < stat$1.length; i++) out.push(yield* dump(provider, [...path$2, i]));
43092
+ return out;
43093
+ }
43094
+ }
43095
+ });
43096
+ const recur = /* @__PURE__ */ fnUntraced(function* (ast, provider, path$2) {
43097
+ switch (ast._tag) {
43098
+ case "Objects": {
43099
+ const out = {};
43100
+ for (const ps of ast.propertySignatures) {
43101
+ const name = ps.name;
43102
+ if (typeof name === "string") {
43103
+ const value = yield* recur(ps.type, provider, [...path$2, name]);
43104
+ if (value !== void 0) out[name] = value;
43105
+ }
43106
+ }
43107
+ if (ast.indexSignatures.length > 0) {
43108
+ const stat$1 = yield* provider.load(path$2);
43109
+ if (stat$1 && stat$1._tag === "Record") for (const is$2 of ast.indexSignatures) {
43110
+ const matches = _is(is$2.parameter);
43111
+ for (const key of stat$1.keys) if (!Object.hasOwn(out, key) && matches(key)) {
43112
+ const value = yield* recur(is$2.type, provider, [...path$2, key]);
43113
+ if (value !== void 0) out[key] = value;
43114
+ }
43115
+ }
43116
+ }
43117
+ return out;
43118
+ }
43119
+ case "Arrays": {
43120
+ const stat$1 = yield* provider.load(path$2);
43121
+ if (stat$1 && stat$1._tag === "Value") return stat$1.value;
43122
+ const out = [];
43123
+ for (let i = 0; i < ast.elements.length; i++) out.push(yield* recur(ast.elements[i], provider, [...path$2, i]));
43124
+ return out;
43125
+ }
43126
+ case "Union": return yield* dump(provider, path$2);
43127
+ case "Suspend": return yield* recur(ast.thunk(), provider, path$2);
43128
+ default: {
43129
+ const stat$1 = yield* provider.load(path$2);
43130
+ if (stat$1 === void 0) return void 0;
43131
+ if (stat$1._tag === "Value") return stat$1.value;
43132
+ if (stat$1._tag === "Record" && stat$1.value !== void 0) return stat$1.value;
43133
+ if (stat$1._tag === "Array" && stat$1.value !== void 0) return stat$1.value;
43134
+ return;
43135
+ }
43136
+ }
43137
+ });
43138
+ /**
43139
+ * @category Schema
43140
+ * @since 4.0.0
43141
+ */
43142
+ function schema(codec, path$2) {
43143
+ const toCodecStringTree$1 = toCodecStringTree(codec);
43144
+ const decodeUnknownEffect$2 = decodeUnknownEffect$1(toCodecStringTree$1);
43145
+ const toCodecStringTreeEncoded = toEncoded(toCodecStringTree$1.ast);
43146
+ const defaultPath = typeof path$2 === "string" ? [path$2] : path$2 ?? [];
43147
+ return make$27((provider) => recur(toCodecStringTreeEncoded, provider, defaultPath).pipe(flatMapEager((tree) => decodeUnknownEffect$2(tree).pipe(mapErrorEager((issue) => new SchemaError(defaultPath.length > 0 ? new Pointer(defaultPath, issue) : issue)))), mapErrorEager((cause) => new ConfigError(cause))));
43148
+ }
42997
43149
  /** @internal */
42998
43150
  const TrueValues = /* @__PURE__ */ Literals([
42999
43151
  "true",
@@ -43033,7 +43185,7 @@ const Boolean$1 = /* @__PURE__ */ Literals([...TrueValues.literals, ...FalseValu
43033
43185
  const Duration = /* @__PURE__ */ String$1.pipe(/* @__PURE__ */ decodeTo(Duration$1, {
43034
43186
  decode: /* @__PURE__ */ transformOrFail$1((s) => {
43035
43187
  const d = fromDurationInput(s);
43036
- return d ? succeed(d) : fail$3(new InvalidValue$1(some(s)));
43188
+ return d ? succeed$1(d) : fail$4(new InvalidValue$1(some(s)));
43037
43189
  }),
43038
43190
  encode: /* @__PURE__ */ forbidden(() => "Encoding Duration is not supported")
43039
43191
  }));
@@ -43055,6 +43207,35 @@ const Duration = /* @__PURE__ */ String$1.pipe(/* @__PURE__ */ decodeTo(Duration
43055
43207
  * @since 4.0.0
43056
43208
  */
43057
43209
  const LogLevel = /* @__PURE__ */ Literals(values);
43210
+ /**
43211
+ * Creates a configuration that always fails with a given issue.
43212
+ *
43213
+ * @category Constructors
43214
+ * @since 4.0.0
43215
+ */
43216
+ function fail(err) {
43217
+ return make$27(() => fail$4(new ConfigError(err)));
43218
+ }
43219
+ /**
43220
+ * Creates a configuration that always succeeds with a given value.
43221
+ *
43222
+ * @category Constructors
43223
+ * @since 4.0.0
43224
+ */
43225
+ function succeed(value) {
43226
+ return make$27(() => succeed$1(value));
43227
+ }
43228
+ /**
43229
+ * Creates a configuration for string values.
43230
+ *
43231
+ * Shortcut for `Config.schema(Schema.String, name)`.
43232
+ *
43233
+ * @category Constructors
43234
+ * @since 4.0.0
43235
+ */
43236
+ function string$4(name) {
43237
+ return schema(String$1, name);
43238
+ }
43058
43239
 
43059
43240
  //#endregion
43060
43241
  //#region node_modules/.pnpm/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@004c047_46460a9e85a4dd43b15f8b036d8d1a97/node_modules/effect/dist/unstable/cli/Primitive.js
@@ -43072,8 +43253,8 @@ const makePrimitive = (tag$1, parse$3) => Object.assign(Object.create(Proto$12),
43072
43253
  _tag: tag$1,
43073
43254
  parse: parse$3
43074
43255
  });
43075
- const makeSchemaPrimitive = (tag$1, schema) => {
43076
- const toCodecStringTree$1 = toCodecStringTree(schema);
43256
+ const makeSchemaPrimitive = (tag$1, schema$1) => {
43257
+ const toCodecStringTree$1 = toCodecStringTree(schema$1);
43077
43258
  const decode$2 = decodeUnknownEffect(toCodecStringTree$1);
43078
43259
  return makePrimitive(tag$1, (value) => mapError$2(decode$2(value), (error$1) => error$1.message));
43079
43260
  };
@@ -43203,7 +43384,7 @@ const date = /* @__PURE__ */ makeSchemaPrimitive("Date", DateValid);
43203
43384
  * @since 4.0.0
43204
43385
  * @category constructors
43205
43386
  */
43206
- const string$3 = /* @__PURE__ */ makePrimitive("String", (value) => succeed(value));
43387
+ const string$3 = /* @__PURE__ */ makePrimitive("String", (value) => succeed$1(value));
43207
43388
  /**
43208
43389
  * Creates a primitive that accepts only specific choice values mapped to custom types.
43209
43390
  *
@@ -43237,8 +43418,8 @@ const choice$2 = (choices) => {
43237
43418
  const choiceMap = new Map(choices);
43238
43419
  const validChoices = choices.map(([key]) => format$2(key)).join(" | ");
43239
43420
  return makePrimitive("Choice", (value) => {
43240
- if (choiceMap.has(value)) return succeed(choiceMap.get(value));
43241
- return fail$3(`Expected ${validChoices}, got ${format$2(value)}`);
43421
+ if (choiceMap.has(value)) return succeed$1(choiceMap.get(value));
43422
+ return fail$4(`Expected ${validChoices}, got ${format$2(value)}`);
43242
43423
  });
43243
43424
  };
43244
43425
  /**
@@ -43275,11 +43456,11 @@ const path$1 = (pathType, mustExist) => makePrimitive("Path", fnUntraced(functio
43275
43456
  const path$2 = yield* Path$1;
43276
43457
  const absolutePath = path$2.isAbsolute(value) ? value : path$2.resolve(value);
43277
43458
  const exists = yield* mapError$2(fs.exists(absolutePath), (error$1) => `Failed to check path existence: ${error$1.message}`);
43278
- if (mustExist === true && !exists) return yield* fail$3(`Path does not exist: ${absolutePath}`);
43459
+ if (mustExist === true && !exists) return yield* fail$4(`Path does not exist: ${absolutePath}`);
43279
43460
  if (exists && pathType !== "either") {
43280
43461
  const stat$1 = yield* mapError$2(fs.stat(absolutePath), (error$1) => `Failed to stat path: ${error$1.message}`);
43281
- if (pathType === "file" && stat$1.type !== "File") return yield* fail$3(`Path is not a file: ${absolutePath}`);
43282
- if (pathType === "directory" && stat$1.type !== "Directory") return yield* fail$3(`Path is not a directory: ${absolutePath}`);
43462
+ if (pathType === "file" && stat$1.type !== "File") return yield* fail$4(`Path is not a file: ${absolutePath}`);
43463
+ if (pathType === "directory" && stat$1.type !== "Directory") return yield* fail$4(`Path is not a directory: ${absolutePath}`);
43283
43464
  }
43284
43465
  return absolutePath;
43285
43466
  }));
@@ -43304,7 +43485,7 @@ const path$1 = (pathType, mustExist) => makePrimitive("Path", fnUntraced(functio
43304
43485
  * @since 4.0.0
43305
43486
  * @category constructors
43306
43487
  */
43307
- const none$2 = /* @__PURE__ */ makePrimitive("None", () => fail$3("This option does not accept values"));
43488
+ const none$2 = /* @__PURE__ */ makePrimitive("None", () => fail$4("This option does not accept values"));
43308
43489
  /**
43309
43490
  * Gets a human-readable type name for a primitive.
43310
43491
  *
@@ -43803,7 +43984,7 @@ const mapEffect = /* @__PURE__ */ dual(2, (self$1, f) => {
43803
43984
  * @category combinators
43804
43985
  */
43805
43986
  const optional$1 = (param) => {
43806
- const parse$3 = (args$1) => param.parse(args$1).pipe(map$4(([leftover, value]) => [leftover, some(value)]), catchTag("MissingOption", () => succeed([args$1.arguments, none$3()])), catchTag("MissingArgument", () => succeed([args$1.arguments, none$3()])));
43987
+ const parse$3 = (args$1) => param.parse(args$1).pipe(map$4(([leftover, value]) => [leftover, some(value)]), catchTag("MissingOption", () => succeed$1([args$1.arguments, none$3()])), catchTag("MissingArgument", () => succeed$1([args$1.arguments, none$3()])));
43807
43988
  return Object.assign(Object.create(Proto$11), {
43808
43989
  _tag: "Optional",
43809
43990
  kind: param.kind,
@@ -44437,7 +44618,7 @@ const Proto$10 = {
44437
44618
  const makeCommand = (options) => {
44438
44619
  const service$2 = options.service ?? Service(`${TypeId$22}/${options.name}`);
44439
44620
  const config = options.config;
44440
- const handle = (input, commandPath) => isNotUndefined$2(options.handle) ? options.handle(input, commandPath) : fail$3(new ShowHelp({ commandPath }));
44621
+ const handle = (input, commandPath) => isNotUndefined$2(options.handle) ? options.handle(input, commandPath) : fail$4(new ShowHelp({ commandPath }));
44441
44622
  const parse$3 = options.parse ?? fnUntraced(function* (input) {
44442
44623
  const values$1 = yield* parseParams({
44443
44624
  flags: input.flags,
@@ -45951,7 +46132,7 @@ const runWithInput = (prompt, terminal, input) => suspend$2(() => {
45951
46132
  switch (op._tag) {
45952
46133
  case "Loop": return runLoop(op, terminal, input);
45953
46134
  case "OnSuccess": return flatMap(runWithInput(op.prompt, terminal, input), (a) => runWithInput(op.onSuccess(a), terminal, input));
45954
- case "Succeed": return succeed(op.value);
46135
+ case "Succeed": return succeed$1(op.value);
45955
46136
  }
45956
46137
  });
45957
46138
  const runLoop = /* @__PURE__ */ fnUntraced(function* (loop, terminal, input) {
@@ -46048,20 +46229,20 @@ const renderSelectSubmission = /* @__PURE__ */ fnUntraced(function* (state, opti
46048
46229
  return renderSelectOutput(annotate(figures.tick, green), annotate(figures.ellipsis, blackBright), options) + " " + annotate(selected, white) + "\n";
46049
46230
  });
46050
46231
  const processSelectCursorUp = (state, choices) => {
46051
- if (state === 0) return succeed(Action.NextFrame({ state: choices.length - 1 }));
46052
- return succeed(Action.NextFrame({ state: state - 1 }));
46232
+ if (state === 0) return succeed$1(Action.NextFrame({ state: choices.length - 1 }));
46233
+ return succeed$1(Action.NextFrame({ state: state - 1 }));
46053
46234
  };
46054
46235
  const processSelectCursorDown = (state, choices) => {
46055
- if (state === choices.length - 1) return succeed(Action.NextFrame({ state: 0 }));
46056
- return succeed(Action.NextFrame({ state: state + 1 }));
46236
+ if (state === choices.length - 1) return succeed$1(Action.NextFrame({ state: 0 }));
46237
+ return succeed$1(Action.NextFrame({ state: state + 1 }));
46057
46238
  };
46058
46239
  const processSelectNext = (state, choices) => {
46059
- return succeed(Action.NextFrame({ state: (state + 1) % choices.length }));
46240
+ return succeed$1(Action.NextFrame({ state: (state + 1) % choices.length }));
46060
46241
  };
46061
46242
  const handleSelectRender = (options) => {
46062
46243
  return (state, action) => {
46063
46244
  return Action.$match(action, {
46064
- Beep: () => succeed(renderBeep),
46245
+ Beep: () => succeed$1(renderBeep),
46065
46246
  NextFrame: ({ state: state$1 }) => renderSelectNextFrame(state$1, options),
46066
46247
  Submit: () => renderSelectSubmission(state, options)
46067
46248
  });
@@ -46083,10 +46264,10 @@ const handleSelectProcess = (options) => {
46083
46264
  case "enter":
46084
46265
  case "return": {
46085
46266
  const selected = options.choices[state];
46086
- if (selected.disabled) return succeed(Action.Beep());
46087
- return succeed(Action.Submit({ value: selected.value }));
46267
+ if (selected.disabled) return succeed$1(Action.Beep());
46268
+ return succeed$1(Action.Submit({ value: selected.value }));
46088
46269
  }
46089
- default: return succeed(Action.Beep());
46270
+ default: return succeed$1(Action.Beep());
46090
46271
  }
46091
46272
  };
46092
46273
  };
@@ -46136,12 +46317,12 @@ const renderTextSubmission = /* @__PURE__ */ fnUntraced(function* (state, option
46136
46317
  return renderTextOutput(state, annotate(figures.tick, green), annotate(figures.ellipsis, blackBright), options, true) + "\n";
46137
46318
  });
46138
46319
  const processTextBackspace = (state) => {
46139
- if (state.cursor <= 0) return succeed(Action.Beep());
46320
+ if (state.cursor <= 0) return succeed$1(Action.Beep());
46140
46321
  const beforeCursor = state.value.slice(0, state.cursor - 1);
46141
46322
  const afterCursor = state.value.slice(state.cursor);
46142
46323
  const cursor = state.cursor - 1;
46143
46324
  const value = `${beforeCursor}${afterCursor}`;
46144
- return succeed(Action.NextFrame({ state: {
46325
+ return succeed$1(Action.NextFrame({ state: {
46145
46326
  ...state,
46146
46327
  cursor,
46147
46328
  value,
@@ -46149,28 +46330,28 @@ const processTextBackspace = (state) => {
46149
46330
  } }));
46150
46331
  };
46151
46332
  const processTextCursorLeft = (state) => {
46152
- if (state.cursor <= 0) return succeed(Action.Beep());
46333
+ if (state.cursor <= 0) return succeed$1(Action.Beep());
46153
46334
  const cursor = state.cursor - 1;
46154
- return succeed(Action.NextFrame({ state: {
46335
+ return succeed$1(Action.NextFrame({ state: {
46155
46336
  ...state,
46156
46337
  cursor,
46157
46338
  error: void 0
46158
46339
  } }));
46159
46340
  };
46160
46341
  const processTextCursorRight = (state) => {
46161
- if (state.cursor >= state.value.length) return succeed(Action.Beep());
46342
+ if (state.cursor >= state.value.length) return succeed$1(Action.Beep());
46162
46343
  const cursor = Math.min(state.cursor + 1, state.value.length);
46163
- return succeed(Action.NextFrame({ state: {
46344
+ return succeed$1(Action.NextFrame({ state: {
46164
46345
  ...state,
46165
46346
  cursor,
46166
46347
  error: void 0
46167
46348
  } }));
46168
46349
  };
46169
46350
  const processTab = (state, options) => {
46170
- if (state.value === options.default) return succeed(Action.Beep());
46351
+ if (state.value === options.default) return succeed$1(Action.Beep());
46171
46352
  const value = getValue(state, options);
46172
46353
  const cursor = value.length;
46173
- return succeed(Action.NextFrame({ state: {
46354
+ return succeed$1(Action.NextFrame({ state: {
46174
46355
  ...state,
46175
46356
  value,
46176
46357
  cursor,
@@ -46180,7 +46361,7 @@ const processTab = (state, options) => {
46180
46361
  const defaultTextProcessor = (input, state) => {
46181
46362
  const value = `${state.value.slice(0, state.cursor)}${input}${state.value.slice(state.cursor)}`;
46182
46363
  const cursor = state.cursor + input.length;
46183
- return succeed(Action.NextFrame({ state: {
46364
+ return succeed$1(Action.NextFrame({ state: {
46184
46365
  ...state,
46185
46366
  cursor,
46186
46367
  value,
@@ -46190,7 +46371,7 @@ const defaultTextProcessor = (input, state) => {
46190
46371
  const handleTextRender = (options) => {
46191
46372
  return (state, action) => {
46192
46373
  return Action.$match(action, {
46193
- Beep: () => succeed(renderBeep),
46374
+ Beep: () => succeed$1(renderBeep),
46194
46375
  NextFrame: ({ state: state$1 }) => renderTextNextFrame(state$1, options),
46195
46376
  Submit: () => renderTextSubmission(state, options)
46196
46377
  });
@@ -46228,7 +46409,7 @@ const basePrompt = (options, type) => {
46228
46409
  const opts = {
46229
46410
  default: "",
46230
46411
  type,
46231
- validate: succeed,
46412
+ validate: succeed$1,
46232
46413
  ...options
46233
46414
  };
46234
46415
  return custom({
@@ -46593,7 +46774,7 @@ const runWith = (command, config) => {
46593
46774
  const parsed = parseResult.success;
46594
46775
  const program = commandImpl.handle(parsed, [command.name]);
46595
46776
  yield* logLevel !== void 0 ? provideService(program, MinimumLogLevel, logLevel) : program;
46596
- }, catch_$1((error$1) => isCliError(error$1) && error$1._tag === "ShowHelp" ? showHelp(command, error$1.commandPath) : fail$3(error$1)));
46777
+ }, catch_$1((error$1) => isCliError(error$1) && error$1._tag === "ShowHelp" ? showHelp(command, error$1.commandPath) : fail$4(error$1)));
46597
46778
  };
46598
46779
 
46599
46780
  //#endregion
@@ -46665,10 +46846,10 @@ const TypeId$19 = "~effect/Cache";
46665
46846
  const makeWith$1 = (options) => servicesWith$1((services$2) => {
46666
46847
  const self$1 = Object.create(Proto$9);
46667
46848
  self$1.lookup = (key) => updateServices$1(options.lookup(key), (input) => merge$5(services$2, input));
46668
- self$1.map = make$32();
46849
+ self$1.map = make$33();
46669
46850
  self$1.capacity = options.capacity;
46670
46851
  self$1.timeToLive = options.timeToLive ? (exit$2, key) => fromDurationInputUnsafe(options.timeToLive(exit$2, key)) : defaultTimeToLive;
46671
- return succeed$4(self$1);
46852
+ return succeed$5(self$1);
46672
46853
  });
46673
46854
  /**
46674
46855
  * Creates a cache with a fixed time-to-live for all entries.
@@ -47130,7 +47311,7 @@ const runImpl = (self$1, effect$1, options) => withFiber((parent) => {
47130
47311
  if (self$1.state._tag === "Closed") return sync(constInterruptedFiber);
47131
47312
  const fiber$2 = runForkWith(parent.services)(effect$1);
47132
47313
  addUnsafe(self$1, fiber$2, options);
47133
- return succeed(fiber$2);
47314
+ return succeed$1(fiber$2);
47134
47315
  });
47135
47316
  /**
47136
47317
  * Capture a Runtime and use it to fork Effect's, adding the forked fibers to the FiberSet.
@@ -47286,13 +47467,13 @@ const layerFileSystem = (directory$2) => effect(KeyValueStore)(gen(function* ()
47286
47467
  const keyPath = (key) => path$2.join(directory$2, encodeURIComponent(key));
47287
47468
  if (!(yield* fs.exists(directory$2))) yield* fs.makeDirectory(directory$2, { recursive: true });
47288
47469
  return make$22({
47289
- get: (key) => catchTag(fs.readFileString(keyPath(key)), "PlatformError", (cause) => cause.reason === "NotFound" ? undefined_$1 : fail$3(new KeyValueStoreError({
47470
+ get: (key) => catchTag(fs.readFileString(keyPath(key)), "PlatformError", (cause) => cause.reason === "NotFound" ? undefined_$1 : fail$4(new KeyValueStoreError({
47290
47471
  method: "get",
47291
47472
  key,
47292
47473
  message: `Unable to get item with key ${key}`,
47293
47474
  cause
47294
47475
  }))),
47295
- getUint8Array: (key) => catchTag(fs.readFile(keyPath(key)), "PlatformError", (cause) => cause.reason === "NotFound" ? undefined_$1 : fail$3(new KeyValueStoreError({
47476
+ getUint8Array: (key) => catchTag(fs.readFile(keyPath(key)), "PlatformError", (cause) => cause.reason === "NotFound" ? undefined_$1 : fail$4(new KeyValueStoreError({
47296
47477
  method: "getUint8Array",
47297
47478
  key,
47298
47479
  message: `Unable to get item with key ${key}`,
@@ -47322,8 +47503,8 @@ const layerFileSystem = (directory$2) => effect(KeyValueStore)(gen(function* ()
47322
47503
  cause
47323
47504
  })),
47324
47505
  size: matchEffect(fs.readDirectory(directory$2), {
47325
- onSuccess: (files) => succeed(files.length),
47326
- onFailure: (cause) => fail$3(new KeyValueStoreError({
47506
+ onSuccess: (files) => succeed$1(files.length),
47507
+ onFailure: (cause) => fail$4(new KeyValueStoreError({
47327
47508
  method: "size",
47328
47509
  message: `Unable to get size`,
47329
47510
  cause
@@ -47336,8 +47517,8 @@ const SchemaStoreTypeId = "~effect/persistence/KeyValueStore/SchemaStore";
47336
47517
  * @since 4.0.0
47337
47518
  * @category SchemaStore
47338
47519
  */
47339
- const toSchemaStore = (self$1, schema) => {
47340
- const serializer = toCodecJson(schema);
47520
+ const toSchemaStore = (self$1, schema$1) => {
47521
+ const serializer = toCodecJson(schema$1);
47341
47522
  const jsonSchema = fromJsonString(serializer);
47342
47523
  const decode$2 = decodeEffect(jsonSchema);
47343
47524
  const encode$2 = encodeEffect(jsonSchema);
@@ -49012,7 +49193,7 @@ const makeTemplatedCommand = (templates, expressions, options) => Object.assign(
49012
49193
  * @since 4.0.0
49013
49194
  * @category Constructors
49014
49195
  */
49015
- const make$21 = function make$50(...args$1) {
49196
+ const make$21 = function make$51(...args$1) {
49016
49197
  if (isTemplateString(args$1[0])) {
49017
49198
  const [templates, ...expressions] = args$1;
49018
49199
  return makeTemplatedCommand(templates, expressions, {});
@@ -49276,7 +49457,7 @@ const fromWritable = (options) => fromChannel$1(mapDone(fromWritableChannel(opti
49276
49457
  */
49277
49458
  const fromWritableChannel = (options) => fromTransform$1((pull) => {
49278
49459
  const writable = options.evaluate();
49279
- return succeed(pullIntoWritable({
49460
+ return succeed$1(pullIntoWritable({
49280
49461
  ...options,
49281
49462
  writable,
49282
49463
  pull
@@ -49336,20 +49517,20 @@ const toString$2 = (readable, options) => {
49336
49517
  stream$3.setEncoding(encoding);
49337
49518
  stream$3.once("error", (err) => {
49338
49519
  if ("closed" in stream$3 && !stream$3.closed) stream$3.destroy();
49339
- resume(fail$3(onError$2(err)));
49520
+ resume(fail$4(onError$2(err)));
49340
49521
  });
49341
49522
  stream$3.once("error", (err) => {
49342
- resume(fail$3(onError$2(err)));
49523
+ resume(fail$4(onError$2(err)));
49343
49524
  });
49344
- let string$7 = "";
49525
+ let string$8 = "";
49345
49526
  let bytes = 0;
49346
49527
  stream$3.once("end", () => {
49347
- resume(succeed(string$7));
49528
+ resume(succeed$1(string$8));
49348
49529
  });
49349
49530
  stream$3.on("data", (chunk) => {
49350
- string$7 += chunk;
49531
+ string$8 += chunk;
49351
49532
  bytes += Buffer.byteLength(chunk);
49352
- if (maxBytesNumber && bytes > maxBytesNumber) resume(fail$3(onError$2(/* @__PURE__ */ new Error("maxBytes exceeded"))));
49533
+ if (maxBytesNumber && bytes > maxBytesNumber) resume(fail$4(onError$2(/* @__PURE__ */ new Error("maxBytes exceeded"))));
49353
49534
  });
49354
49535
  return sync(() => {
49355
49536
  if ("closed" in stream$3 && !stream$3.closed) stream$3.destroy();
@@ -49369,16 +49550,16 @@ const toArrayBuffer = (readable, options) => {
49369
49550
  let bytes = 0;
49370
49551
  stream$3.once("error", (err) => {
49371
49552
  if ("closed" in stream$3 && !stream$3.closed) stream$3.destroy();
49372
- resume(fail$3(onError$2(err)));
49553
+ resume(fail$4(onError$2(err)));
49373
49554
  });
49374
49555
  stream$3.once("end", () => {
49375
- if (buffer$1.buffer.byteLength === buffer$1.byteLength) return resume(succeed(buffer$1.buffer));
49376
- resume(succeed(buffer$1.buffer.slice(buffer$1.byteOffset, buffer$1.byteOffset + buffer$1.byteLength)));
49556
+ if (buffer$1.buffer.byteLength === buffer$1.byteLength) return resume(succeed$1(buffer$1.buffer));
49557
+ resume(succeed$1(buffer$1.buffer.slice(buffer$1.byteOffset, buffer$1.byteOffset + buffer$1.byteLength)));
49377
49558
  });
49378
49559
  stream$3.on("data", (chunk) => {
49379
49560
  buffer$1 = Buffer.concat([buffer$1, chunk]);
49380
49561
  bytes += chunk.length;
49381
- if (maxBytesNumber && bytes > maxBytesNumber) resume(fail$3(onError$2(/* @__PURE__ */ new Error("maxBytes exceeded"))));
49562
+ if (maxBytesNumber && bytes > maxBytesNumber) resume(fail$4(onError$2(/* @__PURE__ */ new Error("maxBytes exceeded"))));
49382
49563
  });
49383
49564
  return sync(() => {
49384
49565
  if ("closed" in stream$3 && !stream$3.closed) stream$3.destroy();
@@ -49393,17 +49574,17 @@ const toUint8Array = (readable, options) => map$4(toArrayBuffer(readable, option
49393
49574
  const readableToPullUnsafe = (options) => {
49394
49575
  const readable = options.readable;
49395
49576
  const closeOnDone = options.closeOnDone ?? true;
49396
- const exit$2 = options.exit ?? make$34(void 0);
49577
+ const exit$2 = options.exit ?? make$35(void 0);
49397
49578
  const latch = makeLatchUnsafe(false);
49398
49579
  function onReadable() {
49399
49580
  latch.openUnsafe();
49400
49581
  }
49401
49582
  function onError$2(error$1) {
49402
- exit$2.current = fail$5(options.onError(error$1));
49583
+ exit$2.current = fail$6(options.onError(error$1));
49403
49584
  latch.openUnsafe();
49404
49585
  }
49405
49586
  function onEnd() {
49406
- exit$2.current = fail$5(new Halt(void 0));
49587
+ exit$2.current = fail$6(new Halt(void 0));
49407
49588
  latch.openUnsafe();
49408
49589
  }
49409
49590
  readable.on("readable", onReadable);
@@ -49422,7 +49603,7 @@ const readableToPullUnsafe = (options) => {
49422
49603
  if (item === null) break;
49423
49604
  chunk.push(item);
49424
49605
  }
49425
- return succeed(chunk);
49606
+ return succeed$1(chunk);
49426
49607
  });
49427
49608
  return as(addFinalizer$1(options.scope, sync(() => {
49428
49609
  readable.off("readable", onReadable);
@@ -49644,17 +49825,17 @@ const make$20 = /* @__PURE__ */ gen(function* () {
49644
49825
  };
49645
49826
  };
49646
49827
  const spawn$1 = fnUntraced(function* (command, spawnOptions) {
49647
- const deferred = yield* make$44();
49828
+ const deferred = yield* make$45();
49648
49829
  return yield* callback$1((resume) => {
49649
49830
  const handle = NodeChildProcess.spawn(command.command, command.args, spawnOptions);
49650
49831
  handle.on("error", (error$1) => {
49651
- resume(fail$3(toPlatformError("spawn", error$1, command)));
49832
+ resume(fail$4(toPlatformError("spawn", error$1, command)));
49652
49833
  });
49653
49834
  handle.on("exit", (...args$1) => {
49654
- doneUnsafe$1(deferred, succeed$3(args$1));
49835
+ doneUnsafe$1(deferred, succeed$4(args$1));
49655
49836
  });
49656
49837
  handle.on("spawn", () => {
49657
- resume(succeed([handle, deferred]));
49838
+ resume(succeed$1([handle, deferred]));
49658
49839
  });
49659
49840
  return sync(() => {
49660
49841
  handle.kill("SIGTERM");
@@ -49664,7 +49845,7 @@ const make$20 = /* @__PURE__ */ gen(function* () {
49664
49845
  const killProcessGroup = fnUntraced(function* (command, childProcess, signal) {
49665
49846
  if (globalThis.process.platform === "win32") return yield* callback$1((resume) => {
49666
49847
  NodeChildProcess.exec(`taskkill /pid ${childProcess.pid} /T /F`, (error$1) => {
49667
- if (error$1) resume(fail$3(toPlatformError("kill", toError(error$1), command)));
49848
+ if (error$1) resume(fail$4(toPlatformError("kill", toError(error$1), command)));
49668
49849
  else resume(void_$1);
49669
49850
  });
49670
49851
  });
@@ -49678,7 +49859,7 @@ const make$20 = /* @__PURE__ */ gen(function* () {
49678
49859
  const killProcess = fnUntraced(function* (command, childProcess, signal) {
49679
49860
  if (!childProcess.kill(signal)) {
49680
49861
  const error$1 = new globalThis.Error("Failed to kill child process");
49681
- return yield* fail$3(toPlatformError("kill", error$1, command));
49862
+ return yield* fail$4(toPlatformError("kill", error$1, command));
49682
49863
  }
49683
49864
  return yield* void_$1;
49684
49865
  });
@@ -49742,9 +49923,9 @@ const make$20 = /* @__PURE__ */ gen(function* () {
49742
49923
  return makeHandle({
49743
49924
  pid,
49744
49925
  exitCode: flatMap(_await(exitSignal), ([code, signal]) => {
49745
- if (isNotNull(code)) return succeed(ExitCode(code));
49926
+ if (isNotNull(code)) return succeed$1(ExitCode(code));
49746
49927
  const error$1 = new globalThis.Error(`Process interrupted due to receipt of signal: '${signal}'`);
49747
- return fail$3(toPlatformError("exitCode", error$1, command));
49928
+ return fail$4(toPlatformError("exitCode", error$1, command));
49748
49929
  }),
49749
49930
  isRunning,
49750
49931
  kill: fnUntraced(function* (options) {
@@ -50089,15 +50270,15 @@ const CookieProto = {
50089
50270
  * @category constructors
50090
50271
  */
50091
50272
  function makeCookie(name, value, options) {
50092
- if (!fieldContentRegExp.test(name)) return fail$8(new CookiesError({ reason: "InvalidName" }));
50273
+ if (!fieldContentRegExp.test(name)) return fail$9(new CookiesError({ reason: "InvalidName" }));
50093
50274
  const encodedValue = encodeURIComponent(value);
50094
- if (encodedValue && !fieldContentRegExp.test(encodedValue)) return fail$8(new CookiesError({ reason: "InvalidValue" }));
50275
+ if (encodedValue && !fieldContentRegExp.test(encodedValue)) return fail$9(new CookiesError({ reason: "InvalidValue" }));
50095
50276
  if (options !== void 0) {
50096
- if (options.domain !== void 0 && !fieldContentRegExp.test(options.domain)) return fail$8(new CookiesError({ reason: "InvalidDomain" }));
50097
- if (options.path !== void 0 && !fieldContentRegExp.test(options.path)) return fail$8(new CookiesError({ reason: "InvalidPath" }));
50098
- if (options.maxAge !== void 0 && !isFinite$2(fromDurationInputUnsafe(options.maxAge))) return fail$8(new CookiesError({ reason: "InfinityMaxAge" }));
50277
+ if (options.domain !== void 0 && !fieldContentRegExp.test(options.domain)) return fail$9(new CookiesError({ reason: "InvalidDomain" }));
50278
+ if (options.path !== void 0 && !fieldContentRegExp.test(options.path)) return fail$9(new CookiesError({ reason: "InvalidPath" }));
50279
+ if (options.maxAge !== void 0 && !isFinite$2(fromDurationInputUnsafe(options.maxAge))) return fail$9(new CookiesError({ reason: "InfinityMaxAge" }));
50099
50280
  }
50100
- return succeed$5(Object.assign(Object.create(CookieProto), {
50281
+ return succeed$6(Object.assign(Object.create(CookieProto), {
50101
50282
  name,
50102
50283
  value,
50103
50284
  valueEncoded: encodedValue,
@@ -50328,8 +50509,8 @@ const redact = /* @__PURE__ */ dual(2, (self$1, key) => {
50328
50509
  const modify$1 = (key$1) => {
50329
50510
  if (typeof key$1 === "string") {
50330
50511
  const k = key$1.toLowerCase();
50331
- if (k in self$1) out[k] = make$37(self$1[k]);
50332
- } else for (const name in self$1) if (key$1.test(name)) out[name] = make$37(self$1[name]);
50512
+ if (k in self$1) out[k] = make$38(self$1[k]);
50513
+ } else for (const name in self$1) if (key$1.test(name)) out[name] = make$38(self$1[name]);
50333
50514
  };
50334
50515
  if (Array.isArray(key)) for (let i = 0; i < key.length; i++) modify$1(key[i]);
50335
50516
  else modify$1(key);
@@ -50470,7 +50651,7 @@ const fromInputNested = (input) => {
50470
50651
  * @since 4.0.0
50471
50652
  * @category Equivalence
50472
50653
  */
50473
- const Equivalence = /* @__PURE__ */ make$47((a, b) => arrayEquivalence(a.params, b.params));
50654
+ const Equivalence = /* @__PURE__ */ make$48((a, b) => arrayEquivalence(a.params, b.params));
50474
50655
  const arrayEquivalence = /* @__PURE__ */ makeEquivalence$1(/* @__PURE__ */ makeEquivalence$3([/* @__PURE__ */ strictEqual(), /* @__PURE__ */ strictEqual()]));
50475
50656
  /**
50476
50657
  * @since 4.0.0
@@ -50528,9 +50709,9 @@ const makeUrl = (url, params, hash$1) => {
50528
50709
  if (value !== void 0) urlInstance.searchParams.append(key, value);
50529
50710
  }
50530
50711
  if (hash$1 !== void 0) urlInstance.hash = hash$1;
50531
- return succeed$5(urlInstance);
50712
+ return succeed$6(urlInstance);
50532
50713
  } catch (e) {
50533
- return fail$8(new UrlParamsError({ cause: e }));
50714
+ return fail$9(new UrlParamsError({ cause: e }));
50534
50715
  }
50535
50716
  };
50536
50717
  /**
@@ -50916,16 +51097,16 @@ const TypeId$9 = "~effect/http/HttpIncomingMessage";
50916
51097
  * @since 4.0.0
50917
51098
  * @category schema
50918
51099
  */
50919
- const schemaBodyJson = (schema, options) => {
50920
- const decode$2 = decodeEffect(toCodecJson(schema).annotate({ options }));
51100
+ const schemaBodyJson = (schema$1, options) => {
51101
+ const decode$2 = decodeEffect(toCodecJson(schema$1).annotate({ options }));
50921
51102
  return (self$1) => flatMap(self$1.json, decode$2);
50922
51103
  };
50923
51104
  /**
50924
51105
  * @since 4.0.0
50925
51106
  * @category schema
50926
51107
  */
50927
- const schemaBodyUrlParams = (schema, options) => {
50928
- const decode$2 = schemaRecord.pipe(decodeTo(schema), annotate$1({ options }), decodeEffect);
51108
+ const schemaBodyUrlParams = (schema$1, options) => {
51109
+ const decode$2 = schemaRecord.pipe(decodeTo(schema$1), annotate$1({ options }), decodeEffect);
50929
51110
  return (self$1) => flatMap(self$1.urlParamsBody, decode$2);
50930
51111
  };
50931
51112
  /**
@@ -50973,7 +51154,7 @@ const fromWeb = (request$3, source) => new WebHttpClientResponse(request$3, sour
50973
51154
  * @since 4.0.0
50974
51155
  * @category filters
50975
51156
  */
50976
- const filterStatusOk$1 = (self$1) => self$1.status >= 200 && self$1.status < 300 ? succeed(self$1) : fail$3(new ResponseError$1({
51157
+ const filterStatusOk$1 = (self$1) => self$1.status >= 200 && self$1.status < 300 ? succeed$1(self$1) : fail$4(new ResponseError$1({
50977
51158
  response: self$1,
50978
51159
  request: self$1.request,
50979
51160
  reason: "StatusCode",
@@ -51019,7 +51200,7 @@ var WebHttpClientResponse = class extends Class$2 {
51019
51200
  reason: "Decode",
51020
51201
  cause
51021
51202
  })
51022
- }) : fail(new ResponseError$1({
51203
+ }) : fail$1(new ResponseError$1({
51023
51204
  request: this.request,
51024
51205
  response: this,
51025
51206
  reason: "EmptyBody",
@@ -51224,7 +51405,7 @@ const make$16 = (f) => makeWith((effect$1) => flatMap(effect$1, (request$3) => w
51224
51405
  const scopedController = scopedRequests.get(request$3);
51225
51406
  const controller = scopedController ?? new AbortController();
51226
51407
  const urlResult = makeUrl(request$3.url, request$3.urlParams, request$3.hash);
51227
- if (isFailure$4(urlResult)) return fail$3(new RequestError$2({
51408
+ if (isFailure$4(urlResult)) return fail$4(new RequestError$2({
51228
51409
  request: request$3,
51229
51410
  reason: "InvalidUrl",
51230
51411
  cause: urlResult.failure
@@ -51236,7 +51417,7 @@ const make$16 = (f) => makeWith((effect$1) => flatMap(effect$1, (request$3) => w
51236
51417
  return uninterruptibleMask((restore) => matchCauseEffect(restore(effect$2), {
51237
51418
  onSuccess(response) {
51238
51419
  responseRegistry.register(response, controller);
51239
- return succeed(new InterruptibleResponse(response, controller));
51420
+ return succeed$1(new InterruptibleResponse(response, controller));
51240
51421
  },
51241
51422
  onFailure(cause) {
51242
51423
  if (hasInterrupt(cause)) controller.abort();
@@ -51262,9 +51443,9 @@ const make$16 = (f) => makeWith((effect$1) => flatMap(effect$1, (request$3) => w
51262
51443
  span.attribute("http.response.status_code", response.status);
51263
51444
  const redactedHeaders$1 = redact(response.headers, redactedHeaderNames);
51264
51445
  for (const name in redactedHeaders$1) span.attribute(`http.response.header.${name}`, String(redactedHeaders$1[name]));
51265
- if (scopedController) return succeed(response);
51446
+ if (scopedController) return succeed$1(response);
51266
51447
  responseRegistry.register(response, controller);
51267
- return succeed(new InterruptibleResponse(response, controller));
51448
+ return succeed$1(new InterruptibleResponse(response, controller));
51268
51449
  },
51269
51450
  onFailure(cause) {
51270
51451
  if (!scopedController && hasInterrupt(cause)) controller.abort();
@@ -51272,7 +51453,7 @@ const make$16 = (f) => makeWith((effect$1) => flatMap(effect$1, (request$3) => w
51272
51453
  }
51273
51454
  })));
51274
51455
  });
51275
- })), succeed);
51456
+ })), succeed$1);
51276
51457
  /**
51277
51458
  * Appends a transformation of the request object before sending it.
51278
51459
  *
@@ -51879,8 +52060,8 @@ function trimRegExpStartAndEnd(regexString) {
51879
52060
  if (regexString.charCodeAt(regexString.length - 2) === 36) regexString = regexString.slice(0, regexString.length - 2) + regexString.slice(regexString.length - 1);
51880
52061
  return regexString;
51881
52062
  }
51882
- function escapeRegExp(string$7) {
51883
- return string$7.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
52063
+ function escapeRegExp(string$8) {
52064
+ return string$8.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
51884
52065
  }
51885
52066
  function decodeComponentChar(highCharCode, lowCharCode) {
51886
52067
  if (highCharCode === 50) {
@@ -52020,7 +52201,7 @@ function make$13(strings, ...args$1) {
52020
52201
  else if (isEffect(arg)) effects.push([i, arg]);
52021
52202
  else values$1[i] = primitiveToString(arg);
52022
52203
  }
52023
- if (effects.length === 0) return succeed(consolidate(strings, values$1));
52204
+ if (effects.length === 0) return succeed$1(consolidate(strings, values$1));
52024
52205
  return map$4(forEach$1(effects, ([index, effect$1]) => tap(effect$1, (value) => {
52025
52206
  values$1[index] = primitiveToString(value);
52026
52207
  }), {
@@ -52174,21 +52355,21 @@ const notFound = /* @__PURE__ */ empty({ status: 404 });
52174
52355
  * @since 4.0.0
52175
52356
  * @category accessors
52176
52357
  */
52177
- const toResponseOrElse = (u, orElse) => {
52178
- if (isHttpServerResponse(u)) return succeed(u);
52179
- else if (isRespondable(u)) return catchCause$1(u[TypeId$5](), () => succeed(orElse));
52180
- else if (isSchemaError(u)) return succeed(badRequest);
52181
- else if (isNoSuchElementError(u)) return succeed(notFound);
52182
- return succeed(orElse);
52358
+ const toResponseOrElse = (u, orElse$1) => {
52359
+ if (isHttpServerResponse(u)) return succeed$1(u);
52360
+ else if (isRespondable(u)) return catchCause$1(u[TypeId$5](), () => succeed$1(orElse$1));
52361
+ else if (isSchemaError(u)) return succeed$1(badRequest);
52362
+ else if (isNoSuchElementError(u)) return succeed$1(notFound);
52363
+ return succeed$1(orElse$1);
52183
52364
  };
52184
52365
  /**
52185
52366
  * @since 4.0.0
52186
52367
  * @category accessors
52187
52368
  */
52188
- const toResponseOrElseDefect = (u, orElse) => {
52189
- if (isHttpServerResponse(u)) return succeed(u);
52190
- else if (isRespondable(u)) return catchCause$1(u[TypeId$5](), () => succeed(orElse));
52191
- return succeed(orElse);
52369
+ const toResponseOrElseDefect = (u, orElse$1) => {
52370
+ if (isHttpServerResponse(u)) return succeed$1(u);
52371
+ else if (isRespondable(u)) return catchCause$1(u[TypeId$5](), () => succeed$1(orElse$1));
52372
+ return succeed$1(orElse$1);
52192
52373
  };
52193
52374
 
52194
52375
  //#endregion
@@ -52214,7 +52395,7 @@ var RequestError$1 = class extends TaggedError("HttpServerError") {
52214
52395
  * @since 4.0.0
52215
52396
  */
52216
52397
  [TypeId$5]() {
52217
- return succeed(empty({ status: this.reason === "InternalError" ? 500 : this.reason === "RouteNotFound" ? 404 : 400 }));
52398
+ return succeed$1(empty({ status: this.reason === "InternalError" ? 500 : this.reason === "RouteNotFound" ? 404 : 400 }));
52218
52399
  }
52219
52400
  get methodAndUrl() {
52220
52401
  return `${this.request.method} ${this.request.url}`;
@@ -52245,7 +52426,7 @@ var ResponseError = class extends TaggedError("HttpServerError") {
52245
52426
  * @since 4.0.0
52246
52427
  */
52247
52428
  [TypeId$5]() {
52248
- return succeed(empty({ status: 500 }));
52429
+ return succeed$1(empty({ status: 500 }));
52249
52430
  }
52250
52431
  get methodAndUrl() {
52251
52432
  return `${this.request.method} ${this.request.url}`;
@@ -52298,7 +52479,7 @@ const causeResponse = (cause) => {
52298
52479
  break;
52299
52480
  }
52300
52481
  }
52301
- if (response) return succeed([response, fromFailures(failures)]);
52482
+ if (response) return succeed$1([response, fromFailures(failures)]);
52302
52483
  else if (interrupt$5 && failures.length === 0) failures.push(interrupt$5);
52303
52484
  return mapEager(effect$1, (response$1) => {
52304
52485
  failures.push(failureDie(response$1));
@@ -52320,9 +52501,9 @@ const causeResponseStripped = (cause) => {
52320
52501
  return [response ?? internalServerError, failures.length > 0 ? fromFailures(failures) : void 0];
52321
52502
  };
52322
52503
  const internalServerError = /* @__PURE__ */ empty({ status: 500 });
52323
- const succeedInternalServerError = /* @__PURE__ */ succeed(internalServerError);
52324
- const clientAbortError = /* @__PURE__ */ succeed(/* @__PURE__ */ empty({ status: 499 }));
52325
- const serverAbortError = /* @__PURE__ */ succeed(/* @__PURE__ */ empty({ status: 503 }));
52504
+ const succeedInternalServerError = /* @__PURE__ */ succeed$1(internalServerError);
52505
+ const clientAbortError = /* @__PURE__ */ succeed$1(/* @__PURE__ */ empty({ status: 499 }));
52506
+ const serverAbortError = /* @__PURE__ */ succeed$1(/* @__PURE__ */ empty({ status: 503 }));
52326
52507
  /**
52327
52508
  * @since 4.0.0
52328
52509
  */
@@ -52422,7 +52603,7 @@ var SocketCloseError = class SocketCloseError extends TaggedError("SocketError")
52422
52603
  */
52423
52604
  static isClean(isClean) {
52424
52605
  return function(u) {
52425
- return SocketCloseError.is(u) && isClean(u.code) ? u : fail$7(u);
52606
+ return SocketCloseError.is(u) && isClean(u.code) ? u : fail$8(u);
52426
52607
  };
52427
52608
  }
52428
52609
  get message() {
@@ -52461,7 +52642,7 @@ const fromWebSocket = (acquire, options) => withFiber((fiber$2) => {
52461
52642
  function onError$2(cause) {
52462
52643
  ws.removeEventListener("message", onMessage);
52463
52644
  ws.removeEventListener("close", onClose);
52464
- doneUnsafe$1(fiberSet.deferred, fail$3(new SocketGenericError({
52645
+ doneUnsafe$1(fiberSet.deferred, fail$4(new SocketGenericError({
52465
52646
  reason: open$1 ? "Read" : "Open",
52466
52647
  cause
52467
52648
  })));
@@ -52469,7 +52650,7 @@ const fromWebSocket = (acquire, options) => withFiber((fiber$2) => {
52469
52650
  function onClose(event) {
52470
52651
  ws.removeEventListener("message", onMessage);
52471
52652
  ws.removeEventListener("error", onError$2);
52472
- doneUnsafe$1(fiberSet.deferred, fail$3(new SocketCloseError({
52653
+ doneUnsafe$1(fiberSet.deferred, fail$4(new SocketCloseError({
52473
52654
  code: event.code,
52474
52655
  closeReason: event.reason
52475
52656
  })));
@@ -52485,7 +52666,7 @@ const fromWebSocket = (acquire, options) => withFiber((fiber$2) => {
52485
52666
  }, { once: true });
52486
52667
  yield* _await(openDeferred).pipe(timeoutOrElse({
52487
52668
  duration: options?.openTimeout ?? 1e4,
52488
- onTimeout: () => fail$3(new SocketGenericError({
52669
+ onTimeout: () => fail$4(new SocketGenericError({
52489
52670
  reason: "OpenTimeout",
52490
52671
  cause: "timeout waiting for \"open\""
52491
52672
  }))
@@ -52507,8 +52688,8 @@ const fromWebSocket = (acquire, options) => withFiber((fiber$2) => {
52507
52688
  if (isCloseEvent(chunk)) ws.close(chunk.code, chunk.reason);
52508
52689
  else ws.send(chunk);
52509
52690
  }));
52510
- const writer = succeed(write);
52511
- return succeed(Socket.of({
52691
+ const writer = succeed$1(write);
52692
+ return succeed$1(Socket.of({
52512
52693
  [TypeId$3]: TypeId$3,
52513
52694
  run: run$6,
52514
52695
  runRaw,
@@ -53455,7 +53636,7 @@ var MultipartError = class extends ErrorClass(MultipartErrorTypeId)({
53455
53636
  */
53456
53637
  const makeConfig = (headers) => withFiber((fiber$2) => {
53457
53638
  const mimeTypes = get$7(fiber$2.services, FieldMimeTypes);
53458
- return succeed({
53639
+ return succeed$1({
53459
53640
  headers,
53460
53641
  maxParts: fiber$2.getRef(MaxParts),
53461
53642
  maxFieldSize: Number(fiber$2.getRef(MaxFieldSize)),
@@ -53479,11 +53660,11 @@ const makeChannel = (headers) => fromTransform$1((upstream) => map$4(makeConfig(
53479
53660
  onFile(info) {
53480
53661
  let chunks = [];
53481
53662
  let finished = false;
53482
- const pullChunks = fromPull$1(succeed(suspend$2(function loop() {
53663
+ const pullChunks = fromPull$1(succeed$1(suspend$2(function loop() {
53483
53664
  if (!isReadonlyArrayNonEmpty(chunks)) return finished ? haltVoid : flatMap(pump, loop);
53484
53665
  const chunk = chunks;
53485
53666
  chunks = [];
53486
- return succeed(chunk);
53667
+ return succeed$1(chunk);
53487
53668
  })));
53488
53669
  partsBuffer.push(new FileImpl$1(info, pullChunks));
53489
53670
  return function(chunk) {
@@ -53492,10 +53673,10 @@ const makeChannel = (headers) => fromTransform$1((upstream) => map$4(makeConfig(
53492
53673
  };
53493
53674
  },
53494
53675
  onError(error_) {
53495
- exit$2 = some(fail$5(convertError$1(error_)));
53676
+ exit$2 = some(fail$6(convertError$1(error_)));
53496
53677
  },
53497
53678
  onDone() {
53498
- exit$2 = some(fail$5(new Halt(void 0)));
53679
+ exit$2 = some(fail$6(new Halt(void 0)));
53499
53680
  }
53500
53681
  });
53501
53682
  const pump = upstream.pipe(flatMap((chunk) => {
@@ -53513,7 +53694,7 @@ const makeChannel = (headers) => fromTransform$1((upstream) => map$4(makeConfig(
53513
53694
  }
53514
53695
  const parts = partsBuffer;
53515
53696
  partsBuffer = [];
53516
- return succeed(parts);
53697
+ return succeed$1(parts);
53517
53698
  }));
53518
53699
  }));
53519
53700
  function convertError$1(cause) {
@@ -53640,7 +53821,7 @@ const toPersisted = (stream$3, writeFile$1 = defaultWriteFile) => gen(function*
53640
53821
  return writeFile$1(path$2, file);
53641
53822
  });
53642
53823
  return persisted$1;
53643
- }).pipe(catchTag("PlatformError", (cause) => fail$3(new MultipartError({
53824
+ }).pipe(catchTag("PlatformError", (cause) => fail$4(new MultipartError({
53644
53825
  reason: "InternalError",
53645
53826
  cause
53646
53827
  }))));
@@ -53710,8 +53891,8 @@ var ParsedSearchParams = class extends Service()("effect/http/ParsedSearchParams
53710
53891
  * @since 4.0.0
53711
53892
  * @category schema
53712
53893
  */
53713
- const schemaSearchParams = (schema, options) => {
53714
- const parse$3 = decodeUnknownEffect(schema);
53894
+ const schemaSearchParams = (schema$1, options) => {
53895
+ const parse$3 = decodeUnknownEffect(schema$1);
53715
53896
  return flatMap(ParsedSearchParams.asEffect(), (params) => parse$3(params, options));
53716
53897
  };
53717
53898
  var ServerRequestImpl$1 = class ServerRequestImpl$1 extends Class$2 {
@@ -53766,7 +53947,7 @@ var ServerRequestImpl$1 = class ServerRequestImpl$1 extends Class$2 {
53766
53947
  reason: "RequestParseError",
53767
53948
  cause
53768
53949
  })
53769
- }) : fail(new RequestError$1({
53950
+ }) : fail$1(new RequestError$1({
53770
53951
  request: this,
53771
53952
  reason: "RequestParseError",
53772
53953
  description: "can not create stream from empty body"
@@ -53831,7 +54012,7 @@ var ServerRequestImpl$1 = class ServerRequestImpl$1 extends Class$2 {
53831
54012
  return this.arrayBufferEffect;
53832
54013
  }
53833
54014
  get upgrade() {
53834
- return fail$3(new RequestError$1({
54015
+ return fail$4(new RequestError$1({
53835
54016
  request: this,
53836
54017
  reason: "RequestParseError",
53837
54018
  description: "Not an upgradeable ServerRequest"
@@ -53969,16 +54150,16 @@ const toHandled = (self$1, handleResponse$1, middleware$1) => {
53969
54150
  if (handler$1 === void 0) {
53970
54151
  request$3[handledSymbol] = true;
53971
54152
  const eff = handleResponse$1(request$3, response);
53972
- if (effectIsExit(eff)) return eff._tag === "Success" ? succeed(response) : handleCause$1(eff.cause);
54153
+ if (effectIsExit(eff)) return eff._tag === "Success" ? succeed$1(response) : handleCause$1(eff.cause);
53973
54154
  return matchCauseEffect(eff, {
53974
54155
  onFailure: handleCause$1,
53975
- onSuccess: () => succeed(response)
54156
+ onSuccess: () => succeed$1(response)
53976
54157
  });
53977
54158
  }
53978
54159
  return flatMapEager(handler$1(request$3, response), (sentResponse) => {
53979
54160
  request$3[handledSymbol] = true;
53980
54161
  return matchCauseEffectEager(handleResponse$1(request$3, sentResponse), {
53981
- onSuccess: () => succeed(response),
54162
+ onSuccess: () => succeed$1(response),
53982
54163
  onFailure: handleCause$1
53983
54164
  });
53984
54165
  });
@@ -53987,7 +54168,7 @@ const toHandled = (self$1, handleResponse$1, middleware$1) => {
53987
54168
  const fiber$2 = getCurrent();
53988
54169
  const request$3 = getUnsafe(fiber$2.services, HttpServerRequest);
53989
54170
  const handler$1 = fiber$2.getRef(PreResponseHandlers);
53990
- const cont = cause$1.failures.length === 0 ? succeed(response) : failCause$2(cause$1);
54171
+ const cont = cause$1.failures.length === 0 ? succeed$1(response) : failCause$2(cause$1);
53991
54172
  if (handler$1 === void 0) {
53992
54173
  request$3[handledSymbol] = true;
53993
54174
  return flatMapEager(handleResponse$1(request$3, response), () => cont);
@@ -54064,7 +54245,7 @@ const fromFileWeb = (file) => {
54064
54245
  * @since 4.0.0
54065
54246
  * @category Layers
54066
54247
  */
54067
- const layer$12 = /* @__PURE__ */ succeed$1(Generator)({
54248
+ const layer$12 = /* @__PURE__ */ succeed$2(Generator)({
54068
54249
  fromFileInfo(info) {
54069
54250
  return sync(() => ({
54070
54251
  _tag: "Strong",
@@ -54082,7 +54263,7 @@ const layer$12 = /* @__PURE__ */ succeed$1(Generator)({
54082
54263
  * @since 4.0.0
54083
54264
  * @category Layers
54084
54265
  */
54085
- const layerWeak = /* @__PURE__ */ succeed$1(Generator)({
54266
+ const layerWeak = /* @__PURE__ */ succeed$2(Generator)({
54086
54267
  fromFileInfo(info) {
54087
54268
  return sync(() => ({
54088
54269
  _tag: "Weak",
@@ -54277,7 +54458,7 @@ const make$5 = /* @__PURE__ */ gen(function* () {
54277
54458
  add: (method, path$2, handler$1, options) => addAll([makeRoute({
54278
54459
  method,
54279
54460
  path: prefixPath(path$2, prefix$1),
54280
- handler: isHttpServerResponse(handler$1) ? succeed(handler$1) : isEffect(handler$1) ? handler$1 : flatMap(HttpServerRequest.asEffect(), handler$1),
54461
+ handler: isHttpServerResponse(handler$1) ? succeed$1(handler$1) : isEffect(handler$1) ? handler$1 : flatMap(HttpServerRequest.asEffect(), handler$1),
54281
54462
  uninterruptible: options?.uninterruptible ?? false,
54282
54463
  prefix: prefix$1
54283
54464
  })])
@@ -54294,7 +54475,7 @@ const make$5 = /* @__PURE__ */ gen(function* () {
54294
54475
  const request$3 = contextMap.get(HttpServerRequest.key);
54295
54476
  let result$2 = router.find(request$3.method, request$3.url);
54296
54477
  if (result$2 === void 0 && request$3.method === "HEAD") result$2 = router.find("GET", request$3.url);
54297
- if (result$2 === void 0) return fail$3(new RequestError$1({
54478
+ if (result$2 === void 0) return fail$4(new RequestError$1({
54298
54479
  reason: "RouteNotFound",
54299
54480
  request: request$3
54300
54481
  }));
@@ -54387,7 +54568,7 @@ const route = (method, path$2, handler$1, options) => makeRoute({
54387
54568
  ...options,
54388
54569
  method,
54389
54570
  path: path$2,
54390
- handler: isHttpServerResponse(handler$1) ? succeed(handler$1) : isEffect(handler$1) ? handler$1 : flatMap(HttpServerRequest.asEffect(), handler$1),
54571
+ handler: isHttpServerResponse(handler$1) ? succeed$1(handler$1) : isEffect(handler$1) ? handler$1 : flatMap(HttpServerRequest.asEffect(), handler$1),
54391
54572
  uninterruptible: options?.uninterruptible ?? false
54392
54573
  });
54393
54574
  const removeTrailingSlash = (path$2) => path$2.endsWith("/") ? path$2.slice(0, -1) : path$2;
@@ -54562,7 +54743,7 @@ const disableLogger = middleware(withLoggerDisabled).layer;
54562
54743
  const serve = (appLayer, options) => {
54563
54744
  let middleware$1 = options?.middleware;
54564
54745
  if (options?.disableLogger !== true) middleware$1 = middleware$1 ? compose$1(middleware$1, logger) : logger;
54565
- const RouterLayer = options?.routerConfig ? provide$3(layer$10, succeed$1(RouterConfig)(options.routerConfig)) : layer$10;
54746
+ const RouterLayer = options?.routerConfig ? provide$3(layer$10, succeed$2(RouterConfig)(options.routerConfig)) : layer$10;
54566
54747
  return gen(function* () {
54567
54748
  const handler$1 = (yield* HttpRouter).asHttpEffect();
54568
54749
  return middleware$1 ? serve$1(handler$1, middleware$1) : serve$1(handler$1);
@@ -58262,7 +58443,7 @@ const makeFile = /* @__PURE__ */ (() => {
58262
58443
  return suspend$2(() => {
58263
58444
  const position = this.position;
58264
58445
  return flatMap(nodeWriteAll(this.fd, buffer$1, void 0, void 0, this.append ? void 0 : Number(position)), (bytesWritten) => {
58265
- if (bytesWritten === 0) return fail$3(new SystemError({
58446
+ if (bytesWritten === 0) return fail$4(new SystemError({
58266
58447
  module: "FileSystem",
58267
58448
  method: "writeAll",
58268
58449
  reason: "WriteZero",
@@ -58303,11 +58484,11 @@ const readDirectory = (path$2, options) => tryPromise({
58303
58484
  const readFile = (path$2) => callback$1((resume, signal) => {
58304
58485
  try {
58305
58486
  NFS.readFile(path$2, { signal }, (err, data) => {
58306
- if (err) resume(fail$3(handleErrnoException("FileSystem", "readFile")(err, [path$2])));
58307
- else resume(succeed(data));
58487
+ if (err) resume(fail$4(handleErrnoException("FileSystem", "readFile")(err, [path$2])));
58488
+ else resume(succeed$1(data));
58308
58489
  });
58309
58490
  } catch (err) {
58310
- resume(fail$3(handleBadArgument("readFile")(err)));
58491
+ resume(fail$4(handleBadArgument("readFile")(err)));
58311
58492
  }
58312
58493
  });
58313
58494
  const readLink = /* @__PURE__ */ (() => {
@@ -58379,7 +58560,7 @@ const watchNode = (path$2) => callback((queue) => acquireRelease(sync(() => {
58379
58560
  }
58380
58561
  });
58381
58562
  watcher.on("error", (error$1) => {
58382
- doneUnsafe(queue, fail$5(new SystemError({
58563
+ doneUnsafe(queue, fail$6(new SystemError({
58383
58564
  module: "FileSystem",
58384
58565
  reason: "Unknown",
58385
58566
  method: "watch",
@@ -58406,14 +58587,14 @@ const writeFile = (path$2, data, options) => callback$1((resume, signal) => {
58406
58587
  flag: options?.flag,
58407
58588
  mode: options?.mode
58408
58589
  }, (err) => {
58409
- if (err) resume(fail$3(handleErrnoException("FileSystem", "writeFile")(err, [path$2])));
58590
+ if (err) resume(fail$4(handleErrnoException("FileSystem", "writeFile")(err, [path$2])));
58410
58591
  else resume(void_$1);
58411
58592
  });
58412
58593
  } catch (err) {
58413
- resume(fail$3(handleBadArgument("writeFile")(err)));
58594
+ resume(fail$4(handleBadArgument("writeFile")(err)));
58414
58595
  }
58415
58596
  });
58416
- const makeFileSystem = /* @__PURE__ */ map$4(/* @__PURE__ */ serviceOption(WatchBackend), (backend) => make$28({
58597
+ const makeFileSystem = /* @__PURE__ */ map$4(/* @__PURE__ */ serviceOption(WatchBackend), (backend) => make$29({
58417
58598
  access,
58418
58599
  chmod,
58419
58600
  chown,
@@ -58575,7 +58756,7 @@ const fetch$1 = /* @__PURE__ */ make$16((request$3, url, signal, fiber$2) => {
58575
58756
  * @since 4.0.0
58576
58757
  * @category layers
58577
58758
  */
58578
- const layer$7 = /* @__PURE__ */ layerMergedServices(/* @__PURE__ */ succeed(fetch$1));
58759
+ const layer$7 = /* @__PURE__ */ layerMergedServices(/* @__PURE__ */ succeed$1(fetch$1));
58579
58760
 
58580
58761
  //#endregion
58581
58762
  //#region node_modules/.pnpm/@effect+platform-node@https+++pkg.pr.new+Effect-TS+effect-smol+@effect+platform-node@00_214d700581c25b55b48a89169469629f/node_modules/@effect/platform-node/dist/NodeHttpPlatform.js
@@ -58846,7 +59027,7 @@ const toFileUrl = (path$2) => try_({
58846
59027
  * @since 1.0.0
58847
59028
  * @category Layers
58848
59029
  */
58849
- const layerPosix$1 = /* @__PURE__ */ succeed$1(Path$1)({
59030
+ const layerPosix$1 = /* @__PURE__ */ succeed$2(Path$1)({
58850
59031
  [TypeId$25]: TypeId$25,
58851
59032
  ...Path.posix,
58852
59033
  fromFileUrl,
@@ -58856,7 +59037,7 @@ const layerPosix$1 = /* @__PURE__ */ succeed$1(Path$1)({
58856
59037
  * @since 1.0.0
58857
59038
  * @category Layers
58858
59039
  */
58859
- const layerWin32$1 = /* @__PURE__ */ succeed$1(Path$1)({
59040
+ const layerWin32$1 = /* @__PURE__ */ succeed$2(Path$1)({
58860
59041
  [TypeId$25]: TypeId$25,
58861
59042
  ...Path.win32,
58862
59043
  fromFileUrl,
@@ -58866,7 +59047,7 @@ const layerWin32$1 = /* @__PURE__ */ succeed$1(Path$1)({
58866
59047
  * @since 1.0.0
58867
59048
  * @category Layers
58868
59049
  */
58869
- const layer$5 = /* @__PURE__ */ succeed$1(Path$1)({
59050
+ const layer$5 = /* @__PURE__ */ succeed$2(Path$1)({
58870
59051
  [TypeId$25]: TypeId$25,
58871
59052
  ...Path,
58872
59053
  fromFileUrl,
@@ -58906,7 +59087,7 @@ const layerWin32 = layerWin32$1;
58906
59087
  const make$2 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQuit) {
58907
59088
  const stdin = process.stdin;
58908
59089
  const stdout = process.stdout;
58909
- const rlRef = yield* make$29({ acquire: acquireRelease(sync(() => {
59090
+ const rlRef = yield* make$30({ acquire: acquireRelease(sync(() => {
58910
59091
  const rl = readline.createInterface({
58911
59092
  input: stdin,
58912
59093
  escapeCodeTimeout: 50
@@ -58921,7 +59102,7 @@ const make$2 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQ
58921
59102
  const columns = sync(() => stdout.columns ?? 0);
58922
59103
  const readInput = gen(function* () {
58923
59104
  yield* get$3(rlRef);
58924
- const queue = yield* make$33();
59105
+ const queue = yield* make$34();
58925
59106
  const handleKeypress = (s, k) => {
58926
59107
  const userInput = {
58927
59108
  input: s,
@@ -58940,12 +59121,12 @@ const make$2 = /* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQ
58940
59121
  return queue;
58941
59122
  });
58942
59123
  const readLine = scoped$1(flatMap(get$3(rlRef), (readlineInterface) => callback$1((resume) => {
58943
- const onLine = (line) => resume(succeed(line));
59124
+ const onLine = (line) => resume(succeed$1(line));
58944
59125
  readlineInterface.once("line", onLine);
58945
59126
  return sync(() => readlineInterface.off("line", onLine));
58946
59127
  })));
58947
59128
  const display = (prompt) => uninterruptible(callback$1((resume) => {
58948
- stdout.write(prompt, (err) => isNullish(err) ? resume(void_$1) : resume(fail$3(new BadArgument({
59129
+ stdout.write(prompt, (err) => isNullish(err) ? resume(void_$1) : resume(fail$4(new BadArgument({
58949
59130
  module: "Terminal",
58950
59131
  method: "display",
58951
59132
  description: "Failed to write prompt to stdout",
@@ -59013,7 +59194,7 @@ const make = /* @__PURE__ */ fnUntraced(function* (evaluate$1, options) {
59013
59194
  }));
59014
59195
  yield* callback$1((resume) => {
59015
59196
  function onError$2(cause) {
59016
- resume(fail$3(new ServeError({ cause })));
59197
+ resume(fail$4(new ServeError({ cause })));
59017
59198
  }
59018
59199
  server.on("error", onError$2);
59019
59200
  server.listen(options, () => {
@@ -59089,7 +59270,7 @@ const makeUpgradeHandler = (lazyWss, httpEffect, options) => {
59089
59270
  return nodeResponse_;
59090
59271
  };
59091
59272
  const upgradeEffect = fromWebSocket(flatMap(lazyWss, (wss) => acquireRelease(callback$1((resume) => wss.handleUpgrade(nodeRequest, socket, head, (ws) => {
59092
- resume(succeed(ws));
59273
+ resume(succeed$1(ws));
59093
59274
  })), (ws) => sync(() => ws.close()))));
59094
59275
  const map$12 = new Map(services$2.mapUnsafe);
59095
59276
  map$12.set(HttpServerRequest.key, new ServerRequestImpl(nodeRequest, nodeResponse, upgradeEffect));
@@ -59148,7 +59329,7 @@ var ServerRequestImpl = class ServerRequestImpl extends NodeHttpIncomingMessage
59148
59329
  return stream(this.source, this.source.headers);
59149
59330
  }
59150
59331
  get upgrade() {
59151
- return this.upgradeEffect ?? fail$3(new RequestError$1({
59332
+ return this.upgradeEffect ?? fail$4(new RequestError$1({
59152
59333
  request: this,
59153
59334
  reason: "RequestParseError",
59154
59335
  description: "not an upgradeable ServerRequest"
@@ -59184,7 +59365,7 @@ const layer = (evaluate$1, options) => mergeAll(layerServer(evaluate$1, options)
59184
59365
  * @since 1.0.0
59185
59366
  * @category Testing
59186
59367
  */
59187
- const layerTest = /* @__PURE__ */ layerTestClient.pipe(/* @__PURE__ */ provide$3(/* @__PURE__ */ fresh(layer$7).pipe(/* @__PURE__ */ provide$3(/* @__PURE__ */ succeed$1(RequestInit)({ keepalive: false })))), /* @__PURE__ */ provideMerge(/* @__PURE__ */ layer(Http.createServer, { port: 0 })));
59368
+ const layerTest = /* @__PURE__ */ layerTestClient.pipe(/* @__PURE__ */ provide$3(/* @__PURE__ */ fresh(layer$7).pipe(/* @__PURE__ */ provide$3(/* @__PURE__ */ succeed$2(RequestInit)({ keepalive: false })))), /* @__PURE__ */ provideMerge(/* @__PURE__ */ layer(Http.createServer, { port: 0 })));
59188
59369
  const handleResponse = (request$3, response) => {
59189
59370
  const nodeResponse = request$3.resolvedResponse;
59190
59371
  if (nodeResponse.writableEnded) return void_$1;
@@ -59241,7 +59422,7 @@ const handleResponse = (request$3, response) => {
59241
59422
  });
59242
59423
  return callback$1((resume, signal) => {
59243
59424
  Readable.fromWeb(r.body, { signal }).pipe(nodeResponse).on("error", (cause) => {
59244
- resume(fail$3(new ResponseError({
59425
+ resume(fail$4(new ResponseError({
59245
59426
  request: request$3,
59246
59427
  response,
59247
59428
  description: "Error writing FormData response",
@@ -59416,9 +59597,9 @@ var Settings = class extends Service()("lalph/Settings", { make: gen(function* (
59416
59597
  var Setting = class {
59417
59598
  name;
59418
59599
  schema;
59419
- constructor(name, schema) {
59600
+ constructor(name, schema$1) {
59420
59601
  this.name = name;
59421
- this.schema = schema;
59602
+ this.schema = schema$1;
59422
59603
  }
59423
59604
  get = Settings.use((s) => s.get(this));
59424
59605
  set(value) {
@@ -133568,10 +133749,10 @@ var TokenManager$1 = class extends Service()("lalph/Linear/TokenManager", { make
133568
133749
  });
133569
133750
  const get$8 = makeSemaphoreUnsafe(1).withPermit(getNoLock);
133570
133751
  const pkce = gen(function* () {
133571
- const deferred = yield* make$44();
133752
+ const deferred = yield* make$45();
133572
133753
  const CallbackRoute = add("GET", "/callback", gen(function* () {
133573
133754
  const params$1 = yield* callbackParams;
133574
- yield* succeed$2(deferred, params$1);
133755
+ yield* succeed$3(deferred, params$1);
133575
133756
  return yield* html`
133576
133757
  <html>
133577
133758
  <body style="font-family: sans-serif; text-align: center; margin-top: 50px;">
@@ -133662,8 +133843,8 @@ var NoMoreWork = class extends ErrorClass("lalph/Prd/NoMoreWork")({ _tag: tag("N
133662
133843
  //#region src/Linear.ts
133663
133844
  var Linear = class extends Service()("lalph/Linear", { make: gen(function* () {
133664
133845
  const tokens = yield* TokenManager$1;
133665
- const clients = yield* make$31({
133666
- lookup: (token) => succeed(new LinearClient({ accessToken: token })),
133846
+ const clients = yield* make$32({
133847
+ lookup: (token) => succeed$1(new LinearClient({ accessToken: token })),
133667
133848
  idleTimeToLive: "1 minute"
133668
133849
  });
133669
133850
  const getClient = tokens.get.pipe(flatMap(({ token }) => get$5(clients, token)), mapError$2((cause) => new LinearError({ cause })));
@@ -138513,9 +138694,9 @@ async function get(cache, options) {
138513
138694
  token,
138514
138695
  createdAt,
138515
138696
  expiresAt,
138516
- permissions: options.permissions || permissionsString.split(/,/).reduce((permissions2, string$7) => {
138517
- if (/!$/.test(string$7)) permissions2[string$7.slice(0, -1)] = "write";
138518
- else permissions2[string$7] = "read";
138697
+ permissions: options.permissions || permissionsString.split(/,/).reduce((permissions2, string$8) => {
138698
+ if (/!$/.test(string$8)) permissions2[string$8.slice(0, -1)] = "write";
138699
+ else permissions2[string$8] = "read";
138519
138700
  return permissions2;
138520
138701
  }, {}),
138521
138702
  repositoryIds: options.repositoryIds,
@@ -139978,8 +140159,8 @@ const PollResponse = Union([TokenResponse, PollErrorResponse]);
139978
140159
  var GithubError = class extends TaggedError("GithubError") {};
139979
140160
  var Github = class extends Service()("lalph/Github", { make: gen(function* () {
139980
140161
  const tokens = yield* TokenManager;
139981
- const clients = yield* make$31({
139982
- lookup: (token) => succeed(new Octokit({ auth: token })),
140162
+ const clients = yield* make$32({
140163
+ lookup: (token) => succeed$1(new Octokit({ auth: token })),
139983
140164
  idleTimeToLive: "1 minute"
139984
140165
  });
139985
140166
  const getClient = tokens.get.pipe(flatMap(({ token }) => get$5(clients, token)), mapError$2((cause) => new GithubError({ cause })));
@@ -140046,7 +140227,7 @@ const GithubIssueSource = effect(IssueSource, gen(function* () {
140046
140227
  githubPrNumber: null
140047
140228
  });
140048
140229
  }), { concurrency: 10 }), runCollect, mapError$2((cause) => new IssueSourceError({ cause })));
140049
- const createIssue = github.wrap((rest) => rest.issues.create);
140230
+ const createIssue$1 = github.wrap((rest) => rest.issues.create);
140050
140231
  const updateIssue = github.wrap((rest) => rest.issues.update);
140051
140232
  const addBlockedByDependency = fnUntraced(function* (options) {
140052
140233
  const blockedBy = yield* github.request((rest) => rest.issues.get({
@@ -140077,7 +140258,7 @@ const GithubIssueSource = effect(IssueSource, gen(function* () {
140077
140258
  return IssueSource.of({
140078
140259
  issues,
140079
140260
  createIssue: fnUntraced(function* (issue) {
140080
- const created = yield* createIssue({
140261
+ const created = yield* createIssue$1({
140081
140262
  owner,
140082
140263
  repo,
140083
140264
  title: issue.title,
@@ -140309,7 +140490,7 @@ permission.
140309
140490
  6. Create or update the pull request with your progress.
140310
140491
  ${sourceMeta.githubPrInstructions}
140311
140492
  The PR description should include a summary of the changes made.
140312
- - None of the files in the \`.lalph\` directory should be committed.
140493
+ - **DO NOT** commit any of the files in the \`.lalph\` directory.
140313
140494
  - You have permission to create or update the PR as needed. You have full
140314
140495
  permission to push branches, create PRs or create git commits.
140315
140496
  7. Update the prd.yml file to reflect any changes in task states.
@@ -140373,6 +140554,8 @@ ${prdNotes}`;
140373
140554
  - Each task should be an atomic, committable piece of work.
140374
140555
  Instead of creating tasks like "Refactor the authentication system", create
140375
140556
  smaller tasks like "Implement OAuth2 login endpoint", "Add JWT token refresh mechanism", etc.
140557
+ - **Never** create a research task. You should do all the necessary research
140558
+ before creating the specification and tasks.
140376
140559
  3. Add the new or updated tasks to the prd.yml file.
140377
140560
  4. Wait until the tasks are saved, then setup task dependencies using the \`blockedBy\` field.
140378
140561
  5. Start a subagent with a copy of this prompt, to review the plan and provide feedback or improvements.
@@ -140433,6 +140616,7 @@ var Prd = class extends Service()("lalph/Prd", { make: gen(function* () {
140433
140616
  const source = yield* IssueSource;
140434
140617
  const lalphDir = pathService.join(worktree.directory, `.lalph`);
140435
140618
  const prdFile = pathService.join(worktree.directory, `.lalph`, `prd.yml`);
140619
+ yield* addFinalizer(() => ignore(fs.remove(prdFile)));
140436
140620
  let current = yield* source.issues;
140437
140621
  yield* fs.writeFileString(prdFile, PrdIssue.arrayToYaml(current));
140438
140622
  const updatedIssues = /* @__PURE__ */ new Map();
@@ -140561,12 +140745,17 @@ const run = fnUntraced(function* (options) {
140561
140745
  extendEnv: true,
140562
140746
  env: cliAgent.env
140563
140747
  })(template, ...args$1).pipe(exitCode);
140748
+ const execOutput = (template, ...args$1) => make$21({
140749
+ cwd: worktree.directory,
140750
+ extendEnv: true,
140751
+ env: cliAgent.env
140752
+ })(template, ...args$1).pipe(string, map$4((output) => output.trim()));
140564
140753
  const execWithStallTimeout = fnUntraced(function* (command) {
140565
140754
  let lastOutputAt = yield* now;
140566
140755
  const stallTimeout = suspend$2(function loop() {
140567
140756
  const now$2 = nowUnsafe();
140568
140757
  const deadline = addDuration(lastOutputAt, options.stallTimeout);
140569
- if (isLessThan$1(deadline, now$2)) return fail$3(new RunnerStalled());
140758
+ if (isLessThan$1(deadline, now$2)) return fail$4(new RunnerStalled());
140570
140759
  const timeUntilDeadline = distanceDuration(deadline, now$2);
140571
140760
  return flatMap(sleep(timeUntilDeadline), loop);
140572
140761
  });
@@ -140586,47 +140775,58 @@ const run = fnUntraced(function* (options) {
140586
140775
  return yield* handle.exitCode;
140587
140776
  }, scoped$1);
140588
140777
  if (isSome(options.targetBranch)) yield* exec`git checkout ${`origin/${options.targetBranch.value}`}`;
140589
- const chooseCommand = cliAgent.command({
140590
- prompt: promptGen.promptChoose,
140591
- prdFilePath: pathService.join(".lalph", "prd.yml")
140592
- });
140593
- yield* make$21(chooseCommand[0], chooseCommand.slice(1), {
140594
- cwd: worktree.directory,
140595
- extendEnv: true,
140596
- env: cliAgent.env,
140597
- stdout: "inherit",
140598
- stderr: "inherit",
140599
- stdin: "inherit"
140600
- }).pipe(exitCode, timeoutOrElse({
140601
- duration: options.stallTimeout,
140602
- onTimeout: () => fail$3(new RunnerStalled())
140778
+ const currentBranch = execOutput`git branch --show-current`.pipe(map$4((branch) => {
140779
+ branch = branch.trim();
140780
+ return branch === "" ? null : branch;
140603
140781
  }));
140604
- const taskJson = yield* fs.readFileString(pathService.join(worktree.directory, ".lalph", "task.json"));
140605
- const task = yield* decodeEffect(ChosenTask)(taskJson);
140606
- yield* completeWith(options.startedDeferred, void_$1);
140607
- const exitCode$1 = yield* execWithStallTimeout(cliAgent.command({
140608
- prompt: promptGen.prompt({
140609
- taskId: task.id,
140610
- targetBranch: getOrUndefined(options.targetBranch)
140611
- }),
140612
- prdFilePath: pathService.join(".lalph", "prd.yml")
140613
- })).pipe(timeout(options.runTimeout), catchTag("TimeoutError", fnUntraced(function* (error$1) {
140614
- yield* execWithStallTimeout(cliAgent.command({
140615
- prompt: promptGen.promptTimeout({ taskId: task.id }),
140782
+ yield* gen(function* () {
140783
+ const chooseCommand = cliAgent.command({
140784
+ prompt: promptGen.promptChoose,
140616
140785
  prdFilePath: pathService.join(".lalph", "prd.yml")
140786
+ });
140787
+ yield* make$21(chooseCommand[0], chooseCommand.slice(1), {
140788
+ cwd: worktree.directory,
140789
+ extendEnv: true,
140790
+ env: cliAgent.env,
140791
+ stdout: "inherit",
140792
+ stderr: "inherit",
140793
+ stdin: "inherit"
140794
+ }).pipe(exitCode, timeoutOrElse({
140795
+ duration: options.stallTimeout,
140796
+ onTimeout: () => fail$4(new RunnerStalled())
140617
140797
  }));
140618
- return yield* error$1;
140619
- })));
140620
- yield* log$1(`Agent exited with code: ${exitCode$1}`);
140621
- const prs = yield* prd.mergableGithubPrs;
140622
- if (prs.length === 0) yield* prd.maybeRevertIssue({
140623
- ...task,
140624
- issueId: task.id
140625
- });
140626
- else if (options.autoMerge) for (const pr of prs) {
140627
- if (isSome(options.targetBranch)) yield* exec`gh pr edit ${pr.prNumber} --base ${options.targetBranch.value}`;
140628
- if ((yield* exec`gh pr merge ${pr.prNumber} -sd`) !== 0) yield* prd.flagUnmergable({ issueId: pr.issueId });
140629
- }
140798
+ const taskJson = yield* fs.readFileString(pathService.join(worktree.directory, ".lalph", "task.json"));
140799
+ const task = yield* decodeEffect(ChosenTask)(taskJson);
140800
+ yield* completeWith(options.startedDeferred, void_$1);
140801
+ const exitCode$1 = yield* execWithStallTimeout(cliAgent.command({
140802
+ prompt: promptGen.prompt({
140803
+ taskId: task.id,
140804
+ targetBranch: getOrUndefined(options.targetBranch)
140805
+ }),
140806
+ prdFilePath: pathService.join(".lalph", "prd.yml")
140807
+ })).pipe(timeout(options.runTimeout), catchTag("TimeoutError", fnUntraced(function* (error$1) {
140808
+ yield* execWithStallTimeout(cliAgent.command({
140809
+ prompt: promptGen.promptTimeout({ taskId: task.id }),
140810
+ prdFilePath: pathService.join(".lalph", "prd.yml")
140811
+ }));
140812
+ return yield* error$1;
140813
+ })));
140814
+ yield* log$1(`Agent exited with code: ${exitCode$1}`);
140815
+ const prs = yield* prd.mergableGithubPrs;
140816
+ if (prs.length === 0) yield* prd.maybeRevertIssue({
140817
+ ...task,
140818
+ issueId: task.id
140819
+ });
140820
+ else if (options.autoMerge) for (const pr of prs) {
140821
+ if (isSome(options.targetBranch)) yield* exec`gh pr edit ${pr.prNumber} --base ${options.targetBranch.value}`;
140822
+ if ((yield* exec`gh pr merge ${pr.prNumber} -sd`) !== 0) yield* prd.flagUnmergable({ issueId: pr.issueId });
140823
+ }
140824
+ }).pipe(ensuring(gen(function* () {
140825
+ const currentBranchName = yield* currentBranch;
140826
+ if (!currentBranchName) return;
140827
+ yield* exec`git checkout --detach ${currentBranchName}`;
140828
+ yield* exec`git branch -D ${currentBranchName}`;
140829
+ }).pipe(ignore)));
140630
140830
  }, onError(fnUntraced(function* () {
140631
140831
  const prd = yield* Prd;
140632
140832
  yield* ignore(prd.revertStateIds);
@@ -140667,6 +140867,75 @@ const plan = fnUntraced(function* (options) {
140667
140867
  Worktree.layer
140668
140868
  ]));
140669
140869
 
140870
+ //#endregion
140871
+ //#region src/Edit.ts
140872
+ const editPrd = make$25("edit").pipe(withDescription("Open the prd.yml file in your editor"), withHandler(fnUntraced(function* () {
140873
+ const prd = yield* Prd;
140874
+ const editor = yield* string$4("EDITOR").pipe(withDefault$2(() => "nvim"));
140875
+ yield* make$21(editor, [prd.path], {
140876
+ extendEnv: true,
140877
+ stdin: "inherit",
140878
+ stdout: "inherit",
140879
+ stderr: "inherit"
140880
+ }).pipe(exitCode);
140881
+ }, scoped$1, provide$1(Prd.layer.pipe(provide$3(CurrentIssueSource.layer))))));
140882
+
140883
+ //#endregion
140884
+ //#region src/CreateIssue.ts
140885
+ const issueTemplate = `---
140886
+ title: Issue Title
140887
+ priority: 3
140888
+ estimate: null
140889
+ blockedBy: []
140890
+ ---
140891
+
140892
+ Describe the issue here.`;
140893
+ const FrontMatterSchema = toCodecJson(Struct({
140894
+ title: String$1,
140895
+ priority: Finite,
140896
+ estimate: NullOr(Finite),
140897
+ blockedBy: Array$1(String$1)
140898
+ }));
140899
+ const createIssue = make$25("issue").pipe(withDescription("Create a new issue in the selected issue source"), withHandler(fnUntraced(function* () {
140900
+ const source = yield* IssueSource;
140901
+ const fs = yield* FileSystem;
140902
+ const tempFile = yield* fs.makeTempFileScoped({ suffix: ".md" });
140903
+ const editor = yield* string$4("EDITOR").pipe(withDefault$2(() => "nvim"));
140904
+ yield* fs.writeFileString(tempFile, issueTemplate);
140905
+ if ((yield* make$21(editor, [tempFile], {
140906
+ extendEnv: true,
140907
+ stdin: "inherit",
140908
+ stdout: "inherit",
140909
+ stderr: "inherit"
140910
+ }).pipe(exitCode)) !== 0) return;
140911
+ const content = yield* fs.readFileString(tempFile);
140912
+ if (content.trim() === issueTemplate.trim()) return;
140913
+ const lines$1 = content.split("\n");
140914
+ const yamlLines = [];
140915
+ let descriptionStartIndex = 0;
140916
+ for (let i = 0; i < lines$1.length; i++) {
140917
+ const line = lines$1[i];
140918
+ if (line.trim() === "---") if (yamlLines.length === 0) continue;
140919
+ else {
140920
+ descriptionStartIndex = i + 1;
140921
+ break;
140922
+ }
140923
+ yamlLines.push(line);
140924
+ }
140925
+ const yamlContent = yamlLines.join("\n");
140926
+ const frontMatter = yield* decodeEffect(FrontMatterSchema)(import_dist.parse(yamlContent));
140927
+ const description = lines$1.slice(descriptionStartIndex).join("\n").trim();
140928
+ const issueId = yield* source.createIssue(new PrdIssue({
140929
+ id: null,
140930
+ ...frontMatter,
140931
+ description,
140932
+ state: "todo",
140933
+ complete: false,
140934
+ githubPrNumber: null
140935
+ }));
140936
+ console.log(`Created issue with ID: ${issueId}`);
140937
+ }, scoped$1)), provide(CurrentIssueSource.layer));
140938
+
140670
140939
  //#endregion
140671
140940
  //#region src/cli.ts
140672
140941
  const selectAgent = make$25("agent").pipe(withDescription("Select the CLI agent to use"), withHandler(() => selectCliAgent));
@@ -140700,14 +140969,14 @@ const root = make$25("lalph", {
140700
140969
  yield* semaphore.take(1);
140701
140970
  if (quit || isFinite$3 && iteration >= iterations$1) break;
140702
140971
  const currentIteration = iteration;
140703
- const startedDeferred = yield* make$44();
140972
+ const startedDeferred = yield* make$45();
140704
140973
  yield* checkForWork.pipe(andThen(run({
140705
140974
  startedDeferred,
140706
140975
  autoMerge: autoMerge$1,
140707
140976
  targetBranch: targetBranch$1,
140708
140977
  stallTimeout: minutes(stallMinutes$1),
140709
140978
  runTimeout: minutes(maxIterationMinutes$1)
140710
- })), catchFilter((e) => e._tag === "NoMoreWork" || e._tag === "QuitError" ? fail$7(e) : e, (e) => logWarning(fail$4(e))), catchTags({
140979
+ })), catchFilter((e) => e._tag === "NoMoreWork" || e._tag === "QuitError" ? fail$8(e) : e, (e) => logWarning(fail$5(e))), catchTags({
140711
140980
  NoMoreWork(_) {
140712
140981
  if (isFinite$3) {
140713
140982
  iterations$1 = currentIteration;
@@ -140726,6 +140995,8 @@ const root = make$25("lalph", {
140726
140995
  yield* awaitEmpty(fibers);
140727
140996
  }, scoped$1)), provide(CurrentIssueSource.layer), withSubcommands([
140728
140997
  planMode,
140998
+ createIssue,
140999
+ editPrd,
140729
141000
  selectSource,
140730
141001
  selectAgent
140731
141002
  ]));