@deslop/stash 0.1.1090 → 0.1.1092

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.
@@ -3240,9 +3240,9 @@ function Array_(item) {
3240
3240
  /**
3241
3241
  * @since 2.0.0
3242
3242
  */
3243
- const TypeId$39 = "~effect/Option";
3243
+ const TypeId$40 = "~effect/Option";
3244
3244
  const CommonProto$1 = {
3245
- [TypeId$39]: { _A: (_) => _ },
3245
+ [TypeId$40]: { _A: (_) => _ },
3246
3246
  ...PipeInspectableProto,
3247
3247
  [Symbol.iterator]() {
3248
3248
  return new SingleShotGen(this);
@@ -3292,7 +3292,7 @@ const NoneProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Common
3292
3292
  }
3293
3293
  });
3294
3294
  /** @internal */
3295
- const isOption$1 = (input) => hasProperty(input, TypeId$39);
3295
+ const isOption$1 = (input) => hasProperty(input, TypeId$40);
3296
3296
  /** @internal */
3297
3297
  const isNone$1 = (fa) => fa._tag === "None";
3298
3298
  /** @internal */
@@ -3308,9 +3308,9 @@ SomeImpl.prototype = SomeProto;
3308
3308
  const some$2 = (value) => new SomeImpl(value);
3309
3309
  //#endregion
3310
3310
  //#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/result.js
