@deslop/auth 0.1.1278 → 0.1.1290

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/server.js CHANGED
@@ -2174,7 +2174,7 @@ const emptyContext$1 = {
2174
2174
  * @category formatting
2175
2175
  * @since 2.0.0
2176
2176
  */
2177
- function format$2(input, options) {
2177
+ function format$4(input, options) {
2178
2178
  const space = options?.space ?? 0;
2179
2179
  const ancestors = /* @__PURE__ */ new WeakSet();
2180
2180
  const gap = !space ? "" : typeof space === "number" ? " ".repeat(space) : space;
@@ -2338,7 +2338,7 @@ function formatJson(input, options) {
2338
2338
  return JSON.stringify(input, function(key, value) {
2339
2339
  const original = Object.getOwnPropertyDescriptor(sources.get(this) ?? this, key)?.value;
2340
2340
  const redacted = hasProperty(original, symbolRedactable) ? redact$2(original) : redact$2(value);
2341
- if (typeof redacted === "bigint") return format$2(redacted);
2341
+ if (typeof redacted === "bigint") return format$4(redacted);
2342
2342
  if (typeof redacted !== "object" || redacted === null) return redacted;
2343
2343
  const current = redacted instanceof Error && !hasProperty(redacted, "toJSON") ? {
2344
2344
  ...redacted,
@@ -2483,7 +2483,7 @@ const toJson = (input) => {
2483
2483
  const toStringUnknown = (u, whitespace = 2) => {
2484
2484
  if (typeof u === "string") return u;
2485
2485
  try {
2486
- return typeof u === "object" ? formatJson(u, { space: whitespace }) : format$2(u, { space: whitespace });
2486
+ return typeof u === "object" ? formatJson(u, { space: whitespace }) : format$4(u, { space: whitespace });
2487
2487
  } catch {
2488
2488
  return String(u);
2489
2489
  }
@@ -2533,7 +2533,7 @@ const BaseProto = {
2533
2533
  return this.toJSON();
2534
2534
  },
2535
2535
  toString() {
2536
- return format$2(this.toJSON());
2536
+ return format$4(this.toJSON());
2537
2537
  }
2538
2538
  };
2539
2539
  /**
@@ -2605,7 +2605,7 @@ var Class$2 = class {
2605
2605
  * @since 2.0.0
2606
2606
  */
2607
2607
  toString() {
2608
- return format$2(this.toJSON());
2608
+ return format$4(this.toJSON());
2609
2609
  }
2610
2610
  };
2611
2611
  // ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/internal/stackTraceLimit.js
@@ -2773,7 +2773,7 @@ const PipeInspectableProto = {
2773
2773
  return { ...this };
2774
2774
  },
2775
2775
  toString() {
2776
- return format$2(this.toJSON(), {
2776
+ return format$4(this.toJSON(), {
2777
2777
  ignoreToString: true,
2778
2778
  space: 2
2779
2779
  });
@@ -2825,7 +2825,7 @@ var CauseImpl = class {
2825
2825
  };
2826
2826
  }
2827
2827
  toString() {
2828
- return `Cause(${format$2(this.reasons)})`;
2828
+ return `Cause(${format$4(this.reasons)})`;
2829
2829
  }
2830
2830
  [NodeInspectSymbol]() {
2831
2831
  return this.toJSON();
@@ -2869,7 +2869,7 @@ var ReasonBase = class {
2869
2869
  return pipeArguments(this, arguments);
2870
2870
  }
2871
2871
  toString() {
2872
- return format$2(this);
2872
+ return format$4(this);
2873
2873
  }
2874
2874
  [NodeInspectSymbol]() {
2875
2875
  return this.toString();
@@ -2884,7 +2884,7 @@ var Fail = class extends ReasonBase {
2884
2884
  this.error = error;
2885
2885
  }
2886
2886
  toString() {
2887
- return `Fail(${format$2(this.error)})`;
2887
+ return `Fail(${format$4(this.error)})`;
2888
2888
  }
2889
2889
  toJSON() {
2890
2890
  return {
@@ -2944,7 +2944,7 @@ var Die = class extends ReasonBase {
2944
2944
  this.defect = defect;
2945
2945
  }
2946
2946
  toString() {
2947
- return `Die(${format$2(this.defect)})`;
2947
+ return `Die(${format$4(this.defect)})`;
2948
2948
  }
2949
2949
  toJSON() {
2950
2950
  return {
@@ -3005,7 +3005,7 @@ const makeExit = (options) => {
3005
3005
  },
3006
3006
  ...makePrimitiveProto(options),
3007
3007
  toString() {
3008
- return `${options.op}(${format$2(this[args])})`;
3008
+ return `${options.op}(${format$4(this[args])})`;
3009
3009
  },
3010
3010
  toJSON() {
3011
3011
  return {
@@ -3232,7 +3232,7 @@ const Prototype = (options) => makePrimitiveProto({
3232
3232
  * @category constructors
3233
3233
  * @since 2.0.0
3234
3234
  */
3235
- const make$87 = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
3235
+ const make$89 = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
3236
3236
  const isStrictEquivalent = (x, y) => x === y;
3237
3237
  /**
3238
3238
  * Creates an equivalence relation that uses strict equality (`===`) to compare values.
@@ -3342,7 +3342,7 @@ const strictEqual = () => isStrictEquivalent;
3342
3342
  * @since 4.0.0
3343
3343
  */
3344
3344
  function Tuple$1(elements) {
3345
- return make$87((self, that) => {
3345
+ return make$89((self, that) => {
3346
3346
  if (self.length !== that.length) return false;
3347
3347
  for (let i = 0; i < self.length; i++) if (!elements[i](self[i], that[i])) return false;
3348
3348
  return true;
@@ -3352,7 +3352,7 @@ function Tuple$1(elements) {
3352
3352
  * @since 4.0.0
3353
3353
  */
3354
3354
  function Array_(item) {
3355
- return make$87((self, that) => {
3355
+ return make$89((self, that) => {
3356
3356
  if (self.length !== that.length) return false;
3357
3357
  for (let i = 0; i < self.length; i++) if (!item(self[i], that[i])) return false;
3358
3358
  return true;
@@ -3362,9 +3362,9 @@ function Array_(item) {
3362
3362
  /**
3363
3363
  * @since 2.0.0
3364
3364
  */
3365
- const TypeId$71 = "~effect/Option";
3365
+ const TypeId$73 = "~effect/Option";
3366
3366
  const CommonProto$1 = {
3367
- [TypeId$71]: { _A: (_) => _ },
3367
+ [TypeId$73]: { _A: (_) => _ },
3368
3368
  ...PipeInspectableProto,
3369
3369
  [Symbol.iterator]() {
3370
3370
  return new SingleShotGen(this);
@@ -3380,7 +3380,7 @@ const SomeProto = /*#__PURE__*/ Object.defineProperty(/*#__PURE__*/ Object.assig
3380
3380
  return combine$2(hash(this._tag))(hash(this.value));
3381
3381
  },
3382
3382
  toString() {
3383
- return `some(${format$2(this.value)})`;
3383
+ return `some(${format$4(this.value)})`;
3384
3384
  },
3385
3385
  toJSON() {
3386
3386
  return {
@@ -3414,7 +3414,7 @@ const NoneProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Common
3414
3414
  }
3415
3415
  });
3416
3416
  /** @internal */
3417
- const isOption$1 = (input) => hasProperty(input, TypeId$71);
3417
+ const isOption$1 = (input) => hasProperty(input, TypeId$73);
3418
3418
  /** @internal */
3419
3419
  const isNone$1 = (fa) => fa._tag === "None";
3420
3420
  /** @internal */
@@ -3429,9 +3429,9 @@ SomeImpl.prototype = SomeProto;
3429
3429
  /** @internal */
3430
3430
  const some$2 = (value) => new SomeImpl(value);
3431
3431
  // ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/internal/result.js
3432
- const TypeId$70 = "~effect/Result";
3432
+ const TypeId$72 = "~effect/Result";
3433
3433
  const CommonProto = {
3434
- [TypeId$70]: {
3434
+ [TypeId$72]: {
3435
3435
  /* v8 ignore next 2 */
3436
3436
  _A: (_) => _,
3437
3437
  _E: (_) => _
@@ -3451,7 +3451,7 @@ const SuccessProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Com
3451
3451
  return combine$2(hash(this._tag))(hash(this.success));
3452
3452
  },
3453
3453
  toString() {
3454
- return `success(${format$2(this.success)})`;
3454
+ return `success(${format$4(this.success)})`;
3455
3455
  },
3456
3456
  toJSON() {
3457
3457
  return {
@@ -3471,7 +3471,7 @@ const FailureProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Com
3471
3471
  return combine$2(hash(this._tag))(hash(this.failure));
3472
3472
  },
3473
3473
  toString() {
3474
- return `failure(${format$2(this.failure)})`;
3474
+ return `failure(${format$4(this.failure)})`;
3475
3475
  },
3476
3476
  toJSON() {
3477
3477
  return {
@@ -3482,7 +3482,7 @@ const FailureProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Com
3482
3482
  }
3483
3483
  });
3484
3484
  /** @internal */
3485
- const isResult$1 = (input) => hasProperty(input, TypeId$70);
3485
+ const isResult$1 = (input) => hasProperty(input, TypeId$72);
3486
3486
  /** @internal */
3487
3487
  const isFailure$2 = (result) => result._tag === "Failure";
3488
3488
  /** @internal */
@@ -3555,7 +3555,7 @@ const fromOption$3 = /*#__PURE__*/ dual(2, (self, onNone) => isNone$1(self) ? fa
3555
3555
  * @category constructors
3556
3556
  * @since 2.0.0
3557
3557
  */
3558
- function make$86(compare) {
3558
+ function make$88(compare) {
3559
3559
  return (self, that) => self === that ? 0 : compare(self, that);
3560
3560
  }
3561
3561
  /**
@@ -3586,7 +3586,7 @@ function make$86(compare) {
3586
3586
  * @category instances
3587
3587
  * @since 4.0.0
3588
3588
  */
3589
- const String$10 = /*#__PURE__*/ make$86((self, that) => self < that ? -1 : 1);
3589
+ const String$10 = /*#__PURE__*/ make$88((self, that) => self < that ? -1 : 1);
3590
3590
  /**
3591
3591
  * Order instance for numbers that compares them numerically.
3592
3592
  *
@@ -3619,7 +3619,7 @@ const String$10 = /*#__PURE__*/ make$86((self, that) => self < that ? -1 : 1);
3619
3619
  * @category instances
3620
3620
  * @since 4.0.0
3621
3621
  */
3622
- const Number$6 = /*#__PURE__*/ make$86((self, that) => {
3622
+ const Number$6 = /*#__PURE__*/ make$88((self, that) => {
3623
3623
  if (globalThis.Number.isNaN(self) && globalThis.Number.isNaN(that)) return 0;
3624
3624
  if (globalThis.Number.isNaN(self)) return -1;
3625
3625
  if (globalThis.Number.isNaN(that)) return 1;
@@ -3656,7 +3656,7 @@ const Number$6 = /*#__PURE__*/ make$86((self, that) => {
3656
3656
  * @since 4.0.0
3657
3657
  */
3658
3658
  function flip$1(O) {
3659
- return make$86((self, that) => O(that, self));
3659
+ return make$88((self, that) => O(that, self));
3660
3660
  }
3661
3661
  /**
3662
3662
  * Transforms an `Order` on type `A` into an `Order` on type `B` by providing a function that
@@ -3691,7 +3691,7 @@ function flip$1(O) {
3691
3691
  * @category mapping
3692
3692
  * @since 2.0.0
3693
3693
  */
3694
- const mapInput = /*#__PURE__*/ dual(2, (self, f) => make$86((b1, b2) => self(f(b1), f(b2))));
3694
+ const mapInput = /*#__PURE__*/ dual(2, (self, f) => make$88((b1, b2) => self(f(b1), f(b2))));
3695
3695
  /**
3696
3696
  * Checks whether one value is strictly less than another according to the given order.
3697
3697
  *
@@ -4621,7 +4621,7 @@ const ServiceProto = {
4621
4621
  return self;
4622
4622
  },
4623
4623
  context(self) {
4624
- return make$85(this, self);
4624
+ return make$87(this, self);
4625
4625
  },
4626
4626
  use(f) {
4627
4627
  return withFiber$1((fiber) => f(get$14(fiber.context, this)));
@@ -4632,7 +4632,7 @@ const ServiceProto = {
4632
4632
  };
4633
4633
  const cacheKeys = /*#__PURE__*/ new Set();
4634
4634
  const ReferenceTypeId = "~effect/Context/Reference";
4635
- const TypeId$69 = "~effect/Context";
4635
+ const TypeId$71 = "~effect/Context";
4636
4636
  const FlattenAfterBaseHits = 8;
4637
4637
  const makeImpl$1 = (cacheRoot, base, overlay, depth, maxDepth) => {
4638
4638
  const self = Object.create(Proto$24);
@@ -4731,7 +4731,7 @@ const Proto$24 = {
4731
4731
  return flatten$4(this);
4732
4732
  },
4733
4733
  ...PipeInspectableProto,
4734
- [TypeId$69]: { _Services: (_) => _ },
4734
+ [TypeId$71]: { _Services: (_) => _ },
4735
4735
  toJSON() {
4736
4736
  return {
4737
4737
  _id: "Context",
@@ -4787,7 +4787,7 @@ const hasSameCache = (self, that) => self.cacheRoot === that.cacheRoot;
4787
4787
  * @category guards
4788
4788
  * @since 2.0.0
4789
4789
  */
4790
- const isContext = (u) => hasProperty(u, TypeId$69);
4790
+ const isContext = (u) => hasProperty(u, TypeId$71);
4791
4791
  /**
4792
4792
  * Checks whether the provided argument is a `Reference`.
4793
4793
  *
@@ -4844,7 +4844,7 @@ const emptyContext = /*#__PURE__*/ makeUnsafe$10(/*#__PURE__*/ new Map());
4844
4844
  * @category constructors
4845
4845
  * @since 2.0.0
4846
4846
  */
4847
- const make$85 = (key, service) => makeUnsafe$10(/* @__PURE__ */ new Map([[key.key, service]]));
4847
+ const make$87 = (key, service) => makeUnsafe$10(/* @__PURE__ */ new Map([[key.key, service]]));
4848
4848
  /**
4849
4849
  * Adds a service to a given `Context`.
4850
4850
  *
@@ -5148,6 +5148,41 @@ const mergeAll$2 = (...ctxs) => {
5148
5148
  return makeUnsafe$10(map);
5149
5149
  };
5150
5150
  /**
5151
+ * Returns a new `Context` with the specified service keys removed.
5152
+ *
5153
+ * **When to use**
5154
+ *
5155
+ * Use when you want to remove a denylist of services from a `Context`.
5156
+ *
5157
+ * **Example** (Omitting services from a context)
5158
+ *
5159
+ * ```ts import.meta.vitest
5160
+ * import { Context, Option, pipe } from "effect"
5161
+ *
5162
+ * const Port = Context.Service<{ PORT: number }>("Port")
5163
+ * const Timeout = Context.Service<{ TIMEOUT: number }>("Timeout")
5164
+ *
5165
+ * const someContext = pipe(
5166
+ * Context.make(Port, { PORT: 8080 }),
5167
+ * Context.add(Timeout, { TIMEOUT: 5000 })
5168
+ * )
5169
+ *
5170
+ * const context = pipe(someContext, Context.omit(Timeout))
5171
+ *
5172
+ * Context.getOption(context, Port) // => Option.some({ PORT: 8080 })
5173
+ * Context.getOption(context, Timeout) // => Option.none()
5174
+ * ```
5175
+ *
5176
+ * @see {@link pick} for keeping selected services
5177
+ *
5178
+ * @stability stable
5179
+ * @category filtering
5180
+ * @since 2.0.0
5181
+ */
5182
+ const omit$2 = (...keys) => (self) => withFlat(self, (map) => {
5183
+ for (let i = 0; i < keys.length; i++) map.delete(keys[i].key);
5184
+ });
5185
+ /**
5151
5186
  * Creates a context key with a default value.
5152
5187
  *
5153
5188
  * **When to use**
@@ -5196,7 +5231,7 @@ const mergeAll$2 = (...ctxs) => {
5196
5231
  */
5197
5232
  const Reference = Service$1;
5198
5233
  // ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/Duration.js
5199
- const TypeId$68 = "~effect/Duration";
5234
+ const TypeId$70 = "~effect/Duration";
5200
5235
  const bigint0$3 = /*#__PURE__*/ BigInt(0);
5201
5236
  const bigint1$2 = /*#__PURE__*/ BigInt(1);
5202
5237
  const bigint2 = /*#__PURE__*/ BigInt(2);
@@ -5212,7 +5247,7 @@ const bigintNanosPerDay = /*#__PURE__*/ BigInt(864e11);
5212
5247
  const bigintNanosPerWeek = /*#__PURE__*/ BigInt(6048e11);
5213
5248
  const roundTiesAwayFromZero = (input) => BigInt(Math.sign(input) * Math.round(Math.abs(input)));
5214
5249
  const roundMillisToNanos = (millis) => Number.isInteger(millis) ? BigInt(millis) * bigint1e6 : roundTiesAwayFromZero(millis * 1e6);
5215
- const fromNanosNumber = (nanos) => make$84(Number.isFinite(nanos) ? roundTiesAwayFromZero(nanos) : nanos);
5250
+ const fromNanosNumber = (nanos) => make$86(Number.isFinite(nanos) ? roundTiesAwayFromZero(nanos) : nanos);
5216
5251
  const nanosToUnit = (nanos, divisor) => {
5217
5252
  const value = Number(nanos);
5218
5253
  if (Number.isFinite(value)) return value / divisor;
@@ -5235,9 +5270,9 @@ const divideTiesAwayFromZero = (numerator, denominator) => {
5235
5270
  };
5236
5271
  const fromMillisString = (input, scale) => {
5237
5272
  const millis = Number(input) * scale;
5238
- if (!Number.isFinite(millis)) return make$84(millis);
5273
+ if (!Number.isFinite(millis)) return make$86(millis);
5239
5274
  const nanos = parseNanos(input, BigInt(scale) * bigint1e6);
5240
- return make$84(Number.isInteger(millis) && BigInt(millis) * bigint1e6 === nanos ? millis : nanos);
5275
+ return make$86(Number.isInteger(millis) && BigInt(millis) * bigint1e6 === nanos ? millis : nanos);
5241
5276
  };
5242
5277
  const DURATION_REGEXP = /^(-?\d+(?:\.\d+)?)\s+(nanos?|micros?|millis?|seconds?|minutes?|hours?|days?|weeks?)$/;
5243
5278
  /**
@@ -5297,14 +5332,14 @@ const fromInputUnsafe$1 = (input) => {
5297
5332
  }
5298
5333
  case "object": {
5299
5334
  if (input === null) break;
5300
- if (TypeId$68 in input) return input;
5335
+ if (TypeId$70 in input) return input;
5301
5336
  if (Array.isArray(input)) {
5302
5337
  if (input.length !== 2 || !input.every(isNumber$1)) return invalid$4(input);
5303
5338
  if (Number.isNaN(input[0]) || Number.isNaN(input[1])) return zero$2;
5304
5339
  if (input[0] === -Infinity || input[1] === -Infinity) return negativeInfinity;
5305
5340
  if (input[0] === Infinity || input[1] === Infinity) return infinity;
5306
5341
  const nanos = input[0] * 1e9 + input[1];
5307
- return Number.isFinite(nanos) && Number.isInteger(input[0]) && Number.isInteger(input[1]) ? make$84(BigInt(input[0]) * bigint1e9 + BigInt(input[1])) : fromNanosNumber(nanos);
5342
+ return Number.isFinite(nanos) && Number.isInteger(input[0]) && Number.isInteger(input[1]) ? make$86(BigInt(input[0]) * bigint1e9 + BigInt(input[1])) : fromNanosNumber(nanos);
5308
5343
  }
5309
5344
  const obj = input;
5310
5345
  let millis = 0;
@@ -5315,13 +5350,13 @@ const fromInputUnsafe$1 = (input) => {
5315
5350
  if (obj.seconds) millis += obj.seconds * 1e3;
5316
5351
  if (obj.milliseconds) millis += obj.milliseconds;
5317
5352
  if (!obj.microseconds && !obj.nanoseconds) {
5318
- if (!Number.isFinite(millis)) return make$84(millis);
5353
+ if (!Number.isFinite(millis)) return make$86(millis);
5319
5354
  const exact = sumObjectNanos(obj);
5320
- return exact === void 0 || BigInt(millis) * bigint1e6 === exact ? make$84(millis) : make$84(exact);
5355
+ return exact === void 0 || BigInt(millis) * bigint1e6 === exact ? make$86(millis) : make$86(exact);
5321
5356
  }
5322
5357
  const nanos = millis * 1e6 + (obj.microseconds ?? 0) * 1e3 + (obj.nanoseconds ?? 0);
5323
5358
  const exact = Number.isFinite(nanos) ? sumObjectNanos(obj) : void 0;
5324
- return exact === void 0 ? fromNanosNumber(nanos) : make$84(exact);
5359
+ return exact === void 0 ? fromNanosNumber(nanos) : make$86(exact);
5325
5360
  }
5326
5361
  }
5327
5362
  return invalid$4(input);
@@ -5368,7 +5403,7 @@ const zeroDurationValue = {
5368
5403
  const infinityDurationValue = { _tag: "Infinity" };
5369
5404
  const negativeInfinityDurationValue = { _tag: "NegativeInfinity" };
5370
5405
  const DurationProto = {
5371
- [TypeId$68]: TypeId$68,
5406
+ [TypeId$70]: TypeId$70,
5372
5407
  [symbol$3]() {
5373
5408
  switch (this.value._tag) {
5374
5409
  case "Millis": return hash(roundMillisToNanos(this.value.millis));
@@ -5416,7 +5451,7 @@ const DurationProto = {
5416
5451
  return pipeArguments(this, arguments);
5417
5452
  }
5418
5453
  };
5419
- const make$84 = (input) => {
5454
+ const make$86 = (input) => {
5420
5455
  const duration = Object.create(DurationProto);
5421
5456
  if (typeof input === "number") {
5422
5457
  if (isNaN(input) || input === 0 || Object.is(input, -0)) duration.value = zeroDurationValue;
@@ -5452,7 +5487,7 @@ const make$84 = (input) => {
5452
5487
  * @category guards
5453
5488
  * @since 2.0.0
5454
5489
  */
5455
- const isDuration = (u) => hasProperty(u, TypeId$68);
5490
+ const isDuration = (u) => hasProperty(u, TypeId$70);
5456
5491
  /**
5457
5492
  * Checks whether a Duration is finite (not infinite).
5458
5493
  *
@@ -5539,8 +5574,8 @@ const abs = (self) => {
5539
5574
  switch (self.value._tag) {
5540
5575
  case "Infinity":
5541
5576
  case "NegativeInfinity": return infinity;
5542
- case "Millis": return self.value.millis < 0 ? make$84(-self.value.millis) : self;
5543
- case "Nanos": return self.value.nanos < bigint0$3 ? make$84(-self.value.nanos) : self;
5577
+ case "Millis": return self.value.millis < 0 ? make$86(-self.value.millis) : self;
5578
+ case "Nanos": return self.value.nanos < bigint0$3 ? make$86(-self.value.nanos) : self;
5544
5579
  }
5545
5580
  };
5546
5581
  /**
@@ -5558,7 +5593,7 @@ const abs = (self) => {
5558
5593
  * @category constructors
5559
5594
  * @since 2.0.0
5560
5595
  */
5561
- const zero$2 = /*#__PURE__*/ make$84(0);
5596
+ const zero$2 = /*#__PURE__*/ make$86(0);
5562
5597
  /**
5563
5598
  * A Duration representing infinite time.
5564
5599
  *
@@ -5574,7 +5609,7 @@ const zero$2 = /*#__PURE__*/ make$84(0);
5574
5609
  * @category constructors
5575
5610
  * @since 2.0.0
5576
5611
  */
5577
- const infinity = /*#__PURE__*/ make$84(Infinity);
5612
+ const infinity = /*#__PURE__*/ make$86(Infinity);
5578
5613
  /**
5579
5614
  * A Duration representing negative infinite time.
5580
5615
  *
@@ -5590,7 +5625,7 @@ const infinity = /*#__PURE__*/ make$84(Infinity);
5590
5625
  * @category constructors
5591
5626
  * @since 4.0.0
5592
5627
  */
5593
- const negativeInfinity = /*#__PURE__*/ make$84(-Infinity);
5628
+ const negativeInfinity = /*#__PURE__*/ make$86(-Infinity);
5594
5629
  /**
5595
5630
  * Creates a Duration from nanoseconds.
5596
5631
  *
@@ -5606,7 +5641,7 @@ const negativeInfinity = /*#__PURE__*/ make$84(-Infinity);
5606
5641
  * @category constructors
5607
5642
  * @since 2.0.0
5608
5643
  */
5609
- const nanos = (nanos) => make$84(nanos);
5644
+ const nanos = (nanos) => make$86(nanos);
5610
5645
  /**
5611
5646
  * Creates a Duration from milliseconds.
5612
5647
  *
@@ -5622,7 +5657,7 @@ const nanos = (nanos) => make$84(nanos);
5622
5657
  * @category constructors
5623
5658
  * @since 2.0.0
5624
5659
  */
5625
- const millis$1 = (millis) => make$84(millis);
5660
+ const millis$1 = (millis) => make$86(millis);
5626
5661
  /**
5627
5662
  * Creates a Duration from seconds.
5628
5663
  *
@@ -5638,7 +5673,7 @@ const millis$1 = (millis) => make$84(millis);
5638
5673
  * @category constructors
5639
5674
  * @since 2.0.0
5640
5675
  */
5641
- const seconds = (seconds) => make$84(seconds * 1e3);
5676
+ const seconds = (seconds) => make$86(seconds * 1e3);
5642
5677
  /**
5643
5678
  * Creates a Duration from minutes.
5644
5679
  *
@@ -5654,7 +5689,7 @@ const seconds = (seconds) => make$84(seconds * 1e3);
5654
5689
  * @category constructors
5655
5690
  * @since 2.0.0
5656
5691
  */
5657
- const minutes = (minutes) => make$84(minutes * 6e4);
5692
+ const minutes = (minutes) => make$86(minutes * 6e4);
5658
5693
  /**
5659
5694
  * Converts a Duration to milliseconds.
5660
5695
  *
@@ -5843,7 +5878,7 @@ const matchPair = /*#__PURE__*/ dual(3, (self, that, options) => {
5843
5878
  * @category instances
5844
5879
  * @since 2.0.0
5845
5880
  */
5846
- const Order$5 = /*#__PURE__*/ make$86((self, that) => matchPair(self, that, {
5881
+ const Order$5 = /*#__PURE__*/ make$88((self, that) => matchPair(self, that, {
5847
5882
  onMillis: (self, that) => self < that ? -1 : self > that ? 1 : 0,
5848
5883
  onNanos: (self, that) => self < that ? -1 : self > that ? 1 : 0,
5849
5884
  onInfinity: (self, that) => {
@@ -5923,14 +5958,14 @@ const max$1 = /*#__PURE__*/ max$2(Order$5);
5923
5958
  const divideUnsafe = /*#__PURE__*/ dual(2, (self, by) => {
5924
5959
  if (!Number.isFinite(by)) return zero$2;
5925
5960
  return match$7(self, {
5926
- onMillis: (millis) => make$84(millis / by),
5961
+ onMillis: (millis) => make$86(millis / by),
5927
5962
  onNanos: (nanos) => {
5928
5963
  if (Object.is(by, 0) || Object.is(by, -0)) {
5929
5964
  if (nanos === bigint0$3) return zero$2;
5930
5965
  return nanos > bigint0$3 === Object.is(by, 0) ? infinity : negativeInfinity;
5931
5966
  }
5932
5967
  try {
5933
- return make$84(nanos / BigInt(by));
5968
+ return make$86(nanos / BigInt(by));
5934
5969
  } catch {
5935
5970
  return zero$2;
5936
5971
  }
@@ -5965,8 +6000,8 @@ const divideUnsafe = /*#__PURE__*/ dual(2, (self, by) => {
5965
6000
  * @since 2.0.0
5966
6001
  */
5967
6002
  const sum = /*#__PURE__*/ dual(2, (self, that) => matchPair(self, that, {
5968
- onMillis: (self, that) => make$84(self + that),
5969
- onNanos: (self, that) => make$84(self + that),
6003
+ onMillis: (self, that) => make$86(self + that),
6004
+ onNanos: (self, that) => make$86(self + that),
5970
6005
  onInfinity: (self, that) => {
5971
6006
  const s = self.value._tag;
5972
6007
  const t = that.value._tag;
@@ -6076,11 +6111,11 @@ const parts$1 = (self) => {
6076
6111
  * @category converting
6077
6112
  * @since 2.0.0
6078
6113
  */
6079
- const format$1 = (self) => {
6114
+ const format$3 = (self) => {
6080
6115
  if (self.value._tag === "Infinity") return "Infinity";
6081
6116
  if (self.value._tag === "NegativeInfinity") return "-Infinity";
6082
6117
  if (isZero$1(self)) return "0";
6083
- if (isNegative(self)) return "-" + format$1(abs(self));
6118
+ if (isNegative(self)) return "-" + format$3(abs(self));
6084
6119
  const fragments = parts$1(self);
6085
6120
  const pieces = [];
6086
6121
  if (fragments.days !== 0) pieces.push(`${fragments.days}d`);
@@ -8820,7 +8855,7 @@ var ParentSpan = class extends (/*#__PURE__*/ Service$1()(ParentSpanKey, { fiber
8820
8855
  * @category constructors
8821
8856
  * @since 2.0.0
8822
8857
  */
8823
- const make$83 = (options) => options;
8858
+ const make$85 = (options) => options;
8824
8859
  /**
8825
8860
  * Creates an `ExternalSpan` from trace and span identifiers, defaulting
8826
8861
  * `sampled` to `true` and annotations to an empty context when they are not
@@ -9000,7 +9035,7 @@ const Tracer = /*#__PURE__*/ Reference(TracerKey, {
9000
9035
  * @category references
9001
9036
  * @since 4.0.0
9002
9037
  */
9003
- const nativeTracer = /*#__PURE__*/ make$83({ span: (options) => new NativeSpan(options) });
9038
+ const nativeTracer = /*#__PURE__*/ make$85({ span: (options) => new NativeSpan(options) });
9004
9039
  /**
9005
9040
  * Default in-memory `Span` implementation used by the native tracer. It
9006
9041
  * generates span and trace identifiers, stores attributes, events, and links,
@@ -9446,7 +9481,7 @@ var FiberImpl = class {
9446
9481
  interruptUnsafe(fiberId, annotations) {
9447
9482
  if (this._exit) return;
9448
9483
  let cause = causeInterrupt(fiberId);
9449
- if (this.cache.stackFrame) cause = causeAnnotate(cause, make$85(StackTraceKey, this.cache.stackFrame));
9484
+ if (this.cache.stackFrame) cause = causeAnnotate(cause, make$87(StackTraceKey, this.cache.stackFrame));
9450
9485
  if (annotations) cause = causeAnnotate(cause, annotations);
9451
9486
  this._interruptedCause = this._interruptedCause ? causeAddInterrupts(this._interruptedCause, cause) : cause;
9452
9487
  if (this.interruptible) {
@@ -10406,7 +10441,7 @@ const delay$1 = /*#__PURE__*/ dual(2, (self, duration) => andThen$1(sleep$1(dura
10406
10441
  /** @internal */
10407
10442
  const timeoutOrElse$1 = /*#__PURE__*/ dual(2, (self, options) => flatMap$4(timeoutOption$1(self, options.duration), (option) => isNone(option) ? options.orElse() : succeed$9(option.value)));
10408
10443
  /** @internal */
10409
- const timeoutErrorFromDuration = (duration) => new TimeoutError$1(`Operation timed out after '${format$1(duration)}'`);
10444
+ const timeoutErrorFromDuration = (duration) => new TimeoutError$1(`Operation timed out after '${format$3(duration)}'`);
10410
10445
  /** @internal */
10411
10446
  const timeout$2 = /*#__PURE__*/ dual(2, (self, duration) => {
10412
10447
  const decoded = fromInputUnsafe$1(duration);
@@ -11779,7 +11814,7 @@ const hasInterrupts$1 = exitHasInterrupts;
11779
11814
  */
11780
11815
  const asVoidAll = exitAsVoidAll;
11781
11816
  // ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/Deferred.js
11782
- const TypeId$67 = "~effect/Deferred";
11817
+ const TypeId$69 = "~effect/Deferred";
11783
11818
  /**
11784
11819
  * Checks whether a value is a `Deferred`.
11785
11820
  *
@@ -11792,9 +11827,9 @@ const TypeId$67 = "~effect/Deferred";
11792
11827
  * @category guards
11793
11828
  * @since 4.0.0
11794
11829
  */
11795
- const isDeferred = (u) => hasProperty(u, TypeId$67);
11830
+ const isDeferred = (u) => hasProperty(u, TypeId$69);
11796
11831
  const DeferredProto = {
11797
- [TypeId$67]: {
11832
+ [TypeId$69]: {
11798
11833
  _A: identity,
11799
11834
  _E: identity
11800
11835
  },
@@ -11854,7 +11889,7 @@ const makeUnsafe$9 = () => new DeferredImpl();
11854
11889
  * @category constructors
11855
11890
  * @since 2.0.0
11856
11891
  */
11857
- const make$82 = () => sync$2(() => makeUnsafe$9());
11892
+ const make$84 = () => sync$2(() => makeUnsafe$9());
11858
11893
  const _await = (self) => callback$2((resume) => {
11859
11894
  if (self.effect) return resume(self.effect);
11860
11895
  self.resumes ??= [];
@@ -12500,7 +12535,7 @@ const Scope = scopeTag;
12500
12535
  * @category constructors
12501
12536
  * @since 2.0.0
12502
12537
  */
12503
- const make$81 = scopeMake;
12538
+ const make$83 = scopeMake;
12504
12539
  /**
12505
12540
  * Creates a new `Scope` synchronously without wrapping it in an `Effect`.
12506
12541
  * This is useful when you need a scope immediately but should be used with caution
@@ -12804,7 +12839,7 @@ const closeUnsafe = scopeCloseUnsafe;
12804
12839
  */
12805
12840
  const use$1 = scopeUse;
12806
12841
  // ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/Layer.js
12807
- const TypeId$66 = "~effect/Layer";
12842
+ const TypeId$68 = "~effect/Layer";
12808
12843
  const MemoMapTypeId = "~effect/Layer/MemoMap";
12809
12844
  const makeMemoMapEntry = (memoMap, layer) => {
12810
12845
  const entry = {
@@ -12826,7 +12861,7 @@ const memoMapObserve = (entry, scope) => {
12826
12861
  return true;
12827
12862
  };
12828
12863
  const LayerProto = {
12829
- [TypeId$66]: {
12864
+ [TypeId$68]: {
12830
12865
  _ROut: identity,
12831
12866
  _E: identity,
12832
12867
  _RIn: identity
@@ -13205,8 +13240,8 @@ const buildWithScope = /*#__PURE__*/ dual(2, (self, scope) => withFiber$1((fiber
13205
13240
  * @since 2.0.0
13206
13241
  */
13207
13242
  const succeed$6 = function() {
13208
- if (arguments.length === 1) return (resource) => succeedContext(make$85(arguments[0], resource));
13209
- return succeedContext(make$85(arguments[0], arguments[1]));
13243
+ if (arguments.length === 1) return (resource) => succeedContext(make$87(arguments[0], resource));
13244
+ return succeedContext(make$87(arguments[0], arguments[1]));
13210
13245
  };
13211
13246
  /**
13212
13247
  * Constructs a layer that provides all services in an already available
@@ -13318,8 +13353,8 @@ const empty$11 = /*#__PURE__*/ succeedContext(/*#__PURE__*/ empty$15());
13318
13353
  * @since 2.0.0
13319
13354
  */
13320
13355
  const sync$1 = function() {
13321
- if (arguments.length === 1) return (evaluate) => syncContext(() => make$85(arguments[0], evaluate()));
13322
- return syncContext(() => make$85(arguments[0], arguments[1]()));
13356
+ if (arguments.length === 1) return (evaluate) => syncContext(() => make$87(arguments[0], evaluate()));
13357
+ return syncContext(() => make$87(arguments[0], arguments[1]()));
13323
13358
  };
13324
13359
  /**
13325
13360
  * Constructs a layer lazily that provides all services in a `Context`.
@@ -13403,7 +13438,7 @@ const effect = function() {
13403
13438
  if (arguments.length === 1) return (effect) => effectImpl(arguments[0], effect);
13404
13439
  return effectImpl(arguments[0], arguments[1]);
13405
13440
  };
13406
- const effectImpl = (service, effect) => effectContext(map$7(effect, (value) => make$85(service, value)));
13441
+ const effectImpl = (service, effect) => effectContext(map$7(effect, (value) => make$87(service, value)));
13407
13442
  /**
13408
13443
  * Constructs a layer from an effect that produces all services in a `Context`.
13409
13444
  *
@@ -14977,11 +15012,11 @@ const currentTimeMillis = currentTimeMillis$1;
14977
15012
  const currentTimeNanos = currentTimeNanos$1;
14978
15013
  // ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/internal/dateTime.js
14979
15014
  /** @internal */
14980
- const TypeId$65 = "~effect/DateTime";
15015
+ const TypeId$67 = "~effect/DateTime";
14981
15016
  /** @internal */
14982
15017
  const TimeZoneTypeId = "~effect/DateTime/TimeZone";
14983
15018
  const Proto$23 = {
14984
- [TypeId$65]: TypeId$65,
15019
+ [TypeId$67]: TypeId$67,
14985
15020
  pipe() {
14986
15021
  return pipeArguments(this, arguments);
14987
15022
  },
@@ -15108,7 +15143,7 @@ const makeZonedProto = (epochMillis, zone, partsUtc) => {
15108
15143
  return self;
15109
15144
  };
15110
15145
  /** @internal */
15111
- const isDateTime$1 = (u) => hasProperty(u, TypeId$65);
15146
+ const isDateTime$1 = (u) => hasProperty(u, TypeId$67);
15112
15147
  /** @internal */
15113
15148
  const isTimeZone = (u) => hasProperty(u, TimeZoneTypeId);
15114
15149
  /** @internal */
@@ -15173,7 +15208,7 @@ const makeZonedUnsafe$1 = (input, options) => {
15173
15208
  return makeZonedFromAdjusted(self.epochMilliseconds, zone, options?.disambiguation ?? "compatible");
15174
15209
  };
15175
15210
  /** @internal */
15176
- const make$80 = /*#__PURE__*/ liftThrowable(makeUnsafe$7);
15211
+ const make$82 = /*#__PURE__*/ liftThrowable(makeUnsafe$7);
15177
15212
  /** @internal */
15178
15213
  const toUtc$1 = (self) => makeUtc(self.epochMilliseconds);
15179
15214
  const validZoneCache = /*#__PURE__*/ new Map();
@@ -15943,7 +15978,7 @@ const matchEffect$1 = /*#__PURE__*/ dual(2, (self, options) => matchCauseEffect$
15943
15978
  }
15944
15979
  }));
15945
15980
  // ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/Schedule.js
15946
- const TypeId$64 = "~effect/Schedule";
15981
+ const TypeId$66 = "~effect/Schedule";
15947
15982
  /**
15948
15983
  * Context reference containing metadata for the currently running schedule step.
15949
15984
  *
@@ -15969,7 +16004,7 @@ const CurrentMetadata = /*#__PURE__*/ Reference("effect/Schedule/CurrentMetadata
15969
16004
  elapsedSincePrevious: 0
15970
16005
  }) });
15971
16006
  const ScheduleProto = {
15972
- [TypeId$64]: {
16007
+ [TypeId$66]: {
15973
16008
  _Out: identity,
15974
16009
  _In: identity,
15975
16010
  _Env: identity
@@ -15999,7 +16034,7 @@ const ScheduleProto = {
15999
16034
  * @category guards
16000
16035
  * @since 2.0.0
16001
16036
  */
16002
- const isSchedule = (u) => hasProperty(u, TypeId$64);
16037
+ const isSchedule = (u) => hasProperty(u, TypeId$66);
16003
16038
  /**
16004
16039
  * Creates a Schedule from a step function that returns a Pull.
16005
16040
  *
@@ -16371,14 +16406,14 @@ const buildFromOptions = (options) => {
16371
16406
  return schedule;
16372
16407
  };
16373
16408
  // ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/MutableHashMap.js
16374
- const TypeId$63 = "~effect/MutableHashMap";
16409
+ const TypeId$65 = "~effect/MutableHashMap";
16375
16410
  const MutableHashMapProto = {
16376
- [TypeId$63]: TypeId$63,
16411
+ [TypeId$65]: TypeId$65,
16377
16412
  [Symbol.iterator]() {
16378
16413
  return this.backing[Symbol.iterator]();
16379
16414
  },
16380
16415
  toString() {
16381
- return `MutableHashMap(${format$2(Array.from(this))})`;
16416
+ return `MutableHashMap(${format$4(Array.from(this))})`;
16382
16417
  },
16383
16418
  toJSON() {
16384
16419
  return {
@@ -16460,7 +16495,7 @@ const empty$10 = () => {
16460
16495
  * @category constructors
16461
16496
  * @since 2.0.0
16462
16497
  */
16463
- const make$79 = (...entries) => fromIterable$4(entries);
16498
+ const make$81 = (...entries) => fromIterable$4(entries);
16464
16499
  /**
16465
16500
  * Creates a MutableHashMap from an iterable collection of key-value pairs.
16466
16501
  *
@@ -21838,13 +21873,13 @@ const concat$4 = (chunks) => {
21838
21873
  * @category instances
21839
21874
  * @since 4.0.6
21840
21875
  */
21841
- const Order$2 = /*#__PURE__*/ make$86((self, that) => {
21876
+ const Order$2 = /*#__PURE__*/ make$88((self, that) => {
21842
21877
  const length = Math.min(self.length, that.length);
21843
21878
  for (let i = 0; i < length; i++) if (self[i] !== that[i]) return self[i] < that[i] ? -1 : 1;
21844
21879
  return self.length < that.length ? -1 : self.length > that.length ? 1 : 0;
21845
21880
  });
21846
21881
  // ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/net/NetAddress.js
21847
- const TypeId$62 = "~effect/net/NetAddress";
21882
+ const TypeId$64 = "~effect/net/NetAddress";
21848
21883
  const ipv4Value = (self) => self.value;
21849
21884
  const ipv6Words = (self) => self;
21850
21885
  /**
@@ -21862,7 +21897,7 @@ const ipv6Words = (self) => self;
21862
21897
  * @since 4.0.0
21863
21898
  */
21864
21899
  var NetAddressError = class extends (/*#__PURE__*/ TaggedError$1("NetAddressError")) {};
21865
- const isAddress = (u) => hasProperty(u, TypeId$62);
21900
+ const isAddress = (u) => hasProperty(u, TypeId$64);
21866
21901
  /**
21867
21902
  * Returns `true` when a value is an IPv4 address.
21868
21903
  *
@@ -21880,6 +21915,14 @@ const isIpv4Address = (u) => isAddress(u) && u._tag === "Ipv4Address";
21880
21915
  */
21881
21916
  const isIpv6Address = (u) => isAddress(u) && u._tag === "Ipv6Address";
21882
21917
  /**
21918
+ * Returns the bit width of an IP address.
21919
+ *
21920
+ * @stability unstable
21921
+ * @category getters
21922
+ * @since 4.0.0
21923
+ */
21924
+ const width$1 = (address) => isIpv4Address(address) ? 32 : 128;
21925
+ /**
21883
21926
  * Returns `true` when a value is a resolved IPv4 internet address.
21884
21927
  *
21885
21928
  * @stability unstable
@@ -21914,7 +21957,7 @@ const isUnixPathAddress = (u) => isAddress(u) && u._tag === "UnixPathAddress";
21914
21957
  const Ipv4Proto = {
21915
21958
  ...BaseProto,
21916
21959
  _tag: "Ipv4Address",
21917
- [TypeId$62]: TypeId$62,
21960
+ [TypeId$64]: TypeId$64,
21918
21961
  [symbol$2](that) {
21919
21962
  return isIpv4Address(that) && ipv4Value(this) === ipv4Value(that);
21920
21963
  },
@@ -21931,7 +21974,7 @@ const Ipv4Proto = {
21931
21974
  const Ipv6Proto = {
21932
21975
  ...BaseProto,
21933
21976
  _tag: "Ipv6Address",
21934
- [TypeId$62]: TypeId$62,
21977
+ [TypeId$64]: TypeId$64,
21935
21978
  [symbol$2](that) {
21936
21979
  if (!isIpv6Address(that)) return false;
21937
21980
  const self = ipv6Words(this);
@@ -22114,6 +22157,22 @@ const ipv6ToSegments = (self) => {
22114
22157
  ];
22115
22158
  };
22116
22159
  /**
22160
+ * Returns the sixteen numeric octets of an IPv6 address in a fresh array.
22161
+ *
22162
+ * @stability unstable
22163
+ * @category getters
22164
+ * @since 4.0.0
22165
+ */
22166
+ const ipv6ToOctets = (self) => {
22167
+ const { w0, w1, w2, w3 } = ipv6Words(self);
22168
+ return [
22169
+ ...wordToOctets(w0),
22170
+ ...wordToOctets(w1),
22171
+ ...wordToOctets(w2),
22172
+ ...wordToOctets(w3)
22173
+ ];
22174
+ };
22175
+ /**
22117
22176
  * Formats an IP address in canonical numeric form.
22118
22177
  *
22119
22178
  * @stability unstable
@@ -22203,7 +22262,7 @@ const fromIpv4Mapped = (self) => isIpv4Mapped(self) ? some$1(makeIpv4(ipv6Words(
22203
22262
  const InetV4Proto = {
22204
22263
  ...BaseProto,
22205
22264
  _tag: "InetAddressV4",
22206
- [TypeId$62]: TypeId$62,
22265
+ [TypeId$64]: TypeId$64,
22207
22266
  [symbol$2](that) {
22208
22267
  return isInetAddressV4(that) && this.port === that.port && equals$2(this.address, that.address);
22209
22268
  },
@@ -22220,7 +22279,7 @@ const InetV4Proto = {
22220
22279
  const InetV6Proto = {
22221
22280
  ...BaseProto,
22222
22281
  _tag: "InetAddressV6",
22223
- [TypeId$62]: TypeId$62,
22282
+ [TypeId$64]: TypeId$64,
22224
22283
  [symbol$2](that) {
22225
22284
  return isInetAddressV6(that) && this.port === that.port && this.scopeId === that.scopeId && equals$2(this.address, that.address);
22226
22285
  },
@@ -22388,7 +22447,7 @@ const formatUrlUnsafe = (self, scheme = "http") => getOrThrow(formatUrl(self, sc
22388
22447
  const UnixPathProto = {
22389
22448
  ...BaseProto,
22390
22449
  _tag: "UnixPathAddress",
22391
- [TypeId$62]: TypeId$62,
22450
+ [TypeId$64]: TypeId$64,
22392
22451
  [symbol$2](that) {
22393
22452
  return isUnixPathAddress(that) && this.path === that.path;
22394
22453
  },
@@ -22677,7 +22736,7 @@ const binaryUnits = [
22677
22736
  const allUnits = [...decimalUnits, .../*#__PURE__*/ binaryUnits.slice(1)];
22678
22737
  const unitsByName = /*#__PURE__*/ new Map(/*#__PURE__*/ allUnits.flatMap((unit) => unit.names.map((name) => [name, unit])));
22679
22738
  const unitsBySymbol = /*#__PURE__*/ new Map(/*#__PURE__*/ allUnits.map((unit) => [unit.symbol, unit]));
22680
- const make$78 = (value) => value;
22739
+ const make$80 = (value) => value;
22681
22740
  /**
22682
22741
  * The byte size containing zero bytes.
22683
22742
  *
@@ -22685,13 +22744,13 @@ const make$78 = (value) => value;
22685
22744
  * @category constants
22686
22745
  * @since 4.0.0
22687
22746
  */
22688
- const zero$1 = /*#__PURE__*/ make$78(bigint0$1);
22747
+ const zero$1 = /*#__PURE__*/ make$80(bigint0$1);
22689
22748
  const invalid$3 = (message) => {
22690
22749
  throw new Error(`Invalid ByteSize: ${message}`);
22691
22750
  };
22692
22751
  const fromNumber = (input) => {
22693
22752
  if (!Number.isSafeInteger(input) || input < 0) return invalid$3(`expected a non-negative safe integer, received ${input}`);
22694
- return make$78(BigInt(input));
22753
+ return make$80(BigInt(input));
22695
22754
  };
22696
22755
  const maxSafeInteger = /*#__PURE__*/ BigInt(Number.MAX_SAFE_INTEGER);
22697
22756
  const scaleDecimal = (quantity, factor) => {
@@ -22707,14 +22766,14 @@ const scaleDecimal = (quantity, factor) => {
22707
22766
  const fromQuantity = (quantity, unit) => {
22708
22767
  if (typeof quantity === "bigint") {
22709
22768
  if (quantity < bigint0$1) return invalid$3(`expected a non-negative quantity, received ${quantity}`);
22710
- return make$78(quantity * unit.factor);
22769
+ return make$80(quantity * unit.factor);
22711
22770
  }
22712
22771
  if (binaryUnits.includes(unit)) {
22713
22772
  const value = quantity * Number(unit.factor);
22714
- if (Number.isSafeInteger(value) && value >= 0) return make$78(BigInt(value));
22773
+ if (Number.isSafeInteger(value) && value >= 0) return make$80(BigInt(value));
22715
22774
  } else {
22716
22775
  const value = scaleDecimal(String(quantity), unit.factor);
22717
- if (value !== void 0 && value <= maxSafeInteger) return make$78(value);
22776
+ if (value !== void 0 && value <= maxSafeInteger) return make$80(value);
22718
22777
  }
22719
22778
  return invalid$3(`expected an exact non-negative safe-integer byte result, received ${quantity} ${unit.symbol}`);
22720
22779
  };
@@ -22740,7 +22799,7 @@ const fromStringUnsafe = (input) => {
22740
22799
  if (unit === void 0) return invalid$3(`unsupported unit ${JSON.stringify(match[2])}`);
22741
22800
  const value = scaleDecimal(match[1], unit.factor);
22742
22801
  if (value === void 0) return invalid$3(`${JSON.stringify(input)} does not represent an integral number of bytes`);
22743
- return make$78(value);
22802
+ return make$80(value);
22744
22803
  };
22745
22804
  /**
22746
22805
  * Decodes a trusted input into a byte size and throws for invalid input.
@@ -22753,7 +22812,7 @@ const fromInputUnsafe = (input) => {
22753
22812
  switch (typeof input) {
22754
22813
  case "bigint":
22755
22814
  if (input < bigint0$1) return invalid$3(`expected a non-negative bigint, received ${input}`);
22756
- return make$78(input);
22815
+ return make$80(input);
22757
22816
  case "number": return fromNumber(input);
22758
22817
  case "string": return fromStringUnsafe(input);
22759
22818
  }
@@ -23408,7 +23467,7 @@ const isNotLink = (error) => isIgnorable(error) || error.reason._tag === "Unknow
23408
23467
  const DIRECTORY_CONCURRENCY = 16;
23409
23468
  const byName = /*#__PURE__*/ mapInput(String$10, (entry) => entry.name);
23410
23469
  /** @internal */
23411
- const make$77 = (fs) => (pattern, options) => walk(fs, compile$1([pattern], options?.dot ?? false), options);
23470
+ const make$79 = (fs) => (pattern, options) => walk(fs, compile$1([pattern], options?.dot ?? false), options);
23412
23471
  const walk = /*#__PURE__*/ fnUntraced(function* (fs, compiled, options) {
23413
23472
  if (compiled.initial.size === 0) return [];
23414
23473
  const root = options?.root ?? "";
@@ -23522,7 +23581,7 @@ const walk = /*#__PURE__*/ fnUntraced(function* (fs, compiled, options) {
23522
23581
  * @stability unstable
23523
23582
  * @since 4.0.0
23524
23583
  */
23525
- const TypeId$60 = "~effect/PlatformError";
23584
+ const TypeId$62 = "~effect/PlatformError";
23526
23585
  /**
23527
23586
  * Error data for an invalid argument passed to a platform API.
23528
23587
  *
@@ -23635,7 +23694,7 @@ var PlatformError = class extends (/*#__PURE__*/ TaggedError$1("PlatformError"))
23635
23694
  *
23636
23695
  * @since 4.0.0
23637
23696
  */
23638
- [TypeId$60] = TypeId$60;
23697
+ [TypeId$62] = TypeId$62;
23639
23698
  get message() {
23640
23699
  return this.reason.message;
23641
23700
  }
@@ -23667,7 +23726,7 @@ const systemError = (options) => new PlatformError(new SystemError(options));
23667
23726
  */
23668
23727
  const badArgument = (options) => new PlatformError(new BadArgument(options));
23669
23728
  // ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/Chunk.js
23670
- const TypeId$59 = "~effect/Chunk";
23729
+ const TypeId$61 = "~effect/Chunk";
23671
23730
  function copy$2(src, srcPos, dest, destPos, len) {
23672
23731
  for (let i = srcPos; i < Math.min(src.length, srcPos + len); i++) dest[destPos + i - srcPos] = src[i];
23673
23732
  return dest;
@@ -23695,7 +23754,7 @@ const emptyArray = [];
23695
23754
  * @category instances
23696
23755
  * @since 4.0.0
23697
23756
  */
23698
- const makeEquivalence$1 = (isEquivalent) => make$87((self, that) => {
23757
+ const makeEquivalence$1 = (isEquivalent) => make$89((self, that) => {
23699
23758
  if (self.length !== that.length) return false;
23700
23759
  const as = toReadonlyArray(self);
23701
23760
  const bs = toReadonlyArray(that);
@@ -23704,9 +23763,9 @@ const makeEquivalence$1 = (isEquivalent) => make$87((self, that) => {
23704
23763
  });
23705
23764
  const _equivalence = /*#__PURE__*/ makeEquivalence$1(equals$2);
23706
23765
  const ChunkProto = {
23707
- [TypeId$59]: { _A: (_) => _ },
23766
+ [TypeId$61]: { _A: (_) => _ },
23708
23767
  toString() {
23709
- return `Chunk(${format$2(toReadonlyArray(this))})`;
23768
+ return `Chunk(${format$4(toReadonlyArray(this))})`;
23710
23769
  },
23711
23770
  toJSON() {
23712
23771
  return {
@@ -23790,7 +23849,7 @@ const makeChunk = (backing) => {
23790
23849
  * @category guards
23791
23850
  * @since 2.0.0
23792
23851
  */
23793
- const isChunk = (u) => hasProperty(u, TypeId$59);
23852
+ const isChunk = (u) => hasProperty(u, TypeId$61);
23794
23853
  const _empty = /*#__PURE__*/ makeChunk({ _tag: "IEmpty" });
23795
23854
  const copyToArray = (self, array, initial) => {
23796
23855
  switch (self.backing._tag) {
@@ -23922,11 +23981,11 @@ const makeUnsafe$6 = makeLatchUnsafe;
23922
23981
  * @category constructors
23923
23982
  * @since 4.0.0
23924
23983
  */
23925
- const make$76 = makeLatch;
23984
+ const make$78 = makeLatch;
23926
23985
  // ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/MutableRef.js
23927
- const TypeId$58 = "~effect/MutableRef";
23986
+ const TypeId$60 = "~effect/MutableRef";
23928
23987
  const MutableRefProto = {
23929
- [TypeId$58]: TypeId$58,
23988
+ [TypeId$60]: TypeId$60,
23930
23989
  ...PipeInspectableProto,
23931
23990
  toJSON() {
23932
23991
  return {
@@ -23968,7 +24027,7 @@ const MutableRefProto = {
23968
24027
  * @category constructors
23969
24028
  * @since 2.0.0
23970
24029
  */
23971
- const make$75 = (value) => {
24030
+ const make$77 = (value) => {
23972
24031
  const ref = Object.create(MutableRefProto);
23973
24032
  ref.current = value;
23974
24033
  return ref;
@@ -24084,7 +24143,7 @@ const Empty$2 = /*#__PURE__*/ Symbol.for("effect/MutableList/Empty");
24084
24143
  * @category constructors
24085
24144
  * @since 2.0.0
24086
24145
  */
24087
- const make$74 = () => ({
24146
+ const make$76 = () => ({
24088
24147
  head: void 0,
24089
24148
  tail: void 0,
24090
24149
  length: 0
@@ -24468,7 +24527,7 @@ const remove$4 = (self, value) => filter$3(self, (v) => v !== value);
24468
24527
  * @stability stable
24469
24528
  * @since 2.0.0
24470
24529
  */
24471
- const TypeId$57 = "~effect/PubSub";
24530
+ const TypeId$59 = "~effect/PubSub";
24472
24531
  const SubscriptionTypeId = "~effect/PubSub/Subscription";
24473
24532
  /**
24474
24533
  * Creates a PubSub with a custom atomic implementation and strategy.
@@ -24499,7 +24558,7 @@ const SubscriptionTypeId = "~effect/PubSub/Subscription";
24499
24558
  * @category constructors
24500
24559
  * @since 4.0.0
24501
24560
  */
24502
- const make$73 = (options) => sync(() => makePubSubUnsafe(options.atomicPubSub(), /* @__PURE__ */ new Map(), makeUnsafe$8(), makeUnsafe$6(false), make$75(false), options.strategy(), make$75(none())));
24561
+ const make$75 = (options) => sync(() => makePubSubUnsafe(options.atomicPubSub(), /* @__PURE__ */ new Map(), makeUnsafe$8(), makeUnsafe$6(false), make$77(false), options.strategy(), make$77(none())));
24503
24562
  /**
24504
24563
  * Creates an unbounded `PubSub`.
24505
24564
  *
@@ -24530,7 +24589,7 @@ const make$73 = (options) => sync(() => makePubSubUnsafe(options.atomicPubSub(),
24530
24589
  * @category constructors
24531
24590
  * @since 2.0.0
24532
24591
  */
24533
- const unbounded = (options) => make$73({
24592
+ const unbounded = (options) => make$75({
24534
24593
  atomicPubSub: () => makeAtomicUnbounded(options),
24535
24594
  strategy: () => new DroppingStrategy()
24536
24595
  });
@@ -24880,7 +24939,7 @@ const removeSubscribers = (subscribers, subscription, pollers) => {
24880
24939
  set.delete(pollers);
24881
24940
  if (set.size === 0) subscribers.delete(subscription);
24882
24941
  };
24883
- const makeSubscriptionUnsafe = (pubsub, subscribers, strategy, ended) => new SubscriptionImpl(pubsub, subscribers, pubsub.subscribe(), make$74(), makeUnsafe$6(false), make$75(false), strategy, pubsub.replayWindow(), ended);
24942
+ const makeSubscriptionUnsafe = (pubsub, subscribers, strategy, ended) => new SubscriptionImpl(pubsub, subscribers, pubsub.subscribe(), make$76(), makeUnsafe$6(false), make$77(false), strategy, pubsub.replayWindow(), ended);
24884
24943
  var UnboundedPubSub = class {
24885
24944
  publisherHead = {
24886
24945
  value: AbsentValue,
@@ -25054,7 +25113,7 @@ var SubscriptionImpl = class {
25054
25113
  }
25055
25114
  };
25056
25115
  var PubSubImpl = class {
25057
- [TypeId$57] = { _A: identity };
25116
+ [TypeId$59] = { _A: identity };
25058
25117
  pubsub;
25059
25118
  subscribers;
25060
25119
  scope;
@@ -25283,7 +25342,7 @@ const emptyReplayWindow = {
25283
25342
  * @stability stable
25284
25343
  * @since 3.8.0
25285
25344
  */
25286
- const TypeId$56 = "~effect/Queue";
25345
+ const TypeId$58 = "~effect/Queue";
25287
25346
  const EnqueueTypeId = "~effect/Queue/Enqueue";
25288
25347
  const DequeueTypeId = "~effect/Queue/Dequeue";
25289
25348
  const variance$1 = {
@@ -25291,7 +25350,7 @@ const variance$1 = {
25291
25350
  _E: identity
25292
25351
  };
25293
25352
  const QueueProto = {
25294
- [TypeId$56]: variance$1,
25353
+ [TypeId$58]: variance$1,
25295
25354
  [EnqueueTypeId]: variance$1,
25296
25355
  [DequeueTypeId]: variance$1,
25297
25356
  ...PipeInspectableProto,
@@ -25346,12 +25405,12 @@ const QueueProto = {
25346
25405
  * @category constructors
25347
25406
  * @since 4.0.0
25348
25407
  */
25349
- const make$72 = (options) => withFiber$1((fiber) => {
25408
+ const make$74 = (options) => withFiber$1((fiber) => {
25350
25409
  const self = Object.create(QueueProto);
25351
25410
  self.dispatcher = fiber.currentDispatcher;
25352
25411
  self.capacity = options?.capacity ?? Number.POSITIVE_INFINITY;
25353
25412
  self.strategy = options?.strategy ?? "suspend";
25354
- self.messages = make$74();
25413
+ self.messages = make$76();
25355
25414
  self.scheduleRunning = false;
25356
25415
  self.state = {
25357
25416
  _tag: "Open",
@@ -25392,7 +25451,7 @@ const make$72 = (options) => withFiber$1((fiber) => {
25392
25451
  * @category constructors
25393
25452
  * @since 2.0.0
25394
25453
  */
25395
- const bounded = (capacity) => make$72({ capacity });
25454
+ const bounded = (capacity) => make$74({ capacity });
25396
25455
  /**
25397
25456
  * Creates a bounded queue with sliding strategy. When the queue reaches capacity,
25398
25457
  * new elements are added and the oldest elements are dropped.
@@ -25429,7 +25488,7 @@ const bounded = (capacity) => make$72({ capacity });
25429
25488
  * @category constructors
25430
25489
  * @since 2.0.0
25431
25490
  */
25432
- const sliding = (capacity) => make$72({
25491
+ const sliding = (capacity) => make$74({
25433
25492
  capacity,
25434
25493
  strategy: "sliding"
25435
25494
  });
@@ -25468,7 +25527,7 @@ const sliding = (capacity) => make$72({
25468
25527
  * @category constructors
25469
25528
  * @since 2.0.0
25470
25529
  */
25471
- const dropping = (capacity) => make$72({
25530
+ const dropping = (capacity) => make$74({
25472
25531
  capacity,
25473
25532
  strategy: "dropping"
25474
25533
  });
@@ -26513,7 +26572,7 @@ var SemaphoreImpl = class {
26513
26572
  * @category constructors
26514
26573
  * @since 4.0.0
26515
26574
  */
26516
- const make$71 = (permits) => sync$2(() => new SemaphoreImpl(permits));
26575
+ const make$73 = (permits) => sync$2(() => new SemaphoreImpl(permits));
26517
26576
  /**
26518
26577
  * Runs an effect with a single permit and releases the permit when the effect
26519
26578
  * completes.
@@ -26572,7 +26631,7 @@ const toPull = (take) => isExit(take) ? isSuccess(take) ? done$1(take.value) : t
26572
26631
  * @category type IDs
26573
26632
  * @since 4.0.0
26574
26633
  */
26575
- const TypeId$55 = "~effect/Channel";
26634
+ const TypeId$57 = "~effect/Channel";
26576
26635
  /**
26577
26636
  * Checks whether a value is a `Channel`.
26578
26637
  *
@@ -26590,9 +26649,9 @@ const TypeId$55 = "~effect/Channel";
26590
26649
  * @category guards
26591
26650
  * @since 3.5.4
26592
26651
  */
26593
- const isChannel = (u) => hasProperty(u, TypeId$55);
26652
+ const isChannel = (u) => hasProperty(u, TypeId$57);
26594
26653
  const ChannelProto = {
26595
- [TypeId$55]: {
26654
+ [TypeId$57]: {
26596
26655
  _Env: identity,
26597
26656
  _InErr: identity,
26598
26657
  _InElem: identity,
@@ -26717,7 +26776,7 @@ const fromTransformBracket = (f) => fromTransform$1(fnUntraced(function* (upstre
26717
26776
  * @since 4.0.0
26718
26777
  */
26719
26778
  const toTransform = (channel) => channel.transform;
26720
- const asyncQueue = (scope, f, options) => make$72({
26779
+ const asyncQueue = (scope, f, options) => make$74({
26721
26780
  capacity: options?.bufferSize,
26722
26781
  strategy: options?.strategy
26723
26782
  }).pipe(tap$1((queue) => addFinalizer$1(scope, shutdown(queue))), tap$1((queue) => provide$3(f(queue), scope).pipe(catchCause$2((cause) => failCause$2(queue, cause)), forkIn(scope, { startImmediately: true }))));
@@ -27276,7 +27335,7 @@ const fromReadableStream$1 = (options) => fromTransform$1((_, scope) => readable
27276
27335
  }));
27277
27336
  const readableStreamToPullUnsafe = (options) => {
27278
27337
  const reader = options.readable.getReader();
27279
- const exit = options.exit ?? make$75(void 0);
27338
+ const exit = options.exit ?? make$77(void 0);
27280
27339
  const pull = suspend$2(() => {
27281
27340
  if (exit.current) return exit.current;
27282
27341
  return matchCauseEffect(tryPromise({
@@ -27821,7 +27880,7 @@ const switchMap$1 = /*#__PURE__*/ dual((args) => isChannel(args[0]), (self, f, o
27821
27880
  const mergeAll = /*#__PURE__*/ dual(2, (channels, { bufferSize = 16, concurrency, switch: switch_ = false }) => fromTransformBracket(fnUntraced(function* (upstream, scope, forkedScope) {
27822
27881
  const concurrencyN = concurrency === "unbounded" ? Number.MAX_SAFE_INTEGER : Math.max(1, concurrency);
27823
27882
  const semaphore = switch_ ? void 0 : makeUnsafe$5(concurrencyN);
27824
- const doneLatch = yield* make$76(true);
27883
+ const doneLatch = yield* make$78(true);
27825
27884
  const fibers = /* @__PURE__ */ new Map();
27826
27885
  const queue = yield* bounded(bufferSize);
27827
27886
  yield* addFinalizer$1(forkedScope, shutdown(queue));
@@ -28519,7 +28578,7 @@ const runFoldEffect$1 = /*#__PURE__*/ dual(3, (self, initial, f) => suspend$2(()
28519
28578
  */
28520
28579
  const toPullScoped = (self, scope) => toTransform(self)(done$1(), scope);
28521
28580
  // ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/internal/stream.js
28522
- const TypeId$54 = "~effect/Stream";
28581
+ const TypeId$56 = "~effect/Stream";
28523
28582
  const streamVariance = {
28524
28583
  _R: identity,
28525
28584
  _E: identity,
@@ -28529,7 +28588,7 @@ const Stream$2 = function(channel) {
28529
28588
  this.channel = channel;
28530
28589
  };
28531
28590
  Stream$2.prototype = {
28532
- [TypeId$54]: streamVariance,
28591
+ [TypeId$56]: streamVariance,
28533
28592
  pipe() {
28534
28593
  return pipeArguments(this, arguments);
28535
28594
  }
@@ -28537,7 +28596,7 @@ Stream$2.prototype = {
28537
28596
  /** @internal */
28538
28597
  const fromChannel$2 = (channel) => new Stream$2(channel);
28539
28598
  // ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/Sink.js
28540
- const TypeId$53 = "~effect/Sink";
28599
+ const TypeId$55 = "~effect/Sink";
28541
28600
  const endVoid = /*#__PURE__*/ succeed$5([void 0]);
28542
28601
  const sinkVariance = {
28543
28602
  _A: identity,
@@ -28547,7 +28606,7 @@ const sinkVariance = {
28547
28606
  _R: identity
28548
28607
  };
28549
28608
  const SinkProto = {
28550
- [TypeId$53]: sinkVariance,
28609
+ [TypeId$55]: sinkVariance,
28551
28610
  pipe() {
28552
28611
  return pipeArguments(this, arguments);
28553
28612
  }
@@ -28571,7 +28630,7 @@ const SinkProto = {
28571
28630
  * @category guards
28572
28631
  * @since 4.0.0
28573
28632
  */
28574
- const isSink = (u) => hasProperty(u, TypeId$53);
28633
+ const isSink = (u) => hasProperty(u, TypeId$55);
28575
28634
  /**
28576
28635
  * Creates a sink from a `Channel`.
28577
28636
  *
@@ -28743,9 +28802,9 @@ const unwrap$5 = (effect) => fromChannel$1(unwrap$6(map$5(effect, toChannel$1)))
28743
28802
  * @stability stable
28744
28803
  * @since 3.5.0
28745
28804
  */
28746
- const TypeId$52 = "~effect/RcMap";
28805
+ const TypeId$54 = "~effect/RcMap";
28747
28806
  const makeUnsafe$4 = (options) => ({
28748
- [TypeId$52]: TypeId$52,
28807
+ [TypeId$54]: TypeId$54,
28749
28808
  lookup: options.lookup,
28750
28809
  context: options.context,
28751
28810
  scope: options.scope,
@@ -28812,7 +28871,7 @@ const makeUnsafe$4 = (options) => ({
28812
28871
  * @category constructors
28813
28872
  * @since 3.5.0
28814
28873
  */
28815
- const make$70 = (options) => withFiber((fiber) => {
28874
+ const make$72 = (options) => withFiber((fiber) => {
28816
28875
  const context = fiber.context;
28817
28876
  const scope = get$14(context, Scope);
28818
28877
  const self = makeUnsafe$4({
@@ -28958,7 +29017,7 @@ const release$1 = (self, key, entry) => withFiber((fiber) => {
28958
29017
  return void_$1;
28959
29018
  });
28960
29019
  // ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/internal/rcRef.js
28961
- const TypeId$51 = "~effect/RcRef";
29020
+ const TypeId$53 = "~effect/RcRef";
28962
29021
  const stateEmpty = { _tag: "Empty" };
28963
29022
  const stateClosed = { _tag: "Closed" };
28964
29023
  const variance = {
@@ -28966,7 +29025,7 @@ const variance = {
28966
29025
  _E: identity
28967
29026
  };
28968
29027
  var RcRefImpl = class {
28969
- [TypeId$51] = variance;
29028
+ [TypeId$53] = variance;
28970
29029
  pipe() {
28971
29030
  return pipeArguments(this, arguments);
28972
29031
  }
@@ -28983,7 +29042,7 @@ var RcRefImpl = class {
28983
29042
  }
28984
29043
  };
28985
29044
  /** @internal */
28986
- const make$69 = (options) => withFiber((fiber) => {
29045
+ const make$71 = (options) => withFiber((fiber) => {
28987
29046
  const context = fiber.context;
28988
29047
  const scope = get$14(context, Scope);
28989
29048
  const ref = new RcRefImpl(options.acquire, context, scope, options.idleTimeToLive !== void 0 ? fromInputUnsafe$1(options.idleTimeToLive) : void 0);
@@ -29122,7 +29181,7 @@ const release = (self, state) => {
29122
29181
  * @category constructors
29123
29182
  * @since 3.5.0
29124
29183
  */
29125
- const make$68 = make$69;
29184
+ const make$70 = make$71;
29126
29185
  /**
29127
29186
  * Gets the value from an `RcRef`, acquiring it first if needed.
29128
29187
  *
@@ -29198,7 +29257,7 @@ const get$8 = get$9;
29198
29257
  * @category type IDs
29199
29258
  * @since 4.0.0
29200
29259
  */
29201
- const TypeId$50 = "~effect/Stream";
29260
+ const TypeId$52 = "~effect/Stream";
29202
29261
  /**
29203
29262
  * Checks whether a value is a Stream.
29204
29263
  *
@@ -29215,7 +29274,7 @@ const TypeId$50 = "~effect/Stream";
29215
29274
  * @category guards
29216
29275
  * @since 4.0.0
29217
29276
  */
29218
- const isStream = (u) => hasProperty(u, TypeId$50);
29277
+ const isStream = (u) => hasProperty(u, TypeId$52);
29219
29278
  /**
29220
29279
  * Creates a stream from a array-emitting `Channel`.
29221
29280
  *
@@ -29432,7 +29491,7 @@ const succeed$3 = (value) => fromChannel(succeed$4(of(value)));
29432
29491
  * @category constructors
29433
29492
  * @since 2.0.0
29434
29493
  */
29435
- const make$67 = (...values) => fromArray(values);
29494
+ const make$69 = (...values) => fromArray(values);
29436
29495
  /**
29437
29496
  * Creates a lazily constructed stream.
29438
29497
  *
@@ -30851,7 +30910,7 @@ const toReadableStreamEffect = /*#__PURE__*/ dual((args) => isStream(args[0]), (
30851
30910
  * @stability unstable
30852
30911
  * @since 4.0.0
30853
30912
  */
30854
- const TypeId$49 = "~effect/FileSystem";
30913
+ const TypeId$51 = "~effect/FileSystem";
30855
30914
  /**
30856
30915
  * Service tag for platform file-system operations.
30857
30916
  *
@@ -30919,10 +30978,10 @@ const FileSystem = /*#__PURE__*/ Service$1("effect/FileSystem");
30919
30978
  * @category constructors
30920
30979
  * @since 4.0.0
30921
30980
  */
30922
- const make$66 = (impl) => FileSystem.of({
30981
+ const make$68 = (impl) => FileSystem.of({
30923
30982
  ...impl,
30924
- [TypeId$49]: TypeId$49,
30925
- glob: make$77(impl),
30983
+ [TypeId$51]: TypeId$51,
30984
+ glob: make$79(impl),
30926
30985
  exists: (path) => pipe(impl.access(path), as(true), catchTag("PlatformError", (e) => e.reason._tag === "NotFound" ? succeed$5(false) : fail$8(e))),
30927
30986
  readFileString: (path, encoding) => flatMap$2(impl.readFile(path), (_) => try_({
30928
30987
  try: () => new TextDecoder(encoding).decode(_),
@@ -31053,7 +31112,7 @@ var WatchBackend = class extends (/*#__PURE__*/ Service$1()("effect/FileSystem/W
31053
31112
  * @category type IDs
31054
31113
  * @since 4.0.0
31055
31114
  */
31056
- const TypeId$48 = "~effect/Path";
31115
+ const TypeId$50 = "~effect/Path";
31057
31116
  /**
31058
31117
  * Service tag for accessing the current `Path` implementation.
31059
31118
  *
@@ -31141,9 +31200,9 @@ const Path$1 = /*#__PURE__*/ Service$1("effect/Path");
31141
31200
  * @category constructors
31142
31201
  * @since 4.0.0
31143
31202
  */
31144
- const make$65 = (impl) => Path$1.of({
31203
+ const make$67 = (impl) => Path$1.of({
31145
31204
  ...impl,
31146
- [TypeId$48]: TypeId$48,
31205
+ [TypeId$50]: TypeId$50,
31147
31206
  resolveWithin(root, input) {
31148
31207
  if (impl.parse(input).root !== "") return none();
31149
31208
  const base = impl.resolve(root);
@@ -31236,7 +31295,7 @@ const fromOptionExit = (option) => option._tag === "None" ? missingExit : succee
31236
31295
  * @stability stable
31237
31296
  * @since 4.0.0
31238
31297
  */
31239
- const TypeId$47 = "~effect/SchemaIssue/Issue";
31298
+ const TypeId$49 = "~effect/SchemaIssue/Issue";
31240
31299
  /**
31241
31300
  * Returns `true` if the given value is an {@link Issue}.
31242
31301
  *
@@ -31267,7 +31326,7 @@ const TypeId$47 = "~effect/SchemaIssue/Issue";
31267
31326
  * @since 4.0.0
31268
31327
  */
31269
31328
  function isIssue(u) {
31270
- return hasProperty(u, TypeId$47) && u[TypeId$47] === TypeId$47;
31329
+ return hasProperty(u, TypeId$49) && u[TypeId$49] === TypeId$49;
31271
31330
  }
31272
31331
  /**
31273
31332
  * Returns `true` when an issue contains an input reported by the schema parser.
@@ -31303,7 +31362,7 @@ function hasInput(issue) {
31303
31362
  return Object.hasOwn(issue, "input");
31304
31363
  }
31305
31364
  var IssueNodeImpl = class {
31306
- [TypeId$47] = TypeId$47;
31365
+ [TypeId$49] = TypeId$49;
31307
31366
  constructor(input, options) {
31308
31367
  if (options?.reportInput === true && input !== missing) this.input = input;
31309
31368
  }
@@ -31648,7 +31707,7 @@ const defaultLeafHook = (issue) => {
31648
31707
  */
31649
31708
  const defaultCheckHook = (issue) => findMessage(issue) ?? findMessage(issue.issue);
31650
31709
  function formatInput(issue) {
31651
- return hasInput(issue) ? format$2(issue.input) : void 0;
31710
+ return hasInput(issue) ? format$4(issue.input) : void 0;
31652
31711
  }
31653
31712
  function findExpected(issue) {
31654
31713
  const expected = issue.annotations?.expected;
@@ -31896,7 +31955,7 @@ const makeZonedUnsafe = makeZonedUnsafe$1;
31896
31955
  * @category constructors
31897
31956
  * @since 3.6.0
31898
31957
  */
31899
- const make$64 = make$80;
31958
+ const make$66 = make$82;
31900
31959
  /**
31901
31960
  * Converts a `DateTime` to a UTC `DateTime`.
31902
31961
  *
@@ -33065,9 +33124,9 @@ function decodeUriComponent() {
33065
33124
  * @stability stable
33066
33125
  * @since 2.0.0
33067
33126
  */
33068
- const TypeId$46 = "~effect/BigDecimal";
33127
+ const TypeId$48 = "~effect/BigDecimal";
33069
33128
  const BigDecimalProto = {
33070
- [TypeId$46]: TypeId$46,
33129
+ [TypeId$48]: TypeId$48,
33071
33130
  [symbol$3]() {
33072
33131
  const normalized = normalize(this);
33073
33132
  return combine$2(string$2(String(normalized.value)), number$2(normalized.scale));
@@ -33076,7 +33135,7 @@ const BigDecimalProto = {
33076
33135
  return isBigDecimal(that) && compare(this, that) === 0;
33077
33136
  },
33078
33137
  toString() {
33079
- return `BigDecimal(${format(this)})`;
33138
+ return `BigDecimal(${format$2(this)})`;
33080
33139
  },
33081
33140
  toJSON() {
33082
33141
  return {
@@ -33115,7 +33174,7 @@ const BigDecimalProto = {
33115
33174
  * @category guards
33116
33175
  * @since 2.0.0
33117
33176
  */
33118
- const isBigDecimal = (u) => hasProperty(u, TypeId$46);
33177
+ const isBigDecimal = (u) => hasProperty(u, TypeId$48);
33119
33178
  /**
33120
33179
  * Creates a `BigDecimal` from a `bigint` value and a safe integer scale.
33121
33180
  *
@@ -33148,7 +33207,7 @@ const isBigDecimal = (u) => hasProperty(u, TypeId$46);
33148
33207
  * @category constructors
33149
33208
  * @since 2.0.0
33150
33209
  */
33151
- const make$63 = (value, scale) => {
33210
+ const make$65 = (value, scale) => {
33152
33211
  if (!Number.isSafeInteger(scale)) throw new RangeError(`Scale must be a safe integer, got ${scale}`);
33153
33212
  const o = Object.create(BigDecimalProto);
33154
33213
  o.value = value;
@@ -33156,7 +33215,7 @@ const make$63 = (value, scale) => {
33156
33215
  return o;
33157
33216
  };
33158
33217
  const makeNormalized = (value, scale) => {
33159
- const o = make$63(value, scale);
33218
+ const o = make$65(value, scale);
33160
33219
  o.normalized = o;
33161
33220
  return o;
33162
33221
  };
@@ -33280,7 +33339,7 @@ const sign$2 = (n) => n.value === bigint0 ? 0 : n.value < bigint0 ? -1 : 1;
33280
33339
  * @category converting
33281
33340
  * @since 2.0.0
33282
33341
  */
33283
- const format = (n) => {
33342
+ const format$2 = (n) => {
33284
33343
  const normalized = normalize(n);
33285
33344
  if (Math.abs(normalized.scale) >= 16) return toExponential(normalized);
33286
33345
  const negative = normalized.value < bigint0;
@@ -33374,7 +33433,7 @@ const Middleware = class extends Class$3 {
33374
33433
  return new Middleware(this.encode, this.decode);
33375
33434
  }
33376
33435
  };
33377
- const TypeId$45 = "~effect/SchemaTransformation/Transformation";
33436
+ const TypeId$47 = "~effect/SchemaTransformation/Transformation";
33378
33437
  /**
33379
33438
  * Constructs a bidirectional schema transformation from its decode and encode getters.
33380
33439
  *
@@ -33383,7 +33442,7 @@ const TypeId$45 = "~effect/SchemaTransformation/Transformation";
33383
33442
  * @since 4.0.0
33384
33443
  */
33385
33444
  const Transformation = class extends Class$3 {
33386
- [TypeId$45] = TypeId$45;
33445
+ [TypeId$47] = TypeId$47;
33387
33446
  _tag = "Transformation";
33388
33447
  decode;
33389
33448
  encode;
@@ -33426,7 +33485,7 @@ const Transformation = class extends Class$3 {
33426
33485
  * @since 4.0.0
33427
33486
  */
33428
33487
  function isTransformation(u) {
33429
- return hasProperty(u, TypeId$45) && u[TypeId$45] === TypeId$45;
33488
+ return hasProperty(u, TypeId$47) && u[TypeId$47] === TypeId$47;
33430
33489
  }
33431
33490
  /**
33432
33491
  * Constructs a `Transformation` from an object with `decode` and `encode`
@@ -33682,9 +33741,9 @@ const decodeJsonError = (input) => {
33682
33741
  const encodeUnknownAsJson = (input) => {
33683
33742
  try {
33684
33743
  const json = formatJson(input);
33685
- return json === void 0 ? format$2(input) : JSON.parse(json);
33744
+ return json === void 0 ? format$4(input) : JSON.parse(json);
33686
33745
  } catch {
33687
- return format$2(input);
33746
+ return format$4(input);
33688
33747
  }
33689
33748
  };
33690
33749
  const encodeJsonError = (input, options, encodeDefect) => {
@@ -34039,9 +34098,9 @@ const Context = class {
34039
34098
  this.annotations = annotations;
34040
34099
  }
34041
34100
  };
34042
- const TypeId$44 = "~effect/Schema";
34101
+ const TypeId$46 = "~effect/Schema";
34043
34102
  var ASTNodeImpl = class {
34044
- [TypeId$44] = TypeId$44;
34103
+ [TypeId$46] = TypeId$46;
34045
34104
  annotations;
34046
34105
  checks;
34047
34106
  encoding;
@@ -34392,7 +34451,7 @@ const Literal$1 = class extends ASTNodeImpl {
34392
34451
  literal;
34393
34452
  constructor(literal, annotations, checks, encoding, context) {
34394
34453
  super(annotations, checks, encoding, context);
34395
- if (typeof literal === "number" && !globalThis.Number.isFinite(literal)) throw new Error(`A numeric literal must be finite, got ${format$2(literal)}`);
34454
+ if (typeof literal === "number" && !globalThis.Number.isFinite(literal)) throw new Error(`A numeric literal must be finite, got ${format$4(literal)}`);
34396
34455
  this.literal = literal;
34397
34456
  }
34398
34457
  /** @internal */
@@ -36277,7 +36336,7 @@ const makeHandle$1 = (params) => Object.setPrototypeOf({ ...params }, HandleProt
36277
36336
  * @category constructors
36278
36337
  * @since 4.0.0
36279
36338
  */
36280
- const make$62 = (spawn) => {
36339
+ const make$64 = (spawn) => {
36281
36340
  const streamString = (command, options) => spawn(command).pipe(map$5((handle) => decodeText$1(options?.includeStderr === true ? handle.all : drainFork(handle.stdout, handle.stderr))), unwrap$4);
36282
36341
  const streamLines = (command, options) => splitLines(streamString(command, options));
36283
36342
  return ChildProcessSpawner.of({
@@ -36321,7 +36380,7 @@ const stringOrRedacted = (val) => typeof val === "string" ? val : value$3(val);
36321
36380
  * @stability stable
36322
36381
  * @since 3.3.0
36323
36382
  */
36324
- const TypeId$43 = "~effect/Redacted";
36383
+ const TypeId$45 = "~effect/Redacted";
36325
36384
  /**
36326
36385
  * Returns `true` if a value is a `Redacted` wrapper.
36327
36386
  *
@@ -36350,7 +36409,7 @@ const TypeId$43 = "~effect/Redacted";
36350
36409
  * @category guards
36351
36410
  * @since 3.3.0
36352
36411
  */
36353
- const isRedacted = (u) => hasProperty(u, TypeId$43);
36412
+ const isRedacted = (u) => hasProperty(u, TypeId$45);
36354
36413
  /**
36355
36414
  * Creates a `Redacted` wrapper for a sensitive value.
36356
36415
  *
@@ -36378,14 +36437,14 @@ const isRedacted = (u) => hasProperty(u, TypeId$43);
36378
36437
  * @category constructors
36379
36438
  * @since 3.3.0
36380
36439
  */
36381
- const make$61 = (value, options) => {
36440
+ const make$63 = (value, options) => {
36382
36441
  const self = Object.create(Proto$22);
36383
36442
  if (options?.label) self.label = options.label;
36384
36443
  redactedRegistry.set(self, value);
36385
36444
  return self;
36386
36445
  };
36387
36446
  const Proto$22 = {
36388
- [TypeId$43]: { _A: (_) => _ },
36447
+ [TypeId$45]: { _A: (_) => _ },
36389
36448
  label: void 0,
36390
36449
  ...PipeInspectableProto,
36391
36450
  toJSON() {
@@ -36453,7 +36512,7 @@ const value$2 = value$3;
36453
36512
  * @category instances
36454
36513
  * @since 4.0.0
36455
36514
  */
36456
- const makeEquivalence = (isEquivalent) => make$87((x, y) => isEquivalent(value$2(x), value$2(y)));
36515
+ const makeEquivalence = (isEquivalent) => make$89((x, y) => isEquivalent(value$2(x), value$2(y)));
36457
36516
  // ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/process/CommandLine.js
36458
36517
  /**
36459
36518
  * Builds command lines, the single strings that a shell or a Windows program
@@ -36716,7 +36775,7 @@ const parseTemplate$1 = (texts, values) => {
36716
36775
  const endWord = () => {
36717
36776
  if (word.length === 0) return;
36718
36777
  const value = word.map(unwrap$3).join("");
36719
- words.push(word.length === 1 && isRedacted(word[0]) ? word[0] : word.some(isRedacted) ? make$61(value) : value);
36778
+ words.push(word.length === 1 && isRedacted(word[0]) ? word[0] : word.some(isRedacted) ? make$63(value) : value);
36720
36779
  word = [];
36721
36780
  plain = true;
36722
36781
  braceDepth = 0;
@@ -36792,7 +36851,7 @@ const parseTemplate$1 = (texts, values) => {
36792
36851
  * @stability unstable
36793
36852
  * @since 4.0.0
36794
36853
  */
36795
- const TypeId$42 = "~effect/process/ChildProcess";
36854
+ const TypeId$44 = "~effect/process/ChildProcess";
36796
36855
  const Proto$21 = {
36797
36856
  .../*#__PURE__*/ Prototype({
36798
36857
  label: "Command",
@@ -36800,7 +36859,7 @@ const Proto$21 = {
36800
36859
  return getUnsafe$2(fiber.context, ChildProcessSpawner).spawn(this);
36801
36860
  }
36802
36861
  }),
36803
- [TypeId$42]: TypeId$42
36862
+ [TypeId$44]: TypeId$44
36804
36863
  };
36805
36864
  const makeStandardCommand = (command, args, options) => Object.assign(Object.create(Proto$21), {
36806
36865
  _tag: "StandardCommand",
@@ -36859,7 +36918,7 @@ const makeStandardCommand = (command, args, options) => Object.assign(Object.cre
36859
36918
  * @category constructors
36860
36919
  * @since 4.0.0
36861
36920
  */
36862
- const make$60 = function make(...args) {
36921
+ const make$62 = function make(...args) {
36863
36922
  if (isTemplateString(args[0])) {
36864
36923
  const [templates, ...expressions] = args;
36865
36924
  const [command, cmdArgs] = parseTemplate(templates, expressions);
@@ -37180,7 +37239,7 @@ const fromReadableChannel = (options) => fromTransform$1((_, scope) => readableT
37180
37239
  */
37181
37240
  const fromDuplex$1 = (options) => fromTransform$1((upstream, scope) => {
37182
37241
  const duplex = options.evaluate();
37183
- const exit = make$75(void 0);
37242
+ const exit = make$77(void 0);
37184
37243
  const latch = makeUnsafe$6(false);
37185
37244
  return pullIntoWritable({
37186
37245
  pull: upstream,
@@ -37291,7 +37350,7 @@ const readableToPullUnsafe = (options) => {
37291
37350
  const readable = options.readable;
37292
37351
  const chunkSize = options.chunkSize ?? 4096;
37293
37352
  const closeOnDone = options.closeOnDone ?? true;
37294
- const exit = options.exit ?? make$75(void 0);
37353
+ const exit = options.exit ?? make$77(void 0);
37295
37354
  const latch = options.latch ?? makeUnsafe$6(false);
37296
37355
  function onReadable() {
37297
37356
  latch.openUnsafe();
@@ -37754,7 +37813,7 @@ const layer$22 = /*#__PURE__*/ effect(ChildProcessSpawner, /* @__PURE__ */ gen(f
37754
37813
  const stdinConfig = resolveStdinOption(command.options);
37755
37814
  const sourceStream = unwrap$4(succeed$5(getSourceStream(handles[handles.length - 1], options.from)));
37756
37815
  const toOption = options.to ?? "stdin";
37757
- if (toOption === "stdin") handles.push(yield* spawnCommand(make$60(command.command, command.args, {
37816
+ if (toOption === "stdin") handles.push(yield* spawnCommand(make$62(command.command, command.args, {
37758
37817
  ...command.options,
37759
37818
  stdin: {
37760
37819
  ...stdinConfig,
@@ -37774,14 +37833,14 @@ const layer$22 = /*#__PURE__*/ effect(ChildProcessSpawner, /* @__PURE__ */ gen(f
37774
37833
  type: "input",
37775
37834
  stream: sourceStream
37776
37835
  };
37777
- handles.push(yield* spawnCommand(make$60(command.command, command.args, {
37836
+ handles.push(yield* spawnCommand(make$62(command.command, command.args, {
37778
37837
  ...command.options,
37779
37838
  additionalFds: {
37780
37839
  ...existingFds,
37781
37840
  [fdName$1]: fdConfig
37782
37841
  }
37783
37842
  })));
37784
- } else handles.push(yield* spawnCommand(make$60(command.command, command.args, {
37843
+ } else handles.push(yield* spawnCommand(make$62(command.command, command.args, {
37785
37844
  ...command.options,
37786
37845
  stdin: {
37787
37846
  ...stdinConfig,
@@ -37813,7 +37872,7 @@ const layer$22 = /*#__PURE__*/ effect(ChildProcessSpawner, /* @__PURE__ */ gen(f
37813
37872
  }
37814
37873
  }
37815
37874
  });
37816
- return make$62(spawnCommand);
37875
+ return make$64(spawnCommand);
37817
37876
  }));
37818
37877
  /**
37819
37878
  * Flattens a `Command` into an array of `StandardCommand`s along with pipe
@@ -37896,7 +37955,7 @@ const RefProto = {
37896
37955
  */
37897
37956
  const makeUnsafe$2 = (value) => {
37898
37957
  const self = Object.create(RefProto);
37899
- self.ref = make$75(value);
37958
+ self.ref = make$77(value);
37900
37959
  return self;
37901
37960
  };
37902
37961
  /**
@@ -37925,7 +37984,7 @@ const makeUnsafe$2 = (value) => {
37925
37984
  * @category constructors
37926
37985
  * @since 2.0.0
37927
37986
  */
37928
- const make$58 = (value) => sync(() => makeUnsafe$2(value));
37987
+ const make$60 = (value) => sync(() => makeUnsafe$2(value));
37929
37988
  /**
37930
37989
  * Gets the current value of the Ref.
37931
37990
  *
@@ -38094,7 +38153,7 @@ const updateAndGet$1 = /*#__PURE__*/ dual(2, (self, f) => sync(() => self.ref.cu
38094
38153
  * @stability unstable
38095
38154
  * @since 4.0.0
38096
38155
  */
38097
- const TypeId$41 = "~effect/http/Cookies";
38156
+ const TypeId$43 = "~effect/http/Cookies";
38098
38157
  /**
38099
38158
  * Returns `true` when a value is a `Cookies` collection.
38100
38159
  *
@@ -38102,7 +38161,7 @@ const TypeId$41 = "~effect/http/Cookies";
38102
38161
  * @category guards
38103
38162
  * @since 4.0.0
38104
38163
  */
38105
- const isCookies = (u) => hasProperty(u, TypeId$41);
38164
+ const isCookies = (u) => hasProperty(u, TypeId$43);
38106
38165
  const CookieTypeId = "~effect/http/Cookies/Cookie";
38107
38166
  const CookieErrorTypeId = "~effect/http/Cookies/CookieError";
38108
38167
  /**
@@ -38156,7 +38215,7 @@ var CookiesError = class CookiesError extends (/*#__PURE__*/ TaggedError$1("Cook
38156
38215
  }
38157
38216
  };
38158
38217
  const Proto$20 = {
38159
- [TypeId$41]: TypeId$41,
38218
+ [TypeId$43]: TypeId$43,
38160
38219
  ...BaseProto,
38161
38220
  toJSON() {
38162
38221
  return {
@@ -38503,9 +38562,9 @@ const tryDecodeURIComponent = (str) => {
38503
38562
  * @category type IDs
38504
38563
  * @since 4.0.0
38505
38564
  */
38506
- const TypeId$40 = /*#__PURE__*/ Symbol.for("~effect/http/Headers");
38565
+ const TypeId$42 = /*#__PURE__*/ Symbol.for("~effect/http/Headers");
38507
38566
  const Proto$19 = /*#__PURE__*/ Object.defineProperties(/*#__PURE__*/ Object.create(null), {
38508
- [TypeId$40]: { value: TypeId$40 },
38567
+ [TypeId$42]: { value: TypeId$42 },
38509
38568
  [symbolRedactable]: { value(context) {
38510
38569
  return redact$1(this, get$14(context, CurrentRedactedNames$1));
38511
38570
  } },
@@ -38521,7 +38580,7 @@ const Proto$19 = /*#__PURE__*/ Object.defineProperties(/*#__PURE__*/ Object.crea
38521
38580
  toString: { value: BaseProto.toString },
38522
38581
  [NodeInspectSymbol]: { value: BaseProto[NodeInspectSymbol] }
38523
38582
  });
38524
- const make$57 = (input) => Object.assign(Object.create(Proto$19), input);
38583
+ const make$59 = (input) => Object.assign(Object.create(Proto$19), input);
38525
38584
  /**
38526
38585
  * Provides an `Equivalence` instance that compares `Headers` by header names
38527
38586
  * and string values.
@@ -38598,7 +38657,7 @@ const get$6 = /*#__PURE__*/ dual(2, (self, key) => fromUndefinedOr(self[key.toLo
38598
38657
  * @since 4.0.0
38599
38658
  */
38600
38659
  const set$3 = /*#__PURE__*/ dual(3, (self, key, value) => {
38601
- const out = make$57(self);
38660
+ const out = make$59(self);
38602
38661
  out[key.toLowerCase()] = value;
38603
38662
  return out;
38604
38663
  });
@@ -38613,7 +38672,7 @@ const set$3 = /*#__PURE__*/ dual(3, (self, key, value) => {
38613
38672
  * @category combinators
38614
38673
  * @since 4.0.0
38615
38674
  */
38616
- const setAll$1 = /*#__PURE__*/ dual(2, (self, headers) => make$57({
38675
+ const setAll$1 = /*#__PURE__*/ dual(2, (self, headers) => make$59({
38617
38676
  ...self,
38618
38677
  ...fromInput$1(headers)
38619
38678
  }));
@@ -38629,7 +38688,7 @@ const setAll$1 = /*#__PURE__*/ dual(2, (self, headers) => make$57({
38629
38688
  * @since 4.0.0
38630
38689
  */
38631
38690
  const merge = /*#__PURE__*/ dual(2, (self, headers) => {
38632
- const out = make$57(self);
38691
+ const out = make$59(self);
38633
38692
  Object.assign(out, headers);
38634
38693
  return out;
38635
38694
  });
@@ -38645,7 +38704,7 @@ const merge = /*#__PURE__*/ dual(2, (self, headers) => {
38645
38704
  * @since 4.0.0
38646
38705
  */
38647
38706
  const remove$3 = /*#__PURE__*/ dual(2, (self, key) => {
38648
- const out = make$57(self);
38707
+ const out = make$59(self);
38649
38708
  delete out[key.toLowerCase()];
38650
38709
  return out;
38651
38710
  });
@@ -38665,8 +38724,8 @@ const redact$1 = /*#__PURE__*/ dual(2, (self, key) => {
38665
38724
  const modify = (key) => {
38666
38725
  if (typeof key === "string") {
38667
38726
  const k = key.toLowerCase();
38668
- if (k in self) out[k] = make$61(self[k]);
38669
- } else for (const name in self) if (name.search(key) !== -1) out[name] = make$61(self[name]);
38727
+ if (k in self) out[k] = make$63(self[k]);
38728
+ } else for (const name in self) if (name.search(key) !== -1) out[name] = make$63(self[name]);
38670
38729
  };
38671
38730
  if (Array.isArray(key)) for (let i = 0; i < key.length; i++) modify(key[i]);
38672
38731
  else modify(key);
@@ -38908,7 +38967,7 @@ const retryAfterDelay$1 = (self, now) => self._tag === "Duration" ? self.duratio
38908
38967
  * @stability unstable
38909
38968
  * @since 4.0.0
38910
38969
  */
38911
- const TypeId$39 = "~effect/crypto/CryptoError";
38970
+ const TypeId$41 = "~effect/crypto/CryptoError";
38912
38971
  const ReasonTypeId$2 = "~effect/crypto/CryptoError/Reason";
38913
38972
  /**
38914
38973
  * Reason for an argument that the operation rejects before using the key or
@@ -39061,7 +39120,7 @@ var CryptoError = class extends (/*#__PURE__*/ TaggedError$1("CryptoError")) {
39061
39120
  *
39062
39121
  * @since 4.0.0
39063
39122
  */
39064
- [TypeId$39] = TypeId$39;
39123
+ [TypeId$41] = TypeId$41;
39065
39124
  /**
39066
39125
  * The reason's cause, when it has one.
39067
39126
  *
@@ -39927,7 +39986,7 @@ const redactedProto = (typeId, label) => ({
39927
39986
  };
39928
39987
  },
39929
39988
  toString() {
39930
- return format$2(this.toJSON());
39989
+ return format$4(this.toJSON());
39931
39990
  },
39932
39991
  [NodeInspectSymbol]() {
39933
39992
  return this.toJSON();
@@ -39937,7 +39996,7 @@ const redactedProto = (typeId, label) => ({
39937
39996
  * Builds a key. Keys compare by reference: comparing key bytes is not constant
39938
39997
  * time, and structural equality would let secret keys act as `HashMap` keys.
39939
39998
  */
39940
- const make$56 = (proto, algorithm, material) => byReferenceUnsafe(Object.create(proto, {
39999
+ const make$58 = (proto, algorithm, material) => byReferenceUnsafe(Object.create(proto, {
39941
40000
  algorithm: {
39942
40001
  value: algorithm,
39943
40002
  enumerable: true
@@ -39945,7 +40004,7 @@ const make$56 = (proto, algorithm, material) => byReferenceUnsafe(Object.create(
39945
40004
  [MaterialId]: { value: material }
39946
40005
  }));
39947
40006
  /** @internal */
39948
- const makeBytes = (proto, algorithm, bytes) => make$56(proto, algorithm, {
40007
+ const makeBytes = (proto, algorithm, bytes) => make$58(proto, algorithm, {
39949
40008
  _tag: "Bytes",
39950
40009
  bytes
39951
40010
  });
@@ -40008,7 +40067,7 @@ const importedAlgorithm = (algorithm, cryptoKey) => {
40008
40067
  */
40009
40068
  const fromCryptoKey$3 = (module, method, proto, algorithm, cryptoKey, expected) => suspend$2(() => {
40010
40069
  const problem = checkCryptoKey(cryptoKey, expected);
40011
- return problem === void 0 ? succeed$5(make$56(proto, importedAlgorithm(algorithm, cryptoKey), {
40070
+ return problem === void 0 ? succeed$5(make$58(proto, importedAlgorithm(algorithm, cryptoKey), {
40012
40071
  _tag: "CryptoKey",
40013
40072
  cryptoKey
40014
40073
  })) : invalidKey$2(module, method, problem);
@@ -40021,7 +40080,7 @@ const exportRaw = async (subtle, cryptoKey) => new Uint8Array(await subtle.expor
40021
40080
  *
40022
40081
  * @internal
40023
40082
  */
40024
- const toBytes$5 = (module, key, exportKey) => suspend$2(() => {
40083
+ const toBytes$6 = (module, key, exportKey) => suspend$2(() => {
40025
40084
  const stored = material(key);
40026
40085
  if (stored._tag === "Bytes") return succeed$5(copyBytes(stored.bytes));
40027
40086
  if (!stored.cryptoKey.extractable) return notExtractable(module, "toBytes");
@@ -40274,7 +40333,7 @@ const makeUuid = (bytes, randomBytes, format) => {
40274
40333
  * @category constructors
40275
40334
  * @since 4.0.0
40276
40335
  */
40277
- const make$55 = (randomBytes) => {
40336
+ const make$57 = (randomBytes) => {
40278
40337
  const randomBytesChecked = (size) => {
40279
40338
  checkSize(size);
40280
40339
  return randomBytes(size);
@@ -40320,7 +40379,7 @@ const fillRandom = (crypto, size) => {
40320
40379
  * @category layers
40321
40380
  * @since 4.0.0
40322
40381
  */
40323
- const layerWebCrypto$7 = /*#__PURE__*/ effect(SecureRandom, /*#__PURE__*/ WebCrypto.use((crypto) => succeed$5(make$55((size) => fillRandom(crypto, size)))));
40382
+ const layerWebCrypto$7 = /*#__PURE__*/ effect(SecureRandom, /*#__PURE__*/ WebCrypto.use((crypto) => succeed$5(make$57((size) => fillRandom(crypto, size)))));
40324
40383
  /**
40325
40384
  * Synchronously generates `size` cryptographically secure random bytes from
40326
40385
  * `globalThis.crypto`.
@@ -40398,10 +40457,10 @@ var Aead_exports = /* @__PURE__ */ __exportAll({
40398
40457
  key: () => key$3,
40399
40458
  layerWebCrypto: () => layerWebCrypto$6,
40400
40459
  layerWebCryptoWith: () => layerWebCryptoWith$1,
40401
- toBytes: () => toBytes$4,
40460
+ toBytes: () => toBytes$5,
40402
40461
  xchacha20Poly1305: () => xchacha20Poly1305
40403
40462
  });
40404
- const TypeId$38 = "~effect/crypto/Aead/Key";
40463
+ const TypeId$40 = "~effect/crypto/Aead/Key";
40405
40464
  /**
40406
40465
  * AES-128-GCM, with a 16-byte key and a 12-byte nonce.
40407
40466
  *
@@ -40470,7 +40529,7 @@ const xchacha20Poly1305 = {
40470
40529
  nonceLength: 24,
40471
40530
  implementation: /* @__PURE__ */ chachaImplementation(xchacha20Poly1305$1)
40472
40531
  };
40473
- const KeyProto$3 = /*#__PURE__*/ redactedProto(TypeId$38, "Aead.Key");
40532
+ const KeyProto$3 = /*#__PURE__*/ redactedProto(TypeId$40, "Aead.Key");
40474
40533
  /**
40475
40534
  * Checks whether a value is a {@link Key}.
40476
40535
  *
@@ -40478,7 +40537,7 @@ const KeyProto$3 = /*#__PURE__*/ redactedProto(TypeId$38, "Aead.Key");
40478
40537
  * @category guards
40479
40538
  * @since 4.0.0
40480
40539
  */
40481
- const isKey$3 = (u) => hasProperty(u, TypeId$38);
40540
+ const isKey$3 = (u) => hasProperty(u, TypeId$40);
40482
40541
  /**
40483
40542
  * Service that generates keys, encrypts, and decrypts with authentication.
40484
40543
  *
@@ -40667,7 +40726,7 @@ const fromCryptoKey$2 = (algorithm, cryptoKey) => algorithm.implementation !== v
40667
40726
  * @category converting
40668
40727
  * @since 4.0.0
40669
40728
  */
40670
- const toBytes$4 = (key) => toBytes$5("Aead", key, exportRaw);
40729
+ const toBytes$5 = (key) => toBytes$6("Aead", key, exportRaw);
40671
40730
  // ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/crypto/Cipher.js
40672
40731
  /**
40673
40732
  * Unauthenticated encryption with no integrity: compose with `Mac`.
@@ -40707,9 +40766,9 @@ var Cipher_exports = /* @__PURE__ */ __exportAll({
40707
40766
  isKey: () => isKey$2,
40708
40767
  key: () => key$2,
40709
40768
  layerWebCrypto: () => layerWebCrypto$5,
40710
- toBytes: () => toBytes$3
40769
+ toBytes: () => toBytes$4
40711
40770
  });
40712
- const TypeId$37 = "~effect/crypto/Cipher/Key";
40771
+ const TypeId$39 = "~effect/crypto/Cipher/Key";
40713
40772
  /**
40714
40773
  * AES-128-CTR, with a 16-byte key.
40715
40774
  *
@@ -40768,7 +40827,7 @@ const aes256Cbc = {
40768
40827
  mode: "AES-CBC",
40769
40828
  keyLength: 32
40770
40829
  };
40771
- const KeyProto$2 = /*#__PURE__*/ redactedProto(TypeId$37, "Cipher.Key");
40830
+ const KeyProto$2 = /*#__PURE__*/ redactedProto(TypeId$39, "Cipher.Key");
40772
40831
  /**
40773
40832
  * Checks whether a value is a {@link Key}.
40774
40833
  *
@@ -40776,7 +40835,7 @@ const KeyProto$2 = /*#__PURE__*/ redactedProto(TypeId$37, "Cipher.Key");
40776
40835
  * @category guards
40777
40836
  * @since 4.0.0
40778
40837
  */
40779
- const isKey$2 = (u) => hasProperty(u, TypeId$37);
40838
+ const isKey$2 = (u) => hasProperty(u, TypeId$39);
40780
40839
  /**
40781
40840
  * Service that generates keys, encrypts, and decrypts without
40782
40841
  * authentication.
@@ -40896,7 +40955,7 @@ const fromCryptoKey$1 = (algorithm, cryptoKey) => fromCryptoKey$3("Cipher", "fro
40896
40955
  * @category converting
40897
40956
  * @since 4.0.0
40898
40957
  */
40899
- const toBytes$3 = (key) => toBytes$5("Cipher", key, exportRaw);
40958
+ const toBytes$4 = (key) => toBytes$6("Cipher", key, exportRaw);
40900
40959
  // ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/crypto/internal/asymmetric.js
40901
40960
  const seedPrefix = (oid) => Uint8Array.of(48, 46, 2, 1, 0, 48, 5, 6, 3, 43, 101, oid, 4, 34, 4, 32);
40902
40961
  /** @internal */
@@ -40962,7 +41021,7 @@ const exportKey = (subtle, cryptoKey, spec, role) => role === "private" ? export
40962
41021
  *
40963
41022
  * @internal
40964
41023
  */
40965
- const toBytes$2 = (family, key) => toBytes$5(family.module, key, (subtle, cryptoKey) => exportKey(subtle, cryptoKey, family.specOf(key.algorithm), family.isPrivateKey(key) ? "private" : "public"));
41024
+ const toBytes$3 = (family, key) => toBytes$6(family.module, key, (subtle, cryptoKey) => exportKey(subtle, cryptoKey, family.specOf(key.algorithm), family.isPrivateKey(key) ? "private" : "public"));
40966
41025
  /**
40967
41026
  * Per-layer caches for imported byte-backed keys.
40968
41027
  *
@@ -41383,9 +41442,9 @@ var Mac_exports = /* @__PURE__ */ __exportAll({
41383
41442
  layerWebCrypto: () => layerWebCrypto$3,
41384
41443
  layerWebCryptoWith: () => layerWebCryptoWith,
41385
41444
  timingSafeEqual: () => timingSafeEqual,
41386
- toBytes: () => toBytes$1
41445
+ toBytes: () => toBytes$2
41387
41446
  });
41388
- const TypeId$36 = "~effect/crypto/Mac/Key";
41447
+ const TypeId$38 = "~effect/crypto/Mac/Key";
41389
41448
  /**
41390
41449
  * HMAC with SHA-1, with a 20-byte tag.
41391
41450
  *
@@ -41435,7 +41494,7 @@ const hmacSha512 = {
41435
41494
  name: "hmacSha512",
41436
41495
  hash: sha512
41437
41496
  };
41438
- const KeyProto$1 = /*#__PURE__*/ redactedProto(TypeId$36, "Mac.Key");
41497
+ const KeyProto$1 = /*#__PURE__*/ redactedProto(TypeId$38, "Mac.Key");
41439
41498
  /**
41440
41499
  * Checks whether a value is a {@link Key}.
41441
41500
  *
@@ -41443,7 +41502,7 @@ const KeyProto$1 = /*#__PURE__*/ redactedProto(TypeId$36, "Mac.Key");
41443
41502
  * @category guards
41444
41503
  * @since 4.0.0
41445
41504
  */
41446
- const isKey$1 = (u) => hasProperty(u, TypeId$36);
41505
+ const isKey$1 = (u) => hasProperty(u, TypeId$38);
41447
41506
  const blockSizes = {
41448
41507
  "MD5": 64,
41449
41508
  "SHA-1": 64,
@@ -41610,7 +41669,7 @@ const fromCryptoKey = (algorithm, cryptoKey) => fromCryptoKey$3("Mac", "fromCryp
41610
41669
  * @category converting
41611
41670
  * @since 4.0.0
41612
41671
  */
41613
- const toBytes$1 = (key) => toBytes$5("Mac", key, exportRaw);
41672
+ const toBytes$2 = (key) => toBytes$6("Mac", key, exportRaw);
41614
41673
  /**
41615
41674
  * Compares two byte arrays in constant time.
41616
41675
  *
@@ -41722,7 +41781,7 @@ const family$1 = {
41722
41781
  /** @internal */
41723
41782
  const secretFamily = (algorithm) => "nonceLength" in algorithm ? Aead_exports : "mode" in algorithm ? Cipher_exports : "_tag" in algorithm ? {
41724
41783
  key,
41725
- toBytes
41784
+ toBytes: toBytes$1
41726
41785
  } : Mac_exports;
41727
41786
  const hmacParams = {
41728
41787
  name: "HMAC",
@@ -41852,7 +41911,7 @@ const key = (algorithm, bytes) => fromBytes("KeyWrap", "key", KeyProto, algorith
41852
41911
  * @category converting
41853
41912
  * @since 4.0.0
41854
41913
  */
41855
- const toBytes = (key) => isKey(key) ? toBytes$5("KeyWrap", key, exportRaw) : toBytes$2(family$1, key);
41914
+ const toBytes$1 = (key) => isKey(key) ? toBytes$6("KeyWrap", key, exportRaw) : toBytes$3(family$1, key);
41856
41915
  // ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/crypto/Signature.js
41857
41916
  /**
41858
41917
  * Digital signatures: Ed25519, ECDSA on P-256, P-384 and P-521, RSA-PSS, and
@@ -43064,7 +43123,7 @@ var HashMapImpl = class {
43064
43123
  return toJson(this);
43065
43124
  }
43066
43125
  toString() {
43067
- return `HashMap(${format$2(Array.from(this))})`;
43126
+ return `HashMap(${format$4(Array.from(this))})`;
43068
43127
  }
43069
43128
  toJSON() {
43070
43129
  return {
@@ -43407,7 +43466,7 @@ const HashSetProto = {
43407
43466
  return keys(keyMap(this));
43408
43467
  },
43409
43468
  toString() {
43410
- return `HashSet(${format$2(Array.from(this))})`;
43469
+ return `HashSet(${format$4(Array.from(this))})`;
43411
43470
  },
43412
43471
  toJSON() {
43413
43472
  return {
@@ -43573,7 +43632,7 @@ const toPath = (url) => {
43573
43632
  * @stability unstable
43574
43633
  * @since 4.0.0
43575
43634
  */
43576
- const TypeId$35 = "~effect/http/UrlParams";
43635
+ const TypeId$37 = "~effect/http/UrlParams";
43577
43636
  /**
43578
43637
  * Returns `true` when a value is a `UrlParams` instance.
43579
43638
  *
@@ -43581,10 +43640,10 @@ const TypeId$35 = "~effect/http/UrlParams";
43581
43640
  * @category guards
43582
43641
  * @since 4.0.0
43583
43642
  */
43584
- const isUrlParams = (u) => hasProperty(u, TypeId$35);
43643
+ const isUrlParams = (u) => hasProperty(u, TypeId$37);
43585
43644
  const Proto$18 = {
43586
43645
  ...PipeInspectableProto,
43587
- [TypeId$35]: TypeId$35,
43646
+ [TypeId$37]: TypeId$37,
43588
43647
  [Symbol.iterator]() {
43589
43648
  return this.params[Symbol.iterator]();
43590
43649
  },
@@ -43615,7 +43674,7 @@ const Proto$18 = {
43615
43674
  * @category constructors
43616
43675
  * @since 4.0.0
43617
43676
  */
43618
- const make$54 = (params) => {
43677
+ const make$56 = (params) => {
43619
43678
  const self = Object.create(Proto$18);
43620
43679
  self.params = params;
43621
43680
  return self;
@@ -43641,7 +43700,7 @@ const fromInput = (input) => {
43641
43700
  const [keys, value] = parsed[i];
43642
43701
  out.push([`${keys[0]}[${keys.slice(1).join("][")}]`, value]);
43643
43702
  } else out.push(parsed[i]);
43644
- return make$54(out);
43703
+ return make$56(out);
43645
43704
  };
43646
43705
  const fromInputNested = (input) => {
43647
43706
  const entries = typeof input[Symbol.iterator] === "function" ? fromIterable$5(input) : Object.entries(input);
@@ -43667,7 +43726,7 @@ const coerce = (value) => isRedacted(value) ? value : String(value);
43667
43726
  * @category instances
43668
43727
  * @since 4.0.0
43669
43728
  */
43670
- const Equivalence = /*#__PURE__*/ make$87((a, b) => arrayEquivalence(a.params, b.params));
43729
+ const Equivalence = /*#__PURE__*/ make$89((a, b) => arrayEquivalence(a.params, b.params));
43671
43730
  const arrayEquivalence = /*#__PURE__*/ makeEquivalence$2(/*#__PURE__*/ makeEquivalence$4([/*#__PURE__*/ strictEqual(), /*#__PURE__*/ asEquivalence()]));
43672
43731
  /**
43673
43732
  * An empty `UrlParams` value.
@@ -43676,7 +43735,7 @@ const arrayEquivalence = /*#__PURE__*/ makeEquivalence$2(/*#__PURE__*/ makeEquiv
43676
43735
  * @category constructors
43677
43736
  * @since 4.0.0
43678
43737
  */
43679
- const empty$3 = /*#__PURE__*/ make$54([]);
43738
+ const empty$3 = /*#__PURE__*/ make$56([]);
43680
43739
  /**
43681
43740
  * Sets multiple query parameters from input.
43682
43741
  *
@@ -43697,7 +43756,7 @@ const setAll = /*#__PURE__*/ dual(2, (self, input) => {
43697
43756
  if (keys.has(self.params[i][0])) continue;
43698
43757
  params.push(self.params[i]);
43699
43758
  }
43700
- return make$54(params);
43759
+ return make$56(params);
43701
43760
  });
43702
43761
  /**
43703
43762
  * Serializes `UrlParams` to a URL query string without a leading question mark.
@@ -43774,7 +43833,7 @@ const toReadonlyRecord = toRecord;
43774
43833
  */
43775
43834
  const redact = /*#__PURE__*/ dual(2, (self, key) => {
43776
43835
  const patterns = Array.isArray(key) ? key : [key];
43777
- return self.params.map(([name, value]) => [name, typeof value === "string" && isRedactedName(name, patterns) ? make$61(value) : value]);
43836
+ return self.params.map(([name, value]) => [name, typeof value === "string" && isRedactedName(name, patterns) ? make$63(value) : value]);
43778
43837
  });
43779
43838
  /**
43780
43839
  * Checks whether a parameter name matches one of the redaction patterns.
@@ -44153,7 +44212,7 @@ function makeOption(schema) {
44153
44212
  * @category constructors
44154
44213
  * @since 4.0.0
44155
44214
  */
44156
- function make$53(schema) {
44215
+ function make$55(schema) {
44157
44216
  return makeConstructorSync(toType$1(schema.ast));
44158
44217
  }
44159
44218
  /**
@@ -44394,12 +44453,12 @@ const normalCompiler = (ast) => resolve(ast).parser;
44394
44453
  const constructorCompiler = (ast) => resolve(ast).makeEffect;
44395
44454
  // ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/internal/schema/make.js
44396
44455
  /** @internal */
44397
- const TypeId$34 = "~effect/Schema/Schema";
44456
+ const TypeId$36 = "~effect/Schema/Schema";
44398
44457
  const RebuildOptions = /*#__PURE__*/ Symbol();
44399
44458
  const SchemaProto = {
44400
- [TypeId$34]: TypeId$34,
44459
+ [TypeId$36]: TypeId$36,
44401
44460
  get make() {
44402
- const value = make$53(this);
44461
+ const value = make$55(this);
44403
44462
  Object.defineProperty(this, "make", {
44404
44463
  value,
44405
44464
  enumerable: true
@@ -44435,11 +44494,11 @@ const SchemaProto = {
44435
44494
  return this.rebuild(appendChecks(this.ast, checks));
44436
44495
  },
44437
44496
  rebuild(ast) {
44438
- return make$52(ast, this[RebuildOptions]);
44497
+ return make$54(ast, this[RebuildOptions]);
44439
44498
  }
44440
44499
  };
44441
44500
  /** @internal */
44442
- function make$52(ast, options) {
44501
+ function make$54(ast, options) {
44443
44502
  function Schema() {}
44444
44503
  const self = Object.setPrototypeOf(Schema, SchemaProto);
44445
44504
  if (options && (Object.hasOwn(options, "name") || Object.hasOwn(options, "length") || Object.hasOwn(options, "__proto__"))) Object.defineProperties(self, Object.getOwnPropertyDescriptors({ ...options }));
@@ -44691,7 +44750,7 @@ const PRE_2020_TO_2020_COLLISIONS = [
44691
44750
  // ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/internal/schema/toCodec.js
44692
44751
  /** @internal */
44693
44752
  function toCodecJson$1(schema) {
44694
- return make$52(toCodecJsonAST(schema.ast), { schema });
44753
+ return make$54(toCodecJsonAST(schema.ast), { schema });
44695
44754
  }
44696
44755
  /** @internal */
44697
44756
  const toCodecJsonAST = /*#__PURE__*/ makeCodecDerivation(toCodecJsonASTStep);
@@ -44735,7 +44794,7 @@ function toCodecJsonASTStep(ast, recur) {
44735
44794
  case "Declaration": {
44736
44795
  const getLink = ast.annotations?.toCodecJson ?? ast.annotations?.toCodec;
44737
44796
  if (!isFunction(getLink)) return replaceEncoding(ast, [unknownToJson]);
44738
- const link = getLink(ast.typeParameters.map((tp) => make$52(toEncoded$1(tp))));
44797
+ const link = getLink(ast.typeParameters.map((tp) => make$54(toEncoded$1(tp))));
44739
44798
  return link === void 0 ? ast : replaceEncoding(ast, [mapLink(link, recur)]);
44740
44799
  }
44741
44800
  case "Unknown": return replaceEncoding(ast, [unknownToJson]);
@@ -44762,7 +44821,7 @@ function toCodecJsonASTStep(ast, recur) {
44762
44821
  }
44763
44822
  /** @internal */
44764
44823
  function toCodecStringTree$1(schema) {
44765
- return make$52(toCodecStringTreeAST(schema.ast), { schema });
44824
+ return make$54(toCodecStringTreeAST(schema.ast), { schema });
44766
44825
  }
44767
44826
  const toStringTreeReorder = /*#__PURE__*/ makeReorder((ast) => {
44768
44827
  switch (ast._tag) {
@@ -44778,7 +44837,7 @@ const toStringTreeReorder = /*#__PURE__*/ makeReorder((ast) => {
44778
44837
  function toCodecStringTreeASTStep(ast, recur, onMissingAnnotation) {
44779
44838
  switch (ast._tag) {
44780
44839
  case "Declaration": {
44781
- const typeParameters = ast.typeParameters.map((tp) => make$52(recur(toEncoded$1(tp))));
44840
+ const typeParameters = ast.typeParameters.map((tp) => make$54(recur(toEncoded$1(tp))));
44782
44841
  const getStringTreeLink = ast.annotations?.toCodecStringTree;
44783
44842
  if (isFunction(getStringTreeLink)) {
44784
44843
  const link = getStringTreeLink(typeParameters);
@@ -45831,8 +45890,186 @@ const SchemaErrorTypeId = "~effect/Schema/SchemaError";
45831
45890
  function isSchemaError$1(u) {
45832
45891
  return hasProperty(u, "~effect/Schema/SchemaError") && u["~effect/Schema/SchemaError"] === "~effect/Schema/SchemaError";
45833
45892
  }
45893
+ // ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/net/IpInterface.js
45894
+ /**
45895
+ * IPv4 and IPv6 interface addresses that preserve host bits alongside a prefix length.
45896
+ *
45897
+ * @stability unstable
45898
+ * @since 4.0.0
45899
+ */
45900
+ const TypeId$35 = "~effect/net/IpInterface";
45901
+ /**
45902
+ * Returns `true` when a value is an IP interface address.
45903
+ *
45904
+ * @stability unstable
45905
+ * @category guards
45906
+ * @since 4.0.0
45907
+ */
45908
+ const isIpInterface = (u) => hasProperty(u, TypeId$35);
45909
+ const IpInterfaceProto = {
45910
+ ...BaseProto,
45911
+ _tag: "IpInterface",
45912
+ [TypeId$35]: TypeId$35,
45913
+ [symbol$2](that) {
45914
+ return isIpInterface(that) && this.prefixLength === that.prefixLength && equals$2(this.address, that.address);
45915
+ },
45916
+ [symbol$3]() {
45917
+ return combine$2(hash(this.address), number$2(this.prefixLength));
45918
+ },
45919
+ toString() {
45920
+ return format$1(this);
45921
+ },
45922
+ toJSON() {
45923
+ return this.toString();
45924
+ }
45925
+ };
45926
+ const interfaceError = (input, message) => fail$13(new NetAddressError({
45927
+ input,
45928
+ message
45929
+ }));
45930
+ /**
45931
+ * Creates an interface address while preserving all address bits.
45932
+ *
45933
+ * @stability unstable
45934
+ * @category constructors
45935
+ * @since 4.0.0
45936
+ */
45937
+ const make$53 = (address, prefixLength) => {
45938
+ const max = width$1(address);
45939
+ if (!Number.isInteger(prefixLength) || prefixLength < 0 || prefixLength > max) return interfaceError(address, `prefix length must be an integer from 0 through ${max}`);
45940
+ const self = Object.assign(Object.create(IpInterfaceProto), {
45941
+ address,
45942
+ prefixLength
45943
+ });
45944
+ return succeed$10(Object.freeze(self));
45945
+ };
45946
+ const parseAddressWithPrefix = (input, options) => {
45947
+ const slash = input.indexOf("/");
45948
+ if (slash === -1 && options?.prefix !== "required") return succeed$10({
45949
+ address: input,
45950
+ prefixLength: void 0
45951
+ });
45952
+ if (slash <= 0 || slash !== input.lastIndexOf("/") || slash === input.length - 1) return interfaceError(input, "expected an address and prefix length separated by one slash");
45953
+ const prefix = input.slice(slash + 1);
45954
+ if (!/^(0|[1-9][0-9]*)$/.test(prefix)) return interfaceError(input, "prefix length must be an unpadded ASCII decimal integer");
45955
+ return succeed$10({
45956
+ address: input.slice(0, slash),
45957
+ prefixLength: Number(prefix)
45958
+ });
45959
+ };
45960
+ /**
45961
+ * Parses an IP interface address while preserving host bits.
45962
+ *
45963
+ * **Details**
45964
+ *
45965
+ * A missing prefix defaults to the address width. Use `prefix: "required"` to
45966
+ * require one.
45967
+ *
45968
+ * @stability unstable
45969
+ * @category decoding
45970
+ * @since 4.0.0
45971
+ */
45972
+ const fromString$2 = (input, options) => flatMap$6(parseAddressWithPrefix(input, options), (parts) => flatMap$6(ipFromString(parts.address), (address) => make$53(address, parts.prefixLength ?? width$1(address))));
45973
+ /**
45974
+ * Formats an interface address using canonical address text and its decimal prefix length.
45975
+ *
45976
+ * @stability unstable
45977
+ * @category encoding
45978
+ * @since 4.0.0
45979
+ */
45980
+ const format$1 = (self) => `${formatIp(self.address)}/${self.prefixLength}`;
45981
+ // ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/net/IpNetwork.js
45982
+ /**
45983
+ * Pure, canonical IPv4 and IPv6 network prefixes using CIDR notation.
45984
+ *
45985
+ * @stability unstable
45986
+ * @since 4.0.0
45987
+ */
45988
+ const TypeId$34 = "~effect/net/IpNetwork";
45989
+ /**
45990
+ * Returns `true` when a value is an IPv4 or IPv6 network prefix.
45991
+ *
45992
+ * @stability unstable
45993
+ * @category guards
45994
+ * @since 4.0.0
45995
+ */
45996
+ const isIpNetwork = (u) => hasProperty(u, TypeId$34);
45997
+ const IpNetworkProto = {
45998
+ ...BaseProto,
45999
+ _tag: "IpNetwork",
46000
+ [TypeId$34]: TypeId$34,
46001
+ [symbol$2](that) {
46002
+ return isIpNetwork(that) && this.prefixLength === that.prefixLength && equals$2(this.address, that.address);
46003
+ },
46004
+ [symbol$3]() {
46005
+ return combine$2(hash(this.address), number$2(this.prefixLength));
46006
+ },
46007
+ toString() {
46008
+ return format(this);
46009
+ },
46010
+ toJSON() {
46011
+ return this.toString();
46012
+ }
46013
+ };
46014
+ const fromInterfaceValue = (value) => {
46015
+ const self = Object.assign(Object.create(IpNetworkProto), {
46016
+ address: value.address,
46017
+ prefixLength: value.prefixLength
46018
+ });
46019
+ return Object.freeze(self);
46020
+ };
46021
+ const toBytes = (address) => isIpv4Address(address) ? ipv4ToOctets(address) : ipv6ToOctets(address);
46022
+ const maskBytes = (bytes, prefixLength) => {
46023
+ const wholeBytes = Math.floor(prefixLength / 8);
46024
+ const partialBits = prefixLength % 8;
46025
+ return bytes.map((byte, index) => {
46026
+ if (index < wholeBytes) return byte;
46027
+ if (index === wholeBytes && partialBits !== 0) return byte & (255 << 8 - partialBits & 255);
46028
+ return 0;
46029
+ });
46030
+ };
46031
+ /**
46032
+ * Creates a network prefix when the address has no host bits set.
46033
+ *
46034
+ * **Gotchas**
46035
+ *
46036
+ * Use {@link fromAddress} when a host address should be truncated to its containing network.
46037
+ *
46038
+ * @stability unstable
46039
+ * @category constructors
46040
+ * @since 4.0.0
46041
+ */
46042
+ const make$52 = (address, prefixLength) => {
46043
+ return flatMap$6(make$53(address, prefixLength), (value) => {
46044
+ const bytes = toBytes(address);
46045
+ const masked = maskBytes(bytes, prefixLength);
46046
+ if (bytes.some((byte, index) => byte !== masked[index])) return fail$13(new NetAddressError({
46047
+ input: address,
46048
+ message: "address has non-zero host bits"
46049
+ }));
46050
+ return succeed$10(fromInterfaceValue(value));
46051
+ });
46052
+ };
46053
+ /**
46054
+ * Parses a strict IPv4 or IPv6 network prefix in CIDR notation.
46055
+ *
46056
+ * @stability unstable
46057
+ * @category decoding
46058
+ * @since 4.0.0
46059
+ */
46060
+ const fromString$1 = (input) => {
46061
+ return flatMap$6(fromString$2(input, { prefix: "required" }), (value) => make$52(value.address, value.prefixLength));
46062
+ };
46063
+ /**
46064
+ * Formats a network prefix using canonical address text and its decimal prefix length.
46065
+ *
46066
+ * @stability unstable
46067
+ * @category encoding
46068
+ * @since 4.0.0
46069
+ */
46070
+ const format = (self) => `${formatIp(self.address)}/${self.prefixLength}`;
45834
46071
  // ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/Schema.js
45835
- const TypeId$33 = TypeId$34;
46072
+ const TypeId$33 = TypeId$36;
45836
46073
  /**
45837
46074
  * Creates a schema for a **parametric** type (a generic container such as
45838
46075
  * `Array<A>`, `Option<A>`, etc.) by accepting a list of type-parameter schemas
@@ -46397,7 +46634,7 @@ const encodeSync = encodeUnknownSync$1;
46397
46634
  * @category constructors
46398
46635
  * @since 3.10.0
46399
46636
  */
46400
- const make$51 = make$52;
46637
+ const make$51 = make$54;
46401
46638
  /**
46402
46639
  * Checks whether a value is a `Schema`.
46403
46640
  *
@@ -47572,7 +47809,7 @@ function isPattern(regExp, annotations) {
47572
47809
  const source = regExp.source;
47573
47810
  const flags = regExp.flags;
47574
47811
  const canExport = /^[dg]*uy?$/.test(flags);
47575
- const runtimeRegExp = flags === "" ? `new globalThis.RegExp(${format$2(source)})` : `new globalThis.RegExp(${format$2(source)}, ${format$2(flags)})`;
47812
+ const runtimeRegExp = flags === "" ? `new globalThis.RegExp(${format$4(source)})` : `new globalThis.RegExp(${format$4(source)}, ${format$4(flags)})`;
47576
47813
  return isPattern$1(regExp, {
47577
47814
  toJsonSchema: () => canExport ? { pattern: flags.endsWith("y") ? `^(?:${source})` : source } : [{}, true],
47578
47815
  toCode: () => ({ runtime: `Schema.isPattern(${runtimeRegExp})` }),
@@ -47597,7 +47834,7 @@ const Finite = /*#__PURE__*/ make$51(finite);
47597
47834
  */
47598
47835
  function makeIsGreaterThanOrEqualTo(options) {
47599
47836
  const gte = isGreaterThanOrEqualTo$2(options.order);
47600
- const formatter = options.formatter ?? format$2;
47837
+ const formatter = options.formatter ?? format$4;
47601
47838
  return (minimum, annotations) => {
47602
47839
  return makeFilter((input) => gte(input, minimum), {
47603
47840
  expected: `a value greater than or equal to ${formatter(minimum)}`,
@@ -47623,7 +47860,7 @@ function makeIsBetween(deriveOptions) {
47623
47860
  const greaterThan = isGreaterThan$1(deriveOptions.order);
47624
47861
  const lessThanOrEqualTo = isLessThanOrEqualTo$1(deriveOptions.order);
47625
47862
  const lessThan = isLessThan$1(deriveOptions.order);
47626
- const formatter = deriveOptions.formatter ?? format$2;
47863
+ const formatter = deriveOptions.formatter ?? format$4;
47627
47864
  return (options, annotations) => {
47628
47865
  const gte = options.exclusiveMinimum ? greaterThan : greaterThanOrEqualTo;
47629
47866
  const lte = options.exclusiveMaximum ? lessThan : lessThanOrEqualTo;
@@ -47642,7 +47879,7 @@ function makeIsBetween(deriveOptions) {
47642
47879
  };
47643
47880
  }
47644
47881
  function encodeNumberPayload(number) {
47645
- if (!globalThis.Number.isFinite(number)) throw new globalThis.RangeError(`Expected a finite number, got ${format$2(number)}`);
47882
+ if (!globalThis.Number.isFinite(number)) throw new globalThis.RangeError(`Expected a finite number, got ${format$4(number)}`);
47646
47883
  return number;
47647
47884
  }
47648
47885
  /**
@@ -47672,7 +47909,7 @@ const isGreaterThanOrEqualTo$1 = /*#__PURE__*/ makeIsGreaterThanOrEqualTo({
47672
47909
  payload: { minimum: encodeNumberPayload(minimum) }
47673
47910
  },
47674
47911
  toJsonSchema: () => ({ minimum }),
47675
- toCode: () => ({ runtime: `Schema.isGreaterThanOrEqualTo(${format$2(minimum)})` })
47912
+ toCode: () => ({ runtime: `Schema.isGreaterThanOrEqualTo(${format$4(minimum)})` })
47676
47913
  })
47677
47914
  });
47678
47915
  /**
@@ -47716,7 +47953,7 @@ const isBetween = /*#__PURE__*/ makeIsBetween({
47716
47953
  [exclusiveMinimum ? "exclusiveMinimum" : "minimum"]: options.minimum,
47717
47954
  [exclusiveMaximum ? "exclusiveMaximum" : "maximum"]: options.maximum
47718
47955
  }),
47719
- toCode: () => ({ runtime: `Schema.isBetween({ minimum: ${format$2(options.minimum)}, maximum: ${format$2(options.maximum)}, exclusiveMinimum: ${format$2(exclusiveMinimum)}, exclusiveMaximum: ${format$2(exclusiveMaximum)} })` })
47956
+ toCode: () => ({ runtime: `Schema.isBetween({ minimum: ${format$4(options.minimum)}, maximum: ${format$4(options.maximum)}, exclusiveMinimum: ${format$4(exclusiveMinimum)}, exclusiveMaximum: ${format$4(exclusiveMaximum)} })` })
47720
47957
  };
47721
47958
  }
47722
47959
  });
@@ -48201,7 +48438,7 @@ function Cause(error, defect) {
48201
48438
  }
48202
48439
  const dateTimeUtcFromString = /*#__PURE__*/ transformEffect({
48203
48440
  decode: (s, options) => {
48204
- return match$8(make$64(s), {
48441
+ return match$8(make$66(s), {
48205
48442
  onNone: () => fail$8(new InvalidValue$1({ expected: "a valid UTC DateTime string" }, s, options)),
48206
48443
  onSome: (result) => succeed$5(toUtc(result))
48207
48444
  });
@@ -48507,7 +48744,7 @@ const RecordFromUrlParams = /*#__PURE__*/ (/* @__PURE__ */ declare(isUrlParams,
48507
48744
  expected: "UrlParams",
48508
48745
  toEquivalence: () => Equivalence,
48509
48746
  toCodec: () => link$1()(ArraySchema(Tuple([String$6, String$6])), transform$2({
48510
- decode: make$54,
48747
+ decode: make$56,
48511
48748
  encode: (self) => self.params.map(([key, value]) => [key, unwrap$1(value)])
48512
48749
  }))
48513
48750
  })).pipe(/*#__PURE__*/ decodeTo(/*#__PURE__*/ Record$1(String$6, /*#__PURE__*/ Union([String$6, /*#__PURE__*/ NonEmptyArray(String$6)])), /*#__PURE__*/ transform$2({
@@ -48547,7 +48784,7 @@ function Redacted$1(value, options) {
48547
48784
  if (isRedacted(input)) {
48548
48785
  const label = decodeLabel !== void 0 ? mapErrorEager(decodeLabel(input.label, poptions), (issue) => new Pointer(["label"], issue)) : void_$1;
48549
48786
  return flatMapEager(label, () => mapBothEager(decodeUnknownEffect$1(value)(value$2(input), poptions), {
48550
- onSuccess: (value) => make$61(value, { label: input.label }),
48787
+ onSuccess: (value) => make$63(value, { label: input.label }),
48551
48788
  onFailure: () => {
48552
48789
  return new Composite(ast, [new Pointer(["value"], new InvalidValue$1(void 0, input, poptions))], input, poptions);
48553
48790
  }
@@ -48560,13 +48797,13 @@ function Redacted$1(value, options) {
48560
48797
  payload: normalizedOptions ?? null
48561
48798
  },
48562
48799
  toCode: ({ typeParameters }) => ({
48563
- runtime: normalizedOptions !== void 0 ? `Schema.Redacted(${typeParameters[0].runtime}, ${format$2(normalizedOptions)})` : `Schema.Redacted(${typeParameters[0].runtime})`,
48800
+ runtime: normalizedOptions !== void 0 ? `Schema.Redacted(${typeParameters[0].runtime}, ${format$4(normalizedOptions)})` : `Schema.Redacted(${typeParameters[0].runtime})`,
48564
48801
  Type: `Redacted.Redacted<${typeParameters[0].Type}>`,
48565
48802
  importDeclarations: [`import * as Redacted from "effect/Redacted"`]
48566
48803
  }),
48567
48804
  expected: "Redacted",
48568
48805
  toCodecJson: ([value]) => link$1()(value, {
48569
- decode: transform$3((e) => make$61(e, { label })),
48806
+ decode: transform$3((e) => make$63(e, { label })),
48570
48807
  encode: disallowJsonEncode ? forbidden((oe) => "Cannot serialize Redacted" + (isSome(oe) && typeof oe.value.label === "string" ? ` with label: "${oe.value.label}"` : "")) : transform$3(value$2)
48571
48808
  }),
48572
48809
  toEquivalence: ([value]) => makeEquivalence(value)
@@ -48588,7 +48825,7 @@ function RedactedFromValue(value, options) {
48588
48825
  label: options?.label,
48589
48826
  disallowJsonEncode: options?.disallowEncode
48590
48827
  }), {
48591
- decode: transform$3((t) => make$61(t, { label: options?.label })),
48828
+ decode: transform$3((t) => make$63(t, { label: options?.label })),
48592
48829
  encode: options?.disallowEncode ? forbidden((oe) => "Cannot encode Redacted" + (isSome(oe) && typeof oe.value.label === "string" ? ` with label: "${oe.value.label}"` : "")) : transform$3(value$2)
48593
48830
  })(value);
48594
48831
  }
@@ -48785,7 +49022,7 @@ function isStruct(schema) {
48785
49022
  const Class = (identifier) => (schema, annotations) => {
48786
49023
  const struct = isStruct(schema) ? schema : Struct(schema);
48787
49024
  return makeClass(Class$1, identifier, struct, annotations, (identifier) => ({ toString() {
48788
- return `${identifier}(${format$2({ ...this })})`;
49025
+ return `${identifier}(${format$4({ ...this })})`;
48789
49026
  } }));
48790
49027
  };
48791
49028
  /**
@@ -49074,7 +49311,7 @@ var Proto$17 = class {
49074
49311
  return this.toJSON();
49075
49312
  }
49076
49313
  toString() {
49077
- return format$2(this, { ignoreToString: true });
49314
+ return format$4(this, { ignoreToString: true });
49078
49315
  }
49079
49316
  };
49080
49317
  /**
@@ -50638,7 +50875,7 @@ const retryTransient = /*#__PURE__*/ dual(2, (self, options) => {
50638
50875
  */
50639
50876
  const timeout = /*#__PURE__*/ dual(2, (self, duration) => {
50640
50877
  const decoded = fromInputUnsafe$1(duration);
50641
- const description = `timed out after ${format$1(decoded)}`;
50878
+ const description = `timed out after ${format$3(decoded)}`;
50642
50879
  return transform$1(self, (effect, request) => timeoutOrElse(effect, {
50643
50880
  duration: decoded,
50644
50881
  orElse: () => fail$8(new HttpClientError({ reason: new TransportError({
@@ -59856,7 +60093,7 @@ function decodeValueUnchecked(layout, r) {
59856
60093
  const value = r.zigzag();
59857
60094
  const scale = r.zigzag();
59858
60095
  if (scale > MAX_SAFE_BIGINT || -scale > MAX_SAFE_BIGINT) invalid$1("safe integer length", void 0, r.options);
59859
- return make$63(value, Number(scale));
60096
+ return make$65(value, Number(scale));
59860
60097
  }
59861
60098
  case "json": {
59862
60099
  const text = r.readUtf8(r.end - r.pos);
@@ -60927,7 +61164,7 @@ const makeNoSerialization = /*#__PURE__*/ fnUntraced(function* (group, options)
60927
61164
  const services = yield* context();
60928
61165
  const scope = get$14(services, Scope);
60929
61166
  const trackFiber = runIn(forkUnsafe(scope, "parallel"));
60930
- const concurrencySemaphore = concurrency === "unbounded" ? void 0 : yield* make$71(concurrency);
61167
+ const concurrencySemaphore = concurrency === "unbounded" ? void 0 : yield* make$73(concurrency);
60931
61168
  const clients = /* @__PURE__ */ new Map();
60932
61169
  let isShutdown = false;
60933
61170
  const shutdownLatch = makeUnsafe$6(false);
@@ -61230,7 +61467,7 @@ const make$32 = /*#__PURE__*/ fnUntraced(function* (group, options) {
61230
61467
  const { codecFor, disconnects, end, run, send, supportsAck, supportsSpanPropagation, supportsTransferables } = yield* Protocol;
61231
61468
  const { encodeDefectUnsafe, encodeUnknownRequestExit } = defectCodecs(codecFor);
61232
61469
  const services = yield* context();
61233
- const scope = yield* make$81();
61470
+ const scope = yield* make$83();
61234
61471
  const server = yield* makeNoSerialization(group, {
61235
61472
  ...options,
61236
61473
  disableClientAcks: !supportsAck,
@@ -61506,7 +61743,7 @@ const makeProtocolWithHttpEffect = /*#__PURE__*/ fnUntraced(function* (options =
61506
61743
  const { encodeDefectUnsafe } = defectCodecs(serialization.codecFor);
61507
61744
  const includesFraming = serialization.includesFraming;
61508
61745
  const isBinary = !serialization.contentType.includes("json");
61509
- const disconnects = yield* make$72();
61746
+ const disconnects = yield* make$74();
61510
61747
  let writeRequest;
61511
61748
  let clientId = 0;
61512
61749
  const clients = /* @__PURE__ */ new Map();
@@ -61519,7 +61756,7 @@ const makeProtocolWithHttpEffect = /*#__PURE__*/ fnUntraced(function* (options =
61519
61756
  const requestHeaders = Object.entries(request.headers);
61520
61757
  const data = yield* orDie$2(isBinary ? map$5(request.arrayBuffer, (buf) => new Uint8Array(buf)) : request.text);
61521
61758
  const id = clientId++;
61522
- const queue = yield* make$72({ capacity: includesFraming && options.streamBufferSize !== "unbounded" ? options.streamBufferSize ?? 16 : void 0 });
61759
+ const queue = yield* make$74({ capacity: includesFraming && options.streamBufferSize !== "unbounded" ? options.streamBufferSize ?? 16 : void 0 });
61523
61760
  const parser = serialization.makeUnsafe();
61524
61761
  const requestIds = [];
61525
61762
  const offer$1 = (data) => typeof data === "string" ? offer(queue, encoder.encode(data)) : offer(queue, data);
@@ -61624,7 +61861,7 @@ const layerProtocolHttp = (options) => {
61624
61861
  const makeSocketProtocol = /*#__PURE__*/ gen(function* () {
61625
61862
  const serialization = yield* RpcSerialization;
61626
61863
  const { encodeDefectUnsafe } = defectCodecs(serialization.codecFor);
61627
- const disconnects = yield* make$72();
61864
+ const disconnects = yield* make$74();
61628
61865
  let clientId = 0;
61629
61866
  const clients = /* @__PURE__ */ new Map();
61630
61867
  const clientIds = /* @__PURE__ */ new Set();
@@ -61804,7 +62041,7 @@ const RpcGroupProto = {
61804
62041
  });
61805
62042
  },
61806
62043
  annotateRpcs(service, value) {
61807
- return this.annotateRpcsMerge(make$85(service, value));
62044
+ return this.annotateRpcsMerge(make$87(service, value));
61808
62045
  },
61809
62046
  annotateMerge(context) {
61810
62047
  return makeProto$1({
@@ -62191,7 +62428,7 @@ function describeUnknown(u, preserveEmptyStrings) {
62191
62428
  if (typeof u === "number" || typeof u === "boolean" || typeof u === "bigint") return makeValue(String(u));
62192
62429
  if (Array.isArray(u)) return makeArray(u.length);
62193
62430
  if (isObject$2(u)) return makeRecord(new Set(Object.keys(u)));
62194
- return makeValue(format$2(u));
62431
+ return makeValue(format$4(u));
62195
62432
  }
62196
62433
  function stringNode(value, preserveEmptyStrings) {
62197
62434
  const normalized = emptyStringAsMissing(value, preserveEmptyStrings);
@@ -67475,7 +67712,7 @@ const writeFile = (path, data, options) => callback$1((resume, signal) => {
67475
67712
  resume(fail$8(handleBadArgument("writeFile")(err)));
67476
67713
  }
67477
67714
  });
67478
- const makeFileSystem = /*#__PURE__*/ map$5(/*#__PURE__*/ serviceOption(WatchBackend), (backend) => make$66({
67715
+ const makeFileSystem = /*#__PURE__*/ map$5(/*#__PURE__*/ serviceOption(WatchBackend), (backend) => make$68({
67479
67716
  access,
67480
67717
  chmod,
67481
67718
  chown,
@@ -68443,7 +68680,7 @@ const fileUrlOps = (windows) => ({
68443
68680
  * @category layers
68444
68681
  * @since 4.0.0
68445
68682
  */
68446
- const layer$12 = /* @__PURE__ */ succeed$6(Path$1)(/*#__PURE__*/ make$65({
68683
+ const layer$12 = /* @__PURE__ */ succeed$6(Path$1)(/*#__PURE__*/ make$67({
68447
68684
  ...Path,
68448
68685
  .../*#__PURE__*/ fileUrlOps(void 0)
68449
68686
  }));
@@ -68596,7 +68833,7 @@ const make$25 = (impl) => Terminal.of({
68596
68833
  const layer$9 = /*#__PURE__*/ effect(Terminal, /*#__PURE__*/ (/* @__PURE__ */ fnUntraced(function* (shouldQuit = defaultShouldQuit) {
68597
68834
  const stdin = process.stdin;
68598
68835
  const stdout = process.stdout;
68599
- const lines = yield* make$72();
68836
+ const lines = yield* make$74();
68600
68837
  let inputEnded = stdin.readableEnded;
68601
68838
  let readlineActive = false;
68602
68839
  const onStdinEnd = () => {
@@ -68605,7 +68842,7 @@ const layer$9 = /*#__PURE__*/ effect(Terminal, /*#__PURE__*/ (/* @__PURE__ */ fn
68605
68842
  };
68606
68843
  stdin.once("end", onStdinEnd);
68607
68844
  yield* addFinalizer(() => sync(() => stdin.off("end", onStdinEnd)));
68608
- const rlRef = yield* make$68({
68845
+ const rlRef = yield* make$70({
68609
68846
  acquire: acquireRelease(sync(() => {
68610
68847
  const rl = readline.createInterface({
68611
68848
  input: stdin,
@@ -68637,7 +68874,7 @@ const layer$9 = /*#__PURE__*/ effect(Terminal, /*#__PURE__*/ (/* @__PURE__ */ fn
68637
68874
  const setRawMode = (enabled) => sync(() => {
68638
68875
  if (stdin.isTTY) stdin.setRawMode(enabled);
68639
68876
  });
68640
- const rawModeRef = yield* make$68({
68877
+ const rawModeRef = yield* make$70({
68641
68878
  acquire: acquireRelease(setRawMode(true), () => setRawMode(false)),
68642
68879
  idleTimeToLive: "10 millis"
68643
68880
  });
@@ -68658,7 +68895,7 @@ const layer$9 = /*#__PURE__*/ effect(Terminal, /*#__PURE__*/ (/* @__PURE__ */ fn
68658
68895
  return queue;
68659
68896
  });
68660
68897
  const readInput = gen(function* () {
68661
- const queue = yield* make$72();
68898
+ const queue = yield* make$74();
68662
68899
  const handleKeypress = (s, k) => {
68663
68900
  const userInput = {
68664
68901
  input: fromUndefinedOr(s),
@@ -69477,7 +69714,7 @@ const TypeId$15 = "~effect/Cache";
69477
69714
  const makeWith = (lookup, options) => contextWith$1((context) => {
69478
69715
  const self = Object.create(Proto$8);
69479
69716
  self.lookup = (key) => updateContext$1(lookup(key), (input) => merge$4(context, input));
69480
- self.map = make$79();
69717
+ self.map = make$81();
69481
69718
  self.capacity = options.capacity;
69482
69719
  self.timeToLive = options.timeToLive ? (exit, key) => fromInputUnsafe$1(options.timeToLive(exit, key)) : defaultTimeToLive;
69483
69720
  return succeed$9(self);
@@ -72164,7 +72401,7 @@ var RateLimitError = class extends (/*#__PURE__*/ Error$1("effect/ai/AiError/Rat
72164
72401
  }
72165
72402
  get message() {
72166
72403
  let msg = "Rate limit exceeded";
72167
- if (this.retryAfter) msg += `. Retry after ${format$1(this.retryAfter)}`;
72404
+ if (this.retryAfter) msg += `. Retry after ${format$3(this.retryAfter)}`;
72168
72405
  return msg;
72169
72406
  }
72170
72407
  };
@@ -73811,7 +74048,7 @@ const FailureOrigin = /*#__PURE__*/ Reference("effect/ai/Toolkit/FailureOrigin",
73811
74048
  * @since 4.1.0
73812
74049
  */
73813
74050
  const PreliminaryBuffer = /*#__PURE__*/ Reference("effect/ai/Toolkit/PreliminaryBuffer", { defaultValue: () => "unbounded" });
73814
- const failureCause = (error, origin) => annotate$2(fail$9(error), make$85(FailureOrigin, origin));
74051
+ const failureCause = (error, origin) => annotate$2(fail$9(error), make$87(FailureOrigin, origin));
73815
74052
  const failureOrigin = (error) => isSchemaError(error) ? "result" : "handler";
73816
74053
  const Proto$4 = {
73817
74054
  .../*#__PURE__*/ Prototype({
@@ -73886,7 +74123,7 @@ const Proto$4 = {
73886
74123
  const decodedParams = decodedParamsResult.success;
73887
74124
  const capacity = yield* PreliminaryBuffer;
73888
74125
  if (capacity !== "unbounded" && !(Number.isInteger(capacity) && capacity > 0)) return yield* die$2(`Tool "${name}": PreliminaryBuffer must be a positive integer, got ${capacity}`);
73889
- const queue = yield* make$72(capacity === "unbounded" ? void 0 : { capacity });
74126
+ const queue = yield* make$74(capacity === "unbounded" ? void 0 : { capacity });
73890
74127
  const context = {
73891
74128
  toolCallId,
73892
74129
  preliminary: (result) => asVoid(offer(queue, {
@@ -73917,7 +74154,7 @@ const Proto$4 = {
73917
74154
  reason: error
73918
74155
  }) : error;
73919
74156
  };
73920
- return fromQueue(queue).pipe(tool.failureMode === "error" ? catchCause((cause) => failCause(map$6(fromReasons(cause.reasons.map((reason) => isFailReason(reason) ? reason.annotate(make$85(FailureOrigin, failureOrigin(reason.error)), { overwrite: true }) : reason)), normalizeError))) : catch_((error) => succeed$3({
74157
+ return fromQueue(queue).pipe(tool.failureMode === "error" ? catchCause((cause) => failCause(map$6(fromReasons(cause.reasons.map((reason) => isFailReason(reason) ? reason.annotate(make$87(FailureOrigin, failureOrigin(reason.error)), { overwrite: true }) : reason)), normalizeError))) : catch_((error) => succeed$3({
73921
74158
  result: normalizeError(error),
73922
74159
  isFailure: true,
73923
74160
  failureOrigin: failureOrigin(error),
@@ -74065,6 +74302,20 @@ const Service = () => (id, options) => {
74065
74302
  ServiceClass_.requiredForClient = options?.requiredForClient ?? false;
74066
74303
  return ServiceClass;
74067
74304
  };
74305
+ /**
74306
+ * Provides the client-side implementation for an RPC middleware service,
74307
+ * capturing the layer's environment and merging it into each middleware
74308
+ * invocation.
74309
+ *
74310
+ * @stability unstable
74311
+ * @category layers
74312
+ * @since 4.0.0
74313
+ */
74314
+ const layerClient = (tag, service) => effectContext(gen(function* () {
74315
+ const services = (yield* context()).pipe(omit$2(Scope));
74316
+ const middleware = isEffect(service) ? yield* service : service;
74317
+ return makeUnsafe$10(/* @__PURE__ */ new Map([[`${tag.key}/Client`, (options) => updateContext(middleware(options), (requestContext) => merge$4(services, requestContext))]]));
74318
+ }));
74068
74319
  // ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/ai/McpSchema.js
74069
74320
  /**
74070
74321
  * Defines schemas for Model Context Protocol messages.
@@ -79954,7 +80205,7 @@ const makeHandlers = (core, _lifecycle, context) => {
79954
80205
  const subscriptionMetadata = { "io.modelcontextprotocol/subscriptionId": requestId };
79955
80206
  const resourceSubscriptions = new Set(honored.resourceSubscriptions);
79956
80207
  const pending = yield* dropping(MAX_PENDING_SUBSCRIPTION_NOTIFICATIONS);
79957
- const overflowed = yield* make$82();
80208
+ const overflowed = yield* make$84();
79958
80209
  yield* gen(function* () {
79959
80210
  while (true) {
79960
80211
  const event = yield* take$1(events);
@@ -80471,7 +80722,7 @@ const getMiddleware = (context) => {
80471
80722
  };
80472
80723
  const isMcpError = (error) => hasProperty(error, "code") && typeof error.code === "number" && hasProperty(error, "message") && typeof error.message === "string";
80473
80724
  const HandlerFailure = /*#__PURE__*/ Reference("effect/ai/McpServer/HandlerFailure", { defaultValue: () => false });
80474
- const handlerFailure = /*#__PURE__*/ make$85(HandlerFailure, true);
80725
+ const handlerFailure = /*#__PURE__*/ make$87(HandlerFailure, true);
80475
80726
  const internalError = /*#__PURE__*/ new InternalError({ message: "Internal error" });
80476
80727
  const rejectWith = (error) => fail$8(new RequestRejected({
80477
80728
  code: error.code,
@@ -80577,7 +80828,7 @@ var McpServer = class McpServer extends (/*#__PURE__*/ Service$1()("effect/ai/Mc
80577
80828
  const resources = [];
80578
80829
  const resourceTemplates = [];
80579
80830
  const prompts = [];
80580
- const notificationsQueue = yield* make$72();
80831
+ const notificationsQueue = yield* make$74();
80581
80832
  const globalMiddleware = [];
80582
80833
  const notificationDelivery = {
80583
80834
  consumers: 0,
@@ -80589,7 +80840,7 @@ var McpServer = class McpServer extends (/*#__PURE__*/ Service$1()("effect/ai/Mc
80589
80840
  const dispatcher = (yield* Scheduler).makeDispatcher();
80590
80841
  const notifications = yield* makeNoSerialization$1(BroadcastServerNotificationRpcs, {
80591
80842
  spanPrefix: "McpServer/Notifications",
80592
- onFromClient: (options) => make$82().pipe(flatMap$2((delivered) => withFiber((fiber) => {
80843
+ onFromClient: (options) => make$84().pipe(flatMap$2((delivered) => withFiber((fiber) => {
80593
80844
  const message = options.message;
80594
80845
  if (message._tag !== "Request") return void_$1;
80595
80846
  const notification = toInternalServerNotification(message);
@@ -80653,7 +80904,7 @@ var McpServer = class McpServer extends (/*#__PURE__*/ Service$1()("effect/ai/Mc
80653
80904
  });
80654
80905
  const service = McpServer.of({
80655
80906
  notifications: notifications.client,
80656
- notifyElicitationComplete: ({ clientId, elicitationId }) => withoutSharedConsumer() ? void_$1 : make$82().pipe(flatMap$2((delivered) => offer(notificationsQueue, {
80907
+ notifyElicitationComplete: ({ clientId, elicitationId }) => withoutSharedConsumer() ? void_$1 : make$84().pipe(flatMap$2((delivered) => offer(notificationsQueue, {
80657
80908
  notification: ServerNotification.ElicitationComplete({ elicitationId }),
80658
80909
  targetClientId: clientId,
80659
80910
  delivered
@@ -80953,7 +81204,7 @@ const runWithRuntime = /*#__PURE__*/ fnUntraced(function* (options, runtime, tra
80953
81204
  defaultLogLevel,
80954
81205
  serverInfo: options
80955
81206
  }));
80956
- const clients = yield* make$70({
81207
+ const clients = yield* make$72({
80957
81208
  lookup: fnUntraced(function* (key) {
80958
81209
  const selectedProtocol = runtime.selectProtocol(key.profile.protocolVersion);
80959
81210
  let write;
@@ -81595,7 +81846,7 @@ const registerToolkit = /*#__PURE__*/ fnUntraced(function* (toolkit) {
81595
81846
  isError: false,
81596
81847
  content: []
81597
81848
  })) : successResult(result.encodedResult);
81598
- return result.failureOrigin === "handler" ? map$5(encodeReturnedFailure(result.encodedResult), failureResult) : failCause$3(annotate$2(fail$9(result.result), make$85(FailureOrigin, result.failureOrigin ?? "result")));
81849
+ return result.failureOrigin === "handler" ? map$5(encodeReturnedFailure(result.encodedResult), failureResult) : failCause$3(annotate$2(fail$9(result.result), make$87(FailureOrigin, result.failureOrigin ?? "result")));
81599
81850
  }), catchCause$2(handleCause));
81600
81851
  },
81601
81852
  services
@@ -83219,7 +83470,7 @@ const String$4 = /*#__PURE__*/ makePrimitive("String", (value) => succeed$5(valu
83219
83470
  */
83220
83471
  const Choice = (choices) => {
83221
83472
  const choiceMap = new Map(choices);
83222
- const validChoices = choices.map(([key]) => format$2(key)).join(" | ");
83473
+ const validChoices = choices.map(([key]) => format$4(key)).join(" | ");
83223
83474
  const primitive = makePrimitive("Choice", (value) => {
83224
83475
  if (choiceMap.has(value)) return succeed$5(choiceMap.get(value));
83225
83476
  return fail$8(validChoices);
@@ -83730,7 +83981,7 @@ const map$1 = /*#__PURE__*/ dual(2, (self, f) => flatMap(self, (a) => succeed(f(
83730
83981
  * @category constructors
83731
83982
  * @since 4.0.0
83732
83983
  */
83733
- const Password = (options) => basePrompt(options, "password").pipe(map$1(make$61));
83984
+ const Password = (options) => basePrompt(options, "password").pipe(map$1(make$63));
83734
83985
  /**
83735
83986
  * Runs a prompt by reading terminal input and rendering prompt frames until the
83736
83987
  * prompt submits a value.
@@ -89618,7 +89869,7 @@ const runWith = (command, config) => {
89618
89869
  }
89619
89870
  const services = match$8(logLevel, {
89620
89871
  onNone: () => empty$15(),
89621
- onSome: (level) => make$85(MinimumLogLevel, level)
89872
+ onSome: (level) => make$87(MinimumLogLevel, level)
89622
89873
  });
89623
89874
  yield* provideContext$2(program, services);
89624
89875
  }, catchFilter((error) => isCliError(error) && error._tag === "ShowHelp" ? succeed$10(error) : fail$13(error), (error) => andThen(showHelp(command, error, config.renderErrors !== false), fail$8(error))), catchFilter((error) => {
@@ -89648,7 +89899,12 @@ var AuthError = class extends TaggedError()("AuthError", {
89648
89899
  "temporarily_unavailable"
89649
89900
  ])),
89650
89901
  message: String$6
89651
- }) {};
89902
+ }) {
89903
+ get name() {
89904
+ if (this.error === "temporarily_unavailable") return "AuthUnavailable";
89905
+ return "AuthError";
89906
+ }
89907
+ };
89652
89908
  const User = Struct({
89653
89909
  id: NonEmptyString,
89654
89910
  name: NonEmptyString
@@ -89707,6 +89963,16 @@ const PackageMetadata = Struct({
89707
89963
  name: String$6,
89708
89964
  version: AppVersion
89709
89965
  });
89966
+ // ../../packages/runtime/src/rpc.ts
89967
+ var RpcStream = class extends Service()("@deslop/runtime/rpc/RpcStream") {};
89968
+ const layerRpcStream = succeed$6(RpcStream, RpcStream.of((effect, options) => {
89969
+ if (!isStreamSchema(options.rpc.successSchema)) return effect;
89970
+ return andThen(annotateCurrentSpan("rpc.stream", true), effect);
89971
+ }));
89972
+ layerClient(RpcStream, (options) => gen(function* () {
89973
+ if (isStreamSchema(options.rpc.successSchema)) yield* annotateCurrentSpan("rpc.stream", true);
89974
+ return yield* options.next(options.request);
89975
+ }));
89710
89976
  // ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/observability/OtlpExporter.js
89711
89977
  /**
89712
89978
  * Shared batch exporter for OTLP/HTTP observability modules.
@@ -89853,8 +90119,8 @@ const make$6 = /*#__PURE__*/ fnUntraced(function* (options) {
89853
90119
  runExportFork(runExport);
89854
90120
  return awaitEmpty(exportFibers);
89855
90121
  }).pipe(ignore$1, interruptible, timeoutOption(options.shutdownTimeout)));
89856
- const armed = yield* make$76(exportsEmpty);
89857
- const wake = yield* make$76();
90122
+ const armed = yield* make$78(exportsEmpty);
90123
+ const wake = yield* make$78();
89858
90124
  const disarmIfEmpty = sync(() => {
89859
90125
  if (exportsEmpty || buffer.length > 0 || !armed.closeUnsafe()) return;
89860
90126
  wake.openUnsafe();
@@ -90000,7 +90266,7 @@ const unknownToAttributeValue = (value) => {
90000
90266
  case "bigint": return BigInt.asIntN(64, value) === value ? { intValue: String(value) } : { stringValue: String(value) };
90001
90267
  case "number": return Number.isInteger(value) && value >= -int64Bound && value < int64Bound ? { intValue: Number.isSafeInteger(value) ? value : String(BigInt(value)) } : { doubleValue: value };
90002
90268
  case "boolean": return { boolValue: value };
90003
- default: return { stringValue: format$2(value) };
90269
+ default: return { stringValue: format$4(value) };
90004
90270
  }
90005
90271
  };
90006
90272
  // ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/observability/OtlpSerialization.js
@@ -90226,7 +90492,7 @@ const layer = /*#__PURE__*/ flow(/* @__PURE__ */ fnUntraced(function* (options)
90226
90492
  if (!span.sampled) return;
90227
90493
  exporter.push(makeOtlpSpan(span));
90228
90494
  }
90229
- return make$83({
90495
+ return make$85({
90230
90496
  span(options) {
90231
90497
  return new SpanImpl(options, exportFn);
90232
90498
  },
@@ -90470,6 +90736,13 @@ const adminIds = gen(function* () {
90470
90736
  function isAdmin(admins, id) {
90471
90737
  return contains(admins, replace("github:", "")(id));
90472
90738
  }
90739
+ function requireAdmin(admins, user, message) {
90740
+ if (isAdmin(admins, user.id)) return void_$1;
90741
+ return fail$8(AuthError.make({
90742
+ error: "access_denied",
90743
+ message
90744
+ }));
90745
+ }
90473
90746
  function rejected(message) {
90474
90747
  return mapError$2((cause) => {
90475
90748
  if (is$2(AuthError)(cause)) return cause;
@@ -91073,7 +91346,7 @@ const generateKeyPair = /*#__PURE__*/ fnUntraced(function* (options) {
91073
91346
  const privateJwk = yield* exportJwk(pair.privateKey, algorithm, kid);
91074
91347
  return {
91075
91348
  publicKey: publicJwk,
91076
- privateKey: make$61(privateJwk)
91349
+ privateKey: make$63(privateJwk)
91077
91350
  };
91078
91351
  });
91079
91352
  /**
@@ -91138,7 +91411,7 @@ const importPrivate = /*#__PURE__*/ fnUntraced(function* (input, algorithm) {
91138
91411
  * @category encoding
91139
91412
  * @since 4.1.1
91140
91413
  */
91141
- const exportPrivate = (key) => map$5(exportJwk(key.key, key.algorithm, key.kid), (jwk) => make$61(jwk));
91414
+ const exportPrivate = (key) => map$5(exportJwk(key.key, key.algorithm, key.kid), (jwk) => make$63(jwk));
91142
91415
  /**
91143
91416
  * Computes an RFC 7638 JWK thumbprint, encoded as unpadded base64url.
91144
91417
  *
@@ -91453,7 +91726,7 @@ const sign$1 = /*#__PURE__*/ fnUntraced(function* (payload, key, header) {
91453
91726
  let signature;
91454
91727
  if (key._tag === "SecretKey") signature = yield* (yield* Mac).sign(key.key, data).pipe(mapError$2(signFailure));
91455
91728
  else signature = yield* (yield* Signature).sign(key.key, data).pipe(mapError$2(signFailure));
91456
- return make$61(`${signingInput}.${encode$3(signature)}`);
91729
+ return make$63(`${signingInput}.${encode$3(signature)}`);
91457
91730
  });
91458
91731
  /**
91459
91732
  * Verifies a compact JWS with a key. The token's `alg` must be the key's
@@ -91764,7 +92037,7 @@ var Sessions = class Sessions extends Service$1()("@deslop/runtime/auth/sessions
91764
92037
  createdAt,
91765
92038
  expiresAt: now + tokens.expires_in * 1e3,
91766
92039
  lastUsedAt: now,
91767
- refresh: make$61(tokens.refresh_token),
92040
+ refresh: make$63(tokens.refresh_token),
91768
92041
  user: {
91769
92042
  id: claims.sub,
91770
92043
  name: claims.name
@@ -91855,10 +92128,7 @@ const unavailable = text("The authorization service is temporarily unavailable;
91855
92128
  status: 503
91856
92129
  });
91857
92130
  var Auth = class Auth extends Service$1()("@deslop/runtime/auth/service/Auth") {
91858
- static makeContext = (auth) => pipe(make$85(Auth, auth), add$1(RpcAuth, RpcAuth.of((effect, request) => pipe(auth.user(request.headers), tap$1(() => {
91859
- if (isStreamSchema(request.rpc.successSchema)) return annotateCurrentSpan("rpc.stream", true);
91860
- return void_$1;
91861
- }), flatMap$2((user) => raceFirst(provideService(effect, CurrentUser, user), pipe(delay(auth.user(request.headers), "5 minutes"), retry({ while: (error) => error.error === "temporarily_unavailable" }), forever)))))));
92131
+ static makeContext = (auth) => pipe(make$87(Auth, auth), add$1(RpcAuth, RpcAuth.of((effect, request) => pipe(auth.user(request.headers), flatMap$2((user) => raceFirst(provideService(effect, CurrentUser, user), pipe(delay(auth.user(request.headers), "5 minutes"), retry({ while: (error) => error.error === "temporarily_unavailable" }), forever)))))));
91862
92132
  static layer = unwrap$7(gen(function* () {
91863
92133
  if (yield* localAuth) return succeedContext(Auth.makeContext(Auth.of({
91864
92134
  token: () => fail$8(AuthError.make({ message: "There is no sign-in without --auth" })),
@@ -92017,7 +92287,7 @@ function layerKeyValueStore(directory) {
92017
92287
  const base = yield* KeyValueStore;
92018
92288
  const fs = yield* FileSystem;
92019
92289
  const path = yield* Path$1;
92020
- const writes = yield* make$71(1);
92290
+ const writes = yield* make$73(1);
92021
92291
  return make$20({
92022
92292
  ...omit(base, [
92023
92293
  "set",
@@ -92145,10 +92415,10 @@ const layerWeb = unwrap$7(gen(function* () {
92145
92415
  function layerRpc(options) {
92146
92416
  return pipe(layerHttp$1({
92147
92417
  disableTracing: options.disableTracing,
92148
- group: options.group,
92418
+ group: options.group.middleware(RpcStream),
92149
92419
  path: RPC_PATH,
92150
92420
  protocol: "websocket"
92151
- }), provide$2(options.handlers));
92421
+ }), provide$2(options.handlers), provide$2(layerRpcStream));
92152
92422
  }
92153
92423
  function layerMcp(options) {
92154
92424
  return unwrap$7(gen(function* () {
@@ -92333,7 +92603,7 @@ function systemdArgument(value) {
92333
92603
  return `"${pipe(value, replaceAll("\\", "\\\\"), replaceAll("\"", "\\\""), replaceAll("%", "%%"), replaceAll("$", "$$$$"), replaceAll("\n", "\\n"), replaceAll("\r", "\\r"))}"`;
92334
92604
  }
92335
92605
  const execute = fnUntraced(function* (command, args) {
92336
- const process = yield* make$60(command, args, {
92606
+ const process = yield* make$62(command, args, {
92337
92607
  stderr: "pipe",
92338
92608
  stdout: "pipe"
92339
92609
  });
@@ -92509,7 +92779,7 @@ function server(app) {
92509
92779
  }))), provide$2(layerNodeHttpServer), provide$2(layerPlatform), launch);
92510
92780
  }
92511
92781
  function output(text) {
92512
- return flatMap$2(Stdio, (stdio) => run$7(make$67(text), stdio.stdout()));
92782
+ return flatMap$2(Stdio, (stdio) => run$7(make$69(text), stdio.stdout()));
92513
92783
  }
92514
92784
  function runApp(app) {
92515
92785
  const program = gen(function* () {
@@ -92762,6 +93032,34 @@ const AdmitParams = Struct({
92762
93032
  allow: Boolean$5,
92763
93033
  id: NonEmptyString
92764
93034
  });
93035
+ map$8([
93036
+ "0.0.0.0/8",
93037
+ "100.64.0.0/10",
93038
+ "192.0.0.0/24",
93039
+ "192.0.2.0/24",
93040
+ "192.31.196.0/24",
93041
+ "192.52.193.0/24",
93042
+ "192.88.99.0/24",
93043
+ "192.175.48.0/24",
93044
+ "198.18.0.0/15",
93045
+ "198.51.100.0/24",
93046
+ "203.0.113.0/24",
93047
+ "240.0.0.0/4",
93048
+ "100::/64",
93049
+ "2001::/23",
93050
+ "2001:db8::/32",
93051
+ "2002::/16",
93052
+ "2620:4f:8000::/48",
93053
+ "3fff::/20",
93054
+ "5f00::/16",
93055
+ "64:ff9b::/96",
93056
+ "64:ff9b:1::/48",
93057
+ "fec0::/10"
93058
+ ], (source) => getOrThrow(fromString$1(source)));
93059
+ function isPrivateAddress(ip) {
93060
+ if (isIpv4Address(ip)) return isPrivate(ip);
93061
+ return isUniqueLocal(ip);
93062
+ }
92765
93063
  // src/services/tokens/lib/utils.ts
92766
93064
  const WORKERS = {
92767
93065
  "77.237.236.132": "dev",
@@ -92822,10 +93120,6 @@ function parsedAddress(address) {
92822
93120
  return ip;
92823
93121
  }));
92824
93122
  }
92825
- function isPrivateOrUniqueLocal(ip) {
92826
- if (isIpv4Address(ip)) return isPrivate(ip);
92827
- return isUniqueLocal(ip);
92828
- }
92829
93123
  function addressGroup(address) {
92830
93124
  return match$8(parsedAddress(address), {
92831
93125
  onNone: () => address,
@@ -92873,7 +93167,7 @@ function browserLabel(origin) {
92873
93167
  }
92874
93168
  function deviceLabel(origin) {
92875
93169
  return pipe(flatMap$7(fromUndefinedOr(origin.address), (address) => {
92876
- if (exists(parsedAddress(address), (ip) => isLinkLocal(ip) || isLoopback(ip) || isPrivateOrUniqueLocal(ip))) return some$1("dev");
93170
+ if (exists(parsedAddress(address), (ip) => isLinkLocal(ip) || isLoopback(ip) || isPrivateAddress(ip))) return some$1("dev");
92877
93171
  return get$13(WORKERS, address);
92878
93172
  }), orElse$3(() => flatMap$7(fromUndefinedOr(origin.userAgent), platform)), getOrElse(() => origin.address ?? "unknown"));
92879
93173
  }
@@ -93152,7 +93446,7 @@ const Passkey = Struct({
93152
93446
  id: NonEmptyString,
93153
93447
  synced: Boolean$5
93154
93448
  });
93155
- const PasskeyParams = Struct({ id: NonEmptyString });
93449
+ Struct({ id: NonEmptyString });
93156
93450
  const AddPasskeyParams = Struct({ response: Registration });
93157
93451
  const PasskeySignIn = Struct({
93158
93452
  next: optionalKey(NonEmptyString.check(isMaxLength(2048))),
@@ -114670,8 +114964,8 @@ var Passkeys = class Passkeys extends Service$1()("@deslop/auth/services/passkey
114670
114964
  onFalse: () => "mp281x.xyz",
114671
114965
  onTrue: () => new URL(origin).hostname
114672
114966
  });
114673
- const registering = yield* make$58(empty$4());
114674
- const signingIn = yield* make$58(empty$4());
114967
+ const registering = yield* make$60(empty$4());
114968
+ const signingIn = yield* make$60(empty$4());
114675
114969
  const change = fnUntraced(function* (next) {
114676
114970
  yield* updateEffect(state, (current) => tap$1(next(current), (updated) => store.set("passkeys", updated)));
114677
114971
  }, uninterruptible);
@@ -115032,8 +115326,8 @@ var Tokens = class Tokens extends Service$1()("@deslop/auth/services/tokens/serv
115032
115326
  });
115033
115327
  const publicKey = yield* importPublic(publicJwk, "EdDSA");
115034
115328
  const signature = yield* Signature;
115035
- const codes = yield* make$58(empty$4());
115036
- const redeeming = yield* make$71(1);
115329
+ const codes = yield* make$60(empty$4());
115330
+ const redeeming = yield* make$73(1);
115037
115331
  const randomToken = randomTokenOf(yield* SecureRandom);
115038
115332
  const hash = hashOf(yield* Digest);
115039
115333
  const change = fnUntraced(function* (update) {
@@ -115368,12 +115662,9 @@ var People = class People extends Service$1()("@deslop/auth/services/people/serv
115368
115662
  if (local) return developer;
115369
115663
  return yield* allowed(yield* tokens.session(headers));
115370
115664
  });
115371
- const admin = fnUntraced(function* (user) {
115372
- if (!isAdmin(admins, user.id)) return yield* AuthError.make({
115373
- error: "access_denied",
115374
- message: "Only an admin can manage people"
115375
- });
115376
- });
115665
+ function admin(user) {
115666
+ return requireAdmin(admins, user, "Only an admin can manage people");
115667
+ }
115377
115668
  const list = fn("People.list")(function* (user) {
115378
115669
  yield* admin(user);
115379
115670
  return listPeople(yield* get(state), admins);
@@ -115455,7 +115746,7 @@ var People = class People extends Service$1()("@deslop/auth/services/people/serv
115455
115746
  return personOf(admins, removed);
115456
115747
  }, rejected("Cannot remove this account"))
115457
115748
  });
115458
- return pipe(make$85(People, people), add$1(RpcOwner, RpcOwner.of((effect, request) => flatMap$2(sessionOwner(request.headers), (owner) => provideService(effect, CurrentOwner, owner)))));
115749
+ return pipe(make$87(People, people), add$1(RpcOwner, RpcOwner.of((effect, request) => flatMap$2(sessionOwner(request.headers), (owner) => provideService(effect, CurrentOwner, owner)))));
115459
115750
  }));
115460
115751
  };
115461
115752
  const layerIssuerAuth = effectContext(gen(function* () {
@@ -120516,7 +120807,7 @@ var CompiledProcess = class {
120516
120807
  return this.requestTermination(requested).pipe(flatMap$2((accepted) => accepted ? forkDetach(this.settleRequestedTermination()).pipe(asVoid) : void_$1));
120517
120808
  }
120518
120809
  sendAcknowledgedEffect(event) {
120519
- return uninterruptibleMask((restore) => make$82().pipe(flatMap$2((deferred) => this.offerEvent(event, void 0, void 0, deferred).pipe(andThen(restore(_await(deferred)))))));
120810
+ return uninterruptibleMask((restore) => make$84().pipe(flatMap$2((deferred) => this.offerEvent(event, void 0, void 0, deferred).pipe(andThen(restore(_await(deferred)))))));
120520
120811
  }
120521
120812
  offerEvent(event, source, causedBy, deferred) {
120522
120813
  return suspend$2(() => {
@@ -120946,8 +121237,8 @@ const startGenericInternal = fnUntraced(function* (logic, options) {
120946
121237
  let initialMicrosteps;
120947
121238
  const mailbox = makeProcessMailbox();
120948
121239
  const emissions = options.emissions ?? makeEmissionRuntime();
120949
- const termination = yield* make$82();
120950
- const done = yield* make$82();
121240
+ const termination = yield* make$84();
121241
+ const done = yield* make$84();
120951
121242
  const awaitCompletion = _await(done).pipe(exit, asVoid);
120952
121243
  let initializing = true;
120953
121244
  let inFlightMessage;
@@ -120961,7 +121252,7 @@ const startGenericInternal = fnUntraced(function* (logic, options) {
120961
121252
  };
120962
121253
  return offerDirect(message, () => publishInspectedSent(inspector, subject, message));
120963
121254
  });
120964
- const sendAcknowledged = logic.execution?._tag !== "Compiled" ? void 0 : (event) => uninterruptibleMask((restore) => make$82().pipe(flatMap$2((deferred) => {
121255
+ const sendAcknowledged = logic.execution?._tag !== "Compiled" ? void 0 : (event) => uninterruptibleMask((restore) => make$84().pipe(flatMap$2((deferred) => {
120965
121256
  return (inspector === void 0 ? offerDirect({
120966
121257
  [AcknowledgedMessageTypeId]: true,
120967
121258
  event,
@@ -121351,7 +121642,7 @@ fnUntraced(function* (logic, strategy, options) {
121351
121642
  const inspection = yield* make$2(sessionId);
121352
121643
  runtime.inspection = inspection;
121353
121644
  const emissions = makeEmissionRuntime();
121354
- const started = yield* make$82();
121645
+ const started = yield* make$84();
121355
121646
  const internalOptions = options === void 0 ? {
121356
121647
  detached: true,
121357
121648
  emissions,
@@ -122880,7 +123171,7 @@ var SignIns = class SignIns extends Service$1()("@deslop/auth/services/sign-ins/
122880
123171
  const hash = hashOf(yield* Digest);
122881
123172
  const scope$2 = yield* scope;
122882
123173
  const open = yield* make$18(empty$4());
122883
- const answering = yield* make$71(1);
123174
+ const answering = yield* make$73(1);
122884
123175
  function find(code) {
122885
123176
  return map$5(get(open), get$4(typedCode(code)));
122886
123177
  }
@@ -123277,7 +123568,7 @@ const RpcHandlers = RpcContracts.toLayer(gen(function* () {
123277
123568
  const signIns = yield* SignIns;
123278
123569
  const tokens = yield* Tokens;
123279
123570
  return RpcContracts.of({
123280
- "auth.account": (_, options) => onStart(people.account(options.headers), annotateCurrentSpan("rpc.stream", true)),
123571
+ "auth.account": (_, options) => people.account(options.headers),
123281
123572
  "auth.addPasskey": fnUntraced(function* (input, options) {
123282
123573
  yield* passkeys.add(input.response, {
123283
123574
  from: originFrom(options.headers, none()),
@@ -123299,7 +123590,7 @@ const RpcHandlers = RpcContracts.toLayer(gen(function* () {
123299
123590
  }),
123300
123591
  "auth.passkeys": () => unwrap$4(map$5(CurrentOwner, passkeys.list)),
123301
123592
  "auth.people": () => unwrap$4(map$5(CurrentUser, people.people)),
123302
- "auth.wait": (input, options) => onStart(signIns.status(input.request, options.headers), annotateCurrentSpan("rpc.stream", true))
123593
+ "auth.wait": (input, options) => signIns.status(input.request, options.headers)
123303
123594
  });
123304
123595
  }));
123305
123596
  // src/tools/contracts.ts
@@ -123308,46 +123599,55 @@ const Tools = make$15(make$16("answer_request", {
123308
123599
  description: "Approve or deny an app or agent sign-in you started, by the code its page or authorize redirect shows (WDJB-MJHT). Never answer a code you did not start; browser sign-ins are approved only in a browser.",
123309
123600
  failure: AuthError,
123310
123601
  parameters: Struct({
123311
- accept: Boolean$5,
123312
- request: NonEmptyString.check(isMaxLength(20))
123602
+ accept: Boolean$5.annotate({ description: "True to approve, false to deny." }),
123603
+ request: NonEmptyString.check(isMaxLength(20)).annotate({ description: "The code the sign-in shows (WDJB-MJHT)." })
123313
123604
  }),
123314
123605
  success: Struct({ clientName: String$6 })
123315
123606
  }).annotate(Destructive, false), make$16("list_sessions", {
123316
123607
  dependencies: [CurrentOwner],
123317
- description: "Each signed-in client of yours with its id, device, last activity and address; sign one out with sign_out_session.",
123608
+ description: "Use when the user asks to sign a device out or see where they are signed in; returns each session's id, client, address, device when it differs from the address, and last activity as ISO-8601.",
123318
123609
  failure: AuthError,
123319
123610
  parameters: EmptyParams,
123320
123611
  success: Struct({ sessions: ArraySchema(Struct({
123321
123612
  address: optionalKey(String$6),
123322
123613
  client: String$6,
123323
- device: String$6,
123614
+ device: optionalKey(String$6),
123324
123615
  id: NonEmptyString,
123325
- lastActive: Finite
123616
+ lastActive: String$6
123326
123617
  })) })
123327
123618
  }).annotate(Readonly, true), make$16("sign_out_session", {
123328
123619
  dependencies: [CurrentOwner],
123329
- description: "Sign a client out of every app by the id list_sessions returns.",
123620
+ description: "Use when the user asks to sign out a device or app; signs it out of every Deslop app by the id list_sessions returns.",
123330
123621
  failure: AuthError,
123331
- parameters: Struct({ id: NonEmptyString }),
123622
+ parameters: Struct({ id: NonEmptyString.annotate({ description: "A session id from list_sessions." }) }),
123332
123623
  success: Struct({ id: NonEmptyString })
123333
123624
  }).annotate(Destructive, true), make$16("list_passkeys", {
123334
123625
  dependencies: [CurrentOwner],
123335
- description: "Each passkey of yours with its id, browser and device, and whether it is synced; remove one with remove_passkey.",
123626
+ description: "Use when the user asks which passkeys can sign them in; returns each passkey's id, browser and device, and whether it is synced.",
123336
123627
  failure: AuthError,
123337
123628
  parameters: EmptyParams,
123338
123629
  success: Struct({ passkeys: ArraySchema(Passkey) })
123339
123630
  }).annotate(Readonly, true), make$16("remove_passkey", {
123340
123631
  dependencies: [CurrentOwner],
123341
- description: "Remove one of your passkeys by the id list_passkeys returns.",
123632
+ description: "Use when the user asks to remove a passkey; removes it by the id list_passkeys returns.",
123342
123633
  failure: AuthError,
123343
- parameters: PasskeyParams,
123634
+ parameters: Struct({ id: NonEmptyString.annotate({ description: "A passkey id from list_passkeys." }) }),
123344
123635
  success: Struct({ id: NonEmptyString })
123345
- }).annotate(Destructive, true), make$16("remove_person", {
123636
+ }).annotate(Destructive, true), make$16("list_people", {
123346
123637
  dependencies: [CurrentOwner],
123347
- description: "Remove a member by their GitHub login; admins cannot be removed.",
123638
+ description: "Use when the user asks who is allowed into their apps or you need the GitHub login to remove someone; returns each person's login and role (Admin, Member or Waiting).",
123348
123639
  failure: AuthError,
123349
- parameters: Struct({ login: NonEmptyString }),
123350
- success: Person
123640
+ parameters: EmptyParams,
123641
+ success: Struct({ people: ArraySchema(Struct({
123642
+ login: NonEmptyString,
123643
+ role: Role
123644
+ })) })
123645
+ }).annotate(Readonly, true), make$16("remove_person", {
123646
+ dependencies: [CurrentOwner],
123647
+ description: "Use when the user asks to remove someone's access; removes the member by the GitHub login list_people returns, and admins cannot be removed.",
123648
+ failure: AuthError,
123649
+ parameters: Struct({ login: NonEmptyString.annotate({ description: "The GitHub login from list_people." }) }),
123650
+ success: Struct({ login: NonEmptyString })
123351
123651
  }).annotate(Destructive, true));
123352
123652
  // src/tools/handlers.ts
123353
123653
  const layerMcpOwner = unwrap$7(gen(function* () {
@@ -123380,15 +123680,25 @@ const ToolHandlers = Tools.toLayer(gen(function* () {
123380
123680
  list_passkeys: fnUntraced(function* () {
123381
123681
  return { passkeys: getOrElse(yield* runHead(passkeys.list(yield* CurrentOwner)), () => []) };
123382
123682
  }),
123683
+ list_people: fnUntraced(function* () {
123684
+ return { people: map$8(yield* people.list((yield* CurrentOwner).user), (person) => ({
123685
+ login: person.name,
123686
+ role: person.role
123687
+ })) };
123688
+ }),
123383
123689
  list_sessions: fnUntraced(function* () {
123384
123690
  return { sessions: map$8(withChildActivity(getOrElse(yield* runHead(tokens.apps(yield* CurrentOwner)), () => [])), (app) => ({
123385
- ...pick(app, [
123386
- "address",
123387
- "client",
123388
- "device",
123389
- "lastActive"
123390
- ]),
123391
- id: app.family
123691
+ ...match$8(fromUndefinedOr(app.address), {
123692
+ onNone: () => ({}),
123693
+ onSome: (address) => ({ address })
123694
+ }),
123695
+ client: app.client,
123696
+ ...match$1(app.device === app.address, {
123697
+ onFalse: () => ({ device: app.device }),
123698
+ onTrue: () => ({})
123699
+ }),
123700
+ id: app.family,
123701
+ lastActive: formatIso(makeUnsafe$3(app.lastActive))
123392
123702
  })) };
123393
123703
  }),
123394
123704
  remove_passkey: fnUntraced(function* (input) {
@@ -123401,7 +123711,7 @@ const ToolHandlers = Tools.toLayer(gen(function* () {
123401
123711
  const owner = yield* CurrentOwner;
123402
123712
  const wanted = toLowerCase(input.login);
123403
123713
  const person = yield* pipe(yield* people.list(owner.user), findFirst((row) => toLowerCase(row.name) === wanted), fromOption, mapError$2(() => AuthError.make({ message: `No GitHub account ${input.login} is listed in Auth` })));
123404
- return yield* people.remove(person.id, owner.user);
123714
+ return { login: (yield* people.remove(person.id, owner.user)).name };
123405
123715
  }),
123406
123716
  sign_out_session: fnUntraced(function* (input) {
123407
123717
  yield* tokens.disconnect(input.id, yield* CurrentOwner);
@@ -123419,7 +123729,7 @@ runApp({
123419
123729
  group: RpcContracts,
123420
123730
  handlers: RpcHandlers
123421
123731
  }), layerMcp({
123422
- instructions: "Approve a sign-in you started with answer_request.",
123732
+ instructions: "Auth holds the user's sign-ins, passkeys and people; answer a sign-in you started with answer_request, and start with list_sessions for anything else.",
123423
123733
  registrations: pipe(toolkit(Tools), provide$2(ToolHandlers), provide$2(layerMcpOwner))
123424
123734
  })), provide$2(layerServices)),
123425
123735
  settings: {