create-efffrida-app 0.0.10 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/bin.cjs +621 -488
  2. package/package.json +3 -3
package/dist/bin.cjs CHANGED
@@ -8067,18 +8067,18 @@ var require_set = __commonJS({
8067
8067
  }
8068
8068
  static from(schema, iterable, ctx) {
8069
8069
  const { replacer } = ctx;
8070
- const set6 = new this(schema);
8070
+ const set5 = new this(schema);
8071
8071
  if (iterable && Symbol.iterator in Object(iterable))
8072
8072
  for (let value3 of iterable) {
8073
8073
  if (typeof replacer === "function")
8074
8074
  value3 = replacer.call(iterable, value3, value3);
8075
- set6.items.push(Pair.createPair(value3, null, ctx));
8075
+ set5.items.push(Pair.createPair(value3, null, ctx));
8076
8076
  }
8077
- return set6;
8077
+ return set5;
8078
8078
  }
8079
8079
  };
8080
8080
  YAMLSet.tag = "tag:yaml.org,2002:set";
8081
- var set5 = {
8081
+ var set4 = {
8082
8082
  collection: "map",
8083
8083
  identify: (value3) => value3 instanceof Set,
8084
8084
  nodeClass: YAMLSet,
@@ -8097,7 +8097,7 @@ var require_set = __commonJS({
8097
8097
  }
8098
8098
  };
8099
8099
  exports.YAMLSet = YAMLSet;
8100
- exports.set = set5;
8100
+ exports.set = set4;
8101
8101
  }
8102
8102
  });
8103
8103
 