3311
- const TypeId$38 = "~effect/Result";
3311
+ const TypeId$39 = "~effect/Result";
3312
3312
  const CommonProto = {
3313
- [TypeId$38]: {
3313
+ [TypeId$39]: {
3314
3314
  /* v8 ignore next 2 */
3315
3315
  _A: (_) => _,
3316
3316
  _E: (_) => _
@@ -3361,7 +3361,7 @@ const FailureProto = /*#__PURE__*/ Object.assign(/*#__PURE__*/ Object.create(Com
3361
3361
  }
3362
3362
  });
3363
3363
  /** @internal */
3364
- const isResult$1 = (input) => hasProperty(input, TypeId$38);
3364
+ const isResult$1 = (input) => hasProperty(input, TypeId$39);
3365
3365
  /** @internal */
3366
3366
  const isFailure$2 = (result) => result._tag === "Failure";
3367
3367
  /** @internal */
@@ -3381,6 +3381,8 @@ SuccessImpl.prototype = SuccessProto;
3381
3381
  /** @internal */
3382
3382
  const succeed$9 = (success) => new SuccessImpl(success);
3383
3383
  /** @internal */
3384
+ const getSuccess$1 = (self) => isFailure$2(self) ? none$1 : some$2(self.success);
3385
+ /** @internal */
3384
3386
  const fromOption$3 = /*#__PURE__*/ dual(2, (self, onNone) => isNone$1(self) ? fail$8(onNone()) : succeed$9(self.value));
3385
3387
  //#endregion
3386
3388
  //#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Order.js
@@ -4731,7 +4733,7 @@ const ServiceTypeId = "~effect/Context/Service";
4731
4733
  * @category services
4732
4734
  * @since 4.0.0
4733
4735
  */
4734
- const Service = function() {
4736
+ const Service$1 = function() {
4735
4737
  function KeyClass() {}
4736
4738
  const self = KeyClass;
4737
4739
  Object.setPrototypeOf(self, ServiceProto);
@@ -4752,7 +4754,7 @@ const ServiceProto = {
4752
4754
  .../*#__PURE__*/ Prototype({
4753
4755
  label: "Service",
4754
4756
  evaluate(fiber) {
4755
- return exitSucceed(get$5(fiber.context, this));
4757
+ return exitSucceed(get$6(fiber.context, this));
4756
4758
  }
4757
4759
  }),
4758
4760
  toJSON() {
@@ -4768,15 +4770,15 @@ const ServiceProto = {
4768
4770
  return make$39(this, self);
4769
4771
  },
4770
4772
  use(f) {
4771
- return withFiber$1((fiber) => f(get$5(fiber.context, this)));
4773
+ return withFiber$1((fiber) => f(get$6(fiber.context, this)));
4772
4774
  },
4773
4775
  useSync(f) {
4774
- return withFiber$1((fiber) => exitSucceed(f(get$5(fiber.context, this))));
4776
+ return withFiber$1((fiber) => exitSucceed(f(get$6(fiber.context, this))));
4775
4777
  }
4776
4778
  };
4777
4779
  const cacheKeys = /*#__PURE__*/ new Set();
4778
4780
  const ReferenceTypeId = "~effect/Context/Reference";
4779
- const TypeId$37 = "~effect/Context";
4781
+ const TypeId$38 = "~effect/Context";
4780
4782
  const MaxDepth = 8;
4781
4783
  const FlattenAfterBaseHits = 8;
4782
4784
  const makeImpl$1 = (cacheRoot, base, overlay, depth) => {
@@ -4857,7 +4859,7 @@ const Proto$9 = {
4857
4859
  return flatten$4(this);
4858
4860
  },
4859
4861
  ...PipeInspectableProto,
4860
- [TypeId$37]: { _Services: (_) => _ },
4862
+ [TypeId$38]: { _Services: (_) => _ },
4861
4863
  toJSON() {
4862
4864
  return {
4863
4865
  _id: "Context",
@@ -4913,7 +4915,7 @@ const hasSameCache = (self, that) => self.cacheRoot === that.cacheRoot;
4913
4915
  * @category guards
4914
4916
  * @since 2.0.0
4915
4917
  */
4916
- const isContext = (u) => hasProperty(u, TypeId$37);
4918
+ const isContext = (u) => hasProperty(u, TypeId$38);
4917
4919
  /**
4918
4920
  * Checks whether the provided argument is a `Reference`.
4919
4921
  *
@@ -4949,7 +4951,7 @@ const isReference = (u) => !!u[ReferenceTypeId];
4949
4951
  * @category constructors
4950
4952
  * @since 2.0.0
4951
4953
  */
4952
- const empty$8 = () => emptyContext;
4954
+ const empty$9 = () => emptyContext;
4953
4955
  const emptyContext = /*#__PURE__*/ makeUnsafe$6(/*#__PURE__*/ new Map());
4954
4956
  /**
4955
4957
  * Creates a new `Context` with a single service associated to the key.
@@ -5132,7 +5134,7 @@ const getUnsafe$1 = /*#__PURE__*/ dual(2, (self, service) => {
5132
5134
  * @category getters
5133
5135
  * @since 2.0.0
5134
5136
  */
5135
- const get$5 = getUnsafe$1;
5137
+ const get$6 = getUnsafe$1;
5136
5138
  const defaultValueCacheKey = "~effect/Context/defaultValue";
5137
5139
  const getDefaultValue = (ref) => {
5138
5140
  if (defaultValueCacheKey in ref) return ref[defaultValueCacheKey];
@@ -5274,6 +5276,41 @@ const mergeAll$3 = (...ctxs) => {
5274
5276
  return makeUnsafe$6(map);
5275
5277
  };
5276
5278
  /**
5279
+ * Returns a new `Context` with the specified service keys removed.
5280
+ *
5281
+ * **When to use**
5282
+ *
5283
+ * Use when you want to remove a denylist of services from a `Context`.
5284
+ *
5285
+ * **Example** (Omitting services from a context)
5286
+ *
5287
+ * ```ts import.meta.vitest
5288
+ * import { Context, Option, pipe } from "effect"
5289
+ *
5290
+ * const Port = Context.Service<{ PORT: number }>("Port")
5291
+ * const Timeout = Context.Service<{ TIMEOUT: number }>("Timeout")
5292
+ *
5293
+ * const someContext = pipe(
5294
+ * Context.make(Port, { PORT: 8080 }),
5295
+ * Context.add(Timeout, { TIMEOUT: 5000 })
5296
+ * )
5297
+ *
5298
+ * const context = pipe(someContext, Context.omit(Timeout))
5299
+ *
5300
+ * Context.getOption(context, Port) // => Option.some({ PORT: 8080 })
5301
+ * Context.getOption(context, Timeout) // => Option.none()
5302
+ * ```
5303
+ *
5304
+ * @see {@link pick} for keeping selected services
5305
+ *
5306
+ * @stability stable
5307
+ * @category filtering
5308
+ * @since 2.0.0
5309
+ */
5310
+ const omit$2 = (...keys) => (self) => withFlat(self, (map) => {
5311
+ for (let i = 0; i < keys.length; i++) map.delete(keys[i].key);
5312
+ });
5313
+ /**
5277
5314
  * Creates a context key with a default value.
5278
5315
  *
5279
5316
  * **When to use**
@@ -5320,10 +5357,10 @@ const mergeAll$3 = (...ctxs) => {
5320
5357
  * @category services
5321
5358
  * @since 3.11.0
5322
5359
  */
5323
- const Reference = Service;
5360
+ const Reference = Service$1;
5324
5361
  //#endregion
5325
5362
  //#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Duration.js
5326
- const TypeId$36 = "~effect/Duration";
5363
+ const TypeId$37 = "~effect/Duration";
5327
5364
  const bigint0$3 = /*#__PURE__*/ BigInt(0);
5328
5365
  const bigint1$2 = /*#__PURE__*/ BigInt(1);
5329
5366
  const bigint2 = /*#__PURE__*/ BigInt(2);
@@ -5408,7 +5445,7 @@ const fromInputUnsafe$1 = (input) => {
5408
5445
  }
5409
5446
  case "object": {
5410
5447
  if (input === null) break;
5411
- if (TypeId$36 in input) return input;
5448
+ if (TypeId$37 in input) return input;
5412
5449
  if (Array.isArray(input)) {
5413
5450
  if (input.length !== 2 || !input.every(isNumber)) return invalid$3(input);
5414
5451
  if (Number.isNaN(input[0]) || Number.isNaN(input[1])) return zero$2;
@@ -5440,7 +5477,7 @@ const zeroDurationValue = {
5440
5477
  const infinityDurationValue = { _tag: "Infinity" };
5441
5478
  const negativeInfinityDurationValue = { _tag: "NegativeInfinity" };
5442
5479
  const DurationProto = {
5443
- [TypeId$36]: TypeId$36,
5480
+ [TypeId$37]: TypeId$37,
5444
5481
  [symbol$2]() {
5445
5482
  switch (this.value._tag) {
5446
5483
  case "Millis": return hash(roundMillisToNanos(this.value.millis));
@@ -5524,7 +5561,7 @@ const make$38 = (input) => {
5524
5561
  * @category guards
5525
5562
  * @since 2.0.0
5526
5563
  */
5527
- const isDuration = (u) => hasProperty(u, TypeId$36);
5564
+ const isDuration = (u) => hasProperty(u, TypeId$37);
5528
5565
  /**
5529
5566
  * Checks whether a Duration is finite (not infinite).
5530
5567
  *
@@ -6399,6 +6436,37 @@ const isFailure$1 = isFailure$2;
6399
6436
  */
6400
6437
  const isSuccess$1 = isSuccess$2;
6401
6438
  /**
6439
+ * Extracts the success value as an `Option`, discarding the failure.
6440
+ *
6441
+ * **When to use**
6442
+ *
6443
+ * Use when you need to extract the success value from a `Result` as an
6444
+ * `Option` and discard failure information.
6445
+ *
6446
+ * **Details**
6447
+ *
6448
+ * - `Success<A>` becomes `Some<A>`
6449
+ * - `Failure<E>` becomes `None`
6450
+ *
6451
+ * **Example** (Extracting the success as an Option)
6452
+ *
6453
+ * ```ts import.meta.vitest
6454
+ * import { Option, Result } from "effect"
6455
+ *
6456
+ * Result.getSuccess(Result.succeed("ok")) // => Option.some("ok")
6457
+ *
6458
+ * Result.getSuccess(Result.fail("err")) // => Option.none()
6459
+ * ```
6460
+ *
6461
+ * @see {@link getFailure} to extract the error instead
6462
+ * @see {@link fromOption} for the reverse conversion
6463
+ *
6464
+ * @stability stable
6465
+ * @category getters
6466
+ * @since 4.0.0
6467
+ */
6468
+ const getSuccess = getSuccess$1;
6469
+ /**
6402
6470
  * Transforms the success channel of a `Result`, leaving the failure channel unchanged.
6403
6471
  *
6404
6472
  * **When to use**
@@ -6779,7 +6847,7 @@ const constEmptyIterator = { next() {
6779
6847
  * @category constructors
6780
6848
  * @since 2.0.0
6781
6849
  */
6782
- const empty$7 = () => constEmpty;
6850
+ const empty$8 = () => constEmpty;
6783
6851
  //#endregion
6784
6852
  //#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Record.js
6785
6853
  /**
@@ -6880,6 +6948,28 @@ const map$7 = /*#__PURE__*/ dual(2, (self, f) => {
6880
6948
  */
6881
6949
  const keys$1 = (self) => Object.keys(self);
6882
6950
  /**
6951
+ * Adds a new key-value pair or update an existing key's value in a record.
6952
+ *
6953
+ * **Example** (Setting a record value)
6954
+ *
6955
+ * ```ts import.meta.vitest
6956
+ * import { Record } from "effect"
6957
+ *
6958
+ * Record.set("a", 5)({ a: 1, b: 2 }) // => { a: 5, b: 2 }
6959
+ * Record.set("c", 5)({ a: 1, b: 2 }) // => { a: 1, b: 2, c: 5 }
6960
+ * ```
6961
+ *
6962
+ * @stability stable
6963
+ * @category mutations
6964
+ * @since 2.0.0
6965
+ */
6966
+ const set$4 = /*#__PURE__*/ dual(3, (self, key, value) => {
6967
+ return {
6968
+ ...self,
6969
+ [key]: value
6970
+ };
6971
+ });
6972
+ /**
6883
6973
  * Checks whether all the keys and values in one record are also found in another record.
6884
6974
  * Uses the provided equivalence function to compare values.
6885
6975
  *
@@ -6968,7 +7058,7 @@ const makeEquivalence$3 = (equivalence) => {
6968
7058
  * @category constructors
6969
7059
  * @since 4.0.0
6970
7060
  */
6971
- const Array$1 = globalThis.Array;
7061
+ const Array$2 = globalThis.Array;
6972
7062
  /**
6973
7063
  * Converts an `Iterable` to an `Array`.
6974
7064
  *
@@ -6997,7 +7087,7 @@ const Array$1 = globalThis.Array;
6997
7087
  * @category constructors
6998
7088
  * @since 2.0.0
6999
7089
  */
7000
- const fromIterable$6 = (collection) => Array$1.isArray(collection) ? collection : Array$1.from(collection);
7090
+ const fromIterable$6 = (collection) => Array$2.isArray(collection) ? collection : Array$2.from(collection);
7001
7091
  /**
7002
7092
  * Normalizes a value that is either a single element or an array into an array.
7003
7093
  *
@@ -7028,7 +7118,7 @@ const fromIterable$6 = (collection) => Array$1.isArray(collection) ? collection
7028
7118
  * @category constructors
7029
7119
  * @since 3.3.0
7030
7120
  */
7031
- const ensure = (self) => Array$1.isArray(self) ? self : [self];
7121
+ const ensure = (self) => Array$2.isArray(self) ? self : [self];
7032
7122
  /**
7033
7123
  * Pattern-matches on an array, handling empty and non-empty cases separately.
7034
7124
  *
@@ -7169,7 +7259,7 @@ const appendAll$1 = /*#__PURE__*/ dual(2, (self, that) => fromIterable$6(self).c
7169
7259
  * @category guards
7170
7260
  * @since 2.0.0
7171
7261
  */
7172
- const isArray = Array$1.isArray;
7262
+ const isArray = Array$2.isArray;
7173
7263
  /**
7174
7264
  * Checks whether a mutable `Array` is empty, narrowing the type to `[]`.
7175
7265
  *
@@ -7307,7 +7397,7 @@ function isOutOfBounds(i, as) {
7307
7397
  * @category getters
7308
7398
  * @since 2.0.0
7309
7399
  */
7310
- const get$4 = /*#__PURE__*/ dual(2, (self, index) => {
7400
+ const get$5 = /*#__PURE__*/ dual(2, (self, index) => {
7311
7401
  const i = Math.floor(index);
7312
7402
  return isOutOfBounds(i, self) ? none() : some$1(self[i]);
7313
7403
  });
@@ -7368,7 +7458,7 @@ const getUnsafe = /*#__PURE__*/ dual(2, (self, index) => {
7368
7458
  * @category getters
7369
7459
  * @since 2.0.0
7370
7460
  */
7371
- const head = /*#__PURE__*/ get$4(0);
7461
+ const head = /*#__PURE__*/ get$5(0);
7372
7462
  /**
7373
7463
  * Returns the first element of a `NonEmptyReadonlyArray` directly (no `Option`
7374
7464
  * wrapper).
@@ -7667,7 +7757,7 @@ const findLast = /*#__PURE__*/ dual(2, (self, f) => {
7667
7757
  * @category transforming
7668
7758
  * @since 2.0.0
7669
7759
  */
7670
- const reverse = (self) => Array$1.from(self).reverse();
7760
+ const reverse = (self) => Array$2.from(self).reverse();
7671
7761
  /**
7672
7762
  * Sorts an array by the given `Order`, returning a new array.
7673
7763
  *
@@ -7696,7 +7786,7 @@ const reverse = (self) => Array$1.from(self).reverse();
7696
7786
  * @since 2.0.0
7697
7787
  */
7698
7788
  const sort = /*#__PURE__*/ dual(2, (self, O) => {
7699
- const out = Array$1.from(self);
7789
+ const out = Array$2.from(self);
7700
7790
  out.sort(O);
7701
7791
  return out;
7702
7792
  });
@@ -7835,7 +7925,7 @@ const hashBucketsAdd = (buckets, value) => {
7835
7925
  * @category constructors
7836
7926
  * @since 2.0.0
7837
7927
  */
7838
- const empty$6 = () => [];
7928
+ const empty$7 = () => [];
7839
7929
  /**
7840
7930
  * Wraps a single value in a `NonEmptyArray`.
7841
7931
  *
@@ -8773,7 +8863,7 @@ var EncodingError = class extends (/*#__PURE__*/ TaggedError$1("EncodingError"))
8773
8863
  * @category encoding
8774
8864
  * @since 4.0.0
8775
8865
  */
8776
- const encode$1 = (input) => typeof input === "string" ? hexEncodeUint8Array(encoder$4.encode(input)) : hexEncodeUint8Array(input);
8866
+ const encode$2 = (input) => typeof input === "string" ? hexEncodeUint8Array(encoder$4.encode(input)) : hexEncodeUint8Array(input);
8777
8867
  /**
8778
8868
  * Generates a random lowercase hexadecimal string, optimized for lengths that
8779
8869
  * are multiples of 8.
@@ -8888,7 +8978,7 @@ const ParentSpanKey = "effect/Tracer/ParentSpan";
8888
8978
  * @category services
8889
8979
  * @since 2.0.0
8890
8980
  */
8891
- var ParentSpan = class extends (/*#__PURE__*/ Service()(ParentSpanKey, { fiberCached: true })) {};
8981
+ var ParentSpan = class extends (/*#__PURE__*/ Service$1()(ParentSpanKey, { fiberCached: true })) {};
8892
8982
  /**
8893
8983
  * Creates a `Tracer` value from a tracer implementation object.
8894
8984
  *
@@ -8955,7 +9045,7 @@ const externalSpan = (options) => ({
8955
9045
  spanId: options.spanId,
8956
9046
  traceId: options.traceId,
8957
9047
  sampled: options.sampled ?? true,
8958
- annotations: options.annotations ?? empty$8()
9048
+ annotations: options.annotations ?? empty$9()
8959
9049
  });
8960
9050
  /**
8961
9051
  * Context reference for disabling trace propagation.
@@ -9492,7 +9582,7 @@ var FiberImpl = class {
9492
9582
  return this._dispatcher ??= this.cache.scheduler.makeDispatcher();
9493
9583
  }
9494
9584
  getRef(ref) {
9495
- return get$5(this.context, ref);
9585
+ return get$6(this.context, ref);
9496
9586
  }
9497
9587
  addObserver(cb) {
9498
9588
  if (this._exit) {
@@ -9553,7 +9643,7 @@ var FiberImpl = class {
9553
9643
  }
9554
9644
  this._stack.length = 0;
9555
9645
  this._children = void 0;
9556
- this.context = empty$8();
9646
+ this.context = empty$9();
9557
9647
  }
9558
9648
  runLoop(effect) {
9559
9649
  const prevFiber = globalThis[currentFiberTypeId];
@@ -9650,17 +9740,17 @@ var FiberImpl = class {
9650
9740
  const makeFiberContextCache = (context) => {
9651
9741
  const currentTracer = getOrUndefinedUnsafe(context, TracerKey);
9652
9742
  return {
9653
- scheduler: get$5(context, Scheduler),
9743
+ scheduler: get$6(context, Scheduler),
9654
9744
  tracer: currentTracer,
9655
9745
  tracerContext: currentTracer ? currentTracer["context"] : void 0,
9656
- tracerEnabled: get$5(context, TracerEnabled),
9746
+ tracerEnabled: get$6(context, TracerEnabled),
9657
9747
  span: getOrUndefinedUnsafe(context, ParentSpanKey),
9658
- logLevel: get$5(context, CurrentLogLevel),
9659
- minimumLogLevel: get$5(context, MinimumLogLevel$1),
9660
- stackFrame: get$5(context, CurrentStackFrame),
9748
+ logLevel: get$6(context, CurrentLogLevel),
9749
+ minimumLogLevel: get$6(context, MinimumLogLevel$1),
9750
+ stackFrame: get$6(context, CurrentStackFrame),
9661
9751
  runtimeMetrics: getOrUndefinedUnsafe(context, FiberRuntimeMetricsKey),
9662
- maxOpsBeforeYield: get$5(context, MaxOpsBeforeYield),
9663
- preventYield: get$5(context, PreventSchedulerYield)
9752
+ maxOpsBeforeYield: get$6(context, MaxOpsBeforeYield),
9753
+ preventYield: get$6(context, PreventSchedulerYield)
9664
9754
  };
9665
9755
  };
9666
9756
  const deferredInterruptCont = {
@@ -9737,7 +9827,7 @@ const fiberInterruptAs = /*#__PURE__*/ dual((args) => hasProperty(args[0], Fiber
9737
9827
  /** @internal */
9738
9828
  const fiberInterruptAll = (fibers) => withFiber$1((parent) => {
9739
9829
  const annotations = fiberStackAnnotations(parent);
9740
- let fiberArr = empty$6();
9830
+ let fiberArr = empty$7();
9741
9831
  for (const fiber of fibers) {
9742
9832
  fiber.interruptUnsafe(parent.id, annotations);
9743
9833
  fiberArr.push(fiber);
@@ -9747,7 +9837,7 @@ const fiberInterruptAll = (fibers) => withFiber$1((parent) => {
9747
9837
  /** @internal */
9748
9838
  const fiberInterruptAllAs = /*#__PURE__*/ dual(2, (fibers, fiberId) => withFiber$1((parent) => {
9749
9839
  const annotations = fiberStackAnnotations(parent);
9750
- const fiberArr = empty$6();
9840
+ const fiberArr = empty$7();
9751
9841
  for (const fiber of fibers) {
9752
9842
  fiber.interruptUnsafe(fiberId, annotations);
9753
9843
  fiberArr.push(fiber);
@@ -10445,7 +10535,7 @@ const ScopeTypeId = "~effect/Scope";
10445
10535
  /** @internal */
10446
10536
  const ScopeCloseableTypeId = "~effect/Scope/Closeable";
10447
10537
  /** @internal */
10448
- const scopeTag = /*#__PURE__*/ Service("effect/Scope");
10538
+ const scopeTag = /*#__PURE__*/ Service$1("effect/Scope");
10449
10539
  /** @internal */
10450
10540
  const scopeClose = (self, exit_) => withFiber$1((fiber) => {
10451
10541
  fiberEnterUninterruptibleUnsafe(fiber);
@@ -10488,6 +10578,8 @@ const scopeCloseFinalizers = /*#__PURE__*/ fnUntraced$1(function* (self, finaliz
10488
10578
  return yield* exitAsVoidAll(exits);
10489
10579
  });
10490
10580
  /** @internal */
10581
+ const scopeFork = (scope, finalizerStrategy) => sync$2(() => scopeForkUnsafe(scope, finalizerStrategy));
10582
+ /** @internal */
10491
10583
  const scopeForkUnsafe = (scope, finalizerStrategy) => {
10492
10584
  const child = makeScope(finalizerStrategy, scope);
10493
10585
  if (scope.state._tag === "Closed") {
@@ -10999,7 +11091,7 @@ const fiberRunIn = /*#__PURE__*/ dual(2, (self, scope) => {
10999
11091
  return self;
11000
11092
  });
11001
11093
  /** @internal */
11002
- const runFork$1 = /*#__PURE__*/ runForkWith$1(/*#__PURE__*/ empty$8());
11094
+ const runFork$1 = /*#__PURE__*/ runForkWith$1(/*#__PURE__*/ empty$9());
11003
11095
  /** @internal */
11004
11096
  const runPromiseExitWith = (context) => {
11005
11097
  const runFork = runForkWith$1(context);
@@ -11019,7 +11111,7 @@ const runPromiseWith = (context) => {
11019
11111
  });
11020
11112
  };
11021
11113
  /** @internal */
11022
- const runPromise$1 = /*#__PURE__*/ runPromiseWith(/*#__PURE__*/ empty$8());
11114
+ const runPromise$1 = /*#__PURE__*/ runPromiseWith(/*#__PURE__*/ empty$9());
11023
11115
  /** @internal */
11024
11116
  const runSyncExitWith = (context) => {
11025
11117
  const runFork = runForkWith$1(context);
@@ -11032,7 +11124,7 @@ const runSyncExitWith = (context) => {
11032
11124
  };
11033
11125
  };
11034
11126
  /** @internal */
11035
- const runSyncExit$1 = /*#__PURE__*/ runSyncExitWith(/*#__PURE__*/ empty$8());
11127
+ const runSyncExit$1 = /*#__PURE__*/ runSyncExitWith(/*#__PURE__*/ empty$9());
11036
11128
  /** @internal */
11037
11129
  const runSyncWith = (context) => {
11038
11130
  const runSyncExit = runSyncExitWith(context);
@@ -11043,7 +11135,7 @@ const runSyncWith = (context) => {
11043
11135
  };
11044
11136
  };
11045
11137
  /** @internal */
11046
- const runSync$2 = /*#__PURE__*/ runSyncWith(/*#__PURE__*/ empty$8());
11138
+ const runSync$2 = /*#__PURE__*/ runSyncWith(/*#__PURE__*/ empty$9());
11047
11139
  const succeedTrue = /*#__PURE__*/ succeed$7(true);
11048
11140
  const succeedFalse = /*#__PURE__*/ succeed$7(false);
11049
11141
  var Latch = class {
@@ -11139,17 +11231,17 @@ const NoopSpanProto = {
11139
11231
  const noopSpan = (options) => Object.assign(Object.create(NoopSpanProto), options);
11140
11232
  const filterDisablePropagation = (span) => {
11141
11233
  if (!span) return none();
11142
- return get$5(span.annotations, DisablePropagation) ? span._tag === "Span" ? filterDisablePropagation(getOrUndefined$1(span.parent)) : none() : some$1(span);
11234
+ return get$6(span.annotations, DisablePropagation) ? span._tag === "Span" ? filterDisablePropagation(getOrUndefined$1(span.parent)) : none() : some$1(span);
11143
11235
  };
11144
11236
  /** @internal */
11145
11237
  const makeSpanUnsafe = (fiber, name, options) => {
11146
- const disablePropagation = !fiber.cache.tracerEnabled || options?.annotations && get$5(options.annotations, DisablePropagation);
11238
+ const disablePropagation = !fiber.cache.tracerEnabled || options?.annotations && get$6(options.annotations, DisablePropagation);
11147
11239
  const parent = options?.parent !== void 0 ? some$1(options.parent) : options?.root ? none() : filterDisablePropagation(fiber.cache.span);
11148
11240
  let span;
11149
11241
  if (disablePropagation) span = noopSpan({
11150
11242
  name,
11151
11243
  parent,
11152
- annotations: add(options?.annotations ?? empty$8(), DisablePropagation, true)
11244
+ annotations: add(options?.annotations ?? empty$9(), DisablePropagation, true)
11153
11245
  });
11154
11246
  else {
11155
11247
  const tracer = fiber.cache.tracer ?? nativeTracer;
@@ -11162,7 +11254,7 @@ const makeSpanUnsafe = (fiber, name, options) => {
11162
11254
  span = tracer.span({
11163
11255
  name,
11164
11256
  parent,
11165
- annotations: options?.annotations ?? empty$8(),
11257
+ annotations: options?.annotations ?? empty$9(),
11166
11258
  links,
11167
11259
  startTime: timingEnabled ? clock.currentTimeNanosUnsafe() : bigint0$2,
11168
11260
  kind: options?.kind ?? "internal",
@@ -11757,7 +11849,7 @@ const isFailure = exitIsFailure;
11757
11849
  const asVoidAll = exitAsVoidAll;
11758
11850
  //#endregion
11759
11851
  //#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Deferred.js
11760
- const TypeId$35 = "~effect/Deferred";
11852
+ const TypeId$36 = "~effect/Deferred";
11761
11853
  /**
11762
11854
  * Checks whether a value is a `Deferred`.
11763
11855
  *
@@ -11770,9 +11862,9 @@ const TypeId$35 = "~effect/Deferred";
11770
11862
  * @category guards
11771
11863
  * @since 4.0.0
11772
11864
  */
11773
- const isDeferred = (u) => hasProperty(u, TypeId$35);
11865
+ const isDeferred = (u) => hasProperty(u, TypeId$36);
11774
11866
  const DeferredProto = {
11775
- [TypeId$35]: {
11867
+ [TypeId$36]: {
11776
11868
  _A: identity,
11777
11869
  _E: identity
11778
11870
  },
@@ -12455,6 +12547,39 @@ const addFinalizerExit = scopeAddFinalizerExit;
12455
12547
  */
12456
12548
  const addFinalizer$1 = scopeAddFinalizer;
12457
12549
  /**
12550
+ * Creates a closeable child scope registered with a parent scope.
12551
+ *
12552
+ * **Details**
12553
+ *
12554
+ * Closing the parent closes the child with the same exit value, and closing the
12555
+ * child detaches it from the parent. The optional finalizer strategy configures
12556
+ * the child scope and defaults to `"sequential"` when omitted.
12557
+ *
12558
+ * **Example** (Creating a child scope)
12559
+ *
12560
+ * ```ts import.meta.vitest
12561
+ * import { Effect, Exit, Scope } from "effect"
12562
+ *
12563
+ * const cleanups: Array<string> = []
12564
+ * const nestedScopes = Effect.gen(function*() {
12565
+ * const parentScope = yield* Scope.make("sequential")
12566
+ * yield* Scope.addFinalizer(parentScope, Effect.sync(() => cleanups.push("parent")))
12567
+ * const childScope = yield* Scope.fork(parentScope, "parallel")
12568
+ * yield* Scope.addFinalizer(childScope, Effect.sync(() => cleanups.push("child")))
12569
+ * yield* Scope.close(childScope, Exit.void)
12570
+ * yield* Scope.close(parentScope, Exit.void)
12571
+ * })
12572
+ *
12573
+ * Effect.runSync(nestedScopes)
12574
+ * cleanups // => ["child", "parent"]
12575
+ * ```
12576
+ *
12577
+ * @stability stable
12578
+ * @category combinators
12579
+ * @since 2.0.0
12580
+ */
12581
+ const fork = scopeFork;
12582
+ /**
12458
12583
  * Creates a closeable child scope synchronously and registers it with a parent scope.
12459
12584
  *
12460
12585
  * **When to use**
@@ -12559,7 +12684,7 @@ const close = scopeClose;
12559
12684
  const closeUnsafe = scopeCloseUnsafe;
12560
12685
  //#endregion
12561
12686
  //#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Layer.js
12562
- const TypeId$34 = "~effect/Layer";
12687
+ const TypeId$35 = "~effect/Layer";
12563
12688
  const MemoMapTypeId = "~effect/Layer/MemoMap";
12564
12689
  const makeMemoMapEntry = (memoMap, layer) => {
12565
12690
  const entry = {
@@ -12581,7 +12706,7 @@ const memoMapObserve = (entry, scope) => {
12581
12706
  return true;
12582
12707
  };
12583
12708
  const LayerProto = {
12584
- [TypeId$34]: {
12709
+ [TypeId$35]: {
12585
12710
  _ROut: identity,
12586
12711
  _E: identity,
12587
12712
  _RIn: identity
@@ -12777,7 +12902,7 @@ const forkMemoMapUnsafe = (parent) => new MemoMapImpl(parent);
12777
12902
  * @category services
12778
12903
  * @since 3.13.0
12779
12904
  */
12780
- var CurrentMemoMap = class CurrentMemoMap extends (/*#__PURE__*/ Service()("effect/Layer/CurrentMemoMap")) {
12905
+ var CurrentMemoMap = class CurrentMemoMap extends (/*#__PURE__*/ Service$1()("effect/Layer/CurrentMemoMap")) {
12781
12906
  static forkOrCreate(self) {
12782
12907
  const current = getOrUndefined(self, CurrentMemoMap);
12783
12908
  return current ? forkMemoMapUnsafe(current) : makeMemoMapUnsafe();
@@ -13204,8 +13329,8 @@ const effectContext = (effect) => fromBuildMemo((_, scope) => provide$3(effect,
13204
13329
  * @category constructors
13205
13330
  * @since 2.0.0
13206
13331
  */
13207
- const effectDiscard = (effect) => effectContext(as$1(effect, empty$8()));
13208
- const unwrapKey = /*#__PURE__*/ Service("effect/Layer/unwrap");
13332
+ const effectDiscard = (effect) => effectContext(as$1(effect, empty$9()));
13333
+ const unwrapKey = /*#__PURE__*/ Service$1("effect/Layer/unwrap");
13209
13334
  /**
13210
13335
  * Unwraps a `Layer` from an `Effect`, flattening the nested structure.
13211
13336
  *
@@ -13241,7 +13366,7 @@ const unwrapKey = /*#__PURE__*/ Service("effect/Layer/unwrap");
13241
13366
  * @category converting
13242
13367
  * @since 4.0.0
13243
13368
  */
13244
- const unwrap$5 = (self) => flatMap$3(effect(unwrapKey)(self), get$5(unwrapKey));
13369
+ const unwrap$5 = (self) => flatMap$3(effect(unwrapKey)(self), get$6(unwrapKey));
13245
13370
  const mergeAllEffect = (layers, memoMap, scope) => {
13246
13371
  const parentScope = forkUnsafe(scope, "parallel");
13247
13372
  return forEach$2(layers, (layer) => layer.build(memoMap, forkUnsafe(parentScope, "sequential")), { concurrency: layers.length }).pipe(map$5((context) => mergeAll$3(...context)));
@@ -14415,7 +14540,7 @@ const reasonAnnotations = reasonAnnotations$1;
14415
14540
  * @category services
14416
14541
  * @since 4.0.0
14417
14542
  */
14418
- var StackTrace = class extends (/*#__PURE__*/ Service()("effect/Cause/StackTrace")) {};
14543
+ var StackTrace = class extends (/*#__PURE__*/ Service$1()("effect/Cause/StackTrace")) {};
14419
14544
  //#endregion
14420
14545
  //#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Clock.js
14421
14546
  /**
@@ -14501,11 +14626,11 @@ const currentTimeMillis = currentTimeMillis$1;
14501
14626
  //#endregion
14502
14627
  //#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/dateTime.js
14503
14628
  /** @internal */
14504
- const TypeId$33 = "~effect/DateTime";
14629
+ const TypeId$34 = "~effect/DateTime";
14505
14630
  /** @internal */
14506
14631
  const TimeZoneTypeId = "~effect/DateTime/TimeZone";
14507
14632
  const Proto$8 = {
14508
- [TypeId$33]: TypeId$33,
14633
+ [TypeId$34]: TypeId$34,
14509
14634
  pipe() {
14510
14635
  return pipeArguments(this, arguments);
14511
14636
  },
@@ -14611,7 +14736,7 @@ const makeZonedProto = (epochMillis, zone, partsUtc) => {
14611
14736
  return self;
14612
14737
  };
14613
14738
  /** @internal */
14614
- const isDateTime$1 = (u) => hasProperty(u, TypeId$33);
14739
+ const isDateTime$1 = (u) => hasProperty(u, TypeId$34);
14615
14740
  /** @internal */
14616
14741
  const isTimeZone = (u) => hasProperty(u, TimeZoneTypeId);
14617
14742
  /** @internal */
@@ -15088,7 +15213,7 @@ const isEmpty$1 = (self) => self.length === 0;
15088
15213
  * @category predicates
15089
15214
  * @since 2.0.0
15090
15215
  */
15091
- const isNonEmpty = (self) => self.length > 0;
15216
+ const isNonEmpty$1 = (self) => self.length > 0;
15092
15217
  /**
15093
15218
  * Returns the JavaScript string length, measured in UTF-16 code units.
15094
15219
  *
@@ -15122,7 +15247,7 @@ const length = (self) => self.length;
15122
15247
  * @category transforming
15123
15248
  * @since 2.0.0
15124
15249
  */
15125
- const split = /*#__PURE__*/ dual(2, (self, separator) => {
15250
+ const split$1 = /*#__PURE__*/ dual(2, (self, separator) => {
15126
15251
  const out = self.split(separator);
15127
15252
  return isArrayNonEmpty$1(out) ? out : [self];
15128
15253
  });
@@ -15474,7 +15599,7 @@ const matchEffect$1 = /*#__PURE__*/ dual(2, (self, options) => matchCauseEffect$
15474
15599
  }));
15475
15600
  //#endregion
15476
15601
  //#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Schedule.js
15477
- const TypeId$32 = "~effect/Schedule";
15602
+ const TypeId$33 = "~effect/Schedule";
15478
15603
  /**
15479
15604
  * Context reference containing metadata for the currently running schedule step.
15480
15605
  *
@@ -15500,7 +15625,7 @@ const CurrentMetadata = /*#__PURE__*/ Reference("effect/Schedule/CurrentMetadata
15500
15625
  elapsedSincePrevious: 0
15501
15626
  }) });
15502
15627
  const ScheduleProto = {
15503
- [TypeId$32]: {
15628
+ [TypeId$33]: {
15504
15629
  _Out: identity,
15505
15630
  _In: identity,
15506
15631
  _Env: identity
@@ -15530,7 +15655,7 @@ const ScheduleProto = {
15530
15655
  * @category guards
15531
15656
  * @since 2.0.0
15532
15657
  */
15533
- const isSchedule = (u) => hasProperty(u, TypeId$32);
15658
+ const isSchedule = (u) => hasProperty(u, TypeId$33);
15534
15659
  /**
15535
15660
  * Creates a Schedule from a step function that returns a Pull.
15536
15661
  *
@@ -20922,7 +21047,7 @@ const catchEager = catchEager$1;
20922
21047
  const fnUntracedEager = fnUntracedEager$1;
20923
21048
  //#endregion
20924
21049
  //#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/net/NetAddress.js
20925
- const TypeId$31 = "~effect/net/NetAddress";
21050
+ const TypeId$32 = "~effect/net/NetAddress";
20926
21051
  const ipv4Value = (self) => self.value;
20927
21052
  const ipv6Words = (self) => self;
20928
21053
  const getMacBytes = (self) => self.bytes;
@@ -20941,7 +21066,7 @@ const getMacBytes = (self) => self.bytes;
20941
21066
  * @since 4.0.0
20942
21067
  */
20943
21068
  var NetAddressError = class extends (/*#__PURE__*/ TaggedError$1("NetAddressError")) {};
20944
- const isAddress = (u) => hasProperty(u, TypeId$31);
21069
+ const isAddress = (u) => hasProperty(u, TypeId$32);
20945
21070
  /**
20946
21071
  * Returns `true` when a value is an IPv4 address.
20947
21072
  *
@@ -21035,7 +21160,7 @@ const isUnixPathAddress = (u) => isAddress(u) && u._tag === "UnixPathAddress";
21035
21160
  const Ipv4Proto = {
21036
21161
  ...BaseProto,
21037
21162
  _tag: "Ipv4Address",
21038
- [TypeId$31]: TypeId$31,
21163
+ [TypeId$32]: TypeId$32,
21039
21164
  [symbol$1](that) {
21040
21165
  return isIpv4Address(that) && ipv4Value(this) === ipv4Value(that);
21041
21166
  },
@@ -21052,7 +21177,7 @@ const Ipv4Proto = {
21052
21177
  const Ipv6Proto = {
21053
21178
  ...BaseProto,
21054
21179
  _tag: "Ipv6Address",
21055
- [TypeId$31]: TypeId$31,
21180
+ [TypeId$32]: TypeId$32,
21056
21181
  [symbol$1](that) {
21057
21182
  if (!isIpv6Address(that)) return false;
21058
21183
  const self = ipv6Words(this);
@@ -21487,7 +21612,7 @@ const isIpv4Mapped = (self) => {
21487
21612
  const InetV4Proto = {
21488
21613
  ...BaseProto,
21489
21614
  _tag: "InetAddressV4",
21490
- [TypeId$31]: TypeId$31,
21615
+ [TypeId$32]: TypeId$32,
21491
21616
  [symbol$1](that) {
21492
21617
  return isInetAddressV4(that) && this.port === that.port && equals$1(this.address, that.address);
21493
21618
  },
@@ -21504,7 +21629,7 @@ const InetV4Proto = {
21504
21629
  const InetV6Proto = {
21505
21630
  ...BaseProto,
21506
21631
  _tag: "InetAddressV6",
21507
- [TypeId$31]: TypeId$31,
21632
+ [TypeId$32]: TypeId$32,
21508
21633
  [symbol$1](that) {
21509
21634
  return isInetAddressV6(that) && this.port === that.port && this.scopeId === that.scopeId && equals$1(this.address, that.address);
21510
21635
  },
@@ -21737,7 +21862,7 @@ const formatUrlUnsafe = (self, scheme = "http") => getOrThrow(formatUrl(self, sc
21737
21862
  const UnixPathProto = {
21738
21863
  ...BaseProto,
21739
21864
  _tag: "UnixPathAddress",
21740
- [TypeId$31]: TypeId$31,
21865
+ [TypeId$32]: TypeId$32,
21741
21866
  [symbol$1](that) {
21742
21867
  return isUnixPathAddress(that) && this.path === that.path;
21743
21868
  },
@@ -22085,7 +22210,7 @@ const formatRecord = (self) => {
22085
22210
  case "PTR": return `PTR ${formatName(self.host)}`;
22086
22211
  case "SOA": return `SOA ${self.primary} ${formatName(self.admin)} ${self.serial} ${toSeconds(self.refresh)} ${toSeconds(self.retry)} ${toSeconds(self.expire)} ${toSeconds(self.minimum)}`;
22087
22212
  case "SRV": return `SRV ${self.priority} ${self.weight} ${self.port} ${self.target}`;
22088
- case "TLSA": return `TLSA ${self.certUsage} ${self.selector} ${self.matchingType} ${encode$1(self.data).toUpperCase()}`;
22213
+ case "TLSA": return `TLSA ${self.certUsage} ${self.selector} ${self.matchingType} ${encode$2(self.data).toUpperCase()}`;
22089
22214
  case "TXT": return `TXT ${self.chunks.map(quote).join(" ")}`;
22090
22215
  }
22091
22216
  };
@@ -22188,7 +22313,7 @@ var DnsError = class extends (/*#__PURE__*/ TaggedError$1("DnsError")) {
22188
22313
  * @category services
22189
22314
  * @since 4.0.0
22190
22315
  */
22191
- var Dns = class extends (/*#__PURE__*/ Service()("effect/net/Dns")) {};
22316
+ var Dns = class extends (/*#__PURE__*/ Service$1()("effect/net/Dns")) {};
22192
22317
  const notFound = (method, hostname, recordType) => fail$3(new DnsError({
22193
22318
  reason: "NotFound",
22194
22319
  method,
@@ -22637,7 +22762,7 @@ const gibibytes = /*#__PURE__*/ unitConstructor("GiB");
22637
22762
  * @stability unstable
22638
22763
  * @since 4.0.0
22639
22764
  */
22640
- const TypeId$29 = "~effect/PlatformError";
22765
+ const TypeId$30 = "~effect/PlatformError";
22641
22766
  /**
22642
22767
  * Error data for an invalid argument passed to a platform API.
22643
22768
  *
@@ -22750,7 +22875,7 @@ var PlatformError = class extends (/*#__PURE__*/ TaggedError$1("PlatformError"))
22750
22875
  *
22751
22876
  * @since 4.0.0
22752
22877
  */
22753
- [TypeId$29] = TypeId$29;
22878
+ [TypeId$30] = TypeId$30;
22754
22879
  get message() {
22755
22880
  return this.reason.message;
22756
22881
  }
@@ -22783,7 +22908,7 @@ const systemError = (options) => new PlatformError(new SystemError(options));
22783
22908
  const badArgument = (options) => new PlatformError(new BadArgument(options));
22784
22909
  //#endregion
22785
22910
  //#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Chunk.js
22786
- const TypeId$28 = "~effect/Chunk";
22911
+ const TypeId$29 = "~effect/Chunk";
22787
22912
  function copy$2(src, srcPos, dest, destPos, len) {
22788
22913
  for (let i = srcPos; i < Math.min(src.length, srcPos + len); i++) dest[destPos + i - srcPos] = src[i];
22789
22914
  return dest;
@@ -22820,7 +22945,7 @@ const makeEquivalence$1 = (isEquivalent) => make$41((self, that) => {
22820
22945
  });
22821
22946
  const _equivalence = /*#__PURE__*/ makeEquivalence$1(equals$1);
22822
22947
  const ChunkProto = {
22823
- [TypeId$28]: { _A: (_) => _ },
22948
+ [TypeId$29]: { _A: (_) => _ },
22824
22949
  toString() {
22825
22950
  return `Chunk(${format$2(toReadonlyArray(this))})`;
22826
22951
  },
@@ -22906,7 +23031,7 @@ const makeChunk = (backing) => {
22906
23031
  * @category guards
22907
23032
  * @since 2.0.0
22908
23033
  */
22909
- const isChunk = (u) => hasProperty(u, TypeId$28);
23034
+ const isChunk = (u) => hasProperty(u, TypeId$29);
22910
23035
  const _empty = /*#__PURE__*/ makeChunk({ _tag: "IEmpty" });
22911
23036
  const copyToArray = (self, array, initial) => {
22912
23037
  switch (self.backing._tag) {
@@ -23306,9 +23431,9 @@ const makeUnsafe$2 = makeLatchUnsafe;
23306
23431
  const make$31 = makeLatch;
23307
23432
  //#endregion
23308
23433
  //#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/MutableRef.js
23309
- const TypeId$27 = "~effect/MutableRef";
23434
+ const TypeId$28 = "~effect/MutableRef";
23310
23435
  const MutableRefProto = {
23311
- [TypeId$27]: TypeId$27,
23436
+ [TypeId$28]: TypeId$28,
23312
23437
  ...PipeInspectableProto,
23313
23438
  toJSON() {
23314
23439
  return {
@@ -23406,7 +23531,7 @@ const make$30 = (value) => {
23406
23531
  * @category mutations
23407
23532
  * @since 2.0.0
23408
23533
  */
23409
- const set$2 = /*#__PURE__*/ dual(2, (self, value) => {
23534
+ const set$3 = /*#__PURE__*/ dual(2, (self, value) => {
23410
23535
  self.current = value;
23411
23536
  return self;
23412
23537
  });
@@ -23850,7 +23975,7 @@ const remove$2 = (self, value) => filter$1(self, (v) => v !== value);
23850
23975
  * @stability stable
23851
23976
  * @since 2.0.0
23852
23977
  */
23853
- const TypeId$26 = "~effect/PubSub";
23978
+ const TypeId$27 = "~effect/PubSub";
23854
23979
  const SubscriptionTypeId = "~effect/PubSub/Subscription";
23855
23980
  /**
23856
23981
  * Creates a PubSub with a custom atomic implementation and strategy.
@@ -24037,13 +24162,13 @@ const publishUnsafe = /*#__PURE__*/ dual(2, (self, value) => {
24037
24162
  * @since 2.0.0
24038
24163
  */
24039
24164
  const subscribe = (self) => uninterruptible(contextWith((services) => {
24040
- const localScope = get$5(services, Scope);
24165
+ const localScope = get$6(services, Scope);
24041
24166
  const scope = forkUnsafe(self.scope);
24042
24167
  const subscription = makeSubscriptionUnsafe(self.pubsub, self.subscribers, self.strategy, self.ended);
24043
24168
  return addFinalizer$1(scope, unsubscribe(subscription)).pipe(andThen(addFinalizerExit(localScope, (exit) => close(scope, exit))), as(subscription));
24044
24169
  }));
24045
24170
  const unsubscribe = (self) => uninterruptible(withFiber((state) => {
24046
- set$2(self.shutdownFlag, true);
24171
+ set$3(self.shutdownFlag, true);
24047
24172
  return forEach$1(takeAll$2(self.pollers), (d) => interruptWith(d, state.id), {
24048
24173
  discard: true,
24049
24174
  concurrency: "unbounded"
@@ -24300,7 +24425,7 @@ var SubscriptionImpl = class {
24300
24425
  }
24301
24426
  };
24302
24427
  var PubSubImpl = class {
24303
- [TypeId$26] = { _A: identity };
24428
+ [TypeId$27] = { _A: identity };
24304
24429
  pubsub;
24305
24430
  subscribers;
24306
24431
  scope;
@@ -24526,7 +24651,7 @@ const emptyReplayWindow = {
24526
24651
  * @stability stable
24527
24652
  * @since 3.8.0
24528
24653
  */
24529
- const TypeId$25 = "~effect/Queue";
24654
+ const TypeId$26 = "~effect/Queue";
24530
24655
  const EnqueueTypeId = "~effect/Queue/Enqueue";
24531
24656
  const DequeueTypeId = "~effect/Queue/Dequeue";
24532
24657
  const variance$1 = {
@@ -24534,7 +24659,7 @@ const variance$1 = {
24534
24659
  _E: identity
24535
24660
  };
24536
24661
  const QueueProto = {
24537
- [TypeId$25]: variance$1,
24662
+ [TypeId$26]: variance$1,
24538
24663
  [EnqueueTypeId]: variance$1,
24539
24664
  [DequeueTypeId]: variance$1,
24540
24665
  ...PipeInspectableProto,
@@ -25137,7 +25262,7 @@ const takeAll = (self) => takeBetween(self, 1, Number.POSITIVE_INFINITY);
25137
25262
  * @since 4.0.0
25138
25263
  */
25139
25264
  const collect = (self) => suspend$3(() => {
25140
- const out = empty$6();
25265
+ const out = empty$7();
25141
25266
  return as$1(catchDone(whileLoop$1({
25142
25267
  while: constTrue,
25143
25268
  body: constant(takeAll(self)),
@@ -25689,7 +25814,7 @@ const make$26 = (permits) => sync$2(() => new SemaphoreImpl(permits));
25689
25814
  * @category type IDs
25690
25815
  * @since 4.0.0
25691
25816
  */
25692
- const TypeId$24 = "~effect/Channel";
25817
+ const TypeId$25 = "~effect/Channel";
25693
25818
  /**
25694
25819
  * Checks whether a value is a `Channel`.
25695
25820
  *
@@ -25707,9 +25832,9 @@ const TypeId$24 = "~effect/Channel";
25707
25832
  * @category guards
25708
25833
  * @since 3.5.4
25709
25834
  */
25710
- const isChannel = (u) => hasProperty(u, TypeId$24);
25835
+ const isChannel = (u) => hasProperty(u, TypeId$25);
25711
25836
  const ChannelProto = {
25712
- [TypeId$24]: {
25837
+ [TypeId$25]: {
25713
25838
  _Env: identity,
25714
25839
  _InErr: identity,
25715
25840
  _InElem: identity,
@@ -26055,7 +26180,7 @@ const succeed$3 = (value) => fromEffect$1(succeed$4(value));
26055
26180
  * @category constructors
26056
26181
  * @since 4.0.0
26057
26182
  */
26058
- const empty$5 = /*#__PURE__*/ fromPull$1(/*#__PURE__*/ succeed$4(/*#__PURE__*/ done()));
26183
+ const empty$6 = /*#__PURE__*/ fromPull$1(/*#__PURE__*/ succeed$4(/*#__PURE__*/ done()));
26059
26184
  /**
26060
26185
  * Constructs a channel that fails immediately with the specified error.
26061
26186
  *
@@ -27658,7 +27783,7 @@ const runFold = /*#__PURE__*/ dual(3, (self, initial, f) => suspend$2(() => {
27658
27783
  const toPullScoped = (self, scope) => toTransform(self)(done(), scope);
27659
27784
  //#endregion
27660
27785
  //#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/stream.js
27661
- const TypeId$23 = "~effect/Stream";
27786
+ const TypeId$24 = "~effect/Stream";
27662
27787
  const streamVariance = {
27663
27788
  _R: identity,
27664
27789
  _E: identity,
@@ -27668,7 +27793,7 @@ const Stream$1 = function(channel) {
27668
27793
  this.channel = channel;
27669
27794
  };
27670
27795
  Stream$1.prototype = {
27671
- [TypeId$23]: streamVariance,
27796
+ [TypeId$24]: streamVariance,
27672
27797
  pipe() {
27673
27798
  return pipeArguments(this, arguments);
27674
27799
  }
@@ -27677,7 +27802,7 @@ Stream$1.prototype = {
27677
27802
  const fromChannel$2 = (channel) => new Stream$1(channel);
27678
27803
  //#endregion
27679
27804
  //#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Sink.js
27680
- const TypeId$22 = "~effect/Sink";
27805
+ const TypeId$23 = "~effect/Sink";
27681
27806
  const endVoid = /*#__PURE__*/ succeed$4([void 0]);
27682
27807
  const sinkVariance = {
27683
27808
  _A: identity,
@@ -27687,7 +27812,7 @@ const sinkVariance = {
27687
27812
  _R: identity
27688
27813
  };
27689
27814
  const SinkProto = {
27690
- [TypeId$22]: sinkVariance,
27815
+ [TypeId$23]: sinkVariance,
27691
27816
  pipe() {
27692
27817
  return pipeArguments(this, arguments);
27693
27818
  }
@@ -27711,7 +27836,7 @@ const SinkProto = {
27711
27836
  * @category guards
27712
27837
  * @since 4.0.0
27713
27838
  */
27714
- const isSink = (u) => hasProperty(u, TypeId$22);
27839
+ const isSink = (u) => hasProperty(u, TypeId$23);
27715
27840
  /**
27716
27841
  * Creates a sink from a `Channel`.
27717
27842
  *
@@ -27946,7 +28071,7 @@ const forEachArray = (f) => fromTransform((upstream) => upstream.pipe(flatMap$2(
27946
28071
  const unwrap$3 = (effect) => fromChannel$1(unwrap$4(map$3(effect, toChannel$1)));
27947
28072
  //#endregion
27948
28073
  //#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/rcRef.js
27949
- const TypeId$21 = "~effect/RcRef";
28074
+ const TypeId$22 = "~effect/RcRef";
27950
28075
  const stateEmpty = { _tag: "Empty" };
27951
28076
  const stateClosed = { _tag: "Closed" };
27952
28077
  const variance = {
@@ -27954,7 +28079,7 @@ const variance = {
27954
28079
  _E: identity
27955
28080
  };
27956
28081
  var RcRefImpl = class {
27957
- [TypeId$21] = variance;
28082
+ [TypeId$22] = variance;
27958
28083
  pipe() {
27959
28084
  return pipeArguments(this, arguments);
27960
28085
  }
@@ -27973,7 +28098,7 @@ var RcRefImpl = class {
27973
28098
  /** @internal */
27974
28099
  const make$25 = (options) => withFiber((fiber) => {
27975
28100
  const context = fiber.context;
27976
- const scope = get$5(context, Scope);
28101
+ const scope = get$6(context, Scope);
27977
28102
  const ref = new RcRefImpl(options.acquire, context, scope, options.idleTimeToLive !== void 0 ? fromInputUnsafe$1(options.idleTimeToLive) : void 0);
27978
28103
  return as(addFinalizerExit(scope, () => {
27979
28104
  const state = ref.state;
@@ -28036,7 +28161,7 @@ const awaitAcquiring = (self, acquiring, restore) => onExit$1(restore(join(acqui
28036
28161
  return interrupt(acquiring.fiber);
28037
28162
  });
28038
28163
  /** @internal */
28039
- const get$3 = (self_) => {
28164
+ const get$4 = (self_) => {
28040
28165
  const self = self_;
28041
28166
  return uninterruptibleMask((restore) => flatMap$2(scope, (scope) => flatMap$2(getState(self, restore), (state) => as(addFinalizerExit(scope, () => release(self, state)), state.value))));
28042
28167
  };
@@ -28154,7 +28279,7 @@ const make$24 = make$25;
28154
28279
  * @category combinators
28155
28280
  * @since 3.5.0
28156
28281
  */
28157
- const get$2 = get$3;
28282
+ const get$3 = get$4;
28158
28283
  //#endregion
28159
28284
  //#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Stream.js
28160
28285
  /**
@@ -28185,7 +28310,7 @@ const get$2 = get$3;
28185
28310
  * @category type IDs
28186
28311
  * @since 4.0.0
28187
28312
  */
28188
- const TypeId$20 = "~effect/Stream";
28313
+ const TypeId$21 = "~effect/Stream";
28189
28314
  /**
28190
28315
  * Checks whether a value is a Stream.
28191
28316
  *
@@ -28202,7 +28327,7 @@ const TypeId$20 = "~effect/Stream";
28202
28327
  * @category guards
28203
28328
  * @since 4.0.0
28204
28329
  */
28205
- const isStream = (u) => hasProperty(u, TypeId$20);
28330
+ const isStream = (u) => hasProperty(u, TypeId$21);
28206
28331
  /**
28207
28332
  * Creates a stream from a array-emitting `Channel`.
28208
28333
  *
@@ -28357,7 +28482,7 @@ const callback = (f, options) => fromChannel(callbackArray(f, options));
28357
28482
  * @category constructors
28358
28483
  * @since 2.0.0
28359
28484
  */
28360
- const empty$4 = /*#__PURE__*/ fromChannel(empty$5);
28485
+ const empty$5 = /*#__PURE__*/ fromChannel(empty$6);
28361
28486
  /**
28362
28487
  * Creates a single-valued pure stream.
28363
28488
  *
@@ -28500,7 +28625,7 @@ const fromIterable$5 = (iterable, options) => Array.isArray(iterable) && options
28500
28625
  * @category constructors
28501
28626
  * @since 4.0.0
28502
28627
  */
28503
- const fromArray = (array) => isReadonlyArrayNonEmpty(array) ? fromChannel(succeed$3(array)) : empty$4;
28628
+ const fromArray = (array) => isReadonlyArrayNonEmpty(array) ? fromChannel(succeed$3(array)) : empty$5;
28504
28629
  /**
28505
28630
  * Creates a stream that pulls values from a `Queue.Dequeue`.
28506
28631
  *
@@ -29204,7 +29329,7 @@ const limitBytes = /*#__PURE__*/ dual(3, (self, bytes, onLimitReached) => suspen
29204
29329
  }
29205
29330
  size = nextSize;
29206
29331
  return true;
29207
- }), suspend(() => limitReached ? onLimitReached() : empty$4));
29332
+ }), suspend(() => limitReached ? onLimitReached() : empty$5));
29208
29333
  }));
29209
29334
  /**
29210
29335
  * Takes elements until the predicate matches.
@@ -29321,7 +29446,7 @@ const takeWhile = /*#__PURE__*/ dual(2, (self, predicate) => transformPull(self,
29321
29446
  * @since 2.0.0
29322
29447
  */
29323
29448
  const mapAccum = /*#__PURE__*/ dual((args) => isStream(args[0]), (self, initial, f, options) => fromChannel(mapAccum$1(self.channel, initial, (state, arr) => {
29324
- const acc = empty$6();
29449
+ const acc = empty$7();
29325
29450
  for (let index = 0; index < arr.length; index++) {
29326
29451
  const [newState, values] = f(state, arr[index]);
29327
29452
  state = newState;
@@ -29332,7 +29457,7 @@ const mapAccum = /*#__PURE__*/ dual((args) => isStream(args[0]), (self, initial,
29332
29457
  const arr = options.onHalt(state);
29333
29458
  return isReadonlyArrayNonEmpty(arr) ? of(arr) : emptyArr;
29334
29459
  } } : void 0)));
29335
- const emptyArr = /*#__PURE__*/ empty$6();
29460
+ const emptyArr = /*#__PURE__*/ empty$7();
29336
29461
  /**
29337
29462
  * Accumulates state across the stream, emitting the initial state and each updated state.
29338
29463
  *
@@ -29359,7 +29484,7 @@ const emptyArr = /*#__PURE__*/ empty$6();
29359
29484
  const scan = /*#__PURE__*/ dual(3, (self, initial, f) => suspend(() => {
29360
29485
  const seed = initial();
29361
29486
  return concat(succeed$2(seed), fromChannel(mapAccum$1(self.channel, () => seed, (state, arr) => {
29362
- const states = empty$6();
29487
+ const states = empty$7();
29363
29488
  for (let index = 0; index < arr.length; index++) {
29364
29489
  state = f(state, arr[index]);
29365
29490
  states.push(state);
@@ -30066,7 +30191,7 @@ const toReadableStreamWith = /*#__PURE__*/ dual((args) => isStream(args[0]), (se
30066
30191
  * @category destructors
30067
30192
  * @since 2.0.0
30068
30193
  */
30069
- const toReadableStream = /*#__PURE__*/ dual((args) => isStream(args[0]), (self, options) => toReadableStreamWith(self, empty$8(), options));
30194
+ const toReadableStream = /*#__PURE__*/ dual((args) => isStream(args[0]), (self, options) => toReadableStreamWith(self, empty$9(), options));
30070
30195
  /**
30071
30196
  * Creates an Effect that builds a ReadableStream from the stream.
30072
30197
  *
@@ -30114,7 +30239,7 @@ const toReadableStreamEffect = /*#__PURE__*/ dual((args) => isStream(args[0]), (
30114
30239
  * @stability unstable
30115
30240
  * @since 4.0.0
30116
30241
  */
30117
- const TypeId$19 = "~effect/FileSystem";
30242
+ const TypeId$20 = "~effect/FileSystem";
30118
30243
  /**
30119
30244
  * Service tag for platform file-system operations.
30120
30245
  *
@@ -30157,7 +30282,7 @@ const TypeId$19 = "~effect/FileSystem";
30157
30282
  * @category services
30158
30283
  * @since 4.0.0
30159
30284
  */
30160
- const FileSystem = /*#__PURE__*/ Service("effect/FileSystem");
30285
+ const FileSystem = /*#__PURE__*/ Service$1("effect/FileSystem");
30161
30286
  /**
30162
30287
  * Creates a FileSystem implementation from a partial implementation.
30163
30288
  *
@@ -30182,7 +30307,7 @@ const FileSystem = /*#__PURE__*/ Service("effect/FileSystem");
30182
30307
  */
30183
30308
  const make$23 = (impl) => FileSystem.of({
30184
30309
  ...impl,
30185
- [TypeId$19]: TypeId$19,
30310
+ [TypeId$20]: TypeId$20,
30186
30311
  exists: (path) => pipe(impl.access(path), as(true), catchTag("PlatformError", (e) => e.reason._tag === "NotFound" ? succeed$4(false) : fail$3(e))),
30187
30312
  readFileString: (path, encoding) => flatMap$2(impl.readFile(path), (_) => try_({
30188
30313
  try: () => new TextDecoder(encoding).decode(_),
@@ -30284,7 +30409,7 @@ const FileTypeId = "~effect/FileSystem/File";
30284
30409
  * @category services
30285
30410
  * @since 4.0.0
30286
30411
  */
30287
- var WatchBackend = class extends (/*#__PURE__*/ Service()("effect/FileSystem/WatchBackend")) {};
30412
+ var WatchBackend = class extends (/*#__PURE__*/ Service$1()("effect/FileSystem/WatchBackend")) {};
30288
30413
  //#endregion
30289
30414
  //#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Path.js
30290
30415
  /**
@@ -30314,7 +30439,7 @@ var WatchBackend = class extends (/*#__PURE__*/ Service()("effect/FileSystem/Wat
30314
30439
  * @category type IDs
30315
30440
  * @since 4.0.0
30316
30441
  */
30317
- const TypeId$18 = "~effect/Path";
30442
+ const TypeId$19 = "~effect/Path";
30318
30443
  /**
30319
30444
  * Service tag for accessing the current `Path` implementation.
30320
30445
  *
@@ -30380,7 +30505,7 @@ const TypeId$18 = "~effect/Path";
30380
30505
  * @category services
30381
30506
  * @since 4.0.0
30382
30507
  */
30383
- const Path$1 = /*#__PURE__*/ Service("effect/Path");
30508
+ const Path$1 = /*#__PURE__*/ Service$1("effect/Path");
30384
30509
  /**
30385
30510
  * Creates a `Path` service from platform path operations.
30386
30511
  *
@@ -30404,7 +30529,7 @@ const Path$1 = /*#__PURE__*/ Service("effect/Path");
30404
30529
  */
30405
30530
  const make$22 = (impl) => Path$1.of({
30406
30531
  ...impl,
30407
- [TypeId$18]: TypeId$18,
30532
+ [TypeId$19]: TypeId$19,
30408
30533
  resolveWithin(root, input) {
30409
30534
  if (impl.parse(input).root !== "") return none();
30410
30535
  const base = impl.resolve(root);
@@ -30500,7 +30625,7 @@ const fromOptionExit = (option) => option._tag === "None" ? missingExit : succee
30500
30625
  * @stability stable
30501
30626
  * @since 4.0.0
30502
30627
  */
30503
- const TypeId$17 = "~effect/SchemaIssue/Issue";
30628
+ const TypeId$18 = "~effect/SchemaIssue/Issue";
30504
30629
  /**
30505
30630
  * Returns `true` if the given value is an {@link Issue}.
30506
30631
  *
@@ -30531,7 +30656,7 @@ const TypeId$17 = "~effect/SchemaIssue/Issue";
30531
30656
  * @since 4.0.0
30532
30657
  */
30533
30658
  function isIssue(u) {
30534
- return hasProperty(u, TypeId$17) && u[TypeId$17] === TypeId$17;
30659
+ return hasProperty(u, TypeId$18) && u[TypeId$18] === TypeId$18;
30535
30660
  }
30536
30661
  /**
30537
30662
  * Returns `true` when an issue contains an input reported by the schema parser.
@@ -30567,7 +30692,7 @@ function hasInput(issue) {
30567
30692
  return Object.hasOwn(issue, "input");
30568
30693
  }
30569
30694
  var IssueNodeImpl = class {
30570
- [TypeId$17] = TypeId$17;
30695
+ [TypeId$18] = TypeId$18;
30571
30696
  constructor(input, options) {
30572
30697
  if (options?.reportInput === true && input !== missing) this.input = input;
30573
30698
  }
@@ -31300,7 +31425,7 @@ const formatIso = formatIso$1;
31300
31425
  * @category encoding
31301
31426
  * @since 4.0.0
31302
31427
  */
31303
- const encode = (input) => encodeBytes(typeof input === "string" ? encoder$2.encode(input) : input);
31428
+ const encode$1 = (input) => encodeBytes(typeof input === "string" ? encoder$2.encode(input) : input);
31304
31429
  /**
31305
31430
  * Decodes a Base64 (RFC 4648) string into bytes safely.
31306
31431
  *
@@ -31327,7 +31452,7 @@ const encode = (input) => encodeBytes(typeof input === "string" ? encoder$2.enco
31327
31452
  * @category decoding
31328
31453
  * @since 4.0.0
31329
31454
  */
31330
- const decode = (str) => {
31455
+ const decode$1 = (str) => {
31331
31456
  const stripped = stripCrlf(str);
31332
31457
  const length = stripped.length;
31333
31458
  if (length % 4 !== 0) return fail$7(new EncodingError({
@@ -31396,6 +31521,120 @@ const getCode = (charCode) => {
31396
31521
  return codes[charCode];
31397
31522
  };
31398
31523
  //#endregion
31524
+ //#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/encoding/Base64Url.js
31525
+ /**
31526
+ * URL-safe Base64 encoding and decoding helpers.
31527
+ *
31528
+ * @stability stable
31529
+ * @since 4.0.0
31530
+ */
31531
+ /**
31532
+ * Encodes the given value into an unpadded URL-safe Base64 string.
31533
+ *
31534
+ * **When to use**
31535
+ *
31536
+ * Use to encode text or bytes in contexts that require the URL-safe alphabet.
31537
+ *
31538
+ * **Details**
31539
+ *
31540
+ * String inputs are encoded as UTF-8 bytes before Base64Url encoding.
31541
+ * `Uint8Array` inputs are encoded directly. The output removes `=` padding
31542
+ * and replaces `+` with `-` and `/` with `_`.
31543
+ *
31544
+ * **Example** (Encoding URL-safe Base64)
31545
+ *
31546
+ * ```ts import.meta.vitest
31547
+ * import { Base64Url } from "effect/encoding"
31548
+ *
31549
+ * Base64Url.encode("hello?") // => "aGVsbG8_"
31550
+ *
31551
+ * const bytes = new Uint8Array([72, 101, 108, 108, 111, 63])
31552
+ * Base64Url.encode(bytes) // => "SGVsbG8_"
31553
+ * ```
31554
+ *
31555
+ * @see {@link decode} for decoding URL-safe Base64 to bytes
31556
+ * @see {@link decodeString} for decoding URL-safe Base64 to UTF-8 text
31557
+ *
31558
+ * @stability stable
31559
+ * @category encoding
31560
+ * @since 4.0.0
31561
+ */
31562
+ const encode = (input) => encode$1(input).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
31563
+ /**
31564
+ * Decodes a padded or unpadded URL-safe Base64 string into bytes safely.
31565
+ *
31566
+ * **When to use**
31567
+ *
31568
+ * Use to decode Base64Url text into bytes without throwing on invalid input.
31569
+ *
31570
+ * **Details**
31571
+ *
31572
+ * Returns `Result.succeed` with a `Uint8Array` when decoding succeeds, or
31573
+ * `Result.fail` with an `EncodingError` when the input is not valid
31574
+ * Base64Url. Both padded and unpadded forms are accepted when otherwise valid.
31575
+ *
31576
+ * **Example** (Decoding URL-safe Base64 bytes)
31577
+ *
31578
+ * ```ts import.meta.vitest
31579
+ * import { Result } from "effect"
31580
+ * import { Base64Url } from "effect/encoding"
31581
+ *
31582
+ * Base64Url.decode("SGVsbG8_") // => Result.succeed(new Uint8Array([72, 101, 108, 108, 111, 63]))
31583
+ * ```
31584
+ *
31585
+ * @stability stable
31586
+ * @category decoding
31587
+ * @since 4.0.0
31588
+ */
31589
+ const decode = (str) => {
31590
+ const stripped = str.replace(/[\n\r]/g, "");
31591
+ const length = stripped.length;
31592
+ if (length % 4 === 1) return fail$7(new EncodingError({
31593
+ module: "Base64Url",
31594
+ kind: "Decode",
31595
+ input: stripped,
31596
+ message: `Length should be a multiple of 4, but is ${length}`
31597
+ }));
31598
+ if (!/^[-_A-Z0-9]*?={0,2}$/i.test(stripped)) return fail$7(new EncodingError({
31599
+ module: "Base64Url",
31600
+ kind: "Decode",
31601
+ input: stripped,
31602
+ message: "Invalid input"
31603
+ }));
31604
+ let sanitized = length % 4 === 2 ? `${stripped}==` : length % 4 === 3 ? `${stripped}=` : stripped;
31605
+ sanitized = sanitized.replace(/-/g, "+").replace(/_/g, "/");
31606
+ return decode$1(sanitized);
31607
+ };
31608
+ /**
31609
+ * Decodes a padded or unpadded URL-safe Base64 string into UTF-8 text safely.
31610
+ *
31611
+ * **When to use**
31612
+ *
31613
+ * Use to decode Base64Url text into UTF-8 text without throwing on invalid
31614
+ * input.
31615
+ *
31616
+ * **Details**
31617
+ *
31618
+ * Returns `Result.succeed` with the decoded text when decoding succeeds, or
31619
+ * `Result.fail` with an `EncodingError` when the input is not valid
31620
+ * Base64Url.
31621
+ *
31622
+ * **Example** (Decoding URL-safe Base64 strings)
31623
+ *
31624
+ * ```ts import.meta.vitest
31625
+ * import { Result } from "effect"
31626
+ * import { Base64Url } from "effect/encoding"
31627
+ *
31628
+ * Base64Url.decodeString("aGVsbG8_") // => Result.succeed("hello?")
31629
+ * ```
31630
+ *
31631
+ * @stability stable
31632
+ * @category decoding
31633
+ * @since 4.0.0
31634
+ */
31635
+ const decodeString$1 = (str) => map$8(decode(str), (_) => decoder.decode(_));
31636
+ const decoder = /*#__PURE__*/ new TextDecoder();
31637
+ //#endregion
31399
31638
  //#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/SchemaGetter.js
31400
31639
  const runGetter = (self, input, options) => {
31401
31640
  switch (self._tag) {
@@ -32004,6 +32243,39 @@ function joinKeyValue(options) {
32004
32243
  return transform$1((input) => Object.entries(input).map(([key, value]) => `${key}${keyValueSeparator}${value}`).join(separator));
32005
32244
  }
32006
32245
  /**
32246
+ * Splits a string into an array of strings by a separator.
32247
+ *
32248
+ * **When to use**
32249
+ *
32250
+ * Use when you need a schema getter to split a present encoded string
32251
+ * containing a delimited list, such as CSV values.
32252
+ *
32253
+ * **Details**
32254
+ *
32255
+ * The getter is pure and never fails. It splits by `separator` (default `,`).
32256
+ * An empty string produces an empty array, not `[""]`.
32257
+ *
32258
+ * **Example** (Splitting a comma-separated string)
32259
+ *
32260
+ * ```ts import.meta.vitest
32261
+ * import { Effect, Option, SchemaGetter } from "effect"
32262
+ *
32263
+ * const splitComma = SchemaGetter.split<string>()
32264
+ * const result = Effect.runSync(SchemaGetter.run(splitComma, Option.some("a,b,c"), {}))
32265
+ * result // => Option.some(["a", "b", "c"])
32266
+ * ```
32267
+ *
32268
+ * @see {@link splitKeyValue} when values are key-value pairs
32269
+ *
32270
+ * @stability stable
32271
+ * @category splitting
32272
+ * @since 4.0.0
32273
+ */
32274
+ function split(options) {
32275
+ const separator = options?.separator ?? ",";
32276
+ return transform$1((input) => input === "" ? [] : input.split(separator));
32277
+ }
32278
+ /**
32007
32279
  * Encodes a `Uint8Array` or string to a Base64 string.
32008
32280
  *
32009
32281
  * **Details**
@@ -32029,6 +32301,34 @@ function joinKeyValue(options) {
32029
32301
  * @since 4.0.0
32030
32302
  */
32031
32303
  function encodeBase64() {
32304
+ return transform$1(encode$1);
32305
+ }
32306
+ /**
32307
+ * Encodes a `Uint8Array` or string to a URL-safe Base64 string.
32308
+ *
32309
+ * **Details**
32310
+ *
32311
+ * The getter is pure and never fails.
32312
+ *
32313
+ * **Example** (Encoding to Base64Url)
32314
+ *
32315
+ * ```ts import.meta.vitest
32316
+ * import { Effect, Option, SchemaGetter } from "effect"
32317
+ *
32318
+ * const encode = SchemaGetter.encodeBase64Url<Uint8Array>()
32319
+ * const result = Effect.runSync(SchemaGetter.run(encode, Option.some(new Uint8Array([251, 255])), {}))
32320
+ * result // => Option.some("-_8")
32321
+ * ```
32322
+ *
32323
+ * @see {@link decodeBase64Url} for the inverse operation to `Uint8Array`
32324
+ * @see {@link decodeBase64UrlString} for the inverse operation to `string`
32325
+ * @see {@link encodeBase64} for the standard Base64 variant
32326
+ *
32327
+ * @stability stable
32328
+ * @category encoding
32329
+ * @since 4.0.0
32330
+ */
32331
+ function encodeBase64Url() {
32032
32332
  return transform$1(encode);
32033
32333
  }
32034
32334
  /**
@@ -32056,7 +32356,37 @@ function encodeBase64() {
32056
32356
  * @since 4.0.0
32057
32357
  */
32058
32358
  function decodeBase64() {
32059
- return transformEffect$1((input, options) => mapErrorEager(fromResult(decode(input)), () => new InvalidValue({ expected: "a valid Base64 string" }, input, options)));
32359
+ return transformEffect$1((input, options) => mapErrorEager(fromResult(decode$1(input)), () => new InvalidValue({ expected: "a valid Base64 string" }, input, options)));
32360
+ }
32361
+ /**
32362
+ * Decodes a URL-safe Base64 string to a UTF-8 `string`.
32363
+ *
32364
+ * **Details**
32365
+ *
32366
+ * - Fails with `SchemaIssue.InvalidValue` if the input is not valid Base64Url.
32367
+ *
32368
+ * **Example** (Decoding Base64Url to string)
32369
+ *
32370
+ * ```ts import.meta.vitest
32371
+ * import { Effect, Option, SchemaGetter } from "effect"
32372
+ *
32373
+ * const decode = SchemaGetter.decodeBase64UrlString<string>()
32374
+ * const result = await Effect.runPromise(SchemaGetter.run(decode, Option.some("aGVsbG8"), {}))
32375
+ * result // => Option.some("hello")
32376
+ * ```
32377
+ *
32378
+ * @see {@link decodeBase64Url} to decode to `Uint8Array` instead
32379
+ * @see {@link encodeBase64Url} for the inverse operation
32380
+ *
32381
+ * @stability stable
32382
+ * @category decoding
32383
+ * @since 4.0.0
32384
+ */
32385
+ function decodeBase64UrlString() {
32386
+ return transformEffect$1((input, options) => match$4(decodeString$1(input), {
32387
+ onFailure: () => fail$3(new InvalidValue({ expected: "a valid Base64Url string" }, input, options)),
32388
+ onSuccess: succeed$4
32389
+ }));
32060
32390
  }
32061
32391
  /**
32062
32392
  * Encodes a present string using `encodeURIComponent`.
@@ -32130,9 +32460,9 @@ function decodeUriComponent() {
32130
32460
  * @stability stable
32131
32461
  * @since 2.0.0
32132
32462
  */
32133
- const TypeId$16 = "~effect/BigDecimal";
32463
+ const TypeId$17 = "~effect/BigDecimal";
32134
32464
  const BigDecimalProto = {
32135
- [TypeId$16]: TypeId$16,
32465
+ [TypeId$17]: TypeId$17,
32136
32466
  [symbol$2]() {
32137
32467
  const normalized = normalize(this);
32138
32468
  return combine$2(string$1(String(normalized.value)), number$1(normalized.scale));
@@ -32180,7 +32510,7 @@ const BigDecimalProto = {
32180
32510
  * @category guards
32181
32511
  * @since 2.0.0
32182
32512
  */
32183
- const isBigDecimal = (u) => hasProperty(u, TypeId$16);
32513
+ const isBigDecimal = (u) => hasProperty(u, TypeId$17);
32184
32514
  /**
32185
32515
  * Creates a `BigDecimal` from a `bigint` value and a safe integer scale.
32186
32516
  *
@@ -32425,7 +32755,7 @@ const Middleware = class extends Class$3 {
32425
32755
  return new Middleware(this.encode, this.decode);
32426
32756
  }
32427
32757
  };
32428
- const TypeId$15 = "~effect/SchemaTransformation/Transformation";
32758
+ const TypeId$16 = "~effect/SchemaTransformation/Transformation";
32429
32759
  /**
32430
32760
  * Constructs a bidirectional schema transformation from its decode and encode getters.
32431
32761
  *
@@ -32434,7 +32764,7 @@ const TypeId$15 = "~effect/SchemaTransformation/Transformation";
32434
32764
  * @since 4.0.0
32435
32765
  */
32436
32766
  const Transformation = class extends Class$3 {
32437
- [TypeId$15] = TypeId$15;
32767
+ [TypeId$16] = TypeId$16;
32438
32768
  _tag = "Transformation";
32439
32769
  decode;
32440
32770
  encode;
@@ -32477,7 +32807,7 @@ const Transformation = class extends Class$3 {
32477
32807
  * @since 4.0.0
32478
32808
  */
32479
32809
  function isTransformation(u) {
32480
- return hasProperty(u, TypeId$15) && u[TypeId$15] === TypeId$15;
32810
+ return hasProperty(u, TypeId$16) && u[TypeId$16] === TypeId$16;
32481
32811
  }
32482
32812
  /**
32483
32813
  * Constructs a `Transformation` from an object with `decode` and `encode`
@@ -32881,6 +33211,38 @@ const urlFromString = /*#__PURE__*/ transformEffect({
32881
33211
  */
32882
33212
  const uint8ArrayFromBase64String = /*#__PURE__*/ new Transformation(/*#__PURE__*/ decodeBase64(), /*#__PURE__*/ encodeBase64());
32883
33213
  /**
33214
+ * Decodes a base64 (URL) encoded `string` into a UTF-8 `string` and encodes it back.
33215
+ *
33216
+ * **When to use**
33217
+ *
33218
+ * Use when you need a schema transformation for text data transmitted as Base64
33219
+ * URL-safe strings.
33220
+ *
33221
+ * **Details**
33222
+ *
33223
+ * Decoding parses the Base64 URL string into a UTF-8 string. Encoding writes
33224
+ * the string as a Base64 URL string.
33225
+ *
33226
+ * **Example** (Converting Base64Url to a string)
33227
+ *
33228
+ * ```ts import.meta.vitest
33229
+ * import { Schema, SchemaTransformation } from "effect"
33230
+ *
33231
+ * const schema = Schema.String.pipe(
33232
+ * Schema.decodeTo(Schema.String, SchemaTransformation.stringFromBase64UrlString)
33233
+ * )
33234
+ * Schema.decodeSync(schema)("aGVsbG8") // => "hello"
33235
+ * ```
33236
+ *
33237
+ * @see {@link stringFromBase64String}
33238
+ * @see `Schema.StringFromBase64Url` - a ready-made schema wrapping this transformation.
33239
+ *
33240
+ * @stability stable
33241
+ * @category encoding
33242
+ * @since 4.0.0
33243
+ */
33244
+ const stringFromBase64UrlString = /*#__PURE__*/ new Transformation(/*#__PURE__*/ decodeBase64UrlString(), /*#__PURE__*/ encodeBase64Url());
33245
+ /**
32884
33246
  * Decodes a URI component encoded string into a UTF-8 string and encodes a
32885
33247
  * UTF-8 string into a URI component encoded string.
32886
33248
  *
@@ -33092,9 +33454,9 @@ const Context = class {
33092
33454
  this.annotations = annotations;
33093
33455
  }
33094
33456
  };
33095
- const TypeId$14 = "~effect/Schema";
33457
+ const TypeId$15 = "~effect/Schema";
33096
33458
  var ASTNodeImpl = class {
33097
- [TypeId$14] = TypeId$14;
33459
+ [TypeId$15] = TypeId$15;
33098
33460
  annotations;
33099
33461
  checks;
33100
33462
  encoding;
@@ -33897,7 +34259,7 @@ const Objects = class extends ASTNodeImpl {
33897
34259
  }
33898
34260
  }
33899
34261
  else if (parseIndexes) {
33900
- const keyPairs = empty$6();
34262
+ const keyPairs = empty$7();
33901
34263
  for (let i = 0; i < indexCount; i++) {
33902
34264
  const index = indexes[i];
33903
34265
  const keys = indexKeys?.[i] ?? (index.is.parameter === string ? Object.keys(record) : getIndexSignatureKeys(record, index.is.parameter, options));
@@ -35215,7 +35577,7 @@ const make$19 = (spawn) => {
35215
35577
  * @category services
35216
35578
  * @since 4.0.0
35217
35579
  */
35218
- var ChildProcessSpawner = class extends (/*#__PURE__*/ Service()("effect/process/ChildProcessSpawner")) {};
35580
+ var ChildProcessSpawner = class extends (/*#__PURE__*/ Service$1()("effect/process/ChildProcessSpawner")) {};
35219
35581
  //#endregion
35220
35582
  //#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/process/ChildProcess.js
35221
35583
  /**
@@ -35230,7 +35592,7 @@ var ChildProcessSpawner = class extends (/*#__PURE__*/ Service()("effect/process
35230
35592
  * @stability unstable
35231
35593
  * @since 4.0.0
35232
35594
  */
35233
- const TypeId$13 = "~effect/process/ChildProcess";
35595
+ const TypeId$14 = "~effect/process/ChildProcess";
35234
35596
  const Proto$7 = {
35235
35597
  .../*#__PURE__*/ Prototype({
35236
35598
  label: "Command",
@@ -35238,7 +35600,7 @@ const Proto$7 = {
35238
35600
  return getUnsafe$1(fiber.context, ChildProcessSpawner).spawn(this);
35239
35601
  }
35240
35602
  }),
35241
- [TypeId$13]: TypeId$13
35603
+ [TypeId$14]: TypeId$14
35242
35604
  };
35243
35605
  const makeStandardCommand = (command, args, options) => Object.assign(Object.create(Proto$7), {
35244
35606
  _tag: "StandardCommand",
@@ -35853,7 +36215,7 @@ const layer$12 = /*#__PURE__*/ effect(ChildProcessSpawner, /* @__PURE__ */ gen(f
35853
36215
  const setupAdditionalFds = fnUntraced(function* (command, childProcess, additionalFds) {
35854
36216
  if (additionalFds.length === 0) return {
35855
36217
  getInputFd: () => drain,
35856
- getOutputFd: () => empty$4
36218
+ getOutputFd: () => empty$5
35857
36219
  };
35858
36220
  const inputSinks = /* @__PURE__ */ new Map();
35859
36221
  const outputStreams = /* @__PURE__ */ new Map();
@@ -35874,7 +36236,7 @@ const layer$12 = /*#__PURE__*/ effect(ChildProcessSpawner, /* @__PURE__ */ gen(f
35874
36236
  break;
35875
36237
  }
35876
36238
  case "output": {
35877
- let stream = empty$4;
36239
+ let stream = empty$5;
35878
36240
  if (nodeStream && "read" in nodeStream) {
35879
36241
  const passThrough = new PassThrough();
35880
36242
  nodeStream.on("error", (error) => passThrough.destroy(error));
@@ -35892,7 +36254,7 @@ const layer$12 = /*#__PURE__*/ effect(ChildProcessSpawner, /* @__PURE__ */ gen(f
35892
36254
  }
35893
36255
  return {
35894
36256
  getInputFd: (fd) => inputSinks.get(fd) ?? drain,
35895
- getOutputFd: (fd) => outputStreams.get(fd) ?? empty$4
36257
+ getOutputFd: (fd) => outputStreams.get(fd) ?? empty$5
35896
36258
  };
35897
36259
  });
35898
36260
  const setupChildStdin = (command, childProcess, config) => suspend$2(() => {
@@ -35918,7 +36280,7 @@ const layer$12 = /*#__PURE__*/ effect(ChildProcessSpawner, /* @__PURE__ */ gen(f
35918
36280
  evaluate: () => passThrough,
35919
36281
  onError: (error) => toPlatformError("fromReadable(stdout)", toError(error), command)
35920
36282
  });
35921
- })() : empty$4;
36283
+ })() : empty$5;
35922
36284
  let stderr = childProcess.stderr ? (() => {
35923
36285
  const passThrough = new PassThrough();
35924
36286
  childProcess.stderr.on("error", (error) => passThrough.destroy(error));
@@ -35927,7 +36289,7 @@ const layer$12 = /*#__PURE__*/ effect(ChildProcessSpawner, /* @__PURE__ */ gen(f
35927
36289
  evaluate: () => passThrough,
35928
36290
  onError: (error) => toPlatformError("fromReadable(stderr)", toError(error), command)
35929
36291
  });
35930
- })() : empty$4;
36292
+ })() : empty$5;
35931
36293
  if (isSink(stdoutConfig.stream)) stdout = transduce(stdout, stdoutConfig.stream);
35932
36294
  if (isSink(stderrConfig.stream)) stderr = transduce(stderr, stderrConfig.stream);
35933
36295
  const all = merge$1(stdout, stderr);
@@ -36210,7 +36572,15 @@ const flattenCommand = (command) => {
36210
36572
  * @stability unstable
36211
36573
  * @since 4.0.0
36212
36574
  */
36213
- const TypeId$12 = "~effect/http/Cookies";
36575
+ const TypeId$13 = "~effect/http/Cookies";
36576
+ /**
36577
+ * Returns `true` when a value is a `Cookies` collection.
36578
+ *
36579
+ * @stability unstable
36580
+ * @category guards
36581
+ * @since 4.0.0
36582
+ */
36583
+ const isCookies = (u) => hasProperty(u, TypeId$13);
36214
36584
  const CookieTypeId = "~effect/http/Cookies/Cookie";
36215
36585
  const CookieErrorTypeId = "~effect/http/Cookies/CookieError";
36216
36586
  /**
@@ -36264,7 +36634,7 @@ var CookiesError = class CookiesError extends (/*#__PURE__*/ TaggedError$1("Cook
36264
36634
  }
36265
36635
  };
36266
36636
  const Proto$6 = {
36267
- [TypeId$12]: TypeId$12,
36637
+ [TypeId$13]: TypeId$13,
36268
36638
  ...BaseProto,
36269
36639
  toJSON() {
36270
36640
  return {
@@ -36407,7 +36777,7 @@ function parseSetCookie(header) {
36407
36777
  * @category constructors
36408
36778
  * @since 4.0.0
36409
36779
  */
36410
- const empty$3 = /*#__PURE__*/ fromIterable$4([]);
36780
+ const empty$4 = /*#__PURE__*/ fromIterable$4([]);
36411
36781
  /**
36412
36782
  * Returns `true` when the `Cookies` collection contains no cookies.
36413
36783
  *
@@ -36432,6 +36802,28 @@ const CookieProto = {
36432
36802
  };
36433
36803
  }
36434
36804
  };
36805
+ /**
36806
+ * Creates a cookie, validating the name, encoded value, domain, path, and finite `maxAge`.
36807
+ *
36808
+ * **Details**
36809
+ *
36810
+ * Returns a `CookiesError` in the `Result` failure channel when validation fails.
36811
+ *
36812
+ * @stability unstable
36813
+ * @category constructors
36814
+ * @since 4.0.0
36815
+ */
36816
+ function makeCookie(name, value, options) {
36817
+ const encodedValue = encodeURIComponent(value);
36818
+ const error = validateCookie(name, encodedValue, options);
36819
+ if (error !== void 0) return fail$7(error);
36820
+ return succeed$8(Object.assign(Object.create(CookieProto), {
36821
+ name,
36822
+ value,
36823
+ valueEncoded: encodedValue,
36824
+ options
36825
+ }));
36826
+ }
36435
36827
  function validateCookie(name, encodedValue, options) {
36436
36828
  if (!cookieNameRegExp.test(name)) return CookiesError.fromReason("InvalidCookieName");
36437
36829
  if (encodedValue && !fieldContentRegExp.test(encodedValue)) return CookiesError.fromReason("InvalidCookieValue");
@@ -36440,6 +36832,34 @@ function validateCookie(name, encodedValue, options) {
36440
36832
  if (options?.maxAge !== void 0 && !isFinite$1(fromInputUnsafe$1(options.maxAge))) return CookiesError.fromReason("CookieInfinityMaxAge");
36441
36833
  }
36442
36834
  /**
36835
+ * Create a new cookie, throwing an error if invalid
36836
+ *
36837
+ * @stability unstable
36838
+ * @category constructors
36839
+ * @since 4.0.0
36840
+ */
36841
+ const makeCookieUnsafe = (name, value, options) => getOrThrow(makeCookie(name, value, options));
36842
+ /**
36843
+ * Creates and adds a cookie by name and value, throwing if the cookie fields are invalid.
36844
+ *
36845
+ * @stability unstable
36846
+ * @category combinators
36847
+ * @since 4.0.0
36848
+ */
36849
+ const setUnsafe = /*#__PURE__*/ dual((args) => isCookies(args[0]), (self, name, value, options) => fromReadonlyRecord(set$4(self.cookies, name, makeCookieUnsafe(name, value, options))));
36850
+ /**
36851
+ * Adds an expired cookie to a Cookies object, throwing an error if invalid
36852
+ *
36853
+ * @stability unstable
36854
+ * @category combinators
36855
+ * @since 4.0.0
36856
+ */
36857
+ const expireCookieUnsafe = /*#__PURE__*/ dual((args) => isCookies(args[0]), (self, name, options) => setUnsafe(self, name, "", {
36858
+ ...options,
36859
+ maxAge: 0,
36860
+ expires: /* @__PURE__ */ new Date(0)
36861
+ }));
36862
+ /**
36443
36863
  * Serializes a cookie into a string.
36444
36864
  *
36445
36865
  * **Details**
@@ -36545,6 +36965,8 @@ const value$1 = (self) => {
36545
36965
  if (redactedRegistry.has(self)) return redactedRegistry.get(self);
36546
36966
  else throw new Error("Unable to get redacted value" + (self.label ? ` with label: "${self.label}"` : ""));
36547
36967
  };
36968
+ /** @internal */
36969
+ const stringOrRedacted = (val) => typeof val === "string" ? val : value$1(val);
36548
36970
  //#endregion
36549
36971
  //#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Redacted.js
36550
36972
  /**
@@ -36560,7 +36982,7 @@ const value$1 = (self) => {
36560
36982
  * @stability stable
36561
36983
  * @since 3.3.0
36562
36984
  */
36563
- const TypeId$11 = "~effect/Redacted";
36985
+ const TypeId$12 = "~effect/Redacted";
36564
36986
  /**
36565
36987
  * Returns `true` if a value is a `Redacted` wrapper.
36566
36988
  *
@@ -36589,7 +37011,7 @@ const TypeId$11 = "~effect/Redacted";
36589
37011
  * @category guards
36590
37012
  * @since 3.3.0
36591
37013
  */
36592
- const isRedacted = (u) => hasProperty(u, TypeId$11);
37014
+ const isRedacted = (u) => hasProperty(u, TypeId$12);
36593
37015
  /**
36594
37016
  * Creates a `Redacted` wrapper for a sensitive value.
36595
37017
  *
@@ -36624,7 +37046,7 @@ const make$16 = (value, options) => {
36624
37046
  return self;
36625
37047
  };
36626
37048
  const Proto$5 = {
36627
- [TypeId$11]: { _A: (_) => _ },
37049
+ [TypeId$12]: { _A: (_) => _ },
36628
37050
  label: void 0,
36629
37051
  ...PipeInspectableProto,
36630
37052
  toJSON() {
@@ -36713,11 +37135,11 @@ const makeEquivalence = (isEquivalent) => make$41((x, y) => isEquivalent(value(x
36713
37135
  * @category type IDs
36714
37136
  * @since 4.0.0
36715
37137
  */
36716
- const TypeId$10 = /*#__PURE__*/ Symbol.for("~effect/http/Headers");
37138
+ const TypeId$11 = /*#__PURE__*/ Symbol.for("~effect/http/Headers");
36717
37139
  const Proto$4 = /*#__PURE__*/ Object.defineProperties(/*#__PURE__*/ Object.create(null), {
36718
- [TypeId$10]: { value: TypeId$10 },
37140
+ [TypeId$11]: { value: TypeId$11 },
36719
37141
  [symbolRedactable]: { value(context) {
36720
- return redact$1(this, get$5(context, CurrentRedactedNames$1));
37142
+ return redact$1(this, get$6(context, CurrentRedactedNames$1));
36721
37143
  } },
36722
37144
  toJSON: { value() {
36723
37145
  return redact$2(this);
@@ -36748,7 +37170,7 @@ const Equivalence$1 = /*#__PURE__*/ makeEquivalence$3(/*#__PURE__*/ strictEqual(
36748
37170
  * @category constructors
36749
37171
  * @since 4.0.0
36750
37172
  */
36751
- const empty$2 = /*#__PURE__*/ Object.create(Proto$4);
37173
+ const empty$3 = /*#__PURE__*/ Object.create(Proto$4);
36752
37174
  /**
36753
37175
  * Creates `Headers` from a record or iterable of header entries.
36754
37176
  *
@@ -36761,7 +37183,7 @@ const empty$2 = /*#__PURE__*/ Object.create(Proto$4);
36761
37183
  * @since 4.0.0
36762
37184
  */
36763
37185
  const fromInput$1 = (input) => {
36764
- if (input === void 0) return empty$2;
37186
+ if (input === void 0) return empty$3;
36765
37187
  else if (Symbol.iterator in input) {
36766
37188
  const out = Object.create(Proto$4);
36767
37189
  for (const [k, v] of input) out[k.toLowerCase()] = v;
@@ -36785,6 +37207,18 @@ const fromInput$1 = (input) => {
36785
37207
  */
36786
37208
  const fromRecordUnsafe = (input) => Object.setPrototypeOf(input, Proto$4);
36787
37209
  /**
37210
+ * Gets a header value by name safely.
37211
+ *
37212
+ * **Details**
37213
+ *
37214
+ * The lookup lowercases the provided header name and returns `Option.none()` when absent.
37215
+ *
37216
+ * @stability unstable
37217
+ * @category combinators
37218
+ * @since 4.0.0
37219
+ */
37220
+ const get$2 = /*#__PURE__*/ dual(2, (self, key) => fromUndefinedOr(self[key.toLowerCase()]));
37221
+ /**
36788
37222
  * Returns a new `Headers` collection with the given header set.
36789
37223
  *
36790
37224
  * **Details**
@@ -36795,7 +37229,7 @@ const fromRecordUnsafe = (input) => Object.setPrototypeOf(input, Proto$4);
36795
37229
  * @category combinators
36796
37230
  * @since 4.0.0
36797
37231
  */
36798
- const set$1 = /*#__PURE__*/ dual(3, (self, key, value) => {
37232
+ const set$2 = /*#__PURE__*/ dual(3, (self, key, value) => {
36799
37233
  const out = make$15(self);
36800
37234
  out[key.toLowerCase()] = value;
36801
37235
  return out;
@@ -37432,7 +37866,7 @@ const emptyNode = /*#__PURE__*/ new EmptyNode();
37432
37866
  /** @internal */
37433
37867
  const isHashMap$1 = (u) => hasProperty(u, HashMapTypeId);
37434
37868
  /** @internal */
37435
- const empty$1 = () => new HashMapImpl(false, 0, emptyNode, 0);
37869
+ const empty$2 = () => new HashMapImpl(false, 0, emptyNode, 0);
37436
37870
  /** @internal */
37437
37871
  const fromIterable$3 = (entries) => {
37438
37872
  let root = emptyNode;
@@ -37468,7 +37902,7 @@ const setHash = (self, key, hash, value) => {
37468
37902
  return new HashMapImpl(false, impl._edit, newRoot, impl._size + (added.value ? 1 : 0));
37469
37903
  };
37470
37904
  /** @internal */
37471
- const set = /*#__PURE__*/ dual(3, (self, key, value) => {
37905
+ const set$1 = /*#__PURE__*/ dual(3, (self, key, value) => {
37472
37906
  return setHash(self, key, hash(key), value);
37473
37907
  });
37474
37908
  /** @internal */
@@ -37511,6 +37945,22 @@ const size$1 = (self) => self.size;
37511
37945
  */
37512
37946
  const isHashMap = isHashMap$1;
37513
37947
  /**
37948
+ * Creates a new empty `HashMap`.
37949
+ *
37950
+ * **Example** (Creating an empty HashMap)
37951
+ *
37952
+ * ```ts import.meta.vitest
37953
+ * import { HashMap } from "effect"
37954
+ *
37955
+ * HashMap.empty<string, number>() // => HashMap.empty()
37956
+ * ```
37957
+ *
37958
+ * @stability stable
37959
+ * @category constructors
37960
+ * @since 2.0.0
37961
+ */
37962
+ const empty$1 = empty$2;
37963
+ /**
37514
37964
  * Creates a new `HashMap` from an iterable collection of key/value pairs.
37515
37965
  *
37516
37966
  * **Example** (Creating a HashMap from an iterable)
@@ -37550,6 +38000,27 @@ const fromIterable$2 = fromIterable$3;
37550
38000
  * @since 2.0.0
37551
38001
  */
37552
38002
  const get = get$1;
38003
+ /**
38004
+ * Sets the specified key to the specified value using the internal hashing
38005
+ * function.
38006
+ *
38007
+ * **Example** (Setting a value)
38008
+ *
38009
+ * ```ts import.meta.vitest
38010
+ * import { HashMap } from "effect"
38011
+ *
38012
+ * const map1 = HashMap.make(["a", 1])
38013
+ * HashMap.set(map1, "b", 2) // => HashMap.make(["a", 1], ["b", 2])
38014
+ *
38015
+ * // Original map is unchanged
38016
+ * map1 // => HashMap.make(["a", 1])
38017
+ * ```
38018
+ *
38019
+ * @stability stable
38020
+ * @category transforming
38021
+ * @since 2.0.0
38022
+ */
38023
+ const set = set$1;
37553
38024
  //#endregion
37554
38025
  //#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/hashSet.js
37555
38026
  /**
@@ -37596,8 +38067,8 @@ const isHashSet$1 = (u) => hasProperty(u, HashSetTypeId);
37596
38067
  const keyMap = (self) => self.keyMap;
37597
38068
  /** @internal */
37598
38069
  const fromIterable$1 = (values) => {
37599
- let map = empty$1();
37600
- for (const value of values) map = set(map, value, true);
38070
+ let map = empty$2();
38071
+ for (const value of values) map = set$1(map, value, true);
37601
38072
  return makeImpl(map);
37602
38073
  };
37603
38074
  /** @internal */
@@ -37717,7 +38188,7 @@ const unwrap$1 = (value$7) => typeof value$7 === "string" ? value$7 : value(valu
37717
38188
  * @stability unstable
37718
38189
  * @since 4.0.0
37719
38190
  */
37720
- const TypeId$9 = "~effect/http/UrlParams";
38191
+ const TypeId$10 = "~effect/http/UrlParams";
37721
38192
  /**
37722
38193
  * Returns `true` when a value is a `UrlParams` instance.
37723
38194
  *
@@ -37725,17 +38196,17 @@ const TypeId$9 = "~effect/http/UrlParams";
37725
38196
  * @category guards
37726
38197
  * @since 4.0.0
37727
38198
  */
37728
- const isUrlParams = (u) => hasProperty(u, TypeId$9);
38199
+ const isUrlParams = (u) => hasProperty(u, TypeId$10);
37729
38200
  const Proto$3 = {
37730
38201
  ...PipeInspectableProto,
37731
- [TypeId$9]: TypeId$9,
38202
+ [TypeId$10]: TypeId$10,
37732
38203
  [Symbol.iterator]() {
37733
38204
  return this.params[Symbol.iterator]();
37734
38205
  },
37735
38206
  [symbolRedactable](context) {
37736
38207
  return {
37737
38208
  _id: "UrlParams",
37738
- params: Object.fromEntries(redact(this, get$5(context, CurrentRedactedNames)))
38209
+ params: Object.fromEntries(redact(this, get$6(context, CurrentRedactedNames)))
37739
38210
  };
37740
38211
  },
37741
38212
  toJSON() {
@@ -37844,6 +38315,18 @@ const setAll = /*#__PURE__*/ dual(2, (self, input) => {
37844
38315
  return make$14(params);
37845
38316
  });
37846
38317
  /**
38318
+ * Serializes `UrlParams` to a URL query string without a leading question mark.
38319
+ *
38320
+ * **Gotchas**
38321
+ *
38322
+ * The output contains the unwrapped values of `Redacted` parameters.
38323
+ *
38324
+ * @stability unstable
38325
+ * @category converting
38326
+ * @since 4.0.0
38327
+ */
38328
+ const toString = (input) => new URLSearchParams(fromInput(input).params.map(([key, value]) => [key, unwrap$1(value)])).toString();
38329
+ /**
37847
38330
  * Returns the parameter pairs with selected values wrapped in `Redacted`.
37848
38331
  *
37849
38332
  * **Details**
@@ -37936,7 +38419,7 @@ const decodeQueryKey = (key) => {
37936
38419
  return key;
37937
38420
  }
37938
38421
  };
37939
- const currentRedactedNames = () => get$5(globalThis["~effect/Fiber/currentFiber"]?.context ?? empty$8(), CurrentRedactedNames);
38422
+ const currentRedactedNames = () => get$6(globalThis["~effect/Fiber/currentFiber"]?.context ?? empty$9(), CurrentRedactedNames);
37940
38423
  /**
37941
38424
  * Query parameter names or patterns to redact in inspection, spans and errors.
37942
38425
  *
@@ -38401,10 +38884,10 @@ const constructorCompiler = (ast) => resolve(ast).makeEffect;
38401
38884
  //#endregion
38402
38885
  //#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/internal/schema/make.js
38403
38886
  /** @internal */
38404
- const TypeId$8 = "~effect/Schema/Schema";
38887
+ const TypeId$9 = "~effect/Schema/Schema";
38405
38888
  const RebuildOptions = /*#__PURE__*/ Symbol();
38406
38889
  const SchemaProto = {
38407
- [TypeId$8]: TypeId$8,
38890
+ [TypeId$9]: TypeId$9,
38408
38891
  get make() {
38409
38892
  const value = make$13(this);
38410
38893
  Object.defineProperty(this, "make", {
@@ -39781,7 +40264,7 @@ function isSchemaError$1(u) {
39781
40264
  }
39782
40265
  //#endregion
39783
40266
  //#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Schema.js
39784
- const TypeId$7 = TypeId$8;
40267
+ const TypeId$8 = TypeId$9;
39785
40268
  /**
39786
40269
  * Creates a schema for a **parametric** type (a generic container such as
39787
40270
  * `Array<A>`, `Option<A>`, etc.) by accepting a list of type-parameter schemas
@@ -40319,7 +40802,7 @@ const make$11 = make$12;
40319
40802
  * @since 3.10.0
40320
40803
  */
40321
40804
  function isSchema(u) {
40322
- return hasProperty(u, TypeId$7) && u[TypeId$7] === TypeId$7;
40805
+ return hasProperty(u, TypeId$8) && u[TypeId$8] === TypeId$8;
40323
40806
  }
40324
40807
  /**
40325
40808
  * Creates an exact optional key schema for struct fields. Unlike `optional`,
@@ -41503,6 +41986,29 @@ function makeIsMinLength(minLength, minCodePoints, annotations) {
41503
41986
  });
41504
41987
  }
41505
41988
  /**
41989
+ * Validates that a value has at least one element. Works with strings and arrays.
41990
+ * This is equivalent to `isMinLength(1)`.
41991
+ *
41992
+ * **Details**
41993
+ *
41994
+ * JSON Schema:
41995
+ *
41996
+ * This check corresponds to the `minLength: 1` constraint for strings or the
41997
+ * `minItems: 1` constraint for arrays in JSON Schema.
41998
+ *
41999
+ * Arbitrary:
42000
+ *
42001
+ * During arbitrary generation, this applies a `minLength: 1`
42002
+ * constraint to ensure generated strings or arrays are non-empty.
42003
+ *
42004
+ * @stability stable
42005
+ * @category validation
42006
+ * @since 4.0.0
42007
+ */
42008
+ function isNonEmpty(annotations) {
42009
+ return makeIsMinLength(1, 1, annotations);
42010
+ }
42011
+ /**
41506
42012
  * Validates that a value has at most the specified length. Works with strings
41507
42013
  * and arrays.
41508
42014
  *
@@ -41547,6 +42053,15 @@ function normalizeCardinality(value) {
41547
42053
  if (!globalThis.Number.isFinite(value)) throw new globalThis.RangeError(`Expected a finite number, got ${value}`);
41548
42054
  return Math.max(0, Math.floor(value));
41549
42055
  }
42056
+ /**
42057
+ * Schema for non-empty strings. Validates that a string has at least one
42058
+ * character.
42059
+ *
42060
+ * @stability stable
42061
+ * @category schemas
42062
+ * @since 3.10.0
42063
+ */
42064
+ const NonEmptyString = /*#__PURE__*/ String$2.check(/*#__PURE__*/ isNonEmpty());
41550
42065
  const getErrorOptionsKey = (options) => (options?.includeStack === true ? 1 : 0) | (options?.excludeCause === true ? 2 : 0);
41551
42066
  const getErrorOptions = (key) => {
41552
42067
  switch (key) {
@@ -41694,6 +42209,22 @@ globalThis.File;
41694
42209
  globalThis.FormData;
41695
42210
  globalThis.URLSearchParams;
41696
42211
  /**
42212
+ * Decodes a base64 (URL) encoded string into a UTF-8 string.
42213
+ *
42214
+ * **Details**
42215
+ *
42216
+ * Decoding:
42217
+ * - A **valid** base64 (URL) encoded string is decoded as a UTF-8 `string`.
42218
+ *
42219
+ * Encoding:
42220
+ * - A `string` is encoded as a base64 (URL) encoded string.
42221
+ *
42222
+ * @stability stable
42223
+ * @category schemas
42224
+ * @since 3.10.0
42225
+ */
42226
+ const StringFromBase64Url = /*#__PURE__*/ String$2.annotate({ expected: "a base64 (URL) encoded string that will be decoded as a UTF-8 string" }).pipe(/*#__PURE__*/ decodeTo(String$2, stringFromBase64UrlString));
42227
+ /**
41697
42228
  * Decodes a URI component encoded string into a UTF-8 string.
41698
42229
  * Can be used to store data in a URL.
41699
42230
  *
@@ -42255,7 +42786,7 @@ function makeClass(Inherited, identifier, struct$1, annotations, proto) {
42255
42786
  }
42256
42787
  });
42257
42788
  }
42258
- static [TypeId$7] = TypeId$7;
42789
+ static [TypeId$8] = TypeId$8;
42259
42790
  get [ClassTypeId]() {
42260
42791
  return ClassTypeId;
42261
42792
  }
@@ -42655,7 +43186,7 @@ const MutableJson = /*#__PURE__*/ make$11(/*#__PURE__*/ annotate(MutableJson$1,
42655
43186
  * @stability unstable
42656
43187
  * @since 4.0.0
42657
43188
  */
42658
- const TypeId$6 = "~effect/http/HttpClientError";
43189
+ const TypeId$7 = "~effect/http/HttpClientError";
42659
43190
  /**
42660
43191
  * Returns `true` when a value is an `HttpClientError`.
42661
43192
  *
@@ -42663,7 +43194,7 @@ const TypeId$6 = "~effect/http/HttpClientError";
42663
43194
  * @category guards
42664
43195
  * @since 4.0.0
42665
43196
  */
42666
- const isHttpClientError = (u) => hasProperty(u, TypeId$6);
43197
+ const isHttpClientError = (u) => hasProperty(u, TypeId$7);
42667
43198
  /**
42668
43199
  * Error wrapper for HTTP client failures, exposing the failed request and the optional response through its `reason`.
42669
43200
  *
@@ -42685,7 +43216,7 @@ var HttpClientError = class extends (/*#__PURE__*/ TaggedError$1("HttpClientErro
42685
43216
  * @stability unstable
42686
43217
  * @since 4.0.0
42687
43218
  */
42688
- [TypeId$6] = TypeId$6;
43219
+ [TypeId$7] = TypeId$7;
42689
43220
  /**
42690
43221
  * HTTP request associated with the client failure.
42691
43222
  *
@@ -42884,7 +43415,7 @@ var EmptyBodyError = class extends (/*#__PURE__*/ TaggedError$1("EmptyBodyError"
42884
43415
  * @category schemas
42885
43416
  * @since 4.0.0
42886
43417
  */
42887
- var HttpClientErrorSchema = class HttpClientErrorSchema extends (/*#__PURE__*/ Error$1(TypeId$6)({
43418
+ var HttpClientErrorSchema = class HttpClientErrorSchema extends (/*#__PURE__*/ Error$1(TypeId$7)({
42888
43419
  _tag: /*#__PURE__*/ tag("HttpError"),
42889
43420
  kind: /*#__PURE__*/ Literals([
42890
43421
  "EncodeError",
@@ -42919,7 +43450,7 @@ var HttpClientErrorSchema = class HttpClientErrorSchema extends (/*#__PURE__*/ E
42919
43450
  * @category type IDs
42920
43451
  * @since 4.0.0
42921
43452
  */
42922
- const TypeId$5 = "~effect/socket/Socket";
43453
+ const TypeId$6 = "~effect/socket/Socket";
42923
43454
  /**
42924
43455
  * Service tag for bidirectional socket transports.
42925
43456
  *
@@ -42932,7 +43463,7 @@ const TypeId$5 = "~effect/socket/Socket";
42932
43463
  * @category services
42933
43464
  * @since 4.0.0
42934
43465
  */
42935
- const Socket = /*#__PURE__*/ Service("effect/socket/Socket");
43466
+ const Socket = /*#__PURE__*/ Service$1("effect/socket/Socket");
42936
43467
  /**
42937
43468
  * Constructs a `Socket` from a reader acquisition and a scoped writer.
42938
43469
  *
@@ -42947,7 +43478,7 @@ const Socket = /*#__PURE__*/ Service("effect/socket/Socket");
42947
43478
  * @since 4.0.0
42948
43479
  */
42949
43480
  const make$10 = (options) => Socket.of({
42950
- [TypeId$5]: TypeId$5,
43481
+ [TypeId$6]: TypeId$6,
42951
43482
  reader: options.reader,
42952
43483
  writer: options.writer
42953
43484
  });
@@ -43181,7 +43712,7 @@ const closeError = (code, closeReason) => new SocketError({ reason: new SocketCl
43181
43712
  * @category services
43182
43713
  * @since 4.0.0
43183
43714
  */
43184
- var WebSocketConstructor = class extends (/*#__PURE__*/ Service()("@effect/platform/Socket/WebSocketConstructor")) {};
43715
+ var WebSocketConstructor = class extends (/*#__PURE__*/ Service$1()("@effect/platform/Socket/WebSocketConstructor")) {};
43185
43716
  /**
43186
43717
  * Layer that provides `WebSocketConstructor` using `globalThis.WebSocket`.
43187
43718
  * Rejects client options objects, including those with handshake headers.
@@ -43429,7 +43960,7 @@ const layerWebSocket = /*#__PURE__*/ flow(makeWebSocket, /*#__PURE__*/ effect(So
43429
43960
  * @category services
43430
43961
  * @since 4.0.0
43431
43962
  */
43432
- var Collector = class extends (/*#__PURE__*/ Service()("effect/workers/Transferable/Collector")) {};
43963
+ var Collector = class extends (/*#__PURE__*/ Service$1()("effect/workers/Transferable/Collector")) {};
43433
43964
  /**
43434
43965
  * Creates a mutable `Collector` service directly, exposing unsafe synchronous
43435
43966
  * methods for reading, adding, and clearing collected transferables.
@@ -43554,7 +44085,7 @@ function Stream(success, error) {
43554
44085
  * @category services
43555
44086
  * @since 4.0.0
43556
44087
  */
43557
- var ClientAbort = class extends (/*#__PURE__*/ Service()("effect/rpc/RpcSchema/ClientAbort")) {
44088
+ var ClientAbort = class extends (/*#__PURE__*/ Service$1()("effect/rpc/RpcSchema/ClientAbort")) {
43558
44089
  static annotation = /*#__PURE__*/ this.context(true).pipe(/*#__PURE__*/ add(StackTrace, {
43559
44090
  name: "ClientAbort",
43560
44091
  stack: constUndefined,
@@ -43563,7 +44094,7 @@ var ClientAbort = class extends (/*#__PURE__*/ Service()("effect/rpc/RpcSchema/C
43563
44094
  };
43564
44095
  //#endregion
43565
44096
  //#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/rpc/Rpc.js
43566
- const TypeId$4 = "~effect/rpc/Rpc";
44097
+ const TypeId$5 = "~effect/rpc/Rpc";
43567
44098
  /**
43568
44099
  * Represents server-side metadata for the client associated with an RPC request.
43569
44100
  *
@@ -43586,7 +44117,7 @@ var ServerClient = class {
43586
44117
  annotations;
43587
44118
  constructor(id) {
43588
44119
  this.id = id;
43589
- this.annotations = empty$8();
44120
+ this.annotations = empty$9();
43590
44121
  }
43591
44122
  annotate(tag, value) {
43592
44123
  this.annotations = add(this.annotations, tag, value);
@@ -43594,7 +44125,7 @@ var ServerClient = class {
43594
44125
  }
43595
44126
  };
43596
44127
  const Proto$2 = {
43597
- [TypeId$4]: TypeId$4,
44128
+ [TypeId$5]: TypeId$5,
43598
44129
  pipe() {
43599
44130
  return pipeArguments(this, arguments);
43600
44131
  },
@@ -43714,7 +44245,7 @@ const make$9 = (tag, options) => {
43714
44245
  successSchema: options?.stream ? Stream(successSchema, errorSchema) : successSchema,
43715
44246
  errorSchema: options?.stream ? Never : errorSchema,
43716
44247
  defectSchema,
43717
- annotations: empty$8(),
44248
+ annotations: empty$9(),
43718
44249
  middlewares: /* @__PURE__ */ new Set()
43719
44250
  });
43720
44251
  };
@@ -47626,7 +48157,7 @@ const decodeText = (bytes) => (sharedTextDecoder ??= new TextDecoder()).decode(b
47626
48157
  * @category services
47627
48158
  * @since 4.0.0
47628
48159
  */
47629
- var RpcSerialization = class extends (/*#__PURE__*/ Service()("effect/rpc/RpcSerialization")) {};
48160
+ var RpcSerialization = class extends (/*#__PURE__*/ Service$1()("effect/rpc/RpcSerialization")) {};
47630
48161
  /**
47631
48162
  * JSON RPC serialization for whole message payloads. It does not include
47632
48163
  * message framing, so it is intended for transports that frame responses
@@ -47807,7 +48338,7 @@ const withRunClient = (f) => suspend$2(() => {
47807
48338
  * @category type IDs
47808
48339
  * @since 4.0.0
47809
48340
  */
47810
- const TypeId$3 = "~effect/Stdio";
48341
+ const TypeId$4 = "~effect/Stdio";
47811
48342
  /**
47812
48343
  * Service tag for process standard I/O.
47813
48344
  *
@@ -47823,7 +48354,7 @@ const TypeId$3 = "~effect/Stdio";
47823
48354
  * @category services
47824
48355
  * @since 4.0.0
47825
48356
  */
47826
- const Stdio = /*#__PURE__*/ Service(TypeId$3);
48357
+ const Stdio = /*#__PURE__*/ Service$1(TypeId$4);
47827
48358
  /**
47828
48359
  * Creates a `Stdio` service implementation from the provided fields and
47829
48360
  * attaches the `Stdio` type identifier.
@@ -47846,7 +48377,7 @@ const Stdio = /*#__PURE__*/ Service(TypeId$3);
47846
48377
  * @since 4.0.0
47847
48378
  */
47848
48379
  const make$8 = (options) => ({
47849
- [TypeId$3]: TypeId$3,
48380
+ [TypeId$4]: TypeId$4,
47850
48381
  stdinIsTerminal: succeed$4(false),
47851
48382
  stdoutIsTerminal: succeed$4(false),
47852
48383
  stderrIsTerminal: succeed$4(false),
@@ -47985,7 +48516,7 @@ const makeProto = (options) => Object.assign(function() {}, RpcGroupProto, {
47985
48516
  */
47986
48517
  const make$7 = (...rpcs) => makeProto({
47987
48518
  requests: new Map(rpcs.map((rpc) => [rpc._tag, rpc])),
47988
- annotations: empty$8()
48519
+ annotations: empty$9()
47989
48520
  });
47990
48521
  //#endregion
47991
48522
  //#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/ConfigProvider.js
@@ -48353,7 +48884,7 @@ function trieNodeAt(root, path) {
48353
48884
  * @stability stable
48354
48885
  * @since 4.0.0
48355
48886
  */
48356
- const TypeId$2 = "~effect/Config";
48887
+ const TypeId$3 = "~effect/Config";
48357
48888
  /**
48358
48889
  * Returns `true` if `u` is a `Config` instance.
48359
48890
  *
@@ -48375,7 +48906,7 @@ const TypeId$2 = "~effect/Config";
48375
48906
  * @category guards
48376
48907
  * @since 2.0.0
48377
48908
  */
48378
- const isConfig = (u) => hasProperty(u, TypeId$2);
48909
+ const isConfig = (u) => hasProperty(u, TypeId$3);
48379
48910
  /**
48380
48911
  * Represents the error type produced when config loading or validation fails.
48381
48912
  *
@@ -48418,7 +48949,7 @@ const Proto = {
48418
48949
  return this.parse(fiber.getRef(ConfigProvider));
48419
48950
  }
48420
48951
  }),
48421
- [TypeId$2]: TypeId$2,
48952
+ [TypeId$3]: TypeId$3,
48422
48953
  toJSON() {
48423
48954
  return { _id: "Config" };
48424
48955
  }
@@ -48859,6 +49390,16 @@ function succeed(value) {
48859
49390
  function String$1(name) {
48860
49391
  return schema(String$2, name);
48861
49392
  }
49393
+ function Array$1(value, pathOrOptions, options) {
49394
+ const hasPath = isPath(pathOrOptions);
49395
+ const resolvedOptions = hasPath ? options : pathOrOptions;
49396
+ const array = ArraySchema(value);
49397
+ const separator = resolvedOptions?.separator ?? ",";
49398
+ return schema(Union([String$2.pipe(decodeTo(toCodecStringTree(array), {
49399
+ decode: split(resolvedOptions),
49400
+ encode: compose(passthrough$1({ strict: false }), transform$1((input) => input.join(separator)))
49401
+ })), array]), hasPath ? pathOrOptions : void 0);
49402
+ }
48862
49403
  function Record(key, value, pathOrOptions, options) {
48863
49404
  const hasPath = isPath(pathOrOptions);
48864
49405
  const record = Record$1(key, value);
@@ -49059,7 +49600,7 @@ function v7Bytes(timestampMillis, bytes = randomBytes()) {
49059
49600
  * @stability unstable
49060
49601
  * @since 4.0.0
49061
49602
  */
49062
- const TypeId$1 = "~effect/Crypto";
49603
+ const TypeId$2 = "~effect/Crypto";
49063
49604
  /**
49064
49605
  * Service tag for platform cryptography.
49065
49606
  *
@@ -49079,7 +49620,7 @@ const TypeId$1 = "~effect/Crypto";
49079
49620
  * @category services
49080
49621
  * @since 4.0.0
49081
49622
  */
49082
- const Crypto = /*#__PURE__*/ Service("effect/Crypto");
49623
+ const Crypto = /*#__PURE__*/ Service$1("effect/Crypto");
49083
49624
  /**
49084
49625
  * Creates a `Crypto` service from the primitive implementation, deriving the
49085
49626
  * random generator helpers and UUID generation from those primitives.
@@ -49132,7 +49673,7 @@ const make$4 = (impl) => {
49132
49673
  }
49133
49674
  };
49134
49675
  return Crypto.of({
49135
- [TypeId$1]: TypeId$1,
49676
+ [TypeId$2]: TypeId$2,
49136
49677
  randomBytes,
49137
49678
  nextDoubleUnsafe,
49138
49679
  nextIntUnsafe,
@@ -49790,7 +50331,7 @@ const layer$4 = /* @__PURE__ */ succeed$5(Stdio, /*#__PURE__*/ make$8({
49790
50331
  }));
49791
50332
  //#endregion
49792
50333
  //#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/Terminal.js
49793
- const TypeId = "~effect/Terminal";
50334
+ const TypeId$1 = "~effect/Terminal";
49794
50335
  const QuitErrorTypeId = "~effect/Terminal/QuitError";
49795
50336
  /**
49796
50337
  * Represents an error that occurs when a user attempts to
@@ -49847,7 +50388,7 @@ const isQuitError = (u) => hasProperty(u, QuitErrorTypeId);
49847
50388
  * @category services
49848
50389
  * @since 4.0.0
49849
50390
  */
49850
- const Terminal = /*#__PURE__*/ Service("effect/Terminal");
50391
+ const Terminal = /*#__PURE__*/ Service$1("effect/Terminal");
49851
50392
  /**
49852
50393
  * Creates a `Terminal` service implementation.
49853
50394
  *
@@ -49869,7 +50410,7 @@ const Terminal = /*#__PURE__*/ Service("effect/Terminal");
49869
50410
  */
49870
50411
  const make$2 = (impl) => Terminal.of({
49871
50412
  ...impl,
49872
- [TypeId]: TypeId
50413
+ [TypeId$1]: TypeId$1
49873
50414
  });
49874
50415
  /**
49875
50416
  * Provides the default process-backed `Terminal` service, ending key input on
@@ -49952,13 +50493,13 @@ const layer$3 = /*#__PURE__*/ effect(Terminal, /*#__PURE__*/ (/* @__PURE__ */ fn
49952
50493
  stdin.on("keypress", handleKeypress);
49953
50494
  if (inputEnded) handleEnd();
49954
50495
  else {
49955
- yield* get$2(rlRef);
50496
+ yield* get$3(rlRef);
49956
50497
  stdin.once("end", handleEnd);
49957
50498
  }
49958
50499
  return queue;
49959
50500
  });
49960
50501
  const readLine = suspend$2(() => poll(lines).pipe(flatMap$2(match$6({
49961
- onNone: () => scoped(andThen(get$2(rlRef), take$1(lines))),
50502
+ onNone: () => scoped(andThen(get$3(rlRef), take$1(lines))),
49962
50503
  onSome: succeed$4
49963
50504
  })), mapError$2(() => new QuitError({}))));
49964
50505
  const display = (prompt) => uninterruptible(callback$1((resume) => {
@@ -50465,6 +51006,114 @@ const layer = (loggers, options) => effect(CurrentLoggers, withFiber$1(fnUntrace
50465
51006
  return currentLoggers;
50466
51007
  })));
50467
51008
  //#endregion
51009
+ //#region ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/dist/rpc/RpcMiddleware.js
51010
+ /**
51011
+ * Middleware services for the unstable RPC runtime.
51012
+ *
51013
+ * A middleware service wraps server handler execution and can also install a
51014
+ * client-side wrapper for generated clients. Its metadata records the services
51015
+ * provided to downstream handlers, the services required by the middleware
51016
+ * implementation, the schema for server-visible failures, the client-only error
51017
+ * type, and whether generated clients must require the matching client layer.
51018
+ *
51019
+ * @stability unstable
51020
+ * @since 4.0.0
51021
+ */
51022
+ /**
51023
+ * The runtime type id used to attach and inspect RPC middleware metadata.
51024
+ *
51025
+ * @stability unstable
51026
+ * @category type IDs
51027
+ * @since 4.0.0
51028
+ */
51029
+ const TypeId = "~effect/rpc/RpcMiddleware";
51030
+ /**
51031
+ * Creates a typed RPC middleware service class, with optional service
51032
+ * requirements, provided services, error schema, and client-side requirement
51033
+ * metadata.
51034
+ *
51035
+ * @stability unstable
51036
+ * @category constructors
51037
+ * @since 4.0.0
51038
+ */
51039
+ const Service = () => (id, options) => {
51040
+ const limit = getStackTraceLimit();
51041
+ let creationError;
51042
+ if (limit !== 0) {
51043
+ setStackTraceLimit(2);
51044
+ creationError = new globalThis.Error();
51045
+ setStackTraceLimit(limit);
51046
+ }
51047
+ function ServiceClass() {}
51048
+ const ServiceClass_ = ServiceClass;
51049
+ Object.setPrototypeOf(ServiceClass, Object.getPrototypeOf(Service$1(id)));
51050
+ ServiceClass.key = id;
51051
+ Object.defineProperty(ServiceClass, "stack", { get() {
51052
+ return creationError?.stack;
51053
+ } });
51054
+ ServiceClass_[TypeId] = TypeId;
51055
+ ServiceClass_.error = options?.error ?? Never;
51056
+ ServiceClass_.requiredForClient = options?.requiredForClient ?? false;
51057
+ return ServiceClass;
51058
+ };
51059
+ /**
51060
+ * Provides the client-side implementation for an RPC middleware service,
51061
+ * capturing the layer's environment and merging it into each middleware
51062
+ * invocation.
51063
+ *
51064
+ * @stability unstable
51065
+ * @category layers
51066
+ * @since 4.0.0
51067
+ */
51068
+ const layerClient = (tag, service) => effectContext(gen(function* () {
51069
+ const services = (yield* context()).pipe(omit$2(Scope));
51070
+ const middleware = isEffect(service) ? yield* service : service;
51071
+ return makeUnsafe$6(/* @__PURE__ */ new Map([[`${tag.key}/Client`, (options) => updateContext(middleware(options), (requestContext) => merge$4(services, requestContext))]]));
51072
+ }));
51073
+ //#endregion
51074
+ //#region ../../packages/auth/src/schema.ts
51075
+ var AuthError = class extends TaggedError()("AuthError", {
51076
+ cause: optional(Defect()),
51077
+ message: String$2
51078
+ }) {};
51079
+ const Session = pipe(StringFromBase64Url, decodeTo(fromJsonString(Struct({
51080
+ expiresAt: Finite,
51081
+ user: Struct({
51082
+ id: NonEmptyString,
51083
+ name: NonEmptyString
51084
+ })
51085
+ }))));
51086
+ const Verification = Struct({
51087
+ key: NonEmptyString,
51088
+ users: ArraySchema(NonEmptyString)
51089
+ });
51090
+ const SignInParams = Struct({ redirect: optionalKey(String$2) });
51091
+ const OAuthFlow = pipe(StringFromBase64Url, decodeTo(fromJsonString(Struct({
51092
+ ...SignInParams.fields,
51093
+ state: NonEmptyString,
51094
+ verifier: NonEmptyString
51095
+ }))));
51096
+ const CallbackParams = Struct({
51097
+ code: NonEmptyString,
51098
+ state: NonEmptyString
51099
+ });
51100
+ const OAuthTokenError = Struct({ error: NonEmptyString });
51101
+ const OAuthTokenResponse = Union([Struct({ access_token: NonEmptyString }), OAuthTokenError]);
51102
+ const GitHubUser = Struct({
51103
+ id: Int,
51104
+ login: NonEmptyString
51105
+ });
51106
+ //#endregion
51107
+ //#region ../../packages/auth/src/lib/utils.ts
51108
+ const AUTH_URL = "https://auth.mp281x.xyz";
51109
+ var CurrentUser = class extends Service$1()("@deslop/auth/lib/utils/CurrentUser") {};
51110
+ var RpcAuth = class RpcAuth extends Service()("@deslop/auth/lib/utils/RpcAuth", { error: AuthError }) {
51111
+ static layerClient = (token) => layerClient(RpcAuth, (options) => flatMap$2(token, (value) => options.next({
51112
+ ...options.request,
51113
+ headers: set$2(options.request.headers, "authorization", `Bearer ${value}`)
51114
+ })));
51115
+ };
51116
+ //#endregion
50468
51117
  //#region src/services/notes/schema.ts
50469
51118
  var NotesError = class extends TaggedError()("NotesError", {
50470
51119
  cause: optional(Defect()),
@@ -50656,6 +51305,7 @@ var RpcContracts = class extends make$7(make$9("notes.watch", {
50656
51305
  payload: Struct({ id: NoteId }),
50657
51306
  success: Note
50658
51307
  }), make$9("notes.search", {
51308
+ error: NotesError,
50659
51309
  payload: Struct({ query: String$2 }),
50660
51310
  success: ArraySchema(NoteId)
50661
51311
  }), make$9("notes.capture", {
@@ -50668,6 +51318,6 @@ var RpcContracts = class extends make$7(make$9("notes.watch", {
50668
51318
  }), make$9("notes.remove", {
50669
51319
  error: NotesError,
50670
51320
  payload: Struct({ id: NoteId })
50671
- })) {};
51321
+ })).middleware(RpcAuth) {};
50672
51322
  //#endregion
50673
- export { constPong as $, isPrivate as $a, isNoSuchElementError as $c, combine$1 as $d, last as $i, DisablePropagation as $l, unwrap$1 as $n, makeSpanScoped as $o, toEpochMillis as $r, withFiber as $s, String$2 as $t, make$37 as $u, layer$8 as A, badArgument as Aa, split as Ac, exists as Ad, constUndefined as Af, mapError as Ai, TracerTimingEnabled as Al, make$11 as An, flatMap$2 as Ao, FilterGroup as Ar, serviceOption as As, Boolean$1 as At, headNonEmpty as Au, unwrap as B, nameServerFromInput as Ba, StackTrace as Bc, isNone as Bd, runForEach as Bi, isExit as Bl, toType as Bn, fromResult as Bo, null_ as Br, timeoutOption as Bs, Finite as Bt, prepend$1 as Bu, runMain as C, await_ as Ca, length as Cc, getOrUndefinedUnsafe as Cd, isObject as Cf, groupedWithin as Ci, forkUnsafe as Cl, isGreaterThanOrEqualTo as Cn, delay as Co, toArrayBuffer as Cr, retry as Cs, HttpClientErrorSchema as Ct, flatMap$5 as Cu, QuitError as D, interruptAllAs as Da, replace as Dc, merge$4 as Dd, compose$1 as Df, mapArray as Di, CurrentLogAnnotations as Dl, isPattern as Dn, fail$3 as Do, ChildProcessSpawner as Dr, runSync$1 as Ds, isHttpClientError as Dt, getUnsafe as Du, layer$1 as E, interruptAll as Ea, repeat$2 as Ec, makeUnsafe$6 as Ed, or as Ef, mapAccum as Ei, provide$3 as El, isMinLength as En, exit as Eo, make$18 as Er, runForkWith as Es, TransportError as Et, getSomes as Eu, String$1 as F, zero$1 as Fa, max as Fc, fromNullishOr as Fd, identity as Ff, orDie as Fi, makeUnsafe$5 as Fl, tag as Fn, forever as Fo, Union$1 as Fr, sync as Fs, Defect as Ft, last$1 as Fu, RpcSerialization as G, formatUrlUnsafe as Ga, fail$4 as Gc, match$6 as Gd, succeed$2 as Gi, effectIsExit as Gl, omit as Gn, interruptible as Go, string as Gr, uninterruptible as Gs, MutableJson as Gt, take$3 as Gu, Stdio as H, NetAddressError as Ha, combine as Hc, liftPredicate as Hd, runHead as Hi, isSuccess as Hl, withDecodingDefault as Hn, ignore as Ho, replaceChecks as Hr, transposeOption as Hs, Json as Ht, reverse as Hu, URL$1 as I, Dns as Ia, parse as Ic, fromUndefinedOr as Id, pipe as If, pipeThroughChannel as Ii, die$4 as Il, toCodecJson as In, forkChild as Io, decodeTo$1 as Ir, tap$1 as Is, Duration as It, lastNonEmpty as Iu, layerSchemaBinary as J, ipFromStringUnsafe as Ja, fromReasons as Jc, orElseSome as Jd, tap as Ji, forkUnsafe$1 as Jl, CurrentRedactedNames as Jn, logDebug as Jo, transform as Jr, updateService as Js, Null as Jt, keys$1 as Ju, json as K, inetAddressFromIpString as Ka, filterInterruptors as Kc, none as Kd, suspend as Ki, fiberEnterInterruptibleUnsafe as Kl, getReferenceKey as Kn, isEffect as Ko, toEncoded$1 as Kr, uninterruptibleMask as Ks, Never as Kt, takeRight as Ku, option as L, DnsError as La, round as Lc, getOrElse as Ld, pipeArguments as Lf, provideService as Li, fail$5 as Ll, toCodecStringTree as Ln, forkIn as Lo, isNever as Lr, tapCause as Ls, Error$1 as Lt, map$6 as Lu, Port as M, fromInputUnsafe as Ma, toLowerCase as Mc, flatMap$7 as Md, constant as Mf, mkString as Mi, doneUnsafe as Ml, mutable as Mn, fn as Mo, Objects as Mr, succeed$4 as Ms, Class as Mt, isReadonlyArrayEmpty as Mu, Record as N, gibibytes as Na, trim as Nc, flatMapNullishOr as Nd, dual as Nf, mkUint8Array as Ni, into as Nl, optional as Nn, fnUntraced as No, PropertySignature as Nr, succeedNone as Ns, DateTimeUtc as Nt, isReadonlyArrayNonEmpty as Nu, Terminal as O, interruptAs as Oa, replaceAll as Oc, all$4 as Od, constFalse$1 as Of, mapArrayEffect as Oi, CurrentLogSpans as Ol, isSchema as On, failCause$3 as Oo, Arrays as Or, scope as Os, Any as Ot, groupBy as Ou, Redacted as P, mebibytes as Pa, trimEnd as Pc, flatten$5 as Pd, flow as Pf, onEnd as Pi, isDeferred as Pl, optionalKey as Pn, forEach$1 as Po, Suspend as Pr, suspend$2 as Ps, DateTimeUtcFromString as Pt, join$1 as Pu, constPing as Q, isLoopback as Qa, interruptors as Qc, String$6 as Qd, unwrap$2 as Qi, sync$2 as Ql, setAll as Qn, logWarning as Qo, now as Qr, whileLoop as Qs, Redacted$1 as Qt, headUnsafe as Qu, schema as R, make$33 as Ra, Clock as Rc, getOrNull as Rd, run$1 as Ri, failCause$5 as Rl, toEncoded as Rn, forkScoped as Ro, isOptional as Rr, tapError as Rs, Exit as Rt, match$3 as Ru, make as S, makeUnsafe$2 as Sa, isNonEmpty as Sc, getOrUndefined as Sd, isNotUndefined as Sf, fromReadableStream as Si, closeUnsafe as Sl, is as Sn, contextWith as So, pipeThroughDuplex as Sr, result as Ss, HttpClientError as St, findLast as Su, errorReported as T, interrupt as Ta, padStart as Tc, make$39 as Td, isUndefined as Tf, map$1 as Ti, makeUnsafe$4 as Tl, isMaxLength as Tn, ensuring$2 as To, fromWritable as Tr, runFork as Ts, StatusCodeError as Tt, get$4 as Tu, withRun as U, formatInet as Ua, die$3 as Uc, liftThrowable as Ud, runLast as Ui, succeed$6 as Ul, withDecodingDefaultKey as Un, ignoreCause as Uo, resolveDescription as Ur, tryPromise as Us, Literal as Ut, some as Uu, withDefault as V, domainNameFromStringUnsafe as Va, annotate$1 as Vc, isSome as Vd, runForEachArray as Vi, isFailure as Vl, withConstructorDefault as Vn, gen as Vo, optionalKey$1 as Vr, timeoutOrElse as Vs, Int as Vt, reduce as Vu, withRunClient as W, formatIp as Wa, done as Wc, map$9 as Wd, scan as Wi, ConsoleRef as Wl, isSchemaError$1 as Wn, interrupt$1 as Wo, resolveIdentifier as Wr, try_ as Ws, Literals as Wt, sort as Wu, ResponseDefectEncoded as X, isInetAddressV6 as Xa, hasInterrupts as Xc, toArray as Xd, toReadableStreamEffect as Xi, onExitUnsafe as Xl, fromInput as Xn, logFatal as Xo, encode as Xr, void_$1 as Xs, Number$1 as Xt, toEntries as Xu, RequestId as Y, ipv4ToOctets as Ya, hasDies as Yc, some$1 as Yd, toReadableStream as Yi, makeSpanUnsafe as Yl, empty as Yn, logError as Yo, transformOptional as Yr, useSpan as Ys, NullOr as Yt, map$7 as Yu, constEof as Z, isLinkLocal as Za, hasInterruptsOnly as Zc, Number$5 as Zd, toReadableStreamWith as Zi, reportCauseUnsafe as Zl, redactUrl as Zn, logInfo as Zo, formatIso as Zr, when as Zs, Record$1 as Zt, empty$7 as Zu, Organization as _, shutdownUnsafe as _a, Random as _c, Reference as _d, hash as _f, fromChannel as _i, unwrap$5 as _l, encodeEffect as _n, catchReason$2 as _o, fromSetCookie as _r, provideContext$2 as _s, layerWebSocket as _t, every$1 as _u, FxConversation as a, pipeTo as aa, zipWith as ac, isSuccess$1 as ad, contE as af, catch_ as ai, buildWithMemoMap as al, URL$2 as an, annotateCurrentSpan as ao, empty$2 as ar, matchCauseEffectEager as as, isStreamSchema as at, random as au, LogToStderr as b, publishUnsafe as ba, includes as bc, empty$8 as bd, isNotNull as bf, fromPubSub as bi, addFinalizerExit as bl, encodeUnknownEffect as bn, catch_$2 as bo, toSetCookieHeaders as br, raceFirst as bs, EmptyBodyError as bt, findFirst as bu, GitHubIssue as c, bounded as ca, forever$1 as cc, try_$2 as cd, getStackTraceLimit as cf, die as ci, effectDiscard as cl, Uint8ArrayFromBase64 as cn, asSome as co, isRedactedName$1 as cr, onError as cs, Collector as ct, TaggedError$1 as cu, ImageType as d, failCause$2 as da, min as dc, max$1 as dd, Class$2 as df, fail$1 as di, mergeAll$2 as dl, Unknown as dn, callback$1 as do, set$1 as dr, onInterrupt as ds, Socket as dt, contains as du, fromPull$1 as ea, withFiberSucceed as ec, fail$7 as ed, flip$1 as ef, defaultFormatter as ei, isTimeoutError as el, StringFromUriComponent as en, isUnicast as eo, fromIterable as er, map$3 as es, ServerClient as et, ParentSpan as eu, Note as f, make$27 as fa, passthrough$2 as fc, millis as fd, NodeInspectSymbol as ff, failCause as fi, provide$2 as fl, decodeEffect as fn, catchCause$1 as fo, setAll$1 as fr, option$1 as fs, SocketError as ft, dedupe as fu, OEmbed as g, shutdown as ga, isDoneCause as gc, zero$2 as gd, equals$1 as gf, fromArray as gi, sync$1 as gl, decodeUnknownOption as gn, catchIf as go, empty$3 as gr, provide as gs, fromWebSocket as gt, ensure as gu, NotesError as h, offerUnsafe as ha, catchDone as hc, toMillis as hd, redact$2 as hf, flattenIterable as hi, succeedContext as hl, decodeUnknownEffect as hn, catchFilter$2 as ho, value as hr, promise as hs, SocketReadError as ht, empty$6 as hu, FileType as i, mkUint8Array$1 as ia, withTracerEnabled as ic, isResult as id, contA as if, catchTags as ii, CurrentMemoMap as il, Tuple as in, andThen as io, CurrentRedactedNames$1 as ir, matchCauseEffect as is, getStreamSchemas as it, nativeTracer as iu, Crypto as j, fromInput$2 as ja, startsWith as jc, filter$3 as jd, constVoid as jf, mergeAll as ji, _await as jl, makeFilter as jn, flatMapEager as jo, Literal$1 as jr, sleep as js, BooleanLiterals as jt, isArrayNonEmpty as ju, isQuitError as k, runIn as ka, slice as kc, contains$1 as kd, constTrue as kf, mapEffect as ki, MinimumLogLevel as kl, isSchemaError as kn, filterOrFail as ko, Filter as kr, scoped as ks, ArraySchema as kt, head as ku, GitHubReadme as l, collect as la, fromStep as lc, format$1 as ld, setStackTraceLimit as lf, empty$4 as li, launch as ll, UndefinedOr as ln, asVoid as lo, merge as lr, onExit$1 as ls, makeCollectorUnsafe as lt, taggedEnum as lu, NoteJson as m, offerAll as ma, toStep as mc, seconds as md, format$2 as mf, flatMap as mi, succeed$5 as ml, decodeTo as mn, catchDefect as mo, make$16 as mr, orElseSucceed as ms, SocketOpenError as mt, drop as mu, Capture as n, map$2 as na, withParentSpan as nc, fromOption$2 as nd, Prototype as nf, FileSystem as ni, prettyErrors as nl, TaggedError as nn, acquireRelease as no, fromIterable$2 as nr, mapError$2 as ns, isWrapper as nt, externalSpan as nu, FxStatus as o, make$26 as oa, addDelay as oc, match$4 as od, withFiber$1 as of, concat as oi, effect as ol, URLFromString as on, annotateLogs as oo, fromInput$1 as or, matchEffect as os, spanAttributes as ot, Error$2 as ou, NoteId as p, offer as pa, spaced as pc, parts as pd, toJson as pf, filter as pi, provideMerge as pl, decodeSync as pn, catchCauseIf as po, isRedacted as pr, orDie$2 as ps, SocketErrorReason as pt, dedupeAdjacentWith as pu, layerJson as q, ipFromString as qa, findError as qc, orElse as qd, takeUntil as qi, fiberEnterUninterruptibleUnsafe as ql, encodeUnknownEffect$1 as qn, log as qo, passthrough as qr, updateContext as qs, NonEmptyArray as qt, has$3 as qu, Extraction as r, mapError$1 as ra, withSpan as rc, isFailure$1 as rd, PipeInspectableProto as rf, catchReason as ri, squash as rl, TrueLiterals as rn, all$1 as ro, get as rr, match as rs, ClientAbort as rt, make$36 as ru, GitHubComment as s, makeUnsafe$1 as sa, exponential as sc, succeed$8 as sd, assignProperty as sf, decodeText$1 as si, effectContext as sl, Uint8Array$1 as sn, as as so, fromRecordUnsafe as sr, never$1 as ss, spanName as st, TaggedClass as su, RpcContracts as t, fromTransform$1 as ta, withLogSpan as tc, failVoid as td, mapInput as tf, Path$1 as ti, makeDieReason as tl, Struct as tn, unixPathAddress as to, has as tr, mapEager as ts, exitSchema as tt, Tracer as tu, GitHubRepo as u, end as ua, isSchedule as uc, fromInputUnsafe$1 as ud, BaseProto as uf, ensuring as ui, merge$3 as ul, Union as un, cached as uo, remove$1 as ur, onExitPrimitive as us, CloseEvent as ut, appendAll$1 as uu, Reader as v, take$1 as va, camelToSnake as vc, Service as vd, hasProperty as vf, fromEffect as vi, Scope as vl, encodeSync as vn, catchTag as vo, isEmpty as vr, provideService$2 as vs, layerWebSocketConstructorGlobal as vt, filter$2 as vu, errorExitCode as w, getCurrent as wa, match$1 as wc, getUnsafe$1 as wd, isTagged as wf, limitBytes as wi, make$35 as wl, isInt as wn, die$2 as wo, toUint8Array as wr, retryOrElse as ws, InvalidUrlError as wt, fromIterable$6 as wu, layer as x, unbounded as xa, isEmpty$1 as xc, get$5 as xd, isNotNullish as xf, fromQueue as xi, close as xl, fromJsonString as xn, context as xo, fromReadable as xr, repeat as xs, EncodeError as xt, findFirstIndex as xu, TikTokPage as y, takeAll as ya, endsWith as yc, add as yd, isIterable as yf, fromIterable$5 as yi, addFinalizer$1 as yl, encodeTo as yn, catchTags$1 as yo, parseHeader as yr, provideServiceEffect as ys, DecodeError as yt, filterMap as yu, succeed as z, makeRecordUnsafe as za, Done as zc, getOrUndefined$1 as zd, runCollect as zi, interrupt$2 as zl, toJsonSchemaDocument as zn, fromOption as zo, mapOrSame as zr, timeout as zs, FalseLiterals as zt, of as zu };
51323
+ export { succeed as $, interruptAs as $a, replaceAll as $c, get$6 as $d, isNotNullish as $f, mapError as $i, make$35 as $l, toJsonSchemaDocument as $n, failCause$3 as $o, Objects as $r, scope as $s, FalseLiterals as $t, fromIterable$6 as $u, SignInParams as A, makeUnsafe$1 as Aa, zipWith as Ac, failVoid as Ad, String$6 as Af, decodeText$1 as Ai, squash as Al, decodeUnknownOption as An, annotateCurrentSpan as Ao, setAll$1 as Ar, matchCauseEffectEager as As, fromWebSocket as At, Tracer as Au, Terminal as B, shutdownUnsafe as Ba, catchDone as Bc, format$1 as Bd, getStackTraceLimit as Bf, fromChannel as Bi, provide$2 as Bl, isMinLength as Bn, catchFilter$2 as Bo, setUnsafe as Br, promise as Bs, TransportError as Bt, contains as Bu, AuthError as C, fromPull$1 as Ca, whileLoop as Cc, keys$1 as Cd, match$6 as Cf, defaultFormatter as Ci, hasInterrupts as Cl, UndefinedOr as Cn, isLoopback as Co, fromInput$1 as Cr, logWarning as Cs, makeCollectorUnsafe as Ct, forkUnsafe$1 as Cu, OAuthTokenError as D, mkUint8Array$1 as Da, withParentSpan as Dc, headUnsafe as Dd, some$1 as Df, catchTags as Di, isTimeoutError as Dl, decodeSync as Dn, acquireRelease as Do, merge as Dr, mapError$2 as Ds, SocketErrorReason as Dt, sync$2 as Du, OAuthFlow as E, mapError$1 as Ea, withLogSpan as Ec, empty$8 as Ed, orElseSome as Ef, catchReason as Ei, isNoSuchElementError as El, decodeEffect as En, unixPathAddress as Eo, isRedactedName$1 as Er, mapEager as Es, SocketError as Et, reportCauseUnsafe as Eu, runMain as F, make$27 as Fa, isSchedule as Fc, isSuccess$1 as Fd, PipeInspectableProto as Ff, failCause as Fi, effectContext as Fl, fromJsonString as Fn, cached as Fo, empty$4 as Fr, onExitPrimitive as Fs, EncodeError as Ft, Error$2 as Fu, Port as G, make$30 as Ga, includes as Gc, parts as Gd, toJson as Gf, fromReadableStream as Gi, unwrap$5 as Gl, makeFilter as Gn, catch_$2 as Go, toUint8Array as Gr, raceFirst as Gs, BooleanLiterals as Gt, ensure as Gu, layer$8 as H, takeAll as Ha, Random as Hc, max$1 as Hd, BaseProto as Hf, fromIterable$5 as Hi, succeed$5 as Hl, isSchema as Hn, catchReason$2 as Ho, fromReadable as Hr, provideContext$2 as Hs, Any as Ht, dedupeAdjacentWith as Hu, errorExitCode as I, offer as Ia, min as Ic, match$4 as Id, contA as If, filter as Ii, effectDiscard as Il, is as In, callback$1 as Io, expireCookieUnsafe as Ir, onInterrupt as Is, HttpClientError as It, TaggedClass as Iu, String$1 as J, await_ as Ja, length as Jc, zero$2 as Jd, equals$1 as Jf, map$1 as Ji, addFinalizerExit as Jl, optionalKey as Jn, delay as Jo, ChildProcessSpawner as Jr, retry as Js, DateTimeUtcFromString as Jt, filterMap as Ju, Record as K, set$3 as Ka, isEmpty$1 as Kc, seconds as Kd, format$2 as Kf, groupedWithin as Ki, Scope as Kl, mutable as Kn, context as Ko, fromWritable as Kr, repeat as Ks, Class as Kt, every$1 as Ku, errorReported as L, offerAll as La, passthrough$2 as Lc, succeed$8 as Ld, contE as Lf, flatMap as Li, launch as Ll, isGreaterThanOrEqualTo as Ln, catchCause$1 as Lo, fromSetCookie as Lr, option$1 as Ls, HttpClientErrorSchema as Lt, TaggedError$1 as Lu, LogToStderr as M, collect as Ma, exponential as Mc, getSuccess as Md, flip$1 as Mf, empty$5 as Mi, buildWithMemoMap as Ml, encodeSync as Mn, as as Mo, make$16 as Mr, never$1 as Ms, layerWebSocketConstructorGlobal as Mt, make$36 as Mu, layer as N, end as Na, forever$1 as Nc, isFailure$1 as Nd, mapInput as Nf, ensuring as Ni, buildWithScope as Nl, encodeTo as Nn, asSome as No, value as Nr, onError as Ns, DecodeError as Nt, nativeTracer as Nu, OAuthTokenResponse as O, pipeTo as Oa, withSpan as Oc, make$37 as Od, toArray as Of, catch_ as Oi, makeDieReason as Ol, decodeTo as On, all$1 as Oo, remove$1 as Or, match as Os, SocketOpenError as Ot, DisablePropagation as Ou, make as P, failCause$2 as Pa, fromStep as Pc, isResult as Pd, Prototype as Pf, fail$1 as Pi, effect as Pl, encodeUnknownEffect as Pn, asVoid as Po, stringOrRedacted as Pr, onExit$1 as Ps, EmptyBodyError as Pt, random as Pu, schema as Q, interruptAllAs as Qa, replace as Qc, empty$9 as Qd, isNotNull as Qf, mapEffect as Qi, forkUnsafe as Ql, toEncoded as Qn, fail$3 as Qo, Literal$1 as Qr, runSync$1 as Qs, Exit as Qt, flatMap$5 as Qu, layer$1 as R, offerUnsafe as Ra, spaced as Rc, try_$2 as Rd, withFiber$1 as Rf, flattenIterable as Ri, merge$3 as Rl, isInt as Rn, catchCauseIf as Ro, isEmpty as Rr, orDie$2 as Rs, InvalidUrlError as Rt, taggedEnum as Ru, RpcAuth as S, last as Sa, when as Sc, has$3 as Sd, map$9 as Sf, toEpochMillis as Si, hasDies as Sl, Uint8ArrayFromBase64 as Sn, isLinkLocal as So, empty$3 as Sr, logInfo as Ss, Collector as St, fiberEnterUninterruptibleUnsafe as Su, GitHubUser as T, map$2 as Ta, withFiberSucceed as Tc, toEntries as Td, orElse as Tf, FileSystem as Ti, interruptors as Tl, Unknown as Tn, isUnicast as To, get$2 as Tr, map$3 as Ts, Socket as Tt, onExitUnsafe as Tu, Crypto as U, publishUnsafe as Ua, camelToSnake as Uc, millis as Ud, Class$2 as Uf, fromPubSub as Ui, succeedContext as Ul, isSchemaError as Un, catchTag as Uo, pipeThroughDuplex as Ur, provideService$2 as Us, ArraySchema as Ut, drop as Uu, isQuitError as V, take$1 as Va, isDoneCause as Vc, fromInputUnsafe$1 as Vd, setStackTraceLimit as Vf, fromEffect as Vi, provideMerge as Vl, isPattern as Vn, catchIf as Vo, toSetCookieHeaders as Vr, provide as Vs, isHttpClientError as Vt, dedupe as Vu, Array$1 as W, unbounded as Wa, endsWith as Wc, minutes as Wd, NodeInspectSymbol as Wf, fromQueue as Wi, sync$1 as Wl, make$11 as Wn, catchTags$1 as Wo, toArrayBuffer as Wr, provideServiceEffect as Ws, Boolean$1 as Wt, empty$7 as Wu, all as X, interrupt as Xa, padStart as Xc, Service$1 as Xd, hasProperty as Xf, mapArray as Xi, closeUnsafe as Xl, toCodecJson as Xn, ensuring$2 as Xo, Filter as Xr, runFork as Xs, Duration as Xt, findFirstIndex as Xu, URL$1 as Y, getCurrent as Ya, match$1 as Yc, Reference as Yd, hash as Yf, mapAccum as Yi, close as Yl, tag as Yn, die$2 as Yo, Arrays as Yr, retryOrElse as Ys, Defect as Yt, findFirst as Yu, option as Z, interruptAll as Za, repeat$2 as Zc, add as Zd, isIterable as Zf, mapArrayEffect as Zi, fork as Zl, toCodecStringTree as Zn, exit as Zo, FilterGroup as Zr, runForkWith as Zs, Error$1 as Zt, findLast as Zu, Organization as _, tap as _a, uninterruptibleMask as _c, reverse as _d, getOrUndefined$1 as _f, decode as _i, done as _l, TrueLiterals as _n, inetAddressFromIpString as _o, empty$1 as _r, isEffect as _s, ClientAbort as _t, isSuccess as _u, FxConversation as a, pipeThroughChannel as aa, suspend$2 as ac, headNonEmpty as ad, merge$4 as af, isOptional as ai, trimEnd as al, MutableJson as an, mebibytes as ao, compose$1 as ap, omit as ar, forEach$1 as as, RpcSerialization as at, TracerTimingEnabled as au, AUTH_URL as b, toReadableStreamWith as ba, useSpan as bc, take$3 as bd, liftPredicate as bf, formatIso as bi, findError as bl, URLFromString as bn, ipv4ToOctets as bo, set as br, logError as bs, spanAttributes as bt, effectIsExit as bu, GitHubIssue as c, runCollect as ca, tapCause as cc, isReadonlyArrayNonEmpty as cd, exists as cf, optionalKey$1 as ci, round as cl, Null as cn, DnsError as co, constUndefined as cp, CurrentRedactedNames as cr, forkIn as cs, layerSchemaBinary as ct, into as cu, ImageType as d, runHead as da, timeoutOption as dc, lastNonEmpty as dd, flatMapNullishOr as df, resolveIdentifier as di, Done as dl, Record$1 as dn, nameServerFromInput as do, dual as dp, redactUrl as dr, fromResult as ds, constEof as dt, die$4 as du, mergeAll as ea, scoped as ec, get$5 as ed, getOrUndefined as ef, PropertySignature as ei, slice as el, Finite as en, runIn as eo, isNotUndefined as ep, toType as er, filterOrFail as es, unwrap as et, makeUnsafe$4 as eu, Note as f, runLast as fa, timeoutOrElse as fc, map$6 as fd, flatten$5 as ff, string as fi, IllegalArgumentError as fl, Redacted$1 as fn, domainNameFromStringUnsafe as fo, flow as fp, setAll as fr, gen as fs, constPing as ft, fail$5 as fu, OEmbed as g, takeUntil as ga, uninterruptible as gc, reduce as gd, getOrNull as gf, transformOptional as gi, die$3 as gl, TaggedError as gn, formatUrlUnsafe as go, has as gr, interruptible as gs, isWrapper as gt, isFailure as gu, NotesError as h, suspend as ha, try_ as hc, prepend$1 as hd, getOrElse as hf, transform as hi, combine as hl, Struct as hn, formatIp as ho, pipeArguments as hp, fromIterable as hr, interrupt$1 as hs, exitSchema as ht, isExit as hu, FileType as i, orDie as ia, succeedNone as ic, head as id, makeUnsafe$6 as if, isNever as ii, trim as il, Literals as in, gibibytes as io, or as ip, isSchemaError$1 as ir, fnUntraced as is, withRunClient as it, MinimumLogLevel as iu, Verification as j, bounded as ja, addDelay as jc, fromOption$2 as jd, combine$1 as jf, die as ji, CurrentMemoMap as jl, encodeEffect as jn, annotateLogs as jo, isRedacted as jr, matchEffect as js, layerWebSocket as jt, externalSpan as ju, Session as k, make$26 as ka, withTracerEnabled as kc, fail$7 as kd, Number$5 as kf, concat as ki, prettyErrors as kl, decodeUnknownEffect as kn, andThen as ko, set$2 as kr, matchCauseEffect as ks, SocketReadError as kt, ParentSpan as ku, GitHubReadme as l, runForEach as la, tapError as lc, join$1 as ld, filter$3 as lf, replaceChecks as li, Clock as ll, NullOr as ln, make$33 as lo, constVoid as lp, empty as lr, forkScoped as ls, RequestId as lt, isDeferred as lu, NoteJson as m, succeed$2 as ma, tryPromise as mc, of as md, fromUndefinedOr as mf, passthrough as mi, annotate$1 as ml, StringFromUriComponent as mn, formatInet as mo, pipe as mp, unwrap$1 as mr, ignoreCause as ms, ServerClient as mt, interrupt$2 as mu, Capture as n, mkUint8Array as na, sleep as nc, getUnsafe as nd, getUnsafe$1 as nf, Union$1 as ni, startsWith as nl, Json as nn, fromInput$2 as no, isTagged as np, withDecodingDefault as nr, flatMapEager as ns, Stdio as nt, CurrentLogAnnotations as nu, FxStatus as o, provideService as oa, sync as oc, isArrayNonEmpty as od, all$4 as of, mapOrSame as oi, max as ol, Never as on, zero$1 as oo, constFalse$1 as op, getReferenceKey as or, forever as os, json as ot, _await as ou, NoteId as p, scan as pa, transposeOption as pc, match$3 as pd, fromNullishOr as pf, toEncoded$1 as pi, StackTrace as pl, String$2 as pn, NetAddressError as po, identity as pp, toString as pr, ignore as ps, constPong as pt, failCause$5 as pu, Redacted as q, makeUnsafe$2 as qa, isNonEmpty$1 as qc, toMillis as qd, redact$2 as qf, limitBytes as qi, addFinalizer$1 as ql, optional as qn, contextWith as qo, make$18 as qr, result as qs, DateTimeUtc as qt, filter$2 as qu, Extraction as r, onEnd as ra, succeed$4 as rc, groupBy as rd, make$39 as rf, decodeTo$1 as ri, toLowerCase as rl, Literal as rn, fromInputUnsafe as ro, isUndefined as rp, withDecodingDefaultKey as rr, fn as rs, withRun as rt, CurrentLogSpans as ru, GitHubComment as s, run$1 as sa, tap$1 as sc, isReadonlyArrayEmpty as sd, contains$1 as sf, null_ as si, parse as sl, NonEmptyArray as sn, Dns as so, constTrue as sp, encodeUnknownEffect$1 as sr, forkChild as ss, layerJson as st, doneUnsafe as su, RpcContracts as t, mkString as ta, serviceOption as tc, getSomes as td, getOrUndefinedUnsafe as tf, Suspend as ti, split$1 as tl, Int as tn, badArgument as to, isObject as tp, withConstructorDefault as tr, flatMap$2 as ts, withDefault as tt, provide$3 as tu, GitHubRepo as u, runForEachArray as ua, timeout as uc, last$1 as ud, flatMap$7 as uf, resolveDescription as ui, currentTimeMillis as ul, Number$1 as un, makeRecordUnsafe as uo, constant as up, fromInput as ur, fromOption as us, ResponseDefectEncoded as ut, makeUnsafe$5 as uu, Reader as v, toReadableStream as va, updateContext as vc, some as vd, isNone as vf, encode as vi, fail$4 as vl, Tuple as vn, ipFromString as vo, fromIterable$2 as vr, log as vs, getStreamSchemas as vt, succeed$6 as vu, CallbackParams as w, fromTransform$1 as wa, withFiber as wc, map$7 as wd, none as wf, Path$1 as wi, hasInterruptsOnly as wl, Union as wn, isPrivate as wo, fromRecordUnsafe as wr, makeSpanScoped as ws, CloseEvent as wt, makeSpanUnsafe as wu, CurrentUser as x, unwrap$2 as xa, void_$1 as xc, takeRight as xd, liftThrowable as xf, now as xi, fromReasons as xl, Uint8Array$1 as xn, isInetAddressV6 as xo, CurrentRedactedNames$1 as xr, logFatal as xs, spanName as xt, fiberEnterInterruptibleUnsafe as xu, TikTokPage as y, toReadableStreamEffect as ya, updateService as yc, sort as yd, isSome as yf, encode$1 as yi, filterInterruptors as yl, URL$2 as yn, ipFromStringUnsafe as yo, get as yr, logDebug as ys, isStreamSchema as yt, ConsoleRef as yu, QuitError as z, shutdown as za, toStep as zc, days as zd, assignProperty as zf, fromArray as zi, mergeAll$2 as zl, isMaxLength as zn, catchDefect as zo, parseHeader as zr, orElseSucceed as zs, StatusCodeError as zt, appendAll$1 as zu };