apps 0.0.1-beta.3 → 0.0.1-beta.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/README.md +68 -44
  2. package/framework-reference.json +1 -1
  3. package/js/{chunk-G7ZIRKMK.js → chunk-2D2PKLGQ.js} +118 -197
  4. package/js/chunk-3SPRHIEE.js +42 -0
  5. package/js/{chunk-FDNTX5QJ.js → chunk-4N26L465.js} +2 -2
  6. package/js/chunk-5ZHHO4OM.js +92 -0
  7. package/js/{chunk-EVJUVWN2.js → chunk-65SZ23BK.js} +2 -2
  8. package/js/{chunk-M6ZRRIBI.js → chunk-6JBTHTI5.js} +1 -1
  9. package/js/{chunk-J7O55ZV7.js → chunk-6NK26ONC.js} +332 -187
  10. package/js/chunk-6VWYEQ4X.js +254 -0
  11. package/js/{chunk-RN2MXB4R.js → chunk-AE4FWJQU.js} +128 -24
  12. package/js/{chunk-HDJH3RPR.js → chunk-BBTELEAN.js} +2 -2
  13. package/js/{chunk-LGIYBDWA.js → chunk-BRGF7VFN.js} +65 -1
  14. package/js/{chunk-MYYEW3RA.js → chunk-BSRU52RU.js} +984 -61
  15. package/js/{chunk-FZJOYIZO.js → chunk-BTJMXW4I.js} +1 -1
  16. package/js/{chunk-HDTGZWP2.js → chunk-IMCEF6KE.js} +139 -32
  17. package/js/chunk-KQCMHI3K.js +118 -0
  18. package/js/{chunk-BMOIAIVR.js → chunk-M2KEEOIQ.js} +49 -1
  19. package/js/{chunk-YEJOQEII.js → chunk-MYCVMDWI.js} +45 -7
  20. package/js/{chunk-FW5HBOIK.js → chunk-NXTXZ635.js} +1841 -1701
  21. package/js/chunk-OD3KFKZD.js +1617 -0
  22. package/js/{chunk-JN55AYQH.js → chunk-OI5CKSBU.js} +61 -32
  23. package/js/{chunk-NQ3OMCA5.js → chunk-P46HIAX6.js} +2 -2
  24. package/js/chunk-PUC24GZP.js +801 -0
  25. package/js/{chunk-SATWJKN6.js → chunk-PWF2DRJ3.js} +1 -1
  26. package/js/{chunk-D47C7KG5.js → chunk-VUVBMNKC.js} +2 -2
  27. package/js/{chunk-ZCAMUXSG.js → chunk-WGBI5MVX.js} +3 -4
  28. package/js/{chunk-T2LAZCAD.js → chunk-WQ5MVBTP.js} +1 -1
  29. package/js/{chunk-PLCMJREA.js → chunk-XBQTJP76.js} +60 -20
  30. package/js/{chunk-QKHR7BMF.js → chunk-XGN5IFOZ.js} +3 -3
  31. package/js/{chunk-WFSQXYUT.js → chunk-YML53Z7H.js} +42 -5
  32. package/js/{chunk-5MQZEB6Y.js → chunk-ZZOCEUTB.js} +37 -12
  33. package/js/client.js +120 -84
  34. package/js/contracts.js +110 -16
  35. package/js/effect.js +20 -20
  36. package/js/{es-APDZKREY.js → es-DIULA3ZF.js} +62 -1659
  37. package/js/graphql.js +58 -54
  38. package/js/host.js +20 -20
  39. package/js/index.js +247 -204
  40. package/js/mcp/effect.js +24 -22
  41. package/js/mcp/stdio.js +35 -30
  42. package/js/mcp.js +105 -68
  43. package/js/openapi.js +4087 -1503
  44. package/js/react.js +3 -3
  45. package/js/skills/effect.js +5 -3
  46. package/js/skills.js +15 -15
  47. package/js/storage/facet.js +4 -4
  48. package/js/ui/auth/contracts.js +2 -2
  49. package/js/ui/auth.js +5 -5
  50. package/js/ui/contracts.js +5 -4
  51. package/js/ui/serving.js +8516 -214
  52. package/package.json +1 -1
  53. package/runtime.json +1 -1
  54. package/types/app-data/src/contracts/database.d.ts +33 -6
  55. package/types/app-data/src/implementation/schema.d.ts +2 -17
  56. package/types/apps/src/contracts/api-response-error.d.ts +4 -0
  57. package/types/apps/src/contracts/app.d.ts +7 -6
  58. package/types/apps/src/contracts/failure.d.ts +54 -0
  59. package/types/apps/src/contracts/graphql.d.ts +2 -1
  60. package/types/apps/src/contracts/host.d.ts +34 -11
  61. package/types/apps/src/contracts/mcp.d.ts +91 -10
  62. package/types/apps/src/contracts/network.d.ts +84 -0
  63. package/types/apps/src/contracts/openapi-compile.d.ts +31 -3
  64. package/types/apps/src/contracts/openapi.d.ts +45 -9
  65. package/types/apps/src/contracts/operations.d.ts +5 -6
  66. package/types/apps/src/contracts/protocol-version.d.ts +2 -2
  67. package/types/apps/src/contracts/protocols/1.d.ts +251 -69
  68. package/types/apps/src/contracts/protocols/2.d.ts +710 -0
  69. package/types/apps/src/contracts/protocols/3.d.ts +716 -0
  70. package/types/apps/src/contracts/protocols/4.d.ts +1298 -0
  71. package/types/apps/src/contracts/protocols/5.d.ts +1174 -0
  72. package/types/apps/src/contracts/protocols/6.d.ts +1620 -0
  73. package/types/apps/src/contracts/protocols/7.d.ts +1784 -0
  74. package/types/apps/src/contracts/protocols/8.d.ts +1119 -0
  75. package/types/apps/src/contracts/protocols/oauth.d.ts +89 -0
  76. package/types/apps/src/contracts/provider-error.d.ts +9 -0
  77. package/types/apps/src/contracts/provider.d.ts +115 -10
  78. package/types/apps/src/contracts/router.d.ts +59 -0
  79. package/types/apps/src/contracts/skills.d.ts +18 -5
  80. package/types/apps/src/contracts/storage.d.ts +3 -3
  81. package/types/apps/src/contracts/ui.d.ts +18 -0
  82. package/types/apps/src/contracts/workflows.d.ts +34 -3
  83. package/types/apps/src/graphql.d.ts +1 -3
  84. package/types/apps/src/implementation/account-router.d.ts +12 -0
  85. package/types/apps/src/implementation/app.d.ts +5 -4
  86. package/types/apps/src/implementation/browser-scripts.gen.d.ts +6 -0
  87. package/types/apps/src/implementation/catalog-cache.d.ts +34 -4
  88. package/types/apps/src/implementation/elicitation.d.ts +9 -9
  89. package/types/apps/src/implementation/failure-detail.d.ts +46 -0
  90. package/types/apps/src/implementation/graphql-catalog.d.ts +4 -7
  91. package/types/apps/src/implementation/graphql.d.ts +4 -3
  92. package/types/apps/src/implementation/mcp-call.d.ts +6 -5
  93. package/types/apps/src/implementation/mcp-catalog.d.ts +7 -8
  94. package/types/apps/src/implementation/mcp-client.d.ts +49 -25
  95. package/types/apps/src/implementation/mcp-stdio.d.ts +1 -1
  96. package/types/apps/src/implementation/mcp-tools.d.ts +2 -1
  97. package/types/apps/src/implementation/mcp.d.ts +52 -25
  98. package/types/apps/src/implementation/network.d.ts +16 -0
  99. package/types/apps/src/implementation/openapi-compile.d.ts +27 -6
  100. package/types/apps/src/implementation/openapi-document.d.ts +35 -8
  101. package/types/apps/src/implementation/openapi-names.d.ts +9 -4
  102. package/types/apps/src/implementation/openapi-request.d.ts +10 -2
  103. package/types/apps/src/implementation/openapi-source.d.ts +8 -6
  104. package/types/apps/src/implementation/openapi-upgrade.d.ts +4 -0
  105. package/types/apps/src/implementation/operations.d.ts +36 -3
  106. package/types/apps/src/implementation/protocol-operations.d.ts +6 -4
  107. package/types/apps/src/implementation/provider-error.d.ts +28 -1
  108. package/types/apps/src/implementation/provider.d.ts +19 -5
  109. package/types/apps/src/implementation/router-catalog.d.ts +224 -0
  110. package/types/apps/src/implementation/router.d.ts +68 -0
  111. package/types/apps/src/implementation/runtime-yield.d.ts +7 -0
  112. package/types/apps/src/implementation/schema.d.ts +52 -1
  113. package/types/apps/src/implementation/skills.d.ts +2 -2
  114. package/types/apps/src/implementation/storage.d.ts +5 -3
  115. package/types/apps/src/implementation/ui-account-notice.d.ts +9 -0
  116. package/types/apps/src/implementation/ui-client.d.ts +2 -2
  117. package/types/apps/src/implementation/ui-document.d.ts +5 -0
  118. package/types/apps/src/implementation/ui-errors.d.ts +1 -1
  119. package/types/apps/src/implementation/ui-serving.d.ts +10 -4
  120. package/types/apps/src/implementation/ui-watch.d.ts +1 -1
  121. package/types/apps/src/implementation/upstream-error.d.ts +7 -0
  122. package/types/apps/src/implementation/webhooks.d.ts +1 -1
  123. package/types/apps/src/implementation/workflow-context.d.ts +11 -3
  124. package/types/apps/src/index.d.ts +29 -11
  125. package/types/apps/src/mcp-stdio.d.ts +2 -5
  126. package/types/apps/src/mcp.d.ts +25 -5
  127. package/types/apps/src/openapi.d.ts +6 -6
  128. package/types/apps/src/skills.d.ts +4 -4
  129. package/types/telemetry/src/browser-operations.d.ts +5 -2
  130. package/types/telemetry/src/config.d.ts +2 -2
  131. package/types/utils/src/api-error.d.ts +48 -0
  132. package/js/chunk-PYUYJRSK.js +0 -93
  133. package/js/chunk-SWPD52J7.js +0 -35
  134. package/js/chunk-W7D7WVSY.js +0 -18
  135. package/js/chunk-Z5NMEGJN.js +0 -29
  136. package/js/chunk-ZJWDMTE3.js +0 -63
  137. package/types/apps/src/contracts/dynamic-tools.d.ts +0 -13
  138. package/types/apps/src/implementation/account-operations.d.ts +0 -151
  139. package/types/apps/src/implementation/dynamic-tools.d.ts +0 -8
@@ -2,84 +2,58 @@ import {
2
2
  __export
3
3
  } from "./chunk-CZ7CSFO4.js";
4
4
 