@@ -8202,7 +8202,7 @@ var require_schema3 = __commonJS({
8202
8202
  var merge5 = require_merge();
8203
8203
  var omap = require_omap();
8204
8204
  var pairs = require_pairs();
8205
- var set5 = require_set();
8205
+ var set4 = require_set();
8206
8206
  var timestamp = require_timestamp();
8207
8207
  var schema = [
8208
8208
  map15.map,
@@ -8222,7 +8222,7 @@ var require_schema3 = __commonJS({
8222
8222
  merge5.merge,
8223
8223
  omap.omap,
8224
8224
  pairs.pairs,
8225
- set5.set,
8225
+ set4.set,
8226
8226
  timestamp.intTime,
8227
8227
  timestamp.floatTime,
8228
8228
  timestamp.timestamp
@@ -8248,7 +8248,7 @@ var require_tags = __commonJS({
8248
8248
  var omap = require_omap();
8249
8249
  var pairs = require_pairs();
8250
8250
  var schema$2 = require_schema3();
8251
- var set5 = require_set();
8251
+ var set4 = require_set();
8252
8252
  var timestamp = require_timestamp();
8253
8253
  var schemas = /* @__PURE__ */ new Map([
8254
8254
  ["core", schema.schema],
@@ -8274,7 +8274,7 @@ var require_tags = __commonJS({
8274
8274
  omap: omap.omap,
8275
8275
  pairs: pairs.pairs,
8276
8276
  seq: seq.seq,
8277
- set: set5.set,
8277
+ set: set4.set,
8278
8278
  timestamp: timestamp.timestamp
8279
8279
  };
8280
8280
  var coreKnownTags = {
@@ -8282,7 +8282,7 @@ var require_tags = __commonJS({
8282
8282
  "tag:yaml.org,2002:merge": merge5.merge,
8283
8283
  "tag:yaml.org,2002:omap": omap.omap,
8284
8284
  "tag:yaml.org,2002:pairs": pairs.pairs,
8285
- "tag:yaml.org,2002:set": set5.set,
8285
+ "tag:yaml.org,2002:set": set4.set,
8286
8286
  "tag:yaml.org,2002:timestamp": timestamp.timestamp
8287
8287
  };
8288
8288
  function getTags(customTags, schemaName, addMergeTag) {
@@ -12376,7 +12376,7 @@ var require_dist = __commonJS({
12376
12376
  }
12377
12377
  });
12378
12378
 
12379
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Effect.js
12379
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Effect.js
12380
12380
  var Effect_exports = {};
12381
12381
  __export(Effect_exports, {
12382
12382
  Do: () => Do2,
@@ -12585,12 +12585,12 @@ __export(Effect_exports, {
12585
12585
  unwrapReason: () => unwrapReason2,
12586
12586
  updateContext: () => updateContext2,
12587
12587
  updateService: () => updateService2,
12588
+ updateServiceScoped: () => updateServiceScoped2,
12588
12589
  useSpan: () => useSpan2,
12589
12590
  validate: () => validate2,
12590
12591
  void: () => void_3,
12591
12592
  when: () => when2,
12592
12593
  whileLoop: () => whileLoop2,
12593
- withConcurrency: () => withConcurrency2,
12594
12594
  withErrorReporting: () => withErrorReporting2,
12595
12595
  withExecutionPlan: () => withExecutionPlan2,
12596
12596
  withFiber: () => withFiber2,
@@ -12608,7 +12608,7 @@ __export(Effect_exports, {
12608
12608
  zipWith: () => zipWith2
12609
12609
  });
12610
12610
 
12611
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Pipeable.js
12611
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Pipeable.js
12612
12612
  var pipeArguments = (self, args2) => {
12613
12613
  switch (args2.length) {
12614
12614
  case 0:
@@ -12652,7 +12652,7 @@ var Class = /* @__PURE__ */ (function() {
12652
12652
  return PipeableBase;
12653
12653
  })();
12654
12654
 
12655
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Function.js
12655
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Function.js
12656
12656
  var dual = function(arity, body) {
12657
12657
  if (typeof arity === "function") {
12658
12658
  return function() {
@@ -12714,7 +12714,7 @@ function memoize(f2) {
12714
12714
  };
12715
12715
  }
12716
12716
 
12717
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/internal/equal.js
12717
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/internal/equal.js
12718
12718
  var getAllObjectKeys = (obj) => {
12719
12719
  const keys2 = new Set(Reflect.ownKeys(obj));
12720
12720
  if (obj.constructor === Object) return keys2;
@@ -12737,7 +12737,7 @@ var getAllObjectKeys = (obj) => {
12737
12737
  };
12738
12738
  var byReferenceInstances = /* @__PURE__ */ new WeakSet();
12739
12739
 
12740
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Predicate.js
12740
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Predicate.js
12741
12741
  function isString(input) {
12742
12742
  return typeof input === "string";
12743
12743
  }
@@ -12783,7 +12783,7 @@ function isIterable(input) {
12783
12783
  return hasProperty(input, Symbol.iterator) || isString(input);
12784
12784
  }
12785
12785
 
12786
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Hash.js
12786
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Hash.js
12787
12787
  var symbol = "~effect/interfaces/Hash";
12788
12788
  var hash = (self) => {
12789
12789
  switch (typeof self) {
@@ -12902,7 +12902,7 @@ function withVisitedTracking(obj, fn3) {
12902
12902
  return result3;
12903
12903
  }
12904
12904
 
12905
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Equal.js
12905
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Equal.js
12906
12906
  var symbol2 = "~effect/interfaces/Equal";
12907
12907
  function equals() {
12908
12908
  if (arguments.length === 1) {
@@ -13078,9 +13078,8 @@ function makeCompareSet(equivalence) {
13078
13078
  }
13079
13079
  var compareSets = /* @__PURE__ */ makeCompareSet(compareBoth);
13080
13080
  var isEqual = (u2) => hasProperty(u2, symbol2);
13081
- var asEquivalence = () => equals;
13082
13081
 
13083
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Redactable.js
13082
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Redactable.js
13084
13083
  var symbolRedactable = /* @__PURE__ */ Symbol.for("~effect/Redactable");
13085
13084
  var isRedactable = (u2) => hasProperty(u2, symbolRedactable);
13086
13085
  function redact(u2) {
@@ -13099,7 +13098,7 @@ var emptyContext = {
13099
13098
  }
13100
13099
  };
13101
13100
 
13102
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Formatter.js
13101
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Formatter.js
13103
13102
  function format(input, options) {
13104
13103
  const space = options?.space ?? 0;
13105
13104
  const seen = /* @__PURE__ */ new WeakSet();
@@ -13198,7 +13197,7 @@ function formatJson(input, options) {
13198
13197
  }, options?.space);
13199
13198
  }
13200
13199
 
13201
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Inspectable.js
13200
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Inspectable.js
13202
13201
  var NodeInspectSymbol = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
13203
13202
  var toJson = (input) => {
13204
13203
  try {
@@ -13262,7 +13261,7 @@ var Class2 = class {
13262
13261
  }
13263
13262
  };
13264
13263
 
13265
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Utils.js
13264
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Utils.js
13266
13265
  var SingleShotGen = class _SingleShotGen {
13267
13266
  called = false;
13268
13267
  self;
@@ -13322,7 +13321,28 @@ var pickInternalCall = () => {
13322
13321
  };
13323
13322
  var internalCall = /* @__PURE__ */ pickInternalCall();
13324
13323
 
13325
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/internal/core.js
13324
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/internal/record.js
13325
+ function assignProperty(self, key, value3) {
13326
+ if (key === "__proto__") {
13327
+ Object.defineProperty(self, key, {
13328
+ value: value3,
13329
+ writable: true,
13330
+ enumerable: true,
13331
+ configurable: true
13332
+ });
13333
+ } else {
13334
+ self[key] = value3;
13335
+ }
13336
+ }
13337
+ function assignProperties(self, source) {
13338
+ for (const key of Reflect.ownKeys(source)) {
13339
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) {
13340
+ assignProperty(self, key, source[key]);
13341
+ }
13342
+ }
13343
+ }
13344
+
13345
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/internal/core.js
13326
13346
  var EffectTypeId = `~effect/Effect`;
13327
13347
  var ExitTypeId = `~effect/Exit`;
13328
13348
  var effectVariance = {
@@ -13612,7 +13632,7 @@ var Error2 = /* @__PURE__ */ (function() {
13612
13632
  cause: args2.cause
13613
13633
  } : void 0);
13614
13634
  if (args2) {
13615
- Object.assign(this, args2);
13635
+ assignProperties(this, args2);
13616
13636
  Object.defineProperty(this, plainArgsSymbol, {
13617
13637
  value: args2,
13618
13638
  enumerable: false
@@ -13665,22 +13685,19 @@ var done = (value3) => {
13665
13685
  return exitFail(Done(value3));
13666
13686
  };
13667
13687
 
13668
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Effectable.js
13688
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Effectable.js
13669
13689
  var Prototype2 = (options) => makePrimitiveProto({
13670
13690
  op: options.label,
13671
13691
  [evaluate]: options.evaluate
13672
13692
  });
13673
13693
 
13674
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/internal/stackTraceLimit.js
13675
- var ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
13676
- var ObjectPrototypeHasOwnProperty = Object.prototype.hasOwnProperty;
13677
- var ObjectIsExtensible = Object.isExtensible;
13694
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/internal/stackTraceLimit.js
13678
13695
  var isStackTraceLimitWritable = () => {
13679
- const desc = ObjectGetOwnPropertyDescriptor(Error, "stackTraceLimit");
13696
+ const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
13680
13697
  if (desc === void 0) {
13681
- return ObjectIsExtensible(Error);
13698
+ return Object.isExtensible(Error);
13682
13699
  }
13683
- return ObjectPrototypeHasOwnProperty.call(desc, "writable") ? desc.writable === true : desc.set !== void 0;
13700
+ return Object.hasOwn(desc, "writable") ? desc.writable === true : desc.set !== void 0;
13684
13701
  };
13685
13702
  var canWriteStackTraceLimit = /* @__PURE__ */ isStackTraceLimitWritable();
13686
13703
  var getStackTraceLimit = () => Error.stackTraceLimit;
@@ -13690,7 +13707,7 @@ var setStackTraceLimit = (value3) => {
13690
13707
  }
13691
13708
  };
13692
13709
 
13693
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Equivalence.js
13710
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Equivalence.js
13694
13711
  var make = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
13695
13712
  var isStrictEquivalent = (x, y) => x === y;
13696
13713
  var strictEqual = () => isStrictEquivalent;
@@ -13717,7 +13734,7 @@ function Array_(item) {
13717
13734
  });
13718
13735
  }
13719
13736
 
13720
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/internal/doNotation.js
13737
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/internal/doNotation.js
13721
13738
  var let_ = (map15) => dual(3, (self, name, f2) => map15(self, (a) => ({
13722
13739
  ...a,
13723
13740
  [name]: f2(a)
@@ -13730,7 +13747,7 @@ var bind = (map15, flatMap6) => dual(3, (self, name, f2) => flatMap6(self, (a) =
13730
13747
  [name]: b2
13731
13748
  }))));
13732
13749
 
13733
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/internal/option.js
13750
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/internal/option.js
13734
13751
  var TypeId = "~effect/data/Option";
13735
13752
  var CommonProto = {
13736
13753
  [TypeId]: {
@@ -13796,7 +13813,7 @@ var some = (value3) => {
13796
13813
  return a;
13797
13814
  };
13798
13815
 
13799
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/internal/result.js
13816
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/internal/result.js
13800
13817
  var TypeId2 = "~effect/data/Result";
13801
13818
  var CommonProto2 = {
13802
13819
  [TypeId2]: {
@@ -13863,7 +13880,7 @@ var succeed = (success) => {
13863
13880
  return a;
13864
13881
  };
13865
13882
 
13866
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Order.js
13883
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Order.js
13867
13884
  function make2(compare) {
13868
13885
  return (self, that) => self === that ? 0 : compare(self, that);
13869
13886
  }
@@ -13877,7 +13894,7 @@ var mapInput = /* @__PURE__ */ dual(2, (self, f2) => make2((b1, b2) => self(f2(b
13877
13894
  var Date2 = /* @__PURE__ */ mapInput(Number2, (date6) => date6.getTime());
13878
13895
  var isGreaterThan = (O2) => dual(2, (self, that) => O2(self, that) === 1);
13879
13896
 
13880
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Option.js
13897
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Option.js
13881
13898
  var none2 = () => none;
13882
13899
  var some2 = some;
13883
13900
  var isOption2 = isOption;
@@ -13896,7 +13913,7 @@ var flatMap = /* @__PURE__ */ dual(2, (self, f2) => isNone2(self) ? none2() : f2
13896
13913
  var filter = /* @__PURE__ */ dual(2, (self, predicate) => isNone2(self) ? none2() : predicate(self.value) ? some2(self.value) : none2());
13897
13914
  var liftPredicate = /* @__PURE__ */ dual(2, (b2, predicate) => predicate(b2) ? some2(b2) : none2());
13898
13915
 
13899
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Context.js
13916
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Context.js
13900
13917
  var ServiceTypeId = "~effect/Context/Service";
13901
13918
  var Service = function() {
13902
13919
  const prevLimit = getStackTraceLimit();
@@ -14072,7 +14089,7 @@ var withMapUnsafe = (self, f2) => {
14072
14089
  };
14073
14090
  var Reference = Service;
14074
14091
 
14075
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Duration.js
14092
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Duration.js
14076
14093
  var TypeId4 = "~effect/time/Duration";
14077
14094
  var bigint0 = /* @__PURE__ */ BigInt(0);
14078
14095
  var bigint1 = /* @__PURE__ */ BigInt(1);
@@ -14320,10 +14337,10 @@ var subtract = /* @__PURE__ */ dual(2, (self, that) => matchPair(self, that, {
14320
14337
  }));
14321
14338
  var equals2 = /* @__PURE__ */ dual(2, (self, that) => Equivalence(self, that));
14322
14339
 
14323
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/internal/array.js
14340
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/internal/array.js
14324
14341
  var isArrayNonEmpty = (self) => self.length > 0;
14325
14342
 
14326
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Result.js
14343
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Result.js
14327
14344
  var succeed2 = succeed;
14328
14345
  var fail2 = fail;
14329
14346
  var try_ = (evaluate2) => {
@@ -14348,10 +14365,10 @@ var match3 = /* @__PURE__ */ dual(2, (self, {
14348
14365
  onSuccess
14349
14366
  }) => isFailure2(self) ? onFailure(self.failure) : onSuccess(self.success));
14350
14367
 
14351
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Tuple.js
14368
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Tuple.js
14352
14369
  var makeEquivalence = Tuple;
14353
14370
 
14354
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Iterable.js
14371
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Iterable.js
14355
14372
  var findFirst = /* @__PURE__ */ dual(2, (self, f2) => {
14356
14373
  let i = 0;
14357
14374
  for (const a of self) {
@@ -14394,14 +14411,14 @@ var filter2 = /* @__PURE__ */ dual(2, (self, predicate) => ({
14394
14411
  }
14395
14412
  }));
14396
14413
 
14397
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Record.js
14414
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Record.js
14398
14415
  var has = /* @__PURE__ */ dual(2, (self, key) => Object.hasOwn(self, key));
14399
14416
  var map2 = /* @__PURE__ */ dual(2, (self, f2) => {
14400
14417
  const out = {
14401
14418
  ...self
14402
14419
  };
14403
14420
  for (const key of keys(self)) {
14404
- out[key] = f2(self[key], key);
14421
+ assignProperty(out, key, f2(self[key], key));
14405
14422
  }
14406
14423
  return out;
14407
14424
  });
@@ -14419,7 +14436,7 @@ var makeEquivalence2 = (equivalence) => {
14419
14436
  return (self, that) => is4(self, that) && is4(that, self);
14420
14437
  };
14421
14438
 
14422
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Array.js
14439
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Array.js
14423
14440
  var Array2 = globalThis.Array;
14424
14441
  var fromIterable = (collection) => Array2.isArray(collection) ? collection : Array2.from(collection);
14425
14442
  var ensure = (self) => Array2.isArray(self) ? self : [self];
@@ -14431,18 +14448,6 @@ var append = /* @__PURE__ */ dual(2, (self, last) => [...self, last]);
14431
14448
  var appendAll = /* @__PURE__ */ dual(2, (self, that) => fromIterable(self).concat(fromIterable(that)));
14432
14449
  var isArrayNonEmpty2 = isArrayNonEmpty;
14433
14450
  var isReadonlyArrayNonEmpty = isArrayNonEmpty;
14434
- function isOutOfBounds(i, as4) {
14435
- return i < 0 || i >= as4.length;
14436
- }
14437
- var getUnsafe2 = /* @__PURE__ */ dual(2, (self, index) => {
14438
- const i = Math.floor(index);
14439
- if (isOutOfBounds(i, self)) {
14440
- throw new Error(`Index out of bounds: ${i}`);
14441
- }
14442
- return self[i];
14443
- });
14444
- var headNonEmpty = /* @__PURE__ */ getUnsafe2(0);
14445
- var tailNonEmpty = (self) => self.slice(1);
14446
14451
  var findFirstIndex = /* @__PURE__ */ dual(2, (self, predicate) => {
14447
14452
  let i = 0;
14448
14453
  for (const a of self) {
@@ -14471,19 +14476,29 @@ var findLast = /* @__PURE__ */ dual(2, (self, f2) => {
14471
14476
  }
14472
14477
  return none2();
14473
14478
  });
14474
- var unionWith = /* @__PURE__ */ dual(3, (self, that, isEquivalent) => {
14479
+ var hashBucketsAdd = (buckets, value3) => {
14480
+ const hash2 = hash(value3);
14481
+ const bucket = buckets.get(hash2);
14482
+ if (bucket === void 0) {
14483
+ buckets.set(hash2, [value3]);
14484
+ return true;
14485
+ }
14486
+ for (const previous of bucket) {
14487
+ if (equals(previous, value3)) {
14488
+ return false;
14489
+ }
14490
+ }
14491
+ bucket.push(value3);
14492
+ return true;
14493
+ };
14494
+ var union = /* @__PURE__ */ dual(2, (self, that) => {
14475
14495
  const a = fromIterable(self);
14476
14496
  const b2 = fromIterable(that);
14477
14497
  if (isReadonlyArrayNonEmpty(a)) {
14478
- if (isReadonlyArrayNonEmpty(b2)) {
14479
- const dedupe = dedupeWith(isEquivalent);
14480
- return dedupe(appendAll(a, b2));
14481
- }
14482
- return a;
14498
+ return isReadonlyArrayNonEmpty(b2) ? dedupe(appendAll(a, b2)) : a;
14483
14499
  }
14484
14500
  return b2;
14485
14501
  });
14486
- var union = /* @__PURE__ */ dual(2, (self, that) => unionWith(self, that, asEquivalence()));
14487
14502
  var empty2 = () => [];
14488
14503
  var of = (a) => [a];
14489
14504
  var map3 = /* @__PURE__ */ dual(2, (self, f2) => self.map(f2));
@@ -14503,22 +14518,22 @@ var partition = /* @__PURE__ */ dual(2, (self, f2) => {
14503
14518
  });
14504
14519
  var reduce = /* @__PURE__ */ dual(3, (self, b2, f2) => fromIterable(self).reduce((b3, a, i) => f2(b3, a, i), b2));
14505
14520
  var makeEquivalence3 = Array_;
14506
- var dedupeWith = /* @__PURE__ */ dual(2, (self, isEquivalent) => {
14521
+ var dedupe = (self) => {
14507
14522
  const input = fromIterable(self);
14508
- if (isReadonlyArrayNonEmpty(input)) {
14509
- const out = [headNonEmpty(input)];
14510
- const rest = tailNonEmpty(input);
14511
- for (const r of rest) {
14512
- if (out.every((a) => !isEquivalent(r, a))) {
14513
- out.push(r);
14514
- }
14523
+ if (input.length < 2) {
14524
+ return [...input];
14525
+ }
14526
+ const buckets = /* @__PURE__ */ new Map();
14527
+ const out = [];
14528
+ for (const value3 of input) {
14529
+ if (hashBucketsAdd(buckets, value3)) {
14530
+ out.push(value3);
14515
14531
  }
14516
- return out;
14517
14532
  }
14518
- return [];
14519
- });
14533
+ return out;
14534
+ };
14520
14535
 
14521
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Filter.js
14536
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Filter.js
14522
14537
  var composePassthrough = /* @__PURE__ */ dual(2, (left, right) => (input) => {
14523
14538
  const leftOut = left(input);
14524
14539
  if (isFailure2(leftOut)) return fail2(input);
@@ -14527,7 +14542,7 @@ var composePassthrough = /* @__PURE__ */ dual(2, (left, right) => (input) => {
14527
14542
  return rightOut;
14528
14543
  });
14529
14544
 
14530
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Scheduler.js
14545
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Scheduler.js
14531
14546
  var Scheduler = /* @__PURE__ */ Reference("effect/Scheduler", {
14532
14547
  defaultValue: () => new MixedScheduler()
14533
14548
  });
@@ -14652,7 +14667,7 @@ var PreventSchedulerYield = /* @__PURE__ */ Reference("effect/Scheduler/PreventS
14652
14667
  defaultValue: () => false
14653
14668
  });
14654
14669
 
14655
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Tracer.js
14670
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Tracer.js
14656
14671
  var ParentSpanKey = "effect/Tracer/ParentSpan";
14657
14672
  var ParentSpan = class extends (/* @__PURE__ */ Service()(ParentSpanKey)) {
14658
14673
  };
@@ -14732,13 +14747,10 @@ var randomHexString = /* @__PURE__ */ (function() {
14732
14747
  };
14733
14748
  })();
14734
14749
 
14735
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/internal/metric.js
14750
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/internal/metric.js
14736
14751
  var FiberRuntimeMetricsKey = "effect/observability/Metric/FiberRuntimeMetricsKey";
14737
14752
 
14738
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/internal/references.js
14739
- var CurrentConcurrency = /* @__PURE__ */ Reference("effect/References/CurrentConcurrency", {
14740
- defaultValue: () => "unbounded"
14741
- });
14753
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/internal/references.js
14742
14754
  var CurrentErrorReporters = /* @__PURE__ */ Reference("effect/ErrorReporter/CurrentErrorReporters", {
14743
14755
  defaultValue: () => /* @__PURE__ */ new Set()
14744
14756
  });
@@ -14770,7 +14782,7 @@ var CurrentLogSpans = /* @__PURE__ */ Reference("effect/References/CurrentLogSpa
14770
14782
  defaultValue: () => []
14771
14783
  });
14772
14784
 
14773
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/internal/tracer.js
14785
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/internal/tracer.js
14774
14786
  var addSpanStackTrace = (options) => {
14775
14787
  if (options?.captureStackTrace === false) {
14776
14788
  return options;
@@ -14801,10 +14813,10 @@ var makeStackCleaner = (line) => (stack) => {
14801
14813
  };
14802
14814
  var spanCleaner = /* @__PURE__ */ makeStackCleaner(3);
14803
14815
 
14804
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/internal/version.js
14816
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/internal/version.js
14805
14817
  var version = "dev";
14806
14818
 
14807
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/internal/effect.js
14819
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/internal/effect.js
14808
14820
  var Interrupt = class extends ReasonBase {
14809
14821
  fiberId;
14810
14822
  constructor(fiberId3, annotations = constEmptyAnnotations) {
@@ -15732,6 +15744,23 @@ var updateService = /* @__PURE__ */ dual(3, (self, service3, f2) => updateContex
15732
15744
  if (prev === next) return s3;
15733
15745
  return add(s3, service3, next);
15734
15746
  }));
15747
+ var updateServiceScoped = (service3, update2, options) => uninterruptible(withFiber((fiber3) => {
15748
+ const original = getUnsafe(fiber3.context, service3);
15749
+ const updated = update2(original);
15750
+ fiber3.setContext(add(fiber3.context, service3, updated));
15751
+ return scopeAddFinalizerExit(getUnsafe(fiber3.context, scopeTag), (_2) => {
15752
+ const current = getUnsafe(fiber3.context, service3);
15753
+ let next;
15754
+ if (options?.reset === void 0) {
15755
+ if (current !== updated) return void_;
15756
+ next = original;
15757
+ } else {
15758
+ next = options.reset(original, updated, current);
15759
+ }
15760
+ fiber3.setContext(add(fiber3.context, service3, next));
15761
+ return void_;
15762
+ });
15763
+ }));
15735
15764
  var context = () => getContext;
15736
15765
  var getContext = /* @__PURE__ */ withFiber((fiber3) => succeed3(fiber3.context));
15737
15766
  var contextWith = (f2) => withFiber((fiber3) => f2(fiber3.context));
@@ -15752,7 +15781,6 @@ var provideServiceImpl = (self, service3, implementation) => updateContext(self,
15752
15781
  return add(s3, service3, implementation);
15753
15782
  });
15754
15783
  var provideServiceEffect = /* @__PURE__ */ dual(3, (self, service3, acquire) => flatMap2(acquire, (implementation) => provideService(self, service3, implementation)));
15755
- var withConcurrency = /* @__PURE__ */ provideService(CurrentConcurrency);
15756
15784
  var zip = /* @__PURE__ */ dual((args2) => isEffect(args2[1]), (self, that, options) => zipWith(self, that, (a, a2) => [a, a2], options));
15757
15785
  var zipWith = /* @__PURE__ */ dual((args2) => isEffect(args2[1]), (self, that, f2, options) => options?.concurrent ? map4(all([self, that], {
15758
15786
  concurrency: 2
@@ -16234,7 +16262,7 @@ var all = (arg, options) => {
16234
16262
  return suspend(() => {
16235
16263
  const out = {};
16236
16264
  return as(forEach(Object.entries(arg), ([key, effect2]) => map4(options?.mode === "result" ? result(effect2) : effect2, (value3) => {
16237
- out[key] = value3;
16265
+ assignProperty(out, key, value3);
16238
16266
  }), {
16239
16267
  discard: true,
16240
16268
  concurrency: options?.concurrency
@@ -16320,8 +16348,8 @@ var whileLoop = /* @__PURE__ */ makePrimitive({
16320
16348
  return exitVoid;
16321
16349
  }
16322
16350
  });
16323
- var forEach = /* @__PURE__ */ dual((args2) => typeof args2[1] === "function", (iterable, f2, options) => withFiber((parent) => {
16324
- const concurrencyOption = options?.concurrency === "inherit" ? parent.getRef(CurrentConcurrency) : options?.concurrency ?? 1;
16351
+ var forEach = /* @__PURE__ */ dual((args2) => typeof args2[1] === "function", (iterable, f2, options) => suspend(() => {
16352
+ const concurrencyOption = options?.concurrency ?? 1;
16325
16353
  const concurrency = concurrencyOption === "unbounded" ? Number.POSITIVE_INFINITY : Math.max(1, concurrencyOption);
16326
16354
  if (concurrency === 1) {
16327
16355
  return forEachSequential(iterable, f2, options);
@@ -16691,27 +16719,42 @@ var succeedTrue = /* @__PURE__ */ succeed3(true);
16691
16719
  var succeedFalse = /* @__PURE__ */ succeed3(false);
16692
16720
  var Latch = class {
16693
16721
  waiters = [];
16694
- scheduled = false;
16722
+ scheduled = void 0;
16695
16723
  _isOpen;
16696
16724
  constructor(isOpen) {
16697
16725
  this._isOpen = isOpen;
16698
16726
  }
16699
16727
  scheduleUnsafe(fiber3) {
16700
- if (this.scheduled || this.waiters.length === 0) {
16728
+ if (this.waiters.length === 0) {
16701
16729
  return succeedTrue;
16702
16730
  }
16703
- this.scheduled = true;
16704
- fiber3.currentDispatcher.scheduleTask(this.flushWaiters, 0);
16731
+ if (this.scheduled === void 0) {
16732
+ this.scheduled = this.waiters;
16733
+ fiber3.currentDispatcher.scheduleTask(this.flushScheduled, 0);
16734
+ } else {
16735
+ for (let i = 0; i < this.waiters.length; i++) {
16736
+ this.scheduled.push(this.waiters[i]);
16737
+ }
16738
+ }
16739
+ this.waiters = [];
16705
16740
  return succeedTrue;
16706
16741
  }
16707
- flushWaiters = () => {
16708
- this.scheduled = false;
16742
+ flushScheduled = () => {
16743
+ if (this.scheduled === void 0) return;
16744
+ const waiters = this.scheduled;
16745
+ this.scheduled = void 0;
16746
+ for (let i = 0; i < waiters.length; i++) {
16747
+ waiters[i](exitVoid);
16748
+ }
16749
+ };
16750
+ flushWaiters() {
16709
16751
  const waiters = this.waiters;
16710
16752
  this.waiters = [];
16753
+ this.flushScheduled();
16711
16754
  for (let i = 0; i < waiters.length; i++) {
16712
16755
  waiters[i](exitVoid);
16713
16756
  }
16714
- };
16757
+ }
16715
16758
  open = /* @__PURE__ */ withFiber((fiber3) => {
16716
16759
  if (this._isOpen) return succeedFalse;
16717
16760
  this._isOpen = true;
@@ -16730,9 +16773,14 @@ var Latch = class {
16730
16773
  }
16731
16774
  this.waiters.push(resume);
16732
16775
  return sync(() => {
16733
- const index = this.waiters.indexOf(resume);
16776
+ let index = this.waiters.indexOf(resume);
16734
16777
  if (index !== -1) {
16735
16778
  this.waiters.splice(index, 1);
16779
+ } else if (this.scheduled !== void 0) {
16780
+ index = this.scheduled.indexOf(resume);
16781
+ if (index !== -1) {
16782
+ this.scheduled.splice(index, 1);
16783
+ }
16736
16784
  }
16737
16785
  });
16738
16786
  });
@@ -16900,13 +16948,16 @@ var withSpan = function() {
16900
16948
  return (self, ...args2) => useSpan(name, fnArg ? fnArg(...args2) : options, (span) => withParentSpan(self, span, traceOptions));
16901
16949
  };
16902
16950
  var annotateSpans = /* @__PURE__ */ dual((args2) => isEffect(args2[0]), (effect2, ...args2) => updateService(effect2, TracerSpanAnnotations, (annotations) => {
16903
- const newAnnotations = {
16951
+ const newAnnotations = args2.length === 1 ? {
16952
+ ...annotations,
16953
+ ...args2[0]
16954
+ } : {
16904
16955
  ...annotations
16905
16956
  };
16906
16957
  if (args2.length === 1) {
16907
- Object.assign(newAnnotations, args2[0]);
16958
+ return newAnnotations;
16908
16959
  } else {
16909
- newAnnotations[args2[0]] = args2[1];
16960
+ assignProperty(newAnnotations, args2[0], args2[1]);
16910
16961
  }
16911
16962
  return newAnnotations;
16912
16963
  }));
@@ -17045,7 +17096,7 @@ var annotateLogsScoped = function() {
17045
17096
  };
17046
17097
  for (let i = 0; i < entries.length; i++) {
17047
17098
  const [key, value3] = entries[i];
17048
- next[key] = value3;
17099
+ assignProperty(next, key, value3);
17049
17100
  }
17050
17101
  fiber3.setContext(add(fiber3.context, CurrentLogAnnotations, next));
17051
17102
  return scopeAddFinalizerExit(getUnsafe(fiber3.context, scopeTag), (_2) => {
@@ -17056,8 +17107,8 @@ var annotateLogsScoped = function() {
17056
17107
  for (let i = 0; i < entries.length; i++) {
17057
17108
  const [key, value3] = entries[i];
17058
17109
  if (current[key] !== value3) continue;
17059
- if (key in prev) {
17060
- next2[key] = prev[key];
17110
+ if (Object.hasOwn(prev, key)) {
17111
+ assignProperty(next2, key, prev[key]);
17061
17112
  } else {
17062
17113
  delete next2[key];
17063
17114
  }
@@ -17164,7 +17215,7 @@ var tracerLogger = /* @__PURE__ */ loggerMake(({
17164
17215
  if (span === void 0 || span._tag === "ExternalSpan") return;
17165
17216
  const attributes = {};
17166
17217
  for (const [key, value3] of Object.entries(annotations)) {
17167
- attributes[key] = value3;
17218
+ assignProperty(attributes, key, value3);
17168
17219
  }
17169
17220
  attributes["effect.fiberId"] = fiber3.id;
17170
17221
  attributes["effect.logLevel"] = logLevel.toUpperCase();
@@ -17193,14 +17244,14 @@ var reportCauseUnsafe = (fiber3, cause, defectsOnly) => {
17193
17244
  reporters.forEach((reporter) => reporter.report(opts));
17194
17245
  };
17195
17246
 
17196
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Exit.js
17247
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Exit.js
17197
17248
  var succeed4 = exitSucceed;
17198
17249
  var failCause2 = exitFailCause;
17199
17250
  var fail4 = exitFail;
17200
17251
  var void_2 = exitVoid;
17201
17252
  var isSuccess4 = exitIsSuccess;
17202
17253
 
17203
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Deferred.js
17254
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Deferred.js
17204
17255
  var TypeId5 = "~effect/Deferred";
17205
17256
  var DeferredProto = {
17206
17257
  [TypeId5]: {
@@ -17242,12 +17293,12 @@ var doneUnsafe = (self, effect2) => {
17242
17293
  return true;
17243
17294
  };
17244
17295
 
17245
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/References.js
17296
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/References.js
17246
17297
  var CurrentLogAnnotations2 = CurrentLogAnnotations;
17247
17298
  var CurrentLogSpans2 = CurrentLogSpans;
17248
17299
  var MinimumLogLevel2 = MinimumLogLevel;
17249
17300
 
17250
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Scope.js
17301
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Scope.js
17251
17302
  var Scope = scopeTag;
17252
17303
  var makeUnsafe3 = scopeMakeUnsafe;
17253
17304
  var provide = provideScope;
@@ -17256,7 +17307,7 @@ var addFinalizer2 = scopeAddFinalizer;
17256
17307
  var forkUnsafe2 = scopeForkUnsafe;
17257
17308
  var close = scopeClose;
17258
17309
 
17259
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Layer.js
17310
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Layer.js
17260
17311
  var TypeId6 = "~effect/Layer";
17261
17312
  var MemoMapTypeId = "~effect/Layer/MemoMap";
17262
17313
  var memoMapReuse = (entry, scope3) => {
@@ -17372,7 +17423,7 @@ var CurrentMetadata = /* @__PURE__ */ Reference("effect/ExecutionPlan/CurrentMet
17372
17423
  })
17373
17424
  });
17374
17425
 
17375
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Cause.js
17426
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Cause.js
17376
17427
  var isFailReason2 = isFailReason;
17377
17428
  var fail5 = causeFail;
17378
17429
  var hasInterruptsOnly2 = hasInterruptsOnly;
@@ -17385,7 +17436,7 @@ var Done2 = Done;
17385
17436
  var done3 = done;
17386
17437
  var UnknownError2 = UnknownError;
17387
17438
 
17388
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Data.js
17439
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Data.js
17389
17440
  var taggedEnum = () => new Proxy({}, {
17390
17441
  get(_target, tag2, _receiver) {
17391
17442
  if (tag2 === "$is") {
@@ -17418,7 +17469,7 @@ var round = /* @__PURE__ */ dual(2, (self, precision) => {
17418
17469
  return Math.round(self * factor) / factor;
17419
17470
  });
17420
17471
 
17421
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Pull.js
17472
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Pull.js
17422
17473
  var catchDone = /* @__PURE__ */ dual(2, (effect2, f2) => catchCauseFilter(effect2, filterDoneLeftover, (l) => f2(l)));
17423
17474
  var isDoneCause = (cause) => cause.reasons.some(isDoneFailure);
17424
17475
  var isDoneFailure = (failure) => failure._tag === "Fail" && isDone3(failure.error);
@@ -17436,7 +17487,7 @@ var matchEffect2 = /* @__PURE__ */ dual(2, (self, options) => matchCauseEffect(s
17436
17487
  }
17437
17488
  }));
17438
17489
 
17439
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Schedule.js
17490
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Schedule.js
17440
17491
  var TypeId8 = "~effect/Schedule";
17441
17492
  var CurrentMetadata2 = /* @__PURE__ */ Reference("effect/Schedule/CurrentMetadata", {
17442
17493
  defaultValue: /* @__PURE__ */ constant({
@@ -17528,11 +17579,11 @@ var while_ = /* @__PURE__ */ dual(2, (self, predicate) => fromStep(map4(toStep(s
17528
17579
  })));
17529
17580
  var forever2 = /* @__PURE__ */ spaced(zero);
17530
17581
 
17531
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/internal/layer.js
17582
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/internal/layer.js
17532
17583
  var provideLayer = (self, layer16, options) => scopedWith((scope3) => flatMap2(options?.local ? buildWithMemoMap(layer16, makeMemoMapUnsafe(), scope3) : buildWithScope(layer16, scope3), (context3) => provideContext(self, context3)));
17533
17584
  var provide3 = /* @__PURE__ */ dual((args2) => isEffect(args2[0]), (self, source, options) => isContext(source) ? provideContext(self, source) : provideLayer(self, Array.isArray(source) ? mergeAll2(...source) : source, options));
17534
17585
 
17535
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/internal/schedule.js
17586
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/internal/schedule.js
17536
17587
  var repeatOrElse = /* @__PURE__ */ dual(3, (self, schedule3, orElse5) => flatMap2(toStepWithMetadata(schedule3), (step) => {
17537
17588
  let meta = CurrentMetadata2.defaultValue();
17538
17589
  return catch_(forever(tap(flatMap2(suspend(() => provideService(self, CurrentMetadata2, meta)), step), (meta_) => sync(() => {
@@ -17603,7 +17654,7 @@ var buildFromOptions = (options) => {
17603
17654
  return schedule3;
17604
17655
  };
17605
17656
 
17606
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/internal/executionPlan.js
17657
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/internal/executionPlan.js
17607
17658
  var withExecutionPlan = /* @__PURE__ */ dual(2, (self, plan) => suspend(() => {
17608
17659
  let i = 0;
17609
17660
  let meta = {
@@ -17663,7 +17714,7 @@ var scheduleFromStep = (step, first) => {
17663
17714
  var scheduleOnce = /* @__PURE__ */ recurs(1);
17664
17715
  var makeEntry = (options) => options;
17665
17716
 
17666
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/internal/request.js
17717
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/internal/request.js
17667
17718
  var request = /* @__PURE__ */ dual(2, (self, resolver) => {
17668
17719
  const withResolver = (resolver2) => callback((resume) => {
17669
17720
  const entry = addEntry(resolver2, self, resume, getCurrentFiber());
@@ -17774,7 +17825,7 @@ function runBatch(batch) {
17774
17825
  }
17775
17826
  var update = /* @__PURE__ */ dual(2, (self, input) => contextWith((services) => sync(() => self.updateUnsafe(input, services))));
17776
17827
 
17777
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Effect.js
17828
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Effect.js
17778
17829
  var TypeId11 = EffectTypeId;
17779
17830
  var isEffect2 = isEffect;
17780
17831
  var all2 = all;
@@ -17896,9 +17947,9 @@ var service2 = service;
17896
17947
  var serviceOption2 = serviceOption;
17897
17948
  var updateContext2 = updateContext;
17898
17949
  var updateService2 = updateService;
17950
+ var updateServiceScoped2 = updateServiceScoped;
17899
17951
  var provideService2 = provideService;
17900
17952
  var provideServiceEffect2 = provideServiceEffect;
17901
- var withConcurrency2 = withConcurrency;
17902
17953
  var scope2 = scope;
17903
17954
  var scoped2 = scoped;
17904
17955
  var scopedWith2 = scopedWith;
@@ -17982,13 +18033,16 @@ var logDebug = /* @__PURE__ */ logWithLevel("Debug");
17982
18033
  var logTrace = /* @__PURE__ */ logWithLevel("Trace");
17983
18034
  var withLogger = /* @__PURE__ */ dual(2, (effect2, logger) => updateService(effect2, CurrentLoggers, (loggers) => /* @__PURE__ */ new Set([...loggers, logger])));
17984
18035
  var annotateLogs = /* @__PURE__ */ dual((args2) => isEffect2(args2[0]), (effect2, ...args2) => updateService(effect2, CurrentLogAnnotations2, (annotations) => {
17985
- const newAnnotations = {
18036
+ const newAnnotations = args2.length === 1 ? {
18037
+ ...annotations,
18038
+ ...args2[0]
18039
+ } : {
17986
18040
  ...annotations
17987
18041
  };
17988
18042
  if (args2.length === 1) {
17989
- Object.assign(newAnnotations, args2[0]);
18043
+ return newAnnotations;
17990
18044
  } else {
17991
- newAnnotations[args2[0]] = args2[1];
18045
+ assignProperty(newAnnotations, args2[0], args2[1]);
17992
18046
  }
17993
18047
  return newAnnotations;
17994
18048
  }));
@@ -18126,7 +18180,7 @@ var flatMapEager2 = flatMapEager;
18126
18180
  var catchEager2 = catchEager;
18127
18181
  var fnUntracedEager2 = fnUntracedEager;
18128
18182
 
18129
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/FileSystem.js
18183
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/FileSystem.js
18130
18184
  var FileSystem_exports = {};
18131
18185
  __export(FileSystem_exports, {
18132
18186
  FileDescriptor: () => FileDescriptor,
@@ -18145,28 +18199,15 @@ __export(FileSystem_exports, {
18145
18199
  makeNoop: () => makeNoop
18146
18200
  });
18147
18201
 
18148
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/internal/record.js
18149
- function set(self, key, value3) {
18150
- if (key === "__proto__") {
18151
- Object.defineProperty(self, key, {
18152
- value: value3,
18153
- writable: true,
18154
- enumerable: true,
18155
- configurable: true
18156
- });
18157
- } else {
18158
- self[key] = value3;
18159
- }
18160
- return self;
18161
- }
18162
-
18163
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/internal/schema/annotations.js
18202
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/internal/schema/annotations.js
18164
18203
  function resolve(ast) {
18165
18204
  return ast.checks ? ast.checks[ast.checks.length - 1].annotations : ast.annotations;
18166
18205
  }
18167
18206
  function resolveAt(key) {
18168
18207
  return (ast) => resolve(ast)?.[key];
18169
18208
  }
18209
+ var STRUCTURAL_ANNOTATION_KEY = "~structural";
18210
+ var SENTINELS_ANNOTATION_KEY = "~sentinels";
18170
18211
  var resolveIdentifier = /* @__PURE__ */ resolveAt("identifier");
18171
18212
  var getExpected = /* @__PURE__ */ memoize((ast) => {
18172
18213
  const identifier2 = resolveIdentifier(ast);
@@ -18174,7 +18215,7 @@ var getExpected = /* @__PURE__ */ memoize((ast) => {
18174
18215
  return ast.getExpected(getExpected);
18175
18216
  });
18176
18217
 
18177
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/internal/redacted.js
18218
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/internal/redacted.js
18178
18219
  var redactedRegistry = /* @__PURE__ */ new WeakMap();
18179
18220
  var value = (self) => {
18180
18221
  if (redactedRegistry.has(self)) {
@@ -18184,7 +18225,7 @@ var value = (self) => {
18184
18225
  }
18185
18226
  };
18186
18227
 
18187
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Redacted.js
18228
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Redacted.js
18188
18229
  var TypeId12 = "~effect/data/Redacted";
18189
18230
  var isRedacted = (u2) => hasProperty(u2, TypeId12);
18190
18231
  var make6 = (value3, options) => {
@@ -18216,10 +18257,10 @@ var Proto3 = {
18216
18257
  };
18217
18258
  var value2 = value;
18218
18259
 
18219
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/SchemaIssue.js
18260
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/SchemaIssue.js
18220
18261
  var TypeId13 = "~effect/SchemaIssue/Issue";
18221
18262
  function isIssue(u2) {
18222
- return hasProperty(u2, TypeId13);
18263
+ return hasProperty(u2, TypeId13) && u2[TypeId13] === TypeId13;
18223
18264
  }
18224
18265
  var Base = class {
18225
18266
  [TypeId13] = TypeId13;
@@ -18566,7 +18607,7 @@ function formatOption(actual) {
18566
18607
  return format(actual.value);
18567
18608
  }
18568
18609
 
18569
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/internal/schema/cause.js
18610
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/internal/schema/cause.js
18570
18611
  function getSchemaIssue(cause) {
18571
18612
  let issue;
18572
18613
  for (const reason of cause.reasons) {
@@ -18587,7 +18628,7 @@ function getSchemaIssueOrThrow(cause, message) {
18587
18628
  return issue;
18588
18629
  }
18589
18630
 
18590
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/SchemaGetter.js
18631
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/SchemaGetter.js
18591
18632
  var Getter = class _Getter extends Class {
18592
18633
  run;
18593
18634
  constructor(run6) {
@@ -18636,7 +18677,7 @@ function Date3() {
18636
18677
  return transform((u2) => new globalThis.Date(u2));
18637
18678
  }
18638
18679
 
18639
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/SchemaTransformation.js
18680
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/SchemaTransformation.js
18640
18681
  var TypeId14 = "~effect/SchemaTransformation/Transformation";
18641
18682
  var Transformation = class _Transformation {
18642
18683
  [TypeId14] = TypeId14;
@@ -18655,7 +18696,7 @@ var Transformation = class _Transformation {
18655
18696
  }
18656
18697
  };
18657
18698
  function isTransformation(u2) {
18658
- return hasProperty(u2, TypeId14);
18699
+ return hasProperty(u2, TypeId14) && u2[TypeId14] === TypeId14;
18659
18700
  }
18660
18701
  var make8 = (options) => {
18661
18702
  if (isTransformation(options)) {
@@ -18725,7 +18766,7 @@ var defectFromJson = (options) => transform2({
18725
18766
  encode: makeEncodeDefect(options)
18726
18767
  });
18727
18768
 
18728
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/SchemaAST.js
18769
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/SchemaAST.js
18729
18770
  function makeGuard(tag2) {
18730
18771
  return (ast) => ast._tag === tag2;
18731
18772
  }
@@ -18924,14 +18965,14 @@ var Number5 = class extends Base2 {
18924
18965
  }
18925
18966
  /** @internal */
18926
18967
  toCodecJson() {
18927
- if (this.checks && (hasCheck(this.checks, "isFinite") || hasCheck(this.checks, "isInt"))) {
18968
+ if (this.checks && (hasCheck(this.checks, "effect/schema/isFinite") || hasCheck(this.checks, "effect/schema/isInt"))) {
18928
18969
  return this;
18929
18970
  }
18930
- return replaceEncoding(this, [numberToJson]);
18971
+ return replaceEncoding(this, [numberToJson(this.checks)]);
18931
18972
  }
18932
18973
  /** @internal */
18933
18974
  toCodecStringTree() {
18934
- if (this.checks && (hasCheck(this.checks, "isFinite") || hasCheck(this.checks, "isInt"))) {
18975
+ if (this.toCodecJson() === this) {
18935
18976
  return replaceEncoding(this, [finiteToString]);
18936
18977
  }
18937
18978
  return replaceEncoding(this, [numberToString]);
@@ -18941,15 +18982,12 @@ var Number5 = class extends Base2 {
18941
18982
  return "number";
18942
18983
  }
18943
18984
  };
18944
- function hasCheck(checks, tag2) {
18945
- return checks.some((c) => {
18946
- switch (c._tag) {
18947
- case "Filter":
18948
- return c.annotations?.meta?._tag === tag2;
18949
- case "FilterGroup":
18950
- return hasCheck(c.checks, tag2);
18951
- }
18952
- });
18985
+ function hasCheck(checks, id) {
18986
+ return checks.some((check) => check.annotations?.representation?.id === id || check._tag === "FilterGroup" && hasCheck(check.checks, id));
18987
+ }
18988
+ function numberToJson(checks) {
18989
+ const encodedFinite = checks === void 0 ? finite : appendChecks(finite, checks);
18990
+ return new Link(new Union([encodedFinite, nonFiniteLiterals], "anyOf"), new Transformation(Number4(), transform((n) => globalThis.Number.isFinite(n) ? n : globalThis.String(n))));
18953
18991
  }
18954
18992
  var number2 = /* @__PURE__ */ new Number5();
18955
18993
  var Boolean2 = class extends Base2 {
@@ -19236,9 +19274,9 @@ var Objects = class _Objects extends Base2 {
19236
19274
  const v2 = exitValue.value.value;
19237
19275
  if (is4.merge && is4.merge.decode && Object.hasOwn(s3.out, k2)) {
19238
19276
  const [k3, v3] = is4.merge.decode.combine([k2, s3.out[k2]], [k2, v2]);
19239
- set(s3.out, k3, v3);
19277
+ assignProperty(s3.out, k3, v3);
19240
19278
  } else {
19241
- set(s3.out, k2, v2);
19279
+ assignProperty(s3.out, k2, v2);
19242
19280
  }
19243
19281
  }
19244
19282
  }),
@@ -19283,7 +19321,7 @@ var Objects = class _Objects extends Base2 {
19283
19321
  return yield* fail6(new Composite(ast, oinput, [issue]));
19284
19322
  }
19285
19323
  } else {
19286
- set(out, key, input[key]);
19324
+ assignProperty(out, key, input[key]);
19287
19325
  }
19288
19326
  }
19289
19327
  }
@@ -19312,7 +19350,7 @@ var Objects = class _Objects extends Base2 {
19312
19350
  const preserved = {};
19313
19351
  for (const key of keys2) {
19314
19352
  if (Object.hasOwn(out, key)) {
19315
- set(preserved, key, out[key]);
19353
+ assignProperty(preserved, key, out[key]);
19316
19354
  }
19317
19355
  }
19318
19356
  return some2(preserved);
@@ -19356,7 +19394,7 @@ var parseProperties = /* @__PURE__ */ iterateEager()({
19356
19394
  if (exit3._tag === "Failure") {
19357
19395
  return wrapPropertyKeyIssue(s3, s3.ast, p2.name, exit3);
19358
19396
  } else if (exit3.value._tag === "Some") {
19359
- set(s3.out, p2.name, exit3.value.value);
19397
+ assignProperty(s3.out, p2.name, exit3.value.value);
19360
19398
  } else if (!isOptional(p2.type)) {
19361
19399
  const issue = new Pointer([p2.name], new MissingKey(p2.type.context?.annotations));
19362
19400
  if (s3.options.errors === "all") {
@@ -19408,7 +19446,7 @@ function getCandidateTypes(ast) {
19408
19446
  case "ObjectKeyword":
19409
19447
  return ["object", "array", "function"];
19410
19448
  case "Objects":
19411
- return ast.propertySignatures.length || ast.indexSignatures.length ? ["object"] : ["object", "array"];
19449
+ return ast.propertySignatures.length || ast.indexSignatures.length ? ["object"] : ["string", "number", "boolean", "symbol", "bigint", "object", "array", "function"];
19412
19450
  case "Enum":
19413
19451
  return Array.from(new Set(ast.enums.map(([, v2]) => typeof v2)));
19414
19452
  case "Literal":
@@ -19424,7 +19462,7 @@ function collectSentinels(ast) {
19424
19462
  default:
19425
19463
  return [];
19426
19464
  case "Declaration": {
19427
- const s3 = ast.annotations?.["~sentinels"];
19465
+ const s3 = ast.annotations?.[SENTINELS_ANNOTATION_KEY];
19428
19466
  return Array.isArray(s3) ? s3 : [];
19429
19467
  }
19430
19468
  case "Objects":
@@ -19635,7 +19673,6 @@ var parseUnion = /* @__PURE__ */ iterateEager()({
19635
19673
  }
19636
19674
  });
19637
19675
  var nonFiniteLiterals = /* @__PURE__ */ new Union([/* @__PURE__ */ new Literal("Infinity"), /* @__PURE__ */ new Literal("-Infinity"), /* @__PURE__ */ new Literal("NaN")], "anyOf");
19638
- var numberToJson = /* @__PURE__ */ new Link(/* @__PURE__ */ new Union([number2, nonFiniteLiterals], "anyOf"), /* @__PURE__ */ new Transformation(/* @__PURE__ */ Number4(), /* @__PURE__ */ transform((n) => globalThis.Number.isFinite(n) ? n : globalThis.String(n))));
19639
19676
  function formatIsMutable(isMutable) {
19640
19677
  return isMutable ? "" : "readonly ";
19641
19678
  }
@@ -19691,14 +19728,43 @@ var FilterGroup = class _FilterGroup extends Class {
19691
19728
  function makeFilter(filter10, annotations, aborted = false) {
19692
19729
  return new Filter2((input, ast, options) => make7(input, ast, filter10(input, ast, options)), annotations, aborted);
19693
19730
  }
19731
+ function isFinite3(annotations) {
19732
+ return makeFilter((n) => globalThis.Number.isFinite(n), {
19733
+ expected: "a finite number",
19734
+ representation: {
19735
+ id: "effect/schema/isFinite",
19736
+ payload: null
19737
+ },
19738
+ toJsonSchema: () => ({
19739
+ type: "number"
19740
+ }),
19741
+ toCode: () => ({
19742
+ runtime: "Schema.isFinite()"
19743
+ }),
19744
+ arbitrary: {
19745
+ constraint: {
19746
+ noInfinity: true,
19747
+ noNaN: true
19748
+ }
19749
+ },
19750
+ ...annotations
19751
+ });
19752
+ }
19753
+ var finite = /* @__PURE__ */ appendChecks(number2, [/* @__PURE__ */ isFinite3()]);
19694
19754
  function isPattern(regExp, annotations) {
19695
19755
  const source = regExp.source;
19696
19756
  return makeFilter((s3) => regExp.test(s3), {
19697
19757
  expected: `a string matching the RegExp ${source}`,
19698
- meta: {
19699
- _tag: "isPattern",
19700
- regExp
19758
+ representation: {
19759
+ id: "effect/schema/isPattern",
19760
+ payload: {
19761
+ source,
19762
+ flags: regExp.flags
19763
+ }
19701
19764
  },
19765
+ toJsonSchema: () => ({
19766
+ pattern: source
19767
+ }),
19702
19768
  arbitrary: {
19703
19769
  constraint: {
19704
19770
  patterns: [regExp.source]
@@ -19754,18 +19820,22 @@ function replaceChecks(ast, checks) {
19754
19820
  function appendChecks(ast, checks) {
19755
19821
  return replaceChecks(ast, combineChecks(ast.checks, checks));
19756
19822
  }
19823
+ function mapLink(link4, f2) {
19824
+ const to2 = f2(link4.to);
19825
+ return to2 === link4.to ? link4 : new Link(to2, link4.transformation);
19826
+ }
19757
19827
  function updateLastLink(encoding, f2) {
19758
19828
  const links = encoding;
19759
19829
  const last = links[links.length - 1];
19760
- const to2 = f2(last.to);
19761
- if (to2 !== last.to) {
19762
- return append(encoding.slice(0, encoding.length - 1), new Link(to2, last.transformation));
19763
- }
19764
- return encoding;
19830
+ const out = mapLink(last, f2);
19831
+ return out === last ? encoding : append(encoding.slice(0, encoding.length - 1), out);
19765
19832
  }
19766
19833
  function applyToLastLink(f2) {
19767
19834
  return (ast) => ast.encoding ? replaceEncoding(ast, updateLastLink(ast.encoding, f2)) : ast;
19768
19835
  }
19836
+ function replaceContextLastLink(ast, context3) {
19837
+ return applyToLastLink((ast2) => replaceContext(ast2, context3))(ast);
19838
+ }
19769
19839
  function applyToSelfOrLastLinkEncoding(f2) {
19770
19840
  function out(ast) {
19771
19841
  return ast.encoding ? replaceEncoding(ast, updateLastLink(ast.encoding, out)) : f2(ast);
@@ -19813,6 +19883,17 @@ function decodeTo(from, to2, transformation) {
19813
19883
  function isOptional(ast) {
19814
19884
  return ast.context?.isOptional ?? false;
19815
19885
  }
19886
+ function isStructuralCheck(check) {
19887
+ return check.annotations?.[STRUCTURAL_ANNOTATION_KEY] === true || check._tag === "FilterGroup" && check.checks.every(isStructuralCheck);
19888
+ }
19889
+ function extractStructuralChecks(checks) {
19890
+ function extract(check) {
19891
+ if (isStructuralCheck(check)) return [check];
19892
+ return check._tag === "FilterGroup" ? check.checks.flatMap(extract) : [];
19893
+ }
19894
+ const out = checks.flatMap(extract);
19895
+ return isArrayNonEmpty2(out) ? out : void 0;
19896
+ }
19816
19897
  var toType = /* @__PURE__ */ memoize((ast) => {
19817
19898
  if (ast.encoding) {
19818
19899
  return toType(replaceEncoding(ast, void 0));
@@ -19821,11 +19902,10 @@ var toType = /* @__PURE__ */ memoize((ast) => {
19821
19902
  const type = out.recur?.(toType) ?? out;
19822
19903
  const encodingChecks = type.encodingChecks;
19823
19904
  if (encodingChecks) {
19905
+ const checks = type === ast ? encodingChecks : isArrays(type) || isObjects(type) || isDeclaration(type) && type.typeParameters.length > 0 ? extractStructuralChecks(encodingChecks) : void 0;
19824
19906
  return modifyOwnPropertyDescriptors(type, (d) => {
19825
19907
  d.encodingChecks.value = void 0;
19826
- if (type === ast) {
19827
- d.checks.value = combineChecks(type.checks, encodingChecks);
19828
- }
19908
+ d.checks.value = combineChecks(type.checks, checks);
19829
19909
  });
19830
19910
  }
19831
19911
  return type;
@@ -19910,14 +19990,17 @@ var parameterFromString = /* @__PURE__ */ applyToSelfOrLastLinkEncoding((ast) =>
19910
19990
  }
19911
19991
  });
19912
19992
  var isStringFiniteRegExp = /* @__PURE__ */ new globalThis.RegExp(`^${FINITE_PATTERN}$`);
19913
- var isStringNumberRegExp = /* @__PURE__ */ new globalThis.RegExp(`(?:${FINITE_PATTERN}|Infinity|-Infinity|NaN)`);
19993
+ var isStringNumberRegExp = /* @__PURE__ */ new globalThis.RegExp(`^(?:${FINITE_PATTERN}|Infinity|-Infinity|NaN)$`);
19914
19994
  function isStringFinite(annotations) {
19915
19995
  return isPattern(isStringFiniteRegExp, {
19916
19996
  expected: "a string representing a finite number",
19917
- meta: {
19918
- _tag: "isStringFinite",
19919
- regExp: isStringFiniteRegExp
19997
+ representation: {
19998
+ id: "effect/schema/isStringFinite",
19999
+ payload: null
19920
20000
  },
20001
+ toJsonSchema: () => ({
20002
+ pattern: isStringFiniteRegExp.source
20003
+ }),
19921
20004
  ...annotations
19922
20005
  });
19923
20006
  }
@@ -19941,81 +20024,83 @@ function collectIssues(checks, value3, issues, ast, options) {
19941
20024
  }
19942
20025
  }
19943
20026
  var ClassTypeId = "~effect/Schema/Class";
19944
- var STRUCTURAL_ANNOTATION_KEY = "~structural";
19945
- function isJson(u2) {
19946
- const onPath = /* @__PURE__ */ new Set();
19947
- const validated = /* @__PURE__ */ new Set();
19948
- return recur2(u2);
19949
- function recur2(u3) {
19950
- if (u3 === null || typeof u3 === "string" || typeof u3 === "boolean") {
19951
- return true;
19952
- }
19953
- if (typeof u3 === "number") {
19954
- return globalThis.Number.isFinite(u3);
19955
- }
19956
- if (typeof u3 !== "object" || u3 === void 0) {
19957
- return false;
19958
- }
19959
- if (onPath.has(u3)) {
19960
- return false;
19961
- }
19962
- if (validated.has(u3)) {
19963
- return true;
19964
- }
19965
- const isArray2 = Array.isArray(u3);
19966
- if (!isArray2) {
19967
- const prototype = Object.getPrototypeOf(u3);
19968
- if (prototype !== null && Object.getPrototypeOf(prototype) !== null) {
20027
+ function isJsonLeaf(u2) {
20028
+ return u2 === null || typeof u2 === "string" || typeof u2 === "boolean" || typeof u2 === "number" && globalThis.Number.isFinite(u2);
20029
+ }
20030
+ function isStringTreeLeaf(u2) {
20031
+ return u2 === void 0 || typeof u2 === "string";
20032
+ }
20033
+ function isTree(u2, isLeaf) {
20034
+ const cache = /* @__PURE__ */ new WeakMap();
20035
+ const stack = [];
20036
+ outer: while (true) {
20037
+ if (typeof u2 !== "object" || u2 === null) {
20038
+ if (!isLeaf(u2)) {
20039
+ return false;
20040
+ }
20041
+ } else {
20042
+ const value3 = u2;
20043
+ const cached3 = cache.get(value3);
20044
+ if (cached3 === false) {
19969
20045
  return false;
19970
20046
  }
20047
+ if (cached3 === void 0) {
20048
+ const isArray2 = Array.isArray(value3);
20049
+ if (!isArray2) {
20050
+ const prototype = Object.getPrototypeOf(value3);
20051
+ if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) {
20052
+ return false;
20053
+ }
20054
+ }
20055
+ cache.set(value3, false);
20056
+ stack.push({
20057
+ value: value3,
20058
+ keys: isArray2 ? value3.length : Object.keys(value3),
20059
+ index: 0
20060
+ });
20061
+ }
19971
20062
  }
19972
- onPath.add(u3);
19973
- const ok = isArray2 ? u3.every(recur2) : Object.keys(u3).every((key) => recur2(u3[key]));
19974
- onPath.delete(u3);
19975
- if (ok) {
19976
- validated.add(u3);
20063
+ while (stack.length > 0) {
20064
+ const frame = stack[stack.length - 1];
20065
+ const keys2 = frame.keys;
20066
+ if (typeof keys2 === "number") {
20067
+ if (frame.index < keys2) {
20068
+ u2 = frame.value[frame.index++];
20069
+ continue outer;
20070
+ }
20071
+ } else if (frame.index < keys2.length) {
20072
+ u2 = frame.value[keys2[frame.index++]];
20073
+ continue outer;
20074
+ }
20075
+ cache.set(frame.value, true);
20076
+ stack.pop();
19977
20077
  }
19978
- return ok;
20078
+ return true;
19979
20079
  }
19980
20080
  }
20081
+ function isJson(u2) {
20082
+ return isTree(u2, isJsonLeaf);
20083
+ }
19981
20084
  var Json = /* @__PURE__ */ new Declaration([], () => (input, ast) => isJson(input) ? succeed6(input) : fail6(new InvalidType(ast, some2(input))), {
19982
- typeConstructor: {
19983
- _tag: "effect/Json"
19984
- },
19985
- generation: {
19986
- runtime: `Schema.Json`,
19987
- Type: `Schema.Json`
20085
+ representation: {
20086
+ id: "effect/schema/Json",
20087
+ payload: null
19988
20088
  },
19989
20089
  expected: "JSON value",
19990
- toCodecJson: () => new Link(unknown, passthrough3()),
20090
+ toCodecJson: () => void 0,
20091
+ toCodecStringTree: () => unknownToStringTree,
19991
20092
  toArbitrary: () => (fc) => fc.jsonValue()
19992
20093
  });
19993
20094
  function isStringTree(u2) {
19994
- const seen = /* @__PURE__ */ new Set();
19995
- return recur2(u2);
19996
- function recur2(u3) {
19997
- if (u3 === void 0 || typeof u3 === "string") {
19998
- return true;
19999
- }
20000
- if (typeof u3 !== "object" || u3 === null) {
20001
- return false;
20002
- }
20003
- if (seen.has(u3)) {
20004
- return false;
20005
- }
20006
- seen.add(u3);
20007
- if (Array.isArray(u3)) {
20008
- return u3.every(recur2);
20009
- }
20010
- return Object.keys(u3).every((key) => recur2(u3[key]));
20011
- }
20095
+ return isTree(u2, isStringTreeLeaf);
20012
20096
  }
20013
20097
  var StringTree = /* @__PURE__ */ new Declaration([], () => (input, ast) => isStringTree(input) ? succeed6(input) : fail6(new InvalidType(ast, some2(input))), {
20014
- expected: "StringTree"
20098
+ expected: "StringTree",
20099
+ toCodecStringTree: () => void 0
20015
20100
  });
20016
20101
  var unknownToStringTree = /* @__PURE__ */ new Link(StringTree, /* @__PURE__ */ passthrough3());
20017
20102
 
20018
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Brand.js
20103
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Brand.js
20019
20104
  function nominal() {
20020
20105
  return Object.assign((input) => input, {
20021
20106
  option: (input) => some2(input),
@@ -20024,7 +20109,7 @@ function nominal() {
20024
20109
  });
20025
20110
  }
20026
20111
 
20027
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/PlatformError.js
20112
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/PlatformError.js
20028
20113
  var TypeId16 = "~effect/platform/PlatformError";
20029
20114
  var BadArgument = class extends (/* @__PURE__ */ TaggedError2("BadArgument")) {
20030
20115
  /**
@@ -20086,10 +20171,10 @@ var badArgument = (options) => new PlatformError(new BadArgument(options));
20086
20171
  var interrupt3 = fiberInterrupt;
20087
20172
  var runIn = fiberRunIn;
20088
20173
 
20089
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Latch.js
20174
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Latch.js
20090
20175
  var makeUnsafe4 = makeLatchUnsafe;
20091
20176
 
20092
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/MutableList.js
20177
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/MutableList.js
20093
20178
  var Empty = /* @__PURE__ */ Symbol.for("effect/MutableList/Empty");
20094
20179
  var make9 = () => ({
20095
20180
  head: void 0,
@@ -20160,7 +20245,7 @@ var take = (self) => {
20160
20245
  return message;
20161
20246
  };
20162
20247
 
20163
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/MutableRef.js
20248
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/MutableRef.js
20164
20249
  var TypeId18 = "~effect/MutableRef";
20165
20250
  var MutableRefProto = {
20166
20251
  [TypeId18]: TypeId18,
@@ -20178,7 +20263,7 @@ var make10 = (value3) => {
20178
20263
  return ref;
20179
20264
  };
20180
20265
 
20181
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Queue.js
20266
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Queue.js
20182
20267
  var TypeId19 = "~effect/Queue";
20183
20268
  var EnqueueTypeId = "~effect/Queue/Enqueue";
20184
20269
  var DequeueTypeId = "~effect/Queue/Dequeue";
@@ -20442,7 +20527,7 @@ var finalize = (self, exit3) => {
20442
20527
  openState.awaiters.clear();
20443
20528
  };
20444
20529
 
20445
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Semaphore.js
20530
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Semaphore.js
20446
20531
  var makeUnsafe5 = (permits) => new SemaphoreImpl(permits);
20447
20532
  var SemaphoreImpl = class {
20448
20533
  waiters = /* @__PURE__ */ new Set();
@@ -20525,7 +20610,7 @@ var SemaphoreImpl = class {
20525
20610
  }
20526
20611
  };
20527
20612
 
20528
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Channel.js
20613
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Channel.js
20529
20614
  var TypeId20 = "~effect/Channel";
20530
20615
  var isChannel = (u2) => hasProperty(u2, TypeId20);
20531
20616
  var ChannelProto = {
@@ -20703,7 +20788,7 @@ var runFold = /* @__PURE__ */ dual(3, (self, initial, f2) => suspend2(() => {
20703
20788
  }));
20704
20789
  var toPullScoped = (self, scope3) => toTransform(self)(done3(), scope3);
20705
20790
 
20706
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/internal/stream.js
20791
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/internal/stream.js
20707
20792
  var TypeId21 = "~effect/Stream";
20708
20793
  var streamVariance = {
20709
20794
  _R: identity,
@@ -20722,7 +20807,7 @@ var fromChannel = (channel) => {
20722
20807
  return self;
20723
20808
  };
20724
20809
 
20725
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Sink.js
20810
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Sink.js
20726
20811
  var TypeId22 = "~effect/Sink";
20727
20812
  var endVoid = /* @__PURE__ */ succeed6([void 0]);
20728
20813
  var sinkVariance = {
@@ -20761,7 +20846,7 @@ var forEachArray = (f2) => fromTransform2((upstream) => upstream.pipe(flatMap3(f
20761
20846
  }), catchDone(() => endVoid)));
20762
20847
  var unwrap2 = (effect2) => fromChannel2(unwrap(map6(effect2, toChannel)));
20763
20848
 
20764
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/internal/rcRef.js
20849
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/internal/rcRef.js
20765
20850
  var TypeId23 = "~effect/RcRef";
20766
20851
  var stateEmpty = {
20767
20852
  _tag: "Empty"
@@ -20859,11 +20944,11 @@ var get2 = /* @__PURE__ */ fnUntraced2(function* (self_) {
20859
20944
  return state.value;
20860
20945
  });
20861
20946
 
20862
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/RcRef.js
20947
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/RcRef.js
20863
20948
  var make13 = make12;
20864
20949
  var get3 = get2;
20865
20950
 
20866
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Stream.js
20951
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Stream.js
20867
20952
  var TypeId24 = "~effect/Stream";
20868
20953
  var isStream = (u2) => hasProperty(u2, TypeId24);
20869
20954
  var fromChannel3 = fromChannel;
@@ -20964,7 +21049,7 @@ var toReadableStreamWith = /* @__PURE__ */ dual((args2) => isStream(args2[0]), (
20964
21049
  });
20965
21050
  var toReadableStreamEffect = /* @__PURE__ */ dual((args2) => isStream(args2[0]), (self, options) => map6(context2(), (context3) => toReadableStreamWith(self, context3, options)));
20966
21051
 
20967
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/FileSystem.js
21052
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/FileSystem.js
20968
21053
  var TypeId25 = "~effect/platform/FileSystem";
20969
21054
  var Size = (bytes) => typeof bytes === "bigint" ? bytes : BigInt(bytes);
20970
21055
  var KiB = (n) => Size(n * 1024);
@@ -21134,7 +21219,7 @@ var FileDescriptor = /* @__PURE__ */ nominal();
21134
21219
  var WatchBackend = class extends (/* @__PURE__ */ Service()("effect/platform/FileSystem/WatchBackend")) {
21135
21220
  };
21136
21221
 
21137
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Logger.js
21222
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Logger.js
21138
21223
  var CurrentLoggers2 = CurrentLoggers;
21139
21224
  var make15 = loggerMake;
21140
21225
  var layer = (loggers, options) => effect(CurrentLoggers2, withFiber(fnUntraced(function* (fiber3) {
@@ -21145,18 +21230,34 @@ var layer = (loggers, options) => effect(CurrentLoggers2, withFiber(fnUntraced(f
21145
21230
  return currentLoggers;
21146
21231
  })));
21147
21232
 
21148
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Struct.js
21149
- var lambda = (f2) => f2;
21233
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/SchemaError.js
21234
+ var TypeId26 = "~effect/SchemaError/SchemaError";
21235
+ var SchemaError = class extends (/* @__PURE__ */ TaggedError2("SchemaError")) {
21236
+ [TypeId26] = TypeId26;
21237
+ constructor(issue) {
21238
+ super({
21239
+ issue
21240
+ });
21241
+ }
21242
+ get message() {
21243
+ return this.issue.toString();
21244
+ }
21245
+ toString() {
21246
+ return `SchemaError(${this.message})`;
21247
+ }
21248
+ };
21249
+ function isSchemaError(u2) {
21250
+ return hasProperty(u2, TypeId26) && u2[TypeId26] === TypeId26;
21251
+ }
21150
21252
 
21151
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/SchemaParser.js
21253
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/SchemaParser.js
21152
21254
  var toConstructorAST = /* @__PURE__ */ memoize((ast) => {
21153
21255
  switch (ast._tag) {
21154
21256
  case "Declaration": {
21155
21257
  const getLink = ast.annotations?.[ClassTypeId];
21156
21258
  if (isFunction(getLink)) {
21157
21259
  const link4 = getLink(ast.typeParameters);
21158
- const to2 = toConstructorAST(link4.to);
21159
- return replaceEncoding(ast, to2 === link4.to ? [link4] : [new Link(to2, link4.transformation)]);
21260
+ return replaceEncoding(ast, [mapLink(link4, toConstructorAST)]);
21160
21261
  }
21161
21262
  return ast;
21162
21263
  }
@@ -21265,8 +21366,6 @@ var recur = /* @__PURE__ */ memoize((ast) => {
21265
21366
  return parser(ou, options);
21266
21367
  };
21267
21368
  }
21268
- const isStructural = isArrays(ast) || isObjects(ast) || isDeclaration(ast) && ast.typeParameters.length > 0;
21269
- const structuralChecks = checks && isStructural ? checks.filter((check) => check.annotations?.[STRUCTURAL_ANNOTATION_KEY]) : void 0;
21270
21369
  return (ou, options) => {
21271
21370
  if (astOptions) {
21272
21371
  options = {
@@ -21306,14 +21405,6 @@ var recur = /* @__PURE__ */ memoize((ast) => {
21306
21405
  });
21307
21406
  }
21308
21407
  if (checks && !options?.disableChecks) {
21309
- if (options?.errors === "all" && structuralChecks && structuralChecks.length > 0 && isSome2(localOu)) {
21310
- sroa2 = mapSchemaIssueEffect(sroa2, (issue) => {
21311
- const issues = [];
21312
- collectIssues(structuralChecks, localOu.value, issues, ast, options);
21313
- const out = isArrayNonEmpty2(issues) ? issue._tag === "Composite" && issue.ast === ast ? new Composite(ast, issue.actual, [...issue.issues, ...issues]) : new Composite(ast, localOu, [issue, ...issues]) : issue;
21314
- return out;
21315
- });
21316
- }
21317
21408
  sroa2 = flatMapEager2(sroa2, (oa) => {
21318
21409
  if (isSome2(oa)) {
21319
21410
  const value3 = oa.value;
@@ -21333,27 +21424,7 @@ var recur = /* @__PURE__ */ memoize((ast) => {
21333
21424
  };
21334
21425
  });
21335
21426
 
21336
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/SchemaError.js
21337
- var TypeId26 = "~effect/SchemaError/SchemaError";
21338
- var SchemaError = class extends (/* @__PURE__ */ TaggedError2("SchemaError")) {
21339
- [TypeId26] = TypeId26;
21340
- constructor(issue) {
21341
- super({
21342
- issue
21343
- });
21344
- }
21345
- get message() {
21346
- return this.issue.toString();
21347
- }
21348
- toString() {
21349
- return `SchemaError(${this.message})`;
21350
- }
21351
- };
21352
- function isSchemaError(u2) {
21353
- return hasProperty(u2, TypeId26);
21354
- }
21355
-
21356
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/internal/schema/schema.js
21427
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/internal/schema/schema.js
21357
21428
  var TypeId27 = "~effect/Schema/Schema";
21358
21429
  var SchemaProto = {
21359
21430
  [TypeId27]: TypeId27,
@@ -21371,10 +21442,11 @@ var SchemaProto = {
21371
21442
  }
21372
21443
  };
21373
21444
  function make17(ast, options) {
21374
- const self = Object.create(SchemaProto);
21375
- if (options) {
21376
- Object.assign(self, options);
21445
+ function Schema() {
21377
21446
  }
21447
+ const self = Object.defineProperties(Object.setPrototypeOf(Schema, SchemaProto), Object.getOwnPropertyDescriptors({
21448
+ ...options
21449
+ }));
21378
21450
  self.ast = ast;
21379
21451
  self.rebuild = (ast2) => make17(ast2, options);
21380
21452
  const makeEffect2 = makeEffect(self);
@@ -21386,27 +21458,11 @@ function make17(ast, options) {
21386
21458
  function fromIssueEffect(self) {
21387
21459
  return catchCause2(self, (cause) => failCauseSync2(() => map5(cause, (issue) => new SchemaError(issue))));
21388
21460
  }
21389
- function makeReorder(getPriority) {
21390
- return (types) => {
21391
- const indexMap = /* @__PURE__ */ new Map();
21392
- for (let i = 0; i < types.length; i++) {
21393
- indexMap.set(toEncoded(types[i]), i);
21394
- }
21395
- const sortedTypes = [...types].sort((a, b2) => {
21396
- a = toEncoded(a);
21397
- b2 = toEncoded(b2);
21398
- const pa = getPriority(a);
21399
- const pb = getPriority(b2);
21400
- if (pa !== pb) return pa - pb;
21401
- return indexMap.get(a) - indexMap.get(b2);
21402
- });
21403
- const orderChanged = sortedTypes.some((ast, index) => ast !== types[index]);
21404
- if (!orderChanged) return types;
21405
- return sortedTypes;
21406
- };
21407
- }
21408
21461
 
21409
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Schema.js
21462
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Struct.js
21463
+ var lambda = (f2) => f2;
21464
+
21465
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Schema.js
21410
21466
  var TypeId28 = TypeId27;
21411
21467
  function declareConstructor() {
21412
21468
  return (typeParameters, run6, annotations) => {
@@ -21517,37 +21573,37 @@ function TaggedStruct(value3, fields) {
21517
21573
  ...fields
21518
21574
  });
21519
21575
  }
21520
- function instanceOf(constructor, annotations) {
21521
- return declare((u2) => u2 instanceof constructor, annotations);
21522
- }
21523
21576
  function link() {
21524
21577
  return (encodeTo, transformation) => {
21525
21578
  return new Link(encodeTo.ast, make8(transformation));
21526
21579
  };
21527
21580
  }
21528
21581
  var makeFilter2 = makeFilter;
21529
- var isPattern2 = isPattern;
21530
- function isFinite3(annotations) {
21531
- return makeFilter2((n) => globalThis.Number.isFinite(n), {
21532
- expected: "a finite number",
21533
- meta: {
21534
- _tag: "isFinite"
21535
- },
21536
- arbitrary: {
21537
- constraint: {
21538
- noInfinity: true,
21539
- noNaN: true
21540
- }
21541
- },
21582
+ function isPattern2(regExp, annotations) {
21583
+ const source = regExp.source;
21584
+ const flags = regExp.flags;
21585
+ const runtimeRegExp = flags === "" ? `new RegExp(${format(source)})` : `new RegExp(${format(source)}, ${format(flags)})`;
21586
+ return isPattern(regExp, {
21587
+ toCode: () => ({
21588
+ runtime: `Schema.isPattern(${runtimeRegExp})`
21589
+ }),
21542
21590
  ...annotations
21543
21591
  });
21544
21592
  }
21593
+ var Finite = /* @__PURE__ */ make18(finite);
21545
21594
  function isInt(annotations) {
21546
21595
  return makeFilter2((n) => globalThis.Number.isSafeInteger(n), {
21547
21596
  expected: "an integer",
21548
- meta: {
21549
- _tag: "isInt"
21597
+ representation: {
21598
+ id: "effect/schema/isInt",
21599
+ payload: null
21550
21600
  },
21601
+ toJsonSchema: () => ({
21602
+ type: "integer"
21603
+ }),
21604
+ toCode: () => ({
21605
+ runtime: "Schema.isInt()"
21606
+ }),
21551
21607
  arbitrary: {
21552
21608
  constraint: {
21553
21609
  integer: true
@@ -21556,28 +21612,27 @@ function isInt(annotations) {
21556
21612
  ...annotations
21557
21613
  });
21558
21614
  }
21559
- function isDateValid(annotations) {
21560
- return makeFilter2((date6) => !isNaN(date6.getTime()), {
21561
- expected: "a valid date",
21562
- meta: {
21563
- _tag: "isDateValid"
21564
- },
21565
- arbitrary: {
21566
- constraint: {
21567
- valid: true
21568
- }
21569
- },
21570
- ...annotations
21571
- });
21572
- }
21615
+ var Int = /* @__PURE__ */ Number6.check(/* @__PURE__ */ isInt());
21573
21616
  function isMinLength(minLength, annotations) {
21574
21617
  minLength = Math.max(0, Math.floor(minLength));
21575
21618
  return makeFilter2((input) => input.length >= minLength, {
21576
21619
  expected: `a value with a length of at least ${minLength}`,
21577
- meta: {
21578
- _tag: "isMinLength",
21620
+ representation: {
21621
+ id: "effect/schema/isMinLength",
21622
+ payload: {
21623
+ minLength
21624
+ }
21625
+ },
21626
+ toJsonSchema: ({
21627
+ type
21628
+ }) => type === "array" ? {
21629
+ minItems: minLength
21630
+ } : {
21579
21631
  minLength
21580
21632
  },
21633
+ toCode: () => ({
21634
+ runtime: `Schema.isMinLength(${minLength})`
21635
+ }),
21581
21636
  [STRUCTURAL_ANNOTATION_KEY]: true,
21582
21637
  arbitrary: {
21583
21638
  constraint: {
@@ -21591,10 +21646,22 @@ function isMaxLength(maxLength, annotations) {
21591
21646
  maxLength = Math.max(0, Math.floor(maxLength));
21592
21647
  return makeFilter2((input) => input.length <= maxLength, {
21593
21648
  expected: `a value with a length of at most ${maxLength}`,
21594
- meta: {
21595
- _tag: "isMaxLength",
21649
+ representation: {
21650
+ id: "effect/schema/isMaxLength",
21651
+ payload: {
21652
+ maxLength
21653
+ }
21654
+ },
21655
+ toJsonSchema: ({
21656
+ type
21657
+ }) => type === "array" ? {
21658
+ maxItems: maxLength
21659
+ } : {
21596
21660
  maxLength
21597
21661
  },
21662
+ toCode: () => ({
21663
+ runtime: `Schema.isMaxLength(${maxLength})`
21664
+ }),
21598
21665
  [STRUCTURAL_ANNOTATION_KEY]: true,
21599
21666
  arbitrary: {
21600
21667
  constraint: {
@@ -21635,14 +21702,10 @@ function Defect(options) {
21635
21702
  defectSchemaCache[key] = schema;
21636
21703
  return schema;
21637
21704
  }
21638
- function dateArbitraryConstraints(constraint, ordered, base, toDate) {
21705
+ function dateArbitraryConstraints(ordered, base, toDate) {
21639
21706
  const out = {
21640
21707
  ...base
21641
21708
  };
21642
- delete out.valid;
21643
- if (constraint?.valid) {
21644
- out.noInvalidDate = true;
21645
- }
21646
21709
  if (ordered?.minimum !== void 0) {
21647
21710
  const minimum = ordered.minimum ;
21648
21711
  const nextMin = ordered.exclusiveMinimum ? new globalThis.Date(minimum.getTime() + 1) : minimum;
@@ -21660,23 +21723,23 @@ function dateArbitraryConstraints(constraint, ordered, base, toDate) {
21660
21723
  return out;
21661
21724
  }
21662
21725
  var DateString = /* @__PURE__ */ String4.annotate({
21663
- expected: "a string in ISO 8601 format that will be decoded as a Date"
21726
+ expected: "a string that will be decoded as a Date"
21664
21727
  });
21665
- var Date4 = /* @__PURE__ */ instanceOf(globalThis.Date, {
21666
- typeConstructor: {
21667
- _tag: "Date"
21728
+ var Date4 = /* @__PURE__ */ declare((input) => input instanceof globalThis.Date && !globalThis.Number.isNaN(input.getTime()), {
21729
+ representation: {
21730
+ id: "effect/schema/Date",
21731
+ payload: null
21668
21732
  },
21669
- generation: {
21733
+ toCode: () => ({
21670
21734
  runtime: `Schema.Date`,
21671
21735
  Type: `globalThis.Date`
21672
- },
21673
- expected: "Date",
21736
+ }),
21737
+ expected: "a valid Date",
21674
21738
  toCodecJson: () => link()(DateString, dateFromString),
21675
- toArbitrary: () => (fc, ctx) => fc.date(dateArbitraryConstraints(ctx?.constraint, ctx?.constraint?.ordered?.order === Date2 ? ctx.constraint.ordered : void 0))
21739
+ toArbitrary: () => (fc, ctx) => fc.date(dateArbitraryConstraints(ctx?.constraint?.ordered?.order === Date2 ? ctx.constraint.ordered : void 0, {
21740
+ noInvalidDate: true
21741
+ }))
21676
21742
  });
21677
- var DateValid = /* @__PURE__ */ Date4.check(/* @__PURE__ */ isDateValid());
21678
- var Finite = /* @__PURE__ */ Number6.check(/* @__PURE__ */ isFinite3());
21679
- var Int = /* @__PURE__ */ Number6.check(/* @__PURE__ */ isInt());
21680
21743
  var immerable = /* @__PURE__ */ globalThis.Symbol.for("immer-draftable");
21681
21744
  var payloadToken = {};
21682
21745
  function makeClass(Inherited, identifier2, struct2, annotations, proto2) {
@@ -21776,7 +21839,7 @@ function getClassSchemaFactory(from, identifier2, annotations) {
21776
21839
  terminal: from2.terminal?.map((args2) => new self(args2))
21777
21840
  }),
21778
21841
  toFormatter: ([from2]) => (t) => `${self.identifier}(${from2(t)})`,
21779
- "~sentinels": collectSentinels(from.ast),
21842
+ [SENTINELS_ANNOTATION_KEY]: collectSentinels(from.ast),
21780
21843
  ...annotations
21781
21844
  }));
21782
21845
  return memo = decodeTo2(to2, transformation)(from);
@@ -21803,12 +21866,41 @@ var TaggedErrorClass = (identifier2) => {
21803
21866
  return ErrorClass(identifier2 ?? tagValue)(struct2, annotations);
21804
21867
  };
21805
21868
  };
21869
+ function withoutConstructorDefault(context3) {
21870
+ return context3.defaultValue === void 0 ? context3 : new Context(context3.isOptional, context3.isMutable, void 0, context3.annotations);
21871
+ }
21872
+ function validateCanonicalObjectPropertyNames(ast) {
21873
+ if (ast.propertySignatures.some((ps2) => typeof ps2.name !== "string")) {
21874
+ throw new globalThis.Error("Objects property names must be strings", {
21875
+ cause: ast
21876
+ });
21877
+ }
21878
+ }
21879
+ function makeReorder(getPriority) {
21880
+ return (types) => {
21881
+ const indexMap = /* @__PURE__ */ new Map();
21882
+ for (let i = 0; i < types.length; i++) {
21883
+ indexMap.set(toEncoded(types[i]), i);
21884
+ }
21885
+ const sortedTypes = [...types].sort((a, b2) => {
21886
+ a = toEncoded(a);
21887
+ b2 = toEncoded(b2);
21888
+ const pa = getPriority(a);
21889
+ const pb = getPriority(b2);
21890
+ if (pa !== pb) return pa - pb;
21891
+ return indexMap.get(a) - indexMap.get(b2);
21892
+ });
21893
+ const orderChanged = sortedTypes.some((ast, index) => ast !== types[index]);
21894
+ if (!orderChanged) return types;
21895
+ return sortedTypes;
21896
+ };
21897
+ }
21806
21898
  function toCodecStringTree(schema) {
21807
21899
  return make18(serializerStringTree(schema.ast), {
21808
21900
  schema
21809
21901
  });
21810
21902
  }
21811
- function getStringTreePriority(ast) {
21903
+ var toStringTreeReorder = /* @__PURE__ */ makeReorder((ast) => {
21812
21904
  switch (ast._tag) {
21813
21905
  case "Null":
21814
21906
  case "Boolean":
@@ -21820,19 +21912,22 @@ function getStringTreePriority(ast) {
21820
21912
  default:
21821
21913
  return 1;
21822
21914
  }
21823
- }
21824
- var treeReorder = /* @__PURE__ */ makeReorder(getStringTreePriority);
21915
+ });
21825
21916
  function serializerTree(ast, recur2, onMissingAnnotation) {
21826
21917
  switch (ast._tag) {
21827
21918
  case "Declaration": {
21828
- const getLink = ast.annotations?.toCodecJson ?? ast.annotations?.toCodec;
21829
- if (isFunction(getLink)) {
21830
- const tps = isDeclaration(ast) ? ast.typeParameters.map((tp) => make18(recur2(toEncoded(tp)))) : [];
21831
- const link4 = getLink(tps);
21832
- const to2 = recur2(link4.to);
21833
- return replaceEncoding(ast, to2 === link4.to ? [link4] : [new Link(to2, link4.transformation)]);
21834
- }
21835
- return onMissingAnnotation(ast);
21919
+ const typeParameters = ast.typeParameters.map((tp) => make18(recur2(toEncoded(tp))));
21920
+ const getStringTreeLink = ast.annotations?.toCodecStringTree;
21921
+ if (isFunction(getStringTreeLink)) {
21922
+ const link5 = getStringTreeLink(typeParameters);
21923
+ if (link5 === void 0) return ast;
21924
+ return replaceEncoding(ast, [mapLink(link5, recur2)]);
21925
+ }
21926
+ const getJsonLink = ast.annotations?.toCodecJson;
21927
+ const jsonLink = isFunction(getJsonLink) ? getJsonLink(typeParameters) : void 0;
21928
+ const getLink = jsonLink === void 0 ? ast.annotations?.toCodec : void 0;
21929
+ const link4 = jsonLink ?? (isFunction(getLink) ? getLink(typeParameters) : void 0);
21930
+ return link4 === void 0 ? onMissingAnnotation(ast) : replaceEncoding(ast, [mapLink(link4, recur2)]);
21836
21931
  }
21837
21932
  case "Null":
21838
21933
  return replaceEncoding(ast, [nullToString]);
@@ -21849,15 +21944,11 @@ function serializerTree(ast, recur2, onMissingAnnotation) {
21849
21944
  case "BigInt":
21850
21945
  return ast.toCodecStringTree();
21851
21946
  case "Objects": {
21852
- if (ast.propertySignatures.some((ps2) => typeof ps2.name !== "string")) {
21853
- throw new globalThis.Error("Objects property names must be strings", {
21854
- cause: ast
21855
- });
21856
- }
21947
+ validateCanonicalObjectPropertyNames(ast);
21857
21948
  return ast.recur(recur2, parameterFromString);
21858
21949
  }
21859
21950
  case "Union": {
21860
- const sortedTypes = treeReorder(ast.types);
21951
+ const sortedTypes = toStringTreeReorder(ast.types);
21861
21952
  if (sortedTypes !== ast.types) {
21862
21953
  return new Union(sortedTypes, ast.mode, ast.annotations, ast.checks, ast.encoding, ast.context, ast.encodingChecks).recur(recur2);
21863
21954
  }
@@ -21877,16 +21968,24 @@ var serializerStringTree = /* @__PURE__ */ applyToSelfOrLastLinkEncoding((ast) =
21877
21968
  if (isSerializerArrayFromSingle(ast)) {
21878
21969
  return ast;
21879
21970
  }
21880
- const out = serializerTree(ast, serializerStringTree, (ast2) => replaceEncoding(ast2, [unknownToUndefined]));
21881
- if (out !== ast && isOptional(ast)) {
21882
- return optionalKeyLastLink(out);
21971
+ const out = serializerTree(ast, serializerStringTree, (ast2) => {
21972
+ throw new globalThis.Error("Missing structural codec for StringTree", {
21973
+ cause: ast2
21974
+ });
21975
+ });
21976
+ if (out !== ast && ast.context !== void 0) {
21977
+ return replaceContextLastLink(out, withoutConstructorDefault(ast.context));
21883
21978
  }
21884
21979
  return out;
21885
21980
  });
21886
- var unknownToUndefined = /* @__PURE__ */ new Link(undefined_3, /* @__PURE__ */ new Transformation(/* @__PURE__ */ passthrough2(), /* @__PURE__ */ transform(() => void 0)));
21887
- var Json2 = /* @__PURE__ */ make18(Json);
21981
+ var Json2 = /* @__PURE__ */ make18(/* @__PURE__ */ annotate(Json, {
21982
+ toCode: () => ({
21983
+ runtime: "Schema.Json",
21984
+ Type: "Schema.Json"
21985
+ })
21986
+ }));
21888
21987
 
21889
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/http/Cookies.js
21988
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/http/Cookies.js
21890
21989
  var TypeId29 = "~effect/http/Cookies";
21891
21990
  var CookieTypeId = "~effect/http/Cookies/Cookie";
21892
21991
  var Proto4 = {
@@ -21910,7 +22009,7 @@ var fromReadonlyRecord = (cookies) => {
21910
22009
  var fromIterable2 = (cookies) => {
21911
22010
  const record2 = {};
21912
22011
  for (const cookie of cookies) {
21913
- record2[cookie.name] = cookie;
22012
+ assignProperty(record2, cookie.name, cookie);
21914
22013
  }
21915
22014
  return fromReadonlyRecord(record2);
21916
22015
  };
@@ -22069,7 +22168,7 @@ var tryDecodeURIComponent = (str) => {
22069
22168
  }
22070
22169
  };
22071
22170
 
22072
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/http/Headers.js
22171
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/http/Headers.js
22073
22172
  var TypeId30 = /* @__PURE__ */ Symbol.for("~effect/http/Headers");
22074
22173
  var Proto5 = /* @__PURE__ */ Object.defineProperties(/* @__PURE__ */ Object.create(null), {
22075
22174
  [TypeId30]: {
@@ -22126,7 +22225,7 @@ var fromInput = (input) => {
22126
22225
  return out;
22127
22226
  };
22128
22227
  var fromRecordUnsafe = (input) => Object.setPrototypeOf(input, Proto5);
22129
- var set3 = /* @__PURE__ */ dual(3, (self, key, value3) => {
22228
+ var set2 = /* @__PURE__ */ dual(3, (self, key, value3) => {
22130
22229
  const out = make19(self);
22131
22230
  out[key.toLowerCase()] = value3;
22132
22231
  return out;
@@ -22176,7 +22275,7 @@ var CurrentRedactedNames = /* @__PURE__ */ Reference("effect/Headers/CurrentReda
22176
22275
  defaultValue: () => ["authorization", "cookie", "set-cookie", "x-api-key"]
22177
22276
  });
22178
22277
 
22179
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/http/HttpClientError.js
22278
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/http/HttpClientError.js
22180
22279
  var TypeId31 = "~effect/http/HttpClientError";
22181
22280
  var HttpClientError = class extends (/* @__PURE__ */ TaggedError2("HttpClientError")) {
22182
22281
  constructor(props) {
@@ -22311,7 +22410,7 @@ var EmptyBodyError = class extends (/* @__PURE__ */ TaggedError2("EmptyBodyError
22311
22410
  }
22312
22411
  };
22313
22412
 
22314
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/http/UrlParams.js
22413
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/http/UrlParams.js
22315
22414
  var TypeId32 = "~effect/http/UrlParams";
22316
22415
  var isUrlParams = (u2) => hasProperty(u2, TypeId32);
22317
22416
  var Proto6 = {
@@ -22392,7 +22491,7 @@ var setAll2 = /* @__PURE__ */ dual(2, (self, input) => {
22392
22491
  return out;
22393
22492
  });
22394
22493
 
22395
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/http/HttpBody.js
22494
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/http/HttpBody.js
22396
22495
  var TypeId33 = "~effect/http/HttpBody";
22397
22496
  var Proto7 = class {
22398
22497
  [TypeId33];
@@ -22419,10 +22518,10 @@ var Empty2 = class extends Proto7 {
22419
22518
  };
22420
22519
  var empty9 = /* @__PURE__ */ new Empty2();
22421
22520
 
22422
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/http/HttpMethod.js
22521
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/http/HttpMethod.js
22423
22522
  var allShort = [["GET", "get"], ["POST", "post"], ["PUT", "put"], ["DELETE", "del"], ["PATCH", "patch"], ["HEAD", "head"], ["OPTIONS", "options"], ["TRACE", "trace"]];
22424
22523
 
22425
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/http/Url.js
22524
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/http/Url.js
22426
22525
  var UrlError = class extends (/* @__PURE__ */ TaggedError2("UrlError")) {
22427
22526
  };
22428
22527
  var make21 = (url, params, hash2) => try_({
@@ -22450,7 +22549,7 @@ var baseUrl = () => {
22450
22549
  return void 0;
22451
22550
  };
22452
22551
 
22453
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/http/HttpClientRequest.js
22552
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/http/HttpClientRequest.js
22454
22553
  var TypeId34 = "~effect/http/HttpClientRequest";
22455
22554
  var Proto8 = {
22456
22555
  [TypeId34]: TypeId34,
@@ -22515,7 +22614,7 @@ var modify = /* @__PURE__ */ dual(2, (self, options) => {
22515
22614
  return result3;
22516
22615
  });
22517
22616
  var setMethod = /* @__PURE__ */ dual(2, (self, method) => makeWith(method, self.url, self.urlParams, self.hash, self.headers, self.body));
22518
- var setHeader = /* @__PURE__ */ dual(3, (self, key, value3) => makeWith(self.method, self.url, self.urlParams, self.hash, set3(self.headers, key, value3), self.body));
22617
+ var setHeader = /* @__PURE__ */ dual(3, (self, key, value3) => makeWith(self.method, self.url, self.urlParams, self.hash, set2(self.headers, key, value3), self.body));
22519
22618
  var setHeaders = /* @__PURE__ */ dual(2, (self, input) => makeWith(self.method, self.url, self.urlParams, self.hash, setAll(self.headers, input), self.body));
22520
22619
  var accept = /* @__PURE__ */ dual(2, (self, mediaType) => setHeader(self, "Accept", mediaType));
22521
22620
  var acceptJson = /* @__PURE__ */ accept("application/json");
@@ -22549,16 +22648,16 @@ var setBody = /* @__PURE__ */ dual(2, (self, body) => {
22549
22648
  headers = remove2(remove2(headers, "Content-Type"), "Content-length");
22550
22649
  } else {
22551
22650
  if (body.contentType) {
22552
- headers = set3(headers, "content-type", body.contentType);
22651
+ headers = set2(headers, "content-type", body.contentType);
22553
22652
  }
22554
22653
  if (body.contentLength !== void 0) {
22555
- headers = set3(headers, "content-length", body.contentLength.toString());
22654
+ headers = set2(headers, "content-length", body.contentLength.toString());
22556
22655
  }
22557
22656
  }
22558
22657
  return makeWith(self.method, self.url, self.urlParams, self.hash, headers, body);
22559
22658
  });
22560
22659
 
22561
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/http/HttpIncomingMessage.js
22660
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/http/HttpIncomingMessage.js
22562
22661
  var TypeId35 = "~effect/http/HttpIncomingMessage";
22563
22662
  var inspect = (self, that) => {
22564
22663
  const contentType = self.headers["content-type"] ?? "";
@@ -22585,7 +22684,7 @@ var inspect = (self, that) => {
22585
22684
  return obj;
22586
22685
  };
22587
22686
 
22588
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/http/HttpClientResponse.js
22687
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/http/HttpClientResponse.js
22589
22688
  var TypeId36 = "~effect/http/HttpClientResponse";
22590
22689
  var fromWeb = (request5, source) => new WebHttpClientResponse(request5, source);
22591
22690
  var stream2 = (effect2) => unwrap3(map6(effect2, (self) => self.stream));
@@ -22727,7 +22826,7 @@ var WebHttpClientResponse = class extends Class2 {
22727
22826
  }
22728
22827
  };
22729
22828
 
22730
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/http/HttpTraceContext.js
22829
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/http/HttpTraceContext.js
22731
22830
  var toHeaders = (span) => fromRecordUnsafe({
22732
22831
  b3: `${span.traceId}-${span.spanId}-${span.sampled ? "1" : "0"}${match(span.parent, {
22733
22832
  onNone: () => "",
@@ -22736,7 +22835,7 @@ var toHeaders = (span) => fromRecordUnsafe({
22736
22835
  traceparent: `00-${span.traceId}-${span.spanId}-${span.sampled ? "01" : "00"}`
22737
22836
  });
22738
22837
 
22739
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/http/HttpClient.js
22838
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/http/HttpClient.js
22740
22839
  var TypeId37 = "~effect/http/HttpClient";
22741
22840
  var HttpClient = /* @__PURE__ */ Service("effect/HttpClient");
22742
22841
  var transformResponse = /* @__PURE__ */ dual(2, (self, f2) => makeWith2((request5) => f2(self.postprocess(request5)), self.preprocess));
@@ -22943,7 +23042,7 @@ var InterruptibleResponse = class {
22943
23042
  }
22944
23043
  };
22945
23044
 
22946
- // ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.101_effect@4.0.0-beta.101/node_modules/@effect/platform-node-shared/dist/NodeSink.js
23045
+ // ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.102_effect@4.0.0-beta.102/node_modules/@effect/platform-node-shared/dist/NodeSink.js
22947
23046
  var fromWritable = (options) => fromChannel2(mapDone(fromWritableChannel(options), (_2) => [_2]));
22948
23047
  var fromWritableChannel = (options) => fromTransform((pull) => {
22949
23048
  const writable = options.evaluate();
@@ -22983,7 +23082,7 @@ var pullIntoWritable = (options) => options.pull.pipe(flatMap3((chunk) => {
22983
23082
  });
22984
23083
  }) : identity);
22985
23084
 
22986
- // ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.101_effect@4.0.0-beta.101/node_modules/@effect/platform-node-shared/dist/NodeStream.js
23085
+ // ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.102_effect@4.0.0-beta.102/node_modules/@effect/platform-node-shared/dist/NodeStream.js
22987
23086
  var fromReadable = (options) => fromChannel3(fromReadableChannel(options));
22988
23087
  var fromReadableChannel = (options) => fromTransform((_2, scope3) => readableToPullUnsafe({
22989
23088
  scope: scope3,
@@ -23042,7 +23141,7 @@ var readableToPullUnsafe = (options) => {
23042
23141
  };
23043
23142
  var defaultOnError = (error2) => new UnknownError2(error2);
23044
23143
 
23045
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/http/FetchHttpClient.js
23144
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/http/FetchHttpClient.js
23046
23145
  var Fetch = /* @__PURE__ */ Reference("effect/http/FetchHttpClient/Fetch", {
23047
23146
  defaultValue: () => globalThis.fetch
23048
23147
  });
@@ -23084,7 +23183,7 @@ var fetch = /* @__PURE__ */ make23((request5, url, signal, fiber3) => {
23084
23183
  });
23085
23184
  var layer2 = /* @__PURE__ */ layerMergedContext(/* @__PURE__ */ succeed6(fetch));
23086
23185
 
23087
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Runtime.js
23186
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Runtime.js
23088
23187
  var defaultTeardown = (exit3, onExit4) => {
23089
23188
  if (isSuccess4(exit3)) return onExit4(0);
23090
23189
  if (hasInterruptsOnly2(exit3.cause)) return onExit4(130);
@@ -23130,7 +23229,7 @@ var getErrorReported = (u2) => {
23130
23229
  return true;
23131
23230
  };
23132
23231
 
23133
- // ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.101_effect@4.0.0-beta.101/node_modules/@effect/platform-node-shared/dist/NodeRuntime.js
23232
+ // ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.102_effect@4.0.0-beta.102/node_modules/@effect/platform-node-shared/dist/NodeRuntime.js
23134
23233
  var runMain = /* @__PURE__ */ makeRunMain(({
23135
23234
  fiber: fiber3,
23136
23235
  teardown
@@ -23153,10 +23252,10 @@ var runMain = /* @__PURE__ */ makeRunMain(({
23153
23252
  process.on("SIGTERM", onSigint);
23154
23253
  });
23155
23254
 
23156
- // ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.101_effect@4.0.0-beta.101_ioredis@5.11.1/node_modules/@effect/platform-node/dist/NodeRuntime.js
23255
+ // ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.102_effect@4.0.0-beta.102_ioredis@5.11.1/node_modules/@effect/platform-node/dist/NodeRuntime.js
23157
23256
  var runMain2 = runMain;
23158
23257
 
23159
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Path.js
23258
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Path.js
23160
23259
  var Path_exports = {};
23161
23260
  __export(Path_exports, {
23162
23261
  Path: () => Path,
@@ -23630,7 +23729,7 @@ var posixImpl = /* @__PURE__ */ Path.of({
23630
23729
  });
23631
23730
  var layer3 = /* @__PURE__ */ succeed5(Path)(posixImpl);
23632
23731
 
23633
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/process/ChildProcessSpawner.js
23732
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/process/ChildProcessSpawner.js
23634
23733
  var ExitCode = /* @__PURE__ */ nominal();
23635
23734
  var ProcessId = /* @__PURE__ */ nominal();
23636
23735
  var HandleTypeId = "~effect/ChildProcessSpawner/ChildProcessHandle";
@@ -23644,7 +23743,9 @@ var HandleProto = {
23644
23743
  };
23645
23744
  }
23646
23745
  };
23647
- var makeHandle = (params) => Object.assign(Object.create(HandleProto), params);
23746
+ var makeHandle = (params) => Object.setPrototypeOf({
23747
+ ...params
23748
+ }, HandleProto);
23648
23749
  var make24 = (spawn2) => {
23649
23750
  const streamString = (command2, options) => spawn2(command2).pipe(map6((handle) => decodeText(options?.includeStderr === true ? handle.all : handle.stdout)), unwrap3);
23650
23751
  const streamLines = (command2, options) => splitLines2(streamString(command2, options));
@@ -23660,7 +23761,7 @@ var make24 = (spawn2) => {
23660
23761
  var ChildProcessSpawner = class extends (/* @__PURE__ */ Service()("effect/process/ChildProcessSpawner")) {
23661
23762
  };
23662
23763
 
23663
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/process/ChildProcess.js
23764
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/process/ChildProcess.js
23664
23765
  var TypeId39 = "~effect/unstable/process/ChildProcess";
23665
23766
  var Proto10 = {
23666
23767
  .../* @__PURE__ */ Prototype2({
@@ -23784,7 +23885,7 @@ var splitByWhitespaces = (template, rawTemplate) => {
23784
23885
  };
23785
23886
  var concatTokens = (prevTokens, nextTokens, isSeparated) => isSeparated || prevTokens.length === 0 || nextTokens.length === 0 ? [...prevTokens, ...nextTokens] : [...prevTokens.slice(0, -1), `${prevTokens.at(-1)}${nextTokens.at(0)}`, ...nextTokens.slice(1)];
23786
23887
 
23787
- // ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.101_effect@4.0.0-beta.101/node_modules/@effect/platform-node-shared/dist/internal/utils.js
23888
+ // ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.102_effect@4.0.0-beta.102/node_modules/@effect/platform-node-shared/dist/internal/utils.js
23788
23889
  var handleErrnoException = (module, method) => (err, [path5]) => {
23789
23890
  let reason = "Unknown";
23790
23891
  switch (err.code) {
@@ -23820,7 +23921,7 @@ var handleErrnoException = (module, method) => (err, [path5]) => {
23820
23921
  });
23821
23922
  };
23822
23923
 
23823
- // ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.101_effect@4.0.0-beta.101/node_modules/@effect/platform-node-shared/dist/NodeChildProcessSpawner.js
23924
+ // ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.102_effect@4.0.0-beta.102/node_modules/@effect/platform-node-shared/dist/NodeChildProcessSpawner.js
23824
23925
  var toError = (error2) => error2 instanceof globalThis.Error ? error2 : new globalThis.Error(String(error2));
23825
23926
  var toPlatformError = (method, error2, command2) => {
23826
23927
  const {
@@ -24301,7 +24402,7 @@ var flattenCommand = (command2) => {
24301
24402
  };
24302
24403
  };
24303
24404
 
24304
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Crypto.js
24405
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Crypto.js
24305
24406
  var TypeId40 = "~effect/platform/Crypto";
24306
24407
  var Crypto = /* @__PURE__ */ Service("effect/Crypto");
24307
24408
  var make28 = (impl) => {
@@ -24401,7 +24502,7 @@ var make29 = /* @__PURE__ */ make28({
24401
24502
  });
24402
24503
  var layer5 = /* @__PURE__ */ succeed5(Crypto, make29);
24403
24504
 
24404
- // ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.101_effect@4.0.0-beta.101_ioredis@5.11.1/node_modules/@effect/platform-node/dist/NodeCrypto.js
24505
+ // ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.102_effect@4.0.0-beta.102_ioredis@5.11.1/node_modules/@effect/platform-node/dist/NodeCrypto.js
24405
24506
  var layer6 = layer5;
24406
24507
  var handleBadArgument = (method) => (err) => badArgument({
24407
24508
  module: "FileSystem",
@@ -24781,7 +24882,7 @@ var makeFileSystem = /* @__PURE__ */ map6(/* @__PURE__ */ serviceOption2(WatchBa
24781
24882
  }));
24782
24883
  var layer7 = /* @__PURE__ */ effect(FileSystem)(makeFileSystem);
24783
24884
 
24784
- // ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.101_effect@4.0.0-beta.101_ioredis@5.11.1/node_modules/@effect/platform-node/dist/NodeFileSystem.js
24885
+ // ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.102_effect@4.0.0-beta.102_ioredis@5.11.1/node_modules/@effect/platform-node/dist/NodeFileSystem.js
24785
24886
  var layer8 = layer7;
24786
24887
  var fromFileUrl2 = (url) => try_3({
24787
24888
  try: () => NodeUrl__namespace.fileURLToPath(url),
@@ -24806,10 +24907,10 @@ var layer9 = /* @__PURE__ */ succeed5(Path)({
24806
24907
  toFileUrl: toFileUrl2
24807
24908
  });
24808
24909
 
24809
- // ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.101_effect@4.0.0-beta.101_ioredis@5.11.1/node_modules/@effect/platform-node/dist/NodePath.js
24910
+ // ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.102_effect@4.0.0-beta.102_ioredis@5.11.1/node_modules/@effect/platform-node/dist/NodePath.js
24810
24911
  var layer10 = layer9;
24811
24912
 
24812
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Stdio.js
24913
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Stdio.js
24813
24914
  var TypeId41 = "~effect/Stdio";
24814
24915
  var Stdio = /* @__PURE__ */ Service(TypeId41);
24815
24916
  var make30 = (options) => ({
@@ -24817,7 +24918,7 @@ var make30 = (options) => ({
24817
24918
  ...options
24818
24919
  });
24819
24920
 
24820
- // ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.101_effect@4.0.0-beta.101/node_modules/@effect/platform-node-shared/dist/NodeStdio.js
24921
+ // ../../node_modules/.pnpm/@effect+platform-node-shared@4.0.0-beta.102_effect@4.0.0-beta.102/node_modules/@effect/platform-node-shared/dist/NodeStdio.js
24821
24922
  var layer11 = /* @__PURE__ */ succeed5(Stdio, /* @__PURE__ */ make30({
24822
24923
  args: /* @__PURE__ */ sync2(() => process.argv.slice(2)),
24823
24924
  stdout: (options) => fromWritable({
@@ -24852,10 +24953,10 @@ var layer11 = /* @__PURE__ */ succeed5(Stdio, /* @__PURE__ */ make30({
24852
24953
  })
24853
24954
  }));
24854
24955
 
24855
- // ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.101_effect@4.0.0-beta.101_ioredis@5.11.1/node_modules/@effect/platform-node/dist/NodeStdio.js
24956
+ // ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.102_effect@4.0.0-beta.102_ioredis@5.11.1/node_modules/@effect/platform-node/dist/NodeStdio.js
24856
24957
  var layer12 = layer11;
24857
24958
 
24858
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Terminal.js
24959
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Terminal.js
24859
24960
  var TypeId42 = "~effect/platform/Terminal";
24860
24961
  var QuitErrorTypeId = "effect/platform/Terminal/QuitError";
24861
24962
  var QuitError = class extends (/* @__PURE__ */ ErrorClass("QuitError")({
@@ -24945,13 +25046,13 @@ function defaultShouldQuit(input) {
24945
25046
  return input.key.ctrl && (input.key.name === "c" || input.key.name === "d");
24946
25047
  }
24947
25048
 
24948
- // ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.101_effect@4.0.0-beta.101_ioredis@5.11.1/node_modules/@effect/platform-node/dist/NodeTerminal.js
25049
+ // ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.102_effect@4.0.0-beta.102_ioredis@5.11.1/node_modules/@effect/platform-node/dist/NodeTerminal.js
24949
25050
  var layer14 = layer13;
24950
25051
 
24951
- // ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.101_effect@4.0.0-beta.101_ioredis@5.11.1/node_modules/@effect/platform-node/dist/NodeServices.js
25052
+ // ../../node_modules/.pnpm/@effect+platform-node@4.0.0-beta.102_effect@4.0.0-beta.102_ioredis@5.11.1/node_modules/@effect/platform-node/dist/NodeServices.js
24952
25053
  var layer15 = /* @__PURE__ */ provideMerge(layer4, /* @__PURE__ */ mergeAll2(layer8, layer6, layer10, layer12, layer14));
24953
25054
 
24954
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/ConfigProvider.js
25055
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/ConfigProvider.js
24955
25056
  function makeValue(value3) {
24956
25057
  return {
24957
25058
  _tag: "Value",
@@ -25019,8 +25120,8 @@ function buildEnvTrie(env) {
25019
25120
  const segments = name.split("_");
25020
25121
  let node = trie;
25021
25122
  for (const seg of segments) {
25022
- node.children ??= {};
25023
- node = node.children[seg] ??= {};
25123
+ const children = node.children ??= /* @__PURE__ */ Object.create(null);
25124
+ node = children[seg] ??= {};
25024
25125
  }
25025
25126
  }
25026
25127
  return trie;
@@ -25028,7 +25129,7 @@ function buildEnvTrie(env) {
25028
25129
  var NUMERIC_INDEX = /^(0|[1-9][0-9]*)$/;
25029
25130
  function nodeAtEnv(trie, env, path5, preserveEmptyStrings) {
25030
25131
  const key = path5.map(String).join("_");
25031
- const leafValue = emptyStringAsMissing(env[key]);
25132
+ const leafValue = emptyStringAsMissing(Object.hasOwn(env, key) ? env[key] : void 0);
25032
25133
  const trieNode = trieNodeAt(trie, path5);
25033
25134
  const children = trieNode?.children ? Object.keys(trieNode.children) : [];
25034
25135
  if (children.length === 0) {
@@ -25051,7 +25152,7 @@ function trieNodeAt(root, path5) {
25051
25152
  return node;
25052
25153
  }
25053
25154
 
25054
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Config.js
25155
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Config.js
25055
25156
  var TypeId43 = "~effect/Config";
25056
25157
  var ConfigError = class {
25057
25158
  _tag = "ConfigError";
@@ -25143,7 +25244,7 @@ function succeed8(value3) {
25143
25244
  return make34(() => succeed6(value3));
25144
25245
  }
25145
25246
 
25146
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/Console.js
25247
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/Console.js
25147
25248
  var Console = ConsoleRef;
25148
25249
  var consoleWith = (f2) => withFiber((fiber3) => f2(fiber3.getRef(Console)));
25149
25250
  var error = (...args2) => consoleWith((console2) => sync(() => {
@@ -25153,7 +25254,7 @@ var log2 = (...args2) => consoleWith((console2) => sync(() => {
25153
25254
  console2.log(...args2);
25154
25255
  }));
25155
25256
 
25156
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/cli/Argument.js
25257
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/cli/Argument.js
25157
25258
  var Argument_exports = {};
25158
25259
  __export(Argument_exports, {
25159
25260
  atLeast: () => atLeast2,
@@ -25190,7 +25291,7 @@ __export(Argument_exports, {
25190
25291
  withSchema: () => withSchema2
25191
25292
  });
25192
25293
 
25193
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/cli/CliError.js
25294
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/cli/CliError.js
25194
25295
  var TypeId44 = "~effect/cli/CliError";
25195
25296
  var isCliError = (u2) => hasProperty(u2, TypeId44);
25196
25297
  var UnrecognizedOption = class extends (/* @__PURE__ */ TaggedErrorClass(`${TypeId44}/UnrecognizedOption`)("UnrecognizedOption", {
@@ -25274,6 +25375,25 @@ var MissingArgument = class extends (/* @__PURE__ */ TaggedErrorClass(`${TypeId4
25274
25375
  return `Missing required argument: ${this.argument}`;
25275
25376
  }
25276
25377
  };
25378
+ var UnexpectedArgument = class extends (/* @__PURE__ */ TaggedErrorClass(`${TypeId44}/UnexpectedArgument`)("UnexpectedArgument", {
25379
+ arguments: /* @__PURE__ */ ArraySchema(String4)
25380
+ })) {
25381
+ /**
25382
+ * Marks this value as an unexpected CLI argument error for runtime guards.
25383
+ *
25384
+ * @since 4.0.0
25385
+ */
25386
+ [TypeId44] = TypeId44;
25387
+ /**
25388
+ * Formats the unexpected positional arguments for display.
25389
+ *
25390
+ * @since 4.0.0
25391
+ */
25392
+ get message() {
25393
+ const label = this.arguments.length === 1 ? "argument" : "arguments";
25394
+ return `Unexpected positional ${label}: ${this.arguments.map((value3) => JSON.stringify(value3)).join(", ")}`;
25395
+ }
25396
+ };
25277
25397
  var InvalidValue2 = class extends (/* @__PURE__ */ TaggedErrorClass(`${TypeId44}/InvalidValue`)("InvalidValue", {
25278
25398
  option: String4,
25279
25399
  value: String4,
@@ -25336,7 +25456,7 @@ var UserError = class extends (/* @__PURE__ */ TaggedErrorClass(`${TypeId44}/Use
25336
25456
  */
25337
25457
  [TypeId44] = TypeId44;
25338
25458
  };
25339
- var NonShowHelpErrors = /* @__PURE__ */ Union2([UnrecognizedOption, DuplicateOption, MissingOption, MissingArgument, InvalidValue2, UnknownSubcommand, UserError]);
25459
+ var NonShowHelpErrors = /* @__PURE__ */ Union2([UnrecognizedOption, DuplicateOption, MissingOption, MissingArgument, UnexpectedArgument, InvalidValue2, UnknownSubcommand, UserError]);
25340
25460
  var ShowHelp = class extends (/* @__PURE__ */ TaggedErrorClass(`${TypeId44}/ShowHelp`)("ShowHelp", {
25341
25461
  commandPath: /* @__PURE__ */ ArraySchema(String4),
25342
25462
  errors: /* @__PURE__ */ ArraySchema(NonShowHelpErrors)
@@ -25349,7 +25469,7 @@ var ShowHelp = class extends (/* @__PURE__ */ TaggedErrorClass(`${TypeId44}/Show
25349
25469
  }
25350
25470
  };
25351
25471
 
25352
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/cli/Primitive.js
25472
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/cli/Primitive.js
25353
25473
  var Ini = __toESM(require_ini());
25354
25474
  var Toml = __toESM(require_toml());
25355
25475
  var Yaml = __toESM(require_dist());
@@ -25374,7 +25494,7 @@ var makeSchemaPrimitive = (tag2, schema) => {
25374
25494
  var boolean2 = /* @__PURE__ */ makeSchemaPrimitive("Boolean", Boolean4);
25375
25495
  var float = /* @__PURE__ */ makeSchemaPrimitive("Float", Finite);
25376
25496
  var integer = /* @__PURE__ */ makeSchemaPrimitive("Integer", Int);
25377
- var date = /* @__PURE__ */ makeSchemaPrimitive("Date", DateValid);
25497
+ var date = /* @__PURE__ */ makeSchemaPrimitive("Date", Date4);
25378
25498
  var string3 = /* @__PURE__ */ makePrimitive2("String", (value3) => succeed6(value3));
25379
25499
  var choice = (choices) => {
25380
25500
  const choiceMap = new Map(choices);
@@ -25500,7 +25620,7 @@ var getTypeName = (primitive) => {
25500
25620
  };
25501
25621
  var getChoiceKeys = (primitive) => primitive._tag === "Choice" ? primitive.choiceKeys : void 0;
25502
25622
 
25503
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/cli/Prompt.js
25623
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/cli/Prompt.js
25504
25624
  var Prompt_exports = {};
25505
25625
  __export(Prompt_exports, {
25506
25626
  all: () => all3,
@@ -25526,7 +25646,7 @@ __export(Prompt_exports, {
25526
25646
  toggle: () => toggle
25527
25647
  });
25528
25648
 
25529
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/cli/internal/ansi.js
25649
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/cli/internal/ansi.js
25530
25650
  var ESC = "\x1B[";
25531
25651
  var BEL = "\x07";
25532
25652
  var reset = `${ESC}0m`;
@@ -25587,7 +25707,7 @@ var eraseLines = (rows) => {
25587
25707
  return command2;
25588
25708
  };
25589
25709
 
25590
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/cli/Prompt.js
25710
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/cli/Prompt.js
25591
25711
  var TypeId46 = "~effect/cli/Prompt";
25592
25712
  var isPrompt = (u2) => hasProperty(u2, TypeId46);
25593
25713
  var defaultFigures = {
@@ -28089,7 +28209,7 @@ var entriesToDisplay = (cursor, total, maxVisible) => {
28089
28209
  };
28090
28210
  };
28091
28211
 
28092
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/cli/Param.js
28212
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/cli/Param.js
28093
28213
  var TypeId47 = "~effect/cli/Param";
28094
28214
  var argumentKind = "argument";
28095
28215
  var flagKind = "flag";
@@ -28105,14 +28225,14 @@ var isParam = (u2) => hasProperty(u2, TypeId47);
28105
28225
  var isFlagParam = (single) => single.kind === "flag";
28106
28226
  var makeSingle2 = (params) => {
28107
28227
  const parse4 = (args2) => params.kind === argumentKind ? parsePositional(params.name, params.primitiveType, args2) : parseFlag(params.name, params.primitiveType, args2);
28108
- return Object.assign(Object.create(Proto14), {
28228
+ return Object.setPrototypeOf({
28109
28229
  _tag: "Single",
28110
28230
  ...params,
28111
28231
  description: params.description ?? none2(),
28112
28232
  aliases: params.aliases ?? [],
28113
28233
  hidden: params.hidden ?? false,
28114
28234
  parse: parse4
28115
- });
28235
+ }, Proto14);
28116
28236
  };
28117
28237
  var string4 = (kind, name) => makeSingle2({
28118
28238
  name,
@@ -28190,7 +28310,7 @@ var keyValuePair2 = (kind, name) => map12(variadic(makeSingle2({
28190
28310
  kind
28191
28311
  }), {
28192
28312
  min: 1
28193
- }), (objects) => Object.assign({}, ...objects));
28313
+ }), (objects) => Object.fromEntries(objects.flatMap(Object.entries)));
28194
28314
  var none4 = (kind) => makeSingle2({
28195
28315
  name: "__none__",
28196
28316
  primitiveType: none3,
@@ -28534,7 +28654,7 @@ var getParamMetadata = (param) => {
28534
28654
  });
28535
28655
  };
28536
28656
 
28537
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/cli/Argument.js
28657
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/cli/Argument.js
28538
28658
  var string5 = (name) => string4(argumentKind, name);
28539
28659
  var integer4 = (name) => integer3(argumentKind, name);
28540
28660
  var file4 = (name, options) => file3(argumentKind, name, options);
@@ -28568,7 +28688,7 @@ var filterMap4 = /* @__PURE__ */ dual(3, (self, f2, onNone) => filterMap3(self,
28568
28688
  var orElse3 = /* @__PURE__ */ dual(2, (self, that) => orElse2(self, that));
28569
28689
  var orElseResult2 = /* @__PURE__ */ dual(2, (self, that) => orElseResult(self, that));
28570
28690
 
28571
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/cli/CliOutput.js
28691
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/cli/CliOutput.js
28572
28692
  var Formatter = /* @__PURE__ */ Reference("effect/cli/CliOutput", {
28573
28693
  defaultValue: () => defaultFormatter2()
28574
28694
  });
@@ -28760,7 +28880,7 @@ var formatHelpDocImpl = (doc, colors2) => {
28760
28880
  return sections.join("\n");
28761
28881
  };
28762
28882
 
28763
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/cli/internal/completions/bash.js
28883
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/cli/internal/completions/bash.js
28764
28884
  var escapeForBash = (s3) => s3.replace(/'/g, "'\\''");
28765
28885
  var sanitizeFunctionName = (s3) => s3.replace(/[^a-zA-Z0-9_]/g, "_");
28766
28886
  var flagNamesForWordlist = (flag) => {
@@ -28922,7 +29042,7 @@ var generate = (executableName, descriptor) => {
28922
29042
  return lines2.join("\n");
28923
29043
  };
28924
29044
 
28925
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/cli/internal/completions/fish.js
29045
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/cli/internal/completions/fish.js
28926
29046
  var escapeFishString = (s3) => s3.replace(/'/g, "\\'");
28927
29047
  var subcommandCondition = (parentPath, childSubcommandNames) => {
28928
29048
  if (parentPath.length === 0) {
@@ -29090,7 +29210,7 @@ var generate2 = (executableName, descriptor) => {
29090
29210
  return lines2.join("\n");
29091
29211
  };
29092
29212
 
29093
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/cli/internal/completions/zsh.js
29213
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/cli/internal/completions/zsh.js
29094
29214
  var escapeZsh = (s3) => s3.replace(/\\/g, "\\\\").replace(/'/g, "'\\''").replace(/:/g, "\\:");
29095
29215
  var sanitize = (s3) => s3.replace(/[^a-zA-Z0-9_]/g, "_");
29096
29216
  var allForms = (flag) => {
@@ -29248,7 +29368,7 @@ var generate3 = (executableName, descriptor) => {
29248
29368
  return lines2.join("\n");
29249
29369
  };
29250
29370
 
29251
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/cli/Completions.js
29371
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/cli/Completions.js
29252
29372
  var generate4 = (executableName, shell, descriptor) => {
29253
29373
  switch (shell) {
29254
29374
  case "bash":
@@ -29260,7 +29380,7 @@ var generate4 = (executableName, shell, descriptor) => {
29260
29380
  }
29261
29381
  };
29262
29382
 
29263
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/cli/Flag.js
29383
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/cli/Flag.js
29264
29384
  var Flag_exports = {};
29265
29385
  __export(Flag_exports, {
29266
29386
  atLeast: () => atLeast3,
@@ -29335,15 +29455,15 @@ var orElse4 = /* @__PURE__ */ dual(2, (self, that) => orElse2(self, that));
29335
29455
  var orElseResult3 = /* @__PURE__ */ dual(2, (self, that) => orElseResult(self, that));
29336
29456
  var withSchema3 = /* @__PURE__ */ dual(2, (self, schema) => withSchema(self, schema));
29337
29457
 
29338
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/cli/internal/config.js
29458
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/cli/internal/config.js
29339
29459
  var ConfigInternalTypeId = "~effect/cli/Command/Config/Internal";
29340
29460
  var parseConfig = (config) => {
29341
29461
  const orderedParams = [];
29342
29462
  const flags = [];
29343
29463
  const args2 = [];
29344
29464
  function parse4(config2) {
29345
- const tree = {};
29346
- for (const key in config2) {
29465
+ const tree = /* @__PURE__ */ Object.create(null);
29466
+ for (const key of Object.keys(config2)) {
29347
29467
  tree[key] = parseValue(config2[key]);
29348
29468
  }
29349
29469
  return tree;
@@ -29402,8 +29522,8 @@ var shiftNodeIndexes = (node, offset) => {
29402
29522
  }
29403
29523
  };
29404
29524
  var shiftTreeIndexes = (tree, offset) => {
29405
- const output = {};
29406
- for (const key in tree) {
29525
+ const output = /* @__PURE__ */ Object.create(null);
29526
+ for (const key of Object.keys(tree)) {
29407
29527
  output[key] = shiftNodeIndexes(tree[key], offset);
29408
29528
  }
29409
29529
  return output;
@@ -29415,16 +29535,13 @@ var mergeConfig = (left, right) => {
29415
29535
  flags: [...left.flags, ...right.flags],
29416
29536
  arguments: [...left.arguments, ...right.arguments],
29417
29537
  orderedParams: [...left.orderedParams, ...right.orderedParams],
29418
- tree: {
29419
- ...left.tree,
29420
- ...shiftTreeIndexes(right.tree, offset)
29421
- }
29538
+ tree: Object.assign(/* @__PURE__ */ Object.create(null), left.tree, shiftTreeIndexes(right.tree, offset))
29422
29539
  };
29423
29540
  };
29424
29541
  var reconstructTree = (tree, results) => {
29425
29542
  const output = {};
29426
- for (const key in tree) {
29427
- output[key] = nodeValue(tree[key]);
29543
+ for (const key of Object.keys(tree)) {
29544
+ assignProperty(output, key, nodeValue(tree[key]));
29428
29545
  }
29429
29546
  return output;
29430
29547
  function nodeValue(node) {
@@ -29439,7 +29556,7 @@ var reconstructTree = (tree, results) => {
29439
29556
  }
29440
29557
  };
29441
29558
 
29442
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/cli/internal/command.js
29559
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/cli/internal/command.js
29443
29560
  var TypeId48 = "~effect/cli/Command";
29444
29561
  var toImpl = (self) => self;
29445
29562
  var Proto15 = {
@@ -29462,7 +29579,9 @@ var makeCommand = (options) => {
29462
29579
  errors: []
29463
29580
  }));
29464
29581
  const parse4 = options.parse ?? makeParser(config);
29465
- const parseContext = options.parseContext ?? makeParser(contextConfig);
29582
+ const parseContext = options.parseContext ?? makeParser(contextConfig, {
29583
+ allowLeftovers: true
29584
+ });
29466
29585
  const buildHelpDoc = (commandPath) => {
29467
29586
  const args2 = [];
29468
29587
  const flags = [];
@@ -29572,12 +29691,17 @@ var appendChoiceKeys = (description, choiceKeys) => {
29572
29691
  onSome: (value3) => some2(`${value3} ${choiceSuffix}`)
29573
29692
  });
29574
29693
  };
29575
- var makeParser = (cfg) => fnUntraced2(function* (input) {
29694
+ var makeParser = (cfg, options) => fnUntraced2(function* (input) {
29576
29695
  const parsedArgs = {
29577
29696
  flags: input.flags,
29578
29697
  arguments: input.arguments
29579
29698
  };
29580
- const values = yield* parseParams(parsedArgs, cfg.orderedParams);
29699
+ const [remainingArguments, values] = yield* parseParams(parsedArgs, cfg.orderedParams);
29700
+ if (options?.allowLeftovers !== true && remainingArguments.length > 0) {
29701
+ return yield* new UnexpectedArgument({
29702
+ arguments: remainingArguments
29703
+ });
29704
+ }
29581
29705
  return reconstructTree(cfg.tree, values);
29582
29706
  });
29583
29707
  var parseParams = /* @__PURE__ */ fnUntraced2(function* (parsedArgs, params) {
@@ -29591,7 +29715,7 @@ var parseParams = /* @__PURE__ */ fnUntraced2(function* (parsedArgs, params) {
29591
29715
  results.push(parsed);
29592
29716
  currentArguments = remainingArguments;
29593
29717
  }
29594
- return results;
29718
+ return [currentArguments, results];
29595
29719
  });
29596
29720
  var checkForDuplicateFlags = (parent, subcommands, options) => {
29597
29721
  const parentImpl = toImpl(parent);
@@ -29622,7 +29746,7 @@ var checkForDuplicateFlags = (parent, subcommands, options) => {
29622
29746
  }
29623
29747
  };
29624
29748
 
29625
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/cli/internal/completions/descriptor.js
29749
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/cli/internal/completions/descriptor.js
29626
29750
  var toFlagType = (single) => {
29627
29751
  const tag2 = single.primitiveType._tag;
29628
29752
  switch (tag2) {
@@ -29747,7 +29871,7 @@ var fromCommand = (cmd) => {
29747
29871
  };
29748
29872
  };
29749
29873
 
29750
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/cli/internal/help.js
29874
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/cli/internal/help.js
29751
29875
  var dedupeGlobalFlags = (flags) => {
29752
29876
  const seen = /* @__PURE__ */ new Set();
29753
29877
  const deduped = [];
@@ -29850,7 +29974,7 @@ var getHelpForCommandPath = (command2, commandPath, builtIns) => gen2(function*
29850
29974
  };
29851
29975
  });
29852
29976
 
29853
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/cli/GlobalFlag.js
29977
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/cli/GlobalFlag.js
29854
29978
  var action = (options) => ({
29855
29979
  _tag: "Action",
29856
29980
  flag: options.flag,
@@ -29907,7 +30031,7 @@ var LogLevel = /* @__PURE__ */ setting("log-level")({
29907
30031
  });
29908
30032
  var BuiltIns = [Help, Version, Wizard, Completions, LogLevel];
29909
30033
 
29910
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/cli/CliConfig.js
30034
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/cli/CliConfig.js
29911
30035
  var CliConfig = class extends (/* @__PURE__ */ Reference("effect/unstable/cli/CliConfig", {
29912
30036
  defaultValue: () => defaults
29913
30037
  })) {
@@ -29916,7 +30040,7 @@ var defaults = {
29916
30040
  builtIns: BuiltIns
29917
30041
  };
29918
30042
 
29919
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/cli/Command.js
30043
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/cli/Command.js
29920
30044
  var Command_exports = {};
29921
30045
  __export(Command_exports, {
29922
30046
  annotate: () => annotate3,
@@ -29941,7 +30065,7 @@ __export(Command_exports, {
29941
30065
  wizard: () => wizard
29942
30066
  });
29943
30067
 
29944
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/cli/internal/lexer.js
30068
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/cli/internal/lexer.js
29945
30069
  function lex(argv) {
29946
30070
  const endIndex = argv.indexOf("--");
29947
30071
  if (endIndex === -1) {
@@ -30002,7 +30126,7 @@ var lexTokens = (args2) => {
30002
30126
  return tokens;
30003
30127
  };
30004
30128
 
30005
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/cli/internal/auto-suggest.js
30129
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/cli/internal/auto-suggest.js
30006
30130
  var levenshtein = (a, b2) => {
30007
30131
  const m2 = a.length;
30008
30132
  const n = b2.length;
@@ -30026,7 +30150,7 @@ var suggest = (input, candidates) => {
30026
30150
  return distances.filter(([d]) => d === minDistance).map(([, c]) => c);
30027
30151
  };
30028
30152
 
30029
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/cli/internal/parser.js
30153
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/cli/internal/parser.js
30030
30154
  var getCommandPath = (parsedInput) => match(parsedInput.subcommand, {
30031
30155
  onNone: () => [],
30032
30156
  onSome: (subcommand) => [subcommand.name, ...getCommandPath(subcommand.parsedInput)]
@@ -30529,7 +30653,7 @@ var scanCommandLevel = (tokens, context3) => {
30529
30653
  return toLeafResult(state);
30530
30654
  };
30531
30655
 
30532
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/cli/internal/wizard.js
30656
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/cli/internal/wizard.js
30533
30657
  var run4 = /* @__PURE__ */ fnUntraced2(function* (command2, options) {
30534
30658
  const commandPath = options?.commandPath ?? [command2.name];
30535
30659
  const selected = getCommandAtPath(command2, commandPath);
@@ -30733,7 +30857,7 @@ var wrapCommand = (commandLine) => {
30733
30857
  };
30734
30858
  var formatShellArg = (arg) => /^[A-Za-z0-9_./:@%+=,-]+$/.test(arg) ? arg : `'${arg.replaceAll("'", `'"'"'`)}'`;
30735
30859
 
30736
- // ../../node_modules/.pnpm/effect@4.0.0-beta.101/node_modules/effect/dist/unstable/cli/Command.js
30860
+ // ../../node_modules/.pnpm/effect@4.0.0-beta.102/node_modules/effect/dist/unstable/cli/Command.js
30737
30861
  var isCommand = (u2) => hasProperty(u2, TypeId48);
30738
30862
  var make35 = (name, config, handler) => {
30739
30863
  const parsedConfig = parseConfig(config ?? {});
@@ -30808,12 +30932,13 @@ var withSubcommands = /* @__PURE__ */ dual(2, (self, subcommands) => {
30808
30932
  }
30809
30933
  const context3 = yield* impl.parseContext(raw2);
30810
30934
  const result3 = yield* sub.parse(raw2.subcommand.value.parsedInput);
30811
- return Object.assign({}, context3, {
30935
+ return {
30936
+ ...context3,
30812
30937
  [SubcommandStateSymbol]: {
30813
30938
  name: sub.name,
30814
30939
  result: result3
30815
30940
  }
30816
- });
30941
+ };
30817
30942
  });
30818
30943
  const handle = fnUntraced2(function* (input, path5) {
30819
30944
  const internal = input;
@@ -30858,16 +30983,24 @@ var withSharedFlags = /* @__PURE__ */ dual(2, (self, sharedFlags) => {
30858
30983
  contextConfig: mergedContextConfig
30859
30984
  });
30860
30985
  }
30861
- const parseShared = makeParser(sharedConfig);
30986
+ const parseShared = makeParser(sharedConfig, {
30987
+ allowLeftovers: true
30988
+ });
30862
30989
  const parse4 = fnUntraced2(function* (raw2) {
30863
30990
  const base = yield* impl.parse(raw2);
30864
30991
  const shared = yield* parseShared(raw2);
30865
- return Object.assign({}, base, shared);
30992
+ return {
30993
+ ...base,
30994
+ ...shared
30995
+ };
30866
30996
  });
30867
30997
  const parseContext = fnUntraced2(function* (raw2) {
30868
30998
  const base = yield* impl.parseContext(raw2);
30869
30999
  const shared = yield* parseShared(raw2);
30870
- return Object.assign({}, base, shared);
31000
+ return {
31001
+ ...base,
31002
+ ...shared
31003
+ };
30871
31004
  });
30872
31005
  const handle = (input, commandPath) => impl.handle(input, commandPath);
30873
31006
  return makeCommand({