5
- // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Option.js
6
- var Option_exports = {};
7
- __export(Option_exports, {
8
- Do: () => Do,
9
- all: () => all,
10
- andThen: () => andThen,
11
- as: () => as,
12
- asVoid: () => asVoid,
13
- bind: () => bind2,
14
- bindTo: () => bindTo2,
15
- composeK: () => composeK,
16
- contains: () => contains,
17
- containsWith: () => containsWith,
18
- exists: () => exists,
19
- filter: () => filter,
20
- filterMap: () => filterMap,
21
- firstSomeOf: () => firstSomeOf,
22
- flatMap: () => flatMap,
23
- flatMapNullishOr: () => flatMapNullishOr,
24
- flatten: () => flatten,
25
- fromIterable: () => fromIterable,
26
- fromNullOr: () => fromNullOr,
27
- fromNullishOr: () => fromNullishOr,
28
- fromUndefinedOr: () => fromUndefinedOr,
29
- gen: () => gen,
30
- getFailure: () => getFailure2,
31
- getOrElse: () => getOrElse,
32
- getOrNull: () => getOrNull,
33
- getOrThrow: () => getOrThrow,
34
- getOrThrowWith: () => getOrThrowWith,
35
- getOrUndefined: () => getOrUndefined,
36
- getSuccess: () => getSuccess2,
37
- isNone: () => isNone2,
38
- isOption: () => isOption2,
39
- isSome: () => isSome2,
40
- let: () => let_2,
41
- lift2: () => lift2,
42
- liftNullishOr: () => liftNullishOr,
43
- liftPredicate: () => liftPredicate,
44
- liftThrowable: () => liftThrowable,
45
- makeCombinerFailFast: () => makeCombinerFailFast,
46
- makeEquivalence: () => makeEquivalence,
47
- makeOrder: () => makeOrder,
48
- makeReducer: () => makeReducer,
49
- makeReducerFailFast: () => makeReducerFailFast,
50
- map: () => map,
51
- match: () => match,
52
- none: () => none2,
53
- orElse: () => orElse,
54
- orElseResult: () => orElseResult,
55
- orElseSome: () => orElseSome,
56
- partitionMap: () => partitionMap,
57
- product: () => product,
58
- productMany: () => productMany,
59
- reduceCompact: () => reduceCompact,
60
- some: () => some2,
61
- tap: () => tap,
62
- toArray: () => toArray,
63
- toRefinement: () => toRefinement,
64
- void: () => void_,
65
- zipLeft: () => zipLeft,
66
- zipRight: () => zipRight,
67
- zipWith: () => zipWith
5
+ // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Predicate.js
6
+ var Predicate_exports = {};
7
+ __export(Predicate_exports, {
8
+ Struct: () => Struct,
9
+ Tuple: () => Tuple,
10
+ and: () => and,
11
+ compose: () => compose,
12
+ eqv: () => eqv,
13
+ every: () => every,
14
+ hasProperty: () => hasProperty,
15
+ implies: () => implies,
16
+ isBigInt: () => isBigInt,
17
+ isBoolean: () => isBoolean,
18
+ isDate: () => isDate,
19
+ isError: () => isError,
20
+ isFunction: () => isFunction,
21
+ isIterable: () => isIterable,
22
+ isMap: () => isMap,
23
+ isNever: () => isNever,
24
+ isNotNull: () => isNotNull,
25
+ isNotNullish: () => isNotNullish,
26
+ isNotUndefined: () => isNotUndefined,
27
+ isNull: () => isNull,
28
+ isNullish: () => isNullish,
29
+ isNumber: () => isNumber,
30
+ isObject: () => isObject,
31
+ isObjectKeyword: () => isObjectKeyword,
32
+ isObjectOrArray: () => isObjectOrArray,
33
+ isPromise: () => isPromise,
34
+ isPromiseLike: () => isPromiseLike,
35
+ isPropertyKey: () => isPropertyKey,
36
+ isReadonlyObject: () => isReadonlyObject,
37
+ isRegExp: () => isRegExp,
38
+ isSet: () => isSet,
39
+ isString: () => isString,
40
+ isSymbol: () => isSymbol,
41
+ isTagged: () => isTagged,
42
+ isTruthy: () => isTruthy,
43
+ isTupleOf: () => isTupleOf,
44
+ isTupleOfAtLeast: () => isTupleOfAtLeast,
45
+ isUint8Array: () => isUint8Array,
46
+ isUndefined: () => isUndefined,
47
+ isUnknown: () => isUnknown,
48
+ mapInput: () => mapInput,
49
+ nand: () => nand,
50
+ nor: () => nor,
51
+ not: () => not,
52
+ or: () => or,
53
+ some: () => some,
54
+ xor: () => xor
68
55
  });
69
56
 
70
- // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Combiner.js
71
- function make(combine5) {
72
- return {
73
- combine: combine5
74
- };
75
- }
76
- function min(order) {
77
- return make((self, that) => order(self, that) === -1 ? self : that);
78
- }
79
- function max(order) {
80
- return make((self, that) => order(self, that) === 1 ? self : that);
81
- }
82
-
83
57
  // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Pipeable.js
84
58
  var pipeArguments = (self, args2) => {
85
59
  switch (args2.length) {
@@ -236,30 +210,19 @@ function memoizeIdempotent(f) {
236
210
  };
237
211
  }
238
212
 
239
- // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/internal/equal.js
240
- var getAllObjectKeys = (obj) => {
241
- const keys4 = new Set(Reflect.ownKeys(obj));
242
- if (obj.constructor === Object) return keys4;
243
- if (obj instanceof Error) {
244
- keys4.delete("stack");
245
- }
246
- const proto = Object.getPrototypeOf(obj);
247
- let current = proto;
248
- while (current !== null && current !== Object.prototype) {
249
- const ownKeys = Reflect.ownKeys(current);
250
- for (let i = 0; i < ownKeys.length; i++) {
251
- keys4.add(ownKeys[i]);
252
- }
253
- current = Object.getPrototypeOf(current);
254
- }
255
- if (keys4.has("constructor") && typeof obj.constructor === "function" && proto === obj.constructor.prototype) {
256
- keys4.delete("constructor");
257
- }
258
- return keys4;
259
- };
260
- var byReferenceInstances = /* @__PURE__ */ new WeakSet();
261
-
262
213
  // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Predicate.js
214
+ var mapInput = /* @__PURE__ */ dual(2, (self, f) => (b) => self(f(b)));
215
+ var isTupleOf = /* @__PURE__ */ dual(2, (self, n) => self.length === n);
216
+ var isTupleOfAtLeast = /* @__PURE__ */ dual(2, (self, n) => self.length >= n);
217
+ function isTruthy(input) {
218
+ return !!input;
219
+ }
220
+ function isSet(input) {
221
+ return input instanceof Set;
222
+ }
223
+ function isMap(input) {
224
+ return input instanceof Map;
225
+ }
263
226
  function isString(input) {
264
227
  return typeof input === "string";
265
228
  }
@@ -290,6 +253,12 @@ function isNotUndefined(input) {
290
253
  function isNull(input) {
291
254
  return input === null;
292
255
  }
256
+ function isNotNull(input) {
257
+ return input !== null;
258
+ }
259
+ function isNullish(input) {
260
+ return input === null || input === void 0;
261
+ }
293
262
  function isNotNullish(input) {
294
263
  return input != null;
295
264
  }
@@ -299,9 +268,15 @@ function isNever(_) {
299
268
  function isUnknown(_) {
300
269
  return true;
301
270
  }
271
+ function isObjectOrArray(input) {
272
+ return typeof input === "object" && input !== null;
273
+ }
302
274
  function isObject(input) {
303
275
  return typeof input === "object" && input !== null && !Array.isArray(input);
304
276
  }
277
+ function isReadonlyObject(input) {
278
+ return isObject(input);
279
+ }
305
280
  function isObjectKeyword(input) {
306
281
  return typeof input === "object" && input !== null || isFunction(input);
307
282
  }
@@ -310,13 +285,177 @@ var isTagged = /* @__PURE__ */ dual(2, (self, tag4) => hasProperty(self, "_tag")
310
285
  function isError(input) {
311
286
  return input instanceof Error;
312
287
  }
288
+ function isUint8Array(input) {
289
+ return input instanceof Uint8Array;
290
+ }
313
291
  function isDate(input) {
314
292
  return input instanceof Date;
315
293
  }
316
294
  function isIterable(input) {
317
295
  return hasProperty(input, Symbol.iterator) || isString(input);
318
296
  }
297
+ function isPromise(input) {
298
+ return hasProperty(input, "then") && "catch" in input && isFunction(input.then) && isFunction(input.catch);
299
+ }
300
+ function isPromiseLike(input) {
301
+ return hasProperty(input, "then") && isFunction(input.then);
302
+ }
303
+ function isRegExp(input) {
304
+ return input instanceof RegExp;
305
+ }
306
+ var compose = /* @__PURE__ */ dual(2, (ab, bc) => (a) => ab(a) && bc(a));
307
+ function Tuple(elements) {
308
+ return (as5) => {
309
+ for (let i = 0; i < elements.length; i++) {
310
+ if (elements[i](as5[i]) === false) {
311
+ return false;
312
+ }
313
+ }
314
+ return true;
315
+ };
316
+ }
317
+ function Struct(fields) {
318
+ const keys4 = Object.keys(fields);
319
+ return (a) => {
320
+ for (const key of keys4) {
321
+ if (!fields[key](a[key])) {
322
+ return false;
323
+ }
324
+ }
325
+ return true;
326
+ };
327
+ }
328
+ function not(self) {
329
+ return (a) => !self(a);
330
+ }
319
331
  var or = /* @__PURE__ */ dual(2, (self, that) => (a) => self(a) || that(a));
332
+ var and = /* @__PURE__ */ dual(2, (self, that) => (a) => self(a) && that(a));
333
+ var xor = /* @__PURE__ */ dual(2, (self, that) => (a) => self(a) !== that(a));
334
+ var eqv = /* @__PURE__ */ dual(2, (self, that) => (a) => self(a) === that(a));
335
+ var implies = /* @__PURE__ */ dual(2, (antecedent, consequent) => (a) => antecedent(a) ? consequent(a) : true);
336
+ var nor = /* @__PURE__ */ dual(2, (self, that) => (a) => !(self(a) || that(a)));
337
+ var nand = /* @__PURE__ */ dual(2, (self, that) => (a) => !(self(a) && that(a)));
338
+ function every(collection) {
339
+ return (a) => {
340
+ for (const p of collection) {
341
+ if (!p(a)) {
342
+ return false;
343
+ }
344
+ }
345
+ return true;
346
+ };
347
+ }
348
+ function some(collection) {
349
+ return (a) => {
350
+ for (const p of collection) {
351
+ if (p(a)) {
352
+ return true;
353
+ }
354
+ }
355
+ return false;
356
+ };
357
+ }
358
+
359
+ // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Option.js
360
+ var Option_exports = {};
361
+ __export(Option_exports, {
362
+ Do: () => Do,
363
+ all: () => all,
364
+ andThen: () => andThen,
365
+ as: () => as,
366
+ asVoid: () => asVoid,
367
+ bind: () => bind2,
368
+ bindTo: () => bindTo2,
369
+ composeK: () => composeK,
370
+ contains: () => contains,
371
+ containsWith: () => containsWith,
372
+ exists: () => exists,
373
+ filter: () => filter,
374
+ filterMap: () => filterMap,
375
+ firstSomeOf: () => firstSomeOf,
376
+ flatMap: () => flatMap,
377
+ flatMapNullishOr: () => flatMapNullishOr,
378
+ flatten: () => flatten,
379
+ fromIterable: () => fromIterable,
380
+ fromNullOr: () => fromNullOr,
381
+ fromNullishOr: () => fromNullishOr,
382
+ fromUndefinedOr: () => fromUndefinedOr,
383
+ gen: () => gen,
384
+ getFailure: () => getFailure2,
385
+ getOrElse: () => getOrElse,
386
+ getOrNull: () => getOrNull,
387
+ getOrThrow: () => getOrThrow,
388
+ getOrThrowWith: () => getOrThrowWith,
389
+ getOrUndefined: () => getOrUndefined,
390
+ getSuccess: () => getSuccess2,
391
+ isNone: () => isNone2,
392
+ isOption: () => isOption2,
393
+ isSome: () => isSome2,
394
+ let: () => let_2,
395
+ lift2: () => lift2,
396
+ liftNullishOr: () => liftNullishOr,
397
+ liftPredicate: () => liftPredicate,
398
+ liftThrowable: () => liftThrowable,
399
+ makeCombinerFailFast: () => makeCombinerFailFast,
400
+ makeEquivalence: () => makeEquivalence,
401
+ makeOrder: () => makeOrder,
402
+ makeReducer: () => makeReducer,
403
+ makeReducerFailFast: () => makeReducerFailFast,
404
+ map: () => map,
405
+ match: () => match,
406
+ none: () => none2,
407
+ orElse: () => orElse,
408
+ orElseResult: () => orElseResult,
409
+ orElseSome: () => orElseSome,
410
+ partitionMap: () => partitionMap,
411
+ product: () => product,
412
+ productMany: () => productMany,
413
+ reduceCompact: () => reduceCompact,
414
+ some: () => some3,
415
+ tap: () => tap,
416
+ toArray: () => toArray,
417
+ toRefinement: () => toRefinement,
418
+ void: () => void_,
419
+ zipLeft: () => zipLeft,
420
+ zipRight: () => zipRight,
421
+ zipWith: () => zipWith
422
+ });
423
+
424
+ // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Combiner.js
425
+ function make(combine5) {
426
+ return {
427
+ combine: combine5
428
+ };
429
+ }
430
+ function min(order) {
431
+ return make((self, that) => order(self, that) === -1 ? self : that);
432
+ }
433
+ function max(order) {
434
+ return make((self, that) => order(self, that) === 1 ? self : that);
435
+ }
436
+
437
+ // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/internal/equal.js
438
+ var getAllObjectKeys = (obj) => {
439
+ const keys4 = new Set(Reflect.ownKeys(obj));
440
+ if (obj.constructor === Object) return keys4;
441
+ if (obj instanceof Error) {
442
+ keys4.delete("stack");
443
+ }
444
+ const proto = Object.getPrototypeOf(obj);
445
+ let current = proto;
446
+ while (current !== null && current !== Object.prototype) {
447
+ const ownKeys = Reflect.ownKeys(current);
448
+ for (let i = 0; i < ownKeys.length; i++) {
449
+ keys4.add(ownKeys[i]);
450
+ }
451
+ current = Object.getPrototypeOf(current);
452
+ }
453
+ if (keys4.has("constructor") && typeof obj.constructor === "function" && proto === obj.constructor.prototype) {
454
+ keys4.delete("constructor");
455
+ }
456
+ return keys4;
457
+ };
458
+ var byReferenceInstances = /* @__PURE__ */ new WeakSet();
320
459
 
321
460
  // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Hash.js
322
461
  var symbol = "~effect/Hash";
@@ -648,7 +787,7 @@ function make2(combine5, initialValue, combineAll) {
648
787
  var make3 = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
649
788
  var isStrictEquivalent = (x, y) => x === y;
650
789
  var strictEqual = () => isStrictEquivalent;
651
- function Tuple(elements) {
790
+ function Tuple2(elements) {
652
791
  return make3((self, that) => {
653
792
  if (self.length !== that.length) {
654
793
  return false;
@@ -1421,7 +1560,7 @@ var SomeImpl = function(value6) {
1421
1560
  this.value = value6;
1422
1561
  };
1423
1562
  SomeImpl.prototype = SomeProto;
1424
- var some = (value6) => new SomeImpl(value6);
1563
+ var some2 = (value6) => new SomeImpl(value6);
1425
1564
 
1426
1565
  // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/internal/result.js
1427
1566
  var TypeId2 = "~effect/Result";
@@ -1489,8 +1628,8 @@ var SuccessImpl = function(success) {
1489
1628
  };
1490
1629
  SuccessImpl.prototype = SuccessProto;
1491
1630
  var succeed = (success) => new SuccessImpl(success);
1492
- var getFailure = (self) => isSuccess(self) ? none : some(self.failure);
1493
- var getSuccess = (self) => isFailure(self) ? none : some(self.success);
1631
+ var getFailure = (self) => isSuccess(self) ? none : some2(self.failure);
1632
+ var getSuccess = (self) => isFailure(self) ? none : some2(self.success);
1494
1633
  var fromOption = /* @__PURE__ */ dual(2, (self, onNone2) => isNone(self) ? fail(onNone2()) : succeed(self.value));
1495
1634
 
1496
1635
  // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Order.js
@@ -1505,8 +1644,8 @@ var Number2 = /* @__PURE__ */ make4((self, that) => {
1505
1644
  return self < that ? -1 : 1;
1506
1645
  });
1507
1646
  var BigInt2 = /* @__PURE__ */ make4((self, that) => self < that ? -1 : 1);
1508
- var mapInput = /* @__PURE__ */ dual(2, (self, f) => make4((b1, b2) => self(f(b1), f(b2))));
1509
- var Date2 = /* @__PURE__ */ mapInput(Number2, (date2) => date2.getTime());
1647
+ var mapInput2 = /* @__PURE__ */ dual(2, (self, f) => make4((b1, b2) => self(f(b1), f(b2))));
1648
+ var Date2 = /* @__PURE__ */ mapInput2(Number2, (date2) => date2.getTime());
1510
1649
  var isLessThan = (O) => dual(2, (self, that) => O(self, that) === -1);
1511
1650
  var isGreaterThan = (O) => dual(2, (self, that) => O(self, that) === 1);
1512
1651
  var isLessThanOrEqualTo = (O) => dual(2, (self, that) => O(self, that) !== 1);
@@ -1518,7 +1657,7 @@ var isBetween = (O) => dual(2, (self, options) => !isLessThan(O)(self, options.m
1518
1657
 
1519
1658
  // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Option.js
1520
1659
  var none2 = () => none;
1521
- var some2 = some;
1660
+ var some3 = some2;
1522
1661
  var isOption2 = isOption;
1523
1662
  var isNone2 = isNone;
1524
1663
  var isSome2 = isSome;
@@ -1529,7 +1668,7 @@ var match = /* @__PURE__ */ dual(2, (self, {
1529
1668
  var toRefinement = (f) => (a) => isSome2(f(a));
1530
1669
  var fromIterable = (collection) => {
1531
1670
  for (const a of collection) {
1532
- return some2(a);
1671
+ return some3(a);
1533
1672
  }
1534
1673
  return none2();
1535
1674
  };
@@ -1537,7 +1676,7 @@ var getSuccess2 = getSuccess;
1537
1676
  var getFailure2 = getFailure;
1538
1677
  var getOrElse = /* @__PURE__ */ dual(2, (self, onNone2) => isNone2(self) ? onNone2() : self.value);
1539
1678
  var orElse = /* @__PURE__ */ dual(2, (self, that) => isNone2(self) ? that() : self);
1540
- var orElseSome = /* @__PURE__ */ dual(2, (self, onNone2) => isNone2(self) ? some2(onNone2()) : self);
1679
+ var orElseSome = /* @__PURE__ */ dual(2, (self, onNone2) => isNone2(self) ? some3(onNone2()) : self);
1541
1680
  var orElseResult = /* @__PURE__ */ dual(2, (self, that) => isNone2(self) ? map(that(), succeed) : map(self, fail));
1542
1681
  var firstSomeOf = (collection) => {
1543
1682
  let out = none2();
@@ -1548,15 +1687,15 @@ var firstSomeOf = (collection) => {
1548
1687
  }
1549
1688
  return out;
1550
1689
  };
1551
- var fromNullishOr = (a) => a == null ? none2() : some2(a);
1552
- var fromUndefinedOr = (a) => a === void 0 ? none2() : some2(a);
1553
- var fromNullOr = (a) => a === null ? none2() : some2(a);
1690
+ var fromNullishOr = (a) => a == null ? none2() : some3(a);
1691
+ var fromUndefinedOr = (a) => a === void 0 ? none2() : some3(a);
1692
+ var fromNullOr = (a) => a === null ? none2() : some3(a);
1554
1693
  var liftNullishOr = (f) => (...a) => fromNullishOr(f(...a));
1555
1694
  var getOrNull = /* @__PURE__ */ getOrElse(constNull);
1556
1695
  var getOrUndefined = /* @__PURE__ */ getOrElse(constUndefined);
1557
1696
  var liftThrowable = (f) => (...a) => {
1558
1697
  try {
1559
- return some2(f(...a));
1698
+ return some3(f(...a));
1560
1699
  } catch {
1561
1700
  return none2();
1562
1701
  }
@@ -1568,14 +1707,14 @@ var getOrThrowWith = /* @__PURE__ */ dual(2, (self, onNone2) => {
1568
1707
  throw onNone2();
1569
1708
  });
1570
1709
  var getOrThrow = /* @__PURE__ */ getOrThrowWith(() => new Error("getOrThrow called on a None"));
1571
- var map = /* @__PURE__ */ dual(2, (self, f) => isNone2(self) ? none2() : some2(f(self.value)));
1710
+ var map = /* @__PURE__ */ dual(2, (self, f) => isNone2(self) ? none2() : some3(f(self.value)));
1572
1711
  var as = /* @__PURE__ */ dual(2, (self, b) => map(self, () => b));
1573
1712
  var asVoid = /* @__PURE__ */ as(void 0);
1574
- var void_ = /* @__PURE__ */ some2(void 0);
1713
+ var void_ = /* @__PURE__ */ some3(void 0);
1575
1714
  var flatMap = /* @__PURE__ */ dual(2, (self, f) => isNone2(self) ? none2() : f(self.value));
1576
1715
  var andThen = /* @__PURE__ */ dual(2, (self, f) => flatMap(self, (a) => {
1577
1716
  const b = isFunction(f) ? f(a) : f;
1578
- return isOption2(b) ? b : some2(b);
1717
+ return isOption2(b) ? b : some3(b);
1579
1718
  }));
1580
1719
  var flatMapNullishOr = /* @__PURE__ */ dual(2, (self, f) => isNone2(self) ? none2() : fromNullishOr(f(self.value)));
1581
1720
  var flatten = /* @__PURE__ */ flatMap(identity);
@@ -1583,7 +1722,7 @@ var zipRight = /* @__PURE__ */ dual(2, (self, that) => flatMap(self, () => that)
1583
1722
  var zipLeft = /* @__PURE__ */ dual(2, (self, that) => tap(self, () => that));
1584
1723
  var composeK = /* @__PURE__ */ dual(2, (afb, bfc) => (a) => flatMap(afb(a), bfc));
1585
1724
  var tap = /* @__PURE__ */ dual(2, (self, f) => flatMap(self, (a) => map(f(a), () => a)));
1586
- var product = (self, that) => isSome2(self) && isSome2(that) ? some2([self.value, that.value]) : none2();
1725
+ var product = (self, that) => isSome2(self) && isSome2(that) ? some3([self.value, that.value]) : none2();
1587
1726
  var productMany = (self, collection) => {
1588
1727
  if (isNone2(self)) {
1589
1728
  return none2();
@@ -1595,7 +1734,7 @@ var productMany = (self, collection) => {
1595
1734
  }
1596
1735
  out.push(o.value);
1597
1736
  }
1598
- return some2(out);
1737
+ return some3(out);
1599
1738
  };
1600
1739
  var all = (input) => {
1601
1740
  if (Symbol.iterator in input) {
@@ -1606,7 +1745,7 @@ var all = (input) => {
1606
1745
  }
1607
1746
  out2.push(o.value);
1608
1747
  }
1609
- return some2(out2);
1748
+ return some3(out2);
1610
1749
  }
1611
1750
  const out = {};
1612
1751
  for (const key of Object.keys(input)) {
@@ -1616,7 +1755,7 @@ var all = (input) => {
1616
1755
  }
1617
1756
  assignProperty(out, key, o.value);
1618
1757
  }
1619
- return some2(out);
1758
+ return some3(out);
1620
1759
  };
1621
1760
  var zipWith = /* @__PURE__ */ dual(3, (self, that, f) => map(product(self, that), ([a, b]) => f(a, b)));
1622
1761
  var reduceCompact = /* @__PURE__ */ dual(3, (self, b, f) => {
@@ -1634,27 +1773,27 @@ var partitionMap = /* @__PURE__ */ dual(2, (self, f) => {
1634
1773
  return [none2(), none2()];
1635
1774
  }
1636
1775
  const e = f(self.value);
1637
- return isFailure(e) ? [some2(e.failure), none2()] : [none2(), some2(e.success)];
1776
+ return isFailure(e) ? [some3(e.failure), none2()] : [none2(), some3(e.success)];
1638
1777
  });
1639
1778
  var filterMap = /* @__PURE__ */ dual(2, (self, f) => {
1640
1779
  if (isNone2(self)) {
1641
1780
  return none2();
1642
1781
  }
1643
1782
  const next2 = f(self.value);
1644
- return isSuccess(next2) ? some2(next2.success) : none2();
1783
+ return isSuccess(next2) ? some3(next2.success) : none2();
1645
1784
  });
1646
- var filter = /* @__PURE__ */ dual(2, (self, predicate) => isNone2(self) ? none2() : predicate(self.value) ? some2(self.value) : none2());
1785
+ var filter = /* @__PURE__ */ dual(2, (self, predicate) => isNone2(self) ? none2() : predicate(self.value) ? some3(self.value) : none2());
1647
1786
  var makeEquivalence = (isEquivalent) => make3((x, y) => isNone2(x) ? isNone2(y) : isNone2(y) ? false : isEquivalent(x.value, y.value));
1648
1787
  var makeOrder = (O) => make4((self, that) => isSome2(self) ? isSome2(that) ? O(self.value, that.value) : 1 : -1);
1649
1788
  var lift2 = (f) => dual(2, (self, that) => zipWith(self, that, f));
1650
- var liftPredicate = /* @__PURE__ */ dual(2, (b, predicate) => predicate(b) ? some2(b) : none2());
1789
+ var liftPredicate = /* @__PURE__ */ dual(2, (b, predicate) => predicate(b) ? some3(b) : none2());
1651
1790
  var containsWith = (isEquivalent) => dual(2, (self, a) => isNone2(self) ? false : isEquivalent(self.value, a));
1652
1791
  var contains = /* @__PURE__ */ containsWith(/* @__PURE__ */ asEquivalence());
1653
1792
  var exists = /* @__PURE__ */ dual(2, (self, refinement) => isNone2(self) ? false : refinement(self.value));
1654
1793
  var bindTo2 = /* @__PURE__ */ bindTo(map);
1655
1794
  var let_2 = /* @__PURE__ */ let_(map);
1656
1795
  var bind2 = /* @__PURE__ */ bind(map, flatMap);
1657
- var Do = /* @__PURE__ */ some2({});
1796
+ var Do = /* @__PURE__ */ some3({});
1658
1797
  var gen = (...args2) => {
1659
1798
  const f = args2.length === 1 ? args2[0] : args2[1].bind(args2[0]);
1660
1799
  const iterator = f();
@@ -1666,24 +1805,24 @@ var gen = (...args2) => {
1666
1805
  }
1667
1806
  state = iterator.next(current.value);
1668
1807
  }
1669
- return some2(state.value);
1808
+ return some3(state.value);
1670
1809
  };
1671
1810
  function makeReducer(combiner) {
1672
1811
  return make2((self, that) => {
1673
1812
  if (isNone2(self)) return that;
1674
1813
  if (isNone2(that)) return self;
1675
- return some2(combiner.combine(self.value, that.value));
1814
+ return some3(combiner.combine(self.value, that.value));
1676
1815
  }, none2());
1677
1816
  }
1678
1817
  function makeCombinerFailFast(combiner) {
1679
1818
  return make((self, that) => {
1680
1819
  if (isNone2(self) || isNone2(that)) return none2();
1681
- return some2(combiner.combine(self.value, that.value));
1820
+ return some3(combiner.combine(self.value, that.value));
1682
1821
  });
1683
1822
  }
1684
1823
  function makeReducerFailFast(reducer) {
1685
1824
  const combine5 = makeCombinerFailFast(reducer).combine;
1686
- const initialValue = some2(reducer.initialValue);
1825
+ const initialValue = some3(reducer.initialValue);
1687
1826
  return make2(combine5, initialValue, (collection) => {
1688
1827
  let out = initialValue;
1689
1828
  for (const value6 of collection) {
@@ -1918,8 +2057,8 @@ var serviceNotFoundError = (service4) => {
1918
2057
  };
1919
2058
  var getOption = /* @__PURE__ */ dual(2, (self, service4) => {
1920
2059
  const value6 = lookup(self, service4.key);
1921
- if (value6 !== notFound) return some2(value6);
1922
- return isReference(service4) ? some2(getDefaultValue(service4)) : none2();
2060
+ if (value6 !== notFound) return some3(value6);
2061
+ return isReference(service4) ? some3(getDefaultValue(service4)) : none2();
1923
2062
  });
1924
2063
  var merge = /* @__PURE__ */ dual(2, (self, that) => {
1925
2064
  if (self.mapUnsafe.size === 0) return that;
@@ -2276,11 +2415,11 @@ var bind3 = /* @__PURE__ */ bind(map2, flatMap2);
2276
2415
  var bindTo3 = /* @__PURE__ */ bindTo(map2);
2277
2416
  var let_3 = /* @__PURE__ */ let_(map2);
2278
2417
  var transposeOption = (self) => {
2279
- return isNone(self) ? succeedNone : map2(self.value, some);
2418
+ return isNone(self) ? succeedNone : map2(self.value, some2);
2280
2419
  };
2281
- var transposeMapOption = /* @__PURE__ */ dual(2, (self, f) => isNone(self) ? succeedNone : map2(f(self.value), some));
2420
+ var transposeMapOption = /* @__PURE__ */ dual(2, (self, f) => isNone(self) ? succeedNone : map2(f(self.value), some2));
2282
2421
  var succeedNone = /* @__PURE__ */ succeed2(none);
2283
- var succeedSome = (a) => succeed2(some(a));
2422
+ var succeedSome = (a) => succeed2(some2(a));
2284
2423
  var tap2 = /* @__PURE__ */ dual(2, (self, f) => {
2285
2424
  if (isSuccess2(self)) {
2286
2425
  f(self.success);
@@ -2289,7 +2428,7 @@ var tap2 = /* @__PURE__ */ dual(2, (self, f) => {
2289
2428
  });
2290
2429
 
2291
2430
  // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Tuple.js
2292
- var makeEquivalence3 = Tuple;
2431
+ var makeEquivalence3 = Tuple2;
2293
2432
 
2294
2433
  // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Iterable.js
2295
2434
  var makeBy = (f, options) => {
@@ -2330,7 +2469,7 @@ var findFirst = /* @__PURE__ */ dual(2, (self, f) => {
2330
2469
  const o = f(a, i);
2331
2470
  if (isBoolean(o)) {
2332
2471
  if (o) {
2333
- return some2(a);
2472
+ return some3(a);
2334
2473
  }
2335
2474
  } else {
2336
2475
  if (isSome2(o)) {
@@ -3003,16 +3142,16 @@ var divide = /* @__PURE__ */ dual(2, (self, by) => {
3003
3142
  if (!Number.isFinite(by)) return none2();
3004
3143
  if (by === 0 || Object.is(by, -0)) return none2();
3005
3144
  return match3(self, {
3006
- onMillis: (millis2) => some2(make6(millis2 / by)),
3145
+ onMillis: (millis2) => some3(make6(millis2 / by)),
3007
3146
  onNanos: (nanos2) => {
3008
3147
  try {
3009
- return some2(make6(nanos2 / BigInt(by)));
3148
+ return some3(make6(nanos2 / BigInt(by)));
3010
3149
  } catch {
3011
3150
  return none2();
3012
3151
  }
3013
3152
  },
3014
- onInfinity: () => some2(by > 0 ? infinity : negativeInfinity),
3015
- onNegativeInfinity: () => some2(by > 0 ? negativeInfinity : infinity)
3153
+ onInfinity: () => some3(by > 0 ? infinity : negativeInfinity),
3154
+ onNegativeInfinity: () => some3(by > 0 ? negativeInfinity : infinity)
3016
3155
  });
3017
3156
  });
3018
3157
  var divideUnsafe = /* @__PURE__ */ dual(2, (self, by) => {
@@ -3153,7 +3292,7 @@ var CombinerMin = /* @__PURE__ */ min(Order);
3153
3292
  var fromPredicate = (predicate) => (input) => predicate(input) ? succeed2(input) : fail2(input);
3154
3293
  var toPredicate = (self) => (input) => !isFailure2(self(input));
3155
3294
  var has2 = (key) => (input) => input.has(key) ? succeed2(input) : fail2(input);
3156
- var compose = /* @__PURE__ */ dual(2, (left, right) => (input) => {
3295
+ var compose2 = /* @__PURE__ */ dual(2, (left, right) => (input) => {
3157
3296
  const leftOut = left(input);
3158
3297
  if (isFailure2(leftOut)) return leftOut;
3159
3298
  return right(leftOut.success);
@@ -3167,7 +3306,7 @@ var composePassthrough = /* @__PURE__ */ dual(2, (left, right) => (input) => {
3167
3306
  });
3168
3307
  var toOption = (self) => (input) => {
3169
3308
  const result6 = self(input);
3170
- return isFailure2(result6) ? none2() : some2(result6.success);
3309
+ return isFailure2(result6) ? none2() : some3(result6.success);
3171
3310
  };
3172
3311
 
3173
3312
  // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Tracer.js
@@ -4288,9 +4427,9 @@ var yieldNowWith = /* @__PURE__ */ makePrimitive({
4288
4427
  }
4289
4428
  });
4290
4429
  var yieldNow = /* @__PURE__ */ yieldNowWith(0);
4291
- var succeedSome2 = (a) => succeed3(some2(a));
4430
+ var succeedSome2 = (a) => succeed3(some3(a));
4292
4431
  var succeedNone2 = /* @__PURE__ */ succeed3(/* @__PURE__ */ none2());
4293
- var transposeOption2 = (self) => isNone2(self) ? succeedNone2 : map5(self.value, some2);
4432
+ var transposeOption2 = (self) => isNone2(self) ? succeedNone2 : map5(self.value, some3);
4294
4433
  var failCauseSync = (evaluate2) => suspend(() => failCause(internalCall(evaluate2)));
4295
4434
  var die = (defect) => exitDie(defect);
4296
4435
  var failSync = (error) => suspend(() => fail3(internalCall(error)));
@@ -4566,7 +4705,7 @@ var tapCont = function(value6) {
4566
4705
  var tapEffectCont = function(value6) {
4567
4706
  return new ContImpl(this.payload, returnPayload, exitSucceed(value6));
4568
4707
  };
4569
- var asSome = (self) => map5(self, some2);
4708
+ var asSome = (self) => map5(self, some3);
4570
4709
  var flip2 = (self) => matchEffect(self, {
4571
4710
  onFailure: succeed3,
4572
4711
  onSuccess: fail3
@@ -4710,11 +4849,11 @@ var exitAsVoidAll = (exits) => {
4710
4849
  }
4711
4850
  return failures.length === 0 ? exitVoid : exitFailCause(causeFromReasons(failures));
4712
4851
  };
4713
- var exitGetSuccess = (self) => exitIsSuccess(self) ? some2(self.value) : none2();
4714
- var exitGetCause = (self) => exitIsFailure(self) ? some2(self.cause) : none2();
4852
+ var exitGetSuccess = (self) => exitIsSuccess(self) ? some3(self.value) : none2();
4853
+ var exitGetCause = (self) => exitIsFailure(self) ? some3(self.cause) : none2();
4715
4854
  var exitFindErrorOption = (self) => {
4716
4855
  const error = exitFindError(self);
4717
- return isFailure2(error) ? none2() : some2(error.success);
4856
+ return isFailure2(error) ? none2() : some3(error.success);
4718
4857
  };
4719
4858
  var service = (service4) => service4;
4720
4859
  var serviceOption = (service4) => withFiber((fiber3) => succeed3(getOption(fiber3.context, service4)));
@@ -4928,7 +5067,7 @@ var ignoreCause = /* @__PURE__ */ dual((args2) => isEffect(args2[0]), (self, opt
4928
5067
  });
4929
5068
  var option = (self) => match4(self, {
4930
5069
  onFailure: none2,
4931
- onSuccess: some2
5070
+ onSuccess: some3
4932
5071
  });
4933
5072
  var result = (self) => matchEager(self, {
4934
5073
  onFailure: fail2,
@@ -5347,7 +5486,7 @@ var findFirst3 = /* @__PURE__ */ dual((args2) => isIterable(args2[0]) && !isEffe
5347
5486
  }));
5348
5487
  var findFirstLoop = (iterator, index2, predicate, value6) => flatMap3(predicate(value6, index2), (keep) => {
5349
5488
  if (keep) {
5350
- return succeed3(some2(value6));
5489
+ return succeed3(some3(value6));
5351
5490
  }
5352
5491
  const next2 = iterator.next();
5353
5492
  if (!next2.done) {
@@ -5365,7 +5504,7 @@ var findFirstFilter = /* @__PURE__ */ dual((args2) => isIterable(args2[0]) && !i
5365
5504
  }));
5366
5505
  var findFirstFilterLoop = (iterator, index2, filter11, value6) => flatMap3(filter11(value6, index2), (result6) => {
5367
5506
  if (isSuccess2(result6)) {
5368
- return succeed3(some2(result6.success));
5507
+ return succeed3(some3(result6.success));
5369
5508
  }
5370
5509
  const next2 = iterator.next();
5371
5510
  if (!next2.done) {
@@ -5871,11 +6010,11 @@ var NoopSpanProto = {
5871
6010
  var noopSpan = (options) => Object.assign(Object.create(NoopSpanProto), options);
5872
6011
  var filterDisablePropagation = (span2) => {
5873
6012
  if (!span2) return none2();
5874
- return get(span2.annotations, DisablePropagation) ? span2._tag === "Span" ? filterDisablePropagation(getOrUndefined(span2.parent)) : none2() : some2(span2);
6013
+ return get(span2.annotations, DisablePropagation) ? span2._tag === "Span" ? filterDisablePropagation(getOrUndefined(span2.parent)) : none2() : some3(span2);
5875
6014
  };
5876
6015
  var makeSpanUnsafe = (fiber3, name, options) => {
5877
6016
  const disablePropagation = !fiber3.getRef(TracerEnabled) || options?.annotations && get(options.annotations, DisablePropagation);
5878
- const parent = options?.parent !== void 0 ? some2(options.parent) : options?.root ? none2() : filterDisablePropagation(fiber3.cache.span);
6017
+ const parent = options?.parent !== void 0 ? some3(options.parent) : options?.root ? none2() : filterDisablePropagation(fiber3.cache.span);
5879
6018
  let span2;
5880
6019
  if (disablePropagation) {
5881
6020
  span2 = noopSpan({
@@ -6167,7 +6306,7 @@ var logLevelToOrder = (level) => {
6167
6306
  return Number.MAX_SAFE_INTEGER;
6168
6307
  }
6169
6308
  };
6170
- var LogLevelOrder = /* @__PURE__ */ mapInput(Number2, logLevelToOrder);
6309
+ var LogLevelOrder = /* @__PURE__ */ mapInput2(Number2, logLevelToOrder);
6171
6310
  var isLogLevelGreaterThan = /* @__PURE__ */ isGreaterThan(LogLevelOrder);
6172
6311
  var CurrentLoggers = /* @__PURE__ */ Reference("effect/Logger/CurrentLoggers", {
6173
6312
  defaultValue: () => /* @__PURE__ */ new Set([defaultLogger, tracerLogger])
@@ -6564,17 +6703,32 @@ var doneUnsafe = (self, effect2) => {
6564
6703
  };
6565
6704
  var into = /* @__PURE__ */ dual(2, (self, deferred) => uninterruptibleMask((restore) => flatMap3(exit(restore(self)), (exit3) => done2(deferred, exit3))));
6566
6705
 
6567
- // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Effect.js
6568
- var Effect_exports = {};
6569
- __export(Effect_exports, {
6570
- Do: () => Do4,
6571
- Transaction: () => Transaction,
6572
- TypeId: () => TypeId14,
6573
- abortSignal: () => abortSignal2,
6574
- acquireDisposable: () => acquireDisposable2,
6575
- acquireRelease: () => acquireRelease2,
6576
- acquireUseRelease: () => acquireUseRelease2,
6577
- addFinalizer: () => addFinalizer3,
6706
+ // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Clock.js
6707
+ var Clock_exports = {};
6708
+ __export(Clock_exports, {
6709
+ Clock: () => Clock,
6710
+ clockWith: () => clockWith2,
6711
+ currentTimeMillis: () => currentTimeMillis2,
6712
+ currentTimeNanos: () => currentTimeNanos2,
6713
+ monotonicTimeNanos: () => monotonicTimeNanos2
6714
+ });
6715
+ var Clock = ClockRef;
6716
+ var clockWith2 = clockWith;
6717
+ var currentTimeMillis2 = currentTimeMillis;
6718
+ var currentTimeNanos2 = currentTimeNanos;
6719
+ var monotonicTimeNanos2 = monotonicTimeNanos;
6720
+
6721
+ // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Effect.js
6722
+ var Effect_exports = {};
6723
+ __export(Effect_exports, {
6724
+ Do: () => Do4,
6725
+ Transaction: () => Transaction,
6726
+ TypeId: () => TypeId14,
6727
+ abortSignal: () => abortSignal2,
6728
+ acquireDisposable: () => acquireDisposable2,
6729
+ acquireRelease: () => acquireRelease2,
6730
+ acquireUseRelease: () => acquireUseRelease2,
6731
+ addFinalizer: () => addFinalizer3,
6578
6732
  all: () => all4,
6579
6733
  andThen: () => andThen4,
6580
6734
  annotateCurrentSpan: () => annotateCurrentSpan2,
@@ -7356,21 +7510,6 @@ __export(Cron_exports, {
7356
7510
  sequence: () => sequence
7357
7511
  });
7358
7512
 
7359
- // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Clock.js
7360
- var Clock_exports = {};
7361
- __export(Clock_exports, {
7362
- Clock: () => Clock,
7363
- clockWith: () => clockWith2,
7364
- currentTimeMillis: () => currentTimeMillis2,
7365
- currentTimeNanos: () => currentTimeNanos2,
7366
- monotonicTimeNanos: () => monotonicTimeNanos2
7367
- });
7368
- var Clock = ClockRef;
7369
- var clockWith2 = clockWith;
7370
- var currentTimeMillis2 = currentTimeMillis;
7371
- var currentTimeNanos2 = currentTimeNanos;
7372
- var monotonicTimeNanos2 = monotonicTimeNanos;
7373
-
7374
7513
  // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/internal/dateTime.js
7375
7514
  var TypeId9 = "~effect/DateTime";
7376
7515
  var TimeZoneTypeId = "~effect/DateTime/TimeZone";
@@ -7619,7 +7758,7 @@ var offsetZoneRegExp = /^(?:GMT|[+-])/;
7619
7758
  var zoneFromString = (zone) => {
7620
7759
  if (offsetZoneRegExp.test(zone)) {
7621
7760
  const offset = parseOffset(zone);
7622
- return offset === null ? none2() : some2(zoneMakeOffset(offset));
7761
+ return offset === null ? none2() : some3(zoneMakeOffset(offset));
7623
7762
  }
7624
7763
  return zoneMakeNamed(zone);
7625
7764
  };
@@ -7843,19 +7982,19 @@ var nextPow2 = (n) => {
7843
7982
  };
7844
7983
  var parse = (s) => {
7845
7984
  if (s === "NaN") {
7846
- return some2(NaN);
7985
+ return some3(NaN);
7847
7986
  }
7848
7987
  if (s === "Infinity") {
7849
- return some2(Infinity);
7988
+ return some3(Infinity);
7850
7989
  }
7851
7990
  if (s === "-Infinity") {
7852
- return some2(-Infinity);
7991
+ return some3(-Infinity);
7853
7992
  }
7854
7993
  if (s.trim() === "") {
7855
7994
  return none2();
7856
7995
  }
7857
7996
  const n = Number3(s);
7858
- return Number3.isNaN(n) ? none2() : some2(n);
7997
+ return Number3.isNaN(n) ? none2() : some3(n);
7859
7998
  };
7860
7999
 
7861
8000
  // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/String.js
@@ -8818,7 +8957,7 @@ var repeatOrElse = /* @__PURE__ */ dual(3, (self, schedule4, orElse6) => flatMap
8818
8957
  meta = meta_;
8819
8958
  })), {
8820
8959
  disableYield: true
8821
- }), (error) => isDone(error) ? succeed3(error.value) : orElse6(error, meta.attempt === 0 ? none2() : some2(meta)));
8960
+ }), (error) => isDone(error) ? succeed3(error.value) : orElse6(error, meta.attempt === 0 ? none2() : some3(meta)));
8822
8961
  }));
8823
8962
  var retryOrElse = /* @__PURE__ */ dual(3, (self, policy, orElse6) => flatMap3(toStepWithMetadata(policy), (step) => {
8824
8963
  let meta = CurrentMetadata2.defaultValue();
@@ -9140,7 +9279,7 @@ __export(Metric_exports, {
9140
9279
  histogram: () => histogram,
9141
9280
  isMetric: () => isMetric,
9142
9281
  linearBoundaries: () => linearBoundaries,
9143
- mapInput: () => mapInput2,
9282
+ mapInput: () => mapInput3,
9144
9283
  modify: () => modify,
9145
9284
  snapshot: () => snapshot,
9146
9285
  snapshotUnsafe: () => snapshotUnsafe,
@@ -9453,7 +9592,7 @@ var counter = (name, options) => new CounterMetric(name, options);
9453
9592
  var gauge = (name, options) => new GaugeMetric(name, options);
9454
9593
  var frequency = (name, options) => new FrequencyMetric(name, options);
9455
9594
  var histogram = (name, options) => new HistogramMetric(name, options);
9456
- var summary = (name, options) => mapInput2(summaryWithTimestamp(name, options), (input, context3) => [input, get(context3, ClockRef).currentTimeMillisUnsafe()]);
9595
+ var summary = (name, options) => mapInput3(summaryWithTimestamp(name, options), (input, context3) => [input, get(context3, ClockRef).currentTimeMillisUnsafe()]);
9457
9596
  var summaryWithTimestamp = (name, options) => new SummaryMetric(name, options);
9458
9597
  var timer = (name, options) => {
9459
9598
  const boundaries = isNotUndefined(options?.boundaries) ? options.boundaries : exponentialBoundaries({
@@ -9469,13 +9608,13 @@ var timer = (name, options) => {
9469
9608
  boundaries,
9470
9609
  attributes
9471
9610
  });
9472
- return mapInput2(metric, toMillis);
9611
+ return mapInput3(metric, toMillis);
9473
9612
  };
9474
9613
  var value = (self) => flatMap3(context(), (context3) => sync(() => self.valueUnsafe(context3)));
9475
9614
  var modify = /* @__PURE__ */ dual(2, (self, input) => flatMap3(context(), (context3) => sync(() => self.modifyUnsafe(input, context3))));
9476
9615
  var update = /* @__PURE__ */ dual(2, (self, input) => contextWith((services) => sync(() => self.updateUnsafe(input, services))));
9477
- var mapInput2 = /* @__PURE__ */ dual(2, (self, f) => new MetricTransform(self, (context3) => self.valueUnsafe(context3), (input, context3) => self.updateUnsafe(f(input, context3), context3), (input, context3) => self.modifyUnsafe(f(input, context3), context3)));
9478
- var withConstantInput = /* @__PURE__ */ dual(2, (self, input) => mapInput2(self, () => input));
9616
+ var mapInput3 = /* @__PURE__ */ dual(2, (self, f) => new MetricTransform(self, (context3) => self.valueUnsafe(context3), (input, context3) => self.updateUnsafe(f(input, context3), context3), (input, context3) => self.modifyUnsafe(f(input, context3), context3)));
9617
+ var withConstantInput = /* @__PURE__ */ dual(2, (self, input) => mapInput3(self, () => input));
9479
9618
  var withAttributes = /* @__PURE__ */ dual(2, (self, attributes) => new MetricTransform(self, (context3) => self.valueUnsafe(addAttributesToContext(context3, attributes)), (input, context3) => self.updateUnsafe(input, addAttributesToContext(context3, attributes)), (input, context3) => self.modifyUnsafe(input, addAttributesToContext(context3, attributes))));
9480
9619
  var snapshot = /* @__PURE__ */ map5(/* @__PURE__ */ context(), (context3) => snapshotUnsafe(context3));
9481
9620
  var dump = /* @__PURE__ */ flatMap3(/* @__PURE__ */ context(), (context3) => {
@@ -10306,7 +10445,7 @@ __export(Schema_exports, {
10306
10445
  StringFromBase64Url: () => StringFromBase64Url,
10307
10446
  StringFromHex: () => StringFromHex,
10308
10447
  StringFromUriComponent: () => StringFromUriComponent,
10309
- Struct: () => Struct,
10448
+ Struct: () => Struct2,
10310
10449
  StructWithRest: () => StructWithRest,
10311
10450
  Symbol: () => Symbol3,
10312
10451
  TaggedClass: () => TaggedClass2,
@@ -10324,7 +10463,7 @@ __export(Schema_exports, {
10324
10463
  Trim: () => Trim,
10325
10464
  Trimmed: () => Trimmed,
10326
10465
  TrueLiterals: () => TrueLiterals,
10327
- Tuple: () => Tuple2,
10466
+ Tuple: () => Tuple3,
10328
10467
  TupleWithRest: () => TupleWithRest,
10329
10468
  URL: () => URL2,
10330
10469
  URLFromString: () => URLFromString,
@@ -10620,7 +10759,7 @@ var Equivalence4 = /* @__PURE__ */ make3((self, that) => compare(self, that) ===
10620
10759
  var equals4 = /* @__PURE__ */ dual(2, (self, that) => Equivalence4(self, that));
10621
10760
  var fromString = (s) => {
10622
10761
  if (s === "") {
10623
- return some2(zero2);
10762
+ return some3(zero2);
10624
10763
  }
10625
10764
  let base;
10626
10765
  let exp;
@@ -10655,7 +10794,7 @@ var fromString = (s) => {
10655
10794
  if (!Number.isSafeInteger(scale)) {
10656
10795
  return none2();
10657
10796
  }
10658
- return some2(make14(BigInt(digits), scale));
10797
+ return some3(make14(BigInt(digits), scale));
10659
10798
  };
10660
10799
  var format4 = (n) => {
10661
10800
  const normalized = normalize2(n);
@@ -10707,7 +10846,7 @@ var toNumber = (b) => {
10707
10846
  if (b > BigInt3(Number.MAX_SAFE_INTEGER) || b < BigInt3(Number.MIN_SAFE_INTEGER)) {
10708
10847
  return none2();
10709
10848
  }
10710
- return some2(Number(b));
10849
+ return some3(Number(b));
10711
10850
  };
10712
10851
 
10713
10852
  // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/ByteSize.js
@@ -11140,7 +11279,7 @@ var LeafNode = class _LeafNode extends Node {
11140
11279
  }
11141
11280
  get(_shift, hash2, key) {
11142
11281
  if (this.hash === hash2 && equals(this.key, key)) {
11143
- return some2(this.value);
11282
+ return some3(this.value);
11144
11283
  }
11145
11284
  return none2();
11146
11285
  }
@@ -11205,7 +11344,7 @@ var CollisionNode = class _CollisionNode extends Node {
11205
11344
  }
11206
11345
  for (const [k, v] of this.entries) {
11207
11346
  if (equals(k, key)) {
11208
- return some2(v);
11347
+ return some3(v);
11209
11348
  }
11210
11349
  }
11211
11350
  return none2();
@@ -11717,7 +11856,7 @@ var HashSetProto = {
11717
11856
  return hash(HashSetTypeId);
11718
11857
  },
11719
11858
  [symbol2](that) {
11720
- return isHashSet(that) && size4(this) === size4(that) && every2(this, (value6) => has4(that, value6));
11859
+ return isHashSet(that) && size4(this) === size4(that) && every3(this, (value6) => has4(that, value6));
11721
11860
  },
11722
11861
  [Symbol.iterator]() {
11723
11862
  return keys2(keyMap(this));
@@ -11755,7 +11894,7 @@ var fromIterable6 = (values2) => {
11755
11894
  };
11756
11895
  var has4 = (self, value6) => has3(keyMap(self), value6);
11757
11896
  var size4 = (self) => size2(keyMap(self));
11758
- var every2 = (self, predicate) => {
11897
+ var every3 = (self, predicate) => {
11759
11898
  for (const value6 of self) {
11760
11899
  if (!predicate(value6)) {
11761
11900
  return false;
@@ -11846,7 +11985,7 @@ var make19 = (type3, mutable3) => {
11846
11985
  graph.reverseAdjacency = /* @__PURE__ */ new Map();
11847
11986
  graph.nextNodeIndex = 0;
11848
11987
  graph.nextEdgeIndex = 0;
11849
- graph.acyclic = some2(true);
11988
+ graph.acyclic = some3(true);
11850
11989
  return graph;
11851
11990
  };
11852
11991
  var snapshot2 = (graph) => {
@@ -11945,7 +12084,7 @@ var missing = /* @__PURE__ */ Symbol();
11945
12084
  var succeed8 = succeed5;
11946
12085
  var missingExit = /* @__PURE__ */ succeed8(missing);
11947
12086
  var sameExit = /* @__PURE__ */ succeed8(missing);
11948
- var toOption2 = (value6) => value6 === missing ? none2() : some2(value6);
12087
+ var toOption2 = (value6) => value6 === missing ? none2() : some3(value6);
11949
12088
  var fromOptionExit = (option6) => option6._tag === "None" ? missingExit : succeed8(option6.value);
11950
12089
 
11951
12090
  // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/SchemaIssue.js
@@ -12428,7 +12567,7 @@ function checkEffect(f) {
12428
12567
  return onSome((t, options) => {
12429
12568
  return f(t, options).pipe(flatMapEager2((out) => {
12430
12569
  const issue = makeSingle(out, t, options);
12431
- return issue ? fail7(issue) : succeed7(some2(t));
12570
+ return issue ? fail7(issue) : succeed7(some3(t));
12432
12571
  }));
12433
12572
  });
12434
12573
  }
@@ -12436,7 +12575,7 @@ function transform(f) {
12436
12575
  return transformOptional(map(f));
12437
12576
  }
12438
12577
  function transformEffect(f) {
12439
- return onSome((e, options) => f(e, options).pipe(mapEager2(some2)));
12578
+ return onSome((e, options) => f(e, options).pipe(mapEager2(some3)));
12440
12579
  }
12441
12580
  function transformOptional(f) {
12442
12581
  return new Getter((oe) => succeed7(f(oe)));
@@ -12447,7 +12586,7 @@ function omit2() {
12447
12586
  function withDefault(defaultValue) {
12448
12587
  return new Getter((o) => {
12449
12588
  const filtered = filter(o, isNotUndefined);
12450
- return isSome2(filtered) ? succeed7(filtered) : mapEager2(defaultValue, some2);
12589
+ return isSome2(filtered) ? succeed7(filtered) : mapEager2(defaultValue, some3);
12451
12590
  });
12452
12591
  }
12453
12592
  function String4() {
@@ -12488,7 +12627,7 @@ function toUpperCase2() {
12488
12627
  }
12489
12628
  function parseJson(options) {
12490
12629
  return onSome((input, parseOptions) => try_3({
12491
- try: () => some2(JSON.parse(input, options?.reviver)),
12630
+ try: () => some3(JSON.parse(input, options?.reviver)),
12492
12631
  catch: () => new InvalidValue({
12493
12632
  expected: "a valid JSON string"
12494
12633
  }, input, parseOptions)
@@ -12501,7 +12640,7 @@ function stringifyJson(options) {
12501
12640
  if (output === void 0) {
12502
12641
  throw new TypeError("Value cannot be represented as JSON");
12503
12642
  }
12504
- return some2(output);
12643
+ return some3(output);
12505
12644
  },
12506
12645
  catch: () => new InvalidValue({
12507
12646
  expected: "a JSON-serializable value"
@@ -12891,13 +13030,13 @@ function optionFromNullishOr(options) {
12891
13030
  }
12892
13031
  function optionFromOptionalKey() {
12893
13032
  return transformOptional2({
12894
- decode: some2,
13033
+ decode: some3,
12895
13034
  encode: flatten
12896
13035
  });
12897
13036
  }
12898
13037
  function optionFromOptional() {
12899
13038
  return transformOptional2({
12900
- decode: (ot) => ot.pipe(filter(isNotUndefined), some2),
13039
+ decode: (ot) => ot.pipe(filter(isNotUndefined), some3),
12901
13040
  encode: flatten
12902
13041
  });
12903
13042
  }
@@ -15071,7 +15210,7 @@ function makeOption(schema2) {
15071
15210
  return (input, options) => {
15072
15211
  const exit3 = runSyncExit2(parser(input, options));
15073
15212
  if (isSuccess4(exit3)) {
15074
- return some2(exit3.value);
15213
+ return some3(exit3.value);
15075
15214
  }
15076
15215
  getSchemaIssueOrThrow(exit3.cause, "Option adapter can only return none for schema issues");
15077
15216
  return none2();
@@ -15219,7 +15358,7 @@ function asOption(parser) {
15219
15358
  return (input, options) => {
15220
15359
  const exit3 = parserExit(input, options);
15221
15360
  if (isSuccess4(exit3)) {
15222
- return some2(exit3.value);
15361
+ return some3(exit3.value);
15223
15362
  }
15224
15363
  getSchemaIssueOrThrow(exit3.cause, "Option adapter can only return none for schema issues");
15225
15364
  return none2();
@@ -18284,7 +18423,7 @@ var CheckNode = class {
18284
18423
  this.get = (s) => runChecks(checks, s);
18285
18424
  }
18286
18425
  };
18287
- function compose2(a, b) {
18426
+ function compose3(a, b) {
18288
18427
  if (a.length === 0) return b;
18289
18428
  if (b.length === 0) return a;
18290
18429
  const nodes = a.slice();
@@ -18321,13 +18460,13 @@ var OptionalImpl = class {
18321
18460
  return (s) => getOrElse3(flatMap2(this.getResult(s), (a) => this.replaceResult(f(a), s)), () => s);
18322
18461
  }
18323
18462
  compose(that) {
18324
- return make23(compose2(this.node, that.node));
18463
+ return make23(compose3(this.node, that.node));
18325
18464
  }
18326
18465
  key(key) {
18327
- return make23(compose2(this.node, [new PathNode([key])]));
18466
+ return make23(compose3(this.node, [new PathNode([key])]));
18328
18467
  }
18329
18468
  optionalKey(key) {
18330
- return make23(compose2(this.node, primitiveNode("Lens", (s) => s[key], (a, s) => {
18469
+ return make23(compose3(this.node, primitiveNode("Lens", (s) => s[key], (a, s) => {
18331
18470
  const copy2 = cloneShallow(s);
18332
18471
  if (a === void 0) {
18333
18472
  if (Array.isArray(copy2) && (typeof key === "number" || typeof key === "string" && isCanonicalArrayIndex(key))) {
@@ -18342,20 +18481,20 @@ var OptionalImpl = class {
18342
18481
  })));
18343
18482
  }
18344
18483
  check(...checks) {
18345
- return make23(compose2(this.node, [new CheckNode(checks)]));
18484
+ return make23(compose3(this.node, [new CheckNode(checks)]));
18346
18485
  }
18347
18486
  refine(refinement, annotations2) {
18348
- return make23(compose2(this.node, [new CheckNode([makeFilterByGuard(refinement, annotations2)])]));
18487
+ return make23(compose3(this.node, [new CheckNode([makeFilterByGuard(refinement, annotations2)])]));
18349
18488
  }
18350
18489
  tag(tag4) {
18351
18490
  const err = fail2(new InvalidValue({
18352
18491
  expected: `${JSON.stringify(tag4)} tag`
18353
18492
  }));
18354
- return make23(compose2(this.node, primitiveNode("Prism", (s) => s._tag === tag4 ? succeed2(s) : err, identity)));
18493
+ return make23(compose3(this.node, primitiveNode("Prism", (s) => s._tag === tag4 ? succeed2(s) : err, identity)));
18355
18494
  }
18356
18495
  at(key, ..._rest) {
18357
18496
  const err = fail2(new Pointer([key], new MissingKey(void 0)));
18358
- return make23(compose2(this.node, primitiveNode("Optional", (s) => Object.hasOwn(s, key) ? succeed2(s[key]) : err, (a, s) => {
18497
+ return make23(compose3(this.node, primitiveNode("Optional", (s) => Object.hasOwn(s, key) ? succeed2(s[key]) : err, (a, s) => {
18359
18498
  if (Object.hasOwn(s, key)) {
18360
18499
  const copy2 = cloneShallow(s);
18361
18500
  assignProperty(copy2, key, a);
@@ -19991,7 +20130,7 @@ function makeStruct(ast, fields) {
19991
20130
  }
19992
20131
  });
19993
20132
  }
19994
- function Struct(fields) {
20133
+ function Struct2(fields) {
19995
20134
  return makeStruct(struct(fields, void 0), fields);
19996
20135
  }
19997
20136
  function fieldsAssign(fields) {
@@ -20019,7 +20158,7 @@ function encodeKeys(mapping) {
20019
20158
  reverseMapping[encodedKey] = k;
20020
20159
  }
20021
20160
  }
20022
- return Struct(fields).pipe(decodeTo2(self, transform2({
20161
+ return Struct2(fields).pipe(decodeTo2(self, transform2({
20023
20162
  decode: renameKeys(reverseMapping),
20024
20163
  encode: renameKeys(appliedMapping)
20025
20164
  })));
@@ -20028,7 +20167,7 @@ function encodeKeys(mapping) {
20028
20167
  function extendTo(fields, derive) {
20029
20168
  return (self) => {
20030
20169
  const f = map3(self.fields, toType2);
20031
- const to = Struct({
20170
+ const to = Struct2({
20032
20171
  ...f,
20033
20172
  ...fields
20034
20173
  });
@@ -20079,7 +20218,7 @@ function makeTuple(ast, elements) {
20079
20218
  }
20080
20219
  });
20081
20220
  }
20082
- function Tuple2(elements) {
20221
+ function Tuple3(elements) {
20083
20222
  return makeTuple(tuple(elements), elements);
20084
20223
  }
20085
20224
  function TupleWithRest(schema2, rest) {
@@ -20105,7 +20244,7 @@ var NonEmptyArray = /* @__PURE__ */ lambda((schema2) => make28(new Arrays(false,
20105
20244
  function ArrayEnsure(schema2) {
20106
20245
  const many = ArraySchema(schema2);
20107
20246
  const to = ArraySchema(toType2(schema2));
20108
- const one = decodeTo2(Tuple2([Unknown2]), transform2({
20247
+ const one = decodeTo2(Tuple3([Unknown2]), transform2({
20109
20248
  decode: (value6) => [value6],
20110
20249
  encode: ([value6]) => value6
20111
20250
  }))(schema2);
@@ -20275,7 +20414,7 @@ function tagDefaultOmit(literal) {
20275
20414
  }));
20276
20415
  }
20277
20416
  function TaggedStruct(value6, fields) {
20278
- return Struct({
20417
+ return Struct2({
20279
20418
  _tag: tag(value6),
20280
20419
  ...fields
20281
20420
  });
@@ -21554,7 +21693,7 @@ function Defect(options) {
21554
21693
  }
21555
21694
  function ReadonlyMap(key, value6) {
21556
21695
  const schema2 = declareConstructor()([key, value6], ([key2, value7]) => {
21557
- const array2 = ArraySchema(Tuple2([key2, value7]));
21696
+ const array2 = ArraySchema(Tuple3([key2, value7]));
21558
21697
  return (input, ast, options) => {
21559
21698
  if (input instanceof globalThis.Map) {
21560
21699
  return mapBothEager2(decodeUnknownEffect(array2)([...input], options), {
@@ -21576,7 +21715,7 @@ function ReadonlyMap(key, value6) {
21576
21715
  Type: `globalThis.ReadonlyMap<${typeParameters[0].Type}, ${typeParameters[1].Type}>`
21577
21716
  }),
21578
21717
  expected: "ReadonlyMap",
21579
- toCodec: ([key2, value7]) => link()(ArraySchema(Tuple2([key2, value7])), transform2({
21718
+ toCodec: ([key2, value7]) => link()(ArraySchema(Tuple3([key2, value7])), transform2({
21580
21719
  decode: (entries3) => new globalThis.Map(entries3),
21581
21720
  encode: (map17) => [...map17.entries()]
21582
21721
  }))
@@ -21629,7 +21768,7 @@ var RegExp3 = /* @__PURE__ */ instanceOf(globalThis.RegExp, {
21629
21768
  Type: `globalThis.RegExp`
21630
21769
  }),
21631
21770
  expected: "RegExp",
21632
- toCodecJson: () => link()(Struct({
21771
+ toCodecJson: () => link()(Struct2({
21633
21772
  source: String6,
21634
21773
  flags: String6
21635
21774
  }), transformEffect2({
@@ -21696,7 +21835,7 @@ var File = /* @__PURE__ */ instanceOf(globalThis.File, {
21696
21835
  Type: `globalThis.File`
21697
21836
  }),
21698
21837
  expected: "File",
21699
- toCodecJson: () => link()(Struct({
21838
+ toCodecJson: () => link()(Struct2({
21700
21839
  data: String6.check(isBase64()),
21701
21840
  type: String6,
21702
21841
  name: String6,
@@ -21740,10 +21879,10 @@ var FormData2 = /* @__PURE__ */ instanceOf(globalThis.FormData, {
21740
21879
  Type: `globalThis.FormData`
21741
21880
  }),
21742
21881
  expected: "FormData",
21743
- toCodecJson: () => link()(ArraySchema(Tuple2([String6, Union2([Struct({
21882
+ toCodecJson: () => link()(ArraySchema(Tuple3([String6, Union2([Struct2({
21744
21883
  _tag: tag("String"),
21745
21884
  value: String6
21746
- }), Struct({
21885
+ }), Struct2({
21747
21886
  _tag: tag("File"),
21748
21887
  value: File
21749
21888
  })])])), transformEffect2({
@@ -21818,10 +21957,10 @@ var StringFromUriComponent = /* @__PURE__ */ String6.annotate({
21818
21957
  expected: "a URI component encoded string that will be decoded as a UTF-8 string"
21819
21958
  }).pipe(/* @__PURE__ */ decodeTo2(String6, stringFromUriComponent));
21820
21959
  var PropertyKey = /* @__PURE__ */ Union2([Finite, Symbol3, String6]);
21821
- var StandardSchemaV1FailureResult = /* @__PURE__ */ Struct({
21822
- issues: /* @__PURE__ */ ArraySchema(/* @__PURE__ */ Struct({
21960
+ var StandardSchemaV1FailureResult = /* @__PURE__ */ Struct2({
21961
+ issues: /* @__PURE__ */ ArraySchema(/* @__PURE__ */ Struct2({
21823
21962
  message: String6,
21824
- path: /* @__PURE__ */ optional2(/* @__PURE__ */ ArraySchema(/* @__PURE__ */ Union2([PropertyKey, /* @__PURE__ */ Struct({
21963
+ path: /* @__PURE__ */ optional2(/* @__PURE__ */ ArraySchema(/* @__PURE__ */ Union2([PropertyKey, /* @__PURE__ */ Struct2({
21825
21964
  key: PropertyKey
21826
21965
  })])))
21827
21966
  }))
@@ -21909,7 +22048,7 @@ function bigDecimalValueAtScale(value6, scale) {
21909
22048
  }
21910
22049
  function bigDecimalArbitrarySchema(constraint) {
21911
22050
  if (constraint?.minimum === void 0 && constraint?.maximum === void 0) {
21912
- return Struct({
22051
+ return Struct2({
21913
22052
  value: BigInt6,
21914
22053
  scale: Int.check(isBetween2({
21915
22054
  minimum: 0,
@@ -21921,7 +22060,7 @@ function bigDecimalArbitrarySchema(constraint) {
21921
22060
  const minimum = constraint.minimum === void 0 ? void 0 : bigDecimalValueAtScale(constraint.minimum, scale) + (constraint.exclusiveMinimum === true ? globalThis.BigInt(1) : globalThis.BigInt(0));
21922
22061
  const maximum = constraint.maximum === void 0 ? void 0 : bigDecimalValueAtScale(constraint.maximum, scale) - (constraint.exclusiveMaximum === true ? globalThis.BigInt(1) : globalThis.BigInt(0));
21923
22062
  if (minimum !== void 0 && maximum !== void 0 && minimum > maximum) {
21924
- return Struct({
22063
+ return Struct2({
21925
22064
  value: BigInt6,
21926
22065
  scale: Int.check(isBetween2({
21927
22066
  minimum: 0,
@@ -21929,7 +22068,7 @@ function bigDecimalArbitrarySchema(constraint) {
21929
22068
  }))
21930
22069
  });
21931
22070
  }
21932
- return Struct({
22071
+ return Struct2({
21933
22072
  value: bigIntArbitrarySchema(minimum, maximum),
21934
22073
  scale: Literal2(scale)
21935
22074
  });
@@ -22010,13 +22149,13 @@ function CauseReason(error, defect) {
22010
22149
  importDeclarations: [`import * as Cause from "effect/Cause"`]
22011
22150
  }),
22012
22151
  expected: "Cause.Failure",
22013
- toCodec: ([error2, defect2]) => link()(Union2([Struct({
22152
+ toCodec: ([error2, defect2]) => link()(Union2([Struct2({
22014
22153
  _tag: Literal2("Fail"),
22015
22154
  error: error2
22016
- }), Struct({
22155
+ }), Struct2({
22017
22156
  _tag: Literal2("Die"),
22018
22157
  defect: defect2
22019
- }), Struct({
22158
+ }), Struct2({
22020
22159
  _tag: Literal2("Interrupt"),
22021
22160
  fiberId: UndefinedOr(Finite)
22022
22161
  })]), transform2({
@@ -22314,7 +22453,7 @@ var DateTimeZoned = /* @__PURE__ */ declare((u) => isDateTime2(u) && isZoned2(u)
22314
22453
  constraint
22315
22454
  }) => {
22316
22455
  const [minimum, maximum] = dateTimeArbitraryBounds(constraint, arbitraryMinimumZonedDateTimeTimestamp, arbitraryMaximumZonedDateTimeTimestamp);
22317
- return linkDecoding()(Struct({
22456
+ return linkDecoding()(Struct2({
22318
22457
  epochMilliseconds: dateTimeArbitraryInteger(minimum, maximum),
22319
22458
  timeZone: timeZoneArbitrarySchema()
22320
22459
  }), transform(({
@@ -22435,14 +22574,14 @@ var Duration = /* @__PURE__ */ declare(isDuration, {
22435
22574
  importDeclarations: [`import * as Duration from "effect/Duration"`]
22436
22575
  }),
22437
22576
  expected: "Duration",
22438
- toCodecJson: () => link()(Union2([Struct({
22577
+ toCodecJson: () => link()(Union2([Struct2({
22439
22578
  _tag: Literal2("Infinity")
22440
- }), Struct({
22579
+ }), Struct2({
22441
22580
  _tag: Literal2("NegativeInfinity")
22442
- }), Struct({
22581
+ }), Struct2({
22443
22582
  _tag: Literal2("Nanos"),
22444
22583
  value: BigInt6
22445
- }), Struct({
22584
+ }), Struct2({
22446
22585
  _tag: Literal2("Millis"),
22447
22586
  value: Int
22448
22587
  })]), transform2({
@@ -22521,10 +22660,10 @@ function Exit(value6, error, defect) {
22521
22660
  importDeclarations: [`import * as Exit from "effect/Exit"`]
22522
22661
  }),
22523
22662
  expected: "Exit",
22524
- toCodec: ([value7, error2, defect2]) => link()(Union2([Struct({
22663
+ toCodec: ([value7, error2, defect2]) => link()(Union2([Struct2({
22525
22664
  _tag: Literal2("Success"),
22526
22665
  value: value7
22527
- }), Struct({
22666
+ }), Struct2({
22528
22667
  _tag: Literal2("Failure"),
22529
22668
  cause: Cause(error2, defect2)
22530
22669
  })]), transform2({
@@ -22545,13 +22684,13 @@ function Exit(value6, error, defect) {
22545
22684
  });
22546
22685
  }
22547
22686
  function graphEncodedSchema(type3, node, edge) {
22548
- return Struct({
22687
+ return Struct2({
22549
22688
  type: Literal2(type3),
22550
- nodes: ArraySchema(Struct({
22689
+ nodes: ArraySchema(Struct2({
22551
22690
  index: Natural,
22552
22691
  data: node
22553
22692
  })),
22554
- edges: ArraySchema(Struct({
22693
+ edges: ArraySchema(Struct2({
22555
22694
  index: Natural,
22556
22695
  source: Natural,
22557
22696
  target: Natural,
@@ -22620,9 +22759,9 @@ function graphToEquivalence(node, edge) {
22620
22759
  };
22621
22760
  }
22622
22761
  function graphToArbitrary(type3, node, edge) {
22623
- return linkDecoding()(Union2([Null2, Struct({
22762
+ return linkDecoding()(Union2([Null2, Struct2({
22624
22763
  nodes: NonEmptyArray(node),
22625
- edges: ArraySchema(Tuple2([Natural, Natural, edge]))
22764
+ edges: ArraySchema(Tuple3([Natural, Natural, edge]))
22626
22765
  })]), transform((input) => {
22627
22766
  if (input === null) return hydrate({
22628
22767
  type: type3,
@@ -22690,7 +22829,7 @@ function hashMapLink(entries3) {
22690
22829
  }
22691
22830
  function HashMap(key, value6) {
22692
22831
  const schema2 = declareConstructor()([key, value6], ([key2, value7]) => {
22693
- const entries3 = ArraySchema(Tuple2([key2, value7]));
22832
+ const entries3 = ArraySchema(Tuple3([key2, value7]));
22694
22833
  return (input, ast, options) => {
22695
22834
  if (isHashMap2(input)) {
22696
22835
  return mapBothEager2(decodeUnknownEffect(entries3)(toEntries(input), options), {
@@ -22713,11 +22852,11 @@ function HashMap(key, value6) {
22713
22852
  importDeclarations: [`import * as HashMap from "effect/HashMap"`]
22714
22853
  }),
22715
22854
  expected: "HashMap",
22716
- toCodec: ([key2, value7]) => hashMapLink(ArraySchema(Tuple2([key2, value7]))),
22855
+ toCodec: ([key2, value7]) => hashMapLink(ArraySchema(Tuple3([key2, value7]))),
22717
22856
  toCodecArbitrary: ({
22718
22857
  constraint,
22719
22858
  typeParameters: [key2, value7]
22720
- }) => hashMapLink(withArrayLengthConstraints(ArraySchema(Tuple2([key2, value7])).check(isUniqueKey()), constraint?.minSize, constraint?.maxSize)),
22859
+ }) => hashMapLink(withArrayLengthConstraints(ArraySchema(Tuple3([key2, value7])).check(isUniqueKey()), constraint?.minSize, constraint?.maxSize)),
22721
22860
  toEquivalence: ([key2, value7]) => makeCompareMap(key2, value7)
22722
22861
  });
22723
22862
  return make28(schema2.ast, {
@@ -22773,7 +22912,7 @@ function Option(value6) {
22773
22912
  return succeedNone3;
22774
22913
  }
22775
22914
  return mapBothEager2(decodeUnknownEffect(value7)(input.value, options), {
22776
- onSuccess: some2,
22915
+ onSuccess: some3,
22777
22916
  onFailure: (issue) => makeCompositeAtKey(ast, "value", issue, input, options)
22778
22917
  });
22779
22918
  }
@@ -22791,13 +22930,13 @@ function Option(value6) {
22791
22930
  importDeclarations: [`import * as Option from "effect/Option"`]
22792
22931
  }),
22793
22932
  expected: "Option",
22794
- toCodec: ([value7]) => link()(Union2([Struct({
22933
+ toCodec: ([value7]) => link()(Union2([Struct2({
22795
22934
  _tag: Literal2("Some"),
22796
22935
  value: value7
22797
- }), Struct({
22936
+ }), Struct2({
22798
22937
  _tag: Literal2("None")
22799
22938
  })]), transform2({
22800
- decode: (e) => e._tag === "None" ? none2() : some2(e.value),
22939
+ decode: (e) => e._tag === "None" ? none2() : some3(e.value),
22801
22940
  encode: (o) => isSome2(o) ? {
22802
22941
  _tag: "Some",
22803
22942
  value: o.value
@@ -22886,7 +23025,7 @@ var UrlParams = /* @__PURE__ */ declare(isUrlParams, {
22886
23025
  }),
22887
23026
  expected: "UrlParams",
22888
23027
  toEquivalence: () => Equivalence8,
22889
- toCodec: () => link()(ArraySchema(Tuple2([String6, String6])), transform2({
23028
+ toCodec: () => link()(ArraySchema(Tuple3([String6, String6])), transform2({
22890
23029
  decode: make25,
22891
23030
  encode: (self) => self.params
22892
23031
  }))
@@ -22912,8 +23051,8 @@ function OptionFromOptionalNullOr(schema2, options) {
22912
23051
  const onNoneEncoding = options === void 0 ? "omit" : options.onNoneEncoding;
22913
23052
  const noneValue = onNoneEncoding === null ? null : void 0;
22914
23053
  return optional2(NullOr(schema2)).pipe(decodeTo2(Option(toType2(schema2)), transformOptional2({
22915
- decode: (oe) => oe.pipe(filter(isNotNullish), some2),
22916
- encode: onNoneEncoding === "omit" ? flatten : (ot) => some2(getOrElse(flatten(ot), () => noneValue))
23054
+ decode: (oe) => oe.pipe(filter(isNotNullish), some3),
23055
+ encode: onNoneEncoding === "omit" ? flatten : (ot) => some3(getOrElse(flatten(ot), () => noneValue))
22917
23056
  })));
22918
23057
  }
22919
23058
  function Redacted(value6, options) {
@@ -23005,10 +23144,10 @@ function Result(success, failure) {
23005
23144
  importDeclarations: [`import * as Result from "effect/Result"`]
23006
23145
  }),
23007
23146
  expected: "Result",
23008
- toCodec: ([success2, failure2]) => link()(Union2([Struct({
23147
+ toCodec: ([success2, failure2]) => link()(Union2([Struct2({
23009
23148
  _tag: Literal2("Success"),
23010
23149
  success: success2
23011
- }), Struct({
23150
+ }), Struct2({
23012
23151
  _tag: Literal2("Failure"),
23013
23152
  failure: failure2
23014
23153
  })]), transform2({
@@ -23082,7 +23221,7 @@ function makeClass(Inherited, identifier2, struct2, annotations2, proto) {
23082
23221
  }
23083
23222
  static extend(identifier3) {
23084
23223
  return (schema2, annotations3) => {
23085
- const extension = isStruct(schema2) ? schema2 : Struct(schema2);
23224
+ const extension = isStruct(schema2) ? schema2 : Struct2(schema2);
23086
23225
  const fields = {
23087
23226
  ...struct2.fields,
23088
23227
  ...extension.fields
@@ -23143,7 +23282,7 @@ function isStruct(schema2) {
23143
23282
  return isSchema(schema2);
23144
23283
  }
23145
23284
  var Class4 = (identifier2) => (schema2, annotations2) => {
23146
- const struct2 = isStruct(schema2) ? schema2 : Struct(schema2);
23285
+ const struct2 = isStruct(schema2) ? schema2 : Struct2(schema2);
23147
23286
  return makeClass(Class3, identifier2, struct2, annotations2, (identifier3) => ({
23148
23287
  toString() {
23149
23288
  return `${identifier3}(${format({
@@ -23164,7 +23303,7 @@ var TaggedClass2 = (identifier2) => {
23164
23303
  };
23165
23304
  };
23166
23305
  var Error4 = (identifier2) => (schema2, annotations2) => {
23167
- const struct2 = isStruct(schema2) ? schema2 : Struct(schema2);
23306
+ const struct2 = isStruct(schema2) ? schema2 : Struct2(schema2);
23168
23307
  const self = makeClass(Error2, identifier2, struct2, annotations2, (identifier3) => ({
23169
23308
  name: identifier3
23170
23309
  }));
@@ -23244,7 +23383,7 @@ var Json2 = /* @__PURE__ */ make28(/* @__PURE__ */ annotate2(Json, {
23244
23383
  })
23245
23384
  }));
23246
23385
  var JsonObject = /* @__PURE__ */ Record(String6, Json2);
23247
- var JsonError = /* @__PURE__ */ Struct({
23386
+ var JsonError = /* @__PURE__ */ Struct2({
23248
23387
  message: String6,
23249
23388
  name: /* @__PURE__ */ optionalKey2(String6),
23250
23389
  stack: /* @__PURE__ */ optionalKey2(String6),
@@ -25070,7 +25209,7 @@ var poll2 = (self) => suspend(() => {
25070
25209
  return succeed3(none2());
25071
25210
  }
25072
25211
  if (result6._tag === "Success") {
25073
- return succeed3(some2(result6.value));
25212
+ return succeed3(some3(result6.value));
25074
25213
  }
25075
25214
  return succeed3(none2());
25076
25215
  });
@@ -25328,7 +25467,7 @@ var acquireUseRelease3 = (acquire, use, release3) => fromTransformBracket(fnUntr
25328
25467
  let option6 = none2();
25329
25468
  yield* addFinalizerExit(forkedScope, (exit3) => isSome2(option6) ? release3(option6.value, exit3) : void_5);
25330
25469
  const value6 = yield* uninterruptible2(acquire);
25331
- option6 = some2(value6);
25470
+ option6 = some3(value6);
25332
25471
  return yield* toTransform(use(value6))(upstream, scope3);
25333
25472
  }));
25334
25473
  var fromArray = (array2) => fromPull(sync4(() => {
@@ -25349,7 +25488,7 @@ var fromIteratorArray = (iterator, chunkSize = DefaultChunkSize) => {
25349
25488
  if (buffer3.length === 0) {
25350
25489
  return done3(state.value);
25351
25490
  }
25352
- done4 = some2(state.value);
25491
+ done4 = some3(state.value);
25353
25492
  break;
25354
25493
  }
25355
25494
  buffer3.push(state.value);
@@ -25911,7 +26050,7 @@ var splitLines = () => fromTransform((upstream, _scope) => sync4(() => {
25911
26050
  onSuccess: loop,
25912
26051
  onFailure: failCause4,
25913
26052
  onDone: (leftover) => {
25914
- done4 = some2(leftover);
26053
+ done4 = some3(leftover);
25915
26054
  if (stringBuilder.length > 0) {
25916
26055
  const last = stringBuilder;
25917
26056
  stringBuilder = "";
@@ -26184,13 +26323,13 @@ var empty13 = () => {
26184
26323
  };
26185
26324
  var get6 = /* @__PURE__ */ dual(2, (self, key) => {
26186
26325
  if (self.backing.has(key)) {
26187
- return some2(self.backing.get(key));
26326
+ return some3(self.backing.get(key));
26188
26327
  } else if (isSimpleKey(key)) {
26189
26328
  return none2();
26190
26329
  }
26191
26330
  const refKey = referentialKeysCache.get(self);
26192
26331
  if (refKey !== void 0) {
26193
- return self.backing.has(refKey) ? some2(self.backing.get(refKey)) : none2();
26332
+ return self.backing.has(refKey) ? some3(self.backing.get(refKey)) : none2();
26194
26333
  }
26195
26334
  const hash2 = hash(key);
26196
26335
  const bucket = self.buckets.get(hash2);
@@ -26206,7 +26345,7 @@ var getFromBucket = (self, bucket, key) => {
26206
26345
  if (equals(key, bucket[i])) {
26207
26346
  const refKey = bucket[i];
26208
26347
  referentialKeysCache.set(key, refKey);
26209
- return some2(self.backing.get(refKey));
26348
+ return some3(self.backing.get(refKey));
26210
26349
  }
26211
26350
  }
26212
26351
  return none2();
@@ -26882,12 +27021,12 @@ var zipWithNext = (self) => mapAccumArray(self, none2, (acc, arr) => {
26882
27021
  let i = 0;
26883
27022
  if (acc._tag === "None") {
26884
27023
  i = 1;
26885
- acc = some2(arr[0]);
27024
+ acc = some3(arr[0]);
26886
27025
  }
26887
27026
  const pairs = empty3();
26888
27027
  for (; i < arr.length; i++) {
26889
27028
  const value6 = acc.value;
26890
- acc = some2(arr[i]);
27029
+ acc = some3(arr[i]);
26891
27030
  pairs.push([value6, acc]);
26892
27031
  }
26893
27032
  return [acc, pairs];
@@ -26901,7 +27040,7 @@ var zipWithPrevious = (self) => mapAccumArray(self, none2, (acc, arr) => {
26901
27040
  for (let i = 0; i < arr.length; i++) {
26902
27041
  const value6 = arr[i];
26903
27042
  pairs.push([acc, value6]);
26904
- acc = some2(arr[i]);
27043
+ acc = some3(arr[i]);
26905
27044
  }
26906
27045
  return [acc, pairs];
26907
27046
  });
@@ -26914,16 +27053,16 @@ var zipWithPreviousAndNext = (self) => mapAccumArray(self, () => ({
26914
27053
  if (acc.current._tag === "None") {
26915
27054
  i = 1;
26916
27055
  current = arr[0];
26917
- acc.current = some2(current);
27056
+ acc.current = some3(current);
26918
27057
  } else {
26919
27058
  current = acc.current.value;
26920
27059
  }
26921
27060
  const pairs = empty3();
26922
27061
  for (; i < arr.length; i++) {
26923
27062
  const element = arr[i];
26924
- acc.current = some2(element);
27063
+ acc.current = some3(element);
26925
27064
  pairs.push([acc.prev, current, acc.current]);
26926
- acc.prev = some2(current);
27065
+ acc.prev = some3(current);
26927
27066
  current = element;
26928
27067
  }
26929
27068
  return [acc, pairs];
@@ -27153,7 +27292,7 @@ var withExecutionPlan3 = /* @__PURE__ */ dual((args2) => isStream(args2[0]), (se
27153
27292
  if (preventFallbackOnPartialStream && receivedElements) {
27154
27293
  return fail11(error);
27155
27294
  }
27156
- lastError = some2(error);
27295
+ lastError = some3(error);
27157
27296
  return loop;
27158
27297
  });
27159
27298
  });
@@ -27757,7 +27896,7 @@ var aggregateWithin = /* @__PURE__ */ dual(3, (self, sink, schedule4) => fromCha
27757
27896
  });
27758
27897
  const catchSinkHalt = flatMap5(([value6, leftover_]) => {
27759
27898
  if (!sinkHasInput && buffer3.state._tag === "Done") return done3();
27760
- lastOutput = some2(value6);
27899
+ lastOutput = some3(value6);
27761
27900
  leftover = leftover_;
27762
27901
  return succeed7(of(value6));
27763
27902
  });
@@ -28099,268 +28238,697 @@ var toPubSubTake2 = /* @__PURE__ */ dual(2, (self, options) => toPubSubTake(self
28099
28238
  var toQueue = /* @__PURE__ */ dual(2, (self, options) => toQueueArray(self.channel, options));
28100
28239
  var runIntoQueue = /* @__PURE__ */ dual(2, (self, queue) => runIntoQueueArray(self.channel, queue));
28101
28240
 
28102
- // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/ChannelSchema.js
28103
- var decode2 = (schema2, options) => () => {
28104
- const decode3 = decodeEffect2(NonEmptyArray(schema2), options);
28105
- return fromTransform((upstream, _scope) => succeed7(flatMap5(upstream, (chunk) => decode3(chunk))));
28106
- };
28241
+ // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Match.js
28242
+ var Match_exports = {};
28243
+ __export(Match_exports, {
28244
+ any: () => any3,
28245
+ bigint: () => bigint,
28246
+ boolean: () => boolean2,
28247
+ date: () => date,
28248
+ defined: () => defined2,
28249
+ discriminator: () => discriminator2,
28250
+ discriminatorStartsWith: () => discriminatorStartsWith2,
28251
+ discriminators: () => discriminators2,
28252
+ discriminatorsExhaustive: () => discriminatorsExhaustive2,
28253
+ exhaustive: () => exhaustive2,
28254
+ fn: () => fn4,
28255
+ instanceOf: () => instanceOf3,
28256
+ instanceOfUnsafe: () => instanceOfUnsafe,
28257
+ is: () => is4,
28258
+ nonEmptyString: () => nonEmptyString2,
28259
+ not: () => not3,
28260
+ null: () => _null,
28261
+ number: () => number3,
28262
+ option: () => option4,
28263
+ orElse: () => orElse4,
28264
+ orElseAbsurd: () => orElseAbsurd2,
28265
+ record: () => record2,
28266
+ result: () => result5,
28267
+ string: () => string3,
28268
+ symbol: () => symbol4,
28269
+ tag: () => tag3,
28270
+ tagStartsWith: () => tagStartsWith2,
28271
+ tags: () => tags2,
28272
+ tagsExhaustive: () => tagsExhaustive2,
28273
+ type: () => type2,
28274
+ typeTags: () => typeTags2,
28275
+ undefined: () => _undefined,
28276
+ value: () => value5,
28277
+ valueTags: () => valueTags2,
28278
+ when: () => when5,
28279
+ whenAnd: () => whenAnd2,
28280
+ whenOr: () => whenOr2,
28281
+ withReturnType: () => withReturnType2
28282
+ });
28107
28283
 
28108
- // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/PlatformError.js
28109
- var TypeId40 = "~effect/PlatformError";
28110
- var BadArgument = class extends (/* @__PURE__ */ TaggedError2("BadArgument")) {
28111
- /**
28112
- * Formats the module, method, and optional description that rejected the argument.
28113
- *
28114
- * **When to use**
28115
- *
28116
- * Use to read the formatted error message for a rejected platform argument.
28117
- *
28118
- * @since 4.0.0
28119
- */
28120
- get message() {
28121
- return `${this.module}.${this.method}${this.description ? `: ${this.description}` : ""}`;
28284
+ // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/internal/matcher.js
28285
+ var TypeId40 = "~effect/Match/Matcher";
28286
+ var TypeMatcherProto = {
28287
+ [TypeId40]: {
28288
+ _input: identity,
28289
+ _filters: identity,
28290
+ _remaining: identity,
28291
+ _result: identity,
28292
+ _return: identity,
28293
+ _args: identity
28294
+ },
28295
+ _tag: "TypeMatcher",
28296
+ add(_case) {
28297
+ return makeTypeMatcher(this.select, [...this.cases, _case]);
28298
+ },
28299
+ pipe() {
28300
+ return pipeArguments(this, arguments);
28122
28301
  }
28123
28302
  };
28124
- var PlatformError = class extends (/* @__PURE__ */ TaggedError2("PlatformError")) {
28125
- constructor(reason) {
28126
- if ("cause" in reason) {
28127
- super({
28128
- reason,
28129
- cause: reason.cause
28130
- });
28131
- } else {
28132
- super({
28133
- reason
28134
- });
28303
+ function makeTypeMatcher(select, cases) {
28304
+ const matcher = Object.create(TypeMatcherProto);
28305
+ matcher.select = select;
28306
+ matcher.cases = cases;
28307
+ return matcher;
28308
+ }
28309
+ var ValueMatcherProto = {
28310
+ [TypeId40]: {
28311
+ _input: identity,
28312
+ _filters: identity,
28313
+ _result: identity,
28314
+ _return: identity,
28315
+ _flavor: identity
28316
+ },
28317
+ _tag: "ValueMatcher",
28318
+ add(_case) {
28319
+ if (isSuccess2(this.value)) {
28320
+ return this;
28135
28321
  }
28136
- }
28137
- /**
28138
- * Marks this value as a platform error wrapper for runtime guards.
28139
- *
28140
- * **When to use**
28141
- *
28142
- * Use to identify `PlatformError` values through their runtime type marker.
28143
- *
28144
- * @since 4.0.0
28145
- */
28146
- [TypeId40] = TypeId40;
28147
- get message() {
28148
- return this.reason.message;
28322
+ if (_case._tag === "When" && _case.guard(this.provided) === true) {
28323
+ return makeValueMatcher(this.provided, succeed2(_case.evaluate(this.provided)));
28324
+ } else if (_case._tag === "Not" && _case.guard(this.provided) === false) {
28325
+ return makeValueMatcher(this.provided, succeed2(_case.evaluate(this.provided)));
28326
+ }
28327
+ return this;
28328
+ },
28329
+ pipe() {
28330
+ return pipeArguments(this, arguments);
28149
28331
  }
28150
28332
  };
28151
- var badArgument = (options) => new PlatformError(new BadArgument(options));
28152
-
28153
- // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/FileSystem.js
28154
- var FileSystem = /* @__PURE__ */ Service("effect/FileSystem");
28155
-
28156
- // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Path.js
28157
- var TypeId41 = "~effect/Path";
28158
- var Path = /* @__PURE__ */ Service("effect/Path");
28159
- function normalizeStringPosix(path, allowAboveRoot) {
28160
- let res = "";
28161
- let lastSegmentLength = 0;
28162
- let lastSlash = -1;
28163
- let dots = 0;
28164
- let code;
28165
- for (let i = 0; i <= path.length; ++i) {
28166
- if (i < path.length) {
28167
- code = path.charCodeAt(i);
28168
- } else if (code === 47) {
28169
- break;
28170
- } else {
28171
- code = 47;
28172
- }
28173
- if (code === 47) {
28174
- if (lastSlash === i - 1 || dots === 1) {
28175
- } else if (lastSlash !== i - 1 && dots === 2) {
28176
- if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 || res.charCodeAt(res.length - 2) !== 46) {
28177
- if (res.length > 2) {
28178
- const lastSlashIndex = res.lastIndexOf("/");
28179
- if (lastSlashIndex !== res.length - 1) {
28180
- if (lastSlashIndex === -1) {
28181
- res = "";
28182
- lastSegmentLength = 0;
28183
- } else {
28184
- res = res.slice(0, lastSlashIndex);
28185
- lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
28186
- }
28187
- lastSlash = i;
28188
- dots = 0;
28189
- continue;
28190
- }
28191
- } else if (res.length === 2 || res.length === 1) {
28192
- res = "";
28193
- lastSegmentLength = 0;
28194
- lastSlash = i;
28195
- dots = 0;
28196
- continue;
28197
- }
28198
- }
28199
- if (allowAboveRoot) {
28200
- if (res.length > 0) {
28201
- res += "/..";
28202
- } else {
28203
- res = "..";
28204
- }
28205
- lastSegmentLength = 2;
28206
- }
28207
- } else {
28208
- if (res.length > 0) {
28209
- res += "/" + path.slice(lastSlash + 1, i);
28210
- } else {
28211
- res = path.slice(lastSlash + 1, i);
28333
+ function makeValueMatcher(provided, value6) {
28334
+ const matcher = Object.create(ValueMatcherProto);
28335
+ matcher.provided = provided;
28336
+ matcher.value = value6;
28337
+ return matcher;
28338
+ }
28339
+ var makeWhen = (guard, evaluate2) => ({
28340
+ _tag: "When",
28341
+ guard,
28342
+ evaluate: evaluate2
28343
+ });
28344
+ var makeNot = (guard, evaluate2) => ({
28345
+ _tag: "Not",
28346
+ guard,
28347
+ evaluate: evaluate2
28348
+ });
28349
+ var makePredicate = (pattern) => {
28350
+ if (typeof pattern === "function") {
28351
+ return pattern;
28352
+ } else if (Array.isArray(pattern)) {
28353
+ const predicates = pattern.map(makePredicate);
28354
+ const len = predicates.length;
28355
+ return (u) => {
28356
+ if (!Array.isArray(u)) {
28357
+ return false;
28358
+ }
28359
+ for (let i = 0; i < len; i++) {
28360
+ if (predicates[i](u[i]) === false) {
28361
+ return false;
28212
28362
  }
28213
- lastSegmentLength = i - lastSlash - 1;
28214
28363
  }
28215
- lastSlash = i;
28216
- dots = 0;
28217
- } else if (code === 46 && dots !== -1) {
28218
- ++dots;
28219
- } else {
28220
- dots = -1;
28221
- }
28222
- }
28223
- return res;
28224
- }
28225
- function _format(sep, pathObject) {
28226
- const dir = pathObject.dir || pathObject.root;
28227
- const base = pathObject.base || (pathObject.name || "") + (pathObject.ext || "");
28228
- if (!dir) {
28229
- return base;
28230
- }
28231
- if (dir === pathObject.root) {
28232
- return dir + base;
28233
- }
28234
- return dir + sep + base;
28235
- }
28236
- function fromFileUrl(url) {
28237
- if (url.protocol !== "file:") {
28238
- return fail7(new BadArgument({
28239
- module: "Path",
28240
- method: "fromFileUrl",
28241
- description: "URL must be of scheme file"
28242
- }));
28243
- } else if (url.hostname !== "") {
28244
- return fail7(new BadArgument({
28245
- module: "Path",
28246
- method: "fromFileUrl",
28247
- description: "Invalid file URL host"
28248
- }));
28249
- }
28250
- const pathname = url.pathname;
28251
- for (let n = 0; n < pathname.length; n++) {
28252
- if (pathname[n] === "%") {
28253
- const third = pathname.codePointAt(n + 2) | 32;
28254
- if (pathname[n + 1] === "2" && third === 102) {
28255
- return fail7(new BadArgument({
28256
- module: "Path",
28257
- method: "fromFileUrl",
28258
- description: "must not include encoded / characters"
28259
- }));
28364
+ return true;
28365
+ };
28366
+ } else if (pattern !== null && typeof pattern === "object") {
28367
+ const keysAndPredicates = Reflect.ownKeys(pattern).map((key) => [key, makePredicate(pattern[key])]);
28368
+ const len = keysAndPredicates.length;
28369
+ return (u) => {
28370
+ if (typeof u !== "object" || u === null) {
28371
+ return false;
28260
28372
  }
28261
- }
28373
+ for (let i = 0; i < len; i++) {
28374
+ const [key, predicate] = keysAndPredicates[i];
28375
+ if (!(key in u) || predicate(u[key]) === false) {
28376
+ return false;
28377
+ }
28378
+ }
28379
+ return true;
28380
+ };
28262
28381
  }
28263
- return succeed7(decodeURIComponent(pathname));
28264
- }
28265
- var resolve2 = function resolve3() {
28266
- let resolvedPath = "";
28267
- let resolvedAbsolute = false;
28268
- let cwd = void 0;
28269
- for (let i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
28270
- let path;
28271
- if (i >= 0) {
28272
- path = arguments[i];
28273
- } else {
28274
- const process = globalThis.process;
28275
- if (cwd === void 0 && "process" in globalThis && typeof process === "object" && process !== null && typeof process.cwd === "function") {
28276
- cwd = process.cwd();
28382
+ return (u) => u === pattern;
28383
+ };
28384
+ var makeOrPredicate = (patterns) => {
28385
+ const predicates = patterns.map(makePredicate);
28386
+ const len = predicates.length;
28387
+ return (u) => {
28388
+ for (let i = 0; i < len; i++) {
28389
+ if (predicates[i](u) === true) {
28390
+ return true;
28277
28391
  }
28278
- path = cwd;
28279
28392
  }
28280
- if (path.length === 0) {
28281
- continue;
28393
+ return false;
28394
+ };
28395
+ };
28396
+ var makeAndPredicate = (patterns) => {
28397
+ const predicates = patterns.map(makePredicate);
28398
+ const len = predicates.length;
28399
+ return (u) => {
28400
+ for (let i = 0; i < len; i++) {
28401
+ if (predicates[i](u) === false) {
28402
+ return false;
28403
+ }
28282
28404
  }
28283
- resolvedPath = path + "/" + resolvedPath;
28284
- resolvedAbsolute = path.charCodeAt(0) === 47;
28285
- }
28286
- resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);
28287
- if (resolvedAbsolute) {
28288
- if (resolvedPath.length > 0) {
28289
- return "/" + resolvedPath;
28290
- } else {
28291
- return "/";
28405
+ return true;
28406
+ };
28407
+ };
28408
+ var type = () => makeTypeMatcher(identity, []);
28409
+ var fn3 = (select) => makeTypeMatcher(select, []);
28410
+ var value4 = (i) => makeValueMatcher(i, fail2(i));
28411
+ var valueTags = /* @__PURE__ */ dual(2, (input, fields) => {
28412
+ const match10 = tagsExhaustive(fields)(makeTypeMatcher(identity, []));
28413
+ return match10(input);
28414
+ });
28415
+ var typeTags = () => (fields) => {
28416
+ const match10 = tagsExhaustive(fields)(makeTypeMatcher(identity, []));
28417
+ return (input) => match10(input);
28418
+ };
28419
+ var withReturnType = () => (self) => self;
28420
+ var when4 = (pattern, f) => (self) => self.add(makeWhen(makePredicate(pattern), f));
28421
+ var whenOr = (...args2) => (self) => {
28422
+ const onMatch = args2[args2.length - 1];
28423
+ const patterns = args2.slice(0, -1);
28424
+ return self.add(makeWhen(makeOrPredicate(patterns), onMatch));
28425
+ };
28426
+ var whenAnd = (...args2) => (self) => {
28427
+ const onMatch = args2[args2.length - 1];
28428
+ const patterns = args2.slice(0, -1);
28429
+ return self.add(makeWhen(makeAndPredicate(patterns), onMatch));
28430
+ };
28431
+ var discriminator = (field) => (...pattern) => {
28432
+ const f = pattern[pattern.length - 1];
28433
+ const values2 = pattern.slice(0, -1);
28434
+ const pred = values2.length === 1 ? (_) => _ != null && _[field] === values2[0] : (_) => _ != null && values2.includes(_[field]);
28435
+ return (self) => self.add(makeWhen(pred, f));
28436
+ };
28437
+ var discriminatorStartsWith = (field) => (pattern, f) => {
28438
+ const pred = (_) => _ != null && typeof _[field] === "string" && _[field].startsWith(pattern);
28439
+ return (self) => self.add(makeWhen(pred, f));
28440
+ };
28441
+ var discriminators = (field) => (fields) => {
28442
+ const predicate = makeWhen((arg) => arg != null && Object.hasOwn(fields, arg[field]), (data) => fields[data[field]](data));
28443
+ return (self) => self.add(predicate);
28444
+ };
28445
+ var discriminatorsExhaustive = (field) => (fields) => {
28446
+ const addCases = discriminators(field)(fields);
28447
+ return (matcher) => exhaustive(addCases(matcher));
28448
+ };
28449
+ var tag2 = /* @__PURE__ */ discriminator("_tag");
28450
+ var tagStartsWith = /* @__PURE__ */ discriminatorStartsWith("_tag");
28451
+ var tags = /* @__PURE__ */ discriminators("_tag");
28452
+ var tagsExhaustive = /* @__PURE__ */ discriminatorsExhaustive("_tag");
28453
+ var not2 = (pattern, f) => (self) => self.add(makeNot(makePredicate(pattern), f));
28454
+ var nonEmptyString = (u) => typeof u === "string" && u.length > 0;
28455
+ var is3 = (...literals) => {
28456
+ const len = literals.length;
28457
+ return (u) => {
28458
+ for (let i = 0; i < len; i++) {
28459
+ if (u === literals[i]) {
28460
+ return true;
28461
+ }
28292
28462
  }
28293
- } else if (resolvedPath.length > 0) {
28294
- return resolvedPath;
28295
- } else {
28296
- return ".";
28297
- }
28463
+ return false;
28464
+ };
28298
28465
  };
28299
- var CHAR_FORWARD_SLASH = 47;
28300
- function toFileUrl(filepath) {
28301
- const outURL = new URL("file://");
28302
- let resolved2 = resolve2(filepath);
28303
- const filePathLast = filepath.charCodeAt(filepath.length - 1);
28304
- if (filePathLast === CHAR_FORWARD_SLASH && resolved2[resolved2.length - 1] !== "/") {
28305
- resolved2 += "/";
28306
- }
28307
- outURL.pathname = encodePathChars(resolved2);
28308
- return succeed7(outURL);
28309
- }
28310
- var percentRegExp = /%/g;
28311
- var backslashRegExp = /\\/g;
28312
- var newlineRegExp = /\n/g;
28313
- var carriageReturnRegExp = /\r/g;
28314
- var tabRegExp = /\t/g;
28315
- function encodePathChars(filepath) {
28316
- if (filepath.includes("%")) {
28317
- filepath = filepath.replace(percentRegExp, "%25");
28466
+ var any2 = () => true;
28467
+ var defined = (u) => u !== void 0 && u !== null;
28468
+ var instanceOf2 = (constructor) => (u) => u instanceof constructor;
28469
+ var orElse3 = (f) => (self) => {
28470
+ const toResult = result4(self);
28471
+ if (isResult2(toResult)) {
28472
+ return toResult._tag === "Success" ? toResult.success : f(toResult.failure);
28318
28473
  }
28319
- if (filepath.includes("\\")) {
28320
- filepath = filepath.replace(backslashRegExp, "%5C");
28474
+ return (...args2) => {
28475
+ const a = toResult(...args2);
28476
+ return isSuccess2(a) ? a.success : f(a.failure, ...args2);
28477
+ };
28478
+ };
28479
+ var orElseAbsurd = (self) => orElse3(() => {
28480
+ throw new Error("effect/Match/orElseAbsurd: absurd");
28481
+ })(self);
28482
+ var result4 = (self) => {
28483
+ if (self._tag === "ValueMatcher") {
28484
+ return self.value;
28321
28485
  }
28322
- if (filepath.includes("\n")) {
28323
- filepath = filepath.replace(newlineRegExp, "%0A");
28486
+ const len = self.cases.length;
28487
+ if (len === 1) {
28488
+ const _case = self.cases[0];
28489
+ return (...args2) => {
28490
+ const input = self.select(...args2);
28491
+ if (_case._tag === "When" && _case.guard(input) === true) {
28492
+ return succeed2(_case.evaluate(input, ...args2));
28493
+ } else if (_case._tag === "Not" && _case.guard(input) === false) {
28494
+ return succeed2(_case.evaluate(input, ...args2));
28495
+ }
28496
+ return fail2(input);
28497
+ };
28324
28498
  }
28325
- if (filepath.includes("\r")) {
28326
- filepath = filepath.replace(carriageReturnRegExp, "%0D");
28499
+ return (...args2) => {
28500
+ const input = self.select(...args2);
28501
+ for (let i = 0; i < len; i++) {
28502
+ const _case = self.cases[i];
28503
+ if (_case._tag === "When" && _case.guard(input) === true) {
28504
+ return succeed2(_case.evaluate(input, ...args2));
28505
+ } else if (_case._tag === "Not" && _case.guard(input) === false) {
28506
+ return succeed2(_case.evaluate(input, ...args2));
28507
+ }
28508
+ }
28509
+ return fail2(input);
28510
+ };
28511
+ };
28512
+ var option3 = (self) => {
28513
+ const toResult = result4(self);
28514
+ if (isResult2(toResult)) {
28515
+ return match2(toResult, {
28516
+ onFailure: () => none2(),
28517
+ onSuccess: some3
28518
+ });
28327
28519
  }
28328
- if (filepath.includes(" ")) {
28329
- filepath = filepath.replace(tabRegExp, "%09");
28520
+ return (...args2) => match2(toResult(...args2), {
28521
+ onFailure: () => none2(),
28522
+ onSuccess: some3
28523
+ });
28524
+ };
28525
+ var getExhaustiveAbsurdErrorMessage = "effect/match/Match/exhaustive: absurd";
28526
+ var exhaustive = (self) => {
28527
+ const toResult = result4(self);
28528
+ if (isResult2(toResult)) {
28529
+ if (isSuccess2(toResult)) {
28530
+ return toResult.success;
28531
+ }
28532
+ throw new Error(getExhaustiveAbsurdErrorMessage);
28330
28533
  }
28331
- return filepath;
28332
- }
28333
- var posixImpl = /* @__PURE__ */ Path.of({
28334
- [TypeId41]: TypeId41,
28335
- resolve: resolve2,
28336
- normalize(path) {
28337
- if (path.length === 0) return ".";
28338
- const isAbsolute = path.charCodeAt(0) === 47;
28339
- const trailingSeparator = path.charCodeAt(path.length - 1) === 47;
28340
- path = normalizeStringPosix(path, !isAbsolute);
28341
- if (path.length === 0 && !isAbsolute) path = ".";
28342
- if (path.length > 0 && trailingSeparator) path += "/";
28343
- if (isAbsolute) return "/" + path;
28344
- return path;
28345
- },
28346
- isAbsolute(path) {
28347
- return path.length > 0 && path.charCodeAt(0) === 47;
28534
+ return (...args2) => {
28535
+ const result6 = toResult(...args2);
28536
+ if (isSuccess2(result6)) {
28537
+ return result6.success;
28538
+ }
28539
+ throw new Error(getExhaustiveAbsurdErrorMessage);
28540
+ };
28541
+ };
28542
+
28543
+ // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Match.js
28544
+ var type2 = type;
28545
+ var fn4 = fn3;
28546
+ var value5 = value4;
28547
+ var valueTags2 = valueTags;
28548
+ var typeTags2 = typeTags;
28549
+ var withReturnType2 = withReturnType;
28550
+ var when5 = when4;
28551
+ var whenOr2 = whenOr;
28552
+ var whenAnd2 = whenAnd;
28553
+ var discriminator2 = discriminator;
28554
+ var discriminatorStartsWith2 = discriminatorStartsWith;
28555
+ var discriminators2 = discriminators;
28556
+ var discriminatorsExhaustive2 = discriminatorsExhaustive;
28557
+ var tag3 = tag2;
28558
+ var tagStartsWith2 = tagStartsWith;
28559
+ var tags2 = tags;
28560
+ var tagsExhaustive2 = tagsExhaustive;
28561
+ var not3 = not2;
28562
+ var nonEmptyString2 = nonEmptyString;
28563
+ var is4 = is3;
28564
+ var string3 = isString;
28565
+ var number3 = isNumber;
28566
+ var any3 = any2;
28567
+ var defined2 = defined;
28568
+ var boolean2 = isBoolean;
28569
+ var _undefined = isUndefined;
28570
+ var _null = isNull;
28571
+ var bigint = isBigInt;
28572
+ var symbol4 = isSymbol;
28573
+ var date = isDate;
28574
+ var record2 = isObject;
28575
+ var instanceOf3 = instanceOf2;
28576
+ var instanceOfUnsafe = instanceOf2;
28577
+ var orElse4 = orElse3;
28578
+ var orElseAbsurd2 = orElseAbsurd;
28579
+ var result5 = result4;
28580
+ var option4 = option3;
28581
+ var exhaustive2 = exhaustive;
28582
+
28583
+ // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Ref.js
28584
+ var Ref_exports = {};
28585
+ __export(Ref_exports, {
28586
+ get: () => get10,
28587
+ getAndSet: () => getAndSet,
28588
+ getAndUpdate: () => getAndUpdate,
28589
+ getAndUpdateSome: () => getAndUpdateSome,
28590
+ getUnsafe: () => getUnsafe5,
28591
+ make: () => make38,
28592
+ makeUnsafe: () => makeUnsafe10,
28593
+ modify: () => modify4,
28594
+ modifySome: () => modifySome,
28595
+ set: () => set8,
28596
+ setAndGet: () => setAndGet,
28597
+ update: () => update2,
28598
+ updateAndGet: () => updateAndGet,
28599
+ updateSome: () => updateSome,
28600
+ updateSomeAndGet: () => updateSomeAndGet
28601
+ });
28602
+ var TypeId41 = "~effect/Ref";
28603
+ var RefProto = {
28604
+ [TypeId41]: {
28605
+ _A: identity
28348
28606
  },
28349
- join() {
28350
- if (arguments.length === 0) {
28351
- return ".";
28607
+ ...PipeInspectableProto,
28608
+ toJSON() {
28609
+ return {
28610
+ _id: "Ref",
28611
+ ref: this.ref
28612
+ };
28613
+ }
28614
+ };
28615
+ var makeUnsafe10 = (value6) => {
28616
+ const self = Object.create(RefProto);
28617
+ self.ref = make30(value6);
28618
+ return self;
28619
+ };
28620
+ var make38 = (value6) => sync4(() => makeUnsafe10(value6));
28621
+ var get10 = (self) => sync4(() => self.ref.current);
28622
+ var set8 = /* @__PURE__ */ dual(2, (self, value6) => sync4(() => set6(self.ref, value6)));
28623
+ var getAndSet = /* @__PURE__ */ dual(2, (self, value6) => sync4(() => {
28624
+ const current = self.ref.current;
28625
+ self.ref.current = value6;
28626
+ return current;
28627
+ }));
28628
+ var getAndUpdate = /* @__PURE__ */ dual(2, (self, f) => sync4(() => {
28629
+ const current = self.ref.current;
28630
+ self.ref.current = f(current);
28631
+ return current;
28632
+ }));
28633
+ var getAndUpdateSome = /* @__PURE__ */ dual(2, (self, pf) => sync4(() => {
28634
+ const current = self.ref.current;
28635
+ const option6 = pf(current);
28636
+ if (option6._tag === "Some") {
28637
+ self.ref.current = option6.value;
28638
+ }
28639
+ return current;
28640
+ }));
28641
+ var setAndGet = /* @__PURE__ */ dual(2, (self, value6) => sync4(() => self.ref.current = value6));
28642
+ var modify4 = /* @__PURE__ */ dual(2, (self, f) => sync4(() => {
28643
+ const [b, a] = f(self.ref.current);
28644
+ self.ref.current = a;
28645
+ return b;
28646
+ }));
28647
+ var modifySome = /* @__PURE__ */ dual(2, (self, pf) => modify4(self, (value6) => {
28648
+ const [b, option6] = pf(value6);
28649
+ return [b, option6._tag === "None" ? value6 : option6.value];
28650
+ }));
28651
+ var update2 = /* @__PURE__ */ dual(2, (self, f) => sync4(() => {
28652
+ self.ref.current = f(self.ref.current);
28653
+ }));
28654
+ var updateAndGet = /* @__PURE__ */ dual(2, (self, f) => sync4(() => self.ref.current = f(self.ref.current)));
28655
+ var updateSome = /* @__PURE__ */ dual(2, (self, f) => sync4(() => {
28656
+ const option6 = f(self.ref.current);
28657
+ if (option6._tag === "Some") {
28658
+ self.ref.current = option6.value;
28659
+ }
28660
+ }));
28661
+ var updateSomeAndGet = /* @__PURE__ */ dual(2, (self, pf) => sync4(() => {
28662
+ const option6 = pf(self.ref.current);
28663
+ if (option6._tag === "Some") {
28664
+ self.ref.current = option6.value;
28665
+ }
28666
+ return self.ref.current;
28667
+ }));
28668
+ var getUnsafe5 = (self) => self.ref.current;
28669
+
28670
+ // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/ChannelSchema.js
28671
+ var decode2 = (schema2, options) => () => {
28672
+ const decode3 = decodeEffect2(NonEmptyArray(schema2), options);
28673
+ return fromTransform((upstream, _scope) => succeed7(flatMap5(upstream, (chunk) => decode3(chunk))));
28674
+ };
28675
+
28676
+ // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/PlatformError.js
28677
+ var TypeId42 = "~effect/PlatformError";
28678
+ var BadArgument = class extends (/* @__PURE__ */ TaggedError2("BadArgument")) {
28679
+ /**
28680
+ * Formats the module, method, and optional description that rejected the argument.
28681
+ *
28682
+ * **When to use**
28683
+ *
28684
+ * Use to read the formatted error message for a rejected platform argument.
28685
+ *
28686
+ * @since 4.0.0
28687
+ */
28688
+ get message() {
28689
+ return `${this.module}.${this.method}${this.description ? `: ${this.description}` : ""}`;
28690
+ }
28691
+ };
28692
+ var PlatformError = class extends (/* @__PURE__ */ TaggedError2("PlatformError")) {
28693
+ constructor(reason) {
28694
+ if ("cause" in reason) {
28695
+ super({
28696
+ reason,
28697
+ cause: reason.cause
28698
+ });
28699
+ } else {
28700
+ super({
28701
+ reason
28702
+ });
28352
28703
  }
28353
- let joined;
28354
- for (let i = 0; i < arguments.length; ++i) {
28355
- const arg = arguments[i];
28356
- if (arg.length > 0) {
28357
- if (joined === void 0) {
28358
- joined = arg;
28704
+ }
28705
+ /**
28706
+ * Marks this value as a platform error wrapper for runtime guards.
28707
+ *
28708
+ * **When to use**
28709
+ *
28710
+ * Use to identify `PlatformError` values through their runtime type marker.
28711
+ *
28712
+ * @since 4.0.0
28713
+ */
28714
+ [TypeId42] = TypeId42;
28715
+ get message() {
28716
+ return this.reason.message;
28717
+ }
28718
+ };
28719
+ var badArgument = (options) => new PlatformError(new BadArgument(options));
28720
+
28721
+ // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/FileSystem.js
28722
+ var FileSystem = /* @__PURE__ */ Service("effect/FileSystem");
28723
+
28724
+ // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Path.js
28725
+ var TypeId43 = "~effect/Path";
28726
+ var Path = /* @__PURE__ */ Service("effect/Path");
28727
+ function normalizeStringPosix(path, allowAboveRoot) {
28728
+ let res = "";
28729
+ let lastSegmentLength = 0;
28730
+ let lastSlash = -1;
28731
+ let dots = 0;
28732
+ let code;
28733
+ for (let i = 0; i <= path.length; ++i) {
28734
+ if (i < path.length) {
28735
+ code = path.charCodeAt(i);
28736
+ } else if (code === 47) {
28737
+ break;
28738
+ } else {
28739
+ code = 47;
28740
+ }
28741
+ if (code === 47) {
28742
+ if (lastSlash === i - 1 || dots === 1) {
28743
+ } else if (lastSlash !== i - 1 && dots === 2) {
28744
+ if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 || res.charCodeAt(res.length - 2) !== 46) {
28745
+ if (res.length > 2) {
28746
+ const lastSlashIndex = res.lastIndexOf("/");
28747
+ if (lastSlashIndex !== res.length - 1) {
28748
+ if (lastSlashIndex === -1) {
28749
+ res = "";
28750
+ lastSegmentLength = 0;
28751
+ } else {
28752
+ res = res.slice(0, lastSlashIndex);
28753
+ lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
28754
+ }
28755
+ lastSlash = i;
28756
+ dots = 0;
28757
+ continue;
28758
+ }
28759
+ } else if (res.length === 2 || res.length === 1) {
28760
+ res = "";
28761
+ lastSegmentLength = 0;
28762
+ lastSlash = i;
28763
+ dots = 0;
28764
+ continue;
28765
+ }
28766
+ }
28767
+ if (allowAboveRoot) {
28768
+ if (res.length > 0) {
28769
+ res += "/..";
28770
+ } else {
28771
+ res = "..";
28772
+ }
28773
+ lastSegmentLength = 2;
28774
+ }
28775
+ } else {
28776
+ if (res.length > 0) {
28777
+ res += "/" + path.slice(lastSlash + 1, i);
28359
28778
  } else {
28360
- joined += "/" + arg;
28779
+ res = path.slice(lastSlash + 1, i);
28361
28780
  }
28781
+ lastSegmentLength = i - lastSlash - 1;
28362
28782
  }
28363
- }
28783
+ lastSlash = i;
28784
+ dots = 0;
28785
+ } else if (code === 46 && dots !== -1) {
28786
+ ++dots;
28787
+ } else {
28788
+ dots = -1;
28789
+ }
28790
+ }
28791
+ return res;
28792
+ }
28793
+ function _format(sep, pathObject) {
28794
+ const dir = pathObject.dir || pathObject.root;
28795
+ const base = pathObject.base || (pathObject.name || "") + (pathObject.ext || "");
28796
+ if (!dir) {
28797
+ return base;
28798
+ }
28799
+ if (dir === pathObject.root) {
28800
+ return dir + base;
28801
+ }
28802
+ return dir + sep + base;
28803
+ }
28804
+ function fromFileUrl(url) {
28805
+ if (url.protocol !== "file:") {
28806
+ return fail7(new BadArgument({
28807
+ module: "Path",
28808
+ method: "fromFileUrl",
28809
+ description: "URL must be of scheme file"
28810
+ }));
28811
+ } else if (url.hostname !== "") {
28812
+ return fail7(new BadArgument({
28813
+ module: "Path",
28814
+ method: "fromFileUrl",
28815
+ description: "Invalid file URL host"
28816
+ }));
28817
+ }
28818
+ const pathname = url.pathname;
28819
+ for (let n = 0; n < pathname.length; n++) {
28820
+ if (pathname[n] === "%") {
28821
+ const third = pathname.codePointAt(n + 2) | 32;
28822
+ if (pathname[n + 1] === "2" && third === 102) {
28823
+ return fail7(new BadArgument({
28824
+ module: "Path",
28825
+ method: "fromFileUrl",
28826
+ description: "must not include encoded / characters"
28827
+ }));
28828
+ }
28829
+ }
28830
+ }
28831
+ return succeed7(decodeURIComponent(pathname));
28832
+ }
28833
+ var resolve2 = function resolve3() {
28834
+ let resolvedPath = "";
28835
+ let resolvedAbsolute = false;
28836
+ let cwd = void 0;
28837
+ for (let i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
28838
+ let path;
28839
+ if (i >= 0) {
28840
+ path = arguments[i];
28841
+ } else {
28842
+ const process = globalThis.process;
28843
+ if (cwd === void 0 && "process" in globalThis && typeof process === "object" && process !== null && typeof process.cwd === "function") {
28844
+ cwd = process.cwd();
28845
+ }
28846
+ path = cwd;
28847
+ }
28848
+ if (path.length === 0) {
28849
+ continue;
28850
+ }
28851
+ resolvedPath = path + "/" + resolvedPath;
28852
+ resolvedAbsolute = path.charCodeAt(0) === 47;
28853
+ }
28854
+ resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);
28855
+ if (resolvedAbsolute) {
28856
+ if (resolvedPath.length > 0) {
28857
+ return "/" + resolvedPath;
28858
+ } else {
28859
+ return "/";
28860
+ }
28861
+ } else if (resolvedPath.length > 0) {
28862
+ return resolvedPath;
28863
+ } else {
28864
+ return ".";
28865
+ }
28866
+ };
28867
+ var CHAR_FORWARD_SLASH = 47;
28868
+ function toFileUrl(filepath) {
28869
+ const outURL = new URL("file://");
28870
+ let resolved2 = resolve2(filepath);
28871
+ const filePathLast = filepath.charCodeAt(filepath.length - 1);
28872
+ if (filePathLast === CHAR_FORWARD_SLASH && resolved2[resolved2.length - 1] !== "/") {
28873
+ resolved2 += "/";
28874
+ }
28875
+ outURL.pathname = encodePathChars(resolved2);
28876
+ return succeed7(outURL);
28877
+ }
28878
+ var percentRegExp = /%/g;
28879
+ var backslashRegExp = /\\/g;
28880
+ var newlineRegExp = /\n/g;
28881
+ var carriageReturnRegExp = /\r/g;
28882
+ var tabRegExp = /\t/g;
28883
+ function encodePathChars(filepath) {
28884
+ if (filepath.includes("%")) {
28885
+ filepath = filepath.replace(percentRegExp, "%25");
28886
+ }
28887
+ if (filepath.includes("\\")) {
28888
+ filepath = filepath.replace(backslashRegExp, "%5C");
28889
+ }
28890
+ if (filepath.includes("\n")) {
28891
+ filepath = filepath.replace(newlineRegExp, "%0A");
28892
+ }
28893
+ if (filepath.includes("\r")) {
28894
+ filepath = filepath.replace(carriageReturnRegExp, "%0D");
28895
+ }
28896
+ if (filepath.includes(" ")) {
28897
+ filepath = filepath.replace(tabRegExp, "%09");
28898
+ }
28899
+ return filepath;
28900
+ }
28901
+ var posixImpl = /* @__PURE__ */ Path.of({
28902
+ [TypeId43]: TypeId43,
28903
+ resolve: resolve2,
28904
+ normalize(path) {
28905
+ if (path.length === 0) return ".";
28906
+ const isAbsolute = path.charCodeAt(0) === 47;
28907
+ const trailingSeparator = path.charCodeAt(path.length - 1) === 47;
28908
+ path = normalizeStringPosix(path, !isAbsolute);
28909
+ if (path.length === 0 && !isAbsolute) path = ".";
28910
+ if (path.length > 0 && trailingSeparator) path += "/";
28911
+ if (isAbsolute) return "/" + path;
28912
+ return path;
28913
+ },
28914
+ isAbsolute(path) {
28915
+ return path.length > 0 && path.charCodeAt(0) === 47;
28916
+ },
28917
+ join() {
28918
+ if (arguments.length === 0) {
28919
+ return ".";
28920
+ }
28921
+ let joined;
28922
+ for (let i = 0; i < arguments.length; ++i) {
28923
+ const arg = arguments[i];
28924
+ if (arg.length > 0) {
28925
+ if (joined === void 0) {
28926
+ joined = arg;
28927
+ } else {
28928
+ joined += "/" + arg;
28929
+ }
28930
+ }
28931
+ }
28364
28932
  if (joined === void 0) {
28365
28933
  return ".";
28366
28934
  }
@@ -28611,1224 +29179,795 @@ var posixImpl = /* @__PURE__ */ Path.of({
28611
29179
  }
28612
29180
  ret.ext = path.slice(startDot, end3);
28613
29181
  }
28614
- if (startPart > 0) ret.dir = path.slice(0, startPart - 1);
28615
- else if (isAbsolute) ret.dir = "/";
28616
- return ret;
28617
- },
28618
- sep: "/",
28619
- fromFileUrl,
28620
- toFileUrl,
28621
- toNamespacedPath: identity
28622
- });
28623
-
28624
- // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/ConfigProvider.js
28625
- function makeValue(value6) {
28626
- return {
28627
- _tag: "Value",
28628
- value: value6
28629
- };
28630
- }
28631
- function makeRecord(keys4, value6) {
28632
- return {
28633
- _tag: "Record",
28634
- keys: keys4,
28635
- value: value6
28636
- };
28637
- }
28638
- function makeArray(length, value6) {
28639
- return {
28640
- _tag: "Array",
28641
- length,
28642
- value: value6
28643
- };
28644
- }
28645
- var ConfigProvider = /* @__PURE__ */ Reference("effect/ConfigProvider", {
28646
- defaultValue: () => fromEnv()
28647
- });
28648
- var Proto8 = {
28649
- ...PipeInspectableProto,
28650
- toJSON() {
28651
- return {
28652
- _id: "ConfigProvider"
28653
- };
28654
- }
28655
- };
28656
- var identityPath = (path) => path;
28657
- function makeProvider(load, mapInput3) {
28658
- const self = Object.create(Proto8);
28659
- self.load = load;
28660
- self.mapInput = mapInput3;
28661
- return self;
28662
- }
28663
- function makeSource(get12, transform4) {
28664
- return makeProvider((path) => get12(transform4(path)), (f) => makeSource(get12, flow(transform4, f)));
28665
- }
28666
- function make38(get12) {
28667
- return makeSource(get12, identityPath);
28668
- }
28669
- function emptyStringAsMissing(value6, preserveEmptyStrings) {
28670
- return value6 === "" && !preserveEmptyStrings ? void 0 : value6;
28671
- }
28672
- function fromEnvRecord(env, options) {
28673
- const preserveEmptyStrings = options?.preserveEmptyStrings === true;
28674
- const trie = buildEnvTrie(env);
28675
- return make38((path) => succeed7(nodeAtEnv(trie, env, path, preserveEmptyStrings)));
28676
- }
28677
- function fromEnv(options) {
28678
- const env = options?.env ?? {
28679
- ...globalThis.process?.env,
28680
- ...import.meta?.env
28681
- };
28682
- return fromEnvRecord(env, {
28683
- preserveEmptyStrings: options?.preserveEmptyStrings
28684
- });
28685
- }
28686
- function buildEnvTrie(env) {
28687
- const trie = {};
28688
- for (const [name, value6] of Object.entries(env)) {
28689
- if (value6 === void 0) continue;
28690
- const segments = name.split("_");
28691
- let node = trie;
28692
- for (const seg of segments) {
28693
- const children = node.children ??= /* @__PURE__ */ Object.create(null);
28694
- node = children[seg] ??= {};
28695
- }
28696
- }
28697
- return trie;
28698
- }
28699
- function nodeAtEnv(trie, env, path, preserveEmptyStrings) {
28700
- const key = path.map(String).join("_");
28701
- const leafValue = emptyStringAsMissing(Object.hasOwn(env, key) ? env[key] : void 0, preserveEmptyStrings);
28702
- const trieNode = trieNodeAt(trie, path);
28703
- const children = trieNode?.children ? Object.keys(trieNode.children) : [];
28704
- if (children.length === 0) {
28705
- return leafValue === void 0 ? void 0 : makeValue(leafValue);
28706
- }
28707
- const allNumeric = children.every(isCanonicalArrayIndex);
28708
- if (allNumeric) {
28709
- const length = Math.max(...children.map((k) => parseInt(k, 10))) + 1;
28710
- return makeArray(length, leafValue);
28711
- }
28712
- return makeRecord(new Set(children), leafValue);
28713
- }
28714
- function trieNodeAt(root, path) {
28715
- if (path.length === 0) return root;
28716
- let node = root;
28717
- for (const seg of path) {
28718
- node = node?.children?.[String(seg)];
28719
- if (!node) return void 0;
28720
- }
28721
- return node;
28722
- }
28723
-
28724
- // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Config.js
28725
- var TypeId42 = "~effect/Config";
28726
- var ConfigError = class {
28727
- _tag = "ConfigError";
28728
- name = "ConfigError";
28729
- cause;
28730
- constructor(cause) {
28731
- this.cause = cause;
28732
- }
28733
- get message() {
28734
- return this.cause.toString();
28735
- }
28736
- toString() {
28737
- return `ConfigError(${this.message})`;
28738
- }
28739
- };
28740
- var Proto9 = {
28741
- .../* @__PURE__ */ Prototype2({
28742
- label: "Config",
28743
- evaluate(fiber3) {
28744
- return this.parse(fiber3.getRef(ConfigProvider));
28745
- }
28746
- }),
28747
- [TypeId42]: TypeId42,
28748
- toJSON() {
28749
- return {
28750
- _id: "Config"
28751
- };
28752
- }
28753
- };
28754
- function make39(evaluator) {
28755
- const self = Object.create(Proto9);
28756
- self.evaluator = evaluator;
28757
- self.parse = (provider) => evaluator(provider, []).pipe(mapErrorEager2((failure) => failure.error), flatMapEager2((resolution) => resolution._tag === "Resolved" ? succeed7(resolution.value) : fail7(resolution.error)));
28758
- return self;
28759
- }
28760
- var evaluateAt = (self, provider, pathPrefix) => self.evaluator(provider, pathPrefix);
28761
- var resolved = (value6, hasInput2) => ({
28762
- _tag: "Resolved",
28763
- value: value6,
28764
- hasInput: hasInput2
28765
- });
28766
- var absent = (error) => ({
28767
- _tag: "Absent",
28768
- error
28769
- });
28770
- var evaluationFailure = (error, hasInput2) => ({
28771
- error,
28772
- hasInput: hasInput2
28773
- });
28774
- var isSourceError = (u) => isTagged(u, "SourceError");
28775
- var catchSourceError = (self, hasInput2) => self.pipe(catchDefect2((defect) => isSourceError(defect) ? fail7(evaluationFailure(new ConfigError(defect), hasInput2)) : die5(defect)));
28776
- var preserveInputEvidence = (self, hasInput2) => {
28777
- if (!hasInput2) return self;
28778
- return self.pipe(mapErrorEager2((failure) => evaluationFailure(failure.error, true)), flatMapEager2((resolution) => resolution._tag === "Resolved" ? succeed7(resolved(resolution.value, true)) : fail7(evaluationFailure(resolution.error, true))));
28779
- };
28780
- var map14 = /* @__PURE__ */ dual(2, (self, f) => {
28781
- return make39((provider, pathPrefix) => map9(evaluateAt(self, provider, pathPrefix), (resolution) => resolution._tag === "Resolved" ? resolved(f(resolution.value), resolution.hasInput) : resolution));
28782
- });
28783
- var orElse3 = /* @__PURE__ */ dual(2, (self, that) => {
28784
- return make39((provider, pathPrefix) => matchEffect3(evaluateAt(self, provider, pathPrefix), {
28785
- onFailure: (failure) => preserveInputEvidence(evaluateAt(that(failure.error), provider, pathPrefix), failure.hasInput),
28786
- onSuccess: (resolution) => resolution._tag === "Absent" ? evaluateAt(that(resolution.error), provider, pathPrefix) : succeed7(resolution)
28787
- }));
28788
- });
28789
- function all5(arg) {
28790
- const configs = globalThis.Array.isArray(arg) ? arg : Symbol.iterator in arg ? [...arg] : arg;
28791
- if (globalThis.Array.isArray(configs)) {
28792
- return make39((provider, pathPrefix) => flatMapEager2(all4(configs.map((config) => result2(evaluateAt(config, provider, pathPrefix)))), resolveArray));
28793
- } else {
28794
- return make39((provider, pathPrefix) => flatMapEager2(all4(map3(configs, (config) => result2(evaluateAt(config, provider, pathPrefix)))), resolveRecord));
28795
- }
28796
- }
28797
- var resolveArray = (results) => {
28798
- const values2 = [];
28799
- let firstFailure;
28800
- let firstAbsent;
28801
- let hasInput2 = false;
28802
- for (const result6 of results) {
28803
- if (isFailure2(result6)) {
28804
- firstFailure ??= result6.failure;
28805
- hasInput2 = hasInput2 || result6.failure.hasInput;
28806
- continue;
28807
- }
28808
- const resolution = result6.success;
28809
- if (resolution._tag === "Absent") {
28810
- firstAbsent ??= resolution;
28811
- } else {
28812
- values2.push(resolution.value);
28813
- hasInput2 = hasInput2 || resolution.hasInput;
28814
- }
28815
- }
28816
- if (firstFailure !== void 0) {
28817
- return fail7(evaluationFailure(firstFailure.error, hasInput2));
28818
- }
28819
- if (firstAbsent !== void 0) {
28820
- return hasInput2 ? fail7(evaluationFailure(firstAbsent.error, true)) : succeed7(firstAbsent);
28821
- }
28822
- return succeed7(resolved(values2, hasInput2));
28823
- };
28824
- var resolveRecord = (results) => {
28825
- const values2 = {};
28826
- let firstFailure;
28827
- let firstAbsent;
28828
- let hasInput2 = false;
28829
- for (const key in results) {
28830
- const result6 = results[key];
28831
- if (isFailure2(result6)) {
28832
- firstFailure ??= result6.failure;
28833
- hasInput2 = hasInput2 || result6.failure.hasInput;
28834
- continue;
28835
- }
28836
- const resolution = result6.success;
28837
- if (resolution._tag === "Absent") {
28838
- firstAbsent ??= resolution;
28839
- } else {
28840
- assignProperty(values2, key, resolution.value);
28841
- hasInput2 = hasInput2 || resolution.hasInput;
28842
- }
28843
- }
28844
- if (firstFailure !== void 0) {
28845
- return fail7(evaluationFailure(firstFailure.error, hasInput2));
28846
- }
28847
- if (firstAbsent !== void 0) {
28848
- return hasInput2 ? fail7(evaluationFailure(firstAbsent.error, true)) : succeed7(firstAbsent);
28849
- }
28850
- return succeed7(resolved(values2, hasInput2));
28851
- };
28852
- var withDefault2 = /* @__PURE__ */ dual(2, (self, defaultValue) => {
28853
- return make39((provider, pathPrefix) => mapEager2(evaluateAt(self, provider, pathPrefix), (resolution) => resolution._tag === "Absent" ? resolved(defaultValue, false) : resolution));
28854
- });
28855
- var option3 = (self) => self.pipe(map14(some2), withDefault2(none2()));
28856
- var cursorToString = () => "<configuration>";
28857
- var loadCursor = (provider, path) => provider.load(path).pipe(orDie3, mapEager2((node) => ({
28858
- provider,
28859
- path,
28860
- node,
28861
- toString: cursorToString
28862
- })));
28863
- var loadChildCursor = (cursor, segment) => loadCursor(cursor.provider, [...cursor.path, segment]);
28864
- var getScalar = (node) => node?.value;
28865
- var decodeFromCursor = (ast, decode3) => decodeTo(unknown, ast, new Transformation(transformEffect((input) => decode3(input)), passthrough2()));
28866
- var isScalarInput = (ast) => {
28867
- switch (ast._tag) {
28868
- case "Union":
28869
- return ast.types.every(isScalarInput);
28870
- case "Objects":
28871
- case "Arrays":
28872
- case "Suspend":
28873
- return false;
28874
- default:
28875
- return true;
28876
- }
28877
- };
28878
- var hasProviderInput = (ast, node) => {
28879
- switch (ast._tag) {
28880
- case "Objects":
28881
- return node?._tag === "Record";
28882
- case "Arrays":
28883
- return node?._tag === "Array";
28884
- case "Union":
28885
- return ast.types.some((ast2) => hasProviderInput(ast2, node));
28886
- case "Suspend":
28887
- return hasProviderInput(ast.thunk(), node);
28888
- default:
28889
- return getScalar(node) !== void 0;
28890
- }
28891
- };
28892
- var toConfigCursorAST = /* @__PURE__ */ memoize((root) => {
28893
- const seen = /* @__PURE__ */ new WeakSet();
28894
- const recur2 = applyToSelfOrLastLinkEncoding((ast) => {
28895
- seen.add(ast);
28896
- switch (ast._tag) {
28897
- case "Objects": {
28898
- const matchesIndex = ast.indexSignatures.map((is5) => _is(is5.parameter));
28899
- const materialize = fnUntraced2(function* (cursor) {
28900
- if (cursor.node?._tag !== "Record") {
28901
- return void 0;
28902
- }
28903
- const node = cursor.node;
28904
- const keys4 = /* @__PURE__ */ new Set();
28905
- for (const property of ast.propertySignatures) {
28906
- if (typeof property.name === "string") keys4.add(property.name);
28907
- }
28908
- if (matchesIndex.length > 0) {
28909
- for (const key of node.keys) {
28910
- if (matchesIndex.some((matches) => matches(key))) keys4.add(key);
28911
- }
28912
- }
28913
- const out = {};
28914
- for (const key of keys4) {
28915
- const child = yield* loadChildCursor(cursor, key);
28916
- if (child.node !== void 0) assignProperty(out, key, child);
28917
- }
28918
- return out;
28919
- });
28920
- return decodeFromCursor(ast.recur(recur2, (ast2) => ast2), materialize);
28921
- }
28922
- case "Arrays": {
28923
- const materialize = fnUntraced2(function* (cursor) {
28924
- if (cursor.node?._tag !== "Array") {
28925
- return void 0;
28926
- }
28927
- const out = [];
28928
- for (let i = 0; i < cursor.node.length; i++) {
28929
- out.push(yield* loadChildCursor(cursor, i));
28930
- }
28931
- return out;
28932
- });
28933
- return decodeFromCursor(ast.recur(recur2), materialize);
28934
- }
28935
- case "Union":
28936
- for (const member of ast.types) {
28937
- recur2(member);
28938
- }
28939
- return isScalarInput(ast) ? decodeFromCursor(ast, (cursor) => succeed7(getScalar(cursor.node))) : ast.recur(recur2);
28940
- case "Suspend": {
28941
- const target = ast.thunk();
28942
- if (!seen.has(target)) recur2(target);
28943
- return ast.recur(recur2);
28944
- }
28945
- case "Declaration":
28946
- case "Any":
28947
- throw new globalThis.Error("Config.schema does not support opaque StringTree encodings", {
28948
- cause: ast
28949
- });
28950
- default:
28951
- return decodeFromCursor(ast, (cursor) => succeed7(getScalar(cursor.node)));
28952
- }
28953
- });
28954
- return recur2(root);
28955
- });
28956
- function schema(codec, path) {
28957
- const codecStringTree = toCodecStringTree2(codec);
28958
- const encodedAst = toEncoded(codecStringTree.ast);
28959
- const decodeCursor = decodeUnknownEffect(make28(toConfigCursorAST(codecStringTree.ast)));
28960
- const localPath = typeof path === "string" ? [path] : path ?? [];
28961
- return make39((provider, pathPrefix) => {
28962
- const fullPath = [...pathPrefix, ...localPath];
28963
- return catchSourceError(loadCursor(provider, fullPath), false).pipe(flatMapEager2((cursor) => {
28964
- const hasInput2 = hasProviderInput(encodedAst, cursor.node);
28965
- return catchSourceError(decodeCursor(cursor).pipe(mapEager2((value6) => resolved(value6, hasInput2)), catchEager2((issue) => {
28966
- const error = new ConfigError(new SchemaError(fullPath.length > 0 ? new Pointer(fullPath, issue) : issue));
28967
- return hasInput2 ? fail7(evaluationFailure(error, true)) : succeed7(absent(error));
28968
- })), hasInput2);
28969
- }));
28970
- });
28971
- }
28972
- var isPath = (u) => isString(u) || globalThis.Array.isArray(u);
28973
- function String7(name) {
28974
- return schema(String6, name);
28975
- }
28976
- function Int2(name) {
28977
- return schema(Int, name);
28978
- }
28979
- function Literals2(literals, name) {
28980
- return schema(Literals(literals), name);
28981
- }
28982
- function Array3(value6, pathOrOptions, options) {
28983
- const hasPath = isPath(pathOrOptions);
28984
- const resolvedOptions = hasPath ? options : pathOrOptions;
28985
- const array2 = ArraySchema(value6);
28986
- const separator = resolvedOptions?.separator ?? ",";
28987
- const arrayString = String6.pipe(decodeTo2(toCodecStringTree2(array2), {
28988
- decode: split(resolvedOptions),
28989
- encode: passthrough2({
28990
- strict: false
28991
- }).compose(transform((input) => input.join(separator)))
28992
- }));
28993
- return schema(Union2([arrayString, array2]), hasPath ? pathOrOptions : void 0);
28994
- }
28995
- function Record2(key, value6, pathOrOptions, options) {
28996
- const hasPath = isPath(pathOrOptions);
28997
- const record3 = Record(key, value6);
28998
- const split3 = splitKeyValue2(hasPath ? options : pathOrOptions);
28999
- const recordString = String6.pipe(decodeTo2(toCodecStringTree2(record3), {
29000
- decode: split3.decode,
29001
- encode: passthrough2({
29002
- strict: false
29003
- }).compose(split3.encode)
29004
- }));
29005
- return schema(Union2([record3, recordString]), hasPath ? pathOrOptions : void 0);
29006
- }
29007
- function Boolean4(name) {
29008
- return schema(BooleanLiterals, name);
29009
- }
29010
- function URL3(name) {
29011
- return schema(URL2, name);
29012
- }
29013
-
29014
- // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/ErrorReporter.js
29015
- var ignore5 = "~effect/ErrorReporter/ignore";
29016
-
29017
- // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/FiberSet.js
29018
- var FiberSet_exports = {};
29019
- __export(FiberSet_exports, {
29020
- add: () => add4,
29021
- addUnsafe: () => addUnsafe2,
29022
- awaitEmpty: () => awaitEmpty,
29023
- clear: () => clear4,
29024
- isFiberSet: () => isFiberSet,
29025
- join: () => join3,
29026
- make: () => make40,
29027
- makeRuntime: () => makeRuntime,
29028
- makeRuntimePromise: () => makeRuntimePromise,
29029
- run: () => run3,
29030
- runtime: () => runtime,
29031
- runtimePromise: () => runtimePromise,
29032
- size: () => size8
29033
- });
29034
- var TypeId43 = "~effect/FiberSet";
29035
- var isFiberSet = (u) => hasProperty(u, TypeId43);
29036
- var Proto10 = {
29037
- [TypeId43]: TypeId43,
29038
- [Symbol.iterator]() {
29039
- if (this.state._tag === "Closed") {
29040
- return empty2();
29041
- }
29042
- return this.state.backing[Symbol.iterator]();
29043
- },
29044
- ...PipeInspectableProto,
29045
- toJSON() {
29046
- return {
29047
- _id: "FiberSet",
29048
- state: this.state
29049
- };
29050
- }
29051
- };
29052
- var makeUnsafe10 = (backing, deferred) => {
29053
- const self = Object.create(Proto10);
29054
- self.state = {
29055
- _tag: "Open",
29056
- backing
29057
- };
29058
- self.deferred = deferred;
29059
- return self;
29060
- };
29061
- var make40 = () => acquireRelease2(sync4(() => makeUnsafe10(/* @__PURE__ */ new Set(), makeUnsafe2())), (set10) => suspend3(() => {
29062
- const state = set10.state;
29063
- if (state._tag === "Closed") return void_5;
29064
- set10.state = {
29065
- _tag: "Closed"
29066
- };
29067
- const fibers = state.backing;
29068
- return interruptAll(fibers).pipe(into(set10.deferred));
29069
- }));
29070
- var makeRuntime = () => flatMap5(make40(), (self) => runtime(self)());
29071
- var makeRuntimePromise = () => flatMap5(make40(), (self) => runtimePromise(self)());
29072
- var internalFiberId = -1;
29073
- var isInternalInterruption = /* @__PURE__ */ toPredicate(/* @__PURE__ */ compose(filterInterruptors, /* @__PURE__ */ has2(internalFiberId)));
29074
- var addUnsafe2 = /* @__PURE__ */ dual((args2) => isFiberSet(args2[0]), (self, fiber3, options) => {
29075
- if (self.state._tag === "Closed") {
29076
- fiber3.interruptUnsafe(internalFiberId);
29077
- return;
29078
- } else if (self.state.backing.has(fiber3)) {
29079
- return;
29080
- }
29081
- self.state.backing.add(fiber3);
29082
- fiber3.addObserver((exit3) => {
29083
- if (self.state._tag === "Closed") {
29084
- return;
29085
- }
29086
- self.state.backing.delete(fiber3);
29087
- if (isFailure4(exit3) && (options?.propagateInterruption === true ? !isInternalInterruption(exit3.cause) : !hasInterruptsOnly2(exit3.cause))) {
29088
- doneUnsafe(self.deferred, exit3);
29089
- }
29090
- });
29091
- });
29092
- var add4 = /* @__PURE__ */ dual((args2) => isFiberSet(args2[0]), (self, fiber3, options) => sync4(() => addUnsafe2(self, fiber3, options)));
29093
- var clear4 = (self) => suspend3(() => {
29094
- if (self.state._tag === "Closed") {
29095
- return void_5;
29096
- }
29097
- return interruptAllAs(self.state.backing, internalFiberId);
29098
- });
29099
- var constInterruptedFiber = /* @__PURE__ */ (function() {
29100
- let fiber3 = void 0;
29101
- return () => {
29102
- if (fiber3 === void 0) {
29103
- fiber3 = runFork2(interrupt5);
29104
- }
29105
- return fiber3;
29106
- };
29107
- })();
29108
- var run3 = function() {
29109
- const self = arguments[0];
29110
- if (!isEffect2(arguments[1])) {
29111
- const options = arguments[1];
29112
- return (effect2) => runImpl(self, effect2, options);
29113
- }
29114
- return runImpl(self, arguments[1], arguments[2]);
29115
- };
29116
- var runImpl = (self, effect2, options) => withFiber2((parent) => {
29117
- if (self.state._tag === "Closed") {
29118
- return sync4(constInterruptedFiber);
29119
- }
29120
- const fiber3 = runForkWith2(parent.context)(effect2);
29121
- addUnsafe2(self, fiber3, options);
29122
- return succeed7(fiber3);
29123
- });
29124
- var runtime = (self) => () => map9(context2(), (services) => {
29125
- const runFork3 = runForkWith2(services);
29126
- return (effect2, options) => {
29127
- if (self.state._tag === "Closed") {
29128
- return constInterruptedFiber();
29129
- }
29130
- const fiber3 = runFork3(effect2, options);
29131
- addUnsafe2(self, fiber3, options);
29132
- return fiber3;
29133
- };
29134
- });
29135
- var runtimePromise = (self) => () => map9(runtime(self)(), (runFork3) => (effect2, options) => new Promise((resolve4, reject) => runFork3(effect2, options).addObserver((exit3) => {
29136
- if (isSuccess4(exit3)) {
29137
- resolve4(exit3.value);
29138
- } else {
29139
- reject(squash(exit3.cause));
29140
- }
29141
- })));
29142
- var size8 = (self) => sync4(() => self.state._tag === "Closed" ? 0 : self.state.backing.size);
29143
- var join3 = (self) => _await(self.deferred);
29144
- var awaitEmpty = (self) => whileLoop2({
29145
- while: () => self.state._tag === "Open" && self.state.backing.size > 0,
29146
- body: () => await_(headUnsafe(self)),
29147
- step: constVoid
29148
- });
29149
-
29150
- // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/PrimaryKey.js
29151
- var symbol4 = "~effect/PrimaryKey";
29152
-
29153
- // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Logger.js
29154
- var Logger_exports = {};
29155
- __export(Logger_exports, {
29156
- CurrentLoggers: () => CurrentLoggers2,
29157
- LogToStderr: () => LogToStderr2,
29158
- batched: () => batched,
29159
- consoleJson: () => consoleJson,
29160
- consoleLogFmt: () => consoleLogFmt,
29161
- consolePretty: () => consolePretty2,
29162
- consolePrettyBrowser: () => consolePrettyBrowser,
29163
- consolePrettyTty: () => consolePrettyTty,
29164
- consoleStructured: () => consoleStructured,
29165
- defaultLogger: () => defaultLogger2,
29166
- formatJson: () => formatJson2,
29167
- formatLogFmt: () => formatLogFmt,
29168
- formatSimple: () => formatSimple,
29169
- formatStructured: () => formatStructured,
29170
- isLogger: () => isLogger,
29171
- layer: () => layer,
29172
- make: () => make41,
29173
- map: () => map15,
29174
- toFile: () => toFile,
29175
- tracerLogger: () => tracerLogger2,
29176
- withConsoleError: () => withConsoleError,
29177
- withConsoleLog: () => withConsoleLog,
29178
- withLeveledConsole: () => withLeveledConsole
29179
- });
29180
- var TypeId44 = "~effect/Logger";
29181
- var isLogger = (u) => hasProperty(u, TypeId44);
29182
- var CurrentLoggers2 = CurrentLoggers;
29183
- var LogToStderr2 = LogToStderr;
29184
- var map15 = /* @__PURE__ */ dual(2, (self, f) => loggerMake((options) => f(self.log(options))));
29185
- var withConsoleLog = (self) => loggerMake((options) => {
29186
- const console = options.fiber.getRef(ConsoleRef);
29187
- return console.log(self.log(options));
29188
- });
29189
- var withConsoleError = (self) => loggerMake((options) => {
29190
- const console = options.fiber.getRef(ConsoleRef);
29191
- return console.error(self.log(options));
29192
- });
29193
- var withLeveledConsole = (self) => loggerMake((options) => {
29194
- const console = options.fiber.getRef(ConsoleRef);
29195
- const output = self.log(options);
29196
- switch (options.logLevel) {
29197
- case "Debug":
29198
- return console.debug(output);
29199
- case "Info":
29200
- return console.info(output);
29201
- case "Trace":
29202
- return console.trace(output);
29203
- case "Warn":
29204
- return console.warn(output);
29205
- case "Error":
29206
- case "Fatal":
29207
- return console.error(output);
29208
- default:
29209
- return console.log(output);
29210
- }
29211
- });
29212
- var textOnly = /^[^\s"=]*$/;
29213
- var escapeDoubleQuotes = (s) => `"${s.replace(/\\([\s\S])|(")/g, "\\$1$2")}"`;
29214
- var formatFiberId = (fiberId3) => `#${fiberId3}`;
29215
- var format9 = (quoteValue, space) => ({
29216
- cause,
29217
- date: date2,
29218
- fiber: fiber3,
29219
- logLevel,
29220
- message
29221
- }) => {
29222
- const formatUnknown = (value6) => typeof value6 === "string" ? value6 : format(value6, {
29223
- space
29224
- });
29225
- const formatValue = (value6) => value6.match(textOnly) ? value6 : quoteValue(value6);
29226
- const format10 = (label, value6) => `${formatLabel(label)}=${formatValue(value6)}`;
29227
- const append4 = (label, value6) => " " + format10(label, value6);
29228
- let out = format10("timestamp", date2.toISOString());
29229
- out += append4("level", logLevel.toUpperCase());
29230
- out += append4("fiber", formatFiberId(fiber3.id));
29231
- const messages = ensure(message);
29232
- for (let i = 0; i < messages.length; i++) {
29233
- out += append4("message", formatUnknown(messages[i]));
29234
- }
29235
- if (cause.reasons.length > 0) {
29236
- out += append4("cause", causePretty(cause));
29237
- }
29238
- const now2 = date2.getTime();
29239
- const spans = fiber3.getRef(CurrentLogSpans2);
29240
- for (const span2 of spans) {
29241
- out += " " + formatLogSpan(span2, now2);
29242
- }
29243
- const annotations2 = fiber3.getRef(CurrentLogAnnotations2);
29244
- for (const [label, value6] of Object.entries(annotations2)) {
29245
- out += append4(label, formatUnknown(value6));
29246
- }
29247
- return out;
29248
- };
29249
- var make41 = loggerMake;
29250
- var defaultLogger2 = defaultLogger;
29251
- var formatSimple = /* @__PURE__ */ loggerMake(/* @__PURE__ */ format9(escapeDoubleQuotes));
29252
- var formatLogFmt = /* @__PURE__ */ loggerMake(/* @__PURE__ */ format9(JSON.stringify, 0));
29253
- var formatStructured = /* @__PURE__ */ loggerMake(({
29254
- cause,
29255
- date: date2,
29256
- fiber: fiber3,
29257
- logLevel,
29258
- message
29259
- }) => {
29260
- const annotationsObj = {};
29261
- const spansObj = {};
29262
- const annotations2 = fiber3.getRef(CurrentLogAnnotations2);
29263
- for (const [key, value6] of Object.entries(annotations2)) {
29264
- assignProperty(annotationsObj, key, structuredMessage(value6));
29265
- }
29266
- const now2 = date2.getTime();
29267
- const spans = fiber3.getRef(CurrentLogSpans2);
29268
- for (const [label, timestamp] of spans) {
29269
- assignProperty(spansObj, label, now2 - timestamp);
29270
- }
29271
- const messageArr = ensure(message);
29272
- return {
29273
- message: messageArr.length === 1 ? structuredMessage(messageArr[0]) : messageArr.map(structuredMessage),
29274
- level: logLevel.toUpperCase(),
29275
- timestamp: date2.toISOString(),
29276
- cause: cause.reasons.length > 0 ? causePretty(cause) : void 0,
29277
- annotations: annotationsObj,
29278
- spans: spansObj,
29279
- fiberId: formatFiberId(fiber3.id)
29280
- };
29281
- });
29282
- var formatJson2 = /* @__PURE__ */ map15(formatStructured, formatJson);
29283
- var batched = /* @__PURE__ */ dual(2, (self, options) => flatMap3(scope, (scope3) => {
29284
- let buffer3 = [];
29285
- const flush2 = suspend(() => {
29286
- if (buffer3.length === 0) {
29287
- return void_3;
29288
- }
29289
- const arr = buffer3;
29290
- buffer3 = [];
29291
- return options.flush(arr);
29292
- });
29293
- return uninterruptibleMask((restore) => restore(sleep(options.window).pipe(andThen3(flush2), forever2)).pipe(forkDetach, flatMap3((fiber3) => scopeAddFinalizerExit(scope3, () => fiberInterrupt(fiber3))), andThen3(addFinalizer(() => flush2)), as2(loggerMake((options2) => {
29294
- buffer3.push(self.log(options2));
29295
- }))));
29296
- }));
29297
- var consolePretty2 = consolePretty;
29298
- var consolePrettyBrowser = prettyLoggerBrowser;
29299
- var consolePrettyTty = prettyLoggerTty;
29300
- var consoleLogFmt = /* @__PURE__ */ withConsoleLog(formatLogFmt);
29301
- var consoleStructured = /* @__PURE__ */ withConsoleLog(formatStructured);
29302
- var consoleJson = /* @__PURE__ */ withConsoleLog(formatJson2);
29303
- var tracerLogger2 = tracerLogger;
29304
- var layer = (loggers, options) => effect(CurrentLoggers2, withFiber(fnUntraced(function* (fiber3) {
29305
- const currentLoggers = new Set(options?.mergeWithExisting === true ? fiber3.getRef(CurrentLoggers) : []);
29306
- for (const logger of loggers) {
29307
- currentLoggers.add(isEffect(logger) ? yield* logger : logger);
29308
- }
29309
- return currentLoggers;
29310
- })));
29311
- var toFile = /* @__PURE__ */ dual((args2) => isLogger(args2[0]), (self, path, options) => gen3(function* () {
29312
- const fs = yield* FileSystem;
29313
- const logFile = yield* fs.open(path, {
29314
- flag: "a+",
29315
- ...options
29316
- });
29317
- const encoder2 = new TextEncoder();
29318
- return yield* batched(self, {
29319
- window: options?.batchWindow ?? 1e3,
29320
- flush: (output) => ignore(logFile.writeAll(encoder2.encode(output.join("\n") + "\n")))
29321
- });
29322
- }));
29323
-
29324
- // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/ManagedRuntime.js
29325
- var ManagedRuntime_exports = {};
29326
- __export(ManagedRuntime_exports, {
29327
- isManagedRuntime: () => isManagedRuntime,
29328
- make: () => make42
29329
- });
29330
- var TypeId45 = "~effect/ManagedRuntime";
29331
- var isManagedRuntime = (input) => hasProperty(input, TypeId45);
29332
- var make42 = (layer2, options) => {
29333
- const memoMap = options?.memoMap ?? makeMemoMapUnsafe();
29334
- const scope3 = makeUnsafe3("parallel");
29335
- const layerScope = forkUnsafe2(scope3, "sequential");
29336
- const defaultRunOptions = {
29337
- onFiberStart: runIn(scope3)
29338
- };
29339
- const mergeRunOptions = (options2) => options2 ? {
29340
- ...options2,
29341
- onFiberStart: options2.onFiberStart ? (fiber3) => {
29342
- defaultRunOptions.onFiberStart(fiber3);
29343
- options2.onFiberStart(fiber3);
29344
- } : defaultRunOptions.onFiberStart
29345
- } : defaultRunOptions;
29346
- let buildFiber;
29347
- const contextEffect = withFiber2((fiber3) => {
29348
- if (!buildFiber) {
29349
- buildFiber = runFork2(tap6(buildWithMemoMap(layer2, memoMap, layerScope), (context3) => sync4(() => {
29350
- self.cachedContext = context3;
29351
- })), {
29352
- ...defaultRunOptions,
29353
- scheduler: fiber3.cache.scheduler
29354
- });
29355
- }
29356
- return flatten5(await_(buildFiber));
29357
- });
29358
- const self = {
29359
- [TypeId45]: TypeId45,
29360
- memoMap,
29361
- scope: scope3,
29362
- contextEffect,
29363
- cachedContext: void 0,
29364
- context() {
29365
- return self.cachedContext === void 0 ? runPromise2(self.contextEffect) : Promise.resolve(self.cachedContext);
29366
- },
29367
- dispose() {
29368
- return runPromise2(self.disposeEffect);
29369
- },
29370
- [Symbol.asyncDispose]() {
29371
- return self.dispose();
29372
- },
29373
- disposeEffect: suspend3(() => {
29374
- ;
29375
- self.contextEffect = die5("ManagedRuntime disposed");
29376
- self.cachedContext = void 0;
29377
- return close(self.scope, void_4);
29378
- }),
29379
- runFork(effect2, options2) {
29380
- return self.cachedContext === void 0 ? runFork2(provide7(self, effect2), mergeRunOptions(options2)) : runForkWith2(self.cachedContext)(effect2, mergeRunOptions(options2));
29381
- },
29382
- runCallback(effect2, options2) {
29383
- return self.cachedContext === void 0 ? runCallback2(provide7(self, effect2), mergeRunOptions(options2)) : runCallbackWith2(self.cachedContext)(effect2, mergeRunOptions(options2));
29384
- },
29385
- runSyncExit(effect2) {
29386
- return self.cachedContext === void 0 ? runSyncExit2(provide7(self, effect2)) : runSyncExitWith2(self.cachedContext)(effect2);
29387
- },
29388
- runSync(effect2) {
29389
- return self.cachedContext === void 0 ? runSync2(provide7(self, effect2)) : runSyncWith2(self.cachedContext)(effect2);
29390
- },
29391
- runPromiseExit(effect2, options2) {
29392
- return self.cachedContext === void 0 ? runPromiseExit2(provide7(self, effect2), mergeRunOptions(options2)) : runPromiseExitWith2(self.cachedContext)(effect2, mergeRunOptions(options2));
29393
- },
29394
- runPromise(effect2, options2) {
29395
- return self.cachedContext === void 0 ? runPromise2(provide7(self, effect2), mergeRunOptions(options2)) : runPromiseWith2(self.cachedContext)(effect2, mergeRunOptions(options2));
29396
- }
29397
- };
29398
- return self;
29399
- };
29400
- function provide7(managed, effect2) {
29401
- return flatMap5(managed.contextEffect, (context3) => provideContext2(effect2, context3));
29402
- }
29403
-
29404
- // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Match.js
29405
- var Match_exports = {};
29406
- __export(Match_exports, {
29407
- any: () => any3,
29408
- bigint: () => bigint,
29409
- boolean: () => boolean2,
29410
- date: () => date,
29411
- defined: () => defined2,
29412
- discriminator: () => discriminator2,
29413
- discriminatorStartsWith: () => discriminatorStartsWith2,
29414
- discriminators: () => discriminators2,
29415
- discriminatorsExhaustive: () => discriminatorsExhaustive2,
29416
- exhaustive: () => exhaustive2,
29417
- fn: () => fn4,
29418
- instanceOf: () => instanceOf3,
29419
- instanceOfUnsafe: () => instanceOfUnsafe,
29420
- is: () => is4,
29421
- nonEmptyString: () => nonEmptyString2,
29422
- not: () => not2,
29423
- null: () => _null,
29424
- number: () => number3,
29425
- option: () => option5,
29426
- orElse: () => orElse5,
29427
- orElseAbsurd: () => orElseAbsurd2,
29428
- record: () => record2,
29429
- result: () => result5,
29430
- string: () => string3,
29431
- symbol: () => symbol5,
29432
- tag: () => tag3,
29433
- tagStartsWith: () => tagStartsWith2,
29434
- tags: () => tags2,
29435
- tagsExhaustive: () => tagsExhaustive2,
29436
- type: () => type2,
29437
- typeTags: () => typeTags2,
29438
- undefined: () => _undefined,
29439
- value: () => value5,
29440
- valueTags: () => valueTags2,
29441
- when: () => when5,
29442
- whenAnd: () => whenAnd2,
29443
- whenOr: () => whenOr2,
29444
- withReturnType: () => withReturnType2
29445
- });
29446
-
29447
- // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/internal/matcher.js
29448
- var TypeId46 = "~effect/Match/Matcher";
29449
- var TypeMatcherProto = {
29450
- [TypeId46]: {
29451
- _input: identity,
29452
- _filters: identity,
29453
- _remaining: identity,
29454
- _result: identity,
29455
- _return: identity,
29456
- _args: identity
29457
- },
29458
- _tag: "TypeMatcher",
29459
- add(_case) {
29460
- return makeTypeMatcher(this.select, [...this.cases, _case]);
29182
+ if (startPart > 0) ret.dir = path.slice(0, startPart - 1);
29183
+ else if (isAbsolute) ret.dir = "/";
29184
+ return ret;
29461
29185
  },
29462
- pipe() {
29463
- return pipeArguments(this, arguments);
29186
+ sep: "/",
29187
+ fromFileUrl,
29188
+ toFileUrl,
29189
+ toNamespacedPath: identity
29190
+ });
29191
+
29192
+ // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/ConfigProvider.js
29193
+ function makeValue(value6) {
29194
+ return {
29195
+ _tag: "Value",
29196
+ value: value6
29197
+ };
29198
+ }
29199
+ function makeRecord(keys4, value6) {
29200
+ return {
29201
+ _tag: "Record",
29202
+ keys: keys4,
29203
+ value: value6
29204
+ };
29205
+ }
29206
+ function makeArray(length, value6) {
29207
+ return {
29208
+ _tag: "Array",
29209
+ length,
29210
+ value: value6
29211
+ };
29212
+ }
29213
+ var ConfigProvider = /* @__PURE__ */ Reference("effect/ConfigProvider", {
29214
+ defaultValue: () => fromEnv()
29215
+ });
29216
+ var Proto8 = {
29217
+ ...PipeInspectableProto,
29218
+ toJSON() {
29219
+ return {
29220
+ _id: "ConfigProvider"
29221
+ };
29464
29222
  }
29465
29223
  };
29466
- function makeTypeMatcher(select, cases) {
29467
- const matcher = Object.create(TypeMatcherProto);
29468
- matcher.select = select;
29469
- matcher.cases = cases;
29470
- return matcher;
29224
+ var identityPath = (path) => path;
29225
+ function makeProvider(load, mapInput4) {
29226
+ const self = Object.create(Proto8);
29227
+ self.load = load;
29228
+ self.mapInput = mapInput4;
29229
+ return self;
29471
29230
  }
29472
- var ValueMatcherProto = {
29473
- [TypeId46]: {
29474
- _input: identity,
29475
- _filters: identity,
29476
- _result: identity,
29477
- _return: identity,
29478
- _flavor: identity
29479
- },
29480
- _tag: "ValueMatcher",
29481
- add(_case) {
29482
- if (isSuccess2(this.value)) {
29483
- return this;
29231
+ function makeSource(get12, transform4) {
29232
+ return makeProvider((path) => get12(transform4(path)), (f) => makeSource(get12, flow(transform4, f)));
29233
+ }
29234
+ function make39(get12) {
29235
+ return makeSource(get12, identityPath);
29236
+ }
29237
+ function emptyStringAsMissing(value6, preserveEmptyStrings) {
29238
+ return value6 === "" && !preserveEmptyStrings ? void 0 : value6;
29239
+ }
29240
+ function fromEnvRecord(env, options) {
29241
+ const preserveEmptyStrings = options?.preserveEmptyStrings === true;
29242
+ const trie = buildEnvTrie(env);
29243
+ return make39((path) => succeed7(nodeAtEnv(trie, env, path, preserveEmptyStrings)));
29244
+ }
29245
+ function fromEnv(options) {
29246
+ const env = options?.env ?? {
29247
+ ...globalThis.process?.env,
29248
+ ...import.meta?.env
29249
+ };
29250
+ return fromEnvRecord(env, {
29251
+ preserveEmptyStrings: options?.preserveEmptyStrings
29252
+ });
29253
+ }
29254
+ function buildEnvTrie(env) {
29255
+ const trie = {};
29256
+ for (const [name, value6] of Object.entries(env)) {
29257
+ if (value6 === void 0) continue;
29258
+ const segments = name.split("_");
29259
+ let node = trie;
29260
+ for (const seg of segments) {
29261
+ const children = node.children ??= /* @__PURE__ */ Object.create(null);
29262
+ node = children[seg] ??= {};
29484
29263
  }
29485
- if (_case._tag === "When" && _case.guard(this.provided) === true) {
29486
- return makeValueMatcher(this.provided, succeed2(_case.evaluate(this.provided)));
29487
- } else if (_case._tag === "Not" && _case.guard(this.provided) === false) {
29488
- return makeValueMatcher(this.provided, succeed2(_case.evaluate(this.provided)));
29264
+ }
29265
+ return trie;
29266
+ }
29267
+ function nodeAtEnv(trie, env, path, preserveEmptyStrings) {
29268
+ const key = path.map(String).join("_");
29269
+ const leafValue = emptyStringAsMissing(Object.hasOwn(env, key) ? env[key] : void 0, preserveEmptyStrings);
29270
+ const trieNode = trieNodeAt(trie, path);
29271
+ const children = trieNode?.children ? Object.keys(trieNode.children) : [];
29272
+ if (children.length === 0) {
29273
+ return leafValue === void 0 ? void 0 : makeValue(leafValue);
29274
+ }
29275
+ const allNumeric = children.every(isCanonicalArrayIndex);
29276
+ if (allNumeric) {
29277
+ const length = Math.max(...children.map((k) => parseInt(k, 10))) + 1;
29278
+ return makeArray(length, leafValue);
29279
+ }
29280
+ return makeRecord(new Set(children), leafValue);
29281
+ }
29282
+ function trieNodeAt(root, path) {
29283
+ if (path.length === 0) return root;
29284
+ let node = root;
29285
+ for (const seg of path) {
29286
+ node = node?.children?.[String(seg)];
29287
+ if (!node) return void 0;
29288
+ }
29289
+ return node;
29290
+ }
29291
+
29292
+ // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Config.js
29293
+ var TypeId44 = "~effect/Config";
29294
+ var ConfigError = class {
29295
+ _tag = "ConfigError";
29296
+ name = "ConfigError";
29297
+ cause;
29298
+ constructor(cause) {
29299
+ this.cause = cause;
29300
+ }
29301
+ get message() {
29302
+ return this.cause.toString();
29303
+ }
29304
+ toString() {
29305
+ return `ConfigError(${this.message})`;
29306
+ }
29307
+ };
29308
+ var Proto9 = {
29309
+ .../* @__PURE__ */ Prototype2({
29310
+ label: "Config",
29311
+ evaluate(fiber3) {
29312
+ return this.parse(fiber3.getRef(ConfigProvider));
29489
29313
  }
29490
- return this;
29491
- },
29492
- pipe() {
29493
- return pipeArguments(this, arguments);
29314
+ }),
29315
+ [TypeId44]: TypeId44,
29316
+ toJSON() {
29317
+ return {
29318
+ _id: "Config"
29319
+ };
29494
29320
  }
29495
29321
  };
29496
- function makeValueMatcher(provided, value6) {
29497
- const matcher = Object.create(ValueMatcherProto);
29498
- matcher.provided = provided;
29499
- matcher.value = value6;
29500
- return matcher;
29322
+ function make40(evaluator) {
29323
+ const self = Object.create(Proto9);
29324
+ self.evaluator = evaluator;
29325
+ self.parse = (provider) => evaluator(provider, []).pipe(mapErrorEager2((failure) => failure.error), flatMapEager2((resolution) => resolution._tag === "Resolved" ? succeed7(resolution.value) : fail7(resolution.error)));
29326
+ return self;
29501
29327
  }
29502
- var makeWhen = (guard, evaluate2) => ({
29503
- _tag: "When",
29504
- guard,
29505
- evaluate: evaluate2
29328
+ var evaluateAt = (self, provider, pathPrefix) => self.evaluator(provider, pathPrefix);
29329
+ var resolved = (value6, hasInput2) => ({
29330
+ _tag: "Resolved",
29331
+ value: value6,
29332
+ hasInput: hasInput2
29506
29333
  });
29507
- var makeNot = (guard, evaluate2) => ({
29508
- _tag: "Not",
29509
- guard,
29510
- evaluate: evaluate2
29334
+ var absent = (error) => ({
29335
+ _tag: "Absent",
29336
+ error
29511
29337
  });
29512
- var makePredicate = (pattern) => {
29513
- if (typeof pattern === "function") {
29514
- return pattern;
29515
- } else if (Array.isArray(pattern)) {
29516
- const predicates = pattern.map(makePredicate);
29517
- const len = predicates.length;
29518
- return (u) => {
29519
- if (!Array.isArray(u)) {
29520
- return false;
29521
- }
29522
- for (let i = 0; i < len; i++) {
29523
- if (predicates[i](u[i]) === false) {
29524
- return false;
29525
- }
29526
- }
29527
- return true;
29528
- };
29529
- } else if (pattern !== null && typeof pattern === "object") {
29530
- const keysAndPredicates = Reflect.ownKeys(pattern).map((key) => [key, makePredicate(pattern[key])]);
29531
- const len = keysAndPredicates.length;
29532
- return (u) => {
29533
- if (typeof u !== "object" || u === null) {
29534
- return false;
29535
- }
29536
- for (let i = 0; i < len; i++) {
29537
- const [key, predicate] = keysAndPredicates[i];
29538
- if (!(key in u) || predicate(u[key]) === false) {
29539
- return false;
29540
- }
29541
- }
29542
- return true;
29543
- };
29544
- }
29545
- return (u) => u === pattern;
29338
+ var evaluationFailure = (error, hasInput2) => ({
29339
+ error,
29340
+ hasInput: hasInput2
29341
+ });
29342
+ var isSourceError = (u) => isTagged(u, "SourceError");
29343
+ var catchSourceError = (self, hasInput2) => self.pipe(catchDefect2((defect) => isSourceError(defect) ? fail7(evaluationFailure(new ConfigError(defect), hasInput2)) : die5(defect)));
29344
+ var preserveInputEvidence = (self, hasInput2) => {
29345
+ if (!hasInput2) return self;
29346
+ return self.pipe(mapErrorEager2((failure) => evaluationFailure(failure.error, true)), flatMapEager2((resolution) => resolution._tag === "Resolved" ? succeed7(resolved(resolution.value, true)) : fail7(evaluationFailure(resolution.error, true))));
29546
29347
  };
29547
- var makeOrPredicate = (patterns) => {
29548
- const predicates = patterns.map(makePredicate);
29549
- const len = predicates.length;
29550
- return (u) => {
29551
- for (let i = 0; i < len; i++) {
29552
- if (predicates[i](u) === true) {
29553
- return true;
29554
- }
29348
+ var map14 = /* @__PURE__ */ dual(2, (self, f) => {
29349
+ return make40((provider, pathPrefix) => map9(evaluateAt(self, provider, pathPrefix), (resolution) => resolution._tag === "Resolved" ? resolved(f(resolution.value), resolution.hasInput) : resolution));
29350
+ });
29351
+ var orElse5 = /* @__PURE__ */ dual(2, (self, that) => {
29352
+ return make40((provider, pathPrefix) => matchEffect3(evaluateAt(self, provider, pathPrefix), {
29353
+ onFailure: (failure) => preserveInputEvidence(evaluateAt(that(failure.error), provider, pathPrefix), failure.hasInput),
29354
+ onSuccess: (resolution) => resolution._tag === "Absent" ? evaluateAt(that(resolution.error), provider, pathPrefix) : succeed7(resolution)
29355
+ }));
29356
+ });
29357
+ function all5(arg) {
29358
+ const configs = globalThis.Array.isArray(arg) ? arg : Symbol.iterator in arg ? [...arg] : arg;
29359
+ if (globalThis.Array.isArray(configs)) {
29360
+ return make40((provider, pathPrefix) => flatMapEager2(all4(configs.map((config) => result2(evaluateAt(config, provider, pathPrefix)))), resolveArray));
29361
+ } else {
29362
+ return make40((provider, pathPrefix) => flatMapEager2(all4(map3(configs, (config) => result2(evaluateAt(config, provider, pathPrefix)))), resolveRecord));
29363
+ }
29364
+ }
29365
+ var resolveArray = (results) => {
29366
+ const values2 = [];
29367
+ let firstFailure;
29368
+ let firstAbsent;
29369
+ let hasInput2 = false;
29370
+ for (const result6 of results) {
29371
+ if (isFailure2(result6)) {
29372
+ firstFailure ??= result6.failure;
29373
+ hasInput2 = hasInput2 || result6.failure.hasInput;
29374
+ continue;
29375
+ }
29376
+ const resolution = result6.success;
29377
+ if (resolution._tag === "Absent") {
29378
+ firstAbsent ??= resolution;
29379
+ } else {
29380
+ values2.push(resolution.value);
29381
+ hasInput2 = hasInput2 || resolution.hasInput;
29555
29382
  }
29556
- return false;
29557
- };
29383
+ }
29384
+ if (firstFailure !== void 0) {
29385
+ return fail7(evaluationFailure(firstFailure.error, hasInput2));
29386
+ }
29387
+ if (firstAbsent !== void 0) {
29388
+ return hasInput2 ? fail7(evaluationFailure(firstAbsent.error, true)) : succeed7(firstAbsent);
29389
+ }
29390
+ return succeed7(resolved(values2, hasInput2));
29558
29391
  };
29559
- var makeAndPredicate = (patterns) => {
29560
- const predicates = patterns.map(makePredicate);
29561
- const len = predicates.length;
29562
- return (u) => {
29563
- for (let i = 0; i < len; i++) {
29564
- if (predicates[i](u) === false) {
29565
- return false;
29566
- }
29392
+ var resolveRecord = (results) => {
29393
+ const values2 = {};
29394
+ let firstFailure;
29395
+ let firstAbsent;
29396
+ let hasInput2 = false;
29397
+ for (const key in results) {
29398
+ const result6 = results[key];
29399
+ if (isFailure2(result6)) {
29400
+ firstFailure ??= result6.failure;
29401
+ hasInput2 = hasInput2 || result6.failure.hasInput;
29402
+ continue;
29567
29403
  }
29568
- return true;
29569
- };
29404
+ const resolution = result6.success;
29405
+ if (resolution._tag === "Absent") {
29406
+ firstAbsent ??= resolution;
29407
+ } else {
29408
+ assignProperty(values2, key, resolution.value);
29409
+ hasInput2 = hasInput2 || resolution.hasInput;
29410
+ }
29411
+ }
29412
+ if (firstFailure !== void 0) {
29413
+ return fail7(evaluationFailure(firstFailure.error, hasInput2));
29414
+ }
29415
+ if (firstAbsent !== void 0) {
29416
+ return hasInput2 ? fail7(evaluationFailure(firstAbsent.error, true)) : succeed7(firstAbsent);
29417
+ }
29418
+ return succeed7(resolved(values2, hasInput2));
29570
29419
  };
29571
- var type = () => makeTypeMatcher(identity, []);
29572
- var fn3 = (select) => makeTypeMatcher(select, []);
29573
- var value4 = (i) => makeValueMatcher(i, fail2(i));
29574
- var valueTags = /* @__PURE__ */ dual(2, (input, fields) => {
29575
- const match10 = tagsExhaustive(fields)(makeTypeMatcher(identity, []));
29576
- return match10(input);
29420
+ var withDefault2 = /* @__PURE__ */ dual(2, (self, defaultValue) => {
29421
+ return make40((provider, pathPrefix) => mapEager2(evaluateAt(self, provider, pathPrefix), (resolution) => resolution._tag === "Absent" ? resolved(defaultValue, false) : resolution));
29577
29422
  });
29578
- var typeTags = () => (fields) => {
29579
- const match10 = tagsExhaustive(fields)(makeTypeMatcher(identity, []));
29580
- return (input) => match10(input);
29581
- };
29582
- var withReturnType = () => (self) => self;
29583
- var when4 = (pattern, f) => (self) => self.add(makeWhen(makePredicate(pattern), f));
29584
- var whenOr = (...args2) => (self) => {
29585
- const onMatch = args2[args2.length - 1];
29586
- const patterns = args2.slice(0, -1);
29587
- return self.add(makeWhen(makeOrPredicate(patterns), onMatch));
29588
- };
29589
- var whenAnd = (...args2) => (self) => {
29590
- const onMatch = args2[args2.length - 1];
29591
- const patterns = args2.slice(0, -1);
29592
- return self.add(makeWhen(makeAndPredicate(patterns), onMatch));
29593
- };
29594
- var discriminator = (field) => (...pattern) => {
29595
- const f = pattern[pattern.length - 1];
29596
- const values2 = pattern.slice(0, -1);
29597
- const pred = values2.length === 1 ? (_) => _ != null && _[field] === values2[0] : (_) => _ != null && values2.includes(_[field]);
29598
- return (self) => self.add(makeWhen(pred, f));
29599
- };
29600
- var discriminatorStartsWith = (field) => (pattern, f) => {
29601
- const pred = (_) => _ != null && typeof _[field] === "string" && _[field].startsWith(pattern);
29602
- return (self) => self.add(makeWhen(pred, f));
29603
- };
29604
- var discriminators = (field) => (fields) => {
29605
- const predicate = makeWhen((arg) => arg != null && Object.hasOwn(fields, arg[field]), (data) => fields[data[field]](data));
29606
- return (self) => self.add(predicate);
29423
+ var option5 = (self) => self.pipe(map14(some3), withDefault2(none2()));
29424
+ var cursorToString = () => "<configuration>";
29425
+ var loadCursor = (provider, path) => provider.load(path).pipe(orDie3, mapEager2((node) => ({
29426
+ provider,
29427
+ path,
29428
+ node,
29429
+ toString: cursorToString
29430
+ })));
29431
+ var loadChildCursor = (cursor, segment) => loadCursor(cursor.provider, [...cursor.path, segment]);
29432
+ var getScalar = (node) => node?.value;
29433
+ var decodeFromCursor = (ast, decode3) => decodeTo(unknown, ast, new Transformation(transformEffect((input) => decode3(input)), passthrough2()));
29434
+ var isScalarInput = (ast) => {
29435
+ switch (ast._tag) {
29436
+ case "Union":
29437
+ return ast.types.every(isScalarInput);
29438
+ case "Objects":
29439
+ case "Arrays":
29440
+ case "Suspend":
29441
+ return false;
29442
+ default:
29443
+ return true;
29444
+ }
29607
29445
  };
29608
- var discriminatorsExhaustive = (field) => (fields) => {
29609
- const addCases = discriminators(field)(fields);
29610
- return (matcher) => exhaustive(addCases(matcher));
29446
+ var hasProviderInput = (ast, node) => {
29447
+ switch (ast._tag) {
29448
+ case "Objects":
29449
+ return node?._tag === "Record";
29450
+ case "Arrays":
29451
+ return node?._tag === "Array";
29452
+ case "Union":
29453
+ return ast.types.some((ast2) => hasProviderInput(ast2, node));
29454
+ case "Suspend":
29455
+ return hasProviderInput(ast.thunk(), node);
29456
+ default:
29457
+ return getScalar(node) !== void 0;
29458
+ }
29611
29459
  };
29612
- var tag2 = /* @__PURE__ */ discriminator("_tag");
29613
- var tagStartsWith = /* @__PURE__ */ discriminatorStartsWith("_tag");
29614
- var tags = /* @__PURE__ */ discriminators("_tag");
29615
- var tagsExhaustive = /* @__PURE__ */ discriminatorsExhaustive("_tag");
29616
- var not = (pattern, f) => (self) => self.add(makeNot(makePredicate(pattern), f));
29617
- var nonEmptyString = (u) => typeof u === "string" && u.length > 0;
29618
- var is3 = (...literals) => {
29619
- const len = literals.length;
29620
- return (u) => {
29621
- for (let i = 0; i < len; i++) {
29622
- if (u === literals[i]) {
29623
- return true;
29460
+ var toConfigCursorAST = /* @__PURE__ */ memoize((root) => {
29461
+ const seen = /* @__PURE__ */ new WeakSet();
29462
+ const recur2 = applyToSelfOrLastLinkEncoding((ast) => {
29463
+ seen.add(ast);
29464
+ switch (ast._tag) {
29465
+ case "Objects": {
29466
+ const matchesIndex = ast.indexSignatures.map((is5) => _is(is5.parameter));
29467
+ const materialize = fnUntraced2(function* (cursor) {
29468
+ if (cursor.node?._tag !== "Record") {
29469
+ return void 0;
29470
+ }
29471
+ const node = cursor.node;
29472
+ const keys4 = /* @__PURE__ */ new Set();
29473
+ for (const property of ast.propertySignatures) {
29474
+ if (typeof property.name === "string") keys4.add(property.name);
29475
+ }
29476
+ if (matchesIndex.length > 0) {
29477
+ for (const key of node.keys) {
29478
+ if (matchesIndex.some((matches) => matches(key))) keys4.add(key);
29479
+ }
29480
+ }
29481
+ const out = {};
29482
+ for (const key of keys4) {
29483
+ const child = yield* loadChildCursor(cursor, key);
29484
+ if (child.node !== void 0) assignProperty(out, key, child);
29485
+ }
29486
+ return out;
29487
+ });
29488
+ return decodeFromCursor(ast.recur(recur2, (ast2) => ast2), materialize);
29624
29489
  }
29490
+ case "Arrays": {
29491
+ const materialize = fnUntraced2(function* (cursor) {
29492
+ if (cursor.node?._tag !== "Array") {
29493
+ return void 0;
29494
+ }
29495
+ const out = [];
29496
+ for (let i = 0; i < cursor.node.length; i++) {
29497
+ out.push(yield* loadChildCursor(cursor, i));
29498
+ }
29499
+ return out;
29500
+ });
29501
+ return decodeFromCursor(ast.recur(recur2), materialize);
29502
+ }
29503
+ case "Union":
29504
+ for (const member of ast.types) {
29505
+ recur2(member);
29506
+ }
29507
+ return isScalarInput(ast) ? decodeFromCursor(ast, (cursor) => succeed7(getScalar(cursor.node))) : ast.recur(recur2);
29508
+ case "Suspend": {
29509
+ const target = ast.thunk();
29510
+ if (!seen.has(target)) recur2(target);
29511
+ return ast.recur(recur2);
29512
+ }
29513
+ case "Declaration":
29514
+ case "Any":
29515
+ throw new globalThis.Error("Config.schema does not support opaque StringTree encodings", {
29516
+ cause: ast
29517
+ });
29518
+ default:
29519
+ return decodeFromCursor(ast, (cursor) => succeed7(getScalar(cursor.node)));
29520
+ }
29521
+ });
29522
+ return recur2(root);
29523
+ });
29524
+ function schema(codec, path) {
29525
+ const codecStringTree = toCodecStringTree2(codec);
29526
+ const encodedAst = toEncoded(codecStringTree.ast);
29527
+ const decodeCursor = decodeUnknownEffect(make28(toConfigCursorAST(codecStringTree.ast)));
29528
+ const localPath = typeof path === "string" ? [path] : path ?? [];
29529
+ return make40((provider, pathPrefix) => {
29530
+ const fullPath = [...pathPrefix, ...localPath];
29531
+ return catchSourceError(loadCursor(provider, fullPath), false).pipe(flatMapEager2((cursor) => {
29532
+ const hasInput2 = hasProviderInput(encodedAst, cursor.node);
29533
+ return catchSourceError(decodeCursor(cursor).pipe(mapEager2((value6) => resolved(value6, hasInput2)), catchEager2((issue) => {
29534
+ const error = new ConfigError(new SchemaError(fullPath.length > 0 ? new Pointer(fullPath, issue) : issue));
29535
+ return hasInput2 ? fail7(evaluationFailure(error, true)) : succeed7(absent(error));
29536
+ })), hasInput2);
29537
+ }));
29538
+ });
29539
+ }
29540
+ var isPath = (u) => isString(u) || globalThis.Array.isArray(u);
29541
+ function String7(name) {
29542
+ return schema(String6, name);
29543
+ }
29544
+ function Int2(name) {
29545
+ return schema(Int, name);
29546
+ }
29547
+ function Literals2(literals, name) {
29548
+ return schema(Literals(literals), name);
29549
+ }
29550
+ function Array3(value6, pathOrOptions, options) {
29551
+ const hasPath = isPath(pathOrOptions);
29552
+ const resolvedOptions = hasPath ? options : pathOrOptions;
29553
+ const array2 = ArraySchema(value6);
29554
+ const separator = resolvedOptions?.separator ?? ",";
29555
+ const arrayString = String6.pipe(decodeTo2(toCodecStringTree2(array2), {
29556
+ decode: split(resolvedOptions),
29557
+ encode: passthrough2({
29558
+ strict: false
29559
+ }).compose(transform((input) => input.join(separator)))
29560
+ }));
29561
+ return schema(Union2([arrayString, array2]), hasPath ? pathOrOptions : void 0);
29562
+ }
29563
+ function Record2(key, value6, pathOrOptions, options) {
29564
+ const hasPath = isPath(pathOrOptions);
29565
+ const record3 = Record(key, value6);
29566
+ const split3 = splitKeyValue2(hasPath ? options : pathOrOptions);
29567
+ const recordString = String6.pipe(decodeTo2(toCodecStringTree2(record3), {
29568
+ decode: split3.decode,
29569
+ encode: passthrough2({
29570
+ strict: false
29571
+ }).compose(split3.encode)
29572
+ }));
29573
+ return schema(Union2([record3, recordString]), hasPath ? pathOrOptions : void 0);
29574
+ }
29575
+ function Boolean4(name) {
29576
+ return schema(BooleanLiterals, name);
29577
+ }
29578
+ function URL3(name) {
29579
+ return schema(URL2, name);
29580
+ }
29581
+
29582
+ // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/ErrorReporter.js
29583
+ var ignore5 = "~effect/ErrorReporter/ignore";
29584
+
29585
+ // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/FiberSet.js
29586
+ var FiberSet_exports = {};
29587
+ __export(FiberSet_exports, {
29588
+ add: () => add4,
29589
+ addUnsafe: () => addUnsafe2,
29590
+ awaitEmpty: () => awaitEmpty,
29591
+ clear: () => clear4,
29592
+ isFiberSet: () => isFiberSet,
29593
+ join: () => join3,
29594
+ make: () => make41,
29595
+ makeRuntime: () => makeRuntime,
29596
+ makeRuntimePromise: () => makeRuntimePromise,
29597
+ run: () => run3,
29598
+ runtime: () => runtime,
29599
+ runtimePromise: () => runtimePromise,
29600
+ size: () => size8
29601
+ });
29602
+ var TypeId45 = "~effect/FiberSet";
29603
+ var isFiberSet = (u) => hasProperty(u, TypeId45);
29604
+ var Proto10 = {
29605
+ [TypeId45]: TypeId45,
29606
+ [Symbol.iterator]() {
29607
+ if (this.state._tag === "Closed") {
29608
+ return empty2();
29625
29609
  }
29626
- return false;
29627
- };
29628
- };
29629
- var any2 = () => true;
29630
- var defined = (u) => u !== void 0 && u !== null;
29631
- var instanceOf2 = (constructor) => (u) => u instanceof constructor;
29632
- var orElse4 = (f) => (self) => {
29633
- const toResult = result4(self);
29634
- if (isResult2(toResult)) {
29635
- return toResult._tag === "Success" ? toResult.success : f(toResult.failure);
29610
+ return this.state.backing[Symbol.iterator]();
29611
+ },
29612
+ ...PipeInspectableProto,
29613
+ toJSON() {
29614
+ return {
29615
+ _id: "FiberSet",
29616
+ state: this.state
29617
+ };
29636
29618
  }
29637
- return (...args2) => {
29638
- const a = toResult(...args2);
29639
- return isSuccess2(a) ? a.success : f(a.failure, ...args2);
29619
+ };
29620
+ var makeUnsafe11 = (backing, deferred) => {
29621
+ const self = Object.create(Proto10);
29622
+ self.state = {
29623
+ _tag: "Open",
29624
+ backing
29640
29625
  };
29626
+ self.deferred = deferred;
29627
+ return self;
29641
29628
  };
29642
- var orElseAbsurd = (self) => orElse4(() => {
29643
- throw new Error("effect/Match/orElseAbsurd: absurd");
29644
- })(self);
29645
- var result4 = (self) => {
29646
- if (self._tag === "ValueMatcher") {
29647
- return self.value;
29629
+ var make41 = () => acquireRelease2(sync4(() => makeUnsafe11(/* @__PURE__ */ new Set(), makeUnsafe2())), (set10) => suspend3(() => {
29630
+ const state = set10.state;
29631
+ if (state._tag === "Closed") return void_5;
29632
+ set10.state = {
29633
+ _tag: "Closed"
29634
+ };
29635
+ const fibers = state.backing;
29636
+ return interruptAll(fibers).pipe(into(set10.deferred));
29637
+ }));
29638
+ var makeRuntime = () => flatMap5(make41(), (self) => runtime(self)());
29639
+ var makeRuntimePromise = () => flatMap5(make41(), (self) => runtimePromise(self)());
29640
+ var internalFiberId = -1;
29641
+ var isInternalInterruption = /* @__PURE__ */ toPredicate(/* @__PURE__ */ compose2(filterInterruptors, /* @__PURE__ */ has2(internalFiberId)));
29642
+ var addUnsafe2 = /* @__PURE__ */ dual((args2) => isFiberSet(args2[0]), (self, fiber3, options) => {
29643
+ if (self.state._tag === "Closed") {
29644
+ fiber3.interruptUnsafe(internalFiberId);
29645
+ return;
29646
+ } else if (self.state.backing.has(fiber3)) {
29647
+ return;
29648
29648
  }
29649
- const len = self.cases.length;
29650
- if (len === 1) {
29651
- const _case = self.cases[0];
29652
- return (...args2) => {
29653
- const input = self.select(...args2);
29654
- if (_case._tag === "When" && _case.guard(input) === true) {
29655
- return succeed2(_case.evaluate(input, ...args2));
29656
- } else if (_case._tag === "Not" && _case.guard(input) === false) {
29657
- return succeed2(_case.evaluate(input, ...args2));
29658
- }
29659
- return fail2(input);
29660
- };
29649
+ self.state.backing.add(fiber3);
29650
+ fiber3.addObserver((exit3) => {
29651
+ if (self.state._tag === "Closed") {
29652
+ return;
29653
+ }
29654
+ self.state.backing.delete(fiber3);
29655
+ if (isFailure4(exit3) && (options?.propagateInterruption === true ? !isInternalInterruption(exit3.cause) : !hasInterruptsOnly2(exit3.cause))) {
29656
+ doneUnsafe(self.deferred, exit3);
29657
+ }
29658
+ });
29659
+ });
29660
+ var add4 = /* @__PURE__ */ dual((args2) => isFiberSet(args2[0]), (self, fiber3, options) => sync4(() => addUnsafe2(self, fiber3, options)));
29661
+ var clear4 = (self) => suspend3(() => {
29662
+ if (self.state._tag === "Closed") {
29663
+ return void_5;
29661
29664
  }
29662
- return (...args2) => {
29663
- const input = self.select(...args2);
29664
- for (let i = 0; i < len; i++) {
29665
- const _case = self.cases[i];
29666
- if (_case._tag === "When" && _case.guard(input) === true) {
29667
- return succeed2(_case.evaluate(input, ...args2));
29668
- } else if (_case._tag === "Not" && _case.guard(input) === false) {
29669
- return succeed2(_case.evaluate(input, ...args2));
29670
- }
29665
+ return interruptAllAs(self.state.backing, internalFiberId);
29666
+ });
29667
+ var constInterruptedFiber = /* @__PURE__ */ (function() {
29668
+ let fiber3 = void 0;
29669
+ return () => {
29670
+ if (fiber3 === void 0) {
29671
+ fiber3 = runFork2(interrupt5);
29671
29672
  }
29672
- return fail2(input);
29673
+ return fiber3;
29673
29674
  };
29674
- };
29675
- var option4 = (self) => {
29676
- const toResult = result4(self);
29677
- if (isResult2(toResult)) {
29678
- return match2(toResult, {
29679
- onFailure: () => none2(),
29680
- onSuccess: some2
29681
- });
29675
+ })();
29676
+ var run3 = function() {
29677
+ const self = arguments[0];
29678
+ if (!isEffect2(arguments[1])) {
29679
+ const options = arguments[1];
29680
+ return (effect2) => runImpl(self, effect2, options);
29682
29681
  }
29683
- return (...args2) => match2(toResult(...args2), {
29684
- onFailure: () => none2(),
29685
- onSuccess: some2
29686
- });
29682
+ return runImpl(self, arguments[1], arguments[2]);
29687
29683
  };
29688
- var getExhaustiveAbsurdErrorMessage = "effect/match/Match/exhaustive: absurd";
29689
- var exhaustive = (self) => {
29690
- const toResult = result4(self);
29691
- if (isResult2(toResult)) {
29692
- if (isSuccess2(toResult)) {
29693
- return toResult.success;
29694
- }
29695
- throw new Error(getExhaustiveAbsurdErrorMessage);
29684
+ var runImpl = (self, effect2, options) => withFiber2((parent) => {
29685
+ if (self.state._tag === "Closed") {
29686
+ return sync4(constInterruptedFiber);
29696
29687
  }
29697
- return (...args2) => {
29698
- const result6 = toResult(...args2);
29699
- if (isSuccess2(result6)) {
29700
- return result6.success;
29688
+ const fiber3 = runForkWith2(parent.context)(effect2);
29689
+ addUnsafe2(self, fiber3, options);
29690
+ return succeed7(fiber3);
29691
+ });
29692
+ var runtime = (self) => () => map9(context2(), (services) => {
29693
+ const runFork3 = runForkWith2(services);
29694
+ return (effect2, options) => {
29695
+ if (self.state._tag === "Closed") {
29696
+ return constInterruptedFiber();
29701
29697
  }
29702
- throw new Error(getExhaustiveAbsurdErrorMessage);
29698
+ const fiber3 = runFork3(effect2, options);
29699
+ addUnsafe2(self, fiber3, options);
29700
+ return fiber3;
29703
29701
  };
29704
- };
29702
+ });
29703
+ var runtimePromise = (self) => () => map9(runtime(self)(), (runFork3) => (effect2, options) => new Promise((resolve4, reject) => runFork3(effect2, options).addObserver((exit3) => {
29704
+ if (isSuccess4(exit3)) {
29705
+ resolve4(exit3.value);
29706
+ } else {
29707
+ reject(squash(exit3.cause));
29708
+ }
29709
+ })));
29710
+ var size8 = (self) => sync4(() => self.state._tag === "Closed" ? 0 : self.state.backing.size);
29711
+ var join3 = (self) => _await(self.deferred);
29712
+ var awaitEmpty = (self) => whileLoop2({
29713
+ while: () => self.state._tag === "Open" && self.state.backing.size > 0,
29714
+ body: () => await_(headUnsafe(self)),
29715
+ step: constVoid
29716
+ });
29705
29717
 
29706
- // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Match.js
29707
- var type2 = type;
29708
- var fn4 = fn3;
29709
- var value5 = value4;
29710
- var valueTags2 = valueTags;
29711
- var typeTags2 = typeTags;
29712
- var withReturnType2 = withReturnType;
29713
- var when5 = when4;
29714
- var whenOr2 = whenOr;
29715
- var whenAnd2 = whenAnd;
29716
- var discriminator2 = discriminator;
29717
- var discriminatorStartsWith2 = discriminatorStartsWith;
29718
- var discriminators2 = discriminators;
29719
- var discriminatorsExhaustive2 = discriminatorsExhaustive;
29720
- var tag3 = tag2;
29721
- var tagStartsWith2 = tagStartsWith;
29722
- var tags2 = tags;
29723
- var tagsExhaustive2 = tagsExhaustive;
29724
- var not2 = not;
29725
- var nonEmptyString2 = nonEmptyString;
29726
- var is4 = is3;
29727
- var string3 = isString;
29728
- var number3 = isNumber;
29729
- var any3 = any2;
29730
- var defined2 = defined;
29731
- var boolean2 = isBoolean;
29732
- var _undefined = isUndefined;
29733
- var _null = isNull;
29734
- var bigint = isBigInt;
29735
- var symbol5 = isSymbol;
29736
- var date = isDate;
29737
- var record2 = isObject;
29738
- var instanceOf3 = instanceOf2;
29739
- var instanceOfUnsafe = instanceOf2;
29740
- var orElse5 = orElse4;
29741
- var orElseAbsurd2 = orElseAbsurd;
29742
- var result5 = result4;
29743
- var option5 = option4;
29744
- var exhaustive2 = exhaustive;
29718
+ // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/PrimaryKey.js
29719
+ var symbol5 = "~effect/PrimaryKey";
29745
29720
 
29746
- // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Ref.js
29747
- var Ref_exports = {};
29748
- __export(Ref_exports, {
29749
- get: () => get10,
29750
- getAndSet: () => getAndSet,
29751
- getAndUpdate: () => getAndUpdate,
29752
- getAndUpdateSome: () => getAndUpdateSome,
29753
- getUnsafe: () => getUnsafe5,
29754
- make: () => make43,
29755
- makeUnsafe: () => makeUnsafe11,
29756
- modify: () => modify4,
29757
- modifySome: () => modifySome,
29758
- set: () => set8,
29759
- setAndGet: () => setAndGet,
29760
- update: () => update2,
29761
- updateAndGet: () => updateAndGet,
29762
- updateSome: () => updateSome,
29763
- updateSomeAndGet: () => updateSomeAndGet
29721
+ // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/Logger.js
29722
+ var Logger_exports = {};
29723
+ __export(Logger_exports, {
29724
+ CurrentLoggers: () => CurrentLoggers2,
29725
+ LogToStderr: () => LogToStderr2,
29726
+ batched: () => batched,
29727
+ consoleJson: () => consoleJson,
29728
+ consoleLogFmt: () => consoleLogFmt,
29729
+ consolePretty: () => consolePretty2,
29730
+ consolePrettyBrowser: () => consolePrettyBrowser,
29731
+ consolePrettyTty: () => consolePrettyTty,
29732
+ consoleStructured: () => consoleStructured,
29733
+ defaultLogger: () => defaultLogger2,
29734
+ formatJson: () => formatJson2,
29735
+ formatLogFmt: () => formatLogFmt,
29736
+ formatSimple: () => formatSimple,
29737
+ formatStructured: () => formatStructured,
29738
+ isLogger: () => isLogger,
29739
+ layer: () => layer,
29740
+ make: () => make42,
29741
+ map: () => map15,
29742
+ toFile: () => toFile,
29743
+ tracerLogger: () => tracerLogger2,
29744
+ withConsoleError: () => withConsoleError,
29745
+ withConsoleLog: () => withConsoleLog,
29746
+ withLeveledConsole: () => withLeveledConsole
29747
+ });
29748
+ var TypeId46 = "~effect/Logger";
29749
+ var isLogger = (u) => hasProperty(u, TypeId46);
29750
+ var CurrentLoggers2 = CurrentLoggers;
29751
+ var LogToStderr2 = LogToStderr;
29752
+ var map15 = /* @__PURE__ */ dual(2, (self, f) => loggerMake((options) => f(self.log(options))));
29753
+ var withConsoleLog = (self) => loggerMake((options) => {
29754
+ const console = options.fiber.getRef(ConsoleRef);
29755
+ return console.log(self.log(options));
29756
+ });
29757
+ var withConsoleError = (self) => loggerMake((options) => {
29758
+ const console = options.fiber.getRef(ConsoleRef);
29759
+ return console.error(self.log(options));
29764
29760
  });
29765
- var TypeId47 = "~effect/Ref";
29766
- var RefProto = {
29767
- [TypeId47]: {
29768
- _A: identity
29769
- },
29770
- ...PipeInspectableProto,
29771
- toJSON() {
29772
- return {
29773
- _id: "Ref",
29774
- ref: this.ref
29775
- };
29761
+ var withLeveledConsole = (self) => loggerMake((options) => {
29762
+ const console = options.fiber.getRef(ConsoleRef);
29763
+ const output = self.log(options);
29764
+ switch (options.logLevel) {
29765
+ case "Debug":
29766
+ return console.debug(output);
29767
+ case "Info":
29768
+ return console.info(output);
29769
+ case "Trace":
29770
+ return console.trace(output);
29771
+ case "Warn":
29772
+ return console.warn(output);
29773
+ case "Error":
29774
+ case "Fatal":
29775
+ return console.error(output);
29776
+ default:
29777
+ return console.log(output);
29776
29778
  }
29779
+ });
29780
+ var textOnly = /^[^\s"=]*$/;
29781
+ var escapeDoubleQuotes = (s) => `"${s.replace(/\\([\s\S])|(")/g, "\\$1$2")}"`;
29782
+ var formatFiberId = (fiberId3) => `#${fiberId3}`;
29783
+ var format9 = (quoteValue, space) => ({
29784
+ cause,
29785
+ date: date2,
29786
+ fiber: fiber3,
29787
+ logLevel,
29788
+ message
29789
+ }) => {
29790
+ const formatUnknown = (value6) => typeof value6 === "string" ? value6 : format(value6, {
29791
+ space
29792
+ });
29793
+ const formatValue = (value6) => value6.match(textOnly) ? value6 : quoteValue(value6);
29794
+ const format10 = (label, value6) => `${formatLabel(label)}=${formatValue(value6)}`;
29795
+ const append4 = (label, value6) => " " + format10(label, value6);
29796
+ let out = format10("timestamp", date2.toISOString());
29797
+ out += append4("level", logLevel.toUpperCase());
29798
+ out += append4("fiber", formatFiberId(fiber3.id));
29799
+ const messages = ensure(message);
29800
+ for (let i = 0; i < messages.length; i++) {
29801
+ out += append4("message", formatUnknown(messages[i]));
29802
+ }
29803
+ if (cause.reasons.length > 0) {
29804
+ out += append4("cause", causePretty(cause));
29805
+ }
29806
+ const now2 = date2.getTime();
29807
+ const spans = fiber3.getRef(CurrentLogSpans2);
29808
+ for (const span2 of spans) {
29809
+ out += " " + formatLogSpan(span2, now2);
29810
+ }
29811
+ const annotations2 = fiber3.getRef(CurrentLogAnnotations2);
29812
+ for (const [label, value6] of Object.entries(annotations2)) {
29813
+ out += append4(label, formatUnknown(value6));
29814
+ }
29815
+ return out;
29777
29816
  };
29778
- var makeUnsafe11 = (value6) => {
29779
- const self = Object.create(RefProto);
29780
- self.ref = make30(value6);
29781
- return self;
29782
- };
29783
- var make43 = (value6) => sync4(() => makeUnsafe11(value6));
29784
- var get10 = (self) => sync4(() => self.ref.current);
29785
- var set8 = /* @__PURE__ */ dual(2, (self, value6) => sync4(() => set6(self.ref, value6)));
29786
- var getAndSet = /* @__PURE__ */ dual(2, (self, value6) => sync4(() => {
29787
- const current = self.ref.current;
29788
- self.ref.current = value6;
29789
- return current;
29790
- }));
29791
- var getAndUpdate = /* @__PURE__ */ dual(2, (self, f) => sync4(() => {
29792
- const current = self.ref.current;
29793
- self.ref.current = f(current);
29794
- return current;
29795
- }));
29796
- var getAndUpdateSome = /* @__PURE__ */ dual(2, (self, pf) => sync4(() => {
29797
- const current = self.ref.current;
29798
- const option6 = pf(current);
29799
- if (option6._tag === "Some") {
29800
- self.ref.current = option6.value;
29817
+ var make42 = loggerMake;
29818
+ var defaultLogger2 = defaultLogger;
29819
+ var formatSimple = /* @__PURE__ */ loggerMake(/* @__PURE__ */ format9(escapeDoubleQuotes));
29820
+ var formatLogFmt = /* @__PURE__ */ loggerMake(/* @__PURE__ */ format9(JSON.stringify, 0));
29821
+ var formatStructured = /* @__PURE__ */ loggerMake(({
29822
+ cause,
29823
+ date: date2,
29824
+ fiber: fiber3,
29825
+ logLevel,
29826
+ message
29827
+ }) => {
29828
+ const annotationsObj = {};
29829
+ const spansObj = {};
29830
+ const annotations2 = fiber3.getRef(CurrentLogAnnotations2);
29831
+ for (const [key, value6] of Object.entries(annotations2)) {
29832
+ assignProperty(annotationsObj, key, structuredMessage(value6));
29801
29833
  }
29802
- return current;
29803
- }));
29804
- var setAndGet = /* @__PURE__ */ dual(2, (self, value6) => sync4(() => self.ref.current = value6));
29805
- var modify4 = /* @__PURE__ */ dual(2, (self, f) => sync4(() => {
29806
- const [b, a] = f(self.ref.current);
29807
- self.ref.current = a;
29808
- return b;
29809
- }));
29810
- var modifySome = /* @__PURE__ */ dual(2, (self, pf) => modify4(self, (value6) => {
29811
- const [b, option6] = pf(value6);
29812
- return [b, option6._tag === "None" ? value6 : option6.value];
29813
- }));
29814
- var update2 = /* @__PURE__ */ dual(2, (self, f) => sync4(() => {
29815
- self.ref.current = f(self.ref.current);
29816
- }));
29817
- var updateAndGet = /* @__PURE__ */ dual(2, (self, f) => sync4(() => self.ref.current = f(self.ref.current)));
29818
- var updateSome = /* @__PURE__ */ dual(2, (self, f) => sync4(() => {
29819
- const option6 = f(self.ref.current);
29820
- if (option6._tag === "Some") {
29821
- self.ref.current = option6.value;
29834
+ const now2 = date2.getTime();
29835
+ const spans = fiber3.getRef(CurrentLogSpans2);
29836
+ for (const [label, timestamp] of spans) {
29837
+ assignProperty(spansObj, label, now2 - timestamp);
29822
29838
  }
29839
+ const messageArr = ensure(message);
29840
+ return {
29841
+ message: messageArr.length === 1 ? structuredMessage(messageArr[0]) : messageArr.map(structuredMessage),
29842
+ level: logLevel.toUpperCase(),
29843
+ timestamp: date2.toISOString(),
29844
+ cause: cause.reasons.length > 0 ? causePretty(cause) : void 0,
29845
+ annotations: annotationsObj,
29846
+ spans: spansObj,
29847
+ fiberId: formatFiberId(fiber3.id)
29848
+ };
29849
+ });
29850
+ var formatJson2 = /* @__PURE__ */ map15(formatStructured, formatJson);
29851
+ var batched = /* @__PURE__ */ dual(2, (self, options) => flatMap3(scope, (scope3) => {
29852
+ let buffer3 = [];
29853
+ const flush2 = suspend(() => {
29854
+ if (buffer3.length === 0) {
29855
+ return void_3;
29856
+ }
29857
+ const arr = buffer3;
29858
+ buffer3 = [];
29859
+ return options.flush(arr);
29860
+ });
29861
+ return uninterruptibleMask((restore) => restore(sleep(options.window).pipe(andThen3(flush2), forever2)).pipe(forkDetach, flatMap3((fiber3) => scopeAddFinalizerExit(scope3, () => fiberInterrupt(fiber3))), andThen3(addFinalizer(() => flush2)), as2(loggerMake((options2) => {
29862
+ buffer3.push(self.log(options2));
29863
+ }))));
29823
29864
  }));
29824
- var updateSomeAndGet = /* @__PURE__ */ dual(2, (self, pf) => sync4(() => {
29825
- const option6 = pf(self.ref.current);
29826
- if (option6._tag === "Some") {
29827
- self.ref.current = option6.value;
29865
+ var consolePretty2 = consolePretty;
29866
+ var consolePrettyBrowser = prettyLoggerBrowser;
29867
+ var consolePrettyTty = prettyLoggerTty;
29868
+ var consoleLogFmt = /* @__PURE__ */ withConsoleLog(formatLogFmt);
29869
+ var consoleStructured = /* @__PURE__ */ withConsoleLog(formatStructured);
29870
+ var consoleJson = /* @__PURE__ */ withConsoleLog(formatJson2);
29871
+ var tracerLogger2 = tracerLogger;
29872
+ var layer = (loggers, options) => effect(CurrentLoggers2, withFiber(fnUntraced(function* (fiber3) {
29873
+ const currentLoggers = new Set(options?.mergeWithExisting === true ? fiber3.getRef(CurrentLoggers) : []);
29874
+ for (const logger of loggers) {
29875
+ currentLoggers.add(isEffect(logger) ? yield* logger : logger);
29828
29876
  }
29829
- return self.ref.current;
29877
+ return currentLoggers;
29878
+ })));
29879
+ var toFile = /* @__PURE__ */ dual((args2) => isLogger(args2[0]), (self, path, options) => gen3(function* () {
29880
+ const fs = yield* FileSystem;
29881
+ const logFile = yield* fs.open(path, {
29882
+ flag: "a+",
29883
+ ...options
29884
+ });
29885
+ const encoder2 = new TextEncoder();
29886
+ return yield* batched(self, {
29887
+ window: options?.batchWindow ?? 1e3,
29888
+ flush: (output) => ignore(logFile.writeAll(encoder2.encode(output.join("\n") + "\n")))
29889
+ });
29830
29890
  }));
29831
- var getUnsafe5 = (self) => self.ref.current;
29891
+
29892
+ // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/ManagedRuntime.js
29893
+ var ManagedRuntime_exports = {};
29894
+ __export(ManagedRuntime_exports, {
29895
+ isManagedRuntime: () => isManagedRuntime,
29896
+ make: () => make43
29897
+ });
29898
+ var TypeId47 = "~effect/ManagedRuntime";
29899
+ var isManagedRuntime = (input) => hasProperty(input, TypeId47);
29900
+ var make43 = (layer2, options) => {
29901
+ const memoMap = options?.memoMap ?? makeMemoMapUnsafe();
29902
+ const scope3 = makeUnsafe3("parallel");
29903
+ const layerScope = forkUnsafe2(scope3, "sequential");
29904
+ const defaultRunOptions = {
29905
+ onFiberStart: runIn(scope3)
29906
+ };
29907
+ const mergeRunOptions = (options2) => options2 ? {
29908
+ ...options2,
29909
+ onFiberStart: options2.onFiberStart ? (fiber3) => {
29910
+ defaultRunOptions.onFiberStart(fiber3);
29911
+ options2.onFiberStart(fiber3);
29912
+ } : defaultRunOptions.onFiberStart
29913
+ } : defaultRunOptions;
29914
+ let buildFiber;
29915
+ const contextEffect = withFiber2((fiber3) => {
29916
+ if (!buildFiber) {
29917
+ buildFiber = runFork2(tap6(buildWithMemoMap(layer2, memoMap, layerScope), (context3) => sync4(() => {
29918
+ self.cachedContext = context3;
29919
+ })), {
29920
+ ...defaultRunOptions,
29921
+ scheduler: fiber3.cache.scheduler
29922
+ });
29923
+ }
29924
+ return flatten5(await_(buildFiber));
29925
+ });
29926
+ const self = {
29927
+ [TypeId47]: TypeId47,
29928
+ memoMap,
29929
+ scope: scope3,
29930
+ contextEffect,
29931
+ cachedContext: void 0,
29932
+ context() {
29933
+ return self.cachedContext === void 0 ? runPromise2(self.contextEffect) : Promise.resolve(self.cachedContext);
29934
+ },
29935
+ dispose() {
29936
+ return runPromise2(self.disposeEffect);
29937
+ },
29938
+ [Symbol.asyncDispose]() {
29939
+ return self.dispose();
29940
+ },
29941
+ disposeEffect: suspend3(() => {
29942
+ ;
29943
+ self.contextEffect = die5("ManagedRuntime disposed");
29944
+ self.cachedContext = void 0;
29945
+ return close(self.scope, void_4);
29946
+ }),
29947
+ runFork(effect2, options2) {
29948
+ return self.cachedContext === void 0 ? runFork2(provide7(self, effect2), mergeRunOptions(options2)) : runForkWith2(self.cachedContext)(effect2, mergeRunOptions(options2));
29949
+ },
29950
+ runCallback(effect2, options2) {
29951
+ return self.cachedContext === void 0 ? runCallback2(provide7(self, effect2), mergeRunOptions(options2)) : runCallbackWith2(self.cachedContext)(effect2, mergeRunOptions(options2));
29952
+ },
29953
+ runSyncExit(effect2) {
29954
+ return self.cachedContext === void 0 ? runSyncExit2(provide7(self, effect2)) : runSyncExitWith2(self.cachedContext)(effect2);
29955
+ },
29956
+ runSync(effect2) {
29957
+ return self.cachedContext === void 0 ? runSync2(provide7(self, effect2)) : runSyncWith2(self.cachedContext)(effect2);
29958
+ },
29959
+ runPromiseExit(effect2, options2) {
29960
+ return self.cachedContext === void 0 ? runPromiseExit2(provide7(self, effect2), mergeRunOptions(options2)) : runPromiseExitWith2(self.cachedContext)(effect2, mergeRunOptions(options2));
29961
+ },
29962
+ runPromise(effect2, options2) {
29963
+ return self.cachedContext === void 0 ? runPromise2(provide7(self, effect2), mergeRunOptions(options2)) : runPromiseWith2(self.cachedContext)(effect2, mergeRunOptions(options2));
29964
+ }
29965
+ };
29966
+ return self;
29967
+ };
29968
+ function provide7(managed, effect2) {
29969
+ return flatMap5(managed.contextEffect, (context3) => provideContext2(effect2, context3));
29970
+ }
29832
29971
 
29833
29972
  // ../../node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect+effect@c7d1ffff31a3e2ae0b0b+a654a55b752bdb24/node_modules/effect/dist/UndefinedOr.js
29834
29973
  var map16 = /* @__PURE__ */ dual(2, (self, f) => self === void 0 ? void 0 : f(self));
@@ -29876,6 +30015,7 @@ export {
29876
30015
  hasProperty,
29877
30016
  isIterable,
29878
30017
  or,
30018
+ Predicate_exports,
29879
30019
  symbol,
29880
30020
  hash,
29881
30021
  combine,
@@ -29892,7 +30032,7 @@ export {
29892
30032
  getStackTraceLimit,
29893
30033
  PipeInspectableProto,
29894
30034
  none2 as none,
29895
- some2 as some,
30035
+ some3 as some,
29896
30036
  isOption2 as isOption,
29897
30037
  isNone2 as isNone,
29898
30038
  isSome2 as isSome,
@@ -30225,7 +30365,7 @@ export {
30225
30365
  String6 as String,
30226
30366
  Boolean3 as Boolean,
30227
30367
  Void2 as Void,
30228
- Struct,
30368
+ Struct2 as Struct,
30229
30369
  Record,
30230
30370
  StructWithRest,
30231
30371
  ArraySchema,
@@ -30303,10 +30443,10 @@ export {
30303
30443
  FileSystem,
30304
30444
  Path,
30305
30445
  map14 as map5,
30306
- orElse3 as orElse,
30446
+ orElse5 as orElse,
30307
30447
  all5 as all,
30308
30448
  withDefault2,
30309
- option3 as option,
30449
+ option5 as option,
30310
30450
  schema,
30311
30451
  String7 as String2,
30312
30452
  Int2,
@@ -30316,13 +30456,13 @@ export {
30316
30456
  Boolean4 as Boolean2,
30317
30457
  URL3 as URL,
30318
30458
  ignore5 as ignore2,
30319
- make40 as make7,
30459
+ make41 as make7,
30320
30460
  run3 as run2,
30321
30461
  runtime,
30322
30462
  awaitEmpty,
30323
30463
  FiberSet_exports,
30324
- symbol4 as symbol3,
30325
- make41 as make8,
30464
+ symbol5 as symbol3,
30465
+ make42 as make8,
30326
30466
  layer,
30327
30467
  Logger_exports,
30328
30468
  ManagedRuntime_exports,