diff --git a/backend/node_modules/effect/dist/dts/BigInt.d.ts b/backend/node_modules/effect/dist/dts/BigInt.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..cab9919d933fce56373dff261e905d4006a4c04a --- /dev/null +++ b/backend/node_modules/effect/dist/dts/BigInt.d.ts @@ -0,0 +1,1033 @@ +/** + * This module provides utility functions and type class instances for working with the `bigint` type in TypeScript. + * It includes functions for basic arithmetic operations, as well as type class instances for + * `Equivalence` and `Order`. + * + * @module BigInt + * @since 2.0.0 + * @see {@link module:BigDecimal} for more similar operations on `BigDecimal` types + * @see {@link module:Number} for more similar operations on `number` types + */ +import * as equivalence from "./Equivalence.js"; +import * as Option from "./Option.js"; +import * as order from "./Order.js"; +import type { Ordering } from "./Ordering.js"; +/** + * Tests if a value is a `bigint`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isBigInt } from "effect/BigInt" + * + * assert.deepStrictEqual(isBigInt(1n), true) + * assert.deepStrictEqual(isBigInt(1), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +export declare const isBigInt: (u: unknown) => u is bigint; +/** + * Provides an addition operation on `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { sum } from "effect/BigInt" + * + * assert.deepStrictEqual(sum(2n, 3n), 5n) + * ``` + * + * @category math + * @since 2.0.0 + */ +export declare const sum: { + /** + * Provides an addition operation on `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { sum } from "effect/BigInt" + * + * assert.deepStrictEqual(sum(2n, 3n), 5n) + * ``` + * + * @category math + * @since 2.0.0 + */ + (that: bigint): (self: bigint) => bigint; + /** + * Provides an addition operation on `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { sum } from "effect/BigInt" + * + * assert.deepStrictEqual(sum(2n, 3n), 5n) + * ``` + * + * @category math + * @since 2.0.0 + */ + (self: bigint, that: bigint): bigint; +}; +/** + * Provides a multiplication operation on `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { multiply } from "effect/BigInt" + * + * assert.deepStrictEqual(multiply(2n, 3n), 6n) + * ``` + * + * @category math + * @since 2.0.0 + */ +export declare const multiply: { + /** + * Provides a multiplication operation on `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { multiply } from "effect/BigInt" + * + * assert.deepStrictEqual(multiply(2n, 3n), 6n) + * ``` + * + * @category math + * @since 2.0.0 + */ + (that: bigint): (self: bigint) => bigint; + /** + * Provides a multiplication operation on `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { multiply } from "effect/BigInt" + * + * assert.deepStrictEqual(multiply(2n, 3n), 6n) + * ``` + * + * @category math + * @since 2.0.0 + */ + (self: bigint, that: bigint): bigint; +}; +/** + * Provides a subtraction operation on `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { subtract } from "effect/BigInt" + * + * assert.deepStrictEqual(subtract(2n, 3n), -1n) + * ``` + * + * @category math + * @since 2.0.0 + */ +export declare const subtract: { + /** + * Provides a subtraction operation on `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { subtract } from "effect/BigInt" + * + * assert.deepStrictEqual(subtract(2n, 3n), -1n) + * ``` + * + * @category math + * @since 2.0.0 + */ + (that: bigint): (self: bigint) => bigint; + /** + * Provides a subtraction operation on `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { subtract } from "effect/BigInt" + * + * assert.deepStrictEqual(subtract(2n, 3n), -1n) + * ``` + * + * @category math + * @since 2.0.0 + */ + (self: bigint, that: bigint): bigint; +}; +/** + * Provides a division operation on `bigint`s. + * + * If the dividend is not a multiple of the divisor the result will be a `bigint` value + * which represents the integer division rounded down to the nearest integer. + * + * Returns `None` if the divisor is `0n`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigInt, Option } from "effect" + * + * assert.deepStrictEqual(BigInt.divide(6n, 3n), Option.some(2n)) + * assert.deepStrictEqual(BigInt.divide(6n, 0n), Option.none()) + * ``` + * + * @category math + * @since 2.0.0 + */ +export declare const divide: { + /** + * Provides a division operation on `bigint`s. + * + * If the dividend is not a multiple of the divisor the result will be a `bigint` value + * which represents the integer division rounded down to the nearest integer. + * + * Returns `None` if the divisor is `0n`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigInt, Option } from "effect" + * + * assert.deepStrictEqual(BigInt.divide(6n, 3n), Option.some(2n)) + * assert.deepStrictEqual(BigInt.divide(6n, 0n), Option.none()) + * ``` + * + * @category math + * @since 2.0.0 + */ + (that: bigint): (self: bigint) => Option.Option; + /** + * Provides a division operation on `bigint`s. + * + * If the dividend is not a multiple of the divisor the result will be a `bigint` value + * which represents the integer division rounded down to the nearest integer. + * + * Returns `None` if the divisor is `0n`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigInt, Option } from "effect" + * + * assert.deepStrictEqual(BigInt.divide(6n, 3n), Option.some(2n)) + * assert.deepStrictEqual(BigInt.divide(6n, 0n), Option.none()) + * ``` + * + * @category math + * @since 2.0.0 + */ + (self: bigint, that: bigint): Option.Option; +}; +/** + * Provides a division operation on `bigint`s. + * + * If the dividend is not a multiple of the divisor the result will be a `bigint` value + * which represents the integer division rounded down to the nearest integer. + * + * Throws a `RangeError` if the divisor is `0n`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { unsafeDivide } from "effect/BigInt" + * + * assert.deepStrictEqual(unsafeDivide(6n, 3n), 2n) + * assert.deepStrictEqual(unsafeDivide(6n, 4n), 1n) + * ``` + * + * @category math + * @since 2.0.0 + */ +export declare const unsafeDivide: { + /** + * Provides a division operation on `bigint`s. + * + * If the dividend is not a multiple of the divisor the result will be a `bigint` value + * which represents the integer division rounded down to the nearest integer. + * + * Throws a `RangeError` if the divisor is `0n`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { unsafeDivide } from "effect/BigInt" + * + * assert.deepStrictEqual(unsafeDivide(6n, 3n), 2n) + * assert.deepStrictEqual(unsafeDivide(6n, 4n), 1n) + * ``` + * + * @category math + * @since 2.0.0 + */ + (that: bigint): (self: bigint) => bigint; + /** + * Provides a division operation on `bigint`s. + * + * If the dividend is not a multiple of the divisor the result will be a `bigint` value + * which represents the integer division rounded down to the nearest integer. + * + * Throws a `RangeError` if the divisor is `0n`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { unsafeDivide } from "effect/BigInt" + * + * assert.deepStrictEqual(unsafeDivide(6n, 3n), 2n) + * assert.deepStrictEqual(unsafeDivide(6n, 4n), 1n) + * ``` + * + * @category math + * @since 2.0.0 + */ + (self: bigint, that: bigint): bigint; +}; +/** + * Returns the result of adding `1n` to a given number. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { increment } from "effect/BigInt" + * + * assert.deepStrictEqual(increment(2n), 3n) + * ``` + * + * @category math + * @since 2.0.0 + */ +export declare const increment: (n: bigint) => bigint; +/** + * Decrements a number by `1n`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { decrement } from "effect/BigInt" + * + * assert.deepStrictEqual(decrement(3n), 2n) + * ``` + * + * @category math + * @since 2.0.0 + */ +export declare const decrement: (n: bigint) => bigint; +/** + * @category instances + * @since 2.0.0 + */ +export declare const Equivalence: equivalence.Equivalence; +/** + * @category instances + * @since 2.0.0 + */ +export declare const Order: order.Order; +/** + * Returns `true` if the first argument is less than the second, otherwise `false`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { lessThan } from "effect/BigInt" + * + * assert.deepStrictEqual(lessThan(2n, 3n), true) + * assert.deepStrictEqual(lessThan(3n, 3n), false) + * assert.deepStrictEqual(lessThan(4n, 3n), false) + * ``` + * + * @category predicates + * @since 2.0.0 + */ +export declare const lessThan: { + /** + * Returns `true` if the first argument is less than the second, otherwise `false`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { lessThan } from "effect/BigInt" + * + * assert.deepStrictEqual(lessThan(2n, 3n), true) + * assert.deepStrictEqual(lessThan(3n, 3n), false) + * assert.deepStrictEqual(lessThan(4n, 3n), false) + * ``` + * + * @category predicates + * @since 2.0.0 + */ + (that: bigint): (self: bigint) => boolean; + /** + * Returns `true` if the first argument is less than the second, otherwise `false`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { lessThan } from "effect/BigInt" + * + * assert.deepStrictEqual(lessThan(2n, 3n), true) + * assert.deepStrictEqual(lessThan(3n, 3n), false) + * assert.deepStrictEqual(lessThan(4n, 3n), false) + * ``` + * + * @category predicates + * @since 2.0.0 + */ + (self: bigint, that: bigint): boolean; +}; +/** + * Returns a function that checks if a given `bigint` is less than or equal to the provided one. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { lessThanOrEqualTo } from "effect/BigInt" + * + * assert.deepStrictEqual(lessThanOrEqualTo(2n, 3n), true) + * assert.deepStrictEqual(lessThanOrEqualTo(3n, 3n), true) + * assert.deepStrictEqual(lessThanOrEqualTo(4n, 3n), false) + * ``` + * + * @category predicates + * @since 2.0.0 + */ +export declare const lessThanOrEqualTo: { + /** + * Returns a function that checks if a given `bigint` is less than or equal to the provided one. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { lessThanOrEqualTo } from "effect/BigInt" + * + * assert.deepStrictEqual(lessThanOrEqualTo(2n, 3n), true) + * assert.deepStrictEqual(lessThanOrEqualTo(3n, 3n), true) + * assert.deepStrictEqual(lessThanOrEqualTo(4n, 3n), false) + * ``` + * + * @category predicates + * @since 2.0.0 + */ + (that: bigint): (self: bigint) => boolean; + /** + * Returns a function that checks if a given `bigint` is less than or equal to the provided one. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { lessThanOrEqualTo } from "effect/BigInt" + * + * assert.deepStrictEqual(lessThanOrEqualTo(2n, 3n), true) + * assert.deepStrictEqual(lessThanOrEqualTo(3n, 3n), true) + * assert.deepStrictEqual(lessThanOrEqualTo(4n, 3n), false) + * ``` + * + * @category predicates + * @since 2.0.0 + */ + (self: bigint, that: bigint): boolean; +}; +/** + * Returns `true` if the first argument is greater than the second, otherwise `false`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { greaterThan } from "effect/BigInt" + * + * assert.deepStrictEqual(greaterThan(2n, 3n), false) + * assert.deepStrictEqual(greaterThan(3n, 3n), false) + * assert.deepStrictEqual(greaterThan(4n, 3n), true) + * ``` + * + * @category predicates + * @since 2.0.0 + */ +export declare const greaterThan: { + /** + * Returns `true` if the first argument is greater than the second, otherwise `false`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { greaterThan } from "effect/BigInt" + * + * assert.deepStrictEqual(greaterThan(2n, 3n), false) + * assert.deepStrictEqual(greaterThan(3n, 3n), false) + * assert.deepStrictEqual(greaterThan(4n, 3n), true) + * ``` + * + * @category predicates + * @since 2.0.0 + */ + (that: bigint): (self: bigint) => boolean; + /** + * Returns `true` if the first argument is greater than the second, otherwise `false`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { greaterThan } from "effect/BigInt" + * + * assert.deepStrictEqual(greaterThan(2n, 3n), false) + * assert.deepStrictEqual(greaterThan(3n, 3n), false) + * assert.deepStrictEqual(greaterThan(4n, 3n), true) + * ``` + * + * @category predicates + * @since 2.0.0 + */ + (self: bigint, that: bigint): boolean; +}; +/** + * Returns a function that checks if a given `bigint` is greater than or equal to the provided one. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { greaterThanOrEqualTo } from "effect/BigInt" + * + * assert.deepStrictEqual(greaterThanOrEqualTo(2n, 3n), false) + * assert.deepStrictEqual(greaterThanOrEqualTo(3n, 3n), true) + * assert.deepStrictEqual(greaterThanOrEqualTo(4n, 3n), true) + * ``` + * + * @category predicates + * @since 2.0.0 + */ +export declare const greaterThanOrEqualTo: { + /** + * Returns a function that checks if a given `bigint` is greater than or equal to the provided one. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { greaterThanOrEqualTo } from "effect/BigInt" + * + * assert.deepStrictEqual(greaterThanOrEqualTo(2n, 3n), false) + * assert.deepStrictEqual(greaterThanOrEqualTo(3n, 3n), true) + * assert.deepStrictEqual(greaterThanOrEqualTo(4n, 3n), true) + * ``` + * + * @category predicates + * @since 2.0.0 + */ + (that: bigint): (self: bigint) => boolean; + /** + * Returns a function that checks if a given `bigint` is greater than or equal to the provided one. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { greaterThanOrEqualTo } from "effect/BigInt" + * + * assert.deepStrictEqual(greaterThanOrEqualTo(2n, 3n), false) + * assert.deepStrictEqual(greaterThanOrEqualTo(3n, 3n), true) + * assert.deepStrictEqual(greaterThanOrEqualTo(4n, 3n), true) + * ``` + * + * @category predicates + * @since 2.0.0 + */ + (self: bigint, that: bigint): boolean; +}; +/** + * Checks if a `bigint` is between a `minimum` and `maximum` value (inclusive). + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigInt } from "effect" + * + * const between = BigInt.between({ minimum: 0n, maximum: 5n }) + * + * assert.deepStrictEqual(between(3n), true) + * assert.deepStrictEqual(between(-1n), false) + * assert.deepStrictEqual(between(6n), false) + * ``` + * + * @category predicates + * @since 2.0.0 + */ +export declare const between: { + /** + * Checks if a `bigint` is between a `minimum` and `maximum` value (inclusive). + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigInt } from "effect" + * + * const between = BigInt.between({ minimum: 0n, maximum: 5n }) + * + * assert.deepStrictEqual(between(3n), true) + * assert.deepStrictEqual(between(-1n), false) + * assert.deepStrictEqual(between(6n), false) + * ``` + * + * @category predicates + * @since 2.0.0 + */ + (options: { + minimum: bigint; + maximum: bigint; + }): (self: bigint) => boolean; + /** + * Checks if a `bigint` is between a `minimum` and `maximum` value (inclusive). + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigInt } from "effect" + * + * const between = BigInt.between({ minimum: 0n, maximum: 5n }) + * + * assert.deepStrictEqual(between(3n), true) + * assert.deepStrictEqual(between(-1n), false) + * assert.deepStrictEqual(between(6n), false) + * ``` + * + * @category predicates + * @since 2.0.0 + */ + (self: bigint, options: { + minimum: bigint; + maximum: bigint; + }): boolean; +}; +/** + * Restricts the given `bigint` to be within the range specified by the `minimum` and `maximum` values. + * + * - If the `bigint` is less than the `minimum` value, the function returns the `minimum` value. + * - If the `bigint` is greater than the `maximum` value, the function returns the `maximum` value. + * - Otherwise, it returns the original `bigint`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigInt } from "effect" + * + * const clamp = BigInt.clamp({ minimum: 1n, maximum: 5n }) + * + * assert.equal(clamp(3n), 3n) + * assert.equal(clamp(0n), 1n) + * assert.equal(clamp(6n), 5n) + * ``` + * + * @since 2.0.0 + */ +export declare const clamp: { + /** + * Restricts the given `bigint` to be within the range specified by the `minimum` and `maximum` values. + * + * - If the `bigint` is less than the `minimum` value, the function returns the `minimum` value. + * - If the `bigint` is greater than the `maximum` value, the function returns the `maximum` value. + * - Otherwise, it returns the original `bigint`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigInt } from "effect" + * + * const clamp = BigInt.clamp({ minimum: 1n, maximum: 5n }) + * + * assert.equal(clamp(3n), 3n) + * assert.equal(clamp(0n), 1n) + * assert.equal(clamp(6n), 5n) + * ``` + * + * @since 2.0.0 + */ + (options: { + minimum: bigint; + maximum: bigint; + }): (self: bigint) => bigint; + /** + * Restricts the given `bigint` to be within the range specified by the `minimum` and `maximum` values. + * + * - If the `bigint` is less than the `minimum` value, the function returns the `minimum` value. + * - If the `bigint` is greater than the `maximum` value, the function returns the `maximum` value. + * - Otherwise, it returns the original `bigint`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigInt } from "effect" + * + * const clamp = BigInt.clamp({ minimum: 1n, maximum: 5n }) + * + * assert.equal(clamp(3n), 3n) + * assert.equal(clamp(0n), 1n) + * assert.equal(clamp(6n), 5n) + * ``` + * + * @since 2.0.0 + */ + (self: bigint, options: { + minimum: bigint; + maximum: bigint; + }): bigint; +}; +/** + * Returns the minimum between two `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { min } from "effect/BigInt" + * + * assert.deepStrictEqual(min(2n, 3n), 2n) + * ``` + * + * @since 2.0.0 + */ +export declare const min: { + /** + * Returns the minimum between two `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { min } from "effect/BigInt" + * + * assert.deepStrictEqual(min(2n, 3n), 2n) + * ``` + * + * @since 2.0.0 + */ + (that: bigint): (self: bigint) => bigint; + /** + * Returns the minimum between two `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { min } from "effect/BigInt" + * + * assert.deepStrictEqual(min(2n, 3n), 2n) + * ``` + * + * @since 2.0.0 + */ + (self: bigint, that: bigint): bigint; +}; +/** + * Returns the maximum between two `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { max } from "effect/BigInt" + * + * assert.deepStrictEqual(max(2n, 3n), 3n) + * ``` + * + * @since 2.0.0 + */ +export declare const max: { + /** + * Returns the maximum between two `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { max } from "effect/BigInt" + * + * assert.deepStrictEqual(max(2n, 3n), 3n) + * ``` + * + * @since 2.0.0 + */ + (that: bigint): (self: bigint) => bigint; + /** + * Returns the maximum between two `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { max } from "effect/BigInt" + * + * assert.deepStrictEqual(max(2n, 3n), 3n) + * ``` + * + * @since 2.0.0 + */ + (self: bigint, that: bigint): bigint; +}; +/** + * Determines the sign of a given `bigint`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { sign } from "effect/BigInt" + * + * assert.deepStrictEqual(sign(-5n), -1) + * assert.deepStrictEqual(sign(0n), 0) + * assert.deepStrictEqual(sign(5n), 1) + * ``` + * + * @category math + * @since 2.0.0 + */ +export declare const sign: (n: bigint) => Ordering; +/** + * Determines the absolute value of a given `bigint`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { abs } from "effect/BigInt" + * + * assert.deepStrictEqual(abs(-5n), 5n) + * assert.deepStrictEqual(abs(0n), 0n) + * assert.deepStrictEqual(abs(5n), 5n) + * ``` + * + * @category math + * @since 2.0.0 + */ +export declare const abs: (n: bigint) => bigint; +/** + * Determines the greatest common divisor of two `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { gcd } from "effect/BigInt" + * + * assert.deepStrictEqual(gcd(2n, 3n), 1n) + * assert.deepStrictEqual(gcd(2n, 4n), 2n) + * assert.deepStrictEqual(gcd(16n, 24n), 8n) + * ``` + * + * @category math + * @since 2.0.0 + */ +export declare const gcd: { + /** + * Determines the greatest common divisor of two `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { gcd } from "effect/BigInt" + * + * assert.deepStrictEqual(gcd(2n, 3n), 1n) + * assert.deepStrictEqual(gcd(2n, 4n), 2n) + * assert.deepStrictEqual(gcd(16n, 24n), 8n) + * ``` + * + * @category math + * @since 2.0.0 + */ + (that: bigint): (self: bigint) => bigint; + /** + * Determines the greatest common divisor of two `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { gcd } from "effect/BigInt" + * + * assert.deepStrictEqual(gcd(2n, 3n), 1n) + * assert.deepStrictEqual(gcd(2n, 4n), 2n) + * assert.deepStrictEqual(gcd(16n, 24n), 8n) + * ``` + * + * @category math + * @since 2.0.0 + */ + (self: bigint, that: bigint): bigint; +}; +/** + * Determines the least common multiple of two `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { lcm } from "effect/BigInt" + * + * assert.deepStrictEqual(lcm(2n, 3n), 6n) + * assert.deepStrictEqual(lcm(2n, 4n), 4n) + * assert.deepStrictEqual(lcm(16n, 24n), 48n) + * ``` + * + * @category math + * @since 2.0.0 + */ +export declare const lcm: { + /** + * Determines the least common multiple of two `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { lcm } from "effect/BigInt" + * + * assert.deepStrictEqual(lcm(2n, 3n), 6n) + * assert.deepStrictEqual(lcm(2n, 4n), 4n) + * assert.deepStrictEqual(lcm(16n, 24n), 48n) + * ``` + * + * @category math + * @since 2.0.0 + */ + (that: bigint): (self: bigint) => bigint; + /** + * Determines the least common multiple of two `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { lcm } from "effect/BigInt" + * + * assert.deepStrictEqual(lcm(2n, 3n), 6n) + * assert.deepStrictEqual(lcm(2n, 4n), 4n) + * assert.deepStrictEqual(lcm(16n, 24n), 48n) + * ``` + * + * @category math + * @since 2.0.0 + */ + (self: bigint, that: bigint): bigint; +}; +/** + * Determines the square root of a given `bigint` unsafely. Throws if the given `bigint` is negative. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { unsafeSqrt } from "effect/BigInt" + * + * assert.deepStrictEqual(unsafeSqrt(4n), 2n) + * assert.deepStrictEqual(unsafeSqrt(9n), 3n) + * assert.deepStrictEqual(unsafeSqrt(16n), 4n) + * ``` + * + * @category math + * @since 2.0.0 + */ +export declare const unsafeSqrt: (n: bigint) => bigint; +/** + * Determines the square root of a given `bigint` safely. Returns `none` if the given `bigint` is negative. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigInt, Option } from "effect" + * + * assert.deepStrictEqual(BigInt.sqrt(4n), Option.some(2n)) + * assert.deepStrictEqual(BigInt.sqrt(9n), Option.some(3n)) + * assert.deepStrictEqual(BigInt.sqrt(16n), Option.some(4n)) + * assert.deepStrictEqual(BigInt.sqrt(-1n), Option.none()) + * ``` + * + * @category math + * @since 2.0.0 + */ +export declare const sqrt: (n: bigint) => Option.Option; +/** + * Takes an `Iterable` of `bigint`s and returns their sum as a single `bigint + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { sumAll } from "effect/BigInt" + * + * assert.deepStrictEqual(sumAll([2n, 3n, 4n]), 9n) + * ``` + * + * @category math + * @since 2.0.0 + */ +export declare const sumAll: (collection: Iterable) => bigint; +/** + * Takes an `Iterable` of `bigint`s and returns their multiplication as a single `number`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { multiplyAll } from "effect/BigInt" + * + * assert.deepStrictEqual(multiplyAll([2n, 3n, 4n]), 24n) + * ``` + * + * @category math + * @since 2.0.0 + */ +export declare const multiplyAll: (collection: Iterable) => bigint; +/** + * Takes a `bigint` and returns an `Option` of `number`. + * + * If the `bigint` is outside the safe integer range for JavaScript (`Number.MAX_SAFE_INTEGER` + * and `Number.MIN_SAFE_INTEGER`), it returns `Option.none()`. Otherwise, it converts the `bigint` + * to a number and returns `Option.some(number)`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigInt as BI, Option } from "effect" + * + * assert.deepStrictEqual(BI.toNumber(BigInt(42)), Option.some(42)) + * assert.deepStrictEqual(BI.toNumber(BigInt(Number.MAX_SAFE_INTEGER) + BigInt(1)), Option.none()) + * assert.deepStrictEqual(BI.toNumber(BigInt(Number.MIN_SAFE_INTEGER) - BigInt(1)), Option.none()) + * ``` + * + * @category conversions + * @since 2.0.0 + */ +export declare const toNumber: (b: bigint) => Option.Option; +/** + * Takes a string and returns an `Option` of `bigint`. + * + * If the string is empty or contains characters that cannot be converted into a `bigint`, + * it returns `Option.none()`, otherwise, it returns `Option.some(bigint)`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigInt as BI, Option } from "effect" + * + * assert.deepStrictEqual(BI.fromString("42"), Option.some(BigInt(42))) + * assert.deepStrictEqual(BI.fromString(" "), Option.none()) + * assert.deepStrictEqual(BI.fromString("a"), Option.none()) + * ``` + * + * @category conversions + * @since 2.4.12 + */ +export declare const fromString: (s: string) => Option.Option; +/** + * Takes a number and returns an `Option` of `bigint`. + * + * If the number is outside the safe integer range for JavaScript (`Number.MAX_SAFE_INTEGER` + * and `Number.MIN_SAFE_INTEGER`), it returns `Option.none()`. Otherwise, it attempts to + * convert the number to a `bigint` and returns `Option.some(bigint)`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigInt as BI, Option } from "effect" + * + * assert.deepStrictEqual(BI.fromNumber(42), Option.some(BigInt(42))) + * assert.deepStrictEqual(BI.fromNumber(Number.MAX_SAFE_INTEGER + 1), Option.none()) + * assert.deepStrictEqual(BI.fromNumber(Number.MIN_SAFE_INTEGER - 1), Option.none()) + * ``` + * + * @category conversions + * @since 2.4.12 + */ +export declare const fromNumber: (n: number) => Option.Option; +//# sourceMappingURL=BigInt.d.ts.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/BigInt.d.ts.map b/backend/node_modules/effect/dist/dts/BigInt.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..355e4f3b40ed91674e91992de856432c8b95c75a --- /dev/null +++ b/backend/node_modules/effect/dist/dts/BigInt.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"BigInt.d.ts","sourceRoot":"","sources":["../../src/BigInt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAE/C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAO7C;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,QAAQ,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,IAAI,MAA2B,CAAA;AAEvE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,GAAG,EAAE;IAChB;;;;;;;;;;;;;OAaG;IACH,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;IACxC;;;;;;;;;;;;;OAaG;IACH,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;CAC0B,CAAA;AAEhE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,QAAQ,EAAE;IACrB;;;;;;;;;;;;;OAaG;IACH,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;IACxC;;;;;;;;;;;;;OAaG;IACH,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;CAC0B,CAAA;AAEhE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,QAAQ,EAAE;IAC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KxD,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,UAAU,GAAI,GAAG,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAQ1D,CAAA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,UAAU,GAAI,GAAG,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAU1D,CAAA"} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/ChildExecutorDecision.d.ts b/backend/node_modules/effect/dist/dts/ChildExecutorDecision.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..4622097a8109f735736234d79980405c9a0bb7ce --- /dev/null +++ b/backend/node_modules/effect/dist/dts/ChildExecutorDecision.d.ts @@ -0,0 +1,135 @@ +/** + * @since 2.0.0 + * @category symbols + */ +export declare const ChildExecutorDecisionTypeId: unique symbol; +/** + * @since 2.0.0 + * @category symbols + */ +export type ChildExecutorDecisionTypeId = typeof ChildExecutorDecisionTypeId; +/** + * @since 2.0.0 + * @category models + */ +export type ChildExecutorDecision = Continue | Close | Yield; +/** + * @since 2.0.0 + */ +export declare namespace ChildExecutorDecision { + /** + * @since 2.0.0 + * @category models + */ + interface Proto { + readonly [ChildExecutorDecisionTypeId]: ChildExecutorDecisionTypeId; + } +} +/** + * Continue executing the current substream + * + * @since 2.0.0 + * @category models + */ +export interface Continue extends ChildExecutorDecision.Proto { + readonly _tag: "Continue"; +} +/** + * Close the current substream with a given value and pass execution to the + * next substream + * + * @since 2.0.0 + * @category models + */ +export interface Close extends ChildExecutorDecision.Proto { + readonly _tag: "Close"; + readonly value: unknown; +} +/** + * Pass execution to the next substream. This either pulls a new element + * from upstream, or yields to an already created active substream. + * + * @since 2.0.0 + * @category models + */ +export interface Yield extends ChildExecutorDecision.Proto { + readonly _tag: "Yield"; +} +/** + * @since 2.0.0 + * @category constructors + */ +export declare const Continue: (_: void) => ChildExecutorDecision; +/** + * @since 2.0.0 + * @category constructors + */ +export declare const Close: (value: unknown) => ChildExecutorDecision; +/** + * @since 2.0.0 + * @category constructors + */ +export declare const Yield: (_: void) => ChildExecutorDecision; +/** + * Returns `true` if the specified value is a `ChildExecutorDecision`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export declare const isChildExecutorDecision: (u: unknown) => u is ChildExecutorDecision; +/** + * Returns `true` if the specified `ChildExecutorDecision` is a `Continue`, + * `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export declare const isContinue: (self: ChildExecutorDecision) => self is Continue; +/** + * Returns `true` if the specified `ChildExecutorDecision` is a `Close`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export declare const isClose: (self: ChildExecutorDecision) => self is Close; +/** + * Returns `true` if the specified `ChildExecutorDecision` is a `Yield`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export declare const isYield: (self: ChildExecutorDecision) => self is Yield; +/** + * Folds over a `ChildExecutorDecision` to produce a value of type `A`. + * + * @since 2.0.0 + * @category folding + */ +export declare const match: { + /** + * Folds over a `ChildExecutorDecision` to produce a value of type `A`. + * + * @since 2.0.0 + * @category folding + */ + (options: { + readonly onContinue: () => A; + readonly onClose: (value: unknown) => A; + readonly onYield: () => A; + }): (self: ChildExecutorDecision) => A; + /** + * Folds over a `ChildExecutorDecision` to produce a value of type `A`. + * + * @since 2.0.0 + * @category folding + */ + (self: ChildExecutorDecision, options: { + readonly onContinue: () => A; + readonly onClose: (value: unknown) => A; + readonly onYield: () => A; + }): A; +}; +//# sourceMappingURL=ChildExecutorDecision.d.ts.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/ConfigProviderPathPatch.d.ts.map b/backend/node_modules/effect/dist/dts/ConfigProviderPathPatch.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..29aeafff095d8ce090b05f52129aa56184652862 --- /dev/null +++ b/backend/node_modules/effect/dist/dts/ConfigProviderPathPatch.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ConfigProviderPath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AK,MAAM,GAAG,CAAC,IAAI,EAAE,SAAS,KAAK,SAAS,CAAA;IAC/D;;;OAGG;IACH,CAAC,IAAI,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAA;CACzC,CAAA;AAEpB;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE;IACnB;;;OAGG;IACH,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,SAAS,KAAK,SAAS,CAAA;IAC9C;;;OAGG;IACH,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;CACzB,CAAA;AAEnB;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE;IACrB;;;OAGG;IACH,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,SAAS,KAAK,SAAS,CAAA;IAC9C;;;OAGG;IACH,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;CACvB,CAAA"} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/Context.d.ts.map b/backend/node_modules/effect/dist/dts/Context.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..e2991692aed9ec09ed688cd57e4f8a5ff0cae6b6 --- /dev/null +++ b/backend/node_modules/effect/dist/dts/Context.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../src/Context.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEnD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACzC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,eAAO,MAAM,SAAS,EAAE,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,OAAO,EACnE,EAAE,EAAE,EAAE,EACN,OAAO,EAAE;IAAE,QAAQ,CAAC,YAAY,EAAE,MAAM,OAAO,CAAA;CAAE,KAC9C,cAAc,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAsB,CAAA"} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/Encoding.d.ts.map b/backend/node_modules/effect/dist/dts/Encoding.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..392195588f58463abf584f9a888cfcd6f677f574 --- /dev/null +++ b/backend/node_modules/effect/dist/dts/Encoding.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Encoding.d.ts","sourceRoot":"","sources":["../../src/Encoding.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAMrC;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,KAAK,MACqC,CAAA;AAEhG;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,eAAe,CAAuB,CAAA;AAE3G;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,KAAK,MAAM,2CAAmE,CAAA;AAEjH;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,KAAK,MACwC,CAAA;AAEtG;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAI,KAAK,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,eAAe,CAA0B,CAAA;AAEjH;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAAI,KAAK,M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hF;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAA;AAEhE;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAA;IAChC,QAAQ,CAAC,CAAC,qBAAqB,CAAC,EAAE,qBAAqB,CAAA;IACvD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,eAAwC,CAAA;AAE3G;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,IAAI,eAA0C,CAAA"} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/ExecutionStrategy.d.ts.map b/backend/node_modules/effect/dist/dts/ExecutionStrategy.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..f946d5da4a078ea257a8c18c4e57dc06c0df898b --- /dev/null +++ b/backend/node_modules/effect/dist/dts/ExecutionStrategy.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ExecutionStrategy.d.ts","sourceRoot":"","sources":["../../src/ExecutionStrategy.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAG5C;;;;;;;;;GASG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAA;AAEjE;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;CAC5B;AAED;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAA;CAC1B;AAED;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IACxB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,CAAC,CAAA;KACvC,GACC,CAAC,CAAA;CACY,CAAA"} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/FiberRefsPatch.d.ts.map b/backend/node_modules/effect/dist/dts/FiberRefsPatch.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..b7e08fbd777a96b27b2ac3b9d5b78ef65534f5c3 --- /dev/null +++ b/backend/node_modules/effect/dist/dts/FiberRefsPatch.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"FiberRefsPatch.d.ts","sourceRoot":"","sources":["../../src/FiberRefsPatch.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,OAAO,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,KAAK,QAAQ,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAGhD;;;;;;;;GAQG;AACH,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,GAAG,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;AAEpE;;;GAGG;AACH,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,GAAG;IAClB,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAA;IACpB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC7C,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;IACvB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;CAC9C;AAED;;;GAGG;AACH,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;IACvB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC7C,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;IACxB,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAA;IAC9B,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAA;CAChC;AAED;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAE,cAA+B,CAAA;AAEnD;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,SAAS,KAAK,cAA8B,CAAA;AAEnH;;;;;;;GAOG;AACH,eAAO,MAAM,OAAO,EAAE;IACpB;;;;;;;OAOG;IACH,CAAC,IAAI,EAAE,cAAc,GAAG,CAAC,IAAI,EAAE,cAAc,KAAK,cAAc,CAAA;IAChE;;;;;;;OAOG;IACH,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,cAAc,GAAG,cAAc,CAAA;CAC1C,CAAA;AAEpB;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,EAAE;IAClB;;;;;;OAMG;IACH,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,SAAS,GAAG,CAAC,IAAI,EAAE,cAAc,KAAK,SAAS,CAAC,SAAS,CAAA;IACxG;;;;;;OAMG;IACH,CACC,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE,OAAO,CAAC,OAAO,EACxB,QAAQ,EAAE,SAAS,CAAC,SAAS,GAC3B,SAAS,CAAC,SAAS,CAAA;CACN,CAAA"} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/GlobalValue.d.ts.map b/backend/node_modules/effect/dist/dts/GlobalValue.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..4881b86c6b47483fddd98ac3989356e5e3bcc418 --- /dev/null +++ b/backend/node_modules/effect/dist/dts/GlobalValue.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"GlobalValue.d.ts","sourceRoot":"","sources":["../../src/GlobalValue.ts"],"names":[],"mappings":"AAkBA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,EAAE,IAAI,OAAO,EAAE,SAAS,MAAM,CAAC,KAAG,CAW9D,CAAA"} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/Graph.d.ts.map b/backend/node_modules/effect/dist/dts/Graph.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..5f99fcac068ca6f9b69a03d07803f051258c1b58 --- /dev/null +++ b/backend/node_modules/effect/dist/dts/Graph.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Graph.d.ts","sourceRoot":"","sources":["../../src/Graph.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AACjC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AAGnC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEnD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAI7C;;;;;GAKG;AACH,eAAO,MAAM,MAAM,EAAE,eAA0C,CAAA;AAE/D;;;;;GAKG;AACH,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAA;AAElC;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAA;AAE9B;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAA;AAE9B;;;;;GAKG;AACH,qBAAa,IAAI,CAAC,CAAC,CAAE,SAAQ,IAAI,CAAC,KAAK,CAAC;IACtC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;IAC1B,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;IAC1B,QAAQ,C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gCG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,IAAI,GAAG,UAAU,EACzD,OAAO,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAC7C,SAAQ,eAAoB,KAC3B,UAAU,CAAC,CAAC,CA+Bd,CAAA"} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/HashMap.d.ts.map b/backend/node_modules/effect/dist/dts/HashMap.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..ce5f2ed2ef39686632d40392e369ff9b55f3efe5 --- /dev/null +++ b/backend/node_modules/effect/dist/dts/HashMap.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"HashMap.d.ts","sourceRoot":"","sources":["../../src/HashMap.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAGnD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEzC,QAAA,MAAM,MAAM,EAAE,OAAO,MAAmC,CAAA;AAExD;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAA;AAElC;;;GAGG;AACH,MAAM,WAAW,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAE,SAAQ,QAAQ,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW;IACvG,QAAQ,CAAC,CAAC,MAAM,CAAC,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AAC,CAAA;CACjE,CAAA;AAEhB;;;;;GAKG;AACH,eAAO,MAAM,IAAI,EAAE;IACjB;;;;;OAKG;IACH,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,OAAO,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,OAAO,CAAA;IACrF;;;;;OAKG;IACH,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,OAAO,GAAG,OAAO,CAAA;CAC/D,CAAA;AAEX;;;;;;;;GAQG;AACH,eAAO,MAAM,KAAK,EAAE;IAClB;;;;;;;;OAQG;IACH,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,OAAO,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,OAAO,CAAA;IACrF;;;;;;;;OAQG;IACH,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,OAAO,GAAG,OAAO,CAAA;CAC9D,CAAA"} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/Inspectable.d.ts.map b/backend/node_modules/effect/dist/dts/Inspectable.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..8f1377f3a339c38f011b6a315a1c668660901ebe --- /dev/null +++ b/backend/node_modules/effect/dist/dts/Inspectable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Inspectable.d.ts","sour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,CAAC,IAAI,UACe,CAAA;AAM9D;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAAI,CAAC,EAAE,SAAS,SAAS,CAAC,SAAS,EAAE,GAAG,MAAM,CAAC,KAAG,CAQnF,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM,GAAI,GAAG,OAAO,KAAG,OAKnC,CAAA"} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/List.d.ts.map b/backend/node_modules/effect/dist/dts/List.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..2192f367f98fd4d75a41631f557cd743cbaf3c5d --- /dev/null +++ b/backend/node_modules/effect/dist/dts/List.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../src/List.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAaH,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAG/C,OAAO,EAAU,KAAK,WAAW,EAA6B,MAAM,kBAAkB,CAAA;AACtF,OAAO,KAAK,EAAY,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACvE,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAE7C,OAAO,EAAe,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC7E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEzC;;;;;;;;;GASG;AACH,MAAM,MAAM,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAA;AAEtC;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,OAAO,MAAkC,CAAA;AAE9D;;;GA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AA;AAEtH;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,EAAE;IACjB;;;;;;OAMG;IACH,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAA;IAC1C;;;;;;OAMG;IACH,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;CAetC,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,OAAO,GAAI,CAAC,EAAE,MAAM,IAAI,CAAC,CAAC,CAAC,KAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAA6B,CAAA;AAIrF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,EAAE,MAAM,IAAI,CAAC,CAAC,CAAC,KAAG,CAK7C,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,EAAE,MAAM,IAAI,CAAC,CAAC,CAAC,KAAG,CAW7C,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,EAAE,MAAM,IAAI,CAAC,CAAC,CAAC,KAAG,IAAI,CAAC,CAAC,CAKnD,CAAA"} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/MetricHook.d.ts.map b/backend/node_modules/effect/dist/dts/MetricHook.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..e9e741491afdd198dcbf077c852d125002caa2dd --- /dev/null +++ b/backend/node_modules/effect/dist/dts/MetricHook.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"MetricHook.d.ts","sourceRoot":"","sources":["../../src/MetricHook.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAE5C,OAAO,KAAK,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAChD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AAE,KAAK,IAAI,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE,EAAE,GAAG,CAAC,KAAK,UAAU,CAAC,EAAE,EAAE,GAAG,CAAC,CAAA;IACrF;;;OAGG;IACH,CAAC,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,EAAE,KAAK,IAAI,GAAG,UAAU,CAAC,EAAE,EAAE,GAAG,CAAC,CAAA;CAC9D,CAAA"} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/MetricKey.d.ts.map b/backend/node_modules/effect/dist/dts/MetricKey.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..231afb3dc96bdebff8e4cf4e3fc313a04e30810f --- /dev/null +++ b/backend/node_modules/effect/dist/dts/MetricKey.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"MetricKey.d.ts","sourceRoot":"","sources":["../../src/MetricKey.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,QAAQ,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAA;AAExC,OAAO,KAAK,KAAK,gBAAgB,MAAM,uBAAuB,CAAA;AAC9D,OAAO,KAAK,KAAK,aAAa,MAAM,oBAAoB,CAAA;AACxD,OAAO,KAAK,KAAK,WAAW,MAAM,kBAAkB,CAAA;AACpD,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAA;AAExC;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,OAAO,MAAiC,CAAA;AAEtE;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAA;AAEpD;;;;;;;;;GASG;AACH,MAAM,WAAW,SAAS,CAAC,GAAG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E,SAAS,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC,IAAI,CAAC,CAAA;IAC5H;;;;;OAKG;IACH,CAAC,IAAI,SAAS,aAAa,CAAC,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC,IAAI,CAAC,CAAA;CACvG,CAAA;AAEnB;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE;IAC7B;;;;;OAKG;IACH,CAAC,SAAS,EAAE,aAAa,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,SAAS,aAAa,CAAC,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC,IAAI,CAAC,CAAA;IACnJ;;;;;OAKG;IACH,CAAC,IAAI,SAAS,aAAa,CAAC,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,aAAa,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,CAAA;CACpH,CAAA"} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/ModuleVersion.d.ts b/backend/node_modules/effect/dist/dts/ModuleVersion.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d49b72162110987f0c73d7b28c63d290e5b66137 --- /dev/null +++ b/backend/node_modules/effect/dist/dts/ModuleVersion.d.ts @@ -0,0 +1,11 @@ +/** + * @since 2.0.0 + * @category version + */ +export declare const getCurrentVersion: () => string; +/** + * @since 2.0.0 + * @category version + */ +export declare const setCurrentVersion: (version: string) => void; +//# sourceMappingURL=ModuleVersion.d.ts.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/MutableHashSet.d.ts b/backend/node_modules/effect/dist/dts/MutableHashSet.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..68a7e5cb357315052cd5ae5e688a82c138a56340 --- /dev/null +++ b/backend/node_modules/effect/dist/dts/MutableHashSet.d.ts @@ -0,0 +1,547 @@ +import { type Inspectable } from "./Inspectable.js"; +import type { Pipeable } from "./Pipeable.js"; +declare const TypeId: unique symbol; +/** + * @since 2.0.0 + * @category symbol + */ +export type TypeId = typeof TypeId; +/** + * @since 2.0.0 + * @category models + */ +export interface MutableHashSet extends Iterable, Pipeable, Inspectable { + readonly [TypeId]: TypeId; +} +/** + * Creates an empty mutable hash set. + * + * This function initializes and returns an empty `MutableHashSet` instance, + * which allows for efficient storage and manipulation of unique elements. + * + * Time complexity: **`O(1)`** + * + * @memberof MutableHashSet + * @since 2.0.0 + * @category constructors + * @example + * + * ```ts + * import { MutableHashSet } from "effect" + * + * type T = unknown // replace with your type + * + * // in places where the type can't be inferred, replace with your type + * const set: MutableHashSet.MutableHashSet = MutableHashSet.empty() + * ``` + * + * @template K - The type of the elements to be stored in the hash set. Defaults + * to `never` if not specified. + * @returns A new mutable instance of `MutableHashSet` containing no elements + * for the specified type `K`. + * @see Other `MutableHashSet` constructors are {@link module:MutableHashSet.make} {@link module:MutableHashSet.fromIterable} + */ +export declare const empty: () => MutableHashSet; +/** + * Creates a new `MutableHashSet` from an iterable collection of values. + * Duplicate values are omitted. + * + * Time complexity: **`O(n)`** where n is the number of elements in the iterable + * + * Creating a `MutableHashSet` from an {@link Array} + * + * ```ts + * import { MutableHashSet } from "effect" + * + * const array: Iterable = [1, 2, 3, 4, 5, 1, 2, 3] // Array is also Iterable + * const mutableHashSet: MutableHashSet.MutableHashSet = + * MutableHashSet.fromIterable(array) + * + * console.log( + * // MutableHashSet.MutableHashSet is also an Iterable + * Array.from(mutableHashSet) + * ) // Output: [1, 2, 3, 4, 5] + * ``` + * + * Creating a `MutableHashSet` from a {@link Set} + * + * ```ts + * import { MutableHashSet, pipe } from "effect" + * + * console.log( + * pipe( + * // Set is an Iterable + * new Set(["apple", "banana", "orange", "apple"]), + * // constructs MutableHashSet from an Iterable Set + * MutableHashSet.fromIterable, + * // since MutableHashSet it is itself an Iterable, we can pass it to other functions expecting an Iterable + * Array.from + * ) + * ) // Output: ["apple", "banana", "orange"] + * ``` + * + * Creating a `MutableHashSet` from a {@link Generator} + * + * ```ts + * import { MutableHashSet } from "effect" + * + * // Generator functions return iterables + * function* fibonacci(n: number): Generator { + * let [a, b] = [0, 1] + * for (let i = 0; i < n; i++) { + * yield a + * ;[a, b] = [b, a + b] + * } + * } + * + * // Create a MutableHashSet from the first 10 Fibonacci numbers + * const fibonacciSet = MutableHashSet.fromIterable(fibonacci(10)) + * + * console.log(Array.from(fibonacciSet)) + * // Outputs: [0, 1, 2, 3, 5, 8, 13, 21, 34] but in unsorted order + * ``` + * + * Creating a `MutableHashSet` from another {@link module:MutableHashSet} + * + * ```ts + * import { MutableHashSet, pipe } from "effect" + * + * console.log( + * pipe( + * MutableHashSet.make(1, 2, 3, 4), + * MutableHashSet.fromIterable, + * Array.from + * ) + * ) // Output: [1, 2, 3, 4] + * ``` + * + * Creating a `MutableHashSet` from an {@link module:HashSet} + * + * ```ts + * import { HashSet, MutableHashSet, pipe } from "effect" + * + * console.log( + * pipe( + * HashSet.make(1, 2, 3, 4), // it works also with its immutable HashSet sibling + * MutableHashSet.fromIterable, + * Array.from + * ) + * ) // Output: [1, 2, 3, 4] + * ``` + * + * Creating a `MutableHashSet` from other Effect's data structures like + * {@link Chunk} + * + * ```ts + * import { Chunk, MutableHashSet, pipe } from "effect" + * + * console.log( + * pipe( + * Chunk.make(1, 2, 3, 4), // Chunk is also an Iterable + * MutableHashSet.fromIterable, + * Array.from + * ) + * ) // Outputs: [1, 2, 3, 4] + * ``` + * + * @memberof MutableHashSet + * @since 2.0.0 + * @category constructors + * @template K - The type of elements to be stored in the resulting + * `MutableHashSet`. + * @param keys - An `Iterable` collection containing the keys to be added to the + * `MutableHashSet`. + * @returns A new `MutableHashSet` containing just the unique elements from the + * provided iterable. + * @see Other `MutableHashSet` constructors are {@link module:MutableHashSet.empty} {@link module:MutableHashSet.make} + */ +export declare const fromIterable: (keys: Iterable) => MutableHashSet; +/** + * Construct a new `MutableHashSet` from a variable number of values. + * + * Time complexity: **`O(n)`** where n is the number of elements + * + * @memberof MutableHashSet + * @since 2.0.0 + * @category constructors + * @example + * + * ```ts + * import { Equal, Hash, MutableHashSet } from "effect" + * import assert from "node:assert/strict" + * + * class Character implements Equal.Equal { + * readonly name: string + * readonly trait: string + * + * constructor(name: string, trait: string) { + * this.name = name + * this.trait = trait + * } + * + * // Define equality based on name, and trait + * [Equal.symbol](that: Equal.Equal): boolean { + * if (that instanceof Character) { + * return ( + * Equal.equals(this.name, that.name) && + * Equal.equals(this.trait, that.trait) + * ) + * } + * return false + * } + * + * // Generate a hash code based on the sum of the character's name and trait + * [Hash.symbol](): number { + * return Hash.hash(this.name + this.trait) + * } + * + * static readonly of = (name: string, trait: string): Character => { + * return new Character(name, trait) + * } + * } + * + * const mutableCharacterHashSet = MutableHashSet.make( + * Character.of("Alice", "Curious"), + * Character.of("Alice", "Curious"), + * Character.of("White Rabbit", "Always late"), + * Character.of("Mad Hatter", "Tea enthusiast") + * ) + * + * assert.equal( + * MutableHashSet.has( + * mutableCharacterHashSet, + * Character.of("Alice", "Curious") + * ), + * true + * ) + * assert.equal( + * MutableHashSet.has( + * mutableCharacterHashSet, + * Character.of("Fluffy", "Kind") + * ), + * false + * ) + * ``` + * + * @see Other `MutableHashSet` constructors are {@link module:MutableHashSet.fromIterable} {@link module:MutableHashSet.empty} + */ +export declare const make: >(...keys: Keys) => MutableHashSet; +/** + * **Checks** whether the `MutableHashSet` contains the given element, and + * **adds** it if not. + * + * Time complexity: **`O(1)`** average + * + * **Syntax** + * + * ```ts + * import { MutableHashSet, pipe } from "effect" + * + * // with data-last, a.k.a. pipeable API + * pipe( + * MutableHashSet.empty(), + * MutableHashSet.add(0), + * MutableHashSet.add(0) + * ) + * + * // or piped with the pipe function + * MutableHashSet.empty().pipe(MutableHashSet.add(0)) + * + * // or with data-first API + * MutableHashSet.add(MutableHashSet.empty(), 0) + * ``` + * + * @memberof MutableHashSet + * @since 2.0.0 + * @category elements + * @see Other `MutableHashSet` elements are {@link module:MutableHashSet.remove} {@link module:MutableHashSet.size} {@link module:MutableHashSet.clear} {@link module:MutableHashSet.has} + */ +export declare const add: { + /** + * `data-last` a.k.a. `pipeable` API + * + * ```ts + * import { MutableHashSet, pipe } from "effect" + * import assert from "node:assert/strict" + * + * const mutableHashSet = pipe( + * MutableHashSet.empty(), // MutableHashSet.MutableHashSet + * MutableHashSet.add(0), + * MutableHashSet.add(1), + * MutableHashSet.add(1), + * MutableHashSet.add(2) + * ) + * + * assert.deepStrictEqual( + * Array.from(mutableHashSet), // remember that MutableHashSet is also an Iterable + * Array.of(0, 1, 2) + * ) + * ``` + * + * @template V - The type of elements stored in the `MutableHashSet`. + * @param key - The key to be added to the `MutableHashSet` if not already + * present. + * @returns A function that accepts a `MutableHashSet` and returns the + * reference of the updated `MutableHashSet` including the key. + */ + (key: V): (self: MutableHashSet) => MutableHashSet; + /** + * `data-first` API + * + * ```ts + * import { MutableHashSet } from "effect" + * import assert from "node:assert/strict" + * + * const empty = MutableHashSet.empty() + * const withZero = MutableHashSet.add(empty, 0) + * const withOne = MutableHashSet.add(withZero, 1) + * const withTwo = MutableHashSet.add(withOne, 2) + * const withTwoTwo = MutableHashSet.add(withTwo, 2) + * + * assert(Object.is(withTwoTwo, empty)) // proof that it does mutate the original set + * + * assert.deepStrictEqual( + * Array.from(withTwoTwo), // remember that MutableHashSet is also an Iterable + * Array.of(0, 1, 2) + * ) + * ``` + * + * @template V - The type of elements stored in the `MutableHashSet`. + * @param self - The `MutableHashSet` instance from which the key should be + * added to. + * @param key - The key to be added to the `MutableHashSet` if not already + * present. + * @returns The reference of the updated `MutableHashSet` including the key. + */ + (self: MutableHashSet, key: V): MutableHashSet; +}; +/** + * Checks if the specified value exists in the `MutableHashSet`. + * + * Time complexity: `O(1)` average + * + * **Syntax** + * + * ```ts + * import { MutableHashSet, pipe } from "effect" + * import assert from "node:assert/strict" + * + * assert.equal( + * // with `data-last`, a.k.a. `pipeable` API + * pipe(MutableHashSet.make(0, 1, 2), MutableHashSet.has(3)), + * false + * ) + * + * assert.equal( + * // or piped with the pipe function + * MutableHashSet.make(0, 1, 2).pipe(MutableHashSet.has(3)), + * false + * ) + * + * assert.equal( + * // or with `data-first` API + * MutableHashSet.has(MutableHashSet.make(0, 1, 2), 3), + * false + * ) + * ``` + * + * @memberof MutableHashSet + * @since 2.0.0 + * @category elements + * @see Other `MutableHashSet` elements are {@link module:MutableHashSet.add} {@link module:MutableHashSet.remove} {@link module:MutableHashSet.size} {@link module:MutableHashSet.clear} + */ +export declare const has: { + /** + * `data-last` a.k.a. `pipeable` API + * + * ```ts + * import * as assert from "node:assert/strict" + * import { MutableHashSet, pipe } from "effect" + * + * const set = MutableHashSet.make(0, 1, 2) + * + * assert.equal(pipe(set, MutableHashSet.has(0)), true) + * assert.equal(pipe(set, MutableHashSet.has(1)), true) + * assert.equal(pipe(set, MutableHashSet.has(2)), true) + * assert.equal(pipe(set, MutableHashSet.has(3)), false) + * ``` + */ + (key: V): (self: MutableHashSet) => boolean; + /** + * `data-first` API + * + * ```ts + * import * as assert from "node:assert/strict" + * import { MutableHashSet, pipe } from "effect" + * + * const set = MutableHashSet.make(0, 1, 2) + * + * assert.equal(MutableHashSet.has(set, 0), true) + * assert.equal(MutableHashSet.has(set, 1), true) + * assert.equal(MutableHashSet.has(set, 2), true) + * assert.equal(MutableHashSet.has(set, 3), false) + * ``` + */ + (self: MutableHashSet, key: V): boolean; +}; +/** + * Removes a value from the `MutableHashSet`. + * + * Time complexity: **`O(1)`** average + * + * **Syntax** + * + * ```ts + * import { MutableHashSet, pipe } from "effect" + * import assert from "node:assert/strict" + * + * assert.equal( + * // with `data-last`, a.k.a. `pipeable` API + * pipe( + * MutableHashSet.make(0, 1, 2), + * MutableHashSet.remove(0), + * MutableHashSet.has(0) + * ), + * false + * ) + * + * assert.equal( + * // or piped with the pipe function + * MutableHashSet.make(0, 1, 2).pipe( + * MutableHashSet.remove(0), + * MutableHashSet.has(0) + * ), + * false + * ) + * + * assert.equal( + * // or with `data-first` API + * MutableHashSet.remove(MutableHashSet.make(0, 1, 2), 0).pipe( + * MutableHashSet.has(0) + * ), + * false + * ) + * ``` + * + * @memberof MutableHashSet + * @since 2.0.0 + * @category elements + * @see Other `MutableHashSet` elements are {@link module:MutableHashSet.add} {@link module:MutableHashSet.has} {@link module:MutableHashSet.size} {@link module:MutableHashSet.clear} + */ +export declare const remove: { + /** + * `data-last` a.k.a. `pipeable` API + * + * ```ts + * import { MutableHashSet, pipe } from "effect" + * import assert from "node:assert/strict" + * + * const set: MutableHashSet.MutableHashSet = MutableHashSet.make( + * 0, + * 1, + * 2 + * ) + * const result: MutableHashSet.MutableHashSet = pipe( + * set, + * MutableHashSet.remove(0) + * ) + * + * assert(Object.is(set, result)) // set and result have the same identity + * assert.equal(pipe(result, MutableHashSet.has(0)), false) // it has correctly removed 0 + * assert.equal(pipe(set, MutableHashSet.has(0)), false) // another proof that we are mutating the original MutableHashSet + * assert.equal(pipe(result, MutableHashSet.has(1)), true) + * assert.equal(pipe(result, MutableHashSet.has(2)), true) + * ``` + * + * @template V - The type of the elements in the `MutableHashSet`. + * @param key - The key to be removed from the `MutableHashSet`. + * @returns A function that takes a `MutableHashSet` as input and returns the + * reference to the same `MutableHashSet` with the specified key removed. + */ + (key: V): (self: MutableHashSet) => MutableHashSet; + /** + * `data-first` API + * + * ```ts + * import { MutableHashSet, pipe } from "effect" + * import assert from "node:assert/strict" + * + * const set = MutableHashSet.make(0, 1, 2) + * const result = MutableHashSet.remove(set, 0) + * + * assert(Object.is(set, result)) // set and result have the same identity + * assert.equal(MutableHashSet.has(result, 0), false) // it has correctly removed 0 + * assert.equal(MutableHashSet.has(set, 0), false) // it mutates the original MutableHashSet + * assert.equal(MutableHashSet.has(result, 1), true) + * assert.equal(MutableHashSet.has(result, 2), true) + * ``` + * + * @template V - The type of the elements in the `MutableHashSet`. + * @param self - The `MutableHashSet` to which the key will be removed from. + * @param key - The value to be removed from the `MutableHashSet` if present. + * @returns The reference to the updated `MutableHashSet`. + */ + (self: MutableHashSet, key: V): MutableHashSet; +}; +/** + * Calculates the number of values in the `HashSet`. + * + * Time complexity: **`O(1)`** + * + * @memberof MutableHashSet + * @since 2.0.0 + * @category elements + * @example + * + * ```ts + * import { MutableHashSet } from "effect" + * import assert from "node:assert/strict" + * + * assert.equal(MutableHashSet.size(MutableHashSet.empty()), 0) + * + * assert.equal( + * MutableHashSet.size(MutableHashSet.make(1, 2, 2, 3, 4, 3)), + * 4 + * ) + * ``` + * + * @template V - The type of the elements to be stored in the `MutableHashSet`. + * @param self - The `MutableHashSet` instance for which the size is to be + * determined. + * @returns The total number of elements within the `MutableHashSet`. + * @see Other `MutableHashSet` elements are {@link module:MutableHashSet.add} {@link module:MutableHashSet.has} {@link module:MutableHashSet.remove} {@link module:MutableHashSet.clear} + */ +export declare const size: (self: MutableHashSet) => number; +/** + * Removes all values from the `MutableHashSet`. + * + * This function operates by delegating the clearing action to the underlying + * key map associated with the given `MutableHashSet`. It ensures that the hash + * set becomes empty while maintaining its existence and structure. + * + * @memberof MutableHashSet + * @since 2.0.0 + * @category elements + * @example + * + * ```ts + * import { MutableHashSet, pipe } from "effect" + * import assert from "node:assert/strict" + * + * assert.deepStrictEqual( + * pipe( + * MutableHashSet.make(1, 2, 3, 4), + * MutableHashSet.clear, + * MutableHashSet.size + * ), + * 0 + * ) + * ``` + * + * @param self - The `MutableHashSet` to clear. + * @returns The same `MutableHashSet` after all elements have been removed. + * @see Other `MutableHashSet` elements are {@link module:MutableHashSet.add} {@link module:MutableHashSet.has} {@link module:MutableHashSet.remove} {@link module:MutableHashSet.size} + */ +export declare const clear: (self: MutableHashSet) => MutableHashSet; +export {}; +//# sourceMappingURL=MutableHashSet.d.ts.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/MutableList.d.ts b/backend/node_modules/effect/dist/dts/MutableList.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..97f77491405593ff1e1e683aa618a9e507c0868a --- /dev/null +++ b/backend/node_modules/effect/dist/dts/MutableList.d.ts @@ -0,0 +1,150 @@ +import type { Inspectable } from "./Inspectable.js"; +import type { Pipeable } from "./Pipeable.js"; +declare const TypeId: unique symbol; +/** + * @since 2.0.0 + * @category symbol + */ +export type TypeId = typeof TypeId; +/** + * @since 2.0.0 + * @category model + */ +export interface MutableList extends Iterable, Pipeable, Inspectable { + readonly [TypeId]: TypeId; +} +/** + * Creates an empty `MutableList`. + * + * @since 2.0.0 + * @category constructors + */ +export declare const empty: () => MutableList; +/** + * Creates a new `MutableList` from an iterable collection of values. + * + * @since 2.0.0 + * @category constructors + */ +export declare const fromIterable: (iterable: Iterable) => MutableList; +/** + * Creates a new `MutableList` from the specified elements. + * + * @since 2.0.0 + * @category constructors + */ +export declare const make: (...elements: ReadonlyArray) => MutableList; +/** + * Returns `true` if the list contains zero elements, `false`, otherwise. + * + * @since 2.0.0 + * @category getters + */ +export declare const isEmpty: (self: MutableList) => boolean; +/** + * Returns the length of the list. + * + * @since 2.0.0 + * @category getters + */ +export declare const length: (self: MutableList) => number; +/** + * Returns the last element of the list, if it exists. + * + * @since 2.0.0 + * @category getters + */ +export declare const tail: (self: MutableList) => A | undefined; +/** + * Returns the first element of the list, if it exists. + * + * @since 2.0.0 + * @category getters + */ +export declare const head: (self: MutableList) => A | undefined; +/** + * Executes the specified function `f` for each element in the list. + * + * @since 2.0.0 + * @category traversing + */ +export declare const forEach: { + /** + * Executes the specified function `f` for each element in the list. + * + * @since 2.0.0 + * @category traversing + */ + (f: (element: A) => void): (self: MutableList) => void; + /** + * Executes the specified function `f` for each element in the list. + * + * @since 2.0.0 + * @category traversing + */ + (self: MutableList, f: (element: A) => void): void; +}; +/** + * Removes all elements from the doubly-linked list. + * + * @since 2.0.0 + */ +export declare const reset: (self: MutableList) => MutableList; +/** + * Appends the specified element to the end of the `MutableList`. + * + * @category concatenating + * @since 2.0.0 + */ +export declare const append: { + /** + * Appends the specified element to the end of the `MutableList`. + * + * @category concatenating + * @since 2.0.0 + */ + (value: A): (self: MutableList) => MutableList; + /** + * Appends the specified element to the end of the `MutableList`. + * + * @category concatenating + * @since 2.0.0 + */ + (self: MutableList, value: A): MutableList; +}; +/** + * Removes the first value from the list and returns it, if it exists. + * + * @since 0.0.1 + */ +export declare const shift: (self: MutableList) => A | undefined; +/** + * Removes the last value from the list and returns it, if it exists. + * + * @since 0.0.1 + */ +export declare const pop: (self: MutableList) => A | undefined; +/** + * Prepends the specified value to the beginning of the list. + * + * @category concatenating + * @since 2.0.0 + */ +export declare const prepend: { + /** + * Prepends the specified value to the beginning of the list. + * + * @category concatenating + * @since 2.0.0 + */ + (value: A): (self: MutableList) => MutableList; + /** + * Prepends the specified value to the beginning of the list. + * + * @category concatenating + * @since 2.0.0 + */ + (self: MutableList, value: A): MutableList; +}; +export {}; +//# sourceMappingURL=MutableList.d.ts.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/Order.d.ts b/backend/node_modules/effect/dist/dts/Order.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..16ad61ff82e5d420960446cc2945f4a714291cff --- /dev/null +++ b/backend/node_modules/effect/dist/dts/Order.d.ts @@ -0,0 +1,260 @@ +import type { TypeLambda } from "./HKT.js"; +/** + * @category type class + * @since 2.0.0 + */ +export interface Order { + (self: A, that: A): -1 | 0 | 1; +} +/** + * @category type lambdas + * @since 2.0.0 + */ +export interface OrderTypeLambda extends TypeLambda { + readonly type: Order; +} +/** + * @category constructors + * @since 2.0.0 + */ +export declare const make: (compare: (self: A, that: A) => -1 | 0 | 1) => Order; +/** + * @category instances + * @since 2.0.0 + */ +export declare const string: Order; +/** + * @category instances + * @since 2.0.0 + */ +export declare const number: Order; +/** + * @category instances + * @since 2.0.0 + */ +export declare const boolean: Order; +/** + * @category instances + * @since 2.0.0 + */ +export declare const bigint: Order; +/** + * @since 2.0.0 + */ +export declare const reverse: (O: Order) => Order; +/** + * @category combining + * @since 2.0.0 + */ +export declare const combine: { + /** + * @category combining + * @since 2.0.0 + */ + (that: Order): (self: Order) => Order; + /** + * @category combining + * @since 2.0.0 + */ + (self: Order, that: Order): Order; +}; +/** + * @category combining + * @since 2.0.0 + */ +export declare const combineMany: { + /** + * @category combining + * @since 2.0.0 + */ + (collection: Iterable>): (self: Order) => Order; + /** + * @category combining + * @since 2.0.0 + */ + (self: Order, collection: Iterable>): Order; +}; +/** + * @since 2.0.0 + */ +export declare const empty: () => Order; +/** + * @category combining + * @since 2.0.0 + */ +export declare const combineAll: (collection: Iterable>) => Order; +/** + * @category mapping + * @since 2.0.0 + */ +export declare const mapInput: { + /** + * @category mapping + * @since 2.0.0 + */ + (f: (b: B) => A): (self: Order) => Order; + /** + * @category mapping + * @since 2.0.0 + */ + (self: Order, f: (b: B) => A): Order; +}; +/** + * @category instances + * @since 2.0.0 + */ +export declare const Date: Order; +/** + * @category combining + * @since 2.0.0 + */ +export declare const product: { + (that: Order): (self: Order) => Order; + (self: Order, that: Order): Order; +}; +/** + * @category combining + * @since 2.0.0 + */ +export declare const all: (collection: Iterable>) => Order>; +/** + * @category combining + * @since 2.0.0 + */ +export declare const productMany: { + (collection: Iterable>): (self: Order) => Order]>; + (self: Order, collection: Iterable>): Order]>; +}; +/** + * Similar to `Promise.all` but operates on `Order`s. + * + * ``` + * [Order, Order, ...] -> Order<[A, B, ...]> + * ``` + * + * This function creates and returns a new `Order` for a tuple of values based on the given `Order`s for each element in the tuple. + * The returned `Order` compares two tuples of the same type by applying the corresponding `Order` to each element in the tuple. + * It is useful when you need to compare two tuples of the same type and you have a specific way of comparing each element + * of the tuple. + * + * @category combinators + * @since 2.0.0 + */ +export declare const tuple: >>(...elements: T) => Order] ? A : never; }>>; +/** + * This function creates and returns a new `Order` for an array of values based on a given `Order` for the elements of the array. + * The returned `Order` compares two arrays by applying the given `Order` to each element in the arrays. + * If all elements are equal, the arrays are then compared based on their length. + * It is useful when you need to compare two arrays of the same type and you have a specific way of comparing each element of the array. + * + * @category combinators + * @since 2.0.0 + */ +export declare const array: (O: Order) => Order>; +/** + * This function creates and returns a new `Order` for a struct of values based on the given `Order`s + * for each property in the struct. + * + * @category combinators + * @since 2.0.0 + */ +export declare const struct: ; +}>(fields: R) => Order<{ [K in keyof R]: [R[K]] extends [Order] ? A : never; }>; +/** + * Test whether one value is _strictly less than_ another. + * + * @since 2.0.0 + */ +export declare const lessThan: (O: Order) => { + (that: A): (self: A) => boolean; + (self: A, that: A): boolean; +}; +/** + * Test whether one value is _strictly greater than_ another. + * + * @since 2.0.0 + */ +export declare const greaterThan: (O: Order) => { + (that: A): (self: A) => boolean; + (self: A, that: A): boolean; +}; +/** + * Test whether one value is _non-strictly less than_ another. + * + * @since 2.0.0 + */ +export declare const lessThanOrEqualTo: (O: Order) => { + (that: A): (self: A) => boolean; + (self: A, that: A): boolean; +}; +/** + * Test whether one value is _non-strictly greater than_ another. + * + * @since 2.0.0 + */ +export declare const greaterThanOrEqualTo: (O: Order) => { + (that: A): (self: A) => boolean; + (self: A, that: A): boolean; +}; +/** + * Take the minimum of two values. If they are considered equal, the first argument is chosen. + * + * @since 2.0.0 + */ +export declare const min: (O: Order) => { + (that: A): (self: A) => A; + (self: A, that: A): A; +}; +/** + * Take the maximum of two values. If they are considered equal, the first argument is chosen. + * + * @since 2.0.0 + */ +export declare const max: (O: Order) => { + (that: A): (self: A) => A; + (self: A, that: A): A; +}; +/** + * Clamp a value between a minimum and a maximum. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Order, Number } from "effect" + * + * const clamp = Order.clamp(Number.Order)({ minimum: 1, maximum: 5 }) + * + * assert.equal(clamp(3), 3) + * assert.equal(clamp(0), 1) + * assert.equal(clamp(6), 5) + * ``` + * + * @since 2.0.0 + */ +export declare const clamp: (O: Order) => { + (options: { + minimum: A; + maximum: A; + }): (self: A) => A; + (self: A, options: { + minimum: A; + maximum: A; + }): A; +}; +/** + * Test whether a value is between a minimum and a maximum (inclusive). + * + * @since 2.0.0 + */ +export declare const between: (O: Order) => { + (options: { + minimum: A; + maximum: A; + }): (self: A) => boolean; + (self: A, options: { + minimum: A; + maximum: A; + }): boolean; +}; +//# sourceMappingURL=Order.d.ts.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/ParseResult.d.ts.map b/backend/node_modules/effect/dist/dts/ParseResult.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..b724d8d718218cc9cef04fff457143a9e9369f96 --- /dev/null +++ b/backend/node_modules/effect/dist/dts/ParseResult.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ParseResult.d.ts","sourceRoot":"","sources":["../../src/ParseResult.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,GAAG,MAAM,YAAY,CAAA;AACjC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AAEnC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAErC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAG5C,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAE/C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAGrC,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAA;AAGrC;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAElB,IAAI,GACJ,OAAO,GACP,UAAU,GACV,SAAS,GAET,OAAO,GACP,UAAU,GACV,cAAc,GACd,SAAS,CAAA;AAEb;;;GAGG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAA;AAElE;;;GAGG;AACH,MAAM,MAAM,IAAI,GAAG,gBAAgB,CAAC,WAA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G;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,CAAA;IAEjC;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC,CAAA;IAEzC;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB;AAQD;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,oBAAoB,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAQ3E,CAAA"} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/PartitionedSemaphore.d.ts.map b/backend/node_modules/effect/dist/dts/PartitionedSemaphore.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..ad64c6c70a44d37f16b98df6cc680d3ccaac70f9 --- /dev/null +++ b/backend/node_modules/effect/dist/dts/PartitionedSemaphore.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"PartitionedSemaphore.d.ts","sourceRoot":"","sources":["../../src/PartitionedSemaphore.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAKrC;;;;GAIG;AACH,eAAO,MAAM,MAAM,EAAE,MAAuC,CAAA;AAE5D;;;;GAIG;AACH,MAAM,MAAM,MAAM,GAAG,8BAA8B,CAAA;AAEnD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,oBAAoB,CAAC,EAAE,CAAC,CAAC;IACxC,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IAEzB,QAAQ,CAAC,WAAW,EAAE,CACpB,GAAG,EAAE,CAAC,EACN,OAAO,EAAE,MAAM,KACZ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;CACzE;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,GAAG,OAAO,EAAE,SAAS;IAC/C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB,KAAG,oBAAoB,CAAC,CAAC,CAiHzB,CAAA;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,IAAI,GAAI,CAAC,GAAG,OAAO,EAAE,SAAS;IACzC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB,KAAG,MAAM,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAA8C,CAAA"} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/Pipeable.d.ts b/backend/node_modules/effect/dist/dts/Pipeable.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8a0efec845de616b771c9a81cba586f101e68c52 --- /dev/null +++ b/backend/node_modules/effect/dist/dts/Pipeable.d.ts @@ -0,0 +1,65 @@ +/** + * @since 2.0.0 + */ +import type { Ctor } from "./Types.js"; +/** + * @since 2.0.0 + * @category Models + */ +export interface Pipeable { + pipe(this: A): A; + pipe(this: A, ab: (_: A) => B): B; + pipe(this: A, ab: (_: A) => B, bc: (_: B) => C): C; + pipe(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; + pipe(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E): E; + pipe(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F): F; + pipe(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G): G; + pipe(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H): H; + pipe(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I): I; + pipe(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J): J; + pipe(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K): K; + pipe(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L): L; + pipe(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M): M; + pipe(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N): N; + pipe(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O): O; + pipe(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P): P; + pipe(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q): Q; + pipe(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R): R; + pipe(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R, rs: (_: R) => S): S; + pipe(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R, rs: (_: R) => S, st: (_: S) => T): T; + pipe(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R, rs: (_: R) => S, st: (_: S) => T, tu: (_: T) => U): U; + pipe(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R, rs: (_: R) => S, st: (_: S) => T, tu: (_: T) => U): U; +} +/** + * @since 2.0.0 + */ +export declare const pipeArguments: (self: A, args: IArguments) => unknown; +/** + * @since 3.15.0 + * @category Models + */ +export interface PipeableConstructor { + new (...args: Array): Pipeable; +} +/** + * @since 3.15.0 + * @category Prototypes + */ +export declare const Prototype: Pipeable; +/** + * @since 3.15.0 + * @category Constructors + */ +export declare const Class: { + /** + * @since 3.15.0 + * @category Constructors + */ + (): PipeableConstructor; + /** + * @since 3.15.0 + * @category Constructors + */ + (klass: TBase): TBase & PipeableConstructor; +}; +//# sourceMappingURL=Pipeable.d.ts.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/PubSub.d.ts.map b/backend/node_modules/effect/dist/dts/PubSub.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..91a3d0f42dc0428f10d5cc8eff18c339142f548a --- /dev/null +++ b/backend/node_modules/effect/dist/dts/PubSub.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"PubSub.d.ts","sourceRoot":"","sources":["../../src/PubSub.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAA;AAE1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAA;AACxC,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAA;AAExC;;;;;;;GAOG;AACH,MAAM,WAAW,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CA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M,CAAC,MAAM,CAAC,IAAI,CAA0B,CAAA;AAEhG;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,EAAE;IACpB;;;;;;OAMG;IACH,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IAC1D;;;;;;OAMG;IACH,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;CACpC,CAAA;AAEpB;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,EAAE;IACvB;;;;;;OAMG;IACH,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IACvE;;;;;;OAMG;IACH,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;CAC9C,CAAA;AAEvB;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAAsB,CAAA"} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/Redacted.d.ts b/backend/node_modules/effect/dist/dts/Redacted.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3e8f49368f8d92d610373c10c9bc21fb4f5cbb9d --- /dev/null +++ b/backend/node_modules/effect/dist/dts/Redacted.d.ts @@ -0,0 +1,133 @@ +/** + * The Redacted module provides functionality for handling sensitive information + * securely within your application. By using the `Redacted` data type, you can + * ensure that sensitive values are not accidentally exposed in logs or error + * messages. + * + * @since 3.3.0 + */ +import type * as Equal from "./Equal.js"; +import * as Equivalence from "./Equivalence.js"; +import type { Pipeable } from "./Pipeable.js"; +import type { Covariant } from "./Types.js"; +/** + * @since 3.3.0 + * @category symbols + */ +export declare const RedactedTypeId: unique symbol; +/** + * @since 3.3.0 + * @category symbols + */ +export type RedactedTypeId = typeof RedactedTypeId; +/** + * @since 3.3.0 + * @category models + */ +export interface Redacted extends Redacted.Variance, Equal.Equal, Pipeable { +} +/** + * @since 3.3.0 + */ +export declare namespace Redacted { + /** + * @since 3.3.0 + * @category models + */ + interface Variance { + readonly [RedactedTypeId]: { + readonly _A: Covariant; + }; + } + /** + * @since 3.3.0 + * @category type-level + */ + type Value> = [T] extends [Redacted] ? _A : never; +} +/** + * @since 3.3.0 + * @category refinements + */ +export declare const isRedacted: (u: unknown) => u is Redacted; +/** + * This function creates a `Redacted` instance from a given value `A`, + * securely hiding its content. + * + * @example + * ```ts + * import { Redacted } from "effect" + * + * const API_KEY = Redacted.make("1234567890") + * ``` + * + * @since 3.3.0 + * @category constructors + */ +export declare const make: (value: A) => Redacted; +/** + * Retrieves the original value from a `Redacted` instance. Use this function + * with caution, as it exposes the sensitive data. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Redacted } from "effect" + * + * const API_KEY = Redacted.make("1234567890") + * + * assert.equal(Redacted.value(API_KEY), "1234567890") + * ``` + * + * @since 3.3.0 + * @category getters + */ +export declare const value: (self: Redacted) => A; +/** + * Erases the underlying value of a `Redacted` instance, rendering it unusable. + * This function is intended to ensure that sensitive data does not remain in + * memory longer than necessary. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Redacted } from "effect" + * + * const API_KEY = Redacted.make("1234567890") + * + * assert.equal(Redacted.value(API_KEY), "1234567890") + * + * Redacted.unsafeWipe(API_KEY) + * + * assert.throws(() => Redacted.value(API_KEY), new Error("Unable to get redacted value")) + * ``` + * + * @since 3.3.0 + * @category unsafe + */ +export declare const unsafeWipe: (self: Redacted) => boolean; +/** + * Generates an equivalence relation for `Redacted` values based on an + * equivalence relation for the underlying values `A`. This function is useful + * for comparing `Redacted` instances without exposing their contents. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Redacted, Equivalence } from "effect" + * + * const API_KEY1 = Redacted.make("1234567890") + * const API_KEY2 = Redacted.make("1-34567890") + * const API_KEY3 = Redacted.make("1234567890") + * + * const equivalence = Redacted.getEquivalence(Equivalence.string) + * + * assert.equal(equivalence(API_KEY1, API_KEY2), false) + * assert.equal(equivalence(API_KEY1, API_KEY3), true) + * ``` + * + * @category equivalence + * @since 3.3.0 + */ +export declare const getEquivalence: (isEquivalent: Equivalence.Equivalence) => Equivalence.Equivalence>; +//# sourceMappingURL=Redacted.d.ts.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/Ref.d.ts b/backend/node_modules/effect/dist/dts/Ref.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e01c49d54b7f24aa851f8515135ecd90340dae1d --- /dev/null +++ b/backend/node_modules/effect/dist/dts/Ref.d.ts @@ -0,0 +1,250 @@ +/** + * @since 2.0.0 + */ +import type * as Effect from "./Effect.js"; +import type * as Option from "./Option.js"; +import type * as Readable from "./Readable.js"; +import type * as Types from "./Types.js"; +import type * as Unify from "./Unify.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export declare const RefTypeId: unique symbol; +/** + * @since 2.0.0 + * @category symbols + */ +export type RefTypeId = typeof RefTypeId; +/** + * @since 2.0.0 + * @category models + */ +export interface Ref extends Ref.Variance, Effect.Effect, Readable.Readable { + modify(f: (a: A) => readonly [B, A]): Effect.Effect; + readonly [Unify.typeSymbol]?: unknown; + readonly [Unify.unifySymbol]?: RefUnify; + readonly [Unify.ignoreSymbol]?: RefUnifyIgnore; +} +/** + * @category models + * @since 3.8.0 + */ +export interface RefUnify extends Effect.EffectUnify { + Ref?: () => Extract>; +} +/** + * @category models + * @since 3.8.0 + */ +export interface RefUnifyIgnore extends Effect.EffectUnifyIgnore { + Effect?: true; +} +/** + * @since 2.0.0 + * @category models + */ +export declare namespace Ref { + /** + * @since 2.0.0 + */ + interface Variance { + readonly [RefTypeId]: { + readonly _A: Types.Invariant; + }; + } +} +/** + * @since 2.0.0 + * @category constructors + */ +export declare const make: (value: A) => Effect.Effect>; +/** + * @since 2.0.0 + * @category getters + */ +export declare const get: (self: Ref) => Effect.Effect; +/** + * @since 2.0.0 + * @category utils + */ +export declare const getAndSet: { + /** + * @since 2.0.0 + * @category utils + */ + (value: A): (self: Ref) => Effect.Effect; + /** + * @since 2.0.0 + * @category utils + */ + (self: Ref, value: A): Effect.Effect; +}; +/** + * @since 2.0.0 + * @category utils + */ +export declare const getAndUpdate: { + /** + * @since 2.0.0 + * @category utils + */ + (f: (a: A) => A): (self: Ref) => Effect.Effect; + /** + * @since 2.0.0 + * @category utils + */ + (self: Ref, f: (a: A) => A): Effect.Effect; +}; +/** + * @since 2.0.0 + * @category utils + */ +export declare const getAndUpdateSome: { + /** + * @since 2.0.0 + * @category utils + */ + (pf: (a: A) => Option.Option): (self: Ref) => Effect.Effect; + /** + * @since 2.0.0 + * @category utils + */ + (self: Ref, pf: (a: A) => Option.Option): Effect.Effect; +}; +/** + * @since 2.0.0 + * @category utils + */ +export declare const modify: { + /** + * @since 2.0.0 + * @category utils + */ + (f: (a: A) => readonly [B, A]): (self: Ref) => Effect.Effect; + /** + * @since 2.0.0 + * @category utils + */ + (self: Ref, f: (a: A) => readonly [B, A]): Effect.Effect; +}; +/** + * @since 2.0.0 + * @category utils + */ +export declare const modifySome: { + /** + * @since 2.0.0 + * @category utils + */ + (fallback: B, pf: (a: A) => Option.Option): (self: Ref) => Effect.Effect; + /** + * @since 2.0.0 + * @category utils + */ + (self: Ref, fallback: B, pf: (a: A) => Option.Option): Effect.Effect; +}; +/** + * @since 2.0.0 + * @category utils + */ +export declare const set: { + /** + * @since 2.0.0 + * @category utils + */ + (value: A): (self: Ref) => Effect.Effect; + /** + * @since 2.0.0 + * @category utils + */ + (self: Ref, value: A): Effect.Effect; +}; +/** + * @since 2.0.0 + * @category utils + */ +export declare const setAndGet: { + /** + * @since 2.0.0 + * @category utils + */ + (value: A): (self: Ref) => Effect.Effect; + /** + * @since 2.0.0 + * @category utils + */ + (self: Ref, value: A): Effect.Effect; +}; +/** + * @since 2.0.0 + * @category utils + */ +export declare const update: { + /** + * @since 2.0.0 + * @category utils + */ + (f: (a: A) => A): (self: Ref) => Effect.Effect; + /** + * @since 2.0.0 + * @category utils + */ + (self: Ref, f: (a: A) => A): Effect.Effect; +}; +/** + * @since 2.0.0 + * @category utils + */ +export declare const updateAndGet: { + /** + * @since 2.0.0 + * @category utils + */ + (f: (a: A) => A): (self: Ref) => Effect.Effect; + /** + * @since 2.0.0 + * @category utils + */ + (self: Ref, f: (a: A) => A): Effect.Effect; +}; +/** + * @since 2.0.0 + * @category utils + */ +export declare const updateSome: { + /** + * @since 2.0.0 + * @category utils + */ + (f: (a: A) => Option.Option): (self: Ref) => Effect.Effect; + /** + * @since 2.0.0 + * @category utils + */ + (self: Ref, f: (a: A) => Option.Option): Effect.Effect; +}; +/** + * @since 2.0.0 + * @category utils + */ +export declare const updateSomeAndGet: { + /** + * @since 2.0.0 + * @category utils + */ + (pf: (a: A) => Option.Option): (self: Ref) => Effect.Effect; + /** + * @since 2.0.0 + * @category utils + */ + (self: Ref, pf: (a: A) => Option.Option): Effect.Effect; +}; +/** + * @since 2.0.0 + * @category unsafe + */ +export declare const unsafeMake: (value: A) => Ref; +//# sourceMappingURL=Ref.d.ts.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/RequestResolver.d.ts.map b/backend/node_modules/effect/dist/dts/RequestResolver.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..0803ce680e48bc7207f3d43b0155268c8aad32e1 --- /dev/null +++ b/backend/node_modules/effect/dist/dts/RequestResol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AAG,EAAE,CAAC,CAAA;CAChK,CAAA;AAEjB;;;;;GAKG;AACH,eAAO,MAAM,OAAO,EAAE;IACpB;;;;;OAKG;IACH,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,SAAS,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IAC/H;;;;;OAKG;IACH,CAAC,CAAC,EAAE,CAAC,SAAS,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;CACrG,CAAA"} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/Resource.d.ts.map b/backend/node_modules/effect/dist/dts/Resource.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..674c4cd37bb89a3ef8eab5ddf880a062d4229a78 --- /dev/null +++ b/backend/node_modules/effect/dist/dts/Resource.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Resource.d.ts","sourceRoot":"","sources":["../../src/Resource.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAA;AAG1C,OAAO,KAAK,KAAK,QAAQ,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAA;AAExC,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAA;AACxC,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAA;AAExC;;;GAGG;AACH,eAAO,MAA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ect/dist/dts/SingleProducerAsyncInput.d.ts.map b/backend/node_modules/effect/dist/dts/SingleProducerAsyncInput.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..0b75df33f5a78ff24c319f11483df0a2d03124fb --- /dev/null +++ b/backend/node_modules/effect/dist/dts/SingleProducerAsyncInput.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"SingleProducerAsyncInput.d.ts","sourceRoot":"","sources":["../../src/SingleProducerAsyncInput.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAA;AACxC,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,KAAK,IAAI,MAAM,WAAW,CAAA;AAGtC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,wBAAwB,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAC5E,SAAQ,kBAAkB,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,kBAAkB,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC;IAEhF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAA;CACxE;AAED;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI;IAC1D,SAAS,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IACnC,IAAI,CAAC,KAAK,EAAE,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IACzC,IAAI,CAAC,OAAO,EAAE,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IAC3C,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;CACvD;AAED;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI;IAC7D,QAAQ,CAAC,CAAC,EACR,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,EACvC,SAAS,EAAE,CAAC,OAAO,EAAE,IAAI,KAAK,CAAC,EAC/B,MAAM,EAAE,CAAC,KAAK,EAAE,IAAI,KAAK,CAAC,GACzB,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;CACpB;AAED;;;GAGG;AACH,eAAO,MAAM,IAAI,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,wBAAwB,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,CAAiB,CAAA"} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/SortedSet.d.ts b/backend/node_modules/effect/dist/dts/SortedSet.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..171a28e8d0c3b20e84e27849f4633cd60eae0d29 --- /dev/null +++ b/backend/node_modules/effect/dist/dts/SortedSet.d.ts @@ -0,0 +1,333 @@ +/** + * @since 2.0.0 + */ +import * as Equal from "./Equal.js"; +import type * as Equivalence from "./Equivalence.js"; +import type { Inspectable } from "./Inspectable.js"; +import type { Order } from "./Order.js"; +import type { Pipeable } from "./Pipeable.js"; +import type { Predicate } from "./Predicate.js"; +import type { Invariant, NoInfer } from "./Types.js"; +declare const TypeId: unique symbol; +/** + * @since 2.0.0 + * @category symbol + */ +export type TypeId = typeof TypeId; +/** + * @since 2.0.0 + * @category models + */ +export interface SortedSet extends Iterable, Equal.Equal, Pipeable, Inspectable { + readonly [TypeId]: { + readonly _A: Invariant; + }; +} +/** + * @since 2.0.0 + * @category refinements + */ +export declare const isSortedSet: { + /** + * @since 2.0.0 + * @category refinements + */ + (u: Iterable): u is SortedSet; + /** + * @since 2.0.0 + * @category refinements + */ + (u: unknown): u is SortedSet; +}; +/** + * @since 2.0.0 + * @category constructors + */ +export declare const empty: (O: Order) => SortedSet; +/** + * Creates a new `SortedSet` from an iterable collection of values. + * + * @since 2.0.0 + * @category constructors + */ +export declare const fromIterable: { + /** + * Creates a new `SortedSet` from an iterable collection of values. + * + * @since 2.0.0 + * @category constructors + */ + (ord: Order): (iterable: Iterable) => SortedSet; + /** + * Creates a new `SortedSet` from an iterable collection of values. + * + * @since 2.0.0 + * @category constructors + */ + (iterable: Iterable, ord: Order): SortedSet; +}; +/** + * @since 2.0.0 + * @category constructors + */ +export declare const make: (ord: Order) => >(...entries: Entries) => SortedSet; +/** + * @since 2.0.0 + * @category elements + */ +export declare const add: { + /** + * @since 2.0.0 + * @category elements + */ + (value: A): (self: SortedSet) => SortedSet; + /** + * @since 2.0.0 + * @category elements + */ + (self: SortedSet, value: A): SortedSet; +}; +/** + * @since 2.0.0 + */ +export declare const difference: { + /** + * @since 2.0.0 + */ + (that: Iterable): (self: SortedSet) => SortedSet; + /** + * @since 2.0.0 + */ + (self: SortedSet, that: Iterable): SortedSet; +}; +/** + * Check if a predicate holds true for every `SortedSet` element. + * + * @since 2.0.0 + * @category elements + */ +export declare const every: { + /** + * Check if a predicate holds true for every `SortedSet` element. + * + * @since 2.0.0 + * @category elements + */ + (predicate: Predicate): (self: SortedSet) => boolean; + /** + * Check if a predicate holds true for every `SortedSet` element. + * + * @since 2.0.0 + * @category elements + */ + (self: SortedSet, predicate: Predicate): boolean; +}; +/** + * @since 2.0.0 + * @category filtering + */ +export declare const filter: { + /** + * @since 2.0.0 + * @category filtering + */ + (predicate: Predicate): (self: SortedSet) => SortedSet; + /** + * @since 2.0.0 + * @category filtering + */ + (self: SortedSet, predicate: Predicate): SortedSet; +}; +/** + * @since 2.0.0 + * @category sequencing + */ +export declare const flatMap: { + /** + * @since 2.0.0 + * @category sequencing + */ + (O: Order, f: (a: A) => Iterable): (self: SortedSet) => SortedSet; + /** + * @since 2.0.0 + * @category sequencing + */ + (self: SortedSet, O: Order, f: (a: A) => Iterable): SortedSet; +}; +/** + * @since 2.0.0 + * @category traversing + */ +export declare const forEach: { + /** + * @since 2.0.0 + * @category traversing + */ + (f: (a: A) => void): (self: SortedSet) => void; + /** + * @since 2.0.0 + * @category traversing + */ + (self: SortedSet, f: (a: A) => void): void; +}; +/** + * @since 2.0.0 + * @category elements + */ +export declare const has: { + /** + * @since 2.0.0 + * @category elements + */ + (value: A): (self: SortedSet) => boolean; + /** + * @since 2.0.0 + * @category elements + */ + (self: SortedSet, value: A): boolean; +}; +/** + * @since 2.0.0 + */ +export declare const intersection: { + /** + * @since 2.0.0 + */ + (that: Iterable): (self: SortedSet) => SortedSet; + /** + * @since 2.0.0 + */ + (self: SortedSet, that: Iterable): SortedSet; +}; +/** + * @since 2.0.0 + * @category elements + */ +export declare const isSubset: { + /** + * @since 2.0.0 + * @category elements + */ + (that: SortedSet): (self: SortedSet) => boolean; + /** + * @since 2.0.0 + * @category elements + */ + (self: SortedSet, that: SortedSet): boolean; +}; +/** + * @since 2.0.0 + * @category mapping + */ +export declare const map: { + /** + * @since 2.0.0 + * @category mapping + */ + (O: Order, f: (a: A) => B): (self: SortedSet) => SortedSet; + /** + * @since 2.0.0 + * @category mapping + */ + (self: SortedSet, O: Order, f: (a: A) => B): SortedSet; +}; +/** + * @since 2.0.0 + * @category filtering + */ +export declare const partition: { + /** + * @since 2.0.0 + * @category filtering + */ + (predicate: (a: NoInfer) => boolean): (self: SortedSet) => [excluded: SortedSet, satisfying: SortedSet]; + /** + * @since 2.0.0 + * @category filtering + */ + (self: SortedSet, predicate: (a: A) => boolean): [excluded: SortedSet, satisfying: SortedSet]; +}; +/** + * @since 2.0.0 + * @category elements + */ +export declare const remove: { + /** + * @since 2.0.0 + * @category elements + */ + (value: A): (self: SortedSet) => SortedSet; + /** + * @since 2.0.0 + * @category elements + */ + (self: SortedSet, value: A): SortedSet; +}; +/** + * @since 2.0.0 + * @category getters + */ +export declare const size: (self: SortedSet) => number; +/** + * Check if a predicate holds true for some `SortedSet` element. + * + * @since 2.0.0 + * @category elements + */ +export declare const some: { + /** + * Check if a predicate holds true for some `SortedSet` element. + * + * @since 2.0.0 + * @category elements + */ + (predicate: Predicate): (self: SortedSet) => boolean; + /** + * Check if a predicate holds true for some `SortedSet` element. + * + * @since 2.0.0 + * @category elements + */ + (self: SortedSet, predicate: Predicate): boolean; +}; +/** + * @since 2.0.0 + * @category elements + */ +export declare const toggle: { + /** + * @since 2.0.0 + * @category elements + */ + (value: A): (self: SortedSet) => SortedSet; + /** + * @since 2.0.0 + * @category elements + */ + (self: SortedSet, value: A): SortedSet; +}; +/** + * @since 2.0.0 + */ +export declare const union: { + /** + * @since 2.0.0 + */ + (that: Iterable): (self: SortedSet) => SortedSet; + /** + * @since 2.0.0 + */ + (self: SortedSet, that: Iterable): SortedSet; +}; +/** + * @since 2.0.0 + * @category getters + */ +export declare const values: (self: SortedSet) => IterableIterator; +/** + * @since 2.0.0 + * @category equivalence + */ +export declare const getEquivalence: () => Equivalence.Equivalence>; +export {}; +//# sourceMappingURL=SortedSet.d.ts.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/StreamHaltStrategy.d.ts b/backend/node_modules/effect/dist/dts/StreamHaltStrategy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ea66ae15ce756072d282b52de557fa1d5864396b --- /dev/null +++ b/backend/node_modules/effect/dist/dts/StreamHaltStrategy.d.ts @@ -0,0 +1,116 @@ +/** + * @since 2.0.0 + * @category models + */ +export type HaltStrategy = Left | Right | Both | Either; +/** + * @since 2.0.0 + * @category models + */ +export type HaltStrategyInput = HaltStrategy | "left" | "right" | "both" | "either"; +/** + * @since 2.0.0 + * @category models + */ +export interface Left { + readonly _tag: "Left"; +} +/** + * @since 2.0.0 + * @category models + */ +export interface Right { + readonly _tag: "Right"; +} +/** + * @since 2.0.0 + * @category models + */ +export interface Both { + readonly _tag: "Both"; +} +/** + * @since 2.0.0 + * @category models + */ +export interface Either { + readonly _tag: "Either"; +} +/** + * @since 2.0.0 + * @category constructors + */ +export declare const Left: HaltStrategy; +/** + * @since 2.0.0 + * @category constructors + */ +export declare const Right: HaltStrategy; +/** + * @since 2.0.0 + * @category constructors + */ +export declare const Both: HaltStrategy; +/** + * @since 2.0.0 + * @category constructors + */ +export declare const Either: HaltStrategy; +/** + * @since 2.0.0 + * @category constructors + */ +export declare const fromInput: (input: HaltStrategyInput) => HaltStrategy; +/** + * @since 2.0.0 + * @category refinements + */ +export declare const isLeft: (self: HaltStrategy) => self is Left; +/** + * @since 2.0.0 + * @category refinements + */ +export declare const isRight: (self: HaltStrategy) => self is Right; +/** + * @since 2.0.0 + * @category refinements + */ +export declare const isBoth: (self: HaltStrategy) => self is Both; +/** + * @since 2.0.0 + * @category refinements + */ +export declare const isEither: (self: HaltStrategy) => self is Either; +/** + * Folds over the specified `HaltStrategy` using the provided case functions. + * + * @since 2.0.0 + * @category folding + */ +export declare const match: { + /** + * Folds over the specified `HaltStrategy` using the provided case functions. + * + * @since 2.0.0 + * @category folding + */ + (options: { + readonly onLeft: () => Z; + readonly onRight: () => Z; + readonly onBoth: () => Z; + readonly onEither: () => Z; + }): (self: HaltStrategy) => Z; + /** + * Folds over the specified `HaltStrategy` using the provided case functions. + * + * @since 2.0.0 + * @category folding + */ + (self: HaltStrategy, options: { + readonly onLeft: () => Z; + readonly onRight: () => Z; + readonly onBoth: () => Z; + readonly onEither: () => Z; + }): Z; +}; +//# sourceMappingURL=StreamHaltStrategy.d.ts.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/TArray.d.ts.map b/backend/node_modules/effect/dist/dts/TArray.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..f79d7074038d09bcd11328c90e79989a0f505f58 --- /dev/null +++ b/backend/node_modules/effect/dist/dts/TArray.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TArray.d.ts","sourceRoot":"","sources":["../../src/TArray.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,KAAK,KAAK,GAAG,MAAM,UAAU,CAAA;AAEpC,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAA;AAExC;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,OAAO,MAA8B,CAAA;AAEhE;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAA;AAE9C;;;GAGG;AACH,MAAM,WAAW,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAE,SAAQ,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;CAAG;AAU/D;;GAEG;AACH,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B;;;OAGG;IACH,UAAiB,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;QAChC,QAAQ,CAAC,CAAC,YAAY,CAAC,EAAE;YACvB,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA;SAChC,CAAA;KACF;CACF;AAED;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,EAAE;IACzB;;;;;;OAMG;IACH,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,GAA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E,CAAC,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;IACrG;;;;;OAKG;IACH,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;CAC7E,CAAA"} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/TSet.d.ts b/backend/node_modules/effect/dist/dts/TSet.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..cd5c91281b05e31bebd88ca78b771e2560c3402c --- /dev/null +++ b/backend/node_modules/effect/dist/dts/TSet.d.ts @@ -0,0 +1,564 @@ +/** + * @since 2.0.0 + */ +import type * as Chunk from "./Chunk.js"; +import type * as HashSet from "./HashSet.js"; +import type * as Option from "./Option.js"; +import type { Predicate } from "./Predicate.js"; +import type * as STM from "./STM.js"; +import type * as Types from "./Types.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export declare const TSetTypeId: unique symbol; +/** + * @since 2.0.0 + * @category symbols + */ +export type TSetTypeId = typeof TSetTypeId; +/** + * Transactional set implemented on top of `TMap`. + * + * @since 2.0.0 + * @category models + */ +export interface TSet extends TSet.Variance { +} +/** + * @since 2.0.0 + */ +export declare namespace TSet { + /** + * @since 2.0.0 + * @category models + */ + interface Variance { + readonly [TSetTypeId]: { + readonly _A: Types.Invariant; + }; + } +} +/** + * Stores new element in the set. + * + * @since 2.0.0 + * @category mutations + */ +export declare const add: { + /** + * Stores new element in the set. + * + * @since 2.0.0 + * @category mutations + */ + (value: A): (self: TSet) => STM.STM; + /** + * Stores new element in the set. + * + * @since 2.0.0 + * @category mutations + */ + (self: TSet, value: A): STM.STM; +}; +/** + * Atomically transforms the set into the difference of itself and the + * provided set. + * + * @since 2.0.0 + * @category mutations + */ +export declare const difference: { + /** + * Atomically transforms the set into the difference of itself and the + * provided set. + * + * @since 2.0.0 + * @category mutations + */ + (other: TSet): (self: TSet) => STM.STM; + /** + * Atomically transforms the set into the difference of itself and the + * provided set. + * + * @since 2.0.0 + * @category mutations + */ + (self: TSet, other: TSet): STM.STM; +}; +/** + * Makes an empty `TSet`. + * + * @since 2.0.0 + * @category constructors + */ +export declare const empty: () => STM.STM>; +/** + * Atomically performs transactional-effect for each element in set. + * + * @since 2.0.0 + * @category elements + */ +export declare const forEach: { + /** + * Atomically performs transactional-effect for each element in set. + * + * @since 2.0.0 + * @category elements + */ + (f: (value: A) => STM.STM): (self: TSet) => STM.STM; + /** + * Atomically performs transactional-effect for each element in set. + * + * @since 2.0.0 + * @category elements + */ + (self: TSet, f: (value: A) => STM.STM): STM.STM; +}; +/** + * Creates a new `TSet` from an iterable collection of values. + * + * @since 2.0.0 + * @category constructors + */ +export declare const fromIterable: (iterable: Iterable) => STM.STM>; +/** + * Tests whether or not set contains an element. + * + * @since 2.0.0 + * @category elements + */ +export declare const has: { + /** + * Tests whether or not set contains an element. + * + * @since 2.0.0 + * @category elements + */ + (value: A): (self: TSet) => STM.STM; + /** + * Tests whether or not set contains an element. + * + * @since 2.0.0 + * @category elements + */ + (self: TSet, value: A): STM.STM; +}; +/** + * Atomically transforms the set into the intersection of itself and the + * provided set. + * + * @since 2.0.0 + * @category mutations + */ +export declare const intersection: { + /** + * Atomically transforms the set into the intersection of itself and the + * provided set. + * + * @since 2.0.0 + * @category mutations + */ + (other: TSet): (self: TSet) => STM.STM; + /** + * Atomically transforms the set into the intersection of itself and the + * provided set. + * + * @since 2.0.0 + * @category mutations + */ + (self: TSet, other: TSet): STM.STM; +}; +/** + * Tests if the set is empty or not + * + * @since 2.0.0 + * @category getters + */ +export declare const isEmpty: (self: TSet) => STM.STM; +/** + * Makes a new `TSet` that is initialized with specified values. + * + * @since 2.0.0 + * @category constructors + */ +export declare const make: >(...elements: Elements) => STM.STM>; +/** + * Atomically folds using a pure function. + * + * @since 2.0.0 + * @category folding + */ +export declare const reduce: { + /** + * Atomically folds using a pure function. + * + * @since 2.0.0 + * @category folding + */ + (zero: Z, f: (accumulator: Z, value: A) => Z): (self: TSet) => STM.STM; + /** + * Atomically folds using a pure function. + * + * @since 2.0.0 + * @category folding + */ + (self: TSet, zero: Z, f: (accumulator: Z, value: A) => Z): STM.STM; +}; +/** + * Atomically folds using a transactional function. + * + * @since 2.0.0 + * @category folding + */ +export declare const reduceSTM: { + /** + * Atomically folds using a transactional function. + * + * @since 2.0.0 + * @category folding + */ + (zero: Z, f: (accumulator: Z, value: A) => STM.STM): (self: TSet) => STM.STM; + /** + * Atomically folds using a transactional function. + * + * @since 2.0.0 + * @category folding + */ + (self: TSet, zero: Z, f: (accumulator: Z, value: A) => STM.STM): STM.STM; +}; +/** + * Removes a single element from the set. + * + * @since 2.0.0 + * @category mutations + */ +export declare const remove: { + /** + * Removes a single element from the set. + * + * @since 2.0.0 + * @category mutations + */ + (value: A): (self: TSet) => STM.STM; + /** + * Removes a single element from the set. + * + * @since 2.0.0 + * @category mutations + */ + (self: TSet, value: A): STM.STM; +}; +/** + * Removes elements from the set. + * + * @since 2.0.0 + * @category mutations + */ +export declare const removeAll: { + /** + * Removes elements from the set. + * + * @since 2.0.0 + * @category mutations + */ + (iterable: Iterable): (self: TSet) => STM.STM; + /** + * Removes elements from the set. + * + * @since 2.0.0 + * @category mutations + */ + (self: TSet, iterable: Iterable): STM.STM; +}; +/** + * Removes entries from a `TSet` that satisfy the specified predicate and returns the removed entries + * (or `void` if `discard = true`). + * + * @since 2.0.0 + * @category mutations + */ +export declare const removeIf: { + /** + * Removes entries from a `TSet` that satisfy the specified predicate and returns the removed entries + * (or `void` if `discard = true`). + * + * @since 2.0.0 + * @category mutations + */ + (predicate: Predicate, options: { + readonly discard: true; + }): (self: TSet) => STM.STM; + /** + * Removes entries from a `TSet` that satisfy the specified predicate and returns the removed entries + * (or `void` if `discard = true`). + * + * @since 2.0.0 + * @category mutations + */ + (predicate: Predicate, options?: { + readonly discard: false; + }): (self: TSet) => STM.STM>; + /** + * Removes entries from a `TSet` that satisfy the specified predicate and returns the removed entries + * (or `void` if `discard = true`). + * + * @since 2.0.0 + * @category mutations + */ + (self: TSet, predicate: Predicate, options: { + readonly discard: true; + }): STM.STM; + /** + * Removes entries from a `TSet` that satisfy the specified predicate and returns the removed entries + * (or `void` if `discard = true`). + * + * @since 2.0.0 + * @category mutations + */ + (self: TSet, predicate: Predicate, options?: { + readonly discard: false; + }): STM.STM>; +}; +/** + * Retains entries in a `TSet` that satisfy the specified predicate and returns the removed entries + * (or `void` if `discard = true`). + * + * @since 2.0.0 + * @category mutations + */ +export declare const retainIf: { + /** + * Retains entries in a `TSet` that satisfy the specified predicate and returns the removed entries + * (or `void` if `discard = true`). + * + * @since 2.0.0 + * @category mutations + */ + (predicate: Predicate, options: { + readonly discard: true; + }): (self: TSet) => STM.STM; + /** + * Retains entries in a `TSet` that satisfy the specified predicate and returns the removed entries + * (or `void` if `discard = true`). + * + * @since 2.0.0 + * @category mutations + */ + (predicate: Predicate, options?: { + readonly discard: false; + }): (self: TSet) => STM.STM>; + /** + * Retains entries in a `TSet` that satisfy the specified predicate and returns the removed entries + * (or `void` if `discard = true`). + * + * @since 2.0.0 + * @category mutations + */ + (self: TSet, predicate: Predicate, options: { + readonly discard: true; + }): STM.STM; + /** + * Retains entries in a `TSet` that satisfy the specified predicate and returns the removed entries + * (or `void` if `discard = true`). + * + * @since 2.0.0 + * @category mutations + */ + (self: TSet, predicate: Predicate, options?: { + readonly discard: false; + }): STM.STM>; +}; +/** + * Returns the set's cardinality. + * + * @since 2.0.0 + * @category getters + */ +export declare const size: (self: TSet) => STM.STM; +/** + * Takes the first matching value, or retries until there is one. + * + * @since 2.0.0 + * @category mutations + */ +export declare const takeFirst: { + /** + * Takes the first matching value, or retries until there is one. + * + * @since 2.0.0 + * @category mutations + */ + (pf: (a: A) => Option.Option): (self: TSet) => STM.STM; + /** + * Takes the first matching value, or retries until there is one. + * + * @since 2.0.0 + * @category mutations + */ + (self: TSet, pf: (a: A) => Option.Option): STM.STM; +}; +/** + * Takes the first matching value, or retries until there is one. + * + * @since 2.0.0 + * @category mutations + */ +export declare const takeFirstSTM: { + /** + * Takes the first matching value, or retries until there is one. + * + * @since 2.0.0 + * @category mutations + */ + (pf: (a: A) => STM.STM, R>): (self: TSet) => STM.STM; + /** + * Takes the first matching value, or retries until there is one. + * + * @since 2.0.0 + * @category mutations + */ + (self: TSet, pf: (a: A) => STM.STM, R>): STM.STM; +}; +/** + * Takes all matching values, or retries until there is at least one. + * + * @since 2.0.0 + * @category mutations + */ +export declare const takeSome: { + /** + * Takes all matching values, or retries until there is at least one. + * + * @since 2.0.0 + * @category mutations + */ + (pf: (a: A) => Option.Option): (self: TSet) => STM.STM<[B, ...Array]>; + /** + * Takes all matching values, or retries until there is at least one. + * + * @since 2.0.0 + * @category mutations + */ + (self: TSet, pf: (a: A) => Option.Option): STM.STM<[B, ...Array]>; +}; +/** + * Takes all matching values, or retries until there is at least one. + * + * @since 2.0.0 + * @category mutations + */ +export declare const takeSomeSTM: { + /** + * Takes all matching values, or retries until there is at least one. + * + * @since 2.0.0 + * @category mutations + */ + (pf: (a: A) => STM.STM, R>): (self: TSet) => STM.STM<[B, ...Array], E, R>; + /** + * Takes all matching values, or retries until there is at least one. + * + * @since 2.0.0 + * @category mutations + */ + (self: TSet, pf: (a: A) => STM.STM, R>): STM.STM<[B, ...Array], E, R>; +}; +/** + * Collects all elements into a `Chunk`. + * + * @since 2.0.0 + * @category destructors + */ +export declare const toChunk: (self: TSet) => STM.STM>; +/** + * Collects all elements into a `HashSet`. + * + * @since 2.0.0 + * @category destructors + */ +export declare const toHashSet: (self: TSet) => STM.STM>; +/** + * Collects all elements into a `Array`. + * + * @since 2.0.0 + * @category destructors + */ +export declare const toArray: (self: TSet) => STM.STM>; +/** + * Collects all elements into a `ReadonlySet`. + * + * @since 2.0.0 + * @category destructors + */ +export declare const toReadonlySet: (self: TSet) => STM.STM>; +/** + * Atomically updates all elements using a pure function. + * + * @since 2.0.0 + * @category mutations + */ +export declare const transform: { + /** + * Atomically updates all elements using a pure function. + * + * @since 2.0.0 + * @category mutations + */ + (f: (a: A) => A): (self: TSet) => STM.STM; + /** + * Atomically updates all elements using a pure function. + * + * @since 2.0.0 + * @category mutations + */ + (self: TSet, f: (a: A) => A): STM.STM; +}; +/** + * Atomically updates all elements using a transactional function. + * + * @since 2.0.0 + * @category mutations + */ +export declare const transformSTM: { + /** + * Atomically updates all elements using a transactional function. + * + * @since 2.0.0 + * @category mutations + */ + (f: (a: A) => STM.STM): (self: TSet) => STM.STM; + /** + * Atomically updates all elements using a transactional function. + * + * @since 2.0.0 + * @category mutations + */ + (self: TSet, f: (a: A) => STM.STM): STM.STM; +}; +/** + * Atomically transforms the set into the union of itself and the provided + * set. + * + * @since 2.0.0 + * @category mutations + */ +export declare const union: { + /** + * Atomically transforms the set into the union of itself and the provided + * set. + * + * @since 2.0.0 + * @category mutations + */ + (other: TSet): (self: TSet) => STM.STM; + /** + * Atomically transforms the set into the union of itself and the provided + * set. + * + * @since 2.0.0 + * @category mutations + */ + (self: TSet, other: TSet): STM.STM; +}; +//# sourceMappingURL=TSet.d.ts.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/Tracer.d.ts b/backend/node_modules/effect/dist/dts/Tracer.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3dabd0783269f80295facb6412363ecfbebac31d --- /dev/null +++ b/backend/node_modules/effect/dist/dts/Tracer.d.ts @@ -0,0 +1,152 @@ +/** + * @since 2.0.0 + */ +import type * as Context from "./Context.js"; +import type * as Effect from "./Effect.js"; +import type * as Exit from "./Exit.js"; +import type * as Fiber from "./Fiber.js"; +import type { LazyArg } from "./Function.js"; +import type * as Option from "./Option.js"; +/** + * @since 2.0.0 + */ +export declare const TracerTypeId: unique symbol; +/** + * @since 2.0.0 + */ +export type TracerTypeId = typeof TracerTypeId; +/** + * @since 2.0.0 + */ +export interface Tracer { + readonly [TracerTypeId]: TracerTypeId; + span(name: string, parent: Option.Option, context: Context.Context, links: ReadonlyArray, startTime: bigint, kind: SpanKind, options?: SpanOptions): Span; + context(f: () => X, fiber: Fiber.RuntimeFiber): X; +} +/** + * @since 2.0.0 + * @category models + */ +export type SpanStatus = { + _tag: "Started"; + startTime: bigint; +} | { + _tag: "Ended"; + startTime: bigint; + endTime: bigint; + exit: Exit.Exit; +}; +/** + * @since 2.0.0 + * @category models + */ +export type AnySpan = Span | ExternalSpan; +/** + * @since 2.0.0 + * @category tags + */ +export interface ParentSpan { + readonly _: unique symbol; +} +/** + * @since 2.0.0 + * @category tags + */ +export declare const ParentSpan: Context.Tag; +/** + * @since 2.0.0 + * @category models + */ +export interface ExternalSpan { + readonly _tag: "ExternalSpan"; + readonly spanId: string; + readonly traceId: string; + readonly sampled: boolean; + readonly context: Context.Context; +} +/** + * @since 3.1.0 + * @category models + */ +export interface SpanOptions { + readonly attributes?: Record | undefined; + readonly links?: ReadonlyArray | undefined; + readonly parent?: AnySpan | undefined; + readonly root?: boolean | undefined; + readonly context?: Context.Context | undefined; + readonly kind?: SpanKind | undefined; + readonly captureStackTrace?: boolean | LazyArg | undefined; +} +/** + * @since 3.1.0 + * @category models + */ +export type SpanKind = "internal" | "server" | "client" | "producer" | "consumer"; +/** + * @since 2.0.0 + * @category models + */ +export interface Span { + readonly _tag: "Span"; + readonly name: string; + readonly spanId: string; + readonly traceId: string; + readonly parent: Option.Option; + readonly context: Context.Context; + readonly status: SpanStatus; + readonly attributes: ReadonlyMap; + readonly links: ReadonlyArray; + readonly sampled: boolean; + readonly kind: SpanKind; + end(endTime: bigint, exit: Exit.Exit): void; + attribute(key: string, value: unknown): void; + event(name: string, startTime: bigint, attributes?: Record): void; + addLinks(links: ReadonlyArray): void; +} +/** + * @since 2.0.0 + * @category models + */ +export interface SpanLink { + readonly _tag: "SpanLink"; + readonly span: AnySpan; + readonly attributes: Readonly>; +} +/** + * @since 2.0.0 + * @category tags + */ +export declare const Tracer: Context.Tag; +/** + * @since 2.0.0 + * @category constructors + */ +export declare const make: (options: Omit) => Tracer; +/** + * @since 2.0.0 + * @category constructors + */ +export declare const externalSpan: (options: { + readonly spanId: string; + readonly traceId: string; + readonly sampled?: boolean | undefined; + readonly context?: Context.Context | undefined; +}) => ExternalSpan; +/** + * @since 2.0.0 + * @category constructors + */ +export declare const tracerWith: (f: (tracer: Tracer) => Effect.Effect) => Effect.Effect; +/** + * @since 3.12.0 + * @category annotations + */ +export interface DisablePropagation { + readonly _: unique symbol; +} +/** + * @since 3.12.0 + * @category annotations + */ +export declare const DisablePropagation: Context.Reference; +//# sourceMappingURL=Tracer.d.ts.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/Unify.d.ts.map b/backend/node_modules/effect/dist/dts/Unify.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..0aeb66bdcc9df396bfcc8152f89ca86367389ec9 --- /dev/null +++ b/backend/node_modules/effect/dist/dts/Unify.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Unify.d.ts","sourceRoot":"","sources":["../../src/Unify.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,WAAW,EAAE,OAAO,MAAM,CAAA;AAE/C;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAA;AAE5C;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,MAAM,UAAU,EAAE,OAAO,MAAM,CAAA;AAE9C;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAA;AAE1C;;GAEG;AACH,MAAM,CAAC,O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CAAA;IACvD;;OAEG;IACH,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;CACF,CAAA"} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/dts/index.d.ts.map b/backend/node_modules/effect/dist/dts/index.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..82747d6d75cc24fc71322fb22ba42811b2257752 --- /dev/null +++ b/backend/node_modules/effect/dist/dts/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO;AACL;;GAEG;AACH,MAAM;AACN;;GAEG;AACH,IAAI;AACJ;;GAEG;AACH,IAAI;AACJ;;GAEG;AACH,QAAQ;AACR;;GAEG;AACH,IAAI;AACJ;;GAEG;AACH,YAAY,EACb,MAAM,eAAe,CAAA;AAEtB;;GAEG;AACH,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAE3C;;;;GAIG;AACH,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AAEnC;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAE7C;;;;;;;;;GASG;AACH,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAErC;;;;;;GAMG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAEvC;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AAEnC;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AAEnC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AAEnC;;GAEG;AACH,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAEvC;;GAEG;AACH,OAAO,KAAK,qBAAqB,MAAM,4BAA4B,CAAA;AAEnE;;GAEG;AACH,OAAO,KAA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Y,CAAA;AAEnC;;GAEG;AACH,OAAO,KAAK,mBAAmB,MAAM,0BAA0B,CAAA;AAE/D;;GAEG;AACH,OAAO,KAAK,oBAAoB,MAAM,2BAA2B,CAAA;AAEjE;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA"} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Arbitrary.js b/backend/node_modules/effect/dist/esm/Arbitrary.js new file mode 100644 index 0000000000000000000000000000000000000000..abb782827aefa153c9af91b9b538e102ffdb4f3a --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Arbitrary.js @@ -0,0 +1,798 @@ +/** + * @since 3.10.0 + */ +import * as Arr from "./Array.js"; +import * as FastCheck from "./FastCheck.js"; +import { globalValue } from "./GlobalValue.js"; +import * as errors_ from "./internal/schema/errors.js"; +import * as schemaId_ from "./internal/schema/schemaId.js"; +import * as util_ from "./internal/schema/util.js"; +import * as Option from "./Option.js"; +import * as Predicate from "./Predicate.js"; +import * as SchemaAST from "./SchemaAST.js"; +/** + * Returns a LazyArbitrary for the `A` type of the provided schema. + * + * @category arbitrary + * @since 3.10.0 + */ +export const makeLazy = schema => { + const description = getDescription(schema.ast, []); + return go(description, { + maxDepth: 2 + }); +}; +/** + * Returns a fast-check Arbitrary for the `A` type of the provided schema. + * + * @category arbitrary + * @since 3.10.0 + */ +export const make = schema => makeLazy(schema)(FastCheck); +/** @internal */ +export const makeStringConstraints = options => { + const out = { + _tag: "StringConstraints", + constraints: {} + }; + if (Predicate.isNumber(options.minLength)) { + out.constraints.minLength = options.minLength; + } + if (Predicate.isNumber(options.maxLength)) { + out.constraints.maxLength = options.maxLength; + } + if (Predicate.isString(options.pattern)) { + out.pattern = options.pattern; + } + return out; +}; +/** @internal */ +export const makeNumberConstraints = options => { + const out = { + _tag: "NumberConstraints", + constraints: {}, + isInteger: options.isInteger ?? false + }; + if (Predicate.isNumber(options.min)) { + out.constraints.min = Math.fround(options.min); + } + if (Predicate.isBoolean(options.minExcluded)) { + out.constraints.minExcluded = options.minExcluded; + } + if (Predicate.isNumber(options.max)) { + out.constraints.max = Math.fround(options.max); + } + if (Predicate.isBoolean(options.maxExcluded)) { + out.constraints.maxExcluded = options.maxExcluded; + } + if (Predicate.isBoolean(options.noNaN)) { + out.constraints.noNaN = options.noNaN; + } + if (Predicate.isBoolean(options.noDefaultInfinity)) { + out.constraints.noDefaultInfinity = options.noDefaultInfinity; + } + return out; +}; +/** @internal */ +export const makeBigIntConstraints = options => { + const out = { + _tag: "BigIntConstraints", + constraints: {} + }; + if (Predicate.isBigInt(options.min)) { + out.constraints.min = options.min; + } + if (Predicate.isBigInt(options.max)) { + out.constraints.max = options.max; + } + return out; +}; +/** @internal */ +export const makeArrayConstraints = options => { + const out = { + _tag: "ArrayConstraints", + constraints: {} + }; + if (Predicate.isNumber(options.minLength)) { + out.constraints.minLength = options.minLength; + } + if (Predicate.isNumber(options.maxLength)) { + out.constraints.maxLength = options.maxLength; + } + return out; +}; +/** @internal */ +export const makeDateConstraints = options => { + const out = { + _tag: "DateConstraints", + constraints: {} + }; + if (Predicate.isDate(options.min)) { + out.constraints.min = options.min; + } + if (Predicate.isDate(options.max)) { + out.constraints.max = options.max; + } + if (Predicate.isBoolean(options.noInvalidDate)) { + out.constraints.noInvalidDate = options.noInvalidDate; + } + return out; +}; +const getArbitraryAnnotation = /*#__PURE__*/SchemaAST.getAnnotation(SchemaAST.ArbitraryAnnotationId); +const getASTConstraints = ast => { + const TypeAnnotationId = ast.annotations[SchemaAST.SchemaIdAnnotationId]; + if (Predicate.isPropertyKey(TypeAnnotationId)) { + const out = ast.annotations[TypeAnnotationId]; + if (Predicate.isReadonlyRecord(out)) { + return out; + } + } +}; +const idMemoMap = /*#__PURE__*/globalValue(/*#__PURE__*/Symbol.for("effect/Arbitrary/IdMemoMap"), () => new Map()); +let counter = 0; +function wrapGetDescription(f, g) { + return (ast, path) => f(ast, g(ast, path)); +} +function parseMeta(ast) { + const jsonSchema = SchemaAST.getJSONSchemaAnnotation(ast).pipe(Option.filter(Predicate.isReadonlyRecord), Option.getOrUndefined); + const schemaId = Option.getOrElse(SchemaAST.getSchemaIdAnnotation(ast), () => undefined); + const schemaParams = Option.fromNullable(schemaId).pipe(Option.map(id => ast.annotations[id]), Option.filter(Predicate.isReadonlyRecord), Option.getOrUndefined); + return [schemaId, { + ...schemaParams, + ...jsonSchema + }]; +} +/** @internal */ +export const getDescription = /*#__PURE__*/wrapGetDescription((ast, description) => { + const annotation = getArbitraryAnnotation(ast); + if (Option.isSome(annotation)) { + return { + ...description, + annotations: [...description.annotations, annotation.value] + }; + } + return description; +}, (ast, path) => { + const [schemaId, meta] = parseMeta(ast); + switch (ast._tag) { + case "Refinement": + { + const from = getDescription(ast.from, path); + switch (from._tag) { + case "StringKeyword": + return { + ...from, + constraints: [...from.constraints, makeStringConstraints(meta)], + refinements: [...from.refinements, ast] + }; + case "NumberKeyword": + { + const c = schemaId === schemaId_.NonNaNSchemaId ? makeNumberConstraints({ + noNaN: true + }) : schemaId === schemaId_.FiniteSchemaId || schemaId === schemaId_.JsonNumberSchemaId ? makeNumberConstraints({ + noDefaultInfinity: true, + noNaN: true + }) : makeNumberConstraints({ + isInteger: "type" in meta && meta.type === "integer", + noNaN: undefined, + noDefaultInfinity: undefined, + min: meta.exclusiveMinimum ?? meta.minimum, + minExcluded: "exclusiveMinimum" in meta ? true : undefined, + max: meta.exclusiveMaximum ?? meta.maximum, + maxExcluded: "exclusiveMaximum" in meta ? true : undefined + }); + return { + ...from, + constraints: [...from.constraints, c], + refinements: [...from.refinements, ast] + }; + } + case "BigIntKeyword": + { + const c = getASTConstraints(ast); + return { + ...from, + constraints: c !== undefined ? [...from.constraints, makeBigIntConstraints(c)] : from.constraints, + refinements: [...from.refinements, ast] + }; + } + case "TupleType": + return { + ...from, + constraints: [...from.constraints, makeArrayConstraints({ + minLength: meta.minItems, + maxLength: meta.maxItems + })], + refinements: [...from.refinements, ast] + }; + case "DateFromSelf": + return { + ...from, + constraints: [...from.constraints, makeDateConstraints(meta)], + refinements: [...from.refinements, ast] + }; + default: + return { + ...from, + refinements: [...from.refinements, ast] + }; + } + } + case "Declaration": + { + if (schemaId === schemaId_.DateFromSelfSchemaId) { + return { + _tag: "DateFromSelf", + constraints: [makeDateConstraints(meta)], + path, + refinements: [], + annotations: [] + }; + } + return { + _tag: "Declaration", + typeParameters: ast.typeParameters.map(ast => getDescription(ast, path)), + path, + refinements: [], + annotations: [], + ast + }; + } + case "Literal": + { + return { + _tag: "Literal", + literal: ast.literal, + path, + refinements: [], + annotations: [] + }; + } + case "UniqueSymbol": + { + return { + _tag: "UniqueSymbol", + symbol: ast.symbol, + path, + refinements: [], + annotations: [] + }; + } + case "Enums": + { + return { + _tag: "Enums", + enums: ast.enums, + path, + refinements: [], + annotations: [], + ast + }; + } + case "TemplateLiteral": + { + return { + _tag: "TemplateLiteral", + head: ast.head, + spans: ast.spans.map(span => ({ + description: getDescription(span.type, path), + literal: span.literal + })), + path, + refinements: [], + annotations: [] + }; + } + case "StringKeyword": + return { + _tag: "StringKeyword", + constraints: [], + path, + refinements: [], + annotations: [] + }; + case "NumberKeyword": + return { + _tag: "NumberKeyword", + constraints: [], + path, + refinements: [], + annotations: [] + }; + case "BigIntKeyword": + return { + _tag: "BigIntKeyword", + constraints: [], + path, + refinements: [], + annotations: [] + }; + case "TupleType": + return { + _tag: "TupleType", + constraints: [], + elements: ast.elements.map((element, i) => ({ + isOptional: element.isOptional, + description: getDescription(element.type, [...path, i]) + })), + rest: ast.rest.map((element, i) => getDescription(element.type, [...path, i])), + path, + refinements: [], + annotations: [] + }; + case "TypeLiteral": + return { + _tag: "TypeLiteral", + propertySignatures: ast.propertySignatures.map(ps => ({ + isOptional: ps.isOptional, + name: ps.name, + value: getDescription(ps.type, [...path, ps.name]) + })), + indexSignatures: ast.indexSignatures.map(is => ({ + parameter: getDescription(is.parameter, path), + value: getDescription(is.type, path) + })), + path, + refinements: [], + annotations: [] + }; + case "Union": + return { + _tag: "Union", + members: ast.types.map((member, i) => getDescription(member, [...path, i])), + path, + refinements: [], + annotations: [] + }; + case "Suspend": + { + const memoId = idMemoMap.get(ast); + if (memoId !== undefined) { + return { + _tag: "Ref", + id: memoId, + ast, + path, + refinements: [], + annotations: [] + }; + } + counter++; + const id = `__id-${counter}__`; + idMemoMap.set(ast, id); + return { + _tag: "Suspend", + id, + ast, + description: () => getDescription(ast.f(), path), + path, + refinements: [], + annotations: [] + }; + } + case "Transformation": + return getDescription(ast.to, path); + case "NeverKeyword": + return { + _tag: "NeverKeyword", + path, + refinements: [], + annotations: [], + ast + }; + default: + { + return { + _tag: "Keyword", + value: ast._tag, + path, + refinements: [], + annotations: [] + }; + } + } +}); +function getMax(n1, n2) { + return n1 === undefined ? n2 : n2 === undefined ? n1 : n1 <= n2 ? n2 : n1; +} +function getMin(n1, n2) { + return n1 === undefined ? n2 : n2 === undefined ? n1 : n1 <= n2 ? n1 : n2; +} +const getOr = (a, b) => { + return a === undefined ? b : b === undefined ? a : a || b; +}; +function mergePattern(pattern1, pattern2) { + if (pattern1 === undefined) { + return pattern2; + } + if (pattern2 === undefined) { + return pattern1; + } + return `(?:${pattern1})|(?:${pattern2})`; +} +function mergeStringConstraints(c1, c2) { + return makeStringConstraints({ + minLength: getMax(c1.constraints.minLength, c2.constraints.minLength), + maxLength: getMin(c1.constraints.maxLength, c2.constraints.maxLength), + pattern: mergePattern(c1.pattern, c2.pattern) + }); +} +function buildStringConstraints(description) { + return description.constraints.length === 0 ? undefined : description.constraints.reduce(mergeStringConstraints); +} +function mergeNumberConstraints(c1, c2) { + return makeNumberConstraints({ + isInteger: c1.isInteger || c2.isInteger, + min: getMax(c1.constraints.min, c2.constraints.min), + minExcluded: getOr(c1.constraints.minExcluded, c2.constraints.minExcluded), + max: getMin(c1.constraints.max, c2.constraints.max), + maxExcluded: getOr(c1.constraints.maxExcluded, c2.constraints.maxExcluded), + noNaN: getOr(c1.constraints.noNaN, c2.constraints.noNaN), + noDefaultInfinity: getOr(c1.constraints.noDefaultInfinity, c2.constraints.noDefaultInfinity) + }); +} +function buildNumberConstraints(description) { + return description.constraints.length === 0 ? undefined : description.constraints.reduce(mergeNumberConstraints); +} +function mergeBigIntConstraints(c1, c2) { + return makeBigIntConstraints({ + min: getMax(c1.constraints.min, c2.constraints.min), + max: getMin(c1.constraints.max, c2.constraints.max) + }); +} +function buildBigIntConstraints(description) { + return description.constraints.length === 0 ? undefined : description.constraints.reduce(mergeBigIntConstraints); +} +function mergeDateConstraints(c1, c2) { + return makeDateConstraints({ + min: getMax(c1.constraints.min, c2.constraints.min), + max: getMin(c1.constraints.max, c2.constraints.max), + noInvalidDate: getOr(c1.constraints.noInvalidDate, c2.constraints.noInvalidDate) + }); +} +function buildDateConstraints(description) { + return description.constraints.length === 0 ? undefined : description.constraints.reduce(mergeDateConstraints); +} +const constArrayConstraints = /*#__PURE__*/makeArrayConstraints({}); +function mergeArrayConstraints(c1, c2) { + return makeArrayConstraints({ + minLength: getMax(c1.constraints.minLength, c2.constraints.minLength), + maxLength: getMin(c1.constraints.maxLength, c2.constraints.maxLength) + }); +} +function buildArrayConstraints(description) { + return description.constraints.length === 0 ? undefined : description.constraints.reduce(mergeArrayConstraints); +} +const arbitraryMemoMap = /*#__PURE__*/globalValue(/*#__PURE__*/Symbol.for("effect/Arbitrary/arbitraryMemoMap"), () => new WeakMap()); +function applyFilters(filters, arb) { + return fc => filters.reduce((arb, filter) => arb.filter(filter), arb(fc)); +} +function absurd(message) { + return () => { + throw new Error(message); + }; +} +function getContextConstraints(description) { + switch (description._tag) { + case "StringKeyword": + return buildStringConstraints(description); + case "NumberKeyword": + return buildNumberConstraints(description); + case "BigIntKeyword": + return buildBigIntConstraints(description); + case "DateFromSelf": + return buildDateConstraints(description); + case "TupleType": + return buildArrayConstraints(description); + } +} +function wrapGo(f, g) { + return (description, ctx) => f(description, ctx, g(description, ctx)); +} +const go = /*#__PURE__*/wrapGo((description, ctx, lazyArb) => { + const annotation = description.annotations[description.annotations.length - 1]; + // error handling + if (annotation === undefined) { + switch (description._tag) { + case "Declaration": + case "NeverKeyword": + throw new Error(errors_.getArbitraryMissingAnnotationErrorMessage(description.path, description.ast)); + case "Enums": + if (description.enums.length === 0) { + throw new Error(errors_.getArbitraryEmptyEnumErrorMessage(description.path)); + } + } + } + const filters = description.refinements.map(ast => a => Option.isNone(ast.filter(a, SchemaAST.defaultParseOption, ast))); + if (annotation === undefined) { + return applyFilters(filters, lazyArb); + } + const constraints = getContextConstraints(description); + if (constraints !== undefined) { + ctx = { + ...ctx, + constraints + }; + } + if (description._tag === "Declaration") { + return applyFilters(filters, annotation(...description.typeParameters.map(p => go(p, ctx)), ctx)); + } + if (description.refinements.length > 0) { + // TODO(4.0): remove the `lazyArb` parameter + return applyFilters(filters, annotation(lazyArb, ctx)); + } + return annotation(ctx); +}, (description, ctx) => { + switch (description._tag) { + case "DateFromSelf": + { + const constraints = buildDateConstraints(description); + return fc => fc.date(constraints?.constraints); + } + case "Declaration": + case "NeverKeyword": + return absurd(`BUG: cannot generate an arbitrary for ${description._tag}`); + case "Literal": + return fc => fc.constant(description.literal); + case "UniqueSymbol": + return fc => fc.constant(description.symbol); + case "Keyword": + { + switch (description.value) { + case "UndefinedKeyword": + return fc => fc.constant(undefined); + case "VoidKeyword": + case "UnknownKeyword": + case "AnyKeyword": + return fc => fc.anything(); + case "BooleanKeyword": + return fc => fc.boolean(); + case "SymbolKeyword": + return fc => fc.string().map(s => Symbol.for(s)); + case "ObjectKeyword": + return fc => fc.oneof(fc.object(), fc.array(fc.anything())); + } + } + case "Enums": + return fc => fc.oneof(...description.enums.map(([_, value]) => fc.constant(value))); + case "TemplateLiteral": + { + return fc => { + const string = fc.string({ + maxLength: 5 + }); + const number = fc.float({ + noDefaultInfinity: true, + noNaN: true + }); + const getTemplateLiteralArb = description => { + const components = description.head !== "" ? [fc.constant(description.head)] : []; + const getTemplateLiteralSpanTypeArb = description => { + switch (description._tag) { + case "StringKeyword": + return string; + case "NumberKeyword": + return number; + case "Literal": + return fc.constant(String(description.literal)); + case "Union": + return fc.oneof(...description.members.map(getTemplateLiteralSpanTypeArb)); + case "TemplateLiteral": + return getTemplateLiteralArb(description); + default: + return fc.constant(""); + } + }; + description.spans.forEach(span => { + components.push(getTemplateLiteralSpanTypeArb(span.description)); + if (span.literal !== "") { + components.push(fc.constant(span.literal)); + } + }); + return fc.tuple(...components).map(spans => spans.join("")); + }; + return getTemplateLiteralArb(description); + }; + } + case "StringKeyword": + { + const constraints = buildStringConstraints(description); + const pattern = constraints?.pattern; + return pattern !== undefined ? fc => fc.stringMatching(new RegExp(pattern)) : fc => fc.string(constraints?.constraints); + } + case "NumberKeyword": + { + const constraints = buildNumberConstraints(description); + return constraints?.isInteger ? fc => fc.integer(constraints.constraints) : fc => fc.float(constraints?.constraints); + } + case "BigIntKeyword": + { + const constraints = buildBigIntConstraints(description); + return fc => fc.bigInt(constraints?.constraints ?? {}); + } + case "TupleType": + { + const elements = []; + let hasOptionals = false; + for (const element of description.elements) { + elements.push(go(element.description, ctx)); + if (element.isOptional) { + hasOptionals = true; + } + } + const rest = description.rest.map(d => go(d, ctx)); + return fc => { + // --------------------------------------------- + // handle elements + // --------------------------------------------- + let output = fc.tuple(...elements.map(arb => arb(fc))); + if (hasOptionals) { + const indexes = fc.tuple(...description.elements.map(element => element.isOptional ? fc.boolean() : fc.constant(true))); + output = output.chain(tuple => indexes.map(booleans => { + for (const [i, b] of booleans.reverse().entries()) { + if (!b) { + tuple.splice(booleans.length - i, 1); + } + } + return tuple; + })); + } + // --------------------------------------------- + // handle rest element + // --------------------------------------------- + if (Arr.isNonEmptyReadonlyArray(rest)) { + const constraints = buildArrayConstraints(description) ?? constArrayConstraints; + const [head, ...tail] = rest; + const item = head(fc); + output = output.chain(as => { + const len = as.length; + // We must adjust the constraints for the rest element + // because the elements might have generated some values + const restArrayConstraints = subtractElementsLength(constraints.constraints, len); + if (restArrayConstraints.maxLength === 0) { + return fc.constant(as); + } + /* + `getSuspendedArray` is used to generate less values in + the context of a recursive schema. Without it, the following schema + would generate an big amount of values possibly leading to a stack + overflow: + ```ts + type A = ReadonlyArray + const schema = S.Array( + S.NullOr(S.suspend((): S.Schema => schema)) + ) + ``` + */ + const arr = ctx.depthIdentifier !== undefined ? getSuspendedArray(fc, ctx.depthIdentifier, ctx.maxDepth, item, restArrayConstraints) : fc.array(item, restArrayConstraints); + if (len === 0) { + return arr; + } + return arr.map(rest => [...as, ...rest]); + }); + // --------------------------------------------- + // handle post rest elements + // --------------------------------------------- + for (let j = 0; j < tail.length; j++) { + output = output.chain(as => tail[j](fc).map(a => [...as, a])); + } + } + return output; + }; + } + case "TypeLiteral": + { + const propertySignatures = []; + const requiredKeys = []; + for (const ps of description.propertySignatures) { + if (!ps.isOptional) { + requiredKeys.push(ps.name); + } + propertySignatures.push(go(ps.value, ctx)); + } + const indexSignatures = description.indexSignatures.map(is => [go(is.parameter, ctx), go(is.value, ctx)]); + return fc => { + const pps = {}; + for (let i = 0; i < propertySignatures.length; i++) { + const ps = description.propertySignatures[i]; + pps[ps.name] = propertySignatures[i](fc); + } + let output = fc.record(pps, { + requiredKeys + }); + // --------------------------------------------- + // handle index signatures + // --------------------------------------------- + for (let i = 0; i < indexSignatures.length; i++) { + const key = indexSignatures[i][0](fc); + const value = indexSignatures[i][1](fc); + output = output.chain(o => { + const item = fc.tuple(key, value); + /* + `getSuspendedArray` is used to generate less key/value pairs in + the context of a recursive schema. Without it, the following schema + would generate an big amount of values possibly leading to a stack + overflow: + ```ts + type A = { [_: string]: A } + const schema = S.Record({ key: S.String, value: S.suspend((): S.Schema => schema) }) + ``` + */ + const arr = ctx.depthIdentifier !== undefined ? getSuspendedArray(fc, ctx.depthIdentifier, ctx.maxDepth, item, { + maxLength: 2 + }) : fc.array(item); + return arr.map(tuples => ({ + ...Object.fromEntries(tuples), + ...o + })); + }); + } + return output; + }; + } + case "Union": + { + const members = description.members.map(member => go(member, ctx)); + return fc => fc.oneof(...members.map(arb => arb(fc))); + } + case "Suspend": + { + const memo = arbitraryMemoMap.get(description.ast); + if (memo) { + return memo; + } + if (ctx.depthIdentifier === undefined) { + ctx = { + ...ctx, + depthIdentifier: description.id + }; + } + const get = util_.memoizeThunk(() => { + return go(description.description(), ctx); + }); + const out = fc => fc.constant(null).chain(() => get()(fc)); + arbitraryMemoMap.set(description.ast, out); + return out; + } + case "Ref": + { + const memo = arbitraryMemoMap.get(description.ast); + if (memo) { + return memo; + } + throw new Error(`BUG: Ref ${JSON.stringify(description.id)} not found`); + } + } +}); +function subtractElementsLength(constraints, len) { + if (len === 0 || constraints.minLength === undefined && constraints.maxLength === undefined) { + return constraints; + } + const out = { + ...constraints + }; + if (out.minLength !== undefined) { + out.minLength = Math.max(out.minLength - len, 0); + } + if (out.maxLength !== undefined) { + out.maxLength = Math.max(out.maxLength - len, 0); + } + return out; +} +const getSuspendedArray = (fc, depthIdentifier, maxDepth, item, constraints) => { + // In the context of a recursive schema, we don't want a `maxLength` greater than 2. + // The only exception is when `minLength` is also set, in which case we set + // `maxLength` to the minimum value, which is `minLength`. + const maxLengthLimit = Math.max(2, constraints.minLength ?? 0); + if (constraints.maxLength !== undefined && constraints.maxLength > maxLengthLimit) { + constraints = { + ...constraints, + maxLength: maxLengthLimit + }; + } + return fc.oneof({ + maxDepth, + depthIdentifier + }, fc.constant([]), fc.array(item, constraints)); +}; +//# sourceMappingURL=Arbitrary.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Array.js b/backend/node_modules/effect/dist/esm/Array.js new file mode 100644 index 0000000000000000000000000000000000000000..62b415fe9ee4ca67fdcd6bb01bf73cdbd05b58db --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Array.js @@ -0,0 +1,2703 @@ +/** + * This module provides utility functions for working with arrays in TypeScript. + * + * @since 2.0.0 + */ +import * as Either from "./Either.js"; +import * as Equal from "./Equal.js"; +import * as Equivalence from "./Equivalence.js"; +import { dual, identity } from "./Function.js"; +import * as internalArray from "./internal/array.js"; +import * as internalDoNotation from "./internal/doNotation.js"; +import * as moduleIterable from "./Iterable.js"; +import * as Option from "./Option.js"; +import * as Order from "./Order.js"; +import * as Predicate from "./Predicate.js"; +import * as Record from "./Record.js"; +import * as Tuple from "./Tuple.js"; +/** + * Builds a `NonEmptyArray` from an non-empty collection of elements. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.make(1, 2, 3) + * console.log(result) // [1, 2, 3] + * ``` + * + * @category constructors + * @since 2.0.0 + */ +export const make = (...elements) => elements; +/** + * Creates a new `Array` of the specified length. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.allocate(3) + * console.log(result) // [ <3 empty items> ] + * ``` + * + * @category constructors + * @since 2.0.0 + */ +export const allocate = n => new Array(n); +/** + * Return a `NonEmptyArray` of length `n` with element `i` initialized with `f(i)`. + * + * **Note**. `n` is normalized to an integer >= 1. + * + * **Example** + * + * ```ts + * import { makeBy } from "effect/Array" + * + * const result = makeBy(5, n => n * 2) + * console.log(result) // [0, 2, 4, 6, 8] + * ``` + * + * @category constructors + * @since 2.0.0 + */ +export const makeBy = /*#__PURE__*/dual(2, (n, f) => { + const max = Math.max(1, Math.floor(n)); + const out = new Array(max); + for (let i = 0; i < max; i++) { + out[i] = f(i); + } + return out; +}); +/** + * Return a `NonEmptyArray` containing a range of integers, including both endpoints. + * + * **Example** + * + * ```ts + * import { range } from "effect/Array" + * + * const result = range(1, 3) + * console.log(result) // [1, 2, 3] + * ``` + * + * @category constructors + * @since 2.0.0 + */ +export const range = (start, end) => start <= end ? makeBy(end - start + 1, i => start + i) : [start]; +/** + * Return a `NonEmptyArray` containing a value repeated the specified number of times. + * + * **Note**. `n` is normalized to an integer >= 1. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.replicate("a", 3) + * console.log(result) // ["a", "a", "a"] + * ``` + * + * @category constructors + * @since 2.0.0 + */ +export const replicate = /*#__PURE__*/dual(2, (a, n) => makeBy(n, () => a)); +/** + * Creates a new `Array` from an iterable collection of values. + * If the input is already an array, it returns the input as-is. + * Otherwise, it converts the iterable collection to an array. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.fromIterable(new Set([1, 2, 3])) + * console.log(result) // [1, 2, 3] + * ``` + * + * @category constructors + * @since 2.0.0 + */ +export const fromIterable = collection => Array.isArray(collection) ? collection : Array.from(collection); +/** + * Creates a new `Array` from a value that might not be an iterable. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * console.log(Array.ensure("a")) // ["a"] + * console.log(Array.ensure(["a"])) // ["a"] + * console.log(Array.ensure(["a", "b", "c"])) // ["a", "b", "c"] + * ``` + * + * @category constructors + * @since 3.3.0 + */ +export const ensure = self => Array.isArray(self) ? self : [self]; +/** + * Takes a record and returns an array of tuples containing its keys and values. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.fromRecord({ a: 1, b: 2, c: 3 }) + * console.log(result) // [["a", 1], ["b", 2], ["c", 3]] + * ``` + * + * @category conversions + * @since 2.0.0 + */ +export const fromRecord = Record.toEntries; +/** + * Converts an `Option` to an array. + * + * **Example** + * + * ```ts + * import { Array, Option } from "effect" + * + * console.log(Array.fromOption(Option.some(1))) // [1] + * console.log(Array.fromOption(Option.none())) // [] + * ``` + * + * @category conversions + * @since 2.0.0 + */ +export const fromOption = Option.toArray; +/** + * Matches the elements of an array, applying functions to cases of empty and non-empty arrays. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const match = Array.match({ + * onEmpty: () => "empty", + * onNonEmpty: ([head, ...tail]) => `head: ${head}, tail: ${tail.length}` + * }) + * console.log(match([])) // "empty" + * console.log(match([1, 2, 3])) // "head: 1, tail: 2" + * ``` + * + * @category pattern matching + * @since 2.0.0 + */ +export const match = /*#__PURE__*/dual(2, (self, { + onEmpty, + onNonEmpty +}) => isNonEmptyReadonlyArray(self) ? onNonEmpty(self) : onEmpty()); +/** + * Matches the elements of an array from the left, applying functions to cases of empty and non-empty arrays. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const matchLeft = Array.matchLeft({ + * onEmpty: () => "empty", + * onNonEmpty: (head, tail) => `head: ${head}, tail: ${tail.length}` + * }) + * console.log(matchLeft([])) // "empty" + * console.log(matchLeft([1, 2, 3])) // "head: 1, tail: 2" + * ``` + * + * @category pattern matching + * @since 2.0.0 + */ +export const matchLeft = /*#__PURE__*/dual(2, (self, { + onEmpty, + onNonEmpty +}) => isNonEmptyReadonlyArray(self) ? onNonEmpty(headNonEmpty(self), tailNonEmpty(self)) : onEmpty()); +/** + * Matches the elements of an array from the right, applying functions to cases of empty and non-empty arrays. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const matchRight = Array.matchRight({ + * onEmpty: () => "empty", + * onNonEmpty: (init, last) => `init: ${init.length}, last: ${last}` + * }) + * console.log(matchRight([])) // "empty" + * console.log(matchRight([1, 2, 3])) // "init: 2, last: 3" + * ``` + * + * @category pattern matching + * @since 2.0.0 + */ +export const matchRight = /*#__PURE__*/dual(2, (self, { + onEmpty, + onNonEmpty +}) => isNonEmptyReadonlyArray(self) ? onNonEmpty(initNonEmpty(self), lastNonEmpty(self)) : onEmpty()); +/** + * Prepend an element to the front of an `Iterable`, creating a new `NonEmptyArray`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.prepend([2, 3, 4], 1) + * console.log(result) // [1, 2, 3, 4] + * ``` + * + * @category concatenating + * @since 2.0.0 + */ +export const prepend = /*#__PURE__*/dual(2, (self, head) => [head, ...self]); +/** + * Prepends the specified prefix array (or iterable) to the beginning of the specified array (or iterable). + * If either array is non-empty, the result is also a non-empty array. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.prependAll([2, 3], [0, 1]) + * console.log(result) // [0, 1, 2, 3] + * ``` + * + * @category concatenating + * @since 2.0.0 + */ +export const prependAll = /*#__PURE__*/dual(2, (self, that) => fromIterable(that).concat(fromIterable(self))); +/** + * Append an element to the end of an `Iterable`, creating a new `NonEmptyArray`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.append([1, 2, 3], 4); + * console.log(result) // [1, 2, 3, 4] + * ``` + * + * @category concatenating + * @since 2.0.0 + */ +export const append = /*#__PURE__*/dual(2, (self, last) => [...self, last]); +/** + * Concatenates two arrays (or iterables), combining their elements. + * If either array is non-empty, the result is also a non-empty array. + * + * @category concatenating + * @since 2.0.0 + */ +export const appendAll = /*#__PURE__*/dual(2, (self, that) => fromIterable(self).concat(fromIterable(that))); +/** + * Accumulates values from an `Iterable` starting from the left, storing + * each intermediate result in an array. Useful for tracking the progression of + * a value through a series of transformations. + * + * **Example** + * + * ```ts + * import { Array } from "effect"; + * + * const result = Array.scan([1, 2, 3, 4], 0, (acc, value) => acc + value) + * console.log(result) // [0, 1, 3, 6, 10] + * + * // Explanation: + * // This function starts with the initial value (0 in this case) + * // and adds each element of the array to this accumulator one by one, + * // keeping track of the cumulative sum after each addition. + * // Each of these sums is captured in the resulting array. + * ``` + * + * @category folding + * @since 2.0.0 + */ +export const scan = /*#__PURE__*/dual(3, (self, b, f) => { + const out = [b]; + let i = 0; + for (const a of self) { + out[i + 1] = f(out[i], a); + i++; + } + return out; +}); +/** + * Accumulates values from an `Iterable` starting from the right, storing + * each intermediate result in an array. Useful for tracking the progression of + * a value through a series of transformations. + * + * **Example** + * + * ```ts + * import { Array } from "effect"; + * + * const result = Array.scanRight([1, 2, 3, 4], 0, (acc, value) => acc + value) + * console.log(result) // [10, 9, 7, 4, 0] + * ``` + * + * @category folding + * @since 2.0.0 + */ +export const scanRight = /*#__PURE__*/dual(3, (self, b, f) => { + const input = fromIterable(self); + const out = new Array(input.length + 1); + out[input.length] = b; + for (let i = input.length - 1; i >= 0; i--) { + out[i] = f(out[i + 1], input[i]); + } + return out; +}); +/** + * Determine if `unknown` is an Array. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * console.log(Array.isArray(null)) // false + * console.log(Array.isArray([1, 2, 3])) // true + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isArray = Array.isArray; +/** + * Determine if an `Array` is empty narrowing down the type to `[]`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * console.log(Array.isEmptyArray([])) // true + * console.log(Array.isEmptyArray([1, 2, 3])) // false + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isEmptyArray = self => self.length === 0; +/** + * Determine if a `ReadonlyArray` is empty narrowing down the type to `readonly []`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * console.log(Array.isEmptyReadonlyArray([])) // true + * console.log(Array.isEmptyReadonlyArray([1, 2, 3])) // false + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isEmptyReadonlyArray = isEmptyArray; +/** + * Determine if an `Array` is non empty narrowing down the type to `NonEmptyArray`. + * + * An `Array` is considered to be a `NonEmptyArray` if it contains at least one element. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * console.log(Array.isNonEmptyArray([])) // false + * console.log(Array.isNonEmptyArray([1, 2, 3])) // true + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isNonEmptyArray = internalArray.isNonEmptyArray; +/** + * Determine if a `ReadonlyArray` is non empty narrowing down the type to `NonEmptyReadonlyArray`. + * + * A `ReadonlyArray` is considered to be a `NonEmptyReadonlyArray` if it contains at least one element. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * console.log(Array.isNonEmptyReadonlyArray([])) // false + * console.log(Array.isNonEmptyReadonlyArray([1, 2, 3])) // true + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isNonEmptyReadonlyArray = internalArray.isNonEmptyArray; +/** + * Return the number of elements in a `ReadonlyArray`. + * + * @category getters + * @since 2.0.0 + */ +export const length = self => self.length; +const isOutOfBounds = (i, as) => i < 0 || i >= as.length; +const clamp = (i, as) => Math.floor(Math.min(Math.max(0, i), as.length)); +/** + * This function provides a safe way to read a value at a particular index from a `ReadonlyArray`. + * + * @category getters + * @since 2.0.0 + */ +export const get = /*#__PURE__*/dual(2, (self, index) => { + const i = Math.floor(index); + return isOutOfBounds(i, self) ? Option.none() : Option.some(self[i]); +}); +/** + * Gets an element unsafely, will throw on out of bounds. + * + * @since 2.0.0 + * @category unsafe + */ +export const unsafeGet = /*#__PURE__*/dual(2, (self, index) => { + const i = Math.floor(index); + if (isOutOfBounds(i, self)) { + throw new Error(`Index ${i} out of bounds`); + } + return self[i]; +}); +/** + * Return a tuple containing the first element, and a new `Array` of the remaining elements, if any. + * + * **Example** + * + * ```ts + * import { Array } from "effect"; + * + * const result = Array.unprepend([1, 2, 3, 4]) + * console.log(result) // [1, [2, 3, 4]] + * ``` + * + * @category splitting + * @since 2.0.0 + */ +export const unprepend = self => [headNonEmpty(self), tailNonEmpty(self)]; +/** + * Return a tuple containing a copy of the `NonEmptyReadonlyArray` without its last element, and that last element. + * + * **Example** + * + * ```ts + * import { Array } from "effect"; + * + * const result = Array.unappend([1, 2, 3, 4]) + * console.log(result) // [[1, 2, 3], 4] + * ``` + * + * @category splitting + * @since 2.0.0 + */ +export const unappend = self => [initNonEmpty(self), lastNonEmpty(self)]; +/** + * Get the first element of a `ReadonlyArray`, or `None` if the `ReadonlyArray` is empty. + * + * @category getters + * @since 2.0.0 + */ +export const head = /*#__PURE__*/get(0); +/** + * Get the first element of a non empty array. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.headNonEmpty([1, 2, 3, 4]) + * console.log(result) // 1 + * ``` + * + * @category getters + * @since 2.0.0 + */ +export const headNonEmpty = /*#__PURE__*/unsafeGet(0); +/** + * Get the last element in a `ReadonlyArray`, or `None` if the `ReadonlyArray` is empty. + * + * @category getters + * @since 2.0.0 + */ +export const last = self => isNonEmptyReadonlyArray(self) ? Option.some(lastNonEmpty(self)) : Option.none(); +/** + * Get the last element of a non empty array. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.lastNonEmpty([1, 2, 3, 4]) + * console.log(result) // 4 + * ``` + * + * @category getters + * @since 2.0.0 + */ +export const lastNonEmpty = self => self[self.length - 1]; +/** + * Get all but the first element of an `Iterable`, creating a new `Array`, or `None` if the `Iterable` is empty. + * + * @category getters + * @since 2.0.0 + */ +export const tail = self => { + const input = fromIterable(self); + return isNonEmptyReadonlyArray(input) ? Option.some(tailNonEmpty(input)) : Option.none(); +}; +/** + * Get all but the first element of a `NonEmptyReadonlyArray`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.tailNonEmpty([1, 2, 3, 4]) + * console.log(result) // [2, 3, 4] + * ``` + * + * @category getters + * @since 2.0.0 + */ +export const tailNonEmpty = self => self.slice(1); +/** + * Get all but the last element of an `Iterable`, creating a new `Array`, or `None` if the `Iterable` is empty. + * + * @category getters + * @since 2.0.0 + */ +export const init = self => { + const input = fromIterable(self); + return isNonEmptyReadonlyArray(input) ? Option.some(initNonEmpty(input)) : Option.none(); +}; +/** + * Get all but the last element of a non empty array, creating a new array. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.initNonEmpty([1, 2, 3, 4]) + * console.log(result) // [1, 2, 3] + * ``` + * + * @category getters + * @since 2.0.0 + */ +export const initNonEmpty = self => self.slice(0, -1); +/** + * Keep only a max number of elements from the start of an `Iterable`, creating a new `Array`. + * + * **Note**. `n` is normalized to a non negative integer. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.take([1, 2, 3, 4, 5], 3) + * console.log(result) // [1, 2, 3] + * ``` + * + * @category getters + * @since 2.0.0 + */ +export const take = /*#__PURE__*/dual(2, (self, n) => { + const input = fromIterable(self); + return input.slice(0, clamp(n, input)); +}); +/** + * Keep only a max number of elements from the end of an `Iterable`, creating a new `Array`. + * + * **Note**. `n` is normalized to a non negative integer. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.takeRight([1, 2, 3, 4, 5], 3) + * console.log(result) // [3, 4, 5] + * ``` + * + * @category getters + * @since 2.0.0 + */ +export const takeRight = /*#__PURE__*/dual(2, (self, n) => { + const input = fromIterable(self); + const i = clamp(n, input); + return i === 0 ? [] : input.slice(-i); +}); +/** + * Calculate the longest initial subarray for which all element satisfy the specified predicate, creating a new `Array`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.takeWhile([1, 3, 2, 4, 1, 2], x => x < 4) + * console.log(result) // [1, 3, 2] + * + * // Explanation: + * // - The function starts with the first element (`1`), which is less than `4`, so it adds `1` to the result. + * // - The next element (`3`) is also less than `4`, so it adds `3`. + * // - The next element (`2`) is again less than `4`, so it adds `2`. + * // - The function then encounters `4`, which is not less than `4`. At this point, it stops checking further elements and finalizes the result. + * ``` + * + * @category getters + * @since 2.0.0 + */ +export const takeWhile = /*#__PURE__*/dual(2, (self, predicate) => { + let i = 0; + const out = []; + for (const a of self) { + if (!predicate(a, i)) { + break; + } + out.push(a); + i++; + } + return out; +}); +const spanIndex = (self, predicate) => { + let i = 0; + for (const a of self) { + if (!predicate(a, i)) { + break; + } + i++; + } + return i; +}; +/** + * Split an `Iterable` into two parts: + * + * 1. the longest initial subarray for which all elements satisfy the specified predicate + * 2. the remaining elements + * + * @category splitting + * @since 2.0.0 + */ +export const span = /*#__PURE__*/dual(2, (self, predicate) => splitAt(self, spanIndex(self, predicate))); +/** + * Drop a max number of elements from the start of an `Iterable`, creating a new `Array`. + * + * **Note**. `n` is normalized to a non negative integer. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.drop([1, 2, 3, 4, 5], 2) + * console.log(result) // [3, 4, 5] + * ``` + * + * @category getters + * @since 2.0.0 + */ +export const drop = /*#__PURE__*/dual(2, (self, n) => { + const input = fromIterable(self); + return input.slice(clamp(n, input), input.length); +}); +/** + * Drop a max number of elements from the end of an `Iterable`, creating a new `Array`. + * + * **Note**. `n` is normalized to a non negative integer. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.dropRight([1, 2, 3, 4, 5], 2) + * console.log(result) // [1, 2, 3] + * ``` + * + * @category getters + * @since 2.0.0 + */ +export const dropRight = /*#__PURE__*/dual(2, (self, n) => { + const input = fromIterable(self); + return input.slice(0, input.length - clamp(n, input)); +}); +/** + * Remove the longest initial subarray for which all element satisfy the specified predicate, creating a new `Array`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.dropWhile([1, 2, 3, 4, 5], x => x < 4) + * console.log(result) // [4, 5] + * ``` + * + * @category getters + * @since 2.0.0 + */ +export const dropWhile = /*#__PURE__*/dual(2, (self, predicate) => fromIterable(self).slice(spanIndex(self, predicate))); +/** + * Return the first index for which a predicate holds. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.findFirstIndex([5, 3, 8, 9], x => x > 5) + * console.log(result) // Option.some(2) + * ``` + * + * @category elements + * @since 2.0.0 + */ +export const findFirstIndex = /*#__PURE__*/dual(2, (self, predicate) => { + let i = 0; + for (const a of self) { + if (predicate(a, i)) { + return Option.some(i); + } + i++; + } + return Option.none(); +}); +/** + * Return the last index for which a predicate holds. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.findLastIndex([1, 3, 8, 9], x => x < 5) + * console.log(result) // Option.some(1) + * ``` + * + * @category elements + * @since 2.0.0 + */ +export const findLastIndex = /*#__PURE__*/dual(2, (self, predicate) => { + const input = fromIterable(self); + for (let i = input.length - 1; i >= 0; i--) { + if (predicate(input[i], i)) { + return Option.some(i); + } + } + return Option.none(); +}); +/** + * Returns the first element that satisfies the specified + * predicate, or `None` if no such element exists. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.findFirst([1, 2, 3, 4, 5], x => x > 3) + * console.log(result) // Option.some(4) + * ``` + * + * @category elements + * @since 2.0.0 + */ +export const findFirst = moduleIterable.findFirst; +/** + * Finds the last element in an iterable collection that satisfies the given predicate or refinement. + * Returns an `Option` containing the found element, or `Option.none` if no element matches. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.findLast([1, 2, 3, 4, 5], n => n % 2 === 0) + * console.log(result) // Option.some(4) + * ``` + * + * @category elements + * @since 2.0.0 + */ +export const findLast = /*#__PURE__*/dual(2, (self, f) => { + const input = fromIterable(self); + for (let i = input.length - 1; i >= 0; i--) { + const a = input[i]; + const o = f(a, i); + if (Predicate.isBoolean(o)) { + if (o) { + return Option.some(a); + } + } else { + if (Option.isSome(o)) { + return o; + } + } + } + return Option.none(); +}); +/** + * Returns a tuple of the first element that satisfies the specified + * predicate and its index, or `None` if no such element exists. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.findFirstWithIndex([1, 2, 3, 4, 5], x => x > 3) + * console.log(result) // Option.some([4, 3]) + * ``` + * + * @category elements + * @since 3.17.0 + */ +export const findFirstWithIndex = /*#__PURE__*/dual(2, (self, f) => { + let i = 0; + for (const a of self) { + const o = f(a, i); + if (Predicate.isBoolean(o)) { + if (o) { + return Option.some([a, i]); + } + } else { + if (Option.isSome(o)) { + return Option.some([o.value, i]); + } + } + i++; + } + return Option.none(); +}); +/** + * Counts all the element of the given array that pass the given predicate + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.countBy([1, 2, 3, 4, 5], n => n % 2 === 0) + * console.log(result) // 2 + * ``` + * + * @category folding + * @since 3.16.0 + */ +export const countBy = /*#__PURE__*/dual(2, (self, f) => { + let count = 0; + const as = fromIterable(self); + for (let i = 0; i < as.length; i++) { + const a = as[i]; + if (f(a, i)) { + count++; + } + } + return count; +}); +/** + * Insert an element at the specified index, creating a new `NonEmptyArray`, + * or return `None` if the index is out of bounds. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.insertAt(['a', 'b', 'c', 'e'], 3, 'd') + * console.log(result) // Option.some(['a', 'b', 'c', 'd', 'e']) + * ``` + * + * @since 2.0.0 + */ +export const insertAt = /*#__PURE__*/dual(3, (self, i, b) => { + const out = Array.from(self); + // v--- `= self.length` is ok, it means inserting in last position + if (i < 0 || i > out.length) { + return Option.none(); + } + out.splice(i, 0, b); + return Option.some(out); +}); +/** + * Change the element at the specified index, creating a new `Array`, + * or return a copy of the input if the index is out of bounds. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.replace(['a', 'b', 'c', 'd'], 1, 'z') + * console.log(result) // ['a', 'z', 'c', 'd'] + * ``` + * + * @since 2.0.0 + */ +export const replace = /*#__PURE__*/dual(3, (self, i, b) => modify(self, i, () => b)); +/** + * Replaces an element in an array with the given value, returning an option of the updated array. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.replaceOption([1, 2, 3], 1, 4) + * console.log(result) // Option.some([1, 4, 3]) + * ``` + * + * @since 2.0.0 + */ +export const replaceOption = /*#__PURE__*/dual(3, (self, i, b) => modifyOption(self, i, () => b)); +/** + * Apply a function to the element at the specified index, creating a new `Array`, + * or return a copy of the input if the index is out of bounds. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.modify([1, 2, 3, 4], 2, (n) => n * 2) + * console.log(result) // [1, 2, 6, 4] + * ``` + * + * @since 2.0.0 + */ +export const modify = /*#__PURE__*/dual(3, (self, i, f) => { + const out = Array.from(self); + if (isOutOfBounds(i, out)) { + return out; + } + const b = f(out[i]); + out[i] = b; + return out; +}); +/** + * Apply a function to the element at the specified index, creating a new `Array`, + * or return `None` if the index is out of bounds. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const input = [1, 2, 3, 4] + * const result = Array.modifyOption(input, 2, (n) => n * 2) + * console.log(result) // Option.some([1, 2, 6, 4]) + * + * const outOfBoundsResult = Array.modifyOption(input, 5, (n) => n * 2) + * console.log(outOfBoundsResult) // Option.none() + * ``` + * + * @since 2.0.0 + */ +export const modifyOption = /*#__PURE__*/dual(3, (self, i, f) => { + const arr = fromIterable(self); + if (isOutOfBounds(i, arr)) { + return Option.none(); + } + const out = Array.isArray(self) ? self.slice() : arr; + const b = f(arr[i]); + out[i] = b; + return Option.some(out); +}); +/** + * Delete the element at the specified index, creating a new `Array`, + * or return a copy of the input if the index is out of bounds. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const input = [1, 2, 3, 4] + * const result = Array.remove(input, 2) + * console.log(result) // [1, 2, 4] + * + * const outOfBoundsResult = Array.remove(input, 5) + * console.log(outOfBoundsResult) // [1, 2, 3, 4] + * ``` + * + * @since 2.0.0 + */ +export const remove = /*#__PURE__*/dual(2, (self, i) => { + const out = Array.from(self); + if (isOutOfBounds(i, out)) { + return out; + } + out.splice(i, 1); + return out; +}); +/** + * Delete the element at the specified index, creating a new `Array`, + * or return `None` if the index is out of bounds. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Array, Option } from "effect" + * + * const numbers = [1, 2, 3, 4] + * const result = Array.removeOption(numbers, 2) + * assert.deepStrictEqual(result, Option.some([1, 2, 4])) + * + * const outOfBoundsResult = Array.removeOption(numbers, 5) + * assert.deepStrictEqual(outOfBoundsResult, Option.none()) + * ``` + * + * @since 3.16.0 + */ +export const removeOption = /*#__PURE__*/dual(2, (self, i) => { + const arr = fromIterable(self); + if (isOutOfBounds(i, arr)) { + return Option.none(); + } + const out = Array.isArray(self) ? self.slice() : arr; + out.splice(i, 1); + return Option.some(out); +}); +/** + * Reverse an `Iterable`, creating a new `Array`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.reverse([1, 2, 3, 4]) + * console.log(result) // [4, 3, 2, 1] + * ``` + * + * @category elements + * @since 2.0.0 + */ +export const reverse = self => Array.from(self).reverse(); +/** + * Create a new array with elements sorted in increasing order based on the specified comparator. + * If the input is a `NonEmptyReadonlyArray`, the output will also be a `NonEmptyReadonlyArray`. + * + * @category sorting + * @since 2.0.0 + */ +export const sort = /*#__PURE__*/dual(2, (self, O) => { + const out = Array.from(self); + out.sort(O); + return out; +}); +/** + * Sorts an array based on a provided mapping function and order. The mapping + * function transforms the elements into a value that can be compared, and the + * order defines how those values should be sorted. + * + * **Example** + * + * ```ts + * import { Array, Order } from "effect" + * + * const result = Array.sortWith(["aaa", "b", "cc"], (s) => s.length, Order.number) + * console.log(result) // ["b", "cc", "aaa"] + * + * // Explanation: + * // The array of strings is sorted based on their lengths. The mapping function `(s) => s.length` + * // converts each string into its length, and the `Order.number` specifies that the lengths should + * // be sorted in ascending order. + * ``` + * + * @since 2.0.0 + * @category elements + */ +export const sortWith = /*#__PURE__*/dual(3, (self, f, order) => Array.from(self).map(a => [a, f(a)]).sort(([, a], [, b]) => order(a, b)).map(([_]) => _)); +/** + * Sorts the elements of an `Iterable` in increasing order based on the provided + * orders. The elements are compared using the first order in `orders`, then the + * second order if the first comparison is equal, and so on. + * + * **Example** + * + * ```ts + * import { Array, Order, pipe } from "effect" + * + * const users = [ + * { name: "Alice", age: 30 }, + * { name: "Bob", age: 25 }, + * { name: "Charlie", age: 30 } + * ] + * + * const result = pipe( + * users, + * Array.sortBy( + * Order.mapInput(Order.number, (user: (typeof users)[number]) => user.age), + * Order.mapInput(Order.string, (user: (typeof users)[number]) => user.name) + * ) + * ) + * + * console.log(result) + * // [ + * // { name: "Bob", age: 25 }, + * // { name: "Alice", age: 30 }, + * // { name: "Charlie", age: 30 } + * // ] + * + * // Explanation: + * // The array of users is sorted first by age in ascending order. When ages are equal, + * // the users are further sorted by name in ascending order. + * ``` + * + * @category sorting + * @since 2.0.0 + */ +export const sortBy = (...orders) => { + const sortByAll = sort(Order.combineAll(orders)); + return self => { + const input = fromIterable(self); + if (isNonEmptyReadonlyArray(input)) { + return sortByAll(input); + } + return []; + }; +}; +/** + * Takes two `Iterable`s and returns an `Array` of corresponding pairs. + * If one input `Iterable` is short, excess elements of the + * longer `Iterable` are discarded. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.zip([1, 2, 3], ['a', 'b']) + * console.log(result) // [[1, 'a'], [2, 'b']] + * ``` + * + * @category zipping + * @since 2.0.0 + */ +export const zip = /*#__PURE__*/dual(2, (self, that) => zipWith(self, that, Tuple.make)); +/** + * Apply a function to pairs of elements at the same index in two `Iterable`s, collecting the results in a new `Array`. If one + * input `Iterable` is short, excess elements of the longer `Iterable` are discarded. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.zipWith([1, 2, 3], [4, 5, 6], (a, b) => a + b) + * console.log(result) // [5, 7, 9] + * ``` + * + * @category zipping + * @since 2.0.0 + */ +export const zipWith = /*#__PURE__*/dual(3, (self, that, f) => { + const as = fromIterable(self); + const bs = fromIterable(that); + if (isNonEmptyReadonlyArray(as) && isNonEmptyReadonlyArray(bs)) { + const out = [f(headNonEmpty(as), headNonEmpty(bs))]; + const len = Math.min(as.length, bs.length); + for (let i = 1; i < len; i++) { + out[i] = f(as[i], bs[i]); + } + return out; + } + return []; +}); +/** + * This function is the inverse of `zip`. Takes an `Iterable` of pairs and return two corresponding `Array`s. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.unzip([[1, "a"], [2, "b"], [3, "c"]]) + * console.log(result) // [[1, 2, 3], ['a', 'b', 'c']] + * ``` + * + * @since 2.0.0 + */ +export const unzip = self => { + const input = fromIterable(self); + if (isNonEmptyReadonlyArray(input)) { + const fa = [input[0][0]]; + const fb = [input[0][1]]; + for (let i = 1; i < input.length; i++) { + fa[i] = input[i][0]; + fb[i] = input[i][1]; + } + return [fa, fb]; + } + return [[], []]; +}; +/** + * Places an element in between members of an `Iterable`. + * If the input is a non-empty array, the result is also a non-empty array. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.intersperse([1, 2, 3], 0) + * console.log(result) // [1, 0, 2, 0, 3] + * ``` + * + * @since 2.0.0 + */ +export const intersperse = /*#__PURE__*/dual(2, (self, middle) => { + const input = fromIterable(self); + if (isNonEmptyReadonlyArray(input)) { + const out = [headNonEmpty(input)]; + const tail = tailNonEmpty(input); + for (let i = 0; i < tail.length; i++) { + if (i < tail.length) { + out.push(middle); + } + out.push(tail[i]); + } + return out; + } + return []; +}); +/** + * Apply a function to the head, creating a new `NonEmptyReadonlyArray`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.modifyNonEmptyHead([1, 2, 3], n => n * 10) + * console.log(result) // [10, 2, 3] + * ``` + * + * @since 2.0.0 + */ +export const modifyNonEmptyHead = /*#__PURE__*/dual(2, (self, f) => [f(headNonEmpty(self)), ...tailNonEmpty(self)]); +/** + * Change the head, creating a new `NonEmptyReadonlyArray`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.setNonEmptyHead([1, 2, 3], 10) + * console.log(result) // [10, 2, 3] + * ``` + * + * @since 2.0.0 + */ +export const setNonEmptyHead = /*#__PURE__*/dual(2, (self, b) => modifyNonEmptyHead(self, () => b)); +/** + * Apply a function to the last element, creating a new `NonEmptyReadonlyArray`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.modifyNonEmptyLast([1, 2, 3], n => n * 2) + * console.log(result) // [1, 2, 6] + * ``` + * + * @since 2.0.0 + */ +export const modifyNonEmptyLast = /*#__PURE__*/dual(2, (self, f) => append(initNonEmpty(self), f(lastNonEmpty(self)))); +/** + * Change the last element, creating a new `NonEmptyReadonlyArray`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.setNonEmptyLast([1, 2, 3], 4) + * console.log(result) // [1, 2, 4] + * ``` + * + * @since 2.0.0 + */ +export const setNonEmptyLast = /*#__PURE__*/dual(2, (self, b) => modifyNonEmptyLast(self, () => b)); +/** + * Rotate an `Iterable` by `n` steps. + * If the input is a non-empty array, the result is also a non-empty array. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.rotate(['a', 'b', 'c', 'd', 'e'], 2) + * console.log(result) // [ 'd', 'e', 'a', 'b', 'c' ] + * ``` + * + * @since 2.0.0 + */ +export const rotate = /*#__PURE__*/dual(2, (self, n) => { + const input = fromIterable(self); + if (isNonEmptyReadonlyArray(input)) { + const len = input.length; + const m = Math.round(n) % len; + if (isOutOfBounds(Math.abs(m), input) || m === 0) { + return copy(input); + } + if (m < 0) { + const [f, s] = splitNonEmptyAt(input, -m); + return appendAll(s, f); + } else { + return rotate(self, m - len); + } + } + return []; +}); +/** + * Returns a function that checks if a `ReadonlyArray` contains a given value using a provided `isEquivalent` function. + * + * **Example** + * + * ```ts + * import { Array, pipe } from "effect" + * + * const isEquivalent = (a: number, b: number) => a === b + * const containsNumber = Array.containsWith(isEquivalent) + * const result = pipe([1, 2, 3, 4], containsNumber(3)) + * console.log(result) // true + * ``` + * + * @category elements + * @since 2.0.0 + */ +export const containsWith = isEquivalent => dual(2, (self, a) => { + for (const i of self) { + if (isEquivalent(a, i)) { + return true; + } + } + return false; +}); +const _equivalence = /*#__PURE__*/Equal.equivalence(); +/** + * Returns a function that checks if a `ReadonlyArray` contains a given value using the default `Equivalence`. + * + * **Example** + * + * ```ts + * import { Array, pipe } from "effect" + * + * const result = pipe(['a', 'b', 'c', 'd'], Array.contains('c')) + * console.log(result) // true + * ``` + * + * @category elements + * @since 2.0.0 + */ +export const contains = /*#__PURE__*/containsWith(_equivalence); +/** + * A useful recursion pattern for processing an `Iterable` to produce a new `Array`, often used for "chopping" up the input + * `Iterable`. Typically chop is called with some function that will consume an initial prefix of the `Iterable` and produce a + * value and the rest of the `Array`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.chop([1, 2, 3, 4, 5], (as): [number, Array] => [as[0] * 2, as.slice(1)]) + * console.log(result) // [2, 4, 6, 8, 10] + * + * // Explanation: + * // The `chopFunction` takes the first element of the array, doubles it, and then returns it along with the rest of the array. + * // The `chop` function applies this `chopFunction` recursively to the input array `[1, 2, 3, 4, 5]`, + * // resulting in a new array `[2, 4, 6, 8, 10]`. + * ``` + * + * @since 2.0.0 + */ +export const chop = /*#__PURE__*/dual(2, (self, f) => { + const input = fromIterable(self); + if (isNonEmptyReadonlyArray(input)) { + const [b, rest] = f(input); + const out = [b]; + let next = rest; + while (internalArray.isNonEmptyArray(next)) { + const [b, rest] = f(next); + out.push(b); + next = rest; + } + return out; + } + return []; +}); +/** + * Splits an `Iterable` into two segments, with the first segment containing a maximum of `n` elements. + * The value of `n` can be `0`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.splitAt([1, 2, 3, 4, 5], 3) + * console.log(result) // [[1, 2, 3], [4, 5]] + * ``` + * + * @category splitting + * @since 2.0.0 + */ +export const splitAt = /*#__PURE__*/dual(2, (self, n) => { + const input = Array.from(self); + const _n = Math.floor(n); + if (isNonEmptyReadonlyArray(input)) { + if (_n >= 1) { + return splitNonEmptyAt(input, _n); + } + return [[], input]; + } + return [input, []]; +}); +/** + * Splits a `NonEmptyReadonlyArray` into two segments, with the first segment containing a maximum of `n` elements. + * The value of `n` must be `>= 1`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.splitNonEmptyAt(["a", "b", "c", "d", "e"], 3) + * console.log(result) // [["a", "b", "c"], ["d", "e"]] + * ``` + * + * @category splitting + * @since 2.0.0 + */ +export const splitNonEmptyAt = /*#__PURE__*/dual(2, (self, n) => { + const _n = Math.max(1, Math.floor(n)); + return _n >= self.length ? [copy(self), []] : [prepend(self.slice(1, _n), headNonEmpty(self)), self.slice(_n)]; +}); +/** + * Splits this iterable into `n` equally sized arrays. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.split([1, 2, 3, 4, 5, 6, 7, 8], 3) + * console.log(result) // [[1, 2, 3], [4, 5, 6], [7, 8]] + * ``` + * + * @since 2.0.0 + * @category splitting + */ +export const split = /*#__PURE__*/dual(2, (self, n) => { + const input = fromIterable(self); + return chunksOf(input, Math.ceil(input.length / Math.floor(n))); +}); +/** + * Splits this iterable on the first element that matches this predicate. + * Returns a tuple containing two arrays: the first one is before the match, and the second one is from the match onward. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.splitWhere([1, 2, 3, 4, 5], n => n > 3) + * console.log(result) // [[1, 2, 3], [4, 5]] + * ``` + * + * @category splitting + * @since 2.0.0 + */ +export const splitWhere = /*#__PURE__*/dual(2, (self, predicate) => span(self, (a, i) => !predicate(a, i))); +/** + * Copies an array. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.copy([1, 2, 3]) + * console.log(result) // [1, 2, 3] + * ``` + * + * @since 2.0.0 + */ +export const copy = self => self.slice(); +/** + * Pads an array. + * Returns a new array of length `n` with the elements of `array` followed by `fill` elements if `array` is shorter than `n`. + * If `array` is longer than `n`, the returned array will be a slice of `array` containing the `n` first elements of `array`. + * If `n` is less than or equal to 0, the returned array will be an empty array. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.pad([1, 2, 3], 6, 0) + * console.log(result) // [1, 2, 3, 0, 0, 0] + * ``` + * + * @since 3.8.4 + */ +export const pad = /*#__PURE__*/dual(3, (self, n, fill) => { + if (self.length >= n) { + return take(self, n); + } + return appendAll(self, makeBy(n - self.length, () => fill)); +}); +/** + * Splits an `Iterable` into length-`n` pieces. The last piece will be shorter if `n` does not evenly divide the length of + * the `Iterable`. Note that `chunksOf(n)([])` is `[]`, not `[[]]`. This is intentional, and is consistent with a recursive + * definition of `chunksOf`; it satisfies the property that + * + * ```ts skip-type-checking + * chunksOf(n)(xs).concat(chunksOf(n)(ys)) == chunksOf(n)(xs.concat(ys))) + * ``` + * + * whenever `n` evenly divides the length of `self`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.chunksOf([1, 2, 3, 4, 5], 2) + * console.log(result) // [[1, 2], [3, 4], [5]] + * + * // Explanation: + * // The `chunksOf` function takes an array of numbers `[1, 2, 3, 4, 5]` and a number `2`. + * // It splits the array into chunks of length 2. Since the array length is not evenly divisible by 2, + * // the last chunk contains the remaining elements. + * // The result is `[[1, 2], [3, 4], [5]]`. + * ``` + * + * @category splitting + * @since 2.0.0 + */ +export const chunksOf = /*#__PURE__*/dual(2, (self, n) => { + const input = fromIterable(self); + if (isNonEmptyReadonlyArray(input)) { + return chop(input, splitNonEmptyAt(n)); + } + return []; +}); +/** + * Creates sliding windows of size `n` from an `Iterable`. + * If the number of elements is less than `n` or if `n` is not greater than zero, + * an empty array is returned. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Array } from "effect" + * + * const numbers = [1, 2, 3, 4, 5] + * assert.deepStrictEqual(Array.window(numbers, 3), [[1, 2, 3], [2, 3, 4], [3, 4, 5]]) + * assert.deepStrictEqual(Array.window(numbers, 6), []) + * ``` + * + * @category splitting + * @since 3.13.2 + */ +export const window = /*#__PURE__*/dual(2, (self, n) => { + const input = fromIterable(self); + if (n > 0 && isNonEmptyReadonlyArray(input)) { + return Array.from({ + length: input.length - (n - 1) + }, (_, index) => input.slice(index, index + n)); + } + return []; +}); +/** + * Group equal, consecutive elements of a `NonEmptyReadonlyArray` into `NonEmptyArray`s using the provided `isEquivalent` function. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.groupWith(["a", "a", "b", "b", "b", "c", "a"], (x, y) => x === y) + * console.log(result) // [["a", "a"], ["b", "b", "b"], ["c"], ["a"]] + * ``` + * + * @category grouping + * @since 2.0.0 + */ +export const groupWith = /*#__PURE__*/dual(2, (self, isEquivalent) => chop(self, as => { + const h = headNonEmpty(as); + const out = [h]; + let i = 1; + for (; i < as.length; i++) { + const a = as[i]; + if (isEquivalent(a, h)) { + out.push(a); + } else { + break; + } + } + return [out, as.slice(i)]; +})); +/** + * Group equal, consecutive elements of a `NonEmptyReadonlyArray` into `NonEmptyArray`s. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.group([1, 1, 2, 2, 2, 3, 1]) + * console.log(result) // [[1, 1], [2, 2, 2], [3], [1]] + * ``` + * + * @category grouping + * @since 2.0.0 + */ +export const group = /*#__PURE__*/groupWith(/*#__PURE__*/Equal.equivalence()); +/** + * Splits an `Iterable` into sub-non-empty-arrays stored in an object, based on the result of calling a `string`-returning + * function on each element, and grouping the results according to values returned + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const people = [ + * { name: "Alice", group: "A" }, + * { name: "Bob", group: "B" }, + * { name: "Charlie", group: "A" } + * ] + * + * const result = Array.groupBy(people, person => person.group) + * console.log(result) + * // { + * // A: [{ name: "Alice", group: "A" }, { name: "Charlie", group: "A" }], + * // B: [{ name: "Bob", group: "B" }] + * // } + * ``` + * + * @category grouping + * @since 2.0.0 + */ +export const groupBy = /*#__PURE__*/dual(2, (self, f) => { + const out = {}; + for (const a of self) { + const k = f(a); + if (Object.prototype.hasOwnProperty.call(out, k)) { + out[k].push(a); + } else { + out[k] = [a]; + } + } + return out; +}); +/** + * Calculates the union of two arrays using the provided equivalence relation. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const union = Array.unionWith([1, 2], [2, 3], (a, b) => a === b) + * console.log(union) // [1, 2, 3] + * ``` + * + * @since 2.0.0 + */ +export const unionWith = /*#__PURE__*/dual(3, (self, that, isEquivalent) => { + const a = fromIterable(self); + const b = fromIterable(that); + if (isNonEmptyReadonlyArray(a)) { + if (isNonEmptyReadonlyArray(b)) { + const dedupe = dedupeWith(isEquivalent); + return dedupe(appendAll(a, b)); + } + return a; + } + return b; +}); +/** + * Creates a union of two arrays, removing duplicates. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.union([1, 2], [2, 3]) + * console.log(result) // [1, 2, 3] + * ``` + * + * @since 2.0.0 + */ +export const union = /*#__PURE__*/dual(2, (self, that) => unionWith(self, that, _equivalence)); +/** + * Creates an `Array` of unique values that are included in all given `Iterable`s using the provided `isEquivalent` function. + * The order and references of result values are determined by the first `Iterable`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }] + * const array2 = [{ id: 3 }, { id: 4 }, { id: 1 }] + * const isEquivalent = (a: { id: number }, b: { id: number }) => a.id === b.id + * const result = Array.intersectionWith(isEquivalent)(array2)(array1) + * console.log(result) // [{ id: 1 }, { id: 3 }] + * ``` + * + * @since 2.0.0 + */ +export const intersectionWith = isEquivalent => { + const has = containsWith(isEquivalent); + return dual(2, (self, that) => { + const bs = fromIterable(that); + return fromIterable(self).filter(a => has(bs, a)); + }); +}; +/** + * Creates an `Array` of unique values that are included in all given `Iterable`s. + * The order and references of result values are determined by the first `Iterable`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.intersection([1, 2, 3], [3, 4, 1]) + * console.log(result) // [1, 3] + * ``` + * + * @since 2.0.0 + */ +export const intersection = /*#__PURE__*/intersectionWith(_equivalence); +/** + * Creates a `Array` of values not included in the other given `Iterable` using the provided `isEquivalent` function. + * The order and references of result values are determined by the first `Iterable`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const array1 = [1, 2, 3] + * const array2 = [2, 3, 4] + * const difference = Array.differenceWith((a, b) => a === b)(array1, array2) + * console.log(difference) // [1] + * ``` + * + * @since 2.0.0 + */ +export const differenceWith = isEquivalent => { + const has = containsWith(isEquivalent); + return dual(2, (self, that) => { + const bs = fromIterable(that); + return fromIterable(self).filter(a => !has(bs, a)); + }); +}; +/** + * Creates a `Array` of values not included in the other given `Iterable`. + * The order and references of result values are determined by the first `Iterable`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const difference = Array.difference([1, 2, 3], [2, 3, 4]) + * console.log(difference) // [1] + * ``` + * + * @since 2.0.0 + */ +export const difference = /*#__PURE__*/differenceWith(_equivalence); +/** + * @category constructors + * @since 2.0.0 + */ +export const empty = () => []; +/** + * Constructs a new `NonEmptyArray` from the specified value. + * + * @category constructors + * @since 2.0.0 + */ +export const of = a => [a]; +/** + * @category mapping + * @since 2.0.0 + */ +export const map = /*#__PURE__*/dual(2, (self, f) => self.map(f)); +/** + * Applies a function to each element in an array and returns a new array containing the concatenated mapped elements. + * + * @category sequencing + * @since 2.0.0 + */ +export const flatMap = /*#__PURE__*/dual(2, (self, f) => { + if (isEmptyReadonlyArray(self)) { + return []; + } + const out = []; + for (let i = 0; i < self.length; i++) { + const inner = f(self[i], i); + for (let j = 0; j < inner.length; j++) { + out.push(inner[j]); + } + } + return out; +}); +/** + * Combines multiple arrays into a single array by concatenating all elements + * from each nested array. This function ensures that the structure of nested + * arrays is collapsed into a single, flat array. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.flatten([[1, 2], [], [3, 4], [], [5, 6]]) + * console.log(result) // [1, 2, 3, 4, 5, 6] + * ``` + * + * @category sequencing + * @since 2.0.0 + */ +export const flatten = /*#__PURE__*/flatMap(identity); +/** + * Applies a function to each element of the `Iterable` and filters based on the result, keeping the transformed values where the function returns `Some`. + * This method combines filtering and mapping functionalities, allowing transformations and filtering of elements based on a single function pass. + * + * **Example** + * + * ```ts + * import { Array, Option } from "effect" + * + * const evenSquares = (x: number) => x % 2 === 0 ? Option.some(x * x) : Option.none() + * + * const result = Array.filterMap([1, 2, 3, 4, 5], evenSquares); + * console.log(result) // [4, 16] + * ``` + * + * @category filtering + * @since 2.0.0 + */ +export const filterMap = /*#__PURE__*/dual(2, (self, f) => { + const as = fromIterable(self); + const out = []; + for (let i = 0; i < as.length; i++) { + const o = f(as[i], i); + if (Option.isSome(o)) { + out.push(o.value); + } + } + return out; +}); +/** + * Applies a function to each element of the array and filters based on the result, stopping when a condition is not met. + * This method combines filtering and mapping in a single pass, and short-circuits, i.e., stops processing, as soon as the function returns `None`. + * This is useful when you need to transform an array but only up to the point where a certain condition holds true. + * + * **Example** + * + * ```ts + * import { Array, Option } from "effect" + * + * const toSquareTillOdd = (x: number) => x % 2 === 0 ? Option.some(x * x) : Option.none() + * + * const result = Array.filterMapWhile([2, 4, 5], toSquareTillOdd) + * console.log(result) // [4, 16] + * ``` + * + * @category filtering + * @since 2.0.0 + */ +export const filterMapWhile = /*#__PURE__*/dual(2, (self, f) => { + let i = 0; + const out = []; + for (const a of self) { + const b = f(a, i); + if (Option.isSome(b)) { + out.push(b.value); + } else { + break; + } + i++; + } + return out; +}); +/** + * Applies a function to each element of the `Iterable`, categorizing the results into two separate arrays. + * This function is particularly useful for operations where each element can result in two possible types, + * and you want to separate these types into different collections. For instance, separating validation results + * into successes and failures. + * + * **Example** + * + * ```ts + * import { Array, Either } from "effect"; + * + * const isEven = (x: number) => x % 2 === 0 + * + * const result = Array.partitionMap([1, 2, 3, 4, 5], x => + * isEven(x) ? Either.right(x) : Either.left(x) + * ) + * console.log(result) + * // [ + * // [1, 3, 5], + * // [2, 4] + * // ] + * ``` + * + * @category filtering + * @since 2.0.0 + */ +export const partitionMap = /*#__PURE__*/dual(2, (self, f) => { + const left = []; + const right = []; + const as = fromIterable(self); + for (let i = 0; i < as.length; i++) { + const e = f(as[i], i); + if (Either.isLeft(e)) { + left.push(e.left); + } else { + right.push(e.right); + } + } + return [left, right]; +}); +/** + * Retrieves the `Some` values from an `Iterable` of `Option`s, collecting them into an array. + * + * **Example** + * + * ```ts + * import { Array, Option } from "effect" + * + * const result = Array.getSomes([Option.some(1), Option.none(), Option.some(2)]) + * console.log(result) // [1, 2] + * ``` + * + * @category filtering + * @since 2.0.0 + */ +export const getSomes = /*#__PURE__*/filterMap(identity); +/** + * Retrieves the `Left` values from an `Iterable` of `Either`s, collecting them into an array. + * + * **Example** + * + * ```ts + * import { Array, Either } from "effect" + * + * const result = Array.getLefts([Either.right(1), Either.left("err"), Either.right(2)]) + * console.log(result) // ["err"] + * ``` + * + * @category filtering + * @since 2.0.0 + */ +export const getLefts = self => { + const out = []; + for (const a of self) { + if (Either.isLeft(a)) { + out.push(a.left); + } + } + return out; +}; +/** + * Retrieves the `Right` values from an `Iterable` of `Either`s, collecting them into an array. + * + * **Example** + * + * ```ts + * import { Array, Either } from "effect" + * + * const result = Array.getRights([Either.right(1), Either.left("err"), Either.right(2)]) + * console.log(result) // [1, 2] + * ``` + * + * @category filtering + * @since 2.0.0 + */ +export const getRights = self => { + const out = []; + for (const a of self) { + if (Either.isRight(a)) { + out.push(a.right); + } + } + return out; +}; +/** + * @category filtering + * @since 2.0.0 + */ +export const filter = /*#__PURE__*/dual(2, (self, predicate) => { + const as = fromIterable(self); + const out = []; + for (let i = 0; i < as.length; i++) { + if (predicate(as[i], i)) { + out.push(as[i]); + } + } + return out; +}); +/** + * Separate elements based on a predicate that also exposes the index of the element. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.partition([1, 2, 3, 4], n => n % 2 === 0) + * console.log(result) // [[1, 3], [2, 4]] + * ``` + * + * @category filtering + * @since 2.0.0 + */ +export const partition = /*#__PURE__*/dual(2, (self, predicate) => { + const left = []; + const right = []; + const as = fromIterable(self); + for (let i = 0; i < as.length; i++) { + if (predicate(as[i], i)) { + right.push(as[i]); + } else { + left.push(as[i]); + } + } + return [left, right]; +}); +/** + * Separates an `Iterable` into two arrays based on a predicate. + * + * @category filtering + * @since 2.0.0 + */ +export const separate = /*#__PURE__*/partitionMap(identity); +/** + * Reduces an array from the left. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.reduce([1, 2, 3], 0, (acc, n) => acc + n) + * console.log(result) // 6 + * ``` + * + * @category folding + * @since 2.0.0 + */ +export const reduce = /*#__PURE__*/dual(3, (self, b, f) => fromIterable(self).reduce((b, a, i) => f(b, a, i), b)); +/** + * Reduces an array from the right. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.reduceRight([1, 2, 3], 0, (acc, n) => acc + n) + * console.log(result) // 6 + * ``` + * + * @category folding + * @since 2.0.0 + */ +export const reduceRight = /*#__PURE__*/dual(3, (self, b, f) => fromIterable(self).reduceRight((b, a, i) => f(b, a, i), b)); +/** + * Lifts a predicate into an array. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const isEven = (n: number) => n % 2 === 0 + * const to = Array.liftPredicate(isEven) + * console.log(to(1)) // [] + * console.log(to(2)) // [2] + * ``` + * + * @category lifting + * @since 2.0.0 + */ +export const liftPredicate = predicate => b => predicate(b) ? [b] : []; +/** + * @category lifting + * @since 2.0.0 + */ +export const liftOption = f => (...a) => fromOption(f(...a)); +/** + * @category conversions + * @since 2.0.0 + */ +export const fromNullable = a => a == null ? empty() : [a]; +/** + * @category lifting + * @since 2.0.0 + */ +export const liftNullable = f => (...a) => fromNullable(f(...a)); +/** + * Maps over an array and flattens the result, removing null and undefined values. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.flatMapNullable([1, 2, 3], n => (n % 2 === 0 ? null : n)) + * console.log(result) // [1, 3] + * + * // Explanation: + * // The array of numbers [1, 2, 3] is mapped with a function that returns null for even numbers + * // and the number itself for odd numbers. The resulting array [1, null, 3] is then flattened + * // to remove null values, resulting in [1, 3]. + * ``` + * + * @category sequencing + * @since 2.0.0 + */ +export const flatMapNullable = /*#__PURE__*/dual(2, (self, f) => flatMap(self, a => fromNullable(f(a)))); +/** + * Lifts a function that returns an `Either` into a function that returns an array. + * If the `Either` is a left, it returns an empty array. + * If the `Either` is a right, it returns an array with the right value. + * + * **Example** + * + * ```ts + * import { Array, Either } from "effect" + * + * const parseNumber = (s: string): Either.Either => + * isNaN(Number(s)) ? Either.left(new Error("Not a number")) : Either.right(Number(s)) + * + * const liftedParseNumber = Array.liftEither(parseNumber) + * + * const result1 = liftedParseNumber("42") + * console.log(result1) // [42] + * + * const result2 = liftedParseNumber("not a number") + * console.log(result2) // [] + * + * // Explanation: + * // The function parseNumber is lifted to return an array. + * // When parsing "42", it returns an Either.left with the number 42, resulting in [42]. + * // When parsing "not a number", it returns an Either.right with an error, resulting in an empty array []. + * ``` + * + * @category lifting + * @since 2.0.0 + */ +export const liftEither = f => (...a) => { + const e = f(...a); + return Either.isLeft(e) ? [] : [e.right]; +}; +/** + * Check if a predicate holds true for every `ReadonlyArray` element. + * + * @category elements + * @since 2.0.0 + */ +export const every = /*#__PURE__*/dual(2, (self, refinement) => self.every(refinement)); +/** + * Check if a predicate holds true for some `ReadonlyArray` element. + * + * @category elements + * @since 2.0.0 + */ +export const some = /*#__PURE__*/dual(2, (self, predicate) => self.some(predicate)); +/** + * Extends an array with a function that maps each subarray to a value. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.extend([1, 2, 3], as => as.length) + * console.log(result) // [3, 2, 1] + * + * // Explanation: + * // The function maps each subarray starting from each element to its length. + * // The subarrays are: [1, 2, 3], [2, 3], [3]. + * // The lengths are: 3, 2, 1. + * // Therefore, the result is [3, 2, 1]. + * ``` + * + * @since 2.0.0 + */ +export const extend = /*#__PURE__*/dual(2, (self, f) => self.map((_, i, as) => f(as.slice(i)))); +/** + * Finds the minimum element in an array based on a comparator. + * + * **Example** + * + * ```ts + * import { Array, Order } from "effect" + * + * const result = Array.min([3, 1, 2], Order.number) + * console.log(result) // 1 + * ``` + * + * @since 2.0.0 + */ +export const min = /*#__PURE__*/dual(2, (self, O) => self.reduce(Order.min(O))); +/** + * Finds the maximum element in an array based on a comparator. + * + * **Example** + * + * ```ts + * import { Array, Order } from "effect" + * + * const result = Array.max([3, 1, 2], Order.number) + * console.log(result) // 3 + * ``` + * + * @since 2.0.0 + */ +export const max = /*#__PURE__*/dual(2, (self, O) => self.reduce(Order.max(O))); +/** + * @category constructors + * @since 2.0.0 + */ +export const unfold = (b, f) => { + const out = []; + let next = b; + let o; + while (Option.isSome(o = f(next))) { + const [a, b] = o.value; + out.push(a); + next = b; + } + return out; +}; +/** + * This function creates and returns a new `Order` for an array of values based on a given `Order` for the elements of the array. + * The returned `Order` compares two arrays by applying the given `Order` to each element in the arrays. + * If all elements are equal, the arrays are then compared based on their length. + * It is useful when you need to compare two arrays of the same type and you have a specific way of comparing each element of the array. + * + * @category instances + * @since 2.0.0 + */ +export const getOrder = Order.array; +/** + * Creates an equivalence relation for arrays. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const eq = Array.getEquivalence((a, b) => a === b) + * console.log(eq([1, 2, 3], [1, 2, 3])) // true + * ``` + * + * @category instances + * @since 2.0.0 + */ +export const getEquivalence = Equivalence.array; +/** + * Performs a side-effect for each element of the `Iterable`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * Array.forEach([1, 2, 3], n => console.log(n)) // 1, 2, 3 + * ``` + * + * @since 2.0.0 + */ +export const forEach = /*#__PURE__*/dual(2, (self, f) => fromIterable(self).forEach((a, i) => f(a, i))); +/** + * Remove duplicates from an `Iterable` using the provided `isEquivalent` function, + * preserving the order of the first occurrence of each element. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.dedupeWith([1, 2, 2, 3, 3, 3], (a, b) => a === b) + * console.log(result) // [1, 2, 3] + * ``` + * + * @since 2.0.0 + */ +export const dedupeWith = /*#__PURE__*/dual(2, (self, isEquivalent) => { + const input = fromIterable(self); + if (isNonEmptyReadonlyArray(input)) { + const out = [headNonEmpty(input)]; + const rest = tailNonEmpty(input); + for (const r of rest) { + if (out.every(a => !isEquivalent(r, a))) { + out.push(r); + } + } + return out; + } + return []; +}); +/** + * Remove duplicates from an `Iterable`, preserving the order of the first occurrence of each element. + * The equivalence used to compare elements is provided by `Equal.equivalence()` from the `Equal` module. + * + * @since 2.0.0 + */ +export const dedupe = self => dedupeWith(self, Equal.equivalence()); +/** + * Deduplicates adjacent elements that are identical using the provided `isEquivalent` function. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.dedupeAdjacentWith([1, 1, 2, 2, 3, 3], (a, b) => a === b) + * console.log(result) // [1, 2, 3] + * ``` + * + * @since 2.0.0 + */ +export const dedupeAdjacentWith = /*#__PURE__*/dual(2, (self, isEquivalent) => { + const out = []; + let lastA = Option.none(); + for (const a of self) { + if (Option.isNone(lastA) || !isEquivalent(a, lastA.value)) { + out.push(a); + lastA = Option.some(a); + } + } + return out; +}); +/** + * Deduplicates adjacent elements that are identical. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.dedupeAdjacent([1, 1, 2, 2, 3, 3]) + * console.log(result) // [1, 2, 3] + * ``` + * + * @since 2.0.0 + */ +export const dedupeAdjacent = /*#__PURE__*/dedupeAdjacentWith(/*#__PURE__*/Equal.equivalence()); +/** + * Joins the elements together with "sep" in the middle. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const strings = ["a", "b", "c"] + * const joined = Array.join(strings, "-") + * console.log(joined) // "a-b-c" + * ``` + * + * @since 2.0.0 + * @category folding + */ +export const join = /*#__PURE__*/dual(2, (self, sep) => fromIterable(self).join(sep)); +/** + * Statefully maps over the chunk, producing new elements of type `B`. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.mapAccum([1, 2, 3], 0, (acc, n) => [acc + n, acc + n]) + * console.log(result) // [6, [1, 3, 6]] + * ``` + * + * @since 2.0.0 + * @category folding + */ +export const mapAccum = /*#__PURE__*/dual(3, (self, s, f) => { + let i = 0; + let s1 = s; + const out = []; + for (const a of self) { + const r = f(s1, a, i); + s1 = r[0]; + out.push(r[1]); + i++; + } + return [s1, out]; +}); +/** + * Zips this chunk crosswise with the specified chunk using the specified combiner. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.cartesianWith([1, 2], ["a", "b"], (a, b) => `${a}-${b}`) + * console.log(result) // ["1-a", "1-b", "2-a", "2-b"] + * ``` + * + * @since 2.0.0 + * @category elements + */ +export const cartesianWith = /*#__PURE__*/dual(3, (self, that, f) => flatMap(self, a => map(that, b => f(a, b)))); +/** + * Zips this chunk crosswise with the specified chunk. + * + * **Example** + * + * ```ts + * import { Array } from "effect" + * + * const result = Array.cartesian([1, 2], ["a", "b"]) + * console.log(result) // [[1, "a"], [1, "b"], [2, "a"], [2, "b"]] + * ``` + * + * @since 2.0.0 + * @category elements + */ +export const cartesian = /*#__PURE__*/dual(2, (self, that) => cartesianWith(self, that, (a, b) => [a, b])); +// ------------------------------------------------------------------------------------- +// do notation +// ------------------------------------------------------------------------------------- +/** + * The "do simulation" for array allows you to sequentially apply operations to the elements of arrays, just as nested loops allow you to go through all combinations of elements in an arrays. + * + * It can be used to simulate "array comprehension". + * It's a technique that allows you to create new arrays by iterating over existing ones and applying specific **conditions** or **transformations** to the elements. It's like assembling a new collection from pieces of other collections based on certain rules. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Array` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * 5. Regular `Array` functions like `map` and `filter` can still be used within the do simulation. These functions will receive the accumulated variables as arguments within the scope + * + * **Example** + * + * ```ts + * import { Array, pipe } from "effect" + * + * const doResult = pipe( + * Array.Do, + * Array.bind("x", () => [1, 3, 5]), + * Array.bind("y", () => [2, 4, 6]), + * Array.filter(({ x, y }) => x < y), // condition + * Array.map(({ x, y }) => [x, y] as const) // transformation + * ) + * console.log(doResult) // [[1, 2], [1, 4], [1, 6], [3, 4], [3, 6], [5, 6]] + * + * // equivalent + * const x = [1, 3, 5], + * y = [2, 4, 6], + * result = []; + * for(let i = 0; i < x.length; i++) { + * for(let j = 0; j < y.length; j++) { + * const _x = x[i], _y = y[j]; + * if(_x < _y) result.push([_x, _y] as const) + * } + * } + * ``` + * + * @see {@link bindTo} + * @see {@link bind} + * @see {@link let_ let} + * + * @category do notation + * @since 3.2.0 + */ +export const Do = /*#__PURE__*/of({}); +/** + * The "do simulation" for array allows you to sequentially apply operations to the elements of arrays, just as nested loops allow you to go through all combinations of elements in an arrays. + * + * It can be used to simulate "array comprehension". + * It's a technique that allows you to create new arrays by iterating over existing ones and applying specific **conditions** or **transformations** to the elements. It's like assembling a new collection from pieces of other collections based on certain rules. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Array` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * 5. Regular `Array` functions like `map` and `filter` can still be used within the do simulation. These functions will receive the accumulated variables as arguments within the scope + * + * **Example** + * + * ```ts + * import { Array, pipe } from "effect" + * + * const doResult = pipe( + * Array.Do, + * Array.bind("x", () => [1, 3, 5]), + * Array.bind("y", () => [2, 4, 6]), + * Array.filter(({ x, y }) => x < y), // condition + * Array.map(({ x, y }) => [x, y] as const) // transformation + * ) + * console.log(doResult) // [[1, 2], [1, 4], [1, 6], [3, 4], [3, 6], [5, 6]] + * + * // equivalent + * const x = [1, 3, 5], + * y = [2, 4, 6], + * result = []; + * for(let i = 0; i < x.length; i++) { + * for(let j = 0; j < y.length; j++) { + * const _x = x[i], _y = y[j]; + * if(_x < _y) result.push([_x, _y] as const) + * } + * } + * ``` + * + * @see {@link bindTo} + * @see {@link Do} + * @see {@link let_ let} + * + * @category do notation + * @since 3.2.0 + */ +export const bind = /*#__PURE__*/internalDoNotation.bind(map, flatMap); +/** + * The "do simulation" for array allows you to sequentially apply operations to the elements of arrays, just as nested loops allow you to go through all combinations of elements in an arrays. + * + * It can be used to simulate "array comprehension". + * It's a technique that allows you to create new arrays by iterating over existing ones and applying specific **conditions** or **transformations** to the elements. It's like assembling a new collection from pieces of other collections based on certain rules. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Array` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * 5. Regular `Array` functions like `map` and `filter` can still be used within the do simulation. These functions will receive the accumulated variables as arguments within the scope + * + * **Example** + * + * ```ts + * import { Array, pipe } from "effect" + * + * const doResult = pipe( + * Array.Do, + * Array.bind("x", () => [1, 3, 5]), + * Array.bind("y", () => [2, 4, 6]), + * Array.filter(({ x, y }) => x < y), // condition + * Array.map(({ x, y }) => [x, y] as const) // transformation + * ) + * console.log(doResult) // [[1, 2], [1, 4], [1, 6], [3, 4], [3, 6], [5, 6]] + * + * // equivalent + * const x = [1, 3, 5], + * y = [2, 4, 6], + * result = []; + * for(let i = 0; i < x.length; i++) { + * for(let j = 0; j < y.length; j++) { + * const _x = x[i], _y = y[j]; + * if(_x < _y) result.push([_x, _y] as const) + * } + * } + * ``` + * + * @see {@link bindTo} + * @see {@link Do} + * @see {@link let_ let} + * + * @category do notation + * @since 3.2.0 + */ +export const bindTo = /*#__PURE__*/internalDoNotation.bindTo(map); +const let_ = /*#__PURE__*/internalDoNotation.let_(map); +export { +/** + * The "do simulation" for array allows you to sequentially apply operations to the elements of arrays, just as nested loops allow you to go through all combinations of elements in an arrays. + * + * It can be used to simulate "array comprehension". + * It's a technique that allows you to create new arrays by iterating over existing ones and applying specific **conditions** or **transformations** to the elements. It's like assembling a new collection from pieces of other collections based on certain rules. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Array` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * 5. Regular `Array` functions like `map` and `filter` can still be used within the do simulation. These functions will receive the accumulated variables as arguments within the scope + * + * **Example** + * + * ```ts + * import { Array, pipe } from "effect" + * + * const doResult = pipe( + * Array.Do, + * Array.bind("x", () => [1, 3, 5]), + * Array.bind("y", () => [2, 4, 6]), + * Array.filter(({ x, y }) => x < y), // condition + * Array.map(({ x, y }) => [x, y] as const) // transformation + * ) + * console.log(doResult) // [[1, 2], [1, 4], [1, 6], [3, 4], [3, 6], [5, 6]] + * + * // equivalent + * const x = [1, 3, 5], + * y = [2, 4, 6], + * result = []; + * for(let i = 0; i < x.length; i++) { + * for(let j = 0; j < y.length; j++) { + * const _x = x[i], _y = y[j]; + * if(_x < _y) result.push([_x, _y] as const) + * } + * } + * + * ``` + * + * @see {@link bindTo} + * @see {@link bind} + * @see {@link Do} + * + * @category do notation + * @since 3.2.0 + */ +let_ as let }; +//# sourceMappingURL=Array.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/BigDecimal.js.map b/backend/node_modules/effect/dist/esm/BigDecimal.js.map new file mode 100644 index 0000000000000000000000000000000000000000..504453cac2973df14f6b5a63c2619b7ddce49ab3 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/BigDecimal.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BigDecimal.js","names":["Equal","equivalence","dual","pipe","Hash","NodeInspectSymbol","Option","order","pipeArguments","hasProperty","DEFAULT_PRECISION","FINITE_INT_REGEX","TypeId","Symbol","for","BigDecimalProto","symbol","normalized","normalize","hash","value","combine","number","scale","cached","that","isBigDecimal","equals","toString","format","toJSON","_id","String","arguments","u","make","o","Object","create","unsafeMakeNormalized","bigint0","bigint10","RangeError","BigInt","bigint1","zero","self","undefined","digits","trail","i","length","substring","sum","multiply","subtract","divideWithPrecision","num","den","precision","numNegative","denNegative","negateResult","quotient","remainder","count","q","r","roundTerminal","n","pos","Number","divide","none","some","unsafeDivide","Order","scmp","sign","bigint","lessThan","lessThanOrEqualTo","greaterThan","greaterThanOrEqualTo","between","clamp","min","max","abs","negate","divisor","Math","unsafeRemainder","Equivalence","fromBigInt","unsafeFromNumber","getOrThrowWith","safeFromNumber","fromNumber","isFinite","string","includes","fromString","lead","split","s","base","exp","seperator","search","slice","isSafeInteger","test","offset","dot","unsafeFromString","Error","toExponential","negative","absolute","before","after","repeat","location","zeros","complete","isZero","head","tail","output","isNegative","unsafeToNumber","isInteger","isPositive","isBigDecimalArgs","args","ceil","truncated","truncate","floor","digitAt","scaled","round","options","mode","halfCeil","halfFloor","digit","sumAll","collection","out"],"sources":["../../src/BigDecimal.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;AAmBA,OAAO,KAAKA,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAC/C,SAASC,IAAI,EAAEC,IAAI,QAAQ,eAAe;AAC1C,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,SAA2BC,iBAAiB,QAAQ,kBAAkB;AACtE,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,KAAK,MAAM,YAAY;AAEnC,SAAwBC,aAAa,QAAQ,eAAe;AAC5D,SAASC,WAAW,QAAQ,gBAAgB;AAE5C,MAAMC,iBAAiB,GAAG,GAAG;AAC7B,MAAMC,gBAAgB,GAAG,YAAY;AAErC;;;;AAIA,OAAO,MA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backend/node_modules/effect/dist/esm/BigInt.js b/backend/node_modules/effect/dist/esm/BigInt.js new file mode 100644 index 0000000000000000000000000000000000000000..abf051da5494ccae513f32dc09209d8de3c75f32 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/BigInt.js @@ -0,0 +1,548 @@ +/** + * This module provides utility functions and type class instances for working with the `bigint` type in TypeScript. + * It includes functions for basic arithmetic operations, as well as type class instances for + * `Equivalence` and `Order`. + * + * @module BigInt + * @since 2.0.0 + * @see {@link module:BigDecimal} for more similar operations on `BigDecimal` types + * @see {@link module:Number} for more similar operations on `number` types + */ +import * as equivalence from "./Equivalence.js"; +import { dual } from "./Function.js"; +import * as Option from "./Option.js"; +import * as order from "./Order.js"; +import * as predicate from "./Predicate.js"; +const bigint0 = /*#__PURE__*/BigInt(0); +const bigint1 = /*#__PURE__*/BigInt(1); +const bigint2 = /*#__PURE__*/BigInt(2); +/** + * Tests if a value is a `bigint`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isBigInt } from "effect/BigInt" + * + * assert.deepStrictEqual(isBigInt(1n), true) + * assert.deepStrictEqual(isBigInt(1), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isBigInt = predicate.isBigInt; +/** + * Provides an addition operation on `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { sum } from "effect/BigInt" + * + * assert.deepStrictEqual(sum(2n, 3n), 5n) + * ``` + * + * @category math + * @since 2.0.0 + */ +export const sum = /*#__PURE__*/dual(2, (self, that) => self + that); +/** + * Provides a multiplication operation on `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { multiply } from "effect/BigInt" + * + * assert.deepStrictEqual(multiply(2n, 3n), 6n) + * ``` + * + * @category math + * @since 2.0.0 + */ +export const multiply = /*#__PURE__*/dual(2, (self, that) => self * that); +/** + * Provides a subtraction operation on `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { subtract } from "effect/BigInt" + * + * assert.deepStrictEqual(subtract(2n, 3n), -1n) + * ``` + * + * @category math + * @since 2.0.0 + */ +export const subtract = /*#__PURE__*/dual(2, (self, that) => self - that); +/** + * Provides a division operation on `bigint`s. + * + * If the dividend is not a multiple of the divisor the result will be a `bigint` value + * which represents the integer division rounded down to the nearest integer. + * + * Returns `None` if the divisor is `0n`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigInt, Option } from "effect" + * + * assert.deepStrictEqual(BigInt.divide(6n, 3n), Option.some(2n)) + * assert.deepStrictEqual(BigInt.divide(6n, 0n), Option.none()) + * ``` + * + * @category math + * @since 2.0.0 + */ +export const divide = /*#__PURE__*/dual(2, (self, that) => that === bigint0 ? Option.none() : Option.some(self / that)); +/** + * Provides a division operation on `bigint`s. + * + * If the dividend is not a multiple of the divisor the result will be a `bigint` value + * which represents the integer division rounded down to the nearest integer. + * + * Throws a `RangeError` if the divisor is `0n`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { unsafeDivide } from "effect/BigInt" + * + * assert.deepStrictEqual(unsafeDivide(6n, 3n), 2n) + * assert.deepStrictEqual(unsafeDivide(6n, 4n), 1n) + * ``` + * + * @category math + * @since 2.0.0 + */ +export const unsafeDivide = /*#__PURE__*/dual(2, (self, that) => self / that); +/** + * Returns the result of adding `1n` to a given number. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { increment } from "effect/BigInt" + * + * assert.deepStrictEqual(increment(2n), 3n) + * ``` + * + * @category math + * @since 2.0.0 + */ +export const increment = n => n + bigint1; +/** + * Decrements a number by `1n`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { decrement } from "effect/BigInt" + * + * assert.deepStrictEqual(decrement(3n), 2n) + * ``` + * + * @category math + * @since 2.0.0 + */ +export const decrement = n => n - bigint1; +/** + * @category instances + * @since 2.0.0 + */ +export const Equivalence = equivalence.bigint; +/** + * @category instances + * @since 2.0.0 + */ +export const Order = order.bigint; +/** + * Returns `true` if the first argument is less than the second, otherwise `false`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { lessThan } from "effect/BigInt" + * + * assert.deepStrictEqual(lessThan(2n, 3n), true) + * assert.deepStrictEqual(lessThan(3n, 3n), false) + * assert.deepStrictEqual(lessThan(4n, 3n), false) + * ``` + * + * @category predicates + * @since 2.0.0 + */ +export const lessThan = /*#__PURE__*/order.lessThan(Order); +/** + * Returns a function that checks if a given `bigint` is less than or equal to the provided one. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { lessThanOrEqualTo } from "effect/BigInt" + * + * assert.deepStrictEqual(lessThanOrEqualTo(2n, 3n), true) + * assert.deepStrictEqual(lessThanOrEqualTo(3n, 3n), true) + * assert.deepStrictEqual(lessThanOrEqualTo(4n, 3n), false) + * ``` + * + * @category predicates + * @since 2.0.0 + */ +export const lessThanOrEqualTo = /*#__PURE__*/order.lessThanOrEqualTo(Order); +/** + * Returns `true` if the first argument is greater than the second, otherwise `false`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { greaterThan } from "effect/BigInt" + * + * assert.deepStrictEqual(greaterThan(2n, 3n), false) + * assert.deepStrictEqual(greaterThan(3n, 3n), false) + * assert.deepStrictEqual(greaterThan(4n, 3n), true) + * ``` + * + * @category predicates + * @since 2.0.0 + */ +export const greaterThan = /*#__PURE__*/order.greaterThan(Order); +/** + * Returns a function that checks if a given `bigint` is greater than or equal to the provided one. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { greaterThanOrEqualTo } from "effect/BigInt" + * + * assert.deepStrictEqual(greaterThanOrEqualTo(2n, 3n), false) + * assert.deepStrictEqual(greaterThanOrEqualTo(3n, 3n), true) + * assert.deepStrictEqual(greaterThanOrEqualTo(4n, 3n), true) + * ``` + * + * @category predicates + * @since 2.0.0 + */ +export const greaterThanOrEqualTo = /*#__PURE__*/order.greaterThanOrEqualTo(Order); +/** + * Checks if a `bigint` is between a `minimum` and `maximum` value (inclusive). + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigInt } from "effect" + * + * const between = BigInt.between({ minimum: 0n, maximum: 5n }) + * + * assert.deepStrictEqual(between(3n), true) + * assert.deepStrictEqual(between(-1n), false) + * assert.deepStrictEqual(between(6n), false) + * ``` + * + * @category predicates + * @since 2.0.0 + */ +export const between = /*#__PURE__*/order.between(Order); +/** + * Restricts the given `bigint` to be within the range specified by the `minimum` and `maximum` values. + * + * - If the `bigint` is less than the `minimum` value, the function returns the `minimum` value. + * - If the `bigint` is greater than the `maximum` value, the function returns the `maximum` value. + * - Otherwise, it returns the original `bigint`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigInt } from "effect" + * + * const clamp = BigInt.clamp({ minimum: 1n, maximum: 5n }) + * + * assert.equal(clamp(3n), 3n) + * assert.equal(clamp(0n), 1n) + * assert.equal(clamp(6n), 5n) + * ``` + * + * @since 2.0.0 + */ +export const clamp = /*#__PURE__*/order.clamp(Order); +/** + * Returns the minimum between two `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { min } from "effect/BigInt" + * + * assert.deepStrictEqual(min(2n, 3n), 2n) + * ``` + * + * @since 2.0.0 + */ +export const min = /*#__PURE__*/order.min(Order); +/** + * Returns the maximum between two `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { max } from "effect/BigInt" + * + * assert.deepStrictEqual(max(2n, 3n), 3n) + * ``` + * + * @since 2.0.0 + */ +export const max = /*#__PURE__*/order.max(Order); +/** + * Determines the sign of a given `bigint`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { sign } from "effect/BigInt" + * + * assert.deepStrictEqual(sign(-5n), -1) + * assert.deepStrictEqual(sign(0n), 0) + * assert.deepStrictEqual(sign(5n), 1) + * ``` + * + * @category math + * @since 2.0.0 + */ +export const sign = n => Order(n, bigint0); +/** + * Determines the absolute value of a given `bigint`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { abs } from "effect/BigInt" + * + * assert.deepStrictEqual(abs(-5n), 5n) + * assert.deepStrictEqual(abs(0n), 0n) + * assert.deepStrictEqual(abs(5n), 5n) + * ``` + * + * @category math + * @since 2.0.0 + */ +export const abs = n => n < bigint0 ? -n : n; +/** + * Determines the greatest common divisor of two `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { gcd } from "effect/BigInt" + * + * assert.deepStrictEqual(gcd(2n, 3n), 1n) + * assert.deepStrictEqual(gcd(2n, 4n), 2n) + * assert.deepStrictEqual(gcd(16n, 24n), 8n) + * ``` + * + * @category math + * @since 2.0.0 + */ +export const gcd = /*#__PURE__*/dual(2, (self, that) => { + while (that !== bigint0) { + const t = that; + that = self % that; + self = t; + } + return self; +}); +/** + * Determines the least common multiple of two `bigint`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { lcm } from "effect/BigInt" + * + * assert.deepStrictEqual(lcm(2n, 3n), 6n) + * assert.deepStrictEqual(lcm(2n, 4n), 4n) + * assert.deepStrictEqual(lcm(16n, 24n), 48n) + * ``` + * + * @category math + * @since 2.0.0 + */ +export const lcm = /*#__PURE__*/dual(2, (self, that) => self * that / gcd(self, that)); +/** + * Determines the square root of a given `bigint` unsafely. Throws if the given `bigint` is negative. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { unsafeSqrt } from "effect/BigInt" + * + * assert.deepStrictEqual(unsafeSqrt(4n), 2n) + * assert.deepStrictEqual(unsafeSqrt(9n), 3n) + * assert.deepStrictEqual(unsafeSqrt(16n), 4n) + * ``` + * + * @category math + * @since 2.0.0 + */ +export const unsafeSqrt = n => { + if (n < bigint0) { + throw new RangeError("Cannot take the square root of a negative number"); + } + if (n < bigint2) { + return n; + } + let x = n / bigint2; + while (x * x > n) { + x = (n / x + x) / bigint2; + } + return x; +}; +/** + * Determines the square root of a given `bigint` safely. Returns `none` if the given `bigint` is negative. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigInt, Option } from "effect" + * + * assert.deepStrictEqual(BigInt.sqrt(4n), Option.some(2n)) + * assert.deepStrictEqual(BigInt.sqrt(9n), Option.some(3n)) + * assert.deepStrictEqual(BigInt.sqrt(16n), Option.some(4n)) + * assert.deepStrictEqual(BigInt.sqrt(-1n), Option.none()) + * ``` + * + * @category math + * @since 2.0.0 + */ +export const sqrt = n => greaterThanOrEqualTo(n, bigint0) ? Option.some(unsafeSqrt(n)) : Option.none(); +/** + * Takes an `Iterable` of `bigint`s and returns their sum as a single `bigint + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { sumAll } from "effect/BigInt" + * + * assert.deepStrictEqual(sumAll([2n, 3n, 4n]), 9n) + * ``` + * + * @category math + * @since 2.0.0 + */ +export const sumAll = collection => { + let out = bigint0; + for (const n of collection) { + out += n; + } + return out; +}; +/** + * Takes an `Iterable` of `bigint`s and returns their multiplication as a single `number`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { multiplyAll } from "effect/BigInt" + * + * assert.deepStrictEqual(multiplyAll([2n, 3n, 4n]), 24n) + * ``` + * + * @category math + * @since 2.0.0 + */ +export const multiplyAll = collection => { + let out = bigint1; + for (const n of collection) { + if (n === bigint0) { + return bigint0; + } + out *= n; + } + return out; +}; +/** + * Takes a `bigint` and returns an `Option` of `number`. + * + * If the `bigint` is outside the safe integer range for JavaScript (`Number.MAX_SAFE_INTEGER` + * and `Number.MIN_SAFE_INTEGER`), it returns `Option.none()`. Otherwise, it converts the `bigint` + * to a number and returns `Option.some(number)`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigInt as BI, Option } from "effect" + * + * assert.deepStrictEqual(BI.toNumber(BigInt(42)), Option.some(42)) + * assert.deepStrictEqual(BI.toNumber(BigInt(Number.MAX_SAFE_INTEGER) + BigInt(1)), Option.none()) + * assert.deepStrictEqual(BI.toNumber(BigInt(Number.MIN_SAFE_INTEGER) - BigInt(1)), Option.none()) + * ``` + * + * @category conversions + * @since 2.0.0 + */ +export const toNumber = b => { + if (b > BigInt(Number.MAX_SAFE_INTEGER) || b < BigInt(Number.MIN_SAFE_INTEGER)) { + return Option.none(); + } + return Option.some(Number(b)); +}; +/** + * Takes a string and returns an `Option` of `bigint`. + * + * If the string is empty or contains characters that cannot be converted into a `bigint`, + * it returns `Option.none()`, otherwise, it returns `Option.some(bigint)`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigInt as BI, Option } from "effect" + * + * assert.deepStrictEqual(BI.fromString("42"), Option.some(BigInt(42))) + * assert.deepStrictEqual(BI.fromString(" "), Option.none()) + * assert.deepStrictEqual(BI.fromString("a"), Option.none()) + * ``` + * + * @category conversions + * @since 2.4.12 + */ +export const fromString = s => { + try { + return s.trim() === "" ? Option.none() : Option.some(BigInt(s)); + } catch { + return Option.none(); + } +}; +/** + * Takes a number and returns an `Option` of `bigint`. + * + * If the number is outside the safe integer range for JavaScript (`Number.MAX_SAFE_INTEGER` + * and `Number.MIN_SAFE_INTEGER`), it returns `Option.none()`. Otherwise, it attempts to + * convert the number to a `bigint` and returns `Option.some(bigint)`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { BigInt as BI, Option } from "effect" + * + * assert.deepStrictEqual(BI.fromNumber(42), Option.some(BigInt(42))) + * assert.deepStrictEqual(BI.fromNumber(Number.MAX_SAFE_INTEGER + 1), Option.none()) + * assert.deepStrictEqual(BI.fromNumber(Number.MIN_SAFE_INTEGER - 1), Option.none()) + * ``` + * + * @category conversions + * @since 2.4.12 + */ +export const fromNumber = n => { + if (n > Number.MAX_SAFE_INTEGER || n < Number.MIN_SAFE_INTEGER) { + return Option.none(); + } + try { + return Option.some(BigInt(n)); + } catch { + return Option.none(); + } +}; +//# sourceMappingURL=BigInt.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/BigInt.js.map b/backend/node_modules/effect/dist/esm/BigInt.js.map new file mode 100644 index 0000000000000000000000000000000000000000..9d3d2e0187e12f35c2405c66741861393d365f92 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/BigInt.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BigInt.js","names":["equivalence","dual","Option","order","predicate","bigint0","BigInt","bigint1","bigint2","isBigInt","sum","self","that","multiply","subtract","divide","none","some","unsafeDivide","increment","n","decrement","Equivalence","bigint","Order","lessThan","lessThanOrEqualTo","greaterThan","greaterThanOrEqualTo","between","clamp","min","max","sign","abs","gcd","t","lcm","unsafeSqrt","RangeError","x","sqrt","sumAll","collection","out","multiplyAll","toNumber","b","Number","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","fromString","s","trim","fromNumber"],"sources":["../../src/BigInt.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;AAWA,OAAO,KAAKA,WAAW,MAAM,kBAAkB;AAC/C,SAASC,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,KAAK,MAAM,YAAY;AAEnC,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAE3C,MAAMC,OAAO,gBAAGC,MAAM,CAAC,CAAC,CAAC;AACzB,MAAMC,OAAO,gBAAGD,MAAM,CAAC,CAAC,CAAC;AACzB,MAAME,OAAO,gBAAGF,MAAM,CAAC,CAAC,CAAC;AAEzB;;;;;;;;;;;;;;;AAeA,OAAO,MAAMG,QAAQ,GAAgCL,SAAS,CAACK,QAAQ;AAEvE;;;;;;;;;;;;;;AAcA,OAAO,MAAMC,GAAG,gBA+BZT,IAAI,CAAC,CAAC,EAAE,CAACU,IAAY,EAAEC,IAAY,KAAaD,IAAI,GAAGC,IAAI,CAAC;AAEhE;;;;;;;;;;;;;;AAcA,OAAO,MAAMC,QAAQ,gBA+BjBZ,IAAI,CAAC,CAAC,EAAE,CAACU,IAAY,EAAEC,IAAY,KAAaD,IAAI,GAAGC,IAAI,CAAC;AAEhE;;;;;;;;;;;;;;AAcA,OAAO,MAAME,QAAQ,gBA+BjBb,IAAI,CAAC,CAAC,EAAE,CAACU,IAAY,EAAEC,IAAY,KAAaD,IAAI,GAAGC,IAAI,CAAC;AAEhE;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MAAMG,MAAM,gBA2Cfd,IAAI,CACN,CAAC,EACD,CAACU,IAAY,EAAEC,IAAY,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AOA,CAAC,CAACC,IAAI,EAAE,KAAK,EAAE,GAClBnD,MAAM,CAACc,IAAI,EAAE,GACbd,MAAM,CAACe,IAAI,CAACX,MAAM,CAAC8C,CAAC,CAAC,CAAC;EAC5B,CAAC,CAAC,MAAM;IACN,OAAOlD,MAAM,CAACc,IAAI,EAAE;EACtB;AACF,CAAC;AAED;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MAAMsC,UAAU,GAAIlC,CAAS,IAA2B;EAC7D,IAAIA,CAAC,GAAG4B,MAAM,CAACC,gBAAgB,IAAI7B,CAAC,GAAG4B,MAAM,CAACE,gBAAgB,EAAE;IAC9D,OAAOhD,MAAM,CAACc,IAAI,EAAE;EACtB;EAEA,IAAI;IACF,OAAOd,MAAM,CAACe,IAAI,CAACX,MAAM,CAACc,CAAC,CAAC,CAAC;EAC/B,CAAC,CAAC,MAAM;IACN,OAAOlB,MAAM,CAACc,IAAI,EAAE;EACtB;AACF,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Boolean.js b/backend/node_modules/effect/dist/esm/Boolean.js new file mode 100644 index 0000000000000000000000000000000000000000..7bef044162764801398a1445c0bf18182ea026f1 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Boolean.js @@ -0,0 +1,240 @@ +/** + * This module provides utility functions and type class instances for working with the `boolean` type in TypeScript. + * It includes functions for basic boolean operations, as well as type class instances for + * `Equivalence` and `Order`. + * + * @since 2.0.0 + */ +import * as equivalence from "./Equivalence.js"; +import { dual } from "./Function.js"; +import * as order from "./Order.js"; +import * as predicate from "./Predicate.js"; +/** + * Tests if a value is a `boolean`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isBoolean } from "effect/Boolean" + * + * assert.deepStrictEqual(isBoolean(true), true) + * assert.deepStrictEqual(isBoolean("true"), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isBoolean = predicate.isBoolean; +/** + * This function returns the result of either of the given functions depending on the value of the boolean parameter. + * It is useful when you have to run one of two functions depending on the boolean value. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Boolean } from "effect" + * + * assert.deepStrictEqual(Boolean.match(true, { onFalse: () => "It's false!", onTrue: () => "It's true!" }), "It's true!") + * ``` + * + * @category pattern matching + * @since 2.0.0 + */ +export const match = /*#__PURE__*/dual(2, (value, options) => value ? options.onTrue() : options.onFalse()); +/** + * @category instances + * @since 2.0.0 + */ +export const Equivalence = equivalence.boolean; +/** + * @category instances + * @since 2.0.0 + */ +export const Order = order.boolean; +/** + * Negates the given boolean: `!self` + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { not } from "effect/Boolean" + * + * assert.deepStrictEqual(not(true), false) + * assert.deepStrictEqual(not(false), true) + * ``` + * + * @category combinators + * @since 2.0.0 + */ +export const not = self => !self; +/** + * Combines two boolean using AND: `self && that`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { and } from "effect/Boolean" + * + * assert.deepStrictEqual(and(true, true), true) + * assert.deepStrictEqual(and(true, false), false) + * assert.deepStrictEqual(and(false, true), false) + * assert.deepStrictEqual(and(false, false), false) + * ``` + * + * @category combinators + * @since 2.0.0 + */ +export const and = /*#__PURE__*/dual(2, (self, that) => self && that); +/** + * Combines two boolean using NAND: `!(self && that)`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { nand } from "effect/Boolean" + * + * assert.deepStrictEqual(nand(true, true), false) + * assert.deepStrictEqual(nand(true, false), true) + * assert.deepStrictEqual(nand(false, true), true) + * assert.deepStrictEqual(nand(false, false), true) + * ``` + * + * @category combinators + * @since 2.0.0 + */ +export const nand = /*#__PURE__*/dual(2, (self, that) => !(self && that)); +/** + * Combines two boolean using OR: `self || that`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { or } from "effect/Boolean" + * + * assert.deepStrictEqual(or(true, true), true) + * assert.deepStrictEqual(or(true, false), true) + * assert.deepStrictEqual(or(false, true), true) + * assert.deepStrictEqual(or(false, false), false) + * ``` + * + * @category combinators + * @since 2.0.0 + */ +export const or = /*#__PURE__*/dual(2, (self, that) => self || that); +/** + * Combines two booleans using NOR: `!(self || that)`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { nor } from "effect/Boolean" + * + * assert.deepStrictEqual(nor(true, true), false) + * assert.deepStrictEqual(nor(true, false), false) + * assert.deepStrictEqual(nor(false, true), false) + * assert.deepStrictEqual(nor(false, false), true) + * ``` + * + * @category combinators + * @since 2.0.0 + */ +export const nor = /*#__PURE__*/dual(2, (self, that) => !(self || that)); +/** + * Combines two booleans using XOR: `(!self && that) || (self && !that)`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { xor } from "effect/Boolean" + * + * assert.deepStrictEqual(xor(true, true), false) + * assert.deepStrictEqual(xor(true, false), true) + * assert.deepStrictEqual(xor(false, true), true) + * assert.deepStrictEqual(xor(false, false), false) + * ``` + * + * @category combinators + * @since 2.0.0 + */ +export const xor = /*#__PURE__*/dual(2, (self, that) => !self && that || self && !that); +/** + * Combines two booleans using EQV (aka XNOR): `!xor(self, that)`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { eqv } from "effect/Boolean" + * + * assert.deepStrictEqual(eqv(true, true), true) + * assert.deepStrictEqual(eqv(true, false), false) + * assert.deepStrictEqual(eqv(false, true), false) + * assert.deepStrictEqual(eqv(false, false), true) + * ``` + * + * @category combinators + * @since 2.0.0 + */ +export const eqv = /*#__PURE__*/dual(2, (self, that) => !xor(self, that)); +/** + * Combines two booleans using an implication: `(!self || that)`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { implies } from "effect/Boolean" + * + * assert.deepStrictEqual(implies(true, true), true) + * assert.deepStrictEqual(implies(true, false), false) + * assert.deepStrictEqual(implies(false, true), true) + * assert.deepStrictEqual(implies(false, false), true) + * ``` + * + * @category combinators + * @since 2.0.0 + */ +export const implies = /*#__PURE__*/dual(2, (self, that) => self ? that : true); +/** + * This utility function is used to check if all the elements in a collection of boolean values are `true`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { every } from "effect/Boolean" + * + * assert.deepStrictEqual(every([true, true, true]), true) + * assert.deepStrictEqual(every([true, false, true]), false) + * ``` + * + * @since 2.0.0 + */ +export const every = collection => { + for (const b of collection) { + if (!b) { + return false; + } + } + return true; +}; +/** + * This utility function is used to check if at least one of the elements in a collection of boolean values is `true`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { some } from "effect/Boolean" + * + * assert.deepStrictEqual(some([true, false, true]), true) + * assert.deepStrictEqual(some([false, false, false]), false) + * ``` + * + * @since 2.0.0 + */ +export const some = collection => { + for (const b of collection) { + if (b) { + return true; + } + } + return false; +}; +//# sourceMappingURL=Boolean.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Boolean.js.map b/backend/node_modules/effect/dist/esm/Boolean.js.map new file mode 100644 index 0000000000000000000000000000000000000000..1317b98cdb8eab820df9e3c4a4ee2ad1cc4e212c --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Boolean.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Boolean.js","names":["equivalence","dual","order","predicate","isBoolean","match","value","options","onTrue","onFalse","Equivalence","boolean","Order","not","self","and","that","nand","or","nor","xor","eqv","implies","every","collection","b","some"],"sources":["../../src/Boolean.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;AAOA,OAAO,KAAKA,WAAW,MAAM,kBAAkB;AAE/C,SAASC,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAE3C;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,SAAS,GAAyCD,SAAS,CAACC,SAAS;AAElF;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,KAAK,gBA4CdJ,IAAI,CAAC,CAAC,EAAE,CAAOK,KAAc,EAAEC,OAGlC,KAAYD,KAAK,GAAGC,OAAO,CAACC,MAAM,EAAE,GAAGD,OAAO,CAACE,OAAO,EAAE,CAAC;AAE1D;;;;AAIA,OAA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AI,EAAEE,IAAI,KAAKF,IAAI,GAAGE,IAAI,GAAG,IAAI,CAAC;AAE/C;;;;;;;;;;;;;;AAcA,OAAO,MAAMO,KAAK,GAAIC,UAA6B,IAAa;EAC9D,KAAK,MAAMC,CAAC,IAAID,UAAU,EAAE;IAC1B,IAAI,CAACC,CAAC,EAAE;MACN,OAAO,KAAK;IACd;EACF;EACA,OAAO,IAAI;AACb,CAAC;AAED;;;;;;;;;;;;;;AAcA,OAAO,MAAMC,IAAI,GAAIF,UAA6B,IAAa;EAC7D,KAAK,MAAMC,CAAC,IAAID,UAAU,EAAE;IAC1B,IAAIC,CAAC,EAAE;MACL,OAAO,IAAI;IACb;EACF;EACA,OAAO,KAAK;AACd,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Brand.js.map b/backend/node_modules/effect/dist/esm/Brand.js.map new file mode 100644 index 0000000000000000000000000000000000000000..94fd9df3acd86bcb3a0cc952a2c5dc51476b6be2 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Brand.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Brand.js","names":["Arr","Either","identity","unsafeCoerce","Option","BrandTypeId","Symbol","for","RefinedConstructorsTypeId","error","message","meta","errors","flatten","refined","args","either","length","unbranded","right","left","match","onNone","onSome","Object","assign","getOrThrowWith","option","getRight","is","isRight","nominal","some","_args","all","brands","result","brand","nextResult","isLeft","onLeft","e","onRight"],"sources":["../../src/Brand.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;AAkBA,OAAO,KAAKA,GAAG,MAAM,YAAY;AACjC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,SAASC,QAAQ,EAAEC,YAAY,QAAQ,eAAe;AACtD,OAAO,KAAKC,MAAM,MAAM,aAAa;AAIrC;;;;AAIA,OAAO,MAAMC,WAAW,gBAAkBC,MAAM,CAACC,GAAG,CAAC,cAAc,CAAC;AAQpE;;;;AAIA,OAAO,MAAMC,yBAAyB,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CAAC,EAAE;IACJ,CAACM,yBAAyB,GAAGA,yBAAyB;IACtDmB,MAAM,EAAGZ,IAAS,IAAKX,MAAM,CAACwB,QAAQ,CAACZ,MAAM,CAACD,IAAI,CAAC,CAAC;IACpDC,MAAM;IACNa,EAAE,EAAGd,IAAS,IAAkBd,MAAM,CAAC6B,OAAO,CAACd,MAAM,CAACD,IAAI,CAAC;GAC5D,CAAC;AACJ,CAAC;AAED;;;;;;AAMA,OAAO,MAAMG,SAAS,GAA6Df,YAAY","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Cache.js b/backend/node_modules/effect/dist/esm/Cache.js new file mode 100644 index 0000000000000000000000000000000000000000..09077f0d58e0dc7bef957740edc7c8fd3873a3af --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Cache.js @@ -0,0 +1,43 @@ +import * as internal from "./internal/cache.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const CacheTypeId = internal.CacheTypeId; +/** + * @since 3.6.4 + * @category symbols + */ +export const ConsumerCacheTypeId = internal.ConsumerCacheTypeId; +/** + * Constructs a new cache with the specified capacity, time to live, and + * lookup function. + * + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * Constructs a new cache with the specified capacity, time to live, and + * lookup function, where the time to live can depend on the `Exit` value + * returned by the lookup function. + * + * @since 2.0.0 + * @category constructors + */ +export const makeWith = internal.makeWith; +/** + * Constructs a new `CacheStats` from the specified values. + * + * @since 2.0.0 + * @category constructors + */ +export const makeCacheStats = internal.makeCacheStats; +/** + * Constructs a new `EntryStats` from the specified values. + * + * @since 2.0.0 + * @category constructors + */ +export const makeEntryStats = internal.makeEntryStats; +//# sourceMappingURL=Cache.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Cache.js.map b/backend/node_modules/effect/dist/esm/Cache.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f646de0d73e584f3e3609e092fd508d8552d2454 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Cache.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Cache.js","names":["internal","CacheTypeId","ConsumerCacheTypeId","make","makeWith","makeCacheStats","makeEntryStats"],"sources":["../../src/Cache.ts"],"sourcesContent":[null],"mappings":"AAOA,OAAO,KAAKA,QAAQ,MAAM,qBAAqB;AAK/C;;;;AAIA,OAAO,MAAMC,WAAW,GAAkBD,QAAQ,CAACC,WAAW;AAQ9D;;;;AAIA,OAAO,MAAMC,mBAAmB,GAAkBF,QAAQ,CAACE,mBAAmB;AAsK9E;;;;;;;AAOA,OAAO,MAAMC,IAAI,GAMkDH,QAAQ,CAACG,IAAI;AAEhF;;;;;;;;AAQA,OAAO,MAAMC,QAAQ,GAM8CJ,QAAQ,CAACI,QAAQ;AAepF;;;;;;AAMA,OAAO,MAAMC,cAAc,GAMTL,QAAQ,CAACK,cAAc;AAYzC;;;;;;AAMA,OAAO,MAAMC,cAAc,GAAyCN,QAAQ,CAACM,cAAc","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Cause.js b/backend/node_modules/effect/dist/esm/Cause.js new file mode 100644 index 0000000000000000000000000000000000000000..a4731ed8a2eac7911c3a9ee50b53f7a5f6bf3116 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Cause.js @@ -0,0 +1,1004 @@ +import * as internal from "./internal/cause.js"; +import * as core from "./internal/core.js"; +/** + * A unique symbol identifying the `Cause` type. + * + * **Details** + * + * This provides a symbol that helps identify instances of the `Cause` data + * type. This can be used for advanced operations such as refining types or + * building internal utilities that check whether an unknown value is a `Cause`. + * + * @see {@link isCause} Check if a value is a `Cause` + * + * @since 2.0.0 + * @category Symbols + */ +export const CauseTypeId = internal.CauseTypeId; +/** + * A unique symbol identifying the `RuntimeException` type. + * + * **Details** + * + * This provides a symbol that identifies a `RuntimeException`. This is + * typically used internally by the library to recognize checked exceptions that + * occur during runtime. + * + * @see {@link RuntimeException} Create or work with a `RuntimeException` + * + * @since 2.0.0 + * @category Symbols + */ +export const RuntimeExceptionTypeId = core.RuntimeExceptionTypeId; +/** + * A unique symbol identifying the `InterruptedException` type. + * + * **Details** + * + * This provides a symbol that identifies an `InterruptedException`. This is + * typically used internally to recognize when a fiber has been interrupted, + * helping the framework handle interruption logic correctly. + * + * @see {@link InterruptedException} Create or work with an `InterruptedException` + * + * @since 2.0.0 + * @category Symbols + */ +export const InterruptedExceptionTypeId = core.InterruptedExceptionTypeId; +/** + * A unique symbol identifying the `IllegalArgumentException` type. + * + * **Details** + * + * This provides a symbol that identifies an `IllegalArgumentException`. This is + * often used in scenarios where invalid arguments are supplied to methods that + * expect specific input. + * + * @see {@link IllegalArgumentException} Create or work with an `IllegalArgumentException` + * + * @since 2.0.0 + * @category Symbols + */ +export const IllegalArgumentExceptionTypeId = core.IllegalArgumentExceptionTypeId; +/** + * A unique symbol identifying the `NoSuchElementException` type. + * + * **Details** + * + * This provides a symbol that identifies a `NoSuchElementException`. It helps + * differentiate cases where a required element is missing within a data + * structure. + * + * @see {@link NoSuchElementException} Create or work with a `NoSuchElementException` + * + * @since 2.0.0 + * @category Symbols + */ +export const NoSuchElementExceptionTypeId = core.NoSuchElementExceptionTypeId; +/** + * A unique symbol identifying the `InvalidPubSubCapacityException` type. + * + * **Details** + * + * This provides a symbol that identifies an `InvalidPubSubCapacityException`. + * It indicates an error related to an invalid capacity passed to a `PubSub` + * structure. + * + * @see {@link InvalidPubSubCapacityException} Create or work with an `InvalidPubSubCapacityException` + * + * @since 2.0.0 + * @category Symbols + */ +export const InvalidPubSubCapacityExceptionTypeId = core.InvalidPubSubCapacityExceptionTypeId; +/** + * A unique symbol identifying the `ExceededCapacityException` type. + * + * **Details** + * + * This provides a symbol that identifies an `ExceededCapacityException`. It + * denotes situations where a resource has exceeded its configured capacity + * limit. + * + * @see {@link ExceededCapacityException} Create or work with an `ExceededCapacityException` + * + * @since 3.5.0 + * @category Symbols + */ +export const ExceededCapacityExceptionTypeId = core.ExceededCapacityExceptionTypeId; +/** + * A unique symbol identifying the `TimeoutException` type. + * + * **Details** + * + * This provides a symbol that identifies a `TimeoutException`. It helps the + * framework recognize errors related to operations that fail to complete within + * a given timeframe. + * + * @see {@link TimeoutException} Create or work with a `TimeoutException` + * + * @since 2.0.0 + * @category Symbols + */ +export const TimeoutExceptionTypeId = core.TimeoutExceptionTypeId; +/** + * A unique symbol identifying the `UnknownException` type. + * + * **Details** + * + * This provides a symbol that identifies an `UnknownException`. It is typically + * used for generic or unexpected errors that do not fit other specific + * exception categories. + * + * @see {@link UnknownException} Create or work with an `UnknownException` + * + * @since 2.0.0 + * @category Symbols + */ +export const UnknownExceptionTypeId = core.UnknownExceptionTypeId; +/** + * Creates an error that occurs at runtime, extendable for other exception + * types. + * + * @since 2.0.0 + * @category Errors + */ +export const YieldableError = core.YieldableError; +/** + * Creates an `Empty` cause. + * + * **Details** + * + * This function returns a cause that signifies "no error." It's commonly used + * to represent an absence of failure conditions. + * + * @see {@link isEmpty} Check if a `Cause` is empty + * + * @since 2.0.0 + * @category Constructors + */ +export const empty = internal.empty; +/** + * Creates a `Fail` cause from an expected error. + * + * **Details** + * + * This function constructs a `Cause` carrying an error of type `E`. It's used + * when you want to represent a known or anticipated failure in your effectful + * computations. + * + * @see {@link isFailure} Check if a `Cause` contains a failure + * + * @since 2.0.0 + * @category Constructors + */ +export const fail = internal.fail; +/** + * Creates a `Die` cause from an unexpected error. + * + * **Details** + * + * This function wraps an unhandled or unknown defect (like a runtime crash) + * into a `Cause`. It's useful for capturing unforeseen issues in a structured + * way. + * + * @see {@link isDie} Check if a `Cause` contains a defect + * + * @since 2.0.0 + * @category Constructors + */ +export const die = internal.die; +/** + * Creates an `Interrupt` cause from a `FiberId`. + * + * **Details** + * + * This function represents a fiber that has been interrupted. It stores the + * identifier of the interrupted fiber, enabling precise tracking of concurrent + * cancellations. + * + * @see {@link isInterrupted} Check if a `Cause` contains an interruption + * + * @since 2.0.0 + * @category Constructors + */ +export const interrupt = internal.interrupt; +/** + * Combines two `Cause`s in parallel. + * + * **Details** + * + * This function merges two errors that occurred simultaneously. Instead of + * discarding one error, both are retained, allowing for richer error reporting + * and debugging. + * + * @see {@link isParallelType} Check if a `Cause` is a `Parallel` + * + * @since 2.0.0 + * @category Constructors + */ +export const parallel = internal.parallel; +/** + * Combines two `Cause`s sequentially. + * + * **Details** + * + * This function merges two errors that occurred in sequence, such as a main + * error followed by a finalization error. It preserves both errors for complete + * failure information. + * + * @see {@link isSequentialType} Check if a `Cause` is a `Sequential` + * + * @since 2.0.0 + * @category Constructors + */ +export const sequential = internal.sequential; +/** + * Checks if a value is a `Cause`. + * + * @since 2.0.0 + * @category Guards + */ +export const isCause = internal.isCause; +/** + * Checks if a `Cause` is an `Empty` type. + * + * @see {@link empty} Create a new `Empty` cause + * + * @since 2.0.0 + * @category Guards + */ +export const isEmptyType = internal.isEmptyType; +/** + * Checks if a `Cause` is a `Fail` type. + * + * @see {@link fail} Create a new `Fail` cause + * + * @since 2.0.0 + * @category Guards + */ +export const isFailType = internal.isFailType; +/** + * Checks if a `Cause` is a `Die` type. + * + * @see {@link die} Create a new `Die` cause + * + * @since 2.0.0 + * @category Guards + */ +export const isDieType = internal.isDieType; +/** + * Checks if a `Cause` is an `Interrupt` type. + * + * @see {@link interrupt} Create an `Interrupt` cause + * + * @since 2.0.0 + * @category Guards + */ +export const isInterruptType = internal.isInterruptType; +/** + * Checks if a `Cause` is a `Sequential` type. + * + * @see {@link sequential} Combine two `Cause`s sequentially + * + * @since 2.0.0 + * @category Guards + */ +export const isSequentialType = internal.isSequentialType; +/** + * Checks if a `Cause` is a `Parallel` type. + * + * @see {@link parallel} Combine two `Cause`s in parallel + * + * @since 2.0.0 + * @category Guards + */ +export const isParallelType = internal.isParallelType; +/** + * Calculates the size of a `Cause`. + * + * **Details** + * + * This function returns the total number of `Cause` nodes in the semiring + * structure, reflecting how many individual error elements are recorded. + * + * @since 2.0.0 + * @category Getters + */ +export const size = internal.size; +/** + * Checks if a `Cause` is entirely empty. + * + * **Details** + * + * This function returns `true` if the `Cause` contains no errors, defects, or + * interruptions. It's helpful for verifying if a computation truly had no + * failures. + * + * @since 2.0.0 + * @category Getters + */ +export const isEmpty = internal.isEmpty; +/** + * Checks if a `Cause` contains a failure. + * + * **Details** + * + * This function returns `true` if the `Cause` includes any `Fail` error. It's + * commonly used to confirm whether a workflow encountered an anticipated error + * versus just defects or interruptions. + * + * @since 2.0.0 + * @category Getters + */ +export const isFailure = internal.isFailure; +/** + * Checks if a `Cause` contains a defect. + * + * **Details** + * + * This function returns `true` if the `Cause` includes any unexpected or + * unhandled errors (`Die`). It's useful for differentiating known failures from + * unexpected ones. + * + * @since 2.0.0 + * @category Getters + */ +export const isDie = internal.isDie; +/** + * Checks if a `Cause` contains an interruption. + * + * **Details** + * + * This function returns `true` if the `Cause` includes any fiber interruptions. + * + * @since 2.0.0 + * @category Getters + */ +export const isInterrupted = internal.isInterrupted; +/** + * Checks if a `Cause` contains only interruptions. + * + * **Details** + * + * This function returns `true` if the `Cause` has been interrupted but does not + * contain any other failures, such as `Fail` or `Die`. It's helpful for + * verifying purely "cancellation" scenarios. + * + * @since 2.0.0 + * @category Getters + */ +export const isInterruptedOnly = internal.isInterruptedOnly; +/** + * Extracts all recoverable errors of type `E` from a `Cause`. + * + * **Details** + * + * This function returns a chunk of errors, providing a list of all `Fail` + * values found in the cause. It's useful for collecting all known failures for + * logging or combined error handling. + * + * @since 2.0.0 + * @category Getters + */ +export const failures = internal.failures; +/** + * Extracts all unrecoverable defects from a `Cause`. + * + * **Details** + * + * This function returns a chunk of values representing unexpected errors + * (`Die`). It's handy for capturing or logging unanticipated failures that + * might need special handling, such as bug reports. + * + * @since 2.0.0 + * @category Getters + */ +export const defects = internal.defects; +/** + * Collects all `FiberId`s responsible for interrupting a fiber. + * + * **Details** + * + * This function returns a set of IDs indicating which fibers caused + * interruptions within this `Cause`. It's useful for debugging concurrency + * issues or tracing cancellations. + * + * @since 2.0.0 + * @category Getters + */ +export const interruptors = internal.interruptors; +/** + * Retrieves the first `Fail` error in a `Cause`, if present. + * + * **Details** + * + * This function returns an `Option` containing the first recoverable error + * (`E`) from the cause. It's often used to quickly check if there's a primary + * error to handle or display. + * + * @since 2.0.0 + * @category Getters + */ +export const failureOption = internal.failureOption; +/** + * Splits a `Cause` into either its first `Fail` error or the rest of the cause + * (which might only contain `Die` or `Interrupt`). + * + * **Details** + * + * This function either returns the checked error (`E`) or the remaining + * `Cause` with defects/interruptions. It helps you decide if there's a + * recoverable path or if only unhandled issues remain. + * + * @since 2.0.0 + * @category Getters + */ +export const failureOrCause = internal.failureOrCause; +/** + * Strips out failures with an error of `None` from a `Cause>`. + * + * **Details** + * + * This function turns a `Cause>` into an `Option>`. If the + * cause only contains failures of `None`, it becomes `None`; otherwise, it + * returns a `Cause` of the remaining errors. It's helpful when working with + * optional errors and filtering out certain error paths. + * + * @since 2.0.0 + * @category Getters + */ +export const flipCauseOption = internal.flipCauseOption; +/** + * Retrieves the first `Die` defect in a `Cause`, if present. + * + * **Details** + * + * This function returns an `Option` containing the first unexpected failure + * (`Die`) discovered. It's helpful for diagnosing the primary defect in a chain + * of errors. + * + * @since 2.0.0 + * @category Getters + */ +export const dieOption = internal.dieOption; +/** + * Retrieves the first `Interrupt` in a `Cause`, if present. + * + * **Details** + * + * This function returns an `Option` with the first fiber interruption + * discovered. This is particularly useful for concurrency analysis or debugging + * cancellations. + * + * @since 2.0.0 + * @category Getters + */ +export const interruptOption = internal.interruptOption; +/** + * Removes all `Fail` and `Interrupt` nodes, keeping only defects (`Die`) in a + * `Cause`. + * + * **Details** + * + * This function strips a cause of recoverable errors and interruptions, leaving + * only unexpected failures. If no defects remain, it returns `None`. It's + * valuable for focusing only on unanticipated problems when both known errors + * and defects could occur. + * + * @since 2.0.0 + * @category Getters + */ +export const keepDefects = internal.keepDefects; +// TODO(4.0): remove? what's the point of this API? +/** + * Linearizes a `Cause` into a set of parallel causes, each containing a + * sequential chain of failures. + * + * **Details** + * + * This function reorganizes the cause structure so that you can analyze each + * parallel branch separately, even if they have multiple sequential errors. + * + * @since 2.0.0 + * @category Getters + */ +export const linearize = internal.linearize; +/** + * Removes `Fail` and `Interrupt` nodes from a `Cause`, keeping only defects + * (`Die`). + * + * **Details** + * + * This function is similar to `keepDefects` but returns a `Cause` + * directly, which can still store `Die` or finalizer-related defects. It's + * helpful for analyzing only the irrecoverable portion of the error. + * + * @since 2.0.0 + * @category Getters + */ +export const stripFailures = internal.stripFailures; +/** + * Removes matching defects from a `Cause` using a partial function, returning + * the remainder. + * + * **Details** + * + * This function applies a user-defined extraction function to each defect + * (`Die`). If the function matches the defect, that defect is removed. If all + * defects match, the result is `None`. Otherwise, you get a `Cause` with the + * unmatched defects. + * + * @since 2.0.0 + * @category Getters + */ +export const stripSomeDefects = internal.stripSomeDefects; +/** + * Replaces any errors in a `Cause` with a provided constant error. + * + * **Details** + * + * This function transforms all `Fail` errors into the specified error value, + * preserving the structure of the `Cause`. It's useful when you no longer need + * the original error details but still want to keep the cause shape. + * + * @see {@link map} Apply a custom transformation to `Fail` errors + * + * @since 2.0.0 + * @category Mapping + */ +export const as = internal.as; +/** + * Transforms the errors in a `Cause` using a user-provided function. + * + * **Details** + * + * This function applies `f` to each `Fail` error while leaving defects (`Die`) + * and interruptions untouched. It's useful for changing or simplifying error + * types in your effectful workflows. + * + * @see {@link as} Replace errors with a single constant + * + * @since 2.0.0 + * @category Mapping + */ +export const map = internal.map; +/** + * Transforms errors in a `Cause` into new causes. + * + * **Details** + * + * This function applies a function `f` to each `Fail` error, converting it into + * a new `Cause`. This is especially powerful for merging or restructuring error + * types while preserving or combining cause information. + * + * @see {@link map} Apply a simpler transformation to errors + * + * @since 2.0.0 + * @category Sequencing + */ +export const flatMap = internal.flatMap; +/** + * Sequences two `Cause`s. The second `Cause` can be dependent on the result of + * the first `Cause`. + * + * @since 2.0.0 + * @category Sequencing + */ +export const andThen = internal.andThen; +/** + * Flattens a nested `Cause` structure. + * + * **Details** + * + * This function takes a `Cause>` and merges the layers into a single + * `Cause`. It's useful for eliminating additional nesting created by + * repeated transformations or compositions. + * + * @see {@link flatMap} Compose nested causes + * + * @since 2.0.0 + * @category Sequencing + */ +export const flatten = internal.flatten; +/** + * Checks if the current `Cause` contains or is equal to another `Cause`. + * + * **Details** + * + * This function returns `true` if `that` cause is part of or the same as + * the current `Cause`. It's useful when you need to check for specific + * error patterns or deduplicate repeated failures. + * + * @since 2.0.0 + * @category Elements + */ +export const contains = internal.contains; +/** + * Extracts the most "important" defect from a `Cause`. + * + * **Details** + * + * This function reduces a `Cause` to a single, prioritized defect. It evaluates + * the `Cause` in the following order of priority: + * + * 1. If the `Cause` contains a failure (e.g., from `Effect.fail`), it returns + * the raw error value. + * 2. If there is no failure, it looks for the first defect (e.g., from + * `Effect.die`). + * 3. If neither of the above is present, and the `Cause` stems from an + * interruption, it creates and returns an `InterruptedException`. + * + * This function ensures you can always extract a meaningful representation of + * the primary issue from a potentially complex `Cause` structure. + * + * **When to Use** + * + * Use this function when you need to extract the most relevant error or defect + * from a `Cause`, especially in scenarios where multiple errors or defects may + * be present. It's particularly useful for simplifying error reporting or + * logging. + * + * @see {@link squashWith} Allows transforming failures into defects when squashing. + * + * @since 2.0.0 + * @category Destructors + */ +export const squash = core.causeSquash; +/** + * Extracts the most "important" defect from a `Cause`, transforming failures + * into defects using a provided function. + * + * **Details** + * + * This function reduces a `Cause` to a single, prioritized defect, while + * allowing you to transform recoverable failures into defects through a custom + * function. It processes the `Cause` in the following order: + * + * 1. If the `Cause` contains a failure (e.g., from `Effect.fail`), it applies + * the provided function `f` to the error to transform it into a defect. + * 2. If there is no failure, it looks for the first defect (e.g., from + * `Effect.die`) and returns it. + * 3. If neither is present and the `Cause` stems from an interruption, it + * returns an `InterruptedException`. + * + * This function is particularly useful when you need custom handling or + * transformation of errors while processing a `Cause`. + * + * @see {@link squash} Extracts the most "important" defect without transforming failures. + * + * @since 2.0.0 + * @category Destructors + */ +export const squashWith = core.causeSquashWith; +/** + * Searches a `Cause` using a partial function to extract information. + * + * **Details** + * + * This function allows you to search through a `Cause` using a custom partial + * function. The partial function is applied to the `Cause`, and if it matches, + * the result is returned wrapped in a `Some`. If no match is found, the result + * is `None`. + * + * This is particularly useful when you are only interested in specific types of + * errors, defects, or interruption causes within a potentially complex `Cause` + * structure. By leveraging a partial function, you can focus on extracting only + * the relevant information you care about. + * + * The partial function should return an `Option` indicating whether it matched + * and the value it extracted. + * + * @since 2.0.0 + * @category Elements + */ +export const find = internal.find; +/** + * Preserves parts of a `Cause` that match a given predicate. + * + * **Details** + * + * This function allows you to retain only the parts of a `Cause` structure that + * match a specified predicate or refinement. Any parts of the `Cause` that do + * not match the provided condition are excluded from the result. + * + * You can use this function in two ways: + * - With a `Predicate`: A function that evaluates whether a `Cause` should be + * retained based on its value. + * - With a `Refinement`: A more specific predicate that can refine the type of + * the `Cause`. + * + * This is useful when you need to extract specific types of errors, defects, or + * interruptions from a `Cause` while discarding unrelated parts. + * + * @since 2.0.0 + * @category Filtering + */ +export const filter = internal.filter; +/** + * Transforms a `Cause` into a single value using custom handlers for each + * possible case. + * + * **Details** + * + * This function processes a `Cause` by applying a set of custom handlers to + * each possible type of cause: `Empty`, `Fail`, `Die`, `Interrupt`, + * `Sequential`, and `Parallel`. The result of this function is a single value + * of type `Z`. This function allows you to define exactly how to handle each + * part of a `Cause`, whether it's a failure, defect, interruption, or a + * combination of these. + * + * The options parameter provides handlers for: + * - `onEmpty`: Handles the case where the cause is `Empty`, meaning no errors + * occurred. + * - `onFail`: Processes a failure with an error of type `E`. + * - `onDie`: Processes a defect (unexpected error). + * - `onInterrupt`: Handles a fiber interruption, providing the `FiberId` of the + * interruption. + * - `onSequential`: Combines two sequential causes into a single value of type + * `Z`. + * - `onParallel`: Combines two parallel causes into a single value of type `Z`. + * + * @since 2.0.0 + * @category Matching + */ +export const match = internal.match; +/** + * Combines all parts of a `Cause` into a single value by starting with an + * initial value. + * + * **Details** + * + * This function processes a `Cause` by starting with an initial value (`zero`) + * and applying a custom function (`pf`) to combine all elements of the `Cause` + * into a single result of type `Z`. The custom function determines how each + * part of the `Cause` contributes to the final result. The function can return + * an `Option` to either continue combining values or skip specific parts of the + * `Cause`. + * + * This function is useful for tasks such as: + * - Aggregating error messages from a `Cause` into a single string. + * - Summarizing the structure of a `Cause` into a simplified result. + * - Filtering or processing only specific parts of a `Cause`. + * + * The reduction proceeds in a top-down manner, visiting all nodes in the + * `Cause` structure. This gives you complete control over how each part of the + * `Cause` contributes to the final result. + * + * @since 2.0.0 + * @category Reducing + */ +export const reduce = internal.reduce; +/** + * Combines all parts of a `Cause` into a single value using a custom reducer + * and a context. + * + * **Details** + * + * This function allows you to reduce a `Cause` into a single value of type `Z` + * using a custom `CauseReducer`. A `CauseReducer` provides methods to handle + * specific parts of the `Cause`, such as failures, defects, or interruptions. + * Additionally, this function provides access to a `context` value, which can + * be used to carry information or maintain state during the reduction process. + * + * This is particularly useful when the reduction process needs additional + * context or configuration, such as: + * - Aggregating error details with dynamic formatting. + * - Collecting logs or statistics about the `Cause`. + * - Performing stateful transformations based on the `context`. + * + * @see {@link reduce} To reduce a `Cause` without additional context. + * + * @since 2.0.0 + * @category Reducing + */ +export const reduceWithContext = internal.reduceWithContext; +/** + * Creates an error that indicates a `Fiber` was interrupted. + * + * **Details** + * + * This function constructs an `InterruptedException` recognized by the Effect + * runtime. It is usually thrown or returned when a fiber's execution is + * interrupted by external events or by another fiber. This is particularly + * helpful in concurrent programs where fibers may halt each other before + * completion. + * + * @since 2.0.0 + * @category Errors + */ +export const InterruptedException = core.InterruptedException; +/** + * Checks if a given unknown value is an `InterruptedException`. + * + * @since 2.0.0 + * @category Guards + */ +export const isInterruptedException = core.isInterruptedException; +/** + * Creates an error indicating an invalid method argument. + * + * **Details** + * + * This function constructs an `IllegalArgumentException`. It is typically + * thrown or returned when an operation receives improper inputs, such as + * out-of-range values or invalid object states. + * + * @since 2.0.0 + * @category Errors + */ +export const IllegalArgumentException = core.IllegalArgumentException; +/** + * Checks if a given unknown value is an `IllegalArgumentException`. + * + * @since 2.0.0 + * @category Guards + */ +export const isIllegalArgumentException = core.isIllegalArgumentException; +/** + * Creates an error indicating a missing element. + * + * **Details** + * + * This function constructs a `NoSuchElementException`. It helps you clearly + * communicate that a required element is unavailable. + * + * @since 2.0.0 + * @category Errors + */ +export const NoSuchElementException = core.NoSuchElementException; +/** + * Checks if a given unknown value is a `NoSuchElementException`. + * + * @since 2.0.0 + * @category Guards + */ +export const isNoSuchElementException = core.isNoSuchElementException; +/** + * Creates an error for general runtime errors. + * + * **Details** + * + * This function constructs a `RuntimeException`, for errors that occur at + * runtime but are not specifically typed or categorized as interruptions, + * missing elements, or invalid arguments. It helps unify a wide range of + * unexpected conditions under a single, recognizable error type. + * + * @since 2.0.0 + * @category Errors + */ +export const RuntimeException = core.RuntimeException; +/** + * Checks if a given unknown value is a `RuntimeException`. + * + * @since 2.0.0 + * @category Guards + */ +export const isRuntimeException = core.isRuntimeException; +/** + * Creates an error for operations that exceed their expected time. + * + * **Details** + * + * This function constructs a `TimeoutException`. It is typically used to signal + * that an operation or fiber did not complete within a designated time limit, + * allowing you to handle slow or hanging processes. + * + * @since 2.0.0 + * @category Errors + */ +export const TimeoutException = core.TimeoutException; +/** + * Checks if a given unknown value is a `TimeoutException`. + * + * @since 3.15.0 + * @category Guards + */ +export const isTimeoutException = core.isTimeoutException; +/** + * Creates an instance of `UnknownException`, an error object used to handle + * unknown errors such as those from rejected promises. + * + * **Details** + * + * This function constructs an `UnknownException` with flexible behavior for + * managing the error message and cause. + * + * The required `error` argument is passed as the `cause` to the global `Error` + * constructor, ensuring that the original cause is preserved in the error chain + * for debugging purposes. This ensures that the origin stack trace is + * preserved. + * + * The `error` argument is always stored in the `error` property of the + * `UnknownException` instance for reference, regardless of its type. + * + * Additionally, if you provide a `message` argument, it is used as the error + * message. If no `message` is provided, the error message defaults to `"An + * unknown error occurred"`. + * + * **When to Use** + * + * Use this function when you need to handle unexpected or unknown errors in + * your application, particularly when the source of the error might not provide + * a clear message. This is useful for wrapping generic errors thrown from + * promises or external APIs. + * + * @since 2.0.0 + * @category Errors + */ +export const UnknownException = core.UnknownException; +/** + * Checks if a given unknown value is an `UnknownException`. + * + * @since 2.0.0 + * @category Guards + */ +export const isUnknownException = core.isUnknownException; +/** + * Creates an error indicating resource capacity has been exceeded. + * + * **Details** + * + * This function constructs an `ExceededCapacityException`, signifying that an + * operation or resource usage surpassed established limits. This can be + * essential for concurrency or resource management situations, ensuring your + * application doesn't go beyond acceptable thresholds. + * + * @since 3.5.0 + * @category Errors + */ +export const ExceededCapacityException = core.ExceededCapacityException; +/** + * Checks if a given unknown value is an `ExceededCapacityException`. + * + * @since 3.5.0 + * @category Guards + */ +export const isExceededCapacityException = core.isExceededCapacityException; +/** + * Converts a `Cause` into a human-readable string. + * + * **Details** + * + * This function pretty-prints the entire `Cause`, including any failures, + * defects, and interruptions. It can be especially helpful for logging, + * debugging, or displaying structured errors to users. + * + * You can optionally pass `options` to configure how the error cause is + * rendered. By default, it includes essential details of all errors in the + * `Cause`. + * + * @see {@link prettyErrors} Get a list of `PrettyError` objects instead of a single string. + * + * @since 2.0.0 + * @category Formatting + */ +export const pretty = internal.pretty; +/** + * Returns a list of prettified errors (`PrettyError`) from a `Cause`. + * + * **Details** + * + * This function inspects the entire `Cause` and produces an array of + * `PrettyError` objects. Each object may include additional metadata, such as a + * `Span`, to provide deeper insights into where and how the error occurred. + * + * @since 3.2.0 + * @category Formatting + */ +export const prettyErrors = internal.prettyErrors; +/** + * Retrieves the original, unproxied error instance from an error object. + * + * **Details** + * + * This function returns the underlying error object without any + * library-specific wrapping or proxying that might occur during error handling. + * This can be essential if you need direct access to the error's native + * properties, such as stack traces or custom data fields, for detailed + * debugging or integration with external systems. + * + * @since 2.0.0 + * @category Errors + */ +export const originalError = core.originalInstance; +//# sourceMappingURL=Cause.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Cause.js.map b/backend/node_modules/effect/dist/esm/Cause.js.map new file mode 100644 index 0000000000000000000000000000000000000000..e4b24881ab1a4782500baa513e3bc6268448c1c9 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Cause.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Cause.js","names":["internal","core","CauseTypeId","RuntimeExceptionTypeId","InterruptedExceptionTypeId","IllegalArgumentExceptionTypeId","NoSuchElementExceptionTypeId","InvalidPubSubCapacityExceptionTypeId","ExceededCapacityExceptionTypeId","TimeoutExceptionTypeId","UnknownExceptionTypeId","YieldableError","empty","fail","die","interrupt","parallel","sequential","isCause","isEmptyType","isFailType","isDieType","isInterruptType","isSequentialType","isParallelType","size","isEmpty","isFailure","isDie","isInterrupted","isInterruptedOnly","failures","defects","interruptors","failureOption","failureOrCause","flipCauseOption","dieOption","interruptOption","keepDefects","linearize","stripFailures","stripSomeDefects","as","map","flatMap","andThen","flatten","contains","squash","causeSquash","squashWith","causeSquashWith","find","filter","match","reduce","reduceWithContext","InterruptedException","isInterruptedException","IllegalArgumentException","isIllegalArgumentException","NoSuchElementException","isNoSuchElementException","RuntimeException","isRuntimeException","TimeoutException","isTimeoutException","UnknownException","isUnknownException","ExceededCapacityException","isExceededCapacityException","pretty","prettyErrors","originalError","originalInstance"],"sources":["../../src/Cause.ts"],"sourcesContent":[null],"mappings":"AA+BA,OAAO,KAAKA,QAAQ,MAAM,qBAAqB;AAC/C,OAAO,KAAKC,IAAI,MAAM,oBAAoB;AAS1C;;;;;;;;;;;;;;AAcA,OAAO,MAAMC,WAAW,GAAkBF,QAAQ,CAACE,WAAW;AAQ9D;;;;;;;;;;;;;;AAcA,OAAO,MAAMC,sBAAsB,GAAkBF,IAAI,CAACE,sBAAsB;AAQhF;;;;;;;;;;;;;;AAcA,OAAO,MAAMC,0BAA0B,GAAkBH,IAAI,CAACG,0BAA0B;AAQxF;;;;;;;;;;;;;;AAcA,OAAO,MAAMC,8BAA8B,GAAkBJ,IAAI,CAACI,8BAA8B;AAQhG;;;;;;;;;;;;;;AAcA,OAAO,MAAMC,4BAA4B,GAAkBL,IAAI,CAACK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E,IAAI,CAACsE,2BAA2B;AAElC;;;;;;;;;;;;;;;;;;AAkBA,OAAO,MAAMC,MAAM,GAEJxE,QAAQ,CAACwE,MAAM;AAY9B;;;;;;;;;;;;AAYA,OAAO,MAAMC,YAAY,GAA+CzE,QAAQ,CAACyE,YAAY;AAE7F;;;;;;;;;;;;;;AAcA,OAAO,MAAMC,aAAa,GAAqBzE,IAAI,CAAC0E,gBAAgB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Channel.js b/backend/node_modules/effect/dist/esm/Channel.js new file mode 100644 index 0000000000000000000000000000000000000000..171161116238fb544c116d3b4465139eaa36ceda --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Channel.js @@ -0,0 +1,887 @@ +import * as channel from "./internal/channel.js"; +import * as core from "./internal/core-stream.js"; +import * as sink from "./internal/sink.js"; +import * as stream from "./internal/stream.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const ChannelTypeId = core.ChannelTypeId; +/** + * @since 2.0.0 + * @category symbols + */ +export const ChannelExceptionTypeId = channel.ChannelExceptionTypeId; +/** + * @since 3.5.4 + * @category refinements + */ +export const isChannel = core.isChannel; +/** + * @since 2.0.0 + * @category constructors + */ +export const acquireUseRelease = channel.acquireUseRelease; +/** + * @since 2.0.0 + * @category constructors + */ +export const acquireReleaseOut = core.acquireReleaseOut; +/** + * Returns a new channel that is the same as this one, except the terminal + * value of the channel is the specified constant value. + * + * This method produces the same result as mapping this channel to the + * specified constant value. + * + * @since 2.0.0 + * @category mapping + */ +export const as = channel.as; +/** + * @since 2.0.0 + * @category mapping + */ +export const asVoid = channel.asVoid; +/** + * Creates a channel backed by a buffer. When the buffer is empty, the channel + * will simply passthrough its input as output. However, when the buffer is + * non-empty, the value inside the buffer will be passed along as output. + * + * @since 2.0.0 + * @category constructors + */ +export const buffer = channel.buffer; +/** + * @since 2.0.0 + * @category constructors + */ +export const bufferChunk = channel.bufferChunk; +/** + * Returns a new channel that is the same as this one, except if this channel + * errors for any typed error, then the returned channel will switch over to + * using the fallback channel returned by the specified error handler. + * + * @since 2.0.0 + * @category error handling + */ +export const catchAll = channel.catchAll; +/** + * Returns a new channel that is the same as this one, except if this channel + * errors for any typed error, then the returned channel will switch over to + * using the fallback channel returned by the specified error handler. + * + * @since 2.0.0 + * @category error handling + */ +export const catchAllCause = core.catchAllCause; +/** + * Concat sequentially a channel of channels. + * + * @since 2.0.0 + * @category constructors + */ +export const concatAll = core.concatAll; +/** + * Concat sequentially a channel of channels. + * + * @since 2.0.0 + * @category constructors + */ +export const concatAllWith = core.concatAllWith; +/** + * Returns a new channel whose outputs are fed to the specified factory + * function, which creates new channels in response. These new channels are + * sequentially concatenated together, and all their outputs appear as outputs + * of the newly returned channel. + * + * @since 2.0.0 + * @category utils + */ +export const concatMap = channel.concatMap; +/** + * Returns a new channel whose outputs are fed to the specified factory + * function, which creates new channels in response. These new channels are + * sequentially concatenated together, and all their outputs appear as outputs + * of the newly returned channel. The provided merging function is used to + * merge the terminal values of all channels into the single terminal value of + * the returned channel. + * + * @since 2.0.0 + * @category utils + */ +export const concatMapWith = core.concatMapWith; +/** + * Returns a new channel whose outputs are fed to the specified factory + * function, which creates new channels in response. These new channels are + * sequentially concatenated together, and all their outputs appear as outputs + * of the newly returned channel. The provided merging function is used to + * merge the terminal values of all channels into the single terminal value of + * the returned channel. + * + * @since 2.0.0 + * @category utils + */ +export const concatMapWithCustom = core.concatMapWithCustom; +/** + * Returns a new channel, which is the same as this one, except its outputs + * are filtered and transformed by the specified partial function. + * + * @since 2.0.0 + * @category utils + */ +export const collect = channel.collect; +/** + * Returns a new channel, which is the concatenation of all the channels that + * are written out by this channel. This method may only be called on channels + * that output other channels. + * + * @since 2.0.0 + * @category utils + */ +export const concatOut = channel.concatOut; +/** + * Returns a new channel which is the same as this one but applies the given + * function to the input channel's done value. + * + * @since 2.0.0 + * @category utils + */ +export const mapInput = channel.mapInput; +/** + * Returns a new channel which is the same as this one but applies the given + * effectual function to the input channel's done value. + * + * @since 2.0.0 + * @category utils + */ +export const mapInputEffect = channel.mapInputEffect; +/** + * Returns a new channel which is the same as this one but applies the given + * function to the input channel's error value. + * + * @since 2.0.0 + * @category utils + */ +export const mapInputError = channel.mapInputError; +/** + * Returns a new channel which is the same as this one but applies the given + * effectual function to the input channel's error value. + * + * @since 2.0.0 + * @category utils + */ +export const mapInputErrorEffect = channel.mapInputErrorEffect; +/** + * Returns a new channel which is the same as this one but applies the given + * function to the input channel's output elements. + * + * @since 2.0.0 + * @category utils + */ +export const mapInputIn = channel.mapInputIn; +/** + * Returns a new channel which is the same as this one but applies the given + * effectual function to the input channel's output elements. + * + * @since 2.0.0 + * @category utils + */ +export const mapInputInEffect = channel.mapInputInEffect; +/** + * Returns a new channel, which is the same as this one, except that all the + * outputs are collected and bundled into a tuple together with the terminal + * value of this channel. + * + * As the channel returned from this channel collects all of this channel's + * output into an in- memory chunk, it is not safe to call this method on + * channels that output a large or unbounded number of values. + * + * @since 2.0.0 + * @category utils + */ +export const doneCollect = channel.doneCollect; +/** + * Returns a new channel which reads all the elements from upstream's output + * channel and ignores them, then terminates with the upstream result value. + * + * @since 2.0.0 + * @category utils + */ +export const drain = channel.drain; +/** + * Returns a new channel which connects the given `AsyncInputProducer` as + * this channel's input. + * + * @since 2.0.0 + * @category utils + */ +export const embedInput = core.embedInput; +/** + * Returns a new channel that collects the output and terminal value of this + * channel, which it then writes as output of the returned channel. + * + * @since 2.0.0 + * @category utils + */ +export const emitCollect = channel.emitCollect; +/** + * Returns a new channel with an attached finalizer. The finalizer is + * guaranteed to be executed so long as the channel begins execution (and + * regardless of whether or not it completes). + * + * @since 2.0.0 + * @category utils + */ +export const ensuring = channel.ensuring; +/** + * Returns a new channel with an attached finalizer. The finalizer is + * guaranteed to be executed so long as the channel begins execution (and + * regardless of whether or not it completes). + * + * @since 2.0.0 + * @category utils + */ +export const ensuringWith = core.ensuringWith; +/** + * Accesses the whole context of the channel. + * + * @since 2.0.0 + * @category context + */ +export const context = channel.context; +/** + * Accesses the context of the channel with the specified function. + * + * @since 2.0.0 + * @category context + */ +export const contextWith = channel.contextWith; +/** + * Accesses the context of the channel in the context of a channel. + * + * @since 2.0.0 + * @category context + */ +export const contextWithChannel = channel.contextWithChannel; +/** + * Accesses the context of the channel in the context of an effect. + * + * @since 2.0.0 + * @category context + */ +export const contextWithEffect = channel.contextWithEffect; +/** + * Constructs a channel that fails immediately with the specified error. + * + * @since 2.0.0 + * @category constructors + */ +export const fail = core.fail; +/** + * Constructs a channel that succeeds immediately with the specified lazily + * evaluated value. + * + * @since 2.0.0 + * @category constructors + */ +export const failSync = core.failSync; +/** + * Constructs a channel that fails immediately with the specified `Cause`. + * + * @since 2.0.0 + * @category constructors + */ +export const failCause = core.failCause; +/** + * Constructs a channel that succeeds immediately with the specified lazily + * evaluated `Cause`. + * + * @since 2.0.0 + * @category constructors + */ +export const failCauseSync = core.failCauseSync; +/** + * Returns a new channel, which sequentially combines this channel, together + * with the provided factory function, which creates a second channel based on + * the terminal value of this channel. The result is a channel that will first + * perform the functions of this channel, before performing the functions of + * the created channel (including yielding its terminal value). + * + * @since 2.0.0 + * @category sequencing + */ +export const flatMap = core.flatMap; +/** + * Returns a new channel, which flattens the terminal value of this channel. + * This function may only be called if the terminal value of this channel is + * another channel of compatible types. + * + * @since 2.0.0 + * @category sequencing + */ +export const flatten = channel.flatten; +/** + * Folds over the result of this channel. + * + * @since 2.0.0 + * @category utils + */ +export const foldChannel = channel.foldChannel; +/** + * Folds over the result of this channel including any cause of termination. + * + * @since 2.0.0 + * @category utils + */ +export const foldCauseChannel = core.foldCauseChannel; +/** + * Use an effect to end a channel. + * + * @since 2.0.0 + * @category constructors + */ +export const fromEffect = core.fromEffect; +/** + * Constructs a channel from an `Either`. + * + * @since 2.0.0 + * @category constructors + */ +export const fromEither = channel.fromEither; +/** + * Construct a `Channel` from an `AsyncInputConsumer`. + * + * @since 2.0.0 + * @category constructors + */ +export const fromInput = channel.fromInput; +/** + * Construct a `Channel` from a `PubSub`. + * + * @since 2.0.0 + * @category constructors + */ +export const fromPubSub = channel.fromPubSub; +/** + * Construct a `Channel` from a `PubSub` within a scoped effect. + * + * @since 2.0.0 + * @category constructors + */ +export const fromPubSubScoped = channel.fromPubSubScoped; +/** + * Construct a `Channel` from an `Option`. + * + * @since 2.0.0 + * @category constructors + */ +export const fromOption = channel.fromOption; +/** + * Construct a `Channel` from a `Queue`. + * + * @since 2.0.0 + * @category constructors + */ +export const fromQueue = channel.fromQueue; +/** + * @since 2.0.0 + * @category constructors + */ +export const identity = channel.identityChannel; +/** + * Returns a new channel, which is the same as this one, except it will be + * interrupted when the specified effect completes. If the effect completes + * successfully before the underlying channel is done, then the returned + * channel will yield the success value of the effect as its terminal value. + * On the other hand, if the underlying channel finishes first, then the + * returned channel will yield the success value of the underlying channel as + * its terminal value. + * + * @since 2.0.0 + * @category utils + */ +export const interruptWhen = channel.interruptWhen; +/** + * Returns a new channel, which is the same as this one, except it will be + * interrupted when the specified deferred is completed. If the deferred is + * completed before the underlying channel is done, then the returned channel + * will yield the value of the deferred. Otherwise, if the underlying channel + * finishes first, then the returned channel will yield the value of the + * underlying channel. + * + * @since 2.0.0 + * @category utils + */ +export const interruptWhenDeferred = channel.interruptWhenDeferred; +/** + * Returns a new channel, which is the same as this one, except the terminal + * value of the returned channel is created by applying the specified function + * to the terminal value of this channel. + * + * @since 2.0.0 + * @category mapping + */ +export const map = channel.map; +/** + * Returns a new channel, which is the same as this one, except the terminal + * value of the returned channel is created by applying the specified + * effectful function to the terminal value of this channel. + * + * @since 2.0.0 + * @category mapping + */ +export const mapEffect = channel.mapEffect; +/** + * Returns a new channel, which is the same as this one, except the failure + * value of the returned channel is created by applying the specified function + * to the failure value of this channel. + * + * @since 2.0.0 + * @category mapping + */ +export const mapError = channel.mapError; +/** + * A more powerful version of `mapError` which also surfaces the `Cause` + * of the channel failure. + * + * @since 2.0.0 + * @category mapping + */ +export const mapErrorCause = channel.mapErrorCause; +/** + * Maps the output of this channel using the specified function. + * + * @since 2.0.0 + * @category mapping + */ +export const mapOut = channel.mapOut; +/** + * Creates a channel that is like this channel but the given effectful function + * gets applied to each emitted output element. + * + * @since 2.0.0 + * @category mapping + */ +export const mapOutEffect = channel.mapOutEffect; +/** + * Creates a channel that is like this channel but the given Effect function gets + * applied to each emitted output element, taking `n` elements at once and + * mapping them in parallel. + * + * @since 2.0.0 + * @category mapping + */ +export const mapOutEffectPar = channel.mapOutEffectPar; +/** + * @since 2.0.0 + * @category utils + */ +export const mergeAll = channel.mergeAll; +/** + * @since 2.0.0 + * @category utils + */ +export const mergeAllUnbounded = channel.mergeAllUnbounded; +/** + * @since 2.0.0 + * @category utils + */ +export const mergeAllUnboundedWith = channel.mergeAllUnboundedWith; +/** + * @since 2.0.0 + * @category utils + */ +export const mergeAllWith = channel.mergeAllWith; +/** + * Returns a new channel which creates a new channel for each emitted element + * and merges some of them together. Different merge strategies control what + * happens if there are more than the given maximum number of channels gets + * created. See `Channel.mergeAll`. + * + * @since 2.0.0 + * @category mapping + */ +export const mergeMap = channel.mergeMap; +/** + * Returns a new channel which merges a number of channels emitted by this + * channel using the back pressuring merge strategy. See `Channel.mergeAll`. + * + * @since 2.0.0 + * @category utils + */ +export const mergeOut = channel.mergeOut; +/** + * Returns a new channel which merges a number of channels emitted by this + * channel using the back pressuring merge strategy and uses a given function + * to merge each completed subchannel's result value. See + * `Channel.mergeAll`. + * + * @since 2.0.0 + * @category utils + */ +export const mergeOutWith = channel.mergeOutWith; +/** + * Returns a new channel, which is the merge of this channel and the specified + * channel, where the behavior of the returned channel on left or right early + * termination is decided by the specified `leftDone` and `rightDone` merge + * decisions. + * + * @since 2.0.0 + * @category utils + */ +export const mergeWith = channel.mergeWith; +/** + * Returns a channel that never completes + * + * @since 2.0.0 + * @category constructors + */ +export const never = channel.never; +/** + * Translates channel failure into death of the fiber, making all failures + * unchecked and not a part of the type of the channel. + * + * @since 2.0.0 + * @category error handling + */ +export const orDie = channel.orDie; +/** + * Keeps none of the errors, and terminates the fiber with them, using the + * specified function to convert the `OutErr` into a defect. + * + * @since 2.0.0 + * @category error handling + */ +export const orDieWith = channel.orDieWith; +/** + * Returns a new channel that will perform the operations of this one, until + * failure, and then it will switch over to the operations of the specified + * fallback channel. + * + * @since 2.0.0 + * @category error handling + */ +export const orElse = channel.orElse; +/** + * Returns a new channel that pipes the output of this channel into the + * specified channel. The returned channel has the input type of this channel, + * and the output type of the specified channel, terminating with the value of + * the specified channel. + * + * @since 2.0.0 + * @category utils + */ +export const pipeTo = core.pipeTo; +/** + * Returns a new channel that pipes the output of this channel into the + * specified channel and preserves this channel's failures without providing + * them to the other channel for observation. + * + * @since 2.0.0 + * @category utils + */ +export const pipeToOrFail = channel.pipeToOrFail; +/** + * Provides the channel with its required context, which eliminates its + * dependency on `Env`. + * + * @since 2.0.0 + * @category context + */ +export const provideContext = core.provideContext; +/** + * Provides a layer to the channel, which translates it to another level. + * + * @since 2.0.0 + * @category context + */ +export const provideLayer = channel.provideLayer; +/** + * Transforms the context being provided to the channel with the specified + * function. + * + * @since 2.0.0 + * @category context + */ +export const mapInputContext = channel.mapInputContext; +/** + * Splits the context into two parts, providing one part using the + * specified layer and leaving the remainder `Env0`. + * + * @since 2.0.0 + * @category context + */ +export const provideSomeLayer = channel.provideSomeLayer; +/** + * Provides the effect with the single service it requires. If the effect + * requires more than one service use `provideContext` instead. + * + * @since 2.0.0 + * @category context + */ +export const provideService = channel.provideService; +/** + * @since 2.0.0 + * @category constructors + */ +export const read = channel.read; +/** + * @since 2.0.0 + * @category constructors + */ +export const readOrFail = core.readOrFail; +/** + * @since 2.0.0 + * @category constructors + */ +export const readWith = core.readWith; +/** + * @since 2.0.0 + * @category constructors + */ +export const readWithCause = core.readWithCause; +/** + * Creates a channel which repeatedly runs this channel. + * + * @since 2.0.0 + * @category utils + */ +export const repeated = channel.repeated; +/** + * Runs a channel until the end is received. + * + * @since 2.0.0 + * @category destructors + */ +export const run = channel.run; +/** + * Run the channel until it finishes with a done value or fails with an error + * and collects its emitted output elements. + * + * The channel must not read any input. + * + * @since 2.0.0 + * @category destructors + */ +export const runCollect = channel.runCollect; +/** + * Runs a channel until the end is received. + * + * @since 2.0.0 + * @category destructors + */ +export const runDrain = channel.runDrain; +/** + * Run the channel until it finishes with a done value or fails with an error. + * The channel must not read any input or write any output. + * + * Closing the channel, which includes execution of all the finalizers + * attached to the channel will be added to the current scope as a finalizer. + * + * @since 3.11.0 + * @category destructors + */ +export const runScoped = channel.runScoped; +/** + * Use a scoped effect to emit an output element. + * + * @since 2.0.0 + * @category constructors + */ +export const scoped = channel.scoped; +/** + * Use a function that receives a scope and returns an effect to emit an output + * element. The output element will be the result of the returned effect, if + * successful. + * + * @since 3.11.0 + * @category constructors + */ +export const scopedWith = channel.scopedWith; +/** + * Splits strings on newlines. Handles both Windows newlines (`\r\n`) and UNIX + * newlines (`\n`). + * + * @since 2.0.0 + * @category combinators + */ +export const splitLines = channel.splitLines; +/** + * Constructs a channel that succeeds immediately with the specified value. + * + * @since 2.0.0 + * @category constructors + */ +export const succeed = core.succeed; +/** + * Lazily constructs a channel from the given side effect. + * + * @since 2.0.0 + * @category constructors + */ +export const suspend = core.suspend; +/** + * Constructs a channel that succeeds immediately with the specified lazy value. + * + * @since 2.0.0 + * @category constructors + */ +export const sync = core.sync; +/** + * Converts a `Channel` to a `PubSub`. + * + * @since 2.0.0 + * @category destructors + */ +export const toPubSub = channel.toPubSub; +/** + * Returns a scoped `Effect` that can be used to repeatedly pull elements from + * the constructed `Channel`. The pull effect fails with the channel's failure + * in case the channel fails, or returns either the channel's done value or an + * emitted element. + * + * @since 2.0.0 + * @category destructors + */ +export const toPull = channel.toPull; +/** + * Returns an `Effect` that can be used to repeatedly pull elements from the + * constructed `Channel` within the provided `Scope`. The pull effect fails + * with the channel's failure in case the channel fails, or returns either the + * channel's done value or an emitted element. + * + * @since 3.11.0 + * @category destructors + */ +export const toPullIn = channel.toPullIn; +/** + * Converts a `Channel` to a `Queue`. + * + * @since 2.0.0 + * @category destructors + */ +export const toQueue = channel.toQueue; +/** Converts this channel to a `Sink`. + * + * @since 2.0.0 + * @category destructors + */ +export const toSink = sink.channelToSink; +/** + * Converts this channel to a `Stream`. + * + * @since 2.0.0 + * @category destructors + */ +export const toStream = stream.channelToStream; +const void_ = core.void; +export { +/** + * @since 2.0.0 + * @category constructors + */ +void_ as void }; +/** + * Constructs a `Channel` from an effect that will result in a `Channel` if + * successful. + * + * @since 2.0.0 + * @category constructors + */ +export const unwrap = channel.unwrap; +/** + * Constructs a `Channel` from a scoped effect that will result in a + * `Channel` if successful. + * + * @since 2.0.0 + * @category constructors + */ +export const unwrapScoped = channel.unwrapScoped; +/** + * Constructs a `Channel` from a function which receives a `Scope` and returns + * an effect that will result in a `Channel` if successful. + * + * @since 3.11.0 + * @category constructors + */ +export const unwrapScopedWith = channel.unwrapScopedWith; +/** + * Updates a service in the context of this channel. + * + * @since 2.0.0 + * @category context + */ +export const updateService = channel.updateService; +/** + * Wraps the channel with a new span for tracing. + * + * @since 2.0.0 + * @category tracing + */ +export const withSpan = channel.withSpan; +/** + * Writes a single value to the channel. + * + * @since 2.0.0 + * @category constructors + */ +export const write = core.write; +/** + * Writes a sequence of values to the channel. + * + * @since 2.0.0 + * @category constructors + */ +export const writeAll = channel.writeAll; +/** + * Writes a `Chunk` of values to the channel. + * + * @since 2.0.0 + * @category constructors + */ +export const writeChunk = channel.writeChunk; +/** + * Returns a new channel that is the sequential composition of this channel + * and the specified channel. The returned channel terminates with a tuple of + * the terminal values of both channels. + * + * @since 2.0.0 + * @category zipping + */ +export const zip = channel.zip; +/** + * Returns a new channel that is the sequential composition of this channel + * and the specified channel. The returned channel terminates with the + * terminal value of this channel. + * + * @since 2.0.0 + * @category zipping + */ +export const zipLeft = channel.zipLeft; +/** + * Returns a new channel that is the sequential composition of this channel + * and the specified channel. The returned channel terminates with the + * terminal value of that channel. + * + * @since 2.0.0 + * @category zipping + */ +export const zipRight = channel.zipRight; +/** + * Represents a generic checked exception which occurs when a `Channel` is + * executed. + * + * @since 2.0.0 + * @category errors + */ +export const ChannelException = channel.ChannelException; +/** + * Returns `true` if the specified value is an `ChannelException`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isChannelException = channel.isChannelException; +//# sourceMappingURL=Channel.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/ChildExecutorDecision.js b/backend/node_modules/effect/dist/esm/ChildExecutorDecision.js new file mode 100644 index 0000000000000000000000000000000000000000..00b5a8519243463af12f05368e58a5d07fc33c17 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/ChildExecutorDecision.js @@ -0,0 +1,64 @@ +/** + * @since 2.0.0 + */ +import * as internal from "./internal/channel/childExecutorDecision.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const ChildExecutorDecisionTypeId = internal.ChildExecutorDecisionTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +export const Continue = internal.Continue; +/** + * @since 2.0.0 + * @category constructors + */ +export const Close = internal.Close; +/** + * @since 2.0.0 + * @category constructors + */ +export const Yield = internal.Yield; +/** + * Returns `true` if the specified value is a `ChildExecutorDecision`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isChildExecutorDecision = internal.isChildExecutorDecision; +/** + * Returns `true` if the specified `ChildExecutorDecision` is a `Continue`, + * `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isContinue = internal.isContinue; +/** + * Returns `true` if the specified `ChildExecutorDecision` is a `Close`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isClose = internal.isClose; +/** + * Returns `true` if the specified `ChildExecutorDecision` is a `Yield`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isYield = internal.isYield; +/** + * Folds over a `ChildExecutorDecision` to produce a value of type `A`. + * + * @since 2.0.0 + * @category folding + */ +export const match = internal.match; +//# sourceMappingURL=ChildExecutorDecision.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/ChildExecutorDecision.js.map b/backend/node_modules/effect/dist/esm/ChildExecutorDecision.js.map new file mode 100644 index 0000000000000000000000000000000000000000..82c088ef6f8425b20076d295a931d79ebb75c789 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/ChildExecutorDecision.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ChildExecutorDecision.js","names":["internal","ChildExecutorDecisionTypeId","Continue","Close","Yield","isChildExecutorDecision","isContinue","isClose","isYield","match"],"sources":["../../src/ChildExecutorDecision.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,QAAQ,MAAM,6CAA6C;AAEvE;;;;AAIA,OAAO,MAAMC,2BAA2B,GAAkBD,QAAQ,CAACC,2BAA2B;AA4D9F;;;;AAIA,OAAO,MAAMC,QAAQ,GAAuCF,QAAQ,CAACE,QAAQ;AAE7E;;;;AAIA,OAAO,MAAMC,KAAK,GAA8CH,QAAQ,CAACG,KAAK;AAE9E;;;;AAIA,OAAO,MAAMC,KAAK,GAAuCJ,QAAQ,CAACI,KAAK;AAEvE;;;;;;;AAOA,OAAO,MAAMC,uBAAuB,GAA+CL,QAAQ,CAACK,uBAAuB;AAEnH;;;;;;;AAOA,OAAO,MAAMC,UAAU,GAAsDN,QAAQ,CAACM,UAAU;AAEhG;;;;;;;AAOA,OAAO,MAAMC,OAAO,GAAmDP,QAAQ,CAACO,OAAO;AAEvF;;;;;;;AAOA,OAAO,MAAMC,OAAO,GAAmDR,QAAQ,CAACQ,OAAO;AAEvF;;;;;;AAMA,OAAO,MAAMC,KAAK,GA4BdT,QAAQ,CAACS,KAAK","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Chunk.js b/backend/node_modules/effect/dist/esm/Chunk.js new file mode 100644 index 0000000000000000000000000000000000000000..8280ff78c096452bb62e8261123f088dacb9ac7e --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Chunk.js @@ -0,0 +1,1083 @@ +/** + * @since 2.0.0 + */ +import * as RA from "./Array.js"; +import * as Equal from "./Equal.js"; +import * as Equivalence from "./Equivalence.js"; +import { dual, identity, pipe } from "./Function.js"; +import * as Hash from "./Hash.js"; +import { format, NodeInspectSymbol, toJSON } from "./Inspectable.js"; +import * as O from "./Option.js"; +import * as Order from "./Order.js"; +import { pipeArguments } from "./Pipeable.js"; +import { hasProperty } from "./Predicate.js"; +const TypeId = /*#__PURE__*/Symbol.for("effect/Chunk"); +function copy(src, srcPos, dest, destPos, len) { + for (let i = srcPos; i < Math.min(src.length, srcPos + len); i++) { + dest[destPos + i - srcPos] = src[i]; + } + return dest; +} +const emptyArray = []; +/** + * Compares the two chunks of equal length using the specified function + * + * @category equivalence + * @since 2.0.0 + */ +export const getEquivalence = isEquivalent => Equivalence.make((self, that) => self.length === that.length && toReadonlyArray(self).every((value, i) => isEquivalent(value, unsafeGet(that, i)))); +const _equivalence = /*#__PURE__*/getEquivalence(Equal.equals); +const ChunkProto = { + [TypeId]: { + _A: _ => _ + }, + toString() { + return format(this.toJSON()); + }, + toJSON() { + return { + _id: "Chunk", + values: toReadonlyArray(this).map(toJSON) + }; + }, + [NodeInspectSymbol]() { + return this.toJSON(); + }, + [Equal.symbol](that) { + return isChunk(that) && _equivalence(this, that); + }, + [Hash.symbol]() { + return Hash.cached(this, Hash.array(toReadonlyArray(this))); + }, + [Symbol.iterator]() { + switch (this.backing._tag) { + case "IArray": + { + return this.backing.array[Symbol.iterator](); + } + case "IEmpty": + { + return emptyArray[Symbol.iterator](); + } + default: + { + return toReadonlyArray(this)[Symbol.iterator](); + } + } + }, + pipe() { + return pipeArguments(this, arguments); + } +}; +const makeChunk = backing => { + const chunk = Object.create(ChunkProto); + chunk.backing = backing; + switch (backing._tag) { + case "IEmpty": + { + chunk.length = 0; + chunk.depth = 0; + chunk.left = chunk; + chunk.right = chunk; + break; + } + case "IConcat": + { + chunk.length = backing.left.length + backing.right.length; + chunk.depth = 1 + Math.max(backing.left.depth, backing.right.depth); + chunk.left = backing.left; + chunk.right = backing.right; + break; + } + case "IArray": + { + chunk.length = backing.array.length; + chunk.depth = 0; + chunk.left = _empty; + chunk.right = _empty; + break; + } + case "ISingleton": + { + chunk.length = 1; + chunk.depth = 0; + chunk.left = _empty; + chunk.right = _empty; + break; + } + case "ISlice": + { + chunk.length = backing.length; + chunk.depth = backing.chunk.depth + 1; + chunk.left = _empty; + chunk.right = _empty; + break; + } + } + return chunk; +}; +/** + * Checks if `u` is a `Chunk` + * + * @category constructors + * @since 2.0.0 + */ +export const isChunk = u => hasProperty(u, TypeId); +const _empty = /*#__PURE__*/makeChunk({ + _tag: "IEmpty" +}); +/** + * @category constructors + * @since 2.0.0 + */ +export const empty = () => _empty; +/** + * Builds a `NonEmptyChunk` from an non-empty collection of elements. + * + * @category constructors + * @since 2.0.0 + */ +export const make = (...as) => unsafeFromNonEmptyArray(as); +/** + * Builds a `NonEmptyChunk` from a single element. + * + * @category constructors + * @since 2.0.0 + */ +export const of = a => makeChunk({ + _tag: "ISingleton", + a +}); +/** + * Creates a new `Chunk` from an iterable collection of values. + * + * @category constructors + * @since 2.0.0 + */ +export const fromIterable = self => isChunk(self) ? self : unsafeFromArray(RA.fromIterable(self)); +const copyToArray = (self, array, initial) => { + switch (self.backing._tag) { + case "IArray": + { + copy(self.backing.array, 0, array, initial, self.length); + break; + } + case "IConcat": + { + copyToArray(self.left, array, initial); + copyToArray(self.right, array, initial + self.left.length); + break; + } + case "ISingleton": + { + array[initial] = self.backing.a; + break; + } + case "ISlice": + { + let i = 0; + let j = initial; + while (i < self.length) { + array[j] = unsafeGet(self, i); + i += 1; + j += 1; + } + break; + } + } +}; +const toArray_ = self => toReadonlyArray(self).slice(); +/** + * Converts a `Chunk` into an `Array`. If the provided `Chunk` is non-empty + * (`NonEmptyChunk`), the function will return a `NonEmptyArray`, ensuring the + * non-empty property is preserved. + * + * @category conversions + * @since 2.0.0 + */ +export const toArray = toArray_; +const toReadonlyArray_ = self => { + switch (self.backing._tag) { + case "IEmpty": + { + return emptyArray; + } + case "IArray": + { + return self.backing.array; + } + default: + { + const arr = new Array(self.length); + copyToArray(self, arr, 0); + self.backing = { + _tag: "IArray", + array: arr + }; + self.left = _empty; + self.right = _empty; + self.depth = 0; + return arr; + } + } +}; +/** + * Converts a `Chunk` into a `ReadonlyArray`. If the provided `Chunk` is + * non-empty (`NonEmptyChunk`), the function will return a + * `NonEmptyReadonlyArray`, ensuring the non-empty property is preserved. + * + * @category conversions + * @since 2.0.0 + */ +export const toReadonlyArray = toReadonlyArray_; +const reverseChunk = self => { + switch (self.backing._tag) { + case "IEmpty": + case "ISingleton": + return self; + case "IArray": + { + return makeChunk({ + _tag: "IArray", + array: RA.reverse(self.backing.array) + }); + } + case "IConcat": + { + return makeChunk({ + _tag: "IConcat", + left: reverse(self.backing.right), + right: reverse(self.backing.left) + }); + } + case "ISlice": + return unsafeFromArray(RA.reverse(toReadonlyArray(self))); + } +}; +/** + * Reverses the order of elements in a `Chunk`. + * Importantly, if the input chunk is a `NonEmptyChunk`, the reversed chunk will also be a `NonEmptyChunk`. + * + * **Example** + * + * ```ts + * import { Chunk } from "effect" + * + * const chunk = Chunk.make(1, 2, 3) + * const result = Chunk.reverse(chunk) + * + * console.log(result) + * // { _id: 'Chunk', values: [ 3, 2, 1 ] } + * ``` + * + * @since 2.0.0 + * @category elements + */ +export const reverse = reverseChunk; +/** + * This function provides a safe way to read a value at a particular index from a `Chunk`. + * + * @category elements + * @since 2.0.0 + */ +export const get = /*#__PURE__*/dual(2, (self, index) => index < 0 || index >= self.length ? O.none() : O.some(unsafeGet(self, index))); +/** + * Wraps an array into a chunk without copying, unsafe on mutable arrays + * + * @since 2.0.0 + * @category unsafe + */ +export const unsafeFromArray = self => self.length === 0 ? empty() : self.length === 1 ? of(self[0]) : makeChunk({ + _tag: "IArray", + array: self +}); +/** + * Wraps an array into a chunk without copying, unsafe on mutable arrays + * + * @since 2.0.0 + * @category unsafe + */ +export const unsafeFromNonEmptyArray = self => unsafeFromArray(self); +/** + * Gets an element unsafely, will throw on out of bounds + * + * @since 2.0.0 + * @category unsafe + */ +export const unsafeGet = /*#__PURE__*/dual(2, (self, index) => { + switch (self.backing._tag) { + case "IEmpty": + { + throw new Error(`Index out of bounds`); + } + case "ISingleton": + { + if (index !== 0) { + throw new Error(`Index out of bounds`); + } + return self.backing.a; + } + case "IArray": + { + if (index >= self.length || index < 0) { + throw new Error(`Index out of bounds`); + } + return self.backing.array[index]; + } + case "IConcat": + { + return index < self.left.length ? unsafeGet(self.left, index) : unsafeGet(self.right, index - self.left.length); + } + case "ISlice": + { + return unsafeGet(self.backing.chunk, index + self.backing.offset); + } + } +}); +/** + * Appends the specified element to the end of the `Chunk`. + * + * @category concatenating + * @since 2.0.0 + */ +export const append = /*#__PURE__*/dual(2, (self, a) => appendAll(self, of(a))); +/** + * Prepend an element to the front of a `Chunk`, creating a new `NonEmptyChunk`. + * + * @category concatenating + * @since 2.0.0 + */ +export const prepend = /*#__PURE__*/dual(2, (self, elem) => appendAll(of(elem), self)); +/** + * Takes the first up to `n` elements from the chunk + * + * @since 2.0.0 + */ +export const take = /*#__PURE__*/dual(2, (self, n) => { + if (n <= 0) { + return _empty; + } else if (n >= self.length) { + return self; + } else { + switch (self.backing._tag) { + case "ISlice": + { + return makeChunk({ + _tag: "ISlice", + chunk: self.backing.chunk, + length: n, + offset: self.backing.offset + }); + } + case "IConcat": + { + if (n > self.left.length) { + return makeChunk({ + _tag: "IConcat", + left: self.left, + right: take(self.right, n - self.left.length) + }); + } + return take(self.left, n); + } + default: + { + return makeChunk({ + _tag: "ISlice", + chunk: self, + offset: 0, + length: n + }); + } + } + } +}); +/** + * Drops the first up to `n` elements from the chunk + * + * @since 2.0.0 + */ +export const drop = /*#__PURE__*/dual(2, (self, n) => { + if (n <= 0) { + return self; + } else if (n >= self.length) { + return _empty; + } else { + switch (self.backing._tag) { + case "ISlice": + { + return makeChunk({ + _tag: "ISlice", + chunk: self.backing.chunk, + offset: self.backing.offset + n, + length: self.backing.length - n + }); + } + case "IConcat": + { + if (n > self.left.length) { + return drop(self.right, n - self.left.length); + } + return makeChunk({ + _tag: "IConcat", + left: drop(self.left, n), + right: self.right + }); + } + default: + { + return makeChunk({ + _tag: "ISlice", + chunk: self, + offset: n, + length: self.length - n + }); + } + } + } +}); +/** + * Drops the last `n` elements. + * + * @since 2.0.0 + */ +export const dropRight = /*#__PURE__*/dual(2, (self, n) => take(self, Math.max(0, self.length - n))); +/** + * Drops all elements so long as the predicate returns true. + * + * @since 2.0.0 + */ +export const dropWhile = /*#__PURE__*/dual(2, (self, predicate) => { + const arr = toReadonlyArray(self); + const len = arr.length; + let i = 0; + while (i < len && predicate(arr[i])) { + i++; + } + return drop(self, i); +}); +/** + * Prepends the specified prefix chunk to the beginning of the specified chunk. + * If either chunk is non-empty, the result is also a non-empty chunk. + * + * **Example** + * + * ```ts + * import { Chunk } from "effect" + * + * const result = Chunk.make(1, 2).pipe(Chunk.prependAll(Chunk.make("a", "b")), Chunk.toArray) + * + * console.log(result) + * // [ "a", "b", 1, 2 ] + * ``` + * + * @category concatenating + * @since 2.0.0 + */ +export const prependAll = /*#__PURE__*/dual(2, (self, that) => appendAll(that, self)); +/** + * Concatenates two chunks, combining their elements. + * If either chunk is non-empty, the result is also a non-empty chunk. + * + * **Example** + * + * ```ts + * import { Chunk } from "effect" + * + * const result = Chunk.make(1, 2).pipe(Chunk.appendAll(Chunk.make("a", "b")), Chunk.toArray) + * + * console.log(result) + * // [ 1, 2, "a", "b" ] + * ``` + * + * @category concatenating + * @since 2.0.0 + */ +export const appendAll = /*#__PURE__*/dual(2, (self, that) => { + if (self.backing._tag === "IEmpty") { + return that; + } + if (that.backing._tag === "IEmpty") { + return self; + } + const diff = that.depth - self.depth; + if (Math.abs(diff) <= 1) { + return makeChunk({ + _tag: "IConcat", + left: self, + right: that + }); + } else if (diff < -1) { + if (self.left.depth >= self.right.depth) { + const nr = appendAll(self.right, that); + return makeChunk({ + _tag: "IConcat", + left: self.left, + right: nr + }); + } else { + const nrr = appendAll(self.right.right, that); + if (nrr.depth === self.depth - 3) { + const nr = makeChunk({ + _tag: "IConcat", + left: self.right.left, + right: nrr + }); + return makeChunk({ + _tag: "IConcat", + left: self.left, + right: nr + }); + } else { + const nl = makeChunk({ + _tag: "IConcat", + left: self.left, + right: self.right.left + }); + return makeChunk({ + _tag: "IConcat", + left: nl, + right: nrr + }); + } + } + } else { + if (that.right.depth >= that.left.depth) { + const nl = appendAll(self, that.left); + return makeChunk({ + _tag: "IConcat", + left: nl, + right: that.right + }); + } else { + const nll = appendAll(self, that.left.left); + if (nll.depth === that.depth - 3) { + const nl = makeChunk({ + _tag: "IConcat", + left: nll, + right: that.left.right + }); + return makeChunk({ + _tag: "IConcat", + left: nl, + right: that.right + }); + } else { + const nr = makeChunk({ + _tag: "IConcat", + left: that.left.right, + right: that.right + }); + return makeChunk({ + _tag: "IConcat", + left: nll, + right: nr + }); + } + } + } +}); +/** + * Returns a filtered and mapped subset of the elements. + * + * @since 2.0.0 + * @category filtering + */ +export const filterMap = /*#__PURE__*/dual(2, (self, f) => unsafeFromArray(RA.filterMap(self, f))); +/** + * Returns a filtered and mapped subset of the elements. + * + * @since 2.0.0 + * @category filtering + */ +export const filter = /*#__PURE__*/dual(2, (self, predicate) => unsafeFromArray(RA.filter(self, predicate))); +/** + * Transforms all elements of the chunk for as long as the specified function returns some value + * + * @since 2.0.0 + * @category filtering + */ +export const filterMapWhile = /*#__PURE__*/dual(2, (self, f) => unsafeFromArray(RA.filterMapWhile(self, f))); +/** + * Filter out optional values + * + * @since 2.0.0 + * @category filtering + */ +export const compact = self => filterMap(self, identity); +/** + * Applies a function to each element in a chunk and returns a new chunk containing the concatenated mapped elements. + * + * @since 2.0.0 + * @category sequencing + */ +export const flatMap = /*#__PURE__*/dual(2, (self, f) => { + if (self.backing._tag === "ISingleton") { + return f(self.backing.a, 0); + } + let out = _empty; + let i = 0; + for (const k of self) { + out = appendAll(out, f(k, i++)); + } + return out; +}); +/** + * Iterates over each element of a `Chunk` and applies a function to it. + * + * **Details** + * + * This function processes every element of the given `Chunk`, calling the + * provided function `f` on each element. It does not return a new value; + * instead, it is primarily used for side effects, such as logging or + * accumulating data in an external variable. + * + * @since 2.0.0 + * @category combinators + */ +export const forEach = /*#__PURE__*/dual(2, (self, f) => toReadonlyArray(self).forEach(f)); +/** + * Flattens a chunk of chunks into a single chunk by concatenating all chunks. + * + * @since 2.0.0 + * @category sequencing + */ +export const flatten = /*#__PURE__*/flatMap(identity); +/** + * Groups elements in chunks of up to `n` elements. + * + * @since 2.0.0 + * @category elements + */ +export const chunksOf = /*#__PURE__*/dual(2, (self, n) => { + const gr = []; + let current = []; + toReadonlyArray(self).forEach(a => { + current.push(a); + if (current.length >= n) { + gr.push(unsafeFromArray(current)); + current = []; + } + }); + if (current.length > 0) { + gr.push(unsafeFromArray(current)); + } + return unsafeFromArray(gr); +}); +/** + * Creates a Chunk of unique values that are included in all given Chunks. + * + * The order and references of result values are determined by the Chunk. + * + * @since 2.0.0 + * @category elements + */ +export const intersection = /*#__PURE__*/dual(2, (self, that) => unsafeFromArray(RA.intersection(toReadonlyArray(self), toReadonlyArray(that)))); +/** + * Determines if the chunk is empty. + * + * @since 2.0.0 + * @category elements + */ +export const isEmpty = self => self.length === 0; +/** + * Determines if the chunk is not empty. + * + * @since 2.0.0 + * @category elements + */ +export const isNonEmpty = self => self.length > 0; +/** + * Returns the first element of this chunk if it exists. + * + * @since 2.0.0 + * @category elements + */ +export const head = /*#__PURE__*/get(0); +/** + * Returns the first element of this chunk. + * + * It will throw an error if the chunk is empty. + * + * @since 2.0.0 + * @category unsafe + */ +export const unsafeHead = self => unsafeGet(self, 0); +/** + * Returns the first element of this non empty chunk. + * + * @since 2.0.0 + * @category elements + */ +export const headNonEmpty = unsafeHead; +/** + * Returns the last element of this chunk if it exists. + * + * @since 2.0.0 + * @category elements + */ +export const last = self => get(self, self.length - 1); +/** + * Returns the last element of this chunk. + * + * It will throw an error if the chunk is empty. + * + * @since 2.0.0 + * @category unsafe + */ +export const unsafeLast = self => unsafeGet(self, self.length - 1); +/** + * Returns the last element of this non empty chunk. + * + * @since 3.4.0 + * @category elements + */ +export const lastNonEmpty = unsafeLast; +/** + * Transforms the elements of a chunk using the specified mapping function. + * If the input chunk is non-empty, the resulting chunk will also be non-empty. + * + * **Example** + * + * ```ts + * import { Chunk } from "effect" + * + * const result = Chunk.map(Chunk.make(1, 2), (n) => n + 1) + * + * console.log(result) + * // { _id: 'Chunk', values: [ 2, 3 ] } + * ``` + * + * @since 2.0.0 + * @category mapping + */ +export const map = /*#__PURE__*/dual(2, (self, f) => self.backing._tag === "ISingleton" ? of(f(self.backing.a, 0)) : unsafeFromArray(pipe(toReadonlyArray(self), RA.map((a, i) => f(a, i))))); +/** + * Statefully maps over the chunk, producing new elements of type `B`. + * + * @since 2.0.0 + * @category folding + */ +export const mapAccum = /*#__PURE__*/dual(3, (self, s, f) => { + const [s1, as] = RA.mapAccum(self, s, f); + return [s1, unsafeFromArray(as)]; +}); +/** + * Separate elements based on a predicate that also exposes the index of the element. + * + * @category filtering + * @since 2.0.0 + */ +export const partition = /*#__PURE__*/dual(2, (self, predicate) => pipe(RA.partition(toReadonlyArray(self), predicate), ([l, r]) => [unsafeFromArray(l), unsafeFromArray(r)])); +/** + * Partitions the elements of this chunk into two chunks using f. + * + * @category filtering + * @since 2.0.0 + */ +export const partitionMap = /*#__PURE__*/dual(2, (self, f) => pipe(RA.partitionMap(toReadonlyArray(self), f), ([l, r]) => [unsafeFromArray(l), unsafeFromArray(r)])); +/** + * Partitions the elements of this chunk into two chunks. + * + * @category filtering + * @since 2.0.0 + */ +export const separate = self => pipe(RA.separate(toReadonlyArray(self)), ([l, r]) => [unsafeFromArray(l), unsafeFromArray(r)]); +/** + * Retireves the size of the chunk + * + * @since 2.0.0 + * @category elements + */ +export const size = self => self.length; +/** + * Sort the elements of a Chunk in increasing order, creating a new Chunk. + * + * @since 2.0.0 + * @category sorting + */ +export const sort = /*#__PURE__*/dual(2, (self, O) => unsafeFromArray(RA.sort(toReadonlyArray(self), O))); +/** + * @since 2.0.0 + * @category sorting + */ +export const sortWith = /*#__PURE__*/dual(3, (self, f, order) => sort(self, Order.mapInput(order, f))); +/** + * Returns two splits of this chunk at the specified index. + * + * @since 2.0.0 + * @category splitting + */ +export const splitAt = /*#__PURE__*/dual(2, (self, n) => [take(self, n), drop(self, n)]); +/** + * Splits a `NonEmptyChunk` into two segments, with the first segment containing a maximum of `n` elements. + * The value of `n` must be `>= 1`. + * + * @category splitting + * @since 2.0.0 + */ +export const splitNonEmptyAt = /*#__PURE__*/dual(2, (self, n) => { + const _n = Math.max(1, Math.floor(n)); + return _n >= self.length ? [self, empty()] : [take(self, _n), drop(self, _n)]; +}); +/** + * Splits this chunk into `n` equally sized chunks. + * + * @since 2.0.0 + * @category splitting + */ +export const split = /*#__PURE__*/dual(2, (self, n) => chunksOf(self, Math.ceil(self.length / Math.floor(n)))); +/** + * Splits this chunk on the first element that matches this predicate. + * Returns a tuple containing two chunks: the first one is before the match, and the second one is from the match onward. + * + * @category splitting + * @since 2.0.0 + */ +export const splitWhere = /*#__PURE__*/dual(2, (self, predicate) => { + let i = 0; + for (const a of toReadonlyArray(self)) { + if (predicate(a)) { + break; + } else { + i++; + } + } + return splitAt(self, i); +}); +/** + * Returns every elements after the first. + * + * @since 2.0.0 + * @category elements + */ +export const tail = self => self.length > 0 ? O.some(drop(self, 1)) : O.none(); +/** + * Returns every elements after the first. + * + * @since 2.0.0 + * @category elements + */ +export const tailNonEmpty = self => drop(self, 1); +/** + * Takes the last `n` elements. + * + * @since 2.0.0 + * @category elements + */ +export const takeRight = /*#__PURE__*/dual(2, (self, n) => drop(self, self.length - n)); +/** + * Takes all elements so long as the predicate returns true. + * + * @since 2.0.0 + * @category elements + */ +export const takeWhile = /*#__PURE__*/dual(2, (self, predicate) => { + const out = []; + for (const a of toReadonlyArray(self)) { + if (predicate(a)) { + out.push(a); + } else { + break; + } + } + return unsafeFromArray(out); +}); +/** + * Creates a Chunks of unique values, in order, from all given Chunks. + * + * @since 2.0.0 + * @category elements + */ +export const union = /*#__PURE__*/dual(2, (self, that) => unsafeFromArray(RA.union(toReadonlyArray(self), toReadonlyArray(that)))); +/** + * Remove duplicates from an array, keeping the first occurrence of an element. + * + * @since 2.0.0 + * @category elements + */ +export const dedupe = self => unsafeFromArray(RA.dedupe(toReadonlyArray(self))); +/** + * Deduplicates adjacent elements that are identical. + * + * @since 2.0.0 + * @category filtering + */ +export const dedupeAdjacent = self => unsafeFromArray(RA.dedupeAdjacent(self)); +/** + * Takes a `Chunk` of pairs and return two corresponding `Chunk`s. + * + * Note: The function is reverse of `zip`. + * + * @since 2.0.0 + * @category elements + */ +export const unzip = self => { + const [left, right] = RA.unzip(self); + return [unsafeFromArray(left), unsafeFromArray(right)]; +}; +/** + * Zips this chunk pointwise with the specified chunk using the specified combiner. + * + * @since 2.0.0 + * @category zipping + */ +export const zipWith = /*#__PURE__*/dual(3, (self, that, f) => unsafeFromArray(RA.zipWith(self, that, f))); +/** + * Zips this chunk pointwise with the specified chunk. + * + * @since 2.0.0 + * @category zipping + */ +export const zip = /*#__PURE__*/dual(2, (self, that) => zipWith(self, that, (a, b) => [a, b])); +/** + * Delete the element at the specified index, creating a new `Chunk`. + * + * @since 2.0.0 + */ +export const remove = /*#__PURE__*/dual(2, (self, i) => { + if (i < 0 || i >= self.length) return self; + return unsafeFromArray(RA.remove(toReadonlyArray(self), i)); +}); +/** + * @since 3.16.0 + */ +export const removeOption = /*#__PURE__*/dual(2, (self, i) => { + if (i < 0 || i >= self.length) return O.none(); + return O.some(unsafeFromArray(RA.remove(toReadonlyArray(self), i))); +}); +/** + * @since 2.0.0 + */ +export const modifyOption = /*#__PURE__*/dual(3, (self, i, f) => { + if (i < 0 || i >= self.length) return O.none(); + return O.some(unsafeFromArray(RA.modify(toReadonlyArray(self), i, f))); +}); +/** + * Apply a function to the element at the specified index, creating a new `Chunk`, + * or returning the input if the index is out of bounds. + * + * @since 2.0.0 + */ +export const modify = /*#__PURE__*/dual(3, (self, i, f) => O.getOrElse(modifyOption(self, i, f), () => self)); +/** + * Change the element at the specified index, creating a new `Chunk`, + * or returning the input if the index is out of bounds. + * + * @since 2.0.0 + */ +export const replace = /*#__PURE__*/dual(3, (self, i, b) => modify(self, i, () => b)); +/** + * @since 2.0.0 + */ +export const replaceOption = /*#__PURE__*/dual(3, (self, i, b) => modifyOption(self, i, () => b)); +/** + * Return a Chunk of length n with element i initialized with f(i). + * + * **Note**. `n` is normalized to an integer >= 1. + * + * @category constructors + * @since 2.0.0 + */ +export const makeBy = /*#__PURE__*/dual(2, (n, f) => fromIterable(RA.makeBy(n, f))); +/** + * Create a non empty `Chunk` containing a range of integers, including both endpoints. + * + * @category constructors + * @since 2.0.0 + */ +export const range = (start, end) => start <= end ? makeBy(end - start + 1, i => start + i) : of(start); +// ------------------------------------------------------------------------------------- +// re-exports from ReadonlyArray +// ------------------------------------------------------------------------------------- +/** + * Returns a function that checks if a `Chunk` contains a given value using the default `Equivalence`. + * + * @category elements + * @since 2.0.0 + */ +export const contains = RA.contains; +/** + * Returns a function that checks if a `Chunk` contains a given value using a provided `isEquivalent` function. + * + * @category elements + * @since 2.0.0 + */ +export const containsWith = RA.containsWith; +/** + * Returns the first element that satisfies the specified + * predicate, or `None` if no such element exists. + * + * @category elements + * @since 2.0.0 + */ +export const findFirst = RA.findFirst; +/** + * Return the first index for which a predicate holds. + * + * @category elements + * @since 2.0.0 + */ +export const findFirstIndex = RA.findFirstIndex; +/** + * Find the last element for which a predicate holds. + * + * @category elements + * @since 2.0.0 + */ +export const findLast = RA.findLast; +/** + * Return the last index for which a predicate holds. + * + * @category elements + * @since 2.0.0 + */ +export const findLastIndex = RA.findLastIndex; +/** + * Check if a predicate holds true for every `Chunk` element. + * + * @category elements + * @since 2.0.0 + */ +export const every = /*#__PURE__*/dual(2, (self, refinement) => RA.fromIterable(self).every(refinement)); +/** + * Check if a predicate holds true for some `Chunk` element. + * + * @category elements + * @since 2.0.0 + */ +export const some = /*#__PURE__*/dual(2, (self, predicate) => RA.fromIterable(self).some(predicate)); +/** + * Joins the elements together with "sep" in the middle. + * + * @category folding + * @since 2.0.0 + */ +export const join = RA.join; +/** + * @category folding + * @since 2.0.0 + */ +export const reduce = RA.reduce; +/** + * @category folding + * @since 2.0.0 + */ +export const reduceRight = RA.reduceRight; +/** + * Creates a `Chunk` of values not included in the other given `Chunk` using the provided `isEquivalent` function. + * The order and references of result values are determined by the first `Chunk`. + * + * @since 3.2.0 + */ +export const differenceWith = isEquivalent => { + return dual(2, (self, that) => unsafeFromArray(RA.differenceWith(isEquivalent)(that, self))); +}; +/** + * Creates a `Chunk` of values not included in the other given `Chunk`. + * The order and references of result values are determined by the first `Chunk`. + * + * @since 3.2.0 + */ +export const difference = /*#__PURE__*/dual(2, (self, that) => unsafeFromArray(RA.difference(that, self))); +//# sourceMappingURL=Chunk.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Clock.js b/backend/node_modules/effect/dist/esm/Clock.js new file mode 100644 index 0000000000000000000000000000000000000000..8146a93e7f485b1f519d104257aa7e2d39bceba9 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Clock.js @@ -0,0 +1,38 @@ +import * as internal from "./internal/clock.js"; +import * as defaultServices from "./internal/defaultServices.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const ClockTypeId = internal.ClockTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * @since 2.0.0 + * @category constructors + */ +export const sleep = defaultServices.sleep; +/** + * @since 2.0.0 + * @category constructors + */ +export const currentTimeMillis = defaultServices.currentTimeMillis; +/** + * @since 2.0.0 + * @category constructors + */ +export const currentTimeNanos = defaultServices.currentTimeNanos; +/** + * @since 2.0.0 + * @category constructors + */ +export const clockWith = defaultServices.clockWith; +/** + * @since 2.0.0 + * @category context + */ +export const Clock = internal.clockTag; +//# sourceMappingURL=Clock.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Clock.js.map b/backend/node_modules/effect/dist/esm/Clock.js.map new file mode 100644 index 0000000000000000000000000000000000000000..efbb2c3560419c6e897fe34cde8eb12921459fad --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Clock.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Clock.js","names":["internal","defaultServices","ClockTypeId","make","sleep","currentTimeMillis","currentTimeNanos","clockWith","Clock","clockTag"],"sources":["../../src/Clock.ts"],"sourcesContent":[null],"mappings":"AAMA,OAAO,KAAKA,QAAQ,MAAM,qBAAqB;AAC/C,OAAO,KAAKC,eAAe,MAAM,+BAA+B;AAEhE;;;;AAIA,OAAO,MAAMC,WAAW,GAAkBF,QAAQ,CAACE,WAAW;AA8D9D;;;;AAIA,OAAO,MAAMC,IAAI,GAAuBH,QAAQ,CAACG,IAAI;AAErD;;;;AAIA,OAAO,MAAMC,KAAK,GAA8DH,eAAe,CAACG,KAAK;AAErG;;;;AAIA,OAAO,MAAMC,iBAAiB,GAA0BJ,eAAe,CAACI,iBAAiB;AAEzF;;;;AAIA,OAAO,MAAMC,gBAAgB,GAA0BL,eAAe,CAACK,gBAAgB;AAEvF;;;;AAIA,OAAO,MAAMC,SAAS,GACpBN,eAAe,CAACM,SAAS;AAE3B;;;;AAIA,OAAO,MAAMC,KAAK,GAA8BR,QAAQ,CAACS,QAAQ","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Config.js b/backend/node_modules/effect/dist/esm/Config.js new file mode 100644 index 0000000000000000000000000000000000000000..8d1efe7a30d73d8231591f139c8811987cf1a6cb --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Config.js @@ -0,0 +1,321 @@ +import * as internal from "./internal/config.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const ConfigTypeId = internal.ConfigTypeId; +/** + * Constructs a config from a tuple / struct / arguments of configs. + * + * @since 2.0.0 + * @category constructors + */ +export const all = internal.all; +/** + * Constructs a config for an array of values. + * + * @since 2.0.0 + * @category constructors + */ +export const array = internal.array; +/** + * Constructs a config for a boolean value. + * + * @since 2.0.0 + * @category constructors + */ +export const boolean = internal.boolean; +/** + * Constructs a config for a network port [1, 65535]. + * + * @since 3.16.0 + * @category constructors + */ +export const port = internal.port; +/** + * Constructs a config for an URL value. + * + * @since 3.11.0 + * @category constructors + */ +export const url = internal.url; +/** + * Constructs a config for a sequence of values. + * + * @since 2.0.0 + * @category constructors + */ +export const chunk = internal.chunk; +/** + * Constructs a config for a date value. + * + * @since 2.0.0 + * @category constructors + */ +export const date = internal.date; +/** + * Constructs a config that fails with the specified message. + * + * @since 2.0.0 + * @category constructors + */ +export const fail = internal.fail; +/** + * Constructs a config for a float value. + * + * @since 2.0.0 + * @category constructors + */ +export const number = internal.number; +/** + * Constructs a config for a integer value. + * + * @since 2.0.0 + * @category constructors + */ +export const integer = internal.integer; +/** + * Constructs a config for a literal value. + * + * **Example** + * + * ```ts + * import { Config } from "effect" + * + * const config = Config.literal("http", "https")("PROTOCOL") + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const literal = internal.literal; +/** + * Constructs a config for a `LogLevel` value. + * + * @since 2.0.0 + * @category constructors + */ +export const logLevel = internal.logLevel; +/** + * Constructs a config for a duration value. + * + * @since 2.5.0 + * @category constructors + */ +export const duration = internal.duration; +/** + * This function returns `true` if the specified value is an `Config` value, + * `false` otherwise. + * + * This function can be useful for checking the type of a value before + * attempting to operate on it as an `Config` value. For example, you could + * use `isConfig` to check the type of a value before using it as an + * argument to a function that expects an `Config` value. + * + * @since 2.0.0 + * @category refinements + */ +export const isConfig = internal.isConfig; +/** + * Returns a config whose structure is the same as this one, but which produces + * a different value, constructed using the specified function. + * + * @since 2.0.0 + * @category mapping + */ +export const map = internal.map; +/** + * Returns a config whose structure is the same as this one, but which may + * produce a different value, constructed using the specified function, which + * may throw exceptions that will be translated into validation errors. + * + * @since 2.0.0 + * @category utils + */ +export const mapAttempt = internal.mapAttempt; +/** + * Returns a new config whose structure is the samea as this one, but which + * may produce a different value, constructed using the specified fallible + * function. + * + * @since 2.0.0 + * @category utils + */ +export const mapOrFail = internal.mapOrFail; +/** + * Returns a config that has this configuration nested as a property of the + * specified name. + * + * @since 2.0.0 + * @category utils + */ +export const nested = internal.nested; +/** + * Returns a config whose structure is preferentially described by this + * config, but which falls back to the specified config if there is an issue + * reading from this config. + * + * @since 2.0.0 + * @category utils + */ +export const orElse = internal.orElse; +/** + * Returns configuration which reads from this configuration, but which falls + * back to the specified configuration if reading from this configuration + * fails with an error satisfying the specified predicate. + * + * @since 2.0.0 + * @category utils + */ +export const orElseIf = internal.orElseIf; +/** + * Returns an optional version of this config, which will be `None` if the + * data is missing from configuration, and `Some` otherwise. + * + * @since 2.0.0 + * @category utils + */ +export const option = internal.option; +/** + * Constructs a new primitive config. + * + * @since 2.0.0 + * @category constructors + */ +export const primitive = internal.primitive; +/** + * Returns a config that describes a sequence of values, each of which has the + * structure of this config. + * + * @since 2.0.0 + * @category utils + */ +export const repeat = internal.repeat; +/** + * Constructs a config for a secret value. + * + * @since 2.0.0 + * @category constructors + * @deprecated + */ +export const secret = internal.secret; +/** + * Constructs a config for a redacted value. + * + * @since 2.0.0 + * @category constructors + */ +export const redacted = internal.redacted; +/** + * Constructs a config for a branded value. + * + * @since 3.16.0 + * @category constructors + */ +export const branded = internal.branded; +/** + * Constructs a config for a sequence of values. + * + * @since 2.0.0 + * @category constructors + */ +export const hashSet = internal.hashSet; +/** + * Constructs a config for a string value. + * + * @since 2.0.0 + * @category constructors + */ +export const string = internal.string; +/** + * Constructs a config for a non-empty string value. + * + * @since 3.7.0 + * @category constructors + */ +export const nonEmptyString = internal.nonEmptyString; +/** + * Constructs a config which contains the specified value. + * + * @since 2.0.0 + * @category constructors + */ +export const succeed = internal.succeed; +/** + * Lazily constructs a config. + * + * @since 2.0.0 + * @category constructors + */ +export const suspend = internal.suspend; +/** + * Constructs a config which contains the specified lazy value. + * + * @since 2.0.0 + * @category constructors + */ +export const sync = internal.sync; +/** + * Constructs a config for a sequence of values. + * + * @since 2.0.0 + * @category constructors + */ +export const hashMap = internal.hashMap; +/** + * Constructs a config from some configuration wrapped with the `Wrap` utility type. + * + * For example: + * + * ``` + * import { Config, unwrap } from "./Config" + * + * interface Options { key: string } + * + * const makeConfig = (config: Config.Wrap): Config => unwrap(config) + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const unwrap = internal.unwrap; +/** + * Returns a config that describes the same structure as this one, but which + * performs validation during loading. + * + * @since 2.0.0 + * @category utils + */ +export const validate = internal.validate; +/** + * Returns a config that describes the same structure as this one, but has the + * specified default value in case the information cannot be found. + * + * @since 2.0.0 + * @category utils + */ +export const withDefault = internal.withDefault; +/** + * Adds a description to this configuration, which is intended for humans. + * + * @since 2.0.0 + * @category utils + */ +export const withDescription = internal.withDescription; +/** + * Returns a config that is the composition of this config and the specified + * config. + * + * @since 2.0.0 + * @category zipping + */ +export const zip = internal.zip; +/** + * Returns a config that is the composes this config and the specified config + * using the provided function. + * + * @since 2.0.0 + * @category zipping + */ +export const zipWith = internal.zipWith; +//# sourceMappingURL=Config.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Config.js.map b/backend/node_modules/effect/dist/esm/Config.js.map new file mode 100644 index 0000000000000000000000000000000000000000..840fc4dcf7f7b357a4894014449214f921896942 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Config.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Config.js","names":["internal","ConfigTypeId","all","array","boolean","port","url","chunk","date","fail","number","integer","literal","logLevel","duration","isConfig","map","mapAttempt","mapOrFail","nested","orElse","orElseIf","option","primitive","repeat","secret","redacted","branded","hashSet","string","nonEmptyString","succeed","suspend","sync","hashMap","unwrap","validate","withDefault","withDescription","zip","zipWith"],"sources":["../../src/Config.ts"],"sourcesContent":[null],"mappings":"AAYA,OAAO,KAAKA,QAAQ,MAAM,sBAAsB;AAQhD;;;;AAIA,OAAO,MAAMC,YAAY,GAAkBD,QAAQ,CAACC,YAAY;AAwEhE;;;;;;AAMA,OAAO,MAAMC,GAAG,GAWZF,QAAQ,CAACE,GAA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AMC,eAAe,GAexBtC,QAAQ,CAACsC,eAAe;AAE5B;;;;;;;AAOA,OAAO,MAAMC,GAAG,GAiBZvC,QAAQ,CAACuC,GAAG;AAEhB;;;;;;;AAOA,OAAO,MAAMC,OAAO,GAiBhBxC,QAAQ,CAACwC,OAAO","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/ConfigError.js b/backend/node_modules/effect/dist/esm/ConfigError.js new file mode 100644 index 0000000000000000000000000000000000000000..201e42bbec7e4e7cf66a32ac97768fa1cce1f2fe --- /dev/null +++ b/backend/node_modules/effect/dist/esm/ConfigError.js @@ -0,0 +1,107 @@ +import * as internal from "./internal/configError.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const ConfigErrorTypeId = internal.ConfigErrorTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +export const And = internal.And; +/** + * @since 2.0.0 + * @category constructors + */ +export const Or = internal.Or; +/** + * @since 2.0.0 + * @category constructors + */ +export const MissingData = internal.MissingData; +/** + * @since 2.0.0 + * @category constructors + */ +export const InvalidData = internal.InvalidData; +/** + * @since 2.0.0 + * @category constructors + */ +export const SourceUnavailable = internal.SourceUnavailable; +/** + * @since 2.0.0 + * @category constructors + */ +export const Unsupported = internal.Unsupported; +/** + * Returns `true` if the specified value is a `ConfigError`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isConfigError = internal.isConfigError; +/** + * Returns `true` if the specified `ConfigError` is an `And`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isAnd = internal.isAnd; +/** + * Returns `true` if the specified `ConfigError` is an `Or`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isOr = internal.isOr; +/** + * Returns `true` if the specified `ConfigError` is an `InvalidData`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isInvalidData = internal.isInvalidData; +/** + * Returns `true` if the specified `ConfigError` is an `MissingData`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isMissingData = internal.isMissingData; +/** + * Returns `true` if the specified `ConfigError` contains only `MissingData` errors, `false` otherwise. + * + * @since 2.0.0 + * @categer getters + */ +export const isMissingDataOnly = internal.isMissingDataOnly; +/** + * Returns `true` if the specified `ConfigError` is a `SourceUnavailable`, + * `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isSourceUnavailable = internal.isSourceUnavailable; +/** + * Returns `true` if the specified `ConfigError` is an `Unsupported`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isUnsupported = internal.isUnsupported; +/** + * @since 2.0.0 + * @category utils + */ +export const prefixed = internal.prefixed; +/** + * @since 2.0.0 + * @category folding + */ +export const reduceWithContext = internal.reduceWithContext; +//# sourceMappingURL=ConfigError.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/ConfigError.js.map b/backend/node_modules/effect/dist/esm/ConfigError.js.map new file mode 100644 index 0000000000000000000000000000000000000000..012d3458e8bbf7e8f6db333f323dbe17a8a6f0be --- /dev/null +++ b/backend/node_modules/effect/dist/esm/ConfigError.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ConfigError.js","names":["internal","ConfigErrorTypeId","And","Or","MissingData","InvalidData","SourceUnavailable","Unsupported","isConfigError","isAnd","isOr","isInvalidData","isMissingData","isMissingDataOnly","isSourceUnavailable","isUnsupported","prefixed","reduceWithContext"],"sources":["../../src/ConfigError.ts"],"sourcesContent":[null],"mappings":"AAIA,OAAO,KAAKA,QAAQ,MAAM,2BAA2B;AAErD;;;;AAIA,OAAO,MAAMC,iBAAiB,GAAkBD,QAAQ,CAACC,iBAAiB;AAmI1E;;;;AAIA,OAAO,MAAMC,GAAG,GAA0DF,QAAQ,CAACE,GAAG;AAEtF;;;;AAIA,OAAO,MAAMC,EAAE,GAA0DH,QAAQ,CAACG,EAAE;AAEpF;;;;AAIA,OAAO,MAAMC,WAAW,GACtBJ,QAAQ,CAACI,WAAW;AAEtB;;;;AAIA,OAAO,MAAMC,WAAW,GACtBL,QAAQ,CAACK,WAAW;AAEtB;;;;AAIA,OAAO,MAAMC,iBAAiB,GAKXN,QAAQ,CAACM,iBAAiB;AAE7C;;;;AAIA,OAAO,MAAMC,WAAW,GACtBP,QAAQ,CAACO,WAAW;AAEtB;;;;;;AAMA,OAAO,MAAMC,aAAa,GAAqCR,QAAQ,CAACQ,aAAa;AAErF;;;;;;AAMA,OAAO,MAAMC,KAAK,GAAuCT,QAAQ,CAACS,KAAK;AAEvE;;;;;;AAMA,OAAO,MAAMC,IAAI,GAAsCV,QAAQ,CAACU,IAAI;AAEpE;;;;;;;AAOA,OAAO,MAAMC,aAAa,GAA+CX,QAAQ,CAACW,aAAa;AAE/F;;;;;;;AAOA,OAAO,MAAMC,aAAa,GAA+CZ,QAAQ,CAACY,aAAa;AAE/F;;;;;;AAMA,OAAO,MAAMC,iBAAiB,GAAmCb,QAAQ,CAACa,iBAAiB;AAE3F;;;;;;;AAOA,OAAO,MAAMC,mBAAmB,GAAqDd,QAAQ,CAACc,mBAAmB;AAEjH;;;;;;;AAOA,OAAO,MAAMC,aAAa,GAA+Cf,QAAQ,CAACe,aAAa;AAE/F;;;;AAIA,OAAO,MAAMC,QAAQ,GAWjBhB,QAAQ,CAACgB,QAAQ;AAErB;;;;AAIA,OAAO,MAAMC,iBAAiB,GAW1BjB,QAAQ,CAACiB,iBAAiB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/ConfigProviderPathPatch.js b/backend/node_modules/effect/dist/esm/ConfigProviderPathPatch.js new file mode 100644 index 0000000000000000000000000000000000000000..3e0d974d1e23849d9767c1a3fbb8371c49497256 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/ConfigProviderPathPatch.js @@ -0,0 +1,30 @@ +/** + * @since 2.0.0 + */ +import * as internal from "./internal/configProvider/pathPatch.js"; +/** + * @since 2.0.0 + * @category constructors + */ +export const empty = internal.empty; +/** + * @since 2.0.0 + * @category constructors + */ +export const andThen = internal.andThen; +/** + * @since 2.0.0 + * @category constructors + */ +export const mapName = internal.mapName; +/** + * @since 2.0.0 + * @category constructors + */ +export const nested = internal.nested; +/** + * @since 2.0.0 + * @category constructors + */ +export const unnested = internal.unnested; +//# sourceMappingURL=ConfigProviderPathPatch.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/ConfigProviderPathPatch.js.map b/backend/node_modules/effect/dist/esm/ConfigProviderPathPatch.js.map new file mode 100644 index 0000000000000000000000000000000000000000..fca28a60b9f9e5d57f2c84e8c439912bfa74347e --- /dev/null +++ b/backend/node_modules/effect/dist/esm/ConfigProviderPathPatch.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ConfigProviderPathPatch.js","names":["internal","empty","andThen","mapName","nested","unnested"],"sources":["../../src/ConfigProviderPathPatch.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,QAAQ,MAAM,wCAAwC;AAwDlE;;;;AAIA,OAAO,MAAMC,KAAK,GAAcD,QAAQ,CAACC,KAAK;AAE9C;;;;AAIA,OAAO,MAAMC,OAAO,GAWhBF,QAAQ,CAACE,OAAO;AAEpB;;;;AAIA,OAAO,MAAMC,OAAO,GAWhBH,QAAQ,CAACG,OAAO;AAEpB;;;;AAIA,OAAO,MAAMC,MAAM,GAWfJ,QAAQ,CAACI,MAAM;AAEnB;;;;AAIA,OAAO,MAAMC,QAAQ,GAWjBL,QAAQ,CAACK,QAAQ","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Console.js b/backend/node_modules/effect/dist/esm/Console.js new file mode 100644 index 0000000000000000000000000000000000000000..7345384a9497a675ec1d7fa350dc59ee307eff26 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Console.js @@ -0,0 +1,118 @@ +import * as internal from "./internal/console.js"; +import * as defaultConsole from "./internal/defaultServices/console.js"; +/** + * @since 2.0.0 + * @category type ids + */ +export const TypeId = defaultConsole.TypeId; +/** + * @since 2.0.0 + * @category context + */ +export const Console = defaultConsole.consoleTag; +/** + * @since 2.0.0 + * @category default services + */ +export const withConsole = internal.withConsole; +/** + * @since 2.0.0 + * @category default services + */ +export const setConsole = internal.setConsole; +/** + * @since 2.0.0 + * @category accessor + */ +export const consoleWith = internal.consoleWith; +/** + * @since 2.0.0 + * @category accessor + */ +export const assert = internal.assert; +/** + * @since 2.0.0 + * @category accessor + */ +export const clear = internal.clear; +/** + * @since 2.0.0 + * @category accessor + */ +export const count = internal.count; +/** + * @since 2.0.0 + * @category accessor + */ +export const countReset = internal.countReset; +/** + * @since 2.0.0 + * @category accessor + */ +export const debug = internal.debug; +/** + * @since 2.0.0 + * @category accessor + */ +export const dir = internal.dir; +/** + * @since 2.0.0 + * @category accessor + */ +export const dirxml = internal.dirxml; +/** + * @since 2.0.0 + * @category accessor + */ +export const error = internal.error; +/** + * @since 2.0.0 + * @category accessor + */ +export const group = internal.group; +/** + * @since 2.0.0 + * @category accessor + */ +export const info = internal.info; +/** + * @since 2.0.0 + * @category accessor + */ +export const log = internal.log; +/** + * @since 2.0.0 + * @category accessor + */ +export const table = internal.table; +/** + * @since 2.0.0 + * @category accessor + */ +export const time = internal.time; +/** + * @since 2.0.0 + * @category accessor + */ +export const timeLog = internal.timeLog; +/** + * @since 2.0.0 + * @category accessor + */ +export const trace = internal.trace; +/** + * @since 2.0.0 + * @category accessor + */ +export const warn = internal.warn; +/** + * @since 2.0.0 + * @category accessor + */ +export const withGroup = internal.withGroup; +/** + * @since 2.0.0 + * @category accessor + */ +export const withTime = internal.withTime; +//# sourceMappingURL=Console.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Console.js.map b/backend/node_modules/effect/dist/esm/Console.js.map new file mode 100644 index 0000000000000000000000000000000000000000..20d591d3fa88c1e24572948b38d13e90303b4d9d --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Console.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Console.js","names":["internal","defaultConsole","TypeId","Console","consoleTag","withConsole","setConsole","consoleWith","assert","clear","count","countReset","debug","dir","dirxml","error","group","info","log","table","time","timeLog","trace","warn","withGroup","withTime"],"sources":["../../src/Console.ts"],"sourcesContent":[null],"mappings":"AAKA,OAAO,KAAKA,QAAQ,MAAM,uBAAuB;AACjD,OAAO,KAAKC,cAAc,MAAM,uCAAuC;AAIvE;;;;AAIA,OAAO,MAAMC,MAAM,GAAkBD,cAAc,CAACC,MAAM;AAgE1D;;;;AAIA,OAAO,MAAMC,OAAO,GAAkCF,cAAc,CAACG,UAAU;AAE/E;;;;AAIA,OAAO,MAAMC,WAAW,GAWpBL,QAAQ,CAACK,WAAW;AAExB;;;;AAIA,OAAO,MAAMC,UAAU,GAA0DN,QAAQ,CAACM,UAAU;AAEpG;;;;AAIA,OAAO,MAAMC,WAAW,GAA2EP,QAAQ,CAACO,WAAW;AAEvH;;;;AAIA,OAAO,MAAMC,MAAM,GAAsER,QAAQ,CAACQ,MAAM;AAExG;;;;AAIA,OAAO,MAAMC,KAAK,GAAiBT,QAAQ,CAACS,KAAK;AAEjD;;;;AAIA,OAAO,MAAMC,KAAK,GAAqCV,QAAQ,CAACU,KAAK;AAErE;;;;AAIA,OAAO,MAAMC,UAAU,GAAqCX,QAAQ,CAACW,UAAU;AAE/E;;;;AAIA,OAAO,MAAMC,KAAK,GAAkDZ,QAAQ,CAACY,KAAK;AAElF;;;;AAIA,OAAO,MAAMC,GAAG,GAA+Cb,QAAQ,CAACa,GAAG;AAE3E;;;;AAIA,OAAO,MAAMC,MAAM,GAAkDd,QAAQ,CAACc,MAAM;AAEpF;;;;AAIA,OAAO,MAAMC,KAAK,GAAkDf,QAAQ,CAACe,KAAK;AAElF;;;;AAIA,OAAO,MAAMC,KAAK,GAEgBhB,QAAQ,CAACgB,KAAK;AAEhD;;;;AAIA,OAAO,MAAMC,IAAI,GAAkDjB,QAAQ,CAACiB,IAAI;AAEhF;;;;AAIA,OAAO,MAAMC,GAAG,GAAkDlB,QAAQ,CAACkB,GAAG;AAE9E;;;;AAIA,OAAO,MAAMC,KAAK,GAA2EnB,QAAQ,CAACmB,KAAK;AAE3G;;;;AAIA,OAAO,MAAMC,IAAI,GAA+DpB,QAAQ,CAACoB,IAAI;AAE7F;;;;AAIA,OAAO,MAAMC,OAAO,GAAkErB,QAAQ,CAACqB,OAAO;AAEtG;;;;AAIA,OAAO,MAAMC,KAAK,GAAkDtB,QAAQ,CAACsB,KAAK;AAElF;;;;AAIA,OAAO,MAAMC,IAAI,GAAkDvB,QAAQ,CAACuB,IAAI;AAEhF;;;;AAIA,OAAO,MAAMC,SAAS,GAsBlBxB,QAAQ,CAACwB,SAAS;AAEtB;;;;AAIA,OAAO,MAAMC,QAAQ,GAWjBzB,QAAQ,CAACyB,QAAQ","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Cron.js b/backend/node_modules/effect/dist/esm/Cron.js new file mode 100644 index 0000000000000000000000000000000000000000..c64d2f44d9a02f6d1b31b7c920cc661b484ab37d --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Cron.js @@ -0,0 +1,660 @@ +/** + * @since 2.0.0 + */ +import * as Arr from "./Array.js"; +import * as Data from "./Data.js"; +import * as Either from "./Either.js"; +import * as Equal from "./Equal.js"; +import * as equivalence from "./Equivalence.js"; +import { constVoid, dual, identity, pipe } from "./Function.js"; +import * as Hash from "./Hash.js"; +import { format, NodeInspectSymbol } from "./Inspectable.js"; +import * as dateTime from "./internal/dateTime.js"; +import * as N from "./Number.js"; +import * as Option from "./Option.js"; +import { pipeArguments } from "./Pipeable.js"; +import { hasProperty } from "./Predicate.js"; +import * as String from "./String.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const TypeId = /*#__PURE__*/Symbol.for("effect/Cron"); +const CronProto = { + [TypeId]: TypeId, + [Equal.symbol](that) { + return isCron(that) && equals(this, that); + }, + [Hash.symbol]() { + return pipe(Hash.hash(this.tz), Hash.combine(Hash.array(Arr.fromIterable(this.seconds))), Hash.combine(Hash.array(Arr.fromIterable(this.minutes))), Hash.combine(Hash.array(Arr.fromIterable(this.hours))), Hash.combine(Hash.array(Arr.fromIterable(this.days))), Hash.combine(Hash.array(Arr.fromIterable(this.months))), Hash.combine(Hash.array(Arr.fromIterable(this.weekdays))), Hash.cached(this)); + }, + toString() { + return format(this.toJSON()); + }, + toJSON() { + return { + _id: "Cron", + tz: this.tz, + seconds: Arr.fromIterable(this.seconds), + minutes: Arr.fromIterable(this.minutes), + hours: Arr.fromIterable(this.hours), + days: Arr.fromIterable(this.days), + months: Arr.fromIterable(this.months), + weekdays: Arr.fromIterable(this.weekdays) + }; + }, + [NodeInspectSymbol]() { + return this.toJSON(); + }, + pipe() { + return pipeArguments(this, arguments); + } +}; +/** + * Checks if a given value is a `Cron` instance. + * + * @since 2.0.0 + * @category guards + */ +export const isCron = u => hasProperty(u, TypeId); +/** + * Creates a `Cron` instance. + * + * @since 2.0.0 + * @category constructors + */ +export const make = values => { + const o = Object.create(CronProto); + o.seconds = new Set(Arr.sort(values.seconds ?? [0], N.Order)); + o.minutes = new Set(Arr.sort(values.minutes, N.Order)); + o.hours = new Set(Arr.sort(values.hours, N.Order)); + o.days = new Set(Arr.sort(values.days, N.Order)); + o.months = new Set(Arr.sort(values.months, N.Order)); + o.weekdays = new Set(Arr.sort(values.weekdays, N.Order)); + o.tz = Option.fromNullable(values.tz); + const seconds = Array.from(o.seconds); + const minutes = Array.from(o.minutes); + const hours = Array.from(o.hours); + const days = Array.from(o.days); + const months = Array.from(o.months); + const weekdays = Array.from(o.weekdays); + o.first = { + second: seconds[0] ?? 0, + minute: minutes[0] ?? 0, + hour: hours[0] ?? 0, + day: days[0] ?? 1, + month: (months[0] ?? 1) - 1, + weekday: weekdays[0] ?? 0 + }; + o.last = { + second: seconds[seconds.length - 1] ?? 59, + minute: minutes[minutes.length - 1] ?? 59, + hour: hours[hours.length - 1] ?? 23, + day: days[days.length - 1] ?? 31, + month: (months[months.length - 1] ?? 12) - 1, + weekday: weekdays[weekdays.length - 1] ?? 6 + }; + o.next = { + second: lookupTable(seconds, 60, "next"), + minute: lookupTable(minutes, 60, "next"), + hour: lookupTable(hours, 24, "next"), + day: lookupTable(days, 32, "next"), + month: lookupTable(months, 13, "next"), + weekday: lookupTable(weekdays, 7, "next") + }; + o.prev = { + second: lookupTable(seconds, 60, "prev"), + minute: lookupTable(minutes, 60, "prev"), + hour: lookupTable(hours, 24, "prev"), + day: lookupTable(days, 32, "prev"), + month: lookupTable(months, 13, "prev"), + weekday: lookupTable(weekdays, 7, "prev") + }; + return o; +}; +const lookupTable = (values, size, dir) => { + const result = new Array(size).fill(undefined); + if (values.length === 0) { + return result; + } + let current = undefined; + if (dir === "next") { + let index = values.length - 1; + for (let i = size - 1; i >= 0; i--) { + while (index >= 0 && values[index] >= i) { + current = values[index--]; + } + result[i] = current; + } + } else { + let index = 0; + for (let i = 0; i < size; i++) { + while (index < values.length && values[index] <= i) { + current = values[index++]; + } + result[i] = current; + } + } + return result; +}; +/** + * @since 2.0.0 + * @category symbol + */ +export const ParseErrorTypeId = /*#__PURE__*/Symbol.for("effect/Cron/errors/ParseError"); +/** + * Represents a checked exception which occurs when decoding fails. + * + * @since 2.0.0 + * @category models + */ +export class ParseError extends /*#__PURE__*/Data.TaggedError("CronParseError") { + /** + * @since 2.0.0 + */ + [ParseErrorTypeId] = ParseErrorTypeId; +} +/** + * Returns `true` if the specified value is an `ParseError`, `false` otherwise. + * + * @since 2.0.0 + * @category guards + */ +export const isParseError = u => hasProperty(u, ParseErrorTypeId); +/** + * Parses a cron expression into a `Cron` instance. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Cron, Either } from "effect" + * + * // At 04:00 on every day-of-month from 8 through 14. + * assert.deepStrictEqual(Cron.parse("0 0 4 8-14 * *"), Either.right(Cron.make({ + * seconds: [0], + * minutes: [0], + * hours: [4], + * days: [8, 9, 10, 11, 12, 13, 14], + * months: [], + * weekdays: [] + * }))) + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const parse = (cron, tz) => { + const segments = cron.split(" ").filter(String.isNonEmpty); + if (segments.length !== 5 && segments.length !== 6) { + return Either.left(new ParseError({ + message: `Invalid number of segments in cron expression`, + input: cron + })); + } + if (segments.length === 5) { + segments.unshift("0"); + } + const [seconds, minutes, hours, days, months, weekdays] = segments; + const zone = tz === undefined || dateTime.isTimeZone(tz) ? Either.right(tz) : Either.fromOption(dateTime.zoneFromString(tz), () => new ParseError({ + message: `Invalid time zone in cron expression`, + input: tz + })); + return Either.all({ + tz: zone, + seconds: parseSegment(seconds, secondOptions), + minutes: parseSegment(minutes, minuteOptions), + hours: parseSegment(hours, hourOptions), + days: parseSegment(days, dayOptions), + months: parseSegment(months, monthOptions), + weekdays: parseSegment(weekdays, weekdayOptions) + }).pipe(Either.map(make)); +}; +/** + * Parses a cron expression into a `Cron` instance. + * + * **Details** + * + * This function takes a cron expression as a string and attempts to parse it + * into a `Cron` instance. If the expression is valid, the resulting `Cron` + * instance will represent the schedule defined by the cron expression. + * + * If the expression is invalid, the function throws a `ParseError`. + * + * You can optionally provide a time zone (`tz`) to interpret the cron + * expression in a specific time zone. If no time zone is provided, the cron + * expression will use the default time zone. + * + * @example + * ```ts + * import { Cron } from "effect" + * + * // At 04:00 on every day-of-month from 8 through 14. + * console.log(Cron.unsafeParse("0 4 8-14 * *")) + * // Output: + * // { + * // _id: 'Cron', + * // tz: { _id: 'Option', _tag: 'None' }, + * // seconds: [ 0 ], + * // minutes: [ 0 ], + * // hours: [ 4 ], + * // days: [ + * // 8, 9, 10, 11, + * // 12, 13, 14 + * // ], + * // months: [], + * // weekdays: [] + * // } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const unsafeParse = (cron, tz) => Either.getOrThrowWith(parse(cron, tz), identity); +/** + * Checks if a given `Date` falls within an active `Cron` time window. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Cron, Either } from "effect" + * + * const cron = Either.getOrThrow(Cron.parse("0 4 8-14 * *")) + * assert.deepStrictEqual(Cron.match(cron, new Date("2021-01-08 04:00:00")), true) + * assert.deepStrictEqual(Cron.match(cron, new Date("2021-01-08 05:00:00")), false) + * ``` + * + * @throws `IllegalArgumentException` if the given `DateTime.Input` is invalid. + * + * @since 2.0.0 + */ +export const match = (cron, date) => { + const parts = dateTime.unsafeMakeZoned(date, { + timeZone: Option.getOrUndefined(cron.tz) + }).pipe(dateTime.toParts); + if (cron.seconds.size !== 0 && !cron.seconds.has(parts.seconds)) { + return false; + } + if (cron.minutes.size !== 0 && !cron.minutes.has(parts.minutes)) { + return false; + } + if (cron.hours.size !== 0 && !cron.hours.has(parts.hours)) { + return false; + } + if (cron.months.size !== 0 && !cron.months.has(parts.month)) { + return false; + } + if (cron.days.size === 0 && cron.weekdays.size === 0) { + return true; + } + if (cron.weekdays.size === 0) { + return cron.days.has(parts.day); + } + if (cron.days.size === 0) { + return cron.weekdays.has(parts.weekDay); + } + return cron.days.has(parts.day) || cron.weekdays.has(parts.weekDay); +}; +const daysInMonth = date => new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth() + 1, 0)).getUTCDate(); +/** + * Returns the next run `Date` for the given `Cron` instance. + * + * Uses the current time as a starting point if no value is provided for `startFrom`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Cron, Either } from "effect" + * + * const after = new Date("2021-01-01 00:00:00") + * const cron = Either.getOrThrow(Cron.parse("0 4 8-14 * *")) + * assert.deepStrictEqual(Cron.next(cron, after), new Date("2021-01-08 04:00:00")) + * ``` + * + * @throws `IllegalArgumentException` if the given `DateTime.Input` is invalid. + * @throws `Error` if the next run date cannot be found within 10,000 iterations. + * + * @since 2.0.0 + */ +export const next = (cron, startFrom) => { + return stepCron(cron, startFrom, "next"); +}; +/** + * Returns the previous run `Date` for the given `Cron` instance. + * + * Uses the current time as a starting point if no value is provided for `startFrom`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Cron, Either } from "effect" + * + * const before = new Date("2021-01-15 00:00:00") + * const cron = Either.getOrThrow(Cron.parse("0 4 8-14 * *")) + * assert.deepStrictEqual(Cron.prev(cron, before), new Date("2021-01-14 04:00:00")) + * ``` + * + * @throws `IllegalArgumentException` if the given `DateTime.Input` is invalid. + * @throws `Error` if the previous run date cannot be found within 10,000 iterations. + * + * @since 3.20.0 + */ +export const prev = (cron, startFrom) => { + return stepCron(cron, startFrom, "prev"); +}; +/** @internal */ +const stepCron = (cron, startFrom, direction) => { + const tz = Option.getOrUndefined(cron.tz); + const zoned = dateTime.unsafeMakeZoned(startFrom ?? new Date(), { + timeZone: tz + }); + const prev = direction === "prev"; + const tick = prev ? -1 : 1; + const table = cron[direction]; + const boundary = prev ? cron.last : cron.first; + const needsStep = prev ? (next, current) => next < current : (next, current) => next > current; + const utc = tz !== undefined && dateTime.isTimeZoneNamed(tz) && tz.id === "UTC"; + const adjustDst = utc ? constVoid : current => { + const adjusted = dateTime.unsafeMakeZoned(current, { + timeZone: zoned.zone, + adjustForTimeZone: true, + disambiguation: prev ? "later" : undefined + }).pipe(dateTime.toDate); + const drift = current.getTime() - adjusted.getTime(); + if (prev ? drift !== 0 : drift > 0) { + current.setTime(adjusted.getTime()); + } + }; + const result = dateTime.mutate(zoned, current => { + current.setUTCSeconds(current.getUTCSeconds() + tick, 0); + for (let i = 0; i < 10_000; i++) { + if (cron.seconds.size !== 0) { + const currentSecond = current.getUTCSeconds(); + const nextSecond = table.second[currentSecond]; + if (nextSecond === undefined) { + current.setUTCMinutes(current.getUTCMinutes() + tick, boundary.second); + adjustDst(current); + continue; + } + if (needsStep(nextSecond, currentSecond)) { + current.setUTCSeconds(nextSecond); + adjustDst(current); + continue; + } + } + if (cron.minutes.size !== 0) { + const currentMinute = current.getUTCMinutes(); + const nextMinute = table.minute[currentMinute]; + if (nextMinute === undefined) { + current.setUTCHours(current.getUTCHours() + tick, boundary.minute, boundary.second); + adjustDst(current); + continue; + } + if (needsStep(nextMinute, currentMinute)) { + current.setUTCMinutes(nextMinute, boundary.second); + adjustDst(current); + continue; + } + } + if (cron.hours.size !== 0) { + const currentHour = current.getUTCHours(); + const nextHour = table.hour[currentHour]; + if (nextHour === undefined) { + current.setUTCDate(current.getUTCDate() + tick); + current.setUTCHours(boundary.hour, boundary.minute, boundary.second); + adjustDst(current); + continue; + } + if (needsStep(nextHour, currentHour)) { + current.setUTCHours(nextHour, boundary.minute, boundary.second); + adjustDst(current); + continue; + } + } + if (cron.weekdays.size !== 0 || cron.days.size !== 0) { + let a = prev ? -Infinity : Infinity; + let b = prev ? -Infinity : Infinity; + if (cron.weekdays.size !== 0) { + const currentWeekday = current.getUTCDay(); + const nextWeekday = table.weekday[currentWeekday]; + if (nextWeekday === undefined) { + a = prev ? currentWeekday - 7 + boundary.weekday : 7 - currentWeekday + boundary.weekday; + } else { + a = nextWeekday - currentWeekday; + } + } + // Only check day-of-month if weekday constraint not already satisfied (they're OR'd) + if (cron.days.size !== 0 && a !== 0) { + const currentDay = current.getUTCDate(); + const nextDay = table.day[currentDay]; + if (nextDay === undefined) { + if (prev) { + // When wrapping to previous month, calculate days back: + // Current day offset + gap from end of prev month to target day + // Example: June 3 → May 20 with boundary.day=20: -(3 + (31 - 20)) = -14 + const prevMonthDays = daysInMonth(new Date(Date.UTC(current.getUTCFullYear(), current.getUTCMonth(), 0))); + b = -(currentDay + (prevMonthDays - boundary.day)); + } else { + b = daysInMonth(current) - currentDay + boundary.day; + } + } else { + b = nextDay - currentDay; + } + } + const addDays = prev ? Math.max(a, b) : Math.min(a, b); + if (addDays !== 0) { + current.setUTCDate(current.getUTCDate() + addDays); + current.setUTCHours(boundary.hour, boundary.minute, boundary.second); + adjustDst(current); + continue; + } + } + if (cron.months.size !== 0) { + const currentMonth = current.getUTCMonth() + 1; + const nextMonth = table.month[currentMonth]; + const clampBoundaryDay = targetMonthIndex => { + if (cron.days.size !== 0) { + return boundary.day; + } + const maxDayInMonth = daysInMonth(new Date(Date.UTC(current.getUTCFullYear(), targetMonthIndex, 1))); + return Math.min(boundary.day, maxDayInMonth); + }; + if (nextMonth === undefined) { + current.setUTCFullYear(current.getUTCFullYear() + tick); + current.setUTCMonth(boundary.month, clampBoundaryDay(boundary.month)); + current.setUTCHours(boundary.hour, boundary.minute, boundary.second); + adjustDst(current); + continue; + } + if (needsStep(nextMonth, currentMonth)) { + const targetMonthIndex = nextMonth - 1; + current.setUTCMonth(targetMonthIndex, clampBoundaryDay(targetMonthIndex)); + current.setUTCHours(boundary.hour, boundary.minute, boundary.second); + adjustDst(current); + continue; + } + } + return; + } + throw new Error("Unable to find next cron date"); + }); + return dateTime.toDateUtc(result); +}; +/** + * Returns an `IterableIterator` which yields the sequence of `Date`s that match the `Cron` instance. + * + * @since 2.0.0 + */ +export const sequence = function* (cron, startFrom) { + while (true) { + yield startFrom = next(cron, startFrom); + } +}; +/** + * Returns an `IterableIterator` which yields the sequence of `Date`s that match the `Cron` instance, + * in reverse direction. + * + * @since 3.20.0 + */ +export const sequenceReverse = function* (cron, startFrom) { + while (true) { + yield startFrom = prev(cron, startFrom); + } +}; +/** + * @category instances + * @since 2.0.0 + */ +export const Equivalence = /*#__PURE__*/equivalence.make((self, that) => restrictionsEquals(self.seconds, that.seconds) && restrictionsEquals(self.minutes, that.minutes) && restrictionsEquals(self.hours, that.hours) && restrictionsEquals(self.days, that.days) && restrictionsEquals(self.months, that.months) && restrictionsEquals(self.weekdays, that.weekdays)); +const restrictionsArrayEquals = /*#__PURE__*/equivalence.array(equivalence.number); +const restrictionsEquals = (self, that) => restrictionsArrayEquals(Arr.fromIterable(self), Arr.fromIterable(that)); +/** + * Checks if two `Cron`s are equal. + * + * @since 2.0.0 + * @category predicates + */ +export const equals = /*#__PURE__*/dual(2, (self, that) => Equivalence(self, that)); +const secondOptions = { + min: 0, + max: 59 +}; +const minuteOptions = { + min: 0, + max: 59 +}; +const hourOptions = { + min: 0, + max: 23 +}; +const dayOptions = { + min: 1, + max: 31 +}; +const monthOptions = { + min: 1, + max: 12, + aliases: { + jan: 1, + feb: 2, + mar: 3, + apr: 4, + may: 5, + jun: 6, + jul: 7, + aug: 8, + sep: 9, + oct: 10, + nov: 11, + dec: 12 + } +}; +const weekdayOptions = { + min: 0, + max: 6, + aliases: { + sun: 0, + mon: 1, + tue: 2, + wed: 3, + thu: 4, + fri: 5, + sat: 6 + } +}; +const parseSegment = (input, options) => { + const capacity = options.max - options.min + 1; + const values = new Set(); + const fields = input.split(","); + for (const field of fields) { + const [raw, step] = splitStep(field); + if (raw === "*" && step === undefined) { + return Either.right(new Set()); + } + if (step !== undefined) { + if (!Number.isInteger(step)) { + return Either.left(new ParseError({ + message: `Expected step value to be a positive integer`, + input + })); + } + if (step < 1) { + return Either.left(new ParseError({ + message: `Expected step value to be greater than 0`, + input + })); + } + if (step > options.max) { + return Either.left(new ParseError({ + message: `Expected step value to be less than ${options.max}`, + input + })); + } + } + if (raw === "*") { + for (let i = options.min; i <= options.max; i += step ?? 1) { + values.add(i); + } + } else { + const [left, right] = splitRange(raw, options.aliases); + if (!Number.isInteger(left)) { + return Either.left(new ParseError({ + message: `Expected a positive integer`, + input + })); + } + if (left < options.min || left > options.max) { + return Either.left(new ParseError({ + message: `Expected a value between ${options.min} and ${options.max}`, + input + })); + } + if (right === undefined) { + values.add(left); + } else { + if (!Number.isInteger(right)) { + return Either.left(new ParseError({ + message: `Expected a positive integer`, + input + })); + } + if (right < options.min || right > options.max) { + return Either.left(new ParseError({ + message: `Expected a value between ${options.min} and ${options.max}`, + input + })); + } + if (left > right) { + return Either.left(new ParseError({ + message: `Invalid value range`, + input + })); + } + for (let i = left; i <= right; i += step ?? 1) { + values.add(i); + } + } + } + if (values.size >= capacity) { + return Either.right(new Set()); + } + } + return Either.right(values); +}; +const splitStep = input => { + const seperator = input.indexOf("/"); + if (seperator !== -1) { + return [input.slice(0, seperator), Number(input.slice(seperator + 1))]; + } + return [input, undefined]; +}; +const splitRange = (input, aliases) => { + const seperator = input.indexOf("-"); + if (seperator !== -1) { + return [aliasOrValue(input.slice(0, seperator), aliases), aliasOrValue(input.slice(seperator + 1), aliases)]; + } + return [aliasOrValue(input, aliases), undefined]; +}; +function aliasOrValue(field, aliases) { + return aliases?.[field.toLocaleLowerCase()] ?? Number(field); +} +//# sourceMappingURL=Cron.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Cron.js.map b/backend/node_modules/effect/dist/esm/Cron.js.map new file mode 100644 index 0000000000000000000000000000000000000000..0087a4be4b212e0f42caab894da133afc40df073 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Cron.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Cron.js","names":["Arr","Data","Either","Equal","equivalence","constVoid","dual","identity","pipe","Hash","format","NodeInspectSymbol","dateTime","N","Option","pipeArguments","hasProperty","String","TypeId","Symbol","for","CronProto","symbol","that","isCron","equals","hash","tz","combine","array","fromIterable","seconds","minutes","hours","days","months","weekdays","cached","toString","toJSON","_id","arguments","u","make","values","o","Object","create","Set","sort","Order","fromNullable","Array","from","first","second","minute","hour","day","month","weekday","last","length","next","lookupTable","prev","size","dir","result","fill","undefined","current","index","i","ParseErrorTypeId","ParseError","TaggedError","isParseError","parse","cron","segments","split","filter","isNonEmpty","left","message","input","unshift","zone","isTimeZone","right","fromOption","zoneFromString","all","parseSegment","secondOptions","minuteOptions","hourOptions","dayOptions","monthOptions","weekdayOptions","map","unsafeParse","getOrThrowWith","match","date","parts","unsafeMakeZoned","timeZone","getOrUndefined","toParts","has","weekDay","daysInMonth","Date","UTC","getUTCFullYear","getUTCMonth","getUTCDate","startFrom","stepCron","direction","zoned","tick","table","boundary","needsStep","utc","isTimeZoneNamed","id","adjustDst","adjusted","adjustForTimeZone","disambiguation","toDate","drift","getTime","setTime","mutate","setUTCSeconds","getUTCSeconds","currentSecond","nextSecond","setUTCMinutes","getUTCMinutes","currentMinute","nextMinute","setUTCHours","getUTCHours","currentHour","nextHour","setUTCDate","a","Infinity","b","currentWeekday","getUTCDay","nextWeekday","currentDay","nextDay","prevMonthDays","addDays","Math","max","min","currentMonth","nextMonth","clampBoundaryDay","targetMonthIndex","maxDayInMonth","setUTCFullYear","setUTCMonth","Error","toDateUtc","sequence","sequenceReverse","Equivalence","self","restrictionsEquals","restrictionsArrayEquals","number","aliases","jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec","sun","mon","tue","wed","thu","fri","sat","options","capacity","fields","field","raw","step","splitStep","Number","isInteger","add","splitRange","seperator","indexOf","slice","aliasOrValue","toLocaleLowerCase"],"sources":["../../src/Cron.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,GAAG,MAAM,YAAY;AACjC,OAAO,KAAKC,IAAI,MAAM,WAAW;AAEjC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAC/C,SAASC,SAAS,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,IAAI,QAAQ,eAAe;AAC/D,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,SAASC,MAAM,EAAoBC,iBAAiB,QAAQ,kBAAkB;AAC9E,OAAO,KAAKC,QAAQ,MAAM,wBAAwB;AAClD,OAAO,KAAKC,CAAC,MAAM,aAAa;AAChC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,SAAwBC,aAAa,QAAQ,eAAe;AAC5D,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,OAAO,KAAKC,MAAM,MAAM,aAAa;AAGrC;;;;AAIA,OAAO,MAAMC,MAAM,gBAAkBC,MAAM,CAACC,GAAG,CAAC,aAAa,CAAC;AA2D9D,MAAMC,SAAS,GAAG;EAChB,CAACH,MAAM,GAAGA,MAAM;EAChB,CAACf,KAAK,CAACmB,MAAM,EAAcC,IAAa;IACtC,OAAOC,MAAM,CAACD,IAAI,CAAC,IAAIE,MAAM,CAAC,IAAI,EAAEF,IAAI,CAAC;EAC3C,CAAC;EACD,CAACd,IAAI,CAACa,MAAM,IAAC;IACX,OAAOd,IAAI,CACTC,IAAI,CAACiB,IAAI,CAAC,IAAI,CAACC,EAAE,CAAC,EAClBlB,IAAI,CAACmB,OAA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,YAAYA,CAACX,KAAa,EAAEvB,OAAgC;EACnE,OAAOA,OAAO,GAAGuB,KAAK,CAACY,iBAAiB,EAAE,CAAC,IAAIR,MAAM,CAACJ,KAAK,CAAC;AAC9D","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Data.js.map b/backend/node_modules/effect/dist/esm/Data.js.map new file mode 100644 index 0000000000000000000000000000000000000000..8a41f3a2d3eeb15a8d7f093ed78896be0456f492 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Data.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Data.js","names":["core","internal","StructuralPrototype","Predicate","struct","unsafeStruct","as","Object","setPrototypeOf","tuple","unsafeArray","array","slice","ArrayProto","_case","args","undefined","create","case","tagged","tag","value","_tag","Class","Structural","TaggedClass","Base","taggedEnum","Proxy","get","_target","_receiver","isTagged","taggedMatch","arguments","length","cases","Error","plainArgsSymbol","Symbol","for","O","BaseEffectError","YieldableError","constructor","message","cause","assign","defineProperty","enumerable","toJSON","TaggedError","prototype","name"],"sources":["../../src/Data.ts"],"sourcesContent":[null],"mappings":"AAIA,OAAO,KAAKA,IAAI,MAAM,oBAAoB;AAC1C,OAAO,KAAKC,QAAQ,MAAM,oBAAoB;AAC9C,SAASC,mBAAmB,QAAQ,0BAA0B;AAC9D,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAmB3C;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MAAMC,MAAM,GAA+EH,QAAQ,CAACG,MAAM;AAEjH;;;;AAIA,OAAO,MAAMC,YAAY,GAAmCC,EAAK,IAC/DC,MAAM,CAACC,cAAc,CAACF,EAAE,EAAEJ,mBAAmB,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MAAMO,KAAK,GAAGA,CAAgC,GAAGH,EAAM,KAAmBI,WAAW,CAACJ,EAAE,CAAC;AAEhG;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,OAAO,MAAMK,KAAK,GAAmC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C;UAAE,GAAG;QAAI,CAAE;MACvD;;GAEH;EACD,OAAOG,CAAC,CAACC,eAAe;AAC1B,CAAC,CAAC,CAAE;AAEJ;;;;AAIA,OAAO,MAAMS,WAAW,GAAwB/B,GAAQ,IAEW;EACjE,MAAMqB,CAAC,GAAG;IACRC,eAAe,EAAE,cAAcL,KAAS;MAC7Bf,IAAI,GAAGF,GAAG;;GAEtB;EACCqB,CAAC,CAACC,eAAe,CAACU,SAAiB,CAACC,IAAI,GAAGjC,GAAG;EAChD,OAAOqB,CAAC,CAACC,eAAsB;AACjC,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/DateTime.js b/backend/node_modules/effect/dist/esm/DateTime.js new file mode 100644 index 0000000000000000000000000000000000000000..dbc97b47ebf72eaeb053494afcdae68056071de6 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/DateTime.js @@ -0,0 +1,1071 @@ +import * as Context from "./Context.js"; +import * as Effect from "./Effect.js"; +import { dual } from "./Function.js"; +import * as Internal from "./internal/dateTime.js"; +import * as Layer from "./Layer.js"; +/** + * @since 3.6.0 + * @category type ids + */ +export const TypeId = Internal.TypeId; +/** + * @since 3.6.0 + * @category type ids + */ +export const TimeZoneTypeId = Internal.TimeZoneTypeId; +// ============================================================================= +// guards +// ============================================================================= +/** + * @since 3.6.0 + * @category guards + */ +export const isDateTime = Internal.isDateTime; +/** + * @since 3.6.0 + * @category guards + */ +export const isTimeZone = Internal.isTimeZone; +/** + * @since 3.6.0 + * @category guards + */ +export const isTimeZoneOffset = Internal.isTimeZoneOffset; +/** + * @since 3.6.0 + * @category guards + */ +export const isTimeZoneNamed = Internal.isTimeZoneNamed; +/** + * @since 3.6.0 + * @category guards + */ +export const isUtc = Internal.isUtc; +/** + * @since 3.6.0 + * @category guards + */ +export const isZoned = Internal.isZoned; +// ============================================================================= +// instances +// ============================================================================= +/** + * @since 3.6.0 + * @category instances + */ +export const Equivalence = Internal.Equivalence; +/** + * @since 3.6.0 + * @category instances + */ +export const Order = Internal.Order; +/** + * @since 3.6.0 + */ +export const clamp = Internal.clamp; +// ============================================================================= +// constructors +// ============================================================================= +/** + * Create a `DateTime` from a `Date`. + * + * If the `Date` is invalid, an `IllegalArgumentException` will be thrown. + * + * @since 3.6.0 + * @category constructors + */ +export const unsafeFromDate = Internal.unsafeFromDate; +/** + * Create a `DateTime` from one of the following: + * + * - A `DateTime` + * - A `Date` instance (invalid dates will throw an `IllegalArgumentException`) + * - The `number` of milliseconds since the Unix epoch + * - An object with the parts of a date + * - A `string` that can be parsed by `Date.parse` + * + * @since 3.6.0 + * @category constructors + * @example + * ```ts + * import { DateTime } from "effect" + * + * // from Date + * DateTime.unsafeMake(new Date()) + * + * // from parts + * DateTime.unsafeMake({ year: 2024 }) + * + * // from string + * DateTime.unsafeMake("2024-01-01") + * ``` + */ +export const unsafeMake = Internal.unsafeMake; +/** + * Create a `DateTime.Zoned` using `DateTime.unsafeMake` and a time zone. + * + * The input is treated as UTC and then the time zone is attached, unless + * `adjustForTimeZone` is set to `true`. In that case, the input is treated as + * already in the time zone. + * + * When `adjustForTimeZone` is true and ambiguous times occur during DST transitions, + * the `disambiguation` option controls how to resolve the ambiguity: + * - `compatible` (default): Choose earlier time for repeated times, later for gaps + * - `earlier`: Always choose the earlier of two possible times + * - `later`: Always choose the later of two possible times + * - `reject`: Throw an error when ambiguous times are encountered + * + * @since 3.6.0 + * @category constructors + * @example + * ```ts + * import { DateTime } from "effect" + * + * DateTime.unsafeMakeZoned(new Date(), { timeZone: "Europe/London" }) + * ``` + */ +export const unsafeMakeZoned = Internal.unsafeMakeZoned; +/** + * Create a `DateTime.Zoned` using `DateTime.make` and a time zone. + * + * The input is treated as UTC and then the time zone is attached, unless + * `adjustForTimeZone` is set to `true`. In that case, the input is treated as + * already in the time zone. + * + * When `adjustForTimeZone` is true and ambiguous times occur during DST transitions, + * the `disambiguation` option controls how to resolve the ambiguity: + * - `compatible` (default): Choose earlier time for repeated times, later for gaps + * - `earlier`: Always choose the earlier of two possible times + * - `later`: Always choose the later of two possible times + * - `reject`: Throw an error when ambiguous times are encountered + * + * If the date time input or time zone is invalid, `None` will be returned. + * + * @since 3.6.0 + * @category constructors + * @example + * ```ts + * import { DateTime } from "effect" + * + * DateTime.makeZoned(new Date(), { timeZone: "Europe/London" }) + * ``` + */ +export const makeZoned = Internal.makeZoned; +/** + * Create a `DateTime` from one of the following: + * + * - A `DateTime` + * - A `Date` instance (invalid dates will throw an `IllegalArgumentException`) + * - The `number` of milliseconds since the Unix epoch + * - An object with the parts of a date + * - A `string` that can be parsed by `Date.parse` + * + * If the input is invalid, `None` will be returned. + * + * @since 3.6.0 + * @category constructors + * @example + * ```ts + * import { DateTime } from "effect" + * + * // from Date + * DateTime.make(new Date()) + * + * // from parts + * DateTime.make({ year: 2024 }) + * + * // from string + * DateTime.make("2024-01-01") + * ``` + */ +export const make = Internal.make; +/** + * Create a `DateTime.Zoned` from a string. + * + * It uses the format: `YYYY-MM-DDTHH:mm:ss.sss+HH:MM[Time/Zone]`. + * + * @since 3.6.0 + * @category constructors + */ +export const makeZonedFromString = Internal.makeZonedFromString; +/** + * Get the current time using the `Clock` service and convert it to a `DateTime`. + * + * @since 3.6.0 + * @category constructors + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * Effect.gen(function* () { + * const now = yield* DateTime.now + * }) + * ``` + */ +export const now = Internal.now; +/** + * Get the current time using the `Clock` service. + * + * @since 3.14.0 + * @category constructors + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * Effect.gen(function* () { + * const now = yield* DateTime.nowAsDate + * }) + * ``` + */ +export const nowAsDate = Internal.nowAsDate; +/** + * Get the current time using `Date.now`. + * + * @since 3.6.0 + * @category constructors + */ +export const unsafeNow = Internal.unsafeNow; +// ============================================================================= +// time zones +// ============================================================================= +/** + * For a `DateTime` returns a new `DateTime.Utc`. + * + * @since 3.13.0 + * @category time zones + * @example + * ```ts + * import { DateTime } from "effect" + * + * const now = DateTime.unsafeMakeZoned({ year: 2024 }, { timeZone: "Europe/London" }) + * + * // set as UTC + * const utc: DateTime.Utc = DateTime.toUtc(now) + * ``` + */ +export const toUtc = Internal.toUtc; +/** + * Set the time zone of a `DateTime`, returning a new `DateTime.Zoned`. + * + * @since 3.6.0 + * @category time zones + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * Effect.gen(function* () { + * const now = yield* DateTime.now + * const zone = DateTime.zoneUnsafeMakeNamed("Europe/London") + * + * // set the time zone + * const zoned: DateTime.Zoned = DateTime.setZone(now, zone) + * }) + * ``` + */ +export const setZone = Internal.setZone; +/** + * Add a fixed offset time zone to a `DateTime`. + * + * The offset is in milliseconds. + * + * @since 3.6.0 + * @category time zones + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * Effect.gen(function* () { + * const now = yield* DateTime.now + * + * // set the offset time zone in milliseconds + * const zoned: DateTime.Zoned = DateTime.setZoneOffset(now, 3 * 60 * 60 * 1000) + * }) + * ``` + */ +export const setZoneOffset = Internal.setZoneOffset; +/** + * Attempt to create a named time zone from a IANA time zone identifier. + * + * If the time zone is invalid, an `IllegalArgumentException` will be thrown. + * + * @since 3.6.0 + * @category time zones + */ +export const zoneUnsafeMakeNamed = Internal.zoneUnsafeMakeNamed; +/** + * Create a fixed offset time zone. + * + * @since 3.6.0 + * @category time zones + */ +export const zoneMakeOffset = Internal.zoneMakeOffset; +/** + * Create a named time zone from a IANA time zone identifier. If the time zone + * is invalid, `None` will be returned. + * + * @since 3.6.0 + * @category time zones + */ +export const zoneMakeNamed = Internal.zoneMakeNamed; +/** + * Create a named time zone from a IANA time zone identifier. If the time zone + * is invalid, it will fail with an `IllegalArgumentException`. + * + * @since 3.6.0 + * @category time zones + */ +export const zoneMakeNamedEffect = Internal.zoneMakeNamedEffect; +/** + * Create a named time zone from the system's local time zone. + * + * @since 3.6.0 + * @category time zones + */ +export const zoneMakeLocal = Internal.zoneMakeLocal; +/** + * Try parse a TimeZone from a string + * + * @since 3.6.0 + * @category time zones + */ +export const zoneFromString = Internal.zoneFromString; +/** + * Format a `TimeZone` as a string. + * + * @since 3.6.0 + * @category time zones + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * // Outputs "+03:00" + * DateTime.zoneToString(DateTime.zoneMakeOffset(3 * 60 * 60 * 1000)) + * + * // Outputs "Europe/London" + * DateTime.zoneToString(DateTime.zoneUnsafeMakeNamed("Europe/London")) + * ``` + */ +export const zoneToString = Internal.zoneToString; +/** + * Set the time zone of a `DateTime` from an IANA time zone identifier. If the + * time zone is invalid, `None` will be returned. + * + * @since 3.6.0 + * @category time zones + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * Effect.gen(function* () { + * const now = yield* DateTime.now + * // set the time zone, returns an Option + * DateTime.setZoneNamed(now, "Europe/London") + * }) + * ``` + */ +export const setZoneNamed = Internal.setZoneNamed; +/** + * Set the time zone of a `DateTime` from an IANA time zone identifier. If the + * time zone is invalid, an `IllegalArgumentException` will be thrown. + * + * @since 3.6.0 + * @category time zones + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * Effect.gen(function* () { + * const now = yield* DateTime.now + * // set the time zone + * DateTime.unsafeSetZoneNamed(now, "Europe/London") + * }) + * ``` + */ +export const unsafeSetZoneNamed = Internal.unsafeSetZoneNamed; +// ============================================================================= +// comparisons +// ============================================================================= +/** + * Calulate the difference between two `DateTime` values, returning the number + * of milliseconds the `other` DateTime is from `self`. + * + * If `other` is *after* `self`, the result will be a positive number. + * + * @since 3.6.0 + * @category comparisons + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * Effect.gen(function* () { + * const now = yield* DateTime.now + * const other = DateTime.add(now, { minutes: 1 }) + * + * // returns 60000 + * DateTime.distance(now, other) + * }) + * ``` + */ +export const distance = Internal.distance; +/** + * Calulate the difference between two `DateTime` values. + * + * If the `other` DateTime is before `self`, the result will be a negative + * `Duration`, returned as a `Left`. + * + * If the `other` DateTime is after `self`, the result will be a positive + * `Duration`, returned as a `Right`. + * + * @since 3.6.0 + * @category comparisons + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * Effect.gen(function* () { + * const now = yield* DateTime.now + * const other = DateTime.add(now, { minutes: 1 }) + * + * // returns Either.right(Duration.minutes(1)) + * DateTime.distanceDurationEither(now, other) + * + * // returns Either.left(Duration.minutes(1)) + * DateTime.distanceDurationEither(other, now) + * }) + * ``` + */ +export const distanceDurationEither = Internal.distanceDurationEither; +/** + * Calulate the distance between two `DateTime` values. + * + * @since 3.6.0 + * @category comparisons + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * Effect.gen(function* () { + * const now = yield* DateTime.now + * const other = DateTime.add(now, { minutes: 1 }) + * + * // returns Duration.minutes(1) + * DateTime.distanceDuration(now, other) + * }) + * ``` + */ +export const distanceDuration = Internal.distanceDuration; +/** + * @since 3.6.0 + * @category comparisons + */ +export const min = Internal.min; +/** + * @since 3.6.0 + * @category comparisons + */ +export const max = Internal.max; +/** + * @since 3.6.0 + * @category comparisons + */ +export const greaterThan = Internal.greaterThan; +/** + * @since 3.6.0 + * @category comparisons + */ +export const greaterThanOrEqualTo = Internal.greaterThanOrEqualTo; +/** + * @since 3.6.0 + * @category comparisons + */ +export const lessThan = Internal.lessThan; +/** + * @since 3.6.0 + * @category comparisons + */ +export const lessThanOrEqualTo = Internal.lessThanOrEqualTo; +/** + * @since 3.6.0 + * @category comparisons + */ +export const between = Internal.between; +/** + * @since 3.6.0 + * @category comparisons + */ +export const isFuture = Internal.isFuture; +/** + * @since 3.6.0 + * @category comparisons + */ +export const unsafeIsFuture = Internal.unsafeIsFuture; +/** + * @since 3.6.0 + * @category comparisons + */ +export const isPast = Internal.isPast; +/** + * @since 3.6.0 + * @category comparisons + */ +export const unsafeIsPast = Internal.unsafeIsPast; +// ============================================================================= +// conversions +// ============================================================================= +/** + * Get the UTC `Date` of a `DateTime`. + * + * @since 3.6.0 + * @category conversions + */ +export const toDateUtc = Internal.toDateUtc; +/** + * Convert a `DateTime` to a `Date`, applying the time zone first. + * + * @since 3.6.0 + * @category conversions + */ +export const toDate = Internal.toDate; +/** + * Calculate the time zone offset of a `DateTime.Zoned` in milliseconds. + * + * @since 3.6.0 + * @category conversions + */ +export const zonedOffset = Internal.zonedOffset; +/** + * Calculate the time zone offset of a `DateTime` in milliseconds. + * + * The offset is formatted as "±HH:MM". + * + * @since 3.6.0 + * @category conversions + */ +export const zonedOffsetIso = Internal.zonedOffsetIso; +/** + * Get the milliseconds since the Unix epoch of a `DateTime`. + * + * @since 3.6.0 + * @category conversions + */ +export const toEpochMillis = Internal.toEpochMillis; +/** + * Remove the time aspect of a `DateTime`, first adjusting for the time + * zone. It will return a `DateTime.Utc` only containing the date. + * + * @since 3.6.0 + * @category conversions + * @example + * ```ts + * import { DateTime } from "effect" + * + * // returns "2024-01-01T00:00:00Z" + * DateTime.unsafeMakeZoned("2024-01-01T05:00:00Z", { + * timeZone: "Pacific/Auckland", + * adjustForTimeZone: true + * }).pipe( + * DateTime.removeTime, + * DateTime.formatIso + * ) + * ``` + */ +export const removeTime = Internal.removeTime; +// ============================================================================= +// parts +// ============================================================================= +/** + * Get the different parts of a `DateTime` as an object. + * + * The parts will be time zone adjusted. + * + * @since 3.6.0 + * @category parts + */ +export const toParts = Internal.toParts; +/** + * Get the different parts of a `DateTime` as an object. + * + * The parts will be in UTC. + * + * @since 3.6.0 + * @category parts + */ +export const toPartsUtc = Internal.toPartsUtc; +/** + * Get a part of a `DateTime` as a number. + * + * The part will be in the UTC time zone. + * + * @since 3.6.0 + * @category parts + * @example + * ```ts + * import * as assert from "node:assert" + * import { DateTime } from "effect" + * + * const now = DateTime.unsafeMake({ year: 2024 }) + * const year = DateTime.getPartUtc(now, "year") + * assert.strictEqual(year, 2024) + * ``` + */ +export const getPartUtc = Internal.getPartUtc; +/** + * Get a part of a `DateTime` as a number. + * + * The part will be time zone adjusted. + * + * @since 3.6.0 + * @category parts + * @example + * ```ts + * import * as assert from "node:assert" + * import { DateTime } from "effect" + * + * const now = DateTime.unsafeMakeZoned({ year: 2024 }, { timeZone: "Europe/London" }) + * const year = DateTime.getPart(now, "year") + * assert.strictEqual(year, 2024) + * ``` + */ +export const getPart = Internal.getPart; +/** + * Set the different parts of a `DateTime` as an object. + * + * The Date will be time zone adjusted. + * + * @since 3.6.0 + * @category parts + */ +export const setParts = Internal.setParts; +/** + * Set the different parts of a `DateTime` as an object. + * + * @since 3.6.0 + * @category parts + */ +export const setPartsUtc = Internal.setPartsUtc; +// ============================================================================= +// current time zone +// ============================================================================= +/** + * @since 3.11.0 + * @category current time zone + */ +export class CurrentTimeZone extends /*#__PURE__*/Context.Tag("effect/DateTime/CurrentTimeZone")() {} +/** + * Set the time zone of a `DateTime` to the current time zone, which is + * determined by the `CurrentTimeZone` service. + * + * @since 3.6.0 + * @category current time zone + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * Effect.gen(function* () { + * const now = yield* DateTime.now + * + * // set the time zone to "Europe/London" + * const zoned = yield* DateTime.setZoneCurrent(now) + * }).pipe(DateTime.withCurrentZoneNamed("Europe/London")) + * ``` + */ +export const setZoneCurrent = self => Effect.map(CurrentTimeZone, zone => setZone(self, zone)); +/** + * Provide the `CurrentTimeZone` to an effect. + * + * @since 3.6.0 + * @category current time zone + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * const zone = DateTime.zoneUnsafeMakeNamed("Europe/London") + * + * Effect.gen(function* () { + * const now = yield* DateTime.nowInCurrentZone + * }).pipe(DateTime.withCurrentZone(zone)) + * ``` + */ +export const withCurrentZone = /*#__PURE__*/dual(2, (effect, zone) => Effect.provideService(effect, CurrentTimeZone, zone)); +/** + * Provide the `CurrentTimeZone` to an effect, using the system's local time + * zone. + * + * @since 3.6.0 + * @category current time zone + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * Effect.gen(function* () { + * // will use the system's local time zone + * const now = yield* DateTime.nowInCurrentZone + * }).pipe(DateTime.withCurrentZoneLocal) + * ``` + */ +export const withCurrentZoneLocal = effect => Effect.provideServiceEffect(effect, CurrentTimeZone, Effect.sync(zoneMakeLocal)); +/** + * Provide the `CurrentTimeZone` to an effect, using a offset. + * + * @since 3.6.0 + * @category current time zone + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * Effect.gen(function* () { + * // will use the system's local time zone + * const now = yield* DateTime.nowInCurrentZone + * }).pipe(DateTime.withCurrentZoneOffset(3 * 60 * 60 * 1000)) + * ``` + */ +export const withCurrentZoneOffset = /*#__PURE__*/dual(2, (effect, offset) => Effect.provideService(effect, CurrentTimeZone, zoneMakeOffset(offset))); +/** + * Provide the `CurrentTimeZone` to an effect using an IANA time zone + * identifier. + * + * If the time zone is invalid, it will fail with an `IllegalArgumentException`. + * + * @since 3.6.0 + * @category current time zone + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * Effect.gen(function* () { + * // will use the "Europe/London" time zone + * const now = yield* DateTime.nowInCurrentZone + * }).pipe(DateTime.withCurrentZoneNamed("Europe/London")) + * ``` + */ +export const withCurrentZoneNamed = /*#__PURE__*/dual(2, (effect, zone) => Effect.provideServiceEffect(effect, CurrentTimeZone, zoneMakeNamedEffect(zone))); +/** + * Get the current time as a `DateTime.Zoned`, using the `CurrentTimeZone`. + * + * @since 3.6.0 + * @category current time zone + * @example + * ```ts + * import { DateTime, Effect } from "effect" + * + * Effect.gen(function* () { + * // will use the "Europe/London" time zone + * const now = yield* DateTime.nowInCurrentZone + * }).pipe(DateTime.withCurrentZoneNamed("Europe/London")) + * ``` + */ +export const nowInCurrentZone = /*#__PURE__*/Effect.flatMap(now, setZoneCurrent); +// ============================================================================= +// mapping +// ============================================================================= +/** + * Modify a `DateTime` by applying a function to a cloned `Date` instance. + * + * The `Date` will first have the time zone applied if possible, and then be + * converted back to a `DateTime` within the same time zone. + * + * Supports `disambiguation` when the new wall clock time is ambiguous. + * + * @since 3.6.0 + * @category mapping + */ +export const mutate = Internal.mutate; +/** + * Modify a `DateTime` by applying a function to a cloned UTC `Date` instance. + * + * @since 3.6.0 + * @category mapping + */ +export const mutateUtc = Internal.mutateUtc; +/** + * Transform a `DateTime` by applying a function to the number of milliseconds + * since the Unix epoch. + * + * @since 3.6.0 + * @category mapping + * @example + * ```ts + * import { DateTime } from "effect" + * + * // add 10 milliseconds + * DateTime.unsafeMake(0).pipe( + * DateTime.mapEpochMillis((millis) => millis + 10) + * ) + * ``` + */ +export const mapEpochMillis = Internal.mapEpochMillis; +/** + * Using the time zone adjusted `Date`, apply a function to the `Date` and + * return the result. + * + * @since 3.6.0 + * @category mapping + * @example + * ```ts + * import { DateTime } from "effect" + * + * // get the time zone adjusted date in milliseconds + * DateTime.unsafeMakeZoned(0, { timeZone: "Europe/London" }).pipe( + * DateTime.withDate((date) => date.getTime()) + * ) + * ``` + */ +export const withDate = Internal.withDate; +/** + * Using the time zone adjusted `Date`, apply a function to the `Date` and + * return the result. + * + * @since 3.6.0 + * @category mapping + * @example + * ```ts + * import { DateTime } from "effect" + * + * // get the date in milliseconds + * DateTime.unsafeMake(0).pipe( + * DateTime.withDateUtc((date) => date.getTime()) + * ) + * ``` + */ +export const withDateUtc = Internal.withDateUtc; +/** + * @since 3.6.0 + * @category mapping + */ +export const match = Internal.match; +// ============================================================================= +// math +// ============================================================================= +/** + * Add the given `Duration` to a `DateTime`. + * + * @since 3.6.0 + * @category math + * @example + * ```ts + * import { DateTime } from "effect" + * + * // add 5 minutes + * DateTime.unsafeMake(0).pipe( + * DateTime.addDuration("5 minutes") + * ) + * ``` + */ +export const addDuration = Internal.addDuration; +/** + * Subtract the given `Duration` from a `DateTime`. + * + * @since 3.6.0 + * @category math + * @example + * ```ts + * import { DateTime } from "effect" + * + * // subtract 5 minutes + * DateTime.unsafeMake(0).pipe( + * DateTime.subtractDuration("5 minutes") + * ) + * ``` + */ +export const subtractDuration = Internal.subtractDuration; +/** + * Add the given `amount` of `unit`'s to a `DateTime`. + * + * The time zone is taken into account when adding days, weeks, months, and + * years. + * + * @since 3.6.0 + * @category math + * @example + * ```ts + * import { DateTime } from "effect" + * + * // add 5 minutes + * DateTime.unsafeMake(0).pipe( + * DateTime.add({ minutes: 5 }) + * ) + * ``` + */ +export const add = Internal.add; +/** + * Subtract the given `amount` of `unit`'s from a `DateTime`. + * + * @since 3.6.0 + * @category math + * @example + * ```ts + * import { DateTime } from "effect" + * + * // subtract 5 minutes + * DateTime.unsafeMake(0).pipe( + * DateTime.subtract({ minutes: 5 }) + * ) + * ``` + */ +export const subtract = Internal.subtract; +/** + * Converts a `DateTime` to the start of the given `part`. + * + * If the part is `week`, the `weekStartsOn` option can be used to specify the + * day of the week that the week starts on. The default is 0 (Sunday). + * + * @since 3.6.0 + * @category math + * @example + * ```ts + * import { DateTime } from "effect" + * + * // returns "2024-01-01T00:00:00Z" + * DateTime.unsafeMake("2024-01-01T12:00:00Z").pipe( + * DateTime.startOf("day"), + * DateTime.formatIso + * ) + * ``` + */ +export const startOf = Internal.startOf; +/** + * Converts a `DateTime` to the end of the given `part`. + * + * If the part is `week`, the `weekStartsOn` option can be used to specify the + * day of the week that the week starts on. The default is 0 (Sunday). + * + * @since 3.6.0 + * @category math + * @example + * ```ts + * import { DateTime } from "effect" + * + * // returns "2024-01-01T23:59:59.999Z" + * DateTime.unsafeMake("2024-01-01T12:00:00Z").pipe( + * DateTime.endOf("day"), + * DateTime.formatIso + * ) + * ``` + */ +export const endOf = Internal.endOf; +/** + * Converts a `DateTime` to the nearest given `part`. + * + * If the part is `week`, the `weekStartsOn` option can be used to specify the + * day of the week that the week starts on. The default is 0 (Sunday). + * + * @since 3.6.0 + * @category math + * @example + * ```ts + * import { DateTime } from "effect" + * + * // returns "2024-01-02T00:00:00Z" + * DateTime.unsafeMake("2024-01-01T12:01:00Z").pipe( + * DateTime.nearest("day"), + * DateTime.formatIso + * ) + * ``` + */ +export const nearest = Internal.nearest; +// ============================================================================= +// formatting +// ============================================================================= +/** + * Format a `DateTime` as a string using the `DateTimeFormat` API. + * + * The `timeZone` option is set to the offset of the time zone. + * + * Note: On Node versions < 22, fixed "Offset" zones will set the time zone to + * "UTC" and use the adjusted `Date`. + * + * @since 3.6.0 + * @category formatting + */ +export const format = Internal.format; +/** + * Format a `DateTime` as a string using the `DateTimeFormat` API. + * + * It will use the system's local time zone & locale. + * + * @since 3.6.0 + * @category formatting + */ +export const formatLocal = Internal.formatLocal; +/** + * Format a `DateTime` as a string using the `DateTimeFormat` API. + * + * This forces the time zone to be UTC. + * + * @since 3.6.0 + * @category formatting + */ +export const formatUtc = Internal.formatUtc; +/** + * Format a `DateTime` as a string using the `DateTimeFormat` API. + * + * @since 3.6.0 + * @category formatting + */ +export const formatIntl = Internal.formatIntl; +/** + * Format a `DateTime` as a UTC ISO string. + * + * @since 3.6.0 + * @category formatting + */ +export const formatIso = Internal.formatIso; +/** + * Format a `DateTime` as a time zone adjusted ISO date string. + * + * @since 3.6.0 + * @category formatting + */ +export const formatIsoDate = Internal.formatIsoDate; +/** + * Format a `DateTime` as a UTC ISO date string. + * + * @since 3.6.0 + * @category formatting + */ +export const formatIsoDateUtc = Internal.formatIsoDateUtc; +/** + * Format a `DateTime.Zoned` as a ISO string with an offset. + * + * @since 3.6.0 + * @category formatting + */ +export const formatIsoOffset = Internal.formatIsoOffset; +/** + * Format a `DateTime.Zoned` as a string. + * + * It uses the format: `YYYY-MM-DDTHH:mm:ss.sss+HH:MM[Time/Zone]`. + * + * @since 3.6.0 + * @category formatting + */ +export const formatIsoZoned = Internal.formatIsoZoned; +/** + * Create a Layer from the given time zone. + * + * @since 3.6.0 + * @category current time zone + */ +export const layerCurrentZone = zone => Layer.succeed(CurrentTimeZone, zone); +/** + * Create a Layer from the given time zone offset. + * + * @since 3.6.0 + * @category current time zone + */ +export const layerCurrentZoneOffset = offset => Layer.succeed(CurrentTimeZone, Internal.zoneMakeOffset(offset)); +/** + * Create a Layer from the given IANA time zone identifier. + * + * @since 3.6.0 + * @category current time zone + */ +export const layerCurrentZoneNamed = zoneId => Layer.effect(CurrentTimeZone, Internal.zoneMakeNamedEffect(zoneId)); +/** + * Create a Layer from the systems local time zone. + * + * @since 3.6.0 + * @category current time zone + */ +export const layerCurrentZoneLocal = /*#__PURE__*/Layer.sync(CurrentTimeZone, zoneMakeLocal); +//# sourceMappingURL=DateTime.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/DateTime.js.map b/backend/node_modules/effect/dist/esm/DateTime.js.map new file mode 100644 index 0000000000000000000000000000000000000000..961a2f0cef5402f999b4ecb761972d1c47219d8b --- /dev/null +++ b/backend/node_modules/effect/dist/esm/DateTime.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DateTime.js","names":["Context","Effect","dual","Internal","Layer","TypeId","TimeZoneTypeId","isDateTime","isTimeZone","isTimeZoneOffset","isTimeZoneNamed","isUtc","isZoned","Equivalence","Order","clamp","unsafeFromDate","unsafeMake","unsafeMakeZoned","makeZoned","make","makeZonedFromString","now","nowAsDate","unsafeNow","toUtc","setZone","setZoneOffset","zoneUnsafeMakeNamed","zoneMakeOffset","zoneMakeNamed","zoneMakeNamedEffect","zoneMakeLocal","zoneFromString","zoneToString","setZoneNamed","unsafeSetZoneNamed","distance","distanceDurationEither","distanceDuration","min","max","greaterThan","greaterThanOrEqualTo","lessThan","lessThanOrEqualTo","between","isFuture","unsafeIsFuture","isPast","unsafeIsPast","toDateUtc","toDate","zonedOffset","zonedOffsetIso","toEpochMillis","removeTime","toParts","toPartsUtc","getPartUtc","getPart","setParts","setPartsUtc","CurrentTimeZone","Tag","setZoneCurrent","self","map","zone","withCurrentZone","effect","provideService","withCurrentZoneLocal","provideServiceEffect","sync","withCurrentZoneOffset","offset","withCurrentZoneNamed","nowInCurrentZone","flatMap","mutate","mutateUtc","mapEpochMillis","withDate","withDateUtc","match","addDuration","subtractDuration","add","subtract","startOf","endOf","nearest","format","formatLocal","formatUtc","formatIntl","formatIso","formatIsoDate","formatIsoDateUtc","formatIsoOffset","formatIsoZoned","layerCurrentZone","succeed","layerCurrentZoneOffset","layerCurrentZoneNamed","zoneId","layerCurrentZoneLocal"],"sources":["../../src/DateTime.ts"],"sourcesContent":[null],"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;;;;;;AAMA,OAAO,MAAMC,eAAe,GAA+BjG,QAAQ,CAACiG,eAAe;AAEnF;;;;;;;;AAQA,OAAO,MAAMC,cAAc,GAA4BlG,QAAQ,CAACkG,cAAc;AAE9E;;;;;;AAMA,OAAO,MAAMC,gBAAgB,GAAIlC,IAAc,IAAmChE,KAAK,CAACmG,OAAO,CAACxC,eAAe,EAAEK,IAAI,CAAC;AAEtH;;;;;;AAMA,OAAO,MAAMoC,sBAAsB,GAAI5B,MAAc,IACnDxE,KAAK,CAACmG,OAAO,CAACxC,eAAe,EAAE5D,QAAQ,CAAC0B,cAAc,CAAC+C,MAAM,CAAC,CAAC;AAEjE;;;;;;AAMA,OAAO,MAAM6B,qBAAqB,GAChCC,MAAc,IAEdtG,KAAK,CAACkE,MAAM,CAACP,eAAe,EAAE5D,QAAQ,CAAC4B,mBAAmB,CAAC2E,MAAM,CAAC,CAAC;AAErE;;;;;;AAMA,OAAO,MAAMC,qBAAqB,gBAAiCvG,KAAK,CAACsE,IAAI,CAACX,eAAe,EAAE/B,aAAa,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Deferred.js.map b/backend/node_modules/effect/dist/esm/Deferred.js.map new file mode 100644 index 0000000000000000000000000000000000000000..de71d0c457a46a85444618796134818a0707a3a4 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Deferred.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Deferred.js","names":["core","internal","DeferredTypeId","make","deferredMake","makeAs","deferredMakeAs","_await","deferredAwait","await","complete","deferredComplete","completeWith","deferredCompleteWith","done","deferredDone","fail","deferredFail","failSync","deferredFailSync","failCause","deferredFailCause","failCauseSync","deferredFailCauseSync","die","deferredDie","dieSync","deferredDieSync","interrupt","deferredInterrupt","interruptWith","deferredInterruptWith","isDone","deferredIsDone","poll","deferredPoll","succeed","deferredSucceed","sync","deferredSync","unsafeMake","deferredUnsafeMake","unsafeDone","deferredUnsafeDone"],"sources":["../../src/Deferred.ts"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C,cAAc;AAEjG;;;;;;;AAOA,OAAO,MAAMC,IAAI,GAEwClC,IAAI,CAACmC,YAAY;AAE1E;;;;;;AAMA,OAAO,MAAMC,OAAO,GAehBpC,IAAI,CAACqC,eAAe;AAExB;;;;;;AAMA,OAAO,MAAMC,IAAI,GAebtC,IAAI,CAACuC,YAAY;AAErB;;;;;;AAMA,OAAO,MAAMC,UAAU,GAA+DxC,IAAI,CAACyC,kBAAkB;AAE7G;;;;;;;AAOA,OAAO,MAAMC,UAAU,GAAsE1C,IAAI,CAAC2C,kBAAkB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Differ.js b/backend/node_modules/effect/dist/esm/Differ.js new file mode 100644 index 0000000000000000000000000000000000000000..8463903abfde0339804ed9189bfa0201ec67855d --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Differ.js @@ -0,0 +1,132 @@ +import * as Dual from "./Function.js"; +import * as internal from "./internal/differ.js"; +import * as ChunkPatch from "./internal/differ/chunkPatch.js"; +import * as ContextPatch from "./internal/differ/contextPatch.js"; +import * as HashMapPatch from "./internal/differ/hashMapPatch.js"; +import * as HashSetPatch from "./internal/differ/hashSetPatch.js"; +import * as OrPatch from "./internal/differ/orPatch.js"; +import * as ReadonlyArrayPatch from "./internal/differ/readonlyArrayPatch.js"; +/** + * @since 2.0.0 + * @category symbol + */ +export const TypeId = internal.DifferTypeId; +const ChunkPatchTypeId = ChunkPatch.ChunkPatchTypeId; +const ContextPatchTypeId = ContextPatch.ContextPatchTypeId; +const HashMapPatchTypeId = HashMapPatch.HashMapPatchTypeId; +const HashSetPatchTypeId = HashSetPatch.HashSetPatchTypeId; +const OrPatchTypeId = OrPatch.OrPatchTypeId; +const ReadonlyArrayPatchTypeId = ReadonlyArrayPatch.ReadonlyArrayPatchTypeId; +/** + * An empty patch that describes no changes. + * + * @since 2.0.0 + * @category patch + */ +export const empty = self => self.empty; +/** + * @since 2.0.0 + * @category patch + */ +export const diff = /*#__PURE__*/Dual.dual(3, (self, oldValue, newValue) => self.diff(oldValue, newValue)); +/** + * Combines two patches to produce a new patch that describes the updates of + * the first patch and then the updates of the second patch. The combine + * operation should be associative. In addition, if the combine operation is + * commutative then joining multiple fibers concurrently will result in + * deterministic `FiberRef` values. + * + * @since 2.0.0 + * @category patch + */ +export const combine = /*#__PURE__*/Dual.dual(3, (self, first, second) => self.combine(first, second)); +/** + * Applies a patch to an old value to produce a new value that is equal to the + * old value with the updates described by the patch. + * + * @since 2.0.0 + * @category patch + */ +export const patch = /*#__PURE__*/Dual.dual(3, (self, patch, oldValue) => self.patch(patch, oldValue)); +/** + * Constructs a new `Differ`. + * + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * Constructs a differ that knows how to diff `Env` values. + * + * @since 2.0.0 + * @category constructors + */ +export const environment = internal.environment; +/** + * Constructs a differ that knows how to diff a `Chunk` of values given a + * differ that knows how to diff the values. + * + * @since 2.0.0 + * @category constructors + */ +export const chunk = internal.chunk; +/** + * Constructs a differ that knows how to diff a `HashMap` of keys and values given + * a differ that knows how to diff the values. + * + * @since 2.0.0 + * @category constructors + */ +export const hashMap = internal.hashMap; +/** + * Constructs a differ that knows how to diff a `HashSet` of values. + * + * @since 2.0.0 + * @category constructors + */ +export const hashSet = internal.hashSet; +/** + * Combines this differ and the specified differ to produce a differ that + * knows how to diff the sum of their values. + * + * @since 2.0.0 + */ +export const orElseEither = internal.orElseEither; +/** + * Constructs a differ that knows how to diff a `ReadonlyArray` of values. + * + * @since 2.0.0 + * @category constructors + */ +export const readonlyArray = internal.readonlyArray; +/** + * Transforms the type of values that this differ knows how to differ using + * the specified functions that map the new and old value types to each other. + * + * @since 2.0.0 + */ +export const transform = internal.transform; +/** + * Constructs a differ that just diffs two values by returning a function that + * sets the value to the new value. This differ does not support combining + * multiple updates to the value compositionally and should only be used when + * there is no compositional way to update them. + * + * @since 2.0.0 + */ +export const update = internal.update; +/** + * A variant of `update` that allows specifying the function that will be used + * to combine old values with new values. + * + * @since 2.0.0 + */ +export const updateWith = internal.updateWith; +/** + * Combines this differ and the specified differ to produce a new differ that + * knows how to diff the product of their values. + * + * @since 2.0.0 + */ +export const zip = internal.zip; +//# sourceMappingURL=Differ.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Duration.js b/backend/node_modules/effect/dist/esm/Duration.js new file mode 100644 index 0000000000000000000000000000000000000000..f2eed6c98471ca8cae1dc774af690098b6795425 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Duration.js @@ -0,0 +1,702 @@ +/** + * @since 2.0.0 + */ +import * as Equal from "./Equal.js"; +import { dual } from "./Function.js"; +import * as Hash from "./Hash.js"; +import { NodeInspectSymbol } from "./Inspectable.js"; +import * as Option from "./Option.js"; +import * as order from "./Order.js"; +import { pipeArguments } from "./Pipeable.js"; +import { hasProperty, isBigInt, isNumber, isString } from "./Predicate.js"; +const TypeId = /*#__PURE__*/Symbol.for("effect/Duration"); +const bigint0 = /*#__PURE__*/BigInt(0); +const bigint24 = /*#__PURE__*/BigInt(24); +const bigint60 = /*#__PURE__*/BigInt(60); +const bigint1e3 = /*#__PURE__*/BigInt(1_000); +const bigint1e6 = /*#__PURE__*/BigInt(1_000_000); +const bigint1e9 = /*#__PURE__*/BigInt(1_000_000_000); +const DURATION_REGEX = /^(-?\d+(?:\.\d+)?)\s+(nanos?|micros?|millis?|seconds?|minutes?|hours?|days?|weeks?)$/; +/** + * @since 2.0.0 + */ +export const decode = input => { + if (isDuration(input)) { + return input; + } else if (isNumber(input)) { + return millis(input); + } else if (isBigInt(input)) { + return nanos(input); + } else if (Array.isArray(input) && input.length === 2 && input.every(isNumber)) { + if (input[0] === -Infinity || input[1] === -Infinity || Number.isNaN(input[0]) || Number.isNaN(input[1])) { + return zero; + } + if (input[0] === Infinity || input[1] === Infinity) { + return infinity; + } + return nanos(BigInt(Math.round(input[0] * 1_000_000_000)) + BigInt(Math.round(input[1]))); + } else if (isString(input)) { + const match = DURATION_REGEX.exec(input); + if (match) { + const [_, valueStr, unit] = match; + const value = Number(valueStr); + switch (unit) { + case "nano": + case "nanos": + return nanos(BigInt(valueStr)); + case "micro": + case "micros": + return micros(BigInt(valueStr)); + case "milli": + case "millis": + return millis(value); + case "second": + case "seconds": + return seconds(value); + case "minute": + case "minutes": + return minutes(value); + case "hour": + case "hours": + return hours(value); + case "day": + case "days": + return days(value); + case "week": + case "weeks": + return weeks(value); + } + } + } + throw new Error("Invalid DurationInput"); +}; +/** + * @since 2.5.0 + */ +export const decodeUnknown = /*#__PURE__*/Option.liftThrowable(decode); +const zeroValue = { + _tag: "Millis", + millis: 0 +}; +const infinityValue = { + _tag: "Infinity" +}; +const DurationProto = { + [TypeId]: TypeId, + [Hash.symbol]() { + return Hash.cached(this, Hash.structure(this.value)); + }, + [Equal.symbol](that) { + return isDuration(that) && equals(this, that); + }, + toString() { + return `Duration(${format(this)})`; + }, + toJSON() { + switch (this.value._tag) { + case "Millis": + return { + _id: "Duration", + _tag: "Millis", + millis: this.value.millis + }; + case "Nanos": + return { + _id: "Duration", + _tag: "Nanos", + hrtime: toHrTime(this) + }; + case "Infinity": + return { + _id: "Duration", + _tag: "Infinity" + }; + } + }, + [NodeInspectSymbol]() { + return this.toJSON(); + }, + pipe() { + return pipeArguments(this, arguments); + } +}; +const make = input => { + const duration = Object.create(DurationProto); + if (isNumber(input)) { + if (isNaN(input) || input <= 0) { + duration.value = zeroValue; + } else if (!Number.isFinite(input)) { + duration.value = infinityValue; + } else if (!Number.isInteger(input)) { + duration.value = { + _tag: "Nanos", + nanos: BigInt(Math.round(input * 1_000_000)) + }; + } else { + duration.value = { + _tag: "Millis", + millis: input + }; + } + } else if (input <= bigint0) { + duration.value = zeroValue; + } else { + duration.value = { + _tag: "Nanos", + nanos: input + }; + } + return duration; +}; +/** + * @since 2.0.0 + * @category guards + */ +export const isDuration = u => hasProperty(u, TypeId); +/** + * @since 2.0.0 + * @category guards + */ +export const isFinite = self => self.value._tag !== "Infinity"; +/** + * @since 3.5.0 + * @category guards + */ +export const isZero = self => { + switch (self.value._tag) { + case "Millis": + { + return self.value.millis === 0; + } + case "Nanos": + { + return self.value.nanos === bigint0; + } + case "Infinity": + { + return false; + } + } +}; +/** + * @since 2.0.0 + * @category constructors + */ +export const zero = /*#__PURE__*/make(0); +/** + * @since 2.0.0 + * @category constructors + */ +export const infinity = /*#__PURE__*/make(Infinity); +/** + * @since 2.0.0 + * @category constructors + */ +export const nanos = nanos => make(nanos); +/** + * @since 2.0.0 + * @category constructors + */ +export const micros = micros => make(micros * bigint1e3); +/** + * @since 2.0.0 + * @category constructors + */ +export const millis = millis => make(millis); +/** + * @since 2.0.0 + * @category constructors + */ +export const seconds = seconds => make(seconds * 1000); +/** + * @since 2.0.0 + * @category constructors + */ +export const minutes = minutes => make(minutes * 60_000); +/** + * @since 2.0.0 + * @category constructors + */ +export const hours = hours => make(hours * 3_600_000); +/** + * @since 2.0.0 + * @category constructors + */ +export const days = days => make(days * 86_400_000); +/** + * @since 2.0.0 + * @category constructors + */ +export const weeks = weeks => make(weeks * 604_800_000); +/** + * @since 2.0.0 + * @category getters + */ +export const toMillis = self => match(self, { + onMillis: millis => millis, + onNanos: nanos => Number(nanos) / 1_000_000 +}); +/** + * @since 2.0.0 + * @category getters + */ +export const toSeconds = self => match(self, { + onMillis: millis => millis / 1_000, + onNanos: nanos => Number(nanos) / 1_000_000_000 +}); +/** + * @since 3.8.0 + * @category getters + */ +export const toMinutes = self => match(self, { + onMillis: millis => millis / 60_000, + onNanos: nanos => Number(nanos) / 60_000_000_000 +}); +/** + * @since 3.8.0 + * @category getters + */ +export const toHours = self => match(self, { + onMillis: millis => millis / 3_600_000, + onNanos: nanos => Number(nanos) / 3_600_000_000_000 +}); +/** + * @since 3.8.0 + * @category getters + */ +export const toDays = self => match(self, { + onMillis: millis => millis / 86_400_000, + onNanos: nanos => Number(nanos) / 86_400_000_000_000 +}); +/** + * @since 3.8.0 + * @category getters + */ +export const toWeeks = self => match(self, { + onMillis: millis => millis / 604_800_000, + onNanos: nanos => Number(nanos) / 604_800_000_000_000 +}); +/** + * Get the duration in nanoseconds as a bigint. + * + * If the duration is infinite, returns `Option.none()` + * + * @since 2.0.0 + * @category getters + */ +export const toNanos = self => { + const _self = decode(self); + switch (_self.value._tag) { + case "Infinity": + return Option.none(); + case "Nanos": + return Option.some(_self.value.nanos); + case "Millis": + return Option.some(BigInt(Math.round(_self.value.millis * 1_000_000))); + } +}; +/** + * Get the duration in nanoseconds as a bigint. + * + * If the duration is infinite, it throws an error. + * + * @since 2.0.0 + * @category getters + */ +export const unsafeToNanos = self => { + const _self = decode(self); + switch (_self.value._tag) { + case "Infinity": + throw new Error("Cannot convert infinite duration to nanos"); + case "Nanos": + return _self.value.nanos; + case "Millis": + return BigInt(Math.round(_self.value.millis * 1_000_000)); + } +}; +/** + * @since 2.0.0 + * @category getters + */ +export const toHrTime = self => { + const _self = decode(self); + switch (_self.value._tag) { + case "Infinity": + return [Infinity, 0]; + case "Nanos": + return [Number(_self.value.nanos / bigint1e9), Number(_self.value.nanos % bigint1e9)]; + case "Millis": + return [Math.floor(_self.value.millis / 1000), Math.round(_self.value.millis % 1000 * 1_000_000)]; + } +}; +/** + * @since 2.0.0 + * @category pattern matching + */ +export const match = /*#__PURE__*/dual(2, (self, options) => { + const _self = decode(self); + switch (_self.value._tag) { + case "Nanos": + return options.onNanos(_self.value.nanos); + case "Infinity": + return options.onMillis(Infinity); + case "Millis": + return options.onMillis(_self.value.millis); + } +}); +/** + * @since 2.0.0 + * @category pattern matching + */ +export const matchWith = /*#__PURE__*/dual(3, (self, that, options) => { + const _self = decode(self); + const _that = decode(that); + if (_self.value._tag === "Infinity" || _that.value._tag === "Infinity") { + return options.onMillis(toMillis(_self), toMillis(_that)); + } else if (_self.value._tag === "Nanos" || _that.value._tag === "Nanos") { + const selfNanos = _self.value._tag === "Nanos" ? _self.value.nanos : BigInt(Math.round(_self.value.millis * 1_000_000)); + const thatNanos = _that.value._tag === "Nanos" ? _that.value.nanos : BigInt(Math.round(_that.value.millis * 1_000_000)); + return options.onNanos(selfNanos, thatNanos); + } + return options.onMillis(_self.value.millis, _that.value.millis); +}); +/** + * @category instances + * @since 2.0.0 + */ +export const Order = /*#__PURE__*/order.make((self, that) => matchWith(self, that, { + onMillis: (self, that) => self < that ? -1 : self > that ? 1 : 0, + onNanos: (self, that) => self < that ? -1 : self > that ? 1 : 0 +})); +/** + * Checks if a `Duration` is between a `minimum` and `maximum` value. + * + * @category predicates + * @since 2.0.0 + */ +export const between = /*#__PURE__*/order.between(/*#__PURE__*/order.mapInput(Order, decode)); +/** + * @category instances + * @since 2.0.0 + */ +export const Equivalence = (self, that) => matchWith(self, that, { + onMillis: (self, that) => self === that, + onNanos: (self, that) => self === that +}); +const _min = /*#__PURE__*/order.min(Order); +/** + * @since 2.0.0 + */ +export const min = /*#__PURE__*/dual(2, (self, that) => _min(decode(self), decode(that))); +const _max = /*#__PURE__*/order.max(Order); +/** + * @since 2.0.0 + * @category order + */ +export const max = /*#__PURE__*/dual(2, (self, that) => _max(decode(self), decode(that))); +const _clamp = /*#__PURE__*/order.clamp(Order); +/** + * @since 2.0.0 + * @category order + */ +export const clamp = /*#__PURE__*/dual(2, (self, options) => _clamp(decode(self), { + minimum: decode(options.minimum), + maximum: decode(options.maximum) +})); +/** + * @since 2.4.19 + * @category math + */ +export const divide = /*#__PURE__*/dual(2, (self, by) => match(self, { + onMillis: millis => { + if (by === 0 || isNaN(by) || !Number.isFinite(by)) { + return Option.none(); + } + return Option.some(make(millis / by)); + }, + onNanos: nanos => { + if (isNaN(by) || by <= 0 || !Number.isFinite(by)) { + return Option.none(); + } + try { + return Option.some(make(nanos / BigInt(by))); + } catch { + return Option.none(); + } + } +})); +/** + * @since 2.4.19 + * @category math + */ +export const unsafeDivide = /*#__PURE__*/dual(2, (self, by) => match(self, { + onMillis: millis => make(millis / by), + onNanos: nanos => { + if (isNaN(by) || by < 0 || Object.is(by, -0)) { + return zero; + } else if (Object.is(by, 0) || !Number.isFinite(by)) { + return infinity; + } + return make(nanos / BigInt(by)); + } +})); +/** + * @since 2.0.0 + * @category math + */ +export const times = /*#__PURE__*/dual(2, (self, times) => match(self, { + onMillis: millis => make(millis * times), + onNanos: nanos => make(nanos * BigInt(times)) +})); +/** + * @since 2.0.0 + * @category math + */ +export const subtract = /*#__PURE__*/dual(2, (self, that) => matchWith(self, that, { + onMillis: (self, that) => make(self - that), + onNanos: (self, that) => make(self - that) +})); +/** + * @since 2.0.0 + * @category math + */ +export const sum = /*#__PURE__*/dual(2, (self, that) => matchWith(self, that, { + onMillis: (self, that) => make(self + that), + onNanos: (self, that) => make(self + that) +})); +/** + * @since 2.0.0 + * @category predicates + */ +export const lessThan = /*#__PURE__*/dual(2, (self, that) => matchWith(self, that, { + onMillis: (self, that) => self < that, + onNanos: (self, that) => self < that +})); +/** + * @since 2.0.0 + * @category predicates + */ +export const lessThanOrEqualTo = /*#__PURE__*/dual(2, (self, that) => matchWith(self, that, { + onMillis: (self, that) => self <= that, + onNanos: (self, that) => self <= that +})); +/** + * @since 2.0.0 + * @category predicates + */ +export const greaterThan = /*#__PURE__*/dual(2, (self, that) => matchWith(self, that, { + onMillis: (self, that) => self > that, + onNanos: (self, that) => self > that +})); +/** + * @since 2.0.0 + * @category predicates + */ +export const greaterThanOrEqualTo = /*#__PURE__*/dual(2, (self, that) => matchWith(self, that, { + onMillis: (self, that) => self >= that, + onNanos: (self, that) => self >= that +})); +/** + * @since 2.0.0 + * @category predicates + */ +export const equals = /*#__PURE__*/dual(2, (self, that) => Equivalence(decode(self), decode(that))); +/** + * Converts a `Duration` to its parts. + * + * @since 3.8.0 + * @category conversions + */ +export const parts = self => { + const duration = decode(self); + if (duration.value._tag === "Infinity") { + return { + days: Infinity, + hours: Infinity, + minutes: Infinity, + seconds: Infinity, + millis: Infinity, + nanos: Infinity + }; + } + const nanos = unsafeToNanos(duration); + const ms = nanos / bigint1e6; + const sec = ms / bigint1e3; + const min = sec / bigint60; + const hr = min / bigint60; + const days = hr / bigint24; + return { + days: Number(days), + hours: Number(hr % bigint24), + minutes: Number(min % bigint60), + seconds: Number(sec % bigint60), + millis: Number(ms % bigint1e3), + nanos: Number(nanos % bigint1e6) + }; +}; +/** + * Converts a `Duration` to a human readable string. + * + * @since 2.0.0 + * @category conversions + * @example + * ```ts + * import { Duration } from "effect" + * + * Duration.format(Duration.millis(1000)) // "1s" + * Duration.format(Duration.millis(1001)) // "1s 1ms" + * ``` + */ +export const format = self => { + const duration = decode(self); + if (duration.value._tag === "Infinity") { + return "Infinity"; + } + if (isZero(duration)) { + return "0"; + } + const fragments = parts(duration); + const pieces = []; + if (fragments.days !== 0) { + pieces.push(`${fragments.days}d`); + } + if (fragments.hours !== 0) { + pieces.push(`${fragments.hours}h`); + } + if (fragments.minutes !== 0) { + pieces.push(`${fragments.minutes}m`); + } + if (fragments.seconds !== 0) { + pieces.push(`${fragments.seconds}s`); + } + if (fragments.millis !== 0) { + pieces.push(`${fragments.millis}ms`); + } + if (fragments.nanos !== 0) { + pieces.push(`${fragments.nanos}ns`); + } + return pieces.join(" "); +}; +/** + * Formats a Duration into an ISO8601 duration string. + * + * Months are assumed to be 30 days and years are assumed to be 365 days. + * + * Milliseconds and nanoseconds are expressed as fractional seconds. + * + * @example + * ```ts + * import { Duration } from "effect" + * + * Duration.unsafeFormatIso(Duration.days(1)) // => "P1D" + * Duration.unsafeFormatIso(Duration.minutes(90)) // => "PT1H30M" + * Duration.unsafeFormatIso(Duration.millis(1500)) // => "PT1.5S" + * ``` + * + * @throws `RangeError` If the duration is not finite. + * + * @since 3.13.0 + * @category conversions + */ +export const unsafeFormatIso = self => { + const duration = decode(self); + if (!isFinite(duration)) { + throw new RangeError("Cannot format infinite duration"); + } + const fragments = []; + const { + days, + hours, + millis, + minutes, + nanos, + seconds + } = parts(duration); + let rest = days; + if (rest >= 365) { + const years = Math.floor(rest / 365); + rest %= 365; + fragments.push(`${years}Y`); + } + if (rest >= 30) { + const months = Math.floor(rest / 30); + rest %= 30; + fragments.push(`${months}M`); + } + if (rest >= 7) { + const weeks = Math.floor(rest / 7); + rest %= 7; + fragments.push(`${weeks}W`); + } + if (rest > 0) { + fragments.push(`${rest}D`); + } + if (hours !== 0 || minutes !== 0 || seconds !== 0 || millis !== 0 || nanos !== 0) { + fragments.push("T"); + if (hours !== 0) { + fragments.push(`${hours}H`); + } + if (minutes !== 0) { + fragments.push(`${minutes}M`); + } + if (seconds !== 0 || millis !== 0 || nanos !== 0) { + const total = BigInt(seconds) * bigint1e9 + BigInt(millis) * bigint1e6 + BigInt(nanos); + const str = (Number(total) / 1e9).toFixed(9).replace(/\.?0+$/, ""); + fragments.push(`${str}S`); + } + } + return `P${fragments.join("") || "T0S"}`; +}; +/** + * Formats a Duration into an ISO8601 duration string. + * + * Months are assumed to be 30 days and years are assumed to be 365 days. + * + * Returns `Option.none()` if the duration is infinite. + * + * @example + * ```ts + * import { Duration, Option } from "effect" + * + * Duration.formatIso(Duration.days(1)) // => Option.some("P1D") + * Duration.formatIso(Duration.minutes(90)) // => Option.some("PT1H30M") + * Duration.formatIso(Duration.millis(1500)) // => Option.some("PT1.5S") + * Duration.formatIso(Duration.infinity) // => Option.none() + * ``` + * + * @since 3.13.0 + * @category conversions + */ +export const formatIso = self => { + const duration = decode(self); + return isFinite(duration) ? Option.some(unsafeFormatIso(duration)) : Option.none(); +}; +/** + * Parses an ISO8601 duration string into a `Duration`. + * + * Months are assumed to be 30 days and years are assumed to be 365 days. + * + * @example + * ```ts + * import { Duration, Option } from "effect" + * + * Duration.fromIso("P1D") // => Option.some(Duration.days(1)) + * Duration.fromIso("PT1H") // => Option.some(Duration.hours(1)) + * Duration.fromIso("PT1M") // => Option.some(Duration.minutes(1)) + * Duration.fromIso("PT1.5S") // => Option.some(Duration.seconds(1.5)) + * ``` + * + * @since 3.13.0 + * @category conversions + */ +export const fromIso = iso => { + const result = DURATION_ISO_REGEX.exec(iso); + if (result == null) { + return Option.none(); + } + const [years, months, weeks, days, hours, mins, secs] = result.slice(1, 8).map(_ => _ ? Number(_) : 0); + const value = years * 365 * 24 * 60 * 60 + months * 30 * 24 * 60 * 60 + weeks * 7 * 24 * 60 * 60 + days * 24 * 60 * 60 + hours * 60 * 60 + mins * 60 + secs; + return Option.some(seconds(value)); +}; +const DURATION_ISO_REGEX = /^P(?!$)(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?!$)(?:(\d+)H)?(?:(\d+)M)?(?:(\d+(?:\.\d+)?)S)?)?$/; +//# sourceMappingURL=Duration.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Duration.js.map b/backend/node_modules/effect/dist/esm/Duration.js.map new file mode 100644 index 0000000000000000000000000000000000000000..95921dea97210c2f4c83fd487d3a893e1c1944d2 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Duration.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Duration.js","names":["Equal","dual","Hash","NodeInspectSymbol","Option","order","pipeArguments","hasProperty","isBigInt","isNumber","isString","TypeId","Symbol","for","bigint0","BigInt","bigint24","bigint60","bigint1e3","bigint1e6","bigint1e9","DURATION_REGEX","decode","input","isDuration","millis","nanos","Array","isArray","length","every","Infinity","Number","isNaN","zero","infinity","Math","round","match","exec","_","valueStr","unit","value","micros","seconds","minutes","hours","days","weeks","Error","decodeUnknown","liftThrowable","zeroValue","_tag","infinityValue","DurationProto","symbol","cached","structure","that","equals","toString","format","toJSON","_id","hrtime","toHrTime","pipe","arguments","make","duration","Object","create","isFinite","isInteger","u","self","isZero","toMillis","onMillis","onNanos","toSeconds","toMinutes","toHours","toDays","toWeeks","toNanos","_self","none","some","unsafeToNanos","floor","options","matchWith","_that","selfNanos","thatNanos","Order","between","mapInput","Equivalence","_min","min","_max","max","_clamp","clamp","minimum","maximum","divide","by","unsafeDivide","is","times","subtract","sum","lessThan","lessThanOrEqualTo","greaterThan","greaterThanOrEqualTo","parts","ms","sec","hr","fragments","pieces","push","join","unsafeFormatIso","RangeError","rest","years","months","total","str","toFixed","replace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G,EAAE,GACxBD,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GACnBD,KAAK,GAAG,EAAE,GAAG,EAAE,GACfgG,IAAI,GAAG,EAAE,GACTC,IAAI;EAEN,OAAO5I,MAAM,CAACsF,IAAI,CAAC7C,OAAO,CAACF,KAAK,CAAC,CAAC;AACpC,CAAC;AAED,MAAMmG,kBAAkB,GACtB,4GAA4G","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Effect.js.map b/backend/node_modules/effect/dist/esm/Effect.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d15ea148434328c891aeef4ace14be3be4922260 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Effect.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Effect.js","names":["dual","internalCause","console_","TagProto","effect","core","defaultServices","circular","internalExecutionPlan","fiberRuntime","layer","option_","query","runtime_","schedule_","internalTracer","Random","Request","Scheduler","isGeneratorFunction","EffectTypeId","isEffect","cachedWithTTL","cached","cachedInvalidateWithTTL","memoize","cachedFunction","once","all","allWith","allSuccesses","dropUntil","dropWhile","takeUntil","takeWhile","every","exists","filter","filterMap","findFirst","forEach","head","mergeAll","partition","reduce","reduceWhile","reduceRight","reduceEffect","replicate","replicateEffect","validateAll","validateFirst","async","asyncEffect","custom","withFiberRuntime","fail","failSync","failCause","failCauseSync","die","dieMessage","dieSync","gen","never","none","promise","succeed","succeedNone","succeedSome","suspend","sync","_void","void","yieldNow","_catch","catch","catchAll","catchAllCause","catchAllDefect","catchIf","catchSome","catchSomeCause","catchSomeDefect","catchTag","catchTags","cause","eventually","ignore","ignoreLogged","parallelErrors","sandbox","retry","retry_combined","withExecutionPlan","retryOrElse","retryOrElse_Effect","try_","try","tryMap","tryMapPromise","tryPromise","unsandbox","allowInterrupt","checkInterruptible","disconnect","interrupt","interruptWith","interruptible","interruptibleMask","onInterrupt","uninterruptible","uninterruptibleMask","liftPredicate","as","asSome","asSomeError","asVoid","flip","flipWith","map","mapAccum","mapBoth","mapError","mapErrorCause","merge","negate","acquireRelease","acquireReleaseInterruptible","acquireUseRelease","addFinalizer","ensuring","onError","onExit","parallelFinalizers","sequentialFinalizers","finalizersMask","scope","scopeWith","scopedWith","scoped","scopedEffect","using","withEarlyRelease","awaitAllChildren","daemonChildren","descriptor","descriptorWith","diffFiberRefs","ensuringChild","ensuringChildren","fiberId","fiberIdWith","fork","forkDaemon","forkAll","forkIn","forkScoped","forkWithErrorHandler","fromFiber","fromFiberEffect","supervised","transplant","withConcurrency","withScheduler","withSchedulingPriority","withMaxOpsBeforeYield","clock","clockWith","withClockScoped","withClock","console","consoleWith","withConsoleScoped","withConsole","delay","sleep","timed","timedWith","timeout","timeoutOption","timeoutFail","timeoutFailCause","timeoutTo","configProviderWith","withConfigProvider","withConfigProviderScoped","context","contextWith","contextWithEffect","mapInputContext","provide","effect_provide","provideService","provideServiceEffect","serviceFunction","serviceFunctionEffect","serviceFunctions","serviceConstants","serviceMembers","serviceOption","serviceOptional","updateService","Do","bind","bindAll","bindTo","let_","let","option","either","exit","intoDeferred","if_","if","filterOrDie","filterOrDieMessage","filterOrElse","filterOrFail","filterEffectOrElse","filterEffectOrFail","unless","unlessEffect","when","whenEffect","whenFiberRef","whenRef","flatMap","andThen","flatten","race","raceAll","raceFirst","raceWith","summarized","tap","tapBoth","tapDefect","tapError","tapErrorTag","tapErrorCause","forever","iterate","loop","repeat","repeat_combined","repeatN","repeatOrElse","repeatOrElse_Effect","schedule","schedule_Effect","scheduleForked","scheduleFrom","scheduleFrom_Effect","whileLoop","getFiberRefs","fiberRefs","inheritFiberRefs","locally","fiberRefLocally","locallyWith","fiberRefLocallyWith","locallyScoped","fiberRefLocallyScoped","locallyScopedWith","fiberRefLocallyScopedWith","patchFiberRefs","setFiberRefs","updateFiberRefs","isFailure","isSuccess","match","matchCause","matchCauseEffect","matchEffect","log","logWithLevel","level","message","logTrace","logDebug","logInfo","logWarning","logError","logFatal","withLogSpan","annotateLogs","annotateLogsScoped","logAnnotations","withUnhandledErrorLogLevel","whenLogLevel","orDie","orDieWith","orElse","orElseFail","orElseSucceed","firstSuccessOf","random","randomWith","withRandom","withRandomFixed","values","fixed","withRandomScoped","runtime","getRuntimeFlags","runtimeFlags","patchRuntimeFlags","updateRuntimeFlags","withRuntimeFlagsPatch","withRuntimeFlags","withRuntimeFlagsPatchScoped","withRuntimeFlagsScoped","tagMetrics","labelMetrics","tagMetricsScoped","labelMetricsScoped","metricLabels","withMetric","unsafeMakeSemaphore","makeSemaphore","unsafeMakeLatch","makeLatch","runFork","unsafeForkEffect","runCallback","unsafeRunEffect","runPromise","unsafeRunPromiseEffect","runPromiseExit","unsafeRunPromiseExitEffect","runSync","unsafeRunSyncEffect","runSyncExit","unsafeRunSyncExitEffect","validate","validateWith","zip","zipOptions","zipLeft","zipLeftOptions","zipRight","zipRightOptions","zipWith","zipWithOptions","ap","self","that","f","a","blocked","runRequestBlock","step","request","args","isRequest","fromRequest","cacheRequestResult","cacheRequest","withRequestBatching","withRequestCaching","withRequestCache","tracer","tracerWith","withTracer","withTracerScoped","withTracerEnabled","withTracerTiming","annotateSpans","annotateCurrentSpan","currentSpan","currentPropagatedSpan","currentParentSpan","spanAnnotations","spanLinks","linkSpans","linkSpanCurrent","makeSpan","makeSpanScoped","useSpan","withSpan","functionWithSpan","withSpanScoped","withParentSpan","fromNullable","optionFromOptional","transposeOption","isNone","value","some","transposeMapOption","makeTagProxy","TagClass","cache","Map","Proxy","get","target","prop","receiver","Reflect","has","fn","s","set","cn","Object","assign","apply","call","proto","setPrototypeOf","getPrototypeOf","Tag","id","limit","Error","stackTraceLimit","creationError","key","defineProperty","body","stack","Service","maker","arguments","proxy","patchState","service","prototype","selfProto","_tag","hasDeps","dependencies","length","layerName","layerCache","isFunction","fromEffect","_","layerWithDepsCache","DefaultWithoutDependencies","nameOrBody","pipeables","errorDef","defineLength","errorCall","fnApply","spanName","spanOptions","DisablePropagation","name","options","configurable","fnError","undefined","fromIterator","error","x","sequential","captureStackTrace","stackDef","trim","split","stackCall","endStackDef","slice","join","includes","replace","endStackCall","opts","fnUntraced","ensureSuccessType","ensureErrorType","ensureRequirementsType"],"sources":["../../src/Effect.ts"],"sourcesContent":[null],"mappings":"AAwBA,SAASA,IAAI,QAAQ,eAAe;AAIpC,OAAO,KAAKC,aAAa,MAAM,qBAAqB;AACpD,OAAO,KAAKC,QAAQ,MAAM,uBAAuB;AACjD,SAASC,QAAQ,QAAQ,uBAAuB;AAChD,OAAO,KAAKC,MAAM,MAAM,2BAA2B;AACnD,OAAO,KAAKC,IAAI,MAAM,oBAAoB;AAC1C,OAAO,KAAKC,eAAe,MAAM,+BAA+B;AAChE,OAAO,KAAKC,QAAQ,MAAM,+BAA+B;AACzD,OAAO,KAAKC,qBAAqB,MAAM,6BAA6B;AACpE,OAAO,KAAKC,YAAY,MAAM,4BAA4B;AAC1D,OAAO,KAAKC,KAAK,MAAM,qBAAqB;AAC5C,OAAO,KAAKC,OAAO,MAAM,sBAAsB;AAC/C,OAAO,KAAKC,KAAK,MAAM,qBAAqB;AAC5C,OAAO,KAAKC,QAAQ,MAAM,uBAAuB;AACjD,OAAO,KAAKC,SAAS,MAAM,wBAAwB;AACnD,OAAO,KAAKC,cAAc,MAAM,sBAAsB;AAStD,OAAO,KAAKC,MAAM,MAAM,aAAa;AAErC,OAAO,KAAKC,OAAO,MAAM,cAAc;AAOvC,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAc3C,SAASC,mBAAmB,QAAwB,YAAY;AAEhE;;;;AAIA,OAAO,MAAMC,YAAY,GAAkBf,IAAI,CAACe,YAAY;AA4L5D;;;;;;;;;;;;;AAaA,OAAO,MAAMC,QAAQ,GAA2DhB,IAAI,CAACgB,QAAQ;AAE7F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmEA,OAAO,MAAMC,aAAa,GAyItBf,QAAQ,CAACgB,MAAM;AAEnB;;;;;;;;;;;;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EAAE;MACrD,IAAI,CAACG,WAAW,CAACG,QAAQ,CAAC,GAAG,CAAC,EAAE;QAC9BH,WAAW,GAAGA,WAAW,CAACI,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC;MACzD;MACA,IAAIC,YAAY,GAAGN,SAAS,CAACE,KAAK,CAAC,CAAC,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC,CAACL,IAAI,EAAE;MACvD,IAAI,CAACQ,YAAY,CAACF,QAAQ,CAAC,GAAG,CAAC,EAAE;QAC/BE,YAAY,GAAGA,YAAY,CAACD,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC;MAC3D;MACA5E,KAAK,GAAG,GAAGwE,WAAW,KAAKK,YAAY,EAAE;MACzC,OAAO7E,KAAK;IACd;EACF,CAAC;EACD,MAAM8E,IAAI,GAASnB,OAAO,CAACH,WAAW,IAAI,mBAAmB,IAAIG,OAAO,CAACH,WAAW,GAChFG,OAAO,CAACH,WAAW,GACnB;IAAEW,iBAAiB;IAAE,GAAGR,OAAO,CAACH;EAAW,CAAE;EACjD,OAAOrE,QAAQ,CAACxX,MAAM,EAAEgc,OAAO,CAACJ,QAAQ,EAAEuB,IAAI,CAAC;AACjD;AAEA;;;;;;;;AAQA,OAAO,MAAMC,UAAU,GAAgBnd,IAAI,CAACmd,UAAU;AAEtD;AACA;AACA;AAEA;;;;;;;;;;;;;AAaA,OAAO,MAAMC,iBAAiB,GAAGA,CAAA,KAA8Brd,MAAwB,IAAuBA,MAAM;AAEpH;;;;;;;;;;;;;AAaA,OAAO,MAAMsd,eAAe,GAAGA,CAAA,KAA8Btd,MAAwB,IAAuBA,MAAM;AAElH;;;;;;;;;;;;;AAaA,OAAO,MAAMud,sBAAsB,GAAGA,CAAA,KAA8Bvd,MAAwB,IAC1FA,MAAM","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Effectable.js b/backend/node_modules/effect/dist/esm/Effectable.js new file mode 100644 index 0000000000000000000000000000000000000000..188af3051149b9da21381b169747dd99461dc65a --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Effectable.js @@ -0,0 +1,49 @@ +import * as internal from "./internal/effectable.js"; +/** + * @since 2.0.0 + * @category type ids + */ +export const EffectTypeId = internal.EffectTypeId; +/** + * @since 2.0.0 + * @category type ids + */ +export const StreamTypeId = internal.StreamTypeId; +/** + * @since 2.0.0 + * @category type ids + */ +export const SinkTypeId = internal.SinkTypeId; +/** + * @since 2.0.0 + * @category type ids + */ +export const ChannelTypeId = internal.ChannelTypeId; +/** + * @since 2.0.0 + * @category prototypes + */ +export const EffectPrototype = internal.EffectPrototype; +/** + * @since 2.0.0 + * @category prototypes + */ +export const CommitPrototype = internal.CommitPrototype; +/** + * @since 2.0.0 + * @category prototypes + */ +export const StructuralCommitPrototype = internal.StructuralCommitPrototype; +const Base = internal.Base; +const StructuralBase = internal.StructuralBase; +/** + * @since 2.0.0 + * @category constructors + */ +export class Class extends Base {} +/** + * @since 2.0.0 + * @category constructors + */ +export class StructuralClass extends StructuralBase {} +//# sourceMappingURL=Effectable.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Effectable.js.map b/backend/node_modules/effect/dist/esm/Effectable.js.map new file mode 100644 index 0000000000000000000000000000000000000000..b87c63147cd838cc51e5e063c20e41534021a8c1 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Effectable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Effectable.js","names":["internal","EffectTypeId","StreamTypeId","SinkTypeId","ChannelTypeId","EffectPrototype","CommitPrototype","StructuralCommitPrototype","Base","StructuralBase","Class","StructuralClass"],"sources":["../../src/Effectable.ts"],"sourcesContent":[null],"mappings":"AAKA,OAAO,KAAKA,QAAQ,MAAM,0BAA0B;AAIpD;;;;AAIA,OAAO,MAAMC,YAAY,GAAwBD,QAAQ,CAACC,YAAY;AAQtE;;;;AAIA,OAAO,MAAMC,YAAY,GAAwBF,QAAQ,CAACE,YAAY;AAQtE;;;;AAIA,OAAO,MAAMC,UAAU,GAAoBH,QAAQ,CAACG,UAAU;AAQ9D;;;;AAIA,OAAO,MAAMC,aAAa,GAA0BJ,QAAQ,CAACI,aAAa;AAgB1E;;;;AAIA,OAAO,MAAMC,eAAe,GAAyBL,QAAQ,CAACK,eAAe;AAE7E;;;;AAIA,OAAO,MAAMC,eAAe,GAAyBN,QAAQ,CAACM,eAAe;AAE7E;;;;AAIA,OAAO,MAAMC,yBAAyB,GAAyBP,QAAQ,CAACO,yBAAyB;AAEjG,MAAMC,IAAI,GAAoBR,QAAQ,CAACQ,IAAI;AAC3C,MAAMC,cAAc,GAAoBT,QAAQ,CAACS,cAAc;AAE/D;;;;AAIA,OAAM,MAAgBC,KAA+B,SAAQF,IAAa;AAO1E;;;;AAIA,OAAM,MAAgBG,eAAyC,SAAQF,cAAuB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Either.js b/backend/node_modules/effect/dist/esm/Either.js new file mode 100644 index 0000000000000000000000000000000000000000..8673920eb7ec5a62462e7602050ba5c35a870529 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Either.js @@ -0,0 +1,688 @@ +/** + * @since 2.0.0 + */ +import * as Equivalence from "./Equivalence.js"; +import { constNull, constUndefined, dual, identity } from "./Function.js"; +import * as doNotation from "./internal/doNotation.js"; +import * as either from "./internal/either.js"; +import * as option_ from "./internal/option.js"; +import { isFunction } from "./Predicate.js"; +import * as Gen from "./Utils.js"; +/** + * @category symbols + * @since 2.0.0 + */ +export const TypeId = either.TypeId; +/** + * Constructs a new `Either` holding a `Right` value. This usually represents a successful value due to the right bias + * of this structure. + * + * @category constructors + * @since 2.0.0 + */ +export const right = either.right; +const void_ = /*#__PURE__*/right(void 0); +export { +/** + * @category constructors + * @since 3.13.0 + */ +void_ as void }; +/** + * Constructs a new `Either` holding a `Left` value. This usually represents a failure, due to the right-bias of this + * structure. + * + * @category constructors + * @since 2.0.0 + */ +export const left = either.left; +/** + * Takes a lazy default and a nullable value, if the value is not nully (`null` or `undefined`), turn it into a `Right`, if the value is nully use + * the provided default as a `Left`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either } from "effect" + * + * assert.deepStrictEqual(Either.fromNullable(1, () => 'fallback'), Either.right(1)) + * assert.deepStrictEqual(Either.fromNullable(null, () => 'fallback'), Either.left('fallback')) + * ``` + * + * @category constructors + * @since 2.0.0 + */ +export const fromNullable = /*#__PURE__*/dual(2, (self, onNullable) => self == null ? left(onNullable(self)) : right(self)); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either, Option } from "effect" + * + * assert.deepStrictEqual(Either.fromOption(Option.some(1), () => 'error'), Either.right(1)) + * assert.deepStrictEqual(Either.fromOption(Option.none(), () => 'error'), Either.left('error')) + * ``` + * + * @category constructors + * @since 2.0.0 + */ +export const fromOption = either.fromOption; +const try_ = evaluate => { + if (isFunction(evaluate)) { + try { + return right(evaluate()); + } catch (e) { + return left(e); + } + } else { + try { + return right(evaluate.try()); + } catch (e) { + return left(evaluate.catch(e)); + } + } +}; +export { +/** + * Imports a synchronous side-effect into a pure `Either` value, translating any + * thrown exceptions into typed failed eithers creating with `Either.left`. + * + * @category constructors + * @since 2.0.0 + */ +try_ as try }; +/** + * Tests if a value is a `Either`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either } from "effect" + * + * assert.deepStrictEqual(Either.isEither(Either.right(1)), true) + * assert.deepStrictEqual(Either.isEither(Either.left("a")), true) + * assert.deepStrictEqual(Either.isEither({ right: 1 }), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isEither = either.isEither; +/** + * Determine if a `Either` is a `Left`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either } from "effect" + * + * assert.deepStrictEqual(Either.isLeft(Either.right(1)), false) + * assert.deepStrictEqual(Either.isLeft(Either.left("a")), true) + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isLeft = either.isLeft; +/** + * Determine if a `Either` is a `Right`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either } from "effect" + * + * assert.deepStrictEqual(Either.isRight(Either.right(1)), true) + * assert.deepStrictEqual(Either.isRight(Either.left("a")), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isRight = either.isRight; +/** + * Converts a `Either` to an `Option` discarding the `Left`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either, Option } from "effect" + * + * assert.deepStrictEqual(Either.getRight(Either.right('ok')), Option.some('ok')) + * assert.deepStrictEqual(Either.getRight(Either.left('err')), Option.none()) + * ``` + * + * @category getters + * @since 2.0.0 + */ +export const getRight = either.getRight; +/** + * Converts a `Either` to an `Option` discarding the value. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either, Option } from "effect" + * + * assert.deepStrictEqual(Either.getLeft(Either.right('ok')), Option.none()) + * assert.deepStrictEqual(Either.getLeft(Either.left('err')), Option.some('err')) + * ``` + * + * @category getters + * @since 2.0.0 + */ +export const getLeft = either.getLeft; +/** + * @category equivalence + * @since 2.0.0 + */ +export const getEquivalence = ({ + left, + right +}) => Equivalence.make((x, y) => isLeft(x) ? isLeft(y) && left(x.left, y.left) : isRight(y) && right(x.right, y.right)); +/** + * @category mapping + * @since 2.0.0 + */ +export const mapBoth = /*#__PURE__*/dual(2, (self, { + onLeft, + onRight +}) => isLeft(self) ? left(onLeft(self.left)) : right(onRight(self.right))); +/** + * Maps the `Left` side of an `Either` value to a new `Either` value. + * + * @category mapping + * @since 2.0.0 + */ +export const mapLeft = /*#__PURE__*/dual(2, (self, f) => isLeft(self) ? left(f(self.left)) : right(self.right)); +/** + * Maps the `Right` side of an `Either` value to a new `Either` value. + * + * @category mapping + * @since 2.0.0 + */ +export const map = /*#__PURE__*/dual(2, (self, f) => isRight(self) ? right(f(self.right)) : left(self.left)); +/** + * Takes two functions and an `Either` value, if the value is a `Left` the inner value is applied to the `onLeft function, + * if the value is a `Right` the inner value is applied to the `onRight` function. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, Either } from "effect" + * + * const onLeft = (strings: ReadonlyArray): string => `strings: ${strings.join(', ')}` + * + * const onRight = (value: number): string => `Ok: ${value}` + * + * assert.deepStrictEqual(pipe(Either.right(1), Either.match({ onLeft, onRight })), 'Ok: 1') + * assert.deepStrictEqual( + * pipe(Either.left(['string 1', 'string 2']), Either.match({ onLeft, onRight })), + * 'strings: string 1, string 2' + * ) + * ``` + * + * @category pattern matching + * @since 2.0.0 + */ +export const match = /*#__PURE__*/dual(2, (self, { + onLeft, + onRight +}) => isLeft(self) ? onLeft(self.left) : onRight(self.right)); +/** + * Transforms a `Predicate` function into a `Right` of the input value if the predicate returns `true` + * or `Left` of the result of the provided function if the predicate returns false + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, Either } from "effect" + * + * const isPositive = (n: number): boolean => n > 0 + * const isPositiveEither = Either.liftPredicate(isPositive, n => `${n} is not positive`) + * + * assert.deepStrictEqual( + * isPositiveEither(1), + * Either.right(1) + * ) + * assert.deepStrictEqual( + * isPositiveEither(0), + * Either.left("0 is not positive") + * ) + * ``` + * + * @category lifting + * @since 3.4.0 + */ +export const liftPredicate = /*#__PURE__*/dual(3, (a, predicate, orLeftWith) => predicate(a) ? right(a) : left(orLeftWith(a))); +/** + * Filter the right value with the provided function. + * If the predicate fails, set the left value with the result of the provided function. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, Either } from "effect" + * + * const isPositive = (n: number): boolean => n > 0 + * + * assert.deepStrictEqual( + * pipe( + * Either.right(1), + * Either.filterOrLeft(isPositive, n => `${n} is not positive`) + * ), + * Either.right(1) + * ) + * assert.deepStrictEqual( + * pipe( + * Either.right(0), + * Either.filterOrLeft(isPositive, n => `${n} is not positive`) + * ), + * Either.left("0 is not positive") + * ) + * ``` + * + * @since 2.0.0 + * @category filtering & conditionals + */ +export const filterOrLeft = /*#__PURE__*/dual(3, (self, predicate, orLeftWith) => flatMap(self, r => predicate(r) ? right(r) : left(orLeftWith(r)))); +/** + * @category getters + * @since 2.0.0 + */ +export const merge = /*#__PURE__*/match({ + onLeft: identity, + onRight: identity +}); +/** + * Returns the wrapped value if it's a `Right` or a default value if is a `Left`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either } from "effect" + * + * assert.deepStrictEqual(Either.getOrElse(Either.right(1), (error) => error + "!"), 1) + * assert.deepStrictEqual(Either.getOrElse(Either.left("not a number"), (error) => error + "!"), "not a number!") + * ``` + * + * @category getters + * @since 2.0.0 + */ +export const getOrElse = /*#__PURE__*/dual(2, (self, onLeft) => isLeft(self) ? onLeft(self.left) : self.right); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either } from "effect" + * + * assert.deepStrictEqual(Either.getOrNull(Either.right(1)), 1) + * assert.deepStrictEqual(Either.getOrNull(Either.left("a")), null) + * ``` + * + * @category getters + * @since 2.0.0 + */ +export const getOrNull = /*#__PURE__*/getOrElse(constNull); +/** + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either } from "effect" + * + * assert.deepStrictEqual(Either.getOrUndefined(Either.right(1)), 1) + * assert.deepStrictEqual(Either.getOrUndefined(Either.left("a")), undefined) + * ``` + * + * @category getters + * @since 2.0.0 + */ +export const getOrUndefined = /*#__PURE__*/getOrElse(constUndefined); +/** + * Extracts the value of an `Either` or throws if the `Either` is `Left`. + * + * If a default error is sufficient for your use case and you don't need to configure the thrown error, see {@link getOrThrow}. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either } from "effect" + * + * assert.deepStrictEqual( + * Either.getOrThrowWith(Either.right(1), () => new Error('Unexpected Left')), + * 1 + * ) + * assert.throws(() => Either.getOrThrowWith(Either.left("error"), () => new Error('Unexpected Left'))) + * ``` + * + * @category getters + * @since 2.0.0 + */ +export const getOrThrowWith = /*#__PURE__*/dual(2, (self, onLeft) => { + if (isRight(self)) { + return self.right; + } + throw onLeft(self.left); +}); +// TODO(4.0): by default should throw `L` (i.e getOrThrowWith with the identity function) +/** + * Extracts the value of an `Either` or throws if the `Either` is `Left`. + * + * The thrown error is a default error. To configure the error thrown, see {@link getOrThrowWith}. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either } from "effect" + * + * assert.deepStrictEqual(Either.getOrThrow(Either.right(1)), 1) + * assert.throws(() => Either.getOrThrow(Either.left("error"))) + * ``` + * + * @throws `Error("getOrThrow called on a Left")` + * + * @category getters + * @since 2.0.0 + */ +export const getOrThrow = /*#__PURE__*/getOrThrowWith(() => new Error("getOrThrow called on a Left")); +/** + * Returns `self` if it is a `Right` or `that` otherwise. + * + * @category error handling + * @since 2.0.0 + */ +export const orElse = /*#__PURE__*/dual(2, (self, that) => isLeft(self) ? that(self.left) : right(self.right)); +/** + * @category sequencing + * @since 2.0.0 + */ +export const flatMap = /*#__PURE__*/dual(2, (self, f) => isLeft(self) ? left(self.left) : f(self.right)); +/** + * Executes a sequence of two `Either`s. The second `Either` can be dependent on the result of the first `Either`. + * + * @category sequencing + * @since 2.0.0 + */ +export const andThen = /*#__PURE__*/dual(2, (self, f) => flatMap(self, a => { + const b = isFunction(f) ? f(a) : f; + return isEither(b) ? b : right(b); +})); +/** + * @category zipping + * @since 2.0.0 + */ +export const zipWith = /*#__PURE__*/dual(3, (self, that, f) => flatMap(self, r => map(that, r2 => f(r, r2)))); +/** + * @category combining + * @since 2.0.0 + */ +export const ap = /*#__PURE__*/dual(2, (self, that) => zipWith(self, that, (f, a) => f(a))); +/** + * Takes a structure of `Either`s and returns an `Either` of values with the same structure. + * + * - If a tuple is supplied, then the returned `Either` will contain a tuple with the same length. + * - If a struct is supplied, then the returned `Either` will contain a struct with the same keys. + * - If an iterable is supplied, then the returned `Either` will contain an array. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either } from "effect" + * + * assert.deepStrictEqual(Either.all([Either.right(1), Either.right(2)]), Either.right([1, 2])) + * assert.deepStrictEqual(Either.all({ right: Either.right(1), b: Either.right("hello") }), Either.right({ right: 1, b: "hello" })) + * assert.deepStrictEqual(Either.all({ right: Either.right(1), b: Either.left("error") }), Either.left("error")) + * ``` + * + * @category combining + * @since 2.0.0 + */ +// @ts-expect-error +export const all = input => { + if (Symbol.iterator in input) { + const out = []; + for (const e of input) { + if (isLeft(e)) { + return e; + } + out.push(e.right); + } + return right(out); + } + const out = {}; + for (const key of Object.keys(input)) { + const e = input[key]; + if (isLeft(e)) { + return e; + } + out[key] = e.right; + } + return right(out); +}; +/** + * Returns an `Either` that swaps the error/success cases. This allows you to + * use all methods on the error channel, possibly before flipping back. + * + * @since 2.0.0 + * @category mapping + */ +export const flip = self => isLeft(self) ? right(self.left) : left(self.right); +const adapter = /*#__PURE__*/Gen.adapter(); +/** + * @category generators + * @since 2.0.0 + */ +export const gen = (...args) => { + const f = args.length === 1 ? args[0] : args[1].bind(args[0]); + const iterator = f(adapter); + let state = iterator.next(); + while (!state.done) { + const current = Gen.isGenKind(state.value) ? state.value.value : Gen.yieldWrapGet(state.value); + if (isLeft(current)) { + return current; + } + state = iterator.next(current.right); + } + return right(state.value); +}; +// ------------------------------------------------------------------------------------- +// do notation +// ------------------------------------------------------------------------------------- +/** + * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Either` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either, pipe } from "effect" + * + * const result = pipe( + * Either.Do, + * Either.bind("x", () => Either.right(2)), + * Either.bind("y", () => Either.right(3)), + * Either.let("sum", ({ x, y }) => x + y) + * ) + * assert.deepStrictEqual(result, Either.right({ x: 2, y: 3, sum: 5 })) + * ``` + * + * @see {@link bind} + * @see {@link bindTo} + * @see {@link let_ let} + * + * @category do notation + * @since 2.0.0 + */ +export const Do = /*#__PURE__*/right({}); +/** + * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Either` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either, pipe } from "effect" + * + * const result = pipe( + * Either.Do, + * Either.bind("x", () => Either.right(2)), + * Either.bind("y", () => Either.right(3)), + * Either.let("sum", ({ x, y }) => x + y) + * ) + * assert.deepStrictEqual(result, Either.right({ x: 2, y: 3, sum: 5 })) + * ``` + * + * @see {@link Do} + * @see {@link bindTo} + * @see {@link let_ let} + * + * @category do notation + * @since 2.0.0 + */ +export const bind = /*#__PURE__*/doNotation.bind(map, flatMap); +/** + * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Either` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either, pipe } from "effect" + * + * const result = pipe( + * Either.Do, + * Either.bind("x", () => Either.right(2)), + * Either.bind("y", () => Either.right(3)), + * Either.let("sum", ({ x, y }) => x + y) + * ) + * assert.deepStrictEqual(result, Either.right({ x: 2, y: 3, sum: 5 })) + * ``` + * + * @see {@link Do} + * @see {@link bind} + * @see {@link let_ let} + * + * @category do notation + * @since 2.0.0 + */ +export const bindTo = /*#__PURE__*/doNotation.bindTo(map); +const let_ = /*#__PURE__*/doNotation.let_(map); +export { +/** + * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Either` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Either, pipe } from "effect" + * + * const result = pipe( + * Either.Do, + * Either.bind("x", () => Either.right(2)), + * Either.bind("y", () => Either.right(3)), + * Either.let("sum", ({ x, y }) => x + y) + * ) + * assert.deepStrictEqual(result, Either.right({ x: 2, y: 3, sum: 5 })) + * ``` + * + * @see {@link Do} + * @see {@link bindTo} + * @see {@link bind} + * + * @category do notation + * @since 2.0.0 + */ +let_ as let }; +/** + * Converts an `Option` of an `Either` into an `Either` of an `Option`. + * + * **Details** + * + * This function transforms an `Option>` into an + * `Either, E>`. If the `Option` is `None`, the resulting `Either` + * will be a `Right` with a `None` value. If the `Option` is `Some`, the + * inner `Either` will be executed, and its result wrapped in a `Some`. + * + * @example + * ```ts + * import { Effect, Either, Option } from "effect" + * + * // ┌─── Option> + * // ▼ + * const maybe = Option.some(Either.right(42)) + * + * // ┌─── Either, never, never> + * // ▼ + * const result = Either.transposeOption(maybe) + * + * console.log(Effect.runSync(result)) + * // Output: { _id: 'Option', _tag: 'Some', value: 42 } + * ``` + * + * @since 3.14.0 + * @category Optional Wrapping & Unwrapping + */ +export const transposeOption = self => { + return option_.isNone(self) ? right(option_.none) : map(self.value, option_.some); +}; +/** + * Applies an `Either` on an `Option` and transposes the result. + * + * **Details** + * + * If the `Option` is `None`, the resulting `Either` will immediately succeed with a `Right` value of `None`. + * If the `Option` is `Some`, the transformation function will be applied to the inner value, and its result wrapped in a `Some`. + * + * @example + * ```ts + * import { Either, Option, pipe } from "effect" + * + * // ┌─── Either, never>> + * // ▼ + * const noneResult = pipe( + * Option.none(), + * Either.transposeMapOption(() => Either.right(42)) // will not be executed + * ) + * console.log(noneResult) + * // Output: { _id: 'Either', _tag: 'Right', right: { _id: 'Option', _tag: 'None' } } + * + * // ┌─── Either, never>> + * // ▼ + * const someRightResult = pipe( + * Option.some(42), + * Either.transposeMapOption((value) => Either.right(value * 2)) + * ) + * console.log(someRightResult) + * // Output: { _id: 'Either', _tag: 'Right', right: { _id: 'Option', _tag: 'Some', value: 84 } } + * ``` + * + * @since 3.15.0 + * @category Optional Wrapping & Unwrapping + */ +export const transposeMapOption = /*#__PURE__*/dual(2, (self, f) => option_.isNone(self) ? right(option_.none) : map(f(self.value), option_.some)); +//# sourceMappingURL=Either.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Encoding.js b/backend/node_modules/effect/dist/esm/Encoding.js new file mode 100644 index 0000000000000000000000000000000000000000..7c748df6f9d10b07a37967061e03a6e05d366e73 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Encoding.js @@ -0,0 +1,136 @@ +/** + * This module provides encoding & decoding functionality for: + * + * - base64 (RFC4648) + * - base64 (URL) + * - hex + * + * @since 2.0.0 + */ +import * as Either from "./Either.js"; +import * as Base64 from "./internal/encoding/base64.js"; +import * as Base64Url from "./internal/encoding/base64Url.js"; +import * as Common from "./internal/encoding/common.js"; +import * as Hex from "./internal/encoding/hex.js"; +/** + * Encodes the given value into a base64 (RFC4648) `string`. + * + * @category encoding + * @since 2.0.0 + */ +export const encodeBase64 = input => typeof input === "string" ? Base64.encode(Common.encoder.encode(input)) : Base64.encode(input); +/** + * Decodes a base64 (RFC4648) encoded `string` into a `Uint8Array`. + * + * @category decoding + * @since 2.0.0 + */ +export const decodeBase64 = str => Base64.decode(str); +/** + * Decodes a base64 (RFC4648) encoded `string` into a UTF-8 `string`. + * + * @category decoding + * @since 2.0.0 + */ +export const decodeBase64String = str => Either.map(decodeBase64(str), _ => Common.decoder.decode(_)); +/** + * Encodes the given value into a base64 (URL) `string`. + * + * @category encoding + * @since 2.0.0 + */ +export const encodeBase64Url = input => typeof input === "string" ? Base64Url.encode(Common.encoder.encode(input)) : Base64Url.encode(input); +/** + * Decodes a base64 (URL) encoded `string` into a `Uint8Array`. + * + * @category decoding + * @since 2.0.0 + */ +export const decodeBase64Url = str => Base64Url.decode(str); +/** + * Decodes a base64 (URL) encoded `string` into a UTF-8 `string`. + * + * @category decoding + * @since 2.0.0 + */ +export const decodeBase64UrlString = str => Either.map(decodeBase64Url(str), _ => Common.decoder.decode(_)); +/** + * Encodes the given value into a hex `string`. + * + * @category encoding + * @since 2.0.0 + */ +export const encodeHex = input => typeof input === "string" ? Hex.encode(Common.encoder.encode(input)) : Hex.encode(input); +/** + * Decodes a hex encoded `string` into a `Uint8Array`. + * + * @category decoding + * @since 2.0.0 + */ +export const decodeHex = str => Hex.decode(str); +/** + * Decodes a hex encoded `string` into a UTF-8 `string`. + * + * @category decoding + * @since 2.0.0 + */ +export const decodeHexString = str => Either.map(decodeHex(str), _ => Common.decoder.decode(_)); +/** + * Encodes a UTF-8 `string` into a URI component `string`. + * + * @category encoding + * @since 3.12.0 + */ +export const encodeUriComponent = str => Either.try({ + try: () => encodeURIComponent(str), + catch: e => EncodeException(str, e instanceof Error ? e.message : "Invalid input") +}); +/** + * Decodes a URI component `string` into a UTF-8 `string`. + * + * @category decoding + * @since 3.12.0 + */ +export const decodeUriComponent = str => Either.try({ + try: () => decodeURIComponent(str), + catch: e => DecodeException(str, e instanceof Error ? e.message : "Invalid input") +}); +/** + * @since 2.0.0 + * @category symbols + */ +export const DecodeExceptionTypeId = Common.DecodeExceptionTypeId; +/** + * Creates a checked exception which occurs when decoding fails. + * + * @since 2.0.0 + * @category errors + */ +export const DecodeException = Common.DecodeException; +/** + * Returns `true` if the specified value is an `DecodeException`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isDecodeException = Common.isDecodeException; +/** + * @since 3.12.0 + * @category symbols + */ +export const EncodeExceptionTypeId = Common.EncodeExceptionTypeId; +/** + * Creates a checked exception which occurs when encoding fails. + * + * @since 3.12.0 + * @category errors + */ +export const EncodeException = Common.EncodeException; +/** + * Returns `true` if the specified value is an `EncodeException`, `false` otherwise. + * + * @since 3.12.0 + * @category refinements + */ +export const isEncodeException = Common.isEncodeException; +//# sourceMappingURL=Encoding.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Encoding.js.map b/backend/node_modules/effect/dist/esm/Encoding.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d0c70daacb1ea3279dce66a5914a11a933872a72 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Encoding.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Encoding.js","names":["Either","Base64","Base64Url","Common","Hex","encodeBase64","input","encode","encoder","decodeBase64","str","decode","decodeBase64String","map","_","decoder","encodeBase64Url","decodeBase64Url","decodeBase64UrlString","encodeHex","decodeHex","decodeHexString","encodeUriComponent","try","encodeURIComponent","catch","e","EncodeException","Error","message","decodeUriComponent","decodeURIComponent","DecodeException","DecodeExceptionTypeId","isDecodeException","EncodeExceptionTypeId","isEncodeException"],"sources":["../../src/Encoding.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;AASA,OAAO,KAAKA,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,MAAM,MAAM,+BAA+B;AACvD,OAAO,KAAKC,SAAS,MAAM,kCAAkC;AAC7D,OAAO,KAAKC,MAAM,MAAM,+BAA+B;AACvD,OAAO,KAAKC,GAAG,MAAM,4BAA4B;AAEjD;;;;;;AAMA,OAAO,MAAMC,YAAY,GAA4CC,KAAK,IACxE,OAAOA,KAAK,KAAK,QAAQ,GAAGL,MAAM,CAACM,MAAM,CAACJ,MAAM,CAACK,OAAO,CAACD,MAAM,CAACD,KAAK,CAAC,CAAC,GAAGL,MAAM,CAACM,MAAM,CAACD,KAAK,CAAC;AAEhG;;;;;;AAMA,OAAO,MAAMG,YAAY,GAAIC,GAAW,IAAiDT,MAAM,CAACU,MAAM,CAACD,GAAG,CAAC;AAE3G;;;;;;AAMA,OAAO,MAAME,kBAAkB,GAAIF,GAAW,IAAKV,MAAM,CAAC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,kBAAkB,CAACd,GAAG,CAAC;EAClCe,KAAK,EAAGC,CAAC,IAAKC,eAAe,CAACjB,GAAG,EAAEgB,CAAC,YAAYE,KAAK,GAAGF,CAAC,CAACG,OAAO,GAAG,eAAe;CACpF,CAAC;AAEJ;;;;;;AAMA,OAAO,MAAMC,kBAAkB,GAAIpB,GAAW,IAC5CV,MAAM,CAACuB,GAAG,CAAC;EACTA,GAAG,EAAEA,CAAA,KAAMQ,kBAAkB,CAACrB,GAAG,CAAC;EAClCe,KAAK,EAAGC,CAAC,IAAKM,eAAe,CAACtB,GAAG,EAAEgB,CAAC,YAAYE,KAAK,GAAGF,CAAC,CAACG,OAAO,GAAG,eAAe;CACpF,CAAC;AAEJ;;;;AAIA,OAAO,MAAMI,qBAAqB,GAAkB9B,MAAM,CAAC8B,qBAAqB;AAqBhF;;;;;;AAMA,OAAO,MAAMD,eAAe,GAAyD7B,MAAM,CAAC6B,eAAe;AAE3G;;;;;;AAMA,OAAO,MAAME,iBAAiB,GAAyC/B,MAAM,CAAC+B,iBAAiB;AAE/F;;;;AAIA,OAAO,MAAMC,qBAAqB,GAAkBhC,MAAM,CAACgC,qBAAqB;AAqBhF;;;;;;AAMA,OAAO,MAAMR,eAAe,GAAyDxB,MAAM,CAACwB,eAAe;AAE3G;;;;;;AAMA,OAAO,MAAMS,iBAAiB,GAAyCjC,MAAM,CAACiC,iBAAiB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Equal.js b/backend/node_modules/effect/dist/esm/Equal.js new file mode 100644 index 0000000000000000000000000000000000000000..fa4b4350d46005cd34eef019da092c72903f7842 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Equal.js @@ -0,0 +1,74 @@ +import * as Hash from "./Hash.js"; +import { hasProperty } from "./Predicate.js"; +import { structuralRegionState } from "./Utils.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const symbol = /*#__PURE__*/Symbol.for("effect/Equal"); +export function equals() { + if (arguments.length === 1) { + return self => compareBoth(self, arguments[0]); + } + return compareBoth(arguments[0], arguments[1]); +} +function compareBoth(self, that) { + if (self === that) { + return true; + } + const selfType = typeof self; + if (selfType !== typeof that) { + return false; + } + if (selfType === "object" || selfType === "function") { + if (self !== null && that !== null) { + if (isEqual(self) && isEqual(that)) { + if (Hash.hash(self) === Hash.hash(that) && self[symbol](that)) { + return true; + } else { + return structuralRegionState.enabled && structuralRegionState.tester ? structuralRegionState.tester(self, that) : false; + } + } else if (self instanceof Date && that instanceof Date) { + const t1 = self.getTime(); + const t2 = that.getTime(); + return t1 === t2 || Number.isNaN(t1) && Number.isNaN(t2); + } else if (self instanceof URL && that instanceof URL) { + return self.href === that.href; + } + } + if (structuralRegionState.enabled) { + if (self === null || that === null) { + return false; + } + if (Array.isArray(self) && Array.isArray(that)) { + return self.length === that.length && self.every((v, i) => compareBoth(v, that[i])); + } + if (Object.getPrototypeOf(self) === Object.prototype && Object.getPrototypeOf(that) === Object.prototype) { + const keysSelf = Object.keys(self); + const keysThat = Object.keys(that); + if (keysSelf.length === keysThat.length) { + for (const key of keysSelf) { + // @ts-expect-error + if (!(key in that && compareBoth(self[key], that[key]))) { + return structuralRegionState.tester ? structuralRegionState.tester(self, that) : false; + } + } + return true; + } + } + return structuralRegionState.tester ? structuralRegionState.tester(self, that) : false; + } + } + return structuralRegionState.enabled && structuralRegionState.tester ? structuralRegionState.tester(self, that) : false; +} +/** + * @since 2.0.0 + * @category guards + */ +export const isEqual = u => hasProperty(u, symbol); +/** + * @since 2.0.0 + * @category instances + */ +export const equivalence = () => equals; +//# sourceMappingURL=Equal.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Equal.js.map b/backend/node_modules/effect/dist/esm/Equal.js.map new file mode 100644 index 0000000000000000000000000000000000000000..6d61e9baef40d1ada1780f4e35f3ce0d843f42d9 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Equal.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Equal.js","names":["Hash","hasProperty","structuralRegionState","symbol","Symbol","for","equals","arguments","length","self","compareBoth","that","selfType","isEqual","hash","enabled","tester","Date","t1","getTime","t2","Number","isNaN","URL","href","Array","isArray","every","v","i","Object","getPrototypeOf","prototype","keysSelf","keys","keysThat","key","u","equivalence"],"sources":["../../src/Equal.ts"],"sourcesContent":[null],"mappings":"AAIA,OAAO,KAAKA,IAAI,MAAM,WAAW;AACjC,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SAASC,qBAAqB,QAAQ,YAAY;AAElD;;;;AAIA,OAAO,MAAMC,MAAM,gBAAkBC,MAAM,CAACC,GAAG,CAAC,cAAc,CAAC;AAgB/D,OAAM,SAAUC,MAAMA,CAAA;EACpB,IAAIC,SAAS,CAACC,MAAM,KAAK,CAAC,EAAE;IAC1B,OAAQC,IAAa,IAAKC,WAAW,CAACD,IAAI,EAAEF,SAAS,CAAC,CAAC,CAAC,CAAC;EAC3D;EACA,OAAOG,WAAW,CAACH,SAAS,CAAC,CAAC,CAAC,EAAEA,SAAS,CAAC,CAAC,CAAC,CAAC;AAChD;AAEA,SAASG,WAAWA,CAACD,IAAa,EAAEE,IAAa;EAC/C,IAAIF,IAAI,KAAKE,IAAI,EAAE;IACjB,OAAO,IAAI;EACb;EACA,MAAMC,QAAQ,GAAG,OAAOH,IAAI;EAC5B,IAAIG,QAAQ,KAAK,OAAOD,IAAI,EAAE;IAC5B,OAAO,KAAK;EACd;EACA,IAAIC,QAAQ,KAAK,QAAQ,IAAIA,QAAQ,KAAK,UAAU,EAAE;IACpD,IAAIH,IAAI,KAAK,IAAI,IAAIE,IAAI,KAAK,IAAI,EAAE;MAClC,IAAIE,OAAO,CAACJ,IAAI,CAAC,IAAII,OAAO,CAACF,IAAI,CAAC,EAAE;QAClC,IAAIX,IAAI,CAACc,IAAI,CAACL,IAAI,CAAC,KAAKT,IAAI,CAACc,IAAI,CAACH,IAAI,CAAC,IAAIF,IAAI,CAACN,MAAM,CAAC,CAACQ,IAAI,CAAC,EAAE;UAC7D,OAAO,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AW,CAAC;QACzC,MAAM0B,QAAQ,GAAGL,MAAM,CAACI,IAAI,CAACvB,IAAW,CAAC;QACzC,IAAIsB,QAAQ,CAACzB,MAAM,KAAK2B,QAAQ,CAAC3B,MAAM,EAAE;UACvC,KAAK,MAAM4B,GAAG,IAAIH,QAAQ,EAAE;YAC1B;YACA,IAAI,EAAEG,GAAG,IAAIzB,IAAI,IAAID,WAAW,CAACD,IAAI,CAAC2B,GAAG,CAAC,EAAEzB,IAAI,CAACyB,GAAG,CAAC,CAAC,CAAC,EAAE;cACvD,OAAOlC,qBAAqB,CAACc,MAAM,GAAGd,qBAAqB,CAACc,MAAM,CAACP,IAAI,EAAEE,IAAI,CAAC,GAAG,KAAK;YACxF;UACF;UACA,OAAO,IAAI;QACb;MACF;MACA,OAAOT,qBAAqB,CAACc,MAAM,GAAGd,qBAAqB,CAACc,MAAM,CAACP,IAAI,EAAEE,IAAI,CAAC,GAAG,KAAK;IACxF;EACF;EAEA,OAAOT,qBAAqB,CAACa,OAAO,IAAIb,qBAAqB,CAACc,MAAM,GAChEd,qBAAqB,CAACc,MAAM,CAACP,IAAI,EAAEE,IAAI,CAAC,GACxC,KAAK;AACX;AAEA;;;;AAIA,OAAO,MAAME,OAAO,GAAIwB,CAAU,IAAiBpC,WAAW,CAACoC,CAAC,EAAElC,MAAM,CAAC;AAEzE;;;;AAIA,OAAO,MAAMmC,WAAW,GAA4BA,CAAA,KAAMhC,MAAM","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Equivalence.js b/backend/node_modules/effect/dist/esm/Equivalence.js new file mode 100644 index 0000000000000000000000000000000000000000..1e691e5667258735f1f25bc5049d5e361f98f26d --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Equivalence.js @@ -0,0 +1,166 @@ +/** + * This module provides an implementation of the `Equivalence` type class, which defines a binary relation + * that is reflexive, symmetric, and transitive. In other words, it defines a notion of equivalence between values of a certain type. + * These properties are also known in mathematics as an "equivalence relation". + * + * @since 2.0.0 + */ +import { dual } from "./Function.js"; +/** + * @category constructors + * @since 2.0.0 + */ +export const make = isEquivalent => (self, that) => self === that || isEquivalent(self, that); +const isStrictEquivalent = (x, y) => x === y; +/** + * Return an `Equivalence` that uses strict equality (===) to compare values. + * + * @since 2.0.0 + * @category constructors + */ +export const strict = () => isStrictEquivalent; +/** + * @category instances + * @since 2.0.0 + */ +export const string = /*#__PURE__*/strict(); +/** + * @category instances + * @since 2.0.0 + */ +export const number = /*#__PURE__*/strict(); +/** + * @category instances + * @since 2.0.0 + */ +export const boolean = /*#__PURE__*/strict(); +/** + * @category instances + * @since 2.0.0 + */ +export const bigint = /*#__PURE__*/strict(); +/** + * @category instances + * @since 2.0.0 + */ +export const symbol = /*#__PURE__*/strict(); +/** + * @category combining + * @since 2.0.0 + */ +export const combine = /*#__PURE__*/dual(2, (self, that) => make((x, y) => self(x, y) && that(x, y))); +/** + * @category combining + * @since 2.0.0 + */ +export const combineMany = /*#__PURE__*/dual(2, (self, collection) => make((x, y) => { + if (!self(x, y)) { + return false; + } + for (const equivalence of collection) { + if (!equivalence(x, y)) { + return false; + } + } + return true; +})); +const isAlwaysEquivalent = (_x, _y) => true; +/** + * @category combining + * @since 2.0.0 + */ +export const combineAll = collection => combineMany(isAlwaysEquivalent, collection); +/** + * @category mapping + * @since 2.0.0 + */ +export const mapInput = /*#__PURE__*/dual(2, (self, f) => make((x, y) => self(f(x), f(y)))); +/** + * @category instances + * @since 2.0.0 + */ +export const Date = /*#__PURE__*/mapInput(number, date => date.getTime()); +/** + * @category combining + * @since 2.0.0 + */ +export const product = /*#__PURE__*/dual(2, (self, that) => make(([xa, xb], [ya, yb]) => self(xa, ya) && that(xb, yb))); +/** + * @category combining + * @since 2.0.0 + */ +export const all = collection => { + return make((x, y) => { + const len = Math.min(x.length, y.length); + let collectionLength = 0; + for (const equivalence of collection) { + if (collectionLength >= len) { + break; + } + if (!equivalence(x[collectionLength], y[collectionLength])) { + return false; + } + collectionLength++; + } + return true; + }); +}; +/** + * @category combining + * @since 2.0.0 + */ +export const productMany = (self, collection) => { + const equivalence = all(collection); + return make((x, y) => !self(x[0], y[0]) ? false : equivalence(x.slice(1), y.slice(1))); +}; +/** + * Similar to `Promise.all` but operates on `Equivalence`s. + * + * ```ts skip-type-checking + * [Equivalence, Equivalence, ...] -> Equivalence<[A, B, ...]> + * ``` + * + * Given a tuple of `Equivalence`s returns a new `Equivalence` that compares values of a tuple + * by applying each `Equivalence` to the corresponding element of the tuple. + * + * @category combinators + * @since 2.0.0 + */ +export const tuple = (...elements) => all(elements); +/** + * Creates a new `Equivalence` for an array of values based on a given `Equivalence` for the elements of the array. + * + * @category combinators + * @since 2.0.0 + */ +export const array = item => make((self, that) => { + if (self.length !== that.length) { + return false; + } + for (let i = 0; i < self.length; i++) { + const isEq = item(self[i], that[i]); + if (!isEq) { + return false; + } + } + return true; +}); +/** + * Given a struct of `Equivalence`s returns a new `Equivalence` that compares values of a struct + * by applying each `Equivalence` to the corresponding property of the struct. + * + * @category combinators + * @since 2.0.0 + */ +export const struct = fields => { + const keys = Object.keys(fields); + return make((self, that) => { + for (const key of keys) { + if (!fields[key](self[key], that[key])) { + return false; + } + } + return true; + }); +}; +//# sourceMappingURL=Equivalence.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/ExecutionStrategy.js b/backend/node_modules/effect/dist/esm/ExecutionStrategy.js new file mode 100644 index 0000000000000000000000000000000000000000..831259ca1178faf1e4fab63c24024dd64340d061 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/ExecutionStrategy.js @@ -0,0 +1,55 @@ +import * as internal from "./internal/executionStrategy.js"; +/** + * Execute effects sequentially. + * + * @since 2.0.0 + * @category constructors + */ +export const sequential = internal.sequential; +/** + * Execute effects in parallel. + * + * @since 2.0.0 + * @category constructors + */ +export const parallel = internal.parallel; +/** + * Execute effects in parallel, up to the specified number of concurrent fibers. + * + * @since 2.0.0 + * @category constructors + */ +export const parallelN = internal.parallelN; +/** + * Returns `true` if the specified `ExecutionStrategy` is an instance of + * `Sequential`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isSequential = internal.isSequential; +/** + * Returns `true` if the specified `ExecutionStrategy` is an instance of + * `Sequential`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isParallel = internal.isParallel; +/** + * Returns `true` if the specified `ExecutionStrategy` is an instance of + * `Sequential`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isParallelN = internal.isParallelN; +/** + * Folds over the specified `ExecutionStrategy` using the provided case + * functions. + * + * @since 2.0.0 + * @category folding + */ +export const match = internal.match; +//# sourceMappingURL=ExecutionStrategy.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Exit.js b/backend/node_modules/effect/dist/esm/Exit.js new file mode 100644 index 0000000000000000000000000000000000000000..38f5d7fc55eacb71a6bbf6c7709b1eb8e33d3a19 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Exit.js @@ -0,0 +1,257 @@ +import * as core from "./internal/core.js"; +/** + * Returns `true` if the specified value is an `Exit`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isExit = core.exitIsExit; +/** + * Returns `true` if the specified `Exit` is a `Failure`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isFailure = core.exitIsFailure; +/** + * Returns `true` if the specified `Exit` is a `Success`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isSuccess = core.exitIsSuccess; +/** + * Returns `true` if the specified exit is a `Failure` **and** the `Cause` of + * the failure was due to interruption, `false` otherwise. + * + * @since 2.0.0 + * @category getters + */ +export const isInterrupted = core.exitIsInterrupted; +/** + * Maps the `Success` value of the specified exit to the provided constant + * value. + * + * @since 2.0.0 + * @category mapping + */ +export const as = core.exitAs; +/** + * Maps the `Success` value of the specified exit to a void. + * + * @since 2.0.0 + * @category mapping + */ +export const asVoid = core.exitAsVoid; +/** + * Returns a `Some>` if the specified exit is a `Failure`, `None` + * otherwise. + * + * @since 2.0.0 + * @category getters + */ +export const causeOption = core.exitCauseOption; +/** + * Collects all of the specified exit values into a `Some, E>>`. If + * the provided iterable contains no elements, `None` will be returned. + * + * @since 2.0.0 + * @category constructors + */ +export const all = core.exitCollectAll; +/** + * Constructs a new `Exit.Failure` from the specified unrecoverable defect. + * + * @since 2.0.0 + * @category constructors + */ +export const die = core.exitDie; +/** + * Executes the predicate on the value of the specified exit if it is a + * `Success`, otherwise returns `false`. + * + * @since 2.0.0 + * @category elements + */ +export const exists = core.exitExists; +/** + * Constructs a new `Exit.Failure` from the specified recoverable error of type + * `E`. + * + * @since 2.0.0 + * @category constructors + */ +export const fail = core.exitFail; +/** + * Constructs a new `Exit.Failure` from the specified `Cause` of type `E`. + * + * @since 2.0.0 + * @category constructors + */ +export const failCause = core.exitFailCause; +/** + * @since 2.0.0 + * @category sequencing + */ +export const flatMap = core.exitFlatMap; +/** + * @since 2.0.0 + * @category sequencing + */ +export const flatMapEffect = core.exitFlatMapEffect; +/** + * @since 2.0.0 + * @category sequencing + */ +export const flatten = core.exitFlatten; +/** + * @since 2.0.0 + * @category traversing + */ +export const forEachEffect = core.exitForEachEffect; +/** + * Converts an `Either` into an `Exit`. + * + * @since 2.0.0 + * @category conversions + */ +export const fromEither = core.exitFromEither; +/** + * Converts an `Option` into an `Exit`. + * + * @since 2.0.0 + * @category conversions + */ +export const fromOption = core.exitFromOption; +/** + * Returns the `A` if specified exit is a `Success`, otherwise returns the + * alternate `A` value computed from the specified function which receives the + * `Cause` of the exit `Failure`. + * + * @since 2.0.0 + * @category getters + */ +export const getOrElse = core.exitGetOrElse; +/** + * Constructs a new `Exit.Failure` from the specified `FiberId` indicating that + * the `Fiber` running an `Effect` workflow was terminated due to interruption. + * + * @since 2.0.0 + * @category constructors + */ +export const interrupt = core.exitInterrupt; +/** + * Maps over the `Success` value of the specified exit using the provided + * function. + * + * @since 2.0.0 + * @category mapping + */ +export const map = core.exitMap; +/** + * Maps over the `Success` and `Failure` cases of the specified exit using the + * provided functions. + * + * @since 2.0.0 + * @category mapping + */ +export const mapBoth = core.exitMapBoth; +/** + * Maps over the error contained in the `Failure` of the specified exit using + * the provided function. + * + * @since 2.0.0 + * @category mapping + */ +export const mapError = core.exitMapError; +/** + * Maps over the `Cause` contained in the `Failure` of the specified exit using + * the provided function. + * + * @since 2.0.0 + * @category mapping + */ +export const mapErrorCause = core.exitMapErrorCause; +/** + * @since 2.0.0 + * @category folding + */ +export const match = core.exitMatch; +/** + * @since 2.0.0 + * @category folding + */ +export const matchEffect = core.exitMatchEffect; +/** + * Constructs a new `Exit.Success` containing the specified value of type `A`. + * + * @since 2.0.0 + * @category constructors + */ +export const succeed = core.exitSucceed; +const void_ = core.exitVoid; +export { +/** + * Represents an `Exit` which succeeds with `undefined`. + * + * @since 2.0.0 + * @category constructors + */ +void_ as void }; +/** + * Sequentially zips the this result with the specified result or else returns + * the failed `Cause`. + * + * @since 2.0.0 + * @category zipping + */ +export const zip = core.exitZip; +/** + * Sequentially zips the this result with the specified result discarding the + * second element of the tuple or else returns the failed `Cause`. + * + * @since 2.0.0 + * @category zipping + */ +export const zipLeft = core.exitZipLeft; +/** + * Sequentially zips the this result with the specified result discarding the + * first element of the tuple or else returns the failed `Cause`. + * + * @since 2.0.0 + * @category zipping + */ +export const zipRight = core.exitZipRight; +/** + * Parallelly zips the this result with the specified result or else returns + * the failed `Cause`. + * + * @since 2.0.0 + * @category zipping + */ +export const zipPar = core.exitZipPar; +/** + * Parallelly zips the this result with the specified result discarding the + * second element of the tuple or else returns the failed `Cause`. + * + * @since 2.0.0 + * @category zipping + */ +export const zipParLeft = core.exitZipParLeft; +/** + * Parallelly zips the this result with the specified result discarding the + * first element of the tuple or else returns the failed `Cause`. + * + * @since 2.0.0 + * @category zipping + */ +export const zipParRight = core.exitZipParRight; +/** + * Zips this exit together with that exit using the specified combination + * functions. + * + * @since 2.0.0 + * @category zipping + */ +export const zipWith = core.exitZipWith; +//# sourceMappingURL=Exit.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/FastCheck.js.map b/backend/node_modules/effect/dist/esm/FastCheck.js.map new file mode 100644 index 0000000000000000000000000000000000000000..23bfc68f051447a330d5b5705b6c2ed4d1a1e156 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/FastCheck.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FastCheck.js","names":[],"sources":["../../src/FastCheck.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAIA;;;;AAIA,cAAc,YAAY","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/FiberHandle.js b/backend/node_modules/effect/dist/esm/FiberHandle.js new file mode 100644 index 0000000000000000000000000000000000000000..291b72cf14ba7c7215e402775bb9f5affbfb0e75 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/FiberHandle.js @@ -0,0 +1,316 @@ +import * as Cause from "./Cause.js"; +import * as Deferred from "./Deferred.js"; +import * as Effect from "./Effect.js"; +import * as Exit from "./Exit.js"; +import * as Fiber from "./Fiber.js"; +import * as FiberId from "./FiberId.js"; +import { constFalse, dual } from "./Function.js"; +import * as HashSet from "./HashSet.js"; +import * as Inspectable from "./Inspectable.js"; +import * as Option from "./Option.js"; +import { pipeArguments } from "./Pipeable.js"; +import * as Predicate from "./Predicate.js"; +import * as Runtime from "./Runtime.js"; +/** + * @since 2.0.0 + * @categories type ids + */ +export const TypeId = /*#__PURE__*/Symbol.for("effect/FiberHandle"); +/** + * @since 2.0.0 + * @categories refinements + */ +export const isFiberHandle = u => Predicate.hasProperty(u, TypeId); +const Proto = { + [TypeId]: TypeId, + toString() { + return Inspectable.format(this.toJSON()); + }, + toJSON() { + return { + _id: "FiberHandle", + state: this.state + }; + }, + [Inspectable.NodeInspectSymbol]() { + return this.toJSON(); + }, + pipe() { + return pipeArguments(this, arguments); + } +}; +const unsafeMake = deferred => { + const self = Object.create(Proto); + self.state = { + _tag: "Open", + fiber: undefined + }; + self.deferred = deferred; + return self; +}; +/** + * A FiberHandle can be used to store a single fiber. + * When the associated Scope is closed, the contained fiber will be interrupted. + * + * You can add a fiber to the handle using `FiberHandle.run`, and the fiber will + * be automatically removed from the FiberHandle when it completes. + * + * @example + * ```ts + * import { Effect, FiberHandle } from "effect" + * + * Effect.gen(function*() { + * const handle = yield* FiberHandle.make() + * + * // run some effects + * yield* FiberHandle.run(handle, Effect.never) + * // this will interrupt the previous fiber + * yield* FiberHandle.run(handle, Effect.never) + * + * yield* Effect.sleep(1000) + * }).pipe( + * Effect.scoped // The fiber will be interrupted when the scope is closed + * ) + * ``` + * + * @since 2.0.0 + * @categories constructors + */ +export const make = () => Effect.acquireRelease(Effect.map(Deferred.make(), deferred => unsafeMake(deferred)), handle => Effect.withFiberRuntime(parent => { + const state = handle.state; + if (state._tag === "Closed") return Effect.void; + handle.state = { + _tag: "Closed" + }; + return state.fiber ? Effect.intoDeferred(Effect.asVoid(Fiber.interruptAs(state.fiber, FiberId.combine(parent.id(), internalFiberId))), handle.deferred) : Deferred.done(handle.deferred, Exit.void); +})); +/** + * Create an Effect run function that is backed by a FiberHandle. + * + * @since 2.0.0 + * @categories constructors + */ +export const makeRuntime = () => Effect.flatMap(make(), self => runtime(self)()); +/** + * Create an Effect run function that is backed by a FiberHandle. + * + * @since 3.13.0 + * @categories constructors + */ +export const makeRuntimePromise = () => Effect.flatMap(make(), self => runtimePromise(self)()); +const internalFiberIdId = -1; +const internalFiberId = /*#__PURE__*/FiberId.make(internalFiberIdId, 0); +const isInternalInterruption = /*#__PURE__*/Cause.reduceWithContext(undefined, { + emptyCase: constFalse, + failCase: constFalse, + dieCase: constFalse, + interruptCase: (_, fiberId) => HashSet.has(FiberId.ids(fiberId), internalFiberIdId), + sequentialCase: (_, left, right) => left || right, + parallelCase: (_, left, right) => left || right +}); +/** + * Set the fiber in a FiberHandle. When the fiber completes, it will be removed from the FiberHandle. + * If a fiber is already running, it will be interrupted unless `options.onlyIfMissing` is set. + * + * @since 2.0.0 + * @categories combinators + */ +export const unsafeSet = /*#__PURE__*/dual(args => isFiberHandle(args[0]), (self, fiber, options) => { + if (self.state._tag === "Closed") { + fiber.unsafeInterruptAsFork(FiberId.combine(options?.interruptAs ?? FiberId.none, internalFiberId)); + return; + } else if (self.state.fiber !== undefined) { + if (options?.onlyIfMissing === true) { + fiber.unsafeInterruptAsFork(FiberId.combine(options?.interruptAs ?? FiberId.none, internalFiberId)); + return; + } else if (self.state.fiber === fiber) { + return; + } + self.state.fiber.unsafeInterruptAsFork(FiberId.combine(options?.interruptAs ?? FiberId.none, internalFiberId)); + self.state.fiber = undefined; + } + self.state.fiber = fiber; + fiber.addObserver(exit => { + if (self.state._tag === "Open" && fiber === self.state.fiber) { + self.state.fiber = undefined; + } + if (Exit.isFailure(exit) && (options?.propagateInterruption === true ? !isInternalInterruption(exit.cause) : !Cause.isInterruptedOnly(exit.cause))) { + Deferred.unsafeDone(self.deferred, exit); + } + }); +}); +/** + * Set the fiber in the FiberHandle. When the fiber completes, it will be removed from the FiberHandle. + * If a fiber already exists in the FiberHandle, it will be interrupted unless `options.onlyIfMissing` is set. + * + * @since 2.0.0 + * @categories combinators + */ +export const set = /*#__PURE__*/dual(args => isFiberHandle(args[0]), (self, fiber, options) => Effect.fiberIdWith(fiberId => Effect.sync(() => unsafeSet(self, fiber, { + interruptAs: fiberId, + onlyIfMissing: options?.onlyIfMissing, + propagateInterruption: options?.propagateInterruption +})))); +/** + * Retrieve the fiber from the FiberHandle. + * + * @since 2.0.0 + * @categories combinators + */ +export const unsafeGet = self => self.state._tag === "Closed" ? Option.none() : Option.fromNullable(self.state.fiber); +/** + * Retrieve the fiber from the FiberHandle. + * + * @since 2.0.0 + * @categories combinators + */ +export const get = self => Effect.suspend(() => unsafeGet(self)); +/** + * @since 2.0.0 + * @categories combinators + */ +export const clear = self => Effect.uninterruptibleMask(restore => Effect.withFiberRuntime(fiber => { + if (self.state._tag === "Closed" || self.state.fiber === undefined) { + return Effect.void; + } + return Effect.zipRight(restore(Fiber.interruptAs(self.state.fiber, FiberId.combine(fiber.id(), internalFiberId))), Effect.sync(() => { + if (self.state._tag === "Open") { + self.state.fiber = undefined; + } + })); +})); +const constInterruptedFiber = /*#__PURE__*/function () { + let fiber = undefined; + return () => { + if (fiber === undefined) { + fiber = Effect.runFork(Effect.interrupt); + } + return fiber; + }; +}(); +/** + * Run an Effect and add the forked fiber to the FiberHandle. + * When the fiber completes, it will be removed from the FiberHandle. + * + * @since 2.0.0 + * @categories combinators + */ +export const run = function () { + const self = arguments[0]; + if (Effect.isEffect(arguments[1])) { + return runImpl(self, arguments[1], arguments[2]); + } + const options = arguments[1]; + return effect => runImpl(self, effect, options); +}; +const runImpl = (self, effect, options) => Effect.withFiberRuntime(parent => { + if (self.state._tag === "Closed") { + return Effect.interrupt; + } else if (self.state.fiber !== undefined && options?.onlyIfMissing === true) { + return Effect.sync(constInterruptedFiber); + } + const runtime = Runtime.make({ + context: parent.currentContext, + fiberRefs: parent.getFiberRefs(), + runtimeFlags: Runtime.defaultRuntime.runtimeFlags + }); + const fiber = Runtime.runFork(runtime)(effect); + unsafeSet(self, fiber, { + ...options, + interruptAs: parent.id() + }); + return Effect.succeed(fiber); +}); +/** + * Capture a Runtime and use it to fork Effect's, adding the forked fibers to the FiberHandle. + * + * @example + * ```ts + * import { Context, Effect, FiberHandle } from "effect" + * + * interface Users { + * readonly _: unique symbol + * } + * const Users = Context.GenericTag> + * }>("Users") + * + * Effect.gen(function*() { + * const handle = yield* FiberHandle.make() + * const run = yield* FiberHandle.runtime(handle)() + * + * // run an effect and set the fiber in the handle + * run(Effect.andThen(Users, _ => _.getAll)) + * + * // this will interrupt the previous fiber + * run(Effect.andThen(Users, _ => _.getAll)) + * }).pipe( + * Effect.scoped // The fiber will be interrupted when the scope is closed + * ) + * ``` + * + * @since 2.0.0 + * @categories combinators + */ +export const runtime = self => () => Effect.map(Effect.runtime(), runtime => { + const runFork = Runtime.runFork(runtime); + return (effect, options) => { + if (self.state._tag === "Closed") { + return constInterruptedFiber(); + } else if (self.state.fiber !== undefined && options?.onlyIfMissing === true) { + return constInterruptedFiber(); + } + const fiber = runFork(effect, options); + unsafeSet(self, fiber, options); + return fiber; + }; +}); +/** + * Capture a Runtime and use it to fork Effect's, adding the forked fibers to the FiberHandle. + * + * The returned run function will return Promise's that will resolve when the + * fiber completes. + * + * @since 3.13.0 + * @categories combinators + */ +export const runtimePromise = self => () => Effect.map(runtime(self)(), runFork => (effect, options) => new Promise((resolve, reject) => runFork(effect, options).addObserver(exit => { + if (Exit.isSuccess(exit)) { + resolve(exit.value); + } else { + reject(Cause.squash(exit.cause)); + } +}))); +/** + * If any of the Fiber's in the handle terminate with a failure, + * the returned Effect will terminate with the first failure that occurred. + * + * @since 2.0.0 + * @categories combinators + * @example + * ```ts + * import { Effect, FiberHandle } from "effect"; + * + * Effect.gen(function* (_) { + * const handle = yield* _(FiberHandle.make()); + * yield* _(FiberHandle.set(handle, Effect.runFork(Effect.fail("error")))); + * + * // parent fiber will fail with "error" + * yield* _(FiberHandle.join(handle)); + * }); + * ``` + */ +export const join = self => Deferred.await(self.deferred); +/** + * Wait for the fiber in the FiberHandle to complete. + * + * @since 3.13.0 + * @categories combinators + */ +export const awaitEmpty = self => Effect.suspend(() => { + if (self.state._tag === "Closed" || self.state.fiber === undefined) { + return Effect.void; + } + return Fiber.await(self.state.fiber); +}); +//# sourceMappingURL=FiberHandle.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/FiberId.js b/backend/node_modules/effect/dist/esm/FiberId.js new file mode 100644 index 0000000000000000000000000000000000000000..2b8c2cfc9fc033dc0be577eb7fb9b9cf1354f35d --- /dev/null +++ b/backend/node_modules/effect/dist/esm/FiberId.js @@ -0,0 +1,115 @@ +import * as internal from "./internal/fiberId.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const FiberIdTypeId = internal.FiberIdTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +export const none = internal.none; +/** + * @since 2.0.0 + * @category constructors + */ +export const runtime = internal.runtime; +/** + * @since 2.0.0 + * @category constructors + */ +export const composite = internal.composite; +/** + * Returns `true` if the specified unknown value is a `FiberId`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isFiberId = internal.isFiberId; +/** + * Returns `true` if the `FiberId` is a `None`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isNone = internal.isNone; +/** + * Returns `true` if the `FiberId` is a `Runtime`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isRuntime = internal.isRuntime; +/** + * Returns `true` if the `FiberId` is a `Composite`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isComposite = internal.isComposite; +/** + * Combine two `FiberId`s. + * + * @since 2.0.0 + * @category constructors + */ +export const combine = internal.combine; +/** + * Combines a set of `FiberId`s into a single `FiberId`. + * + * @since 2.0.0 + * @category constructors + */ +export const combineAll = internal.combineAll; +/** + * Returns this `FiberId` if it is not `None`, otherwise returns that `FiberId`. + * + * @since 2.0.0 + * @category utils + */ +export const getOrElse = internal.getOrElse; +/** + * Get the set of identifiers for this `FiberId`. + * + * @since 2.0.0 + * @category destructors + */ +export const ids = internal.ids; +/** + * Creates a new `FiberId`. + * + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * Creates a string representing the name of the current thread of execution + * represented by the specified `FiberId`. + * + * @since 2.0.0 + * @category destructors + */ +export const threadName = internal.threadName; +/** + * Convert a `FiberId` into an `Option`. + * + * @since 2.0.0 + * @category destructors + */ +export const toOption = internal.toOption; +/** + * Convert a `FiberId` into a `HashSet`. + * + * @since 2.0.0 + * @category destructors + */ +export const toSet = internal.toSet; +/** + * Unsafely creates a new `FiberId`. + * + * @since 2.0.0 + * @category unsafe + */ +export const unsafeMake = internal.unsafeMake; +//# sourceMappingURL=FiberId.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/FiberId.js.map b/backend/node_modules/effect/dist/esm/FiberId.js.map new file mode 100644 index 0000000000000000000000000000000000000000..6f67e5bf71730299bc216a7a992ba2cf3ae08939 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/FiberId.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FiberId.js","names":["internal","FiberIdTypeId","none","runtime","composite","isFiberId","isNone","isRuntime","isComposite","combine","combineAll","getOrElse","ids","make","threadName","toOption","toSet","unsafeMake"],"sources":["../../src/FiberId.ts"],"sourcesContent":[null],"mappings":"AAMA,OAAO,KAAKA,QAAQ,MAAM,uBAAuB;AAGjD;;;;AAIA,OAAO,MAAMC,aAAa,GAAkBD,QAAQ,CAACC,aAAa;AAqDlE;;;;AAIA,OAAO,MAAMC,IAAI,GAASF,QAAQ,CAACE,IAAI;AAEvC;;;;AAIA,OAAO,MAAMC,OAAO,GAAqDH,QAAQ,CAACG,OAAO;AAEzF;;;;AAIA,OAAO,MAAMC,SAAS,GAAiDJ,QAAQ,CAACI,SAAS;AAEzF;;;;;;;AAOA,OAAO,MAAMC,SAAS,GAAuCL,QAAQ,CAACK,SAAS;AAE/E;;;;;;AAMA,OAAO,MAAMC,MAAM,GAAoCN,QAAQ,CAACM,MAAM;AAEtE;;;;;;AAMA,OAAO,MAAMC,SAAS,GAAuCP,QAAQ,CAACO,SAAS;AAE/E;;;;;;AAMA,OAAO,MAAMC,WAAW,GAAyCR,QAAQ,CAACQ,WAAW;AAErF;;;;;;AAMA,OAAO,MAAMC,OAAO,GAehBT,QAAQ,CAACS,OAAO;AAEpB;;;;;;AAMA,OAAO,MAAMC,UAAU,GAAoDV,QAAQ,CAACU,UAAU;AAE9F;;;;;;AAMA,OAAO,MAAMC,SAAS,GAelBX,QAAQ,CAACW,SAAS;AAEtB;;;;;;AAMA,OAAO,MAAMC,GAAG,GAA+CZ,QAAQ,CAACY,GAAG;AAE3E;;;;;;AAMA,OAAO,MAAMC,IAAI,GAAsDb,QAAQ,CAACa,IAAI;AAEpF;;;;;;;AAOA,OAAO,MAAMC,UAAU,GAA8Bd,QAAQ,CAACc,UAAU;AAExE;;;;;;AAMA,OAAO,MAAMC,QAAQ,GAA8Cf,QAAQ,CAACe,QAAQ;AAEpF;;;;;;AAMA,OAAO,MAAMC,KAAK,GAAgDhB,QAAQ,CAACgB,KAAK;AAEhF;;;;;;AAMA,OAAO,MAAMC,UAAU,GAAyBjB,QAAQ,CAACiB,UAAU","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/FiberMap.js b/backend/node_modules/effect/dist/esm/FiberMap.js new file mode 100644 index 0000000000000000000000000000000000000000..f3fad95cff062609fb1d4fd76295e9aee6ba43f4 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/FiberMap.js @@ -0,0 +1,356 @@ +import * as Cause from "./Cause.js"; +import * as Deferred from "./Deferred.js"; +import * as Effect from "./Effect.js"; +import * as Exit from "./Exit.js"; +import * as Fiber from "./Fiber.js"; +import * as FiberId from "./FiberId.js"; +import { constFalse, constVoid, dual } from "./Function.js"; +import * as HashSet from "./HashSet.js"; +import * as Inspectable from "./Inspectable.js"; +import * as Iterable from "./Iterable.js"; +import * as MutableHashMap from "./MutableHashMap.js"; +import * as Option from "./Option.js"; +import { pipeArguments } from "./Pipeable.js"; +import * as Predicate from "./Predicate.js"; +import * as Runtime from "./Runtime.js"; +/** + * @since 2.0.0 + * @categories type ids + */ +export const TypeId = /*#__PURE__*/Symbol.for("effect/FiberMap"); +/** + * @since 2.0.0 + * @categories refinements + */ +export const isFiberMap = u => Predicate.hasProperty(u, TypeId); +const Proto = { + [TypeId]: TypeId, + [Symbol.iterator]() { + if (this.state._tag === "Closed") { + return Iterable.empty(); + } + return this.state.backing[Symbol.iterator](); + }, + toString() { + return Inspectable.format(this.toJSON()); + }, + toJSON() { + return { + _id: "FiberMap", + state: this.state + }; + }, + [Inspectable.NodeInspectSymbol]() { + return this.toJSON(); + }, + pipe() { + return pipeArguments(this, arguments); + } +}; +const unsafeMake = (backing, deferred) => { + const self = Object.create(Proto); + self.state = { + _tag: "Open", + backing + }; + self.deferred = deferred; + return self; +}; +/** + * A FiberMap can be used to store a collection of fibers, indexed by some key. + * When the associated Scope is closed, all fibers in the map will be interrupted. + * + * You can add fibers to the map using `FiberMap.set` or `FiberMap.run`, and the fibers will + * be automatically removed from the FiberMap when they complete. + * + * @example + * ```ts + * import { Effect, FiberMap } from "effect" + * + * Effect.gen(function*() { + * const map = yield* FiberMap.make() + * + * // run some effects and add the fibers to the map + * yield* FiberMap.run(map, "fiber a", Effect.never) + * yield* FiberMap.run(map, "fiber b", Effect.never) + * + * yield* Effect.sleep(1000) + * }).pipe( + * Effect.scoped // The fibers will be interrupted when the scope is closed + * ) + * ``` + * + * @since 2.0.0 + * @categories constructors + */ +export const make = () => Effect.acquireRelease(Effect.map(Deferred.make(), deferred => unsafeMake(MutableHashMap.empty(), deferred)), map => Effect.withFiberRuntime(parent => { + const state = map.state; + if (state._tag === "Closed") return Effect.void; + map.state = { + _tag: "Closed" + }; + return Fiber.interruptAllAs(Iterable.map(state.backing, ([, fiber]) => fiber), FiberId.combine(parent.id(), internalFiberId)).pipe(Effect.intoDeferred(map.deferred)); +})); +/** + * Create an Effect run function that is backed by a FiberMap. + * + * @since 2.0.0 + * @categories constructors + */ +export const makeRuntime = () => Effect.flatMap(make(), self => runtime(self)()); +/** + * Create an Effect run function that is backed by a FiberMap. + * + * @since 3.13.0 + * @categories constructors + */ +export const makeRuntimePromise = () => Effect.flatMap(make(), self => runtimePromise(self)()); +const internalFiberIdId = -1; +const internalFiberId = /*#__PURE__*/FiberId.make(internalFiberIdId, 0); +const isInternalInterruption = /*#__PURE__*/Cause.reduceWithContext(undefined, { + emptyCase: constFalse, + failCase: constFalse, + dieCase: constFalse, + interruptCase: (_, fiberId) => HashSet.has(FiberId.ids(fiberId), internalFiberIdId), + sequentialCase: (_, left, right) => left || right, + parallelCase: (_, left, right) => left || right +}); +/** + * Add a fiber to the FiberMap. When the fiber completes, it will be removed from the FiberMap. + * If the key already exists in the FiberMap, the previous fiber will be interrupted. + * + * @since 2.0.0 + * @categories combinators + */ +export const unsafeSet = /*#__PURE__*/dual(args => isFiberMap(args[0]), (self, key, fiber, options) => { + if (self.state._tag === "Closed") { + fiber.unsafeInterruptAsFork(FiberId.combine(options?.interruptAs ?? FiberId.none, internalFiberId)); + return; + } + const previous = MutableHashMap.get(self.state.backing, key); + if (previous._tag === "Some") { + if (options?.onlyIfMissing === true) { + fiber.unsafeInterruptAsFork(FiberId.combine(options?.interruptAs ?? FiberId.none, internalFiberId)); + return; + } else if (previous.value === fiber) { + return; + } + previous.value.unsafeInterruptAsFork(FiberId.combine(options?.interruptAs ?? FiberId.none, internalFiberId)); + } + MutableHashMap.set(self.state.backing, key, fiber); + fiber.addObserver(exit => { + if (self.state._tag === "Closed") { + return; + } + const current = MutableHashMap.get(self.state.backing, key); + if (Option.isSome(current) && fiber === current.value) { + MutableHashMap.remove(self.state.backing, key); + } + if (Exit.isFailure(exit) && (options?.propagateInterruption === true ? !isInternalInterruption(exit.cause) : !Cause.isInterruptedOnly(exit.cause))) { + Deferred.unsafeDone(self.deferred, exit); + } + }); +}); +/** + * Add a fiber to the FiberMap. When the fiber completes, it will be removed from the FiberMap. + * If the key already exists in the FiberMap, the previous fiber will be interrupted. + * + * @since 2.0.0 + * @categories combinators + */ +export const set = /*#__PURE__*/dual(args => isFiberMap(args[0]), (self, key, fiber, options) => Effect.fiberIdWith(fiberId => Effect.sync(() => unsafeSet(self, key, fiber, { + ...options, + interruptAs: fiberId +})))); +/** + * Retrieve a fiber from the FiberMap. + * + * @since 2.0.0 + * @categories combinators + */ +export const unsafeGet = /*#__PURE__*/dual(2, (self, key) => self.state._tag === "Closed" ? Option.none() : MutableHashMap.get(self.state.backing, key)); +/** + * Retrieve a fiber from the FiberMap. + * + * @since 2.0.0 + * @categories combinators + */ +export const get = /*#__PURE__*/dual(2, (self, key) => Effect.suspend(() => unsafeGet(self, key))); +/** + * Check if a key exists in the FiberMap. + * + * @since 2.0.0 + * @categories combinators + */ +export const unsafeHas = /*#__PURE__*/dual(2, (self, key) => self.state._tag === "Closed" ? false : MutableHashMap.has(self.state.backing, key)); +/** + * Check if a key exists in the FiberMap. + * + * @since 2.0.0 + * @categories combinators + */ +export const has = /*#__PURE__*/dual(2, (self, key) => Effect.sync(() => unsafeHas(self, key))); +/** + * Remove a fiber from the FiberMap, interrupting it if it exists. + * + * @since 2.0.0 + * @categories combinators + */ +export const remove = /*#__PURE__*/dual(2, (self, key) => Effect.withFiberRuntime(removeFiber => { + if (self.state._tag === "Closed") { + return Effect.void; + } + const fiber = MutableHashMap.get(self.state.backing, key); + if (fiber._tag === "None") { + return Effect.void; + } + // will be removed by the observer + return Fiber.interruptAs(fiber.value, FiberId.combine(removeFiber.id(), internalFiberId)); +})); +/** + * @since 2.0.0 + * @categories combinators + */ +export const clear = self => Effect.withFiberRuntime(clearFiber => { + if (self.state._tag === "Closed") { + return Effect.void; + } + return Effect.forEach(self.state.backing, ([, fiber]) => + // will be removed by the observer + Fiber.interruptAs(fiber, FiberId.combine(clearFiber.id(), internalFiberId))); +}); +const constInterruptedFiber = /*#__PURE__*/function () { + let fiber = undefined; + return () => { + if (fiber === undefined) { + fiber = Effect.runFork(Effect.interrupt); + } + return fiber; + }; +}(); +/** + * Run an Effect and add the forked fiber to the FiberMap. + * When the fiber completes, it will be removed from the FiberMap. + * + * @since 2.0.0 + * @categories combinators + */ +export const run = function () { + const self = arguments[0]; + if (Effect.isEffect(arguments[2])) { + return runImpl(self, arguments[1], arguments[2], arguments[3]); + } + const key = arguments[1]; + const options = arguments[2]; + return effect => runImpl(self, key, effect, options); +}; +const runImpl = (self, key, effect, options) => Effect.withFiberRuntime(parent => { + if (self.state._tag === "Closed") { + return Effect.interrupt; + } else if (options?.onlyIfMissing === true && unsafeHas(self, key)) { + return Effect.sync(constInterruptedFiber); + } + const runtime = Runtime.make({ + context: parent.currentContext, + fiberRefs: parent.getFiberRefs(), + runtimeFlags: Runtime.defaultRuntime.runtimeFlags + }); + const fiber = Runtime.runFork(runtime)(effect); + unsafeSet(self, key, fiber, { + ...options, + interruptAs: parent.id() + }); + return Effect.succeed(fiber); +}); +/** + * Capture a Runtime and use it to fork Effect's, adding the forked fibers to the FiberMap. + * + * @example + * ```ts + * import { Context, Effect, FiberMap } from "effect" + * + * interface Users { + * readonly _: unique symbol + * } + * const Users = Context.GenericTag> + * }>("Users") + * + * Effect.gen(function*() { + * const map = yield* FiberMap.make() + * const run = yield* FiberMap.runtime(map)() + * + * // run some effects and add the fibers to the map + * run("effect-a", Effect.andThen(Users, _ => _.getAll)) + * run("effect-b", Effect.andThen(Users, _ => _.getAll)) + * }).pipe( + * Effect.scoped // The fibers will be interrupted when the scope is closed + * ) + * ``` + * + * @since 2.0.0 + * @categories combinators + */ +export const runtime = self => () => Effect.map(Effect.runtime(), runtime => { + const runFork = Runtime.runFork(runtime); + return (key, effect, options) => { + if (self.state._tag === "Closed") { + return constInterruptedFiber(); + } else if (options?.onlyIfMissing === true && unsafeHas(self, key)) { + return constInterruptedFiber(); + } + const fiber = runFork(effect, options); + unsafeSet(self, key, fiber, options); + return fiber; + }; +}); +/** + * Capture a Runtime and use it to fork Effect's, adding the forked fibers to the FiberMap. + * + * @since 3.13.0 + * @categories combinators + */ +export const runtimePromise = self => () => Effect.map(runtime(self)(), runFork => (key, effect, options) => new Promise((resolve, reject) => runFork(key, effect, options).addObserver(exit => { + if (Exit.isSuccess(exit)) { + resolve(exit.value); + } else { + reject(Cause.squash(exit.cause)); + } +}))); +/** + * @since 2.0.0 + * @categories combinators + */ +export const size = self => Effect.sync(() => self.state._tag === "Closed" ? 0 : MutableHashMap.size(self.state.backing)); +/** + * Join all fibers in the FiberMap. If any of the Fiber's in the map terminate with a failure, + * the returned Effect will terminate with the first failure that occurred. + * + * @since 2.0.0 + * @categories combinators + * @example + * ```ts + * import { Effect, FiberMap } from "effect"; + * + * Effect.gen(function* (_) { + * const map = yield* _(FiberMap.make()); + * yield* _(FiberMap.set(map, "a", Effect.runFork(Effect.fail("error")))); + * + * // parent fiber will fail with "error" + * yield* _(FiberMap.join(map)); + * }); + * ``` + */ +export const join = self => Deferred.await(self.deferred); +/** + * Wait for the FiberMap to be empty. + * + * @since 3.13.0 + * @categories combinators + */ +export const awaitEmpty = self => Effect.whileLoop({ + while: () => self.state._tag === "Open" && MutableHashMap.size(self.state.backing) > 0, + body: () => Fiber.await(Iterable.unsafeHead(self)[1]), + step: constVoid +}); +//# sourceMappingURL=FiberMap.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/FiberRef.js b/backend/node_modules/effect/dist/esm/FiberRef.js new file mode 100644 index 0000000000000000000000000000000000000000..900ede850cb120094a288ac618f41ae9f8beb478 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/FiberRef.js @@ -0,0 +1,242 @@ +import * as core from "./internal/core.js"; +import * as fiberRuntime from "./internal/fiberRuntime.js"; +import * as query from "./internal/query.js"; +import * as Scheduler from "./Scheduler.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const FiberRefTypeId = core.FiberRefTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +export const make = fiberRuntime.fiberRefMake; +/** + * @since 2.0.0 + * @category constructors + */ +export const makeWith = fiberRuntime.fiberRefMakeWith; +/** + * @since 2.0.0 + * @category constructors + */ +export const makeContext = fiberRuntime.fiberRefMakeContext; +/** + * @since 2.0.0 + * @category constructors + */ +export const makeRuntimeFlags = fiberRuntime.fiberRefMakeRuntimeFlags; +/** + * @since 2.0.0 + * @category constructors + */ +export const unsafeMake = core.fiberRefUnsafeMake; +/** + * @since 2.0.0 + * @category constructors + */ +export const unsafeMakeHashSet = core.fiberRefUnsafeMakeHashSet; +/** + * @since 2.0.0 + * @category constructors + */ +export const unsafeMakeContext = core.fiberRefUnsafeMakeContext; +/** + * @since 2.0.0 + * @category constructors + */ +export const unsafeMakeSupervisor = fiberRuntime.fiberRefUnsafeMakeSupervisor; +/** + * @since 2.0.0 + * @category constructors + */ +export const unsafeMakePatch = core.fiberRefUnsafeMakePatch; +/** + * @since 2.0.0 + * @category getters + */ +export const get = core.fiberRefGet; +/** + * @since 2.0.0 + * @category utils + */ +export const getAndSet = core.fiberRefGetAndSet; +/** + * @since 2.0.0 + * @category utils + */ +export const getAndUpdate = core.fiberRefGetAndUpdate; +/** + * @since 2.0.0 + * @category utils + */ +export const getAndUpdateSome = core.fiberRefGetAndUpdateSome; +/** + * @since 2.0.0 + * @category utils + */ +export const getWith = core.fiberRefGetWith; +/** + * @since 2.0.0 + * @category utils + */ +export const set = core.fiberRefSet; +const _delete = core.fiberRefDelete; +export { +/** + * @since 2.0.0 + * @category utils + */ +_delete as delete }; +/** + * @since 2.0.0 + * @category utils + */ +export const reset = core.fiberRefReset; +/** + * @since 2.0.0 + * @category utils + */ +export const modify = core.fiberRefModify; +/** + * @since 2.0.0 + * @category utils + */ +export const modifySome = core.fiberRefModifySome; +/** + * @since 2.0.0 + * @category utils + */ +export const update = core.fiberRefUpdate; +/** + * @since 2.0.0 + * @category utils + */ +export const updateSome = core.fiberRefUpdateSome; +/** + * @since 2.0.0 + * @category utils + */ +export const updateAndGet = core.fiberRefUpdateAndGet; +/** + * @since 2.0.0 + * @category utils + */ +export const updateSomeAndGet = core.fiberRefUpdateSomeAndGet; +/** + * @since 2.0.0 + * @category fiberRefs + */ +export const currentConcurrency = core.currentConcurrency; +/** + * @since 2.0.0 + * @category fiberRefs + */ +export const currentRequestBatchingEnabled = core.currentRequestBatching; +/** + * @since 2.0.0 + * @category fiberRefs + */ +export const currentRequestCache = query.currentCache; +/** + * @since 2.0.0 + * @category fiberRefs + */ +export const currentRequestCacheEnabled = query.currentCacheEnabled; +/** + * @since 2.0.0 + * @category fiberRefs + */ +export const currentContext = core.currentContext; +/** + * @since 2.0.0 + * @category fiberRefs + */ +export const currentSchedulingPriority = core.currentSchedulingPriority; +/** + * @since 2.0.0 + * @category fiberRefs + */ +export const currentMaxOpsBeforeYield = core.currentMaxOpsBeforeYield; +/** + * @since 2.0.0 + * @category fiberRefs + */ +export const unhandledErrorLogLevel = core.currentUnhandledErrorLogLevel; +/** + * @since 3.17.0 + * @category fiberRefs + */ +export const versionMismatchErrorLogLevel = core.currentVersionMismatchErrorLogLevel; +/** + * @since 2.0.0 + * @category fiberRefs + */ +export const currentLogAnnotations = core.currentLogAnnotations; +/** + * @since 2.0.0 + * @category fiberRefs + */ +export const currentLoggers = fiberRuntime.currentLoggers; +/** + * @since 2.0.0 + * @category fiberRefs + */ +export const currentLogLevel = core.currentLogLevel; +/** + * @since 2.0.0 + * @category fiberRefs + */ +export const currentMinimumLogLevel = fiberRuntime.currentMinimumLogLevel; +/** + * @since 2.0.0 + * @category fiberRefs + */ +export const currentLogSpan = core.currentLogSpan; +/** + * @since 2.0.0 + * @category fiberRefs + */ +export const currentRuntimeFlags = fiberRuntime.currentRuntimeFlags; +/** + * @since 2.0.0 + * @category fiberRefs + */ +export const currentScheduler = Scheduler.currentScheduler; +/** + * @since 2.0.0 + * @category fiberRefs + */ +export const currentSupervisor = fiberRuntime.currentSupervisor; +/** + * @since 2.0.0 + * @category fiberRefs + */ +export const currentMetricLabels = core.currentMetricLabels; +/** + * @since 2.0.0 + * @category fiberRefs + */ +export const currentTracerEnabled = core.currentTracerEnabled; +/** + * @since 2.0.0 + * @category fiberRefs + */ +export const currentTracerTimingEnabled = core.currentTracerTimingEnabled; +/** + * @since 2.0.0 + * @category fiberRefs + */ +export const currentTracerSpanAnnotations = core.currentTracerSpanAnnotations; +/** + * @since 2.0.0 + * @category fiberRefs + */ +export const currentTracerSpanLinks = core.currentTracerSpanLinks; +/** + * @since 2.0.0 + * @category fiberRefs + */ +export const interruptedCause = core.currentInterruptedCause; +//# sourceMappingURL=FiberRef.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/FiberRef.js.map b/backend/node_modules/effect/dist/esm/FiberRef.js.map new file mode 100644 index 0000000000000000000000000000000000000000..9f92a54ce40d1f8fd9c0683c85ab1b5572ebd5d6 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/FiberRef.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FiberRef.js","names":["core","fiberRuntime","query","Scheduler","FiberRefTypeId","make","fiberRefMake","makeWith","fiberRefMakeWith","makeContext","fiberRefMakeContext","makeRuntimeFlags","fiberRefMakeRuntimeFlags","unsafeMake","fiberRefUnsafeMake","unsafeMakeHashSet","fiberRefUnsafeMakeHashSet","unsafeMakeContext","fiberRefUnsafeMakeContext","unsafeMakeSupervisor","fiberRefUnsafeMakeSupervisor","unsafeMakePatch","fiberRefUnsafeMakePatch","get","fiberRefGet","getAndSet","fiberRefGetAndSet","getAndUpdate","fiberRefGetAndUpdate","getAndUpdateSome","fiberRefGetAndUpdateSome","getWith","fiberRefGetWith","set","fiberRefSet","_delete","fiberRefDelete","delete","reset","fiberRefReset","modify","fiberRefModify","modifySome","fiberRefModifySome","update","fiberRefUpdate","updateSome","fiberRefUpdateSome","updateAndGet","fiberRefUpdateAndGet","updateSomeAndGet","fiberRefUpdateSomeAndGet","currentConcurrency","currentRequestBatchingEnabled","currentRequestBatching","currentRequestCache","currentCache","currentRequestCacheEnabled","currentCacheEnabled","currentContext","currentSchedulingPriority","currentMaxOpsBeforeYield","unhandledErrorLogLevel","currentUnhandledErrorLogLevel","versionMismatchErrorLogLevel","currentVersionMismatchErrorLogLevel","currentLogAnnotations","currentLoggers","currentLogLevel","currentMinimumLogLevel","currentLogSpan","currentRuntimeFlags","currentScheduler","currentSupervisor","currentMetricLabels","currentTracerEnabled","currentTracerTimingEnabled","currentTracerSpanAnnotations","currentTracerSpanLinks","interruptedCause","currentInterruptedCause"],"sources":["../../src/FiberRef.ts"],"sourcesContent":[null],"mappings":"AAWA,OAAO,KAAKA,IAAI,MAAM,oBAAoB;AAC1C,OAAO,KAAKC,YAAY,MAAM,4BAA4B;AAC1D,OAAO,KAAKC,KAAK,MAAM,qBAAqB;AAS5C,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAO3C;;;;AAIA,OAAO,MAAMC,cAAc,GAAkBJ,IAAI,CAACI,cAAc;AAwDhE;;;;AAIA,OAAO,MAAMC,IAAI,GAMqCJ,YAAY,CAAC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vF;;;;AAIA,OAAO,MAAMC,mBAAmB,GAAwCtE,YAAY,CAACsE,mBAAmB;AAExG;;;;AAIA,OAAO,MAAMC,gBAAgB,GAAkCrE,SAAS,CAACqE,gBAAgB;AAEzF;;;;AAIA,OAAO,MAAMC,iBAAiB,GAAyCxE,YAAY,CAACwE,iBAAiB;AAErG;;;;AAIA,OAAO,MAAMC,mBAAmB,GAAqD1E,IAAI,CAAC0E,mBAAmB;AAE7G;;;;AAIA,OAAO,MAAMC,oBAAoB,GAAsB3E,IAAI,CAAC2E,oBAAoB;AAEhF;;;;AAIA,OAAO,MAAMC,0BAA0B,GAAsB5E,IAAI,CAAC4E,0BAA0B;AAE5F;;;;AAIA,OAAO,MAAMC,4BAA4B,GACvC7E,IAAI,CAAC6E,4BAA4B;AAEnC;;;;AAIA,OAAO,MAAMC,sBAAsB,GAA2C9E,IAAI,CAAC8E,sBAAsB;AAEzG;;;;AAIA,OAAO,MAAMC,gBAAgB,GAAiC/E,IAAI,CAACgF,uBAAuB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/FiberRefsPatch.js.map b/backend/node_modules/effect/dist/esm/FiberRefsPatch.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f23749dc0be891cc6991c58c7b327305d480b3e7 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/FiberRefsPatch.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FiberRefsPatch.js","names":["internal","empty","diff","combine","patch"],"sources":["../../src/FiberRefsPatch.ts"],"sourcesContent":[null],"mappings":"AAMA,OAAO,KAAKA,QAAQ,MAAM,+BAA+B;AA4DzD;;;;AAIA,OAAO,MAAMC,KAAK,GAAmBD,QAAQ,CAACC,KAAK;AAEnD;;;;;;;AAOA,OAAO,MAAMC,IAAI,GAAqFF,QAAQ,CAACE,IAAI;AAEnH;;;;;;;;AAQA,OAAO,MAAMC,OAAO,GAmBhBH,QAAQ,CAACG,OAAO;AAEpB;;;;;;;AAOA,OAAO,MAAMC,KAAK,GAqBdJ,QAAQ,CAACI,KAAK","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/FiberSet.js b/backend/node_modules/effect/dist/esm/FiberSet.js new file mode 100644 index 0000000000000000000000000000000000000000..45ced9977ec19eb5476bf6cc9b2dd1ac423c0822 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/FiberSet.js @@ -0,0 +1,289 @@ +/** + * @since 2.0.0 + */ +import * as Cause from "./Cause.js"; +import * as Deferred from "./Deferred.js"; +import * as Effect from "./Effect.js"; +import * as Exit from "./Exit.js"; +import * as Fiber from "./Fiber.js"; +import * as FiberId from "./FiberId.js"; +import { constFalse, constVoid, dual } from "./Function.js"; +import * as HashSet from "./HashSet.js"; +import * as Inspectable from "./Inspectable.js"; +import * as Iterable from "./Iterable.js"; +import { pipeArguments } from "./Pipeable.js"; +import * as Predicate from "./Predicate.js"; +import * as Runtime from "./Runtime.js"; +/** + * @since 2.0.0 + * @categories type ids + */ +export const TypeId = /*#__PURE__*/Symbol.for("effect/FiberSet"); +/** + * @since 2.0.0 + * @categories refinements + */ +export const isFiberSet = u => Predicate.hasProperty(u, TypeId); +const Proto = { + [TypeId]: TypeId, + [Symbol.iterator]() { + if (this.state._tag === "Closed") { + return Iterable.empty(); + } + return this.state.backing[Symbol.iterator](); + }, + toString() { + return Inspectable.format(this.toJSON()); + }, + toJSON() { + return { + _id: "FiberMap", + state: this.state + }; + }, + [Inspectable.NodeInspectSymbol]() { + return this.toJSON(); + }, + pipe() { + return pipeArguments(this, arguments); + } +}; +const unsafeMake = (backing, deferred) => { + const self = Object.create(Proto); + self.state = { + _tag: "Open", + backing + }; + self.deferred = deferred; + return self; +}; +/** + * A FiberSet can be used to store a collection of fibers. + * When the associated Scope is closed, all fibers in the set will be interrupted. + * + * You can add fibers to the set using `FiberSet.add` or `FiberSet.run`, and the fibers will + * be automatically removed from the FiberSet when they complete. + * + * @example + * ```ts + * import { Effect, FiberSet } from "effect" + * + * Effect.gen(function*() { + * const set = yield* FiberSet.make() + * + * // run some effects and add the fibers to the set + * yield* FiberSet.run(set, Effect.never) + * yield* FiberSet.run(set, Effect.never) + * + * yield* Effect.sleep(1000) + * }).pipe( + * Effect.scoped // The fibers will be interrupted when the scope is closed + * ) + * ``` + * + * @since 2.0.0 + * @categories constructors + */ +export const make = () => Effect.acquireRelease(Effect.map(Deferred.make(), deferred => unsafeMake(new Set(), deferred)), set => Effect.withFiberRuntime(parent => { + const state = set.state; + if (state._tag === "Closed") return Effect.void; + set.state = { + _tag: "Closed" + }; + const fibers = state.backing; + return Fiber.interruptAllAs(fibers, FiberId.combine(parent.id(), internalFiberId)).pipe(Effect.intoDeferred(set.deferred)); +})); +/** + * Create an Effect run function that is backed by a FiberSet. + * + * @since 2.0.0 + * @categories constructors + */ +export const makeRuntime = () => Effect.flatMap(make(), self => runtime(self)()); +/** + * Create an Effect run function that is backed by a FiberSet. + * + * @since 3.13.0 + * @categories constructors + */ +export const makeRuntimePromise = () => Effect.flatMap(make(), self => runtimePromise(self)()); +const internalFiberIdId = -1; +const internalFiberId = /*#__PURE__*/FiberId.make(internalFiberIdId, 0); +const isInternalInterruption = /*#__PURE__*/Cause.reduceWithContext(undefined, { + emptyCase: constFalse, + failCase: constFalse, + dieCase: constFalse, + interruptCase: (_, fiberId) => HashSet.has(FiberId.ids(fiberId), internalFiberIdId), + sequentialCase: (_, left, right) => left || right, + parallelCase: (_, left, right) => left || right +}); +/** + * Add a fiber to the FiberSet. When the fiber completes, it will be removed. + * + * @since 2.0.0 + * @categories combinators + */ +export const unsafeAdd = /*#__PURE__*/dual(args => isFiberSet(args[0]), (self, fiber, options) => { + if (self.state._tag === "Closed") { + fiber.unsafeInterruptAsFork(FiberId.combine(options?.interruptAs ?? FiberId.none, internalFiberId)); + return; + } else if (self.state.backing.has(fiber)) { + return; + } + self.state.backing.add(fiber); + fiber.addObserver(exit => { + if (self.state._tag === "Closed") { + return; + } + self.state.backing.delete(fiber); + if (Exit.isFailure(exit) && (options?.propagateInterruption === true ? !isInternalInterruption(exit.cause) : !Cause.isInterruptedOnly(exit.cause))) { + Deferred.unsafeDone(self.deferred, exit); + } + }); +}); +/** + * Add a fiber to the FiberSet. When the fiber completes, it will be removed. + * + * @since 2.0.0 + * @categories combinators + */ +export const add = /*#__PURE__*/dual(args => isFiberSet(args[0]), (self, fiber, options) => Effect.fiberIdWith(fiberId => Effect.sync(() => unsafeAdd(self, fiber, { + ...options, + interruptAs: fiberId +})))); +/** + * @since 2.0.0 + * @categories combinators + */ +export const clear = self => Effect.withFiberRuntime(clearFiber => { + if (self.state._tag === "Closed") { + return Effect.void; + } + return Effect.forEach(self.state.backing, fiber => + // will be removed by the observer + Fiber.interruptAs(fiber, FiberId.combine(clearFiber.id(), internalFiberId))); +}); +const constInterruptedFiber = /*#__PURE__*/function () { + let fiber = undefined; + return () => { + if (fiber === undefined) { + fiber = Effect.runFork(Effect.interrupt); + } + return fiber; + }; +}(); +/** + * Fork an Effect and add the forked fiber to the FiberSet. + * When the fiber completes, it will be removed from the FiberSet. + * + * @since 2.0.0 + * @categories combinators + */ +export const run = function () { + const self = arguments[0]; + if (!Effect.isEffect(arguments[1])) { + const options = arguments[1]; + return effect => runImpl(self, effect, options); + } + return runImpl(self, arguments[1], arguments[2]); +}; +const runImpl = (self, effect, options) => Effect.fiberIdWith(fiberId => { + if (self.state._tag === "Closed") { + return Effect.sync(constInterruptedFiber); + } + return Effect.tap(Effect.forkDaemon(effect), fiber => unsafeAdd(self, fiber, { + ...options, + interruptAs: fiberId + })); +}); +/** + * Capture a Runtime and use it to fork Effect's, adding the forked fibers to the FiberSet. + * + * @example + * ```ts + * import { Context, Effect, FiberSet } from "effect" + * + * interface Users { + * readonly _: unique symbol + * } + * const Users = Context.GenericTag> + * }>("Users") + * + * Effect.gen(function*() { + * const set = yield* FiberSet.make() + * const run = yield* FiberSet.runtime(set)() + * + * // run some effects and add the fibers to the set + * run(Effect.andThen(Users, _ => _.getAll)) + * }).pipe( + * Effect.scoped // The fibers will be interrupted when the scope is closed + * ) + * ``` + * + * @since 2.0.0 + * @categories combinators + */ +export const runtime = self => () => Effect.map(Effect.runtime(), runtime => { + const runFork = Runtime.runFork(runtime); + return (effect, options) => { + if (self.state._tag === "Closed") { + return constInterruptedFiber(); + } + const fiber = runFork(effect, options); + unsafeAdd(self, fiber); + return fiber; + }; +}); +/** + * Capture a Runtime and use it to fork Effect's, adding the forked fibers to the FiberSet. + * + * The returned run function will return Promise's. + * + * @since 3.13.0 + * @categories combinators + */ +export const runtimePromise = self => () => Effect.map(runtime(self)(), runFork => (effect, options) => new Promise((resolve, reject) => runFork(effect, options).addObserver(exit => { + if (Exit.isSuccess(exit)) { + resolve(exit.value); + } else { + reject(Cause.squash(exit.cause)); + } +}))); +/** + * @since 2.0.0 + * @categories combinators + */ +export const size = self => Effect.sync(() => self.state._tag === "Closed" ? 0 : self.state.backing.size); +/** + * Join all fibers in the FiberSet. If any of the Fiber's in the set terminate with a failure, + * the returned Effect will terminate with the first failure that occurred. + * + * @since 2.0.0 + * @categories combinators + * @example + * ```ts + * import { Effect, FiberSet } from "effect"; + * + * Effect.gen(function* (_) { + * const set = yield* _(FiberSet.make()); + * yield* _(FiberSet.add(set, Effect.runFork(Effect.fail("error")))); + * + * // parent fiber will fail with "error" + * yield* _(FiberSet.join(set)); + * }); + * ``` + */ +export const join = self => Deferred.await(self.deferred); +/** + * Wait until the fiber set is empty. + * + * @since 3.13.0 + * @categories combinators + */ +export const awaitEmpty = self => Effect.whileLoop({ + while: () => self.state._tag === "Open" && self.state.backing.size > 0, + body: () => Fiber.await(Iterable.unsafeHead(self)), + step: constVoid +}); +//# sourceMappingURL=FiberSet.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/FiberSet.js.map b/backend/node_modules/effect/dist/esm/FiberSet.js.map new file mode 100644 index 0000000000000000000000000000000000000000..4721d346510c9a4f5727151bc50cd7f85114cf54 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/FiberSet.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FiberSet.js","names":["Cause","Deferred","Effect","Exit","Fiber","FiberId","constFalse","constVoid","dual","HashSet","Inspectable","Iterable","pipeArguments","Predicate","Runtime","TypeId","Symbol","for","isFiberSet","u","hasProperty","Proto","iterator","state","_tag","empty","backing","toString","format","toJSON","_id","NodeInspectSymbol","pipe","arguments","unsafeMake","deferred","self","Object","create","make","acquireRelease","map","Set","set","withFiberRuntime","parent","void","fibers","interruptAllAs","combine","id","internalFiberId","intoDeferred","makeRuntime","flatMap","runtime","makeRuntimePromise","runtimePromise","internalFiberIdId","isInternalInterruption","reduceWithContext","undefined","emptyCase","failCase","dieCase","interruptCase","_","fiberId","has","ids","sequentialCase","left","right","parallelCase","unsafeAdd","args","fiber","options","unsafeInterruptAsFork","interruptAs","none","add","addObserver","exit","delete","isFailure","propagateInterruption","cause","isInterruptedOnly","unsafeDone","fiberIdWith","sync","clear","clearFiber","forEach","constInterruptedFiber","runFork","interrupt","run","isEffect","effect","runImpl","tap","forkDaemon","Promise","resolve","reject","isSuccess","value","squash","size","join","await","awaitEmpty","whileLoop","while","body","unsafeHead","step"],"sources":["../../src/FiberSet.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,SAASC,UAAU,EAAEC,SAAS,EAAEC,IAAI,QAAQ,eAAe;AAC3D,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAC/C,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,SAAwBC,aAAa,QAAQ,eAAe;AAC5D,OAAO,KAAKC,SAAS,MAAM,gBAAgB;A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AAU,GAAU7E,IAAoB,IACnDlC,MAAM,CAACgH,SAAS,CAAC;EACfC,KAAK,EAAEA,CAAA,KAAM/E,IAAI,CAACb,KAAK,CAACC,IAAI,KAAK,MAAM,IAAIY,IAAI,CAACb,KAAK,CAACG,OAAO,CAACoF,IAAI,GAAG,CAAC;EACtEM,IAAI,EAAEA,CAAA,KAAMhH,KAAK,CAAC4G,KAAK,CAACrG,QAAQ,CAAC0G,UAAU,CAACjF,IAAI,CAAC,CAAC;EAClDkF,IAAI,EAAE/G;CACP,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/FiberStatus.js.map b/backend/node_modules/effect/dist/esm/FiberStatus.js.map new file mode 100644 index 0000000000000000000000000000000000000000..faccd32547e3c59eae65efa757f70cbfad30769a --- /dev/null +++ b/backend/node_modules/effect/dist/esm/FiberStatus.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FiberStatus.js","names":["internal","FiberStatusTypeId","done","running","suspended","isFiberStatus","isDone","isRunning","isSuspended"],"sources":["../../src/FiberStatus.ts"],"sourcesContent":[null],"mappings":"AAKA,OAAO,KAAKA,QAAQ,MAAM,2BAA2B;AAGrD;;;;AAIA,OAAO,MAAMC,iBAAiB,GAAkBD,QAAQ,CAACC,iBAAiB;AA4C1E;;;;AAIA,OAAO,MAAMC,IAAI,GAAgBF,QAAQ,CAACE,IAAI;AAE9C;;;;AAIA,OAAO,MAAMC,OAAO,GAA6DH,QAAQ,CAACG,OAAO;AAEjG;;;;AAIA,OAAO,MAAMC,SAAS,GACpBJ,QAAQ,CAACI,SAAS;AAEpB;;;;;;AAMA,OAAO,MAAMC,aAAa,GAAqCL,QAAQ,CAACK,aAAa;AAErF;;;;;;AAMA,OAAO,MAAMC,MAAM,GAAwCN,QAAQ,CAACM,MAAM;AAE1E;;;;;;;AAOA,OAAO,MAAMC,SAAS,GAA2CP,QAAQ,CAACO,SAAS;AAEnF;;;;;;;AAOA,OAAO,MAAMC,WAAW,GAA6CR,QAAQ,CAACQ,WAAW","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/GlobalValue.js b/backend/node_modules/effect/dist/esm/GlobalValue.js new file mode 100644 index 0000000000000000000000000000000000000000..5c404fe53a3d2e7b689e1f174e8ac4e66812630d --- /dev/null +++ b/backend/node_modules/effect/dist/esm/GlobalValue.js @@ -0,0 +1,52 @@ +/** + * The `GlobalValue` module ensures that a single instance of a value is created globally, + * even when modules are imported multiple times (e.g., due to mixing CommonJS and ESM builds) + * or during hot-reloading in development environments like Next.js or Remix. + * + * It achieves this by using a versioned global store, identified by a unique `Symbol` tied to + * the current version of the `effect` library. The store holds values that are keyed by an identifier, + * allowing the reuse of previously computed instances across imports or reloads. + * + * This pattern is particularly useful in scenarios where frequent reloading can cause services or + * single-instance objects to be recreated unnecessarily, such as in development environments with hot-reloading. + * + * @since 2.0.0 + */ +const globalStoreId = `effect/GlobalValue`; +let globalStore; +/** + * Retrieves or computes a global value associated with the given `id`. If the value for this `id` + * has already been computed, it will be returned from the global store. If it does not exist yet, + * the provided `compute` function will be executed to compute the value, store it, and then return it. + * + * This ensures that even in cases where the module is imported multiple times (e.g., in mixed environments + * like CommonJS and ESM, or during hot-reloading in development), the value is computed only once and reused + * thereafter. + * + * @example + * ```ts + * import { globalValue } from "effect/GlobalValue" + * + * // This cache will persist as long as the module is running, + * // even if reloaded or imported elsewhere + * const myCache = globalValue( + * Symbol.for("myCache"), + * () => new WeakMap() + * ) + * ``` + * + * @since 2.0.0 + */ +export const globalValue = (id, compute) => { + if (!globalStore) { + // @ts-expect-error + globalThis[globalStoreId] ??= new Map(); + // @ts-expect-error + globalStore = globalThis[globalStoreId]; + } + if (!globalStore.has(id)) { + globalStore.set(id, compute()); + } + return globalStore.get(id); +}; +//# sourceMappingURL=GlobalValue.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Graph.js b/backend/node_modules/effect/dist/esm/Graph.js new file mode 100644 index 0000000000000000000000000000000000000000..fea18866cf7de8ece219445da98a34b6315dca75 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Graph.js @@ -0,0 +1,3019 @@ +/** + * @experimental + * @since 3.18.0 + */ +import * as Data from "./Data.js"; +import * as Equal from "./Equal.js"; +import { dual } from "./Function.js"; +import * as Hash from "./Hash.js"; +import { format, NodeInspectSymbol } from "./Inspectable.js"; +import * as Option from "./Option.js"; +import { pipeArguments } from "./Pipeable.js"; +/** + * Unique identifier for Graph instances. + * + * @since 3.18.0 + * @category symbol + */ +export const TypeId = "~effect/Graph"; +/** + * Edge data containing source, target, and user data. + * + * @since 3.18.0 + * @category models + */ +export class Edge extends Data.Class {} +// ============================================================================= +// Proto Objects +// ============================================================================= +/** @internal */ +const ProtoGraph = { + [TypeId]: TypeId, + [Symbol.iterator]() { + return this.nodes[Symbol.iterator](); + }, + [NodeInspectSymbol]() { + return this.toJSON(); + }, + [Equal.symbol](that) { + if (isGraph(that)) { + if (this.nodes.size !== that.nodes.size || this.edges.size !== that.edges.size || this.type !== that.type) { + return false; + } + // Compare nodes + for (const [nodeIndex, nodeData] of this.nodes) { + if (!that.nodes.has(nodeIndex)) { + return false; + } + const otherNodeData = that.nodes.get(nodeIndex); + if (!Equal.equals(nodeData, otherNodeData)) { + return false; + } + } + // Compare edges + for (const [edgeIndex, edgeData] of this.edges) { + if (!that.edges.has(edgeIndex)) { + return false; + } + const otherEdge = that.edges.get(edgeIndex); + if (!Equal.equals(edgeData, otherEdge)) { + return false; + } + } + return true; + } + return false; + }, + [Hash.symbol]() { + let hash = Hash.string("Graph"); + hash = hash ^ Hash.string(this.type); + hash = hash ^ Hash.number(this.nodes.size); + hash = hash ^ Hash.number(this.edges.size); + for (const [nodeIndex, nodeData] of this.nodes) { + hash = hash ^ Hash.hash(nodeIndex) + Hash.hash(nodeData); + } + for (const [edgeIndex, edgeData] of this.edges) { + hash = hash ^ Hash.hash(edgeIndex) + Hash.hash(edgeData); + } + return hash; + }, + toJSON() { + return { + _id: "Graph", + nodeCount: this.nodes.size, + edgeCount: this.edges.size, + type: this.type + }; + }, + toString() { + return format(this); + }, + pipe() { + return pipeArguments(this, arguments); + } +}; +// ============================================================================= +// Errors +// ============================================================================= +/** + * Error thrown when a graph operation fails. + * + * @since 3.18.0 + * @category errors + */ +export class GraphError extends /*#__PURE__*/Data.TaggedError("GraphError") {} +/** @internal */ +const missingNode = node => new GraphError({ + message: `Node ${node} does not exist` +}); +// ============================================================================= +// Constructors +// ============================================================================= +/** @internal */ +export const isGraph = u => typeof u === "object" && u !== null && TypeId in u; +/** + * Creates a directed graph, optionally with initial mutations. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * // Directed graph with initial nodes and edges + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, "A->B") + * Graph.addEdge(mutable, b, c, "B->C") + * }) + * ``` + * + * @since 3.18.0 + * @category constructors + */ +export const directed = mutate => { + const graph = Object.create(ProtoGraph); + graph.type = "directed"; + graph.nodes = new Map(); + graph.edges = new Map(); + graph.adjacency = new Map(); + graph.reverseAdjacency = new Map(); + graph.nextNodeIndex = 0; + graph.nextEdgeIndex = 0; + graph.isAcyclic = Option.some(true); + graph.mutable = false; + if (mutate) { + const mutable = beginMutation(graph); + mutate(mutable); + return endMutation(mutable); + } + return graph; +}; +/** + * Creates an undirected graph, optionally with initial mutations. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * // Undirected graph with initial nodes and edges + * const graph = Graph.undirected((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, "A-B") + * Graph.addEdge(mutable, b, c, "B-C") + * }) + * ``` + * + * @since 3.18.0 + * @category constructors + */ +export const undirected = mutate => { + const graph = Object.create(ProtoGraph); + graph.type = "undirected"; + graph.nodes = new Map(); + graph.edges = new Map(); + graph.adjacency = new Map(); + graph.reverseAdjacency = new Map(); + graph.nextNodeIndex = 0; + graph.nextEdgeIndex = 0; + graph.isAcyclic = Option.some(true); + graph.mutable = false; + if (mutate) { + const mutable = beginMutation(graph); + mutate(mutable); + return endMutation(mutable); + } + return graph; +}; +// ============================================================================= +// Scoped Mutable API +// ============================================================================= +/** + * Creates a mutable scope for safe graph mutations by copying the data structure. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed() + * const mutable = Graph.beginMutation(graph) + * // Now mutable can be safely modified without affecting original graph + * ``` + * + * @since 3.18.0 + * @category mutations + */ +export const beginMutation = graph => { + // Copy adjacency maps with deep cloned arrays + const adjacency = new Map(); + const reverseAdjacency = new Map(); + for (const [nodeIndex, edges] of graph.adjacency) { + adjacency.set(nodeIndex, [...edges]); + } + for (const [nodeIndex, edges] of graph.reverseAdjacency) { + reverseAdjacency.set(nodeIndex, [...edges]); + } + const mutable = Object.create(ProtoGraph); + mutable.type = graph.type; + mutable.nodes = new Map(graph.nodes); + mutable.edges = new Map(graph.edges); + mutable.adjacency = adjacency; + mutable.reverseAdjacency = reverseAdjacency; + mutable.nextNodeIndex = graph.nextNodeIndex; + mutable.nextEdgeIndex = graph.nextEdgeIndex; + mutable.isAcyclic = graph.isAcyclic; + mutable.mutable = true; + return mutable; +}; +/** + * Converts a mutable graph back to an immutable graph, ending the mutation scope. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed() + * const mutable = Graph.beginMutation(graph) + * // ... perform mutations on mutable ... + * const newGraph = Graph.endMutation(mutable) + * ``` + * + * @since 3.18.0 + * @category mutations + */ +export const endMutation = mutable => { + const graph = Object.create(ProtoGraph); + graph.type = mutable.type; + graph.nodes = new Map(mutable.nodes); + graph.edges = new Map(mutable.edges); + graph.adjacency = mutable.adjacency; + graph.reverseAdjacency = mutable.reverseAdjacency; + graph.nextNodeIndex = mutable.nextNodeIndex; + graph.nextEdgeIndex = mutable.nextEdgeIndex; + graph.isAcyclic = mutable.isAcyclic; + graph.mutable = false; + return graph; +}; +/** + * Performs scoped mutations on a graph, automatically managing the mutation lifecycle. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed() + * const newGraph = Graph.mutate(graph, (mutable) => { + * // Safe mutations go here + * // mutable gets automatically converted back to immutable + * }) + * ``` + * + * @since 3.18.0 + * @category mutations + */ +export const mutate = /*#__PURE__*/dual(2, (graph, f) => { + const mutable = beginMutation(graph); + f(mutable); + return endMutation(mutable); +}); +// ============================================================================= +// Basic Node Operations +// ============================================================================= +/** + * Adds a new node to a mutable graph and returns its index. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const result = Graph.mutate(Graph.directed(), (mutable) => { + * const nodeA = Graph.addNode(mutable, "Node A") + * const nodeB = Graph.addNode(mutable, "Node B") + * console.log(nodeA) // NodeIndex with value 0 + * console.log(nodeB) // NodeIndex with value 1 + * }) + * ``` + * + * @since 3.18.0 + * @category mutations + */ +export const addNode = (mutable, data) => { + const nodeIndex = mutable.nextNodeIndex; + // Add node data + mutable.nodes.set(nodeIndex, data); + // Initialize empty adjacency lists + mutable.adjacency.set(nodeIndex, []); + mutable.reverseAdjacency.set(nodeIndex, []); + // Update graph allocators + mutable.nextNodeIndex = mutable.nextNodeIndex + 1; + return nodeIndex; +}; +/** + * Gets the data associated with a node index, if it exists. + * + * @example + * ```ts + * import { Graph, Option } from "effect" + * + * const graph = Graph.mutate(Graph.directed(), (mutable) => { + * Graph.addNode(mutable, "Node A") + * }) + * + * const nodeIndex = 0 + * const nodeData = Graph.getNode(graph, nodeIndex) + * + * if (Option.isSome(nodeData)) { + * console.log(nodeData.value) // "Node A" + * } + * ``` + * + * @since 3.18.0 + * @category getters + */ +export const getNode = (graph, nodeIndex) => graph.nodes.has(nodeIndex) ? Option.some(graph.nodes.get(nodeIndex)) : Option.none(); +/** + * Checks if a node with the given index exists in the graph. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.mutate(Graph.directed(), (mutable) => { + * Graph.addNode(mutable, "Node A") + * }) + * + * const nodeIndex = 0 + * const exists = Graph.hasNode(graph, nodeIndex) + * console.log(exists) // true + * + * const nonExistentIndex = 999 + * const notExists = Graph.hasNode(graph, nonExistentIndex) + * console.log(notExists) // false + * ``` + * + * @since 3.18.0 + * @category getters + */ +export const hasNode = (graph, nodeIndex) => graph.nodes.has(nodeIndex); +/** + * Returns the number of nodes in the graph. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const emptyGraph = Graph.directed() + * console.log(Graph.nodeCount(emptyGraph)) // 0 + * + * const graphWithNodes = Graph.mutate(emptyGraph, (mutable) => { + * Graph.addNode(mutable, "Node A") + * Graph.addNode(mutable, "Node B") + * Graph.addNode(mutable, "Node C") + * }) + * + * console.log(Graph.nodeCount(graphWithNodes)) // 3 + * ``` + * + * @since 3.18.0 + * @category getters + */ +export const nodeCount = graph => graph.nodes.size; +/** + * Finds the first node that matches the given predicate. + * + * @example + * ```ts + * import { Graph, Option } from "effect" + * + * const graph = Graph.mutate(Graph.directed(), (mutable) => { + * Graph.addNode(mutable, "Node A") + * Graph.addNode(mutable, "Node B") + * Graph.addNode(mutable, "Node C") + * }) + * + * const result = Graph.findNode(graph, (data) => data.startsWith("Node B")) + * console.log(result) // Option.some(1) + * + * const notFound = Graph.findNode(graph, (data) => data === "Node D") + * console.log(notFound) // Option.none() + * ``` + * + * @since 3.18.0 + * @category getters + */ +export const findNode = (graph, predicate) => { + for (const [index, data] of graph.nodes) { + if (predicate(data)) { + return Option.some(index); + } + } + return Option.none(); +}; +/** + * Finds all nodes that match the given predicate. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.mutate(Graph.directed(), (mutable) => { + * Graph.addNode(mutable, "Start A") + * Graph.addNode(mutable, "Node B") + * Graph.addNode(mutable, "Start C") + * }) + * + * const result = Graph.findNodes(graph, (data) => data.startsWith("Start")) + * console.log(result) // [0, 2] + * + * const empty = Graph.findNodes(graph, (data) => data === "Not Found") + * console.log(empty) // [] + * ``` + * + * @since 3.18.0 + * @category getters + */ +export const findNodes = (graph, predicate) => { + const results = []; + for (const [index, data] of graph.nodes) { + if (predicate(data)) { + results.push(index); + } + } + return results; +}; +/** + * Finds the first edge that matches the given predicate. + * + * @example + * ```ts + * import { Graph, Option } from "effect" + * + * const graph = Graph.mutate(Graph.directed(), (mutable) => { + * const nodeA = Graph.addNode(mutable, "Node A") + * const nodeB = Graph.addNode(mutable, "Node B") + * const nodeC = Graph.addNode(mutable, "Node C") + * Graph.addEdge(mutable, nodeA, nodeB, 10) + * Graph.addEdge(mutable, nodeB, nodeC, 20) + * }) + * + * const result = Graph.findEdge(graph, (data) => data > 15) + * console.log(result) // Option.some(1) + * + * const notFound = Graph.findEdge(graph, (data) => data > 100) + * console.log(notFound) // Option.none() + * ``` + * + * @since 3.18.0 + * @category getters + */ +export const findEdge = (graph, predicate) => { + for (const [edgeIndex, edgeData] of graph.edges) { + if (predicate(edgeData.data, edgeData.source, edgeData.target)) { + return Option.some(edgeIndex); + } + } + return Option.none(); +}; +/** + * Finds all edges that match the given predicate. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.mutate(Graph.directed(), (mutable) => { + * const nodeA = Graph.addNode(mutable, "Node A") + * const nodeB = Graph.addNode(mutable, "Node B") + * const nodeC = Graph.addNode(mutable, "Node C") + * Graph.addEdge(mutable, nodeA, nodeB, 10) + * Graph.addEdge(mutable, nodeB, nodeC, 20) + * Graph.addEdge(mutable, nodeC, nodeA, 30) + * }) + * + * const result = Graph.findEdges(graph, (data) => data >= 20) + * console.log(result) // [1, 2] + * + * const empty = Graph.findEdges(graph, (data) => data > 100) + * console.log(empty) // [] + * ``` + * + * @since 3.18.0 + * @category getters + */ +export const findEdges = (graph, predicate) => { + const results = []; + for (const [edgeIndex, edgeData] of graph.edges) { + if (predicate(edgeData.data, edgeData.source, edgeData.target)) { + results.push(edgeIndex); + } + } + return results; +}; +/** + * Updates a single node's data by applying a transformation function. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * Graph.addNode(mutable, "Node A") + * Graph.addNode(mutable, "Node B") + * Graph.updateNode(mutable, 0, (data) => data.toUpperCase()) + * }) + * + * const nodeData = Graph.getNode(graph, 0) + * console.log(nodeData) // Option.some("NODE A") + * ``` + * + * @since 3.18.0 + * @category transformations + */ +export const updateNode = (mutable, index, f) => { + if (!mutable.nodes.has(index)) { + return; + } + const currentData = mutable.nodes.get(index); + const newData = f(currentData); + mutable.nodes.set(index, newData); +}; +/** + * Updates a single edge's data by applying a transformation function. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const result = Graph.mutate(Graph.directed(), (mutable) => { + * const nodeA = Graph.addNode(mutable, "Node A") + * const nodeB = Graph.addNode(mutable, "Node B") + * const edgeIndex = Graph.addEdge(mutable, nodeA, nodeB, 10) + * Graph.updateEdge(mutable, edgeIndex, (data) => data * 2) + * }) + * + * const edgeData = Graph.getEdge(result, 0) + * console.log(edgeData) // Option.some({ source: 0, target: 1, data: 20 }) + * ``` + * + * @since 3.18.0 + * @category mutations + */ +export const updateEdge = (mutable, edgeIndex, f) => { + if (!mutable.edges.has(edgeIndex)) { + return; + } + const currentEdge = mutable.edges.get(edgeIndex); + const newData = f(currentEdge.data); + mutable.edges.set(edgeIndex, { + ...currentEdge, + data: newData + }); +}; +/** + * Creates a new graph with transformed node data using the provided mapping function. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * Graph.addNode(mutable, "node a") + * Graph.addNode(mutable, "node b") + * Graph.addNode(mutable, "node c") + * Graph.mapNodes(mutable, (data) => data.toUpperCase()) + * }) + * + * const nodeData = Graph.getNode(graph, 0) + * console.log(nodeData) // Option.some("NODE A") + * ``` + * + * @since 3.18.0 + * @category transformations + */ +export const mapNodes = (mutable, f) => { + // Transform existing node data in place + for (const [index, data] of mutable.nodes) { + const newData = f(data); + mutable.nodes.set(index, newData); + } +}; +/** + * Transforms all edge data in a mutable graph using the provided mapping function. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, 10) + * Graph.addEdge(mutable, b, c, 20) + * Graph.mapEdges(mutable, (data) => data * 2) + * }) + * + * const edgeData = Graph.getEdge(graph, 0) + * console.log(edgeData) // Option.some({ source: 0, target: 1, data: 20 }) + * ``` + * + * @since 3.18.0 + * @category transformations + */ +export const mapEdges = (mutable, f) => { + // Transform existing edge data in place + for (const [index, edgeData] of mutable.edges) { + const newData = f(edgeData.data); + mutable.edges.set(index, { + ...edgeData, + data: newData + }); + } +}; +/** + * Reverses all edge directions in a mutable graph by swapping source and target nodes. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, 1) // A -> B + * Graph.addEdge(mutable, b, c, 2) // B -> C + * Graph.reverse(mutable) // Now B -> A, C -> B + * }) + * + * const edge0 = Graph.getEdge(graph, 0) + * console.log(edge0) // Option.some({ source: 1, target: 0, data: 1 }) - B -> A + * ``` + * + * @since 3.18.0 + * @category transformations + */ +export const reverse = mutable => { + // Reverse all edges by swapping source and target + for (const [index, edgeData] of mutable.edges) { + mutable.edges.set(index, { + source: edgeData.target, + target: edgeData.source, + data: edgeData.data + }); + } + // Clear and rebuild adjacency lists with reversed directions + mutable.adjacency.clear(); + mutable.reverseAdjacency.clear(); + // Rebuild adjacency lists with reversed directions + for (const [edgeIndex, edgeData] of mutable.edges) { + // Add to forward adjacency (source -> target) + const sourceEdges = mutable.adjacency.get(edgeData.source) || []; + sourceEdges.push(edgeIndex); + mutable.adjacency.set(edgeData.source, sourceEdges); + // Add to reverse adjacency (target <- source) + const targetEdges = mutable.reverseAdjacency.get(edgeData.target) || []; + targetEdges.push(edgeIndex); + mutable.reverseAdjacency.set(edgeData.target, targetEdges); + } + // Invalidate cycle flag since edge directions changed + mutable.isAcyclic = Option.none(); +}; +/** + * Filters and optionally transforms nodes in a mutable graph using a predicate function. + * Nodes that return Option.none are removed along with all their connected edges. + * + * @example + * ```ts + * import { Graph, Option } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "active") + * const b = Graph.addNode(mutable, "inactive") + * const c = Graph.addNode(mutable, "active") + * Graph.addEdge(mutable, a, b, 1) + * Graph.addEdge(mutable, b, c, 2) + * + * // Keep only "active" nodes and transform to uppercase + * Graph.filterMapNodes(mutable, (data) => + * data === "active" ? Option.some(data.toUpperCase()) : Option.none() + * ) + * }) + * + * console.log(Graph.nodeCount(graph)) // 2 (only "active" nodes remain) + * ``` + * + * @since 3.18.0 + * @category transformations + */ +export const filterMapNodes = (mutable, f) => { + const nodesToRemove = []; + // First pass: identify nodes to remove and transform data for nodes to keep + for (const [index, data] of mutable.nodes) { + const result = f(data); + if (Option.isSome(result)) { + // Transform node data + mutable.nodes.set(index, result.value); + } else { + // Mark for removal + nodesToRemove.push(index); + } + } + // Second pass: remove filtered out nodes and their edges + for (const nodeIndex of nodesToRemove) { + removeNode(mutable, nodeIndex); + } +}; +/** + * Filters and optionally transforms edges in a mutable graph using a predicate function. + * Edges that return Option.none are removed from the graph. + * + * @example + * ```ts + * import { Graph, Option } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, 5) + * Graph.addEdge(mutable, b, c, 15) + * Graph.addEdge(mutable, c, a, 25) + * + * // Keep only edges with weight >= 10 and double their weight + * Graph.filterMapEdges(mutable, (data) => + * data >= 10 ? Option.some(data * 2) : Option.none() + * ) + * }) + * + * console.log(Graph.edgeCount(graph)) // 2 (edges with weight 5 removed) + * ``` + * + * @since 3.18.0 + * @category transformations + */ +export const filterMapEdges = (mutable, f) => { + const edgesToRemove = []; + // First pass: identify edges to remove and transform data for edges to keep + for (const [index, edgeData] of mutable.edges) { + const result = f(edgeData.data); + if (Option.isSome(result)) { + // Transform edge data + mutable.edges.set(index, { + ...edgeData, + data: result.value + }); + } else { + // Mark for removal + edgesToRemove.push(index); + } + } + // Second pass: remove filtered out edges + for (const edgeIndex of edgesToRemove) { + removeEdge(mutable, edgeIndex); + } +}; +/** + * Filters nodes by removing those that don't match the predicate. + * This function modifies the mutable graph in place. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * Graph.addNode(mutable, "active") + * Graph.addNode(mutable, "inactive") + * Graph.addNode(mutable, "pending") + * Graph.addNode(mutable, "active") + * + * // Keep only "active" nodes + * Graph.filterNodes(mutable, (data) => data === "active") + * }) + * + * console.log(Graph.nodeCount(graph)) // 2 (only "active" nodes remain) + * ``` + * + * @since 3.18.0 + * @category transformations + */ +export const filterNodes = (mutable, predicate) => { + const nodesToRemove = []; + // Identify nodes to remove + for (const [index, data] of mutable.nodes) { + if (!predicate(data)) { + nodesToRemove.push(index); + } + } + // Remove filtered out nodes (this also removes connected edges) + for (const nodeIndex of nodesToRemove) { + removeNode(mutable, nodeIndex); + } +}; +/** + * Filters edges by removing those that don't match the predicate. + * This function modifies the mutable graph in place. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * + * Graph.addEdge(mutable, a, b, 5) + * Graph.addEdge(mutable, b, c, 15) + * Graph.addEdge(mutable, c, a, 25) + * + * // Keep only edges with weight >= 10 + * Graph.filterEdges(mutable, (data) => data >= 10) + * }) + * + * console.log(Graph.edgeCount(graph)) // 2 (edge with weight 5 removed) + * ``` + * + * @since 3.18.0 + * @category transformations + */ +export const filterEdges = (mutable, predicate) => { + const edgesToRemove = []; + // Identify edges to remove + for (const [index, edgeData] of mutable.edges) { + if (!predicate(edgeData.data)) { + edgesToRemove.push(index); + } + } + // Remove filtered out edges + for (const edgeIndex of edgesToRemove) { + removeEdge(mutable, edgeIndex); + } +}; +// ============================================================================= +// Cycle Flag Management (Internal) +// ============================================================================= +/** @internal */ +const invalidateCycleFlagOnRemoval = mutable => { + // Only invalidate if the graph had cycles (removing edges/nodes cannot introduce cycles in acyclic graphs) + // If already unknown (null) or acyclic (true), no need to change + if (Option.isSome(mutable.isAcyclic) && mutable.isAcyclic.value === false) { + mutable.isAcyclic = Option.none(); + } +}; +/** @internal */ +const invalidateCycleFlagOnAddition = mutable => { + // Only invalidate if the graph was acyclic (adding edges cannot remove cycles from cyclic graphs) + // If already unknown (null) or cyclic (false), no need to change + if (Option.isSome(mutable.isAcyclic) && mutable.isAcyclic.value === true) { + mutable.isAcyclic = Option.none(); + } +}; +// ============================================================================= +// Edge Operations +// ============================================================================= +/** + * Adds a new edge to a mutable graph and returns its index. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const result = Graph.mutate(Graph.directed(), (mutable) => { + * const nodeA = Graph.addNode(mutable, "Node A") + * const nodeB = Graph.addNode(mutable, "Node B") + * const edge = Graph.addEdge(mutable, nodeA, nodeB, 42) + * console.log(edge) // EdgeIndex with value 0 + * }) + * ``` + * + * @since 3.18.0 + * @category mutations + */ +export const addEdge = (mutable, source, target, data) => { + // Validate that both nodes exist + if (!mutable.nodes.has(source)) { + throw missingNode(source); + } + if (!mutable.nodes.has(target)) { + throw missingNode(target); + } + const edgeIndex = mutable.nextEdgeIndex; + // Create edge data + const edgeData = new Edge({ + source, + target, + data + }); + mutable.edges.set(edgeIndex, edgeData); + // Update adjacency lists + const sourceAdjacency = mutable.adjacency.get(source); + if (sourceAdjacency !== undefined) { + sourceAdjacency.push(edgeIndex); + } + const targetReverseAdjacency = mutable.reverseAdjacency.get(target); + if (targetReverseAdjacency !== undefined) { + targetReverseAdjacency.push(edgeIndex); + } + // For undirected graphs, add reverse connections + if (mutable.type === "undirected") { + const targetAdjacency = mutable.adjacency.get(target); + if (targetAdjacency !== undefined) { + targetAdjacency.push(edgeIndex); + } + const sourceReverseAdjacency = mutable.reverseAdjacency.get(source); + if (sourceReverseAdjacency !== undefined) { + sourceReverseAdjacency.push(edgeIndex); + } + } + // Update allocators + mutable.nextEdgeIndex = mutable.nextEdgeIndex + 1; + // Only invalidate cycle flag if the graph was acyclic + // Adding edges cannot remove cycles from cyclic graphs + invalidateCycleFlagOnAddition(mutable); + return edgeIndex; +}; +/** + * Removes a node and all its incident edges from a mutable graph. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const result = Graph.mutate(Graph.directed(), (mutable) => { + * const nodeA = Graph.addNode(mutable, "Node A") + * const nodeB = Graph.addNode(mutable, "Node B") + * Graph.addEdge(mutable, nodeA, nodeB, 42) + * + * // Remove nodeA and all edges connected to it + * Graph.removeNode(mutable, nodeA) + * }) + * ``` + * + * @since 3.18.0 + * @category mutations + */ +export const removeNode = (mutable, nodeIndex) => { + // Check if node exists + if (!mutable.nodes.has(nodeIndex)) { + return; // Node doesn't exist, nothing to remove + } + // Collect all incident edges for removal + const edgesToRemove = []; + // Get outgoing edges + const outgoingEdges = mutable.adjacency.get(nodeIndex); + if (outgoingEdges !== undefined) { + for (const edge of outgoingEdges) { + edgesToRemove.push(edge); + } + } + // Get incoming edges + const incomingEdges = mutable.reverseAdjacency.get(nodeIndex); + if (incomingEdges !== undefined) { + for (const edge of incomingEdges) { + edgesToRemove.push(edge); + } + } + // Remove all incident edges + for (const edgeIndex of edgesToRemove) { + removeEdgeInternal(mutable, edgeIndex); + } + // Remove the node itself + mutable.nodes.delete(nodeIndex); + mutable.adjacency.delete(nodeIndex); + mutable.reverseAdjacency.delete(nodeIndex); + // Only invalidate cycle flag if the graph wasn't already known to be acyclic + // Removing nodes cannot introduce cycles in an acyclic graph + invalidateCycleFlagOnRemoval(mutable); +}; +/** + * Removes an edge from a mutable graph. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const result = Graph.mutate(Graph.directed(), (mutable) => { + * const nodeA = Graph.addNode(mutable, "Node A") + * const nodeB = Graph.addNode(mutable, "Node B") + * const edge = Graph.addEdge(mutable, nodeA, nodeB, 42) + * + * // Remove the edge + * Graph.removeEdge(mutable, edge) + * }) + * ``` + * + * @since 3.18.0 + * @category mutations + */ +export const removeEdge = (mutable, edgeIndex) => { + const wasRemoved = removeEdgeInternal(mutable, edgeIndex); + // Only invalidate cycle flag if an edge was actually removed + // and only if the graph wasn't already known to be acyclic + if (wasRemoved) { + invalidateCycleFlagOnRemoval(mutable); + } +}; +/** @internal */ +const removeEdgeInternal = (mutable, edgeIndex) => { + // Get edge data + const edge = mutable.edges.get(edgeIndex); + if (edge === undefined) { + return false; // Edge doesn't exist, no mutation occurred + } + const { + source, + target + } = edge; + // Remove from adjacency lists + const sourceAdjacency = mutable.adjacency.get(source); + if (sourceAdjacency !== undefined) { + const index = sourceAdjacency.indexOf(edgeIndex); + if (index !== -1) { + sourceAdjacency.splice(index, 1); + } + } + const targetReverseAdjacency = mutable.reverseAdjacency.get(target); + if (targetReverseAdjacency !== undefined) { + const index = targetReverseAdjacency.indexOf(edgeIndex); + if (index !== -1) { + targetReverseAdjacency.splice(index, 1); + } + } + // For undirected graphs, remove reverse connections + if (mutable.type === "undirected") { + const targetAdjacency = mutable.adjacency.get(target); + if (targetAdjacency !== undefined) { + const index = targetAdjacency.indexOf(edgeIndex); + if (index !== -1) { + targetAdjacency.splice(index, 1); + } + } + const sourceReverseAdjacency = mutable.reverseAdjacency.get(source); + if (sourceReverseAdjacency !== undefined) { + const index = sourceReverseAdjacency.indexOf(edgeIndex); + if (index !== -1) { + sourceReverseAdjacency.splice(index, 1); + } + } + } + // Remove edge data + mutable.edges.delete(edgeIndex); + return true; // Edge was successfully removed +}; +// ============================================================================= +// Edge Query Operations +// ============================================================================= +/** + * Gets the edge data associated with an edge index, if it exists. + * + * @example + * ```ts + * import { Graph, Option } from "effect" + * + * const graph = Graph.mutate(Graph.directed(), (mutable) => { + * const nodeA = Graph.addNode(mutable, "Node A") + * const nodeB = Graph.addNode(mutable, "Node B") + * Graph.addEdge(mutable, nodeA, nodeB, 42) + * }) + * + * const edgeIndex = 0 + * const edgeData = Graph.getEdge(graph, edgeIndex) + * + * if (Option.isSome(edgeData)) { + * console.log(edgeData.value.data) // 42 + * console.log(edgeData.value.source) // NodeIndex(0) + * console.log(edgeData.value.target) // NodeIndex(1) + * } + * ``` + * + * @since 3.18.0 + * @category getters + */ +export const getEdge = (graph, edgeIndex) => graph.edges.has(edgeIndex) ? Option.some(graph.edges.get(edgeIndex)) : Option.none(); +/** + * Checks if an edge exists between two nodes in the graph. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.mutate(Graph.directed(), (mutable) => { + * const nodeA = Graph.addNode(mutable, "Node A") + * const nodeB = Graph.addNode(mutable, "Node B") + * const nodeC = Graph.addNode(mutable, "Node C") + * Graph.addEdge(mutable, nodeA, nodeB, 42) + * }) + * + * const nodeA = 0 + * const nodeB = 1 + * const nodeC = 2 + * + * const hasAB = Graph.hasEdge(graph, nodeA, nodeB) + * console.log(hasAB) // true + * + * const hasAC = Graph.hasEdge(graph, nodeA, nodeC) + * console.log(hasAC) // false + * ``` + * + * @since 3.18.0 + * @category getters + */ +export const hasEdge = (graph, source, target) => { + const adjacencyList = graph.adjacency.get(source); + if (adjacencyList === undefined) { + return false; + } + // Check if any edge in the adjacency list connects to the target + for (const edgeIndex of adjacencyList) { + const edge = graph.edges.get(edgeIndex); + if (edge !== undefined && edge.target === target) { + return true; + } + } + return false; +}; +/** + * Returns the number of edges in the graph. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const emptyGraph = Graph.directed() + * console.log(Graph.edgeCount(emptyGraph)) // 0 + * + * const graphWithEdges = Graph.mutate(emptyGraph, (mutable) => { + * const nodeA = Graph.addNode(mutable, "Node A") + * const nodeB = Graph.addNode(mutable, "Node B") + * const nodeC = Graph.addNode(mutable, "Node C") + * Graph.addEdge(mutable, nodeA, nodeB, 1) + * Graph.addEdge(mutable, nodeB, nodeC, 2) + * Graph.addEdge(mutable, nodeC, nodeA, 3) + * }) + * + * console.log(Graph.edgeCount(graphWithEdges)) // 3 + * ``` + * + * @since 3.18.0 + * @category getters + */ +export const edgeCount = graph => graph.edges.size; +/** + * Returns the neighboring nodes (targets of outgoing edges) for a given node. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.mutate(Graph.directed(), (mutable) => { + * const nodeA = Graph.addNode(mutable, "Node A") + * const nodeB = Graph.addNode(mutable, "Node B") + * const nodeC = Graph.addNode(mutable, "Node C") + * Graph.addEdge(mutable, nodeA, nodeB, 1) + * Graph.addEdge(mutable, nodeA, nodeC, 2) + * }) + * + * const nodeA = 0 + * const nodeB = 1 + * const nodeC = 2 + * + * const neighborsA = Graph.neighbors(graph, nodeA) + * console.log(neighborsA) // [NodeIndex(1), NodeIndex(2)] + * + * const neighborsB = Graph.neighbors(graph, nodeB) + * console.log(neighborsB) // [] + * ``` + * + * @since 3.18.0 + * @category getters + */ +export const neighbors = (graph, nodeIndex) => { + // For undirected graphs, use the specialized helper that returns the other endpoint + if (graph.type === "undirected") { + return getUndirectedNeighbors(graph, nodeIndex); + } + const adjacencyList = graph.adjacency.get(nodeIndex); + if (adjacencyList === undefined) { + return []; + } + const result = []; + for (const edgeIndex of adjacencyList) { + const edge = graph.edges.get(edgeIndex); + if (edge !== undefined) { + result.push(edge.target); + } + } + return result; +}; +/** + * Get neighbors of a node in a specific direction for bidirectional traversal. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * Graph.addEdge(mutable, a, b, "A->B") + * }) + * + * const nodeA = 0 + * const nodeB = 1 + * + * // Get outgoing neighbors (nodes that nodeA points to) + * const outgoing = Graph.neighborsDirected(graph, nodeA, "outgoing") + * + * // Get incoming neighbors (nodes that point to nodeB) + * const incoming = Graph.neighborsDirected(graph, nodeB, "incoming") + * ``` + * + * @since 3.18.0 + * @category queries + */ +export const neighborsDirected = (graph, nodeIndex, direction) => { + const adjacencyMap = direction === "incoming" ? graph.reverseAdjacency : graph.adjacency; + const adjacencyList = adjacencyMap.get(nodeIndex); + if (adjacencyList === undefined) { + return []; + } + const result = []; + for (const edgeIndex of adjacencyList) { + const edge = graph.edges.get(edgeIndex); + if (edge !== undefined) { + // For incoming direction, we want the source node instead of target + const neighborNode = direction === "incoming" ? edge.source : edge.target; + result.push(neighborNode); + } + } + return result; +}; +/** + * Exports a graph to GraphViz DOT format for visualization. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.mutate(Graph.directed(), (mutable) => { + * const nodeA = Graph.addNode(mutable, "Node A") + * const nodeB = Graph.addNode(mutable, "Node B") + * const nodeC = Graph.addNode(mutable, "Node C") + * Graph.addEdge(mutable, nodeA, nodeB, 1) + * Graph.addEdge(mutable, nodeB, nodeC, 2) + * Graph.addEdge(mutable, nodeC, nodeA, 3) + * }) + * + * const dot = Graph.toGraphViz(graph) + * console.log(dot) + * // digraph G { + * // "0" [label="Node A"]; + * // "1" [label="Node B"]; + * // "2" [label="Node C"]; + * // "0" -> "1" [label="1"]; + * // "1" -> "2" [label="2"]; + * // "2" -> "0" [label="3"]; + * // } + * ``` + * + * @since 3.18.0 + * @category utils + */ +export const toGraphViz = (graph, options) => { + const { + edgeLabel = data => String(data), + graphName = "G", + nodeLabel = data => String(data) + } = options ?? {}; + const isDirected = graph.type === "directed"; + const graphType = isDirected ? "digraph" : "graph"; + const edgeOperator = isDirected ? "->" : "--"; + const lines = []; + lines.push(`${graphType} ${graphName} {`); + // Add nodes + for (const [nodeIndex, nodeData] of graph.nodes) { + const label = nodeLabel(nodeData).replace(/"/g, "\\\""); + lines.push(` "${nodeIndex}" [label="${label}"];`); + } + // Add edges + for (const [, edgeData] of graph.edges) { + const label = edgeLabel(edgeData.data).replace(/"/g, "\\\""); + lines.push(` "${edgeData.source}" ${edgeOperator} "${edgeData.target}" [label="${label}"];`); + } + lines.push("}"); + return lines.join("\n"); +}; +/** @internal */ +const escapeMermaidLabel = label => { + // Escape special characters for Mermaid using HTML entity codes + // According to: https://mermaid.js.org/syntax/flowchart.html#special-characters-that-break-syntax + return label.replace(/#/g, "#35;").replace(/"/g, "#quot;").replace(//g, "#gt;").replace(/&/g, "#amp;").replace(/\[/g, "#91;").replace(/\]/g, "#93;").replace(/\{/g, "#123;").replace(/\}/g, "#125;").replace(/\(/g, "#40;").replace(/\)/g, "#41;").replace(/\|/g, "#124;").replace(/\\/g, "#92;").replace(/\n/g, "
"); +}; +/** @internal */ +const formatMermaidNode = (nodeId, label, shape) => { + switch (shape) { + case "rectangle": + return `${nodeId}["${label}"]`; + case "rounded": + return `${nodeId}("${label}")`; + case "circle": + return `${nodeId}(("${label}"))`; + case "diamond": + return `${nodeId}{"${label}"}`; + case "hexagon": + return `${nodeId}{{"${label}"}}`; + case "stadium": + return `${nodeId}(["${label}"])`; + case "subroutine": + return `${nodeId}[["${label}"]]`; + case "cylindrical": + return `${nodeId}[("${label}")]`; + } +}; +/** + * Exports a graph to Mermaid diagram format for visualization. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.mutate(Graph.directed(), (mutable) => { + * const app = Graph.addNode(mutable, "App") + * const db = Graph.addNode(mutable, "Database") + * const cache = Graph.addNode(mutable, "Cache") + * Graph.addEdge(mutable, app, db, 1) + * Graph.addEdge(mutable, app, cache, 2) + * }) + * + * const mermaid = Graph.toMermaid(graph) + * console.log(mermaid) + * // flowchart TD + * // 0["App"] + * // 1["Database"] + * // 2["Cache"] + * // 0 -->|"1"| 1 + * // 0 -->|"2"| 2 + * ``` + * + * @since 3.18.0 + * @category utils + */ +export const toMermaid = (graph, options) => { + // Extract and validate options with defaults + const { + diagramType, + direction = "TD", + edgeLabel = data => String(data), + nodeLabel = data => String(data), + nodeShape = () => "rectangle" + } = options ?? {}; + // Auto-detect diagram type if not specified + const finalDiagramType = diagramType ?? (graph.type === "directed" ? "flowchart" : "graph"); + // Generate diagram header + const lines = []; + lines.push(`${finalDiagramType} ${direction}`); + // Add nodes + for (const [nodeIndex, nodeData] of graph.nodes) { + const nodeId = String(nodeIndex); + const label = escapeMermaidLabel(nodeLabel(nodeData)); + const shape = nodeShape(nodeData); + const formattedNode = formatMermaidNode(nodeId, label, shape); + lines.push(` ${formattedNode}`); + } + // Add edges + const edgeOperator = finalDiagramType === "flowchart" ? "-->" : "---"; + for (const [, edgeData] of graph.edges) { + const sourceId = String(edgeData.source); + const targetId = String(edgeData.target); + const label = escapeMermaidLabel(edgeLabel(edgeData.data)); + if (label) { + lines.push(` ${sourceId} ${edgeOperator}|"${label}"| ${targetId}`); + } else { + lines.push(` ${sourceId} ${edgeOperator} ${targetId}`); + } + } + return lines.join("\n"); +}; +// ============================================================================= +// ============================================================================= +// Graph Structure Analysis Algorithms (Phase 5A) +// ============================================================================= +/** + * Checks if the graph is acyclic (contains no cycles). + * + * Uses depth-first search to detect back edges, which indicate cycles. + * For directed graphs, any back edge creates a cycle. For undirected graphs, + * a back edge that doesn't go to the immediate parent creates a cycle. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * // Acyclic directed graph (DAG) + * const dag = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, "A->B") + * Graph.addEdge(mutable, b, c, "B->C") + * }) + * console.log(Graph.isAcyclic(dag)) // true + * + * // Cyclic directed graph + * const cyclic = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * Graph.addEdge(mutable, a, b, "A->B") + * Graph.addEdge(mutable, b, a, "B->A") // Creates cycle + * }) + * console.log(Graph.isAcyclic(cyclic)) // false + * ``` + * + * @since 3.18.0 + * @category algorithms + */ +export const isAcyclic = graph => { + // Use existing cycle flag if available + if (Option.isSome(graph.isAcyclic)) { + return graph.isAcyclic.value; + } + // Stack-safe DFS cycle detection using iterative approach + const visited = new Set(); + const recursionStack = new Set(); + // Get all nodes to handle disconnected components + for (const startNode of graph.nodes.keys()) { + if (visited.has(startNode)) { + continue; // Already processed this component + } + // Iterative DFS with explicit stack + const stack = [[startNode, [], 0, true]]; + while (stack.length > 0) { + const [node, neighbors, neighborIndex, isFirstVisit] = stack[stack.length - 1]; + // First visit to this node + if (isFirstVisit) { + if (recursionStack.has(node)) { + // Back edge found - cycle detected + graph.isAcyclic = Option.some(false); + return false; + } + if (visited.has(node)) { + stack.pop(); + continue; + } + visited.add(node); + recursionStack.add(node); + // Get neighbors for this node + const nodeNeighbors = Array.from(neighborsDirected(graph, node, "outgoing")); + stack[stack.length - 1] = [node, nodeNeighbors, 0, false]; + continue; + } + // Process next neighbor + if (neighborIndex < neighbors.length) { + const neighbor = neighbors[neighborIndex]; + stack[stack.length - 1] = [node, neighbors, neighborIndex + 1, false]; + if (recursionStack.has(neighbor)) { + // Back edge found - cycle detected + graph.isAcyclic = Option.some(false); + return false; + } + if (!visited.has(neighbor)) { + stack.push([neighbor, [], 0, true]); + } + } else { + // Done with this node - backtrack + recursionStack.delete(node); + stack.pop(); + } + } + } + // Cache the result + graph.isAcyclic = Option.some(true); + return true; +}; +/** + * Checks if an undirected graph is bipartite. + * + * A bipartite graph is one whose vertices can be divided into two disjoint sets + * such that no two vertices within the same set are adjacent. Uses BFS coloring + * to determine bipartiteness. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * // Bipartite graph (alternating coloring possible) + * const bipartite = Graph.undirected((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * const d = Graph.addNode(mutable, "D") + * Graph.addEdge(mutable, a, b, "edge") // Set 1: {A, C}, Set 2: {B, D} + * Graph.addEdge(mutable, b, c, "edge") + * Graph.addEdge(mutable, c, d, "edge") + * }) + * console.log(Graph.isBipartite(bipartite)) // true + * + * // Non-bipartite graph (odd cycle) + * const triangle = Graph.undirected((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, "edge") + * Graph.addEdge(mutable, b, c, "edge") + * Graph.addEdge(mutable, c, a, "edge") // Triangle (3-cycle) + * }) + * console.log(Graph.isBipartite(triangle)) // false + * ``` + * + * @since 3.18.0 + * @category algorithms + */ +export const isBipartite = graph => { + const coloring = new Map(); + const discovered = new Set(); + let isBipartiteGraph = true; + // Get all nodes to handle disconnected components + for (const startNode of graph.nodes.keys()) { + if (!discovered.has(startNode)) { + // Start BFS coloring from this component + const queue = [startNode]; + coloring.set(startNode, 0); // Color start node with 0 + discovered.add(startNode); + while (queue.length > 0 && isBipartiteGraph) { + const current = queue.shift(); + const currentColor = coloring.get(current); + const neighborColor = currentColor === 0 ? 1 : 0; + // Get all neighbors for undirected graph + const nodeNeighbors = getUndirectedNeighbors(graph, current); + for (const neighbor of nodeNeighbors) { + if (!discovered.has(neighbor)) { + // Color unvisited neighbor with opposite color + coloring.set(neighbor, neighborColor); + discovered.add(neighbor); + queue.push(neighbor); + } else { + // Check if neighbor has the same color (conflict) + if (coloring.get(neighbor) === currentColor) { + isBipartiteGraph = false; + break; + } + } + } + } + // Early exit if not bipartite + if (!isBipartiteGraph) { + break; + } + } + } + return isBipartiteGraph; +}; +/** + * Get neighbors for undirected graphs by checking both adjacency and reverse adjacency. + * For undirected graphs, we need to find the other endpoint of each edge incident to the node. + */ +const getUndirectedNeighbors = (graph, nodeIndex) => { + const neighbors = new Set(); + // Check edges where this node is the source + const adjacencyList = graph.adjacency.get(nodeIndex); + if (adjacencyList !== undefined) { + for (const edgeIndex of adjacencyList) { + const edge = graph.edges.get(edgeIndex); + if (edge !== undefined) { + // For undirected graphs, the neighbor is the other endpoint + const otherNode = edge.source === nodeIndex ? edge.target : edge.source; + neighbors.add(otherNode); + } + } + } + return Array.from(neighbors); +}; +/** + * Find connected components in an undirected graph. + * Each component is represented as an array of node indices. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.undirected((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * const d = Graph.addNode(mutable, "D") + * Graph.addEdge(mutable, a, b, "edge") // Component 1: A-B + * Graph.addEdge(mutable, c, d, "edge") // Component 2: C-D + * }) + * + * const components = Graph.connectedComponents(graph) + * console.log(components) // [[0, 1], [2, 3]] + * ``` + * + * @since 3.18.0 + * @category algorithms + */ +export const connectedComponents = graph => { + const visited = new Set(); + const components = []; + for (const startNode of graph.nodes.keys()) { + if (!visited.has(startNode)) { + // DFS to find all nodes in this component + const component = []; + const stack = [startNode]; + while (stack.length > 0) { + const current = stack.pop(); + if (!visited.has(current)) { + visited.add(current); + component.push(current); + // Add all unvisited neighbors to stack + const nodeNeighbors = getUndirectedNeighbors(graph, current); + for (const neighbor of nodeNeighbors) { + if (!visited.has(neighbor)) { + stack.push(neighbor); + } + } + } + } + components.push(component); + } + } + return components; +}; +/** + * Find strongly connected components in a directed graph using Kosaraju's algorithm. + * Each SCC is represented as an array of node indices. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, "A->B") + * Graph.addEdge(mutable, b, c, "B->C") + * Graph.addEdge(mutable, c, a, "C->A") // Creates SCC: A-B-C + * }) + * + * const sccs = Graph.stronglyConnectedComponents(graph) + * console.log(sccs) // [[0, 1, 2]] + * ``` + * + * @since 3.18.0 + * @category algorithms + */ +export const stronglyConnectedComponents = graph => { + const visited = new Set(); + const finishOrder = []; + for (const startNode of graph.nodes.keys()) { + if (visited.has(startNode)) { + continue; + } + const stack = [[startNode, [], 0, true]]; + while (stack.length > 0) { + const [node, nodeNeighbors, neighborIndex, isFirstVisit] = stack[stack.length - 1]; + if (isFirstVisit) { + if (visited.has(node)) { + stack.pop(); + continue; + } + visited.add(node); + const nodeNeighborsList = neighbors(graph, node); + stack[stack.length - 1] = [node, nodeNeighborsList, 0, false]; + continue; + } + // Process next neighbor + if (neighborIndex < nodeNeighbors.length) { + const neighbor = nodeNeighbors[neighborIndex]; + stack[stack.length - 1] = [node, nodeNeighbors, neighborIndex + 1, false]; + if (!visited.has(neighbor)) { + stack.push([neighbor, [], 0, true]); + } + } else { + // Done with this node - add to finish order (post-order) + finishOrder.push(node); + stack.pop(); + } + } + } + // Step 2: Stack-safe DFS on transpose graph in reverse finish order + visited.clear(); + const sccs = []; + for (let i = finishOrder.length - 1; i >= 0; i--) { + const startNode = finishOrder[i]; + if (visited.has(startNode)) { + continue; + } + const scc = []; + const stack = [startNode]; + while (stack.length > 0) { + const node = stack.pop(); + if (visited.has(node)) { + continue; + } + visited.add(node); + scc.push(node); + // Use reverse adjacency (transpose graph) + const reverseAdjacency = graph.reverseAdjacency.get(node); + if (reverseAdjacency !== undefined) { + for (const edgeIndex of reverseAdjacency) { + const edge = graph.edges.get(edgeIndex); + if (edge !== undefined) { + const predecessor = edge.source; + if (!visited.has(predecessor)) { + stack.push(predecessor); + } + } + } + } + } + sccs.push(scc); + } + return sccs; +}; +/** + * Find the shortest path between two nodes using Dijkstra's algorithm. + * + * Dijkstra's algorithm works with non-negative edge weights and finds the shortest + * path from a source node to a target node in O((V + E) log V) time complexity. + * + * @example + * ```ts + * import { Graph, Option } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, 5) + * Graph.addEdge(mutable, a, c, 10) + * Graph.addEdge(mutable, b, c, 2) + * }) + * + * const result = Graph.dijkstra(graph, { source: 0, target: 2, cost: (edgeData) => edgeData }) + * if (Option.isSome(result)) { + * console.log(result.value.path) // [0, 1, 2] - shortest path A->B->C + * console.log(result.value.distance) // 7 - total distance + * } + * ``` + * + * @since 3.18.0 + * @category algorithms + */ +export const dijkstra = (graph, config) => { + const { + cost, + source, + target + } = config; + // Validate that source and target nodes exist + if (!graph.nodes.has(source)) { + throw missingNode(source); + } + if (!graph.nodes.has(target)) { + throw missingNode(target); + } + // Early return if source equals target + if (source === target) { + return Option.some({ + path: [source], + distance: 0, + costs: [] + }); + } + // Distance tracking and priority queue simulation + const distances = new Map(); + const previous = new Map(); + const visited = new Set(); + // Initialize distances + // Iterate directly over node keys + for (const node of graph.nodes.keys()) { + distances.set(node, node === source ? 0 : Infinity); + previous.set(node, null); + } + // Simple priority queue using array (can be optimized with proper heap) + const priorityQueue = [{ + node: source, + distance: 0 + }]; + while (priorityQueue.length > 0) { + // Find minimum distance node (priority queue extract-min) + let minIndex = 0; + for (let i = 1; i < priorityQueue.length; i++) { + if (priorityQueue[i].distance < priorityQueue[minIndex].distance) { + minIndex = i; + } + } + const current = priorityQueue.splice(minIndex, 1)[0]; + const currentNode = current.node; + // Skip if already visited (can happen with duplicate entries) + if (visited.has(currentNode)) { + continue; + } + visited.add(currentNode); + // Early termination if we reached the target + if (currentNode === target) { + break; + } + // Get current distance + const currentDistance = distances.get(currentNode); + // Examine all outgoing edges + const adjacencyList = graph.adjacency.get(currentNode); + if (adjacencyList !== undefined) { + for (const edgeIndex of adjacencyList) { + const edge = graph.edges.get(edgeIndex); + if (edge !== undefined) { + const neighbor = edge.target; + const weight = cost(edge.data); + // Validate non-negative weights + if (weight < 0) { + throw new Error(`Dijkstra's algorithm requires non-negative edge weights, found ${weight}`); + } + const newDistance = currentDistance + weight; + const neighborDistance = distances.get(neighbor); + // Relaxation step + if (newDistance < neighborDistance) { + distances.set(neighbor, newDistance); + previous.set(neighbor, { + node: currentNode, + edgeData: edge.data + }); + // Add to priority queue if not visited + if (!visited.has(neighbor)) { + priorityQueue.push({ + node: neighbor, + distance: newDistance + }); + } + } + } + } + } + } + // Check if target is reachable + const targetDistance = distances.get(target); + if (targetDistance === Infinity) { + return Option.none(); // No path exists + } + // Reconstruct path + const path = []; + const costs = []; + let currentNode = target; + while (currentNode !== null) { + path.unshift(currentNode); + const prev = previous.get(currentNode); + if (prev !== null) { + costs.unshift(prev.edgeData); + currentNode = prev.node; + } else { + currentNode = null; + } + } + return Option.some({ + path, + distance: targetDistance, + costs + }); +}; +/** + * Find shortest paths between all pairs of nodes using Floyd-Warshall algorithm. + * + * Floyd-Warshall algorithm computes shortest paths between all pairs of nodes in O(V³) time. + * It can handle negative edge weights and detect negative cycles. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, 3) + * Graph.addEdge(mutable, b, c, 2) + * Graph.addEdge(mutable, a, c, 7) + * }) + * + * const result = Graph.floydWarshall(graph, (edgeData) => edgeData) + * const distanceAToC = result.distances.get(0)?.get(2) // 5 (A->B->C) + * const pathAToC = result.paths.get(0)?.get(2) // [0, 1, 2] + * ``` + * + * @since 3.18.0 + * @category algorithms + */ +export const floydWarshall = (graph, cost) => { + // Get all nodes for Floyd-Warshall algorithm (needs array for nested iteration) + const allNodes = Array.from(graph.nodes.keys()); + // Initialize distance matrix + const dist = new Map(); + const next = new Map(); + const edgeMatrix = new Map(); + // Initialize with infinity for all pairs + for (const i of allNodes) { + dist.set(i, new Map()); + next.set(i, new Map()); + edgeMatrix.set(i, new Map()); + for (const j of allNodes) { + dist.get(i).set(j, i === j ? 0 : Infinity); + next.get(i).set(j, null); + edgeMatrix.get(i).set(j, null); + } + } + // Set edge weights + for (const [, edgeData] of graph.edges) { + const weight = cost(edgeData.data); + const i = edgeData.source; + const j = edgeData.target; + // Use minimum weight if multiple edges exist + const currentWeight = dist.get(i).get(j); + if (weight < currentWeight) { + dist.get(i).set(j, weight); + next.get(i).set(j, j); + edgeMatrix.get(i).set(j, edgeData.data); + } + } + // Floyd-Warshall main loop + for (const k of allNodes) { + for (const i of allNodes) { + for (const j of allNodes) { + const distIK = dist.get(i).get(k); + const distKJ = dist.get(k).get(j); + const distIJ = dist.get(i).get(j); + if (distIK !== Infinity && distKJ !== Infinity && distIK + distKJ < distIJ) { + dist.get(i).set(j, distIK + distKJ); + next.get(i).set(j, next.get(i).get(k)); + } + } + } + } + // Check for negative cycles + for (const i of allNodes) { + if (dist.get(i).get(i) < 0) { + throw new Error(`Negative cycle detected involving node ${i}`); + } + } + // Build result paths and edge weights + const paths = new Map(); + const resultCosts = new Map(); + for (const i of allNodes) { + paths.set(i, new Map()); + resultCosts.set(i, new Map()); + for (const j of allNodes) { + if (i === j) { + paths.get(i).set(j, [i]); + resultCosts.get(i).set(j, []); + } else if (dist.get(i).get(j) === Infinity) { + paths.get(i).set(j, null); + resultCosts.get(i).set(j, []); + } else { + // Reconstruct path iteratively + const path = []; + const weights = []; + let current = i; + path.push(current); + while (current !== j) { + const nextNode = next.get(current).get(j); + if (nextNode === null) break; + const edgeData = edgeMatrix.get(current).get(nextNode); + if (edgeData !== null) { + weights.push(edgeData); + } + current = nextNode; + path.push(current); + } + paths.get(i).set(j, path); + resultCosts.get(i).set(j, weights); + } + } + } + return { + distances: dist, + paths, + costs: resultCosts + }; +}; +/** + * Find the shortest path between two nodes using A* pathfinding algorithm. + * + * A* is an extension of Dijkstra's algorithm that uses a heuristic function to guide + * the search towards the target, potentially finding paths faster than Dijkstra's. + * The heuristic must be admissible (never overestimate the actual cost). + * + * @example + * ```ts + * import { Graph, Option } from "effect" + * + * const graph = Graph.directed<{x: number, y: number}, number>((mutable) => { + * const a = Graph.addNode(mutable, {x: 0, y: 0}) + * const b = Graph.addNode(mutable, {x: 1, y: 0}) + * const c = Graph.addNode(mutable, {x: 2, y: 0}) + * Graph.addEdge(mutable, a, b, 1) + * Graph.addEdge(mutable, b, c, 1) + * }) + * + * // Manhattan distance heuristic + * const heuristic = (nodeData: {x: number, y: number}, targetData: {x: number, y: number}) => + * Math.abs(nodeData.x - targetData.x) + Math.abs(nodeData.y - targetData.y) + * + * const result = Graph.astar(graph, { source: 0, target: 2, cost: (edgeData) => edgeData, heuristic }) + * if (Option.isSome(result)) { + * console.log(result.value.path) // [0, 1, 2] - shortest path + * console.log(result.value.distance) // 2 - total distance + * } + * ``` + * + * @since 3.18.0 + * @category algorithms + */ +export const astar = (graph, config) => { + const { + cost, + heuristic, + source, + target + } = config; + // Validate that source and target nodes exist + if (!graph.nodes.has(source)) { + throw missingNode(source); + } + if (!graph.nodes.has(target)) { + throw missingNode(target); + } + // Early return if source equals target + if (source === target) { + return Option.some({ + path: [source], + distance: 0, + costs: [] + }); + } + // Get target node data for heuristic calculations + const targetNodeData = graph.nodes.get(target); + if (targetNodeData === undefined) { + throw new Error(`Target node ${target} data not found`); + } + // Distance tracking (g-score) and f-score (g + h) + const gScore = new Map(); + const fScore = new Map(); + const previous = new Map(); + const visited = new Set(); + // Initialize scores + // Iterate directly over node keys + for (const node of graph.nodes.keys()) { + gScore.set(node, node === source ? 0 : Infinity); + fScore.set(node, Infinity); + previous.set(node, null); + } + // Calculate initial f-score for source + const sourceNodeData = graph.nodes.get(source); + if (sourceNodeData !== undefined) { + const h = heuristic(sourceNodeData, targetNodeData); + fScore.set(source, h); + } + // Priority queue using f-score (total estimated cost) + const openSet = [{ + node: source, + fScore: fScore.get(source) + }]; + while (openSet.length > 0) { + // Find node with lowest f-score + let minIndex = 0; + for (let i = 1; i < openSet.length; i++) { + if (openSet[i].fScore < openSet[minIndex].fScore) { + minIndex = i; + } + } + const current = openSet.splice(minIndex, 1)[0]; + const currentNode = current.node; + // Skip if already visited + if (visited.has(currentNode)) { + continue; + } + visited.add(currentNode); + // Early termination if we reached the target + if (currentNode === target) { + break; + } + // Get current g-score + const currentGScore = gScore.get(currentNode); + // Examine all outgoing edges + const adjacencyList = graph.adjacency.get(currentNode); + if (adjacencyList !== undefined) { + for (const edgeIndex of adjacencyList) { + const edge = graph.edges.get(edgeIndex); + if (edge !== undefined) { + const neighbor = edge.target; + const weight = cost(edge.data); + // Validate non-negative weights + if (weight < 0) { + throw new Error(`A* algorithm requires non-negative edge weights, found ${weight}`); + } + const tentativeGScore = currentGScore + weight; + const neighborGScore = gScore.get(neighbor); + // If this path to neighbor is better than any previous one + if (tentativeGScore < neighborGScore) { + // Update g-score and previous + gScore.set(neighbor, tentativeGScore); + previous.set(neighbor, { + node: currentNode, + edgeData: edge.data + }); + // Calculate f-score using heuristic + const neighborNodeData = graph.nodes.get(neighbor); + if (neighborNodeData !== undefined) { + const h = heuristic(neighborNodeData, targetNodeData); + const f = tentativeGScore + h; + fScore.set(neighbor, f); + // Add to open set if not visited + if (!visited.has(neighbor)) { + openSet.push({ + node: neighbor, + fScore: f + }); + } + } + } + } + } + } + } + // Check if target is reachable + const targetGScore = gScore.get(target); + if (targetGScore === Infinity) { + return Option.none(); // No path exists + } + // Reconstruct path + const path = []; + const costs = []; + let currentNode = target; + while (currentNode !== null) { + path.unshift(currentNode); + const prev = previous.get(currentNode); + if (prev !== null) { + costs.unshift(prev.edgeData); + currentNode = prev.node; + } else { + currentNode = null; + } + } + return Option.some({ + path, + distance: targetGScore, + costs + }); +}; +/** + * Find the shortest path between two nodes using Bellman-Ford algorithm. + * + * Bellman-Ford algorithm can handle negative edge weights and detects negative cycles. + * It has O(VE) time complexity, slower than Dijkstra's but more versatile. + * Returns Option.none() if a negative cycle is detected that affects the path. + * + * @example + * ```ts + * import { Graph, Option } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, -1) // Negative weight allowed + * Graph.addEdge(mutable, b, c, 3) + * Graph.addEdge(mutable, a, c, 5) + * }) + * + * const result = Graph.bellmanFord(graph, { source: 0, target: 2, cost: (edgeData) => edgeData }) + * if (Option.isSome(result)) { + * console.log(result.value.path) // [0, 1, 2] - shortest path A->B->C + * console.log(result.value.distance) // 2 - total distance + * } + * ``` + * + * @since 3.18.0 + * @category algorithms + */ +export const bellmanFord = (graph, config) => { + const { + cost, + source, + target + } = config; + // Validate that source and target nodes exist + if (!graph.nodes.has(source)) { + throw missingNode(source); + } + if (!graph.nodes.has(target)) { + throw missingNode(target); + } + // Early return if source equals target + if (source === target) { + return Option.some({ + path: [source], + distance: 0, + costs: [] + }); + } + // Initialize distances and predecessors + const distances = new Map(); + const previous = new Map(); + // Iterate directly over node keys + for (const node of graph.nodes.keys()) { + distances.set(node, node === source ? 0 : Infinity); + previous.set(node, null); + } + // Collect all edges for relaxation + const edges = []; + for (const [, edgeData] of graph.edges) { + const weight = cost(edgeData.data); + edges.push({ + source: edgeData.source, + target: edgeData.target, + weight, + edgeData: edgeData.data + }); + } + // Relax edges up to V-1 times + const nodeCount = graph.nodes.size; + for (let i = 0; i < nodeCount - 1; i++) { + let hasUpdate = false; + for (const edge of edges) { + const sourceDistance = distances.get(edge.source); + const targetDistance = distances.get(edge.target); + // Relaxation step + if (sourceDistance !== Infinity && sourceDistance + edge.weight < targetDistance) { + distances.set(edge.target, sourceDistance + edge.weight); + previous.set(edge.target, { + node: edge.source, + edgeData: edge.edgeData + }); + hasUpdate = true; + } + } + // Early termination if no updates + if (!hasUpdate) { + break; + } + } + // Check for negative cycles + for (const edge of edges) { + const sourceDistance = distances.get(edge.source); + const targetDistance = distances.get(edge.target); + if (sourceDistance !== Infinity && sourceDistance + edge.weight < targetDistance) { + // Negative cycle detected - check if it affects the path to target + const affectedNodes = new Set(); + const queue = [edge.target]; + while (queue.length > 0) { + const node = queue.shift(); + if (affectedNodes.has(node)) continue; + affectedNodes.add(node); + // Add all nodes reachable from this node + const adjacencyList = graph.adjacency.get(node); + if (adjacencyList !== undefined) { + for (const edgeIndex of adjacencyList) { + const edge = graph.edges.get(edgeIndex); + if (edge !== undefined) { + queue.push(edge.target); + } + } + } + } + // If target is affected by negative cycle, return null + if (affectedNodes.has(target)) { + return Option.none(); + } + } + } + // Check if target is reachable + const targetDistance = distances.get(target); + if (targetDistance === Infinity) { + return Option.none(); // No path exists + } + // Reconstruct path + const path = []; + const costs = []; + let currentNode = target; + while (currentNode !== null) { + path.unshift(currentNode); + const prev = previous.get(currentNode); + if (prev !== null) { + costs.unshift(prev.edgeData); + currentNode = prev.node; + } else { + currentNode = null; + } + } + return Option.some({ + path, + distance: targetDistance, + costs + }); +}; +/** + * Concrete class for iterables that produce [NodeIndex, NodeData] tuples. + * + * This class provides a common abstraction for all iterables that return node data, + * including traversal iterators (DFS, BFS, etc.) and element iterators (nodes, externals). + * It uses a mapEntry function pattern for flexible iteration and transformation. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * Graph.addEdge(mutable, a, b, 1) + * }) + * + * // Both traversal and element iterators return NodeWalker + * const dfsNodes: Graph.NodeWalker = Graph.dfs(graph, { start: [0] }) + * const allNodes: Graph.NodeWalker = Graph.nodes(graph) + * + * // Common interface for working with node iterables + * function processNodes(nodeIterable: Graph.NodeWalker): Array { + * return Array.from(Graph.indices(nodeIterable)) + * } + * + * // Access node data using values() or entries() + * const nodeData = Array.from(Graph.values(dfsNodes)) // ["A", "B"] + * const nodeEntries = Array.from(Graph.entries(allNodes)) // [[0, "A"], [1, "B"]] + * ``` + * + * @since 3.18.0 + * @category models + */ +export class Walker { + /** + * @since 3.18.0 + */ + // @ts-ignore + [Symbol.iterator]; + /** + * Visits each element and maps it to a value using the provided function. + * + * Takes a function that receives the index and data, + * and returns an iterable of the mapped values. Skips elements that + * no longer exist in the graph. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * Graph.addEdge(mutable, a, b, 1) + * }) + * + * const dfs = Graph.dfs(graph, { start: [0] }) + * + * // Map to just the node data + * const values = Array.from(dfs.visit((index, data) => data)) + * console.log(values) // ["A", "B"] + * + * // Map to custom objects + * const custom = Array.from(dfs.visit((index, data) => ({ id: index, name: data }))) + * console.log(custom) // [{ id: 0, name: "A" }, { id: 1, name: "B" }] + * ``` + * + * @since 3.18.0 + * @category iterators + */ + visit; + constructor( + /** + * Visits each element and maps it to a value using the provided function. + * + * Takes a function that receives the index and data, + * and returns an iterable of the mapped values. Skips elements that + * no longer exist in the graph. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * Graph.addEdge(mutable, a, b, 1) + * }) + * + * const dfs = Graph.dfs(graph, { start: [0] }) + * + * // Map to just the node data + * const values = Array.from(dfs.visit((index, data) => data)) + * console.log(values) // ["A", "B"] + * + * // Map to custom objects + * const custom = Array.from(dfs.visit((index, data) => ({ id: index, name: data }))) + * console.log(custom) // [{ id: 0, name: "A" }, { id: 1, name: "B" }] + * ``` + * + * @since 3.18.0 + * @category iterators + */ + visit) { + this.visit = visit; + this[Symbol.iterator] = visit((index, data) => [index, data])[Symbol.iterator]; + } +} +/** + * Returns an iterator over the indices in the walker. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * Graph.addEdge(mutable, a, b, 1) + * }) + * + * const dfs = Graph.dfs(graph, { start: [0] }) + * const indices = Array.from(Graph.indices(dfs)) + * console.log(indices) // [0, 1] + * ``` + * + * @since 3.18.0 + * @category utilities + */ +export const indices = walker => walker.visit((index, _) => index); +/** + * Returns an iterator over the values (data) in the walker. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * Graph.addEdge(mutable, a, b, 1) + * }) + * + * const dfs = Graph.dfs(graph, { start: [0] }) + * const values = Array.from(Graph.values(dfs)) + * console.log(values) // ["A", "B"] + * ``` + * + * @since 3.18.0 + * @category utilities + */ +export const values = walker => walker.visit((_, data) => data); +/** + * Returns an iterator over [index, data] entries in the walker. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * Graph.addEdge(mutable, a, b, 1) + * }) + * + * const dfs = Graph.dfs(graph, { start: [0] }) + * const entries = Array.from(Graph.entries(dfs)) + * console.log(entries) // [[0, "A"], [1, "B"]] + * ``` + * + * @since 3.18.0 + * @category utilities + */ +export const entries = walker => walker.visit((index, data) => [index, data]); +/** + * Creates a new DFS iterator with optional configuration. + * + * The iterator maintains a stack of nodes to visit and tracks discovered nodes. + * It provides lazy evaluation of the depth-first search. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, 1) + * Graph.addEdge(mutable, b, c, 1) + * }) + * + * // Start from a specific node + * const dfs1 = Graph.dfs(graph, { start: [0] }) + * for (const nodeIndex of Graph.indices(dfs1)) { + * console.log(nodeIndex) // Traverses in DFS order: 0, 1, 2 + * } + * + * // Empty iterator (no starting nodes) + * const dfs2 = Graph.dfs(graph) + * // Can be used programmatically + * ``` + * + * @since 3.18.0 + * @category iterators + */ +export const dfs = (graph, config = {}) => { + const start = config.start ?? []; + const direction = config.direction ?? "outgoing"; + // Validate that all start nodes exist + for (const nodeIndex of start) { + if (!hasNode(graph, nodeIndex)) { + throw missingNode(nodeIndex); + } + } + return new Walker(f => ({ + [Symbol.iterator]: () => { + const stack = [...start]; + const discovered = new Set(); + const nextMapped = () => { + while (stack.length > 0) { + const current = stack.pop(); + if (discovered.has(current)) { + continue; + } + discovered.add(current); + const nodeDataOption = graph.nodes.get(current); + if (nodeDataOption === undefined) { + continue; + } + const neighbors = neighborsDirected(graph, current, direction); + for (let i = neighbors.length - 1; i >= 0; i--) { + const neighbor = neighbors[i]; + if (!discovered.has(neighbor)) { + stack.push(neighbor); + } + } + return { + done: false, + value: f(current, nodeDataOption) + }; + } + return { + done: true, + value: undefined + }; + }; + return { + next: nextMapped + }; + } + })); +}; +/** + * Creates a new BFS iterator with optional configuration. + * + * The iterator maintains a queue of nodes to visit and tracks discovered nodes. + * It provides lazy evaluation of the breadth-first search. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, 1) + * Graph.addEdge(mutable, b, c, 1) + * }) + * + * // Start from a specific node + * const bfs1 = Graph.bfs(graph, { start: [0] }) + * for (const nodeIndex of Graph.indices(bfs1)) { + * console.log(nodeIndex) // Traverses in BFS order: 0, 1, 2 + * } + * + * // Empty iterator (no starting nodes) + * const bfs2 = Graph.bfs(graph) + * // Can be used programmatically + * ``` + * + * @since 3.18.0 + * @category iterators + */ +export const bfs = (graph, config = {}) => { + const start = config.start ?? []; + const direction = config.direction ?? "outgoing"; + // Validate that all start nodes exist + for (const nodeIndex of start) { + if (!hasNode(graph, nodeIndex)) { + throw missingNode(nodeIndex); + } + } + return new Walker(f => ({ + [Symbol.iterator]: () => { + const queue = [...start]; + const discovered = new Set(); + const nextMapped = () => { + while (queue.length > 0) { + const current = queue.shift(); + if (!discovered.has(current)) { + discovered.add(current); + const neighbors = neighborsDirected(graph, current, direction); + for (const neighbor of neighbors) { + if (!discovered.has(neighbor)) { + queue.push(neighbor); + } + } + const nodeData = getNode(graph, current); + if (Option.isSome(nodeData)) { + return { + done: false, + value: f(current, nodeData.value) + }; + } + return nextMapped(); + } + } + return { + done: true, + value: undefined + }; + }; + return { + next: nextMapped + }; + } + })); +}; +/** + * Creates a new topological sort iterator with optional configuration. + * + * The iterator uses Kahn's algorithm to lazily produce nodes in topological order. + * Throws an error if the graph contains cycles. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, 1) + * Graph.addEdge(mutable, b, c, 1) + * }) + * + * // Standard topological sort + * const topo1 = Graph.topo(graph) + * for (const nodeIndex of Graph.indices(topo1)) { + * console.log(nodeIndex) // 0, 1, 2 (topological order) + * } + * + * // With initial nodes + * const topo2 = Graph.topo(graph, { initials: [0] }) + * + * // Throws error for cyclic graph + * const cyclicGraph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * Graph.addEdge(mutable, a, b, 1) + * Graph.addEdge(mutable, b, a, 2) // Creates cycle + * }) + * + * try { + * Graph.topo(cyclicGraph) // Throws: "Cannot perform topological sort on cyclic graph" + * } catch (error) { + * console.log((error as Error).message) + * } + * ``` + * + * @since 3.18.0 + * @category iterators + */ +export const topo = (graph, config = {}) => { + // Check if graph is acyclic first + if (!isAcyclic(graph)) { + throw new Error("Cannot perform topological sort on cyclic graph"); + } + const initials = config.initials ?? []; + // Validate that all initial nodes exist + for (const nodeIndex of initials) { + if (!hasNode(graph, nodeIndex)) { + throw missingNode(nodeIndex); + } + } + return new Walker(f => ({ + [Symbol.iterator]: () => { + const inDegree = new Map(); + const remaining = new Set(); + const queue = [...initials]; + // Initialize in-degree counts + for (const [nodeIndex] of graph.nodes) { + inDegree.set(nodeIndex, 0); + remaining.add(nodeIndex); + } + // Calculate in-degrees + for (const [, edgeData] of graph.edges) { + const currentInDegree = inDegree.get(edgeData.target) || 0; + inDegree.set(edgeData.target, currentInDegree + 1); + } + // Add nodes with zero in-degree to queue if no initials provided + if (initials.length === 0) { + for (const [nodeIndex, degree] of inDegree) { + if (degree === 0) { + queue.push(nodeIndex); + } + } + } + const nextMapped = () => { + while (queue.length > 0) { + const current = queue.shift(); + if (remaining.has(current)) { + remaining.delete(current); + // Process outgoing edges, reducing in-degree of targets + const neighbors = neighborsDirected(graph, current, "outgoing"); + for (const neighbor of neighbors) { + if (remaining.has(neighbor)) { + const currentInDegree = inDegree.get(neighbor) || 0; + const newInDegree = currentInDegree - 1; + inDegree.set(neighbor, newInDegree); + // If in-degree becomes 0, add to queue + if (newInDegree === 0) { + queue.push(neighbor); + } + } + } + const nodeData = getNode(graph, current); + if (Option.isSome(nodeData)) { + return { + done: false, + value: f(current, nodeData.value) + }; + } + return nextMapped(); + } + } + return { + done: true, + value: undefined + }; + }; + return { + next: nextMapped + }; + } + })); +}; +/** + * Creates a new DFS postorder iterator with optional configuration. + * + * The iterator maintains a stack with visit state tracking and emits nodes + * in postorder (after all descendants have been processed). Essential for + * dependency resolution and tree destruction algorithms. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const root = Graph.addNode(mutable, "root") + * const child1 = Graph.addNode(mutable, "child1") + * const child2 = Graph.addNode(mutable, "child2") + * Graph.addEdge(mutable, root, child1, 1) + * Graph.addEdge(mutable, root, child2, 1) + * }) + * + * // Postorder: children before parents + * const postOrder = Graph.dfsPostOrder(graph, { start: [0] }) + * for (const node of postOrder) { + * console.log(node) // 1, 2, 0 + * } + * ``` + * + * @since 3.18.0 + * @category iterators + */ +export const dfsPostOrder = (graph, config = {}) => { + const start = config.start ?? []; + const direction = config.direction ?? "outgoing"; + // Validate that all start nodes exist + for (const nodeIndex of start) { + if (!hasNode(graph, nodeIndex)) { + throw missingNode(nodeIndex); + } + } + return new Walker(f => ({ + [Symbol.iterator]: () => { + const stack = []; + const discovered = new Set(); + const finished = new Set(); + // Initialize stack with start nodes + for (let i = start.length - 1; i >= 0; i--) { + stack.push({ + node: start[i], + visitedChildren: false + }); + } + const nextMapped = () => { + while (stack.length > 0) { + const current = stack[stack.length - 1]; + if (!discovered.has(current.node)) { + discovered.add(current.node); + current.visitedChildren = false; + } + if (!current.visitedChildren) { + current.visitedChildren = true; + const neighbors = neighborsDirected(graph, current.node, direction); + for (let i = neighbors.length - 1; i >= 0; i--) { + const neighbor = neighbors[i]; + if (!discovered.has(neighbor) && !finished.has(neighbor)) { + stack.push({ + node: neighbor, + visitedChildren: false + }); + } + } + } else { + const nodeToEmit = stack.pop().node; + if (!finished.has(nodeToEmit)) { + finished.add(nodeToEmit); + const nodeData = getNode(graph, nodeToEmit); + if (Option.isSome(nodeData)) { + return { + done: false, + value: f(nodeToEmit, nodeData.value) + }; + } + return nextMapped(); + } + } + } + return { + done: true, + value: undefined + }; + }; + return { + next: nextMapped + }; + } + })); +}; +/** + * Creates an iterator over all node indices in the graph. + * + * The iterator produces node indices in the order they were added to the graph. + * This provides access to all nodes regardless of connectivity. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, 1) + * }) + * + * const indices = Array.from(Graph.indices(Graph.nodes(graph))) + * console.log(indices) // [0, 1, 2] + * ``` + * + * @since 3.18.0 + * @category iterators + */ +export const nodes = graph => new Walker(f => ({ + [Symbol.iterator]() { + const nodeMap = graph.nodes; + const iterator = nodeMap.entries(); + return { + next() { + const result = iterator.next(); + if (result.done) { + return { + done: true, + value: undefined + }; + } + const [nodeIndex, nodeData] = result.value; + return { + done: false, + value: f(nodeIndex, nodeData) + }; + } + }; + } +})); +/** + * Creates an iterator over all edge indices in the graph. + * + * The iterator produces edge indices in the order they were added to the graph. + * This provides access to all edges regardless of connectivity. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const a = Graph.addNode(mutable, "A") + * const b = Graph.addNode(mutable, "B") + * const c = Graph.addNode(mutable, "C") + * Graph.addEdge(mutable, a, b, 1) + * Graph.addEdge(mutable, b, c, 2) + * }) + * + * const indices = Array.from(Graph.indices(Graph.edges(graph))) + * console.log(indices) // [0, 1] + * ``` + * + * @since 3.18.0 + * @category iterators + */ +export const edges = graph => new Walker(f => ({ + [Symbol.iterator]() { + const edgeMap = graph.edges; + const iterator = edgeMap.entries(); + return { + next() { + const result = iterator.next(); + if (result.done) { + return { + done: true, + value: undefined + }; + } + const [edgeIndex, edgeData] = result.value; + return { + done: false, + value: f(edgeIndex, edgeData) + }; + } + }; + } +})); +/** + * Creates an iterator over external nodes (nodes without edges in specified direction). + * + * External nodes are nodes that have no outgoing edges (direction="outgoing") or + * no incoming edges (direction="incoming"). These are useful for finding + * sources, sinks, or isolated nodes. + * + * @example + * ```ts + * import { Graph } from "effect" + * + * const graph = Graph.directed((mutable) => { + * const source = Graph.addNode(mutable, "source") // 0 - no incoming + * const middle = Graph.addNode(mutable, "middle") // 1 - has both + * const sink = Graph.addNode(mutable, "sink") // 2 - no outgoing + * const isolated = Graph.addNode(mutable, "isolated") // 3 - no edges + * + * Graph.addEdge(mutable, source, middle, 1) + * Graph.addEdge(mutable, middle, sink, 2) + * }) + * + * // Nodes with no outgoing edges (sinks + isolated) + * const sinks = Array.from(Graph.indices(Graph.externals(graph, { direction: "outgoing" }))) + * console.log(sinks) // [2, 3] + * + * // Nodes with no incoming edges (sources + isolated) + * const sources = Array.from(Graph.indices(Graph.externals(graph, { direction: "incoming" }))) + * console.log(sources) // [0, 3] + * ``` + * + * @since 3.18.0 + * @category iterators + */ +export const externals = (graph, config = {}) => { + const direction = config.direction ?? "outgoing"; + return new Walker(f => ({ + [Symbol.iterator]: () => { + const nodeMap = graph.nodes; + const adjacencyMap = direction === "incoming" ? graph.reverseAdjacency : graph.adjacency; + const nodeIterator = nodeMap.entries(); + const nextMapped = () => { + let current = nodeIterator.next(); + while (!current.done) { + const [nodeIndex, nodeData] = current.value; + const adjacencyList = adjacencyMap.get(nodeIndex); + // Node is external if it has no edges in the specified direction + if (adjacencyList === undefined || adjacencyList.length === 0) { + return { + done: false, + value: f(nodeIndex, nodeData) + }; + } + current = nodeIterator.next(); + } + return { + done: true, + value: undefined + }; + }; + return { + next: nextMapped + }; + } + })); +}; +//# sourceMappingURL=Graph.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Graph.js.map b/backend/node_modules/effect/dist/esm/Graph.js.map new file mode 100644 index 0000000000000000000000000000000000000000..90e15d5dbfd48d46d408289296d64c3a2b11cc06 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Graph.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Graph.js","names":["Data","Equal","dual","Hash","format","NodeInspectSymbol","Option","pipeArguments","TypeId","Edge","Class","ProtoGraph","Symbol","iterator","nodes","toJSON","symbol","that","isGraph","size","edges","type","nodeIndex","nodeData","has","otherNodeData","get","equals","edgeIndex","edgeData","otherEdge","hash","string","number","_id","nodeCount","edgeCount","toString","pipe","arguments","GraphError","TaggedError","missingNode","node","message","u","directed","mutate","graph","Object","create","Map","adjacency","reverseAdjacency","nextNodeIndex","nextEdgeIndex","isAcyclic","some","mutable","beginMutation","endMutation","undirected","set","f","addNode","data","getNode","none","hasNode","findNode","predicate","index","findNodes","results","push","findEdge","source","target","findEdges","updateNode","currentData","newData","updateEdge","currentEdge","mapNodes","mapEdges","reverse","clear","sourceEdges","targetEdges","filterMapNodes","nodesToRemove","result","isSome","value","removeNode","filterMapEdges","edgesToRemove","removeEdge","filterNodes","filterEdges","invalidateCycleFlagOnRemoval","invalidateCycleFlagOnAddition","addEdge","sourceAdjacency","undefined","targetReverseAdjacency","targetAdjacency","sourceReverseAdjacency","outgoingEdges","edge","incomingEdges","removeEdgeInternal","delete","wasRemoved","indexOf","splice","getEdge","hasEdge","adjacencyList","neighbors","getUndirectedNeighbors","neighborsDirected","direction","adjacencyMap","neighborNode","toGraphViz","options","edgeLabel","String","graphName","nodeLabel","isDirected","graphType","edgeOperator","lines","label","replace","join","escapeMermaidLabel","formatMermaidNode","nodeId","shape","toMermaid","diagramType","nodeShape","finalDiagramType","formattedNode","sourceId","targetId","visited","Set","recursionStack","startNode","keys","stack","length","neighborIndex","isFirstVisit","pop","add","nodeNeighbors","Array","from","neighbor","isBipartite","coloring","discovered","isBipartiteGraph","queue","current","shift","currentColor","neighborColor","otherNode","connectedComponents","components","component","stronglyConnectedComponents","finishOrder","nodeNeighborsList","sccs","i","scc","predecessor","dijkstra","config","cost","path","distance","costs","distances","previous","Infinity","priorityQueue","minIndex","currentNode","currentDistance","weight","Error","newDistance","neighborDistance","targetDistance","unshift","prev","floydWarshall","allNodes","dist","next","edgeMatrix","j","currentWeight","k","distIK","distKJ","distIJ","paths","resultCosts","weights","nextNode","astar","heuristic","targetNodeData","gScore","fScore","sourceNodeData","h","openSet","currentGScore","tentativeGScore","neighborGScore","neighborNodeData","targetGScore","bellmanFord","hasUpdate","sourceDistance","affectedNodes","Walker","visit","constructor","indices","walker","_","values","entries","dfs","start","nextMapped","nodeDataOption","done","bfs","topo","initials","inDegree","remaining","currentInDegree","degree","newInDegree","dfsPostOrder","finished","visitedChildren","nodeToEmit","nodeMap","edgeMap","externals","nodeIterator"],"sources":["../../src/Graph.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;AAKA,OAAO,KAAKA,IAAI,MAAM,WAAW;AACjC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,SAASC,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,IAAI,MAAM,WAAW;AAEjC,SAASC,MAAM,EAAEC,iBAAiB,QAAQ,kBAAkB;AAC5D,OAAO,KAAKC,MAAM,MAAM,aAAa;AAErC,SAASC,aAAa,QAAQ,eAAe;AAG7C;;;;;;AAMA,OAAO,MAAMC,MAAM,GAAoB,eAAwB;AA0B/D;;;;;;AAMA,OAAM,MAAOC,IAAQ,SAAQT,IAAI,CAACU,KAIhC;AAiFF;AACA;AACA;AAEA;AACA,MAAMC,UAAU,GAAG;EACjB,CAACH,MAAM,GAAGA,MAAM;EAChB,CAACI,MAAM,CAACC,QAAQ,IAAC;IACf,OAAO,IAAI,CAACC,KAAK,CAACF,MAAM,CAACC,QAAQ,CAAC,EAAE;EACtC,CAAC;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AA,GAA0B,EAAE,KACX;EACjB,MAAM/D,SAAS,GAAG+D,MAAM,CAAC/D,SAAS,IAAI,UAAU;EAEhD,OAAO,IAAIkH,MAAM,CAAE9K,CAAC,KAAM;IACxB,CAACnD,MAAM,CAACC,QAAQ,GAAG,MAAK;MACtB,MAAMyP,OAAO,GAAGtN,KAAK,CAAClC,KAAK;MAC3B,MAAM8G,YAAY,GAAGD,SAAS,KAAK,UAAU,GACzC3E,KAAK,CAACK,gBAAgB,GACtBL,KAAK,CAACI,SAAS;MAEnB,MAAMqN,YAAY,GAAGH,OAAO,CAAClB,OAAO,EAAE;MAEtC,MAAMG,UAAU,GAAGA,CAAA,KAAK;QACtB,IAAI7E,OAAO,GAAG+F,YAAY,CAACzD,IAAI,EAAE;QACjC,OAAO,CAACtC,OAAO,CAAC+E,IAAI,EAAE;UACpB,MAAM,CAACnO,SAAS,EAAEC,QAAQ,CAAC,GAAGmJ,OAAO,CAAC5E,KAAK;UAC3C,MAAMyB,aAAa,GAAGK,YAAY,CAAClG,GAAG,CAACJ,SAAS,CAAC;UAEjD;UACA,IAAIiG,aAAa,KAAKd,SAAS,IAAIc,aAAa,CAACqC,MAAM,KAAK,CAAC,EAAE;YAC7D,OAAO;cAAE6F,IAAI,EAAE,KAAK;cAAE3J,KAAK,EAAE/B,CAAC,CAACzC,SAAS,EAAEC,QAAQ;YAAC,CAAE;UACvD;UACAmJ,OAAO,GAAG+F,YAAY,CAACzD,IAAI,EAAE;QAC/B;QAEA,OAAO;UAAEyC,IAAI,EAAE,IAAI;UAAE3J,KAAK,EAAEW;QAAS,CAAW;MAClD,CAAC;MAED,OAAO;QAAEuG,IAAI,EAAEuC;MAAU,CAAE;IAC7B;GACD,CAAC,CAAC;AACL,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/GroupBy.js.map b/backend/node_modules/effect/dist/esm/GroupBy.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c534f4a5113df8aa4260762b0b4dc40dec626c1c --- /dev/null +++ b/backend/node_modules/effect/dist/esm/GroupBy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"GroupBy.js","names":["internal","GroupByTypeId","evaluate","filter","first","make"],"sources":["../../src/GroupBy.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,QAAQ,MAAM,uBAAuB;AAQjD;;;;AAIA,OAAO,MAAMC,aAAa,GAAkBD,QAAQ,CAACC,aAAa;AAsClE;;;;;;;AAOA,OAAO,MAAMC,QAAQ,GAwBjBF,QAAQ,CAACE,QAAQ;AAErB;;;;;;AAMA,OAAO,MAAMC,MAAM,GAefH,QAAQ,CAACG,MAAM;AAEnB;;;;;;AAMA,OAAO,MAAMC,KAAK,GAedJ,QAAQ,CAACI,KAAK;AAElB;;;;;;AAMA,OAAO,MAAMC,IAAI,GAEUL,QAAQ,CAACK,IAAI","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/HKT.js.map b/backend/node_modules/effect/dist/esm/HKT.js.map new file mode 100644 index 0000000000000000000000000000000000000000..5cad0d3bc926b3aea55f06ca528f94d60da5ae1b --- /dev/null +++ b/backend/node_modules/effect/dist/esm/HKT.js.map @@ -0,0 +1 @@ +{"version":3,"file":"HKT.js","names":[],"sources":["../../src/HKT.ts"],"sourcesContent":[null],"mappings":"","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Hash.js.map b/backend/node_modules/effect/dist/esm/Hash.js.map new file mode 100644 index 0000000000000000000000000000000000000000..2c8ff6c347749dc6b040ebce4a4903fbf8e25d5b --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Hash.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Hash.js","names":["pipe","globalValue","hasProperty","structuralRegionState","randomHashCache","Symbol","for","WeakMap","symbol","hash","self","enabled","number","string","toString","String","Date","Number","isNaN","getTime","toISOString","URL","href","isHash","random","Error","has","set","Math","floor","MAX_SAFE_INTEGER","get","combine","b","optimize","n","u","Infinity","h","str","i","length","charCodeAt","structureKeys","o","keys","structure","Object","array","arr","cached","arguments","defineProperty","value","enumerable"],"sources":["../../src/Hash.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,SAASA,IAAI,QAAQ,eAAe;AACpC,SAASC,WAAW,QAAQ,kBAAkB;AAC9C,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SAASC,qBAAqB,QAAQ,YAAY;AAElD;AACA,MAAMC,eAAe,gBAAGH,WAAW,cACjCI,MAAM,CAACC,GAAG,CAAC,6BAA6B,CAAC,EACzC,MAAM,IAAIC,OAAO,EAAkB,CACpC;AAED;;;;AAIA,OAAO,MAAMC,MAAM,gBAAkBH,MAAM,CAACC,GAAG,CAAC,aAAa,CAAC;AAU9D;;;;AAIA,OAAO,MAAMG,IAAI,GAA+BC,IAAO,IAAI;EACzD,IAAIP,qBAAqB,CAACQ,OAAO,KAAK,IAAI,EAAE;IAC1C,OAAO,CAAC;EACV;EAEA,QAAQ,OAAOD,IAAI;IACjB,KAAK,QAAQ;MACX,OAAOE,MAAM,CAACF,IAAI,CAAC;IACrB,KAAK,QAAQ;MACX,OAAOG,MAAM,CAACH,IAAI,CAACI,QAAQ,CAAC,EAAE,CAAC,CAAC;IAClC,KAAK,SAAS;MACZ,OAAOD,MAAM,CAACE,MAAM,CAACL,IAAI,CAAC,CAAC;IAC7B,KAAK,QAAQ;MACX,OAAOG,MAAM,CAACE,MAAM,CAACL,IAAI,CAAC,CAAC;IAC7B,KAAK,QAAQ;MACX,OAAOG,MAAM,CAACH,IAAI,CAAC;IACrB,KAAK,WAAW;MACd,OAAOG,MAAM,CAAC,WAAW,CAAC;IAC5B,KAAK,UAAU;IACf,KAAK,QAAQ;MAAE;QACb,IAAIH,IAAI,KAAK,IAAI,EAAE;UACjB,OAAOG,MAAM,CAAC,MAAM,CAAC;QACvB,CAAC,MAAM,IAAIH,IAAI,YAAYM,IAAI,EAAE;UAC/B,IAAIC,MAAM,CAACC,KAAK,CAACR,IAAI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X,CAAC,GAAG,IAAI;EACZ,KAAK,IAAIE,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGS,GAAG,CAACR,MAAM,EAAED,CAAC,EAAE,EAAE;IACnCF,CAAC,GAAGtC,IAAI,CAACsC,CAAC,EAAEN,OAAO,CAACvB,IAAI,CAACwC,GAAG,CAACT,CAAC,CAAC,CAAC,CAAC,CAAC;EACpC;EACA,OAAON,QAAQ,CAACI,CAAC,CAAC;AACpB,CAAC;AAED;;;;AAIA,OAAO,MAAMY,MAAM,GAWf,SAAAA,CAAA;EACF,IAAIC,SAAS,CAACV,MAAM,KAAK,CAAC,EAAE;IAC1B,MAAM/B,IAAI,GAAGyC,SAAS,CAAC,CAAC,CAAW;IACnC,OAAO,UAAS1C,IAAY;MAC1BsC,MAAM,CAACK,cAAc,CAAC1C,IAAI,EAAEF,MAAM,EAAE;QAClC6C,KAAKA,CAAA;UACH,OAAO5C,IAAI;QACb,CAAC;QACD6C,UAAU,EAAE;OACb,CAAC;MACF,OAAO7C,IAAI;IACb,CAAQ;EACV;EACA,MAAMC,IAAI,GAAGyC,SAAS,CAAC,CAAC,CAAW;EACnC,MAAM1C,IAAI,GAAG0C,SAAS,CAAC,CAAC,CAAW;EACnCJ,MAAM,CAACK,cAAc,CAAC1C,IAAI,EAAEF,MAAM,EAAE;IAClC6C,KAAKA,CAAA;MACH,OAAO5C,IAAI;IACb,CAAC;IACD6C,UAAU,EAAE;GACb,CAAC;EAEF,OAAO7C,IAAI;AACb,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/HashMap.js.map b/backend/node_modules/effect/dist/esm/HashMap.js.map new file mode 100644 index 0000000000000000000000000000000000000000..3550be23edd561e503822ea3ae5cc24e4bf05705 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/HashMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"HashMap.js","names":["HM","keySet_","TypeId","HashMapTypeId","isHashMap","empty","make","fromIterable","isEmpty","get","getHash","unsafeGet","has","hasHash","hasBy","set","keys","keySet","values","toValues","self","Array","from","entries","toEntries","size","countBy","beginMutation","endMutation","mutate","modifyAt","modifyHash","modify","union","remove","removeMany","map","flatMap","forEach","reduce","filter","compact","filterMap","findFirst","some","every"],"sources":["../../src/HashMap.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAOA,OAAO,KAAKA,EAAE,MAAM,uBAAuB;AAC3C,OAAO,KAAKC,OAAO,MAAM,8BAA8B;AAKvD,MAAMC,MAAM,GAAkBF,EAAE,CAACG,aAAuB;AA+ExD;;;;AAIA,OAAO,MAAMC,SAAS,GAWlBJ,EAAE,CAACI,SAAS;AAEhB;;;;;;AAMA,OAAO,MAAMC,KAAK,GAA8CL,EAAE,CAACK,KAAK;AAExE;;;;;;AAMA,OAAO,MAAMC,IAAI,GAKbN,EAAE,CAACM,IAAI;AAEX;;;;;;AAMA,OAAO,MAAMC,YAAY,GAAgEP,EAAE,CAACO,YAAY;AAExG;;;;;;AAMA,OAAO,MAAMC,OAAO,GAA2CR,EAAE,CAACQ,OAAO;AAEzE;;;;;;;AAOA,OAAO,MAAMC,GAAG,GAiBZT,EAAE,CAACS,GAAG;AAEV;;;;;;AAMA,OAAO,MAAMC,OAAO,GAehBV,EAAE,CAACU,OAAO;AAEd;;;;;;;AAOA,OAAO,MAAMC,SAAS,GAiBlBX,EAAE,CAACW,SAAS;AAEhB;;;;;;AAMA,OAAO,MAAMC,GAAG,GAeZZ,EAAE,CAACY,GAAG;AAEV;;;;;;;AAOA,OAAO,MAAMC,OAAO,GAiBhBb,EAAE,CAACa,OAAO;AAEd;;;;;;;;;;;;;;;;AAgBA,OAAO,MAAMC,KAAK,GAsCdd,EAAE,CAACc,KAAK;AAEZ;;;;;;AAMA,OAAO,MAAMC,GAAG,GAeZf,EAAE,CAACe,GAAG;AAEV;;;;;;AAMA,OAAO,MAAMC,IAAI,GAAuDhB,EAAE,CAACgB,IAAI;AAE/E;;;;;;AAMA,OAAO,MAAMC,MAAM,GAA8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,OAAO,MAAMC,OAAO,GAmBhBrC,EAAE,CAACqC,OAAO;AAEd;;;;;;AAMA,OAAO,MAAMC,OAAO,GAehBtC,EAAE,CAACsC,OAAO;AAEd;;;;;;AAMA,OAAO,MAAMC,MAAM,GAefvC,EAAE,CAACuC,MAAM;AAEb;;;;;;AAMA,OAAO,MAAMC,MAAM,GA6BfxC,EAAE,CAACwC,MAAM;AAEb;;;;;;AAMA,OAAO,MAAMC,OAAO,GAAyDzC,EAAE,CAACyC,OAAO;AAEvF;;;;;;;AAOA,OAAO,MAAMC,SAAS,GAiBlB1C,EAAE,CAAC0C,SAAS;AAEhB;;;;;;;AAOA,OAAO,MAAMC,SAAS,GAiClB3C,EAAE,CAAC2C,SAAS;AAEhB;;;;;;AAMA,OAAO,MAAMC,IAAI,GAeb5C,EAAE,CAAC4C,IAAI;AAEX;;;;;;;;;AASA,OAAO,MAAMC,KAAK,GAqBd7C,EAAE,CAAC6C,KAAK","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/HashRing.js b/backend/node_modules/effect/dist/esm/HashRing.js new file mode 100644 index 0000000000000000000000000000000000000000..3d753a5509074f23788f82d8db4814616428f48e --- /dev/null +++ b/backend/node_modules/effect/dist/esm/HashRing.js @@ -0,0 +1,245 @@ +/** + * @since 3.19.0 + * @experimental + */ +import { dual } from "./Function.js"; +import * as Hash from "./Hash.js"; +import * as Inspectable from "./Inspectable.js"; +import * as Iterable from "./Iterable.js"; +import { pipeArguments } from "./Pipeable.js"; +import { hasProperty } from "./Predicate.js"; +import * as PrimaryKey from "./PrimaryKey.js"; +const TypeId = "~effect/cluster/HashRing"; +/** + * @since 3.19.0 + * @category Guards + * @experimental + */ +export const isHashRing = u => hasProperty(u, TypeId); +/** + * @since 3.19.0 + * @category Constructors + * @experimental + */ +export const make = options => { + const self = Object.create(Proto); + self.baseWeight = Math.max(options?.baseWeight ?? 128, 1); + self.totalWeightCache = 0; + self.nodes = new Map(); + self.ring = []; + return self; +}; +const Proto = { + [TypeId]: TypeId, + [Symbol.iterator]() { + return Iterable.map(this.nodes.values(), ([n]) => n)[Symbol.iterator](); + }, + pipe() { + return pipeArguments(this, arguments); + }, + ...Inspectable.BaseProto, + toJSON() { + return { + _id: "HashRing", + baseWeight: this.baseWeight, + nodes: this.ring.map(([, n]) => this.nodes.get(n)[0]) + }; + } +}; +/** + * Add new nodes to the ring. If a node already exists in the ring, it + * will be updated. For example, you can use this to update the node's weight. + * + * @since 3.19.0 + * @category Combinators + * @experimental + */ +export const addMany = /*#__PURE__*/dual(args => isHashRing(args[0]), (self, nodes, options) => { + const weight = Math.max(options?.weight ?? 1, 0.1); + const keys = []; + let toRemove; + for (const node of nodes) { + const key = PrimaryKey.value(node); + const entry = self.nodes.get(key); + if (entry) { + if (entry[1] === weight) continue; + toRemove ??= new Set(); + toRemove.add(key); + self.totalWeightCache -= entry[1]; + self.totalWeightCache += weight; + entry[1] = weight; + } else { + self.nodes.set(key, [node, weight]); + self.totalWeightCache += weight; + } + keys.push(key); + } + if (toRemove) { + self.ring = self.ring.filter(([, n]) => !toRemove.has(n)); + } + addNodesToRing(self, keys, Math.round(weight * self.baseWeight)); + return self; +}); +function addNodesToRing(self, keys, weight) { + for (let i = weight; i > 0; i--) { + for (let j = 0; j < keys.length; j++) { + const key = keys[j]; + self.ring.push([Hash.string(`${key}:${i}`), key]); + } + } + self.ring.sort((a, b) => a[0] - b[0]); +} +/** + * Add a new node to the ring. If the node already exists in the ring, it + * will be updated. For example, you can use this to update the node's weight. + * + * @since 3.19.0 + * @category Combinators + * @experimental + */ +export const add = /*#__PURE__*/dual(args => isHashRing(args[0]), (self, node, options) => addMany(self, [node], options)); +/** + * Removes the node from the ring. No-op's if the node does not exist. + * + * @since 3.19.0 + * @category Combinators + * @experimental + */ +export const remove = /*#__PURE__*/dual(2, (self, node) => { + const key = PrimaryKey.value(node); + const entry = self.nodes.get(key); + if (entry) { + self.nodes.delete(key); + self.ring = self.ring.filter(([, n]) => n !== key); + self.totalWeightCache -= entry[1]; + } + return self; +}); +/** + * @since 3.19.0 + * @category Combinators + * @experimental + */ +export const has = /*#__PURE__*/dual(2, (self, node) => self.nodes.has(PrimaryKey.value(node))); +/** + * Gets the node which should handle the given input. Returns undefined if + * the hashring has no elements with weight. + * + * @since 3.19.0 + * @category Combinators + * @experimental + */ +export const get = (self, input) => { + if (self.ring.length === 0) { + return undefined; + } + const index = getIndexForInput(self, Hash.string(input))[0]; + const node = self.ring[index][1]; + return self.nodes.get(node)[0]; +}; +/** + * Distributes `count` shards across the nodes in the ring, attempting to + * balance the number of shards allocated to each node. Returns undefined if + * the hashring has no elements with weight. + * + * @since 3.19.0 + * @category Combinators + * @experimental + */ +export const getShards = (self, count) => { + if (self.ring.length === 0) { + return undefined; + } + const shards = new Array(count); + // for tracking how many shards have been allocated to each node + const allocations = new Map(); + // for tracking which shards still need to be allocated + const remaining = new Set(); + // for tracking which nodes have reached the max allocation + const exclude = new Set(); + // First pass - allocate the closest nodes, skipping nodes that have reached + // max + const distances = new Array(count); + for (let shard = 0; shard < count; shard++) { + const hash = shardHashes[shard] ??= Hash.string(`shard-${shard}`); + const [index, distance] = getIndexForInput(self, hash); + const node = self.ring[index][1]; + distances[shard] = [shard, node, distance]; + remaining.add(shard); + } + distances.sort((a, b) => a[2] - b[2]); + for (let i = 0; i < count; i++) { + const [shard, node] = distances[i]; + if (exclude.has(node)) continue; + const [value, weight] = self.nodes.get(node); + shards[shard] = value; + remaining.delete(shard); + const nodeCount = (allocations.get(node) ?? 0) + 1; + allocations.set(node, nodeCount); + const maxPerNode = Math.max(1, Math.floor(count * (weight / self.totalWeightCache))); + if (nodeCount >= maxPerNode) { + exclude.add(node); + } + } + // Second pass - allocate any remaining shards, skipping nodes that have + // reached max + let allAtMax = exclude.size === self.nodes.size; + remaining.forEach(shard => { + const index = getIndexForInput(self, shardHashes[shard], allAtMax ? undefined : exclude)[0]; + const node = self.ring[index][1]; + const [value, weight] = self.nodes.get(node); + shards[shard] = value; + if (allAtMax) return; + const nodeCount = (allocations.get(node) ?? 0) + 1; + allocations.set(node, nodeCount); + const maxPerNode = Math.max(1, Math.floor(count * (weight / self.totalWeightCache))); + if (nodeCount >= maxPerNode) { + exclude.add(node); + if (exclude.size === self.nodes.size) { + allAtMax = true; + } + } + }); + return shards; +}; +const shardHashes = []; +function getIndexForInput(self, hash, exclude) { + const ring = self.ring; + const len = ring.length; + let mid; + let lo = 0; + let hi = len - 1; + while (lo <= hi) { + mid = (lo + hi) / 2 >>> 0; + if (ring[mid][0] >= hash) { + hi = mid - 1; + } else { + lo = mid + 1; + } + } + const a = lo === len ? lo - 1 : lo; + const distA = Math.abs(ring[a][0] - hash); + if (exclude === undefined) { + const b = lo - 1; + if (b < 0) { + return [a, distA]; + } + const distB = Math.abs(ring[b][0] - hash); + return distA <= distB ? [a, distA] : [b, distB]; + } else if (!exclude.has(ring[a][1])) { + return [a, distA]; + } + const range = Math.max(lo, len - lo); + for (let i = 1; i < range; i++) { + let index = lo - i; + if (index >= 0 && index < len && !exclude.has(ring[index][1])) { + return [index, Math.abs(ring[index][0] - hash)]; + } + index = lo + i; + if (index >= 0 && index < len && !exclude.has(ring[index][1])) { + return [index, Math.abs(ring[index][0] - hash)]; + } + } + return [a, distA]; +} +//# sourceMappingURL=HashRing.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/HashRing.js.map b/backend/node_modules/effect/dist/esm/HashRing.js.map new file mode 100644 index 0000000000000000000000000000000000000000..2d86608830fad19af80ed75390fe25ab1c8056c8 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/HashRing.js.map @@ -0,0 +1 @@ +{"version":3,"file":"HashRing.js","names":["dual","Hash","Inspectable","Iterable","pipeArguments","hasProperty","PrimaryKey","TypeId","isHashRing","u","make","options","self","Object","create","Proto","baseWeight","Math","max","totalWeightCache","nodes","Map","ring","Symbol","iterator","map","values","n","pipe","arguments","BaseProto","toJSON","_id","get","addMany","args","weight","keys","toRemove","node","key","value","entry","Set","add","set","push","filter","has","addNodesToRing","round","i","j","length","string","sort","a","b","remove","delete","input","undefined","index","getIndexForInput","getShards","count","shards","Array","allocations","remaining","exclude","distances","shard","hash","shardHashes","distance","nodeCount","maxPerNode","floor","allAtMax","size","forEach","len","mid","lo","hi","distA","abs","distB","range"],"sources":["../../src/HashRing.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;AAIA,SAASA,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAC/C,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,SAAwBC,aAAa,QAAQ,eAAe;AAC5D,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,OAAO,KAAKC,UAAU,MAAM,iBAAiB;AAE7C,MAAMC,MAAM,GAAG,0BAAmC;AAelD;;;;;AAKA,OAAO,MAAMC,UAAU,GAAIC,CAAU,IAAyBJ,WAAW,CAACI,CAAC,EAAEF,MAAM,CAAC;AAEpF;;;;;AAKA,OAAO,MAAMG,IAAI,GAAqCC,OAErD,IAAiB;EAChB,MAAMC,IAAI,GAAGC,MAAM,CAACC,MAAM,CAACC,KAAK,CAAC;EACjCH,IAAI,CAACI,UAAU,GAAGC,IAAI,CAACC,GAAG,CAACP,OAAO,EAAEK,UAAU,IAAI,GAAG,EAAE,CAAC,CAAC;EACzDJ,IAAI,CAACO,gBAAgB,GAAG,CAAC;EACzBP,IAAI,CAACQ,KAAK,GAAG,IAAIC,GAAG,EAAE;EACtBT,IAAI,CAACU,IAAI,GAAG,EAAE;EACd,OAAOV,IAAI;AACb,CAAC;AAED,MAAMG,KAAK,GAAG;EACZ,CAACR,MAAM,GAAGA,MAAM;EAChB,CAACgB,MAAM,CAACC,QAAQ,IAAC;IACf,OAAOrB,QAAQ,CAACsB,GAAG,CAAC,IAAI,CAACL,KAAK,CAACM,MAAM,EAAE,EAAE,CAAC,CAACC,CAAC,CAAC,KAAKA,CAAC,CAAC,CAACJ,MAAM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AAO,CAACtB,GAAG,CAAC1B,IAAI,CAACwC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;MAC7D,OAAO,CAACA,KAAK,EAAE7C,IAAI,CAACsE,GAAG,CAACjE,IAAI,CAACwC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAGW,IAAI,CAAC,CAAC;IACjD;IACAX,KAAK,GAAGsB,EAAE,GAAGjC,CAAC;IACd,IAAIW,KAAK,IAAI,CAAC,IAAIA,KAAK,GAAGoB,GAAG,IAAI,CAACZ,OAAO,CAACtB,GAAG,CAAC1B,IAAI,CAACwC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;MAC7D,OAAO,CAACA,KAAK,EAAE7C,IAAI,CAACsE,GAAG,CAACjE,IAAI,CAACwC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAGW,IAAI,CAAC,CAAC;IACjD;EACF;EACA,OAAO,CAACjB,CAAC,EAAE8B,KAAK,CAAC;AACnB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Inspectable.js.map b/backend/node_modules/effect/dist/esm/Inspectable.js.map new file mode 100644 index 0000000000000000000000000000000000000000..939c54604d3af5a413a2e0f1389188b8a73c71d0 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Inspectable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Inspectable.js","names":["globalValue","Predicate","NodeInspectSymbol","Symbol","for","toJSON","x","hasProperty","isFunction","length","Array","isArray","map","redact","CIRCULAR","formatDate","date","toISOString","safeToString","input","s","toString","String","formatPropertyKey","name","isString","JSON","stringify","formatUnknown","options","space","seen","WeakSet","gap","isNumber","repeat","ind","d","wrap","v","body","ctor","constructor","Object","prototype","ownKeys","o","Reflect","go","has","add","join","inner","isDate","ignoreToString","Error","cause","isBoolean","isSymbol","isBigInt","Set","Map","from","isObject","keys","k","format","BaseProto","Class","toStringUnknown","u","whitespace","stringifyCircular","obj","cache","retVal","_key","value","includes","undefined","push","redactableState","fiberRefs","isRedactable","symbolRedactable","withRedactableContext","context","f","prev"],"sources":["../../src/Inspectable.ts"],"sourcesContent":[null],"mappings":"AAIA,SAASA,WAAW,QAAQ,kBAAkB;AAC9C,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAE3C;;;;AAIA,OAAO,MAAMC,iBAAiB,gBAAGC,MAAM,CAACC,GAAG,CAAC,4BAA4B,CAAC;AAkBzE;;;AAGA,OAAO,MAAMC,MAAM,GAAIC,CAAU,IAAa;EAC5C,IAAI;IACF,IACEL,SAAS,CAACM,WAAW,CAACD,CAAC,EAAE,QAAQ,CAAC,IAAIL,SAAS,CAACO,UAAU,CAACF,CAAC,CAAC,QAAQ,CAAC,CAAC,IACvEA,CAAC,CAAC,QAAQ,CAAC,CAACG,MAAM,KAAK,CAAC,EACxB;MACA,OAAOH,CAAC,CAACD,MAAM,EAAE;IACnB,CAAC,MAAM,IAAIK,KAAK,CAACC,OAAO,CAACL,CAAC,CAAC,EAAE;MAC3B,OAAOA,CAAC,CAACM,GAAG,CAACP,MAAM,CAAC;IACtB;EACF,CAAC,CAAC,MAAM;IACN,OAAO,EAAE;EACX;EACA,OAAOQ,MAAM,CAACP,CAAC,CAAC;AAClB,CAAC;AAED,MAAMQ,QAAQ,GAAG,YAAY;AAE7B;AACA,OAAM,SAAUC,UAAUA,CAACC,IAAU;EACnC,IAAI;IACF,OAAOA,IAAI,CAACC,WAAW,EAAE;EAC3B,CAAC,CAAC,MAAM;IACN,OAAO,cAAc;EACvB;AACF;AAEA,SAASC,YAAYA,CAACC,KAAU;EAC9B,IAAI;IACF,MAAMC,CAAC,GAAGD,KAAK,CAACE,QAAQ,EAAE;IAC1B,OAAO,OAAOD,CAAC,KAAK,QAAQ,GAAGA,CAAC,GAAGE,MAAM,CAACF,CAAC,CAAC;EAC9C,CAAC,CAAC,MAAM;IACN,OAAO,kBAAkB;EAC3B;AACF;AAEA;AACA,OAAM,SAAUG,iBAAiBA,CAACC,IAAiB;EACjD,OAAOvB,SAAS,C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AAGP,eAAe,CAACC,SAAS;EACtCD,eAAe,CAACC,SAAS,GAAGI,OAAO;EACnC,IAAI;IACF,OAAOC,CAAC,EAAE;EACZ,CAAC,SAAS;IACRN,eAAe,CAACC,SAAS,GAAGM,IAAI;EAClC;AACF,CAAC;AAED;;;;AAIA,OAAO,MAAM3E,MAAM,GAAIyD,CAAU,IAAa;EAC5C,IAAIa,YAAY,CAACb,CAAC,CAAC,IAAIW,eAAe,CAACC,SAAS,KAAKH,SAAS,EAAE;IAC9D,OAAOT,CAAC,CAACc,gBAAgB,CAAC,CAACH,eAAe,CAACC,SAAS,CAAC;EACvD;EACA,OAAOZ,CAAC;AACV,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Iterable.js b/backend/node_modules/effect/dist/esm/Iterable.js new file mode 100644 index 0000000000000000000000000000000000000000..1e4e105898657ac64ddf39a1024683955aa6267b --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Iterable.js @@ -0,0 +1,987 @@ +/** + * This module provides utility functions for working with Iterables in TypeScript. + * + * @since 2.0.0 + */ +import * as E from "./Either.js"; +import * as Equal from "./Equal.js"; +import { dual, identity } from "./Function.js"; +import * as O from "./Option.js"; +import { isBoolean } from "./Predicate.js"; +import * as Tuple from "./Tuple.js"; +/** + * Return a `Iterable` with element `i` initialized with `f(i)`. + * + * If the `length` is not specified, the `Iterable` will be infinite. + * + * **Note**. `length` is normalized to an integer >= 1. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { makeBy } from "effect/Iterable" + * + * assert.deepStrictEqual(Array.from(makeBy(n => n * 2, { length: 5 })), [0, 2, 4, 6, 8]) + * ``` + * + * @category constructors + * @since 2.0.0 + */ +export const makeBy = (f, options) => { + const max = options?.length !== undefined ? Math.max(1, Math.floor(options.length)) : Infinity; + return { + [Symbol.iterator]() { + let i = 0; + return { + next() { + if (i < max) { + return { + value: f(i++), + done: false + }; + } + return { + done: true, + value: undefined + }; + } + }; + } + }; +}; +/** + * Return a `Iterable` containing a range of integers, including both endpoints. + * + * If `end` is omitted, the range will not have an upper bound. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { range } from "effect/Iterable" + * + * assert.deepStrictEqual(Array.from(range(1, 3)), [1, 2, 3]) + * ``` + * + * @category constructors + * @since 2.0.0 + */ +export const range = (start, end) => { + if (end === undefined) { + return makeBy(i => start + i); + } + return makeBy(i => start + i, { + length: start <= end ? end - start + 1 : 1 + }); +}; +/** + * Return a `Iterable` containing a value repeated the specified number of times. + * + * **Note**. `n` is normalized to an integer >= 1. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { replicate } from "effect/Iterable" + * + * assert.deepStrictEqual(Array.from(replicate("a", 3)), ["a", "a", "a"]) + * ``` + * + * @category constructors + * @since 2.0.0 + */ +export const replicate = /*#__PURE__*/dual(2, (a, n) => makeBy(() => a, { + length: n +})); +/** + * Takes a record and returns an Iterable of tuples containing its keys and values. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { fromRecord } from "effect/Iterable" + * + * const x = { a: 1, b: 2, c: 3 } + * assert.deepStrictEqual(Array.from(fromRecord(x)), [["a", 1], ["b", 2], ["c", 3]]) + * ``` + * + * @category conversions + * @since 2.0.0 + */ +export const fromRecord = self => ({ + *[Symbol.iterator]() { + for (const key in self) { + if (Object.prototype.hasOwnProperty.call(self, key)) { + yield [key, self[key]]; + } + } + } +}); +/** + * Prepend an element to the front of an `Iterable`, creating a new `Iterable`. + * + * @category concatenating + * @since 2.0.0 + */ +export const prepend = /*#__PURE__*/dual(2, (self, head) => prependAll(self, [head])); +/** + * Prepends the specified prefix iterable to the beginning of the specified iterable. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Iterable } from "effect" + * + * assert.deepStrictEqual( + * Array.from(Iterable.prependAll([1, 2], ["a", "b"])), + * ["a", "b", 1, 2] + * ) + * ``` + * + * @category concatenating + * @since 2.0.0 + */ +export const prependAll = /*#__PURE__*/dual(2, (self, that) => appendAll(that, self)); +/** + * Append an element to the end of an `Iterable`, creating a new `Iterable`. + * + * @category concatenating + * @since 2.0.0 + */ +export const append = /*#__PURE__*/dual(2, (self, last) => appendAll(self, [last])); +/** + * Concatenates two iterables, combining their elements. + * + * @category concatenating + * @since 2.0.0 + */ +export const appendAll = /*#__PURE__*/dual(2, (self, that) => ({ + [Symbol.iterator]() { + const iterA = self[Symbol.iterator](); + let doneA = false; + let iterB; + return { + next() { + if (!doneA) { + const r = iterA.next(); + if (r.done) { + doneA = true; + iterB = that[Symbol.iterator](); + return iterB.next(); + } + return r; + } + return iterB.next(); + } + }; + } +})); +/** + * Reduce an `Iterable` from the left, keeping all intermediate results instead of only the final result. + * + * @category folding + * @since 2.0.0 + */ +export const scan = /*#__PURE__*/dual(3, (self, b, f) => ({ + [Symbol.iterator]() { + let acc = b; + let iterator; + function next() { + if (iterator === undefined) { + iterator = self[Symbol.iterator](); + return { + done: false, + value: acc + }; + } + const result = iterator.next(); + if (result.done) { + return result; + } + acc = f(acc, result.value); + return { + done: false, + value: acc + }; + } + return { + next + }; + } +})); +/** + * Determine if an `Iterable` is empty + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isEmpty } from "effect/Iterable" + * + * assert.deepStrictEqual(isEmpty([]), true); + * assert.deepStrictEqual(isEmpty([1, 2, 3]), false); + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isEmpty = self => { + const iterator = self[Symbol.iterator](); + return iterator.next().done === true; +}; +/** + * Return the number of elements in a `Iterable`. + * + * @category getters + * @since 2.0.0 + */ +export const size = self => { + const iterator = self[Symbol.iterator](); + let count = 0; + while (!iterator.next().done) { + count++; + } + return count; +}; +/** + * Get the first element of a `Iterable`, or `None` if the `Iterable` is empty. + * + * @category getters + * @since 2.0.0 + */ +export const head = self => { + const iterator = self[Symbol.iterator](); + const result = iterator.next(); + return result.done ? O.none() : O.some(result.value); +}; +/** + * Get the first element of a `Iterable`, or throw an error if the `Iterable` is empty. + * + * @category getters + * @since 3.3.0 + */ +export const unsafeHead = self => { + const iterator = self[Symbol.iterator](); + const result = iterator.next(); + if (result.done) throw new Error("unsafeHead: empty iterable"); + return result.value; +}; +/** + * Keep only a max number of elements from the start of an `Iterable`, creating a new `Iterable`. + * + * **Note**. `n` is normalized to a non negative integer. + * + * @category getters + * @since 2.0.0 + */ +export const take = /*#__PURE__*/dual(2, (self, n) => ({ + [Symbol.iterator]() { + let i = 0; + const iterator = self[Symbol.iterator](); + return { + next() { + if (i < n) { + i++; + return iterator.next(); + } + return { + done: true, + value: undefined + }; + } + }; + } +})); +/** + * Calculate the longest initial Iterable for which all element satisfy the specified predicate, creating a new `Iterable`. + * + * @category getters + * @since 2.0.0 + */ +export const takeWhile = /*#__PURE__*/dual(2, (self, predicate) => ({ + [Symbol.iterator]() { + const iterator = self[Symbol.iterator](); + let i = 0; + return { + next() { + const result = iterator.next(); + if (result.done || !predicate(result.value, i++)) { + return { + done: true, + value: undefined + }; + } + return result; + } + }; + } +})); +/** + * Drop a max number of elements from the start of an `Iterable` + * + * **Note**. `n` is normalized to a non negative integer. + * + * @category getters + * @since 2.0.0 + */ +export const drop = /*#__PURE__*/dual(2, (self, n) => ({ + [Symbol.iterator]() { + const iterator = self[Symbol.iterator](); + let i = 0; + return { + next() { + while (i < n) { + const result = iterator.next(); + if (result.done) { + return { + done: true, + value: undefined + }; + } + i++; + } + return iterator.next(); + } + }; + } +})); +/** + * Returns the first element that satisfies the specified + * predicate, or `None` if no such element exists. + * + * @category elements + * @since 2.0.0 + */ +export const findFirst = /*#__PURE__*/dual(2, (self, f) => { + let i = 0; + for (const a of self) { + const o = f(a, i); + if (isBoolean(o)) { + if (o) { + return O.some(a); + } + } else { + if (O.isSome(o)) { + return o; + } + } + i++; + } + return O.none(); +}); +/** + * Find the last element for which a predicate holds. + * + * @category elements + * @since 2.0.0 + */ +export const findLast = /*#__PURE__*/dual(2, (self, f) => { + let i = 0; + let last = O.none(); + for (const a of self) { + const o = f(a, i); + if (isBoolean(o)) { + if (o) { + last = O.some(a); + } + } else { + if (O.isSome(o)) { + last = o; + } + } + i++; + } + return last; +}); +/** + * Takes two `Iterable`s and returns an `Iterable` of corresponding pairs. + * + * @category zipping + * @since 2.0.0 + */ +export const zip = /*#__PURE__*/dual(2, (self, that) => zipWith(self, that, Tuple.make)); +/** + * Apply a function to pairs of elements at the same index in two `Iterable`s, collecting the results. If one + * input `Iterable` is short, excess elements of the longer `Iterable` are discarded. + * + * @category zipping + * @since 2.0.0 + */ +export const zipWith = /*#__PURE__*/dual(3, (self, that, f) => ({ + [Symbol.iterator]() { + const selfIterator = self[Symbol.iterator](); + const thatIterator = that[Symbol.iterator](); + return { + next() { + const selfResult = selfIterator.next(); + const thatResult = thatIterator.next(); + if (selfResult.done || thatResult.done) { + return { + done: true, + value: undefined + }; + } + return { + done: false, + value: f(selfResult.value, thatResult.value) + }; + } + }; + } +})); +/** + * Places an element in between members of an `Iterable`. + * If the input is a non-empty array, the result is also a non-empty array. + * + * @since 2.0.0 + */ +export const intersperse = /*#__PURE__*/dual(2, (self, middle) => ({ + [Symbol.iterator]() { + const iterator = self[Symbol.iterator](); + let next = iterator.next(); + let emitted = false; + return { + next() { + if (next.done) { + return next; + } else if (emitted) { + emitted = false; + return { + done: false, + value: middle + }; + } + emitted = true; + const result = next; + next = iterator.next(); + return result; + } + }; + } +})); +/** + * Returns a function that checks if an `Iterable` contains a given value using a provided `isEquivalent` function. + * + * @category elements + * @since 2.0.0 + */ +export const containsWith = isEquivalent => dual(2, (self, a) => { + for (const i of self) { + if (isEquivalent(a, i)) { + return true; + } + } + return false; +}); +const _equivalence = /*#__PURE__*/Equal.equivalence(); +/** + * Returns a function that checks if a `Iterable` contains a given value using the default `Equivalence`. + * + * @category elements + * @since 2.0.0 + */ +export const contains = /*#__PURE__*/containsWith(_equivalence); +/** + * Splits an `Iterable` into length-`n` pieces. The last piece will be shorter if `n` does not evenly divide the length of + * the `Iterable`. + * + * @category splitting + * @since 2.0.0 + */ +export const chunksOf = /*#__PURE__*/dual(2, (self, n) => { + const safeN = Math.max(1, Math.floor(n)); + return { + [Symbol.iterator]() { + let iterator = self[Symbol.iterator](); + return { + next() { + if (iterator === undefined) { + return { + done: true, + value: undefined + }; + } + const chunk = []; + for (let i = 0; i < safeN; i++) { + const result = iterator.next(); + if (result.done) { + iterator = undefined; + return chunk.length === 0 ? { + done: true, + value: undefined + } : { + done: false, + value: chunk + }; + } + chunk.push(result.value); + } + return { + done: false, + value: chunk + }; + } + }; + } + }; +}); +/** + * Group equal, consecutive elements of an `Iterable` into `NonEmptyArray`s using the provided `isEquivalent` function. + * + * @category grouping + * @since 2.0.0 + */ +export const groupWith = /*#__PURE__*/dual(2, (self, isEquivalent) => ({ + [Symbol.iterator]() { + const iterator = self[Symbol.iterator](); + let nextResult; + return { + next() { + let result; + if (nextResult !== undefined) { + if (nextResult.done) { + return { + done: true, + value: undefined + }; + } + result = nextResult; + nextResult = undefined; + } else { + result = iterator.next(); + if (result.done) { + return { + done: true, + value: undefined + }; + } + } + const chunk = [result.value]; + while (true) { + const next = iterator.next(); + if (next.done || !isEquivalent(result.value, next.value)) { + nextResult = next; + return { + done: false, + value: chunk + }; + } + chunk.push(next.value); + } + } + }; + } +})); +/** + * Group equal, consecutive elements of an `Iterable` into `NonEmptyArray`s. + * + * @category grouping + * @since 2.0.0 + */ +export const group = /*#__PURE__*/groupWith(/*#__PURE__*/Equal.equivalence()); +/** + * Splits an `Iterable` into sub-non-empty-arrays stored in an object, based on the result of calling a `string`-returning + * function on each element, and grouping the results according to values returned + * + * @category grouping + * @since 2.0.0 + */ +export const groupBy = /*#__PURE__*/dual(2, (self, f) => { + const out = {}; + for (const a of self) { + const k = f(a); + if (Object.prototype.hasOwnProperty.call(out, k)) { + out[k].push(a); + } else { + out[k] = [a]; + } + } + return out; +}); +const constEmpty = { + [Symbol.iterator]() { + return constEmptyIterator; + } +}; +const constEmptyIterator = { + next() { + return { + done: true, + value: undefined + }; + } +}; +/** + * @category constructors + * @since 2.0.0 + */ +export const empty = () => constEmpty; +/** + * Constructs a new `Iterable
` from the specified value. + * + * @category constructors + * @since 2.0.0 + */ +export const of = a => [a]; +/** + * @category mapping + * @since 2.0.0 + */ +export const map = /*#__PURE__*/dual(2, (self, f) => ({ + [Symbol.iterator]() { + const iterator = self[Symbol.iterator](); + let i = 0; + return { + next() { + const result = iterator.next(); + if (result.done) { + return { + done: true, + value: undefined + }; + } + return { + done: false, + value: f(result.value, i++) + }; + } + }; + } +})); +/** + * Applies a function to each element in an Iterable and returns a new Iterable containing the concatenated mapped elements. + * + * @category sequencing + * @since 2.0.0 + */ +export const flatMap = /*#__PURE__*/dual(2, (self, f) => flatten(map(self, f))); +/** + * Flattens an Iterable of Iterables into a single Iterable + * + * @category sequencing + * @since 2.0.0 + */ +export const flatten = self => ({ + [Symbol.iterator]() { + const outerIterator = self[Symbol.iterator](); + let innerIterator; + function next() { + if (innerIterator === undefined) { + const next = outerIterator.next(); + if (next.done) { + return next; + } + innerIterator = next.value[Symbol.iterator](); + } + const result = innerIterator.next(); + if (result.done) { + innerIterator = undefined; + return next(); + } + return result; + } + return { + next + }; + } +}); +/** + * @category filtering + * @since 2.0.0 + */ +export const filterMap = /*#__PURE__*/dual(2, (self, f) => ({ + [Symbol.iterator]() { + const iterator = self[Symbol.iterator](); + let i = 0; + return { + next() { + let result = iterator.next(); + while (!result.done) { + const b = f(result.value, i++); + if (O.isSome(b)) { + return { + done: false, + value: b.value + }; + } + result = iterator.next(); + } + return { + done: true, + value: undefined + }; + } + }; + } +})); +/** + * Transforms all elements of the `Iterable` for as long as the specified function returns some value + * + * @category filtering + * @since 2.0.0 + */ +export const filterMapWhile = /*#__PURE__*/dual(2, (self, f) => ({ + [Symbol.iterator]() { + const iterator = self[Symbol.iterator](); + let i = 0; + return { + next() { + const result = iterator.next(); + if (result.done) { + return { + done: true, + value: undefined + }; + } + const b = f(result.value, i++); + if (O.isSome(b)) { + return { + done: false, + value: b.value + }; + } + return { + done: true, + value: undefined + }; + } + }; + } +})); +/** + * Retrieves the `Some` values from an `Iterable` of `Option`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Iterable, Option } from "effect" + * + * assert.deepStrictEqual( + * Array.from(Iterable.getSomes([Option.some(1), Option.none(), Option.some(2)])), + * [1, 2] + * ) + * ``` + * + * @category filtering + * @since 2.0.0 + */ +export const getSomes = /*#__PURE__*/filterMap(identity); +/** + * Retrieves the `Left` values from an `Iterable` of `Either`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Iterable, Either } from "effect" + * + * assert.deepStrictEqual( + * Array.from(Iterable.getLefts([Either.right(1), Either.left("err"), Either.right(2)])), + * ["err"] + * ) + * ``` + * + * @category filtering + * @since 2.0.0 + */ +export const getLefts = self => filterMap(self, E.getLeft); +/** + * Retrieves the `Right` values from an `Iterable` of `Either`s. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Iterable, Either } from "effect" + * + * assert.deepStrictEqual( + * Array.from(Iterable.getRights([Either.right(1), Either.left("err"), Either.right(2)])), + * [1, 2] + * ) + * ``` + * + * @category filtering + * @since 2.0.0 + */ +export const getRights = self => filterMap(self, E.getRight); +/** + * @category filtering + * @since 2.0.0 + */ +export const filter = /*#__PURE__*/dual(2, (self, predicate) => ({ + [Symbol.iterator]() { + const iterator = self[Symbol.iterator](); + let i = 0; + return { + next() { + let result = iterator.next(); + while (!result.done) { + if (predicate(result.value, i++)) { + return { + done: false, + value: result.value + }; + } + result = iterator.next(); + } + return { + done: true, + value: undefined + }; + } + }; + } +})); +/** + * @category sequencing + * @since 2.0.0 + */ +export const flatMapNullable = /*#__PURE__*/dual(2, (self, f) => filterMap(self, a => { + const b = f(a); + return b == null ? O.none() : O.some(b); +})); +/** + * Check if a predicate holds true for some `Iterable` element. + * + * @category elements + * @since 2.0.0 + */ +export const some = /*#__PURE__*/dual(2, (self, predicate) => { + let i = 0; + for (const a of self) { + if (predicate(a, i++)) { + return true; + } + } + return false; +}); +/** + * @category constructors + * @since 2.0.0 + */ +export const unfold = (b, f) => ({ + [Symbol.iterator]() { + let next = b; + return { + next() { + const o = f(next); + if (O.isNone(o)) { + return { + done: true, + value: undefined + }; + } + const [a, b] = o.value; + next = b; + return { + done: false, + value: a + }; + } + }; + } +}); +/** + * Iterate over the `Iterable` applying `f`. + * + * @since 2.0.0 + */ +export const forEach = /*#__PURE__*/dual(2, (self, f) => { + let i = 0; + for (const a of self) { + f(a, i++); + } +}); +/** + * @category folding + * @since 2.0.0 + */ +export const reduce = /*#__PURE__*/dual(3, (self, b, f) => { + if (Array.isArray(self)) { + return self.reduce(f, b); + } + let i = 0; + let result = b; + for (const n of self) { + result = f(result, n, i++); + } + return result; +}); +/** + * Deduplicates adjacent elements that are identical using the provided `isEquivalent` function. + * + * @since 2.0.0 + */ +export const dedupeAdjacentWith = /*#__PURE__*/dual(2, (self, isEquivalent) => ({ + [Symbol.iterator]() { + const iterator = self[Symbol.iterator](); + let first = true; + let last; + function next() { + const result = iterator.next(); + if (result.done) { + return { + done: true, + value: undefined + }; + } + if (first) { + first = false; + last = result.value; + return result; + } + const current = result.value; + if (isEquivalent(last, current)) { + return next(); + } + last = current; + return result; + } + return { + next + }; + } +})); +/** + * Deduplicates adjacent elements that are identical. + * + * @since 2.0.0 + */ +export const dedupeAdjacent = /*#__PURE__*/dedupeAdjacentWith(/*#__PURE__*/Equal.equivalence()); +/** + * Zips this Iterable crosswise with the specified Iterable using the specified combiner. + * + * @since 2.0.0 + * @category elements + */ +export const cartesianWith = /*#__PURE__*/dual(3, (self, that, f) => flatMap(self, a => map(that, b => f(a, b)))); +/** + * Zips this Iterable crosswise with the specified Iterable. + * + * @since 2.0.0 + * @category elements + */ +export const cartesian = /*#__PURE__*/dual(2, (self, that) => cartesianWith(self, that, (a, b) => [a, b])); +/** + * Counts all the element of the given iterable that pass the given predicate + * + * **Example** + * + * ```ts + * import { Iterable } from "effect" + * + * const result = Iterable.countBy([1, 2, 3, 4, 5], n => n % 2 === 0) + * console.log(result) // 2 + * ``` + * + * @category folding + * @since 3.16.0 + */ +export const countBy = /*#__PURE__*/dual(2, (self, f) => { + let count = 0; + let i = 0; + for (const a of self) { + if (f(a, i)) { + count++; + } + i++; + } + return count; +}); +//# sourceMappingURL=Iterable.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Iterable.js.map b/backend/node_modules/effect/dist/esm/Iterable.js.map new file mode 100644 index 0000000000000000000000000000000000000000..6d01aa989936efccacf34dbf10e2abbf0c4beb82 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Iterable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Iterable.js","names":["E","Equal","dual","identity","O","isBoolean","Tuple","makeBy","f","options","max","length","undefined","Math","floor","Infinity","Symbol","iterator","i","next","value","done","range","start","end","replicate","a","n","fromRecord","self","key","Object","prototype","hasOwnProperty","call","prepend","head","prependAll","that","appendAll","append","last","iterA","doneA","iterB","r","scan","b","acc","result","isEmpty","size","count","none","some","unsafeHead","Error","take","takeWhile","predicate","drop","findFirst","o","isSome","findLast","zip","zipWith","make","selfIterator","thatIterator","selfResult","thatResult","intersperse","middle","emitted","containsWith","isEquivalent","_equivalence","equivalence","contains","chunksOf","safeN","chunk","push","groupWith","nextResult","group","groupBy","out","k","constEmpty","constEmptyIterator","empty","of","map","flatMap","flatten","outerIterator","innerIterator","filterMap","filterMapWhile","getSomes","getLefts","getLeft","getRights","getRight","filter","flatMapNullable","unfold","isNone","forEach","reduce","Array","isArray","dedupeAdjacentWith","first","current","dedupeAdjacent","cartesianWith","cartesian","countBy"],"sources":["../../src/Iterable.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;AAQA,OAAO,KAAKA,CAAC,MAAM,aAAa;AAChC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,SAASC,IAAI,EAAEC,QAAQ,QAAQ,eAAe;AAE9C,OAAO,KAAKC,CAAC,MAAM,aAAa;AAChC,SAASC,SAAS,QAAQ,gBAAgB;AAE1C,OAAO,KAAKC,KAAK,MAAM,YAAY;AAGnC;;;;;;;;;;;;;;;;;;AAkB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AC,CAAC,CAClD;AAED;;;;;;AAMA,OAAO,MAAMwE,SAAS,gBAelBrH,IAAI,CACN,CAAC,EACD,CAAO2B,IAAiB,EAAES,IAAiB,KAAuBgF,aAAa,CAACzF,IAAI,EAAES,IAAI,EAAE,CAACZ,CAAC,EAAEqB,CAAC,KAAK,CAACrB,CAAC,EAAEqB,CAAC,CAAC,CAAC,CAC9G;AAED;;;;;;;;;;;;;;;AAeA,OAAO,MAAMyE,OAAO,gBAiChBtH,IAAI,CACN,CAAC,EACD,CACE2B,IAAiB,EACjBrB,CAA+B,KACrB;EACV,IAAI4C,KAAK,GAAG,CAAC;EACb,IAAIlC,CAAC,GAAG,CAAC;EACT,KAAK,MAAMQ,CAAC,IAAIG,IAAI,EAAE;IACpB,IAAIrB,CAAC,CAACkB,CAAC,EAAER,CAAC,CAAC,EAAE;MACXkC,KAAK,EAAE;IACT;IACAlC,CAAC,EAAE;EACL;EACA,OAAOkC,KAAK;AACd,CAAC,CACF","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/JSONSchema.js b/backend/node_modules/effect/dist/esm/JSONSchema.js new file mode 100644 index 0000000000000000000000000000000000000000..d06cf92dc523893e98f7380268f45df9628b9275 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/JSONSchema.js @@ -0,0 +1,715 @@ +/** + * @since 3.10.0 + */ +import * as Arr from "./Array.js"; +import * as errors_ from "./internal/schema/errors.js"; +import * as schemaId_ from "./internal/schema/schemaId.js"; +import * as Option from "./Option.js"; +import * as ParseResult from "./ParseResult.js"; +import * as Predicate from "./Predicate.js"; +import * as Record from "./Record.js"; +import * as AST from "./SchemaAST.js"; +/** + * Generates a JSON Schema from a schema. + * + * **Options** + * + * - `target`: The target JSON Schema version. Possible values are: + * - `"jsonSchema7"`: JSON Schema draft-07 (default behavior). + * - `"jsonSchema2019-09"`: JSON Schema draft-2019-09. + * - `"jsonSchema2020-12"`: JSON Schema draft-2020-12. + * - `"openApi3.1"`: OpenAPI 3.1. + * + * @category encoding + * @since 3.10.0 + */ +export const make = (schema, options) => { + const definitions = {}; + const target = options?.target ?? "jsonSchema7"; + const ast = AST.isTransformation(schema.ast) && isParseJsonTransformation(schema.ast.from) + // Special case top level `parseJson` transformations + ? schema.ast.to : schema.ast; + const jsonSchema = fromAST(ast, { + definitions, + target + }); + const out = { + $schema: getMetaSchemaUri(target), + $defs: {}, + ...jsonSchema + }; + if (Record.isEmptyRecord(definitions)) { + delete out.$defs; + } else { + out.$defs = definitions; + } + return out; +}; +/** @internal */ +export function getMetaSchemaUri(target) { + switch (target) { + case "jsonSchema7": + return "http://json-schema.org/draft-07/schema#"; + case "jsonSchema2019-09": + return "https://json-schema.org/draft/2019-09/schema"; + case "jsonSchema2020-12": + case "openApi3.1": + return "https://json-schema.org/draft/2020-12/schema"; + } +} +/** + * Returns a JSON Schema with additional options and definitions. + * + * **Warning** + * + * This function is experimental and subject to change. + * + * **Options** + * + * - `definitions`: A record of definitions that are included in the schema. + * - `definitionPath`: The path to the definitions within the schema (defaults + * to "#/$defs/"). + * - `target`: Which spec to target. Possible values are: + * - `'jsonSchema7'`: JSON Schema draft-07 (default behavior). + * - `'jsonSchema2019-09'`: JSON Schema draft-2019-09. + * - `'openApi3.1'`: OpenAPI 3.1. + * - `topLevelReferenceStrategy`: Controls the handling of the top-level + * reference. Possible values are: + * - `"keep"`: Keep the top-level reference (default behavior). + * - `"skip"`: Skip the top-level reference. + * - `additionalPropertiesStrategy`: Controls the handling of additional properties. Possible values are: + * - `"strict"`: Disallow additional properties (default behavior). + * - `"allow"`: Allow additional properties. + * + * @category encoding + * @since 3.11.5 + * @experimental + */ +export const fromAST = (ast, options) => { + const definitionPath = options.definitionPath ?? "#/$defs/"; + const getRef = id => definitionPath + id; + const target = options.target ?? "jsonSchema7"; + const topLevelReferenceStrategy = options.topLevelReferenceStrategy ?? "keep"; + const additionalPropertiesStrategy = options.additionalPropertiesStrategy ?? "strict"; + return go(ast, options.definitions, "handle-identifier", [], { + getRef, + target, + topLevelReferenceStrategy, + additionalPropertiesStrategy + }, "handle-annotation", "handle-errors"); +}; +const constNever = { + $id: "/schemas/never", + not: {} +}; +const constAny = { + $id: "/schemas/any" +}; +const constUnknown = { + $id: "/schemas/unknown" +}; +const constVoid = { + $id: "/schemas/void" +}; +const constObject = { + $id: "/schemas/object", + "anyOf": [{ + "type": "object" + }, { + "type": "array" + }] +}; +const constEmptyStruct = { + $id: "/schemas/%7B%7D", + "anyOf": [{ + "type": "object" + }, { + "type": "array" + }] +}; +function getRawDescription(annotated) { + if (annotated !== undefined) return Option.getOrUndefined(AST.getDescriptionAnnotation(annotated)); +} +function getRawTitle(annotated) { + if (annotated !== undefined) return Option.getOrUndefined(AST.getTitleAnnotation(annotated)); +} +function getRawDefault(annotated) { + if (annotated !== undefined) return AST.getDefaultAnnotation(annotated); + return Option.none(); +} +function encodeDefault(ast, def) { + const getOption = ParseResult.getOption(ast, false); + return getOption(def); +} +function getRawExamples(annotated) { + if (annotated !== undefined) return Option.getOrUndefined(AST.getExamplesAnnotation(annotated)); +} +function encodeExamples(ast, examples) { + const getOption = ParseResult.getOption(ast, false); + const out = Arr.filterMap(examples, e => getOption(e).pipe(Option.filter(isJsonValue))); + return out.length > 0 ? out : undefined; +} +function filterBuiltIn(ast, annotation, key) { + if (annotation !== undefined) { + switch (ast._tag) { + case "StringKeyword": + return annotation !== AST.stringKeyword.annotations[key] ? annotation : undefined; + case "NumberKeyword": + return annotation !== AST.numberKeyword.annotations[key] ? annotation : undefined; + case "BooleanKeyword": + return annotation !== AST.booleanKeyword.annotations[key] ? annotation : undefined; + } + } + return annotation; +} +function isJsonValue(value, visited = new Set()) { + if (value === null || typeof value === "string" || typeof value === "number" || typeof value === "boolean") { + return true; + } + if (Array.isArray(value) || typeof value === "object") { + // Check for cyclic references + if (visited.has(value)) { + return false; + } + visited.add(value); + try { + if (Array.isArray(value)) { + return value.every(item => isJsonValue(item, visited)); + } + // Exclude non-plain objects (Date, RegExp, etc.) by checking constructor + const proto = Object.getPrototypeOf(value); + if (proto !== null && proto !== Object.prototype) { + return false; + } + // JSON only allows string keys, so exclude objects with Symbol keys + if (Object.getOwnPropertySymbols(value).length > 0) { + return false; + } + // Check all values are JSON values + return Object.values(value).every(v => isJsonValue(v, visited)); + } finally { + visited.delete(value); + } + } + return false; +} +function pruneJsonSchemaAnnotations(ast, description, title, def, examples) { + const out = {}; + if (description !== undefined) out.description = description; + if (title !== undefined) out.title = title; + if (Option.isSome(def)) { + const o = encodeDefault(ast, def.value); + if (Option.isSome(o) && isJsonValue(o.value)) { + out.default = o.value; + } + } + if (examples !== undefined) { + const encodedExamples = encodeExamples(ast, examples); + if (encodedExamples !== undefined) { + out.examples = encodedExamples; + } + } + if (Object.keys(out).length === 0) { + return undefined; + } + return out; +} +function getContextJsonSchemaAnnotations(ast, annotated) { + return pruneJsonSchemaAnnotations(ast, getRawDescription(annotated), getRawTitle(annotated), getRawDefault(annotated), getRawExamples(annotated)); +} +function getJsonSchemaAnnotations(ast) { + return pruneJsonSchemaAnnotations(ast, filterBuiltIn(ast, getRawDescription(ast), AST.DescriptionAnnotationId), filterBuiltIn(ast, getRawTitle(ast), AST.TitleAnnotationId), getRawDefault(ast), getRawExamples(ast)); +} +function mergeJsonSchemaAnnotations(jsonSchema, jsonSchemaAnnotations) { + if (jsonSchemaAnnotations) { + if ("$ref" in jsonSchema) { + return { + allOf: [jsonSchema], + ...jsonSchemaAnnotations + }; + } + return { + ...jsonSchema, + ...jsonSchemaAnnotations + }; + } + return jsonSchema; +} +const pruneUndefined = ast => { + if (Option.isNone(AST.getJSONSchemaAnnotation(ast))) { + return AST.pruneUndefined(ast, pruneUndefined, ast => pruneUndefined(ast.from)); + } +}; +const isParseJsonTransformation = ast => ast.annotations[AST.SchemaIdAnnotationId] === AST.ParseJsonSchemaId; +const isOverrideAnnotation = (ast, jsonSchema) => { + if (AST.isRefinement(ast)) { + const schemaId = ast.annotations[AST.SchemaIdAnnotationId]; + if (schemaId === schemaId_.IntSchemaId) { + return "type" in jsonSchema && jsonSchema.type !== "integer"; + } + } + return "type" in jsonSchema || "oneOf" in jsonSchema || "anyOf" in jsonSchema || "$ref" in jsonSchema; +}; +const mergeRefinements = (from, jsonSchema, ast) => { + const out = { + ...from, + ...getJsonSchemaAnnotations(ast), + ...jsonSchema + }; + out.allOf ??= []; + const handle = (name, filter) => { + if (name in jsonSchema && name in from) { + out.allOf.unshift({ + [name]: from[name] + }); + out.allOf = out.allOf.filter(filter); + } + }; + handle("minLength", i => i.minLength > jsonSchema.minLength); + handle("maxLength", i => i.maxLength < jsonSchema.maxLength); + handle("pattern", i => i.pattern !== jsonSchema.pattern); + handle("minItems", i => i.minItems > jsonSchema.minItems); + handle("maxItems", i => i.maxItems < jsonSchema.maxItems); + handle("minimum", i => i.minimum > jsonSchema.minimum); + handle("maximum", i => i.maximum < jsonSchema.maximum); + handle("exclusiveMinimum", i => i.exclusiveMinimum > jsonSchema.exclusiveMinimum); + handle("exclusiveMaximum", i => i.exclusiveMaximum < jsonSchema.exclusiveMaximum); + handle("multipleOf", i => i.multipleOf !== jsonSchema.multipleOf); + if (out.allOf.length === 0) { + delete out.allOf; + } + return out; +}; +function isContentSchemaSupported(options) { + switch (options.target) { + case "jsonSchema7": + return false; + case "jsonSchema2019-09": + case "jsonSchema2020-12": + case "openApi3.1": + return true; + } +} +function getAdditionalProperties(options) { + switch (options.additionalPropertiesStrategy) { + case "allow": + return true; + case "strict": + return false; + } +} +function addASTAnnotations(jsonSchema, ast) { + return addAnnotations(jsonSchema, getJsonSchemaAnnotations(ast)); +} +function addAnnotations(jsonSchema, annotations) { + if (annotations === undefined || Object.keys(annotations).length === 0) { + return jsonSchema; + } + if ("$ref" in jsonSchema) { + return { + allOf: [jsonSchema], + ...annotations + }; + } + return { + ...jsonSchema, + ...annotations + }; +} +function getIdentifierAnnotation(ast) { + const identifier = Option.getOrUndefined(AST.getJSONIdentifier(ast)); + if (identifier === undefined) { + if (AST.isSuspend(ast)) { + return getIdentifierAnnotation(ast.f()); + } + if (AST.isTransformation(ast) && AST.isTypeLiteral(ast.from) && AST.isDeclaration(ast.to)) { + const to = ast.to; + const surrogate = AST.getSurrogateAnnotation(to); + if (Option.isSome(surrogate)) { + return getIdentifierAnnotation(to); + } + } + } + return identifier; +} +function go(ast, $defs, identifier, path, options, annotation, errors) { + if (identifier === "handle-identifier" && (options.topLevelReferenceStrategy !== "skip" || AST.isSuspend(ast))) { + const id = getIdentifierAnnotation(ast); + if (id !== undefined) { + const escapedId = id.replace(/~/ig, "~0").replace(/\//ig, "~1"); + const out = { + $ref: options.getRef(escapedId) + }; + if (!Record.has($defs, id)) { + $defs[id] = out; + $defs[id] = go(ast, $defs, "ignore-identifier", path, options, "handle-annotation", errors); + } + return out; + } + } + if (annotation === "handle-annotation") { + const hook = AST.getJSONSchemaAnnotation(ast); + if (Option.isSome(hook)) { + const handler = hook.value; + if (isOverrideAnnotation(ast, handler)) { + switch (ast._tag) { + case "Declaration": + return addASTAnnotations(handler, ast); + default: + return handler; + } + } else { + switch (ast._tag) { + case "Refinement": + { + const t = AST.getTransformationFrom(ast); + if (t === undefined) { + return mergeRefinements(go(ast.from, $defs, identifier, path, options, "handle-annotation", errors), handler, ast); + } else { + return go(t, $defs, identifier, path, options, "handle-annotation", errors); + } + } + default: + return { + ...go(ast, $defs, identifier, path, options, "ignore-annotation", errors), + ...handler + }; + } + } + } + } + const surrogate = AST.getSurrogateAnnotation(ast); + if (Option.isSome(surrogate)) { + return go(surrogate.value, $defs, identifier, path, options, "handle-annotation", errors); + } + switch (ast._tag) { + // Unsupported + case "Declaration": + case "UndefinedKeyword": + case "BigIntKeyword": + case "UniqueSymbol": + case "SymbolKeyword": + { + if (errors === "ignore-errors") return addASTAnnotations(constAny, ast); + throw new Error(errors_.getJSONSchemaMissingAnnotationErrorMessage(path, ast)); + } + case "Suspend": + { + if (identifier === "handle-identifier") { + if (errors === "ignore-errors") return addASTAnnotations(constAny, ast); + throw new Error(errors_.getJSONSchemaMissingIdentifierAnnotationErrorMessage(path, ast)); + } + return go(ast.f(), $defs, "ignore-identifier", path, options, "handle-annotation", errors); + } + // Primitives + case "NeverKeyword": + return addASTAnnotations(constNever, ast); + case "VoidKeyword": + return addASTAnnotations(constVoid, ast); + case "UnknownKeyword": + return addASTAnnotations(constUnknown, ast); + case "AnyKeyword": + return addASTAnnotations(constAny, ast); + case "ObjectKeyword": + return addASTAnnotations(constObject, ast); + case "StringKeyword": + return addASTAnnotations({ + type: "string" + }, ast); + case "NumberKeyword": + return addASTAnnotations({ + type: "number" + }, ast); + case "BooleanKeyword": + return addASTAnnotations({ + type: "boolean" + }, ast); + case "Literal": + { + const literal = ast.literal; + if (literal === null) { + return addASTAnnotations({ + type: "null" + }, ast); + } else if (Predicate.isString(literal)) { + return addASTAnnotations({ + type: "string", + enum: [literal] + }, ast); + } else if (Predicate.isNumber(literal)) { + return addASTAnnotations({ + type: "number", + enum: [literal] + }, ast); + } else if (Predicate.isBoolean(literal)) { + return addASTAnnotations({ + type: "boolean", + enum: [literal] + }, ast); + } + if (errors === "ignore-errors") return addASTAnnotations(constAny, ast); + throw new Error(errors_.getJSONSchemaMissingAnnotationErrorMessage(path, ast)); + } + case "Enums": + { + const anyOf = ast.enums.map(e => { + const type = Predicate.isNumber(e[1]) ? "number" : "string"; + return { + type, + title: e[0], + enum: [e[1]] + }; + }); + return anyOf.length >= 1 ? addASTAnnotations({ + $comment: "/schemas/enums", + anyOf + }, ast) : addASTAnnotations(constNever, ast); + } + case "TupleType": + { + const elements = ast.elements.map((e, i) => mergeJsonSchemaAnnotations(go(e.type, $defs, "handle-identifier", path.concat(i), options, "handle-annotation", errors), getContextJsonSchemaAnnotations(e.type, e))); + const rest = ast.rest.map(type => mergeJsonSchemaAnnotations(go(type.type, $defs, "handle-identifier", path, options, "handle-annotation", errors), getContextJsonSchemaAnnotations(type.type, type))); + const output = { + type: "array" + }; + // --------------------------------------------- + // handle elements + // --------------------------------------------- + const len = ast.elements.length; + if (len > 0) { + output.minItems = len - ast.elements.filter(element => element.isOptional).length; + if (options.target === "jsonSchema7") { + output.items = elements; + } else { + output.prefixItems = elements; + } + } + // --------------------------------------------- + // handle rest element + // --------------------------------------------- + const restLength = rest.length; + if (restLength > 0) { + const head = rest[0]; + const isHomogeneous = restLength === 1 && ast.elements.every(e => e.type === ast.rest[0].type); + if (isHomogeneous) { + if (options.target === "jsonSchema7") { + output.items = head; + } else { + output.items = head; + delete output.prefixItems; + } + } else { + if (options.target === "jsonSchema7") { + output.additionalItems = head; + } else { + output.items = head; + } + } + // --------------------------------------------- + // handle post rest elements + // --------------------------------------------- + if (restLength > 1) { + if (errors === "ignore-errors") return addASTAnnotations(constAny, ast); + throw new Error(errors_.getJSONSchemaUnsupportedPostRestElementsErrorMessage(path)); + } + } else { + if (len > 0) { + if (options.target === "jsonSchema7") { + output.additionalItems = false; + } else { + output.items = false; + } + } else { + output.maxItems = 0; + } + } + return addASTAnnotations(output, ast); + } + case "TypeLiteral": + { + if (ast.propertySignatures.length === 0 && ast.indexSignatures.length === 0) { + return addASTAnnotations(constEmptyStruct, ast); + } + const output = { + type: "object", + required: [], + properties: {}, + additionalProperties: getAdditionalProperties(options) + }; + let patternProperties = undefined; + let propertyNames = undefined; + for (const is of ast.indexSignatures) { + const pruned = pruneUndefined(is.type) ?? is.type; + const parameter = is.parameter; + switch (parameter._tag) { + case "StringKeyword": + { + output.additionalProperties = go(pruned, $defs, "handle-identifier", path, options, "handle-annotation", errors); + break; + } + case "TemplateLiteral": + { + patternProperties = go(pruned, $defs, "handle-identifier", path, options, "handle-annotation", errors); + propertyNames = { + type: "string", + pattern: AST.getTemplateLiteralRegExp(parameter).source + }; + break; + } + case "Refinement": + { + patternProperties = go(pruned, $defs, "handle-identifier", path, options, "handle-annotation", errors); + propertyNames = go(parameter, $defs, "handle-identifier", path, options, "handle-annotation", errors); + break; + } + case "SymbolKeyword": + { + const indexSignaturePath = path.concat("[symbol]"); + output.additionalProperties = go(pruned, $defs, "handle-identifier", indexSignaturePath, options, "handle-annotation", errors); + propertyNames = go(parameter, $defs, "handle-identifier", indexSignaturePath, options, "handle-annotation", errors); + break; + } + } + } + // --------------------------------------------- + // handle property signatures + // --------------------------------------------- + for (let i = 0; i < ast.propertySignatures.length; i++) { + const ps = ast.propertySignatures[i]; + const name = ps.name; + if (Predicate.isString(name)) { + const pruned = pruneUndefined(ps.type); + const type = pruned ?? ps.type; + output.properties[name] = mergeJsonSchemaAnnotations(go(type, $defs, "handle-identifier", path.concat(ps.name), options, "handle-annotation", errors), getContextJsonSchemaAnnotations(type, ps)); + // --------------------------------------------- + // handle optional property signatures + // --------------------------------------------- + if (!ps.isOptional && pruned === undefined) { + output.required.push(name); + } + } else { + if (errors === "ignore-errors") return addASTAnnotations(constAny, ast); + throw new Error(errors_.getJSONSchemaUnsupportedKeyErrorMessage(name, path)); + } + } + // --------------------------------------------- + // handle index signatures + // --------------------------------------------- + if (patternProperties !== undefined) { + delete output.additionalProperties; + output.patternProperties = { + "": patternProperties + }; + } + if (propertyNames !== undefined) { + output.propertyNames = propertyNames; + } + return addASTAnnotations(output, ast); + } + case "Union": + { + const members = ast.types.map(t => go(t, $defs, "handle-identifier", path, options, "handle-annotation", errors)); + const anyOf = compactUnion(members); + switch (anyOf.length) { + case 0: + return constNever; + case 1: + return addASTAnnotations(anyOf[0], ast); + default: + return addASTAnnotations({ + anyOf + }, ast); + } + } + case "Refinement": + return go(ast.from, $defs, identifier, path, options, "handle-annotation", errors); + case "TemplateLiteral": + { + const regex = AST.getTemplateLiteralRegExp(ast); + return addASTAnnotations({ + type: "string", + title: String(ast), + description: "a template literal", + pattern: regex.source + }, ast); + } + case "Transformation": + { + if (isParseJsonTransformation(ast.from)) { + const out = { + "type": "string", + "contentMediaType": "application/json" + }; + if (isContentSchemaSupported(options)) { + out["contentSchema"] = go(ast.to, $defs, identifier, path, options, "handle-annotation", errors); + } + return out; + } + const from = go(ast.from, $defs, identifier, path, options, "handle-annotation", errors); + if (ast.transformation._tag === "TypeLiteralTransformation" && isJsonSchema7Object(from)) { + const to = go(ast.to, {}, "ignore-identifier", path, options, "handle-annotation", "ignore-errors"); + if (isJsonSchema7Object(to)) { + for (const t of ast.transformation.propertySignatureTransformations) { + const toKey = t.to; + const fromKey = t.from; + if (Predicate.isString(toKey) && Predicate.isString(fromKey)) { + const toProperty = to.properties[toKey]; + if (Predicate.isRecord(toProperty)) { + const fromProperty = from.properties[fromKey]; + if (Predicate.isRecord(fromProperty)) { + const annotations = {}; + if (Predicate.isString(toProperty.title)) annotations.title = toProperty.title; + if (Predicate.isString(toProperty.description)) annotations.description = toProperty.description; + if (Array.isArray(toProperty.examples)) annotations.examples = toProperty.examples; + if (Object.hasOwn(toProperty, "default") && toProperty.default !== undefined) { + annotations.default = toProperty.default; + } + from.properties[fromKey] = addAnnotations(fromProperty, annotations); + } + } + } + } + } + } + return addASTAnnotations(from, ast); + } + } +} +function isJsonSchema7Object(jsonSchema) { + return Predicate.isRecord(jsonSchema) && jsonSchema.type === "object" && Predicate.isRecord(jsonSchema.properties); +} +function isNeverWithoutCustomAnnotations(jsonSchema) { + return jsonSchema === constNever || Predicate.hasProperty(jsonSchema, "$id") && jsonSchema.$id === constNever.$id && Object.keys(jsonSchema).length === 3 && jsonSchema.title === AST.neverKeyword.annotations[AST.TitleAnnotationId]; +} +function isAny(jsonSchema) { + return "$id" in jsonSchema && jsonSchema.$id === constAny.$id; +} +function isUnknown(jsonSchema) { + return "$id" in jsonSchema && jsonSchema.$id === constUnknown.$id; +} +function isVoid(jsonSchema) { + return "$id" in jsonSchema && jsonSchema.$id === constVoid.$id; +} +function isCompactableLiteral(jsonSchema) { + return Predicate.hasProperty(jsonSchema, "enum") && "type" in jsonSchema && Object.keys(jsonSchema).length === 2; +} +function compactUnion(members) { + const out = []; + for (const m of members) { + if (isNeverWithoutCustomAnnotations(m)) continue; + if (isAny(m) || isUnknown(m) || isVoid(m)) return [m]; + if (isCompactableLiteral(m) && out.length > 0) { + const last = out[out.length - 1]; + if (isCompactableLiteral(last) && last.type === m.type) { + out[out.length - 1] = { + type: last.type, + enum: [...last.enum, ...m.enum] + }; + continue; + } + } + out.push(m); + } + return out; +} +//# sourceMappingURL=JSONSchema.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/KeyedPool.js b/backend/node_modules/effect/dist/esm/KeyedPool.js new file mode 100644 index 0000000000000000000000000000000000000000..1731d1bc0ca34edc03da8054e1930a40bd089355 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/KeyedPool.js @@ -0,0 +1,76 @@ +import * as internal from "./internal/keyedPool.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const KeyedPoolTypeId = internal.KeyedPoolTypeId; +/** + * Makes a new pool of the specified fixed size. The pool is returned in a + * `Scope`, which governs the lifetime of the pool. When the pool is shutdown + * because the `Scope` is closed, the individual items allocated by the pool + * will be released in some unspecified order. + * + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * Makes a new pool of the specified fixed size. The pool is returned in a + * `Scope`, which governs the lifetime of the pool. When the pool is shutdown + * because the `Scope` is closed, the individual items allocated by the pool + * will be released in some unspecified order. + * + * The size of the underlying pools can be configured per key. + * + * @since 2.0.0 + * @category constructors + */ +export const makeWith = internal.makeWith; +/** + * Makes a new pool with the specified minimum and maximum sizes and time to + * live before a pool whose excess items are not being used will be shrunk + * down to the minimum size. The pool is returned in a `Scope`, which governs + * the lifetime of the pool. When the pool is shutdown because the `Scope` is + * used, the individual items allocated by the pool will be released in some + * unspecified order. + * + * The size of the underlying pools can be configured per key. + * + * @since 2.0.0 + * @category constructors + */ +export const makeWithTTL = internal.makeWithTTL; +/** + * Makes a new pool with the specified minimum and maximum sizes and time to + * live before a pool whose excess items are not being used will be shrunk + * down to the minimum size. The pool is returned in a `Scope`, which governs + * the lifetime of the pool. When the pool is shutdown because the `Scope` is + * used, the individual items allocated by the pool will be released in some + * unspecified order. + * + * The size of the underlying pools can be configured per key. + * + * @since 2.0.0 + * @category constructors + */ +export const makeWithTTLBy = internal.makeWithTTLBy; +/** + * Retrieves an item from the pool belonging to the given key in a scoped + * effect. Note that if acquisition fails, then the returned effect will fail + * for that same reason. Retrying a failed acquisition attempt will repeat the + * acquisition attempt. + * + * @since 2.0.0 + * @category combinators + */ +export const get = internal.get; +/** + * Invalidates the specified item. This will cause the pool to eventually + * reallocate the item, although this reallocation may occur lazily rather + * than eagerly. + * + * @since 2.0.0 + * @category combinators + */ +export const invalidate = internal.invalidate; +//# sourceMappingURL=KeyedPool.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/KeyedPool.js.map b/backend/node_modules/effect/dist/esm/KeyedPool.js.map new file mode 100644 index 0000000000000000000000000000000000000000..4de6004f43506f9472ce0598ebcc14df4e07c788 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/KeyedPool.js.map @@ -0,0 +1 @@ +{"version":3,"file":"KeyedPool.js","names":["internal","KeyedPoolTypeId","make","makeWith","makeWithTTL","makeWithTTLBy","get","invalidate"],"sources":["../../src/KeyedPool.ts"],"sourcesContent":[null],"mappings":"AAKA,OAAO,KAAKA,QAAQ,MAAM,yBAAyB;AAKnD;;;;AAIA,OAAO,MAAMC,eAAe,GAAkBD,QAAQ,CAACC,eAAe;AAiDtE;;;;;;;;;AASA,OAAO,MAAMC,IAAI,GAKgDF,QAAQ,CAACE,IAAI;AAE9E;;;;;;;;;;;AAWA,OAAO,MAAMC,QAAQ,GAK4CH,QAAQ,CAACG,QAAQ;AAElF;;;;;;;;;;;;;AAaA,OAAO,MAAMC,WAAW,GAOyCJ,QAAQ,CAACI,WAAW;AAErF;;;;;;;;;;;;;AAaA,OAAO,MAAMC,aAAa,GAOuCL,QAAQ,CAACK,aAAa;AAEvF;;;;;;;;;AASA,OAAO,MAAMC,GAAG,GAqBZN,QAAQ,CAACM,GAAG;AAEhB;;;;;;;;AAQA,OAAO,MAAMC,UAAU,GAmBnBP,QAAQ,CAACO,UAAU","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/LayerMap.js b/backend/node_modules/effect/dist/esm/LayerMap.js new file mode 100644 index 0000000000000000000000000000000000000000..e0375b3a74aa16691da7f96566b5b6eb7f019760 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/LayerMap.js @@ -0,0 +1,202 @@ +/** + * @since 3.14.0 + * @experimental + */ +import * as Context from "./Context.js"; +import * as Effect from "./Effect.js"; +import * as FiberRefsPatch from "./FiberRefsPatch.js"; +import { identity } from "./Function.js"; +import * as core from "./internal/core.js"; +import * as Layer from "./Layer.js"; +import * as RcMap from "./RcMap.js"; +import * as Runtime from "./Runtime.js"; +import * as Scope from "./Scope.js"; +/** + * @since 3.14.0 + * @category Symbols + */ +export const TypeId = /*#__PURE__*/Symbol.for("effect/LayerMap"); +/** + * @since 3.14.0 + * @category Constructors + * @experimental + * + * A `LayerMap` allows you to create a map of Layer's that can be used to + * dynamically access resources based on a key. + * + * ```ts + * import { NodeRuntime } from "@effect/platform-node" + * import { Context, Effect, FiberRef, Layer, LayerMap } from "effect" + * + * class Greeter extends Context.Tag("Greeter") + * }>() {} + * + * // create a service that wraps a LayerMap + * class GreeterMap extends LayerMap.Service()("GreeterMap", { + * // define the lookup function for the layer map + * // + * // The returned Layer will be used to provide the Greeter service for the + * // given name. + * lookup: (name: string) => + * Layer.succeed(Greeter, { + * greet: Effect.succeed(`Hello, ${name}!`) + * }).pipe( + * Layer.merge(Layer.locallyScoped(FiberRef.currentConcurrency, 123)) + * ), + * + * // If a layer is not used for a certain amount of time, it can be removed + * idleTimeToLive: "5 seconds", + * + * // Supply the dependencies for the layers in the LayerMap + * dependencies: [] + * }) {} + * + * // usage + * const program: Effect.Effect = Effect.gen(function*() { + * // access and use the Greeter service + * const greeter = yield* Greeter + * yield* Effect.log(yield* greeter.greet) + * }).pipe( + * // use the GreeterMap service to provide a variant of the Greeter service + * Effect.provide(GreeterMap.get("John")) + * ) + * + * // run the program + * program.pipe( + * Effect.provide(GreeterMap.Default), + * NodeRuntime.runMain + * ) + * ``` + */ +export const make = /*#__PURE__*/Effect.fnUntraced(function* (lookup, options) { + const context = yield* Effect.context(); + // If we are inside another layer build, use the current memo map, + // otherwise create a new one. + const memoMap = context.unsafeMap.has(Layer.CurrentMemoMap.key) ? Context.get(context, Layer.CurrentMemoMap) : yield* Layer.makeMemoMap; + const rcMap = yield* RcMap.make({ + lookup: key => Effect.scopeWith(scope => Effect.diffFiberRefs(Layer.buildWithMemoMap(lookup(key), memoMap, scope))).pipe(Effect.map(([patch, context]) => ({ + layer: Layer.scopedContext(core.withFiberRuntime(fiber => { + const scope = Context.unsafeGet(fiber.currentContext, Scope.Scope); + const oldRefs = fiber.getFiberRefs(); + const newRefs = FiberRefsPatch.patch(patch, fiber.id(), oldRefs); + const revert = FiberRefsPatch.diff(newRefs, oldRefs); + fiber.setFiberRefs(newRefs); + return Effect.as(Scope.addFinalizerExit(scope, () => { + fiber.setFiberRefs(FiberRefsPatch.patch(revert, fiber.id(), fiber.getFiberRefs())); + return Effect.void; + }), context); + })), + runtimeEffect: Effect.withFiberRuntime(fiber => { + const fiberRefs = FiberRefsPatch.patch(patch, fiber.id(), fiber.getFiberRefs()); + return Effect.succeed(Runtime.make({ + context, + fiberRefs, + runtimeFlags: Runtime.defaultRuntime.runtimeFlags + })); + }) + }))), + idleTimeToLive: options?.idleTimeToLive + }); + if (options?.preloadKeys) { + for (const key of options.preloadKeys) { + yield* RcMap.get(rcMap, key); + } + } + return identity({ + [TypeId]: TypeId, + rcMap, + get: key => Layer.unwrapScoped(Effect.map(RcMap.get(rcMap, key), ({ + layer + }) => layer)), + runtime: key => Effect.flatMap(RcMap.get(rcMap, key), ({ + runtimeEffect + }) => runtimeEffect), + invalidate: key => RcMap.invalidate(rcMap, key) + }); +}); +/** + * @since 3.14.0 + * @category Constructors + * @experimental + */ +export const fromRecord = (layers, options) => make(key => layers[key], { + ...options, + preloadKeys: options?.preload ? Object.keys(layers) : undefined +}); +/** + * @since 3.14.0 + * @category Service + * @experimental + * + * Create a `LayerMap` service that provides a dynamic set of resources based on + * a key. + * + * ```ts + * import { NodeRuntime } from "@effect/platform-node" + * import { Context, Effect, FiberRef, Layer, LayerMap } from "effect" + * + * class Greeter extends Context.Tag("Greeter") + * }>() {} + * + * // create a service that wraps a LayerMap + * class GreeterMap extends LayerMap.Service()("GreeterMap", { + * // define the lookup function for the layer map + * // + * // The returned Layer will be used to provide the Greeter service for the + * // given name. + * lookup: (name: string) => + * Layer.succeed(Greeter, { + * greet: Effect.succeed(`Hello, ${name}!`) + * }).pipe( + * Layer.merge(Layer.locallyScoped(FiberRef.currentConcurrency, 123)) + * ), + * + * // If a layer is not used for a certain amount of time, it can be removed + * idleTimeToLive: "5 seconds", + * + * // Supply the dependencies for the layers in the LayerMap + * dependencies: [] + * }) {} + * + * // usage + * const program: Effect.Effect = Effect.gen(function*() { + * // access and use the Greeter service + * const greeter = yield* Greeter + * yield* Effect.log(yield* greeter.greet) + * }).pipe( + * // use the GreeterMap service to provide a variant of the Greeter service + * Effect.provide(GreeterMap.get("John")) + * ) + * + * // run the program + * program.pipe( + * Effect.provide(GreeterMap.Default), + * NodeRuntime.runMain + * ) + * ``` + */ +export const Service = () => (id, options) => { + const Err = globalThis.Error; + const limit = Err.stackTraceLimit; + Err.stackTraceLimit = 2; + const creationError = new Err(); + Err.stackTraceLimit = limit; + function TagClass() {} + const TagClass_ = TagClass; + Object.setPrototypeOf(TagClass, Object.getPrototypeOf(Context.GenericTag(id))); + TagClass.key = id; + Object.defineProperty(TagClass, "stack", { + get() { + return creationError.stack; + } + }); + TagClass_.DefaultWithoutDependencies = Layer.scoped(TagClass_, "lookup" in options ? make(options.lookup, options) : fromRecord(options.layers, options)); + TagClass_.Default = options.dependencies && options.dependencies.length > 0 ? Layer.provide(TagClass_.DefaultWithoutDependencies, options.dependencies) : TagClass_.DefaultWithoutDependencies; + TagClass_.get = key => Layer.unwrapScoped(Effect.map(TagClass_, layerMap => layerMap.get(key))); + TagClass_.runtime = key => Effect.flatMap(TagClass_, layerMap => layerMap.runtime(key)); + TagClass_.invalidate = key => Effect.flatMap(TagClass_, layerMap => layerMap.invalidate(key)); + return TagClass; +}; +//# sourceMappingURL=LayerMap.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/List.js b/backend/node_modules/effect/dist/esm/List.js new file mode 100644 index 0000000000000000000000000000000000000000..52bd0a131ebdb7c1eb32e234b1825537082d5c97 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/List.js @@ -0,0 +1,756 @@ +/** + * A data type for immutable linked lists representing ordered collections of elements of type `A`. + * + * This data type is optimal for last-in-first-out (LIFO), stack-like access patterns. If you need another access pattern, for example, random access or FIFO, consider using a collection more suited to this than `List`. + * + * **Performance** + * + * - Time: `List` has `O(1)` prepend and head/tail access. Most other operations are `O(n)` on the number of elements in the list. This includes the index-based lookup of elements, `length`, `append` and `reverse`. + * - Space: `List` implements structural sharing of the tail list. This means that many operations are either zero- or constant-memory cost. + * + * @since 2.0.0 + */ +/** + * This file is ported from + * + * Scala (https://www.scala-lang.org) + * + * Copyright EPFL and Lightbend, Inc. + * + * Licensed under Apache License 2.0 + * (http://www.apache.org/licenses/LICENSE-2.0). + */ +import * as Arr from "./Array.js"; +import * as Chunk from "./Chunk.js"; +import * as Either from "./Either.js"; +import * as Equal from "./Equal.js"; +import * as Equivalence from "./Equivalence.js"; +import { dual, identity, unsafeCoerce } from "./Function.js"; +import * as Hash from "./Hash.js"; +import { format, NodeInspectSymbol, toJSON } from "./Inspectable.js"; +import * as Option from "./Option.js"; +import { pipeArguments } from "./Pipeable.js"; +import { hasProperty } from "./Predicate.js"; +/** + * @since 2.0.0 + * @category symbol + */ +export const TypeId = /*#__PURE__*/Symbol.for("effect/List"); +/** + * Converts the specified `List` to an `Array`. + * + * @category conversions + * @since 2.0.0 + */ +export const toArray = self => Arr.fromIterable(self); +/** + * @category equivalence + * @since 2.0.0 + */ +export const getEquivalence = isEquivalent => Equivalence.mapInput(Arr.getEquivalence(isEquivalent), toArray); +const _equivalence = /*#__PURE__*/getEquivalence(Equal.equals); +const ConsProto = { + [TypeId]: TypeId, + _tag: "Cons", + toString() { + return format(this.toJSON()); + }, + toJSON() { + return { + _id: "List", + _tag: "Cons", + values: toArray(this).map(toJSON) + }; + }, + [NodeInspectSymbol]() { + return this.toJSON(); + }, + [Equal.symbol](that) { + return isList(that) && this._tag === that._tag && _equivalence(this, that); + }, + [Hash.symbol]() { + return Hash.cached(this, Hash.array(toArray(this))); + }, + [Symbol.iterator]() { + let done = false; + // eslint-disable-next-line @typescript-eslint/no-this-alias + let self = this; + return { + next() { + if (done) { + return this.return(); + } + if (self._tag === "Nil") { + done = true; + return this.return(); + } + const value = self.head; + self = self.tail; + return { + done, + value + }; + }, + return(value) { + if (!done) { + done = true; + } + return { + done: true, + value + }; + } + }; + }, + pipe() { + return pipeArguments(this, arguments); + } +}; +const makeCons = (head, tail) => { + const cons = Object.create(ConsProto); + cons.head = head; + cons.tail = tail; + return cons; +}; +const NilHash = /*#__PURE__*/Hash.string("Nil"); +const NilProto = { + [TypeId]: TypeId, + _tag: "Nil", + toString() { + return format(this.toJSON()); + }, + toJSON() { + return { + _id: "List", + _tag: "Nil" + }; + }, + [NodeInspectSymbol]() { + return this.toJSON(); + }, + [Hash.symbol]() { + return NilHash; + }, + [Equal.symbol](that) { + return isList(that) && this._tag === that._tag; + }, + [Symbol.iterator]() { + return { + next() { + return { + done: true, + value: undefined + }; + } + }; + }, + pipe() { + return pipeArguments(this, arguments); + } +}; +const _Nil = /*#__PURE__*/Object.create(NilProto); +/** + * Returns `true` if the specified value is a `List`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isList = u => hasProperty(u, TypeId); +/** + * Returns `true` if the specified value is a `List.Nil`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isNil = self => self._tag === "Nil"; +/** + * Returns `true` if the specified value is a `List.Cons`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isCons = self => self._tag === "Cons"; +/** + * Returns the number of elements contained in the specified `List` + * + * @since 2.0.0 + * @category getters + */ +export const size = self => { + let these = self; + let len = 0; + while (!isNil(these)) { + len += 1; + these = these.tail; + } + return len; +}; +/** + * Constructs a new empty `List`. + * + * @since 2.0.0 + * @category constructors + */ +export const nil = () => _Nil; +/** + * Constructs a new `List.Cons` from the specified `head` and `tail` values. + * + * @since 2.0.0 + * @category constructors + */ +export const cons = (head, tail) => makeCons(head, tail); +/** + * Constructs a new empty `List`. + * + * Alias of {@link nil}. + * + * @since 2.0.0 + * @category constructors + */ +export const empty = nil; +/** + * Constructs a new `List` from the specified value. + * + * @since 2.0.0 + * @category constructors + */ +export const of = value => makeCons(value, _Nil); +/** + * Creates a new `List` from an iterable collection of values. + * + * @since 2.0.0 + * @category constructors + */ +export const fromIterable = prefix => { + const iterator = prefix[Symbol.iterator](); + let next; + if ((next = iterator.next()) && !next.done) { + const result = makeCons(next.value, _Nil); + let curr = result; + while ((next = iterator.next()) && !next.done) { + const temp = makeCons(next.value, _Nil); + curr.tail = temp; + curr = temp; + } + return result; + } else { + return _Nil; + } +}; +/** + * Constructs a new `List` from the specified values. + * + * @since 2.0.0 + * @category constructors + */ +export const make = (...elements) => fromIterable(elements); +/** + * Appends the specified element to the end of the `List`, creating a new `Cons`. + * + * @category concatenating + * @since 2.0.0 + */ +export const append = /*#__PURE__*/dual(2, (self, element) => appendAll(self, of(element))); +/** + * Concatenates two lists, combining their elements. + * If either list is non-empty, the result is also a non-empty list. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { List } from "effect" + * + * assert.deepStrictEqual( + * List.make(1, 2).pipe(List.appendAll(List.make("a", "b")), List.toArray), + * [1, 2, "a", "b"] + * ) + * ``` + * + * @category concatenating + * @since 2.0.0 + */ +export const appendAll = /*#__PURE__*/dual(2, (self, that) => prependAll(that, self)); +/** + * Prepends the specified element to the beginning of the list. + * + * @category concatenating + * @since 2.0.0 + */ +export const prepend = /*#__PURE__*/dual(2, (self, element) => cons(element, self)); +/** + * Prepends the specified prefix list to the beginning of the specified list. + * If either list is non-empty, the result is also a non-empty list. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { List } from "effect" + * + * assert.deepStrictEqual( + * List.make(1, 2).pipe(List.prependAll(List.make("a", "b")), List.toArray), + * ["a", "b", 1, 2] + * ) + * ``` + * + * @category concatenating + * @since 2.0.0 + */ +export const prependAll = /*#__PURE__*/dual(2, (self, prefix) => { + if (isNil(self)) { + return prefix; + } else if (isNil(prefix)) { + return self; + } else { + const result = makeCons(prefix.head, self); + let curr = result; + let that = prefix.tail; + while (!isNil(that)) { + const temp = makeCons(that.head, self); + curr.tail = temp; + curr = temp; + that = that.tail; + } + return result; + } +}); +/** + * Prepends the specified prefix list (in reverse order) to the beginning of the + * specified list. + * + * @category concatenating + * @since 2.0.0 + */ +export const prependAllReversed = /*#__PURE__*/dual(2, (self, prefix) => { + let out = self; + let pres = prefix; + while (isCons(pres)) { + out = makeCons(pres.head, out); + pres = pres.tail; + } + return out; +}); +/** + * Drops the first `n` elements from the specified list. + * + * @since 2.0.0 + * @category combinators + */ +export const drop = /*#__PURE__*/dual(2, (self, n) => { + if (n <= 0) { + return self; + } + if (n >= size(self)) { + return _Nil; + } + let these = self; + let i = 0; + while (!isNil(these) && i < n) { + these = these.tail; + i += 1; + } + return these; +}); +/** + * Check if a predicate holds true for every `List` element. + * + * @since 2.0.0 + * @category elements + */ +export const every = /*#__PURE__*/dual(2, (self, refinement) => { + for (const a of self) { + if (!refinement(a)) { + return false; + } + } + return true; +}); +/** + * Check if a predicate holds true for some `List` element. + * + * @since 2.0.0 + * @category elements + */ +export const some = /*#__PURE__*/dual(2, (self, predicate) => { + let these = self; + while (!isNil(these)) { + if (predicate(these.head)) { + return true; + } + these = these.tail; + } + return false; +}); +/** + * Filters a list using the specified predicate. + * + * @since 2.0.0 + * @category combinators + */ +export const filter = /*#__PURE__*/dual(2, (self, predicate) => noneIn(self, predicate, false)); +// everything seen so far is not included +const noneIn = (self, predicate, isFlipped) => { + while (true) { + if (isNil(self)) { + return _Nil; + } else { + if (predicate(self.head) !== isFlipped) { + return allIn(self, self.tail, predicate, isFlipped); + } else { + self = self.tail; + } + } + } +}; +// everything from 'start' is included, if everything from this point is in we can return the origin +// start otherwise if we discover an element that is out we must create a new partial list. +const allIn = (start, remaining, predicate, isFlipped) => { + while (true) { + if (isNil(remaining)) { + return start; + } else { + if (predicate(remaining.head) !== isFlipped) { + remaining = remaining.tail; + } else { + return partialFill(start, remaining, predicate, isFlipped); + } + } + } +}; +// we have seen elements that should be included then one that should be excluded, start building +const partialFill = (origStart, firstMiss, predicate, isFlipped) => { + const newHead = makeCons(unsafeHead(origStart), _Nil); + let toProcess = unsafeTail(origStart); + let currentLast = newHead; + // we know that all elements are :: until at least firstMiss.tail + while (!(toProcess === firstMiss)) { + const newElem = makeCons(unsafeHead(toProcess), _Nil); + currentLast.tail = newElem; + currentLast = unsafeCoerce(newElem); + toProcess = unsafeCoerce(toProcess.tail); + } + // at this point newHead points to a list which is a duplicate of all the 'in' elements up to the first miss. + // currentLast is the last element in that list. + // now we are going to try and share as much of the tail as we can, only moving elements across when we have to. + let next = firstMiss.tail; + let nextToCopy = unsafeCoerce(next); // the next element we would need to copy to our list if we cant share. + while (!isNil(next)) { + // generally recommended is next.isNonEmpty but this incurs an extra method call. + const head = unsafeHead(next); + if (predicate(head) !== isFlipped) { + next = next.tail; + } else { + // its not a match - do we have outstanding elements? + while (!(nextToCopy === next)) { + const newElem = makeCons(unsafeHead(nextToCopy), _Nil); + currentLast.tail = newElem; + currentLast = newElem; + nextToCopy = unsafeCoerce(nextToCopy.tail); + } + nextToCopy = unsafeCoerce(next.tail); + next = next.tail; + } + } + // we have remaining elements - they are unchanged attach them to the end + if (!isNil(nextToCopy)) { + currentLast.tail = nextToCopy; + } + return newHead; +}; +/** + * Filters and maps a list using the specified partial function. The resulting + * list may be smaller than the input list due to the possibility of the partial + * function not being defined for some elements. + * + * @since 2.0.0 + * @category combinators + */ +export const filterMap = /*#__PURE__*/dual(2, (self, f) => { + const bs = []; + for (const a of self) { + const oa = f(a); + if (Option.isSome(oa)) { + bs.push(oa.value); + } + } + return fromIterable(bs); +}); +/** + * Removes all `None` values from the specified list. + * + * @since 2.0.0 + * @category combinators + */ +export const compact = self => filterMap(self, identity); +/** + * Returns the first element that satisfies the specified + * predicate, or `None` if no such element exists. + * + * @category elements + * @since 2.0.0 + */ +export const findFirst = /*#__PURE__*/dual(2, (self, predicate) => { + let these = self; + while (!isNil(these)) { + if (predicate(these.head)) { + return Option.some(these.head); + } + these = these.tail; + } + return Option.none(); +}); +/** + * Applies a function to each element in a list and returns a new list containing the concatenated mapped elements. + * + * @since 2.0.0 + * @category sequencing + */ +export const flatMap = /*#__PURE__*/dual(2, (self, f) => { + let rest = self; + let head = undefined; + let tail = undefined; + while (!isNil(rest)) { + let bs = f(rest.head); + while (!isNil(bs)) { + const next = makeCons(bs.head, _Nil); + if (tail === undefined) { + head = next; + } else { + tail.tail = next; + } + tail = next; + bs = bs.tail; + } + rest = rest.tail; + } + if (head === undefined) { + return _Nil; + } + return head; +}); +/** + * Applies the specified function to each element of the `List`. + * + * @since 2.0.0 + * @category combinators + */ +export const forEach = /*#__PURE__*/dual(2, (self, f) => { + let these = self; + while (!isNil(these)) { + f(these.head); + these = these.tail; + } +}); +/** + * Returns the first element of the specified list, or `None` if the list is + * empty. + * + * @since 2.0.0 + * @category getters + */ +export const head = self => isNil(self) ? Option.none() : Option.some(self.head); +/** + * Returns the last element of the specified list, or `None` if the list is + * empty. + * + * @since 2.0.0 + * @category getters + */ +export const last = self => isNil(self) ? Option.none() : Option.some(unsafeLast(self)); +/** + * Applies the specified mapping function to each element of the list. + * + * @since 2.0.0 + * @category mapping + */ +export const map = /*#__PURE__*/dual(2, (self, f) => { + if (isNil(self)) { + return self; + } else { + let i = 0; + const head = makeCons(f(self.head, i++), _Nil); + let nextHead = head; + let rest = self.tail; + while (!isNil(rest)) { + const next = makeCons(f(rest.head, i++), _Nil); + nextHead.tail = next; + nextHead = next; + rest = rest.tail; + } + return head; + } +}); +/** + * Partition a list into two lists, where the first list contains all elements + * that did not satisfy the specified predicate, and the second list contains + * all elements that did satisfy the specified predicate. + * + * @since 2.0.0 + * @category combinators + */ +export const partition = /*#__PURE__*/dual(2, (self, predicate) => { + const left = []; + const right = []; + for (const a of self) { + if (predicate(a)) { + right.push(a); + } else { + left.push(a); + } + } + return [fromIterable(left), fromIterable(right)]; +}); +/** + * Partition a list into two lists, where the first list contains all elements + * for which the specified function returned a `Left`, and the second list + * contains all elements for which the specified function returned a `Right`. + * + * @since 2.0.0 + * @category combinators + */ +export const partitionMap = /*#__PURE__*/dual(2, (self, f) => { + const left = []; + const right = []; + for (const a of self) { + const e = f(a); + if (Either.isLeft(e)) { + left.push(e.left); + } else { + right.push(e.right); + } + } + return [fromIterable(left), fromIterable(right)]; +}); +/** + * Folds over the elements of the list using the specified function, using the + * specified initial value. + * + * @since 2.0.0 + * @category folding + */ +export const reduce = /*#__PURE__*/dual(3, (self, zero, f) => { + let acc = zero; + let these = self; + while (!isNil(these)) { + acc = f(acc, these.head); + these = these.tail; + } + return acc; +}); +/** + * Folds over the elements of the list using the specified function, beginning + * with the last element of the list, using the specified initial value. + * + * @since 2.0.0 + * @category folding + */ +export const reduceRight = /*#__PURE__*/dual(3, (self, zero, f) => { + let acc = zero; + let these = reverse(self); + while (!isNil(these)) { + acc = f(acc, these.head); + these = these.tail; + } + return acc; +}); +/** + * Returns a new list with the elements of the specified list in reverse order. + * + * @since 2.0.0 + * @category elements + */ +export const reverse = self => { + let result = empty(); + let these = self; + while (!isNil(these)) { + result = prepend(result, these.head); + these = these.tail; + } + return result; +}; +/** + * Splits the specified list into two lists at the specified index. + * + * @since 2.0.0 + * @category combinators + */ +export const splitAt = /*#__PURE__*/dual(2, (self, n) => [take(self, n), drop(self, n)]); +/** + * Returns the tail of the specified list, or `None` if the list is empty. + * + * @since 2.0.0 + * @category getters + */ +export const tail = self => isNil(self) ? Option.none() : Option.some(self.tail); +/** + * Takes the specified number of elements from the beginning of the specified + * list. + * + * @since 2.0.0 + * @category combinators + */ +export const take = /*#__PURE__*/dual(2, (self, n) => { + if (n <= 0) { + return _Nil; + } + if (n >= size(self)) { + return self; + } + let these = make(unsafeHead(self)); + let current = unsafeTail(self); + for (let i = 1; i < n; i++) { + these = makeCons(unsafeHead(current), these); + current = unsafeTail(current); + } + return reverse(these); +}); +/** + * Converts the specified `List` to a `Chunk`. + * + * @since 2.0.0 + * @category conversions + */ +export const toChunk = self => Chunk.fromIterable(self); +const getExpectedListToBeNonEmptyErrorMessage = "Expected List to be non-empty"; +/** + * Unsafely returns the first element of the specified `List`. + * + * @since 2.0.0 + * @category unsafe + */ +export const unsafeHead = self => { + if (isNil(self)) { + throw new Error(getExpectedListToBeNonEmptyErrorMessage); + } + return self.head; +}; +/** + * Unsafely returns the last element of the specified `List`. + * + * @since 2.0.0 + * @category unsafe + */ +export const unsafeLast = self => { + if (isNil(self)) { + throw new Error(getExpectedListToBeNonEmptyErrorMessage); + } + let these = self; + let scout = self.tail; + while (!isNil(scout)) { + these = scout; + scout = scout.tail; + } + return these.head; +}; +/** + * Unsafely returns the tail of the specified `List`. + * + * @since 2.0.0 + * @category unsafe + */ +export const unsafeTail = self => { + if (isNil(self)) { + throw new Error(getExpectedListToBeNonEmptyErrorMessage); + } + return self.tail; +}; +//# sourceMappingURL=List.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/List.js.map b/backend/node_modules/effect/dist/esm/List.js.map new file mode 100644 index 0000000000000000000000000000000000000000..10b5a05dac8413b7086484cacbf9e5450bdc7dec --- /dev/null +++ b/backend/node_modules/effect/dist/esm/List.js.map @@ -0,0 +1 @@ +{"version":3,"file":"List.js","names":["Arr","Chunk","Either","Equal","Equivalence","dual","identity","unsafeCoerce","Hash","format","NodeInspectSymbol","toJSON","Option","pipeArguments","hasProperty","TypeId","Symbol","for","toArray","self","fromIterable","getEquivalence","isEquivalent","mapInput","_equivalence","equals","ConsProto","_tag","toString","_id","values","map","symbol","that","isList","cached","array","iterator","done","next","return","value","head","tail","pipe","arguments","makeCons","cons","Object","create","NilHash","string","NilProto","undefined","_Nil","u","isNil","isCons","size","these","len","nil","empty","of","prefix","result","curr","temp","make","elements","append","element","appendAll","prependAll","prepend","prependAllReversed","out","pres","drop","n","i","every","refinement","a","some","predicate","filter","noneIn","isFlipped","allIn","start","remaining","partialFill","origStart","firstMiss","newHead","unsafeHead","toProcess","unsafeTail","currentLast","newElem","nextToCopy","filterMap","f","bs","oa","isSome","push","compact","findFirst","none","flatMap","rest","forEach","last","unsafeLast","nextHead","partition","left","right","partitionMap","e","isLeft","reduce","zero","acc","reduceRight","reverse","splitAt","take","current","toChunk","getExpectedListToBeNonEmptyErrorMessage","Error","scout"],"sources":["../../src/List.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;AAaA;;;;;;;;;;AAUA,OAAO,KAAKA,GAAG,MAAM,YAAY;AACjC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAC/C,SAASC,IAAI,EAAEC,QAAQ,EAAEC,YAAY,QAAQ,eAAe;AAC5D,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,SAASC,MAAM,EAAoBC,iBAAiB,EAAEC,MAAM,QAAQ,kBAAkB;AAEtF,OAAO,KAAKC,MAAM,MAAM,aAAa;AAErC,SAASC,aAAa,QAAQ,eAAe;AAC7C,SAASC,WAAW,QAAyC,gBAAgB;AAe7E;;;;AAIA,OAAO,MAAMC,MAAM,gBAAkBC,MAAM,CAACC,GAAG,CAAC,aAAa,CAAC;AA4B9D;;;;;;AAMA,OAAO,MAAMC,OAAO,GAAOC,IAAa,IAAenB,GAAG,CAACoB,YAAY,CAACD,IAAI,CAAC;AAE7E;;;;AAIA,OAAO,MAAME,cAAc,GAAOC,YAAwC,IACxElB,WAAW,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,KAAK,CAAC;IAC5CuE,OAAO,GAAGhC,UAAU,CAACgC,OAAQ,CAAC;EAChC;EACA,OAAOH,OAAO,CAACpE,KAAK,CAAC;AACvB,CAAC,CAAC;AAEF;;;;;;AAMA,OAAO,MAAMwE,OAAO,GAAOhH,IAAa,IAAqBlB,KAAK,CAACmB,YAAY,CAACD,IAAI,CAAC;AAErF,MAAMiH,uCAAuC,GAAG,+BAA+B;AAE/E;;;;;;AAMA,OAAO,MAAMpC,UAAU,GAAO7E,IAAa,IAAO;EAChD,IAAIqC,KAAK,CAACrC,IAAI,CAAC,EAAE;IACf,MAAM,IAAIkH,KAAK,CAACD,uCAAuC,CAAC;EAC1D;EACA,OAAOjH,IAAI,CAACuB,IAAI;AAClB,CAAC;AAED;;;;;;AAMA,OAAO,MAAMyE,UAAU,GAAOhG,IAAa,IAAO;EAChD,IAAIqC,KAAK,CAACrC,IAAI,CAAC,EAAE;IACf,MAAM,IAAIkH,KAAK,CAACD,uCAAuC,CAAC;EAC1D;EACA,IAAIzE,KAAK,GAAGxC,IAAI;EAChB,IAAImH,KAAK,GAAGnH,IAAI,CAACwB,IAAI;EACrB,OAAO,CAACa,KAAK,CAAC8E,KAAK,CAAC,EAAE;IACpB3E,KAAK,GAAG2E,KAAK;IACbA,KAAK,GAAGA,KAAK,CAAC3F,IAAI;EACpB;EACA,OAAOgB,KAAK,CAACjB,IAAI;AACnB,CAAC;AAED;;;;;;AAMA,OAAO,MAAMwD,UAAU,GAAO/E,IAAa,IAAa;EACtD,IAAIqC,KAAK,CAACrC,IAAI,CAAC,EAAE;IACf,MAAM,IAAIkH,KAAK,CAACD,uCAAuC,CAAC;EAC1D;EACA,OAAOjH,IAAI,CAACwB,IAAI;AAClB,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/LogLevel.js b/backend/node_modules/effect/dist/esm/LogLevel.js new file mode 100644 index 0000000000000000000000000000000000000000..a5e8e42e2b8b279bd96e6f406c84f8eb22fa128e --- /dev/null +++ b/backend/node_modules/effect/dist/esm/LogLevel.js @@ -0,0 +1,135 @@ +import { dual, pipe } from "./Function.js"; +import * as core from "./internal/core.js"; +import * as number from "./Number.js"; +import * as order from "./Order.js"; +/** + * @since 2.0.0 + * @category constructors + */ +export const All = core.logLevelAll; +/** + * @since 2.0.0 + * @category constructors + */ +export const Fatal = core.logLevelFatal; +/** + * @since 2.0.0 + * @category constructors + */ +export const Error = core.logLevelError; +/** + * @since 2.0.0 + * @category constructors + */ +export const Warning = core.logLevelWarning; +/** + * @since 2.0.0 + * @category constructors + */ +export const Info = core.logLevelInfo; +/** + * @since 2.0.0 + * @category constructors + */ +export const Debug = core.logLevelDebug; +/** + * @since 2.0.0 + * @category constructors + */ +export const Trace = core.logLevelTrace; +/** + * @since 2.0.0 + * @category constructors + */ +export const None = core.logLevelNone; +/** + * @since 2.0.0 + * @category constructors + */ +export const allLevels = core.allLogLevels; +/** + * Temporarily sets a `LogLevel` for an `Effect` workflow. + * + * **Details** + * + * This function allows you to apply a specific `LogLevel` locally to an + * `Effect` workflow. Once the workflow completes, the `LogLevel` reverts to its + * previous state. + * + * **When to Use** + * + * This is particularly useful when you want to adjust the verbosity of logging + * for specific parts of your program without affecting the global log level. + * + * @example + * ```ts + * import { Effect, LogLevel } from "effect" + * + * const program = Effect.gen(function*() { + * yield* Effect.log("message1") + * yield* Effect.gen(function*() { + * yield* Effect.log("message2") + * yield* Effect.log("message3") + * }).pipe(LogLevel.locally(LogLevel.Warning)) + * }) + * + * Effect.runFork(program) + * // timestamp=... level=INFO fiber=#0 message=message1 + * // timestamp=... level=WARN fiber=#0 message=message2 + * // timestamp=... level=WARN fiber=#0 message=message3 + * ``` + * + * @since 2.0.0 + * @category utils + */ +export const locally = /*#__PURE__*/dual(2, (use, self) => core.fiberRefLocally(use, core.currentLogLevel, self)); +/** + * @since 2.0.0 + * @category instances + */ +export const Order = /*#__PURE__*/pipe(number.Order, /*#__PURE__*/order.mapInput(level => level.ordinal)); +/** + * @since 2.0.0 + * @category ordering + */ +export const lessThan = /*#__PURE__*/order.lessThan(Order); +/** + * @since 2.0.0 + * @category ordering + */ +export const lessThanEqual = /*#__PURE__*/order.lessThanOrEqualTo(Order); +/** + * @since 2.0.0 + * @category ordering + */ +export const greaterThan = /*#__PURE__*/order.greaterThan(Order); +/** + * @since 2.0.0 + * @category ordering + */ +export const greaterThanEqual = /*#__PURE__*/order.greaterThanOrEqualTo(Order); +/** + * @since 2.0.0 + * @category conversions + */ +export const fromLiteral = literal => { + switch (literal) { + case "All": + return All; + case "Debug": + return Debug; + case "Error": + return Error; + case "Fatal": + return Fatal; + case "Info": + return Info; + case "Trace": + return Trace; + case "None": + return None; + case "Warning": + return Warning; + } +}; +//# sourceMappingURL=LogLevel.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/LogSpan.js.map b/backend/node_modules/effect/dist/esm/LogSpan.js.map new file mode 100644 index 0000000000000000000000000000000000000000..0e345bdabad6b09640ad13edde47ef6decb1f505 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/LogSpan.js.map @@ -0,0 +1 @@ +{"version":3,"file":"LogSpan.js","names":["internal","make","render"],"sources":["../../src/LogSpan.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,QAAQ,MAAM,uBAAuB;AAWjD;;;;AAIA,OAAO,MAAMC,IAAI,GAAkDD,QAAQ,CAACC,IAAI;AAEhF;;;;AAIA,OAAO,MAAMC,MAAM,GAA+CF,QAAQ,CAACE,MAAM","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Logger.js b/backend/node_modules/effect/dist/esm/Logger.js new file mode 100644 index 0000000000000000000000000000000000000000..14749a3b40eab56683627d5a12462310f8e0545e --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Logger.js @@ -0,0 +1,490 @@ +import * as fiberRuntime from "./internal/fiberRuntime.js"; +import * as circular from "./internal/layer/circular.js"; +import * as internalCircular from "./internal/logger-circular.js"; +import * as internal from "./internal/logger.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const LoggerTypeId = internal.LoggerTypeId; +/** + * Creates a custom logger that formats log messages according to the provided + * function. + * + * @example + * ```ts + * import { Effect, Logger, LogLevel } from "effect" + * + * const logger = Logger.make(({ logLevel, message }) => { + * globalThis.console.log(`[${logLevel.label}] ${message}`) + * }) + * + * const task1 = Effect.logDebug("task1 done") + * const task2 = Effect.logDebug("task2 done") + * + * const program = Effect.gen(function*() { + * yield* Effect.log("start") + * yield* task1 + * yield* task2 + * yield* Effect.log("done") + * }).pipe( + * Logger.withMinimumLogLevel(LogLevel.Debug), + * Effect.provide(Logger.replace(Logger.defaultLogger, logger)) + * ) + * + * Effect.runFork(program) + * // [INFO] start + * // [DEBUG] task1 done + * // [DEBUG] task2 done + * // [INFO] done + * ``` + * + * @category constructors + * @since 2.0.0 + */ +export const make = internal.makeLogger; +/** + * @since 2.0.0 + * @category context + */ +export const add = circular.addLogger; +/** + * @since 2.0.0 + * @category context + */ +export const addEffect = circular.addLoggerEffect; +/** + * @since 2.0.0 + * @category context + */ +export const addScoped = circular.addLoggerScoped; +/** + * @since 2.0.0 + * @category mapping + */ +export const mapInput = internal.mapInput; +/** + * @since 2.0.0 + * @category mapping + */ +export const mapInputOptions = internal.mapInputOptions; +/** + * Returns a version of this logger that only logs messages when the log level + * satisfies the specified predicate. + * + * @since 2.0.0 + * @category filtering + */ +export const filterLogLevel = internal.filterLogLevel; +/** + * @since 2.0.0 + * @category mapping + */ +export const map = internal.map; +/** + * Creates a batched logger that groups log messages together and processes them + * in intervals. + * + * @example + * ```ts + * import { Console, Effect, Logger } from "effect" + * + * const LoggerLive = Logger.replaceScoped( + * Logger.defaultLogger, + * Logger.logfmtLogger.pipe( + * Logger.batched("500 millis", (messages) => Console.log("BATCH", `[\n${messages.join("\n")}\n]`)) + * ) + * ) + * + * const program = Effect.gen(function*() { + * yield* Effect.log("one") + * yield* Effect.log("two") + * yield* Effect.log("three") + * }).pipe(Effect.provide(LoggerLive)) + * + * Effect.runFork(program) + * // BATCH [ + * // timestamp=... level=INFO fiber=#0 message=one + * // timestamp=... level=INFO fiber=#0 message=two + * // timestamp=... level=INFO fiber=#0 message=three + * // ] + * ``` + * + * @since 2.0.0 + * @category mapping + */ +export const batched = fiberRuntime.batchedLogger; +/** + * @since 2.0.0 + * @category console + */ +export const withConsoleLog = fiberRuntime.loggerWithConsoleLog; +/** + * Takes a `Logger` and returns a logger that calls the respective `Console` method + * based on the log level. + * + * @example + * ```ts + * import { Logger, Effect } from "effect" + * + * const loggerLayer = Logger.replace( + * Logger.defaultLogger, + * Logger.withLeveledConsole(Logger.stringLogger), + * ) + * + * Effect.gen(function* () { + * yield* Effect.logError("an error") + * yield* Effect.logInfo("an info") + * }).pipe(Effect.provide(loggerLayer)) + * ``` + * + * @since 3.8.0 + * @category console + */ +export const withLeveledConsole = fiberRuntime.loggerWithLeveledLog; +/** + * @since 2.0.0 + * @category console + */ +export const withConsoleError = fiberRuntime.loggerWithConsoleError; +/** + * A logger that does nothing in response to logging events. + * + * @since 2.0.0 + * @category constructors + */ +export const none = internal.none; +/** + * @since 2.0.0 + * @category context + */ +export const remove = circular.removeLogger; +/** + * @since 2.0.0 + * @category context + */ +export const replace = circular.replaceLogger; +/** + * @since 2.0.0 + * @category context + */ +export const replaceEffect = circular.replaceLoggerEffect; +/** + * @since 2.0.0 + * @category context + */ +export const replaceScoped = circular.replaceLoggerScoped; +/** + * @since 2.0.0 + * @category constructors + */ +export const simple = internal.simple; +/** + * @since 2.0.0 + * @category constructors + */ +export const succeed = internal.succeed; +/** + * @since 2.0.0 + * @category constructors + */ +export const sync = internal.sync; +/** + * @since 2.0.0 + * @category constructors + */ +export const test = internalCircular.test; +/** + * Sets the minimum log level for subsequent logging operations, allowing + * control over which log messages are displayed based on their severity. + * + * @example + * ```ts + * import { Effect, Logger, LogLevel } from "effect" + * + * const program = Effect.logDebug("message1").pipe(Logger.withMinimumLogLevel(LogLevel.Debug)) + * + * Effect.runFork(program) + * // timestamp=... level=DEBUG fiber=#0 message=message1 + * ``` + * + * @since 2.0.0 + * @category context + */ +export const withMinimumLogLevel = circular.withMinimumLogLevel; +/** + * @since 2.0.0 + * @category tracing + */ +export const withSpanAnnotations = fiberRuntime.loggerWithSpanAnnotations; +/** + * Combines this logger with the specified logger to produce a new logger that + * logs to both this logger and that logger. + * + * @since 2.0.0 + * @category zipping + */ +export const zip = internal.zip; +/** + * @since 2.0.0 + * @category zipping + */ +export const zipLeft = internal.zipLeft; +/** + * @since 2.0.0 + * @category zipping + */ +export const zipRight = internal.zipRight; +/** + * @since 2.0.0 + * @category constructors + */ +export const defaultLogger = fiberRuntime.defaultLogger; +/** + * The `jsonLogger` logger formats log entries as JSON objects, making them easy to + * integrate with logging systems that consume JSON data. + * + * @example + * ```ts + * import { Effect, Logger } from "effect" + * + * const program = Effect.log("message1", "message2").pipe( + * Effect.annotateLogs({ key1: "value1", key2: "value2" }), + * Effect.withLogSpan("myspan") + * ) + * + * Effect.runFork(program.pipe(Effect.provide(Logger.json))) + * // {"message":["message1","message2"],"logLevel":"INFO","timestamp":"...","annotations":{"key2":"value2","key1":"value1"},"spans":{"myspan":0},"fiberId":"#0"} + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const jsonLogger = internal.jsonLogger; +/** + * This logger outputs logs in a human-readable format that is easy to read + * during development or in a production console. + * + * @example + * ```ts + * import { Effect, Logger } from "effect" + * + * const program = Effect.log("message1", "message2").pipe( + * Effect.annotateLogs({ key1: "value1", key2: "value2" }), + * Effect.withLogSpan("myspan") + * ) + * + * Effect.runFork(program.pipe(Effect.provide(Logger.logFmt))) + * // timestamp=... level=INFO fiber=#0 message=message1 message=message2 myspan=0ms key2=value2 key1=value1 + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const logfmtLogger = internal.logfmtLogger; +/** + * @since 2.0.0 + * @category constructors + */ +export const stringLogger = internal.stringLogger; +/** + * The pretty logger utilizes the capabilities of the console API to generate + * visually engaging and color-enhanced log outputs. This feature is + * particularly useful for improving the readability of log messages during + * development and debugging processes. + * + * @example + * ```ts + * import { Effect, Logger } from "effect" + * + * const program = Effect.log("message1", "message2").pipe( + * Effect.annotateLogs({ key1: "value1", key2: "value2" }), + * Effect.withLogSpan("myspan") + * ) + * + * Effect.runFork(program.pipe(Effect.provide(Logger.pretty))) + * // green --v v-- bold and cyan + * // [07:51:54.434] INFO (#0) myspan=1ms: message1 + * // message2 + * // v-- bold + * // key2: value2 + * // key1: value1 + * ``` + * + * @since 3.5.0 + * @category constructors + */ +export const prettyLogger = internal.prettyLogger; +/** + * A default version of the pretty logger. + * + * @since 3.8.0 + * @category constructors + */ +export const prettyLoggerDefault = internal.prettyLoggerDefault; +/** + * The structured logger provides detailed log outputs, structured in a way that + * retains comprehensive traceability of the events, suitable for deeper + * analysis and troubleshooting. + * + * @example + * ```ts + * import { Effect, Logger } from "effect" + * + * const program = Effect.log("message1", "message2").pipe( + * Effect.annotateLogs({ key1: "value1", key2: "value2" }), + * Effect.withLogSpan("myspan") + * ) + * + * Effect.runFork(program.pipe(Effect.provide(Logger.structured))) + * // { + * // message: [ 'message1', 'message2' ], + * // logLevel: 'INFO', + * // timestamp: '2024-07-09T14:05:41.623Z', + * // cause: undefined, + * // annotations: { key2: 'value2', key1: 'value1' }, + * // spans: { myspan: 0 }, + * // fiberId: '#0' + * // } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const structuredLogger = internal.structuredLogger; +/** + * @since 2.0.0 + * @category constructors + */ +export const tracerLogger = fiberRuntime.tracerLogger; +/** + * The `json` logger formats log entries as JSON objects, making them easy to + * integrate with logging systems that consume JSON data. + * + * @example + * ```ts + * import { Effect, Logger } from "effect" + * + * const program = Effect.log("message1", "message2").pipe( + * Effect.annotateLogs({ key1: "value1", key2: "value2" }), + * Effect.withLogSpan("myspan") + * ) + * + * Effect.runFork(program.pipe(Effect.provide(Logger.json))) + * // {"message":["message1","message2"],"logLevel":"INFO","timestamp":"...","annotations":{"key2":"value2","key1":"value1"},"spans":{"myspan":0},"fiberId":"#0"} + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const json = /*#__PURE__*/replace(fiberRuntime.defaultLogger, fiberRuntime.jsonLogger); +/** + * This logger outputs logs in a human-readable format that is easy to read + * during development or in a production console. + * + * @example + * ```ts + * import { Effect, Logger } from "effect" + * + * const program = Effect.log("message1", "message2").pipe( + * Effect.annotateLogs({ key1: "value1", key2: "value2" }), + * Effect.withLogSpan("myspan") + * ) + * + * Effect.runFork(program.pipe(Effect.provide(Logger.logFmt))) + * // timestamp=... level=INFO fiber=#0 message=message1 message=message2 myspan=0ms key2=value2 key1=value1 + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const logFmt = /*#__PURE__*/replace(fiberRuntime.defaultLogger, fiberRuntime.logFmtLogger); +/** + * The pretty logger utilizes the capabilities of the console API to generate + * visually engaging and color-enhanced log outputs. This feature is + * particularly useful for improving the readability of log messages during + * development and debugging processes. + * + * @example + * ```ts + * import { Effect, Logger } from "effect" + * + * const program = Effect.log("message1", "message2").pipe( + * Effect.annotateLogs({ key1: "value1", key2: "value2" }), + * Effect.withLogSpan("myspan") + * ) + * + * Effect.runFork(program.pipe(Effect.provide(Logger.pretty))) + * // green --v v-- bold and cyan + * // [07:51:54.434] INFO (#0) myspan=1ms: message1 + * // message2 + * // v-- bold + * // key2: value2 + * // key1: value1 + * ``` + * + * @since 3.5.0 + * @category constructors + */ +export const pretty = /*#__PURE__*/replace(fiberRuntime.defaultLogger, fiberRuntime.prettyLogger); +/** + * The structured logger provides detailed log outputs, structured in a way that + * retains comprehensive traceability of the events, suitable for deeper + * analysis and troubleshooting. + * + * @example + * ```ts + * import { Effect, Logger } from "effect" + * + * const program = Effect.log("message1", "message2").pipe( + * Effect.annotateLogs({ key1: "value1", key2: "value2" }), + * Effect.withLogSpan("myspan") + * ) + * + * Effect.runFork(program.pipe(Effect.provide(Logger.structured))) + * // { + * // message: [ 'message1', 'message2' ], + * // logLevel: 'INFO', + * // timestamp: '2024-07-09T14:05:41.623Z', + * // cause: undefined, + * // annotations: { key2: 'value2', key1: 'value1' }, + * // spans: { myspan: 0 }, + * // fiberId: '#0' + * // } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const structured = /*#__PURE__*/replace(fiberRuntime.defaultLogger, fiberRuntime.structuredLogger); +/** + * Sets the minimum log level for logging operations, allowing control over + * which log messages are displayed based on their severity. + * + * @example + * ```ts + * import { Effect, Logger, LogLevel } from "effect" + * + * const program = Effect.gen(function*() { + * yield* Effect.log("Executing task...") + * yield* Effect.sleep("100 millis") + * console.log("task done") + * }) + * + * // Logging disabled using a layer + * Effect.runFork(program.pipe(Effect.provide(Logger.minimumLogLevel(LogLevel.None)))) + * // task done + * ``` + * + * @since 2.0.0 + * @category context + */ +export const minimumLogLevel = circular.minimumLogLevel; +/** + * Returns `true` if the specified value is a `Logger`, otherwise returns `false`. + * + * @since 1.0.0 + * @category guards + */ +export const isLogger = internal.isLogger; +//# sourceMappingURL=Logger.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/ManagedRuntime.js b/backend/node_modules/effect/dist/esm/ManagedRuntime.js new file mode 100644 index 0000000000000000000000000000000000000000..af3884a76112cd8f8951ac30583fb1419d43421b --- /dev/null +++ b/backend/node_modules/effect/dist/esm/ManagedRuntime.js @@ -0,0 +1,42 @@ +import * as internal from "./internal/managedRuntime.js"; +import * as circular from "./internal/managedRuntime/circular.js"; +/** + * @since 3.9.0 + * @category symbol + */ +export const TypeId = circular.TypeId; +/** + * Checks if the provided argument is a `ManagedRuntime`. + * + * @since 3.9.0 + * @category guards + */ +export const isManagedRuntime = internal.isManagedRuntime; +/** + * Convert a Layer into an ManagedRuntime, that can be used to run Effect's using + * your services. + * + * @since 2.0.0 + * @category runtime class + * @example + * ```ts + * import { Console, Effect, Layer, ManagedRuntime } from "effect" + * + * class Notifications extends Effect.Tag("Notifications")< + * Notifications, + * { readonly notify: (message: string) => Effect.Effect } + * >() { + * static Live = Layer.succeed(this, { notify: (message) => Console.log(message) }) + * } + * + * async function main() { + * const runtime = ManagedRuntime.make(Notifications.Live) + * await runtime.runPromise(Notifications.notify("Hello, world!")) + * await runtime.dispose() + * } + * + * main() + * ``` + */ +export const make = internal.make; +//# sourceMappingURL=ManagedRuntime.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/ManagedRuntime.js.map b/backend/node_modules/effect/dist/esm/ManagedRuntime.js.map new file mode 100644 index 0000000000000000000000000000000000000000..18f5df19b2a2470d76e6367d55adc177c2776823 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/ManagedRuntime.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ManagedRuntime.js","names":["internal","circular","TypeId","isManagedRuntime","make"],"sources":["../../src/ManagedRuntime.ts"],"sourcesContent":[null],"mappings":"AAMA,OAAO,KAAKA,QAAQ,MAAM,8BAA8B;AACxD,OAAO,KAAKC,QAAQ,MAAM,uCAAuC;AAKjE;;;;AAIA,OAAO,MAAMC,MAAM,GAAkBD,QAAQ,CAACC,MAAgB;AAQ9D;;;;;;AAMA,OAAO,MAAMC,gBAAgB,GAAkEH,QAAQ,CAACG,gBAAgB;AAwHxH;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,OAAO,MAAMC,IAAI,GAGWJ,QAAQ,CAACI,IAAI","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Match.js.map b/backend/node_modules/effect/dist/esm/Match.js.map new file mode 100644 index 0000000000000000000000000000000000000000..cd170e84b54e0a020c5be42634468518afef8e46 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Match.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Match.js","names":["internal","Predicate","MatcherTypeId","TypeId","type","value","valueTags","typeTags","withReturnType","when","whenOr","whenAnd","discriminator","discriminatorStartsWith","discriminators","discriminatorsExhaustive","tag","tagStartsWith","tags","tagsExhaustive","not","nonEmptyString","is","string","isString","number","isNumber","any","defined","boolean","isBoolean","_undefined","isUndefined","undefined","_null","isNull","null","bigint","isBigInt","symbol","isSymbol","date","isDate","record","isRecord","instanceOf","instanceOfUnsafe","orElse","orElseAbsurd","either","option","exhaustive","SafeRefinementId","Symbol","for","Fail"],"sources":["../../src/Match.ts"],"sourcesContent":[null],"mappings":"AA6BA,OAAO,KAAKA,QAAQ,MAAM,uBAAuB;AAGjD,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAI3C;;;;AAIA,OAAO,MAAMC,aAAa,GAAkBF,QAAQ,CAACG,MAAM;AAkH3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,OAAO,MAAMC,IAAI,GAA+DJ,QAAQ,CAACI,IAAI;AAE7F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,OAAO,MAAMC,KAAK,GAEmCL,QAAQ,CAACK,KAAK;AAEnE;;;;AAIA,OAAO,MAAMC,SAAS,GAqBlBN,QAAQ,CAACM,SAAS;AAEtB;;;;AAIA,OAAO,MAAMC,QAAQ,GA2BjBP,QAAQ,CAACO,QAAQ;AAErB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,OAAO,MAAMC,cAAc,GAGmCR,QAAQ,CAACQ,cAAc;AAErF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA,OAAO,MAAMC,IAAI,GAiBbT,QAAQ,CAACS,IAAI;AAEjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,OAAO,MAAMC,MAAM,GAgBfV,QAAQ,CAACU,MAAM;AAEnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,OAAO,MAAMC,OAAO,GAehBX,QAAQ,CAACW,OAAO;AAEpB;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,OAAO,MAAMC,aAAa,GAatBZ,QAAQ,CAACY,aAAa;AAE1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA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C,GAAG,CAAC,aAAa,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MergeDecision.js b/backend/node_modules/effect/dist/esm/MergeDecision.js new file mode 100644 index 0000000000000000000000000000000000000000..43c0abf9572ca9dbe4ccb753b54c6e40154fe56a --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MergeDecision.js @@ -0,0 +1,35 @@ +import * as internal from "./internal/channel/mergeDecision.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const MergeDecisionTypeId = internal.MergeDecisionTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +export const Done = internal.Done; +/** + * @since 2.0.0 + * @category constructors + */ +export const Await = internal.Await; +/** + * @since 2.0.0 + * @category constructors + */ +export const AwaitConst = internal.AwaitConst; +/** + * Returns `true` if the specified value is a `MergeDecision`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isMergeDecision = internal.isMergeDecision; +/** + * @since 2.0.0 + * @category folding + */ +export const match = internal.match; +//# sourceMappingURL=MergeDecision.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MergeDecision.js.map b/backend/node_modules/effect/dist/esm/MergeDecision.js.map new file mode 100644 index 0000000000000000000000000000000000000000..7ad903e29fdb07e4620fb012a9d182d728a9d44c --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MergeDecision.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MergeDecision.js","names":["internal","MergeDecisionTypeId","Done","Await","AwaitConst","isMergeDecision","match"],"sources":["../../src/MergeDecision.ts"],"sourcesContent":[null],"mappings":"AAKA,OAAO,KAAKA,QAAQ,MAAM,qCAAqC;AAG/D;;;;AAIA,OAAO,MAAMC,mBAAmB,GAAkBD,QAAQ,CAACC,mBAAmB;AAiC9E;;;;AAIA,OAAO,MAAMC,IAAI,GAA0FF,QAAQ,CAACE,IAAI;AAExH;;;;AAIA,OAAO,MAAMC,KAAK,GAEoBH,QAAQ,CAACG,KAAK;AAEpD;;;;AAIA,OAAO,MAAMC,UAAU,GACrBJ,QAAQ,CAACI,UAAU;AAErB;;;;;;;AAOA,OAAO,MAAMC,eAAe,GAC1BL,QAAQ,CAACK,eAAe;AAE1B;;;;AAIA,OAAO,MAAMC,KAAK,GAsBdN,QAAQ,CAACM,KAAK","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MergeState.js b/backend/node_modules/effect/dist/esm/MergeState.js new file mode 100644 index 0000000000000000000000000000000000000000..990b76bc6270f32a22244a98f3a45f65c7c97d48 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MergeState.js @@ -0,0 +1,58 @@ +import * as internal from "./internal/channel/mergeState.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const MergeStateTypeId = internal.MergeStateTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +export const BothRunning = internal.BothRunning; +/** + * @since 2.0.0 + * @category constructors + */ +export const LeftDone = internal.LeftDone; +/** + * @since 2.0.0 + * @category constructors + */ +export const RightDone = internal.RightDone; +/** + * Returns `true` if the specified value is a `MergeState`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isMergeState = internal.isMergeState; +/** + * Returns `true` if the specified `MergeState` is a `BothRunning`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isBothRunning = internal.isBothRunning; +/** + * Returns `true` if the specified `MergeState` is a `LeftDone`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isLeftDone = internal.isLeftDone; +/** + * Returns `true` if the specified `MergeState` is a `RightDone`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isRightDone = internal.isRightDone; +/** + * @since 2.0.0 + * @category folding + */ +export const match = internal.match; +//# sourceMappingURL=MergeState.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MergeState.js.map b/backend/node_modules/effect/dist/esm/MergeState.js.map new file mode 100644 index 0000000000000000000000000000000000000000..be823a532238b3ddeaca43fdb643ff54dd440e68 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MergeState.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MergeState.js","names":["internal","MergeStateTypeId","BothRunning","LeftDone","RightDone","isMergeState","isBothRunning","isLeftDone","isRightDone","match"],"sources":["../../src/MergeState.ts"],"sourcesContent":[null],"mappings":"AAOA,OAAO,KAAKA,QAAQ,MAAM,kCAAkC;AAE5D;;;;AAIA,OAAO,MAAMC,gBAAgB,GAAkBD,QAAQ,CAACC,gBAAgB;AAgExE;;;;AAIA,OAAO,MAAMC,WAAW,GAG0CF,QAAQ,CAACE,WAAW;AAEtF;;;;AAIA,OAAO,MAAMC,QAAQ,GAE6CH,QAAQ,CAACG,QAAQ;AAEnF;;;;AAIA,OAAO,MAAMC,SAAS,GAE4CJ,QAAQ,CAACI,SAAS;AAEpF;;;;;;AAMA,OAAO,MAAMC,YAAY,GAEsEL,QAAQ,CAACK,YAAY;AAEpH;;;;;;;AAOA,OAAO,MAAMC,aAAa,GAEiDN,QAAQ,CAACM,aAAa;AAEjG;;;;;;;AAOA,OAAO,MAAMC,UAAU,GAEiDP,QAAQ,CAACO,UAAU;AAE3F;;;;;;;AAOA,OAAO,MAAMC,WAAW,GAEiDR,QAAQ,CAACQ,WAAW;AAE7F;;;;AAIA,OAAO,MAAMC,KAAK,GA8BdT,QAAQ,CAACS,KAAK","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MergeStrategy.js b/backend/node_modules/effect/dist/esm/MergeStrategy.js new file mode 100644 index 0000000000000000000000000000000000000000..a77a16209e3327eddffc007ad1f91ca45895d996 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MergeStrategy.js @@ -0,0 +1,51 @@ +/** + * @since 2.0.0 + */ +import * as internal from "./internal/channel/mergeStrategy.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const MergeStrategyTypeId = internal.MergeStrategyTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +export const BackPressure = internal.BackPressure; +/** + * @since 2.0.0 + * @category constructors + */ +export const BufferSliding = internal.BufferSliding; +/** + * Returns `true` if the specified value is a `MergeStrategy`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isMergeStrategy = internal.isMergeStrategy; +/** + * Returns `true` if the specified `MergeStrategy` is a `BackPressure`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isBackPressure = internal.isBackPressure; +/** + * Returns `true` if the specified `MergeStrategy` is a `BufferSliding`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isBufferSliding = internal.isBufferSliding; +/** + * Folds an `MergeStrategy` into a value of type `A`. + * + * @since 2.0.0 + * @category folding + */ +export const match = internal.match; +//# sourceMappingURL=MergeStrategy.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MergeStrategy.js.map b/backend/node_modules/effect/dist/esm/MergeStrategy.js.map new file mode 100644 index 0000000000000000000000000000000000000000..ea6211bba5d53d3c7d22c73d998959dfb74e34f1 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MergeStrategy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MergeStrategy.js","names":["internal","MergeStrategyTypeId","BackPressure","BufferSliding","isMergeStrategy","isBackPressure","isBufferSliding","match"],"sources":["../../src/MergeStrategy.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,QAAQ,MAAM,qCAAqC;AAE/D;;;;AAIA,OAAO,MAAMC,mBAAmB,GAAkBD,QAAQ,CAACC,mBAAmB;AA2C9E;;;;AAIA,OAAO,MAAMC,YAAY,GAA+BF,QAAQ,CAACE,YAAY;AAE7E;;;;AAIA,OAAO,MAAMC,aAAa,GAA+BH,QAAQ,CAACG,aAAa;AAE/E;;;;;;;AAOA,OAAO,MAAMC,eAAe,GAAuCJ,QAAQ,CAACI,eAAe;AAE3F;;;;;;;AAOA,OAAO,MAAMC,cAAc,GAAkDL,QAAQ,CAACK,cAAc;AAEpG;;;;;;;AAOA,OAAO,MAAMC,eAAe,GAAmDN,QAAQ,CAACM,eAAe;AAEvG;;;;;;AAMA,OAAO,MAAMC,KAAK,GA0BdP,QAAQ,CAACO,KAAK","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Metric.js.map b/backend/node_modules/effect/dist/esm/Metric.js.map new file mode 100644 index 0000000000000000000000000000000000000000..fef0819776c23651a0e4f21a8529490c1bb4225e --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Metric.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Metric.js","names":["fiberRuntime","internal","MetricTypeId","globalMetricRegistry","make","mapInput","counter","frequency","withConstantInput","fromMetricKey","gauge","histogram","increment","incrementBy","map","mapType","modify","set","snapshot","succeed","sync","summary","summaryTimestamp","tagged","taggedWithLabelsInput","taggedWithLabels","timer","timerWithBoundaries","trackAll","trackDefect","trackDefectWith","trackDuration","trackDurationWith","trackError","trackErrorWith","trackSuccess","trackSuccessWith","update","value","withNow","zip","unsafeSnapshot","fiberStarted","fiberSuccesses","fiberFailures","fiberLifetimes","fiberActive"],"sources":["../../src/Metric.ts"],"sourcesContent":[null],"mappings":"AAMA,OAAO,KAAKA,YAAY,MAAM,4BAA4B;AAC1D,OAAO,KAAKC,QAAQ,MAAM,sBAAsB;AAWhD;;;;AAIA,OAAO,MAAMC,YAAY,GAAkBD,QAAQ,CAACC,YAAY;AA+GhE;;;;AAIA,OAAO,MAAMC,oBAAoB,GAAkCF,QAAQ,CAACE,oBAAoB;AAEhG;;;;AAIA,OAAO,MAAMC,IAAI,GAAgBH,QAAQ,CAACG,IAAI;AAE9C;;;;;;;;AAQA,OAAO,MAAMC,QAAQ,GAmBjBJ,QAAQ,CAACI,QAAQ;AAErB;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,OAAO,MAAMC,OAAO,GAuEhBL,QAAQ,CAACK,OAAO;AAEpB;;;;;;;;;;;;;;;;AAgBA,OAAO,MAAMC,SAAS,GAKUN,QAAQ,CAACM,SAAS;AAElD;;;;;;;;AAQA,OAA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Y,GAA2B1C,YAAY,CAAC0C,YAAY;AAE7E;;;;AAIA,OAAO,MAAMC,cAAc,GAA2B3C,YAAY,CAAC2C,cAAc;AAEjF;;;;AAIA,OAAO,MAAMC,aAAa,GAA2B5C,YAAY,CAAC4C,aAAa;AAE/E;;;;AAIA,OAAO,MAAMC,cAAc,GACzB7C,YAAY,CAAC6C,cAAc;AAE7B;;;;AAIA,OAAO,MAAMC,WAAW,GAA2B9C,YAAY,CAAC8C,WAAW","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MetricBoundaries.js.map b/backend/node_modules/effect/dist/esm/MetricBoundaries.js.map new file mode 100644 index 0000000000000000000000000000000000000000..350d4a69618c7161c541f44ada4411a637603f5d --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MetricBoundaries.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MetricBoundaries.js","names":["internal","MetricBoundariesTypeId","isMetricBoundaries","fromIterable","linear","exponential"],"sources":["../../src/MetricBoundaries.ts"],"sourcesContent":[null],"mappings":"AAIA,OAAO,KAAKA,QAAQ,MAAM,iCAAiC;AAG3D;;;;AAIA,OAAO,MAAMC,sBAAsB,GAAkBD,QAAQ,CAACC,sBAAsB;AAiBpF;;;;AAIA,OAAO,MAAMC,kBAAkB,GAA0CF,QAAQ,CAACE,kBAAkB;AAEpG;;;;AAIA,OAAO,MAAMC,YAAY,GAAqDH,QAAQ,CAACG,YAAY;AAEnG;;;;;;;AAOA,OAAO,MAAMC,MAAM,GAMKJ,QAAQ,CAACI,MAAM;AAEvC;;;;;;;AAOA,OAAO,MAAMC,WAAW,GAMAL,QAAQ,CAACK,WAAW","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MetricKey.js b/backend/node_modules/effect/dist/esm/MetricKey.js new file mode 100644 index 0000000000000000000000000000000000000000..2e5d9f5dd3f3a4504ef028c09f3f0f2cb11fbc1d --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MetricKey.js @@ -0,0 +1,63 @@ +import * as internal from "./internal/metric/key.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const MetricKeyTypeId = internal.MetricKeyTypeId; +/** + * @since 2.0.0 + * @category refinements + */ +export const isMetricKey = internal.isMetricKey; +/** + * Creates a metric key for a counter, with the specified name. + * + * @since 2.0.0 + * @category constructors + */ +export const counter = internal.counter; +/** + * Creates a metric key for a categorical frequency table, with the specified + * name. + * + * @since 2.0.0 + * @category constructors + */ +export const frequency = internal.frequency; +/** + * Creates a metric key for a gauge, with the specified name. + * + * @since 2.0.0 + * @category constructors + */ +export const gauge = internal.gauge; +/** + * Creates a metric key for a histogram, with the specified name and boundaries. + * + * @since 2.0.0 + * @category constructors + */ +export const histogram = internal.histogram; +/** + * Creates a metric key for a summary, with the specified name, maxAge, + * maxSize, error, and quantiles. + * + * @since 2.0.0 + * @category constructors + */ +export const summary = internal.summary; +/** + * Returns a new `MetricKey` with the specified tag appended. + * + * @since 2.0.0 + * @category constructors + */ +export const tagged = internal.tagged; +/** + * Returns a new `MetricKey` with the specified tags appended. + * + * @since 2.0.0 + * @category constructors + */ +export const taggedWithLabels = internal.taggedWithLabels; +//# sourceMappingURL=MetricKey.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MetricKey.js.map b/backend/node_modules/effect/dist/esm/MetricKey.js.map new file mode 100644 index 0000000000000000000000000000000000000000..ae461ca48a3e452fc92555b08e06e2927ce4f8ec --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MetricKey.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MetricKey.js","names":["internal","MetricKeyTypeId","isMetricKey","counter","frequency","gauge","histogram","summary","tagged","taggedWithLabels"],"sources":["../../src/MetricKey.ts"],"sourcesContent":[null],"mappings":"AAKA,OAAO,KAAKA,QAAQ,MAAM,0BAA0B;AAQpD;;;;AAIA,OAAO,MAAMC,eAAe,GAAkBD,QAAQ,CAACC,eAAe;AA8EtE;;;;AAIA,OAAO,MAAMC,WAAW,GACtBF,QAAQ,CAACE,WAAW;AAEtB;;;;;;AAMA,OAAO,MAAMC,OAAO,GA6BhBH,QAAQ,CAACG,OAAO;AAEpB;;;;;;;AAOA,OAAO,MAAMC,SAAS,GAQKJ,QAAQ,CAACI,SAAS;AAE7C;;;;;;AAMA,OAAO,MAAMC,KAAK,GA2BdL,QAAQ,CAACK,KAAK;AAElB;;;;;;AAMA,OAAO,MAAMC,SAAS,GAIKN,QAAQ,CAACM,SAAS;AAE7C;;;;;;;AAOA,OAAO,MAAMC,OAAO,GASKP,QAAQ,CAACO,OAAO;AAEzC;;;;;;AAMA,OAAO,MAAMC,MAAM,GAefR,QAAQ,CAACQ,MAAM;AAEnB;;;;;;AAMA,OAAO,MAAMC,gBAAgB,GAezBT,QAAQ,CAACS,gBAAgB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MetricLabel.js b/backend/node_modules/effect/dist/esm/MetricLabel.js new file mode 100644 index 0000000000000000000000000000000000000000..a6ff4bf87ec9926b67bfb5c569ce4717d7768e39 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MetricLabel.js @@ -0,0 +1,17 @@ +import * as internal from "./internal/metric/label.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const MetricLabelTypeId = internal.MetricLabelTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * @since 2.0.0 + * @category refinements + */ +export const isMetricLabel = internal.isMetricLabel; +//# sourceMappingURL=MetricLabel.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MetricLabel.js.map b/backend/node_modules/effect/dist/esm/MetricLabel.js.map new file mode 100644 index 0000000000000000000000000000000000000000..722fb44efbb88a81e70f93605265eeab2422b130 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MetricLabel.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MetricLabel.js","names":["internal","MetricLabelTypeId","make","isMetricLabel"],"sources":["../../src/MetricLabel.ts"],"sourcesContent":[null],"mappings":"AAIA,OAAO,KAAKA,QAAQ,MAAM,4BAA4B;AAGtD;;;;AAIA,OAAO,MAAMC,iBAAiB,GAAkBD,QAAQ,CAACC,iBAAiB;AAyB1E;;;;AAIA,OAAO,MAAMC,IAAI,GAAgDF,QAAQ,CAACE,IAAI;AAE9E;;;;AAIA,OAAO,MAAMC,aAAa,GAAqCH,QAAQ,CAACG,aAAa","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MetricPair.js b/backend/node_modules/effect/dist/esm/MetricPair.js new file mode 100644 index 0000000000000000000000000000000000000000..46473ce9dad184620057baba36340eb6fab4ca31 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MetricPair.js @@ -0,0 +1,20 @@ +/** + * @since 2.0.0 + */ +import * as internal from "./internal/metric/pair.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const MetricPairTypeId = internal.MetricPairTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * @since 2.0.0 + * @category unsafe + */ +export const unsafeMake = internal.unsafeMake; +//# sourceMappingURL=MetricPair.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MetricPair.js.map b/backend/node_modules/effect/dist/esm/MetricPair.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c7d7ecde67f4c1b2dc4c0ae29f05f9ee9ebc7e5d --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MetricPair.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MetricPair.js","names":["internal","MetricPairTypeId","make","unsafeMake"],"sources":["../../src/MetricPair.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,QAAQ,MAAM,2BAA2B;AAOrD;;;;AAIA,OAAO,MAAMC,gBAAgB,GAAkBD,QAAQ,CAACC,gBAAgB;AAwCxE;;;;AAIA,OAAO,MAAMC,IAAI,GAGSF,QAAQ,CAACE,IAAI;AAEvC;;;;AAIA,OAAO,MAAMC,UAAU,GAGGH,QAAQ,CAACG,UAAU","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MetricPolling.js b/backend/node_modules/effect/dist/esm/MetricPolling.js new file mode 100644 index 0000000000000000000000000000000000000000..29cac4b373591bb26421e1bc2b1a939906ec57bc --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MetricPolling.js @@ -0,0 +1,59 @@ +import * as internal from "./internal/metric/polling.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const MetricPollingTypeId = internal.MetricPollingTypeId; +/** + * Constructs a new polling metric from a metric and poll effect. + * + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * Collects all of the polling metrics into a single polling metric, which + * polls for, updates, and produces the outputs of all individual metrics. + * + * @since 2.0.0 + * @category constructors + */ +export const collectAll = internal.collectAll; +/** + * Returns an effect that will launch the polling metric in a background + * fiber, using the specified schedule. + * + * @since 2.0.0 + * @category utils + */ +export const launch = internal.launch; +/** + * An effect that polls a value that may be fed to the metric. + * + * @since 2.0.0 + * @category utils + */ +export const poll = internal.poll; +/** + * An effect that polls for a value and uses the value to update the metric. + * + * @since 2.0.0 + * @category utils + */ +export const pollAndUpdate = internal.pollAndUpdate; +/** + * Returns a new polling metric whose poll function will be retried with the + * specified retry policy. + * + * @since 2.0.0 + * @category constructors + */ +export const retry = internal.retry; +/** + * Zips this polling metric with the specified polling metric. + * + * @since 2.0.0 + * @category utils + */ +export const zip = internal.zip; +//# sourceMappingURL=MetricPolling.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MetricPolling.js.map b/backend/node_modules/effect/dist/esm/MetricPolling.js.map new file mode 100644 index 0000000000000000000000000000000000000000..e9e757bf51af52b462e378722ed8ac0a337190f8 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MetricPolling.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MetricPolling.js","names":["internal","MetricPollingTypeId","make","collectAll","launch","poll","pollAndUpdate","retry","zip"],"sources":["../../src/MetricPolling.ts"],"sourcesContent":[null],"mappings":"AAKA,OAAO,KAAKA,QAAQ,MAAM,8BAA8B;AAMxD;;;;AAIA,OAAO,MAAMC,mBAAmB,GAAkBD,QAAQ,CAACC,mBAAmB;AA2B9E;;;;;;AAMA,OAAO,MAAMC,IAAI,GAGyBF,QAAQ,CAACE,IAAI;AAEvD;;;;;;;AAOA,OAAO,MAAMC,UAAU,GAEwCH,QAAQ,CAACG,UAAU;AAElF;;;;;;;AAOA,OAAO,MAAMC,MAAM,GAsBfJ,QAAQ,CAACI,MAAM;AAEnB;;;;;;AAMA,OAAO,MAAMC,IAAI,GACfL,QAAQ,CAACK,IAAI;AAEf;;;;;;AAMA,OAAO,MAAMC,aAAa,GAEON,QAAQ,CAACM,aAAa;AAEvD;;;;;;;AAOA,OAAO,MAAMC,KAAK,GAoBdP,QAAQ,CAACO,KAAK;AAElB;;;;;;AAMA,OAAO,MAAMC,GAAG,GAgCZR,QAAQ,CAACQ,GAAG","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MetricState.js b/backend/node_modules/effect/dist/esm/MetricState.js new file mode 100644 index 0000000000000000000000000000000000000000..f35a619dec5c29456c1d3798eea43212fc4e1e3a --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MetricState.js @@ -0,0 +1,87 @@ +import * as internal from "./internal/metric/state.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const MetricStateTypeId = internal.MetricStateTypeId; +/** + * @since 2.0.0 + * @category symbols + */ +export const CounterStateTypeId = internal.CounterStateTypeId; +/** + * @since 2.0.0 + * @category symbols + */ +export const FrequencyStateTypeId = internal.FrequencyStateTypeId; +/** + * @since 2.0.0 + * @category symbols + */ +export const GaugeStateTypeId = internal.GaugeStateTypeId; +/** + * @since 2.0.0 + * @category symbols + */ +export const HistogramStateTypeId = internal.HistogramStateTypeId; +/** + * @since 2.0.0 + * @category symbols + */ +export const SummaryStateTypeId = internal.SummaryStateTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +export const counter = internal.counter; +/** + * @since 2.0.0 + * @category constructors + */ +export const frequency = internal.frequency; +/** + * @since 2.0.0 + * @category constructors + */ +export const gauge = internal.gauge; +/** + * @since 2.0.0 + * @category constructors + */ +export const histogram = internal.histogram; +/** + * @since 2.0.0 + * @category constructors + */ +export const summary = internal.summary; +/** + * @since 2.0.0 + * @category refinements + */ +export const isMetricState = internal.isMetricState; +/** + * @since 2.0.0 + * @category refinements + */ +export const isCounterState = internal.isCounterState; +/** + * @since 2.0.0 + * @category refinements + */ +export const isFrequencyState = internal.isFrequencyState; +/** + * @since 2.0.0 + * @category refinements + */ +export const isGaugeState = internal.isGaugeState; +/** + * @since 2.0.0 + * @category refinements + */ +export const isHistogramState = internal.isHistogramState; +/** + * @since 2.0.0 + * @category refinements + */ +export const isSummaryState = internal.isSummaryState; +//# sourceMappingURL=MetricState.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MetricState.js.map b/backend/node_modules/effect/dist/esm/MetricState.js.map new file mode 100644 index 0000000000000000000000000000000000000000..ab3166327b3e329484d036a6e4d5ba171f8918a7 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MetricState.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MetricState.js","names":["internal","MetricStateTypeId","CounterStateTypeId","FrequencyStateTypeId","GaugeStateTypeId","HistogramStateTypeId","SummaryStateTypeId","counter","frequency","gauge","histogram","summary","isMetricState","isCounterState","isFrequencyState","isGaugeState","isHistogramState","isSummaryState"],"sources":["../../src/MetricState.ts"],"sourcesContent":[null],"mappings":"AAIA,OAAO,KAAKA,QAAQ,MAAM,4BAA4B;AAMtD;;;;AAIA,OAAO,MAAMC,iBAAiB,GAAkBD,QAAQ,CAACC,iBAAiB;AAQ1E;;;;AAIA,OAAO,MAAMC,kBAAkB,GAAkBF,QAAQ,CAACE,kBAAkB;AAQ5E;;;;AAIA,OAAO,MAAMC,oBAAoB,GAAkBH,QAAQ,CAACG,oBAAoB;AAQhF;;;;AAIA,OAAO,MAAMC,gBAAgB,GAAkBJ,QAAQ,CAACI,gBAAgB;AAQxE;;;;AAIA,OAAO,MAAMC,oBAAoB,GAAkBL,QAAQ,CAACK,oBAAoB;AAQhF;;;;AAIA,OAAO,MAAMC,kBAAkB,GAAkBN,QAAQ,CAACM,kBAAkB;AA+F5E;;;;AAIA,OAAO,MAAMC,OAAO,GAWhBP,QAAQ,CAACO,OAAO;AAEpB;;;;AAIA,OAAO,MAAMC,SAAS,GAAwER,QAAQ,CAACQ,SAAS;AAEhH;;;;AAIA,OAAO,MAAMC,KAAK,GAWdT,QAAQ,CAACS,KAAK;AAElB;;;;AAIA,OAAO,MAAMC,SAAS,GAQOV,QAAQ,CAACU,SAAS;AAE/C;;;;AAIA,OAAO,MAAMC,OAAO,GASOX,QAAQ,CAACW,OAAO;AAE3C;;;;AAIA,OAAO,MAAMC,aAAa,GAA8DZ,QAAQ,CAACY,aAAa;AAE9G;;;;AAIA,OAAO,MAAMC,cAAc,GAA8Db,QAAQ,CAACa,cAAc;AAEhH;;;;AAIA,OAAO,MAAMC,gBAAgB,GAA+Cd,QAAQ,CAACc,gBAAgB;AAErG;;;;AAIA,OAAO,MAAMC,YAAY,GAA4Df,QAAQ,CAACe,YAAY;AAE1G;;;;AAIA,OAAO,MAAMC,gBAAgB,GAA+ChB,QAAQ,CAACgB,gBAAgB;AAErG;;;;AAIA,OAAO,MAAMC,cAAc,GAA6CjB,QAAQ,CAACiB,cAAc","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Micro.js b/backend/node_modules/effect/dist/esm/Micro.js new file mode 100644 index 0000000000000000000000000000000000000000..ab1f90ad586a026538b295f29b9d00c329de60c7 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Micro.js @@ -0,0 +1,2528 @@ +/** + * A lightweight alternative to the `Effect` data type, with a subset of the functionality. + * + * @since 3.4.0 + * @experimental + */ +import * as Arr from "./Array.js"; +import * as Context from "./Context.js"; +import * as Effectable from "./Effectable.js"; +import * as Either from "./Either.js"; +import * as Equal from "./Equal.js"; +import { constTrue, constVoid, dual, identity } from "./Function.js"; +import { globalValue } from "./GlobalValue.js"; +import * as Hash from "./Hash.js"; +import { format, NodeInspectSymbol, toStringUnknown } from "./Inspectable.js"; +import * as InternalContext from "./internal/context.js"; +import * as doNotation from "./internal/doNotation.js"; +import { StructuralPrototype } from "./internal/effectable.js"; +import * as Option from "./Option.js"; +import { pipeArguments } from "./Pipeable.js"; +import { hasProperty, isIterable, isTagged } from "./Predicate.js"; +import { SingleShotGen, YieldWrap, yieldWrapGet } from "./Utils.js"; +/** + * @since 3.4.0 + * @experimental + * @category type ids + */ +export const TypeId = /*#__PURE__*/Symbol.for("effect/Micro"); +/** + * @since 3.4.0 + * @experimental + * @category MicroExit + */ +export const MicroExitTypeId = /*#__PURE__*/Symbol.for("effect/Micro/MicroExit"); +/** + * @since 3.4.0 + * @experimental + * @category guards + */ +export const isMicro = u => typeof u === "object" && u !== null && TypeId in u; +// ---------------------------------------------------------------------------- +// MicroCause +// ---------------------------------------------------------------------------- +/** + * @since 3.4.6 + * @experimental + * @category MicroCause + */ +export const MicroCauseTypeId = /*#__PURE__*/Symbol.for("effect/Micro/MicroCause"); +/** + * @since 3.6.6 + * @experimental + * @category guards + */ +export const isMicroCause = self => hasProperty(self, MicroCauseTypeId); +const microCauseVariance = { + _E: identity +}; +class MicroCauseImpl extends globalThis.Error { + _tag; + traces; + [MicroCauseTypeId]; + constructor(_tag, originalError, traces) { + const causeName = `MicroCause.${_tag}`; + let name; + let message; + let stack; + if (originalError instanceof globalThis.Error) { + name = `(${causeName}) ${originalError.name}`; + message = originalError.message; + const messageLines = message.split("\n").length; + stack = originalError.stack ? `(${causeName}) ${originalError.stack.split("\n").slice(0, messageLines + 3).join("\n")}` : `${name}: ${message}`; + } else { + name = causeName; + message = toStringUnknown(originalError, 0); + stack = `${name}: ${message}`; + } + if (traces.length > 0) { + stack += `\n ${traces.join("\n ")}`; + } + super(message); + this._tag = _tag; + this.traces = traces; + this[MicroCauseTypeId] = microCauseVariance; + this.name = name; + this.stack = stack; + } + pipe() { + return pipeArguments(this, arguments); + } + toString() { + return this.stack; + } + [NodeInspectSymbol]() { + return this.stack; + } +} +class Fail extends MicroCauseImpl { + error; + constructor(error, traces = []) { + super("Fail", error, traces); + this.error = error; + } +} +/** + * @since 3.4.6 + * @experimental + * @category MicroCause + */ +export const causeFail = (error, traces = []) => new Fail(error, traces); +class Die extends MicroCauseImpl { + defect; + constructor(defect, traces = []) { + super("Die", defect, traces); + this.defect = defect; + } +} +/** + * @since 3.4.6 + * @experimental + * @category MicroCause + */ +export const causeDie = (defect, traces = []) => new Die(defect, traces); +class Interrupt extends MicroCauseImpl { + constructor(traces = []) { + super("Interrupt", "interrupted", traces); + } +} +/** + * @since 3.4.6 + * @experimental + * @category MicroCause + */ +export const causeInterrupt = (traces = []) => new Interrupt(traces); +/** + * @since 3.4.6 + * @experimental + * @category MicroCause + */ +export const causeIsFail = self => self._tag === "Fail"; +/** + * @since 3.4.6 + * @experimental + * @category MicroCause + */ +export const causeIsDie = self => self._tag === "Die"; +/** + * @since 3.4.6 + * @experimental + * @category MicroCause + */ +export const causeIsInterrupt = self => self._tag === "Interrupt"; +/** + * @since 3.4.6 + * @experimental + * @category MicroCause + */ +export const causeSquash = self => self._tag === "Fail" ? self.error : self._tag === "Die" ? self.defect : self; +/** + * @since 3.4.6 + * @experimental + * @category MicroCause + */ +export const causeWithTrace = /*#__PURE__*/dual(2, (self, trace) => { + const traces = [...self.traces, trace]; + switch (self._tag) { + case "Die": + return causeDie(self.defect, traces); + case "Interrupt": + return causeInterrupt(traces); + case "Fail": + return causeFail(self.error, traces); + } +}); +// ---------------------------------------------------------------------------- +// MicroFiber +// ---------------------------------------------------------------------------- +/** + * @since 3.11.0 + * @experimental + * @category MicroFiber + */ +export const MicroFiberTypeId = /*#__PURE__*/Symbol.for("effect/Micro/MicroFiber"); +const fiberVariance = { + _A: identity, + _E: identity +}; +class MicroFiberImpl { + context; + interruptible; + [MicroFiberTypeId]; + _stack = []; + _observers = []; + _exit; + _children; + currentOpCount = 0; + constructor(context, interruptible = true) { + this.context = context; + this.interruptible = interruptible; + this[MicroFiberTypeId] = fiberVariance; + } + getRef(ref) { + return InternalContext.unsafeGetReference(this.context, ref); + } + addObserver(cb) { + if (this._exit) { + cb(this._exit); + return constVoid; + } + this._observers.push(cb); + return () => { + const index = this._observers.indexOf(cb); + if (index >= 0) { + this._observers.splice(index, 1); + } + }; + } + _interrupted = false; + unsafeInterrupt() { + if (this._exit) { + return; + } + this._interrupted = true; + if (this.interruptible) { + this.evaluate(exitInterrupt); + } + } + unsafePoll() { + return this._exit; + } + evaluate(effect) { + if (this._exit) { + return; + } else if (this._yielded !== undefined) { + const yielded = this._yielded; + this._yielded = undefined; + yielded(); + } + const exit = this.runLoop(effect); + if (exit === Yield) { + return; + } + // the interruptChildren middlware is added in Micro.fork, so it can be + // tree-shaken if not used + const interruptChildren = fiberMiddleware.interruptChildren && fiberMiddleware.interruptChildren(this); + if (interruptChildren !== undefined) { + return this.evaluate(flatMap(interruptChildren, () => exit)); + } + this._exit = exit; + for (let i = 0; i < this._observers.length; i++) { + this._observers[i](exit); + } + this._observers.length = 0; + } + runLoop(effect) { + let yielding = false; + let current = effect; + this.currentOpCount = 0; + try { + while (true) { + this.currentOpCount++; + if (!yielding && this.getRef(CurrentScheduler).shouldYield(this)) { + yielding = true; + const prev = current; + current = flatMap(yieldNow, () => prev); + } + current = current[evaluate](this); + if (current === Yield) { + const yielded = this._yielded; + if (MicroExitTypeId in yielded) { + this._yielded = undefined; + return yielded; + } + return Yield; + } + } + } catch (error) { + if (!hasProperty(current, evaluate)) { + return exitDie(`MicroFiber.runLoop: Not a valid effect: ${String(current)}`); + } + return exitDie(error); + } + } + getCont(symbol) { + while (true) { + const op = this._stack.pop(); + if (!op) return undefined; + const cont = op[ensureCont] && op[ensureCont](this); + if (cont) return { + [symbol]: cont + }; + if (op[symbol]) return op; + } + } + // cancel the yielded operation, or for the yielded exit value + _yielded = undefined; + yieldWith(value) { + this._yielded = value; + return Yield; + } + children() { + return this._children ??= new Set(); + } +} +const fiberMiddleware = /*#__PURE__*/globalValue("effect/Micro/fiberMiddleware", () => ({ + interruptChildren: undefined +})); +const fiberInterruptChildren = fiber => { + if (fiber._children === undefined || fiber._children.size === 0) { + return undefined; + } + return fiberInterruptAll(fiber._children); +}; +/** + * @since 3.11.0 + * @experimental + * @category MicroFiber + */ +export const fiberAwait = self => async(resume => sync(self.addObserver(exit => resume(succeed(exit))))); +/** + * @since 3.11.2 + * @experimental + * @category MicroFiber + */ +export const fiberJoin = self => flatten(fiberAwait(self)); +/** + * @since 3.11.0 + * @experimental + * @category MicroFiber + */ +export const fiberInterrupt = self => suspend(() => { + self.unsafeInterrupt(); + return asVoid(fiberAwait(self)); +}); +/** + * @since 3.11.0 + * @experimental + * @category MicroFiber + */ +export const fiberInterruptAll = fibers => suspend(() => { + for (const fiber of fibers) fiber.unsafeInterrupt(); + const iter = fibers[Symbol.iterator](); + const wait = suspend(() => { + let result = iter.next(); + while (!result.done) { + if (result.value.unsafePoll()) { + result = iter.next(); + continue; + } + const fiber = result.value; + return async(resume => { + fiber.addObserver(_ => { + resume(wait); + }); + }); + } + return exitVoid; + }); + return wait; +}); +const identifier = /*#__PURE__*/Symbol.for("effect/Micro/identifier"); +const args = /*#__PURE__*/Symbol.for("effect/Micro/args"); +const evaluate = /*#__PURE__*/Symbol.for("effect/Micro/evaluate"); +const successCont = /*#__PURE__*/Symbol.for("effect/Micro/successCont"); +const failureCont = /*#__PURE__*/Symbol.for("effect/Micro/failureCont"); +const ensureCont = /*#__PURE__*/Symbol.for("effect/Micro/ensureCont"); +const Yield = /*#__PURE__*/Symbol.for("effect/Micro/Yield"); +const microVariance = { + _A: identity, + _E: identity, + _R: identity +}; +const MicroProto = { + ...Effectable.EffectPrototype, + _op: "Micro", + [TypeId]: microVariance, + pipe() { + return pipeArguments(this, arguments); + }, + [Symbol.iterator]() { + return new SingleShotGen(new YieldWrap(this)); + }, + toJSON() { + return { + _id: "Micro", + op: this[identifier], + ...(args in this ? { + args: this[args] + } : undefined) + }; + }, + toString() { + return format(this); + }, + [NodeInspectSymbol]() { + return format(this); + } +}; +function defaultEvaluate(_fiber) { + return exitDie(`Micro.evaluate: Not implemented`); +} +const makePrimitiveProto = options => ({ + ...MicroProto, + [identifier]: options.op, + [evaluate]: options.eval ?? defaultEvaluate, + [successCont]: options.contA, + [failureCont]: options.contE, + [ensureCont]: options.ensure +}); +const makePrimitive = options => { + const Proto = makePrimitiveProto(options); + return function () { + const self = Object.create(Proto); + self[args] = options.single === false ? arguments : arguments[0]; + return self; + }; +}; +const makeExit = options => { + const Proto = { + ...makePrimitiveProto(options), + [MicroExitTypeId]: MicroExitTypeId, + _tag: options.op, + get [options.prop]() { + return this[args]; + }, + toJSON() { + return { + _id: "MicroExit", + _tag: options.op, + [options.prop]: this[args] + }; + }, + [Equal.symbol](that) { + return isMicroExit(that) && that._tag === options.op && Equal.equals(this[args], that[args]); + }, + [Hash.symbol]() { + return Hash.cached(this, Hash.combine(Hash.string(options.op))(Hash.hash(this[args]))); + } + }; + return function (value) { + const self = Object.create(Proto); + self[args] = value; + self[successCont] = undefined; + self[failureCont] = undefined; + self[ensureCont] = undefined; + return self; + }; +}; +/** + * Creates a `Micro` effect that will succeed with the specified constant value. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +export const succeed = /*#__PURE__*/makeExit({ + op: "Success", + prop: "value", + eval(fiber) { + const cont = fiber.getCont(successCont); + return cont ? cont[successCont](this[args], fiber) : fiber.yieldWith(this); + } +}); +/** + * Creates a `Micro` effect that will fail with the specified `MicroCause`. + * + * @since 3.4.6 + * @experimental + * @category constructors + */ +export const failCause = /*#__PURE__*/makeExit({ + op: "Failure", + prop: "cause", + eval(fiber) { + let cont = fiber.getCont(failureCont); + while (causeIsInterrupt(this[args]) && cont && fiber.interruptible) { + cont = fiber.getCont(failureCont); + } + return cont ? cont[failureCont](this[args], fiber) : fiber.yieldWith(this); + } +}); +/** + * Creates a `Micro` effect that fails with the given error. + * + * This results in a `Fail` variant of the `MicroCause` type, where the error is + * tracked at the type level. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +export const fail = error => failCause(causeFail(error)); +/** + * Creates a `Micro` effect that succeeds with a lazily evaluated value. + * + * If the evaluation of the value throws an error, the effect will fail with a + * `Die` variant of the `MicroCause` type. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +export const sync = /*#__PURE__*/makePrimitive({ + op: "Sync", + eval(fiber) { + const value = this[args](); + const cont = fiber.getCont(successCont); + return cont ? cont[successCont](value, fiber) : fiber.yieldWith(exitSucceed(value)); + } +}); +/** + * Lazily creates a `Micro` effect from the given side-effect. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +export const suspend = /*#__PURE__*/makePrimitive({ + op: "Suspend", + eval(_fiber) { + return this[args](); + } +}); +/** + * Pause the execution of the current `Micro` effect, and resume it on the next + * scheduler tick. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +export const yieldNowWith = /*#__PURE__*/makePrimitive({ + op: "Yield", + eval(fiber) { + let resumed = false; + fiber.getRef(CurrentScheduler).scheduleTask(() => { + if (resumed) return; + fiber.evaluate(exitVoid); + }, this[args] ?? 0); + return fiber.yieldWith(() => { + resumed = true; + }); + } +}); +/** + * Pause the execution of the current `Micro` effect, and resume it on the next + * scheduler tick. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +export const yieldNow = /*#__PURE__*/yieldNowWith(0); +/** + * Creates a `Micro` effect that will succeed with the value wrapped in `Some`. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +export const succeedSome = a => succeed(Option.some(a)); +/** + * Creates a `Micro` effect that succeeds with `None`. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +export const succeedNone = /*#__PURE__*/succeed(/*#__PURE__*/Option.none()); +/** + * Creates a `Micro` effect that will fail with the lazily evaluated `MicroCause`. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +export const failCauseSync = evaluate => suspend(() => failCause(evaluate())); +/** + * Creates a `Micro` effect that will die with the specified error. + * + * This results in a `Die` variant of the `MicroCause` type, where the error is + * not tracked at the type level. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +export const die = defect => exitDie(defect); +/** + * Creates a `Micro` effect that will fail with the lazily evaluated error. + * + * This results in a `Fail` variant of the `MicroCause` type, where the error is + * tracked at the type level. + * + * @since 3.4.6 + * @experimental + * @category constructors + */ +export const failSync = error => suspend(() => fail(error())); +/** + * Converts an `Option` into a `Micro` effect, that will fail with + * `NoSuchElementException` if the option is `None`. Otherwise, it will succeed with the + * value of the option. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +export const fromOption = option => option._tag === "Some" ? succeed(option.value) : fail(new NoSuchElementException({})); +/** + * Converts an `Either` into a `Micro` effect, that will fail with the left side + * of the either if it is a `Left`. Otherwise, it will succeed with the right + * side of the either. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +export const fromEither = either => either._tag === "Right" ? succeed(either.right) : fail(either.left); +const void_ = /*#__PURE__*/succeed(void 0); +export { +/** + * A `Micro` effect that will succeed with `void` (`undefined`). + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +void_ as void }; +const try_ = options => suspend(() => { + try { + return succeed(options.try()); + } catch (err) { + return fail(options.catch(err)); + } +}); +export { +/** + * The `Micro` equivalent of a try / catch block, which allows you to map + * thrown errors to a specific error type. + * + * @example + * ```ts + * import { Micro } from "effect" + * + * Micro.try({ + * try: () => { throw new Error("boom") }, + * catch: (cause) => new Error("caught", { cause }) + * }) + * ``` + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +try_ as try }; +/** + * Wrap a `Promise` into a `Micro` effect. + * + * Any errors will result in a `Die` variant of the `MicroCause` type, where the + * error is not tracked at the type level. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +export const promise = evaluate => asyncOptions(function (resume, signal) { + evaluate(signal).then(a => resume(succeed(a)), e => resume(die(e))); +}, evaluate.length !== 0); +/** + * Wrap a `Promise` into a `Micro` effect. Any errors will be caught and + * converted into a specific error type. + * + * @example + * ```ts + * import { Micro } from "effect" + * + * Micro.tryPromise({ + * try: () => Promise.resolve("success"), + * catch: (cause) => new Error("caught", { cause }) + * }) + * ``` + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +export const tryPromise = options => asyncOptions(function (resume, signal) { + try { + options.try(signal).then(a => resume(succeed(a)), e => resume(fail(options.catch(e)))); + } catch (err) { + resume(fail(options.catch(err))); + } +}, options.try.length !== 0); +/** + * Create a `Micro` effect using the current `MicroFiber`. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +export const withMicroFiber = /*#__PURE__*/makePrimitive({ + op: "WithMicroFiber", + eval(fiber) { + return this[args](fiber); + } +}); +/** + * Flush any yielded effects that are waiting to be executed. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +export const yieldFlush = /*#__PURE__*/withMicroFiber(fiber => { + fiber.getRef(CurrentScheduler).flush(); + return exitVoid; +}); +const asyncOptions = /*#__PURE__*/makePrimitive({ + op: "Async", + single: false, + eval(fiber) { + const register = this[args][0]; + let resumed = false; + let yielded = false; + const controller = this[args][1] ? new AbortController() : undefined; + const onCancel = register(effect => { + if (resumed) return; + resumed = true; + if (yielded) { + fiber.evaluate(effect); + } else { + yielded = effect; + } + }, controller?.signal); + if (yielded !== false) return yielded; + yielded = true; + fiber._yielded = () => { + resumed = true; + }; + if (controller === undefined && onCancel === undefined) { + return Yield; + } + fiber._stack.push(asyncFinalizer(() => { + resumed = true; + controller?.abort(); + return onCancel ?? exitVoid; + })); + return Yield; + } +}); +const asyncFinalizer = /*#__PURE__*/makePrimitive({ + op: "AsyncFinalizer", + ensure(fiber) { + if (fiber.interruptible) { + fiber.interruptible = false; + fiber._stack.push(setInterruptible(true)); + } + }, + contE(cause, _fiber) { + return causeIsInterrupt(cause) ? flatMap(this[args](), () => failCause(cause)) : failCause(cause); + } +}); +/** + * Create a `Micro` effect from an asynchronous computation. + * + * You can return a cleanup effect that will be run when the effect is aborted. + * It is also passed an `AbortSignal` that is triggered when the effect is + * aborted. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +export const async = register => asyncOptions(register, register.length >= 2); +/** + * A `Micro` that will never succeed or fail. It wraps `setInterval` to prevent + * the Javascript runtime from exiting. + * + * @since 3.4.0 + * @experimental + * @category constructors + */ +export const never = /*#__PURE__*/async(function () { + const interval = setInterval(constVoid, 2147483646); + return sync(() => clearInterval(interval)); +}); +/** + * @since 3.4.0 + * @experimental + * @category constructors + */ +export const gen = (...args) => suspend(() => fromIterator(args.length === 1 ? args[0]() : args[1].call(args[0]))); +const fromIterator = /*#__PURE__*/makePrimitive({ + op: "Iterator", + contA(value, fiber) { + const state = this[args].next(value); + if (state.done) return succeed(state.value); + fiber._stack.push(this); + return yieldWrapGet(state.value); + }, + eval(fiber) { + return this[successCont](undefined, fiber); + } +}); +// ---------------------------------------------------------------------------- +// mapping & sequencing +// ---------------------------------------------------------------------------- +/** + * Create a `Micro` effect that will replace the success value of the given + * effect. + * + * @since 3.4.0 + * @experimental + * @category mapping & sequencing + */ +export const as = /*#__PURE__*/dual(2, (self, value) => map(self, _ => value)); +/** + * Wrap the success value of this `Micro` effect in a `Some`. + * + * @since 3.4.0 + * @experimental + * @category mapping & sequencing + */ +export const asSome = self => map(self, Option.some); +/** + * Swap the error and success types of the `Micro` effect. + * + * @since 3.4.0 + * @experimental + * @category mapping & sequencing + */ +export const flip = self => matchEffect(self, { + onFailure: succeed, + onSuccess: fail +}); +/** + * A more flexible version of `flatMap` that combines `map` and `flatMap` into a + * single API. + * + * It also lets you directly pass a `Micro` effect, which will be executed after + * the current effect. + * + * @since 3.4.0 + * @experimental + * @category mapping & sequencing + */ +export const andThen = /*#__PURE__*/dual(2, (self, f) => flatMap(self, a => { + const value = isMicro(f) ? f : typeof f === "function" ? f(a) : f; + return isMicro(value) ? value : succeed(value); +})); +/** + * Execute a side effect from the success value of the `Micro` effect. + * + * It is similar to the `andThen` api, but the success value is ignored. + * + * @since 3.4.0 + * @experimental + * @category mapping & sequencing + */ +export const tap = /*#__PURE__*/dual(2, (self, f) => flatMap(self, a => { + const value = isMicro(f) ? f : typeof f === "function" ? f(a) : f; + return isMicro(value) ? as(value, a) : succeed(a); +})); +/** + * Replace the success value of the `Micro` effect with `void`. + * + * @since 3.4.0 + * @experimental + * @category mapping & sequencing + */ +export const asVoid = self => flatMap(self, _ => exitVoid); +/** + * Access the `MicroExit` of the given `Micro` effect. + * + * @since 3.4.6 + * @experimental + * @category mapping & sequencing + */ +export const exit = self => matchCause(self, { + onFailure: exitFailCause, + onSuccess: exitSucceed +}); +/** + * Replace the error type of the given `Micro` with the full `MicroCause` object. + * + * @since 3.4.0 + * @experimental + * @category mapping & sequencing + */ +export const sandbox = self => catchAllCause(self, fail); +/** + * Returns an effect that races all the specified effects, + * yielding the value of the first effect to succeed with a value. Losers of + * the race will be interrupted immediately + * + * @since 3.4.0 + * @experimental + * @category sequencing + */ +export const raceAll = all => withMicroFiber(parent => async(resume => { + const effects = Arr.fromIterable(all); + const len = effects.length; + let doneCount = 0; + let done = false; + const fibers = new Set(); + const causes = []; + const onExit = exit => { + doneCount++; + if (exit._tag === "Failure") { + causes.push(exit.cause); + if (doneCount >= len) { + resume(failCause(causes[0])); + } + return; + } + done = true; + resume(fibers.size === 0 ? exit : flatMap(uninterruptible(fiberInterruptAll(fibers)), () => exit)); + }; + for (let i = 0; i < len; i++) { + if (done) break; + const fiber = unsafeFork(parent, interruptible(effects[i]), true, true); + fibers.add(fiber); + fiber.addObserver(exit => { + fibers.delete(fiber); + onExit(exit); + }); + } + return fiberInterruptAll(fibers); +})); +/** + * Returns an effect that races all the specified effects, + * yielding the value of the first effect to succeed or fail. Losers of + * the race will be interrupted immediately. + * + * @since 3.4.0 + * @experimental + * @category sequencing + */ +export const raceAllFirst = all => withMicroFiber(parent => async(resume => { + let done = false; + const fibers = new Set(); + const onExit = exit => { + done = true; + resume(fibers.size === 0 ? exit : flatMap(fiberInterruptAll(fibers), () => exit)); + }; + for (const effect of all) { + if (done) break; + const fiber = unsafeFork(parent, interruptible(effect), true, true); + fibers.add(fiber); + fiber.addObserver(exit => { + fibers.delete(fiber); + onExit(exit); + }); + } + return fiberInterruptAll(fibers); +})); +/** + * Returns an effect that races two effects, yielding the value of the first + * effect to succeed. Losers of the race will be interrupted immediately. + * + * @since 3.4.0 + * @experimental + * @category sequencing + */ +export const race = /*#__PURE__*/dual(2, (self, that) => raceAll([self, that])); +/** + * Returns an effect that races two effects, yielding the value of the first + * effect to succeed *or* fail. Losers of the race will be interrupted immediately. + * + * @since 3.4.0 + * @experimental + * @category sequencing + */ +export const raceFirst = /*#__PURE__*/dual(2, (self, that) => raceAllFirst([self, that])); +/** + * Map the success value of this `Micro` effect to another `Micro` effect, then + * flatten the result. + * + * @since 3.4.0 + * @experimental + * @category mapping & sequencing + */ +export const flatMap = /*#__PURE__*/dual(2, (self, f) => { + const onSuccess = Object.create(OnSuccessProto); + onSuccess[args] = self; + onSuccess[successCont] = f; + return onSuccess; +}); +const OnSuccessProto = /*#__PURE__*/makePrimitiveProto({ + op: "OnSuccess", + eval(fiber) { + fiber._stack.push(this); + return this[args]; + } +}); +// ---------------------------------------------------------------------------- +// mapping & sequencing +// ---------------------------------------------------------------------------- +/** + * Flattens any nested `Micro` effects, merging the error and requirement types. + * + * @since 3.4.0 + * @experimental + * @category mapping & sequencing + */ +export const flatten = self => flatMap(self, identity); +/** + * Transforms the success value of the `Micro` effect with the specified + * function. + * + * @since 3.4.0 + * @experimental + * @category mapping & sequencing + */ +export const map = /*#__PURE__*/dual(2, (self, f) => flatMap(self, a => succeed(f(a)))); +/** + * @since 3.4.6 + * @experimental + * @category MicroExit + */ +export const isMicroExit = u => hasProperty(u, MicroExitTypeId); +/** + * @since 3.4.6 + * @experimental + * @category MicroExit + */ +export const exitSucceed = succeed; +/** + * @since 3.4.6 + * @experimental + * @category MicroExit + */ +export const exitFailCause = failCause; +/** + * @since 3.4.6 + * @experimental + * @category MicroExit + */ +export const exitInterrupt = /*#__PURE__*/exitFailCause(/*#__PURE__*/causeInterrupt()); +/** + * @since 3.4.6 + * @experimental + * @category MicroExit + */ +export const exitFail = e => exitFailCause(causeFail(e)); +/** + * @since 3.4.6 + * @experimental + * @category MicroExit + */ +export const exitDie = defect => exitFailCause(causeDie(defect)); +/** + * @since 3.4.6 + * @experimental + * @category MicroExit + */ +export const exitIsSuccess = self => self._tag === "Success"; +/** + * @since 3.4.6 + * @experimental + * @category MicroExit + */ +export const exitIsFailure = self => self._tag === "Failure"; +/** + * @since 3.4.6 + * @experimental + * @category MicroExit + */ +export const exitIsInterrupt = self => exitIsFailure(self) && self.cause._tag === "Interrupt"; +/** + * @since 3.4.6 + * @experimental + * @category MicroExit + */ +export const exitIsFail = self => exitIsFailure(self) && self.cause._tag === "Fail"; +/** + * @since 3.4.6 + * @experimental + * @category MicroExit + */ +export const exitIsDie = self => exitIsFailure(self) && self.cause._tag === "Die"; +/** + * @since 3.4.6 + * @experimental + * @category MicroExit + */ +export const exitVoid = /*#__PURE__*/exitSucceed(void 0); +/** + * @since 3.11.0 + * @experimental + * @category MicroExit + */ +export const exitVoidAll = exits => { + for (const exit of exits) { + if (exit._tag === "Failure") { + return exit; + } + } + return exitVoid; +}; +const setImmediate = "setImmediate" in globalThis ? globalThis.setImmediate : f => setTimeout(f, 0); +/** + * @since 3.5.9 + * @experimental + * @category scheduler + */ +export class MicroSchedulerDefault { + tasks = []; + running = false; + /** + * @since 3.5.9 + */ + scheduleTask(task, _priority) { + this.tasks.push(task); + if (!this.running) { + this.running = true; + setImmediate(this.afterScheduled); + } + } + /** + * @since 3.5.9 + */ + afterScheduled = () => { + this.running = false; + this.runTasks(); + }; + /** + * @since 3.5.9 + */ + runTasks() { + const tasks = this.tasks; + this.tasks = []; + for (let i = 0, len = tasks.length; i < len; i++) { + tasks[i](); + } + } + /** + * @since 3.5.9 + */ + shouldYield(fiber) { + return fiber.currentOpCount >= fiber.getRef(MaxOpsBeforeYield); + } + /** + * @since 3.5.9 + */ + flush() { + while (this.tasks.length > 0) { + this.runTasks(); + } + } +} +/** + * Access the given `Context.Tag` from the environment. + * + * @since 3.4.0 + * @experimental + * @category environment + */ +export const service = tag => withMicroFiber(fiber => succeed(Context.unsafeGet(fiber.context, tag))); +/** + * Access the given `Context.Tag` from the environment, without tracking the + * dependency at the type level. + * + * It will return an `Option` of the service, depending on whether it is + * available in the environment or not. + * + * @since 3.4.0 + * @experimental + * @category environment + */ +export const serviceOption = tag => withMicroFiber(fiber => succeed(Context.getOption(fiber.context, tag))); +/** + * Update the Context with the given mapping function. + * + * @since 3.11.0 + * @experimental + * @category environment + */ +export const updateContext = /*#__PURE__*/dual(2, (self, f) => withMicroFiber(fiber => { + const prev = fiber.context; + fiber.context = f(prev); + return onExit(self, () => { + fiber.context = prev; + return void_; + }); +})); +/** + * Update the service for the given `Context.Tag` in the environment. + * + * @since 3.11.0 + * @experimental + * @category environment + */ +export const updateService = /*#__PURE__*/dual(3, (self, tag, f) => withMicroFiber(fiber => { + const prev = Context.unsafeGet(fiber.context, tag); + fiber.context = Context.add(fiber.context, tag, f(prev)); + return onExit(self, () => { + fiber.context = Context.add(fiber.context, tag, prev); + return void_; + }); +})); +/** + * Access the current `Context` from the environment. + * + * @since 3.4.0 + * @experimental + * @category environment + */ +export const context = () => getContext; +const getContext = /*#__PURE__*/withMicroFiber(fiber => succeed(fiber.context)); +/** + * Merge the given `Context` with the current context. + * + * @since 3.4.0 + * @experimental + * @category environment + */ +export const provideContext = /*#__PURE__*/dual(2, (self, provided) => updateContext(self, Context.merge(provided))); +/** + * Add the provided service to the current context. + * + * @since 3.4.0 + * @experimental + * @category environment + */ +export const provideService = /*#__PURE__*/dual(3, (self, tag, service) => updateContext(self, Context.add(tag, service))); +/** + * Create a service using the provided `Micro` effect, and add it to the + * current context. + * + * @since 3.4.6 + * @experimental + * @category environment + */ +export const provideServiceEffect = /*#__PURE__*/dual(3, (self, tag, acquire) => flatMap(acquire, service => provideService(self, tag, service))); +// ======================================================================== +// References +// ======================================================================== +/** + * @since 3.11.0 + * @experimental + * @category references + */ +export class MaxOpsBeforeYield extends /*#__PURE__*/Context.Reference()("effect/Micro/currentMaxOpsBeforeYield", { + defaultValue: () => 2048 +}) {} +/** + * @since 3.11.0 + * @experimental + * @category environment refs + */ +export class CurrentConcurrency extends /*#__PURE__*/Context.Reference()("effect/Micro/currentConcurrency", { + defaultValue: () => "unbounded" +}) {} +/** + * @since 3.11.0 + * @experimental + * @category environment refs + */ +export class CurrentScheduler extends /*#__PURE__*/Context.Reference()("effect/Micro/currentScheduler", { + defaultValue: () => new MicroSchedulerDefault() +}) {} +/** + * If you have a `Micro` that uses `concurrency: "inherit"`, you can use this + * api to control the concurrency of that `Micro` when it is run. + * + * @example + * ```ts + * import * as Micro from "effect/Micro" + * + * Micro.forEach([1, 2, 3], (n) => Micro.succeed(n), { + * concurrency: "inherit" + * }).pipe( + * Micro.withConcurrency(2) // use a concurrency of 2 + * ) + * ``` + * + * @since 3.4.0 + * @experimental + * @category environment refs + */ +export const withConcurrency = /*#__PURE__*/dual(2, (self, concurrency) => provideService(self, CurrentConcurrency, concurrency)); +// ---------------------------------------------------------------------------- +// zipping +// ---------------------------------------------------------------------------- +/** + * Combine two `Micro` effects into a single effect that produces a tuple of + * their results. + * + * @since 3.4.0 + * @experimental + * @category zipping + */ +export const zip = /*#__PURE__*/dual(args => isMicro(args[1]), (self, that, options) => zipWith(self, that, (a, a2) => [a, a2], options)); +/** + * The `Micro.zipWith` function combines two `Micro` effects and allows you to + * apply a function to the results of the combined effects, transforming them + * into a single value. + * + * @since 3.4.3 + * @experimental + * @category zipping + */ +export const zipWith = /*#__PURE__*/dual(args => isMicro(args[1]), (self, that, f, options) => options?.concurrent +// Use `all` exclusively for concurrent cases, as it introduces additional overhead due to the management of concurrency +? map(all([self, that], { + concurrency: 2 +}), ([a, a2]) => f(a, a2)) : flatMap(self, a => map(that, a2 => f(a, a2)))); +// ---------------------------------------------------------------------------- +// filtering & conditionals +// ---------------------------------------------------------------------------- +/** + * Filter the specified effect with the provided function, failing with specified + * `MicroCause` if the predicate fails. + * + * In addition to the filtering capabilities discussed earlier, you have the option to further + * refine and narrow down the type of the success channel by providing a + * + * @since 3.4.0 + * @experimental + * @category filtering & conditionals + */ +export const filterOrFailCause = /*#__PURE__*/dual(args => isMicro(args[0]), (self, refinement, orFailWith) => flatMap(self, a => refinement(a) ? succeed(a) : failCause(orFailWith(a)))); +/** + * Filter the specified effect with the provided function, failing with specified + * error if the predicate fails. + * + * In addition to the filtering capabilities discussed earlier, you have the option to further + * refine and narrow down the type of the success channel by providing a + * + * @since 3.4.0 + * @experimental + * @category filtering & conditionals + */ +export const filterOrFail = /*#__PURE__*/dual(args => isMicro(args[0]), (self, refinement, orFailWith) => flatMap(self, a => refinement(a) ? succeed(a) : fail(orFailWith(a)))); +/** + * The moral equivalent of `if (p) exp`. + * + * @since 3.4.0 + * @experimental + * @category filtering & conditionals + */ +export const when = /*#__PURE__*/dual(2, (self, condition) => flatMap(isMicro(condition) ? condition : sync(condition), pass => pass ? asSome(self) : succeedNone)); +// ---------------------------------------------------------------------------- +// repetition +// ---------------------------------------------------------------------------- +/** + * Repeat the given `Micro` using the provided options. + * + * The `while` predicate will be checked after each iteration, and can use the + * fall `MicroExit` of the effect to determine if the repetition should continue. + * + * @since 3.4.6 + * @experimental + * @category repetition + */ +export const repeatExit = /*#__PURE__*/dual(2, (self, options) => suspend(() => { + const startedAt = options.schedule ? Date.now() : 0; + let attempt = 0; + const loop = flatMap(exit(self), exit => { + if (options.while !== undefined && !options.while(exit)) { + return exit; + } else if (options.times !== undefined && attempt >= options.times) { + return exit; + } + attempt++; + let delayEffect = yieldNow; + if (options.schedule !== undefined) { + const elapsed = Date.now() - startedAt; + const duration = options.schedule(attempt, elapsed); + if (Option.isNone(duration)) { + return exit; + } + delayEffect = sleep(duration.value); + } + return flatMap(delayEffect, () => loop); + }); + return loop; +})); +/** + * Repeat the given `Micro` effect using the provided options. Only successful + * results will be repeated. + * + * @since 3.4.0 + * @experimental + * @category repetition + */ +export const repeat = /*#__PURE__*/dual(args => isMicro(args[0]), (self, options) => repeatExit(self, { + ...options, + while: exit => exit._tag === "Success" && (options?.while === undefined || options.while(exit.value)) +})); +/** + * Replicates the given effect `n` times. + * + * @since 3.11.0 + * @experimental + * @category repetition + */ +export const replicate = /*#__PURE__*/dual(2, (self, n) => Array.from({ + length: n +}, () => self)); +/** + * Performs this effect the specified number of times and collects the + * results. + * + * @since 3.11.0 + * @category repetition + */ +export const replicateEffect = /*#__PURE__*/dual(args => isMicro(args[0]), (self, n, options) => all(replicate(self, n), options)); +/** + * Repeat the given `Micro` effect forever, only stopping if the effect fails. + * + * @since 3.4.0 + * @experimental + * @category repetition + */ +export const forever = self => repeat(self); +/** + * Create a `MicroSchedule` that will stop repeating after the specified number + * of attempts. + * + * @since 3.4.6 + * @experimental + * @category scheduling + */ +export const scheduleRecurs = n => attempt => attempt <= n ? Option.some(0) : Option.none(); +/** + * Create a `MicroSchedule` that will generate a constant delay. + * + * @since 3.4.6 + * @experimental + * @category scheduling + */ +export const scheduleSpaced = millis => () => Option.some(millis); +/** + * Create a `MicroSchedule` that will generate a delay with an exponential backoff. + * + * @since 3.4.6 + * @experimental + * @category scheduling + */ +export const scheduleExponential = (baseMillis, factor = 2) => attempt => Option.some(Math.pow(factor, attempt) * baseMillis); +/** + * Returns a new `MicroSchedule` with an added calculated delay to each delay + * returned by this schedule. + * + * @since 3.4.6 + * @experimental + * @category scheduling + */ +export const scheduleAddDelay = /*#__PURE__*/dual(2, (self, f) => (attempt, elapsed) => Option.map(self(attempt, elapsed), duration => duration + f())); +/** + * Transform a `MicroSchedule` to one that will have a delay that will never exceed + * the specified maximum. + * + * @since 3.4.6 + * @experimental + * @category scheduling + */ +export const scheduleWithMaxDelay = /*#__PURE__*/dual(2, (self, max) => (attempt, elapsed) => Option.map(self(attempt, elapsed), duration => Math.min(duration, max))); +/** + * Transform a `MicroSchedule` to one that will stop repeating after the specified + * amount of time. + * + * @since 3.4.6 + * @experimental + * @category scheduling + */ +export const scheduleWithMaxElapsed = /*#__PURE__*/dual(2, (self, max) => (attempt, elapsed) => elapsed < max ? self(attempt, elapsed) : Option.none()); +/** + * Combines two `MicroSchedule`s, by recurring if either schedule wants to + * recur, using the minimum of the two durations between recurrences. + * + * @since 3.4.6 + * @experimental + * @category scheduling + */ +export const scheduleUnion = /*#__PURE__*/dual(2, (self, that) => (attempt, elapsed) => Option.zipWith(self(attempt, elapsed), that(attempt, elapsed), (d1, d2) => Math.min(d1, d2))); +/** + * Combines two `MicroSchedule`s, by recurring only if both schedules want to + * recur, using the maximum of the two durations between recurrences. + * + * @since 3.4.6 + * @experimental + * @category scheduling + */ +export const scheduleIntersect = /*#__PURE__*/dual(2, (self, that) => (attempt, elapsed) => Option.zipWith(self(attempt, elapsed), that(attempt, elapsed), (d1, d2) => Math.max(d1, d2))); +// ---------------------------------------------------------------------------- +// error handling +// ---------------------------------------------------------------------------- +/** + * Catch the full `MicroCause` object of the given `Micro` effect, allowing you to + * recover from any kind of cause. + * + * @since 3.4.6 + * @experimental + * @category error handling + */ +export const catchAllCause = /*#__PURE__*/dual(2, (self, f) => { + const onFailure = Object.create(OnFailureProto); + onFailure[args] = self; + onFailure[failureCont] = f; + return onFailure; +}); +const OnFailureProto = /*#__PURE__*/makePrimitiveProto({ + op: "OnFailure", + eval(fiber) { + fiber._stack.push(this); + return this[args]; + } +}); +/** + * Selectively catch a `MicroCause` object of the given `Micro` effect, + * using the provided predicate to determine if the failure should be caught. + * + * @since 3.4.6 + * @experimental + * @category error handling + */ +export const catchCauseIf = /*#__PURE__*/dual(3, (self, predicate, f) => catchAllCause(self, cause => predicate(cause) ? f(cause) : failCause(cause))); +/** + * Catch the error of the given `Micro` effect, allowing you to recover from it. + * + * It only catches expected errors. + * + * @since 3.4.6 + * @experimental + * @category error handling + */ +export const catchAll = /*#__PURE__*/dual(2, (self, f) => catchCauseIf(self, causeIsFail, cause => f(cause.error))); +/** + * Catch any unexpected errors of the given `Micro` effect, allowing you to recover from them. + * + * @since 3.4.6 + * @experimental + * @category error handling + */ +export const catchAllDefect = /*#__PURE__*/dual(2, (self, f) => catchCauseIf(self, causeIsDie, die => f(die.defect))); +/** + * Perform a side effect using the full `MicroCause` object of the given `Micro`. + * + * @since 3.4.6 + * @experimental + * @category error handling + */ +export const tapErrorCause = /*#__PURE__*/dual(2, (self, f) => tapErrorCauseIf(self, constTrue, f)); +/** + * Perform a side effect using if a `MicroCause` object matches the specified + * predicate. + * + * @since 3.4.0 + * @experimental + * @category error handling + */ +export const tapErrorCauseIf = /*#__PURE__*/dual(3, (self, refinement, f) => catchCauseIf(self, refinement, cause => andThen(f(cause), failCause(cause)))); +/** + * Perform a side effect from expected errors of the given `Micro`. + * + * @since 3.4.6 + * @experimental + * @category error handling + */ +export const tapError = /*#__PURE__*/dual(2, (self, f) => tapErrorCauseIf(self, causeIsFail, fail => f(fail.error))); +/** + * Perform a side effect from unexpected errors of the given `Micro`. + * + * @since 3.4.6 + * @experimental + * @category error handling + */ +export const tapDefect = /*#__PURE__*/dual(2, (self, f) => tapErrorCauseIf(self, causeIsDie, die => f(die.defect))); +/** + * Catch any expected errors that match the specified predicate. + * + * @since 3.4.0 + * @experimental + * @category error handling + */ +export const catchIf = /*#__PURE__*/dual(3, (self, predicate, f) => catchCauseIf(self, f => causeIsFail(f) && predicate(f.error), fail => f(fail.error))); +/** + * Recovers from the specified tagged error. + * + * @since 3.4.0 + * @experimental + * @category error handling + */ +export const catchTag = /*#__PURE__*/dual(3, (self, k, f) => catchIf(self, isTagged(k), f)); +/** + * Transform the full `MicroCause` object of the given `Micro` effect. + * + * @since 3.4.6 + * @experimental + * @category error handling + */ +export const mapErrorCause = /*#__PURE__*/dual(2, (self, f) => catchAllCause(self, cause => failCause(f(cause)))); +/** + * Transform any expected errors of the given `Micro` effect. + * + * @since 3.4.0 + * @experimental + * @category error handling + */ +export const mapError = /*#__PURE__*/dual(2, (self, f) => catchAll(self, error => fail(f(error)))); +/** + * Elevate any expected errors of the given `Micro` effect to unexpected errors, + * resulting in an error type of `never`. + * + * @since 3.4.0 + * @experimental + * @category error handling + */ +export const orDie = self => catchAll(self, die); +/** + * Recover from all errors by succeeding with the given value. + * + * @since 3.4.0 + * @experimental + * @category error handling + */ +export const orElseSucceed = /*#__PURE__*/dual(2, (self, f) => catchAll(self, _ => sync(f))); +/** + * Ignore any expected errors of the given `Micro` effect, returning `void`. + * + * @since 3.4.0 + * @experimental + * @category error handling + */ +export const ignore = self => matchEffect(self, { + onFailure: _ => void_, + onSuccess: _ => void_ +}); +/** + * Ignore any expected errors of the given `Micro` effect, returning `void`. + * + * @since 3.4.0 + * @experimental + * @category error handling + */ +export const ignoreLogged = self => matchEffect(self, { + // eslint-disable-next-line no-console + onFailure: error => sync(() => console.error(error)), + onSuccess: _ => void_ +}); +/** + * Replace the success value of the given `Micro` effect with an `Option`, + * wrapping the success value in `Some` and returning `None` if the effect fails + * with an expected error. + * + * @since 3.4.0 + * @experimental + * @category error handling + */ +export const option = self => match(self, { + onFailure: Option.none, + onSuccess: Option.some +}); +/** + * Replace the success value of the given `Micro` effect with an `Either`, + * wrapping the success value in `Right` and wrapping any expected errors with + * a `Left`. + * + * @since 3.4.0 + * @experimental + * @category error handling + */ +export const either = self => match(self, { + onFailure: Either.left, + onSuccess: Either.right +}); +/** + * Retry the given `Micro` effect using the provided options. + * + * @since 3.4.0 + * @experimental + * @category error handling + */ +export const retry = /*#__PURE__*/dual(args => isMicro(args[0]), (self, options) => repeatExit(self, { + ...options, + while: exit => exit._tag === "Failure" && exit.cause._tag === "Fail" && (options?.while === undefined || options.while(exit.cause.error)) +})); +/** + * Add a stack trace to any failures that occur in the effect. The trace will be + * added to the `traces` field of the `MicroCause` object. + * + * @since 3.4.0 + * @experimental + * @category error handling + */ +export const withTrace = function () { + const prevLimit = globalThis.Error.stackTraceLimit; + globalThis.Error.stackTraceLimit = 2; + const error = new globalThis.Error(); + globalThis.Error.stackTraceLimit = prevLimit; + function generate(name, cause) { + const stack = error.stack; + if (!stack) { + return cause; + } + const line = stack.split("\n")[2]?.trim().replace(/^at /, ""); + if (!line) { + return cause; + } + const lineMatch = line.match(/\((.*)\)$/); + return causeWithTrace(cause, `at ${name} (${lineMatch ? lineMatch[1] : line})`); + } + const f = name => self => onError(self, cause => failCause(generate(name, cause))); + if (arguments.length === 2) { + return f(arguments[1])(arguments[0]); + } + return f(arguments[0]); +}; +// ---------------------------------------------------------------------------- +// pattern matching +// ---------------------------------------------------------------------------- +/** + * @since 3.4.6 + * @experimental + * @category pattern matching + */ +export const matchCauseEffect = /*#__PURE__*/dual(2, (self, options) => { + const primitive = Object.create(OnSuccessAndFailureProto); + primitive[args] = self; + primitive[successCont] = options.onSuccess; + primitive[failureCont] = options.onFailure; + return primitive; +}); +const OnSuccessAndFailureProto = /*#__PURE__*/makePrimitiveProto({ + op: "OnSuccessAndFailure", + eval(fiber) { + fiber._stack.push(this); + return this[args]; + } +}); +/** + * @since 3.4.6 + * @experimental + * @category pattern matching + */ +export const matchCause = /*#__PURE__*/dual(2, (self, options) => matchCauseEffect(self, { + onFailure: cause => sync(() => options.onFailure(cause)), + onSuccess: value => sync(() => options.onSuccess(value)) +})); +/** + * @since 3.4.6 + * @experimental + * @category pattern matching + */ +export const matchEffect = /*#__PURE__*/dual(2, (self, options) => matchCauseEffect(self, { + onFailure: cause => cause._tag === "Fail" ? options.onFailure(cause.error) : failCause(cause), + onSuccess: options.onSuccess +})); +/** + * @since 3.4.0 + * @experimental + * @category pattern matching + */ +export const match = /*#__PURE__*/dual(2, (self, options) => matchEffect(self, { + onFailure: error => sync(() => options.onFailure(error)), + onSuccess: value => sync(() => options.onSuccess(value)) +})); +// ---------------------------------------------------------------------------- +// delays & timeouts +// ---------------------------------------------------------------------------- +/** + * Create a `Micro` effect that will sleep for the specified duration. + * + * @since 3.4.0 + * @experimental + * @category delays & timeouts + */ +export const sleep = millis => async(resume => { + const timeout = setTimeout(() => { + resume(void_); + }, millis); + return sync(() => { + clearTimeout(timeout); + }); +}); +/** + * Returns an effect that will delay the execution of this effect by the + * specified duration. + * + * @since 3.4.0 + * @experimental + * @category delays & timeouts + */ +export const delay = /*#__PURE__*/dual(2, (self, millis) => andThen(sleep(millis), self)); +/** + * Returns an effect that will timeout this effect, that will execute the + * fallback effect if the timeout elapses before the effect has produced a value. + * + * If the timeout elapses, the running effect will be safely interrupted. + * + * @since 3.4.0 + * @experimental + * @category delays & timeouts + */ +export const timeoutOrElse = /*#__PURE__*/dual(2, (self, options) => raceFirst(self, andThen(interruptible(sleep(options.duration)), options.onTimeout))); +/** + * Returns an effect that will timeout this effect, that will fail with a + * `TimeoutException` if the timeout elapses before the effect has produced a + * value. + * + * If the timeout elapses, the running effect will be safely interrupted. + * + * @since 3.4.0 + * @experimental + * @category delays & timeouts + */ +export const timeout = /*#__PURE__*/dual(2, (self, millis) => timeoutOrElse(self, { + duration: millis, + onTimeout: () => fail(new TimeoutException()) +})); +/** + * Returns an effect that will timeout this effect, succeeding with a `None` + * if the timeout elapses before the effect has produced a value; and `Some` of + * the produced value otherwise. + * + * If the timeout elapses, the running effect will be safely interrupted. + * + * @since 3.4.0 + * @experimental + * @category delays & timeouts + */ +export const timeoutOption = /*#__PURE__*/dual(2, (self, millis) => raceFirst(asSome(self), as(interruptible(sleep(millis)), Option.none()))); +// ---------------------------------------------------------------------------- +// resources & finalization +// ---------------------------------------------------------------------------- +/** + * @since 3.4.0 + * @experimental + * @category resources & finalization + */ +export const MicroScopeTypeId = /*#__PURE__*/Symbol.for("effect/Micro/MicroScope"); +/** + * @since 3.4.0 + * @experimental + * @category resources & finalization + */ +export const MicroScope = /*#__PURE__*/Context.GenericTag("effect/Micro/MicroScope"); +class MicroScopeImpl { + [MicroScopeTypeId]; + state = { + _tag: "Open", + finalizers: /*#__PURE__*/new Set() + }; + constructor() { + this[MicroScopeTypeId] = MicroScopeTypeId; + } + unsafeAddFinalizer(finalizer) { + if (this.state._tag === "Open") { + this.state.finalizers.add(finalizer); + } + } + addFinalizer(finalizer) { + return suspend(() => { + if (this.state._tag === "Open") { + this.state.finalizers.add(finalizer); + return void_; + } + return finalizer(this.state.exit); + }); + } + unsafeRemoveFinalizer(finalizer) { + if (this.state._tag === "Open") { + this.state.finalizers.delete(finalizer); + } + } + close(microExit) { + return suspend(() => { + if (this.state._tag === "Open") { + const finalizers = Array.from(this.state.finalizers).reverse(); + this.state = { + _tag: "Closed", + exit: microExit + }; + return flatMap(forEach(finalizers, finalizer => exit(finalizer(microExit))), exitVoidAll); + } + return void_; + }); + } + get fork() { + return sync(() => { + const newScope = new MicroScopeImpl(); + if (this.state._tag === "Closed") { + newScope.state = this.state; + return newScope; + } + function fin(exit) { + return newScope.close(exit); + } + this.state.finalizers.add(fin); + newScope.unsafeAddFinalizer(_ => sync(() => this.unsafeRemoveFinalizer(fin))); + return newScope; + }); + } +} +/** + * @since 3.4.0 + * @experimental + * @category resources & finalization + */ +export const scopeMake = /*#__PURE__*/sync(() => new MicroScopeImpl()); +/** + * @since 3.4.0 + * @experimental + * @category resources & finalization + */ +export const scopeUnsafeMake = () => new MicroScopeImpl(); +/** + * Access the current `MicroScope`. + * + * @since 3.4.0 + * @experimental + * @category resources & finalization + */ +export const scope = /*#__PURE__*/service(MicroScope); +/** + * Provide a `MicroScope` to an effect. + * + * @since 3.4.0 + * @experimental + * @category resources & finalization + */ +export const provideScope = /*#__PURE__*/dual(2, (self, scope) => provideService(self, MicroScope, scope)); +/** + * Provide a `MicroScope` to the given effect, closing it after the effect has + * finished executing. + * + * @since 3.4.0 + * @experimental + * @category resources & finalization + */ +export const scoped = self => suspend(() => { + const scope = new MicroScopeImpl(); + return onExit(provideService(self, MicroScope, scope), exit => scope.close(exit)); +}); +/** + * Create a resource with a cleanup `Micro` effect, ensuring the cleanup is + * executed when the `MicroScope` is closed. + * + * @since 3.4.0 + * @experimental + * @category resources & finalization + */ +export const acquireRelease = (acquire, release) => uninterruptible(flatMap(scope, scope => tap(acquire, a => scope.addFinalizer(exit => release(a, exit))))); +/** + * Add a finalizer to the current `MicroScope`. + * + * @since 3.4.0 + * @experimental + * @category resources & finalization + */ +export const addFinalizer = finalizer => flatMap(scope, scope => scope.addFinalizer(finalizer)); +/** + * When the `Micro` effect is completed, run the given finalizer effect with the + * `MicroExit` of the executed effect. + * + * @since 3.4.6 + * @experimental + * @category resources & finalization + */ +export const onExit = /*#__PURE__*/dual(2, (self, f) => uninterruptibleMask(restore => matchCauseEffect(restore(self), { + onFailure: cause => flatMap(f(exitFailCause(cause)), () => failCause(cause)), + onSuccess: a => flatMap(f(exitSucceed(a)), () => succeed(a)) +}))); +/** + * Regardless of the result of the this `Micro` effect, run the finalizer effect. + * + * @since 3.4.0 + * @experimental + * @category resources & finalization + */ +export const ensuring = /*#__PURE__*/dual(2, (self, finalizer) => onExit(self, _ => finalizer)); +/** + * When the `Micro` effect is completed, run the given finalizer effect if it + * matches the specified predicate. + * + * @since 3.4.6 + * @experimental + * @category resources & finalization + */ +export const onExitIf = /*#__PURE__*/dual(3, (self, refinement, f) => onExit(self, exit => refinement(exit) ? f(exit) : exitVoid)); +/** + * When the `Micro` effect fails, run the given finalizer effect with the + * `MicroCause` of the executed effect. + * + * @since 3.4.6 + * @experimental + * @category resources & finalization + */ +export const onError = /*#__PURE__*/dual(2, (self, f) => onExitIf(self, exitIsFailure, exit => f(exit.cause))); +/** + * If this `Micro` effect is aborted, run the finalizer effect. + * + * @since 3.4.6 + * @experimental + * @category resources & finalization + */ +export const onInterrupt = /*#__PURE__*/dual(2, (self, finalizer) => onExitIf(self, exitIsInterrupt, _ => finalizer)); +/** + * Acquire a resource, use it, and then release the resource when the `use` + * effect has completed. + * + * @since 3.4.0 + * @experimental + * @category resources & finalization + */ +export const acquireUseRelease = (acquire, use, release) => uninterruptibleMask(restore => flatMap(acquire, a => flatMap(exit(restore(use(a))), exit => andThen(release(a, exit), exit)))); +// ---------------------------------------------------------------------------- +// interruption +// ---------------------------------------------------------------------------- +/** + * Abort the current `Micro` effect. + * + * @since 3.4.6 + * @experimental + * @category interruption + */ +export const interrupt = /*#__PURE__*/failCause(/*#__PURE__*/causeInterrupt()); +/** + * Flag the effect as uninterruptible, which means that when the effect is + * interrupted, it will be allowed to continue running until completion. + * + * @since 3.4.0 + * @experimental + * @category flags + */ +export const uninterruptible = self => withMicroFiber(fiber => { + if (!fiber.interruptible) return self; + fiber.interruptible = false; + fiber._stack.push(setInterruptible(true)); + return self; +}); +const setInterruptible = /*#__PURE__*/makePrimitive({ + op: "SetInterruptible", + ensure(fiber) { + fiber.interruptible = this[args]; + if (fiber._interrupted && fiber.interruptible) { + return () => exitInterrupt; + } + } +}); +/** + * Flag the effect as interruptible, which means that when the effect is + * interrupted, it will be interrupted immediately. + * + * @since 3.4.0 + * @experimental + * @category flags + */ +export const interruptible = self => withMicroFiber(fiber => { + if (fiber.interruptible) return self; + fiber.interruptible = true; + fiber._stack.push(setInterruptible(false)); + if (fiber._interrupted) return exitInterrupt; + return self; +}); +/** + * Wrap the given `Micro` effect in an uninterruptible region, preventing the + * effect from being aborted. + * + * You can use the `restore` function to restore a `Micro` effect to the + * interruptibility state before the `uninterruptibleMask` was applied. + * + * @example + * ```ts + * import * as Micro from "effect/Micro" + * + * Micro.uninterruptibleMask((restore) => + * Micro.sleep(1000).pipe( // uninterruptible + * Micro.andThen(restore(Micro.sleep(1000))) // interruptible + * ) + * ) + * ``` + * + * @since 3.4.0 + * @experimental + * @category interruption + */ +export const uninterruptibleMask = f => withMicroFiber(fiber => { + if (!fiber.interruptible) return f(identity); + fiber.interruptible = false; + fiber._stack.push(setInterruptible(true)); + return f(interruptible); +}); +/** + * Runs all the provided effects in sequence respecting the structure provided in input. + * + * Supports multiple arguments, a single argument tuple / array or record / struct. + * + * @since 3.4.0 + * @experimental + * @category collecting & elements + */ +export const all = (arg, options) => { + if (Array.isArray(arg) || isIterable(arg)) { + return forEach(arg, identity, options); + } else if (options?.discard) { + return forEach(Object.values(arg), identity, options); + } + return suspend(() => { + const out = {}; + return as(forEach(Object.entries(arg), ([key, effect]) => map(effect, value => { + out[key] = value; + }), { + discard: true, + concurrency: options?.concurrency + }), out); + }); +}; +/** + * @since 3.11.0 + * @experimental + * @category collecting & elements + */ +export const whileLoop = /*#__PURE__*/makePrimitive({ + op: "While", + contA(value, fiber) { + this[args].step(value); + if (this[args].while()) { + fiber._stack.push(this); + return this[args].body(); + } + return exitVoid; + }, + eval(fiber) { + if (this[args].while()) { + fiber._stack.push(this); + return this[args].body(); + } + return exitVoid; + } +}); +/** + * For each element of the provided iterable, run the effect and collect the + * results. + * + * If the `discard` option is set to `true`, the results will be discarded and + * the effect will return `void`. + * + * The `concurrency` option can be set to control how many effects are run + * concurrently. By default, the effects are run sequentially. + * + * @since 3.4.0 + * @experimental + * @category collecting & elements + */ +export const forEach = (iterable, f, options) => withMicroFiber(parent => { + const concurrencyOption = options?.concurrency === "inherit" ? parent.getRef(CurrentConcurrency) : options?.concurrency ?? 1; + const concurrency = concurrencyOption === "unbounded" ? Number.POSITIVE_INFINITY : Math.max(1, concurrencyOption); + const items = Arr.fromIterable(iterable); + let length = items.length; + if (length === 0) { + return options?.discard ? void_ : succeed([]); + } + const out = options?.discard ? undefined : new Array(length); + let index = 0; + if (concurrency === 1) { + return as(whileLoop({ + while: () => index < items.length, + body: () => f(items[index], index), + step: out ? b => out[index++] = b : _ => index++ + }), out); + } + return async(resume => { + const fibers = new Set(); + let result = undefined; + let inProgress = 0; + let doneCount = 0; + let pumping = false; + let interrupted = false; + function pump() { + pumping = true; + while (inProgress < concurrency && index < length) { + const currentIndex = index; + const item = items[currentIndex]; + index++; + inProgress++; + try { + const child = unsafeFork(parent, f(item, currentIndex), true, true); + fibers.add(child); + child.addObserver(exit => { + fibers.delete(child); + if (interrupted) { + return; + } else if (exit._tag === "Failure") { + if (result === undefined) { + result = exit; + length = index; + fibers.forEach(fiber => fiber.unsafeInterrupt()); + } + } else if (out !== undefined) { + out[currentIndex] = exit.value; + } + doneCount++; + inProgress--; + if (doneCount === length) { + resume(result ?? succeed(out)); + } else if (!pumping && inProgress < concurrency) { + pump(); + } + }); + } catch (err) { + result = exitDie(err); + length = index; + fibers.forEach(fiber => fiber.unsafeInterrupt()); + } + } + pumping = false; + } + pump(); + return suspend(() => { + interrupted = true; + index = length; + return fiberInterruptAll(fibers); + }); + }); +}); +/** + * Effectfully filter the elements of the provided iterable. + * + * Use the `concurrency` option to control how many elements are processed + * concurrently. + * + * @since 3.4.0 + * @experimental + * @category collecting & elements + */ +export const filter = (iterable, f, options) => filterMap(iterable, a => map(f(a), pass => { + pass = options?.negate ? !pass : pass; + return pass ? Option.some(a) : Option.none(); +}), options); +/** + * Effectfully filter the elements of the provided iterable. + * + * Use the `concurrency` option to control how many elements are processed + * concurrently. + * + * @since 3.4.0 + * @experimental + * @category collecting & elements + */ +export const filterMap = (iterable, f, options) => suspend(() => { + const out = []; + return as(forEach(iterable, a => map(f(a), o => { + if (o._tag === "Some") { + out.push(o.value); + } + }), { + discard: true, + concurrency: options?.concurrency + }), out); +}); +// ---------------------------------------------------------------------------- +// do notation +// ---------------------------------------------------------------------------- +/** + * Start a do notation block. + * + * @since 3.4.0 + * @experimental + * @category do notation + */ +export const Do = /*#__PURE__*/succeed({}); +/** + * Bind the success value of this `Micro` effect to the provided name. + * + * @since 3.4.0 + * @experimental + * @category do notation + */ +export const bindTo = /*#__PURE__*/doNotation.bindTo(map); +/** + * Bind the success value of this `Micro` effect to the provided name. + * + * @since 3.4.0 + * @experimental + * @category do notation + */ +export const bind = /*#__PURE__*/doNotation.bind(map, flatMap); +const let_ = /*#__PURE__*/doNotation.let_(map); +export { +/** + * Bind the result of a synchronous computation to the given name. + * + * @since 3.4.0 + * @experimental + * @category do notation + */ +let_ as let }; +// ---------------------------------------------------------------------------- +// fibers & forking +// ---------------------------------------------------------------------------- +/** + * Run the `Micro` effect in a new `MicroFiber` that can be awaited, joined, or + * aborted. + * + * When the parent `Micro` finishes, this `Micro` will be aborted. + * + * @since 3.4.0 + * @experimental + * @category fiber & forking + */ +export const fork = self => withMicroFiber(fiber => { + fiberMiddleware.interruptChildren ??= fiberInterruptChildren; + return succeed(unsafeFork(fiber, self)); +}); +const unsafeFork = (parent, effect, immediate = false, daemon = false) => { + const child = new MicroFiberImpl(parent.context, parent.interruptible); + if (!daemon) { + parent.children().add(child); + child.addObserver(() => parent.children().delete(child)); + } + if (immediate) { + child.evaluate(effect); + } else { + parent.getRef(CurrentScheduler).scheduleTask(() => child.evaluate(effect), 0); + } + return child; +}; +/** + * Run the `Micro` effect in a new `MicroFiber` that can be awaited, joined, or + * aborted. + * + * It will not be aborted when the parent `Micro` finishes. + * + * @since 3.4.0 + * @experimental + * @category fiber & forking + */ +export const forkDaemon = self => withMicroFiber(fiber => succeed(unsafeFork(fiber, self, false, true))); +/** + * Run the `Micro` effect in a new `MicroFiber` that can be awaited, joined, or + * aborted. + * + * The lifetime of the handle will be attached to the provided `MicroScope`. + * + * @since 3.4.0 + * @experimental + * @category fiber & forking + */ +export const forkIn = /*#__PURE__*/dual(2, (self, scope) => uninterruptibleMask(restore => flatMap(scope.fork, scope => tap(restore(forkDaemon(onExit(self, exit => scope.close(exit)))), fiber => scope.addFinalizer(_ => fiberInterrupt(fiber)))))); +/** + * Run the `Micro` effect in a new `MicroFiber` that can be awaited, joined, or + * aborted. + * + * The lifetime of the handle will be attached to the current `MicroScope`. + * + * @since 3.4.0 + * @experimental + * @category fiber & forking + */ +export const forkScoped = self => flatMap(scope, scope => forkIn(self, scope)); +// ---------------------------------------------------------------------------- +// execution +// ---------------------------------------------------------------------------- +/** + * Execute the `Micro` effect and return a `MicroFiber` that can be awaited, joined, + * or aborted. + * + * You can listen for the result by adding an observer using the handle's + * `addObserver` method. + * + * @example + * ```ts + * import * as Micro from "effect/Micro" + * + * const handle = Micro.succeed(42).pipe( + * Micro.delay(1000), + * Micro.runFork + * ) + * + * handle.addObserver((exit) => { + * console.log(exit) + * }) + * ``` + * + * @since 3.4.0 + * @experimental + * @category execution + */ +export const runFork = (effect, options) => { + const fiber = new MicroFiberImpl(CurrentScheduler.context(options?.scheduler ?? new MicroSchedulerDefault())); + fiber.evaluate(effect); + if (options?.signal) { + if (options.signal.aborted) { + fiber.unsafeInterrupt(); + } else { + const abort = () => fiber.unsafeInterrupt(); + options.signal.addEventListener("abort", abort, { + once: true + }); + fiber.addObserver(() => options.signal.removeEventListener("abort", abort)); + } + } + return fiber; +}; +/** + * Execute the `Micro` effect and return a `Promise` that resolves with the + * `MicroExit` of the computation. + * + * @since 3.4.6 + * @experimental + * @category execution + */ +export const runPromiseExit = (effect, options) => new Promise((resolve, _reject) => { + const handle = runFork(effect, options); + handle.addObserver(resolve); +}); +/** + * Execute the `Micro` effect and return a `Promise` that resolves with the + * successful value of the computation. + * + * @since 3.4.0 + * @experimental + * @category execution + */ +export const runPromise = (effect, options) => runPromiseExit(effect, options).then(exit => { + if (exit._tag === "Failure") { + throw exit.cause; + } + return exit.value; +}); +/** + * Attempt to execute the `Micro` effect synchronously and return the `MicroExit`. + * + * If any asynchronous effects are encountered, the function will return a + * `CauseDie` containing the `MicroFiber`. + * + * @since 3.4.6 + * @experimental + * @category execution + */ +export const runSyncExit = effect => { + const scheduler = new MicroSchedulerDefault(); + const fiber = runFork(effect, { + scheduler + }); + scheduler.flush(); + return fiber._exit ?? exitDie(fiber); +}; +/** + * Attempt to execute the `Micro` effect synchronously and return the success + * value. + * + * @since 3.4.0 + * @experimental + * @category execution + */ +export const runSync = effect => { + const exit = runSyncExit(effect); + if (exit._tag === "Failure") throw exit.cause; + return exit.value; +}; +const YieldableError = /*#__PURE__*/function () { + class YieldableError extends globalThis.Error {} + // @effect-diagnostics-next-line floatingEffect:off + Object.assign(YieldableError.prototype, MicroProto, StructuralPrototype, { + [identifier]: "Failure", + [evaluate]() { + return fail(this); + }, + toString() { + return this.message ? `${this.name}: ${this.message}` : this.name; + }, + toJSON() { + return { + ...this + }; + }, + [NodeInspectSymbol]() { + const stack = this.stack; + if (stack) { + return `${this.toString()}\n${stack.split("\n").slice(1).join("\n")}`; + } + return this.toString(); + } + }); + return YieldableError; +}(); +/** + * @since 3.4.0 + * @experimental + * @category errors + */ +export const Error = /*#__PURE__*/function () { + return class extends YieldableError { + constructor(args) { + super(); + if (args) { + Object.assign(this, args); + } + } + }; +}(); +/** + * @since 3.4.0 + * @experimental + * @category errors + */ +export const TaggedError = tag => { + class Base extends Error { + _tag = tag; + } + ; + Base.prototype.name = tag; + return Base; +}; +/** + * Represents a checked exception which occurs when an expected element was + * unable to be found. + * + * @since 3.4.4 + * @experimental + * @category errors + */ +export class NoSuchElementException extends /*#__PURE__*/TaggedError("NoSuchElementException") {} +/** + * Represents a checked exception which occurs when a timeout occurs. + * + * @since 3.4.4 + * @experimental + * @category errors + */ +export class TimeoutException extends /*#__PURE__*/TaggedError("TimeoutException") {} +//# sourceMappingURL=Micro.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MutableHashMap.js b/backend/node_modules/effect/dist/esm/MutableHashMap.js new file mode 100644 index 0000000000000000000000000000000000000000..5fb1fa87d60a5db279865eb6dc4cd05482f6a2b3 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MutableHashMap.js @@ -0,0 +1,299 @@ +import * as Equal from "./Equal.js"; +import { dual } from "./Function.js"; +import * as Hash from "./Hash.js"; +import { format, NodeInspectSymbol, toJSON } from "./Inspectable.js"; +import * as Option from "./Option.js"; +import { pipeArguments } from "./Pipeable.js"; +const TypeId = /*#__PURE__*/Symbol.for("effect/MutableHashMap"); +const MutableHashMapProto = { + [TypeId]: TypeId, + [Symbol.iterator]() { + return new MutableHashMapIterator(this); + }, + toString() { + return format(this.toJSON()); + }, + toJSON() { + return { + _id: "MutableHashMap", + values: Array.from(this).map(toJSON) + }; + }, + [NodeInspectSymbol]() { + return this.toJSON(); + }, + pipe() { + return pipeArguments(this, arguments); + } +}; +class MutableHashMapIterator { + self; + referentialIterator; + bucketIterator; + constructor(self) { + this.self = self; + this.referentialIterator = self.referential[Symbol.iterator](); + } + next() { + if (this.bucketIterator !== undefined) { + return this.bucketIterator.next(); + } + const result = this.referentialIterator.next(); + if (result.done) { + this.bucketIterator = new BucketIterator(this.self.buckets.values()); + return this.next(); + } + return result; + } + [Symbol.iterator]() { + return new MutableHashMapIterator(this.self); + } +} +class BucketIterator { + backing; + constructor(backing) { + this.backing = backing; + } + currentBucket; + next() { + if (this.currentBucket === undefined) { + const result = this.backing.next(); + if (result.done) { + return result; + } + this.currentBucket = result.value[Symbol.iterator](); + } + const result = this.currentBucket.next(); + if (result.done) { + this.currentBucket = undefined; + return this.next(); + } + return result; + } +} +/** + * @since 2.0.0 + * @category constructors + */ +export const empty = () => { + const self = Object.create(MutableHashMapProto); + self.referential = new Map(); + self.buckets = new Map(); + self.bucketsSize = 0; + return self; +}; +/** + * @since 2.0.0 + * @category constructors + */ +export const make = (...entries) => fromIterable(entries); +/** + * Creates a new `MutableHashMap` from an iterable collection of key/value pairs. + * + * @since 2.0.0 + * @category constructors + */ +export const fromIterable = entries => { + const self = empty(); + for (const [key, value] of entries) { + set(self, key, value); + } + return self; +}; +/** + * @since 2.0.0 + * @category elements + */ +export const get = /*#__PURE__*/dual(2, (self, key) => { + if (Equal.isEqual(key) === false) { + return self.referential.has(key) ? Option.some(self.referential.get(key)) : Option.none(); + } + const hash = key[Hash.symbol](); + const bucket = self.buckets.get(hash); + if (bucket === undefined) { + return Option.none(); + } + return getFromBucket(self, bucket, key); +}); +/** + * @since 3.8.0 + * @category elements + */ +export const keys = self => { + const keys = Array.from(self.referential.keys()); + for (const bucket of self.buckets.values()) { + for (let i = 0, len = bucket.length; i < len; i++) { + keys.push(bucket[i][0]); + } + } + return keys; +}; +/** + * @since 3.8.0 + * @category elements + */ +export const values = self => { + const values = Array.from(self.referential.values()); + for (const bucket of self.buckets.values()) { + for (let i = 0, len = bucket.length; i < len; i++) { + values.push(bucket[i][1]); + } + } + return values; +}; +const getFromBucket = (self, bucket, key, remove = false) => { + for (let i = 0, len = bucket.length; i < len; i++) { + if (key[Equal.symbol](bucket[i][0])) { + const value = bucket[i][1]; + if (remove) { + bucket.splice(i, 1); + self.bucketsSize--; + } + return Option.some(value); + } + } + return Option.none(); +}; +/** + * @since 2.0.0 + * @category elements + */ +export const has = /*#__PURE__*/dual(2, (self, key) => Option.isSome(get(self, key))); +/** + * @since 2.0.0 + */ +export const set = /*#__PURE__*/dual(3, (self, key, value) => { + if (Equal.isEqual(key) === false) { + self.referential.set(key, value); + return self; + } + const hash = key[Hash.symbol](); + const bucket = self.buckets.get(hash); + if (bucket === undefined) { + self.buckets.set(hash, [[key, value]]); + self.bucketsSize++; + return self; + } + removeFromBucket(self, bucket, key); + bucket.push([key, value]); + self.bucketsSize++; + return self; +}); +const removeFromBucket = (self, bucket, key) => { + for (let i = 0, len = bucket.length; i < len; i++) { + if (key[Equal.symbol](bucket[i][0])) { + bucket.splice(i, 1); + self.bucketsSize--; + return; + } + } +}; +/** + * Updates the value of the specified key within the `MutableHashMap` if it exists. + * + * @since 2.0.0 + */ +export const modify = /*#__PURE__*/dual(3, (self, key, f) => { + if (Equal.isEqual(key) === false) { + if (self.referential.has(key)) { + self.referential.set(key, f(self.referential.get(key))); + } + return self; + } + const hash = key[Hash.symbol](); + const bucket = self.buckets.get(hash); + if (bucket === undefined) { + return self; + } + const value = getFromBucket(self, bucket, key, true); + if (Option.isNone(value)) { + return self; + } + bucket.push([key, f(value.value)]); + self.bucketsSize++; + return self; +}); +/** + * Set or remove the specified key in the `MutableHashMap` using the specified + * update function. + * + * @since 2.0.0 + */ +export const modifyAt = /*#__PURE__*/dual(3, (self, key, f) => { + if (Equal.isEqual(key) === false) { + const result = f(get(self, key)); + if (Option.isSome(result)) { + set(self, key, result.value); + } else { + remove(self, key); + } + return self; + } + const hash = key[Hash.symbol](); + const bucket = self.buckets.get(hash); + if (bucket === undefined) { + const result = f(Option.none()); + return Option.isSome(result) ? set(self, key, result.value) : self; + } + const result = f(getFromBucket(self, bucket, key, true)); + if (Option.isNone(result)) { + if (bucket.length === 0) { + self.buckets.delete(hash); + } + return self; + } + bucket.push([key, result.value]); + self.bucketsSize++; + return self; +}); +/** + * @since 2.0.0 + */ +export const remove = /*#__PURE__*/dual(2, (self, key) => { + if (Equal.isEqual(key) === false) { + self.referential.delete(key); + return self; + } + const hash = key[Hash.symbol](); + const bucket = self.buckets.get(hash); + if (bucket === undefined) { + return self; + } + removeFromBucket(self, bucket, key); + if (bucket.length === 0) { + self.buckets.delete(hash); + } + return self; +}); +/** + * @since 2.0.0 + */ +export const clear = self => { + self.referential.clear(); + self.buckets.clear(); + self.bucketsSize = 0; + return self; +}; +/** + * @since 2.0.0 + * @category elements + */ +export const size = self => { + return self.referential.size + self.bucketsSize; +}; +/** + * @since 2.0.0 + */ +export const isEmpty = self => size(self) === 0; +/** + * @since 2.0.0 + */ +export const forEach = /*#__PURE__*/dual(2, (self, f) => { + self.referential.forEach(f); + for (const bucket of self.buckets.values()) { + for (const [key, value] of bucket) { + f(value, key); + } + } +}); +//# sourceMappingURL=MutableHashMap.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MutableHashSet.js b/backend/node_modules/effect/dist/esm/MutableHashSet.js new file mode 100644 index 0000000000000000000000000000000000000000..412131a4f8cec6b8bce29d9cab4c42e65722b2a6 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MutableHashSet.js @@ -0,0 +1,511 @@ +/** + * # MutableHashSet + * + * A mutable `MutableHashSet` provides a collection of unique values with + * efficient lookup, insertion and removal. Unlike its immutable sibling + * {@link module:HashSet}, a `MutableHashSet` can be modified in-place; + * operations like add, remove, and clear directly modify the original set + * rather than creating a new one. This mutability offers benefits like improved + * performance in scenarios where you need to build or modify a set + * incrementally. + * + * ## What Problem Does It Solve? + * + * `MutableHashSet` solves the problem of maintaining an unsorted collection + * where each value appears exactly once, with fast operations for checking + * membership and adding/removing values, in contexts where mutability is + * preferred for performance or implementation simplicity. + * + * ## When to Use + * + * Use `MutableHashSet` when you need: + * + * - A collection with no duplicate values + * - Efficient membership testing (**`O(1)`** average complexity) + * - In-place modifications for better performance + * - A set that will be built or modified incrementally + * - Local mutability in otherwise immutable code + * + * ## Advanced Features + * + * MutableHashSet provides operations for: + * + * - Adding and removing elements with direct mutation + * - Checking for element existence + * - Clearing all elements at once + * - Converting to/from other collection types + * + * ## Performance Characteristics + * + * - **Lookup** operations ({@link module:MutableHashSet.has}): **`O(1)`** average + * time complexity + * - **Insertion** operations ({@link module:MutableHashSet.add}): **`O(1)`** + * average time complexity + * - **Removal** operations ({@link module:MutableHashSet.remove}): **`O(1)`** + * average time complexity + * - **Iteration**: **`O(n)`** where n is the size of the set + * + * The MutableHashSet data structure implements the following traits: + * + * - {@link Iterable}: allows iterating over the values in the set + * - {@link Pipeable}: allows chaining operations with the pipe operator + * - {@link Inspectable}: allows inspecting the contents of the set + * + * ## Operations Reference + * + * | Category | Operation | Description | Complexity | + * | ------------ | ------------------------------------------ | ----------------------------------- | ---------- | + * | constructors | {@link module:MutableHashSet.empty} | Creates an empty MutableHashSet | O(1) | + * | constructors | {@link module:MutableHashSet.fromIterable} | Creates a set from an iterable | O(n) | + * | constructors | {@link module:MutableHashSet.make} | Creates a set from multiple values | O(n) | + * | | | | | + * | elements | {@link module:MutableHashSet.has} | Checks if a value exists in the set | O(1) avg | + * | elements | {@link module:MutableHashSet.add} | Adds a value to the set | O(1) avg | + * | elements | {@link module:MutableHashSet.remove} | Removes a value from the set | O(1) avg | + * | elements | {@link module:MutableHashSet.size} | Gets the number of elements | O(1) | + * | elements | {@link module:MutableHashSet.clear} | Removes all values from the set | O(1) | + * + * ## Notes + * + * ### Mutability Considerations: + * + * Unlike most data structures in the Effect ecosystem, `MutableHashSet` is + * mutable. This means that operations like `add`, `remove`, and `clear` modify + * the original set rather than creating a new one. This can lead to more + * efficient code in some scenarios, but requires careful handling to avoid + * unexpected side effects. + * + * ### When to Choose `MutableHashSet` vs {@link module:HashSet}: + * + * - Use `MutableHashSet` when you need to build or modify a set incrementally and + * performance is a priority + * - Use `HashSet` when you want immutability guarantees and functional + * programming patterns + * - Consider using {@link module:HashSet}'s bounded mutation context (via + * {@link module:HashSet.beginMutation}, {@link module:HashSet.endMutation}, and + * {@link module:HashSet.mutate} methods) when you need temporary mutability + * within an otherwise immutable context - this approach might be sufficient + * for many use cases without requiring a separate `MutableHashSet` + * - `MutableHashSet` is often useful for local operations where the mutability is + * contained and doesn't leak into the broader application + * + * @module MutableHashSet + * @since 2.0.0 + */ +import * as Dual from "./Function.js"; +import { format, NodeInspectSymbol, toJSON } from "./Inspectable.js"; +import * as MutableHashMap from "./MutableHashMap.js"; +import { pipeArguments } from "./Pipeable.js"; +const TypeId = /*#__PURE__*/Symbol.for("effect/MutableHashSet"); +const MutableHashSetProto = { + [TypeId]: TypeId, + [Symbol.iterator]() { + return Array.from(this.keyMap).map(([_]) => _)[Symbol.iterator](); + }, + toString() { + return format(this.toJSON()); + }, + toJSON() { + return { + _id: "MutableHashSet", + values: Array.from(this).map(toJSON) + }; + }, + [NodeInspectSymbol]() { + return this.toJSON(); + }, + pipe() { + return pipeArguments(this, arguments); + } +}; +const fromHashMap = keyMap => { + const set = Object.create(MutableHashSetProto); + set.keyMap = keyMap; + return set; +}; +/** + * Creates an empty mutable hash set. + * + * This function initializes and returns an empty `MutableHashSet` instance, + * which allows for efficient storage and manipulation of unique elements. + * + * Time complexity: **`O(1)`** + * + * @memberof MutableHashSet + * @since 2.0.0 + * @category constructors + * @example + * + * ```ts + * import { MutableHashSet } from "effect" + * + * type T = unknown // replace with your type + * + * // in places where the type can't be inferred, replace with your type + * const set: MutableHashSet.MutableHashSet = MutableHashSet.empty() + * ``` + * + * @template K - The type of the elements to be stored in the hash set. Defaults + * to `never` if not specified. + * @returns A new mutable instance of `MutableHashSet` containing no elements + * for the specified type `K`. + * @see Other `MutableHashSet` constructors are {@link module:MutableHashSet.make} {@link module:MutableHashSet.fromIterable} + */ +export const empty = () => fromHashMap(MutableHashMap.empty()); +/** + * Creates a new `MutableHashSet` from an iterable collection of values. + * Duplicate values are omitted. + * + * Time complexity: **`O(n)`** where n is the number of elements in the iterable + * + * Creating a `MutableHashSet` from an {@link Array} + * + * ```ts + * import { MutableHashSet } from "effect" + * + * const array: Iterable = [1, 2, 3, 4, 5, 1, 2, 3] // Array is also Iterable + * const mutableHashSet: MutableHashSet.MutableHashSet = + * MutableHashSet.fromIterable(array) + * + * console.log( + * // MutableHashSet.MutableHashSet is also an Iterable + * Array.from(mutableHashSet) + * ) // Output: [1, 2, 3, 4, 5] + * ``` + * + * Creating a `MutableHashSet` from a {@link Set} + * + * ```ts + * import { MutableHashSet, pipe } from "effect" + * + * console.log( + * pipe( + * // Set is an Iterable + * new Set(["apple", "banana", "orange", "apple"]), + * // constructs MutableHashSet from an Iterable Set + * MutableHashSet.fromIterable, + * // since MutableHashSet it is itself an Iterable, we can pass it to other functions expecting an Iterable + * Array.from + * ) + * ) // Output: ["apple", "banana", "orange"] + * ``` + * + * Creating a `MutableHashSet` from a {@link Generator} + * + * ```ts + * import { MutableHashSet } from "effect" + * + * // Generator functions return iterables + * function* fibonacci(n: number): Generator { + * let [a, b] = [0, 1] + * for (let i = 0; i < n; i++) { + * yield a + * ;[a, b] = [b, a + b] + * } + * } + * + * // Create a MutableHashSet from the first 10 Fibonacci numbers + * const fibonacciSet = MutableHashSet.fromIterable(fibonacci(10)) + * + * console.log(Array.from(fibonacciSet)) + * // Outputs: [0, 1, 2, 3, 5, 8, 13, 21, 34] but in unsorted order + * ``` + * + * Creating a `MutableHashSet` from another {@link module:MutableHashSet} + * + * ```ts + * import { MutableHashSet, pipe } from "effect" + * + * console.log( + * pipe( + * MutableHashSet.make(1, 2, 3, 4), + * MutableHashSet.fromIterable, + * Array.from + * ) + * ) // Output: [1, 2, 3, 4] + * ``` + * + * Creating a `MutableHashSet` from an {@link module:HashSet} + * + * ```ts + * import { HashSet, MutableHashSet, pipe } from "effect" + * + * console.log( + * pipe( + * HashSet.make(1, 2, 3, 4), // it works also with its immutable HashSet sibling + * MutableHashSet.fromIterable, + * Array.from + * ) + * ) // Output: [1, 2, 3, 4] + * ``` + * + * Creating a `MutableHashSet` from other Effect's data structures like + * {@link Chunk} + * + * ```ts + * import { Chunk, MutableHashSet, pipe } from "effect" + * + * console.log( + * pipe( + * Chunk.make(1, 2, 3, 4), // Chunk is also an Iterable + * MutableHashSet.fromIterable, + * Array.from + * ) + * ) // Outputs: [1, 2, 3, 4] + * ``` + * + * @memberof MutableHashSet + * @since 2.0.0 + * @category constructors + * @template K - The type of elements to be stored in the resulting + * `MutableHashSet`. + * @param keys - An `Iterable` collection containing the keys to be added to the + * `MutableHashSet`. + * @returns A new `MutableHashSet` containing just the unique elements from the + * provided iterable. + * @see Other `MutableHashSet` constructors are {@link module:MutableHashSet.empty} {@link module:MutableHashSet.make} + */ +export const fromIterable = keys => fromHashMap(MutableHashMap.fromIterable(Array.from(keys).map(k => [k, true]))); +/** + * Construct a new `MutableHashSet` from a variable number of values. + * + * Time complexity: **`O(n)`** where n is the number of elements + * + * @memberof MutableHashSet + * @since 2.0.0 + * @category constructors + * @example + * + * ```ts + * import { Equal, Hash, MutableHashSet } from "effect" + * import assert from "node:assert/strict" + * + * class Character implements Equal.Equal { + * readonly name: string + * readonly trait: string + * + * constructor(name: string, trait: string) { + * this.name = name + * this.trait = trait + * } + * + * // Define equality based on name, and trait + * [Equal.symbol](that: Equal.Equal): boolean { + * if (that instanceof Character) { + * return ( + * Equal.equals(this.name, that.name) && + * Equal.equals(this.trait, that.trait) + * ) + * } + * return false + * } + * + * // Generate a hash code based on the sum of the character's name and trait + * [Hash.symbol](): number { + * return Hash.hash(this.name + this.trait) + * } + * + * static readonly of = (name: string, trait: string): Character => { + * return new Character(name, trait) + * } + * } + * + * const mutableCharacterHashSet = MutableHashSet.make( + * Character.of("Alice", "Curious"), + * Character.of("Alice", "Curious"), + * Character.of("White Rabbit", "Always late"), + * Character.of("Mad Hatter", "Tea enthusiast") + * ) + * + * assert.equal( + * MutableHashSet.has( + * mutableCharacterHashSet, + * Character.of("Alice", "Curious") + * ), + * true + * ) + * assert.equal( + * MutableHashSet.has( + * mutableCharacterHashSet, + * Character.of("Fluffy", "Kind") + * ), + * false + * ) + * ``` + * + * @see Other `MutableHashSet` constructors are {@link module:MutableHashSet.fromIterable} {@link module:MutableHashSet.empty} + */ +export const make = (...keys) => fromIterable(keys); +/** + * **Checks** whether the `MutableHashSet` contains the given element, and + * **adds** it if not. + * + * Time complexity: **`O(1)`** average + * + * **Syntax** + * + * ```ts + * import { MutableHashSet, pipe } from "effect" + * + * // with data-last, a.k.a. pipeable API + * pipe( + * MutableHashSet.empty(), + * MutableHashSet.add(0), + * MutableHashSet.add(0) + * ) + * + * // or piped with the pipe function + * MutableHashSet.empty().pipe(MutableHashSet.add(0)) + * + * // or with data-first API + * MutableHashSet.add(MutableHashSet.empty(), 0) + * ``` + * + * @memberof MutableHashSet + * @since 2.0.0 + * @category elements + * @see Other `MutableHashSet` elements are {@link module:MutableHashSet.remove} {@link module:MutableHashSet.size} {@link module:MutableHashSet.clear} {@link module:MutableHashSet.has} + */ +export const add = /*#__PURE__*/Dual.dual(2, (self, key) => (MutableHashMap.set(self.keyMap, key, true), self)); +/** + * Checks if the specified value exists in the `MutableHashSet`. + * + * Time complexity: `O(1)` average + * + * **Syntax** + * + * ```ts + * import { MutableHashSet, pipe } from "effect" + * import assert from "node:assert/strict" + * + * assert.equal( + * // with `data-last`, a.k.a. `pipeable` API + * pipe(MutableHashSet.make(0, 1, 2), MutableHashSet.has(3)), + * false + * ) + * + * assert.equal( + * // or piped with the pipe function + * MutableHashSet.make(0, 1, 2).pipe(MutableHashSet.has(3)), + * false + * ) + * + * assert.equal( + * // or with `data-first` API + * MutableHashSet.has(MutableHashSet.make(0, 1, 2), 3), + * false + * ) + * ``` + * + * @memberof MutableHashSet + * @since 2.0.0 + * @category elements + * @see Other `MutableHashSet` elements are {@link module:MutableHashSet.add} {@link module:MutableHashSet.remove} {@link module:MutableHashSet.size} {@link module:MutableHashSet.clear} + */ +export const has = /*#__PURE__*/Dual.dual(2, (self, key) => MutableHashMap.has(self.keyMap, key)); +/** + * Removes a value from the `MutableHashSet`. + * + * Time complexity: **`O(1)`** average + * + * **Syntax** + * + * ```ts + * import { MutableHashSet, pipe } from "effect" + * import assert from "node:assert/strict" + * + * assert.equal( + * // with `data-last`, a.k.a. `pipeable` API + * pipe( + * MutableHashSet.make(0, 1, 2), + * MutableHashSet.remove(0), + * MutableHashSet.has(0) + * ), + * false + * ) + * + * assert.equal( + * // or piped with the pipe function + * MutableHashSet.make(0, 1, 2).pipe( + * MutableHashSet.remove(0), + * MutableHashSet.has(0) + * ), + * false + * ) + * + * assert.equal( + * // or with `data-first` API + * MutableHashSet.remove(MutableHashSet.make(0, 1, 2), 0).pipe( + * MutableHashSet.has(0) + * ), + * false + * ) + * ``` + * + * @memberof MutableHashSet + * @since 2.0.0 + * @category elements + * @see Other `MutableHashSet` elements are {@link module:MutableHashSet.add} {@link module:MutableHashSet.has} {@link module:MutableHashSet.size} {@link module:MutableHashSet.clear} + */ +export const remove = /*#__PURE__*/Dual.dual(2, (self, key) => (MutableHashMap.remove(self.keyMap, key), self)); +/** + * Calculates the number of values in the `HashSet`. + * + * Time complexity: **`O(1)`** + * + * @memberof MutableHashSet + * @since 2.0.0 + * @category elements + * @example + * + * ```ts + * import { MutableHashSet } from "effect" + * import assert from "node:assert/strict" + * + * assert.equal(MutableHashSet.size(MutableHashSet.empty()), 0) + * + * assert.equal( + * MutableHashSet.size(MutableHashSet.make(1, 2, 2, 3, 4, 3)), + * 4 + * ) + * ``` + * + * @template V - The type of the elements to be stored in the `MutableHashSet`. + * @param self - The `MutableHashSet` instance for which the size is to be + * determined. + * @returns The total number of elements within the `MutableHashSet`. + * @see Other `MutableHashSet` elements are {@link module:MutableHashSet.add} {@link module:MutableHashSet.has} {@link module:MutableHashSet.remove} {@link module:MutableHashSet.clear} + */ +export const size = self => MutableHashMap.size(self.keyMap); +/** + * Removes all values from the `MutableHashSet`. + * + * This function operates by delegating the clearing action to the underlying + * key map associated with the given `MutableHashSet`. It ensures that the hash + * set becomes empty while maintaining its existence and structure. + * + * @memberof MutableHashSet + * @since 2.0.0 + * @category elements + * @example + * + * ```ts + * import { MutableHashSet, pipe } from "effect" + * import assert from "node:assert/strict" + * + * assert.deepStrictEqual( + * pipe( + * MutableHashSet.make(1, 2, 3, 4), + * MutableHashSet.clear, + * MutableHashSet.size + * ), + * 0 + * ) + * ``` + * + * @param self - The `MutableHashSet` to clear. + * @returns The same `MutableHashSet` after all elements have been removed. + * @see Other `MutableHashSet` elements are {@link module:MutableHashSet.add} {@link module:MutableHashSet.has} {@link module:MutableHashSet.remove} {@link module:MutableHashSet.size} + */ +export const clear = self => (MutableHashMap.clear(self.keyMap), self); +//# sourceMappingURL=MutableHashSet.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MutableHashSet.js.map b/backend/node_modules/effect/dist/esm/MutableHashSet.js.map new file mode 100644 index 0000000000000000000000000000000000000000..63f1392bbbb8442f32cc58832c7727a42fa4513a --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MutableHashSet.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MutableHashSet.js","names":["Dual","format","NodeInspectSymbol","toJSON","MutableHashMap","pipeArguments","TypeId","Symbol","for","MutableHashSetProto","iterator","Array","from","keyMap","map","_","toString","_id","values","pipe","arguments","fromHashMap","set","Object","create","empty","fromIterable","keys","k","make","add","dual","self","key","has","remove","size","clear"],"sources":["../../src/MutableHashSet.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8FA,OAAO,KAAKA,IAAI,MAAM,eAAe;AACrC,SAASC,MAAM,EAAoBC,iBAAiB,EAAEC,MAAM,QAAQ,kBAAkB;AACtF,OAAO,KAAKC,cAAc,MAAM,qBAAqB;AAErD,SAASC,aAAa,QAAQ,eAAe;AAE7C,MAAMC,MAAM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AA8BA,OAAO,MAAMwB,KAAK,GAAOL,IAAuB,KAC9C5B,cAAc,CAACiC,KAAK,CAACL,IAAI,CAACnB,MAAM,CAAC,EAAEmB,IAAI,CACxC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MutableQueue.js b/backend/node_modules/effect/dist/esm/MutableQueue.js new file mode 100644 index 0000000000000000000000000000000000000000..3ef7f35e3ecf5dfce08ea34c864467983625d648 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MutableQueue.js @@ -0,0 +1,159 @@ +/** + * @since 2.0.0 + */ +import * as Chunk from "./Chunk.js"; +import * as Dual from "./Function.js"; +import { format, NodeInspectSymbol, toJSON } from "./Inspectable.js"; +import * as MutableList from "./MutableList.js"; +import { pipeArguments } from "./Pipeable.js"; +const TypeId = /*#__PURE__*/Symbol.for("effect/MutableQueue"); +/** + * @since 2.0.0 + * @category symbol + */ +export const EmptyMutableQueue = /*#__PURE__*/Symbol.for("effect/mutable/MutableQueue/Empty"); +const MutableQueueProto = { + [TypeId]: TypeId, + [Symbol.iterator]() { + return Array.from(this.queue)[Symbol.iterator](); + }, + toString() { + return format(this.toJSON()); + }, + toJSON() { + return { + _id: "MutableQueue", + values: Array.from(this).map(toJSON) + }; + }, + [NodeInspectSymbol]() { + return this.toJSON(); + }, + pipe() { + return pipeArguments(this, arguments); + } +}; +const make = capacity => { + const queue = Object.create(MutableQueueProto); + queue.queue = MutableList.empty(); + queue.capacity = capacity; + return queue; +}; +/** + * Creates a new bounded `MutableQueue`. + * + * @since 2.0.0 + * @category constructors + */ +export const bounded = capacity => make(capacity); +/** + * Creates a new unbounded `MutableQueue`. + * + * @since 2.0.0 + * @category constructors + */ +export const unbounded = () => make(undefined); +/** + * Returns the current number of elements in the queue. + * + * @since 2.0.0 + * @category getters + */ +export const length = self => MutableList.length(self.queue); +/** + * Returns `true` if the queue is empty, `false` otherwise. + * + * @since 2.0.0 + * @category getters + */ +export const isEmpty = self => MutableList.isEmpty(self.queue); +/** + * Returns `true` if the queue is full, `false` otherwise. + * + * @since 2.0.0 + * @category getters + */ +export const isFull = self => self.capacity === undefined ? false : MutableList.length(self.queue) === self.capacity; +/** + * The **maximum** number of elements that a queue can hold. + * + * **Note**: unbounded queues can still implement this interface with + * `capacity = Infinity`. + * + * @since 2.0.0 + * @category getters + */ +export const capacity = self => self.capacity === undefined ? Infinity : self.capacity; +/** + * Offers an element to the queue. + * + * Returns whether the enqueue was successful or not. + * + * @since 2.0.0 + */ +export const offer = /*#__PURE__*/Dual.dual(2, (self, value) => { + const queueLength = MutableList.length(self.queue); + if (self.capacity !== undefined && queueLength === self.capacity) { + return false; + } + MutableList.append(value)(self.queue); + return true; +}); +/** + * Enqueues a collection of values into the queue. + * + * Returns a `Chunk` of the values that were **not** able to be enqueued. + * + * @since 2.0.0 + */ +export const offerAll = /*#__PURE__*/Dual.dual(2, (self, values) => { + const iterator = values[Symbol.iterator](); + let next; + let remainder = Chunk.empty(); + let offering = true; + while (offering && (next = iterator.next()) && !next.done) { + offering = offer(next.value)(self); + } + while (next != null && !next.done) { + remainder = Chunk.prepend(next.value)(remainder); + next = iterator.next(); + } + return Chunk.reverse(remainder); +}); +/** + * Dequeues an element from the queue. + * + * Returns either an element from the queue, or the `def` param. + * + * **Note**: if there is no meaningful default for your type, you can always + * use `poll(MutableQueue.EmptyMutableQueue)`. + * + * @since 2.0.0 + */ +export const poll = /*#__PURE__*/Dual.dual(2, (self, def) => { + if (MutableList.isEmpty(self.queue)) { + return def; + } + return MutableList.shift(self.queue); +}); +/** + * Dequeues up to `n` elements from the queue. + * + * Returns a `List` of up to `n` elements. + * + * @since 2.0.0 + */ +export const pollUpTo = /*#__PURE__*/Dual.dual(2, (self, n) => { + let result = Chunk.empty(); + let count = 0; + while (count < n) { + const element = poll(EmptyMutableQueue)(self); + if (element === EmptyMutableQueue) { + break; + } + result = Chunk.prepend(element)(result); + count += 1; + } + return Chunk.reverse(result); +}); +//# sourceMappingURL=MutableQueue.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MutableQueue.js.map b/backend/node_modules/effect/dist/esm/MutableQueue.js.map new file mode 100644 index 0000000000000000000000000000000000000000..bea397507b6be0affe970a0eb38480cfbdbad57c --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MutableQueue.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MutableQueue.js","names":["Chunk","Dual","format","NodeInspectSymbol","toJSON","MutableList","pipeArguments","TypeId","Symbol","for","EmptyMutableQueue","MutableQueueProto","iterator","Array","from","queue","toString","_id","values","map","pipe","arguments","make","capacity","Object","create","empty","bounded","unbounded","undefined","length","self","isEmpty","isFull","Infinity","offer","dual","value","queueLength","append","offerAll","next","remainder","offering","done","prepend","reverse","poll","def","shift","pollUpTo","n","result","count","element"],"sources":["../../src/MutableQueue.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,IAAI,MAAM,eAAe;AACrC,SAASC,MAAM,EAAoBC,iBAAiB,EAAEC,MAAM,QAAQ,kBAAkB;AACtF,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAE/C,SAASC,aAAa,QAAQ,eAAe;AAE7C,MAAMC,MAAM,gBAAkBC,MAAM,CAACC,GAAG,CAAC,qBAAqB,CAAW;AAQzE;;;;AAIA,OAAO,MAAMC,iBAAiB,gBAAGF,MAAM,CAACC,GAAG,CAAC,mCAAmC,CAAC;AAyBhF,MAAME,iBAAiB,GAAsD;EAC3E,CAACJ,MAAM,GAAGA,MAAM;EAChB,CAACC,MAAM,CAACI,QAAQ,IAAC;IACf,OAAOC,KAAK,CAACC,IAAI,CAAC,IAAI,CAACC,KAAK,CAAC,CAACP,MAAM,CAACI,QAAQ,CAAC,EAAE;EAClD,CAAC;EACDI,QAAQA,CAAA;IACN,OAAOd,MAAM,CAAC,IAAI,CAACE,MAAM,EAAE,CAAC;EAC9B,CAAC;EACDA,MAAMA,CAAA;IACJ,OAAO;M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;;;;AAUA,OAAO,MAAMK,IAAI,gBAuBb9C,IAAI,CAACmC,IAAI,CAGX,CAAC,EAAE,CAACL,IAAI,EAAEiB,GAAG,KAAI;EACjB,IAAI3C,WAAW,CAAC2B,OAAO,CAACD,IAAI,CAAChB,KAAK,CAAC,EAAE;IACnC,OAAOiC,GAAG;EACZ;EACA,OAAO3C,WAAW,CAAC4C,KAAK,CAAClB,IAAI,CAAChB,KAAK,CAAE;AACvC,CAAC,CAAC;AAEF;;;;;;;AAOA,OAAO,MAAMmC,QAAQ,gBAiBjBjD,IAAI,CAACmC,IAAI,CAGX,CAAC,EAAE,CAAIL,IAAqB,EAAEoB,CAAS,KAAI;EAC3C,IAAIC,MAAM,GAAGpD,KAAK,CAAC0B,KAAK,EAAK;EAC7B,IAAI2B,KAAK,GAAG,CAAC;EACb,OAAOA,KAAK,GAAGF,CAAC,EAAE;IAChB,MAAMG,OAAO,GAAGP,IAAI,CAACrC,iBAAiB,CAAC,CAACqB,IAAI,CAAC;IAC7C,IAAIuB,OAAO,KAAK5C,iBAAiB,EAAE;MACjC;IACF;IACA0C,MAAM,GAAGpD,KAAK,CAAC6C,OAAO,CAACS,OAAO,CAAC,CAACF,MAAM,CAAC;IACvCC,KAAK,IAAI,CAAC;EACZ;EACA,OAAOrD,KAAK,CAAC8C,OAAO,CAACM,MAAM,CAAC;AAC9B,CAAC,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/MutableRef.js b/backend/node_modules/effect/dist/esm/MutableRef.js new file mode 100644 index 0000000000000000000000000000000000000000..1fa62fe4b18a0e5e786fd09e6f4b00cb6acc0781 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/MutableRef.js @@ -0,0 +1,127 @@ +/** + * @since 2.0.0 + */ +import * as Equal from "./Equal.js"; +import * as Dual from "./Function.js"; +import { format, NodeInspectSymbol, toJSON } from "./Inspectable.js"; +import { pipeArguments } from "./Pipeable.js"; +const TypeId = /*#__PURE__*/Symbol.for("effect/MutableRef"); +const MutableRefProto = { + [TypeId]: TypeId, + toString() { + return format(this.toJSON()); + }, + toJSON() { + return { + _id: "MutableRef", + current: toJSON(this.current) + }; + }, + [NodeInspectSymbol]() { + return this.toJSON(); + }, + pipe() { + return pipeArguments(this, arguments); + } +}; +/** + * @since 2.0.0 + * @category constructors + */ +export const make = value => { + const ref = Object.create(MutableRefProto); + ref.current = value; + return ref; +}; +/** + * @since 2.0.0 + * @category general + */ +export const compareAndSet = /*#__PURE__*/Dual.dual(3, (self, oldValue, newValue) => { + if (Equal.equals(oldValue, self.current)) { + self.current = newValue; + return true; + } + return false; +}); +/** + * @since 2.0.0 + * @category numeric + */ +export const decrement = self => update(self, n => n - 1); +/** + * @since 2.0.0 + * @category numeric + */ +export const decrementAndGet = self => updateAndGet(self, n => n - 1); +/** + * @since 2.0.0 + * @category general + */ +export const get = self => self.current; +/** + * @since 2.0.0 + * @category numeric + */ +export const getAndDecrement = self => getAndUpdate(self, n => n - 1); +/** + * @since 2.0.0 + * @category numeric + */ +export const getAndIncrement = self => getAndUpdate(self, n => n + 1); +/** + * @since 2.0.0 + * @category general + */ +export const getAndSet = /*#__PURE__*/Dual.dual(2, (self, value) => { + const ret = self.current; + self.current = value; + return ret; +}); +/** + * @since 2.0.0 + * @category general + */ +export const getAndUpdate = /*#__PURE__*/Dual.dual(2, (self, f) => getAndSet(self, f(get(self)))); +/** + * @since 2.0.0 + * @category numeric + */ +export const increment = self => update(self, n => n + 1); +/** + * @since 2.0.0 + * @category numeric + */ +export const incrementAndGet = self => updateAndGet(self, n => n + 1); +/** + * @since 2.0.0 + * @category general + */ +export const set = /*#__PURE__*/Dual.dual(2, (self, value) => { + self.current = value; + return self; +}); +/** + * @since 2.0.0 + * @category general + */ +export const setAndGet = /*#__PURE__*/Dual.dual(2, (self, value) => { + self.current = value; + return self.current; +}); +/** + * @since 2.0.0 + * @category general + */ +export const update = /*#__PURE__*/Dual.dual(2, (self, f) => set(self, f(get(self)))); +/** + * @since 2.0.0 + * @category general + */ +export const updateAndGet = /*#__PURE__*/Dual.dual(2, (self, f) => setAndGet(self, f(get(self)))); +/** + * @since 2.0.0 + * @category boolean + */ +export const toggle = self => update(self, _ => !_); +//# sourceMappingURL=MutableRef.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/NonEmptyIterable.js.map b/backend/node_modules/effect/dist/esm/NonEmptyIterable.js.map new file mode 100644 index 0000000000000000000000000000000000000000..71ab0ec200f3804df54df7647fc9645e33952568 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/NonEmptyIterable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"NonEmptyIterable.js","names":["unprepend","self","iterator","Symbol","next","done","Error","value"],"sources":["../../src/NonEmptyIterable.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAkBA;;;;AAIA,OAAO,MAAMA,SAAS,GAAOC,IAAyB,IAAuD;EAC3G,MAAMC,QAAQ,GAAGD,IAAI,CAACE,MAAM,CAACD,QAAQ,CAAC,EAAE;EACxC,MAAME,IAAI,GAAGF,QAAQ,CAACE,IAAI,EAAE;EAC5B,IAAIA,IAAI,CAACC,IAAI,EAAE;IACb,MAAM,IAAIC,KAAK,CACb,kHAAkH,CACnH;EACH;EACA,OAAO,CAACF,IAAI,CAACG,KAAK,EAAEL,QAAQ,CAAC;AAC/B,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Number.js b/backend/node_modules/effect/dist/esm/Number.js new file mode 100644 index 0000000000000000000000000000000000000000..c98011e3067b5c8c31a923b67cedaaf86b043503 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Number.js @@ -0,0 +1,887 @@ +/** + * # Number + * + * This module provides utility functions and type class instances for working + * with the `number` type in TypeScript. It includes functions for basic + * arithmetic operations, as well as type class instances for `Equivalence` and + * `Order`. + * + * ## Operations Reference + * + * | Category | Operation | Description | Domain | Co-domain | + * | ------------ | ------------------------------------------ | ------------------------------------------------------- | ------------------------------ | --------------------- | + * | constructors | {@link module:Number.parse} | Safely parses a string to a number | `string` | `Option` | + * | | | | | | + * | math | {@link module:Number.sum} | Adds two numbers | `number`, `number` | `number` | + * | math | {@link module:Number.sumAll} | Sums all numbers in a collection | `Iterable` | `number` | + * | math | {@link module:Number.subtract} | Subtracts one number from another | `number`, `number` | `number` | + * | math | {@link module:Number.multiply} | Multiplies two numbers | `number`, `number` | `number` | + * | math | {@link module:Number.multiplyAll} | Multiplies all numbers in a collection | `Iterable` | `number` | + * | math | {@link module:Number.divide} | Safely divides handling division by zero | `number`, `number` | `Option` | + * | math | {@link module:Number.unsafeDivide} | Divides but misbehaves for division by zero | `number`, `number` | `number` | + * | math | {@link module:Number.remainder} | Calculates remainder of division | `number`, `number` | `number` | + * | math | {@link module:Number.increment} | Adds 1 to a number | `number` | `number` | + * | math | {@link module:Number.decrement} | Subtracts 1 from a number | `number` | `number` | + * | math | {@link module:Number.sign} | Determines the sign of a number | `number` | `Ordering` | + * | math | {@link module:Number.nextPow2} | Finds the next power of 2 | `number` | `number` | + * | math | {@link module:Number.round} | Rounds a number with specified precision | `number`, `number` | `number` | + * | | | | | | + * | predicates | {@link module:Number.between} | Checks if a number is in a range | `number`, `{minimum, maximum}` | `boolean` | + * | predicates | {@link module:Number.lessThan} | Checks if one number is less than another | `number`, `number` | `boolean` | + * | predicates | {@link module:Number.lessThanOrEqualTo} | Checks if one number is less than or equal | `number`, `number` | `boolean` | + * | predicates | {@link module:Number.greaterThan} | Checks if one number is greater than another | `number`, `number` | `boolean` | + * | predicates | {@link module:Number.greaterThanOrEqualTo} | Checks if one number is greater or equal | `number`, `number` | `boolean` | + * | | | | | | + * | guards | {@link module:Number.isNumber} | Type guard for JavaScript numbers | `unknown` | `boolean` | + * | | | | | | + * | comparison | {@link module:Number.min} | Returns the minimum of two numbers | `number`, `number` | `number` | + * | comparison | {@link module:Number.max} | Returns the maximum of two numbers | `number`, `number` | `number` | + * | comparison | {@link module:Number.clamp} | Restricts a number to a range | `number`, `{minimum, maximum}` | `number` | + * | | | | | | + * | instances | {@link module:Number.Equivalence} | Equivalence instance for numbers | | `Equivalence` | + * | instances | {@link module:Number.Order} | Order instance for numbers | | `Order` | + * | | | | | | + * | errors | {@link module:Number.DivisionByZeroError} | Error thrown by unsafeDivide | | | + * + * ## Composition Patterns and Type Safety + * + * When building function pipelines, understanding how types flow through + * operations is critical: + * + * ### Composing with type-preserving operations + * + * Most operations in this module are type-preserving (`number → number`), + * making them easily composable in pipelines: + * + * ```ts + * import { pipe } from "effect" + * import * as Number from "effect/Number" + * + * const result = pipe( + * 10, + * Number.increment, // number → number + * Number.multiply(2), // number → number + * Number.round(1) // number → number + * ) // Result: number (21) + * ``` + * + * ### Working with Option results + * + * Operations that might fail (like division by zero) return Option types and + * require Option combinators: + * + * ```ts + * import { pipe, Option } from "effect" + * import * as Number from "effect/Number" + * + * const result = pipe( + * 10, + * Number.divide(0), // number → Option + * Option.getOrElse(() => 0) // Option → number + * ) // Result: number (0) + * ``` + * + * ### Composition best practices + * + * - Chain type-preserving operations for maximum composability + * - Use Option combinators when working with potentially failing operations + * - Consider using Effect for operations that might fail with specific errors + * - Remember that all operations maintain JavaScript's floating-point precision + * limitations + * + * @module Number + * @since 2.0.0 + * @see {@link module:BigInt} for more similar operations on `bigint` types + * @see {@link module:BigDecimal} for more similar operations on `BigDecimal` types + */ +import * as equivalence from "./Equivalence.js"; +import { dual } from "./Function.js"; +import * as option from "./internal/option.js"; +import * as _Iterable from "./Iterable.js"; +import * as order from "./Order.js"; +import * as predicate from "./Predicate.js"; +/** + * Type guard that tests if a value is a member of the set of JavaScript + * numbers. + * + * @memberof Number + * @since 2.0.0 + * @category guards + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import * as Number from "effect/Number" + * + * // Regular numbers + * assert.equal(Number.isNumber(2), true) + * assert.equal(Number.isNumber(-3.14), true) + * assert.equal(Number.isNumber(0), true) + * + * // Special numeric values + * assert.equal(Number.isNumber(Infinity), true) + * assert.equal(Number.isNumber(NaN), true) + * + * // Non-number values + * assert.equal(Number.isNumber("2"), false) + * assert.equal(Number.isNumber(true), false) + * assert.equal(Number.isNumber(null), false) + * assert.equal(Number.isNumber(undefined), false) + * assert.equal(Number.isNumber({}), false) + * assert.equal(Number.isNumber([]), false) + * + * // Using as a type guard in conditionals + * function processValue(value: unknown): string { + * if (Number.isNumber(value)) { + * // TypeScript now knows 'value' is a number + * return `Numeric value: ${value.toFixed(2)}` + * } + * return "Not a number" + * } + * + * assert.strictEqual(processValue(42), "Numeric value: 42.00") + * assert.strictEqual(processValue("hello"), "Not a number") + * + * // Filtering for numbers in an array + * const mixed = [1, "two", 3, false, 5] + * const onlyNumbers = mixed.filter(Number.isNumber) + * assert.equal(onlyNumbers, [1, 3, 5]) + * ``` + * + * @param input - The value to test for membership in the set of JavaScript + * numbers + * + * @returns `true` if the input is a JavaScript number, `false` otherwise + */ +export const isNumber = predicate.isNumber; +/** + * Returns the additive inverse of a number, effectively negating it. + * + * @memberof Number + * @since 3.14.6 + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { pipe } from "effect" + * import * as Number from "effect/Number" + * + * assert.equal( + * Number.negate(5), // + * -5 + * ) + * + * assert.equal( + * Number.negate(-5), // + * 5 + * ) + * + * assert.equal( + * Number.negate(0), // + * 0 + * ) + * ``` + * + * @param n - The number value to be negated. + * + * @returns The negated number value. + */ +export const negate = n => multiply(n, -1); +/** + * Performs addition in the set of JavaScript numbers. + * + * @memberof Number + * @since 2.0.0 + * @category math + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { pipe } from "effect" + * import * as Number from "effect/Number" + * + * // Data-first style (direct application) + * assert.equal(Number.sum(2, 3), 5) + * assert.equal(Number.sum(-10, 5), -5) + * assert.equal(Number.sum(0.1, 0.2), 0.30000000000000004) // Note: floating-point precision limitation + * + * // Data-last style (pipeable) + * assert.equal( + * pipe( + * 10, + * Number.sum(5) // 10 + 5 = 15 + * ), + * 15 + * ) + * + * // Chaining multiple additions + * assert.equal( + * pipe( + * 1, + * Number.sum(2), // 1 + 2 = 3 + * Number.sum(3), // 3 + 3 = 6 + * Number.sum(4) // 6 + 4 = 10 + * ), + * 10 + * ) + * + * // Identity property: a + 0 = a + * assert.equal(Number.sum(42, 0), 42) + * + * // Commutative property: a + b = b + a + * assert.equal(Number.sum(5, 3), Number.sum(3, 5)) + * ``` + */ +export const sum = /*#__PURE__*/dual(2, (self, that) => self + that); +/** + * Computes the sum of all elements in an iterable collection of numbers. + * + * @memberof Number + * @since 2.0.0 + * @category math + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import * as Number from "effect/Number" + * + * // Basic sums + * assert.equal(Number.sumAll([2, 3, 4]), 9) // 2 + 3 + 4 = 9 + * assert.equal(Number.sumAll([1.1, 2.2, 3.3]), 6.6) // 1.1 + 2.2 + 3.3 = 6.6 + * + * // Empty collection returns the additive identity (0) + * assert.equal(Number.sumAll([]), 0) + * + * // Single element collection + * assert.equal(Number.sumAll([42]), 42) + * + * // Sums with negative numbers + * assert.equal(Number.sumAll([2, -3, 4]), 3) // 2 + (-3) + 4 = 3 + * assert.equal(Number.sumAll([-2, -3, -4]), -9) // (-2) + (-3) + (-4) = -9 + * + * // Works with any iterable + * assert.equal(Number.sumAll(new Set([2, 3, 4])), 9) + * + * // Using with generated sequences + * function* range(start: number, end: number) { + * for (let i = start; i <= end; i++) yield i + * } + * + * // Compute sum of first 5 natural numbers: 1 + 2 + 3 + 4 + 5 = 15 + * assert.equal(Number.sumAll(range(1, 5)), 15) + * + * // Floating point precision example + * assert.equal( + * Number.sumAll([0.1, 0.2]), + * 0.30000000000000004 // Note IEEE 754 precision limitation + * ) + * ``` + * + * @param collection - An `iterable` containing the `numbers` to sum + * + * @returns The sum of all numbers in the collection, or 0 if the collection is + * empty + */ +export const sumAll = collection => _Iterable.reduce(collection, 0, sum); +/** + * Performs subtraction in the set of JavaScript numbers. + * + * @memberof Number + * @since 2.0.0 + * @category math + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { pipe } from "effect" + * import * as Number from "effect/Number" + * + * // Data-first style (direct application) + * assert.equal(Number.subtract(2, 3), -1) // 2 - 3 = -1 + * assert.equal(Number.subtract(10, 5), 5) // 10 - 5 = 5 + * assert.equal(Number.subtract(0.3, 0.1), 0.19999999999999998) // Note: floating-point precision limitation + * + * // Data-last style (pipeable) + * assert.equal( + * pipe( + * 10, + * Number.subtract(5) // 10 - 5 = 5 + * ), + * 5 + * ) + * + * // Chaining multiple subtractions + * assert.equal( + * pipe( + * 20, + * Number.subtract(5), // 20 - 5 = 15 + * Number.subtract(3), // 15 - 3 = 12 + * Number.subtract(2) // 12 - 2 = 10 + * ), + * 10 + * ) + * + * // Right identity property: a - 0 = a + * assert.equal(Number.subtract(42, 0), 42) + * + * // Self-annihilation property: a - a = 0 + * assert.equal(Number.subtract(42, 42), 0) + * + * // Non-commutative property: a - b ≠ b - a + * assert.equal(Number.subtract(5, 3), 2) // 5 - 3 = 2 + * assert.equal(Number.subtract(3, 5), -2) // 3 - 5 = -2 + * + * // Inverse relation: a - b = -(b - a) + * assert.equal(Number.subtract(5, 3), -Number.subtract(3, 5)) + * ``` + */ +export const subtract = /*#__PURE__*/dual(2, (minuend, subtrahend) => minuend - subtrahend); +/** + * Performs **multiplication** in the set of JavaScript numbers. + * + * @memberof Number + * @since 2.0.0 + * @category math + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { pipe } from "effect" + * import * as Number from "effect/Number" + * + * // Data-first style (direct application) + * assert.equal(Number.multiply(2, 3), 6) // 2 × 3 = 6 + * assert.equal(Number.multiply(-4, 5), -20) // (-4) × 5 = -20 + * assert.equal(Number.multiply(-3, -2), 6) // (-3) × (-2) = 6 + * assert.equal(Number.multiply(0.1, 0.2), 0.020000000000000004) // Note: floating-point precision limitation + * + * // Data-last style (pipeable) + * assert.equal( + * pipe( + * 10, + * Number.multiply(5) // 10 × 5 = 50 + * ), + * 50 + * ) + * + * // Chaining multiple multiplications + * assert.equal( + * pipe( + * 2, + * Number.multiply(3), // 2 × 3 = 6 + * Number.multiply(4), // 6 × 4 = 24 + * Number.multiply(0.5) // 24 × 0.5 = 12 + * ), + * 12 + * ) + * + * // Identity property: a × 1 = a + * assert.equal(Number.multiply(42, 1), 42) + * + * // Zero property: a × 0 = 0 + * assert.equal(Number.multiply(42, 0), 0) + * + * // Commutative property: a × b = b × a + * assert.equal(Number.multiply(5, 3), Number.multiply(3, 5)) + * + * // Associative property: (a × b) × c = a × (b × c) + * const a = 2, + * b = 3, + * c = 4 + * assert.equal( + * Number.multiply(Number.multiply(a, b), c), + * Number.multiply(a, Number.multiply(b, c)) + * ) + * ``` + */ +export const multiply = /*#__PURE__*/dual(2, (multiplier, multiplicand) => multiplier * multiplicand); +/** + * Computes the product of all elements in an iterable collection of numbers. + * + * @memberof Number + * @since 2.0.0 + * @category math + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import * as Number from "effect/Number" + * + * // Basic products + * assert.equal(Number.multiplyAll([2, 3, 4]), 24) // 2 × 3 × 4 = 24 + * assert.equal(Number.multiplyAll([1.5, 2, 3]), 9) // 1.5 × 2 × 3 = 9 + * + * // Empty collection returns the multiplicative identity (1) + * assert.equal(Number.multiplyAll([]), 1) + * + * // Single element collection + * assert.equal(Number.multiplyAll([42]), 42) + * + * // Products with negative numbers + * assert.equal(Number.multiplyAll([2, -3, 4]), -24) // 2 × (-3) × 4 = -24 + * assert.equal(Number.multiplyAll([-2, -3]), 6) // (-2) × (-3) = 6 + * + * // Zero property - if any element is zero, product is zero + * assert.equal(Number.multiplyAll([2, 0, 3]), 0) + * + * // Works with any iterable + * assert.equal(Number.multiplyAll(new Set([2, 3, 4])), 24) + * + * // Using with generated sequences + * function* range(start: number, end: number) { + * for (let i = start; i <= end; i++) yield i + * } + * + * // Compute factorial: 5! = 5 × 4 × 3 × 2 × 1 = 120 + * assert.equal(Number.multiplyAll(range(1, 5)), 120) + * ``` + * + * @param collection - An `iterable` containing the `numbers` to multiply + * + * @returns The product of all numbers in the collection, or 1 if the collection + * is empty + */ +export const multiplyAll = collection => { + let out = 1; + for (const n of collection) { + if (n === 0) { + return 0; + } + out *= n; + } + return out; +}; +/** + * Performs division in the set of JavaScript numbers, returning the result + * wrapped in an `Option` to handle division by zero. + * + * @memberof Number + * @since 2.0.0 + * @category math + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { pipe, Option } from "effect" + * import * as Number from "effect/Number" + * + * // Data-first style (direct application) + * assert.equal(Number.divide(6, 3), Option.some(2)) // 6 ÷ 3 = 2 + * assert.equal(Number.divide(-8, 4), Option.some(-2)) // (-8) ÷ 4 = -2 + * assert.equal(Number.divide(-10, -5), Option.some(2)) // (-10) ÷ (-5) = 2 + * assert.equal(Number.divide(1, 3), Option.some(0.3333333333333333)) // Note: floating-point approximation + * + * // Handling division by zero + * assert.equal(Number.divide(6, 0), Option.none()) // 6 ÷ 0 is undefined + * + * // Data-last style (pipeable) + * assert.equal( + * pipe( + * 10, + * Number.divide(2) // 10 ÷ 2 = 5 + * ), + * Option.some(5) + * ) + * + * // Chaining multiple divisions using Option combinators + * assert.equal( + * pipe( + * Option.some(24), + * Option.flatMap((n) => Number.divide(n, 2)), // 24 ÷ 2 = 12 + * Option.flatMap(Number.divide(3)), // 12 ÷ 3 = 4 + * Option.flatMap(Number.divide(2)) // 4 ÷ 2 = 2 + * ), + * Option.some(2) + * ) + * + * // Division-by-one property: a ÷ 1 = a + * assert.equal(Number.divide(42, 1), Option.some(42)) + * + * // Self-division property: a ÷ a = 1 (for a ≠ 0) + * assert.equal(Number.divide(42, 42), Option.some(1)) + * + * // Non-commutative property: a ÷ b ≠ b ÷ a + * assert.notDeepStrictEqual( + * Number.divide(6, 3), // 6 ÷ 3 = 2 + * Number.divide(3, 6) // 3 ÷ 6 = 0.5 + * ) + * ``` + */ +export const divide = /*#__PURE__*/dual(2, (dividend, divisor) => divisor === 0 ? option.none : option.some(dividend / divisor)); +/** + * Performs division in the set of JavaScript numbers, but misbehaves for + * division by zero. + * + * Unlike {@link module:Number.divide} which returns an Option, this function + * directly returns a number or `Infinity` or `NaN`. + * + * - If the `divisor` is zero, it returns `Infinity`. + * - If both the `dividend` and the `divisor` are zero, then it returns `NaN`. + * + * @memberof Number + * @since 2.0.0 + * @category math + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { pipe } from "effect" + * import * as Number from "effect/Number" + * + * // Data-first style (direct application) + * assert.equal(Number.unsafeDivide(6, 3), 2) // 6 ÷ 3 = 2 + * assert.equal(Number.unsafeDivide(-8, 4), -2) // (-8) ÷ 4 = -2 + * assert.equal(Number.unsafeDivide(-10, -5), 2) // (-10) ÷ (-5) = 2 + * assert.equal(Number.unsafeDivide(1, 3), 0.3333333333333333) + * + * // Data-last style (pipeable) + * assert.equal( + * pipe( + * 10, + * Number.unsafeDivide(2) // 10 ÷ 2 = 5 + * ), + * 5 + * ) + * + * // Chaining multiple divisions + * assert.equal( + * pipe( + * 24, + * Number.unsafeDivide(2), // 24 ÷ 2 = 12 + * Number.unsafeDivide(3), // 12 ÷ 3 = 4 + * Number.unsafeDivide(2) // 4 ÷ 2 = 2 + * ), + * 2 + * ) + * + * assert.equal(Number.unsafeDivide(6, 0), Infinity) + * + * assert.equal(Number.unsafeDivide(0, 0), NaN) + * + * // Compare with safe division + * const safeResult = Number.divide(6, 3) // Option.some(2) + * const unsafeResult = Number.unsafeDivide(6, 3) // 2 directly + * ``` + * + * @throws - An {@link module:Number.DivisionByZeroError} if the divisor is zero. + * @see {@link module:Number.divide} - Safe division returning an Option + */ +export const unsafeDivide = /*#__PURE__*/dual(2, (dividend, divisor) => dividend / divisor); +/** + * Returns the result of adding `1` to a given number. + * + * @memberof Number + * @since 2.0.0 + * @category math + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { increment } from "effect/Number" + * + * assert.equal(increment(2), 3) + * ``` + */ +export const increment = n => sum(n, 1); +/** + * Decrements a number by `1`. + * + * @memberof Number + * @since 2.0.0 + * @category math + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { decrement } from "effect/Number" + * + * assert.equal(decrement(3), 2) + * ``` + */ +export const decrement = n => subtract(n, 1); +/** + * @memberof Number + * @since 2.0.0 + * @category instances + */ +export const Equivalence = equivalence.number; +/** + * @memberof Number + * @since 2.0.0 + * @category instances + */ +export const Order = order.number; +/** + * Returns `true` if the first argument is less than the second, otherwise + * `false`. + * + * @memberof Number + * @since 2.0.0 + * @category predicates + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { lessThan } from "effect/Number" + * + * assert.equal(lessThan(2, 3), true) + * assert.equal(lessThan(3, 3), false) + * assert.equal(lessThan(4, 3), false) + * ``` + */ +export const lessThan = /*#__PURE__*/order.lessThan(Order); +/** + * Returns a function that checks if a given `number` is less than or equal to + * the provided one. + * + * @memberof Number + * @since 2.0.0 + * @category predicates + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { lessThanOrEqualTo } from "effect/Number" + * + * assert.equal(lessThanOrEqualTo(2, 3), true) + * assert.equal(lessThanOrEqualTo(3, 3), true) + * assert.equal(lessThanOrEqualTo(4, 3), false) + * ``` + */ +export const lessThanOrEqualTo = /*#__PURE__*/order.lessThanOrEqualTo(Order); +/** + * Returns `true` if the first argument is greater than the second, otherwise + * `false`. + * + * @memberof Number + * @since 2.0.0 + * @category predicates + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { greaterThan } from "effect/Number" + * + * assert.equal(greaterThan(2, 3), false) + * assert.equal(greaterThan(3, 3), false) + * assert.equal(greaterThan(4, 3), true) + * ``` + */ +export const greaterThan = /*#__PURE__*/order.greaterThan(Order); +/** + * Returns a function that checks if a given `number` is greater than or equal + * to the provided one. + * + * @memberof Number + * @since 2.0.0 + * @category predicates + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { greaterThanOrEqualTo } from "effect/Number" + * + * assert.equal(greaterThanOrEqualTo(2, 3), false) + * assert.equal(greaterThanOrEqualTo(3, 3), true) + * assert.equal(greaterThanOrEqualTo(4, 3), true) + * ``` + */ +export const greaterThanOrEqualTo = /*#__PURE__*/order.greaterThanOrEqualTo(Order); +/** + * Checks if a `number` is between a `minimum` and `maximum` value (inclusive). + * + * @memberof Number + * @since 2.0.0 + * @category predicates + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { Number } from "effect" + * + * const between = Number.between({ minimum: 0, maximum: 5 }) + * + * assert.equal(between(3), true) + * assert.equal(between(-1), false) + * assert.equal(between(6), false) + * ``` + */ +export const between = /*#__PURE__*/order.between(Order); +/** + * Restricts the given `number` to be within the range specified by the + * `minimum` and `maximum` values. + * + * - If the `number` is less than the `minimum` value, the function returns the + * `minimum` value. + * - If the `number` is greater than the `maximum` value, the function returns the + * `maximum` value. + * - Otherwise, it returns the original `number`. + * + * @memberof Number + * @since 2.0.0 + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { Number } from "effect" + * + * const clamp = Number.clamp({ minimum: 1, maximum: 5 }) + * + * assert.equal(clamp(3), 3) + * assert.equal(clamp(0), 1) + * assert.equal(clamp(6), 5) + * ``` + */ +export const clamp = /*#__PURE__*/order.clamp(Order); +/** + * Returns the minimum between two `number`s. + * + * @memberof Number + * @since 2.0.0 + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { min } from "effect/Number" + * + * assert.equal(min(2, 3), 2) + * ``` + */ +export const min = /*#__PURE__*/order.min(Order); +/** + * Returns the maximum between two `number`s. + * + * @memberof Number + * @since 2.0.0 + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { max } from "effect/Number" + * + * assert.equal(max(2, 3), 3) + * ``` + */ +export const max = /*#__PURE__*/order.max(Order); +/** + * Determines the sign of a given `number`. + * + * @memberof Number + * @since 2.0.0 + * @category math + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { sign } from "effect/Number" + * + * assert.equal(sign(-5), -1) + * assert.equal(sign(0), 0) + * assert.equal(sign(5), 1) + * ``` + */ +export const sign = n => Order(n, 0); +/** + * Returns the remainder left over when one operand is divided by a second + * operand. + * + * It always takes the sign of the dividend. + * + * @memberof Number + * @since 2.0.0 + * @category math + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { remainder } from "effect/Number" + * + * assert.equal(remainder(2, 2), 0) + * assert.equal(remainder(3, 2), 1) + * assert.equal(remainder(-4, 2), -0) + * ``` + */ +export const remainder = /*#__PURE__*/dual(2, (dividend, divisor) => { + // https://stackoverflow.com/questions/3966484/why-does-modulus-operator-return-fractional-number-in-javascript/31711034#31711034 + const selfDecCount = (dividend.toString().split(".")[1] || "").length; + const divisorDecCount = (divisor.toString().split(".")[1] || "").length; + const decCount = selfDecCount > divisorDecCount ? selfDecCount : divisorDecCount; + const selfInt = parseInt(dividend.toFixed(decCount).replace(".", "")); + const divisorInt = parseInt(divisor.toFixed(decCount).replace(".", "")); + return selfInt % divisorInt / Math.pow(10, decCount); +}); +/** + * Returns the next power of 2 greater than or equal to the given number. + * + * - For `positive` inputs, returns the smallest power of 2 that is >= the input + * - For `zero`, returns 2 + * - For `negative` inputs, returns NaN (as logarithms of negative numbers are + * undefined) + * - For `NaN` input, returns NaN + * - For `Infinity`, returns Infinity + * + * @memberof Number + * @since 2.0.0 + * @category math + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { nextPow2 } from "effect/Number" + * + * assert.equal(nextPow2(5), 8) + * assert.equal(nextPow2(17), 32) + * assert.equal(nextPow2(0), 2) + * assert.equal(Number.isNaN(nextPow2(-1)), true) // Negative inputs result in NaN + * ``` + */ +export const nextPow2 = n => { + const nextPow = Math.ceil(Math.log(n) / Math.log(2)); + return Math.max(Math.pow(2, nextPow), 2); +}; +/** + * Tries to parse a `number` from a `string` using the `Number()` function. The + * following special string values are supported: "NaN", "Infinity", + * "-Infinity". + * + * @memberof Number + * @since 2.0.0 + * @category constructors + */ +export const parse = s => { + if (s === "NaN") { + return option.some(NaN); + } + if (s === "Infinity") { + return option.some(Infinity); + } + if (s === "-Infinity") { + return option.some(-Infinity); + } + if (s.trim() === "") { + return option.none; + } + const n = Number(s); + return Number.isNaN(n) ? option.none : option.some(n); +}; +/** + * Returns the number rounded with the given precision. + * + * @memberof Number + * @since 3.8.0 + * @category math + * @example + * + * ```ts + * import * as assert from "node:assert/strict" + * import { round } from "effect/Number" + * + * assert.equal(round(1.1234, 2), 1.12) + * assert.equal(round(1.567, 2), 1.57) + * ``` + */ +export const round = /*#__PURE__*/dual(2, (self, precision) => { + const factor = Math.pow(10, precision); + return Math.round(self * factor) / factor; +}); +//# sourceMappingURL=Number.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Number.js.map b/backend/node_modules/effect/dist/esm/Number.js.map new file mode 100644 index 0000000000000000000000000000000000000000..89791e389d29d9b40c59a688f6f790a9fbbb9948 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Number.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Number.js","names":["equivalence","dual","option","_Iterable","order","predicate","isNumber","negate","n","multiply","sum","self","that","sumAll","collection","reduce","subtract","minuend","subtrahend","multiplier","multiplicand","multiplyAll","out","divide","dividend","divisor","none","some","unsafeDivide","increment","decrement","Equivalence","number","Order","lessThan","lessThanOrEqualTo","greaterThan","greaterThanOrEqualTo","between","clamp","min","max","sign","remainder","selfDecCount","toString","split","length","divisorDecCount","decCount","selfInt","parseInt","toFixed","replace","divisorInt","Math","pow","nextPow2","nextPow","ceil","log","parse","s","NaN","Infinity","trim","Number","isNaN","round","precision","factor"],"sources":["../../src/Number.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiGA,OAAO,KAAKA,WAAW,MAAM,kBAAkB;AAC/C,SAASC,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,MAAM,MAAM,sBAAsB;AAC9C,OAAO,KAAKC,SAAS,MAAM,eAAe;AAE1C,OAAO,KAAKC,KAAK,MAAM,YAAY;AAEnC,OAAO,KAAKC,SAAS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;AAgBA,OAAO,MAAM4D,KAAK,gBAmCdnE,IAAI,CAAC,CAAC,EAAE,CAACU,IAAY,EAAE0D,SAAiB,KAAY;EACtD,MAAMC,MAAM,GAAGf,IAAI,CAACC,GAAG,CAAC,EAAE,EAAEa,SAAS,CAAC;EACtC,OAAOd,IAAI,CAACa,KAAK,CAACzD,IAAI,GAAG2D,MAAM,CAAC,GAAGA,MAAM;AAC3C,CAAC,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Option.js b/backend/node_modules/effect/dist/esm/Option.js new file mode 100644 index 0000000000000000000000000000000000000000..8e40d117eacdf2a70fd6787279f3449831244bcc --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Option.js @@ -0,0 +1,1785 @@ +import * as Equal from "./Equal.js"; +import * as Equivalence from "./Equivalence.js"; +import { constNull, constUndefined, dual, identity, isFunction } from "./Function.js"; +import * as doNotation from "./internal/doNotation.js"; +import * as either from "./internal/either.js"; +import * as option from "./internal/option.js"; +import * as order from "./Order.js"; +import * as Gen from "./Utils.js"; +/** + * @category Symbols + * @since 2.0.0 + */ +export const TypeId = /*#__PURE__*/Symbol.for("effect/Option"); +/** + * Represents the absence of a value by creating an empty `Option`. + * + * `Option.none` returns an `Option`, which is a subtype of `Option`. + * This means you can use it in place of any `Option` regardless of the type + * `A`. + * + * **Example** (Creating an Option with No Value) + * + * ```ts + * import { Option } from "effect" + * + * // An Option holding no value + * // + * // ┌─── Option + * // ▼ + * const noValue = Option.none() + * + * console.log(noValue) + * // Output: { _id: 'Option', _tag: 'None' } + * ``` + * + * @see {@link some} for the opposite operation. + * + * @category Constructors + * @since 2.0.0 + */ +export const none = () => option.none; +/** + * Wraps the given value into an `Option` to represent its presence. + * + * **Example** (Creating an Option with a Value) + * + * ```ts + * import { Option } from "effect" + * + * // An Option holding the number 1 + * // + * // ┌─── Option + * // ▼ + * const value = Option.some(1) + * + * console.log(value) + * // Output: { _id: 'Option', _tag: 'Some', value: 1 } + * ``` + * + * @see {@link none} for the opposite operation. + * + * @category Constructors + * @since 2.0.0 + */ +export const some = option.some; +/** + * Determines whether the given value is an `Option`. + * + * **Details** + * + * This function checks if a value is an instance of `Option`. It returns `true` + * if the value is either `Option.some` or `Option.none`, and `false` otherwise. + * This is particularly useful when working with unknown values or when you need + * to ensure type safety in your code. + * + * @example + * ```ts + * import { Option } from "effect" + * + * console.log(Option.isOption(Option.some(1))) + * // Output: true + * + * console.log(Option.isOption(Option.none())) + * // Output: true + * + * console.log(Option.isOption({})) + * // Output: false + * ``` + * + * @category Guards + * @since 2.0.0 + */ +export const isOption = option.isOption; +/** + * Checks whether an `Option` represents the absence of a value (`None`). + * + * @example + * ```ts + * import { Option } from "effect" + * + * console.log(Option.isNone(Option.some(1))) + * // Output: false + * + * console.log(Option.isNone(Option.none())) + * // Output: true + * ``` + * + * @see {@link isSome} for the opposite check. + * + * @category Guards + * @since 2.0.0 + */ +export const isNone = option.isNone; +/** + * Checks whether an `Option` contains a value (`Some`). + * + * @example + * ```ts + * import { Option } from "effect" + * + * console.log(Option.isSome(Option.some(1))) + * // Output: true + * + * console.log(Option.isSome(Option.none())) + * // Output: false + * ``` + * + * @see {@link isNone} for the opposite check. + * + * @category Guards + * @since 2.0.0 + */ +export const isSome = option.isSome; +/** + * Performs pattern matching on an `Option` to handle both `Some` and `None` + * cases. + * + * **Details** + * + * This function allows you to match against an `Option` and handle both + * scenarios: when the `Option` is `None` (i.e., contains no value), and when + * the `Option` is `Some` (i.e., contains a value). It executes one of the + * provided functions based on the case: + * + * - If the `Option` is `None`, the `onNone` function is executed and its result + * is returned. + * - If the `Option` is `Some`, the `onSome` function is executed with the + * contained value, and its result is returned. + * + * This function provides a concise and functional way to handle optional values + * without resorting to `if` or manual checks, making your code more declarative + * and readable. + * + * **Example** (Pattern Matching with Option) + * + * ```ts + * import { Option } from "effect" + * + * const foo = Option.some(1) + * + * const message = Option.match(foo, { + * onNone: () => "Option is empty", + * onSome: (value) => `Option has a value: ${value}` + * }) + * + * console.log(message) + * // Output: "Option has a value: 1" + * ``` + * + * @category Pattern matching + * @since 2.0.0 + */ +export const match = /*#__PURE__*/dual(2, (self, { + onNone, + onSome +}) => isNone(self) ? onNone() : onSome(self.value)); +/** + * Converts an `Option`-returning function into a type guard. + * + * **Details** + * + * This function transforms a function that returns an `Option` into a type + * guard, ensuring type safety when validating or narrowing types. The returned + * type guard function checks whether the input satisfies the condition defined + * in the original `Option`-returning function. + * + * If the original function returns `Option.some`, the type guard evaluates to + * `true`, confirming the input is of the desired type. If the function returns + * `Option.none`, the type guard evaluates to `false`. + * + * This utility is especially useful for validating types in union types, + * filtering arrays, or ensuring safe handling of specific subtypes. + * + * @example + * ```ts + * import { Option } from "effect" + * + * type MyData = string | number + * + * const parseString = (data: MyData): Option.Option => + * typeof data === "string" ? Option.some(data) : Option.none() + * + * // ┌─── (a: MyData) => a is string + * // ▼ + * const isString = Option.toRefinement(parseString) + * + * console.log(isString("a")) + * // Output: true + * + * console.log(isString(1)) + * // Output: false + * ``` + * + * @category Conversions + * @since 2.0.0 + */ +export const toRefinement = f => a => isSome(f(a)); +/** + * Converts an `Iterable` into an `Option`, wrapping the first element if it + * exists. + * + * **Details** + * + * This function takes an `Iterable` (e.g., an array, a generator, or any object + * implementing the `Iterable` interface) and returns an `Option` based on its + * content: + * + * - If the `Iterable` contains at least one element, the first element is + * wrapped in a `Some` and returned. + * - If the `Iterable` is empty, `None` is returned, representing the absence of + * a value. + * + * This utility is useful for safely handling collections that might be empty, + * ensuring you explicitly handle both cases where a value exists or doesn't. + * + * @example + * ```ts + * import { Option } from "effect" + * + * console.log(Option.fromIterable([1, 2, 3])) + * // Output: { _id: 'Option', _tag: 'Some', value: 1 } + * + * console.log(Option.fromIterable([])) + * // Output: { _id: 'Option', _tag: 'None' } + * ``` + * + * @category Constructors + * @since 2.0.0 + */ +export const fromIterable = collection => { + for (const a of collection) { + return some(a); + } + return none(); +}; +/** + * Converts an `Either` into an `Option` by discarding the error and extracting + * the right value. + * + * **Details** + * + * This function takes an `Either` and returns an `Option` based on its value: + * + * - If the `Either` is a `Right`, its value is wrapped in a `Some` and + * returned. + * - If the `Either` is a `Left`, the error is discarded, and `None` is + * returned. + * + * This is particularly useful when you only care about the success case + * (`Right`) of an `Either` and want to handle the result using `Option`. By + * using this function, you can convert `Either` into a simpler structure for + * cases where error handling is not required. + * + * @example + * ```ts + * import { Either, Option } from "effect" + * + * console.log(Option.getRight(Either.right("ok"))) + * // Output: { _id: 'Option', _tag: 'Some', value: 'ok' } + * + * console.log(Option.getRight(Either.left("err"))) + * // Output: { _id: 'Option', _tag: 'None' } + * ``` + * + * @see {@link getLeft} for the opposite operation. + * + * @category Conversions + * @since 2.0.0 + */ +export const getRight = either.getRight; +/** + * Converts an `Either` into an `Option` by discarding the right value and + * extracting the left value. + * + * **Details** + * + * This function transforms an `Either` into an `Option` as follows: + * + * - If the `Either` is a `Left`, its value is wrapped in a `Some` and returned. + * - If the `Either` is a `Right`, the value is discarded, and `None` is + * returned. + * + * This utility is useful when you only care about the error case (`Left`) of an + * `Either` and want to handle it as an `Option`. By discarding the right value, + * it simplifies error-focused workflows. + * + * @example + * ```ts + * import { Either, Option } from "effect" + * + * console.log(Option.getLeft(Either.right("ok"))) + * // Output: { _id: 'Option', _tag: 'None' } + * + * console.log(Option.getLeft(Either.left("err"))) + * // Output: { _id: 'Option', _tag: 'Some', value: 'err' } + * ``` + * + * @see {@link getRight} for the opposite operation. + * + * @category Conversions + * @since 2.0.0 + */ +export const getLeft = either.getLeft; +/** + * Returns the value contained in the `Option` if it is `Some`, otherwise + * evaluates and returns the result of `onNone`. + * + * **Details** + * + * This function allows you to provide a fallback value or computation for when + * an `Option` is `None`. If the `Option` contains a value (`Some`), that value + * is returned. If it is empty (`None`), the `onNone` function is executed, and + * its result is returned instead. + * + * This utility is helpful for safely handling `Option` values by ensuring you + * always receive a meaningful result, whether or not the `Option` contains a + * value. It is particularly useful for providing default values or alternative + * logic when working with optional values. + * + * @example + * ```ts + * import { Option } from "effect" + * + * console.log(Option.some(1).pipe(Option.getOrElse(() => 0))) + * // Output: 1 + * + * console.log(Option.none().pipe(Option.getOrElse(() => 0))) + * // Output: 0 + * ``` + * + * @see {@link getOrNull} for a version that returns `null` instead of executing a function. + * @see {@link getOrUndefined} for a version that returns `undefined` instead of executing a function. + * + * @category Getters + * @since 2.0.0 + */ +export const getOrElse = /*#__PURE__*/dual(2, (self, onNone) => isNone(self) ? onNone() : self.value); +/** + * Returns the provided `Option` `that` if the current `Option` (`self`) is + * `None`; otherwise, it returns `self`. + * + * **Details** + * + * This function provides a fallback mechanism for `Option` values. If the + * current `Option` is `None` (i.e., it contains no value), the `that` function + * is evaluated, and its resulting `Option` is returned. If the current `Option` + * is `Some` (i.e., it contains a value), the original `Option` is returned + * unchanged. + * + * This is particularly useful for chaining fallback values or computations, + * allowing you to provide alternative `Option` values when the first one is + * empty. + * + * @example + * ```ts + * import { Option } from "effect" + * + * console.log(Option.none().pipe(Option.orElse(() => Option.none()))) + * // Output: { _id: 'Option', _tag: 'None' } + * + * console.log(Option.some("a").pipe(Option.orElse(() => Option.none()))) + * // Output: { _id: 'Option', _tag: 'Some', value: 'a' } + * + * console.log(Option.none().pipe(Option.orElse(() => Option.some("b")))) + * // Output: { _id: 'Option', _tag: 'Some', value: 'b' } + * + * console.log(Option.some("a").pipe(Option.orElse(() => Option.some("b")))) + * // Output: { _id: 'Option', _tag: 'Some', value: 'a' } + * ``` + * + * @category Error handling + * @since 2.0.0 + */ +export const orElse = /*#__PURE__*/dual(2, (self, that) => isNone(self) ? that() : self); +/** + * Returns the provided default value wrapped in `Some` if the current `Option` + * (`self`) is `None`; otherwise, returns `self`. + * + * **Details** + * + * This function provides a way to supply a default value for cases where an + * `Option` is `None`. If the current `Option` is empty (`None`), the `onNone` + * function is executed to compute the default value, which is then wrapped in a + * `Some`. If the current `Option` contains a value (`Some`), it is returned as + * is. + * + * This is particularly useful for handling optional values where a fallback + * default needs to be provided explicitly in case of absence. + * + * @example + * ```ts + * import { Option } from "effect" + * + * console.log(Option.none().pipe(Option.orElseSome(() => "b"))) + * // Output: { _id: 'Option', _tag: 'Some', value: 'b' } + * + * console.log(Option.some("a").pipe(Option.orElseSome(() => "b"))) + * // Output: { _id: 'Option', _tag: 'Some', value: 'a' } + * ``` + * + * @category Error handling + * @since 2.0.0 + */ +export const orElseSome = /*#__PURE__*/dual(2, (self, onNone) => isNone(self) ? some(onNone()) : self); +/** + * Similar to {@link orElse}, but returns an `Either` wrapped in an `Option` to + * indicate the source of the value. + * + * **Details** + * + * This function allows you to provide a fallback `Option` in case the current + * `Option` (`self`) is `None`. However, unlike `orElse`, it returns the value + * wrapped in an `Either` object, providing additional information about where + * the value came from: + * + * - If the value is from the fallback `Option` (`that`), it is wrapped in an + * `Either.right`. + * - If the value is from the original `Option` (`self`), it is wrapped in an + * `Either.left`. + * + * This is especially useful when you need to differentiate between values + * originating from the primary `Option` and those coming from the fallback, + * while still maintaining the `Option`-style handling. + * + * @category Error handling + * @since 2.0.0 + */ +export const orElseEither = /*#__PURE__*/dual(2, (self, that) => isNone(self) ? map(that(), either.right) : map(self, either.left)); +/** + * Returns the first `Some` value found in an `Iterable` collection of + * `Option`s, or `None` if no `Some` is found. + * + * **Details** + * + * This function iterates over a collection of `Option` values and returns the + * first `Some` it encounters. If the collection contains only `None` values, + * the result will also be `None`. This utility is useful for efficiently + * finding the first valid value in a sequence of potentially empty or invalid + * options. + * + * The iteration stops as soon as a `Some` is found, making this function + * efficient for large collections. + * + * @example + * ```ts + * import { Option } from "effect" + * + * console.log(Option.firstSomeOf([ + * Option.none(), + * Option.some(1), + * Option.some(2) + * ])) + * // Output: { _id: 'Option', _tag: 'Some', value: 1 } + * ``` + * + * @category Error handling + * @since 2.0.0 + */ +export const firstSomeOf = collection => { + let out = none(); + for (out of collection) { + if (isSome(out)) { + return out; + } + } + return out; +}; +/** + * Converts a nullable value into an `Option`. Returns `None` if the value is + * `null` or `undefined`, otherwise wraps the value in a `Some`. + * + * @example + * ```ts + * import { Option } from "effect" + * + * console.log(Option.fromNullable(undefined)) + * // Output: { _id: 'Option', _tag: 'None' } + * + * console.log(Option.fromNullable(null)) + * // Output: { _id: 'Option', _tag: 'None' } + * + * console.log(Option.fromNullable(1)) + * // Output: { _id: 'Option', _tag: 'Some', value: 1 } + * ``` + * + * @category Conversions + * @since 2.0.0 + */ +export const fromNullable = nullableValue => nullableValue == null ? none() : some(nullableValue); +/** + * Lifts a function that returns `null` or `undefined` into the `Option` + * context. + * + * **Details** + * + * This function takes a function `f` that might return `null` or `undefined` + * and transforms it into a function that returns an `Option`. The resulting + * function will return: + * - `Some` if the original function produces a non-null, non-undefined value. + * - `None` if the original function produces `null` or `undefined`. + * + * @example + * ```ts + * import { Option } from "effect" + * + * const parse = (s: string): number | undefined => { + * const n = parseFloat(s) + * return isNaN(n) ? undefined : n + * } + * + * const parseOption = Option.liftNullable(parse) + * + * console.log(parseOption("1")) + * // Output: { _id: 'Option', _tag: 'Some', value: 1 } + * + * console.log(parseOption("not a number")) + * // Output: { _id: 'Option', _tag: 'None' } + * ``` + * + * @category Conversions + * @since 2.0.0 + */ +export const liftNullable = f => (...a) => fromNullable(f(...a)); +/** + * Returns the value contained in the `Option` if it is `Some`; otherwise, + * returns `null`. + * + * **Details** + * + * This function provides a way to extract the value of an `Option` while + * falling back to `null` if the `Option` is `None`. + * + * It is particularly useful in scenarios where `null` is an acceptable + * placeholder for the absence of a value, such as when interacting with APIs or + * systems that use `null` as a default for missing values. + * + * @example + * ```ts + * import { Option } from "effect" + * + * console.log(Option.getOrNull(Option.some(1))) + * // Output: 1 + * + * console.log(Option.getOrNull(Option.none())) + * // Output: null + * ``` + * + * @category Getters + * @since 2.0.0 + */ +export const getOrNull = /*#__PURE__*/getOrElse(constNull); +/** + * Returns the value contained in the `Option` if it is `Some`; otherwise, + * returns `undefined`. + * + * **Details** + * + * This function provides a way to extract the value of an `Option` while + * falling back to `undefined` if the `Option` is `None`. + * + * It is particularly useful in scenarios where `undefined` is an acceptable + * placeholder for the absence of a value, such as when interacting with APIs or + * systems that use `undefined` as a default for missing values. + * + * @example + * ```ts + * import { Option } from "effect" + * + * console.log(Option.getOrUndefined(Option.some(1))) + * // Output: 1 + * + * console.log(Option.getOrUndefined(Option.none())) + * // Output: undefined + * ``` + * + * @category Getters + * @since 2.0.0 + */ +export const getOrUndefined = /*#__PURE__*/getOrElse(constUndefined); +/** + * Lifts a function that throws exceptions into a function that returns an + * `Option`. + * + * **Details** + * + * This utility function takes a function `f` that might throw an exception and + * transforms it into a safer function that returns an `Option`. If the original + * function executes successfully, the result is wrapped in a `Some`. If an + * exception is thrown, the result is `None`, allowing the developer to handle + * errors in a functional, type-safe way. + * + * @example + * ```ts + * import { Option } from "effect" + * + * const parse = Option.liftThrowable(JSON.parse) + * + * console.log(parse("1")) + * // Output: { _id: 'Option', _tag: 'Some', value: 1 } + * + * console.log(parse("")) + * // Output: { _id: 'Option', _tag: 'None' } + * ``` + * + * @category Conversions + * @since 2.0.0 + */ +export const liftThrowable = f => (...a) => { + try { + return some(f(...a)); + } catch { + return none(); + } +}; +/** + * Extracts the value of an `Option` or throws an error if the `Option` is + * `None`, using a custom error factory. + * + * **Details** + * + * This function allows you to extract the value of an `Option` when it is + * `Some`. If the `Option` is `None`, it throws an error generated by the + * provided `onNone` function. This utility is particularly useful when you need + * a fail-fast behavior for empty `Option` values and want to provide a custom + * error message or object. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Option } from "effect" + * + * assert.deepStrictEqual( + * Option.getOrThrowWith(Option.some(1), () => new Error('Unexpected None')), + * 1 + * ) + * assert.throws(() => Option.getOrThrowWith(Option.none(), () => new Error('Unexpected None'))) + * ``` + * + * @see {@link getOrThrow} for a version that throws a default error. + * + * @category Conversions + * @since 2.0.0 + */ +export const getOrThrowWith = /*#__PURE__*/dual(2, (self, onNone) => { + if (isSome(self)) { + return self.value; + } + throw onNone(); +}); +/** + * Extracts the value of an `Option` or throws a default error if the `Option` + * is `None`. + * + * **Details** + * + * This function extracts the value from an `Option` if it is `Some`. If the + * `Option` is `None`, it throws a default error. It is useful for fail-fast + * scenarios where the absence of a value is treated as an exceptional case and + * a default error is sufficient. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Option } from "effect" + * + * assert.deepStrictEqual(Option.getOrThrow(Option.some(1)), 1) + * assert.throws(() => Option.getOrThrow(Option.none())) + * ``` + * + * @see {@link getOrThrowWith} for a version that allows you to provide a custom error. + * + * @category Conversions + * @since 2.0.0 + */ +export const getOrThrow = /*#__PURE__*/getOrThrowWith(() => new Error("getOrThrow called on a None")); +/** + * Transforms the value inside a `Some` to a new value using the provided + * function, while leaving `None` unchanged. + * + * **Details** + * + * This function applies a mapping function `f` to the value inside an `Option` + * if it is a `Some`. If the `Option` is `None`, it remains unchanged. The + * result is a new `Option` with the transformed value (if it was a `Some`) or + * still `None`. + * + * This utility is particularly useful for chaining transformations in a + * functional way without needing to manually handle `None` cases. + * + * @example + * ```ts + * import { Option } from "effect" + * + * // Mapping over a `Some` + * const someValue = Option.some(2) + * + * console.log(Option.map(someValue, (n) => n * 2)) + * // Output: { _id: 'Option', _tag: 'Some', value: 4 } + * + * // Mapping over a `None` + * const noneValue = Option.none() + * + * console.log(Option.map(noneValue, (n) => n * 2)) + * // Output: { _id: 'Option', _tag: 'None' } + * ``` + * + * @category Mapping + * @since 2.0.0 + */ +export const map = /*#__PURE__*/dual(2, (self, f) => isNone(self) ? none() : some(f(self.value))); +/** + * Replaces the value inside a `Some` with the specified constant value, leaving + * `None` unchanged. + * + * **Details** + * + * This function transforms an `Option` by replacing the value inside a `Some` + * with the given constant value `b`. If the `Option` is `None`, it remains + * unchanged. + * + * This is useful when you want to preserve the presence of a value (`Some`) but + * replace its content with a fixed value. + * + * @example + * ```ts + * import { Option } from "effect" + * + * // Replacing the value of a `Some` + * const someValue = Option.some(42) + * + * console.log(Option.as(someValue, "new value")) + * // Output: { _id: 'Option', _tag: 'Some', value: 'new value' } + * + * // Replacing a `None` (no effect) + * const noneValue = Option.none() + * + * console.log(Option.as(noneValue, "new value")) + * // Output: { _id: 'Option', _tag: 'None' } + * ``` + * + * @category Mapping + * @since 2.0.0 + */ +export const as = /*#__PURE__*/dual(2, (self, b) => map(self, () => b)); +/** + * Replaces the value inside a `Some` with the constant value `void`, leaving + * `None` unchanged. + * + * **Details** + * + * This function transforms an `Option` by replacing the value inside a `Some` + * with `void`. If the `Option` is `None`, it remains unchanged. + * + * This is particularly useful in scenarios where the presence or absence of a + * value is significant, but the actual content of the value is irrelevant. + * + * @category Mapping + * @since 2.0.0 + */ +export const asVoid = /*#__PURE__*/as(undefined); +const void_ = /*#__PURE__*/some(undefined); +export { +/** + * @since 2.0.0 + */ +void_ as void }; +/** + * Applies a function to the value of a `Some` and flattens the resulting + * `Option`. If the input is `None`, it remains `None`. + * + * **Details** + * + * This function allows you to chain computations that return `Option` values. + * If the input `Option` is `Some`, the provided function `f` is applied to the + * contained value, and the resulting `Option` is returned. If the input is + * `None`, the function is not applied, and the result remains `None`. + * + * This utility is particularly useful for sequencing operations that may fail + * or produce optional results, enabling clean and concise workflows for + * handling such cases. + * + * @example + * ```ts + * import { Option } from "effect" + * + * interface Address { + * readonly city: string + * readonly street: Option.Option + * } + * + * interface User { + * readonly id: number + * readonly username: string + * readonly email: Option.Option + * readonly address: Option.Option
+ * } + * + * const user: User = { + * id: 1, + * username: "john_doe", + * email: Option.some("john.doe@example.com"), + * address: Option.some({ + * city: "New York", + * street: Option.some("123 Main St") + * }) + * } + * + * // Use flatMap to extract the street value + * const street = user.address.pipe( + * Option.flatMap((address) => address.street) + * ) + * + * console.log(street) + * // Output: { _id: 'Option', _tag: 'Some', value: '123 Main St' } + * ``` + * + * @category Sequencing + * @since 2.0.0 + */ +export const flatMap = /*#__PURE__*/dual(2, (self, f) => isNone(self) ? none() : f(self.value)); +/** + * Chains two `Option`s together. The second `Option` can either be a static + * value or depend on the result of the first `Option`. + * + * **Details** + * + * This function enables sequencing of two `Option` computations. If the first + * `Option` is `Some`, the second `Option` is evaluated. The second `Option` can + * either: + * + * - Be a static `Option` value. + * - Be a function that produces an `Option`, optionally based on the value of + * the first `Option`. + * + * If the first `Option` is `None`, the function skips the evaluation of the + * second `Option` and directly returns `None`. + * + * @category Sequencing + * @since 2.0.0 + */ +export const andThen = /*#__PURE__*/dual(2, (self, f) => flatMap(self, a => { + const b = isFunction(f) ? f(a) : f; + return isOption(b) ? b : some(b); +})); +/** + * Combines `flatMap` and `fromNullable`, transforming the value inside a `Some` + * using a function that may return `null` or `undefined`. + * + * **Details** + * + * This function applies a transformation function `f` to the value inside a + * `Some`. The function `f` may return a value, `null`, or `undefined`. If `f` + * returns a value, it is wrapped in a `Some`. If `f` returns `null` or + * `undefined`, the result is `None`. If the input `Option` is `None`, the + * function is not applied, and `None` is returned. + * + * This utility is particularly useful when working with deeply nested optional + * values or chaining computations that may result in `null` or `undefined` at + * some point. + * + * @example + * ```ts + * import { Option } from "effect" + * + * interface Employee { + * company?: { + * address?: { + * street?: { + * name?: string + * } + * } + * } + * } + * + * const employee1: Employee = { company: { address: { street: { name: "high street" } } } } + * + * // Extracting a deeply nested property + * console.log( + * Option.some(employee1) + * .pipe(Option.flatMapNullable((employee) => employee.company?.address?.street?.name)) + * ) + * // Output: { _id: 'Option', _tag: 'Some', value: 'high street' } + * + * const employee2: Employee = { company: { address: { street: {} } } } + * + * // Property does not exist + * console.log( + * Option.some(employee2) + * .pipe(Option.flatMapNullable((employee) => employee.company?.address?.street?.name)) + * ) + * // Output: { _id: 'Option', _tag: 'None' } + * ``` + * + * @category Sequencing + * @since 2.0.0 + */ +export const flatMapNullable = /*#__PURE__*/dual(2, (self, f) => isNone(self) ? none() : fromNullable(f(self.value))); +/** + * Flattens an `Option` of `Option` into a single `Option`. + * + * **Details** + * + * This function takes an `Option` that wraps another `Option` and flattens it + * into a single `Option`. If the outer `Option` is `Some`, the function + * extracts the inner `Option`. If the outer `Option` is `None`, the result + * remains `None`. + * + * This is useful for simplifying nested `Option` structures that may arise + * during functional operations. + * + * @category Sequencing + * @since 2.0.0 + */ +export const flatten = /*#__PURE__*/flatMap(identity); +/** + * Combines two `Option`s, keeping the value from the second `Option` if both + * are `Some`. + * + * **Details** + * + * This function takes two `Option`s and returns the second one if the first is + * `Some`. If the first `Option` is `None`, the result will also be `None`, + * regardless of the second `Option`. It effectively "zips" the two `Option`s + * while discarding the value from the first `Option`. + * + * This is particularly useful when sequencing computations where the result of + * the first computation is not needed, and you only care about the result of + * the second computation. + * + * @category Zipping + * @since 2.0.0 + */ +export const zipRight = /*#__PURE__*/dual(2, (self, that) => flatMap(self, () => that)); +/** + * Combines two `Option`s, keeping the value from the first `Option` if both are + * `Some`. + * + * **Details** + * + * This function takes two `Option`s and returns the first one if it is `Some`. + * If either the first `Option` or the second `Option` is `None`, the result + * will be `None`. This operation "zips" the two `Option`s while discarding the + * value from the second `Option`. + * + * This is useful when sequencing computations where the second `Option` + * represents a dependency or condition that must hold, but its value is + * irrelevant. + * + * @category Zipping + * @since 2.0.0 + */ +export const zipLeft = /*#__PURE__*/dual(2, (self, that) => tap(self, () => that)); +/** + * Composes two functions that return `Option` values, creating a new function + * that chains them together. + * + * **Details** + * + * This function allows you to compose two computations, each represented by a + * function that returns an `Option`. The result of the first function is passed + * to the second function if it is `Some`. If the first function returns `None`, + * the composed function short-circuits and returns `None` without invoking the + * second function. + * + * @example + * ```ts + * import { Option } from "effect" + * + * const parse = (s: string): Option.Option => isNaN(Number(s)) ? Option.none() : Option.some(Number(s)) + * + * const double = (n: number): Option.Option => n > 0 ? Option.some(n * 2) : Option.none() + * + * const parseAndDouble = Option.composeK(parse, double) + * + * console.log(parseAndDouble("42")) + * // Output: { _id: 'Option', _tag: 'Some', value: 84 } + * + * console.log(parseAndDouble("not a number")) + * // Output: { _id: 'Option', _tag: 'None' } + * ``` + * + * @category Sequencing + * @since 2.0.0 + */ +export const composeK = /*#__PURE__*/dual(2, (afb, bfc) => a => flatMap(afb(a), bfc)); +/** + * Applies the provided function `f` to the value of the `Option` if it is + * `Some` and returns the original `Option`, unless `f` returns `None`, in which + * case it returns `None`. + * + * **Details** + * + * This function allows you to perform additional computations on the value of + * an `Option` without modifying its original value. If the `Option` is `Some`, + * the provided function `f` is executed with the value, and its result + * determines whether the original `Option` is returned (`Some`) or the result + * is `None` if `f` returns `None`. If the input `Option` is `None`, the + * function is not executed, and `None` is returned. + * + * This is particularly useful for applying side conditions or performing + * validation checks while retaining the original `Option`'s value. + * + * @example + * ```ts + * import { Option } from "effect" + * + * const getInteger = (n: number) => Number.isInteger(n) ? Option.some(n) : Option.none() + * + * console.log(Option.tap(Option.none(), getInteger)) + * // Output: { _id: 'Option', _tag: 'None' } + * + * console.log(Option.tap(Option.some(1), getInteger)) + * // Output: { _id: 'Option', _tag: 'Some', value: 1 } + * + * console.log(Option.tap(Option.some(1.14), getInteger)) + * // Output: { _id: 'Option', _tag: 'None' } + * ``` + * + * @category Sequencing + * @since 2.0.0 + */ +export const tap = /*#__PURE__*/dual(2, (self, f) => flatMap(self, a => map(f(a), () => a))); +/** + * Combines two `Option` values into a single `Option` containing a tuple of + * their values if both are `Some`. + * + * **Details** + * + * This function takes two `Option`s and combines their values into a tuple `[A, + * B]` if both are `Some`. If either of the `Option`s is `None`, the result is + * `None`. This is particularly useful for combining multiple `Option` values + * into a single one, ensuring both contain valid values. + * + * @category Combining + * @since 2.0.0 + */ +export const product = (self, that) => isSome(self) && isSome(that) ? some([self.value, that.value]) : none(); +/** + * Combines an `Option` with a collection of `Option`s into a single `Option` + * containing a tuple of their values if all are `Some`. + * + * **Details** + * + * This function takes a primary `Option` and a collection of `Option`s and + * combines their values into a tuple `[A, ...Array]` if all are `Some`. If + * the primary `Option` or any `Option` in the collection is `None`, the result + * is `None`. + * + * @category Combining + * @since 2.0.0 + */ +export const productMany = (self, collection) => { + if (isNone(self)) { + return none(); + } + const out = [self.value]; + for (const o of collection) { + if (isNone(o)) { + return none(); + } + out.push(o.value); + } + return some(out); +}; +/** + * Combines a structure of `Option`s into a single `Option` containing the + * values with the same structure. + * + * **Details** + * + * This function takes a structure of `Option`s (a tuple, struct, or iterable) + * and produces a single `Option` that contains the values from the input + * structure if all `Option`s are `Some`. If any `Option` in the input is + * `None`, the result is `None`. The structure of the input is preserved in the + * output. + * + * - If the input is a tuple (e.g., an array), the result will be an `Option` + * containing a tuple with the same length. + * - If the input is a struct (e.g., an object), the result will be an `Option` + * containing a struct with the same keys. + * - If the input is an iterable, the result will be an `Option` containing an + * array. + * + * @example + * ```ts + * import { Option } from "effect" + * + * const maybeName: Option.Option = Option.some("John") + * const maybeAge: Option.Option = Option.some(25) + * + * // ┌─── Option<[string, number]> + * // ▼ + * const tuple = Option.all([maybeName, maybeAge]) + * console.log(tuple) + * // Output: + * // { _id: 'Option', _tag: 'Some', value: [ 'John', 25 ] } + * + * // ┌─── Option<{ name: string; age: number; }> + * // ▼ + * const struct = Option.all({ name: maybeName, age: maybeAge }) + * console.log(struct) + * // Output: + * // { _id: 'Option', _tag: 'Some', value: { name: 'John', age: 25 } } + * ``` + * + * @category Combining + * @since 2.0.0 + */ +// @ts-expect-error +export const all = input => { + if (Symbol.iterator in input) { + const out = []; + for (const o of input) { + if (isNone(o)) { + return none(); + } + out.push(o.value); + } + return some(out); + } + const out = {}; + for (const key of Object.keys(input)) { + const o = input[key]; + if (isNone(o)) { + return none(); + } + out[key] = o.value; + } + return some(out); +}; +/** + * Combines two `Option` values into a new `Option` by applying a provided + * function to their values. + * + * **Details** + * + * This function takes two `Option` values (`self` and `that`) and a combining + * function `f`. If both `Option` values are `Some`, the function `f` is applied + * to their values, and the result is wrapped in a new `Some`. If either + * `Option` is `None`, the result is `None`. + * + * This utility is useful for combining two optional computations into a single + * result while maintaining type safety and avoiding explicit checks for `None`. + * + * @example + * ```ts + * import { Option } from "effect" + * + * const maybeName: Option.Option = Option.some("John") + * const maybeAge: Option.Option = Option.some(25) + * + * // Combine the name and age into a person object + * const person = Option.zipWith(maybeName, maybeAge, (name, age) => ({ + * name: name.toUpperCase(), + * age + * })) + * + * console.log(person) + * // Output: + * // { _id: 'Option', _tag: 'Some', value: { name: 'JOHN', age: 25 } } + * ``` + * + * @category Zipping + * @since 2.0.0 + */ +export const zipWith = /*#__PURE__*/dual(3, (self, that, f) => map(product(self, that), ([a, b]) => f(a, b))); +/** + * Applies a function inside a `Some` to a value inside another `Some`, + * combining them into a new `Option`. + * + * **Details** + * + * This function allows you to apply a function wrapped in an `Option` (`self`) + * to a value wrapped in another `Option` (`that`). If both `Option`s are + * `Some`, the function is applied to the value, and the result is wrapped in a + * new `Some`. If either `Option` is `None`, the result is `None`. + * + * @category Combining + * @since 2.0.0 + */ +export const ap = /*#__PURE__*/dual(2, (self, that) => zipWith(self, that, (f, a) => f(a))); +/** + * Reduces an `Iterable` of `Option` to a single value of type `B`, ignoring + * elements that are `None`. + * + * **Details** + * + * This function takes an initial value of type `B` and a reducing function `f` + * that combines the accumulator with values of type `A`. It processes an + * iterable of `Option`, applying `f` only to the `Some` values while + * ignoring the `None` values. The result is a single value of type `B`. + * + * This utility is particularly useful for aggregating values from an iterable + * of `Option`s while skipping the absent (`None`) values. + * + * @example + * ```ts + * import { Option, pipe } from "effect" + * + * const iterable = [Option.some(1), Option.none(), Option.some(2), Option.none()] + * + * console.log(pipe(iterable, Option.reduceCompact(0, (b, a) => b + a))) + * // Output: 3 + * ``` + * + * @category Reducing + * @since 2.0.0 + */ +export const reduceCompact = /*#__PURE__*/dual(3, (self, b, f) => { + let out = b; + for (const oa of self) { + if (isSome(oa)) { + out = f(out, oa.value); + } + } + return out; +}); +/** + * Converts an `Option` into an `Array`. + * If the input is `None`, an empty array is returned. + * If the input is `Some`, its value is wrapped in a single-element array. + * + * @example + * ```ts + * import { Option } from "effect" + * + * console.log(Option.toArray(Option.some(1))) + * // Output: [1] + * + * console.log(Option.toArray(Option.none())) + * // Output: [] + * ``` + * + * @category Conversions + * @since 2.0.0 + */ +export const toArray = self => isNone(self) ? [] : [self.value]; +/** + * Splits an `Option` into two `Option`s based on the result of a mapping + * function that produces an `Either`. + * + * **Details** + * + * This function takes an `Option` and a mapping function `f` that converts its + * value into an `Either`. It returns a tuple of two `Option`s: + * + * - The first `Option` (`left`) contains the value from the `Left` side of the + * `Either` if it exists, otherwise `None`. + * - The second `Option` (`right`) contains the value from the `Right` side of + * the `Either` if it exists, otherwise `None`. + * + * If the input `Option` is `None`, both returned `Option`s are `None`. + * + * This utility is useful for filtering and categorizing the contents of an + * `Option` based on a bifurcating computation. + * + * @category Filtering + * @since 2.0.0 + */ +export const partitionMap = /*#__PURE__*/dual(2, (self, f) => { + if (isNone(self)) { + return [none(), none()]; + } + const e = f(self.value); + return either.isLeft(e) ? [some(e.left), none()] : [none(), some(e.right)]; +}); +// TODO(4.0): remove? +/** + * Alias of {@link flatMap}. + * + * @example + * ```ts + * import { Option } from "effect" + * + * // Transform and filter numbers + * const transformEven = (n: Option.Option): Option.Option => + * Option.filterMap(n, (n) => (n % 2 === 0 ? Option.some(`Even: ${n}`) : Option.none())) + * + * console.log(transformEven(Option.none())) + * // Output: { _id: 'Option', _tag: 'None' } + * + * console.log(transformEven(Option.some(1))) + * // Output: { _id: 'Option', _tag: 'None' } + * + * console.log(transformEven(Option.some(2))) + * // Output: { _id: 'Option', _tag: 'Some', value: 'Even: 2' } + * ``` + * + * @category Filtering + * @since 2.0.0 + */ +export const filterMap = flatMap; +/** + * Filters an `Option` using a predicate. If the predicate is not satisfied or the `Option` is `None` returns `None`. + * + * If you need to change the type of the `Option` in addition to filtering, see `filterMap`. + * + * @example + * ```ts + * import { Option } from "effect" + * + * const removeEmptyString = (input: Option.Option) => + * Option.filter(input, (value) => value !== "") + * + * console.log(removeEmptyString(Option.none())) + * // Output: { _id: 'Option', _tag: 'None' } + * + * console.log(removeEmptyString(Option.some(""))) + * // Output: { _id: 'Option', _tag: 'None' } + * + * console.log(removeEmptyString(Option.some("a"))) + * // Output: { _id: 'Option', _tag: 'Some', value: 'a' } + * ``` + * + * @category Filtering + * @since 2.0.0 + */ +export const filter = /*#__PURE__*/dual(2, (self, predicate) => filterMap(self, b => predicate(b) ? option.some(b) : option.none)); +/** + * Creates an `Equivalence` instance for comparing `Option` values, using a + * provided `Equivalence` for the inner type. + * + * **Details** + * + * This function takes an `Equivalence` instance for a specific type `A` and + * produces an `Equivalence` instance for `Option`. The resulting + * `Equivalence` determines whether two `Option` values are equivalent: + * + * - Two `None`s are considered equivalent. + * - A `Some` and a `None` are not equivalent. + * - Two `Some` values are equivalent if their inner values are equivalent + * according to the provided `Equivalence`. + * + * **Example** (Comparing Optional Numbers for Equivalence) + * + * ```ts + * import { Number, Option } from "effect" + * + * const isEquivalent = Option.getEquivalence(Number.Equivalence) + * + * console.log(isEquivalent(Option.none(), Option.none())) + * // Output: true + * + * console.log(isEquivalent(Option.none(), Option.some(1))) + * // Output: false + * + * console.log(isEquivalent(Option.some(1), Option.none())) + * // Output: false + * + * console.log(isEquivalent(Option.some(1), Option.some(2))) + * // Output: false + * + * console.log(isEquivalent(Option.some(1), Option.some(1))) + * // Output: true + * ``` + * + * @category Equivalence + * @since 2.0.0 + */ +export const getEquivalence = isEquivalent => Equivalence.make((x, y) => isNone(x) ? isNone(y) : isNone(y) ? false : isEquivalent(x.value, y.value)); +/** + * Creates an `Order` instance for comparing `Option` values, using a provided + * `Order` for the inner type. + * + * **Details** + * + * This function produces an `Order` instance for `Option`, allowing `Option` + * values to be compared: + * + * - `None` is always considered less than any `Some` value. + * - If both are `Some`, their inner values are compared using the provided + * `Order` instance. + * + * @example + * ```ts + * import { Number, Option } from "effect" + * + * const order = Option.getOrder(Number.Order) + * + * console.log(order(Option.none(), Option.none())) + * // Output: 0 + * + * console.log(order(Option.none(), Option.some(1))) + * // Output: -1 + * + * console.log(order(Option.some(1), Option.none())) + * // Output: 1 + * + * console.log(order(Option.some(1), Option.some(2))) + * // Output: -1 + * + * console.log(order(Option.some(1), Option.some(1))) + * // Output: 0 + * ``` + * + * @category Sorting + * @since 2.0.0 + */ +export const getOrder = O => order.make((self, that) => isSome(self) ? isSome(that) ? O(self.value, that.value) : 1 : -1); +/** + * Lifts a binary function to work with `Option` values, allowing the function + * to operate on two `Option`s. + * + * **Details** + * + * This function takes a binary function `f` and returns a new function that + * applies `f` to the values of two `Option`s (`self` and `that`). If both + * `Option`s are `Some`, the binary function `f` is applied to their values, and + * the result is wrapped in a new `Some`. If either `Option` is `None`, the + * result is `None`. + * + * @example + * ```ts + * import { Option } from "effect" + * + * // A binary function to add two numbers + * const add = (a: number, b: number): number => a + b + * + * // Lift the `add` function to work with `Option` values + * const addOptions = Option.lift2(add) + * + * // Both `Option`s are `Some` + * console.log(addOptions(Option.some(2), Option.some(3))) + * // Output: { _id: 'Option', _tag: 'Some', value: 5 } + * + * // One `Option` is `None` + * console.log(addOptions(Option.some(2), Option.none())) + * // Output: { _id: 'Option', _tag: 'None' } + * ``` + * + * @category Lifting + * @since 2.0.0 + */ +export const lift2 = f => dual(2, (self, that) => zipWith(self, that, f)); +/** + * Lifts a `Predicate` or `Refinement` into the `Option` context, returning a + * `Some` of the input value if the predicate is satisfied, or `None` otherwise. + * + * **Details** + * + * This function transforms a `Predicate` (or a more specific `Refinement`) into + * a function that produces an `Option`. If the predicate evaluates to `true`, + * the input value is wrapped in a `Some`. If the predicate evaluates to + * `false`, the result is `None`. + * + * @example + * ```ts + * import { Option } from "effect" + * + * // Check if a number is positive + * const isPositive = (n: number) => n > 0 + * + * // ┌─── (b: number) => Option + * // ▼ + * const parsePositive = Option.liftPredicate(isPositive) + * + * console.log(parsePositive(1)) + * // Output: { _id: 'Option', _tag: 'Some', value: 1 } + * + * console.log(parsePositive(-1)) + * // OUtput: { _id: 'Option', _tag: 'None' } + * ``` + * + * @category Lifting + * @since 2.0.0 + */ +export const liftPredicate = /*#__PURE__*/dual(2, (b, predicate) => predicate(b) ? some(b) : none()); +/** + * Returns a function that checks if an `Option` contains a specified value, + * using a provided equivalence function. + * + * **Details** + * + * This function allows you to check whether an `Option` contains a specific + * value. It uses an equivalence function `isEquivalent` to compare the value + * inside the `Option` to the provided value. If the `Option` is `Some` and the + * equivalence function returns `true`, the result is `true`. If the `Option` is + * `None` or the values are not equivalent, the result is `false`. + * + * @example + * ```ts + * import { Number, Option } from "effect" + * + * const contains = Option.containsWith(Number.Equivalence) + * + * console.log(Option.some(2).pipe(contains(2))) + * // Output: true + * + * console.log(Option.some(1).pipe(contains(2))) + * // Output: false + * + * console.log(Option.none().pipe(contains(2))) + * // Output: false + * ``` + * + * @see {@link contains} for a version that uses the default `Equivalence`. + * + * @category Elements + * @since 2.0.0 + */ +export const containsWith = isEquivalent => dual(2, (self, a) => isNone(self) ? false : isEquivalent(self.value, a)); +const _equivalence = /*#__PURE__*/Equal.equivalence(); +/** + * Returns a function that checks if an `Option` contains a specified value + * using the default `Equivalence`. + * + * **Details** + * + * This function allows you to check whether an `Option` contains a specific + * value. It uses the default `Equivalence` for equality comparison. If the + * `Option` is `Some` and its value is equivalent to the provided value, the + * result is `true`. If the `Option` is `None` or the values are not equivalent, + * the result is `false`. + * + * @example + * ```ts + * import { Option } from "effect" + * + * console.log(Option.some(2).pipe(Option.contains(2))) + * // Output: true + * + * console.log(Option.some(1).pipe(Option.contains(2))) + * // Output: false + * + * console.log(Option.none().pipe(Option.contains(2))) + * // Output: false + * ``` + * + * @see {@link containsWith} for a version that allows you to specify a custom equivalence function. + * + * @category Elements + * @since 2.0.0 + */ +export const contains = /*#__PURE__*/containsWith(_equivalence); +/** + * Checks if a value in an `Option` satisfies a given predicate or refinement. + * + * **Details** + * + * This function allows you to check if a value inside a `Some` meets a + * specified condition. If the `Option` is `None`, the result is `false`. If the + * `Option` is `Some`, the provided predicate or refinement is applied to the + * value: + * + * - If the condition is met, the result is `true`. + * - If the condition is not met, the result is `false`. + * + * @example + * ```ts + * import { Option } from "effect" + * + * const isEven = (n: number) => n % 2 === 0 + * + * console.log(Option.some(2).pipe(Option.exists(isEven))) + * // Output: true + * + * console.log(Option.some(1).pipe(Option.exists(isEven))) + * // Output: false + * + * console.log(Option.none().pipe(Option.exists(isEven))) + * // Output: false + * ``` + * + * @category Elements + * @since 2.0.0 + */ +export const exists = /*#__PURE__*/dual(2, (self, refinement) => isNone(self) ? false : refinement(self.value)); +// ------------------------------------------------------------------------------------- +// do notation +// ------------------------------------------------------------------------------------- +/** + * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Option` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * 5. Regular `Option` functions like `map` and `filter` can still be used within the do simulation. These functions will receive the accumulated variables as arguments within the scope + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Option, pipe } from "effect" + * + * const result = pipe( + * Option.Do, + * Option.bind("x", () => Option.some(2)), + * Option.bind("y", () => Option.some(3)), + * Option.let("sum", ({ x, y }) => x + y), + * Option.filter(({ x, y }) => x * y > 5) + * ) + * assert.deepStrictEqual(result, Option.some({ x: 2, y: 3, sum: 5 })) + * ``` + * + * @see {@link Do} + * @see {@link bind} + * @see {@link let_ let} + * + * @category Do notation + * @since 2.0.0 + */ +export const bindTo = /*#__PURE__*/doNotation.bindTo(map); +const let_ = /*#__PURE__*/doNotation.let_(map); +export { +/** + * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Option` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * 5. Regular `Option` functions like `map` and `filter` can still be used within the do simulation. These functions will receive the accumulated variables as arguments within the scope + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Option, pipe } from "effect" + * + * const result = pipe( + * Option.Do, + * Option.bind("x", () => Option.some(2)), + * Option.bind("y", () => Option.some(3)), + * Option.let("sum", ({ x, y }) => x + y), + * Option.filter(({ x, y }) => x * y > 5) + * ) + * assert.deepStrictEqual(result, Option.some({ x: 2, y: 3, sum: 5 })) + * ``` + * + * @see {@link Do} + * @see {@link bind} + * @see {@link bindTo} + * + * @category Do notation + * @since 2.0.0 + */ +let_ as let }; +/** + * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Option` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * 5. Regular `Option` functions like `map` and `filter` can still be used within the do simulation. These functions will receive the accumulated variables as arguments within the scope + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Option, pipe } from "effect" + * + * const result = pipe( + * Option.Do, + * Option.bind("x", () => Option.some(2)), + * Option.bind("y", () => Option.some(3)), + * Option.let("sum", ({ x, y }) => x + y), + * Option.filter(({ x, y }) => x * y > 5) + * ) + * assert.deepStrictEqual(result, Option.some({ x: 2, y: 3, sum: 5 })) + * ``` + * + * @see {@link Do} + * @see {@link bindTo} + * @see {@link let_ let} + * + * @category Do notation + * @since 2.0.0 + */ +export const bind = /*#__PURE__*/doNotation.bind(map, flatMap); +/** + * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Option` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * 5. Regular `Option` functions like `map` and `filter` can still be used within the do simulation. These functions will receive the accumulated variables as arguments within the scope + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Option, pipe } from "effect" + * + * const result = pipe( + * Option.Do, + * Option.bind("x", () => Option.some(2)), + * Option.bind("y", () => Option.some(3)), + * Option.let("sum", ({ x, y }) => x + y), + * Option.filter(({ x, y }) => x * y > 5) + * ) + * assert.deepStrictEqual(result, Option.some({ x: 2, y: 3, sum: 5 })) + * ``` + * + * @see {@link bindTo} + * @see {@link bind} + * @see {@link let_ let} + * + * @category Do notation + * @since 2.0.0 + */ +export const Do = /*#__PURE__*/some({}); +const adapter = /*#__PURE__*/Gen.adapter(); +/** + * Similar to `Effect.gen`, `Option.gen` provides a more readable, + * generator-based syntax for working with `Option` values, making code that + * involves `Option` easier to write and understand. This approach is similar to + * using `async/await` but tailored for `Option`. + * + * **Example** (Using `Option.gen` to Create a Combined Value) + * + * ```ts + * import { Option } from "effect" + * + * const maybeName: Option.Option = Option.some("John") + * const maybeAge: Option.Option = Option.some(25) + * + * const person = Option.gen(function* () { + * const name = (yield* maybeName).toUpperCase() + * const age = yield* maybeAge + * return { name, age } + * }) + * + * console.log(person) + * // Output: + * // { _id: 'Option', _tag: 'Some', value: { name: 'JOHN', age: 25 } } + * ``` + * + * @category Generators + * @since 2.0.0 + */ +export const gen = (...args) => { + const f = args.length === 1 ? args[0] : args[1].bind(args[0]); + const iterator = f(adapter); + let state = iterator.next(); + while (!state.done) { + const current = Gen.isGenKind(state.value) ? state.value.value : Gen.yieldWrapGet(state.value); + if (isNone(current)) { + return current; + } + state = iterator.next(current.value); + } + return some(state.value); +}; +/** + * Merges two optional values, applying a function if both exist. + * Unlike {@link zipWith}, this function returns `None` only if both inputs are `None`. + * + * @internal + */ +export const mergeWith = f => (o1, o2) => { + if (isNone(o1)) { + return o2; + } else if (isNone(o2)) { + return o1; + } + return some(f(o1.value, o2.value)); +}; +//# sourceMappingURL=Option.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Order.js b/backend/node_modules/effect/dist/esm/Order.js new file mode 100644 index 0000000000000000000000000000000000000000..4c145f9f4704ad99f02f6e3494bcc5550f5ed522 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Order.js @@ -0,0 +1,252 @@ +/** + * This module provides an implementation of the `Order` type class which is used to define a total ordering on some type `A`. + * An order is defined by a relation `<=`, which obeys the following laws: + * + * - either `x <= y` or `y <= x` (totality) + * - if `x <= y` and `y <= x`, then `x == y` (antisymmetry) + * - if `x <= y` and `y <= z`, then `x <= z` (transitivity) + * + * The truth table for compare is defined as follows: + * + * | `x <= y` | `x >= y` | Ordering | | + * | -------- | -------- | -------- | --------------------- | + * | `true` | `true` | `0` | corresponds to x == y | + * | `true` | `false` | `< 0` | corresponds to x < y | + * | `false` | `true` | `> 0` | corresponds to x > y | + * + * @since 2.0.0 + */ +import { dual } from "./Function.js"; +/** + * @category constructors + * @since 2.0.0 + */ +export const make = compare => (self, that) => self === that ? 0 : compare(self, that); +/** + * @category instances + * @since 2.0.0 + */ +export const string = /*#__PURE__*/make((self, that) => self < that ? -1 : 1); +/** + * @category instances + * @since 2.0.0 + */ +export const number = /*#__PURE__*/make((self, that) => self < that ? -1 : 1); +/** + * @category instances + * @since 2.0.0 + */ +export const boolean = /*#__PURE__*/make((self, that) => self < that ? -1 : 1); +/** + * @category instances + * @since 2.0.0 + */ +export const bigint = /*#__PURE__*/make((self, that) => self < that ? -1 : 1); +/** + * @since 2.0.0 + */ +export const reverse = O => make((self, that) => O(that, self)); +/** + * @category combining + * @since 2.0.0 + */ +export const combine = /*#__PURE__*/dual(2, (self, that) => make((a1, a2) => { + const out = self(a1, a2); + if (out !== 0) { + return out; + } + return that(a1, a2); +})); +/** + * @category combining + * @since 2.0.0 + */ +export const combineMany = /*#__PURE__*/dual(2, (self, collection) => make((a1, a2) => { + let out = self(a1, a2); + if (out !== 0) { + return out; + } + for (const O of collection) { + out = O(a1, a2); + if (out !== 0) { + return out; + } + } + return out; +})); +/** + * @since 2.0.0 + */ +export const empty = () => make(() => 0); +/** + * @category combining + * @since 2.0.0 + */ +export const combineAll = collection => combineMany(empty(), collection); +/** + * @category mapping + * @since 2.0.0 + */ +export const mapInput = /*#__PURE__*/dual(2, (self, f) => make((b1, b2) => self(f(b1), f(b2)))); +/** + * @category instances + * @since 2.0.0 + */ +export const Date = /*#__PURE__*/mapInput(number, date => date.getTime()); +/** + * @category combining + * @since 2.0.0 + */ +export const product = /*#__PURE__*/dual(2, (self, that) => make(([xa, xb], [ya, yb]) => { + const o = self(xa, ya); + return o !== 0 ? o : that(xb, yb); +})); +/** + * @category combining + * @since 2.0.0 + */ +export const all = collection => { + return make((x, y) => { + const len = Math.min(x.length, y.length); + let collectionLength = 0; + for (const O of collection) { + if (collectionLength >= len) { + break; + } + const o = O(x[collectionLength], y[collectionLength]); + if (o !== 0) { + return o; + } + collectionLength++; + } + return 0; + }); +}; +/** + * @category combining + * @since 2.0.0 + */ +export const productMany = /*#__PURE__*/dual(2, (self, collection) => { + const O = all(collection); + return make((x, y) => { + const o = self(x[0], y[0]); + return o !== 0 ? o : O(x.slice(1), y.slice(1)); + }); +}); +/** + * Similar to `Promise.all` but operates on `Order`s. + * + * ``` + * [Order, Order, ...] -> Order<[A, B, ...]> + * ``` + * + * This function creates and returns a new `Order` for a tuple of values based on the given `Order`s for each element in the tuple. + * The returned `Order` compares two tuples of the same type by applying the corresponding `Order` to each element in the tuple. + * It is useful when you need to compare two tuples of the same type and you have a specific way of comparing each element + * of the tuple. + * + * @category combinators + * @since 2.0.0 + */ +export const tuple = (...elements) => all(elements); +/** + * This function creates and returns a new `Order` for an array of values based on a given `Order` for the elements of the array. + * The returned `Order` compares two arrays by applying the given `Order` to each element in the arrays. + * If all elements are equal, the arrays are then compared based on their length. + * It is useful when you need to compare two arrays of the same type and you have a specific way of comparing each element of the array. + * + * @category combinators + * @since 2.0.0 + */ +export const array = O => make((self, that) => { + const aLen = self.length; + const bLen = that.length; + const len = Math.min(aLen, bLen); + for (let i = 0; i < len; i++) { + const o = O(self[i], that[i]); + if (o !== 0) { + return o; + } + } + return number(aLen, bLen); +}); +/** + * This function creates and returns a new `Order` for a struct of values based on the given `Order`s + * for each property in the struct. + * + * @category combinators + * @since 2.0.0 + */ +export const struct = fields => { + const keys = Object.keys(fields); + return make((self, that) => { + for (const key of keys) { + const o = fields[key](self[key], that[key]); + if (o !== 0) { + return o; + } + } + return 0; + }); +}; +/** + * Test whether one value is _strictly less than_ another. + * + * @since 2.0.0 + */ +export const lessThan = O => dual(2, (self, that) => O(self, that) === -1); +/** + * Test whether one value is _strictly greater than_ another. + * + * @since 2.0.0 + */ +export const greaterThan = O => dual(2, (self, that) => O(self, that) === 1); +/** + * Test whether one value is _non-strictly less than_ another. + * + * @since 2.0.0 + */ +export const lessThanOrEqualTo = O => dual(2, (self, that) => O(self, that) !== 1); +/** + * Test whether one value is _non-strictly greater than_ another. + * + * @since 2.0.0 + */ +export const greaterThanOrEqualTo = O => dual(2, (self, that) => O(self, that) !== -1); +/** + * Take the minimum of two values. If they are considered equal, the first argument is chosen. + * + * @since 2.0.0 + */ +export const min = O => dual(2, (self, that) => self === that || O(self, that) < 1 ? self : that); +/** + * Take the maximum of two values. If they are considered equal, the first argument is chosen. + * + * @since 2.0.0 + */ +export const max = O => dual(2, (self, that) => self === that || O(self, that) > -1 ? self : that); +/** + * Clamp a value between a minimum and a maximum. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Order, Number } from "effect" + * + * const clamp = Order.clamp(Number.Order)({ minimum: 1, maximum: 5 }) + * + * assert.equal(clamp(3), 3) + * assert.equal(clamp(0), 1) + * assert.equal(clamp(6), 5) + * ``` + * + * @since 2.0.0 + */ +export const clamp = O => dual(2, (self, options) => min(O)(options.maximum, max(O)(options.minimum, self))); +/** + * Test whether a value is between a minimum and a maximum (inclusive). + * + * @since 2.0.0 + */ +export const between = O => dual(2, (self, options) => !lessThan(O)(self, options.minimum) && !greaterThan(O)(self, options.maximum)); +//# sourceMappingURL=Order.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Order.js.map b/backend/node_modules/effect/dist/esm/Order.js.map new file mode 100644 index 0000000000000000000000000000000000000000..3c33db5059352b3bb8935a71601ed16978f08089 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Order.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Order.js","names":["dual","make","compare","self","that","string","number","boolean","bigint","reverse","O","combine","a1","a2","out","combineMany","collection","empty","combineAll","mapInput","f","b1","b2","Date","date","getTime","product","xa","xb","ya","yb","o","all","x","y","len","Math","min","length","collectionLength","productMany","slice","tuple","elements","array","aLen","bLen","i","struct","fields","keys","Object","key","lessThan","greaterThan","lessThanOrEqualTo","greaterThanOrEqualTo","max","clamp","options","maximum","minimum","between"],"sources":["../../src/Order.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;AAkBA,SAASA,IAAI,QAAQ,eAAe;AAmBpC;;;;AAIA,OAAO,MAAMC,IAAI,GACfC,OAAyC,IAE3C,CAACC,IAAI,EAAEC,IAAI,KAAKD,IAAI,KAAKC,IAAI,GAAG,CAAC,GAAGF,OAAO,CAACC,IAAI,EAAEC,IAAI,CAAC;AAEvD;;;;AAIA,OAAO,MAAMC,MAAM,gBAAkBJ,IAAI,CAAC,CAACE,IAAI,EAAEC,IAAI,KAAKD,IAAI,GAAGC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AAE/E;;;;AAIA,OAAO,MAAME,MAAM,gBAAkBL,IAAI,CAAC,CAACE,IAAI,EAAEC,IAAI,KAAKD,IAAI,GAAGC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AAE/E;;;;AAIA,OAAO,MAAMG,OAAO,gBAAmBN,IAAI,CAAC,CAACE,IAAI,EAAEC,IAAI,KAAKD,IAAI,GAAGC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AAEjF;;;;AAIA,OAAO,MAAMI,MAAM,gBAAkBP,I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CAAC,CAACP,IAAI,EAAEC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AAExD;;;;;AAKA,OAAO,MAAMiC,GAAG,GAAO3B,CAAW,IAG7BV,IAAI,CAAC,CAAC,EAAE,CAACG,IAAO,EAAEC,IAAO,KAAKD,IAAI,KAAKC,IAAI,IAAIM,CAAC,CAACP,IAAI,EAAEC,IAAI,CAAC,GAAG,CAAC,GAAGD,IAAI,GAAGC,IAAI,CAAC;AAEpF;;;;;AAKA,OAAO,MAAMqD,GAAG,GAAO/C,CAAW,IAG7BV,IAAI,CAAC,CAAC,EAAE,CAACG,IAAO,EAAEC,IAAO,KAAKD,IAAI,KAAKC,IAAI,IAAIM,CAAC,CAACP,IAAI,EAAEC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAGD,IAAI,GAAGC,IAAI,CAAC;AAErF;;;;;;;;;;;;;;;;;AAiBA,OAAO,MAAMsD,KAAK,GAAOhD,CAAW,IAUlCV,IAAI,CACF,CAAC,EACD,CAACG,IAAO,EAAEwD,OAGT,KAAQtB,GAAG,CAAC3B,CAAC,CAAC,CAACiD,OAAO,CAACC,OAAO,EAAEH,GAAG,CAAC/C,CAAC,CAAC,CAACiD,OAAO,CAACE,OAAO,EAAE1D,IAAI,CAAC,CAAC,CAChE;AAEH;;;;;AAKA,OAAO,MAAM2D,OAAO,GAAOpD,CAAW,IAUpCV,IAAI,CACF,CAAC,EACD,CAACG,IAAO,EAAEwD,OAGT,KAAc,CAACN,QAAQ,CAAC3C,CAAC,CAAC,CAACP,IAAI,EAAEwD,OAAO,CAACE,OAAO,CAAC,IAAI,CAACP,WAAW,CAAC5C,CAAC,CAAC,CAACP,IAAI,EAAEwD,OAAO,CAACC,OAAO,CAAC,CAC7F","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/ParseResult.js b/backend/node_modules/effect/dist/esm/ParseResult.js new file mode 100644 index 0000000000000000000000000000000000000000..064203d36a81ff22fae95cb1295f0d2d2870cd0c --- /dev/null +++ b/backend/node_modules/effect/dist/esm/ParseResult.js @@ -0,0 +1,1556 @@ +/** + * @since 3.10.0 + */ +import * as Arr from "./Array.js"; +import * as Cause from "./Cause.js"; +import { TaggedError } from "./Data.js"; +import * as Effect from "./Effect.js"; +import * as Either from "./Either.js"; +import * as Exit from "./Exit.js"; +import { dual } from "./Function.js"; +import { globalValue } from "./GlobalValue.js"; +import * as Inspectable from "./Inspectable.js"; +import * as util_ from "./internal/schema/util.js"; +import * as Option from "./Option.js"; +import * as Predicate from "./Predicate.js"; +import * as Scheduler from "./Scheduler.js"; +import * as AST from "./SchemaAST.js"; +/** + * @category model + * @since 3.10.0 + */ +export class Pointer { + path; + actual; + issue; + /** + * @since 3.10.0 + */ + _tag = "Pointer"; + constructor(path, actual, issue) { + this.path = path; + this.actual = actual; + this.issue = issue; + } +} +/** + * Error that occurs when an unexpected key or index is present. + * + * @category model + * @since 3.10.0 + */ +export class Unexpected { + actual; + message; + /** + * @since 3.10.0 + */ + _tag = "Unexpected"; + constructor(actual, + /** + * @since 3.10.0 + */ + message) { + this.actual = actual; + this.message = message; + } +} +/** + * Error that occurs when a required key or index is missing. + * + * @category model + * @since 3.10.0 + */ +export class Missing { + ast; + message; + /** + * @since 3.10.0 + */ + _tag = "Missing"; + /** + * @since 3.10.0 + */ + actual = undefined; + constructor( + /** + * @since 3.10.0 + */ + ast, + /** + * @since 3.10.0 + */ + message) { + this.ast = ast; + this.message = message; + } +} +/** + * Error that contains multiple issues. + * + * @category model + * @since 3.10.0 + */ +export class Composite { + ast; + actual; + issues; + output; + /** + * @since 3.10.0 + */ + _tag = "Composite"; + constructor(ast, actual, issues, output) { + this.ast = ast; + this.actual = actual; + this.issues = issues; + this.output = output; + } +} +/** + * Error that occurs when a refinement has an error. + * + * @category model + * @since 3.10.0 + */ +export class Refinement { + ast; + actual; + kind; + issue; + /** + * @since 3.10.0 + */ + _tag = "Refinement"; + constructor(ast, actual, kind, issue) { + this.ast = ast; + this.actual = actual; + this.kind = kind; + this.issue = issue; + } +} +/** + * Error that occurs when a transformation has an error. + * + * @category model + * @since 3.10.0 + */ +export class Transformation { + ast; + actual; + kind; + issue; + /** + * @since 3.10.0 + */ + _tag = "Transformation"; + constructor(ast, actual, kind, issue) { + this.ast = ast; + this.actual = actual; + this.kind = kind; + this.issue = issue; + } +} +/** + * The `Type` variant of the `ParseIssue` type represents an error that occurs when the `actual` value is not of the expected type. + * The `ast` field specifies the expected type, and the `actual` field contains the value that caused the error. + * + * @category model + * @since 3.10.0 + */ +export class Type { + ast; + actual; + message; + /** + * @since 3.10.0 + */ + _tag = "Type"; + constructor(ast, actual, message) { + this.ast = ast; + this.actual = actual; + this.message = message; + } +} +/** + * The `Forbidden` variant of the `ParseIssue` type represents a forbidden operation, such as when encountering an Effect that is not allowed to execute (e.g., using `runSync`). + * + * @category model + * @since 3.10.0 + */ +export class Forbidden { + ast; + actual; + message; + /** + * @since 3.10.0 + */ + _tag = "Forbidden"; + constructor(ast, actual, message) { + this.ast = ast; + this.actual = actual; + this.message = message; + } +} +/** + * @category type id + * @since 3.10.0 + */ +export const ParseErrorTypeId = /*#__PURE__*/Symbol.for("effect/Schema/ParseErrorTypeId"); +/** + * @since 3.10.0 + */ +export const isParseError = u => Predicate.hasProperty(u, ParseErrorTypeId); +/** + * @since 3.10.0 + */ +export class ParseError extends /*#__PURE__*/TaggedError("ParseError") { + /** + * @since 3.10.0 + */ + [ParseErrorTypeId] = ParseErrorTypeId; + get message() { + return this.toString(); + } + /** + * @since 3.10.0 + */ + toString() { + return TreeFormatter.formatIssueSync(this.issue); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _id: "ParseError", + message: this.toString() + }; + } + /** + * @since 3.10.0 + */ + [Inspectable.NodeInspectSymbol]() { + return this.toJSON(); + } +} +/** + * @category constructors + * @since 3.10.0 + */ +export const parseError = issue => new ParseError({ + issue +}); +/** + * @category constructors + * @since 3.10.0 + */ +export const succeed = Either.right; +/** + * @category constructors + * @since 3.10.0 + */ +export const fail = Either.left; +const _try = Either.try; +export { +/** + * @category constructors + * @since 3.10.0 + */ +_try as try }; +/** + * @category constructors + * @since 3.10.0 + */ +export const fromOption = Either.fromOption; +const isEither = Either.isEither; +/** + * @category optimisation + * @since 3.10.0 + */ +export const flatMap = /*#__PURE__*/dual(2, (self, f) => { + return isEither(self) ? Either.match(self, { + onLeft: Either.left, + onRight: f + }) : Effect.flatMap(self, f); +}); +/** + * @category optimisation + * @since 3.10.0 + */ +export const map = /*#__PURE__*/dual(2, (self, f) => { + return isEither(self) ? Either.map(self, f) : Effect.map(self, f); +}); +/** + * @category optimisation + * @since 3.10.0 + */ +export const mapError = /*#__PURE__*/dual(2, (self, f) => { + return isEither(self) ? Either.mapLeft(self, f) : Effect.mapError(self, f); +}); +// TODO(4.0): remove +/** + * @category optimisation + * @since 3.10.0 + */ +export const eitherOrUndefined = self => { + if (isEither(self)) { + return self; + } +}; +/** + * @category optimisation + * @since 3.10.0 + */ +export const mapBoth = /*#__PURE__*/dual(2, (self, options) => { + return isEither(self) ? Either.mapBoth(self, { + onLeft: options.onFailure, + onRight: options.onSuccess + }) : Effect.mapBoth(self, options); +}); +/** + * @category optimisation + * @since 3.10.0 + */ +export const orElse = /*#__PURE__*/dual(2, (self, f) => { + return isEither(self) ? Either.match(self, { + onLeft: f, + onRight: Either.right + }) : Effect.catchAll(self, f); +}); +/** @internal */ +export const mergeInternalOptions = (options, overrideOptions) => { + if (overrideOptions === undefined || Predicate.isNumber(overrideOptions)) { + return options; + } + if (options === undefined) { + return overrideOptions; + } + return { + ...options, + ...overrideOptions + }; +}; +const getEither = (ast, isDecoding, options) => { + const parser = goMemo(ast, isDecoding); + return (u, overrideOptions) => parser(u, mergeInternalOptions(options, overrideOptions)); +}; +const getSync = (ast, isDecoding, options) => { + const parser = getEither(ast, isDecoding, options); + return (input, overrideOptions) => Either.getOrThrowWith(parser(input, overrideOptions), parseError); +}; +/** @internal */ +export const getOption = (ast, isDecoding, options) => { + const parser = getEither(ast, isDecoding, options); + return (input, overrideOptions) => Option.getRight(parser(input, overrideOptions)); +}; +const getEffect = (ast, isDecoding, options) => { + const parser = goMemo(ast, isDecoding); + return (input, overrideOptions) => parser(input, { + ...mergeInternalOptions(options, overrideOptions), + isEffectAllowed: true + }); +}; +/** + * @throws `ParseError` + * @category decoding + * @since 3.10.0 + */ +export const decodeUnknownSync = (schema, options) => getSync(schema.ast, true, options); +/** + * @category decoding + * @since 3.10.0 + */ +export const decodeUnknownOption = (schema, options) => getOption(schema.ast, true, options); +/** + * @category decoding + * @since 3.10.0 + */ +export const decodeUnknownEither = (schema, options) => getEither(schema.ast, true, options); +/** + * @category decoding + * @since 3.10.0 + */ +export const decodeUnknownPromise = (schema, options) => { + const parser = decodeUnknown(schema, options); + return (u, overrideOptions) => Effect.runPromise(parser(u, overrideOptions)); +}; +/** + * @category decoding + * @since 3.10.0 + */ +export const decodeUnknown = (schema, options) => getEffect(schema.ast, true, options); +/** + * @throws `ParseError` + * @category encoding + * @since 3.10.0 + */ +export const encodeUnknownSync = (schema, options) => getSync(schema.ast, false, options); +/** + * @category encoding + * @since 3.10.0 + */ +export const encodeUnknownOption = (schema, options) => getOption(schema.ast, false, options); +/** + * @category encoding + * @since 3.10.0 + */ +export const encodeUnknownEither = (schema, options) => getEither(schema.ast, false, options); +/** + * @category encoding + * @since 3.10.0 + */ +export const encodeUnknownPromise = (schema, options) => { + const parser = encodeUnknown(schema, options); + return (u, overrideOptions) => Effect.runPromise(parser(u, overrideOptions)); +}; +/** + * @category encoding + * @since 3.10.0 + */ +export const encodeUnknown = (schema, options) => getEffect(schema.ast, false, options); +/** + * @category decoding + * @since 3.10.0 + */ +export const decodeSync = decodeUnknownSync; +/** + * @category decoding + * @since 3.10.0 + */ +export const decodeOption = decodeUnknownOption; +/** + * @category decoding + * @since 3.10.0 + */ +export const decodeEither = decodeUnknownEither; +/** + * @category decoding + * @since 3.10.0 + */ +export const decodePromise = decodeUnknownPromise; +/** + * @category decoding + * @since 3.10.0 + */ +export const decode = decodeUnknown; +/** + * @throws `ParseError` + * @category validation + * @since 3.10.0 + */ +export const validateSync = (schema, options) => getSync(AST.typeAST(schema.ast), true, options); +/** + * @category validation + * @since 3.10.0 + */ +export const validateOption = (schema, options) => getOption(AST.typeAST(schema.ast), true, options); +/** + * @category validation + * @since 3.10.0 + */ +export const validateEither = (schema, options) => getEither(AST.typeAST(schema.ast), true, options); +/** + * @category validation + * @since 3.10.0 + */ +export const validatePromise = (schema, options) => { + const parser = validate(schema, options); + return (u, overrideOptions) => Effect.runPromise(parser(u, overrideOptions)); +}; +/** + * @category validation + * @since 3.10.0 + */ +export const validate = (schema, options) => getEffect(AST.typeAST(schema.ast), true, options); +/** + * By default the option `exact` is set to `true`. + * + * @category validation + * @since 3.10.0 + */ +export const is = (schema, options) => { + const parser = goMemo(AST.typeAST(schema.ast), true); + return (u, overrideOptions) => Either.isRight(parser(u, { + exact: true, + ...mergeInternalOptions(options, overrideOptions) + })); +}; +/** + * By default the option `exact` is set to `true`. + * + * @throws `ParseError` + * @category validation + * @since 3.10.0 + */ +export const asserts = (schema, options) => { + const parser = goMemo(AST.typeAST(schema.ast), true); + return (u, overrideOptions) => { + const result = parser(u, { + exact: true, + ...mergeInternalOptions(options, overrideOptions) + }); + if (Either.isLeft(result)) { + throw parseError(result.left); + } + }; +}; +/** + * @category encoding + * @since 3.10.0 + */ +export const encodeSync = encodeUnknownSync; +/** + * @category encoding + * @since 3.10.0 + */ +export const encodeOption = encodeUnknownOption; +/** + * @category encoding + * @since 3.10.0 + */ +export const encodeEither = encodeUnknownEither; +/** + * @category encoding + * @since 3.10.0 + */ +export const encodePromise = encodeUnknownPromise; +/** + * @category encoding + * @since 3.10.0 + */ +export const encode = encodeUnknown; +const decodeMemoMap = /*#__PURE__*/globalValue(/*#__PURE__*/Symbol.for("effect/ParseResult/decodeMemoMap"), () => new WeakMap()); +const encodeMemoMap = /*#__PURE__*/globalValue(/*#__PURE__*/Symbol.for("effect/ParseResult/encodeMemoMap"), () => new WeakMap()); +const goMemo = (ast, isDecoding) => { + const memoMap = isDecoding ? decodeMemoMap : encodeMemoMap; + const memo = memoMap.get(ast); + if (memo) { + return memo; + } + const raw = go(ast, isDecoding); + const parseOptionsAnnotation = AST.getParseOptionsAnnotation(ast); + const parserWithOptions = Option.isSome(parseOptionsAnnotation) ? (i, options) => raw(i, mergeInternalOptions(options, parseOptionsAnnotation.value)) : raw; + const decodingFallbackAnnotation = AST.getDecodingFallbackAnnotation(ast); + const parser = isDecoding && Option.isSome(decodingFallbackAnnotation) ? (i, options) => handleForbidden(orElse(parserWithOptions(i, options), decodingFallbackAnnotation.value), ast, i, options) : parserWithOptions; + memoMap.set(ast, parser); + return parser; +}; +const getConcurrency = ast => Option.getOrUndefined(AST.getConcurrencyAnnotation(ast)); +const getBatching = ast => Option.getOrUndefined(AST.getBatchingAnnotation(ast)); +const go = (ast, isDecoding) => { + switch (ast._tag) { + case "Refinement": + { + if (isDecoding) { + const from = goMemo(ast.from, true); + return (i, options) => { + options = options ?? AST.defaultParseOption; + const allErrors = options?.errors === "all"; + const result = flatMap(orElse(from(i, options), ef => { + const issue = new Refinement(ast, i, "From", ef); + if (allErrors && AST.hasStableFilter(ast) && isComposite(ef)) { + return Option.match(ast.filter(i, options, ast), { + onNone: () => Either.left(issue), + onSome: ep => Either.left(new Composite(ast, i, [issue, new Refinement(ast, i, "Predicate", ep)])) + }); + } + return Either.left(issue); + }), a => Option.match(ast.filter(a, options, ast), { + onNone: () => Either.right(a), + onSome: ep => Either.left(new Refinement(ast, i, "Predicate", ep)) + })); + return handleForbidden(result, ast, i, options); + }; + } else { + const from = goMemo(AST.typeAST(ast), true); + const to = goMemo(dropRightRefinement(ast.from), false); + return (i, options) => handleForbidden(flatMap(from(i, options), a => to(a, options)), ast, i, options); + } + } + case "Transformation": + { + const transform = getFinalTransformation(ast.transformation, isDecoding); + const from = isDecoding ? goMemo(ast.from, true) : goMemo(ast.to, false); + const to = isDecoding ? goMemo(ast.to, true) : goMemo(ast.from, false); + return (i, options) => handleForbidden(flatMap(mapError(from(i, options), e => new Transformation(ast, i, isDecoding ? "Encoded" : "Type", e)), a => flatMap(mapError(transform(a, options ?? AST.defaultParseOption, ast, i), e => new Transformation(ast, i, "Transformation", e)), i2 => mapError(to(i2, options), e => new Transformation(ast, i, isDecoding ? "Type" : "Encoded", e)))), ast, i, options); + } + case "Declaration": + { + const parse = isDecoding ? ast.decodeUnknown(...ast.typeParameters) : ast.encodeUnknown(...ast.typeParameters); + return (i, options) => handleForbidden(parse(i, options ?? AST.defaultParseOption, ast), ast, i, options); + } + case "Literal": + return fromRefinement(ast, u => u === ast.literal); + case "UniqueSymbol": + return fromRefinement(ast, u => u === ast.symbol); + case "UndefinedKeyword": + return fromRefinement(ast, Predicate.isUndefined); + case "NeverKeyword": + return fromRefinement(ast, Predicate.isNever); + case "UnknownKeyword": + case "AnyKeyword": + case "VoidKeyword": + return Either.right; + case "StringKeyword": + return fromRefinement(ast, Predicate.isString); + case "NumberKeyword": + return fromRefinement(ast, Predicate.isNumber); + case "BooleanKeyword": + return fromRefinement(ast, Predicate.isBoolean); + case "BigIntKeyword": + return fromRefinement(ast, Predicate.isBigInt); + case "SymbolKeyword": + return fromRefinement(ast, Predicate.isSymbol); + case "ObjectKeyword": + return fromRefinement(ast, Predicate.isObject); + case "Enums": + return fromRefinement(ast, u => ast.enums.some(([_, value]) => value === u)); + case "TemplateLiteral": + { + const regex = AST.getTemplateLiteralRegExp(ast); + return fromRefinement(ast, u => Predicate.isString(u) && regex.test(u)); + } + case "TupleType": + { + const elements = ast.elements.map(e => goMemo(e.type, isDecoding)); + const rest = ast.rest.map(annotatedAST => goMemo(annotatedAST.type, isDecoding)); + let requiredTypes = ast.elements.filter(e => !e.isOptional); + if (ast.rest.length > 0) { + requiredTypes = requiredTypes.concat(ast.rest.slice(1)); + } + const requiredLen = requiredTypes.length; + const expectedIndexes = ast.elements.length > 0 ? ast.elements.map((_, i) => i).join(" | ") : "never"; + const concurrency = getConcurrency(ast); + const batching = getBatching(ast); + return (input, options) => { + if (!Arr.isArray(input)) { + return Either.left(new Type(ast, input)); + } + const allErrors = options?.errors === "all"; + const es = []; + let stepKey = 0; + const output = []; + // --------------------------------------------- + // handle missing indexes + // --------------------------------------------- + const len = input.length; + for (let i = len; i <= requiredLen - 1; i++) { + const e = new Pointer(i, input, new Missing(requiredTypes[i - len])); + if (allErrors) { + es.push([stepKey++, e]); + continue; + } else { + return Either.left(new Composite(ast, input, e, output)); + } + } + // --------------------------------------------- + // handle excess indexes + // --------------------------------------------- + if (ast.rest.length === 0) { + for (let i = ast.elements.length; i <= len - 1; i++) { + const e = new Pointer(i, input, new Unexpected(input[i], `is unexpected, expected: ${expectedIndexes}`)); + if (allErrors) { + es.push([stepKey++, e]); + continue; + } else { + return Either.left(new Composite(ast, input, e, output)); + } + } + } + let i = 0; + let queue = undefined; + // --------------------------------------------- + // handle elements + // --------------------------------------------- + for (; i < elements.length; i++) { + if (len < i + 1) { + if (ast.elements[i].isOptional) { + // the input element is missing + continue; + } + } else { + const parser = elements[i]; + const te = parser(input[i], options); + if (isEither(te)) { + if (Either.isLeft(te)) { + // the input element is present but is not valid + const e = new Pointer(i, input, te.left); + if (allErrors) { + es.push([stepKey++, e]); + continue; + } else { + return Either.left(new Composite(ast, input, e, sortByIndex(output))); + } + } + output.push([stepKey++, te.right]); + } else { + const nk = stepKey++; + const index = i; + if (!queue) { + queue = []; + } + queue.push(({ + es, + output + }) => Effect.flatMap(Effect.either(te), t => { + if (Either.isLeft(t)) { + // the input element is present but is not valid + const e = new Pointer(index, input, t.left); + if (allErrors) { + es.push([nk, e]); + return Effect.void; + } else { + return Either.left(new Composite(ast, input, e, sortByIndex(output))); + } + } + output.push([nk, t.right]); + return Effect.void; + })); + } + } + } + // --------------------------------------------- + // handle rest element + // --------------------------------------------- + if (Arr.isNonEmptyReadonlyArray(rest)) { + const [head, ...tail] = rest; + for (; i < len - tail.length; i++) { + const te = head(input[i], options); + if (isEither(te)) { + if (Either.isLeft(te)) { + const e = new Pointer(i, input, te.left); + if (allErrors) { + es.push([stepKey++, e]); + continue; + } else { + return Either.left(new Composite(ast, input, e, sortByIndex(output))); + } + } else { + output.push([stepKey++, te.right]); + } + } else { + const nk = stepKey++; + const index = i; + if (!queue) { + queue = []; + } + queue.push(({ + es, + output + }) => Effect.flatMap(Effect.either(te), t => { + if (Either.isLeft(t)) { + const e = new Pointer(index, input, t.left); + if (allErrors) { + es.push([nk, e]); + return Effect.void; + } else { + return Either.left(new Composite(ast, input, e, sortByIndex(output))); + } + } else { + output.push([nk, t.right]); + return Effect.void; + } + })); + } + } + // --------------------------------------------- + // handle post rest elements + // --------------------------------------------- + for (let j = 0; j < tail.length; j++) { + const index = i + j; + if (len < index + 1) { + continue; + } else { + const te = tail[j](input[index], options); + if (isEither(te)) { + if (Either.isLeft(te)) { + // the input element is present but is not valid + const e = new Pointer(index, input, te.left); + if (allErrors) { + es.push([stepKey++, e]); + continue; + } else { + return Either.left(new Composite(ast, input, e, sortByIndex(output))); + } + } + output.push([stepKey++, te.right]); + } else { + const nk = stepKey++; + if (!queue) { + queue = []; + } + queue.push(({ + es, + output + }) => Effect.flatMap(Effect.either(te), t => { + if (Either.isLeft(t)) { + // the input element is present but is not valid + const e = new Pointer(index, input, t.left); + if (allErrors) { + es.push([nk, e]); + return Effect.void; + } else { + return Either.left(new Composite(ast, input, e, sortByIndex(output))); + } + } + output.push([nk, t.right]); + return Effect.void; + })); + } + } + } + } + // --------------------------------------------- + // compute result + // --------------------------------------------- + const computeResult = ({ + es, + output + }) => Arr.isNonEmptyArray(es) ? Either.left(new Composite(ast, input, sortByIndex(es), sortByIndex(output))) : Either.right(sortByIndex(output)); + if (queue && queue.length > 0) { + const cqueue = queue; + return Effect.suspend(() => { + const state = { + es: Arr.copy(es), + output: Arr.copy(output) + }; + return Effect.flatMap(Effect.forEach(cqueue, f => f(state), { + concurrency, + batching, + discard: true + }), () => computeResult(state)); + }); + } + return computeResult({ + output, + es + }); + }; + } + case "TypeLiteral": + { + if (ast.propertySignatures.length === 0 && ast.indexSignatures.length === 0) { + return fromRefinement(ast, Predicate.isNotNullable); + } + const propertySignatures = []; + const expectedKeysMap = {}; + const expectedKeys = []; + for (const ps of ast.propertySignatures) { + propertySignatures.push([goMemo(ps.type, isDecoding), ps]); + expectedKeysMap[ps.name] = null; + expectedKeys.push(ps.name); + } + const indexSignatures = ast.indexSignatures.map(is => [goMemo(is.parameter, isDecoding), goMemo(is.type, isDecoding), is.parameter]); + const expectedAST = AST.Union.make(ast.indexSignatures.map(is => is.parameter).concat(expectedKeys.map(key => Predicate.isSymbol(key) ? new AST.UniqueSymbol(key) : new AST.Literal(key)))); + const expected = goMemo(expectedAST, isDecoding); + const concurrency = getConcurrency(ast); + const batching = getBatching(ast); + return (input, options) => { + if (!Predicate.isRecord(input)) { + return Either.left(new Type(ast, input)); + } + const allErrors = options?.errors === "all"; + const es = []; + let stepKey = 0; + // --------------------------------------------- + // handle excess properties + // --------------------------------------------- + const onExcessPropertyError = options?.onExcessProperty === "error"; + const onExcessPropertyPreserve = options?.onExcessProperty === "preserve"; + const output = {}; + let inputKeys; + if (onExcessPropertyError || onExcessPropertyPreserve) { + inputKeys = Reflect.ownKeys(input); + for (const key of inputKeys) { + const te = expected(key, options); + if (isEither(te) && Either.isLeft(te)) { + // key is unexpected + if (onExcessPropertyError) { + const e = new Pointer(key, input, new Unexpected(input[key], `is unexpected, expected: ${String(expectedAST)}`)); + if (allErrors) { + es.push([stepKey++, e]); + continue; + } else { + return Either.left(new Composite(ast, input, e, output)); + } + } else { + // preserve key + output[key] = input[key]; + } + } + } + } + let queue = undefined; + const isExact = options?.exact === true; + for (let i = 0; i < propertySignatures.length; i++) { + const ps = propertySignatures[i][1]; + const name = ps.name; + const hasKey = Object.prototype.hasOwnProperty.call(input, name); + if (!hasKey) { + if (ps.isOptional) { + continue; + } else if (isExact) { + const e = new Pointer(name, input, new Missing(ps)); + if (allErrors) { + es.push([stepKey++, e]); + continue; + } else { + return Either.left(new Composite(ast, input, e, output)); + } + } + } + const parser = propertySignatures[i][0]; + const te = parser(input[name], options); + if (isEither(te)) { + if (Either.isLeft(te)) { + const e = new Pointer(name, input, hasKey ? te.left : new Missing(ps)); + if (allErrors) { + es.push([stepKey++, e]); + continue; + } else { + return Either.left(new Composite(ast, input, e, output)); + } + } + output[name] = te.right; + } else { + const nk = stepKey++; + const index = name; + if (!queue) { + queue = []; + } + queue.push(({ + es, + output + }) => Effect.flatMap(Effect.either(te), t => { + if (Either.isLeft(t)) { + const e = new Pointer(index, input, hasKey ? t.left : new Missing(ps)); + if (allErrors) { + es.push([nk, e]); + return Effect.void; + } else { + return Either.left(new Composite(ast, input, e, output)); + } + } + output[index] = t.right; + return Effect.void; + })); + } + } + // --------------------------------------------- + // handle index signatures + // --------------------------------------------- + for (let i = 0; i < indexSignatures.length; i++) { + const indexSignature = indexSignatures[i]; + const parameter = indexSignature[0]; + const type = indexSignature[1]; + const keys = util_.getKeysForIndexSignature(input, indexSignature[2]); + for (const key of keys) { + // --------------------------------------------- + // handle keys + // --------------------------------------------- + const keu = parameter(key, options); + if (isEither(keu) && Either.isRight(keu)) { + // --------------------------------------------- + // handle values + // --------------------------------------------- + const vpr = type(input[key], options); + if (isEither(vpr)) { + if (Either.isLeft(vpr)) { + const e = new Pointer(key, input, vpr.left); + if (allErrors) { + es.push([stepKey++, e]); + continue; + } else { + return Either.left(new Composite(ast, input, e, output)); + } + } else { + if (!Object.prototype.hasOwnProperty.call(expectedKeysMap, key)) { + output[key] = vpr.right; + } + } + } else { + const nk = stepKey++; + const index = key; + if (!queue) { + queue = []; + } + queue.push(({ + es, + output + }) => Effect.flatMap(Effect.either(vpr), tv => { + if (Either.isLeft(tv)) { + const e = new Pointer(index, input, tv.left); + if (allErrors) { + es.push([nk, e]); + return Effect.void; + } else { + return Either.left(new Composite(ast, input, e, output)); + } + } else { + if (!Object.prototype.hasOwnProperty.call(expectedKeysMap, key)) { + output[key] = tv.right; + } + return Effect.void; + } + })); + } + } + } + } + // --------------------------------------------- + // compute result + // --------------------------------------------- + const computeResult = ({ + es, + output + }) => { + if (Arr.isNonEmptyArray(es)) { + return Either.left(new Composite(ast, input, sortByIndex(es), output)); + } + if (options?.propertyOrder === "original") { + // preserve input keys order + const keys = inputKeys || Reflect.ownKeys(input); + for (const name of expectedKeys) { + if (keys.indexOf(name) === -1) { + keys.push(name); + } + } + const out = {}; + for (const key of keys) { + if (Object.prototype.hasOwnProperty.call(output, key)) { + out[key] = output[key]; + } + } + return Either.right(out); + } + return Either.right(output); + }; + if (queue && queue.length > 0) { + const cqueue = queue; + return Effect.suspend(() => { + const state = { + es: Arr.copy(es), + output: Object.assign({}, output) + }; + return Effect.flatMap(Effect.forEach(cqueue, f => f(state), { + concurrency, + batching, + discard: true + }), () => computeResult(state)); + }); + } + return computeResult({ + es, + output + }); + }; + } + case "Union": + { + const searchTree = getSearchTree(ast.types, isDecoding); + const ownKeys = Reflect.ownKeys(searchTree.keys); + const ownKeysLen = ownKeys.length; + const astTypesLen = ast.types.length; + const map = new Map(); + for (let i = 0; i < astTypesLen; i++) { + map.set(ast.types[i], goMemo(ast.types[i], isDecoding)); + } + const concurrency = getConcurrency(ast) ?? 1; + const batching = getBatching(ast); + return (input, options) => { + const es = []; + let stepKey = 0; + let candidates = []; + if (ownKeysLen > 0) { + if (Predicate.isRecordOrArray(input)) { + for (let i = 0; i < ownKeysLen; i++) { + const name = ownKeys[i]; + const buckets = searchTree.keys[name].buckets; + // for each property that should contain a literal, check if the input contains that property + if (Object.prototype.hasOwnProperty.call(input, name)) { + const literal = String(input[name]); + // check that the value obtained from the input for the property corresponds to an existing bucket + if (Object.prototype.hasOwnProperty.call(buckets, literal)) { + // retrive the minimal set of candidates for decoding + candidates = candidates.concat(buckets[literal]); + } else { + const { + candidates, + literals + } = searchTree.keys[name]; + const literalsUnion = AST.Union.make(literals); + const errorAst = candidates.length === astTypesLen ? new AST.TypeLiteral([new AST.PropertySignature(name, literalsUnion, false, true)], []) : AST.Union.make(candidates); + es.push([stepKey++, new Composite(errorAst, input, new Pointer(name, input, new Type(literalsUnion, input[name])))]); + } + } else { + const { + candidates, + literals + } = searchTree.keys[name]; + const fakePropertySignature = new AST.PropertySignature(name, AST.Union.make(literals), false, true); + const errorAst = candidates.length === astTypesLen ? new AST.TypeLiteral([fakePropertySignature], []) : AST.Union.make(candidates); + es.push([stepKey++, new Composite(errorAst, input, new Pointer(name, input, new Missing(fakePropertySignature)))]); + } + } + } else { + const errorAst = searchTree.candidates.length === astTypesLen ? ast : AST.Union.make(searchTree.candidates); + es.push([stepKey++, new Type(errorAst, input)]); + } + } + if (searchTree.otherwise.length > 0) { + candidates = candidates.concat(searchTree.otherwise); + } + let queue = undefined; + for (let i = 0; i < candidates.length; i++) { + const candidate = candidates[i]; + const pr = map.get(candidate)(input, options); + // the members of a union are ordered based on which one should be decoded first, + // therefore if one member has added a task, all subsequent members must + // also add a task to the queue even if they are synchronous + if (isEither(pr) && (!queue || queue.length === 0)) { + if (Either.isRight(pr)) { + return pr; + } else { + es.push([stepKey++, pr.left]); + } + } else { + const nk = stepKey++; + if (!queue) { + queue = []; + } + queue.push(state => Effect.suspend(() => { + if ("finalResult" in state) { + return Effect.void; + } else { + return Effect.flatMap(Effect.either(pr), t => { + if (Either.isRight(t)) { + state.finalResult = t; + } else { + state.es.push([nk, t.left]); + } + return Effect.void; + }); + } + })); + } + } + // --------------------------------------------- + // compute result + // --------------------------------------------- + const computeResult = es => Arr.isNonEmptyArray(es) ? es.length === 1 && es[0][1]._tag === "Type" ? Either.left(es[0][1]) : Either.left(new Composite(ast, input, sortByIndex(es))) : + // this should never happen + Either.left(new Type(ast, input)); + if (queue && queue.length > 0) { + const cqueue = queue; + return Effect.suspend(() => { + const state = { + es: Arr.copy(es) + }; + return Effect.flatMap(Effect.forEach(cqueue, f => f(state), { + concurrency, + batching, + discard: true + }), () => { + if ("finalResult" in state) { + return state.finalResult; + } + return computeResult(state.es); + }); + }); + } + return computeResult(es); + }; + } + case "Suspend": + { + const get = util_.memoizeThunk(() => goMemo(ast.f(), isDecoding)); + return (a, options) => get()(a, options); + } + } +}; +const fromRefinement = (ast, refinement) => u => refinement(u) ? Either.right(u) : Either.left(new Type(ast, u)); +/** @internal */ +export const getLiterals = (ast, isDecoding) => { + switch (ast._tag) { + case "Declaration": + { + const annotation = AST.getSurrogateAnnotation(ast); + if (Option.isSome(annotation)) { + return getLiterals(annotation.value, isDecoding); + } + break; + } + case "TypeLiteral": + { + const out = []; + for (let i = 0; i < ast.propertySignatures.length; i++) { + const propertySignature = ast.propertySignatures[i]; + const type = isDecoding ? AST.encodedAST(propertySignature.type) : AST.typeAST(propertySignature.type); + if (AST.isLiteral(type) && !propertySignature.isOptional) { + out.push([propertySignature.name, type]); + } + } + return out; + } + case "TupleType": + { + const out = []; + for (let i = 0; i < ast.elements.length; i++) { + const element = ast.elements[i]; + const type = isDecoding ? AST.encodedAST(element.type) : AST.typeAST(element.type); + if (AST.isLiteral(type) && !element.isOptional) { + out.push([i, type]); + } + } + return out; + } + case "Refinement": + return getLiterals(ast.from, isDecoding); + case "Suspend": + return getLiterals(ast.f(), isDecoding); + case "Transformation": + return getLiterals(isDecoding ? ast.from : ast.to, isDecoding); + } + return []; +}; +/** + * The purpose of the algorithm is to narrow down the pool of possible + * candidates for decoding as much as possible. + * + * This function separates the schemas into two groups, `keys` and `otherwise`: + * + * - `keys`: the schema has at least one property with a literal value + * - `otherwise`: the schema has no properties with a literal value + * + * If a schema has at least one property with a literal value, so it ends up in + * `keys`, first a namespace is created for the name of the property containing + * the literal, and then within this namespace a "bucket" is created for the + * literal value in which to store all the schemas that have the same property + * and literal value. + * + * @internal + */ +export const getSearchTree = (members, isDecoding) => { + const keys = {}; + const otherwise = []; + const candidates = []; + for (let i = 0; i < members.length; i++) { + const member = members[i]; + const tags = getLiterals(member, isDecoding); + if (tags.length > 0) { + candidates.push(member); + for (let j = 0; j < tags.length; j++) { + const [key, literal] = tags[j]; + const hash = String(literal.literal); + keys[key] = keys[key] || { + buckets: {}, + literals: [], + candidates: [] + }; + const buckets = keys[key].buckets; + if (Object.prototype.hasOwnProperty.call(buckets, hash)) { + if (j < tags.length - 1) { + continue; + } + buckets[hash].push(member); + keys[key].literals.push(literal); + keys[key].candidates.push(member); + } else { + buckets[hash] = [member]; + keys[key].literals.push(literal); + keys[key].candidates.push(member); + break; + } + } + } else { + otherwise.push(member); + } + } + return { + keys, + otherwise, + candidates + }; +}; +const dropRightRefinement = ast => AST.isRefinement(ast) ? dropRightRefinement(ast.from) : ast; +const handleForbidden = (effect, ast, actual, options) => { + // If effects are allowed, return the original effect + if (options?.isEffectAllowed === true) { + return effect; + } + // If the effect is already an Either, return it directly + if (isEither(effect)) { + return effect; + } + // Otherwise, attempt to execute the effect synchronously + const scheduler = new Scheduler.SyncScheduler(); + const fiber = Effect.runFork(effect, { + scheduler + }); + scheduler.flush(); + const exit = fiber.unsafePoll(); + if (exit) { + if (Exit.isSuccess(exit)) { + // If the effect successfully resolves, wrap the value in a Right + return Either.right(exit.value); + } + const cause = exit.cause; + if (Cause.isFailType(cause)) { + // The effect executed synchronously but failed due to a ParseIssue + return Either.left(cause.error); + } + // The effect executed synchronously but failed due to a defect (e.g., a missing dependency) + return Either.left(new Forbidden(ast, actual, Cause.pretty(cause))); + } + // The effect could not be resolved synchronously, meaning it performs async work + return Either.left(new Forbidden(ast, actual, "cannot be be resolved synchronously, this is caused by using runSync on an effect that performs async work")); +}; +const compare = ([a], [b]) => a > b ? 1 : a < b ? -1 : 0; +function sortByIndex(es) { + return es.sort(compare).map(t => t[1]); +} +// ------------------------------------------------------------------------------------- +// transformations interpreter +// ------------------------------------------------------------------------------------- +/** @internal */ +export const getFinalTransformation = (transformation, isDecoding) => { + switch (transformation._tag) { + case "FinalTransformation": + return isDecoding ? transformation.decode : transformation.encode; + case "ComposeTransformation": + return Either.right; + case "TypeLiteralTransformation": + return input => { + let out = Either.right(input); + // --------------------------------------------- + // handle property signature transformations + // --------------------------------------------- + for (const pst of transformation.propertySignatureTransformations) { + const [from, to] = isDecoding ? [pst.from, pst.to] : [pst.to, pst.from]; + const transformation = isDecoding ? pst.decode : pst.encode; + const f = input => { + const o = transformation(Object.prototype.hasOwnProperty.call(input, from) ? Option.some(input[from]) : Option.none()); + delete input[from]; + if (Option.isSome(o)) { + input[to] = o.value; + } + return input; + }; + out = map(out, f); + } + return out; + }; + } +}; +const makeTree = (value, forest = []) => ({ + value, + forest +}); +/** + * @category formatting + * @since 3.10.0 + */ +export const TreeFormatter = { + formatIssue: issue => map(formatTree(issue), drawTree), + formatIssueSync: issue => { + const e = TreeFormatter.formatIssue(issue); + return isEither(e) ? Either.getOrThrow(e) : Effect.runSync(e); + }, + formatError: error => TreeFormatter.formatIssue(error.issue), + formatErrorSync: error => TreeFormatter.formatIssueSync(error.issue) +}; +const drawTree = tree => tree.value + draw("\n", tree.forest); +const draw = (indentation, forest) => { + let r = ""; + const len = forest.length; + let tree; + for (let i = 0; i < len; i++) { + tree = forest[i]; + const isLast = i === len - 1; + r += indentation + (isLast ? "└" : "├") + "─ " + tree.value; + r += draw(indentation + (len > 1 && !isLast ? "│ " : " "), tree.forest); + } + return r; +}; +const formatTransformationKind = kind => { + switch (kind) { + case "Encoded": + return "Encoded side transformation failure"; + case "Transformation": + return "Transformation process failure"; + case "Type": + return "Type side transformation failure"; + } +}; +const formatRefinementKind = kind => { + switch (kind) { + case "From": + return "From side refinement failure"; + case "Predicate": + return "Predicate refinement failure"; + } +}; +const getAnnotated = issue => "ast" in issue ? Option.some(issue.ast) : Option.none(); +// TODO: replace with Either.void when 3.13 lands +const Either_void = /*#__PURE__*/Either.right(undefined); +const getCurrentMessage = issue => getAnnotated(issue).pipe(Option.flatMap(AST.getMessageAnnotation), Option.match({ + onNone: () => Either_void, + onSome: messageAnnotation => { + const union = messageAnnotation(issue); + if (Predicate.isString(union)) { + return Either.right({ + message: union, + override: false + }); + } + if (Effect.isEffect(union)) { + return Effect.map(union, message => ({ + message, + override: false + })); + } + if (Predicate.isString(union.message)) { + return Either.right({ + message: union.message, + override: union.override + }); + } + return Effect.map(union.message, message => ({ + message, + override: union.override + })); + } +})); +const createParseIssueGuard = tag => issue => issue._tag === tag; +/** + * Returns `true` if the value is a `Composite`. + * + * @category guards + * @since 3.10.0 + */ +export const isComposite = /*#__PURE__*/createParseIssueGuard("Composite"); +const isRefinement = /*#__PURE__*/createParseIssueGuard("Refinement"); +const isTransformation = /*#__PURE__*/createParseIssueGuard("Transformation"); +const getMessage = issue => flatMap(getCurrentMessage(issue), currentMessage => { + if (currentMessage !== undefined) { + const useInnerMessage = !currentMessage.override && (isComposite(issue) || isRefinement(issue) && issue.kind === "From" || isTransformation(issue) && issue.kind !== "Transformation"); + return useInnerMessage ? isTransformation(issue) || isRefinement(issue) ? getMessage(issue.issue) : Either_void : Either.right(currentMessage.message); + } + return Either_void; +}); +const getParseIssueTitleAnnotation = issue => getAnnotated(issue).pipe(Option.flatMap(AST.getParseIssueTitleAnnotation), Option.flatMapNullable(annotation => annotation(issue)), Option.getOrUndefined); +/** @internal */ +export function getRefinementExpected(ast) { + return AST.getDescriptionAnnotation(ast).pipe(Option.orElse(() => AST.getTitleAnnotation(ast)), Option.orElse(() => AST.getAutoTitleAnnotation(ast)), Option.orElse(() => AST.getIdentifierAnnotation(ast)), Option.getOrElse(() => `{ ${ast.from} | filter }`)); +} +function getDefaultTypeMessage(issue) { + if (issue.message !== undefined) { + return issue.message; + } + const expected = AST.isRefinement(issue.ast) ? getRefinementExpected(issue.ast) : String(issue.ast); + return `Expected ${expected}, actual ${Inspectable.formatUnknown(issue.actual)}`; +} +const formatTypeMessage = issue => map(getMessage(issue), message => message ?? getParseIssueTitleAnnotation(issue) ?? getDefaultTypeMessage(issue)); +const getParseIssueTitle = issue => getParseIssueTitleAnnotation(issue) ?? String(issue.ast); +const formatForbiddenMessage = issue => issue.message ?? "is forbidden"; +const formatUnexpectedMessage = issue => issue.message ?? "is unexpected"; +const formatMissingMessage = issue => { + const missingMessageAnnotation = AST.getMissingMessageAnnotation(issue.ast); + if (Option.isSome(missingMessageAnnotation)) { + const annotation = missingMessageAnnotation.value(); + return Predicate.isString(annotation) ? Either.right(annotation) : annotation; + } + return Either.right(issue.message ?? "is missing"); +}; +const formatTree = issue => { + switch (issue._tag) { + case "Type": + return map(formatTypeMessage(issue), makeTree); + case "Forbidden": + return Either.right(makeTree(getParseIssueTitle(issue), [makeTree(formatForbiddenMessage(issue))])); + case "Unexpected": + return Either.right(makeTree(formatUnexpectedMessage(issue))); + case "Missing": + return map(formatMissingMessage(issue), makeTree); + case "Transformation": + return flatMap(getMessage(issue), message => { + if (message !== undefined) { + return Either.right(makeTree(message)); + } + return map(formatTree(issue.issue), tree => makeTree(getParseIssueTitle(issue), [makeTree(formatTransformationKind(issue.kind), [tree])])); + }); + case "Refinement": + return flatMap(getMessage(issue), message => { + if (message !== undefined) { + return Either.right(makeTree(message)); + } + return map(formatTree(issue.issue), tree => makeTree(getParseIssueTitle(issue), [makeTree(formatRefinementKind(issue.kind), [tree])])); + }); + case "Pointer": + return map(formatTree(issue.issue), tree => makeTree(util_.formatPath(issue.path), [tree])); + case "Composite": + return flatMap(getMessage(issue), message => { + if (message !== undefined) { + return Either.right(makeTree(message)); + } + const parseIssueTitle = getParseIssueTitle(issue); + return util_.isNonEmpty(issue.issues) ? map(Effect.forEach(issue.issues, formatTree), forest => makeTree(parseIssueTitle, forest)) : map(formatTree(issue.issues), tree => makeTree(parseIssueTitle, [tree])); + }); + } +}; +const makeArrayFormatterIssue = (_tag, path, message) => ({ + _tag, + path, + message +}); +/** + * @category formatting + * @since 3.10.0 + */ +export const ArrayFormatter = { + formatIssue: issue => getArrayFormatterIssues(issue, undefined, []), + formatIssueSync: issue => { + const e = ArrayFormatter.formatIssue(issue); + return isEither(e) ? Either.getOrThrow(e) : Effect.runSync(e); + }, + formatError: error => ArrayFormatter.formatIssue(error.issue), + formatErrorSync: error => ArrayFormatter.formatIssueSync(error.issue) +}; +const getArrayFormatterIssues = (issue, parentTag, path) => { + const _tag = issue._tag; + switch (_tag) { + case "Type": + return map(formatTypeMessage(issue), message => [makeArrayFormatterIssue(parentTag ?? _tag, path, message)]); + case "Forbidden": + return Either.right([makeArrayFormatterIssue(_tag, path, formatForbiddenMessage(issue))]); + case "Unexpected": + return Either.right([makeArrayFormatterIssue(_tag, path, formatUnexpectedMessage(issue))]); + case "Missing": + return map(formatMissingMessage(issue), message => [makeArrayFormatterIssue(_tag, path, message)]); + case "Pointer": + return getArrayFormatterIssues(issue.issue, undefined, path.concat(issue.path)); + case "Composite": + return flatMap(getMessage(issue), message => { + if (message !== undefined) { + return Either.right([makeArrayFormatterIssue(_tag, path, message)]); + } + return util_.isNonEmpty(issue.issues) ? map(Effect.forEach(issue.issues, issue => getArrayFormatterIssues(issue, undefined, path)), Arr.flatten) : getArrayFormatterIssues(issue.issues, undefined, path); + }); + case "Refinement": + return flatMap(getMessage(issue), message => { + if (message !== undefined) { + return Either.right([makeArrayFormatterIssue(_tag, path, message)]); + } + return getArrayFormatterIssues(issue.issue, issue.kind === "Predicate" ? _tag : undefined, path); + }); + case "Transformation": + return flatMap(getMessage(issue), message => { + if (message !== undefined) { + return Either.right([makeArrayFormatterIssue(_tag, path, message)]); + } + return getArrayFormatterIssues(issue.issue, issue.kind === "Transformation" ? _tag : undefined, path); + }); + } +}; +//# sourceMappingURL=ParseResult.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/ParseResult.js.map b/backend/node_modules/effect/dist/esm/ParseResult.js.map new file mode 100644 index 0000000000000000000000000000000000000000..641b0f01c5e1a446c50c642f460bc774a93d0d4b --- /dev/null +++ b/backend/node_modules/effect/dist/esm/ParseResult.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ParseResult.js","names":["Arr","Cause","TaggedError","Effect","Either","Exit","dual","globalValue","Inspectable","util_","Option","Predicate","Scheduler","AST","Pointer","path","actual","issue","_tag","constructor","Unexpected","message","Missing","ast","undefined","Composite","issues","output","Refinement","kind","Transformation","Type","Forbidden","ParseErrorTypeId","Symbol","for","isParseError","u","hasProperty","ParseError","toString","TreeFormatter","formatIssueSync","toJSON","_id","NodeInspectSymbol","parseError","succeed","right","fail","left","_try","try","fromOption","isEither","flatMap","self","f","match","onLeft","onRight","map","mapError","mapLeft","eitherOrUndefined","mapBoth","options","onFailure","onSuccess","orElse","catchAll","mergeInternalOptions","overrideOptions","isNumber","getEither","isDecoding","parser","goMemo","getSync","input","getOrThrowWith","getOption","getRight","getEffect","isEffectAllowed","decodeUnknownSync","schema","decodeUnknownOption","decodeUnknownEither","decodeUnknownPromise","decodeUnknown","runPromise","encodeUnknownSync","encodeUnknownOption","encodeUnknownEither","encodeUnknownPromise","encodeUnknown","decodeSync","decodeOption","decodeEither","decodePromise","decode","validateSync","typeAST","validateOption","validateEither","validatePromise","validate","is","isRight","exact","asserts","result","isLeft","encodeSync","encodeOption","encodeEither","encodePromise","encode","decodeMemoMap","WeakMap","encodeMemoMap","memoMap","memo","get","raw","go","parseOptionsAnnotation","getParseOptionsAnnotation","parserWithOptions","isSome","i","value","decodingFallbackAnnotation","getDecodingFallbackAnnotation","handleForbidden","set","getConcurrency","getOrUndefined","getConcurrencyAnnotation","getBatching","getBatchingAnnotation","from","defaultParseOption","allErrors","errors","ef","hasStableFilter","isComposite","filter","onNone","onSome","ep","a","to","dropRightRefinement","transform","getFinalTransformation","transformation","e","i2","parse","typeParameters","fromRefinement","literal","symbol","isUndefined","isNever","isString","isBoolean","isBigInt","isSymbol","isObject","enums","some","_","regex","getTemplateLiteralRegExp","test","elements","type","rest","annotatedAST","requiredTypes","isOptional","length","concat","slice","requiredLen","expectedIndexes","join","concurrency","batching","isArray","es","stepKey","len","push","queue","te","sortByIndex","nk","index","either","t","void","isNonEmptyReadonlyArray","head","tail","j","computeResult","isNonEmptyArray","cqueue","suspend","state","copy","forEach","discard","propertySignatures","indexSignatures","isNotNullable","expectedKeysMap","expectedKeys","ps","name","parameter","expectedAST","Union","make","key","UniqueSymbol","Literal","expected","isRecord","onExcessPropertyError","onExcessProperty","onExcessPropertyPreserve","inputKeys","Reflect","ownKeys","String","isExact","hasKey","Object","prototype","hasOwnProperty","call","indexSignature","keys","getKeysForIndexSignature","keu","vpr","tv","propertyOrder","indexOf","out","assign","searchTree","getSearchTree","types","ownKeysLen","astTypesLen","Map","candidates","isRecordOrArray","buckets","literals","literalsUnion","errorAst","TypeLiteral","PropertySignature","fakePropertySignature","otherwise","candidate","pr","finalResult","memoizeThunk","refinement","getLiterals","annotation","getSurrogateAnnotation","propertySignature","encodedAST","isLiteral","element","members","member","tags","hash","isRefinement","effect","scheduler","SyncScheduler","fiber","runFork","flush","exit","unsafePoll","isSuccess","cause","isFailType","error","pretty","compare","b","sort","pst","propertySignatureTransformations","o","none","makeTree","forest","formatIssue","formatTree","drawTree","getOrThrow","runSync","formatError","formatErrorSync","tree","draw","indentation","r","isLast","formatTransformationKind","formatRefinementKind","getAnnotated","Either_void","getCurrentMessage","pipe","getMessageAnnotation","messageAnnotation","union","override","isEffect","createParseIssueGuard","tag","isTransformation","getMessage","currentMessage","useInnerMessage","getParseIssueTitleAnnotation","flatMapNullable","getRefinementExpected","getDescriptionAnnotation","getTitleAnnotation","getAutoTitleAnnotation","getIdentifierAnnotation","getOrElse","getDefaultTypeMessage","formatUnknown","formatTypeMessage","getParseIssueTitle","formatForbiddenMessage","formatUnexpectedMessage","formatMissingMessage","missingMessageAnnotation","getMissingMessageAnnotation","formatPath","parseIssueTitle","isNonEmpty","makeArrayFormatterIssue","ArrayFormatter","getArrayFormatterIssues","parentTag","flatten"],"sources":["../../src/ParseResult.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAIA,OAAO,KAAKA,GAAG,MAAM,YAAY;AACjC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,SAASC,WAAW,QAAQ,WAAW;AACvC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,IAAI,M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AC,CAAC;EACN;AACF,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/PartitionedSemaphore.js.map b/backend/node_modules/effect/dist/esm/PartitionedSemaphore.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f66a4cbc89206603bab58f9dd900fb2a2493c983 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/PartitionedSemaphore.js.map @@ -0,0 +1 @@ +{"version":3,"file":"PartitionedSemaphore.js","names":["Effect","Iterable","MutableHashMap","Option","TypeId","makeUnsafe","options","maxPermits","Math","max","permits","Number","isFinite","withPermits","effect","totalPermits","waitingPermits","partitions","empty","take","key","async","resume","never","void","needed","taken","waiters","getOrElse","get","set","Set","entry","cleanup","delete","size","remove","add","sync","releaseUnsafe","iterator","Symbol","state","next","done","unsafeHead","value","takePermits","release","matchCauseEffect","onFailure","cause","failCause","onSuccess","succeed","uninterruptibleMask","restore","flatMap","make"],"sources":["../../src/PartitionedSemaphore.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;AAIA,OAAO,KAAKA,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,cAAc,MAAM,qBAAqB;AACrD,OAAO,KAAKC,MAAM,MAAM,aAAa;AAErC;;;;;AAKA,OAAO,MAAMC,MAAM,GAAW,8BAA8B;AAkC5D;;;;;;;;;;;;;;;;AAgBA,OAAO,MAAMC,UAAU,GAAiBC,OAEvC,IAA6B;EAC5B,MAAMC,UAAU,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEH,OAAO,CAACI,OAAO,CAAC;EAE/C,IAAI,CAACC,MAAM,CAACC,QAAQ,CAACL,UAAU,CAAC,EAAE;IAChC,OAAO;MACL,CAACH,MAAM,GAAGA,MAAM;MAChBS,WAAW,EAAEA,CAAA,KAAOC,MAAM,IAAKA;KAChC;EACH;EAEA,IAAIC,YAAY,GAAGR,UAAU;EAC7B,IAAIS,cAAc,GAAG,CAAC;E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CAACoD,SAAS,CAACD,KAAK,CAAC;QAChC,CAAC;QACDE,SAASA,CAACP,KAAK;UACbP,aAAa,CAAC7B,OAAO,CAAC;UACtB,OAAOV,MAAM,CAACsD,OAAO,CAACR,KAAK,CAAC;QAC9B;OACD,CAAC;MACF,OAAQhC,MAAM,IACZd,MAAM,CAACuD,mBAAmB,CAAEC,OAAO,IACjCxD,MAAM,CAACyD,OAAO,CACZD,OAAO,CAACT,WAAW,CAAC,EACpB,MAAMC,OAAO,CAACQ,OAAO,CAAC1C,MAAM,CAAC,CAAC,CAC/B,CACF;IACL;GACD;AACH,CAAC;AAED;;;;;;;;;;;;;;;;AAgBA,OAAO,MAAM4C,IAAI,GAAiBpD,OAEjC,IAA6CN,MAAM,CAACsC,IAAI,CAAC,MAAMjC,UAAU,CAAIC,OAAO,CAAC,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Pipeable.js b/backend/node_modules/effect/dist/esm/Pipeable.js new file mode 100644 index 0000000000000000000000000000000000000000..a629a38dc442b951e82d992024933a8530697a34 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Pipeable.js @@ -0,0 +1,62 @@ +/** + * @since 2.0.0 + */ +/** + * @since 2.0.0 + */ +export const pipeArguments = (self, args) => { + switch (args.length) { + case 0: + return self; + case 1: + return args[0](self); + case 2: + return args[1](args[0](self)); + case 3: + return args[2](args[1](args[0](self))); + case 4: + return args[3](args[2](args[1](args[0](self)))); + case 5: + return args[4](args[3](args[2](args[1](args[0](self))))); + case 6: + return args[5](args[4](args[3](args[2](args[1](args[0](self)))))); + case 7: + return args[6](args[5](args[4](args[3](args[2](args[1](args[0](self))))))); + case 8: + return args[7](args[6](args[5](args[4](args[3](args[2](args[1](args[0](self)))))))); + case 9: + return args[8](args[7](args[6](args[5](args[4](args[3](args[2](args[1](args[0](self))))))))); + default: + { + let ret = self; + for (let i = 0, len = args.length; i < len; i++) { + ret = args[i](ret); + } + return ret; + } + } +}; +/** + * @since 3.15.0 + * @category Prototypes + */ +export const Prototype = { + pipe() { + return pipeArguments(this, arguments); + } +}; +const Base = /*#__PURE__*/function () { + function PipeableBase() {} + PipeableBase.prototype = Prototype; + return PipeableBase; +}(); +/** + * @since 3.15.0 + * @category Constructors + */ +export const Class = klass => klass ? class extends klass { + pipe() { + return pipeArguments(this, arguments); + } +} : Base; +//# sourceMappingURL=Pipeable.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Pool.js b/backend/node_modules/effect/dist/esm/Pool.js new file mode 100644 index 0000000000000000000000000000000000000000..742af10734f3acec24d5de2aa305677fb304dd67 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Pool.js @@ -0,0 +1,100 @@ +import * as internal from "./internal/pool.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const PoolTypeId = internal.PoolTypeId; +/** + * Returns `true` if the specified value is a `Pool`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isPool = internal.isPool; +/** + * Makes a new pool of the specified fixed size. The pool is returned in a + * `Scope`, which governs the lifetime of the pool. When the pool is shutdown + * because the `Scope` is closed, the individual items allocated by the pool + * will be released in some unspecified order. + * + * By setting the `concurrency` parameter, you can control the level of concurrent + * access per pool item. By default, the number of permits is set to `1`. + * + * `targetUtilization` determines when to create new pool items. It is a value + * between 0 and 1, where 1 means only create new pool items when all the existing + * items are fully utilized. + * + * A `targetUtilization` of 0.5 will create new pool items when the existing items are + * 50% utilized. + * + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * Makes a new pool with the specified minimum and maximum sizes and time to + * live before a pool whose excess items are not being used will be shrunk + * down to the minimum size. The pool is returned in a `Scope`, which governs + * the lifetime of the pool. When the pool is shutdown because the `Scope` is + * used, the individual items allocated by the pool will be released in some + * unspecified order. + * + * By setting the `concurrency` parameter, you can control the level of concurrent + * access per pool item. By default, the number of permits is set to `1`. + * + * `targetUtilization` determines when to create new pool items. It is a value + * between 0 and 1, where 1 means only create new pool items when all the existing + * items are fully utilized. + * + * A `targetUtilization` of 0.5 will create new pool items when the existing items are + * 50% utilized. + * + * The `timeToLiveStrategy` determines how items are invalidated. If set to + * "creation", then items are invalidated based on their creation time. If set + * to "usage", then items are invalidated based on pool usage. + * + * By default, the `timeToLiveStrategy` is set to "usage". + * + * ```ts skip-type-checking + * import { createConnection } from "mysql2"; + * import { Duration, Effect, Pool } from "effect" + * + * const acquireDBConnection = Effect.acquireRelease( + * Effect.sync(() => createConnection('mysql://...')), + * (connection) => Effect.sync(() => connection.end(() => {})), + * ) + * + * const connectionPool = Effect.flatMap( + * Pool.makeWithTTL({ + * acquire: acquireDBConnection, + * min: 10, + * max: 20, + * timeToLive: Duration.seconds(60) + * }), + * (pool) => pool.get + * ) + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const makeWithTTL = internal.makeWithTTL; +/** + * Retrieves an item from the pool in a scoped effect. Note that if + * acquisition fails, then the returned effect will fail for that same reason. + * Retrying a failed acquisition attempt will repeat the acquisition attempt. + * + * @since 2.0.0 + * @category getters + */ +export const get = internal.get; +/** + * Invalidates the specified item. This will cause the pool to eventually + * reallocate the item, although this reallocation may occur lazily rather + * than eagerly. + * + * @since 2.0.0 + * @category combinators + */ +export const invalidate = internal.invalidate; +//# sourceMappingURL=Pool.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Predicate.js.map b/backend/node_modules/effect/dist/esm/Predicate.js.map new file mode 100644 index 0000000000000000000000000000000000000000..3027c7197264934fc8aabf473285569a70dde654 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Predicate.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Predicate.js","names":["dual","isFunction","isFunction_","mapInput","self","f","b","isTupleOf","n","length","isTupleOfAtLeast","isTruthy","input","isSet","Set","isMap","Map","isString","isNumber","isBoolean","isBigInt","isSymbol","isPropertyKey","u","isUndefined","undefined","isNotUndefined","isNull","isNotNull","isNever","_","isUnknown","isRecordOrArray","isObject","hasProperty","property","isTagged","tag","isNullable","isNotNullable","isError","Error","isUint8Array","Uint8Array","isDate","Date","isIterable","Symbol","iterator","isRecord","Array","isArray","isReadonlyRecord","isPromise","then","catch","isPromiseLike","isRegExp","RegExp","compose","ab","bc","a","product","that","all","collection","as","collectionIndex","p","productMany","rest","head","tail","tuple","elements","struct","fields","keys","Object","key","not","or","and","xor","eqv","implies","antecedent","consequent","nor","nand","every","some"],"sources":["../../src/Predicate.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;AAkBA,SAASA,IAAI,EAAEC,UAAU,IAAIC,WAAW,QAAQ,eAAe;AA8I/D;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,OAAO,MAAMC,QAAQ,gBAuDjBH,IAAI,CAAC,CAAC,EAAE,CAAOI,IAAkB,EAAEC,CAAc,KAAoBC,CAAC,IAAKF,IAAI,CAACC,CAAC,CAACC,CAAC,CAAC,CAAC,CAAC;AAE1F;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,OAAO,MAAMC,SAAS,gBAqDlBP,IAAI,CAAC,CAAC,EAAE,CAAsBI,IAAsB,EAAEI,CAAI,KAA4BJ,IAAI,CAACK,MAAM,KAAKD,CAAC,CAAC;AAE5G;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,OAAO,MAAME,gBAAgB,gBAuDzBV,IAAI,CAAC,CAAC,EAAE,CAAsBI,IAAsB,EAAEI,CAAI,KAAmCJ,IAAI,CAACK,MAAM,IAAID,CAAC,CAAC;AAElH;;;;;;;;;;;;;;;;;;;;;;AAsBA,OAAO,MAAMG,QAAQ,GAAIC,KAAc,IAAK,CAAC,CAACA,KAAK;AAEnD;;;;;;;;;;;;;;;;;;AAkBA,OAAO,MAAMC,KAAK,GAAID,KAAc,IAA4BA,KAAK,YAAYE,GAAG;AAEpF;;;;;;;;;;;;;;;;;AAiBA,OAAO,MAAMC,KAAK,GAAIH,KAAc,IAAqCA,KAAK,YAAYI,GAAG;AAE7F;;;;;;;;;;;;;;;;;;AAkBA,OAAO,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AAC,GAAG,IAAI,CACrH;AAED;;;;;;;;AAQA,OAAO,MAAM2B,GAAG,gBAmBZzF,IAAI,CACN,CAAC,EACD,CAAII,IAAkB,EAAE4D,IAAkB,KAAoBF,CAAC,IAAK,EAAE1D,IAAI,CAAC0D,CAAC,CAAC,IAAIE,IAAI,CAACF,CAAC,CAAC,CAAC,CAC1F;AAED;;;;;;;;AAQA,OAAO,MAAM4B,IAAI,gBAmBb1F,IAAI,CACN,CAAC,EACD,CAAII,IAAkB,EAAE4D,IAAkB,KAAoBF,CAAC,IAAK,EAAE1D,IAAI,CAAC0D,CAAC,CAAC,IAAIE,IAAI,CAACF,CAAC,CAAC,CAAC,CAC1F;AAED;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,OAAO,MAAM6B,KAAK,GAAOzB,UAAkC,IAAoBJ,CAAI,IAAI;EACrF,KAAK,MAAMO,CAAC,IAAIH,UAAU,EAAE;IAC1B,IAAI,CAACG,CAAC,CAACP,CAAC,CAAC,EAAE;MACT,OAAO,KAAK;IACd;EACF;EACA,OAAO,IAAI;AACb,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,OAAO,MAAM8B,IAAI,GAAO1B,UAAkC,IAAoBJ,CAAC,IAAI;EACjF,KAAK,MAAMO,CAAC,IAAIH,UAAU,EAAE;IAC1B,IAAIG,CAAC,CAACP,CAAC,CAAC,EAAE;MACR,OAAO,IAAI;IACb;EACF;EACA,OAAO,KAAK;AACd,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/PrimaryKey.js b/backend/node_modules/effect/dist/esm/PrimaryKey.js new file mode 100644 index 0000000000000000000000000000000000000000..94e052704fdd284d6e58171e01b8f6b169783544 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/PrimaryKey.js @@ -0,0 +1,14 @@ +/** + * @since 2.0.0 + */ +/** + * @since 2.0.0 + * @category symbols + */ +export const symbol = /*#__PURE__*/Symbol.for("effect/PrimaryKey"); +/** + * @since 2.0.0 + * @category accessors + */ +export const value = self => self[symbol](); +//# sourceMappingURL=PrimaryKey.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/PrimaryKey.js.map b/backend/node_modules/effect/dist/esm/PrimaryKey.js.map new file mode 100644 index 0000000000000000000000000000000000000000..b9b9384cb68191647b55596799746050271e25da --- /dev/null +++ b/backend/node_modules/effect/dist/esm/PrimaryKey.js.map @@ -0,0 +1 @@ +{"version":3,"file":"PrimaryKey.js","names":["symbol","Symbol","for","value","self"],"sources":["../../src/PrimaryKey.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAIA;;;;AAIA,OAAO,MAAMA,MAAM,gBAAkBC,MAAM,CAACC,GAAG,CAAC,mBAAmB,CAAC;AAUpE;;;;AAIA,OAAO,MAAMC,KAAK,GAAIC,IAAgB,IAAaA,IAAI,CAACJ,MAAM,CAAC,EAAE","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/PubSub.js.map b/backend/node_modules/effect/dist/esm/PubSub.js.map new file mode 100644 index 0000000000000000000000000000000000000000..0e120f7ceec77d888b24c1577cd3f8b292a55af0 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/PubSub.js.map @@ -0,0 +1 @@ +{"version":3,"file":"PubSub.js","names":["internal","bounded","dropping","sliding","unbounded","capacity","size","isFull","isEmpty","shutdown","isShutdown","awaitShutdown","publish","publishAll","subscribe"],"sources":["../../src/PubSub.ts"],"sourcesContent":[null],"mappings":"AAIA,OAAO,KAAKA,QAAQ,MAAM,sBAAsB;AAkChD;;;;;;;;;;AAUA,OAAO,MAAMC,OAAO,GAEYD,QAAQ,CAACC,OAAO;AAEhD;;;;;;;;;AASA,OAAO,MAAMC,QAAQ,GAEWF,QAAQ,CAACE,QAAQ;AAEjD;;;;;;;;;AASA,OAAO,MAAMC,OAAO,GAEYH,QAAQ,CAACG,OAAO;AAEhD;;;;;;AAMA,OAAO,MAAMC,SAAS,GACpBJ,QAAQ,CAACI,SAAS;AAEpB;;;;;;AAMA,OAAO,MAAMC,QAAQ,GAAmCL,QAAQ,CAACK,QAAQ;AAEzE;;;;;;;;AAQA,OAAO,MAAMC,IAAI,GAAkDN,QAAQ,CAACM,IAAI;AAEhF;;;;;;;AAOA,OAAO,MAAMC,MAAM,GAAmDP,QAAQ,CAACO,MAAM;AAErF;;;;;;AAMA,OAAO,MAAMC,OAAO,GAAmDR,QAAQ,CAACQ,OAAO;AAEvF;;;;;;;AAOA,OAAO,MAAMC,QAAQ,GAAgDT,QAAQ,CAACS,QAAQ;AAEtF;;;;;;AAMA,OAAO,MAAMC,UAAU,GAAmDV,QAAQ,CAACU,UAAU;AAE7F;;;;;;;;AAQA,OAAO,MAAMC,aAAa,GAAgDX,QAAQ,CAACW,aAAa;AAEhG;;;;;;;AAOA,OAAO,MAAMC,OAAO,GAiBhBZ,QAAQ,CAACY,OAAO;AAEpB;;;;;;;AAOA,OAAO,MAAMC,UAAU,GAiBnBb,QAAQ,CAACa,UAAU;AAEvB;;;;;;;;AAQA,OAAO,MAAMC,SAAS,GAAgFd,QAAQ,CAACc,SAAS","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Queue.js b/backend/node_modules/effect/dist/esm/Queue.js new file mode 100644 index 0000000000000000000000000000000000000000..2943c782fdbc9234dee35ac6442e1103fea24da9 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Queue.js @@ -0,0 +1,248 @@ +import * as internal from "./internal/queue.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const EnqueueTypeId = internal.EnqueueTypeId; +/** + * @since 2.0.0 + * @category symbols + */ +export const DequeueTypeId = internal.DequeueTypeId; +/** + * @since 2.0.0 + * @category symbols + */ +export const QueueStrategyTypeId = internal.QueueStrategyTypeId; +/** + * @since 2.0.0 + * @category symbols + */ +export const BackingQueueTypeId = internal.BackingQueueTypeId; +/** + * Returns `true` if the specified value is a `Queue`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isQueue = internal.isQueue; +/** + * Returns `true` if the specified value is a `Dequeue`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isDequeue = internal.isDequeue; +/** + * Returns `true` if the specified value is a `Enqueue`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isEnqueue = internal.isEnqueue; +/** + * @since 2.0.0 + * @category strategies + */ +export const backPressureStrategy = internal.backPressureStrategy; +/** + * @since 2.0.0 + * @category strategies + */ +export const droppingStrategy = internal.droppingStrategy; +/** + * @since 2.0.0 + * @category strategies + */ +export const slidingStrategy = internal.slidingStrategy; +/** + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * Makes a new bounded `Queue`. When the capacity of the queue is reached, any + * additional calls to `offer` will be suspended until there is more room in + * the queue. + * + * **Note**: When possible use only power of 2 capacities; this will provide + * better performance by utilising an optimised version of the underlying + * `RingBuffer`. + * + * @since 2.0.0 + * @category constructors + */ +export const bounded = internal.bounded; +/** + * Makes a new bounded `Queue` with the dropping strategy. + * + * When the capacity of the queue is reached, new elements will be dropped and the + * old elements will remain. + * + * **Note**: When possible use only power of 2 capacities; this will provide + * better performance by utilising an optimised version of the underlying + * `RingBuffer`. + * + * @since 2.0.0 + * @category constructors + */ +export const dropping = internal.dropping; +/** + * Makes a new bounded `Queue` with the sliding strategy. + * + * When the capacity of the queue is reached, new elements will be added and the + * old elements will be dropped. + * + * **Note**: When possible use only power of 2 capacities; this will provide + * better performance by utilising an optimised version of the underlying + * `RingBuffer`. + * + * @since 2.0.0 + * @category constructors + */ +export const sliding = internal.sliding; +/** + * Creates a new unbounded `Queue`. + * + * @since 2.0.0 + * @category constructors + */ +export const unbounded = internal.unbounded; +/** + * Returns the number of elements the queue can hold. + * + * @since 2.0.0 + * @category getters + */ +export const capacity = internal.capacity; +/** + * Retrieves the size of the queue, which is equal to the number of elements + * in the queue. This may be negative if fibers are suspended waiting for + * elements to be added to the queue. + * + * @since 2.0.0 + * @category getters + */ +export const size = internal.size; +/** + * Returns `true` if the `Queue` contains zero elements, `false` otherwise. + * + * @since 2.0.0 + * @category getters + */ +export const isEmpty = internal.isEmpty; +/** + * Returns `true` if the `Queue` contains at least one element, `false` + * otherwise. + * + * @since 2.0.0 + * @category getters + */ +export const isFull = internal.isFull; +/** + * Returns `true` if `shutdown` has been called, otherwise returns `false`. + * + * @since 2.0.0 + * @category getters + */ +export const isShutdown = internal.isShutdown; +/** + * Waits until the queue is shutdown. The `Effect` returned by this method will + * not resume until the queue has been shutdown. If the queue is already + * shutdown, the `Effect` will resume right away. + * + * @since 2.0.0 + * @category utils + */ +export const awaitShutdown = internal.awaitShutdown; +/** + * Interrupts any fibers that are suspended on `offer` or `take`. Future calls + * to `offer*` and `take*` will be interrupted immediately. + * + * @since 2.0.0 + * @category utils + */ +export const shutdown = internal.shutdown; +/** + * Places one value in the queue. + * + * @since 2.0.0 + * @category utils + */ +export const offer = internal.offer; +/** + * Places one value in the queue. + * + * @since 2.0.0 + * @category utils + */ +export const unsafeOffer = internal.unsafeOffer; +/** + * For Bounded Queue: uses the `BackPressure` Strategy, places the values in + * the queue and always returns true. If the queue has reached capacity, then + * the fiber performing the `offerAll` will be suspended until there is room + * in the queue. + * + * For Unbounded Queue: Places all values in the queue and returns true. + * + * For Sliding Queue: uses `Sliding` Strategy If there is room in the queue, + * it places the values otherwise it removes the old elements and enqueues the + * new ones. Always returns true. + * + * For Dropping Queue: uses `Dropping` Strategy, It places the values in the + * queue but if there is no room it will not enqueue them and return false. + * + * @since 2.0.0 + * @category utils + */ +export const offerAll = internal.offerAll; +/** + * Returns the first value in the `Queue` as a `Some`, or `None` if the queue + * is empty. + * + * @since 2.0.0 + * @category utils + */ +export const poll = internal.poll; +/** + * Takes the oldest value in the queue. If the queue is empty, this will return + * a computation that resumes when an item has been added to the queue. + * + * @since 2.0.0 + * @category utils + */ +export const take = internal.take; +/** + * Takes all the values in the queue and returns the values. If the queue is + * empty returns an empty collection. + * + * @since 2.0.0 + * @category utils + */ +export const takeAll = internal.takeAll; +/** + * Takes up to max number of values from the queue. + * + * @since 2.0.0 + * @category utils + */ +export const takeUpTo = internal.takeUpTo; +/** + * Takes a number of elements from the queue between the specified minimum and + * maximum. If there are fewer than the minimum number of elements available, + * suspends until at least the minimum number of elements have been collected. + * + * @since 2.0.0 + * @category utils + */ +export const takeBetween = internal.takeBetween; +/** + * Takes the specified number of elements from the queue. If there are fewer + * than the specified number of elements available, it suspends until they + * become available. + * + * @since 2.0.0 + * @category utils + */ +export const takeN = internal.takeN; +//# sourceMappingURL=Queue.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Random.js b/backend/node_modules/effect/dist/esm/Random.js new file mode 100644 index 0000000000000000000000000000000000000000..c690fb524fbb060d9b836d0ee15e77be23a13b9b --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Random.js @@ -0,0 +1,138 @@ +import * as defaultServices from "./internal/defaultServices.js"; +import * as internal from "./internal/random.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const RandomTypeId = internal.RandomTypeId; +/** + * Returns the next numeric value from the pseudo-random number generator. + * + * @since 2.0.0 + * @category constructors + */ +export const next = defaultServices.next; +/** + * Returns the next integer value from the pseudo-random number generator. + * + * @since 2.0.0 + * @category constructors + */ +export const nextInt = defaultServices.nextInt; +/** + * Returns the next boolean value from the pseudo-random number generator. + * + * @since 2.0.0 + * @category constructors + */ +export const nextBoolean = defaultServices.nextBoolean; +/** + * Returns the next numeric value in the specified range from the + * pseudo-random number generator. + * + * @since 2.0.0 + * @category constructors + */ +export const nextRange = defaultServices.nextRange; +/** + * Returns the next integer value in the specified range from the + * pseudo-random number generator. + * + * @since 2.0.0 + * @category constructors + */ +export const nextIntBetween = defaultServices.nextIntBetween; +/** + * Uses the pseudo-random number generator to shuffle the specified iterable. + * + * @since 2.0.0 + * @category constructors + */ +export const shuffle = defaultServices.shuffle; +/** + * Get a random element from an iterable. + * + * @example + * ```ts + * import { Effect, Random } from "effect" + * + * Effect.gen(function* () { + * const randomItem = yield* Random.choice([1, 2, 3]) + * console.log(randomItem) + * }) + * ``` + * + * @since 3.6.0 + * @category constructors + */ +export const choice = defaultServices.choice; +/** + * Retreives the `Random` service from the context and uses it to run the + * specified workflow. + * + * @since 2.0.0 + * @category constructors + */ +export const randomWith = defaultServices.randomWith; +/** + * @since 2.0.0 + * @category context + */ +export const Random = internal.randomTag; +/** + * Constructs the `Random` service, seeding the pseudo-random number generator + * with an hash of the specified seed. + * This constructor is useful for generating predictable sequences of random values for specific use cases. + * + * Example uses: + * - Generating random UI data for visual tests. + * - Creating data that needs to change daily but remain the same throughout a single day, such as using a date as the seed. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Effect, Random } from "effect" + * + * const random1 = Random.make("myseed") + * const random2 = Random.make("myseed") + * + * assert.equal(Effect.runSync(random1.next), Effect.runSync(random2.next)) + * ``` + * + * @since 3.5.0 + * @category constructors + */ +export const make = internal.make; +/** + * Constructs the `Random` service from an array of literal values. + * The service will cycle through the provided values in order when generating random values. + * This constructor is useful for creating deterministic sequences for testing or when specific values need to be returned. + * + * @example + * ```ts + * import { Effect, Random } from "effect" + * + * Effect.gen(function* () { + * console.log(yield* Random.next) // 0.2 + * console.log(yield* Random.next) // 0.5 + * console.log(yield* Random.next) // 0.8 + * console.log(yield* Random.next) // 0.2 (cycles back) + * }).pipe(Effect.withRandom(Random.fixed([0.2, 0.5, 0.8]))) + * ``` + * + * @example + * ```ts + * import { Effect, Random } from "effect" + * + * Effect.gen(function* () { + * console.log(yield* Random.nextBoolean) // true + * console.log(yield* Random.nextBoolean) // false + * console.log(yield* Random.nextBoolean) // true + * }).pipe(Effect.withRandom(Random.fixed([true, false, true]))) + * ``` + * + * @since 3.11.0 + * @category constructors + */ +export const fixed = internal.fixed; +//# sourceMappingURL=Random.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Random.js.map b/backend/node_modules/effect/dist/esm/Random.js.map new file mode 100644 index 0000000000000000000000000000000000000000..333758dfbad04e93f613dd8773ee341ab902b2bf --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Random.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Random.js","names":["defaultServices","internal","RandomTypeId","next","nextInt","nextBoolean","nextRange","nextIntBetween","shuffle","choice","randomWith","Random","randomTag","make","fixed"],"sources":["../../src/Random.ts"],"sourcesContent":[null],"mappings":"AAQA,OAAO,KAAKA,eAAe,MAAM,+BAA+B;AAChE,OAAO,KAAKC,QAAQ,MAAM,sBAAsB;AAGhD;;;;AAIA,OAAO,MAAMC,YAAY,GAAkBD,QAAQ,CAACC,YAAY;AA0ChE;;;;;;AAMA,OAAO,MAAMC,IAAI,GAA0BH,eAAe,CAACG,IAAI;AAE/D;;;;;;AAMA,OAAO,MAAMC,OAAO,GAA0BJ,eAAe,CAACI,OAAO;AAErE;;;;;;AAMA,OAAO,MAAMC,WAAW,GAA2BL,eAAe,CAACK,WAAW;AAE9E;;;;;;;AAOA,OAAO,MAAMC,SAAS,GAAwDN,eAAe,CAACM,SAAS;AAEvG;;;;;;;AAOA,OAAO,MAAMC,cAAc,GAAwDP,eAAe,CAACO,cAAc;AAEjH;;;;;;AAMA,OAAO,MAAMC,OAAO,GAAgER,eAAe,CAACQ,OAAO;AAE3G;;;;;;;;;;;;;;;;AAgBA,OAAO,MAAMC,MAAM,GAKPT,eAAe,CAACS,MAAM;AAElC;;;;;;;AAOA,OAAO,MAAMC,UAAU,GACrBV,eAAe,CAACU,UAAU;AAE5B;;;;AAIA,OAAO,MAAMC,MAAM,GAAgCV,QAAQ,CAACW,SAAS;AAErE;;;;;;;;;;;;;;;;;;;;;;;AAuBA,OAAO,MAAMC,IAAI,GAA2BZ,QAAQ,CAACY,IAAI;AAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,OAAO,MAAMC,KAAK,GAAoEb,QAAQ,CAACa,KAAK","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/RateLimiter.js.map b/backend/node_modules/effect/dist/esm/RateLimiter.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c5e843f7671afadec863c69daf1db42f312141c5 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/RateLimiter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RateLimiter.js","names":["internal","make","withCost"],"sources":["../../src/RateLimiter.ts"],"sourcesContent":[null],"mappings":"AAOA,OAAO,KAAKA,QAAQ,MAAM,2BAA2B;AAuDrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,OAAO,MAAMC,IAAI,GAAwED,QAAQ,CAACC,IAAI;AAEtG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,OAAO,MAAMC,QAAQ,GAA4EF,QAAQ,CAACE,QAAQ","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/RcMap.js b/backend/node_modules/effect/dist/esm/RcMap.js new file mode 100644 index 0000000000000000000000000000000000000000..e59a67808226e214be66e17c3029b62cfdf5d77b --- /dev/null +++ b/backend/node_modules/effect/dist/esm/RcMap.js @@ -0,0 +1,70 @@ +import * as internal from "./internal/rcMap.js"; +/** + * @since 3.5.0 + * @category type ids + */ +export const TypeId = internal.TypeId; +/** + * An `RcMap` can contain multiple reference counted resources that can be indexed + * by a key. The resources are lazily acquired on the first call to `get` and + * released when the last reference is released. + * + * Complex keys can extend `Equal` and `Hash` to allow lookups by value. + * + * **Options** + * + * - `capacity`: The maximum number of resources that can be held in the map. + * - `idleTimeToLive`: When the reference count reaches zero, the resource will be released after this duration. + * Can be a static duration or a function that returns a duration based on the key. + * + * @since 3.5.0 + * @category models + * @example + * ```ts + * import { Effect, RcMap } from "effect" + * + * Effect.gen(function*() { + * const map = yield* RcMap.make({ + * lookup: (key: string) => + * Effect.acquireRelease( + * Effect.succeed(`acquired ${key}`), + * () => Effect.log(`releasing ${key}`) + * ) + * }) + * + * // Get "foo" from the map twice, which will only acquire it once. + * // It will then be released once the scope closes. + * yield* RcMap.get(map, "foo").pipe( + * Effect.andThen(RcMap.get(map, "foo")), + * Effect.scoped + * ) + * }) + * ``` + */ +export const make = internal.make; +/** + * @since 3.5.0 + * @category combinators + */ +export const get = internal.get; +/** + * @since 3.17.7 + * @category combinators + */ +export const has = internal.has; +/** + * @since 3.8.0 + * @category combinators + */ +export const keys = internal.keys; +/** + * @since 3.13.0 + * @category combinators + */ +export const invalidate = internal.invalidate; +/** + * @since 3.13.0 + * @category combinators + */ +export const touch = internal.touch; +//# sourceMappingURL=RcMap.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/RcRef.js b/backend/node_modules/effect/dist/esm/RcRef.js new file mode 100644 index 0000000000000000000000000000000000000000..833d12dfdb6256d76abb0b371d227e9a0f6ab03b --- /dev/null +++ b/backend/node_modules/effect/dist/esm/RcRef.js @@ -0,0 +1,51 @@ +import * as internal from "./internal/rcRef.js"; +/** + * @since 3.5.0 + * @category type ids + */ +export const TypeId = internal.TypeId; +/** + * Create an `RcRef` from an acquire `Effect`. + * + * An RcRef wraps a reference counted resource that can be acquired and released + * multiple times. + * + * The resource is lazily acquired on the first call to `get` and released when + * the last reference is released. + * + * @since 3.5.0 + * @category constructors + * @example + * ```ts + * import { Effect, RcRef } from "effect" + * + * Effect.gen(function*() { + * const ref = yield* RcRef.make({ + * acquire: Effect.acquireRelease( + * Effect.succeed("foo"), + * () => Effect.log("release foo") + * ) + * }) + * + * // will only acquire the resource once, and release it + * // when the scope is closed + * yield* RcRef.get(ref).pipe( + * Effect.andThen(RcRef.get(ref)), + * Effect.scoped + * ) + * }) + * ``` + */ +export const make = internal.make; +/** + * @since 3.5.0 + * @category combinators + */ +export const get = internal.get; +/** + * @since 3.19.6 + * @category combinators + * @experimental + */ +export const invalidate = internal.invalidate; +//# sourceMappingURL=RcRef.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/RcRef.js.map b/backend/node_modules/effect/dist/esm/RcRef.js.map new file mode 100644 index 0000000000000000000000000000000000000000..7f001d1c2fec4d73c77f7d4762ffc45ddb7910d3 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/RcRef.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RcRef.js","names":["internal","TypeId","make","get","invalidate"],"sources":["../../src/RcRef.ts"],"sourcesContent":[null],"mappings":"AAKA,OAAO,KAAKA,QAAQ,MAAM,qBAAqB;AAM/C;;;;AAIA,OAAO,MAAMC,MAAM,GAAkBD,QAAQ,CAACC,MAAM;AAoDpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,OAAO,MAAMC,IAAI,GASyCF,QAAQ,CAACE,IAAI;AAEvE;;;;AAIA,OAAO,MAAMC,GAAG,GAAkEH,QAAQ,CAACG,GAAG;AAE9F;;;;;AAKA,OAAO,MAAMC,UAAU,GAAqDJ,QAAQ,CAACI,UAAU","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Readable.js.map b/backend/node_modules/effect/dist/esm/Readable.js.map new file mode 100644 index 0000000000000000000000000000000000000000..0d618719979deea017885f5d93b3b72b423adce9 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Readable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Readable.js","names":["dual","core","pipeArguments","hasProperty","TypeId","Symbol","for","isReadable","u","Proto","pipe","arguments","make","get","self","Object","create","map","f","mapEffect","flatMap","unwrap","effect","s"],"sources":["../../src/Readable.ts"],"sourcesContent":[null],"mappings":"AAIA,SAASA,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,IAAI,MAAM,oBAAoB;AAC1C,SAAwBC,aAAa,QAAQ,eAAe;AAC5D,SAASC,WAAW,QAAQ,gBAAgB;AAG5C;;;;AAIA,OAAO,MAAMC,MAAM,gBAAkBC,MAAM,CAACC,GAAG,CAAC,iBAAiB,CAAC;AAiBlE;;;;AAIA,OAAO,MAAMC,UAAU,GAAIC,CAAU,IAA+CL,WAAW,CAACK,CAAC,EAAEJ,MAAM,CAAC;AAE1G,MAAMK,KAAK,GAA+B;EACxC,CAACL,MAAM,GAAGA,MAAM;EAChBM,IAAIA,CAAA;IACF,OAAOR,aAAa,CAAC,IAAI,EAAES,SAAS,CAAC;EACvC;CACD;AAED;;;;AAIA,OAAO,MAAMC,IAAI,GAAaC,GAAoB,IAAuB;EACvE,MAAMC,IAAI,GAAGC,MAAM,CAACC,MAAM,CAACP,KAAK,CAAC;EACjCK,IAAI,CAACD,GAAG,GAAGA,GAAG;EACd,OAAOC,IAAI;AACb,CAAC;AAED;;;;AAIA,OAAO,MAAMG,GAAG,gBAWZjB,IAAI,CACN,CAAC,EACD,CAAac,IAAuB,EAAEI,CAAuB,KAAwBN,IAAI,CAACX,IAAI,CAACgB,GAAG,CAACH,IAAI,CAACD,GAAG,EAAEK,CAAC,CAAC,CAAC,CACjH;AAED;;;;AAIA,OAAO,MAAMC,SAAS,gBAWlBnB,IAAI,CAAC,CAAC,EAAE,CACVc,IAAuB,EACvBI,CAAuC,KACPN,IAAI,CAACX,IAAI,CAACmB,OAAO,CAACN,IAAI,CAACD,GAAG,EAAEK,CAAC,CAAC,CAAC,CAAC;AAElE;;;;AAIA,OAAO,MAAMG,MAAM,GACjBC,MAAyC,IAEzCV,IAAI,CACFX,IAAI,CAACmB,OAAO,CAACE,MAAM,EAAGC,CAAC,IAAKA,CAAC,CAACV,GAAG,CAAC,CACnC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Record.js.map b/backend/node_modules/effect/dist/esm/Record.js.map new file mode 100644 index 0000000000000000000000000000000000000000..194d5d1e8d4a53ac948320f682ce387518d76a29 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Record.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Record.js","names":["E","Equal","dual","identity","Option","empty","isEmptyRecord","self","keys","length","isEmptyReadonlyRecord","fromIterableWith","f","out","a","k","b","fromIterableBy","items","fromEntries","Object","collect","key","push","toEntries","value","size","has","prototype","hasOwnProperty","call","get","some","none","modify","modifyOption","replaceOption","remove","pop","map","mapKeys","mapEntries","filterMap","o","isSome","filter","predicate","getSomes","getLefts","isLeft","left","getRights","isRight","right","partitionMap","e","separate","partition","values","_","set","replace","isSubrecordBy","equivalence","that","isSubrecord","reduce","zero","every","refinement","union","combine","intersection","difference","getEquivalence","is","singleton","findFirst","i"],"sources":["../../src/Record.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;AAOA,OAAO,KAAKA,CAAC,MAAM,aAAa;AAChC,OAAO,KAAKC,KAAK,MAAM,YAAY;AAEnC,SAASC,IAAI,EAAEC,QAAQ,QAAQ,eAAe;AAE9C,OAAO,KAAKC,MAAM,MAAM,aAAa;AA0CrC;;;;;;AAMA,OAAO,MAAMC,KAAK,GAAGA,CAAA,MAGf,EAAU;AAEhB;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,aAAa,GAAyBC,IAAkB,IACnEC,IAAI,CAACD,IAAI,CAAC,CAACE,MAAM,KAAK,CAAC;AAEzB;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,qBAAqB,GAEMJ,aAAa;AAErD;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MAAMK,gBAAgB,gBA2CzBT,IAAI,CACN,CAAC,EACD,CACEK,IAAiB,EACjBK,CAA4B,KACkB;EAC9C,MAAMC,GAAG,GAAsBR,KAAK,EAAE;EACtC,KAAK,MAAMS,CAAC,IAAIP,IAAI,EAAE;IACpB,MAAM,CAACQ,CAAC,EAAEC,CAAC,CAAC,GAAGJ,CAAC,CAACE,CAAC,CAAC;IACnBD,GAAG,CAACE,CAAC,CAAC,GAAGC,CAAC;EACZ;EACA,OAAOH,GAAG;AACZ,CAAC,CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,OAAO,MAAMI,cAAc,GAAGA,CAC5BC,KAAkB,EAClBN,CAAc,KACiCD,gBAAgB,CAACO,KAAK,EAAGJ,CAAC,IAAK,CAACF,CAAC,CAACE,CAAC,CAAC,EAAEA,CAAC,CAAC,CAAC;AAE1F;;;;;;;;;;;;;;;;;;;AAmBA,OA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No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/RedBlackTree.js b/backend/node_modules/effect/dist/esm/RedBlackTree.js new file mode 100644 index 0000000000000000000000000000000000000000..bb1c03eb287031cc57cab524b9d6f9d45e20e758 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/RedBlackTree.js @@ -0,0 +1,259 @@ +import * as RBT from "./internal/redBlackTree.js"; +import * as RBTI from "./internal/redBlackTree/iterator.js"; +const TypeId = RBT.RedBlackTreeTypeId; +/** + * @since 2.0.0 + * @category constants + */ +export const Direction = RBTI.Direction; +/** + * @since 2.0.0 + * @category refinements + */ +export const isRedBlackTree = RBT.isRedBlackTree; +/** + * Creates an empty `RedBlackTree`. + * + * @since 2.0.0 + * @category constructors + */ +export const empty = RBT.empty; +/** + * Creates a new `RedBlackTree` from an iterable collection of key/value pairs. + * + * @since 2.0.0 + * @category constructors + */ +export const fromIterable = RBT.fromIterable; +/** + * Constructs a new `RedBlackTree` from the specified entries. + * + * @since 2.0.0 + * @category constructors + */ +export const make = RBT.make; +/** + * Returns an iterator that points to the element at the specified index of the + * tree. + * + * **Note**: The iterator will run through elements in order. + * + * @since 2.0.0 + * @category traversing + */ +export const at = RBT.atForwards; +/** + * Returns an iterator that points to the element at the specified index of the + * tree. + * + * **Note**: The iterator will run through elements in reverse order. + * + * @since 2.0.0 + * @category traversing + */ +export const atReversed = RBT.atBackwards; +/** + * Finds all values in the tree associated with the specified key. + * + * @since 2.0.0 + * @category elements + */ +export const findAll = RBT.findAll; +/** + * Finds the first value in the tree associated with the specified key, if it exists. + * + * @category elements + * @since 2.0.0 + */ +export const findFirst = RBT.findFirst; +/** + * Returns the first entry in the tree, if it exists. + * + * @since 2.0.0 + * @category getters + */ +export const first = RBT.first; +/** + * Returns the element at the specified index within the tree or `None` if the + * specified index does not exist. + * + * @since 2.0.0 + * @category elements + */ +export const getAt = RBT.getAt; +/** + * Gets the `Order` that the `RedBlackTree` is using. + * + * @since 2.0.0 + * @category getters + */ +export const getOrder = RBT.getOrder; +/** + * Returns an iterator that traverse entries in order with keys greater than the + * specified key. + * + * @since 2.0.0 + * @category traversing + */ +export const greaterThan = RBT.greaterThanForwards; +/** + * Returns an iterator that traverse entries in reverse order with keys greater + * than the specified key. + * + * @since 2.0.0 + * @category traversing + */ +export const greaterThanReversed = RBT.greaterThanBackwards; +/** + * Returns an iterator that traverse entries in order with keys greater than or + * equal to the specified key. + * + * @since 2.0.0 + * @category traversing + */ +export const greaterThanEqual = RBT.greaterThanEqualForwards; +/** + * Returns an iterator that traverse entries in reverse order with keys greater + * than or equal to the specified key. + * + * @since 2.0.0 + * @category traversing + */ +export const greaterThanEqualReversed = RBT.greaterThanEqualBackwards; +/** + * Finds the item with key, if it exists. + * + * @since 2.0.0 + * @category elements + */ +export const has = RBT.has; +/** + * Insert a new item into the tree. + * + * @since 2.0.0 + */ +export const insert = RBT.insert; +/** + * Get all the keys present in the tree in order. + * + * @since 2.0.0 + * @category getters + */ +export const keys = RBT.keysForward; +/** + * Get all the keys present in the tree in reverse order. + * + * @since 2.0.0 + * @category getters + */ +export const keysReversed = RBT.keysBackward; +/** + * Returns the last entry in the tree, if it exists. + * + * @since 2.0.0 + * @category getters + */ +export const last = RBT.last; +/** + * Returns an iterator that traverse entries in order with keys less than the + * specified key. + * + * @since 2.0.0 + * @category traversing + */ +export const lessThan = RBT.lessThanForwards; +/** + * Returns an iterator that traverse entries in reverse order with keys less + * than the specified key. + * + * @since 2.0.0 + * @category traversing + */ +export const lessThanReversed = RBT.lessThanBackwards; +/** + * Returns an iterator that traverse entries in order with keys less than or + * equal to the specified key. + * + * @since 2.0.0 + * @category traversing + */ +export const lessThanEqual = RBT.lessThanEqualForwards; +/** + * Returns an iterator that traverse entries in reverse order with keys less + * than or equal to the specified key. + * + * @since 2.0.0 + * @category traversing + */ +export const lessThanEqualReversed = RBT.lessThanEqualBackwards; +/** + * Execute the specified function for each node of the tree, in order. + * + * @since 2.0.0 + * @category traversing + */ +export const forEach = RBT.forEach; +/** + * Visit each node of the tree in order with key greater then or equal to max. + * + * @since 2.0.0 + * @category traversing + */ +export const forEachGreaterThanEqual = RBT.forEachGreaterThanEqual; +/** + * Visit each node of the tree in order with key lower then max. + * + * @since 2.0.0 + * @category traversing + */ +export const forEachLessThan = RBT.forEachLessThan; +/** + * Visit each node of the tree in order with key lower than max and greater + * than or equal to min. + * + * @since 2.0.0 + * @category traversing + */ +export const forEachBetween = RBT.forEachBetween; +/** + * Reduce a state over the entries of the tree. + * + * @since 2.0.0 + * @category folding + */ +export const reduce = RBT.reduce; +/** + * Removes the entry with the specified key, if it exists. + * + * @since 2.0.0 + */ +export const removeFirst = RBT.removeFirst; +/** + * Traverse the tree in reverse order. + * + * @since 2.0.0 + * @category traversing + */ +export const reversed = RBT.reversed; +/** + * Returns the size of the tree. + * + * @since 2.0.0 + * @category getters + */ +export const size = RBT.size; +/** + * Get all values present in the tree in order. + * + * @since 2.0.0 + * @category getters + */ +export const values = RBT.valuesForward; +/** + * Get all values present in the tree in reverse order. + * + * @since 2.0.0 + * @category getters + */ +export const valuesReversed = RBT.valuesBackward; +//# sourceMappingURL=RedBlackTree.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/RedBlackTree.js.map b/backend/node_modules/effect/dist/esm/RedBlackTree.js.map new file mode 100644 index 0000000000000000000000000000000000000000..78091a097af8479ec6f1fad6584bd8d11bbb8754 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/RedBlackTree.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RedBlackTree.js","names":["RBT","RBTI","TypeId","RedBlackTreeTypeId","Direction","isRedBlackTree","empty","fromIterable","make","at","atForwards","atReversed","atBackwards","findAll","findFirst","first","getAt","getOrder","greaterThan","greaterThanForwards","greaterThanReversed","greaterThanBackwards","greaterThanEqual","greaterThanEqualForwards","greaterThanEqualReversed","greaterThanEqualBackwards","has","insert","keys","keysForward","keysReversed","keysBackward","last","lessThan","lessThanForwards","lessThanReversed","lessThanBackwards","lessThanEqual","lessThanEqualForwards","lessThanEqualReversed","lessThanEqualBackwards","forEach","forEachGreaterThanEqual","forEachLessThan","forEachBetween","reduce","removeFirst","reversed","size","values","valuesForward","valuesReversed","valuesBackward"],"sources":["../../src/RedBlackTree.ts"],"sourcesContent":[null],"mappings":"AAMA,OAAO,KAAKA,GAAG,MAAM,4BAA4B;AACjD,OAAO,KAAKC,IAAI,MAAM,qCAAqC;AAM3D,MAAMC,MAAM,GAAkBF,GAAG,CAACG,kBAA4B;AAQ9D;;;;AAIA,OAAO,MAAMC,SAAS,GAAGH,IAAI,CAACG,SAAS;AA2BvC;;;;AAIA,OAAO,MAAMC,cAAc,GAWvBL,GAAG,CAACK,cAAc;AAEtB;;;;;;AAMA,OAAO,MAAMC,KAAK,GAAwDN,GAAG,CAACM,KAAK;AAEnF;;;;;;AAMA,OAAO,MAAMC,YAAY,GAerBP,GAAG,CAACO,YAAY;AAEpB;;;;;;AAMA,OAAO,MAAMC,IAAI,GAImER,GAAG,CAACQ,IAAI;AAE5F;;;;;;;;;AASA,OAAO,MAAMC,EAAE,GAqBXT,GAAG,CAACU,UAAU;AAElB;;;;;;;;;AASA,OAAO,MAAMC,UAAU,GAqBnBX,GAAG,CAACY,WAAW;AAEnB;;;;;;AAMA,OAAO,MAAMC,OAAO,GAehBb,GAAG,CAACa,OAAO;AAEf;;;;;;AAMA,OAAO,MAAMC,SAAS,GAelBd,GAAG,CAACc,SAAS;AAEjB;;;;;;AAMA,OAAO,MAAMC,KAAK,GAAuDf,GAAG,CAACe,KAAK;AAElF;;;;;;;AAOA,OAAO,MAAMC,KAAK,GAiBdhB,GAAG,CAACgB,KAAK;AAEb;;;;;;AAMA,OAAO,MAAMC,QAAQ,GAAiDjB,GAAG,CAACiB,QAAQ;AAElF;;;;;;;AAOA,OAAO,MAAMC,WAAW,GAiBpBlB,GAAG,CAACmB,mBAAmB;AAE3B;;;;;;;AAOA,OAAO,MAAMC,mBAAmB,GAiB5BpB,GAAG,CAACqB,oBAAoB;AAE5B;;;;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CAAC+C,QAAQ;AAE1F;;;;;;AAMA,OAAO,MAAMC,IAAI,GAA+ChD,GAAG,CAACgD,IAAI;AAExE;;;;;;AAMA,OAAO,MAAMC,MAAM,GAA4DjD,GAAG,CAACkD,aAAa;AAEhG;;;;;;AAMA,OAAO,MAAMC,cAAc,GAA4DnD,GAAG,CAACoD,cAAc","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Redacted.js b/backend/node_modules/effect/dist/esm/Redacted.js new file mode 100644 index 0000000000000000000000000000000000000000..fd6c7187cdffaede0009560592884fd63fc14c61 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Redacted.js @@ -0,0 +1,93 @@ +import * as Equivalence from "./Equivalence.js"; +import * as redacted_ from "./internal/redacted.js"; +/** + * @since 3.3.0 + * @category symbols + */ +export const RedactedTypeId = redacted_.RedactedTypeId; +/** + * @since 3.3.0 + * @category refinements + */ +export const isRedacted = redacted_.isRedacted; +/** + * This function creates a `Redacted` instance from a given value `A`, + * securely hiding its content. + * + * @example + * ```ts + * import { Redacted } from "effect" + * + * const API_KEY = Redacted.make("1234567890") + * ``` + * + * @since 3.3.0 + * @category constructors + */ +export const make = redacted_.make; +/** + * Retrieves the original value from a `Redacted` instance. Use this function + * with caution, as it exposes the sensitive data. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Redacted } from "effect" + * + * const API_KEY = Redacted.make("1234567890") + * + * assert.equal(Redacted.value(API_KEY), "1234567890") + * ``` + * + * @since 3.3.0 + * @category getters + */ +export const value = redacted_.value; +/** + * Erases the underlying value of a `Redacted` instance, rendering it unusable. + * This function is intended to ensure that sensitive data does not remain in + * memory longer than necessary. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Redacted } from "effect" + * + * const API_KEY = Redacted.make("1234567890") + * + * assert.equal(Redacted.value(API_KEY), "1234567890") + * + * Redacted.unsafeWipe(API_KEY) + * + * assert.throws(() => Redacted.value(API_KEY), new Error("Unable to get redacted value")) + * ``` + * + * @since 3.3.0 + * @category unsafe + */ +export const unsafeWipe = redacted_.unsafeWipe; +/** + * Generates an equivalence relation for `Redacted` values based on an + * equivalence relation for the underlying values `A`. This function is useful + * for comparing `Redacted` instances without exposing their contents. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Redacted, Equivalence } from "effect" + * + * const API_KEY1 = Redacted.make("1234567890") + * const API_KEY2 = Redacted.make("1-34567890") + * const API_KEY3 = Redacted.make("1234567890") + * + * const equivalence = Redacted.getEquivalence(Equivalence.string) + * + * assert.equal(equivalence(API_KEY1, API_KEY2), false) + * assert.equal(equivalence(API_KEY1, API_KEY3), true) + * ``` + * + * @category equivalence + * @since 3.3.0 + */ +export const getEquivalence = isEquivalent => Equivalence.make((x, y) => isEquivalent(value(x), value(y))); +//# sourceMappingURL=Redacted.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Ref.js.map b/backend/node_modules/effect/dist/esm/Ref.js.map new file mode 100644 index 0000000000000000000000000000000000000000..78c4d58a296083af8740af658241bac017c63473 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Ref.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Ref.js","names":["internal","RefTypeId","make","get","getAndSet","getAndUpdate","getAndUpdateSome","modify","modifySome","set","setAndGet","update","updateAndGet","updateSome","updateSomeAndGet","unsafeMake"],"sources":["../../src/Ref.ts"],"sourcesContent":[null],"mappings":"AAIA,OAAO,KAAKA,QAAQ,MAAM,mBAAmB;AAM7C;;;;AAIA,OAAO,MAAMC,SAAS,GAAkBD,QAAQ,CAACC,SAAS;AAkD1D;;;;AAIA,OAAO,MAAMC,IAAI,GAA2CF,QAAQ,CAACE,IAAI;AAEzE;;;;AAIA,OAAO,MAAMC,GAAG,GAA0CH,QAAQ,CAACG,GAAG;AAEtE;;;;AAIA,OAAO,MAAMC,SAAS,GAWlBJ,QAAQ,CAACI,SAAS;AAEtB;;;;AAIA,OAAO,MAAMC,YAAY,GAWrBL,QAAQ,CAACK,YAAY;AAEzB;;;;AAIA,OAAO,MAAMC,gBAAgB,GAWzBN,QAAQ,CAACM,gBAAgB;AAE7B;;;;AAIA,OAAO,MAAMC,MAAM,GAWfP,QAAQ,CAACO,MAAM;AAEnB;;;;AAIA,OAAO,MAAMC,UAAU,GAWnBR,QAAQ,CAACQ,UAAU;AAEvB;;;;AAIA,OAAO,MAAMC,GAAG,GAWZT,QAAQ,CAACS,GAAG;AAEhB;;;;AAIA,OAAO,MAAMC,SAAS,GAWlBV,QAAQ,CAACU,SAAS;AAEtB;;;;AAIA,OAAO,MAAMC,MAAM,GAWfX,QAAQ,CAACW,MAAM;AAEnB;;;;AAIA,OAAO,MAAMC,YAAY,GAWrBZ,QAAQ,CAACY,YAAY;AAEzB;;;;AAIA,OAAO,MAAMC,UAAU,GAWnBb,QAAQ,CAACa,UAAU;AAEvB;;;;AAIA,OAAO,MAAMC,gBAAgB,GAWzBd,QAAQ,CAACc,gBAAgB;AAE7B;;;;AAIA,OAAO,MAAMC,UAAU,GAA4Bf,QAAQ,CAACe,UAAU","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Reloadable.js b/backend/node_modules/effect/dist/esm/Reloadable.js new file mode 100644 index 0000000000000000000000000000000000000000..6ee221c330e7b58a978036ac33e38e5dcc0ff15d --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Reloadable.js @@ -0,0 +1,59 @@ +import * as internal from "./internal/reloadable.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const ReloadableTypeId = internal.ReloadableTypeId; +/** + * Makes a new reloadable service from a layer that describes the construction + * of a static service. The service is automatically reloaded according to the + * provided schedule. + * + * @since 2.0.0 + * @category constructors + */ +export const auto = internal.auto; +/** + * Makes a new reloadable service from a layer that describes the construction + * of a static service. The service is automatically reloaded according to a + * schedule, which is extracted from the input to the layer. + * + * @since 2.0.0 + * @category constructors + */ +export const autoFromConfig = internal.autoFromConfig; +/** + * Retrieves the current version of the reloadable service. + * + * @since 2.0.0 + * @category getters + */ +export const get = internal.get; +/** + * Makes a new reloadable service from a layer that describes the construction + * of a static service. + * + * @since 2.0.0 + * @category constructors + */ +export const manual = internal.manual; +/** + * Reloads the specified service. + * + * @since 2.0.0 + * @category constructors + */ +export const reload = internal.reload; +/** + * @since 2.0.0 + * @category context + */ +export const tag = internal.reloadableTag; +/** + * Forks the reload of the service in the background, ignoring any errors. + * + * @since 2.0.0 + * @category constructors + */ +export const reloadFork = internal.reloadFork; +//# sourceMappingURL=Reloadable.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Request.js b/backend/node_modules/effect/dist/esm/Request.js new file mode 100644 index 0000000000000000000000000000000000000000..12e8961c6f73da2b5658824eeca33647e61fe443 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Request.js @@ -0,0 +1,140 @@ +import * as RequestBlock_ from "./internal/blockedRequests.js"; +import * as cache from "./internal/cache.js"; +import * as core from "./internal/core.js"; +import * as fiberRuntime from "./internal/fiberRuntime.js"; +import * as internal from "./internal/request.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const RequestTypeId = internal.RequestTypeId; +/** + * Returns `true` if the specified value is a `Request`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isRequest = internal.isRequest; +/** + * Constructs a new `Request`. + * + * @since 2.0.0 + * @category constructors + */ +export const of = internal.of; +/** + * Constructs a new `Request`. + * + * @since 2.0.0 + * @category constructors + */ +export const tagged = internal.tagged; +/** + * Provides a constructor for a Request Class. + * + * @example + * ```ts + * import { Request } from "effect" + * + * type Success = string + * type Error = never + * + * class MyRequest extends Request.Class {} + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const Class = internal.Class; +/** + * Provides a Tagged constructor for a Request Class. + * + * @example + * ```ts + * import { Request } from "effect" + * + * type Success = string + * type Error = never + * + * class MyRequest extends Request.TaggedClass("MyRequest") {} + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const TaggedClass = internal.TaggedClass; +/** + * Complete a `Request` with the specified result. + * + * @since 2.0.0 + * @category request completion + */ +export const complete = internal.complete; +/** + * Interrupts the child effect when requests are no longer needed + * + * @since 2.0.0 + * @category request completion + */ +export const interruptWhenPossible = fiberRuntime.interruptWhenPossible; +/** + * Complete a `Request` with the specified effectful computation, failing the + * request with the error from the effect workflow if it fails, and completing + * the request with the value of the effect workflow if it succeeds. + * + * @since 2.0.0 + * @category request completion + */ +export const completeEffect = internal.completeEffect; +/** + * Complete a `Request` with the specified error. + * + * @since 2.0.0 + * @category request completion + */ +export const fail = internal.fail; +/** + * Complete a `Request` with the specified cause. + * + * @since 2.0.0 + * @category request completion + */ +export const failCause = internal.failCause; +/** + * Complete a `Request` with the specified value. + * + * @since 2.0.0 + * @category request completion + */ +export const succeed = internal.succeed; +/** + * @since 2.0.0 + * @category models + */ +export const makeCache = options => cache.make({ + ...options, + lookup: () => core.map(core.deferredMake(), handle => ({ + listeners: new internal.Listeners(), + handle + })) +}); +/** + * @since 2.0.0 + * @category symbols + */ +export const EntryTypeId = /*#__PURE__*/Symbol.for("effect/RequestBlock.Entry"); +/** + * @since 2.0.0 + * @category guards + */ +export const isEntry = RequestBlock_.isEntry; +/** + * @since 2.0.0 + * @category constructors + */ +export const makeEntry = RequestBlock_.makeEntry; +//# sourceMappingURL=Request.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/RequestBlock.js b/backend/node_modules/effect/dist/esm/RequestBlock.js new file mode 100644 index 0000000000000000000000000000000000000000..686d600182422e7f589e583705b1a40d0ceff41f --- /dev/null +++ b/backend/node_modules/effect/dist/esm/RequestBlock.js @@ -0,0 +1,35 @@ +/** + * @since 2.0.0 + */ +import * as RequestBlock_ from "./internal/blockedRequests.js"; +/** + * @since 2.0.0 + * @category constructors + */ +export const single = RequestBlock_.single; +/** + * @since 2.0.0 + * @category constructors + */ +export const empty = RequestBlock_.empty; +/** + * @since 2.0.0 + * @category constructors + */ +export const mapRequestResolvers = RequestBlock_.mapRequestResolvers; +/** + * @since 2.0.0 + * @category constructors + */ +export const parallel = RequestBlock_.par; +/** + * @since 2.0.0 + * @category constructors + */ +export const reduce = RequestBlock_.reduce; +/** + * @since 2.0.0 + * @category constructors + */ +export const sequential = RequestBlock_.seq; +//# sourceMappingURL=RequestBlock.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/RequestBlock.js.map b/backend/node_modules/effect/dist/esm/RequestBlock.js.map new file mode 100644 index 0000000000000000000000000000000000000000..683012d40bb35941b194d0ffc1f43773730bdebd --- /dev/null +++ b/backend/node_modules/effect/dist/esm/RequestBlock.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RequestBlock.js","names":["RequestBlock_","single","empty","mapRequestResolvers","parallel","par","reduce","sequential","seq"],"sources":["../../src/RequestBlock.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,aAAa,MAAM,+BAA+B;AA0E9D;;;;AAIA,OAAO,MAAMC,MAAM,GAGCD,aAAa,CAACC,MAAM;AAExC;;;;AAIA,OAAO,MAAMC,KAAK,GAAiBF,aAAa,CAACE,KAAK;AAEtD;;;;AAIA,OAAO,MAAMC,mBAAmB,GAGZH,aAAa,CAACG,mBAAmB;AAErD;;;;AAIA,OAAO,MAAMC,QAAQ,GAA6DJ,aAAa,CAACK,GAAG;AAEnG;;;;AAIA,OAAO,MAAMC,MAAM,GAAmEN,aAAa,CAACM,MAAM;AAE1G;;;;AAIA,OAAO,MAAMC,UAAU,GAA6DP,aAAa,CAACQ,GAAG","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/RequestResolver.js b/backend/node_modules/effect/dist/esm/RequestResolver.js new file mode 100644 index 0000000000000000000000000000000000000000..9f6c6c4974ed3f4f20b34e9a73eb67b6f1ec3770 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/RequestResolver.js @@ -0,0 +1,175 @@ +/** + * @since 2.0.0 + */ +import * as Context from "./Context.js"; +import * as Effect from "./Effect.js"; +import * as core from "./internal/core.js"; +import * as internal from "./internal/dataSource.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const RequestResolverTypeId = core.RequestResolverTypeId; +/** + * @since 2.0.0 + * @category utils + */ +export const contextFromEffect = self => Effect.contextWith(_ => provideContext(self, _)); +/** + * @since 2.0.0 + * @category utils + */ +export const contextFromServices = (...services) => self => Effect.contextWith(_ => provideContext(self, Context.pick(...services)(_))); +/** + * Returns `true` if the specified value is a `RequestResolver`, `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isRequestResolver = core.isRequestResolver; +/** + * Constructs a data source with the specified identifier and method to run + * requests. + * + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * Constructs a data source with the specified identifier and method to run + * requests. + * + * @since 2.0.0 + * @category constructors + */ +export const makeWithEntry = internal.makeWithEntry; +/** + * Constructs a data source from a function taking a collection of requests. + * + * @since 2.0.0 + * @category constructors + */ +export const makeBatched = internal.makeBatched; +/** + * A data source aspect that executes requests between two effects, `before` + * and `after`, where the result of `before` can be used by `after`. + * + * @since 2.0.0 + * @category combinators + */ +export const around = internal.around; +/** + * A data source aspect that executes requests between two effects, `before` + * and `after`, where the result of `before` can be used by `after`. + * + * The `before` and `after` effects are provided with the requests being executed. + * + * @since 2.0.0 + * @category combinators + * @example + * ```ts + * import { Effect, Request, RequestResolver } from "effect" + * + * interface GetUserById extends Request.Request { + * readonly id: number + * } + * + * const resolver = RequestResolver.fromFunction( + * (request: GetUserById) => ({ id: request.id, name: "John" }) + * ) + * + * RequestResolver.aroundRequests( + * resolver, + * (requests) => Effect.log(`got ${requests.length} requests`), + * (requests, _) => Effect.log(`finised running ${requests.length} requests`) + * ) + * ``` + */ +export const aroundRequests = internal.aroundRequests; +/** + * Returns a data source that executes at most `n` requests in parallel. + * + * @since 2.0.0 + * @category combinators + */ +export const batchN = internal.batchN; +/** + * Provides this data source with part of its required context. + * + * @since 2.0.0 + * @category context + */ +export const mapInputContext = internal.mapInputContext; +/** + * Returns a new data source that executes requests of type `C` using the + * specified function to transform `C` requests into requests that either this + * data source or that data source can execute. + * + * @since 2.0.0 + * @category combinators + */ +export const eitherWith = internal.eitherWith; +/** + * Constructs a data source from a pure function. + * + * @since 2.0.0 + * @category constructors + */ +export const fromFunction = internal.fromFunction; +/** + * Constructs a data source from a pure function that takes a list of requests + * and returns a list of results of the same size. Each item in the result + * list must correspond to the item at the same index in the request list. + * + * @since 2.0.0 + * @category constructors + */ +export const fromFunctionBatched = internal.fromFunctionBatched; +/** + * Constructs a data source from an effectual function. + * + * @since 2.0.0 + * @category constructors + */ +export const fromEffect = internal.fromEffect; +/** + * Constructs a data source from a list of tags paired to functions, that takes + * a list of requests and returns a list of results of the same size. Each item + * in the result list must correspond to the item at the same index in the + * request list. + * + * @since 2.0.0 + * @category constructors + */ +export const fromEffectTagged = internal.fromEffectTagged; +/** + * A data source that never executes requests. + * + * @since 2.0.0 + * @category constructors + */ +export const never = internal.never; +/** + * Provides this data source with its required context. + * + * @since 2.0.0 + * @category context + */ +export const provideContext = internal.provideContext; +/** + * Returns a new data source that executes requests by sending them to this + * data source and that data source, returning the results from the first data + * source to complete and safely interrupting the loser. + * + * @since 2.0.0 + * @category combinators + */ +export const race = internal.race; +/** + * Returns a new data source with a localized FiberRef + * + * @since 2.0.0 + * @category combinators + */ +export const locally = core.resolverLocally; +//# sourceMappingURL=RequestResolver.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/RequestResolver.js.map b/backend/node_modules/effect/dist/esm/RequestResolver.js.map new file mode 100644 index 0000000000000000000000000000000000000000..ff9054d0e6bca7b4766be2fe3c3cc6dc0c41e02b --- /dev/null +++ b/backend/node_modules/effect/dist/esm/RequestResolver.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RequestResolver.js","names":["Context","Effect","core","internal","RequestResolverTypeId","contextFromEffect","self","contextWith","_","provideContext","contextFromServices","services","pick","isRequestResolver","make","makeWithEntry","makeBatched","around","aroundRequests","batchN","mapInputContext","eitherWith","fromFunction","fromFunctionBatched","fromEffect","fromEffectTagged","never","race","locally","resolverLocally"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;;AAQA,OAAO,MAAMC,UAAU,GAgCnBlB,QAAQ,CAACkB,UAAU;AAEvB;;;;;;AAMA,OAAO,MAAMC,YAAY,GAECnB,QAAQ,CAACmB,YAAY;AAE/C;;;;;;;;AAQA,OAAO,MAAMC,mBAAmB,GAENpB,QAAQ,CAACoB,mBAAmB;AAEtD;;;;;;AAMA,OAAO,MAAMC,UAAU,GAEMrB,QAAQ,CAACqB,UAAU;AAEhD;;;;;;;;;AASA,OAAO,MAAMC,gBAAgB,GAW3BtB,QAAQ,CAACsB,gBAAgB;AAE3B;;;;;;AAMA,OAAO,MAAMC,KAAK,GAA2BvB,QAAQ,CAACuB,KAAK;AAE3D;;;;;;AAMA,OAAO,MAAMjB,cAAc,GAevBN,QAAQ,CAACM,cAAc;AAE3B;;;;;;;;AAQA,OAAO,MAAMkB,IAAI,GAmBbxB,QAAQ,CAACwB,IAAI;AAEjB;;;;;;AAMA,OAAO,MAAMC,OAAO,GAehB1B,IAAI,CAAC2B,eAAe","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Resource.js b/backend/node_modules/effect/dist/esm/Resource.js new file mode 100644 index 0000000000000000000000000000000000000000..78c4fc462d5f22d2004e944226538634bd0fa45f --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Resource.js @@ -0,0 +1,44 @@ +import * as internal from "./internal/resource.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const ResourceTypeId = internal.ResourceTypeId; +/** + * Creates a new `Resource` value that is automatically refreshed according to + * the specified policy. Note that error retrying is not performed + * automatically, so if you want to retry on errors, you should first apply + * retry policies to the acquisition effect before passing it to this + * constructor. + * + * @since 2.0.0 + * @category constructors + */ +export const auto = internal.auto; +/** + * Retrieves the current value stored in the cache. + * + * @since 2.0.0 + * @category getters + */ +export const get = internal.get; +/** + * Creates a new `Resource` value that must be manually refreshed by calling + * the refresh method. Note that error retrying is not performed + * automatically, so if you want to retry on errors, you should first apply + * retry policies to the acquisition effect before passing it to this + * constructor. + * + * @since 2.0.0 + * @category constructors + */ +export const manual = internal.manual; +/** + * Refreshes the cache. This method will not return until either the refresh + * is successful, or the refresh operation fails. + * + * @since 2.0.0 + * @category utils + */ +export const refresh = internal.refresh; +//# sourceMappingURL=Resource.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Resource.js.map b/backend/node_modules/effect/dist/esm/Resource.js.map new file mode 100644 index 0000000000000000000000000000000000000000..1316330dc18160454926eed53e34fa909cfa2fe2 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Resource.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Resource.js","names":["internal","ResourceTypeId","auto","get","manual","refresh"],"sources":["../../src/Resource.ts"],"sourcesContent":[null],"mappings":"AAKA,OAAO,KAAKA,QAAQ,MAAM,wBAAwB;AAOlD;;;;AAIA,OAAO,MAAMC,cAAc,GAAkBD,QAAQ,CAACC,cAAc;AA0DpE;;;;;;;;;;AAUA,OAAO,MAAMC,IAAI,GAGiDF,QAAQ,CAACE,IAAI;AAE/E;;;;;;AAMA,OAAO,MAAMC,GAAG,GAAwDH,QAAQ,CAACG,GAAG;AAEpF;;;;;;;;;;AAUA,OAAO,MAAMC,MAAM,GAE0CJ,QAAQ,CAACI,MAAM;AAE5E;;;;;;;AAOA,OAAO,MAAMC,OAAO,GAA2DL,QAAQ,CAACK,OAAO","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Runtime.js b/backend/node_modules/effect/dist/esm/Runtime.js new file mode 100644 index 0000000000000000000000000000000000000000..bcce6d6b887606cc0068d4fa523fc21301c78749 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Runtime.js @@ -0,0 +1,181 @@ +import * as internal from "./internal/runtime.js"; +/** + * Executes the effect using the provided Scheduler or using the global + * Scheduler if not provided + * + * @since 2.0.0 + * @category execution + */ +export const runFork = internal.unsafeFork; +/** + * Executes the effect synchronously returning the exit. + * + * This method is effectful and should only be invoked at the edges of your + * program. + * + * @since 2.0.0 + * @category execution + */ +export const runSyncExit = internal.unsafeRunSyncExit; +/** + * Executes the effect synchronously throwing in case of errors or async boundaries. + * + * This method is effectful and should only be invoked at the edges of your + * program. + * + * @since 2.0.0 + * @category execution + */ +export const runSync = internal.unsafeRunSync; +/** + * Executes the effect asynchronously, eventually passing the exit value to + * the specified callback. + * + * This method is effectful and should only be invoked at the edges of your + * program. + * + * @since 2.0.0 + * @category execution + */ +export const runCallback = internal.unsafeRunCallback; +/** + * Runs the `Effect`, returning a JavaScript `Promise` that will be resolved + * with the value of the effect once the effect has been executed, or will be + * rejected with the first error or exception throw by the effect. + * + * This method is effectful and should only be used at the edges of your + * program. + * + * @since 2.0.0 + * @category execution + */ +export const runPromise = internal.unsafeRunPromise; +/** + * Runs the `Effect`, returning a JavaScript `Promise` that will be resolved + * with the `Exit` state of the effect once the effect has been executed. + * + * This method is effectful and should only be used at the edges of your + * program. + * + * @since 2.0.0 + * @category execution + */ +export const runPromiseExit = internal.unsafeRunPromiseExit; +/** + * @since 2.0.0 + * @category constructors + */ +export const defaultRuntime = internal.defaultRuntime; +/** + * @since 2.0.0 + * @category constructors + */ +export const defaultRuntimeFlags = internal.defaultRuntimeFlags; +/** + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * @since 2.0.0 + * @category symbols + */ +export const FiberFailureId = /*#__PURE__*/Symbol.for("effect/Runtime/FiberFailure"); +/** + * @since 2.0.0 + * @category symbols + */ +export const FiberFailureCauseId = internal.FiberFailureCauseId; +/** + * @since 2.0.0 + * @category guards + */ +export const isAsyncFiberException = internal.isAsyncFiberException; +/** + * @since 2.0.0 + * @category guards + */ +export const isFiberFailure = internal.isFiberFailure; +/** + * @since 2.0.0 + * @category constructors + */ +export const makeFiberFailure = internal.fiberFailure; +/** + * @since 2.0.0 + * @category runtime flags + */ +export const updateRuntimeFlags = internal.updateRuntimeFlags; +/** + * @since 2.0.0 + * @category runtime flags + */ +export const enableRuntimeFlag = internal.enableRuntimeFlag; +/** + * @since 2.0.0 + * @category runtime flags + */ +export const disableRuntimeFlag = internal.disableRuntimeFlag; +/** + * @since 2.0.0 + * @category context + */ +export const updateContext = internal.updateContext; +/** + * @since 2.0.0 + * @category context + * @example + * ```ts + * import { Context, Runtime } from "effect" + * + * class Name extends Context.Tag("Name")() {} + * + * const runtime: Runtime.Runtime = Runtime.defaultRuntime.pipe( + * Runtime.provideService(Name, "John") + * ) + * ``` + */ +export const provideService = internal.provideService; +/** + * @since 2.0.0 + * @category fiber refs + */ +export const updateFiberRefs = internal.updateFiberRefs; +/** + * @since 2.0.0 + * @category fiber refs + * @example + * ```ts + * import { Effect, FiberRef, Runtime } from "effect" + * + * const ref = FiberRef.unsafeMake(0) + * + * const updatedRuntime = Runtime.defaultRuntime.pipe( + * Runtime.setFiberRef(ref, 1) + * ) + * + * // returns 1 + * const result = Runtime.runSync(updatedRuntime)(FiberRef.get(ref)) + * ``` + */ +export const setFiberRef = internal.setFiberRef; +/** + * @since 2.0.0 + * @category fiber refs + * @example + * ```ts + * import { Effect, FiberRef, Runtime } from "effect" + * + * const ref = FiberRef.unsafeMake(0) + * + * const updatedRuntime = Runtime.defaultRuntime.pipe( + * Runtime.setFiberRef(ref, 1), + * Runtime.deleteFiberRef(ref) + * ) + * + * // returns 0 + * const result = Runtime.runSync(updatedRuntime)(FiberRef.get(ref)) + * ``` + */ +export const deleteFiberRef = internal.deleteFiberRef; +//# sourceMappingURL=Runtime.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/RuntimeFlags.js b/backend/node_modules/effect/dist/esm/RuntimeFlags.js new file mode 100644 index 0000000000000000000000000000000000000000..1ca1e9a017d3bf1d8fed59466cf808bb241d32cc --- /dev/null +++ b/backend/node_modules/effect/dist/esm/RuntimeFlags.js @@ -0,0 +1,251 @@ +/** + * @since 2.0.0 + */ +import * as circular from "./internal/layer/circular.js"; +import * as internal from "./internal/runtimeFlags.js"; +/** + * No runtime flags. + * + * @since 2.0.0 + * @category constructors + */ +export const None = internal.None; +/** + * The interruption flag determines whether or not the Effect runtime system will + * interrupt a fiber. + * + * @since 2.0.0 + * @category constructors + */ +export const Interruption = internal.Interruption; +/** + * The op supervision flag determines whether or not the Effect runtime system + * will supervise all operations of the Effect runtime. Use of this flag will + * negatively impact performance, but is required for some operations, such as + * profiling. + * + * @since 2.0.0 + * @category constructors + */ +export const OpSupervision = internal.OpSupervision; +/** + * The runtime metrics flag determines whether or not the Effect runtime system + * will collect metrics about the Effect runtime. Use of this flag will have a + * very small negative impact on performance, but generates very helpful + * operational insight into running Effect applications that can be exported to + * Prometheus or other tools via Effect Metrics. + * + * @since 2.0.0 + * @category constructors + */ +export const RuntimeMetrics = internal.RuntimeMetrics; +/** + * The wind down flag determines whether the Effect runtime system will execute + * effects in wind-down mode. In wind-down mode, even if interruption is + * enabled and a fiber has been interrupted, the fiber will continue its + * execution uninterrupted. + * + * @since 2.0.0 + * @category constructors + */ +export const WindDown = internal.WindDown; +/** + * The cooperative yielding flag determines whether the Effect runtime will + * yield to another fiber. + * + * @since 2.0.0 + * @category constructors + */ +export const CooperativeYielding = internal.CooperativeYielding; +/** + * Returns `true` if the `CooperativeYielding` `RuntimeFlag` is enabled, `false` + * otherwise. + * + * @since 2.0.0 + * @category getters + */ +export const cooperativeYielding = internal.cooperativeYielding; +/** + * Creates a `RuntimeFlagsPatch` which describes the difference between `self` + * and `that`. + * + * @since 2.0.0 + * @category diffing + */ +export const diff = internal.diff; +/** + * Constructs a differ that knows how to diff `RuntimeFlags` values. + * + * @since 2.0.0 + * @category utils + */ +export const differ = internal.differ; +/** + * Disables the specified `RuntimeFlag`. + * + * @since 2.0.0 + * @category utils + */ +export const disable = internal.disable; +/** + * Disables all of the `RuntimeFlag`s in the specified set of `RuntimeFlags`. + * + * @since 2.0.0 + * @category utils + */ +export const disableAll = internal.disableAll; +/** + * @since 2.0.0 + * @category context + */ +export const disableCooperativeYielding = circular.disableCooperativeYielding; +/** + * @since 2.0.0 + * @category context + */ +export const disableInterruption = circular.disableInterruption; +/** + * @since 2.0.0 + * @category context + */ +export const disableOpSupervision = circular.disableOpSupervision; +/** + * @since 2.0.0 + * @category context + */ +export const disableRuntimeMetrics = circular.disableRuntimeMetrics; +/** + * @since 2.0.0 + * @category context + */ +export const disableWindDown = circular.disableWindDown; +/** + * Enables the specified `RuntimeFlag`. + * + * @since 2.0.0 + * @category utils + */ +export const enable = internal.enable; +/** + * Enables all of the `RuntimeFlag`s in the specified set of `RuntimeFlags`. + * + * @since 2.0.0 + * @category utils + */ +export const enableAll = internal.enableAll; +/** + * @since 2.0.0 + * @category context + */ +export const enableCooperativeYielding = circular.enableCooperativeYielding; +/** + * @since 2.0.0 + * @category context + */ +export const enableInterruption = circular.enableInterruption; +/** + * @since 2.0.0 + * @category context + */ +export const enableOpSupervision = circular.enableOpSupervision; +/** + * @since 2.0.0 + * @category context + */ +export const enableRuntimeMetrics = circular.enableRuntimeMetrics; +/** + * @since 2.0.0 + * @category context + */ +export const enableWindDown = circular.enableWindDown; +/** + * Returns true only if the `Interruption` flag is **enabled** and the + * `WindDown` flag is **disabled**. + * + * A fiber is said to be interruptible if interruption is enabled and the fiber + * is not in its wind-down phase, in which it takes care of cleanup activities + * related to fiber shutdown. + * + * @since 2.0.0 + * @category getters + */ +export const interruptible = internal.interruptible; +/** + * Returns `true` if the `Interruption` `RuntimeFlag` is enabled, `false` + * otherwise. + * + * @since 2.0.0 + * @category getters + */ +export const interruption = internal.interruption; +/** + * Returns `true` if the specified `RuntimeFlag` is enabled, `false` otherwise. + * + * @since 2.0.0 + * @category elements + */ +export const isEnabled = internal.isEnabled; +/** + * Returns `true` if the specified `RuntimeFlag` is disabled, `false` otherwise. + * + * @since 2.0.0 + * @category elements + */ +export const isDisabled = internal.isDisabled; +/** + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * @since 2.0.0 + * @category constructors + */ +export const none = internal.none; +/** + * Returns `true` if the `OpSupervision` `RuntimeFlag` is enabled, `false` + * otherwise. + * + * @since 2.0.0 + * @category getters + */ +export const opSupervision = internal.opSupervision; +/** + * Patches a set of `RuntimeFlag`s with a `RuntimeFlagsPatch`, returning the + * patched set of `RuntimeFlag`s. + * + * @since 2.0.0 + * @category utils + */ +export const patch = internal.patch; +/** + * Converts the provided `RuntimeFlags` into a `string`. + * + * @category conversions + * @since 2.0.0 + */ +export const render = internal.render; +/** + * Returns `true` if the `RuntimeMetrics` `RuntimeFlag` is enabled, `false` + * otherwise. + * + * @since 2.0.0 + * @category getters + */ +export const runtimeMetrics = internal.runtimeMetrics; +/** + * Converts the provided `RuntimeFlags` into a `ReadonlySet`. + * + * @category conversions + * @since 2.0.0 + */ +export const toSet = internal.toSet; +/** + * Returns `true` if the `WindDown` `RuntimeFlag` is enabled, `false` + * otherwise. + * + * @since 2.0.0 + * @category getters + */ +export const windDown = internal.windDown; +//# sourceMappingURL=RuntimeFlags.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/RuntimeFlags.js.map b/backend/node_modules/effect/dist/esm/RuntimeFlags.js.map new file mode 100644 index 0000000000000000000000000000000000000000..85b5ff626598339a9b046aef7176ca0f013f173d --- /dev/null +++ b/backend/node_modules/effect/dist/esm/RuntimeFlags.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RuntimeFlags.js","names":["circular","internal","None","Interruption","OpSupervision","RuntimeMetrics","WindDown","CooperativeYielding","cooperativeYielding","diff","differ","disable","disableAll","disableCooperativeYielding","disableInterruption","disableOpSupervision","disableRuntimeMetrics","disableWindDown","enable","enableAll","enableCooperativeYielding","enableInterruption","enableOpSupervision","enableRuntimeMetrics","enableWindDown","interruptible","interruption","isEnabled","isDisabled","make","none","opSupervision","patch","render","runtimeMetrics","toSet","windDown"],"sources":["../../src/RuntimeFlags.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAKA,OAAO,KAAKA,QAAQ,MAAM,8BAA8B;AACxD,OAAO,KAAKC,QAAQ,MAAM,4BAA4B;AA2BtD;;;;;;AAMA,OAAO,MAAMC,IAAI,GAAgBD,QAAQ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ode 100644 index 0000000000000000000000000000000000000000..007965008922dac657978fb33311c5d0cfc5dbc1 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/RuntimeFlagsPatch.js @@ -0,0 +1,134 @@ +/** + * @since 2.0.0 + */ +import * as runtimeFlags from "./internal/runtimeFlags.js"; +import * as internal from "./internal/runtimeFlagsPatch.js"; +/** + * The empty `RuntimeFlagsPatch`. + * + * @since 2.0.0 + * @category constructors + */ +export const empty = internal.empty; +/** + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * Creates a `RuntimeFlagsPatch` describing enabling the provided `RuntimeFlag`. + * + * @since 2.0.0 + * @category constructors + */ +export const enable = internal.enable; +/** + * Creates a `RuntimeFlagsPatch` describing disabling the provided `RuntimeFlag`. + * + * @since 2.0.0 + * @category constructors + */ +export const disable = internal.disable; +/** + * Returns `true` if the specified `RuntimeFlagsPatch` is empty. + * + * @since 2.0.0 + * @category getters + */ +export const isEmpty = internal.isEmpty; +/** + * Returns `true` if the `RuntimeFlagsPatch` describes the specified + * `RuntimeFlag` as active. + * + * @since 2.0.0 + * @category elements + */ +export const isActive = internal.isActive; +/** + * Returns `true` if the `RuntimeFlagsPatch` describes the specified + * `RuntimeFlag` as enabled. + * + * @since 2.0.0 + * @category elements + */ +export const isEnabled = internal.isEnabled; +/** + * Returns `true` if the `RuntimeFlagsPatch` describes the specified + * `RuntimeFlag` as disabled. + * + * @since 2.0.0 + * @category elements + */ +export const isDisabled = internal.isDisabled; +/** + * Returns `true` if the `RuntimeFlagsPatch` includes the specified + * `RuntimeFlag`, `false` otherwise. + * + * @since 2.0.0 + * @category elements + */ +export const includes = internal.isActive; +/** + * Creates a `RuntimeFlagsPatch` describing the application of the `self` patch, + * followed by `that` patch. + * + * @since 2.0.0 + * @category utils + */ +export const andThen = internal.andThen; +/** + * Creates a `RuntimeFlagsPatch` describing application of both the `self` patch + * and `that` patch. + * + * @since 2.0.0 + * @category utils + */ +export const both = internal.both; +/** + * Creates a `RuntimeFlagsPatch` describing application of either the `self` + * patch or `that` patch. + * + * @since 2.0.0 + * @category utils + */ +export const either = internal.either; +/** + * Creates a `RuntimeFlagsPatch` which describes exclusion of the specified + * `RuntimeFlag` from the set of `RuntimeFlags`. + * + * @category utils + * @since 2.0.0 + */ +export const exclude = internal.exclude; +/** + * Creates a `RuntimeFlagsPatch` which describes the inverse of the patch + * specified by the provided `RuntimeFlagsPatch`. + * + * @since 2.0.0 + * @category utils + */ +export const inverse = internal.inverse; +/** + * Returns a `ReadonlySet` containing the `RuntimeFlags` described as + * enabled by the specified `RuntimeFlagsPatch`. + * + * @since 2.0.0 + * @category destructors + */ +export const enabledSet = runtimeFlags.enabledSet; +/** + * Returns a `ReadonlySet` containing the `RuntimeFlags` described as + * disabled by the specified `RuntimeFlagsPatch`. + * + * @since 2.0.0 + * @category destructors + */ +export const disabledSet = runtimeFlags.disabledSet; +/** + * Renders the provided `RuntimeFlagsPatch` to a string. + * + * @since 2.0.0 + * @category destructors + */ +export const render = runtimeFlags.renderPatch; +//# sourceMappingURL=RuntimeFlagsPatch.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/RuntimeFlagsPatch.js.map b/backend/node_modules/effect/dist/esm/RuntimeFlagsPatch.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f46232ab1957271af194b9a4bb6cf4f19a82cbad --- /dev/null +++ b/backend/node_modules/effect/dist/esm/RuntimeFlagsPatch.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RuntimeFlagsPatch.js","names":["runtimeFlags","internal","empty","make","enable","disable","isEmpty","isActive","isEnabled","isDisabled","includes","andThen","both","either","exclude","inverse","enabledSet","disabledSet","render","renderPatch"],"sources":["../../src/RuntimeFlagsPatch.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,YAAY,MAAM,4BAA4B;AAC1D,OAAO,KAAKC,QAAQ,MAAM,iCAAiC;AAW3D;;;;;;AAMA,OAAO,MAAMC,KAAK,GAAsBD,QAAQ,CAACC,KAAK;AAEtD;;;;AAIA,OAAO,MAAMC,IAAI,GAA2DF,QAAQ,CAACE,IAAI;AAEzF;;;;;;AAMA,OAAO,MAAMC,MAAM,GAA0DH,QAAQ,CAACG,MAAM;AAE5F;;;;;;AAMA,OAAO,MAAMC,OAAO,GAA0DJ,QAAQ,CAACI,OAAO;AAE9F;;;;;;AAMA,OAAO,MAAMC,OAAO,GAA0CL,QAAQ,CAACK,OAAO;AAE9E;;;;;;;AAOA,OAAO,MAAMC,QAAQ,GAiBjBN,QAAQ,CAACM,QAAQ;AAErB;;;;;;;AAOA,OAAO,MAAMC,SAAS,GAiBlBP,QAAQ,CAACO,SAAS;AAEtB;;;;;;;AAOA,OAAO,MAAMC,UAAU,GAiBnBR,QAAQ,CAACQ,UAAU;AAEvB;;;;;;;AAOA,OAAO,MAAMC,QAAQ,GAiBjBT,QAAQ,CAACM,QAAQ;AAErB;;;;;;;AAOA,OAAO,MAAMI,OAAO,GAiBhBV,QAAQ,CAACU,OAAO;AAEpB;;;;;;;AAOA,OAAO,MAAMC,IAAI,GAiBbX,QAAQ,CAACW,IAAI;AAEjB;;;;;;;AAOA,OAAO,MAAMC,MAAM,GAiBfZ,QAAQ,CAACY,MAAM;AAEnB;;;;;;;AAOA,OAAO,MAAMC,OAAO,GAiBhBb,QAAQ,CAACa,OAAO;AAEpB;;;;;;;AAOA,OAAO,MAAMC,OAAO,GAAoDd,QAAQ,CAACc,OAAO;AAExF;;;;;;;AAOA,OAAO,MAAMC,UAAU,GAAuEhB,YAAY,CAACgB,UAAU;AAErH;;;;;;;AAOA,OAAO,MAAMC,WAAW,GAAuEjB,YAAY,CAACiB,WAAW;AAEvH;;;;;;AAMA,OAAO,MAAMC,MAAM,GAAwClB,YAAY,CAACmB,WAAW","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/STM.js.map b/backend/node_modules/effect/dist/esm/STM.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d833165b76d01a18017a1c8bbd0735a8890acf53 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/STM.js.map @@ -0,0 +1 @@ +{"version":3,"file":"STM.js","names":["Cause","Chunk","core","stm","STMTypeId","isSTM","acquireUseRelease","all","as","asSome","asSomeError","asVoid","attempt","catchAll","catchSome","catchTag","catchTags","check","collect","collectSTM","commit","commitEither","cond","context","contextWith","contextWithSTM","mapInputContext","die","dieMessage","dieSync","either","ensuring","eventually","every","exists","fail","failSync","fiberId","filter","filterNot","filterOrDie","filterOrDieMessage","filterOrElse","filterOrFail","flatMap","flatten","flip","flipWith","match","matchSTM","forEach","fromEither","fromOption","gen","head","if_","if","ignore","interrupt","interruptAs","isFailure","isSuccess","iterate","loop","map","mapAttempt","mapBoth","mapError","merge","mergeAll","negate","none","option","orDie","orDieWith","orElse","orElseEither","orElseFail","orElseOptional","orElseSucceed","orTry","partition","provideContext","provideSomeContext","provideService","provideServiceSTM","reduce","reduceAll","reduceRight","refineOrDie","refineOrDieWith","reject","rejectSTM","repeatUntil","repeatWhile","replicate","replicateSTM","replicateSTMDiscard","retry","retryUntil","retryWhile","some","succeed","succeedNone","succeedSome","summarized","suspend","sync","tap","tapBoth","tapError","try_","try","unless","unlessSTM","unsome","void_","void","validateAll","validateFirst","when","whenSTM","zip","zipLeft","zipRight","zipWith","firstSuccessOf","effects","list","fromIterable","isNonEmpty","IllegalArgumentException","tailNonEmpty","headNonEmpty","left","right","Do","bind","let_","let","bindTo"],"sources":["../../src/STM.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,KAAK,MAAM,YAAY;AAOnC,OAAO,KAAKC,IAAI,MAAM,wBAAwB;AAC9C,OAAO,KAAKC,GAAG,MAAM,uBAAuB;AAQ5C;;;;AAIA,OAAO,MAAMC,SAAS,GAAkBF,IAAI,CAACE,SAAS;AAmItD;;;;;;AAMA,OAAO,MAAMC,KAAK,GAAwDH,IAAI,CAACG,KAAK;AAEpF;;;;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,EAAE,MAAMC,KAAK,CAAC,CAC3C;AACH,CAAC,CAAC;AAEJ;;;;AAIA,OAAO,MAAMC,EAAE,gBAAYlC,OAAO,CAAC,EAAE,CAAC;AAEtC;;;;AAIA,OAAO,MAAMmC,IAAI,GAebtI,GAAG,CAACsI,IAAI;AAEZ,MAAMC,IAAI,GAUNvI,GAAG,CAACuI,IAAI;AAEZ;AACE;;;;AAIAA,IAAI,IAAIC,GAAG;AAGb;;;;AAIA,OAAO,MAAMC,MAAM,GAWfzI,GAAG,CAACyI,MAAM","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Schedule.js.map b/backend/node_modules/effect/dist/esm/Schedule.js.map new file mode 100644 index 0000000000000000000000000000000000000000..bfe7360461171dedc1d187d5d37a8809ccba2530 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Schedule.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Schedule.js","names":["internal","ScheduleTypeId","ScheduleDriverTypeId","makeWithState","isSchedule","addDelay","addDelayEffect","andThen","andThenEither","as","asVoid","bothInOut","check","checkEffect","collectAllInputs","collectAllOutputs","collectUntil","collectUntilEffect","collectWhile","collectWhileEffect","compose","mapInput","mapInputEffect","mapInputContext","count","cron","secondOfMinute","minuteOfHour","hourOfDay","dayOfMonth","dayOfWeek","delayed","delayedEffect","delayedSchedule","delays","mapBoth","mapBothEffect","driver","duration","either","eitherWith","elapsed","ensuring","exponential","fibonacci","fixed","forever","fromDelay","fromDelays","fromFunction","identity","passthrough","intersect","intersectWith","jittered","jitteredWith","linear","map","mapEffect","modifyDelay","modifyDelayEffect","onDecision","once","provideContext","provideService","recurUntil","recurUntilEffect","recurUntilOption","recurUpTo","recurWhile","recurWhileEffect","recurs","reduce","reduceEffect","repeatForever","repetitions","resetAfter","resetWhen","run","spaced","stop","succeed","sync","tapInput","tapOutput","unfold","union","unionWith","untilInput","untilInputEffect","untilOutput","untilOutputEffect","upTo","whileInput","whileInputEffect","whileOutput","whileOutputEffect","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W,GAuCpB1F,QAAQ,CAAC0F,WAAW;AAExB;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,iBAAiB,GAoC1B3F,QAAQ,CAAC2F,iBAAiB;AAE9B;;;;;;;;;;;;AAYA,OAAO,MAAMC,IAAI,GA2Bb5F,QAAQ,CAAC4F,IAAI;AAEjB;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,UAAU,GAiCnB7F,QAAQ,CAAC6F,UAAU;AAEvB;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,gBAAgB,GAoCzB9F,QAAQ,CAAC8F,gBAAgB;AAE7B;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,WAAW,GAiCpB/F,QAAQ,CAAC+F,WAAW;AAExB;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,iBAAiB,GAoC1BhG,QAAQ,CAACgG,iBAAiB;AAE9B;;;;;;;;;;;;;;;;;;;;;;;AAuBA,OAAO,MAAMC,QAAQ,GAA2DjG,QAAQ,CAACiG,QAAQ;AAEjG;;;;;;AAMA,OAAO,MAAMC,OAAO,GAehBlG,QAAQ,CAACkG,OAAO;AAEpB;;;;;;AAMA,OAAO,MAAMC,QAAQ,GAejBnG,QAAQ,CAACmG,QAAQ;AAErB;;;;;;AAMA,OAAO,MAAMC,OAAO,GAmBhBpG,QAAQ,CAACoG,OAAO;AAwBpB;;;;AAIA,OAAO,MAAMC,wBAAwB,GAGjCrG,QAAQ,CAACqG,wBAAwB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/ScheduleDecision.js b/backend/node_modules/effect/dist/esm/ScheduleDecision.js new file mode 100644 index 0000000000000000000000000000000000000000..9dc2d80e0ce480a740359a5340ad1f0b2fad4cea --- /dev/null +++ b/backend/node_modules/effect/dist/esm/ScheduleDecision.js @@ -0,0 +1,32 @@ +/** + * @since 2.0.0 + */ +import * as internal from "./internal/schedule/decision.js"; +const _continue = internal._continue; +export { +/** + * @since 2.0.0 + * @category constructors + */ +_continue as continue }; +/** + * @since 2.0.0 + * @category constructors + */ +export const continueWith = internal.continueWith; +/** + * @since 2.0.0 + * @category constructors + */ +export const done = internal.done; +/** + * @since 2.0.0 + * @category refinements + */ +export const isContinue = internal.isContinue; +/** + * @since 2.0.0 + * @category refinements + */ +export const isDone = internal.isDone; +//# sourceMappingURL=ScheduleDecision.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/ScheduleDecision.js.map b/backend/node_modules/effect/dist/esm/ScheduleDecision.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a4c665d6ee73e6256289c0a3f998c62e0e719604 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/ScheduleDecision.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ScheduleDecision.js","names":["internal","_continue","continue","continueWith","done","isContinue","isDone"],"sources":["../../src/ScheduleDecision.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,QAAQ,MAAM,iCAAiC;AA2B3D,MAAMC,SAAS,GAAGD,QAAQ,CAACC,SAAS;AACpC;AACE;;;;AAIAA,SAAS,IAAIC,QAAQ;AAGvB;;;;AAIA,OAAO,MAAMC,YAAY,GAAsDH,QAAQ,CAACG,YAAY;AAEpG;;;;AAIA,OAAO,MAAMC,IAAI,GAAqBJ,QAAQ,CAACI,IAAI;AAEnD;;;;AAIA,OAAO,MAAMC,UAAU,GAAiDL,QAAQ,CAACK,UAAU;AAE3F;;;;AAIA,OAAO,MAAMC,MAAM,GAA6CN,QAAQ,CAACM,MAAM","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/ScheduleInterval.js b/backend/node_modules/effect/dist/esm/ScheduleInterval.js new file mode 100644 index 0000000000000000000000000000000000000000..3f0af009bd1cb84bb95b8cc873143d0f4843783b --- /dev/null +++ b/backend/node_modules/effect/dist/esm/ScheduleInterval.js @@ -0,0 +1,100 @@ +import * as internal from "./internal/schedule/interval.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const IntervalTypeId = internal.IntervalTypeId; +/** + * Constructs a new interval from the two specified endpoints. If the start + * endpoint greater than the end endpoint, then a zero size interval will be + * returned. + * + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * An `Interval` of zero-width. + * + * @since 2.0.0 + * @category constructors + */ +export const empty = internal.empty; +/** + * Returns `true` if this `Interval` is less than `that` interval, `false` + * otherwise. + * + * @since 2.0.0 + * @category ordering + */ +export const lessThan = internal.lessThan; +/** + * Returns the minimum of two `Interval`s. + * + * @since 2.0.0 + * @category ordering + */ +export const min = internal.min; +/** + * Returns the maximum of two `Interval`s. + * + * @since 2.0.0 + * @category ordering + */ +export const max = internal.max; +/** + * Returns `true` if the specified `Interval` is empty, `false` otherwise. + * + * @since 2.0.0 + * @category ordering + */ +export const isEmpty = internal.isEmpty; +/** + * Returns `true` if the specified `Interval` is non-empty, `false` otherwise. + * + * @since 2.0.0 + * @category ordering + */ +export const isNonEmpty = internal.isNonEmpty; +/** + * Computes a new `Interval` which is the intersection of this `Interval` and + * that `Interval`. + * + * @since 2.0.0 + * @category ordering + */ +export const intersect = internal.intersect; +/** + * Calculates the size of the `Interval` as the `Duration` from the start of the + * interval to the end of the interval. + * + * @since 2.0.0 + * @category getters + */ +export const size = internal.size; +/** + * Computes a new `Interval` which is the union of this `Interval` and that + * `Interval` as a `Some`, otherwise returns `None` if the two intervals cannot + * form a union. + * + * @since 2.0.0 + * @category utils + */ +export const union = internal.union; +/** + * Construct an `Interval` that includes all time equal to and after the + * specified start time. + * + * @since 2.0.0 + * @category constructors + */ +export const after = internal.after; +/** + * Construct an `Interval` that includes all time equal to and before the + * specified end time. + * + * @category constructors + * @since 2.0.0 + */ +export const before = internal.before; +//# sourceMappingURL=ScheduleInterval.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/ScheduleInterval.js.map b/backend/node_modules/effect/dist/esm/ScheduleInterval.js.map new file mode 100644 index 0000000000000000000000000000000000000000..9ff102acdce81837e9476d48a1370f0aad47c4af --- /dev/null +++ b/backend/node_modules/effect/dist/esm/ScheduleInterval.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ScheduleInterval.js","names":["internal","IntervalTypeId","make","empty","lessThan","min","max","isEmpty","isNonEmpty","intersect","size","union","after","before"],"sources":["../../src/ScheduleInterval.ts"],"sourcesContent":[null],"mappings":"AAIA,OAAO,KAAKA,QAAQ,MAAM,iCAAiC;AAG3D;;;;AAIA,OAAO,MAAMC,cAAc,GAAkBD,QAAQ,CAACC,cAAc;AAqBpE;;;;;;;;AAQA,OAAO,MAAMC,IAAI,GAAyDF,QAAQ,CAACE,IAAI;AAEvF;;;;;;AAMA,OAAO,MAAMC,KAAK,GAAaH,QAAQ,CAACG,KAAK;AAE7C;;;;;;;AAOA,OAAO,MAAMC,QAAQ,GAiBjBJ,QAAQ,CAACI,QAAQ;AAErB;;;;;;AAMA,OAAO,MAAMC,GAAG,GAeZL,QAAQ,CAACK,GAAG;AAEhB;;;;;;AAMA,OAAO,MAAMC,GAAG,GAeZN,QAAQ,CAACM,GAAG;AAEhB;;;;;;AAMA,OAAO,MAAMC,OAAO,GAAgCP,QAAQ,CAACO,OAAO;AAEpE;;;;;;AAMA,OAAO,MAAMC,UAAU,GAAgCR,QAAQ,CAACQ,UAAU;AAE1E;;;;;;;AAOA,OAAO,MAAMC,SAAS,GAiBlBT,QAAQ,CAACS,SAAS;AAEtB;;;;;;;AAOA,OAAO,MAAMC,IAAI,GAA0CV,QAAQ,CAACU,IAAI;AAExE;;;;;;;;AAQA,OAAO,MAAMC,KAAK,GAmBdX,QAAQ,CAACW,KAAK;AAElB;;;;;;;AAOA,OAAO,MAAMC,KAAK,GAA4CZ,QAAQ,CAACY,KAAK;AAE5E;;;;;;;AAOA,OAAO,MAAMC,MAAM,GAA0Cb,QAAQ,CAACa,MAAM","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/ScheduleIntervals.js.map b/backend/node_modules/effect/dist/esm/ScheduleIntervals.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a2479b83ba3feb3044bc777459dec544193d76cd --- /dev/null +++ b/backend/node_modules/effect/dist/esm/ScheduleIntervals.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ScheduleIntervals.js","names":["internal","IntervalsTypeId","make","empty","fromIterable","union","intersect","start","end","lessThan","isNonEmpty","max"],"sources":["../../src/ScheduleIntervals.ts"],"sourcesContent":[null],"mappings":"AAIA,OAAO,KAAKA,QAAQ,MAAM,kCAAkC;AAG5D;;;;AAIA,OAAO,MAAMC,eAAe,GAAkBD,QAAQ,CAACC,eAAe;AAmBtE;;;;;;AAMA,OAAO,MAAMC,IAAI,GAA6DF,QAAQ,CAACE,IAAI;AAE3F;;;;;;AAMA,OAAO,MAAMC,KAAK,GAAcH,QAAQ,CAACG,KAAK;AAE9C;;;;;;AAMA,OAAO,MAAMC,YAAY,GAA0DJ,QAAQ,CAACI,YAAY;AAExG;;;;;;AAMA,OAAO,MAAMC,KAAK,GAedL,QAAQ,CAACK,KAAK;AAElB;;;;;;AAMA,OAAO,MAAMC,SAAS,GAelBN,QAAQ,CAACM,SAAS;AAEtB;;;;;;AAMA,OAAO,MAAMC,KAAK,GAAgCP,QAAQ,CAACO,KAAK;AAEhE;;;;;;AAMA,OAAO,MAAMC,GAAG,GAAgCR,QAAQ,CAACQ,GAAG;AAE5D;;;;;;;AAOA,OAAO,MAAMC,QAAQ,GAiBjBT,QAAQ,CAACS,QAAQ;AAErB;;;;;;AAMA,OAAO,MAAMC,UAAU,GAAiCV,QAAQ,CAACU,UAAU;AAE3E;;;;;;AAMA,OAAO,MAAMC,GAAG,GAeZX,QAAQ,CAACW,GAAG","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Scheduler.js.map b/backend/node_modules/effect/dist/esm/Scheduler.js.map new file mode 100644 index 0000000000000000000000000000000000000000..ac54ec26c982735480f375c35644c00180b0564e --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Scheduler.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Scheduler.js","names":["dual","globalValue","core","SchedulerRunner","scheduleDrain","running","tasks","PriorityBuckets","constructor","starveInternal","depth","buckets","_","toRun","i","length","starve","scheduleTask","task","priority","cached","fallback","runners","WeakMap","fiber","undefined","runner","get","set","bucket","index","push","splice","MixedScheduler","maxNextTickBeforeTimer","getRunner","drain","setTimeout","Promise","resolve","then","shouldYield","currentOpCount","getFiberRef","currentMaxOpsBeforeYield","currentSchedulingPriority","defaultScheduler","Symbol","for","SyncScheduler","deferred","flush","ControlledScheduler","step","makeMatrix","record","sort","p0","p1","scheduler","defaultShouldYield","make","makeBatched","callback","timer","ms","timerBatched","currentScheduler","fiberRefUnsafeMake","withScheduler","self","fiberRefLocally"],"sources":["../../src/Scheduler.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAOA,SAASA,IAAI,QAAQ,eAAe;AACpC,SAASC,WAAW,QAAQ,kBAAkB;AAC9C,OAAO,KAAKC,IAAI,MAAM,oBAAoB;AAiB1C;;;;AAIA,OAAM,MAAOC,eAAe;EAKfC,aAAA;EAJXC,OAAO,GAAG,KAAK;EACfC,KAAK,gBAAG,IAAIC,eAAe,EAAE;EAE7BC,YACWJ,aAAsE;IAAtE,KAAAA,aAAa,GAAbA,aAAa;EACrB;EAEKK,cAAc,GAAIC,KAAa,IAAI;IACzC,MAAMJ,KAAK,GAAG,IAAI,CAACA,KAAK,CAACK,OAAO;IAChC,IAAI,CAACL,KAAK,CAACK,OAAO,GAAG,EAAE;IACvB,KAAK,MAAM,CAACC,CAAC,EAAEC,KAAK,CAAC,IAAIP,KAAK,EAAE;MAC9B,KAAK,IAAIQ,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGD,KAAK,CAACE,MAAM,EAAED,CAAC,EAAE,EAAE;QACrCD,KAAK,CAACC,CAAC,CAAC,EAAE;MACZ;IACF;IACA,IAAI,IAAI,CAACR,KAAK,CAACK,OAAO,CAACI,MAAM,KAAK,CAAC,EAAE;MACnC,IAAI,CAACV,OAAO,G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CAACsE,IAAI,EAAEX,SAAS,KAAKzD,IAAI,CAACqE,eAAe,CAACD,IAAI,EAAEH,gBAAgB,EAAER,SAAS,CAAC,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/SchemaAST.js b/backend/node_modules/effect/dist/esm/SchemaAST.js new file mode 100644 index 0000000000000000000000000000000000000000..c6c40184b01676615c4d786868095728ae3f4275 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/SchemaAST.js @@ -0,0 +1,2485 @@ +/** + * @since 3.10.0 + */ +import * as Arr from "./Array.js"; +import { dual, identity } from "./Function.js"; +import { globalValue } from "./GlobalValue.js"; +import * as Inspectable from "./Inspectable.js"; +import * as errors_ from "./internal/schema/errors.js"; +import * as util_ from "./internal/schema/util.js"; +import * as Number from "./Number.js"; +import * as Option from "./Option.js"; +import * as Order from "./Order.js"; +import * as Predicate from "./Predicate.js"; +import * as regexp from "./RegExp.js"; +/** + * @category annotations + * @since 3.19.0 + * @experimental + */ +export const TypeConstructorAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/TypeConstructor"); +/** + * @category annotations + * @since 3.10.0 + */ +export const BrandAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/Brand"); +/** + * @category annotations + * @since 3.10.0 + */ +export const SchemaIdAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/SchemaId"); +/** + * @category annotations + * @since 3.10.0 + */ +export const MessageAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/Message"); +/** + * @category annotations + * @since 3.10.0 + */ +export const MissingMessageAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/MissingMessage"); +/** + * @category annotations + * @since 3.10.0 + */ +export const IdentifierAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/Identifier"); +/** + * @category annotations + * @since 3.10.0 + */ +export const TitleAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/Title"); +/** @internal */ +export const AutoTitleAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/AutoTitle"); +/** + * @category annotations + * @since 3.10.0 + */ +export const DescriptionAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/Description"); +/** + * @category annotations + * @since 3.10.0 + */ +export const ExamplesAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/Examples"); +/** + * @category annotations + * @since 3.10.0 + */ +export const DefaultAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/Default"); +/** + * @category annotations + * @since 3.10.0 + */ +export const JSONSchemaAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/JSONSchema"); +/** + * @category annotations + * @since 3.10.0 + */ +export const ArbitraryAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/Arbitrary"); +/** + * @category annotations + * @since 3.10.0 + */ +export const PrettyAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/Pretty"); +/** + * @category annotations + * @since 3.10.0 + */ +export const EquivalenceAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/Equivalence"); +/** + * @category annotations + * @since 3.10.0 + */ +export const DocumentationAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/Documentation"); +/** + * @category annotations + * @since 3.10.0 + */ +export const ConcurrencyAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/Concurrency"); +/** + * @category annotations + * @since 3.10.0 + */ +export const BatchingAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/Batching"); +/** + * @category annotations + * @since 3.10.0 + */ +export const ParseIssueTitleAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/ParseIssueTitle"); +/** + * @category annotations + * @since 3.10.0 + */ +export const ParseOptionsAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/ParseOptions"); +/** + * @category annotations + * @since 3.10.0 + */ +export const DecodingFallbackAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/DecodingFallback"); +/** + * @category annotations + * @since 3.10.0 + */ +export const SurrogateAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/Surrogate"); +/** @internal */ +export const StableFilterAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/StableFilter"); +/** + * @category annotations + * @since 3.10.0 + */ +export const getAnnotation = /*#__PURE__*/dual(2, (annotated, key) => Object.prototype.hasOwnProperty.call(annotated.annotations, key) ? Option.some(annotated.annotations[key]) : Option.none()); +/** + * @category annotations + * @since 3.19.0 + * @experimental + */ +export const getTypeConstructorAnnotation = /*#__PURE__*/getAnnotation(TypeConstructorAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +export const getBrandAnnotation = /*#__PURE__*/getAnnotation(BrandAnnotationId); +/** + * @category annotations + * @since 3.14.2 + */ +export const getSchemaIdAnnotation = /*#__PURE__*/getAnnotation(SchemaIdAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +export const getMessageAnnotation = /*#__PURE__*/getAnnotation(MessageAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +export const getMissingMessageAnnotation = /*#__PURE__*/getAnnotation(MissingMessageAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +export const getTitleAnnotation = /*#__PURE__*/getAnnotation(TitleAnnotationId); +/** @internal */ +export const getAutoTitleAnnotation = /*#__PURE__*/getAnnotation(AutoTitleAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +export const getIdentifierAnnotation = /*#__PURE__*/getAnnotation(IdentifierAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +export const getDescriptionAnnotation = /*#__PURE__*/getAnnotation(DescriptionAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +export const getExamplesAnnotation = /*#__PURE__*/getAnnotation(ExamplesAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +export const getDefaultAnnotation = /*#__PURE__*/getAnnotation(DefaultAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +export const getJSONSchemaAnnotation = /*#__PURE__*/getAnnotation(JSONSchemaAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +export const getDocumentationAnnotation = /*#__PURE__*/getAnnotation(DocumentationAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +export const getConcurrencyAnnotation = /*#__PURE__*/getAnnotation(ConcurrencyAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +export const getBatchingAnnotation = /*#__PURE__*/getAnnotation(BatchingAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +export const getParseIssueTitleAnnotation = /*#__PURE__*/getAnnotation(ParseIssueTitleAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +export const getParseOptionsAnnotation = /*#__PURE__*/getAnnotation(ParseOptionsAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +export const getDecodingFallbackAnnotation = /*#__PURE__*/getAnnotation(DecodingFallbackAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +export const getSurrogateAnnotation = /*#__PURE__*/getAnnotation(SurrogateAnnotationId); +const getStableFilterAnnotation = /*#__PURE__*/getAnnotation(StableFilterAnnotationId); +/** @internal */ +export const hasStableFilter = annotated => Option.exists(getStableFilterAnnotation(annotated), b => b === true); +/** + * @category annotations + * @since 3.10.0 + */ +export const JSONIdentifierAnnotationId = /*#__PURE__*/Symbol.for("effect/annotation/JSONIdentifier"); +/** + * @category annotations + * @since 3.10.0 + */ +export const getJSONIdentifierAnnotation = /*#__PURE__*/getAnnotation(JSONIdentifierAnnotationId); +/** + * @category annotations + * @since 3.10.0 + */ +export const getJSONIdentifier = annotated => Option.orElse(getJSONIdentifierAnnotation(annotated), () => getIdentifierAnnotation(annotated)); +// ------------------------------------------------------------------------------------- +// schema ids +// ------------------------------------------------------------------------------------- +/** + * @category schema id + * @since 3.10.0 + */ +export const ParseJsonSchemaId = /*#__PURE__*/Symbol.for("effect/schema/ParseJson"); +/** + * @category model + * @since 3.10.0 + */ +export class Declaration { + typeParameters; + decodeUnknown; + encodeUnknown; + annotations; + /** + * @since 3.10.0 + */ + _tag = "Declaration"; + constructor(typeParameters, decodeUnknown, encodeUnknown, annotations = {}) { + this.typeParameters = typeParameters; + this.decodeUnknown = decodeUnknown; + this.encodeUnknown = encodeUnknown; + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return Option.getOrElse(getExpected(this), () => ""); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + typeParameters: this.typeParameters.map(ast => ast.toJSON()), + annotations: toJSONAnnotations(this.annotations) + }; + } +} +const createASTGuard = tag => ast => ast._tag === tag; +/** + * @category guards + * @since 3.10.0 + */ +export const isDeclaration = /*#__PURE__*/createASTGuard("Declaration"); +/** + * @category model + * @since 3.10.0 + */ +export class Literal { + literal; + annotations; + /** + * @since 3.10.0 + */ + _tag = "Literal"; + constructor(literal, annotations = {}) { + this.literal = literal; + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return Option.getOrElse(getExpected(this), () => Inspectable.formatUnknown(this.literal)); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + literal: Predicate.isBigInt(this.literal) ? String(this.literal) : this.literal, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category guards + * @since 3.10.0 + */ +export const isLiteral = /*#__PURE__*/createASTGuard("Literal"); +const $null = /*#__PURE__*/new Literal(null); +export { +/** + * @category constructors + * @since 3.10.0 + */ +$null as null }; +/** + * @category model + * @since 3.10.0 + */ +export class UniqueSymbol { + symbol; + annotations; + /** + * @since 3.10.0 + */ + _tag = "UniqueSymbol"; + constructor(symbol, annotations = {}) { + this.symbol = symbol; + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return Option.getOrElse(getExpected(this), () => Inspectable.formatUnknown(this.symbol)); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + symbol: String(this.symbol), + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category guards + * @since 3.10.0 + */ +export const isUniqueSymbol = /*#__PURE__*/createASTGuard("UniqueSymbol"); +/** + * @category model + * @since 3.10.0 + */ +export class UndefinedKeyword { + annotations; + /** + * @since 3.10.0 + */ + _tag = "UndefinedKeyword"; + constructor(annotations = {}) { + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return formatKeyword(this); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category constructors + * @since 3.10.0 + */ +export const undefinedKeyword = /*#__PURE__*/new UndefinedKeyword({ + [TitleAnnotationId]: "undefined" +}); +/** + * @category guards + * @since 3.10.0 + */ +export const isUndefinedKeyword = /*#__PURE__*/createASTGuard("UndefinedKeyword"); +/** + * @category model + * @since 3.10.0 + */ +export class VoidKeyword { + annotations; + /** + * @since 3.10.0 + */ + _tag = "VoidKeyword"; + constructor(annotations = {}) { + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return formatKeyword(this); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category constructors + * @since 3.10.0 + */ +export const voidKeyword = /*#__PURE__*/new VoidKeyword({ + [TitleAnnotationId]: "void" +}); +/** + * @category guards + * @since 3.10.0 + */ +export const isVoidKeyword = /*#__PURE__*/createASTGuard("VoidKeyword"); +/** + * @category model + * @since 3.10.0 + */ +export class NeverKeyword { + annotations; + /** + * @since 3.10.0 + */ + _tag = "NeverKeyword"; + constructor(annotations = {}) { + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return formatKeyword(this); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category constructors + * @since 3.10.0 + */ +export const neverKeyword = /*#__PURE__*/new NeverKeyword({ + [TitleAnnotationId]: "never" +}); +/** + * @category guards + * @since 3.10.0 + */ +export const isNeverKeyword = /*#__PURE__*/createASTGuard("NeverKeyword"); +/** + * @category model + * @since 3.10.0 + */ +export class UnknownKeyword { + annotations; + /** + * @since 3.10.0 + */ + _tag = "UnknownKeyword"; + constructor(annotations = {}) { + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return formatKeyword(this); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category constructors + * @since 3.10.0 + */ +export const unknownKeyword = /*#__PURE__*/new UnknownKeyword({ + [TitleAnnotationId]: "unknown" +}); +/** + * @category guards + * @since 3.10.0 + */ +export const isUnknownKeyword = /*#__PURE__*/createASTGuard("UnknownKeyword"); +/** + * @category model + * @since 3.10.0 + */ +export class AnyKeyword { + annotations; + /** + * @since 3.10.0 + */ + _tag = "AnyKeyword"; + constructor(annotations = {}) { + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return formatKeyword(this); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category constructors + * @since 3.10.0 + */ +export const anyKeyword = /*#__PURE__*/new AnyKeyword({ + [TitleAnnotationId]: "any" +}); +/** + * @category guards + * @since 3.10.0 + */ +export const isAnyKeyword = /*#__PURE__*/createASTGuard("AnyKeyword"); +/** + * @category model + * @since 3.10.0 + */ +export class StringKeyword { + annotations; + /** + * @since 3.10.0 + */ + _tag = "StringKeyword"; + constructor(annotations = {}) { + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return formatKeyword(this); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category constructors + * @since 3.10.0 + */ +export const stringKeyword = /*#__PURE__*/new StringKeyword({ + [TitleAnnotationId]: "string", + [DescriptionAnnotationId]: "a string" +}); +/** + * @category guards + * @since 3.10.0 + */ +export const isStringKeyword = /*#__PURE__*/createASTGuard("StringKeyword"); +/** + * @category model + * @since 3.10.0 + */ +export class NumberKeyword { + annotations; + /** + * @since 3.10.0 + */ + _tag = "NumberKeyword"; + constructor(annotations = {}) { + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return formatKeyword(this); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category constructors + * @since 3.10.0 + */ +export const numberKeyword = /*#__PURE__*/new NumberKeyword({ + [TitleAnnotationId]: "number", + [DescriptionAnnotationId]: "a number" +}); +/** + * @category guards + * @since 3.10.0 + */ +export const isNumberKeyword = /*#__PURE__*/createASTGuard("NumberKeyword"); +/** + * @category model + * @since 3.10.0 + */ +export class BooleanKeyword { + annotations; + /** + * @since 3.10.0 + */ + _tag = "BooleanKeyword"; + constructor(annotations = {}) { + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return formatKeyword(this); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category constructors + * @since 3.10.0 + */ +export const booleanKeyword = /*#__PURE__*/new BooleanKeyword({ + [TitleAnnotationId]: "boolean", + [DescriptionAnnotationId]: "a boolean" +}); +/** + * @category guards + * @since 3.10.0 + */ +export const isBooleanKeyword = /*#__PURE__*/createASTGuard("BooleanKeyword"); +/** + * @category model + * @since 3.10.0 + */ +export class BigIntKeyword { + annotations; + /** + * @since 3.10.0 + */ + _tag = "BigIntKeyword"; + constructor(annotations = {}) { + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return formatKeyword(this); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category constructors + * @since 3.10.0 + */ +export const bigIntKeyword = /*#__PURE__*/new BigIntKeyword({ + [TitleAnnotationId]: "bigint", + [DescriptionAnnotationId]: "a bigint" +}); +/** + * @category guards + * @since 3.10.0 + */ +export const isBigIntKeyword = /*#__PURE__*/createASTGuard("BigIntKeyword"); +/** + * @category model + * @since 3.10.0 + */ +export class SymbolKeyword { + annotations; + /** + * @since 3.10.0 + */ + _tag = "SymbolKeyword"; + constructor(annotations = {}) { + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return formatKeyword(this); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category constructors + * @since 3.10.0 + */ +export const symbolKeyword = /*#__PURE__*/new SymbolKeyword({ + [TitleAnnotationId]: "symbol", + [DescriptionAnnotationId]: "a symbol" +}); +/** + * @category guards + * @since 3.10.0 + */ +export const isSymbolKeyword = /*#__PURE__*/createASTGuard("SymbolKeyword"); +/** + * @category model + * @since 3.10.0 + */ +export class ObjectKeyword { + annotations; + /** + * @since 3.10.0 + */ + _tag = "ObjectKeyword"; + constructor(annotations = {}) { + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return formatKeyword(this); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category constructors + * @since 3.10.0 + */ +export const objectKeyword = /*#__PURE__*/new ObjectKeyword({ + [TitleAnnotationId]: "object", + [DescriptionAnnotationId]: "an object in the TypeScript meaning, i.e. the `object` type" +}); +/** + * @category guards + * @since 3.10.0 + */ +export const isObjectKeyword = /*#__PURE__*/createASTGuard("ObjectKeyword"); +/** + * @category model + * @since 3.10.0 + */ +export class Enums { + enums; + annotations; + /** + * @since 3.10.0 + */ + _tag = "Enums"; + constructor(enums, annotations = {}) { + this.enums = enums; + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return Option.getOrElse(getExpected(this), () => ` JSON.stringify(value)).join(" | ")}>`); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + enums: this.enums, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category guards + * @since 3.10.0 + */ +export const isEnums = /*#__PURE__*/createASTGuard("Enums"); +const isTemplateLiteralSpanType = ast => { + switch (ast._tag) { + case "Literal": + case "NumberKeyword": + case "StringKeyword": + case "TemplateLiteral": + return true; + case "Union": + return ast.types.every(isTemplateLiteralSpanType); + } + return false; +}; +const templateLiteralSpanUnionTypeToString = type => { + switch (type._tag) { + case "Literal": + return JSON.stringify(String(type.literal)); + case "StringKeyword": + return "string"; + case "NumberKeyword": + return "number"; + case "TemplateLiteral": + return String(type); + case "Union": + return type.types.map(templateLiteralSpanUnionTypeToString).join(" | "); + } +}; +const templateLiteralSpanTypeToString = type => { + switch (type._tag) { + case "Literal": + return String(type.literal); + case "StringKeyword": + return "${string}"; + case "NumberKeyword": + return "${number}"; + case "TemplateLiteral": + return "${" + String(type) + "}"; + case "Union": + return "${" + type.types.map(templateLiteralSpanUnionTypeToString).join(" | ") + "}"; + } +}; +/** + * @category model + * @since 3.10.0 + */ +export class TemplateLiteralSpan { + literal; + /** + * @since 3.10.0 + */ + type; + constructor(type, literal) { + this.literal = literal; + if (isTemplateLiteralSpanType(type)) { + this.type = type; + } else { + throw new Error(errors_.getSchemaUnsupportedLiteralSpanErrorMessage(type)); + } + } + /** + * @since 3.10.0 + */ + toString() { + return templateLiteralSpanTypeToString(this.type) + this.literal; + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + type: this.type.toJSON(), + literal: this.literal + }; + } +} +/** + * @category model + * @since 3.10.0 + */ +export class TemplateLiteral { + head; + spans; + annotations; + /** + * @since 3.10.0 + */ + _tag = "TemplateLiteral"; + constructor(head, spans, annotations = {}) { + this.head = head; + this.spans = spans; + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return Option.getOrElse(getExpected(this), () => formatTemplateLiteral(this)); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + head: this.head, + spans: this.spans.map(span => span.toJSON()), + annotations: toJSONAnnotations(this.annotations) + }; + } +} +const formatTemplateLiteral = ast => "`" + ast.head + ast.spans.map(String).join("") + "`"; +/** + * @category guards + * @since 3.10.0 + */ +export const isTemplateLiteral = /*#__PURE__*/createASTGuard("TemplateLiteral"); +/** + * @category model + * @since 3.10.0 + */ +export class Type { + type; + annotations; + constructor(type, annotations = {}) { + this.type = type; + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + type: this.type.toJSON(), + annotations: toJSONAnnotations(this.annotations) + }; + } + /** + * @since 3.10.0 + */ + toString() { + return String(this.type); + } +} +/** + * @category model + * @since 3.10.0 + */ +export class OptionalType extends Type { + isOptional; + constructor(type, isOptional, annotations = {}) { + super(type, annotations); + this.isOptional = isOptional; + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + type: this.type.toJSON(), + isOptional: this.isOptional, + annotations: toJSONAnnotations(this.annotations) + }; + } + /** + * @since 3.10.0 + */ + toString() { + return String(this.type) + (this.isOptional ? "?" : ""); + } +} +const getRestASTs = rest => rest.map(annotatedAST => annotatedAST.type); +/** + * @category model + * @since 3.10.0 + */ +export class TupleType { + elements; + rest; + isReadonly; + annotations; + /** + * @since 3.10.0 + */ + _tag = "TupleType"; + constructor(elements, rest, isReadonly, annotations = {}) { + this.elements = elements; + this.rest = rest; + this.isReadonly = isReadonly; + this.annotations = annotations; + let hasOptionalElement = false; + let hasIllegalRequiredElement = false; + for (const e of elements) { + if (e.isOptional) { + hasOptionalElement = true; + } else if (hasOptionalElement) { + hasIllegalRequiredElement = true; + break; + } + } + if (hasIllegalRequiredElement || hasOptionalElement && rest.length > 1) { + throw new Error(errors_.getASTRequiredElementFollowinAnOptionalElementErrorMessage); + } + } + /** + * @since 3.10.0 + */ + toString() { + return Option.getOrElse(getExpected(this), () => formatTuple(this)); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + elements: this.elements.map(e => e.toJSON()), + rest: this.rest.map(ast => ast.toJSON()), + isReadonly: this.isReadonly, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +const formatTuple = ast => { + const formattedElements = ast.elements.map(String).join(", "); + return Arr.matchLeft(ast.rest, { + onEmpty: () => `readonly [${formattedElements}]`, + onNonEmpty: (head, tail) => { + const formattedHead = String(head); + const wrappedHead = formattedHead.includes(" | ") ? `(${formattedHead})` : formattedHead; + if (tail.length > 0) { + const formattedTail = tail.map(String).join(", "); + if (ast.elements.length > 0) { + return `readonly [${formattedElements}, ...${wrappedHead}[], ${formattedTail}]`; + } else { + return `readonly [...${wrappedHead}[], ${formattedTail}]`; + } + } else { + if (ast.elements.length > 0) { + return `readonly [${formattedElements}, ...${wrappedHead}[]]`; + } else { + return `ReadonlyArray<${formattedHead}>`; + } + } + } + }); +}; +/** + * @category guards + * @since 3.10.0 + */ +export const isTupleType = /*#__PURE__*/createASTGuard("TupleType"); +/** + * @category model + * @since 3.10.0 + */ +export class PropertySignature extends OptionalType { + name; + isReadonly; + constructor(name, type, isOptional, isReadonly, annotations) { + super(type, isOptional, annotations); + this.name = name; + this.isReadonly = isReadonly; + } + /** + * @since 3.10.0 + */ + toString() { + return (this.isReadonly ? "readonly " : "") + String(this.name) + (this.isOptional ? "?" : "") + ": " + this.type; + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + name: String(this.name), + type: this.type.toJSON(), + isOptional: this.isOptional, + isReadonly: this.isReadonly, + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @since 3.10.0 + */ +export const isParameter = ast => { + switch (ast._tag) { + case "StringKeyword": + case "SymbolKeyword": + case "TemplateLiteral": + return true; + case "Refinement": + return isParameter(ast.from); + } + return false; +}; +/** + * @category model + * @since 3.10.0 + */ +export class IndexSignature { + type; + isReadonly; + /** + * @since 3.10.0 + */ + parameter; + constructor(parameter, type, isReadonly) { + this.type = type; + this.isReadonly = isReadonly; + if (isParameter(parameter)) { + this.parameter = parameter; + } else { + throw new Error(errors_.getASTIndexSignatureParameterErrorMessage); + } + } + /** + * @since 3.10.0 + */ + toString() { + return (this.isReadonly ? "readonly " : "") + `[x: ${this.parameter}]: ${this.type}`; + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + parameter: this.parameter.toJSON(), + type: this.type.toJSON(), + isReadonly: this.isReadonly + }; + } +} +/** + * @category model + * @since 3.10.0 + */ +export class TypeLiteral { + annotations; + /** + * @since 3.10.0 + */ + _tag = "TypeLiteral"; + /** + * @since 3.10.0 + */ + propertySignatures; + /** + * @since 3.10.0 + */ + indexSignatures; + constructor(propertySignatures, indexSignatures, annotations = {}) { + this.annotations = annotations; + // check for duplicate property signatures + const keys = {}; + for (let i = 0; i < propertySignatures.length; i++) { + const name = propertySignatures[i].name; + if (Object.prototype.hasOwnProperty.call(keys, name)) { + throw new Error(errors_.getASTDuplicatePropertySignatureErrorMessage(name)); + } + keys[name] = null; + } + // check for duplicate index signatures + const parameters = { + string: false, + symbol: false + }; + for (let i = 0; i < indexSignatures.length; i++) { + const encodedParameter = getEncodedParameter(indexSignatures[i].parameter); + if (isStringKeyword(encodedParameter)) { + if (parameters.string) { + throw new Error(errors_.getASTDuplicateIndexSignatureErrorMessage("string")); + } + parameters.string = true; + } else if (isSymbolKeyword(encodedParameter)) { + if (parameters.symbol) { + throw new Error(errors_.getASTDuplicateIndexSignatureErrorMessage("symbol")); + } + parameters.symbol = true; + } + } + this.propertySignatures = propertySignatures; + this.indexSignatures = indexSignatures; + } + /** + * @since 3.10.0 + */ + toString() { + return Option.getOrElse(getExpected(this), () => formatTypeLiteral(this)); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + propertySignatures: this.propertySignatures.map(ps => ps.toJSON()), + indexSignatures: this.indexSignatures.map(ps => ps.toJSON()), + annotations: toJSONAnnotations(this.annotations) + }; + } +} +const formatIndexSignatures = iss => iss.map(String).join("; "); +const formatTypeLiteral = ast => { + if (ast.propertySignatures.length > 0) { + const pss = ast.propertySignatures.map(String).join("; "); + if (ast.indexSignatures.length > 0) { + return `{ ${pss}; ${formatIndexSignatures(ast.indexSignatures)} }`; + } else { + return `{ ${pss} }`; + } + } else { + if (ast.indexSignatures.length > 0) { + return `{ ${formatIndexSignatures(ast.indexSignatures)} }`; + } else { + return "{}"; + } + } +}; +/** + * @category guards + * @since 3.10.0 + */ +export const isTypeLiteral = /*#__PURE__*/createASTGuard("TypeLiteral"); +const sortCandidates = /*#__PURE__*/Arr.sort(/*#__PURE__*/Order.mapInput(Number.Order, ast => { + switch (ast._tag) { + case "AnyKeyword": + return 0; + case "UnknownKeyword": + return 1; + case "ObjectKeyword": + return 2; + case "StringKeyword": + case "NumberKeyword": + case "BooleanKeyword": + case "BigIntKeyword": + case "SymbolKeyword": + return 3; + } + return 4; +})); +const literalMap = { + string: "StringKeyword", + number: "NumberKeyword", + boolean: "BooleanKeyword", + bigint: "BigIntKeyword" +}; +/** @internal */ +export const flatten = candidates => Arr.flatMap(candidates, ast => isUnion(ast) ? flatten(ast.types) : [ast]); +/** @internal */ +export const unify = candidates => { + const cs = sortCandidates(candidates); + const out = []; + const uniques = {}; + const literals = []; + for (const ast of cs) { + switch (ast._tag) { + case "NeverKeyword": + break; + case "AnyKeyword": + return [anyKeyword]; + case "UnknownKeyword": + return [unknownKeyword]; + // uniques + case "ObjectKeyword": + case "UndefinedKeyword": + case "VoidKeyword": + case "StringKeyword": + case "NumberKeyword": + case "BooleanKeyword": + case "BigIntKeyword": + case "SymbolKeyword": + { + if (!uniques[ast._tag]) { + uniques[ast._tag] = ast; + out.push(ast); + } + break; + } + case "Literal": + { + const type = typeof ast.literal; + switch (type) { + case "string": + case "number": + case "bigint": + case "boolean": + { + const _tag = literalMap[type]; + if (!uniques[_tag] && !literals.includes(ast.literal)) { + literals.push(ast.literal); + out.push(ast); + } + break; + } + // null + case "object": + { + if (!literals.includes(ast.literal)) { + literals.push(ast.literal); + out.push(ast); + } + break; + } + } + break; + } + case "UniqueSymbol": + { + if (!uniques["SymbolKeyword"] && !literals.includes(ast.symbol)) { + literals.push(ast.symbol); + out.push(ast); + } + break; + } + case "TupleType": + { + if (!uniques["ObjectKeyword"]) { + out.push(ast); + } + break; + } + case "TypeLiteral": + { + if (ast.propertySignatures.length === 0 && ast.indexSignatures.length === 0) { + if (!uniques["{}"]) { + uniques["{}"] = ast; + out.push(ast); + } + } else if (!uniques["ObjectKeyword"]) { + out.push(ast); + } + break; + } + default: + out.push(ast); + } + } + return out; +}; +/** + * @category model + * @since 3.10.0 + */ +export class Union { + types; + annotations; + static make = (types, annotations) => { + return isMembers(types) ? new Union(types, annotations) : types.length === 1 ? types[0] : neverKeyword; + }; + /** @internal */ + static unify = (candidates, annotations) => { + return Union.make(unify(flatten(candidates)), annotations); + }; + /** + * @since 3.10.0 + */ + _tag = "Union"; + constructor(types, annotations = {}) { + this.types = types; + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return Option.getOrElse(getExpected(this), () => this.types.map(String).join(" | ")); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + types: this.types.map(ast => ast.toJSON()), + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** @internal */ +export const mapMembers = (members, f) => members.map(f); +/** @internal */ +export const isMembers = as => as.length > 1; +/** + * @category guards + * @since 3.10.0 + */ +export const isUnion = /*#__PURE__*/createASTGuard("Union"); +const toJSONMemoMap = /*#__PURE__*/globalValue(/*#__PURE__*/Symbol.for("effect/Schema/AST/toJSONMemoMap"), () => new WeakMap()); +/** + * @category model + * @since 3.10.0 + */ +export class Suspend { + f; + annotations; + /** + * @since 3.10.0 + */ + _tag = "Suspend"; + constructor(f, annotations = {}) { + this.f = f; + this.annotations = annotations; + this.f = util_.memoizeThunk(f); + } + /** + * @since 3.10.0 + */ + toString() { + return getExpected(this).pipe(Option.orElse(() => Option.flatMap(Option.liftThrowable(this.f)(), ast => getExpected(ast))), Option.getOrElse(() => "")); + } + /** + * @since 3.10.0 + */ + toJSON() { + const ast = this.f(); + let out = toJSONMemoMap.get(ast); + if (out) { + return out; + } + toJSONMemoMap.set(ast, { + _tag: this._tag + }); + out = { + _tag: this._tag, + ast: ast.toJSON(), + annotations: toJSONAnnotations(this.annotations) + }; + toJSONMemoMap.set(ast, out); + return out; + } +} +/** + * @category guards + * @since 3.10.0 + */ +export const isSuspend = /*#__PURE__*/createASTGuard("Suspend"); +/** + * @category model + * @since 3.10.0 + */ +export class Refinement { + from; + filter; + annotations; + /** + * @since 3.10.0 + */ + _tag = "Refinement"; + constructor(from, filter, annotations = {}) { + this.from = from; + this.filter = filter; + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return getIdentifierAnnotation(this).pipe(Option.getOrElse(() => Option.match(getOrElseExpected(this), { + onNone: () => `{ ${this.from} | filter }`, + onSome: expected => isRefinement(this.from) ? String(this.from) + " & " + expected : expected + }))); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + from: this.from.toJSON(), + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category guards + * @since 3.10.0 + */ +export const isRefinement = /*#__PURE__*/createASTGuard("Refinement"); +/** + * @since 3.10.0 + */ +export const defaultParseOption = {}; +/** + * @category model + * @since 3.10.0 + */ +export class Transformation { + from; + to; + transformation; + annotations; + /** + * @since 3.10.0 + */ + _tag = "Transformation"; + constructor(from, to, transformation, annotations = {}) { + this.from = from; + this.to = to; + this.transformation = transformation; + this.annotations = annotations; + } + /** + * @since 3.10.0 + */ + toString() { + return Option.getOrElse(getExpected(this), () => `(${String(this.from)} <-> ${String(this.to)})`); + } + /** + * @since 3.10.0 + */ + toJSON() { + return { + _tag: this._tag, + from: this.from.toJSON(), + to: this.to.toJSON(), + annotations: toJSONAnnotations(this.annotations) + }; + } +} +/** + * @category guards + * @since 3.10.0 + */ +export const isTransformation = /*#__PURE__*/createASTGuard("Transformation"); +/** + * @category model + * @since 3.10.0 + */ +export class FinalTransformation { + decode; + encode; + /** + * @since 3.10.0 + */ + _tag = "FinalTransformation"; + constructor(decode, encode) { + this.decode = decode; + this.encode = encode; + } +} +const createTransformationGuard = tag => ast => ast._tag === tag; +/** + * @category guards + * @since 3.10.0 + */ +export const isFinalTransformation = /*#__PURE__*/createTransformationGuard("FinalTransformation"); +/** + * @category model + * @since 3.10.0 + */ +export class ComposeTransformation { + /** + * @since 3.10.0 + */ + _tag = "ComposeTransformation"; +} +/** + * @category constructors + * @since 3.10.0 + */ +export const composeTransformation = /*#__PURE__*/new ComposeTransformation(); +/** + * @category guards + * @since 3.10.0 + */ +export const isComposeTransformation = /*#__PURE__*/createTransformationGuard("ComposeTransformation"); +/** + * Represents a `PropertySignature -> PropertySignature` transformation + * + * The semantic of `decode` is: + * - `none()` represents the absence of the key/value pair + * - `some(value)` represents the presence of the key/value pair + * + * The semantic of `encode` is: + * - `none()` you don't want to output the key/value pair + * - `some(value)` you want to output the key/value pair + * + * @category model + * @since 3.10.0 + */ +export class PropertySignatureTransformation { + from; + to; + decode; + encode; + constructor(from, to, decode, encode) { + this.from = from; + this.to = to; + this.decode = decode; + this.encode = encode; + } +} +const isRenamingPropertySignatureTransformation = t => t.decode === identity && t.encode === identity; +/** + * @category model + * @since 3.10.0 + */ +export class TypeLiteralTransformation { + propertySignatureTransformations; + /** + * @since 3.10.0 + */ + _tag = "TypeLiteralTransformation"; + constructor(propertySignatureTransformations) { + this.propertySignatureTransformations = propertySignatureTransformations; + // check for duplicate property signature transformations + const fromKeys = {}; + const toKeys = {}; + for (const pst of propertySignatureTransformations) { + const from = pst.from; + if (fromKeys[from]) { + throw new Error(errors_.getASTDuplicatePropertySignatureTransformationErrorMessage(from)); + } + fromKeys[from] = true; + const to = pst.to; + if (toKeys[to]) { + throw new Error(errors_.getASTDuplicatePropertySignatureTransformationErrorMessage(to)); + } + toKeys[to] = true; + } + } +} +/** + * @category guards + * @since 3.10.0 + */ +export const isTypeLiteralTransformation = /*#__PURE__*/createTransformationGuard("TypeLiteralTransformation"); +// ------------------------------------------------------------------------------------- +// API +// ------------------------------------------------------------------------------------- +/** + * Merges a set of new annotations with existing ones, potentially overwriting + * any duplicates. + * + * Any previously existing identifier annotations are deleted. + * + * @since 3.10.0 + */ +export const annotations = (ast, overrides) => { + const d = Object.getOwnPropertyDescriptors(ast); + const base = { + ...ast.annotations + }; + delete base[IdentifierAnnotationId]; + const value = { + ...base, + ...overrides + }; + const surrogate = getSurrogateAnnotation(ast); + if (Option.isSome(surrogate)) { + value[SurrogateAnnotationId] = annotations(surrogate.value, overrides); + } + d.annotations.value = value; + return Object.create(Object.getPrototypeOf(ast), d); +}; +/** + * Equivalent at runtime to the TypeScript type-level `keyof` operator. + * + * @since 3.10.0 + */ +export const keyof = ast => Union.unify(_keyof(ast)); +const STRING_KEYWORD_PATTERN = "[\\s\\S]*?"; // any string, including newlines +const NUMBER_KEYWORD_PATTERN = "[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?"; +const getTemplateLiteralSpanTypePattern = (type, capture) => { + switch (type._tag) { + case "Literal": + return regexp.escape(String(type.literal)); + case "StringKeyword": + return STRING_KEYWORD_PATTERN; + case "NumberKeyword": + return NUMBER_KEYWORD_PATTERN; + case "TemplateLiteral": + return getTemplateLiteralPattern(type, capture, false); + case "Union": + return type.types.map(type => getTemplateLiteralSpanTypePattern(type, capture)).join("|"); + } +}; +const handleTemplateLiteralSpanTypeParens = (type, s, capture, top) => { + if (isUnion(type)) { + if (capture && !top) { + return `(?:${s})`; + } + } else if (!capture || !top) { + return s; + } + return `(${s})`; +}; +const getTemplateLiteralPattern = (ast, capture, top) => { + let pattern = ``; + if (ast.head !== "") { + const head = regexp.escape(ast.head); + pattern += capture && top ? `(${head})` : head; + } + for (const span of ast.spans) { + const spanPattern = getTemplateLiteralSpanTypePattern(span.type, capture); + pattern += handleTemplateLiteralSpanTypeParens(span.type, spanPattern, capture, top); + if (span.literal !== "") { + const literal = regexp.escape(span.literal); + pattern += capture && top ? `(${literal})` : literal; + } + } + return pattern; +}; +/** + * Generates a regular expression from a `TemplateLiteral` AST node. + * + * @see {@link getTemplateLiteralCapturingRegExp} for a variant that captures the pattern. + * + * @since 3.10.0 + */ +export const getTemplateLiteralRegExp = ast => new RegExp(`^${getTemplateLiteralPattern(ast, false, true)}$`); +/** + * Generates a regular expression that captures the pattern defined by the given `TemplateLiteral` AST. + * + * @see {@link getTemplateLiteralRegExp} for a variant that does not capture the pattern. + * + * @since 3.10.0 + */ +export const getTemplateLiteralCapturingRegExp = ast => new RegExp(`^${getTemplateLiteralPattern(ast, true, true)}$`); +/** + * @since 3.10.0 + */ +export const getPropertySignatures = ast => { + const annotation = getSurrogateAnnotation(ast); + if (Option.isSome(annotation)) { + return getPropertySignatures(annotation.value); + } + switch (ast._tag) { + case "TypeLiteral": + return ast.propertySignatures.slice(); + case "Suspend": + return getPropertySignatures(ast.f()); + case "Refinement": + return getPropertySignatures(ast.from); + } + return getPropertyKeys(ast).map(name => getPropertyKeyIndexedAccess(ast, name)); +}; +const getIndexSignatures = ast => { + const annotation = getSurrogateAnnotation(ast); + if (Option.isSome(annotation)) { + return getIndexSignatures(annotation.value); + } + switch (ast._tag) { + case "TypeLiteral": + return ast.indexSignatures.slice(); + case "Suspend": + return getIndexSignatures(ast.f()); + case "Refinement": + return getIndexSignatures(ast.from); + case "Transformation": + return getIndexSignatures(ast.to); + } + return []; +}; +/** @internal */ +export const getNumberIndexedAccess = ast => { + switch (ast._tag) { + case "TupleType": + { + let hasOptional = false; + let out = []; + for (const e of ast.elements) { + if (e.isOptional) { + hasOptional = true; + } + out.push(e.type); + } + if (hasOptional) { + out.push(undefinedKeyword); + } + out = out.concat(getRestASTs(ast.rest)); + return Union.make(out); + } + case "Refinement": + return getNumberIndexedAccess(ast.from); + case "Union": + return Union.make(ast.types.map(getNumberIndexedAccess)); + case "Suspend": + return getNumberIndexedAccess(ast.f()); + } + throw new Error(errors_.getASTUnsupportedSchemaErrorMessage(ast)); +}; +const getTypeLiteralPropertySignature = (ast, name) => { + // from property signatures... + const ops = Arr.findFirst(ast.propertySignatures, ps => ps.name === name); + if (Option.isSome(ops)) { + return ops.value; + } + // from index signatures... + if (Predicate.isString(name)) { + let out = undefined; + for (const is of ast.indexSignatures) { + const encodedParameter = getEncodedParameter(is.parameter); + switch (encodedParameter._tag) { + case "TemplateLiteral": + { + const regex = getTemplateLiteralRegExp(encodedParameter); + if (regex.test(name)) { + return new PropertySignature(name, is.type, false, true); + } + break; + } + case "StringKeyword": + { + if (out === undefined) { + out = new PropertySignature(name, is.type, false, true); + } + } + } + } + if (out) { + return out; + } + } else if (Predicate.isSymbol(name)) { + for (const is of ast.indexSignatures) { + const encodedParameter = getEncodedParameter(is.parameter); + if (isSymbolKeyword(encodedParameter)) { + return new PropertySignature(name, is.type, false, true); + } + } + } +}; +/** @internal */ +export const getPropertyKeyIndexedAccess = (ast, name) => { + const annotation = getSurrogateAnnotation(ast); + if (Option.isSome(annotation)) { + return getPropertyKeyIndexedAccess(annotation.value, name); + } + switch (ast._tag) { + case "TypeLiteral": + { + const ps = getTypeLiteralPropertySignature(ast, name); + if (ps) { + return ps; + } + break; + } + case "Union": + return new PropertySignature(name, Union.make(ast.types.map(ast => getPropertyKeyIndexedAccess(ast, name).type)), false, true); + case "Suspend": + return getPropertyKeyIndexedAccess(ast.f(), name); + case "Refinement": + return getPropertyKeyIndexedAccess(ast.from, name); + case "Transformation": + return getPropertyKeyIndexedAccess(ast.to, name); + } + throw new Error(errors_.getASTUnsupportedSchemaErrorMessage(ast)); +}; +const getPropertyKeys = ast => { + const annotation = getSurrogateAnnotation(ast); + if (Option.isSome(annotation)) { + return getPropertyKeys(annotation.value); + } + switch (ast._tag) { + case "TypeLiteral": + return ast.propertySignatures.map(ps => ps.name); + case "Union": + return ast.types.slice(1).reduce((out, ast) => Arr.intersection(out, getPropertyKeys(ast)), getPropertyKeys(ast.types[0])); + case "Suspend": + return getPropertyKeys(ast.f()); + case "Refinement": + return getPropertyKeys(ast.from); + case "Transformation": + return getPropertyKeys(ast.to); + } + return []; +}; +/** @internal */ +export const record = (key, value) => { + const propertySignatures = []; + const indexSignatures = []; + const go = key => { + switch (key._tag) { + case "NeverKeyword": + break; + case "StringKeyword": + case "SymbolKeyword": + case "TemplateLiteral": + case "Refinement": + indexSignatures.push(new IndexSignature(key, value, true)); + break; + case "Literal": + if (Predicate.isString(key.literal) || Predicate.isNumber(key.literal)) { + propertySignatures.push(new PropertySignature(key.literal, value, false, true)); + } else { + throw new Error(errors_.getASTUnsupportedLiteralErrorMessage(key.literal)); + } + break; + case "Enums": + { + for (const [_, name] of key.enums) { + propertySignatures.push(new PropertySignature(name, value, false, true)); + } + break; + } + case "UniqueSymbol": + propertySignatures.push(new PropertySignature(key.symbol, value, false, true)); + break; + case "Union": + key.types.forEach(go); + break; + default: + throw new Error(errors_.getASTUnsupportedKeySchemaErrorMessage(key)); + } + }; + go(key); + return { + propertySignatures, + indexSignatures + }; +}; +/** + * Equivalent at runtime to the built-in TypeScript utility type `Pick`. + * + * @since 3.10.0 + */ +export const pick = (ast, keys) => { + const annotation = getSurrogateAnnotation(ast); + if (Option.isSome(annotation)) { + return pick(annotation.value, keys); + } + switch (ast._tag) { + case "TypeLiteral": + { + const pss = []; + const names = {}; + for (const ps of ast.propertySignatures) { + names[ps.name] = null; + if (keys.includes(ps.name)) { + pss.push(ps); + } + } + for (const key of keys) { + if (!(key in names)) { + const ps = getTypeLiteralPropertySignature(ast, key); + if (ps) { + pss.push(ps); + } + } + } + return new TypeLiteral(pss, []); + } + case "Union": + return new TypeLiteral(keys.map(name => getPropertyKeyIndexedAccess(ast, name)), []); + case "Suspend": + return pick(ast.f(), keys); + case "Refinement": + return pick(ast.from, keys); + case "Transformation": + { + switch (ast.transformation._tag) { + case "ComposeTransformation": + return new Transformation(pick(ast.from, keys), pick(ast.to, keys), composeTransformation); + case "TypeLiteralTransformation": + { + const ts = []; + const fromKeys = []; + for (const k of keys) { + const t = ast.transformation.propertySignatureTransformations.find(t => t.to === k); + if (t) { + ts.push(t); + fromKeys.push(t.from); + } else { + fromKeys.push(k); + } + } + return Arr.isNonEmptyReadonlyArray(ts) ? new Transformation(pick(ast.from, fromKeys), pick(ast.to, keys), new TypeLiteralTransformation(ts)) : pick(ast.from, fromKeys); + } + } + } + } + throw new Error(errors_.getASTUnsupportedSchemaErrorMessage(ast)); +}; +/** + * Equivalent at runtime to the built-in TypeScript utility type `Omit`. + * + * @since 3.10.0 + */ +export const omit = (ast, keys) => { + let indexSignatures = getIndexSignatures(ast); + if (indexSignatures.length > 0) { + if (indexSignatures.some(is => isStringKeyword(getEncodedParameter(is.parameter)))) { + indexSignatures = indexSignatures.filter(is => !isTemplateLiteral(getEncodedParameter(is.parameter))); + } + return new TypeLiteral([], indexSignatures); + } + return pick(ast, getPropertyKeys(ast).filter(name => !keys.includes(name))); +}; +/** @internal */ +export const orUndefined = ast => Union.make([ast, undefinedKeyword]); +/** + * Equivalent at runtime to the built-in TypeScript utility type `Partial`. + * + * @since 3.10.0 + */ +export const partial = (ast, options) => { + const exact = options?.exact === true; + switch (ast._tag) { + case "TupleType": + return new TupleType(ast.elements.map(e => new OptionalType(exact ? e.type : orUndefined(e.type), true)), Arr.match(ast.rest, { + onEmpty: () => ast.rest, + onNonEmpty: rest => [new Type(Union.make([...getRestASTs(rest), undefinedKeyword]))] + }), ast.isReadonly); + case "TypeLiteral": + return new TypeLiteral(ast.propertySignatures.map(ps => new PropertySignature(ps.name, exact ? ps.type : orUndefined(ps.type), true, ps.isReadonly, ps.annotations)), ast.indexSignatures.map(is => new IndexSignature(is.parameter, orUndefined(is.type), is.isReadonly))); + case "Union": + return Union.make(ast.types.map(member => partial(member, options))); + case "Suspend": + return new Suspend(() => partial(ast.f(), options)); + case "Declaration": + case "Refinement": + throw new Error(errors_.getASTUnsupportedSchemaErrorMessage(ast)); + case "Transformation": + { + if (isTypeLiteralTransformation(ast.transformation) && ast.transformation.propertySignatureTransformations.every(isRenamingPropertySignatureTransformation)) { + return new Transformation(partial(ast.from, options), partial(ast.to, options), ast.transformation); + } + throw new Error(errors_.getASTUnsupportedSchemaErrorMessage(ast)); + } + } + return ast; +}; +/** + * Equivalent at runtime to the built-in TypeScript utility type `Required`. + * + * @since 3.10.0 + */ +export const required = ast => { + switch (ast._tag) { + case "TupleType": + return new TupleType(ast.elements.map(e => new OptionalType(e.type, false)), ast.rest, ast.isReadonly); + case "TypeLiteral": + return new TypeLiteral(ast.propertySignatures.map(f => new PropertySignature(f.name, f.type, false, f.isReadonly, f.annotations)), ast.indexSignatures); + case "Union": + return Union.make(ast.types.map(member => required(member))); + case "Suspend": + return new Suspend(() => required(ast.f())); + case "Declaration": + case "Refinement": + throw new Error(errors_.getASTUnsupportedSchemaErrorMessage(ast)); + case "Transformation": + { + if (isTypeLiteralTransformation(ast.transformation) && ast.transformation.propertySignatureTransformations.every(isRenamingPropertySignatureTransformation)) { + return new Transformation(required(ast.from), required(ast.to), ast.transformation); + } + throw new Error(errors_.getASTUnsupportedSchemaErrorMessage(ast)); + } + } + return ast; +}; +/** + * Creates a new AST with shallow mutability applied to its properties. + * + * @since 3.10.0 + */ +export const mutable = ast => { + switch (ast._tag) { + case "TupleType": + return ast.isReadonly === false ? ast : new TupleType(ast.elements, ast.rest, false, ast.annotations); + case "TypeLiteral": + { + const propertySignatures = changeMap(ast.propertySignatures, ps => ps.isReadonly === false ? ps : new PropertySignature(ps.name, ps.type, ps.isOptional, false, ps.annotations)); + const indexSignatures = changeMap(ast.indexSignatures, is => is.isReadonly === false ? is : new IndexSignature(is.parameter, is.type, false)); + return propertySignatures === ast.propertySignatures && indexSignatures === ast.indexSignatures ? ast : new TypeLiteral(propertySignatures, indexSignatures, ast.annotations); + } + case "Union": + { + const types = changeMap(ast.types, mutable); + return types === ast.types ? ast : Union.make(types, ast.annotations); + } + case "Suspend": + return new Suspend(() => mutable(ast.f()), ast.annotations); + case "Refinement": + { + const from = mutable(ast.from); + return from === ast.from ? ast : new Refinement(from, ast.filter, ast.annotations); + } + case "Transformation": + { + const from = mutable(ast.from); + const to = mutable(ast.to); + return from === ast.from && to === ast.to ? ast : new Transformation(from, to, ast.transformation, ast.annotations); + } + } + return ast; +}; +/** + * @since 3.10.0 + */ +export const getCompiler = match => { + const compile = (ast, path) => match[ast._tag](ast, compile, path); + return compile; +}; +/** @internal */ +export const pickAnnotations = annotationIds => annotated => { + let out = undefined; + for (const id of annotationIds) { + if (Object.prototype.hasOwnProperty.call(annotated.annotations, id)) { + if (out === undefined) { + out = {}; + } + out[id] = annotated.annotations[id]; + } + } + return out; +}; +/** @internal */ +export const omitAnnotations = annotationIds => annotated => { + const out = { + ...annotated.annotations + }; + for (const id of annotationIds) { + delete out[id]; + } + return out; +}; +const preserveTransformationAnnotations = /*#__PURE__*/pickAnnotations([ExamplesAnnotationId, DefaultAnnotationId, JSONSchemaAnnotationId, ArbitraryAnnotationId, PrettyAnnotationId, EquivalenceAnnotationId]); +/** + * @since 3.10.0 + */ +export const typeAST = ast => { + switch (ast._tag) { + case "Declaration": + { + const typeParameters = changeMap(ast.typeParameters, typeAST); + return typeParameters === ast.typeParameters ? ast : new Declaration(typeParameters, ast.decodeUnknown, ast.encodeUnknown, ast.annotations); + } + case "TupleType": + { + const elements = changeMap(ast.elements, e => { + const type = typeAST(e.type); + return type === e.type ? e : new OptionalType(type, e.isOptional); + }); + const restASTs = getRestASTs(ast.rest); + const rest = changeMap(restASTs, typeAST); + return elements === ast.elements && rest === restASTs ? ast : new TupleType(elements, rest.map(type => new Type(type)), ast.isReadonly, ast.annotations); + } + case "TypeLiteral": + { + const propertySignatures = changeMap(ast.propertySignatures, p => { + const type = typeAST(p.type); + return type === p.type ? p : new PropertySignature(p.name, type, p.isOptional, p.isReadonly); + }); + const indexSignatures = changeMap(ast.indexSignatures, is => { + const type = typeAST(is.type); + return type === is.type ? is : new IndexSignature(is.parameter, type, is.isReadonly); + }); + return propertySignatures === ast.propertySignatures && indexSignatures === ast.indexSignatures ? ast : new TypeLiteral(propertySignatures, indexSignatures, ast.annotations); + } + case "Union": + { + const types = changeMap(ast.types, typeAST); + return types === ast.types ? ast : Union.make(types, ast.annotations); + } + case "Suspend": + return new Suspend(() => typeAST(ast.f()), ast.annotations); + case "Refinement": + { + const from = typeAST(ast.from); + return from === ast.from ? ast : new Refinement(from, ast.filter, ast.annotations); + } + case "Transformation": + { + const preserve = preserveTransformationAnnotations(ast); + return typeAST(preserve !== undefined ? annotations(ast.to, preserve) : ast.to); + } + } + return ast; +}; +function changeMap(as, f) { + let changed = false; + const out = Arr.allocate(as.length); + for (let i = 0; i < as.length; i++) { + const a = as[i]; + const fa = f(a); + if (fa !== a) { + changed = true; + } + out[i] = fa; + } + return changed ? out : as; +} +/** + * Returns the from part of a transformation if it exists + * + * @internal + */ +export const getTransformationFrom = ast => { + switch (ast._tag) { + case "Transformation": + return ast.from; + case "Refinement": + return getTransformationFrom(ast.from); + case "Suspend": + return getTransformationFrom(ast.f()); + } +}; +const encodedAST_ = (ast, isBound) => { + switch (ast._tag) { + case "Declaration": + { + const typeParameters = changeMap(ast.typeParameters, ast => encodedAST_(ast, isBound)); + return typeParameters === ast.typeParameters ? ast : new Declaration(typeParameters, ast.decodeUnknown, ast.encodeUnknown); + } + case "TupleType": + { + const elements = changeMap(ast.elements, e => { + const type = encodedAST_(e.type, isBound); + return type === e.type ? e : new OptionalType(type, e.isOptional); + }); + const restASTs = getRestASTs(ast.rest); + const rest = changeMap(restASTs, ast => encodedAST_(ast, isBound)); + return elements === ast.elements && rest === restASTs ? ast : new TupleType(elements, rest.map(ast => new Type(ast)), ast.isReadonly); + } + case "TypeLiteral": + { + const propertySignatures = changeMap(ast.propertySignatures, ps => { + const type = encodedAST_(ps.type, isBound); + return type === ps.type ? ps : new PropertySignature(ps.name, type, ps.isOptional, ps.isReadonly); + }); + const indexSignatures = changeMap(ast.indexSignatures, is => { + const type = encodedAST_(is.type, isBound); + return type === is.type ? is : new IndexSignature(is.parameter, type, is.isReadonly); + }); + return propertySignatures === ast.propertySignatures && indexSignatures === ast.indexSignatures ? ast : new TypeLiteral(propertySignatures, indexSignatures); + } + case "Union": + { + const types = changeMap(ast.types, ast => encodedAST_(ast, isBound)); + return types === ast.types ? ast : Union.make(types); + } + case "Suspend": + { + let borrowedAnnotations = undefined; + const identifier = getJSONIdentifier(ast); + if (Option.isSome(identifier)) { + const suffix = isBound ? "Bound" : ""; + borrowedAnnotations = { + [JSONIdentifierAnnotationId]: `${identifier.value}Encoded${suffix}` + }; + } + return new Suspend(() => encodedAST_(ast.f(), isBound), borrowedAnnotations); + } + case "Refinement": + { + const from = encodedAST_(ast.from, isBound); + if (isBound) { + if (from === ast.from) return ast; + if (getTransformationFrom(ast.from) === undefined && hasStableFilter(ast)) { + return new Refinement(from, ast.filter, ast.annotations); + } + return from; + } else { + return from; + } + } + case "Transformation": + return encodedAST_(ast.from, isBound); + } + return ast; +}; +/** + * @since 3.10.0 + */ +export const encodedAST = ast => encodedAST_(ast, false); +/** + * @since 3.10.0 + */ +export const encodedBoundAST = ast => encodedAST_(ast, true); +const toJSONAnnotations = annotations => { + const out = {}; + for (const k of Object.getOwnPropertySymbols(annotations)) { + out[String(k)] = annotations[k]; + } + return out; +}; +/** @internal */ +export const getEncodedParameter = ast => { + switch (ast._tag) { + case "StringKeyword": + case "SymbolKeyword": + case "TemplateLiteral": + return ast; + case "Refinement": + return getEncodedParameter(ast.from); + } +}; +/** @internal */ +export const equals = (self, that) => { + switch (self._tag) { + case "Literal": + return isLiteral(that) && that.literal === self.literal; + case "UniqueSymbol": + return isUniqueSymbol(that) && that.symbol === self.symbol; + case "UndefinedKeyword": + case "VoidKeyword": + case "NeverKeyword": + case "UnknownKeyword": + case "AnyKeyword": + case "StringKeyword": + case "NumberKeyword": + case "BooleanKeyword": + case "BigIntKeyword": + case "SymbolKeyword": + case "ObjectKeyword": + return that._tag === self._tag; + case "TemplateLiteral": + return isTemplateLiteral(that) && that.head === self.head && equalsTemplateLiteralSpan(that.spans, self.spans); + case "Enums": + return isEnums(that) && equalsEnums(that.enums, self.enums); + case "Union": + return isUnion(that) && equalsUnion(self.types, that.types); + case "Refinement": + case "TupleType": + case "TypeLiteral": + case "Suspend": + case "Transformation": + case "Declaration": + return self === that; + } +}; +const equalsTemplateLiteralSpan = /*#__PURE__*/Arr.getEquivalence((self, that) => { + return self.literal === that.literal && equals(self.type, that.type); +}); +const equalsEnums = /*#__PURE__*/Arr.getEquivalence((self, that) => that[0] === self[0] && that[1] === self[1]); +const equalsUnion = /*#__PURE__*/Arr.getEquivalence(equals); +const intersection = /*#__PURE__*/Arr.intersectionWith(equals); +const _keyof = ast => { + switch (ast._tag) { + case "Declaration": + { + const annotation = getSurrogateAnnotation(ast); + if (Option.isSome(annotation)) { + return _keyof(annotation.value); + } + break; + } + case "TypeLiteral": + return ast.propertySignatures.map(p => Predicate.isSymbol(p.name) ? new UniqueSymbol(p.name) : new Literal(p.name)).concat(ast.indexSignatures.map(is => getEncodedParameter(is.parameter))); + case "Suspend": + return _keyof(ast.f()); + case "Union": + return ast.types.slice(1).reduce((out, ast) => intersection(out, _keyof(ast)), _keyof(ast.types[0])); + case "Transformation": + return _keyof(ast.to); + } + throw new Error(errors_.getASTUnsupportedSchemaErrorMessage(ast)); +}; +/** @internal */ +export const compose = (ab, cd) => new Transformation(ab, cd, composeTransformation); +/** @internal */ +export const rename = (ast, mapping) => { + switch (ast._tag) { + case "TypeLiteral": + { + const propertySignatureTransformations = []; + for (const key of Reflect.ownKeys(mapping)) { + const name = mapping[key]; + if (name !== undefined) { + propertySignatureTransformations.push(new PropertySignatureTransformation(key, name, identity, identity)); + } + } + if (propertySignatureTransformations.length === 0) { + return ast; + } + return new Transformation(ast, new TypeLiteral(ast.propertySignatures.map(ps => { + const name = mapping[ps.name]; + return new PropertySignature(name === undefined ? ps.name : name, typeAST(ps.type), ps.isOptional, ps.isReadonly, ps.annotations); + }), ast.indexSignatures), new TypeLiteralTransformation(propertySignatureTransformations)); + } + case "Union": + return Union.make(ast.types.map(ast => rename(ast, mapping))); + case "Suspend": + return new Suspend(() => rename(ast.f(), mapping)); + case "Transformation": + return compose(ast, rename(typeAST(ast), mapping)); + } + throw new Error(errors_.getASTUnsupportedRenameSchemaErrorMessage(ast)); +}; +const formatKeyword = ast => Option.getOrElse(getExpected(ast), () => ast._tag); +function getBrands(ast) { + return Option.match(getBrandAnnotation(ast), { + onNone: () => "", + onSome: brands => brands.map(brand => ` & Brand<${Inspectable.formatUnknown(brand)}>`).join("") + }); +} +const getOrElseExpected = ast => getTitleAnnotation(ast).pipe(Option.orElse(() => getDescriptionAnnotation(ast)), Option.orElse(() => getAutoTitleAnnotation(ast)), Option.map(s => s + getBrands(ast))); +const getExpected = ast => Option.orElse(getIdentifierAnnotation(ast), () => getOrElseExpected(ast)); +/** @internal */ +export const pruneUndefined = (ast, self, onTransformation) => { + switch (ast._tag) { + case "UndefinedKeyword": + return neverKeyword; + case "Union": + { + const types = []; + let hasUndefined = false; + for (const type of ast.types) { + const pruned = self(type); + if (pruned) { + hasUndefined = true; + if (!isNeverKeyword(pruned)) { + types.push(pruned); + } + } else { + types.push(type); + } + } + if (hasUndefined) { + return Union.make(types); + } + break; + } + case "Suspend": + return self(ast.f()); + case "Transformation": + return onTransformation(ast); + } +}; +//# sourceMappingURL=SchemaAST.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/ScopedRef.js b/backend/node_modules/effect/dist/esm/ScopedRef.js new file mode 100644 index 0000000000000000000000000000000000000000..a3ffb51008a1d935c2266a3534b39a0205627b1f --- /dev/null +++ b/backend/node_modules/effect/dist/esm/ScopedRef.js @@ -0,0 +1,42 @@ +import * as internal from "./internal/scopedRef.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const ScopedRefTypeId = internal.ScopedRefTypeId; +/** + * Creates a new `ScopedRef` from an effect that resourcefully produces a + * value. + * + * @since 2.0.0 + * @category constructors + */ +export const fromAcquire = internal.fromAcquire; +/** + * Retrieves the current value of the scoped reference. + * + * @since 2.0.0 + * @category getters + */ +export const get = internal.get; +/** + * Creates a new `ScopedRef` from the specified value. This method should + * not be used for values whose creation require the acquisition of resources. + * + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * Sets the value of this reference to the specified resourcefully-created + * value. Any resources associated with the old value will be released. + * + * This method will not return until either the reference is successfully + * changed to the new value, with old resources released, or until the attempt + * to acquire a new value fails. + * + * @since 2.0.0 + * @category getters + */ +export const set = internal.set; +//# sourceMappingURL=ScopedRef.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/ScopedRef.js.map b/backend/node_modules/effect/dist/esm/ScopedRef.js.map new file mode 100644 index 0000000000000000000000000000000000000000..b0a98ffa0810c4f1b5a6407699a48b71aa71c3e0 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/ScopedRef.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ScopedRef.js","names":["internal","ScopedRefTypeId","fromAcquire","get","make","set"],"sources":["../../src/ScopedRef.ts"],"sourcesContent":[null],"mappings":"AAKA,OAAO,KAAKA,QAAQ,MAAM,yBAAyB;AAOnD;;;;AAIA,OAAO,MAAMC,eAAe,GAAkBD,QAAQ,CAACC,eAAe;AA0DtE;;;;;;;AAOA,OAAO,MAAMC,WAAW,GAE+BF,QAAQ,CAACE,WAAW;AAE3E;;;;;;AAMA,OAAO,MAAMC,GAAG,GAAgDH,QAAQ,CAACG,GAAG;AAE5E;;;;;;;AAOA,OAAO,MAAMC,IAAI,GAAiFJ,QAAQ,CAACI,IAAI;AAE/G;;;;;;;;;;;AAWA,OAAO,MAAMC,GAAG,GAyBZL,QAAQ,CAACK,GAAG","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Secret.js.map b/backend/node_modules/effect/dist/esm/Secret.js.map new file mode 100644 index 0000000000000000000000000000000000000000..694e3e4d4a63b369768b9880075f85cd05ba570c --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Secret.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Secret.js","names":["InternalSecret","SecretTypeId","isSecret","make","fromIterable","fromString","value","unsafeWipe"],"sources":["../../src/Secret.ts"],"sourcesContent":[null],"mappings":"AAKA,OAAO,KAAKA,cAAc,MAAM,sBAAsB;AAGtD;;;;;AAKA,OAAO,MAAMC,YAAY,GAAkBD,cAAc,CAACC,YAAY;AAkCtE;;;;;AAKA,OAAO,MAAMC,QAAQ,GAAgCF,cAAc,CAACE,QAAQ;AAE5E;;;;;AAKA,OAAO,MAAMC,IAAI,GAAqCH,cAAc,CAACG,IAAI;AAEzE;;;;;AAKA,OAAO,MAAMC,YAAY,GAA2CJ,cAAc,CAACI,YAAY;AAE/F;;;;;AAKA,OAAO,MAAMC,UAAU,GAA6BL,cAAc,CAACK,UAAU;AAE7E;;;;;AAKA,OAAO,MAAMC,KAAK,GAA6BN,cAAc,CAACM,KAAK;AAEnE;;;;;AAKA,OAAO,MAAMC,UAAU,GAA2BP,cAAc,CAACO,UAAU","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/SingleProducerAsyncInput.js b/backend/node_modules/effect/dist/esm/SingleProducerAsyncInput.js new file mode 100644 index 0000000000000000000000000000000000000000..9aa929343647869a26dac7513fef7630a0e52619 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/SingleProducerAsyncInput.js @@ -0,0 +1,7 @@ +import * as internal from "./internal/channel/singleProducerAsyncInput.js"; +/** + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +//# sourceMappingURL=SingleProducerAsyncInput.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Sink.js b/backend/node_modules/effect/dist/esm/Sink.js new file mode 100644 index 0000000000000000000000000000000000000000..86a003b714a5442f0f8aa303542167c7cde9912b --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Sink.js @@ -0,0 +1,864 @@ +import * as internal from "./internal/sink.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const SinkTypeId = internal.SinkTypeId; +/** + * Replaces this sink's result with the provided value. + * + * @since 2.0.0 + * @category mapping + */ +export const as = internal.as; +/** + * A sink that collects all elements into a `Chunk`. + * + * @since 2.0.0 + * @category constructors + */ +export const collectAll = internal.collectAll; +/** + * A sink that collects first `n` elements into a chunk. + * + * @since 2.0.0 + * @category constructors + */ +export const collectAllN = internal.collectAllN; +/** + * Repeatedly runs the sink and accumulates its results into a `Chunk`. + * + * @since 2.0.0 + * @category utils + */ +export const collectAllFrom = internal.collectAllFrom; +/** + * A sink that collects all of its inputs into a map. The keys are extracted + * from inputs using the keying function `key`; if multiple inputs use the + * same key, they are merged using the `merge` function. + * + * @since 2.0.0 + * @category constructors + */ +export const collectAllToMap = internal.collectAllToMap; +/** + * A sink that collects first `n` keys into a map. The keys are calculated + * from inputs using the keying function `key`; if multiple inputs use the the + * same key, they are merged using the `merge` function. + * + * @since 2.0.0 + * @category constructors + */ +export const collectAllToMapN = internal.collectAllToMapN; +/** + * A sink that collects all of its inputs into a set. + * + * @since 2.0.0 + * @category constructors + */ +export const collectAllToSet = internal.collectAllToSet; +/** + * A sink that collects first `n` distinct inputs into a set. + * + * @since 2.0.0 + * @category constructors + */ +export const collectAllToSetN = internal.collectAllToSetN; +/** + * Accumulates incoming elements into a chunk until predicate `p` is + * satisfied. + * + * @since 2.0.0 + * @category constructors + */ +export const collectAllUntil = internal.collectAllUntil; +/** + * Accumulates incoming elements into a chunk until effectful predicate `p` is + * satisfied. + * + * @since 2.0.0 + * @category constructors + */ +export const collectAllUntilEffect = internal.collectAllUntilEffect; +/** + * Accumulates incoming elements into a chunk as long as they verify predicate + * `p`. + * + * @since 2.0.0 + * @category constructors + */ +export const collectAllWhile = internal.collectAllWhile; +/** + * Accumulates incoming elements into a chunk as long as they verify effectful + * predicate `p`. + * + * @since 2.0.0 + * @category constructors + */ +export const collectAllWhileEffect = internal.collectAllWhileEffect; +/** + * Repeatedly runs the sink for as long as its results satisfy the predicate + * `p`. The sink's results will be accumulated using the stepping function `f`. + * + * @since 2.0.0 + * @category utils + */ +export const collectAllWhileWith = internal.collectAllWhileWith; +/** + * Collects the leftovers from the stream when the sink succeeds and returns + * them as part of the sink's result. + * + * @since 2.0.0 + * @category utils + */ +export const collectLeftover = internal.collectLeftover; +/** + * Transforms this sink's input elements. + * + * @since 2.0.0 + * @category mapping + */ +export const mapInput = internal.mapInput; +/** + * Effectfully transforms this sink's input elements. + * + * @since 2.0.0 + * @category mapping + */ +export const mapInputEffect = internal.mapInputEffect; +/** + * Transforms this sink's input chunks. `f` must preserve chunking-invariance. + * + * @since 2.0.0 + * @category mapping + */ +export const mapInputChunks = internal.mapInputChunks; +/** + * Effectfully transforms this sink's input chunks. `f` must preserve + * chunking-invariance. + * + * @since 2.0.0 + * @category mapping + */ +export const mapInputChunksEffect = internal.mapInputChunksEffect; +/** + * A sink that counts the number of elements fed to it. + * + * @since 2.0.0 + * @category constructors + */ +export const count = internal.count; +/** + * Creates a sink halting with the specified defect. + * + * @since 2.0.0 + * @category constructors + */ +export const die = internal.die; +/** + * Creates a sink halting with the specified message, wrapped in a + * `RuntimeException`. + * + * @since 2.0.0 + * @category constructors + */ +export const dieMessage = internal.dieMessage; +/** + * Creates a sink halting with the specified defect. + * + * @since 2.0.0 + * @category constructors + */ +export const dieSync = internal.dieSync; +/** + * Transforms both inputs and result of this sink using the provided + * functions. + * + * @since 2.0.0 + * @category mapping + */ +export const dimap = internal.dimap; +/** + * Effectfully transforms both inputs and result of this sink using the + * provided functions. + * + * @since 2.0.0 + * @category mapping + */ +export const dimapEffect = internal.dimapEffect; +/** + * Transforms both input chunks and result of this sink using the provided + * functions. + * + * @since 2.0.0 + * @category mapping + */ +export const dimapChunks = internal.dimapChunks; +/** + * Effectfully transforms both input chunks and result of this sink using the + * provided functions. `f` and `g` must preserve chunking-invariance. + * + * @since 2.0.0 + * @category mapping + */ +export const dimapChunksEffect = internal.dimapChunksEffect; +/** + * A sink that ignores its inputs. + * + * @since 2.0.0 + * @category constructors + */ +export const drain = internal.drain; +/** + * Creates a sink that drops `n` elements. + * + * @since 2.0.0 + * @category constructors + */ +export const drop = internal.drop; +/** + * Drops incoming elements until the predicate is satisfied. + * + * @since 2.0.0 + * @category constructors + */ +export const dropUntil = internal.dropUntil; +/** + * Drops incoming elements until the effectful predicate is satisfied. + * + * @since 2.0.0 + * @category constructors + */ +export const dropUntilEffect = internal.dropUntilEffect; +/** + * Drops incoming elements as long as the predicate is satisfied. + * + * @since 2.0.0 + * @category constructors + */ +export const dropWhile = internal.dropWhile; +/** + * Drops incoming elements as long as the effectful predicate is satisfied. + * + * @since 2.0.0 + * @category constructors + */ +export const dropWhileEffect = internal.dropWhileEffect; +/** + * Returns a new sink with an attached finalizer. The finalizer is guaranteed + * to be executed so long as the sink begins execution (and regardless of + * whether or not it completes). + * + * @since 2.0.0 + * @category finalization + */ +export const ensuring = internal.ensuring; +/** + * Returns a new sink with an attached finalizer. The finalizer is guaranteed + * to be executed so long as the sink begins execution (and regardless of + * whether or not it completes). + * + * @since 2.0.0 + * @category finalization + */ +export const ensuringWith = internal.ensuringWith; +/** + * Accesses the whole context of the sink. + * + * @since 2.0.0 + * @category constructors + */ +export const context = internal.context; +/** + * Accesses the context of the sink. + * + * @since 2.0.0 + * @category constructors + */ +export const contextWith = internal.contextWith; +/** + * Accesses the context of the sink in the context of an effect. + * + * @since 2.0.0 + * @category constructors + */ +export const contextWithEffect = internal.contextWithEffect; +/** + * Accesses the context of the sink in the context of a sink. + * + * @since 2.0.0 + * @category constructors + */ +export const contextWithSink = internal.contextWithSink; +/** + * A sink that returns whether all elements satisfy the specified predicate. + * + * @since 2.0.0 + * @category constructors + */ +export const every = internal.every; +/** + * A sink that always fails with the specified error. + * + * @since 2.0.0 + * @category constructors + */ +export const fail = internal.fail; +/** + * A sink that always fails with the specified lazily evaluated error. + * + * @since 2.0.0 + * @category constructors + */ +export const failSync = internal.failSync; +/** + * Creates a sink halting with a specified `Cause`. + * + * @since 2.0.0 + * @category constructors + */ +export const failCause = internal.failCause; +/** + * Creates a sink halting with a specified lazily evaluated `Cause`. + * + * @since 2.0.0 + * @category constructors + */ +export const failCauseSync = internal.failCauseSync; +/** + * Filters the sink's input with the given predicate. + * + * @since 2.0.0 + * @category filtering + */ +export const filterInput = internal.filterInput; +/** + * Effectfully filter the input of this sink using the specified predicate. + * + * @since 2.0.0 + * @category filtering + */ +export const filterInputEffect = internal.filterInputEffect; +/** + * Creates a sink that produces values until one verifies the predicate `f`. + * + * @since 2.0.0 + * @category elements + */ +export const findEffect = internal.findEffect; +/** + * A sink that folds its inputs with the provided function, termination + * predicate and initial state. + * + * @since 2.0.0 + * @category folding + */ +export const fold = internal.fold; +/** + * Folds over the result of the sink + * + * @since 2.0.0 + * @category folding + */ +export const foldSink = internal.foldSink; +/** + * A sink that folds its input chunks with the provided function, termination + * predicate and initial state. `contFn` condition is checked only for the + * initial value and at the end of processing of each chunk. `f` and `contFn` + * must preserve chunking-invariance. + * + * @since 2.0.0 + * @category constructors + */ +export const foldChunks = internal.foldChunks; +/** + * A sink that effectfully folds its input chunks with the provided function, + * termination predicate and initial state. `contFn` condition is checked only + * for the initial value and at the end of processing of each chunk. `f` and + * `contFn` must preserve chunking-invariance. + * + * @since 2.0.0 + * @category constructors + */ +export const foldChunksEffect = internal.foldChunksEffect; +/** + * A sink that effectfully folds its inputs with the provided function, + * termination predicate and initial state. + * + * @since 2.0.0 + * @category constructors + */ +export const foldEffect = internal.foldEffect; +/** + * A sink that folds its inputs with the provided function and initial state. + * + * @since 2.0.0 + * @category constructors + */ +export const foldLeft = internal.foldLeft; +/** + * A sink that folds its input chunks with the provided function and initial + * state. `f` must preserve chunking-invariance. + * + * @since 2.0.0 + * @category constructors + */ +export const foldLeftChunks = internal.foldLeftChunks; +/** + * A sink that effectfully folds its input chunks with the provided function + * and initial state. `f` must preserve chunking-invariance. + * + * @since 2.0.0 + * @category constructors + */ +export const foldLeftChunksEffect = internal.foldLeftChunksEffect; +/** + * A sink that effectfully folds its inputs with the provided function and + * initial state. + * + * @since 2.0.0 + * @category constructors + */ +export const foldLeftEffect = internal.foldLeftEffect; +/** + * Creates a sink that folds elements of type `In` into a structure of type + * `S` until `max` elements have been folded. + * + * Like `Sink.foldWeighted`, but with a constant cost function of `1`. + * + * @since 2.0.0 + * @category constructors + */ +export const foldUntil = internal.foldUntil; +/** + * Creates a sink that effectfully folds elements of type `In` into a + * structure of type `S` until `max` elements have been folded. + * + * Like `Sink.foldWeightedEffect` but with a constant cost function of `1`. + * + * @since 2.0.0 + * @category constructors + */ +export const foldUntilEffect = internal.foldUntilEffect; +/** + * Creates a sink that folds elements of type `In` into a structure of type `S`, + * until `max` worth of elements (determined by the `costFn`) have been folded. + * + * **Note** + * + * Elements that have an individual cost larger than `max` will force the sink + * to cross the `max` cost. See `Sink.foldWeightedDecompose` for a variant + * that can handle these cases. + * + * @since 2.0.0 + * @category constructors + */ +export const foldWeighted = internal.foldWeighted; +/** + * Creates a sink that folds elements of type `In` into a structure of type + * `S`, until `max` worth of elements (determined by the `costFn`) have been + * folded. + * + * The `decompose` function will be used for decomposing elements that cause + * an `S` aggregate to cross `max` into smaller elements. For example: + * + * ```ts skip-type-checking + * pipe( + * Stream.make(1, 5, 1), + * Stream.transduce( + * Sink.foldWeightedDecompose( + * Chunk.empty(), + * 4, + * (n: number) => n, + * (n: number) => Chunk.make(n - 1, 1), + * (acc, el) => pipe(acc, Chunk.append(el)) + * ) + * ), + * Stream.runCollect + * ) + * ``` + * + * The stream would emit the elements `Chunk(1), Chunk(4), Chunk(1, 1)`. + * + * Be vigilant with this function, it has to generate "simpler" values or the + * fold may never end. A value is considered indivisible if `decompose` yields + * the empty chunk or a single-valued chunk. In these cases, there is no other + * choice than to yield a value that will cross the threshold. + * + * `Sink.foldWeightedDecomposeEffect` allows the decompose function to return an + * effect value, and consequently it allows the sink to fail. + * + * @since 2.0.0 + * @category constructors + */ +export const foldWeightedDecompose = internal.foldWeightedDecompose; +/** + * Creates a sink that effectfully folds elements of type `In` into a + * structure of type `S`, until `max` worth of elements (determined by the + * `costFn`) have been folded. + * + * The `decompose` function will be used for decomposing elements that cause + * an `S` aggregate to cross `max` into smaller elements. Be vigilant with + * this function, it has to generate "simpler" values or the fold may never + * end. A value is considered indivisible if `decompose` yields the empty + * chunk or a single-valued chunk. In these cases, there is no other choice + * than to yield a value that will cross the threshold. + * + * See `Sink.foldWeightedDecompose` for an example. + * + * @since 2.0.0 + * @category constructors + */ +export const foldWeightedDecomposeEffect = internal.foldWeightedDecomposeEffect; +/** + * Creates a sink that effectfully folds elements of type `In` into a + * structure of type `S`, until `max` worth of elements (determined by the + * `costFn`) have been folded. + * + * @note + * Elements that have an individual cost larger than `max` will force the + * sink to cross the `max` cost. See `Sink.foldWeightedDecomposeEffect` for + * a variant that can handle these cases. + * + * @since 2.0.0 + * @category constructors + */ +export const foldWeightedEffect = internal.foldWeightedEffect; +/** + * A sink that executes the provided effectful function for every element fed + * to it. + * + * @since 2.0.0 + * @category constructors + */ +export const forEach = internal.forEach; +/** + * A sink that executes the provided effectful function for every chunk fed to + * it. + * + * @since 2.0.0 + * @category constructors + */ +export const forEachChunk = internal.forEachChunk; +/** + * A sink that executes the provided effectful function for every chunk fed to + * it until `f` evaluates to `false`. + * + * @since 2.0.0 + * @category constructors + */ +export const forEachChunkWhile = internal.forEachChunkWhile; +/** + * A sink that executes the provided effectful function for every element fed + * to it until `f` evaluates to `false`. + * + * @since 2.0.0 + * @category constructors + */ +export const forEachWhile = internal.forEachWhile; +/** + * Runs this sink until it yields a result, then uses that result to create + * another sink from the provided function which will continue to run until it + * yields a result. + * + * This function essentially runs sinks in sequence. + * + * @since 2.0.0 + * @category sequencing + */ +export const flatMap = internal.flatMap; +/** + * Creates a sink from a `Channel`. + * + * @since 2.0.0 + * @category constructors + */ +export const fromChannel = internal.fromChannel; +/** + * Creates a `Channel` from a Sink. + * + * @since 2.0.0 + * @category constructors + */ +export const toChannel = internal.toChannel; +/** + * Creates a single-value sink produced from an effect. + * + * @since 2.0.0 + * @category constructors + */ +export const fromEffect = internal.fromEffect; +/** + * Create a sink which publishes each element to the specified `PubSub`. + * + * If the `shutdown` parameter is `true`, the `PubSub` will be shutdown after + * the sink is evaluated (defaults to `false`). + * + * @since 2.0.0 + * @category constructors + */ +export const fromPubSub = internal.fromPubSub; +/** + * Creates a sink from a chunk processing function. + * + * @since 2.0.0 + * @category constructors + */ +export const fromPush = internal.fromPush; +/** + * Create a sink which enqueues each element into the specified queue. + * + * If the `shutdown` parameter is `true`, the queue will be shutdown after the + * sink is evaluated (defaults to `false`). + * + * @since 2.0.0 + * @category constructors + */ +export const fromQueue = internal.fromQueue; +/** + * Creates a sink containing the first value. + * + * @since 2.0.0 + * @category constructors + */ +export const head = internal.head; +/** + * Drains the remaining elements from the stream after the sink finishes + * + * @since 2.0.0 + * @category utils + */ +export const ignoreLeftover = internal.ignoreLeftover; +/** + * Creates a sink containing the last value. + * + * @since 2.0.0 + * @category constructors + */ +export const last = internal.last; +/** + * Creates a sink that does not consume any input but provides the given chunk + * as its leftovers + * + * @since 2.0.0 + * @category constructors + */ +export const leftover = internal.leftover; +/** + * Transforms this sink's result. + * + * @since 2.0.0 + * @category mapping + */ +export const map = internal.map; +/** + * Effectfully transforms this sink's result. + * + * @since 2.0.0 + * @category mapping + */ +export const mapEffect = internal.mapEffect; +/** + * Transforms the errors emitted by this sink using `f`. + * + * @since 2.0.0 + * @category mapping + */ +export const mapError = internal.mapError; +/** + * Transforms the leftovers emitted by this sink using `f`. + * + * @since 2.0.0 + * @category mapping + */ +export const mapLeftover = internal.mapLeftover; +/** + * Creates a sink which transforms it's inputs into a string. + * + * @since 2.0.0 + * @category constructors + */ +export const mkString = internal.mkString; +/** + * Creates a sink which never terminates. + * + * @since 2.0.0 + * @category constructors + */ +export const never = internal.never; +/** + * Switch to another sink in case of failure + * + * @since 2.0.0 + * @category error handling + */ +export const orElse = internal.orElse; +/** + * Provides the sink with its required context, which eliminates its + * dependency on `R`. + * + * @since 2.0.0 + * @category context + */ +export const provideContext = internal.provideContext; +/** + * Runs both sinks in parallel on the input, , returning the result or the + * error from the one that finishes first. + * + * @since 2.0.0 + * @category utils + */ +export const race = internal.race; +/** + * Runs both sinks in parallel on the input, returning the result or the error + * from the one that finishes first. + * + * @since 2.0.0 + * @category utils + */ +export const raceBoth = internal.raceBoth; +/** + * Runs both sinks in parallel on the input, using the specified merge + * function as soon as one result or the other has been computed. + * + * @since 2.0.0 + * @category utils + */ +export const raceWith = internal.raceWith; +/** + * @since 2.0.0 + * @category error handling + */ +export const refineOrDie = internal.refineOrDie; +/** + * @since 2.0.0 + * @category error handling + */ +export const refineOrDieWith = internal.refineOrDieWith; +/** + * A sink that returns whether an element satisfies the specified predicate. + * + * @since 2.0.0 + * @category constructors + */ +export const some = internal.some; +/** + * Splits the sink on the specified predicate, returning a new sink that + * consumes elements until an element after the first satisfies the specified + * predicate. + * + * @since 2.0.0 + * @category utils + */ +export const splitWhere = internal.splitWhere; +/** + * A sink that immediately ends with the specified value. + * + * @since 2.0.0 + * @category constructors + */ +export const succeed = internal.succeed; +/** + * A sink that sums incoming numeric values. + * + * @since 2.0.0 + * @category constructors + */ +export const sum = internal.sum; +/** + * Summarize a sink by running an effect when the sink starts and again when + * it completes. + * + * @since 2.0.0 + * @category utils + */ +export const summarized = internal.summarized; +/** + * Returns a lazily constructed sink that may require effects for its + * creation. + * + * @since 2.0.0 + * @category constructors + */ +export const suspend = internal.suspend; +/** + * A sink that immediately ends with the specified lazy value. + * + * @since 2.0.0 + * @category constructors + */ +export const sync = internal.sync; +/** + * A sink that takes the specified number of values. + * + * @since 2.0.0 + * @category constructors + */ +export const take = internal.take; +/** + * @since 2.0.0 + * @category constructors + */ +export const timed = internal.timed; +/** + * Creates a sink produced from an effect. + * + * @since 2.0.0 + * @category constructors + */ +export const unwrap = internal.unwrap; +/** + * Creates a sink produced from a scoped effect. + * + * @since 2.0.0 + * @category constructors + */ +export const unwrapScoped = internal.unwrapScoped; +/** + * Constructs a `Sink` from a function which receives a `Scope` and returns + * an effect that will result in a `Sink` if successful. + * + * @since 3.11.0 + * @category constructors + */ +export const unwrapScopedWith = internal.unwrapScopedWith; +/** + * Returns the sink that executes this one and times its execution. + * + * @since 2.0.0 + * @category utils + */ +export const withDuration = internal.withDuration; +/** + * Feeds inputs to this sink until it yields a result, then switches over to + * the provided sink until it yields a result, finally combining the two + * results into a tuple. + * + * @since 2.0.0 + * @category zipping + */ +export const zip = internal.zip; +/** + * Like `Sink.zip` but keeps only the result from this sink. + * + * @since 2.0.0 + * @category zipping + */ +export const zipLeft = internal.zipLeft; +/** + * Like `Sink.zip` but keeps only the result from `that` sink. + * + * @since 2.0.0 + * @category zipping + */ +export const zipRight = internal.zipRight; +/** + * Feeds inputs to this sink until it yields a result, then switches over to + * the provided sink until it yields a result, finally combining the two + * results with `f`. + * + * @since 2.0.0 + * @category zipping + */ +export const zipWith = internal.zipWith; +//# sourceMappingURL=Sink.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/SortedMap.js b/backend/node_modules/effect/dist/esm/SortedMap.js new file mode 100644 index 0000000000000000000000000000000000000000..1f34e3785157c4ae47cd96317bce53afb46f4142 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/SortedMap.js @@ -0,0 +1,169 @@ +/** + * @since 2.0.0 + */ +import * as Equal from "./Equal.js"; +import * as Dual from "./Function.js"; +import { pipe } from "./Function.js"; +import * as Hash from "./Hash.js"; +import { format, NodeInspectSymbol, toJSON } from "./Inspectable.js"; +import * as Option from "./Option.js"; +import { pipeArguments } from "./Pipeable.js"; +import { hasProperty } from "./Predicate.js"; +import * as RBT from "./RedBlackTree.js"; +const TypeId = /*#__PURE__*/Symbol.for("effect/SortedMap"); +const SortedMapProto = { + [TypeId]: { + _K: _ => _, + _V: _ => _ + }, + [Hash.symbol]() { + return pipe(Hash.hash(this.tree), Hash.combine(Hash.hash("effect/SortedMap")), Hash.cached(this)); + }, + [Equal.symbol](that) { + return isSortedMap(that) && Equal.equals(this.tree, that.tree); + }, + [Symbol.iterator]() { + return this.tree[Symbol.iterator](); + }, + toString() { + return format(this.toJSON()); + }, + toJSON() { + return { + _id: "SortedMap", + values: Array.from(this).map(toJSON) + }; + }, + [NodeInspectSymbol]() { + return this.toJSON(); + }, + pipe() { + return pipeArguments(this, arguments); + } +}; +const makeImpl = tree => { + const self = Object.create(SortedMapProto); + self.tree = tree; + return self; +}; +/** + * @since 2.0.0 + * @category refinements + */ +export const isSortedMap = u => hasProperty(u, TypeId); +/** + * @since 2.0.0 + * @category constructors + */ +export const empty = ord => makeImpl(RBT.empty(ord)); +/** + * Creates a new `SortedMap` from an iterable collection of key/value pairs. + * + * @since 2.0.0 + * @category constructors + */ +export const fromIterable = /*#__PURE__*/Dual.dual(2, (iterable, ord) => makeImpl(RBT.fromIterable(iterable, ord))); +/** + * @since 2.0.0 + * @category constructors + */ +export const make = ord => (...entries) => fromIterable(ord)(entries); +/** + * @since 2.0.0 + * @category predicates + */ +export const isEmpty = self => size(self) === 0; +/** + * @since 2.0.0 + * @category predicates + */ +export const isNonEmpty = self => size(self) > 0; +/** + * @since 2.0.0 + * @category elements + */ +export const get = /*#__PURE__*/Dual.dual(2, (self, key) => RBT.findFirst(self.tree, key)); +/** + * Gets the `Order` that the `SortedMap` is using. + * + * @since 2.0.0 + * @category getters + */ +export const getOrder = self => RBT.getOrder(self.tree); +/** + * @since 2.0.0 + * @category elements + */ +export const has = /*#__PURE__*/Dual.dual(2, (self, key) => Option.isSome(get(self, key))); +/** + * @since 2.0.0 + * @category elements + */ +export const headOption = self => RBT.first(self.tree); +/** + * @since 2.0.0 + * @category mapping + */ +export const map = /*#__PURE__*/Dual.dual(2, (self, f) => reduce(self, empty(RBT.getOrder(self.tree)), (acc, v, k) => set(acc, k, f(v, k)))); +/** + * @since 2.0.0 + * @category folding + */ +export const reduce = /*#__PURE__*/Dual.dual(3, (self, zero, f) => RBT.reduce(self.tree, zero, f)); +/** + * @since 2.0.0 + * @category elements + */ +export const remove = /*#__PURE__*/Dual.dual(2, (self, key) => makeImpl(RBT.removeFirst(self.tree, key))); +/** + * @since 2.0.0 + * @category elements + */ +export const set = /*#__PURE__*/Dual.dual(3, (self, key, value) => RBT.has(self.tree, key) ? makeImpl(RBT.insert(RBT.removeFirst(self.tree, key), key, value)) : makeImpl(RBT.insert(self.tree, key, value))); +/** + * @since 2.0.0 + * @category getters + */ +export const size = self => RBT.size(self.tree); +/** + * @since 2.0.0 + * @category getters + */ +export const keys = self => RBT.keys(self.tree); +/** + * @since 2.0.0 + * @category getters + */ +export const values = self => RBT.values(self.tree); +/** + * @since 2.0.0 + * @category getters + */ +export const entries = self => { + const iterator = self.tree[Symbol.iterator](); + iterator[Symbol.iterator] = () => entries(self); + return iterator; +}; +/** + * @since 3.1.0 + * @category elements + */ +export const lastOption = self => RBT.last(self.tree); +/** + * @since 3.1.0 + * @category filtering + */ +export const partition = /*#__PURE__*/Dual.dual(2, (self, predicate) => { + const ord = RBT.getOrder(self.tree); + let right = empty(ord); + let left = empty(ord); + for (const value of self) { + if (predicate(value[0])) { + right = set(right, value[0], value[1]); + } else { + left = set(left, value[0], value[1]); + } + } + return [left, right]; +}); +//# sourceMappingURL=SortedMap.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/SortedMap.js.map b/backend/node_modules/effect/dist/esm/SortedMap.js.map new file mode 100644 index 0000000000000000000000000000000000000000..fe4de35cfda8fe641ccbf01466c61bdb63be804f --- /dev/null +++ b/backend/node_modules/effect/dist/esm/SortedMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SortedMap.js","names":["Equal","Dual","pipe","Hash","format","NodeInspectSymbol","toJSON","Option","pipeArguments","hasProperty","RBT","TypeId","Symbol","for","SortedMapProto","_K","_","_V","symbol","hash","tree","combine","cached","that","isSortedMap","equals","iterator","toString","_id","values","Array","from","map","arguments","makeImpl","self","Object","create","u","empty","ord","fromIterable","dual","iterable","make","entries","isEmpty","size","isNonEmpty","get","key","findFirst","getOrder","has","isSome","headOption","first","f","reduce","acc","v","k","set","zero","remove","removeFirst","value","insert","keys","lastOption","last","partition","predicate","right","left"],"sources":["../../src/SortedMap.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,IAAI,MAAM,eAAe;AACrC,SAASC,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,SAASC,MAAM,EAAoBC,iBAAiB,EAAEC,MAAM,QAAQ,kBAAkB;AACtF,OAAO,KAAKC,MAAM,MAAM,aAAa;AAGr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CAAC;EACnC,IAAIqD,KAAK,GAAGlC,KAAK,CAAOC,GAAG,CAAC;EAC5B,IAAIkC,IAAI,GAAGnC,KAAK,CAAOC,GAAG,CAAC;EAC3B,KAAK,MAAM0B,KAAK,IAAI/B,IAAI,EAAE;IACxB,IAAIqC,SAAS,CAACN,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;MACvBO,KAAK,GAAGX,GAAG,CAACW,KAAK,EAAEP,KAAK,CAAC,CAAC,CAAC,EAAEA,KAAK,CAAC,CAAC,CAAC,CAAC;IACxC,CAAC,MAAM;MACLQ,IAAI,GAAGZ,GAAG,CAACY,IAAI,EAAER,KAAK,CAAC,CAAC,CAAC,EAAEA,KAAK,CAAC,CAAC,CAAC,CAAC;IACtC;EACF;EACA,OAAO,CAACQ,IAAI,EAAED,KAAK,CAAC;AACtB,CAAC,CACF","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/SortedSet.js b/backend/node_modules/effect/dist/esm/SortedSet.js new file mode 100644 index 0000000000000000000000000000000000000000..0e8d2f0b8f1e77ad6f2ac8bcf1b98c3a603726dd --- /dev/null +++ b/backend/node_modules/effect/dist/esm/SortedSet.js @@ -0,0 +1,237 @@ +/** + * @since 2.0.0 + */ +import * as Equal from "./Equal.js"; +import * as Dual from "./Function.js"; +import { pipe } from "./Function.js"; +import * as Hash from "./Hash.js"; +import { format, NodeInspectSymbol, toJSON } from "./Inspectable.js"; +import { pipeArguments } from "./Pipeable.js"; +import { hasProperty } from "./Predicate.js"; +import * as RBT from "./RedBlackTree.js"; +const TypeId = /*#__PURE__*/Symbol.for("effect/SortedSet"); +const SortedSetProto = { + [TypeId]: { + _A: _ => _ + }, + [Hash.symbol]() { + return pipe(Hash.hash(this.keyTree), Hash.combine(Hash.hash(TypeId)), Hash.cached(this)); + }, + [Equal.symbol](that) { + return isSortedSet(that) && Equal.equals(this.keyTree, that.keyTree); + }, + [Symbol.iterator]() { + return RBT.keys(this.keyTree); + }, + toString() { + return format(this.toJSON()); + }, + toJSON() { + return { + _id: "SortedSet", + values: Array.from(this).map(toJSON) + }; + }, + [NodeInspectSymbol]() { + return this.toJSON(); + }, + pipe() { + return pipeArguments(this, arguments); + } +}; +const fromTree = keyTree => { + const a = Object.create(SortedSetProto); + a.keyTree = keyTree; + return a; +}; +/** + * @since 2.0.0 + * @category refinements + */ +export const isSortedSet = u => hasProperty(u, TypeId); +/** + * @since 2.0.0 + * @category constructors + */ +export const empty = O => fromTree(RBT.empty(O)); +/** + * Creates a new `SortedSet` from an iterable collection of values. + * + * @since 2.0.0 + * @category constructors + */ +export const fromIterable = /*#__PURE__*/Dual.dual(2, (iterable, ord) => fromTree(RBT.fromIterable(Array.from(iterable).map(k => [k, true]), ord))); +/** + * @since 2.0.0 + * @category constructors + */ +export const make = ord => (...entries) => fromIterable(entries, ord); +/** + * @since 2.0.0 + * @category elements + */ +export const add = /*#__PURE__*/Dual.dual(2, (self, value) => RBT.has(self.keyTree, value) ? self : fromTree(RBT.insert(self.keyTree, value, true))); +/** + * @since 2.0.0 + */ +export const difference = /*#__PURE__*/Dual.dual(2, (self, that) => { + let out = self; + for (const value of that) { + out = remove(out, value); + } + return out; +}); +/** + * Check if a predicate holds true for every `SortedSet` element. + * + * @since 2.0.0 + * @category elements + */ +export const every = /*#__PURE__*/Dual.dual(2, (self, predicate) => { + for (const value of self) { + if (!predicate(value)) { + return false; + } + } + return true; +}); +/** + * @since 2.0.0 + * @category filtering + */ +export const filter = /*#__PURE__*/Dual.dual(2, (self, predicate) => { + const ord = RBT.getOrder(self.keyTree); + let out = empty(ord); + for (const value of self) { + if (predicate(value)) { + out = add(out, value); + } + } + return out; +}); +/** + * @since 2.0.0 + * @category sequencing + */ +export const flatMap = /*#__PURE__*/Dual.dual(3, (self, O, f) => { + let out = empty(O); + forEach(self, a => { + for (const b of f(a)) { + out = add(out, b); + } + }); + return out; +}); +/** + * @since 2.0.0 + * @category traversing + */ +export const forEach = /*#__PURE__*/Dual.dual(2, (self, f) => RBT.forEach(self.keyTree, f)); +/** + * @since 2.0.0 + * @category elements + */ +export const has = /*#__PURE__*/Dual.dual(2, (self, value) => RBT.has(self.keyTree, value)); +/** + * @since 2.0.0 + */ +export const intersection = /*#__PURE__*/Dual.dual(2, (self, that) => { + const ord = RBT.getOrder(self.keyTree); + let out = empty(ord); + for (const value of that) { + if (has(self, value)) { + out = add(out, value); + } + } + return out; +}); +/** + * @since 2.0.0 + * @category elements + */ +export const isSubset = /*#__PURE__*/Dual.dual(2, (self, that) => every(self, a => has(that, a))); +/** + * @since 2.0.0 + * @category mapping + */ +export const map = /*#__PURE__*/Dual.dual(3, (self, O, f) => { + let out = empty(O); + forEach(self, a => { + const b = f(a); + if (!has(out, b)) { + out = add(out, b); + } + }); + return out; +}); +/** + * @since 2.0.0 + * @category filtering + */ +export const partition = /*#__PURE__*/Dual.dual(2, (self, predicate) => { + const ord = RBT.getOrder(self.keyTree); + let right = empty(ord); + let left = empty(ord); + for (const value of self) { + if (predicate(value)) { + right = add(right, value); + } else { + left = add(left, value); + } + } + return [left, right]; +}); +/** + * @since 2.0.0 + * @category elements + */ +export const remove = /*#__PURE__*/Dual.dual(2, (self, value) => fromTree(RBT.removeFirst(self.keyTree, value))); +/** + * @since 2.0.0 + * @category getters + */ +export const size = self => RBT.size(self.keyTree); +/** + * Check if a predicate holds true for some `SortedSet` element. + * + * @since 2.0.0 + * @category elements + */ +export const some = /*#__PURE__*/Dual.dual(2, (self, predicate) => { + for (const value of self) { + if (predicate(value)) { + return true; + } + } + return false; +}); +/** + * @since 2.0.0 + * @category elements + */ +export const toggle = /*#__PURE__*/Dual.dual(2, (self, value) => has(self, value) ? remove(self, value) : add(self, value)); +/** + * @since 2.0.0 + */ +export const union = /*#__PURE__*/Dual.dual(2, (self, that) => { + const ord = RBT.getOrder(self.keyTree); + let out = empty(ord); + for (const value of self) { + out = add(value)(out); + } + for (const value of that) { + out = add(value)(out); + } + return out; +}); +/** + * @since 2.0.0 + * @category getters + */ +export const values = self => RBT.keys(self.keyTree); +/** + * @since 2.0.0 + * @category equivalence + */ +export const getEquivalence = () => (a, b) => isSubset(a, b) && isSubset(b, a); +//# sourceMappingURL=SortedSet.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Stream.js b/backend/node_modules/effect/dist/esm/Stream.js new file mode 100644 index 0000000000000000000000000000000000000000..b5f31851a27b7db0421909d0289304b9b954af61 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Stream.js @@ -0,0 +1,4192 @@ +import * as groupBy_ from "./internal/groupBy.js"; +import * as internal from "./internal/stream.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const StreamTypeId = internal.StreamTypeId; +/** + * The default chunk size used by the various combinators and constructors of + * `Stream`. + * + * @since 2.0.0 + * @category constants + */ +export const DefaultChunkSize = internal.DefaultChunkSize; +/** + * Collects each underlying Chunk of the stream into a new chunk, and emits it + * on each pull. + * + * @since 2.0.0 + * @category utils + */ +export const accumulate = internal.accumulate; +/** + * Re-chunks the elements of the stream by accumulating each underlying chunk. + * + * @since 2.0.0 + * @category utils + */ +export const accumulateChunks = internal.accumulateChunks; +/** + * Creates a stream from a single value that will get cleaned up after the + * stream is consumed. + * + * @example + * ```ts + * import { Console, Effect, Stream } from "effect" + * + * // Simulating File operations + * const open = (filename: string) => + * Effect.gen(function*() { + * yield* Console.log(`Opening ${filename}`) + * return { + * getLines: Effect.succeed(["Line 1", "Line 2", "Line 3"]), + * close: Console.log(`Closing ${filename}`) + * } + * }) + * + * const stream = Stream.acquireRelease( + * open("file.txt"), + * (file) => file.close + * ).pipe(Stream.flatMap((file) => file.getLines)) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // Opening file.txt + * // Closing file.txt + * // { _id: 'Chunk', values: [ [ 'Line 1', 'Line 2', 'Line 3' ] ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const acquireRelease = internal.acquireRelease; +/** + * Aggregates elements of this stream using the provided sink for as long as + * the downstream operators on the stream are busy. + * + * This operator divides the stream into two asynchronous "islands". Operators + * upstream of this operator run on one fiber, while downstream operators run + * on another. Whenever the downstream fiber is busy processing elements, the + * upstream fiber will feed elements into the sink until it signals + * completion. + * + * Any sink can be used here, but see `Sink.foldWeightedEffect` and + * `Sink.foldUntilEffect` for sinks that cover the common usecases. + * + * @since 2.0.0 + * @category utils + */ +export const aggregate = internal.aggregate; +/** + * Like {@link aggregateWithinEither}, but only returns the `Right` results. + * + * @since 2.0.0 + * @category utils + */ +export const aggregateWithin = internal.aggregateWithin; +/** + * Aggregates elements using the provided sink until it completes, or until + * the delay signalled by the schedule has passed. + * + * This operator divides the stream into two asynchronous islands. Operators + * upstream of this operator run on one fiber, while downstream operators run + * on another. Elements will be aggregated by the sink until the downstream + * fiber pulls the aggregated value, or until the schedule's delay has passed. + * + * Aggregated elements will be fed into the schedule to determine the delays + * between pulls. + * + * @since 2.0.0 + * @category utils + */ +export const aggregateWithinEither = internal.aggregateWithinEither; +/** + * Maps the success values of this stream to the specified constant value. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.range(1, 5).pipe(Stream.as(null)) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ null, null, null, null, null ] } + * ``` + * + * @since 2.0.0 + * @category mapping + */ +export const as = internal.as; +const _async = internal._async; +export { +/** + * Creates a stream from an asynchronous callback that can be called multiple + * times. The optionality of the error type `E` in `Emit` can be used to + * signal the end of the stream by setting it to `None`. + * + * The registration function can optionally return an `Effect`, which will be + * executed if the `Fiber` executing this Effect is interrupted. + * + * @example + * ```ts + * import type { StreamEmit } from "effect" + * import { Chunk, Effect, Option, Stream } from "effect" + * + * const events = [1, 2, 3, 4] + * + * const stream = Stream.async( + * (emit: StreamEmit.Emit) => { + * events.forEach((n) => { + * setTimeout(() => { + * if (n === 3) { + * emit(Effect.fail(Option.none())) // Terminate the stream + * } else { + * emit(Effect.succeed(Chunk.of(n))) // Add the current item to the stream + * } + * }, 100 * n) + * }) + * } + * ) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 1, 2 ] } + * + * ``` + * @since 2.0.0 + * @category constructors + */ +_async as async }; +/** + * Creates a stream from an asynchronous callback that can be called multiple + * times The registration of the callback itself returns an effect. The + * optionality of the error type `E` can be used to signal the end of the + * stream, by setting it to `None`. + * + * @since 2.0.0 + * @category constructors + */ +export const asyncEffect = internal.asyncEffect; +/** + * Creates a stream from an external push-based resource. + * + * You can use the `emit` helper to emit values to the stream. The `emit` helper + * returns a boolean indicating whether the value was emitted or not. + * + * You can also use the `emit` helper to signal the end of the stream by + * using apis such as `emit.end` or `emit.fail`. + * + * By default it uses an "unbounded" buffer size. + * You can customize the buffer size and strategy by passing an object as the + * second argument with the `bufferSize` and `strategy` fields. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * Stream.asyncPush((emit) => + * Effect.acquireRelease( + * Effect.gen(function*() { + * yield* Effect.log("subscribing") + * return setInterval(() => emit.single("tick"), 1000) + * }), + * (handle) => + * Effect.gen(function*() { + * yield* Effect.log("unsubscribing") + * clearInterval(handle) + * }) + * ), { bufferSize: 16, strategy: "dropping" }) + * ``` + * + * @since 3.6.0 + * @category constructors + */ +export const asyncPush = internal.asyncPush; +/** + * Creates a stream from an asynchronous callback that can be called multiple + * times. The registration of the callback itself returns an a scoped + * resource. The optionality of the error type `E` can be used to signal the + * end of the stream, by setting it to `None`. + * + * @since 2.0.0 + * @category constructors + */ +export const asyncScoped = internal.asyncScoped; +/** + * Returns a `Stream` that first collects `n` elements from the input `Stream`, + * and then creates a new `Stream` using the specified function, and sends all + * the following elements through that. + * + * @since 2.0.0 + * @category sequencing + */ +export const branchAfter = internal.branchAfter; +/** + * Fan out the stream, producing a list of streams that have the same elements + * as this stream. The driver stream will only ever advance the `maximumLag` + * chunks before the slowest downstream stream. + * + * @example + * ```ts + * import { Console, Effect, Fiber, Schedule, Stream } from "effect" + * + * const numbers = Effect.scoped( + * Stream.range(1, 20).pipe( + * Stream.tap((n) => Console.log(`Emit ${n} element before broadcasting`)), + * Stream.broadcast(2, 5), + * Stream.flatMap(([first, second]) => + * Effect.gen(function*() { + * const fiber1 = yield* Stream.runFold(first, 0, (acc, e) => Math.max(acc, e)).pipe( + * Effect.andThen((max) => Console.log(`Maximum: ${max}`)), + * Effect.fork + * ) + * const fiber2 = yield* second.pipe( + * Stream.schedule(Schedule.spaced("1 second")), + * Stream.runForEach((n) => Console.log(`Logging to the Console: ${n}`)), + * Effect.fork + * ) + * yield* Fiber.join(fiber1).pipe( + * Effect.zip(Fiber.join(fiber2), { concurrent: true }) + * ) + * }) + * ), + * Stream.runCollect + * ) + * ) + * + * Effect.runPromise(numbers).then(console.log) + * // Emit 1 element before broadcasting + * // Emit 2 element before broadcasting + * // Emit 3 element before broadcasting + * // Emit 4 element before broadcasting + * // Emit 5 element before broadcasting + * // Emit 6 element before broadcasting + * // Emit 7 element before broadcasting + * // Emit 8 element before broadcasting + * // Emit 9 element before broadcasting + * // Emit 10 element before broadcasting + * // Emit 11 element before broadcasting + * // Logging to the Console: 1 + * // Logging to the Console: 2 + * // Logging to the Console: 3 + * // Logging to the Console: 4 + * // Logging to the Console: 5 + * // Emit 12 element before broadcasting + * // Emit 13 element before broadcasting + * // Emit 14 element before broadcasting + * // Emit 15 element before broadcasting + * // Emit 16 element before broadcasting + * // Logging to the Console: 6 + * // Logging to the Console: 7 + * // Logging to the Console: 8 + * // Logging to the Console: 9 + * // Logging to the Console: 10 + * // Emit 17 element before broadcasting + * // Emit 18 element before broadcasting + * // Emit 19 element before broadcasting + * // Emit 20 element before broadcasting + * // Logging to the Console: 11 + * // Logging to the Console: 12 + * // Logging to the Console: 13 + * // Logging to the Console: 14 + * // Logging to the Console: 15 + * // Maximum: 20 + * // Logging to the Console: 16 + * // Logging to the Console: 17 + * // Logging to the Console: 18 + * // Logging to the Console: 19 + * // Logging to the Console: 20 + * // { _id: 'Chunk', values: [ undefined ] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +export const broadcast = internal.broadcast; +/** + * Returns a new Stream that multicasts the original Stream, subscribing to it as soon as the first consumer subscribes. + * As long as there is at least one consumer, the upstream will continue running and emitting data. + * When all consumers have exited, the upstream will be finalized. + * + * @since 3.8.0 + * @category utils + */ +export const share = internal.share; +/** + * Fan out the stream, producing a dynamic number of streams that have the + * same elements as this stream. The driver stream will only ever advance the + * `maximumLag` chunks before the slowest downstream stream. + * + * @since 2.0.0 + * @category utils + */ +export const broadcastDynamic = internal.broadcastDynamic; +/** + * Converts the stream to a scoped list of queues. Every value will be + * replicated to every queue with the slowest queue being allowed to buffer + * `maximumLag` chunks before the driver is back pressured. + * + * Queues can unsubscribe from upstream by shutting down. + * + * @since 2.0.0 + * @category utils + */ +export const broadcastedQueues = internal.broadcastedQueues; +/** + * Converts the stream to a scoped dynamic amount of queues. Every chunk will + * be replicated to every queue with the slowest queue being allowed to buffer + * `maximumLag` chunks before the driver is back pressured. + * + * Queues can unsubscribe from upstream by shutting down. + * + * @since 2.0.0 + * @category utils + */ +export const broadcastedQueuesDynamic = internal.broadcastedQueuesDynamic; +/** + * Allows a faster producer to progress independently of a slower consumer by + * buffering up to `capacity` elements in a queue. + * + * Note: This combinator destroys the chunking structure. It's recommended to + * use rechunk afterwards. Additionally, prefer capacities that are powers + * of 2 for better performance. + * + * @example + * ```ts + * import { Console, Effect, Schedule, Stream } from "effect" + * + * const stream = Stream.range(1, 10).pipe( + * Stream.tap((n) => Console.log(`before buffering: ${n}`)), + * Stream.buffer({ capacity: 4 }), + * Stream.tap((n) => Console.log(`after buffering: ${n}`)), + * Stream.schedule(Schedule.spaced("5 seconds")) + * ) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // before buffering: 1 + * // before buffering: 2 + * // before buffering: 3 + * // before buffering: 4 + * // before buffering: 5 + * // before buffering: 6 + * // after buffering: 1 + * // after buffering: 2 + * // before buffering: 7 + * // after buffering: 3 + * // before buffering: 8 + * // after buffering: 4 + * // before buffering: 9 + * // after buffering: 5 + * // before buffering: 10 + * // ... + * ``` + * + * @since 2.0.0 + * @category utils + */ +export const buffer = internal.buffer; +/** + * Allows a faster producer to progress independently of a slower consumer by + * buffering up to `capacity` chunks in a queue. + * + * @note Prefer capacities that are powers of 2 for better performance. + * @since 2.0.0 + * @category utils + */ +export const bufferChunks = internal.bufferChunks; +/** + * Switches over to the stream produced by the provided function in case this + * one fails with a typed error. + * + * @since 2.0.0 + * @category error handling + */ +export const catchAll = internal.catchAll; +/** + * Switches over to the stream produced by the provided function in case this + * one fails. Allows recovery from all causes of failure, including + * interruption if the stream is uninterruptible. + * + * @since 2.0.0 + * @category error handling + */ +export const catchAllCause = internal.catchAllCause; +/** + * Switches over to the stream produced by the provided function in case this + * one fails with some typed error. + * + * @since 2.0.0 + * @category error handling + */ +export const catchSome = internal.catchSome; +/** + * Switches over to the stream produced by the provided function in case this + * one fails with an error matching the given `_tag`. + * + * @since 2.0.0 + * @category error handling + */ +export const catchTag = internal.catchTag; +/** + * Switches over to the stream produced by one of the provided functions, in + * case this one fails with an error matching one of the given `_tag`'s. + * + * @since 2.0.0 + * @category error handling + */ +export const catchTags = internal.catchTags; +/** + * Switches over to the stream produced by the provided function in case this + * one fails with some errors. Allows recovery from all causes of failure, + * including interruption if the stream is uninterruptible. + * + * @since 2.0.0 + * @category error handling + */ +export const catchSomeCause = internal.catchSomeCause; +/** + * Returns a new stream that only emits elements that are not equal to the + * previous element emitted, using natural equality to determine whether two + * elements are equal. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.make(1, 1, 1, 2, 2, 3, 4).pipe(Stream.changes) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 1, 2, 3, 4 ] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +export const changes = internal.changes; +/** + * Returns a new stream that only emits elements that are not equal to the + * previous element emitted, using the specified function to determine whether + * two elements are equal. + * + * @since 2.0.0 + * @category utils + */ +export const changesWith = internal.changesWith; +/** + * Returns a new stream that only emits elements that are not equal to the + * previous element emitted, using the specified effectual function to + * determine whether two elements are equal. + * + * @since 2.0.0 + * @category utils + */ +export const changesWithEffect = internal.changesWithEffect; +/** + * Exposes the underlying chunks of the stream as a stream of chunks of + * elements. + * + * @since 2.0.0 + * @category utils + */ +export const chunks = internal.chunks; +/** + * Performs the specified stream transformation with the chunk structure of + * the stream exposed. + * + * @since 2.0.0 + * @category utils + */ +export const chunksWith = internal.chunksWith; +/** + * Combines the elements from this stream and the specified stream by + * repeatedly applying the function `f` to extract an element using both sides + * and conceptually "offer" it to the destination stream. `f` can maintain + * some internal state to control the combining process, with the initial + * state being specified by `s`. + * + * Where possible, prefer `Stream.combineChunks` for a more efficient + * implementation. + * + * @since 2.0.0 + * @category utils + */ +export const combine = internal.combine; +/** + * Combines the chunks from this stream and the specified stream by repeatedly + * applying the function `f` to extract a chunk using both sides and + * conceptually "offer" it to the destination stream. `f` can maintain some + * internal state to control the combining process, with the initial state + * being specified by `s`. + * + * @since 2.0.0 + * @category utils + */ +export const combineChunks = internal.combineChunks; +/** + * Concatenates the specified stream with this stream, resulting in a stream + * that emits the elements from this stream and then the elements from the + * specified stream. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const s1 = Stream.make(1, 2, 3) + * const s2 = Stream.make(4, 5) + * + * const stream = Stream.concat(s1, s2) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 1, 2, 3, 4, 5 ] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +export const concat = internal.concat; +/** + * Concatenates all of the streams in the chunk to one stream. + * + * @example + * ```ts + * import { Chunk, Effect, Stream } from "effect" + * + * const s1 = Stream.make(1, 2, 3) + * const s2 = Stream.make(4, 5) + * const s3 = Stream.make(6, 7, 8) + * + * const stream = Stream.concatAll(Chunk.make(s1, s2, s3)) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { + * // _id: 'Chunk', + * // values: [ + * // 1, 2, 3, 4, + * // 5, 6, 7, 8 + * // ] + * // } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const concatAll = internal.concatAll; +/** + * Composes this stream with the specified stream to create a cartesian + * product of elements. The `right` stream would be run multiple times, for + * every element in the `left` stream. + * + * See also `Stream.zip` for the more common point-wise variant. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const s1 = Stream.make(1, 2, 3) + * const s2 = Stream.make("a", "b") + * + * const product = Stream.cross(s1, s2) + * + * Effect.runPromise(Stream.runCollect(product)).then(console.log) + * // { + * // _id: "Chunk", + * // values: [ + * // [ 1, "a" ], [ 1, "b" ], [ 2, "a" ], [ 2, "b" ], [ 3, "a" ], [ 3, "b" ] + * // ] + * // } + * ``` + * + * @since 2.0.0 + * @category utils + */ +export const cross = internal.cross; +/** + * Composes this stream with the specified stream to create a cartesian + * product of elements, but keeps only elements from `left` stream. The `right` + * stream would be run multiple times, for every element in the `left` stream. + * + * See also `Stream.zipLeft` for the more common point-wise variant. + * + * @since 2.0.0 + * @category utils + */ +export const crossLeft = internal.crossLeft; +/** + * Composes this stream with the specified stream to create a cartesian + * product of elements, but keeps only elements from the `right` stream. The + * `left` stream would be run multiple times, for every element in the `right` + * stream. + * + * See also `Stream.zipRight` for the more common point-wise variant. + * + * @since 2.0.0 + * @category utils + */ +export const crossRight = internal.crossRight; +/** + * Composes this stream with the specified stream to create a cartesian + * product of elements with a specified function. The `right` stream would be + * run multiple times, for every element in the `left` stream. + * + * See also `Stream.zipWith` for the more common point-wise variant. + * + * @since 2.0.0 + * @category utils + */ +export const crossWith = internal.crossWith; +/** + * Delays the emission of values by holding new values for a set duration. If + * no new values arrive during that time the value is emitted, however if a + * new value is received during the holding period the previous value is + * discarded and the process is repeated with the new value. + * + * This operator is useful if you have a stream of "bursty" events which + * eventually settle down and you only need the final event of the burst. For + * example, a search engine may only want to initiate a search after a user + * has paused typing so as to not prematurely recommend results. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * let last = Date.now() + * const log = (message: string) => + * Effect.sync(() => { + * const end = Date.now() + * console.log(`${message} after ${end - last}ms`) + * last = end + * }) + * + * const stream = Stream.make(1, 2, 3).pipe( + * Stream.concat( + * Stream.fromEffect(Effect.sleep("200 millis").pipe(Effect.as(4))) // Emit 4 after 200 ms + * ), + * Stream.concat(Stream.make(5, 6)), // Continue with more rapid values + * Stream.concat( + * Stream.fromEffect(Effect.sleep("150 millis").pipe(Effect.as(7))) // Emit 7 after 150 ms + * ), + * Stream.concat(Stream.make(8)), + * Stream.tap((n) => log(`Received ${n}`)), + * Stream.debounce("100 millis"), // Only emit values after a pause of at least 100 milliseconds, + * Stream.tap((n) => log(`> Emitted ${n}`)) + * ) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // Received 1 after 5ms + * // Received 2 after 2ms + * // Received 3 after 0ms + * // > Emitted 3 after 104ms + * // Received 4 after 99ms + * // Received 5 after 1ms + * // Received 6 after 0ms + * // > Emitted 6 after 101ms + * // Received 7 after 50ms + * // Received 8 after 1ms + * // > Emitted 8 after 101ms + * // { _id: 'Chunk', values: [ 3, 6, 8 ] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +export const debounce = internal.debounce; +/** + * The stream that dies with the specified defect. + * + * @since 2.0.0 + * @category constructors + */ +export const die = internal.die; +/** + * The stream that dies with the specified lazily evaluated defect. + * + * @since 2.0.0 + * @category constructors + */ +export const dieSync = internal.dieSync; +/** + * The stream that dies with an exception described by `message`. + * + * @since 2.0.0 + * @category constructors + */ +export const dieMessage = internal.dieMessage; +/** + * More powerful version of `Stream.broadcast`. Allows to provide a function + * that determines what queues should receive which elements. The decide + * function will receive the indices of the queues in the resulting list. + * + * @since 2.0.0 + * @category utils + */ +export const distributedWith = internal.distributedWith; +/** + * More powerful version of `Stream.distributedWith`. This returns a function + * that will produce new queues and corresponding indices. You can also + * provide a function that will be executed after the final events are + * enqueued in all queues. Shutdown of the queues is handled by the driver. + * Downstream users can also shutdown queues manually. In this case the driver + * will continue but no longer backpressure on them. + * + * @since 2.0.0 + * @category utils + */ +export const distributedWithDynamic = internal.distributedWithDynamic; +/** + * Converts this stream to a stream that executes its effects but emits no + * elements. Useful for sequencing effects using streams: + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * // We create a stream and immediately drain it. + * const stream = Stream.range(1, 6).pipe(Stream.drain) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +export const drain = internal.drain; +/** + * Drains the provided stream in the background for as long as this stream is + * running. If this stream ends before `other`, `other` will be interrupted. + * If `other` fails, this stream will fail with that error. + * + * @since 2.0.0 + * @category utils + */ +export const drainFork = internal.drainFork; +/** + * Drops the specified number of elements from this stream. + * + * @since 2.0.0 + * @category utils + */ +export const drop = internal.drop; +/** + * Drops the last specified number of elements from this stream. + * + * @note This combinator keeps `n` elements in memory. Be careful with big + * numbers. + * @since 2.0.0 + * @category utils + */ +export const dropRight = internal.dropRight; +/** + * Drops all elements of the stream until the specified predicate evaluates to + * `true`. + * + * @since 2.0.0 + * @category utils + */ +export const dropUntil = internal.dropUntil; +/** + * Drops all elements of the stream until the specified effectful predicate + * evaluates to `true`. + * + * @since 2.0.0 + * @category utils + */ +export const dropUntilEffect = internal.dropUntilEffect; +/** + * Drops all elements of the stream for as long as the specified predicate + * evaluates to `true`. + * + * @since 2.0.0 + * @category utils + */ +export const dropWhile = internal.dropWhile; +/** + * Drops all elements of the stream for as long as the specified predicate + * produces an effect that evalutates to `true` + * + * @since 2.0.0 + * @category utils + */ +export const dropWhileEffect = internal.dropWhileEffect; +/** + * Returns a stream whose failures and successes have been lifted into an + * `Either`. The resulting stream cannot fail, because the failures have been + * exposed as part of the `Either` success case. + * + * @note The stream will end as soon as the first error occurs. + * + * @since 2.0.0 + * @category utils + */ +export const either = internal.either; +/** + * The empty stream. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.empty + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const empty = internal.empty; +/** + * Executes the provided finalizer after this stream's finalizers run. + * + * @example + * ```ts + * import { Console, Effect, Stream } from "effect" + * + * const program = Stream.fromEffect(Console.log("Application Logic.")).pipe( + * Stream.concat(Stream.finalizer(Console.log("Finalizing the stream"))), + * Stream.ensuring( + * Console.log("Doing some other works after stream's finalization") + * ) + * ) + * + * Effect.runPromise(Stream.runCollect(program)).then(console.log) + * // Application Logic. + * // Finalizing the stream + * // Doing some other works after stream's finalization + * // { _id: 'Chunk', values: [ undefined, undefined ] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +export const ensuring = internal.ensuring; +/** + * Executes the provided finalizer after this stream's finalizers run. + * + * @since 2.0.0 + * @category utils + */ +export const ensuringWith = internal.ensuringWith; +/** + * Accesses the whole context of the stream. + * + * @since 2.0.0 + * @category context + */ +export const context = internal.context; +/** + * Accesses the context of the stream. + * + * @since 2.0.0 + * @category context + */ +export const contextWith = internal.contextWith; +/** + * Accesses the context of the stream in the context of an effect. + * + * @since 2.0.0 + * @category context + */ +export const contextWithEffect = internal.contextWithEffect; +/** + * Accesses the context of the stream in the context of a stream. + * + * @since 2.0.0 + * @category context + */ +export const contextWithStream = internal.contextWithStream; +/** + * Creates a stream that executes the specified effect but emits no elements. + * + * @since 2.0.0 + * @category constructors + */ +export const execute = internal.execute; +/** + * Terminates with the specified error. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.fail("Uh oh!") + * + * Effect.runPromiseExit(Stream.runCollect(stream)).then(console.log) + * // { + * // _id: 'Exit', + * // _tag: 'Failure', + * // cause: { _id: 'Cause', _tag: 'Fail', failure: 'Uh oh!' } + * // } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const fail = internal.fail; +/** + * Terminates with the specified lazily evaluated error. + * + * @since 2.0.0 + * @category constructors + */ +export const failSync = internal.failSync; +/** + * The stream that always fails with the specified `Cause`. + * + * @since 2.0.0 + * @category constructors + */ +export const failCause = internal.failCause; +/** + * The stream that always fails with the specified lazily evaluated `Cause`. + * + * @since 2.0.0 + * @category constructors + */ +export const failCauseSync = internal.failCauseSync; +/** + * Filters the elements emitted by this stream using the provided function. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.range(1, 11).pipe(Stream.filter((n) => n % 2 === 0)) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 2, 4, 6, 8, 10 ] } + * ``` + * + * @since 2.0.0 + * @category filtering + */ +export const filter = internal.filter; +/** + * Effectfully filters the elements emitted by this stream. + * + * @since 2.0.0 + * @category filtering + */ +export const filterEffect = internal.filterEffect; +/** + * Performs a filter and map in a single step. + * + * @since 2.0.0 + * @category utils + */ +export const filterMap = internal.filterMap; +/** + * Performs an effectful filter and map in a single step. + * + * @since 2.0.0 + * @category utils + */ +export const filterMapEffect = internal.filterMapEffect; +/** + * Transforms all elements of the stream for as long as the specified partial + * function is defined. + * + * @since 2.0.0 + * @category utils + */ +export const filterMapWhile = internal.filterMapWhile; +/** + * Effectfully transforms all elements of the stream for as long as the + * specified partial function is defined. + * + * @since 2.0.0 + * @category utils + */ +export const filterMapWhileEffect = internal.filterMapWhileEffect; +/** + * Creates a one-element stream that never fails and executes the finalizer + * when it ends. + * + * @example + * ```ts + * import { Console, Effect, Stream } from "effect" + * + * const application = Stream.fromEffect(Console.log("Application Logic.")) + * + * const deleteDir = (dir: string) => Console.log(`Deleting dir: ${dir}`) + * + * const program = application.pipe( + * Stream.concat( + * Stream.finalizer( + * deleteDir("tmp").pipe( + * Effect.andThen(Console.log("Temporary directory was deleted.")) + * ) + * ) + * ) + * ) + * + * Effect.runPromise(Stream.runCollect(program)).then(console.log) + * // Application Logic. + * // Deleting dir: tmp + * // Temporary directory was deleted. + * // { _id: 'Chunk', values: [ undefined, undefined ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const finalizer = internal.finalizer; +/** + * Finds the first element emitted by this stream that satisfies the provided + * predicate. + * + * @since 2.0.0 + * @category elements + */ +export const find = internal.find; +/** + * Finds the first element emitted by this stream that satisfies the provided + * effectful predicate. + * + * @since 2.0.0 + * @category elements + */ +export const findEffect = internal.findEffect; +/** + * Returns a stream made of the concatenation in strict order of all the + * streams produced by passing each element of this stream to `f0` + * + * @since 2.0.0 + * @category sequencing + */ +export const flatMap = internal.flatMap; +/** + * Flattens this stream-of-streams into a stream made of the concatenation in + * strict order of all the streams. + * + * @since 2.0.0 + * @category sequencing + */ +export const flatten = internal.flatten; +/** + * Submerges the chunks carried by this stream into the stream's structure, + * while still preserving them. + * + * @since 2.0.0 + * @category sequencing + */ +export const flattenChunks = internal.flattenChunks; +/** + * Flattens `Effect` values into the stream's structure, preserving all + * information about the effect. + * + * @since 2.0.0 + * @category sequencing + */ +export const flattenEffect = internal.flattenEffect; +/** + * Unwraps `Exit` values that also signify end-of-stream by failing with `None`. + * + * @since 2.0.0 + * @category sequencing + */ +export const flattenExitOption = internal.flattenExitOption; +/** + * Submerges the iterables carried by this stream into the stream's structure, + * while still preserving them. + * + * @since 2.0.0 + * @category sequencing + */ +export const flattenIterables = internal.flattenIterables; +/** + * Unwraps `Exit` values and flatten chunks that also signify end-of-stream + * by failing with `None`. + * + * @since 2.0.0 + * @category sequencing + */ +export const flattenTake = internal.flattenTake; +/** + * Repeats this stream forever. + * + * @since 2.0.0 + * @category utils + */ +export const forever = internal.forever; +/** + * Creates a stream from an `AsyncIterable`. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const myAsyncIterable = async function*() { + * yield 1 + * yield 2 + * } + * + * const stream = Stream.fromAsyncIterable( + * myAsyncIterable(), + * (e) => new Error(String(e)) // Error Handling + * ) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 1, 2 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const fromAsyncIterable = internal.fromAsyncIterable; +/** + * Creates a stream from a `Channel`. + * + * @since 2.0.0 + * @category constructors + */ +export const fromChannel = internal.fromChannel; +/** + * Creates a channel from a `Stream`. + * + * @since 2.0.0 + * @category constructors + */ +export const toChannel = internal.toChannel; +/** + * Creates a stream from a `Chunk` of values. + * + * @example + * ```ts + * import { Chunk, Effect, Stream } from "effect" + * + * // Creating a stream with values from a single Chunk + * const stream = Stream.fromChunk(Chunk.make(1, 2, 3)) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 1, 2, 3 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const fromChunk = internal.fromChunk; +/** + * Creates a stream from a subscription to a `PubSub`. + * + * **Options** + * + * - `shutdown`: If `true`, the `PubSub` will be shutdown after the stream is evaluated (defaults to `false`) + * + * @since 2.0.0 + * @category constructors + */ +export const fromChunkPubSub = internal.fromChunkPubSub; +/** + * Creates a stream from a `Queue` of values. + * + * **Options** + * + * - `shutdown`: If `true`, the queue will be shutdown after the stream is evaluated (defaults to `false`) + * + * @since 2.0.0 + * @category constructors + */ +export const fromChunkQueue = internal.fromChunkQueue; +/** + * Creates a stream from an arbitrary number of chunks. + * + * @example + * ```ts + * import { Chunk, Effect, Stream } from "effect" + * + * // Creating a stream with values from multiple Chunks + * const stream = Stream.fromChunks(Chunk.make(1, 2, 3), Chunk.make(4, 5, 6)) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 1, 2, 3, 4, 5, 6 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const fromChunks = internal.fromChunks; +/** + * Either emits the success value of this effect or terminates the stream + * with the failure value of this effect. + * + * @example + * ```ts + * import { Effect, Random, Stream } from "effect" + * + * const stream = Stream.fromEffect(Random.nextInt) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // Example Output: { _id: 'Chunk', values: [ 922694024 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const fromEffect = internal.fromEffect; +/** + * Creates a stream from an effect producing a value of type `A` or an empty + * `Stream`. + * + * @since 2.0.0 + * @category constructors + */ +export const fromEffectOption = internal.fromEffectOption; +/** + * Creates a stream from a subscription to a `PubSub`. + * + * **Options** + * + * - `shutdown`: If `true`, the `PubSub` will be shutdown after the stream is evaluated (defaults to `false`) + * + * @since 2.0.0 + * @category constructors + */ +export const fromPubSub = internal.fromPubSub; +/** + * Creates a stream from a subscription to a `TPubSub`. + * + * @since 3.10.0 + * @category constructors + */ +export const fromTPubSub = internal.fromTPubSub; +/** + * Creates a new `Stream` from an iterable collection of values. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const numbers = [1, 2, 3] + * + * const stream = Stream.fromIterable(numbers) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 1, 2, 3 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const fromIterable = internal.fromIterable; +/** + * Creates a stream from an effect producing a value of type `Iterable`. + * + * @example + * ```ts + * import { Context, Effect, Stream } from "effect" + * + * class Database extends Context.Tag("Database")< + * Database, + * { readonly getUsers: Effect.Effect> } + * >() {} + * + * const getUsers = Database.pipe(Effect.andThen((_) => _.getUsers)) + * + * const stream = Stream.fromIterableEffect(getUsers) + * + * Effect.runPromise( + * Stream.runCollect(stream.pipe(Stream.provideService(Database, { getUsers: Effect.succeed(["user1", "user2"]) }))) + * ).then(console.log) + * // { _id: 'Chunk', values: [ 'user1', 'user2' ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const fromIterableEffect = internal.fromIterableEffect; +/** + * Creates a stream from an iterator + * + * @since 2.0.0 + * @category constructors + */ +export const fromIteratorSucceed = internal.fromIteratorSucceed; +/** + * Creates a stream from an effect that pulls elements from another stream. + * + * See `Stream.toPull` for reference. + * + * @since 2.0.0 + * @category constructors + */ +export const fromPull = internal.fromPull; +/** + * Creates a stream from a queue of values + * + * **Options** + * + * - `maxChunkSize`: The maximum number of queued elements to put in one chunk in the stream + * - `shutdown`: If `true`, the queue will be shutdown after the stream is evaluated (defaults to `false`) + * + * @since 2.0.0 + * @category constructors + */ +export const fromQueue = internal.fromQueue; +/** + * Creates a stream from a TQueue of values + * + * @since 3.10.0 + * @category constructors + */ +export const fromTQueue = internal.fromTQueue; +/** + * Creates a stream from a `ReadableStream`. + * + * See https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream. + * + * @since 2.0.0 + * @category constructors + */ +export const fromReadableStream = internal.fromReadableStream; +/** + * Creates a stream from a `ReadableStreamBYOBReader`. + * + * See https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamBYOBReader. + * + * @since 2.0.0 + * @category constructors + */ +export const fromReadableStreamByob = internal.fromReadableStreamByob; +/** + * Creates a stream from a `Schedule` that does not require any further + * input. The stream will emit an element for each value output from the + * schedule, continuing for as long as the schedule continues. + * + * @example + * ```ts + * import { Effect, Schedule, Stream } from "effect" + * + * // Emits values every 1 second for a total of 5 emissions + * const schedule = Schedule.spaced("1 second").pipe( + * Schedule.compose(Schedule.recurs(5)) + * ) + * + * const stream = Stream.fromSchedule(schedule) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 0, 1, 2, 3, 4 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const fromSchedule = internal.fromSchedule; +/** + * Creates a pipeline that groups on adjacent keys, calculated by the + * specified function. + * + * @since 2.0.0 + * @category grouping + */ +export const groupAdjacentBy = internal.groupAdjacentBy; +/** + * More powerful version of `Stream.groupByKey`. + * + * @example + * ```ts + * import { Chunk, Effect, GroupBy, Stream } from "effect" + * + * const groupByKeyResult = Stream.fromIterable([ + * "Mary", + * "James", + * "Robert", + * "Patricia", + * "John", + * "Jennifer", + * "Rebecca", + * "Peter" + * ]).pipe( + * Stream.groupBy((name) => Effect.succeed([name.substring(0, 1), name])) + * ) + * + * const stream = GroupBy.evaluate(groupByKeyResult, (key, stream) => + * Stream.fromEffect( + * Stream.runCollect(stream).pipe( + * Effect.andThen((chunk) => [key, Chunk.size(chunk)] as const) + * ) + * )) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { + * // _id: 'Chunk', + * // values: [ [ 'M', 1 ], [ 'J', 3 ], [ 'R', 2 ], [ 'P', 2 ] ] + * // } + * ``` + * + * @since 2.0.0 + * @category grouping + */ +export const groupBy = groupBy_.groupBy; +/** + * Partition a stream using a function and process each stream individually. + * This returns a data structure that can be used to further filter down which + * groups shall be processed. + * + * After calling apply on the GroupBy object, the remaining groups will be + * processed in parallel and the resulting streams merged in a + * nondeterministic fashion. + * + * Up to `buffer` elements may be buffered in any group stream before the + * producer is backpressured. Take care to consume from all streams in order + * to prevent deadlocks. + * + * For example, to collect the first 2 words for every starting letter from a + * stream of words: + * + * ```ts + * import { pipe, GroupBy, Stream } from "effect" + * + * pipe( + * Stream.fromIterable(["hello", "world", "hi", "holla"]), + * Stream.groupByKey((word) => word[0]), + * GroupBy.evaluate((key, stream) => + * pipe( + * stream, + * Stream.take(2), + * Stream.map((words) => [key, words] as const) + * ) + * ) + * ) + * ``` + * + * @since 2.0.0 + * @category grouping + */ +export const groupByKey = groupBy_.groupByKey; +/** + * Partitions the stream with specified `chunkSize`. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.range(0, 8).pipe(Stream.grouped(3)) + * + * Effect.runPromise(Stream.runCollect(stream)).then((chunks) => console.log("%o", chunks)) + * // { + * // _id: 'Chunk', + * // values: [ + * // { _id: 'Chunk', values: [ 0, 1, 2, [length]: 3 ] }, + * // { _id: 'Chunk', values: [ 3, 4, 5, [length]: 3 ] }, + * // { _id: 'Chunk', values: [ 6, 7, 8, [length]: 3 ] }, + * // [length]: 3 + * // ] + * // } + * ``` + * + * @since 2.0.0 + * @category grouping + */ +export const grouped = internal.grouped; +/** + * Partitions the stream with the specified `chunkSize` or until the specified + * `duration` has passed, whichever is satisfied first. + * + * @example + * ```ts + * import { Chunk, Effect, Schedule, Stream } from "effect" + * + * const stream = Stream.range(0, 9).pipe( + * Stream.repeat(Schedule.spaced("1 second")), + * Stream.groupedWithin(18, "1.5 seconds"), + * Stream.take(3) + * ) + * + * Effect.runPromise(Stream.runCollect(stream)).then((chunks) => console.log(Chunk.toArray(chunks))) + * // [ + * // { + * // _id: 'Chunk', + * // values: [ + * // 0, 1, 2, 3, 4, 5, 6, + * // 7, 8, 9, 0, 1, 2, 3, + * // 4, 5, 6, 7 + * // ] + * // }, + * // { + * // _id: 'Chunk', + * // values: [ + * // 8, 9, 0, 1, 2, + * // 3, 4, 5, 6, 7, + * // 8, 9 + * // ] + * // }, + * // { + * // _id: 'Chunk', + * // values: [ + * // 0, 1, 2, 3, 4, 5, 6, + * // 7, 8, 9, 0, 1, 2, 3, + * // 4, 5, 6, 7 + * // ] + * // } + * // ] + * ``` + * + * @since 2.0.0 + * @category grouping + */ +export const groupedWithin = internal.groupedWithin; +/** + * Specialized version of haltWhen which halts the evaluation of this stream + * after the given duration. + * + * An element in the process of being pulled will not be interrupted when the + * given duration completes. See `interruptAfter` for this behavior. + * + * @since 2.0.0 + * @category utils + */ +export const haltAfter = internal.haltAfter; +/** + * Halts the evaluation of this stream when the provided effect completes. The + * given effect will be forked as part of the returned stream, and its success + * will be discarded. + * + * An element in the process of being pulled will not be interrupted when the + * effect completes. See `interruptWhen` for this behavior. + * + * If the effect completes with a failure, the stream will emit that failure. + * + * @since 2.0.0 + * @category utils + */ +export const haltWhen = internal.haltWhen; +/** + * Halts the evaluation of this stream when the provided promise resolves. + * + * If the promise completes with a failure, the stream will emit that failure. + * + * @since 2.0.0 + * @category utils + */ +export const haltWhenDeferred = internal.haltWhenDeferred; +/** + * The identity pipeline, which does not modify streams in any way. + * + * @since 2.0.0 + * @category utils + */ +export const identity = internal.identityStream; +/** + * Interleaves this stream and the specified stream deterministically by + * alternating pulling values from this stream and the specified stream. When + * one stream is exhausted all remaining values in the other stream will be + * pulled. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const s1 = Stream.make(1, 2, 3) + * const s2 = Stream.make(4, 5, 6) + * + * const stream = Stream.interleave(s1, s2) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 1, 4, 2, 5, 3, 6 ] } + * ``` + * @since 2.0.0 + * @category utils + */ +export const interleave = internal.interleave; +/** + * Combines this stream and the specified stream deterministically using the + * stream of boolean values `pull` to control which stream to pull from next. + * A value of `true` indicates to pull from this stream and a value of `false` + * indicates to pull from the specified stream. Only consumes as many elements + * as requested by the `pull` stream. If either this stream or the specified + * stream are exhausted further requests for values from that stream will be + * ignored. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const s1 = Stream.make(1, 3, 5, 7, 9) + * const s2 = Stream.make(2, 4, 6, 8, 10) + * + * const booleanStream = Stream.make(true, false, false).pipe(Stream.forever) + * + * const stream = Stream.interleaveWith(s1, s2, booleanStream) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { + * // _id: 'Chunk', + * // values: [ + * // 1, 2, 4, 3, 6, + * // 8, 5, 10, 7, 9 + * // ] + * // } + * ``` + * + * @since 2.0.0 + * @category utils + */ +export const interleaveWith = internal.interleaveWith; +/** + * Intersperse stream with provided `element`. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.make(1, 2, 3, 4, 5).pipe(Stream.intersperse(0)) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { + * // _id: 'Chunk', + * // values: [ + * // 1, 0, 2, 0, 3, + * // 0, 4, 0, 5 + * // ] + * // } + * ``` + * + * @since 2.0.0 + * @category utils + */ +export const intersperse = internal.intersperse; +/** + * Intersperse the specified element, also adding a prefix and a suffix. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.make(1, 2, 3, 4, 5).pipe( + * Stream.intersperseAffixes({ + * start: "[", + * middle: "-", + * end: "]" + * }) + * ) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { + * // _id: 'Chunk', + * // values: [ + * // '[', 1, '-', 2, '-', + * // 3, '-', 4, '-', 5, + * // ']' + * // ] + * // } + * ``` + * + * @since 2.0.0 + * @category utils + */ +export const intersperseAffixes = internal.intersperseAffixes; +/** + * Specialized version of `Stream.interruptWhen` which interrupts the + * evaluation of this stream after the given `Duration`. + * + * @since 2.0.0 + * @category utils + */ +export const interruptAfter = internal.interruptAfter; +/** + * Interrupts the evaluation of this stream when the provided effect + * completes. The given effect will be forked as part of this stream, and its + * success will be discarded. This combinator will also interrupt any + * in-progress element being pulled from upstream. + * + * If the effect completes with a failure before the stream completes, the + * returned stream will emit that failure. + * + * @since 2.0.0 + * @category utils + */ +export const interruptWhen = internal.interruptWhen; +/** + * Interrupts the evaluation of this stream when the provided promise + * resolves. This combinator will also interrupt any in-progress element being + * pulled from upstream. + * + * If the promise completes with a failure, the stream will emit that failure. + * + * @since 2.0.0 + * @category utils + */ +export const interruptWhenDeferred = internal.interruptWhenDeferred; +/** + * The infinite stream of iterative function application: a, f(a), f(f(a)), + * f(f(f(a))), ... + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * // An infinite Stream of numbers starting from 1 and incrementing + * const stream = Stream.iterate(1, (n) => n + 1) + * + * Effect.runPromise(Stream.runCollect(stream.pipe(Stream.take(10)))).then(console.log) + * // { _id: 'Chunk', values: [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const iterate = internal.iterate; +/** + * Creates a stream from an sequence of values. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.make(1, 2, 3) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 1, 2, 3 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * Transforms the elements of this stream using the supplied function. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.make(1, 2, 3).pipe(Stream.map((n) => n + 1)) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 2, 3, 4 ] } + * ``` + * + * @since 2.0.0 + * @category mapping + */ +export const map = internal.map; +/** + * Statefully maps over the elements of this stream to produce new elements. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const runningTotal = (stream: Stream.Stream): Stream.Stream => + * stream.pipe(Stream.mapAccum(0, (s, a) => [s + a, s + a])) + * + * // input: 0, 1, 2, 3, 4, 5, 6 + * Effect.runPromise(Stream.runCollect(runningTotal(Stream.range(0, 6)))).then( + * console.log + * ) + * // { _id: "Chunk", values: [ 0, 1, 3, 6, 10, 15, 21 ] } + * ``` + * + * @since 2.0.0 + * @category mapping + */ +export const mapAccum = internal.mapAccum; +/** + * Statefully and effectfully maps over the elements of this stream to produce + * new elements. + * + * @since 2.0.0 + * @category mapping + */ +export const mapAccumEffect = internal.mapAccumEffect; +/** + * Returns a stream whose failure and success channels have been mapped by the + * specified `onFailure` and `onSuccess` functions. + * + * @since 2.0.0 + * @category utils + */ +export const mapBoth = internal.mapBoth; +/** + * Transforms the chunks emitted by this stream. + * + * @since 2.0.0 + * @category mapping + */ +export const mapChunks = internal.mapChunks; +/** + * Effectfully transforms the chunks emitted by this stream. + * + * @since 2.0.0 + * @category mapping + */ +export const mapChunksEffect = internal.mapChunksEffect; +/** + * Maps each element to an iterable, and flattens the iterables into the + * output of this stream. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const numbers = Stream.make("1-2-3", "4-5", "6").pipe( + * Stream.mapConcat((s) => s.split("-")), + * Stream.map((s) => parseInt(s)) + * ) + * + * Effect.runPromise(Stream.runCollect(numbers)).then(console.log) + * // { _id: 'Chunk', values: [ 1, 2, 3, 4, 5, 6 ] } + * ``` + * + * @since 2.0.0 + * @category mapping + */ +export const mapConcat = internal.mapConcat; +/** + * Maps each element to a chunk, and flattens the chunks into the output of + * this stream. + * + * @since 2.0.0 + * @category mapping + */ +export const mapConcatChunk = internal.mapConcatChunk; +/** + * Effectfully maps each element to a chunk, and flattens the chunks into the + * output of this stream. + * + * @since 2.0.0 + * @category mapping + */ +export const mapConcatChunkEffect = internal.mapConcatChunkEffect; +/** + * Effectfully maps each element to an iterable, and flattens the iterables + * into the output of this stream. + * + * @since 2.0.0 + * @category mapping + */ +export const mapConcatEffect = internal.mapConcatEffect; +/** + * Maps over elements of the stream with the specified effectful function. + * + * @example + * ```ts + * import { Effect, Random, Stream } from "effect" + * + * const stream = Stream.make(10, 20, 30).pipe( + * Stream.mapEffect((n) => Random.nextIntBetween(0, n)) + * ) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // Example Output: { _id: 'Chunk', values: [ 7, 19, 8 ] } + * ``` + * + * @since 2.0.0 + * @category mapping + */ +export const mapEffect = groupBy_.mapEffectOptions; +/** + * Transforms the errors emitted by this stream using `f`. + * + * @since 2.0.0 + * @category mapping + */ +export const mapError = internal.mapError; +/** + * Transforms the full causes of failures emitted by this stream. + * + * @since 2.0.0 + * @category mapping + */ +export const mapErrorCause = internal.mapErrorCause; +/** + * Merges this stream and the specified stream together. + * + * New produced stream will terminate when both specified stream terminate if + * no termination strategy is specified. + * + * @example + * ```ts + * import { Effect, Schedule, Stream } from "effect" + * + * const s1 = Stream.make(1, 2, 3).pipe( + * Stream.schedule(Schedule.spaced("100 millis")) + * ) + * const s2 = Stream.make(4, 5, 6).pipe( + * Stream.schedule(Schedule.spaced("200 millis")) + * ) + * + * const stream = Stream.merge(s1, s2) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 1, 4, 2, 3, 5, 6 ] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +export const merge = internal.merge; +/** + * Merges a variable list of streams in a non-deterministic fashion. Up to `n` + * streams may be consumed in parallel and up to `outputBuffer` chunks may be + * buffered by this operator. + * + * @since 2.0.0 + * @category utils + */ +export const mergeAll = internal.mergeAll; +/** + * Merges a struct of streams into a single stream of tagged values. + * @category combinators + * @since 3.8.5 + * + * @example + * ```ts + * import { Stream } from "effect" + * // Stream.Stream<{ _tag: "a"; value: number; } | { _tag: "b"; value: string; }> + * const res = Stream.mergeWithTag({ + * a: Stream.make(0), + * b: Stream.make("") + * }, { concurrency: "unbounded" }) + * ``` + */ +export const mergeWithTag = internal.mergeWithTag; +/** + * Merges this stream and the specified stream together to a common element + * type with the specified mapping functions. + * + * New produced stream will terminate when both specified stream terminate if + * no termination strategy is specified. + * + * @example + * ```ts + * import { Effect, Schedule, Stream } from "effect" + * + * const s1 = Stream.make("1", "2", "3").pipe( + * Stream.schedule(Schedule.spaced("100 millis")) + * ) + * const s2 = Stream.make(4.1, 5.3, 6.2).pipe( + * Stream.schedule(Schedule.spaced("200 millis")) + * ) + * + * const stream = Stream.mergeWith(s1, s2, { + * onSelf: (s) => parseInt(s), + * onOther: (n) => Math.floor(n) + * }) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 1, 4, 2, 3, 5, 6 ] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +export const mergeWith = internal.mergeWith; +/** + * Merges this stream and the specified stream together to produce a stream of + * eithers. + * + * @since 2.0.0 + * @category utils + */ +export const mergeEither = internal.mergeEither; +/** + * Merges this stream and the specified stream together, discarding the values + * from the right stream. + * + * @since 2.0.0 + * @category utils + */ +export const mergeLeft = internal.mergeLeft; +/** + * Merges this stream and the specified stream together, discarding the values + * from the left stream. + * + * @since 2.0.0 + * @category utils + */ +export const mergeRight = internal.mergeRight; +/** + * Returns a combined string resulting from concatenating each of the values + * from the stream. + * + * @since 2.0.0 + * @category utils + */ +export const mkString = internal.mkString; +/** + * The stream that never produces any value or fails with any error. + * + * @since 2.0.0 + * @category constructors + */ +export const never = internal.never; +/** + * Adds an effect to be executed at the end of the stream. + * + * @example + * ```ts + * import { Console, Effect, Stream } from "effect" + * + * const stream = Stream.make(1, 2, 3).pipe( + * Stream.map((n) => n * 2), + * Stream.tap((n) => Console.log(`after mapping: ${n}`)), + * Stream.onEnd(Console.log("Stream ended")) + * ) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // after mapping: 2 + * // after mapping: 4 + * // after mapping: 6 + * // Stream ended + * // { _id: 'Chunk', values: [ 2, 4, 6 ] } + * ``` + * + * @since 3.6.0 + * @category sequencing + */ +export const onEnd = internal.onEnd; +/** + * Runs the specified effect if this stream fails, providing the error to the + * effect if it exists. + * + * Note: Unlike `Effect.onError` there is no guarantee that the provided + * effect will not be interrupted. + * + * @since 2.0.0 + * @category utils + */ +export const onError = internal.onError; +/** + * Runs the specified effect if this stream ends. + * + * @since 2.0.0 + * @category utils + */ +export const onDone = internal.onDone; +/** + * Adds an effect to be executed at the start of the stream. + * + * @example + * ```ts + * import { Console, Effect, Stream } from "effect" + * + * const stream = Stream.make(1, 2, 3).pipe( + * Stream.onStart(Console.log("Stream started")), + * Stream.map((n) => n * 2), + * Stream.tap((n) => Console.log(`after mapping: ${n}`)) + * ) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // Stream started + * // after mapping: 2 + * // after mapping: 4 + * // after mapping: 6 + * // { _id: 'Chunk', values: [ 2, 4, 6 ] } + * ``` + * + * @since 3.6.0 + * @category sequencing + */ +export const onStart = internal.onStart; +/** + * Translates any failure into a stream termination, making the stream + * infallible and all failures unchecked. + * + * @since 2.0.0 + * @category error handling + */ +export const orDie = internal.orDie; +/** + * Keeps none of the errors, and terminates the stream with them, using the + * specified function to convert the `E` into a defect. + * + * @since 2.0.0 + * @category error handling + */ +export const orDieWith = internal.orDieWith; +/** + * Switches to the provided stream in case this one fails with a typed error. + * + * See also `Stream.catchAll`. + * + * @since 2.0.0 + * @category error handling + */ +export const orElse = internal.orElse; +/** + * Switches to the provided stream in case this one fails with a typed error. + * + * See also `Stream.catchAll`. + * + * @since 2.0.0 + * @category error handling + */ +export const orElseEither = internal.orElseEither; +/** + * Fails with given error in case this one fails with a typed error. + * + * See also `Stream.catchAll`. + * + * @since 2.0.0 + * @category error handling + */ +export const orElseFail = internal.orElseFail; +/** + * Produces the specified element if this stream is empty. + * + * @since 2.0.0 + * @category error handling + */ +export const orElseIfEmpty = internal.orElseIfEmpty; +/** + * Produces the specified chunk if this stream is empty. + * + * @since 2.0.0 + * @category error handling + */ +export const orElseIfEmptyChunk = internal.orElseIfEmptyChunk; +/** + * Switches to the provided stream in case this one is empty. + * + * @since 2.0.0 + * @category error handling + */ +export const orElseIfEmptyStream = internal.orElseIfEmptyStream; +/** + * Succeeds with the specified value if this one fails with a typed error. + * + * @since 2.0.0 + * @category error handling + */ +export const orElseSucceed = internal.orElseSucceed; +/** + * Like `Stream.unfold`, but allows the emission of values to end one step further + * than the unfolding of the state. This is useful for embedding paginated + * APIs, hence the name. + * + * @example + * ```ts + * import { Effect, Option, Stream } from "effect" + * + * const stream = Stream.paginate(0, (n) => [ + * n, + * n < 3 ? Option.some(n + 1) : Option.none() + * ]) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 0, 1, 2, 3 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const paginate = internal.paginate; +/** + * Like `Stream.unfoldChunk`, but allows the emission of values to end one step + * further than the unfolding of the state. This is useful for embedding + * paginated APIs, hence the name. + * + * @since 2.0.0 + * @category constructors + */ +export const paginateChunk = internal.paginateChunk; +/** + * Like `Stream.unfoldChunkEffect`, but allows the emission of values to end one step + * further than the unfolding of the state. This is useful for embedding + * paginated APIs, hence the name. + * + * @since 2.0.0 + * @category constructors + */ +export const paginateChunkEffect = internal.paginateChunkEffect; +/** + * Like `Stream.unfoldEffect` but allows the emission of values to end one step + * further than the unfolding of the state. This is useful for embedding + * paginated APIs, hence the name. + * + * @since 2.0.0 + * @category constructors + */ +export const paginateEffect = internal.paginateEffect; +/** + * Splits a stream into two substreams based on a predicate. + * + * **Details** + * + * The `Stream.partition` function splits a stream into two parts: one for + * elements that satisfy the predicate (evaluated to `true`) and another for + * those that do not (evaluated to `false`). + * + * The faster stream may advance up to `bufferSize` elements ahead of the slower + * one. + * + * **Example** (Partitioning a Stream into Even and Odd Numbers) + * + * ```ts + * import { Effect, Stream } from "effect" + * + * const partition = Stream.range(1, 9).pipe( + * Stream.partition((n) => n % 2 === 0, { bufferSize: 5 }) + * ) + * + * const program = Effect.scoped( + * Effect.gen(function*() { + * const [odds, evens] = yield* partition + * console.log(yield* Stream.runCollect(odds)) + * console.log(yield* Stream.runCollect(evens)) + * }) + * ) + * + * Effect.runPromise(program) + * // { _id: 'Chunk', values: [ 1, 3, 5, 7, 9 ] } + * // { _id: 'Chunk', values: [ 2, 4, 6, 8 ] } + * ``` + * + * @see {@link partitionEither} for partitioning a stream based on effectful + * conditions. + * + * @since 2.0.0 + * @category utils + */ +export const partition = internal.partition; +/** + * Splits a stream into two substreams based on an effectful condition. + * + * **Details** + * + * The `Stream.partitionEither` function is used to divide a stream into two + * parts: one for elements that satisfy a condition producing `Either.left` + * values, and another for those that produce `Either.right` values. This + * function applies an effectful predicate to each element in the stream to + * determine which substream it belongs to. + * + * The faster stream may advance up to `bufferSize` elements ahead of the slower + * one. + * + * **Example** (Partitioning a Stream with an Effectful Predicate) + * + * ```ts + * import { Effect, Either, Stream } from "effect" + * + * const partition = Stream.range(1, 9).pipe( + * Stream.partitionEither( + * (n) => Effect.succeed(n % 2 === 0 ? Either.right(n) : Either.left(n)), + * { bufferSize: 5 } + * ) + * ) + * + * const program = Effect.scoped( + * Effect.gen(function*() { + * const [evens, odds] = yield* partition + * console.log(yield* Stream.runCollect(evens)) + * console.log(yield* Stream.runCollect(odds)) + * }) + * ) + * + * Effect.runPromise(program) + * // { _id: 'Chunk', values: [ 1, 3, 5, 7, 9 ] } + * // { _id: 'Chunk', values: [ 2, 4, 6, 8 ] } + * ``` + * + * @see {@link partition} for partitioning a stream based on simple conditions. + * + * @since 2.0.0 + * @category utils + */ +export const partitionEither = internal.partitionEither; +/** + * Peels off enough material from the stream to construct a `Z` using the + * provided `Sink` and then returns both the `Z` and the rest of the + * `Stream` in a scope. Like all scoped values, the provided stream is + * valid only within the scope. + * + * @since 2.0.0 + * @category utils + */ +export const peel = internal.peel; +/** + * Pipes all of the values from this stream through the provided sink. + * + * See also `Stream.transduce`. + * + * @since 2.0.0 + * @category utils + */ +export const pipeThrough = internal.pipeThrough; +/** + * Pipes all the values from this stream through the provided channel. + * + * @since 2.0.0 + * @category utils + */ +export const pipeThroughChannel = internal.pipeThroughChannel; +/** + * Pipes all values from this stream through the provided channel, passing + * through any error emitted by this stream unchanged. + * + * @since 2.0.0 + * @category utils + */ +export const pipeThroughChannelOrFail = internal.pipeThroughChannelOrFail; +/** + * Emits the provided chunk before emitting any other value. + * + * @since 2.0.0 + * @category utils + */ +export const prepend = internal.prepend; +/** + * Provides the stream with its required context, which eliminates its + * dependency on `R`. + * + * @since 2.0.0 + * @category context + */ +export const provideContext = internal.provideContext; +/** + * Provides the stream with some of its required context, which eliminates its + * dependency on `R`. + * + * @since 3.16.9 + * @category context + */ +export const provideSomeContext = internal.provideSomeContext; +/** + * Provides a `Layer` to the stream, which translates it to another level. + * + * @since 2.0.0 + * @category context + */ +export const provideLayer = internal.provideLayer; +/** + * Provides the stream with the single service it requires. If the stream + * requires more than one service use `Stream.provideContext` instead. + * + * @since 2.0.0 + * @category context + */ +export const provideService = internal.provideService; +/** + * Provides the stream with the single service it requires. If the stream + * requires more than one service use `Stream.provideContext` instead. + * + * @since 2.0.0 + * @category context + */ +export const provideServiceEffect = internal.provideServiceEffect; +/** + * Provides the stream with the single service it requires. If the stream + * requires more than one service use `Stream.provideContext` instead. + * + * @since 2.0.0 + * @category context + */ +export const provideServiceStream = internal.provideServiceStream; +/** + * Transforms the context being provided to the stream with the specified + * function. + * + * @since 2.0.0 + * @category context + */ +export const mapInputContext = internal.mapInputContext; +/** + * Splits the context into two parts, providing one part using the + * specified layer and leaving the remainder `R0`. + * + * @since 2.0.0 + * @category context + */ +export const provideSomeLayer = internal.provideSomeLayer; +/** + * Returns a stream that mirrors the first upstream to emit an item. + * As soon as one of the upstream emits a first value, the other is interrupted. + * The resulting stream will forward all items from the "winning" source stream. + * Any upstream failures will cause the returned stream to fail. + * + * @example + * ```ts + * import { Stream, Schedule, Console, Effect } from "effect" + * + * const stream = Stream.fromSchedule(Schedule.spaced('2 millis')).pipe( + * Stream.race(Stream.fromSchedule(Schedule.spaced('1 millis'))), + * Stream.take(6), + * Stream.tap(Console.log) + * ) + * + * Effect.runPromise(Stream.runDrain(stream)) + * // Output each millisecond from the first stream, the rest streams are interrupted + * // 0 + * // 1 + * // 2 + * // 3 + * // 4 + * // 5 + * ``` + * @since 3.7.0 + * @category racing + */ +export const race = internal.race; +/** + * Returns a stream that mirrors the first upstream to emit an item. + * As soon as one of the upstream emits a first value, all the others are interrupted. + * The resulting stream will forward all items from the "winning" source stream. + * Any upstream failures will cause the returned stream to fail. + * + * @example + * ```ts + * import { Stream, Schedule, Console, Effect } from "effect" + * + * const stream = Stream.raceAll( + * Stream.fromSchedule(Schedule.spaced('1 millis')), + * Stream.fromSchedule(Schedule.spaced('2 millis')), + * Stream.fromSchedule(Schedule.spaced('4 millis')), + * ).pipe(Stream.take(6), Stream.tap(Console.log)) + * + * Effect.runPromise(Stream.runDrain(stream)) + * // Output each millisecond from the first stream, the rest streams are interrupted + * // 0 + * // 1 + * // 2 + * // 3 + * // 4 + * // 5 + * ``` + * @since 3.5.0 + * @category racing + */ +export const raceAll = internal.raceAll; +/** + * Constructs a stream from a range of integers, including both endpoints. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * // A Stream with a range of numbers from 1 to 5 + * const stream = Stream.range(1, 5) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 1, 2, 3, 4, 5 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const range = internal.range; +/** + * Re-chunks the elements of the stream into chunks of `n` elements each. The + * last chunk might contain less than `n` elements. + * + * @since 2.0.0 + * @category utils + */ +export const rechunk = internal.rechunk; +/** + * Keeps some of the errors, and terminates the fiber with the rest + * + * @since 2.0.0 + * @category error handling + */ +export const refineOrDie = internal.refineOrDie; +/** + * Keeps some of the errors, and terminates the fiber with the rest, using the + * specified function to convert the `E` into a defect. + * + * @since 2.0.0 + * @category error handling + */ +export const refineOrDieWith = internal.refineOrDieWith; +/** + * Repeats the entire stream using the specified schedule. The stream will + * execute normally, and then repeat again according to the provided schedule. + * + * @example + * ```ts + * import { Effect, Schedule, Stream } from "effect" + * + * const stream = Stream.repeat(Stream.succeed(1), Schedule.forever) + * + * Effect.runPromise(Stream.runCollect(stream.pipe(Stream.take(5)))).then(console.log) + * // { _id: 'Chunk', values: [ 1, 1, 1, 1, 1 ] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +export const repeat = internal.repeat; +/** + * Creates a stream from an effect producing a value of type `A` which repeats + * forever. + * + * @example + * ```ts + * import { Effect, Random, Stream } from "effect" + * + * const stream = Stream.repeatEffect(Random.nextInt) + * + * Effect.runPromise(Stream.runCollect(stream.pipe(Stream.take(5)))).then(console.log) + * // Example Output: { _id: 'Chunk', values: [ 3891571149, 4239494205, 2352981603, 2339111046, 1488052210 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const repeatEffect = internal.repeatEffect; +/** + * Creates a stream from an effect producing chunks of `A` values which + * repeats forever. + * + * @since 2.0.0 + * @category constructors + */ +export const repeatEffectChunk = internal.repeatEffectChunk; +/** + * Creates a stream from an effect producing chunks of `A` values until it + * fails with `None`. + * + * @since 2.0.0 + * @category constructors + */ +export const repeatEffectChunkOption = internal.repeatEffectChunkOption; +/** + * Creates a stream from an effect producing values of type `A` until it fails + * with `None`. + * + * @example + * ```ts + * // In this example, we're draining an Iterator to create a stream from it + * import { Stream, Effect, Option } from "effect" + * + * const drainIterator = (it: Iterator): Stream.Stream => + * Stream.repeatEffectOption( + * Effect.sync(() => it.next()).pipe( + * Effect.andThen((res) => { + * if (res.done) { + * return Effect.fail(Option.none()) + * } + * return Effect.succeed(res.value) + * }) + * ) + * ) + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const repeatEffectOption = internal.repeatEffectOption; +/** + * Creates a stream from an effect producing a value of type `A`, which is + * repeated using the specified schedule. + * + * @since 2.0.0 + * @category constructors + */ +export const repeatEffectWithSchedule = internal.repeatEffectWithSchedule; +/** + * Repeats the entire stream using the specified schedule. The stream will + * execute normally, and then repeat again according to the provided schedule. + * The schedule output will be emitted at the end of each repetition. + * + * @since 2.0.0 + * @category utils + */ +export const repeatEither = internal.repeatEither; +/** + * Repeats each element of the stream using the provided schedule. Repetitions + * are done in addition to the first execution, which means using + * `Schedule.recurs(1)` actually results in the original effect, plus an + * additional recurrence, for a total of two repetitions of each value in the + * stream. + * + * @since 2.0.0 + * @category utils + */ +export const repeatElements = internal.repeatElements; +/** + * Repeats each element of the stream using the provided schedule. When the + * schedule is finished, then the output of the schedule will be emitted into + * the stream. Repetitions are done in addition to the first execution, which + * means using `Schedule.recurs(1)` actually results in the original effect, + * plus an additional recurrence, for a total of two repetitions of each value + * in the stream. + * + * This function accepts two conversion functions, which allow the output of + * this stream and the output of the provided schedule to be unified into a + * single type. For example, `Either` or similar data type. + * + * @since 2.0.0 + * @category utils + */ +export const repeatElementsWith = internal.repeatElementsWith; +/** + * Repeats the provided value infinitely. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.repeatValue(0) + * + * Effect.runPromise(Stream.runCollect(stream.pipe(Stream.take(5)))).then(console.log) + * // { _id: 'Chunk', values: [ 0, 0, 0, 0, 0 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const repeatValue = internal.repeatValue; +/** + * Repeats the entire stream using the specified schedule. The stream will + * execute normally, and then repeat again according to the provided schedule. + * The schedule output will be emitted at the end of each repetition and can + * be unified with the stream elements using the provided functions. + * + * @since 2.0.0 + * @category utils + */ +export const repeatWith = internal.repeatWith; +/** + * When the stream fails, retry it according to the given schedule + * + * This retries the entire stream, so will re-execute all of the stream's + * acquire operations. + * + * The schedule is reset as soon as the first element passes through the + * stream again. + * + * @since 2.0.0 + * @category utils + */ +export const retry = internal.retry; +/** + * Apply an `ExecutionPlan` to the stream, which allows you to fallback to + * different resources in case of failure. + * + * If you have a stream that could fail with partial results, you can use + * the `preventFallbackOnPartialStream` option to prevent contamination of + * the final stream with partial results. + * + * @since 3.16.0 + * @category Error handling + * @experimental + */ +export const withExecutionPlan = internal.withExecutionPlan; +/** + * Runs the sink on the stream to produce either the sink's result or an error. + * + * @since 2.0.0 + * @category destructors + */ +export const run = internal.run; +/** + * Runs the stream and collects all of its elements to a chunk. + * + * @since 2.0.0 + * @category destructors + */ +export const runCollect = internal.runCollect; +/** + * Runs the stream and emits the number of elements processed + * + * @since 2.0.0 + * @category destructors + */ +export const runCount = internal.runCount; +/** + * Runs the stream only for its effects. The emitted elements are discarded. + * + * @since 2.0.0 + * @category destructors + */ +export const runDrain = internal.runDrain; +/** + * Executes a pure fold over the stream of values - reduces all elements in + * the stream to a value of type `S`. + * + * @since 2.0.0 + * @category destructors + */ +export const runFold = internal.runFold; +/** + * Executes an effectful fold over the stream of values. + * + * @since 2.0.0 + * @category destructors + */ +export const runFoldEffect = internal.runFoldEffect; +/** + * Executes a pure fold over the stream of values. Returns a scoped value that + * represents the scope of the stream. + * + * @since 2.0.0 + * @category destructors + */ +export const runFoldScoped = internal.runFoldScoped; +/** + * Executes an effectful fold over the stream of values. Returns a scoped + * value that represents the scope of the stream. + * + * @since 2.0.0 + * @category destructors + */ +export const runFoldScopedEffect = internal.runFoldScopedEffect; +/** + * Reduces the elements in the stream to a value of type `S`. Stops the fold + * early when the condition is not fulfilled. Example: + * + * @since 2.0.0 + * @category destructors + */ +export const runFoldWhile = internal.runFoldWhile; +/** + * Executes an effectful fold over the stream of values. Stops the fold early + * when the condition is not fulfilled. + * + * @since 2.0.0 + * @category destructors + */ +export const runFoldWhileEffect = internal.runFoldWhileEffect; +/** + * Executes a pure fold over the stream of values. Returns a scoped value that + * represents the scope of the stream. Stops the fold early when the condition + * is not fulfilled. + * + * @since 2.0.0 + * @category destructors + */ +export const runFoldWhileScoped = internal.runFoldWhileScoped; +/** + * Executes an effectful fold over the stream of values. Returns a scoped + * value that represents the scope of the stream. Stops the fold early when + * the condition is not fulfilled. + * + * @since 2.0.0 + * @category destructors + */ +export const runFoldWhileScopedEffect = internal.runFoldWhileScopedEffect; +/** + * Consumes all elements of the stream, passing them to the specified + * callback. + * + * @since 2.0.0 + * @category destructors + */ +export const runForEach = internal.runForEach; +/** + * Consumes all elements of the stream, passing them to the specified + * callback. + * + * @since 2.0.0 + * @category destructors + */ +export const runForEachChunk = internal.runForEachChunk; +/** + * Like `Stream.runForEachChunk`, but returns a scoped effect so the + * finalization order can be controlled. + * + * @since 2.0.0 + * @category destructors + */ +export const runForEachChunkScoped = internal.runForEachChunkScoped; +/** + * Like `Stream.forEach`, but returns a scoped effect so the finalization + * order can be controlled. + * + * @since 2.0.0 + * @category destructors + */ +export const runForEachScoped = internal.runForEachScoped; +/** + * Consumes elements of the stream, passing them to the specified callback, + * and terminating consumption when the callback returns `false`. + * + * @since 2.0.0 + * @category destructors + */ +export const runForEachWhile = internal.runForEachWhile; +/** + * Like `Stream.runForEachWhile`, but returns a scoped effect so the + * finalization order can be controlled. + * + * @since 2.0.0 + * @category destructors + */ +export const runForEachWhileScoped = internal.runForEachWhileScoped; +/** + * Runs the stream to completion and yields the first value emitted by it, + * discarding the rest of the elements. + * + * @since 2.0.0 + * @category destructors + */ +export const runHead = internal.runHead; +/** + * Publishes elements of this stream to a `PubSub`. Stream failure and ending will + * also be signalled. + * + * @since 2.0.0 + * @category destructors + */ +export const runIntoPubSub = internal.runIntoPubSub; +/** + * Like `Stream.runIntoPubSub`, but provides the result as a scoped effect to + * allow for scope composition. + * + * @since 2.0.0 + * @category destructors + */ +export const runIntoPubSubScoped = internal.runIntoPubSubScoped; +/** + * Enqueues elements of this stream into a queue. Stream failure and ending + * will also be signalled. + * + * @since 2.0.0 + * @category destructors + */ +export const runIntoQueue = internal.runIntoQueue; +/** + * Like `Stream.runIntoQueue`, but provides the result as a scoped Effect + * to allow for scope composition. + * + * @since 2.0.0 + * @category destructors + */ +export const runIntoQueueElementsScoped = internal.runIntoQueueElementsScoped; +/** + * Like `Stream.runIntoQueue`, but provides the result as a scoped effect + * to allow for scope composition. + * + * @since 2.0.0 + * @category destructors + */ +export const runIntoQueueScoped = internal.runIntoQueueScoped; +/** + * Runs the stream to completion and yields the last value emitted by it, + * discarding the rest of the elements. + * + * @since 2.0.0 + * @category destructors + */ +export const runLast = internal.runLast; +/** + * @since 2.0.0 + * @category destructors + */ +export const runScoped = internal.runScoped; +/** + * Runs the stream to a sink which sums elements, provided they are Numeric. + * + * @since 2.0.0 + * @category destructors + */ +export const runSum = internal.runSum; +/** + * Statefully maps over the elements of this stream to produce all + * intermediate results of type `S` given an initial S. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.range(1, 6).pipe(Stream.scan(0, (a, b) => a + b)) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 0, 1, 3, 6, 10, 15, 21 ] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +export const scan = internal.scan; +/** + * Statefully and effectfully maps over the elements of this stream to produce + * all intermediate results of type `S` given an initial S. + * + * @since 2.0.0 + * @category utils + */ +export const scanEffect = internal.scanEffect; +/** + * Statefully maps over the elements of this stream to produce all + * intermediate results. + * + * See also `Stream.scan`. + * + * @since 2.0.0 + * @category utils + */ +export const scanReduce = internal.scanReduce; +/** + * Statefully and effectfully maps over the elements of this stream to produce + * all intermediate results. + * + * See also `Stream.scanEffect`. + * + * @since 2.0.0 + * @category utils + */ +export const scanReduceEffect = internal.scanReduceEffect; +/** + * Schedules the output of the stream using the provided `schedule`. + * + * @since 2.0.0 + * @category utils + */ +export const schedule = internal.schedule; +/** + * Schedules the output of the stream using the provided `schedule` and emits + * its output at the end (if `schedule` is finite). Uses the provided function + * to align the stream and schedule outputs on the same type. + * + * @since 2.0.0 + * @category utils + */ +export const scheduleWith = internal.scheduleWith; +/** + * Creates a single-valued stream from a scoped resource. + * + * @example + * ```ts + * import { Console, Effect, Stream } from "effect" + * + * // Creating a single-valued stream from a scoped resource + * const stream = Stream.scoped( + * Effect.acquireRelease( + * Console.log("acquire"), + * () => Console.log("release") + * ) + * ).pipe( + * Stream.flatMap(() => Console.log("use")) + * ) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // acquire + * // use + * // release + * // { _id: 'Chunk', values: [ undefined ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const scoped = internal.scoped; +/** + * Use a function that receives a scope and returns an effect to emit an output + * element. The output element will be the result of the returned effect, if + * successful. + * + * @since 3.11.0 + * @category constructors + */ +export const scopedWith = internal.scopedWith; +/** + * Emits a sliding window of `n` elements. + * + * ```ts + * import { pipe, Stream } from "effect" + * + * pipe( + * Stream.make(1, 2, 3, 4), + * Stream.sliding(2), + * Stream.runCollect + * ) + * // => Chunk(Chunk(1, 2), Chunk(2, 3), Chunk(3, 4)) + * ``` + * + * @since 2.0.0 + * @category utils + */ +export const sliding = internal.sliding; +/** + * Like `sliding`, but with a configurable `stepSize` parameter. + * + * @since 2.0.0 + * @category utils + */ +export const slidingSize = internal.slidingSize; +/** + * Converts an option on values into an option on errors. + * + * @since 2.0.0 + * @category utils + */ +export const some = internal.some; +/** + * Extracts the optional value, or returns the given 'default'. + * + * @since 2.0.0 + * @category utils + */ +export const someOrElse = internal.someOrElse; +/** + * Extracts the optional value, or fails with the given error 'e'. + * + * @since 2.0.0 + * @category utils + */ +export const someOrFail = internal.someOrFail; +/** + * Splits elements based on a predicate or refinement. + * + * ```ts + * import { pipe, Stream } from "effect" + * + * pipe( + * Stream.range(1, 10), + * Stream.split((n) => n % 4 === 0), + * Stream.runCollect + * ) + * // => Chunk(Chunk(1, 2, 3), Chunk(5, 6, 7), Chunk(9)) + * ``` + * + * @since 2.0.0 + * @category utils + */ +export const split = internal.split; +/** + * Splits elements on a delimiter and transforms the splits into desired output. + * + * @since 2.0.0 + * @category utils + */ +export const splitOnChunk = internal.splitOnChunk; +/** + * Splits strings on newlines. Handles both Windows newlines (`\r\n`) and UNIX + * newlines (`\n`). + * + * @since 2.0.0 + * @category combinators + */ +export const splitLines = internal.splitLines; +/** + * Creates a single-valued pure stream. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * // A Stream with a single number + * const stream = Stream.succeed(3) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 3 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const succeed = internal.succeed; +/** + * Creates a single-valued pure stream. + * + * @since 2.0.0 + * @category constructors + */ +export const sync = internal.sync; +/** + * Returns a lazily constructed stream. + * + * @since 2.0.0 + * @category constructors + */ +export const suspend = internal.suspend; +/** + * Takes the specified number of elements from this stream. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.take(Stream.iterate(0, (n) => n + 1), 5) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 0, 1, 2, 3, 4 ] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +export const take = internal.take; +/** + * Takes the last specified number of elements from this stream. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.takeRight(Stream.make(1, 2, 3, 4, 5, 6), 3) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 4, 5, 6 ] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +export const takeRight = internal.takeRight; +/** + * Takes all elements of the stream until the specified predicate evaluates to + * `true`. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.takeUntil(Stream.iterate(0, (n) => n + 1), (n) => n === 4) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 0, 1, 2, 3, 4 ] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +export const takeUntil = internal.takeUntil; +/** + * Takes all elements of the stream until the specified effectual predicate + * evaluates to `true`. + * + * @since 2.0.0 + * @category utils + */ +export const takeUntilEffect = internal.takeUntilEffect; +/** + * Takes all elements of the stream for as long as the specified predicate + * evaluates to `true`. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.takeWhile(Stream.iterate(0, (n) => n + 1), (n) => n < 5) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ 0, 1, 2, 3, 4 ] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +export const takeWhile = internal.takeWhile; +/** + * Adds an effect to consumption of every element of the stream. + * + * @example + * ```ts + * import { Console, Effect, Stream } from "effect" + * + * const stream = Stream.make(1, 2, 3).pipe( + * Stream.tap((n) => Console.log(`before mapping: ${n}`)), + * Stream.map((n) => n * 2), + * Stream.tap((n) => Console.log(`after mapping: ${n}`)) + * ) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // before mapping: 1 + * // after mapping: 2 + * // before mapping: 2 + * // after mapping: 4 + * // before mapping: 3 + * // after mapping: 6 + * // { _id: 'Chunk', values: [ 2, 4, 6 ] } + * ``` + * + * @since 2.0.0 + * @category sequencing + */ +export const tap = internal.tap; +/** + * Returns a stream that effectfully "peeks" at the failure or success of + * the stream. + * + * @since 2.0.0 + * @category sequencing + */ +export const tapBoth = internal.tapBoth; +/** + * Returns a stream that effectfully "peeks" at the failure of the stream. + * + * @since 2.0.0 + * @category sequencing + */ +export const tapError = internal.tapError; +/** + * Returns a stream that effectfully "peeks" at the cause of failure of the + * stream. + * + * @since 2.0.0 + * @category utils + */ +export const tapErrorCause = internal.tapErrorCause; +/** + * Sends all elements emitted by this stream to the specified sink in addition + * to emitting them. + * + * @since 2.0.0 + * @category sequencing + */ +export const tapSink = internal.tapSink; +/** + * Delays the chunks of this stream according to the given bandwidth + * parameters using the token bucket algorithm. Allows for burst in the + * processing of elements by allowing the token bucket to accumulate tokens up + * to a `units + burst` threshold. The weight of each chunk is determined by + * the `cost` function. + * + * If using the "enforce" strategy, chunks that do not meet the bandwidth + * constraints are dropped. If using the "shape" strategy, chunks are delayed + * until they can be emitted without exceeding the bandwidth constraints. + * + * Defaults to the "shape" strategy. + * + * @example + * ```ts + * import { Chunk, Effect, Schedule, Stream } from "effect" + * + * let last = Date.now() + * const log = (message: string) => + * Effect.sync(() => { + * const end = Date.now() + * console.log(`${message} after ${end - last}ms`) + * last = end + * }) + * + * const stream = Stream.fromSchedule(Schedule.spaced("50 millis")).pipe( + * Stream.take(6), + * Stream.tap((n) => log(`Received ${n}`)), + * Stream.throttle({ + * cost: Chunk.size, + * duration: "100 millis", + * units: 1 + * }), + * Stream.tap((n) => log(`> Emitted ${n}`)) + * ) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // Received 0 after 56ms + * // > Emitted 0 after 0ms + * // Received 1 after 52ms + * // > Emitted 1 after 48ms + * // Received 2 after 52ms + * // > Emitted 2 after 49ms + * // Received 3 after 52ms + * // > Emitted 3 after 48ms + * // Received 4 after 52ms + * // > Emitted 4 after 47ms + * // Received 5 after 52ms + * // > Emitted 5 after 49ms + * // { _id: 'Chunk', values: [ 0, 1, 2, 3, 4, 5 ] } + * ``` + * + * @since 2.0.0 + * @category utils + */ +export const throttle = internal.throttle; +/** + * Delays the chunks of this stream according to the given bandwidth + * parameters using the token bucket algorithm. Allows for burst in the + * processing of elements by allowing the token bucket to accumulate tokens up + * to a `units + burst` threshold. The weight of each chunk is determined by + * the effectful `costFn` function. + * + * If using the "enforce" strategy, chunks that do not meet the bandwidth + * constraints are dropped. If using the "shape" strategy, chunks are delayed + * until they can be emitted without exceeding the bandwidth constraints. + * + * Defaults to the "shape" strategy. + * + * @since 2.0.0 + * @category utils + */ +export const throttleEffect = internal.throttleEffect; +/** + * A stream that emits void values spaced by the specified duration. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * let last = Date.now() + * const log = (message: string) => + * Effect.sync(() => { + * const end = Date.now() + * console.log(`${message} after ${end - last}ms`) + * last = end + * }) + * + * const stream = Stream.tick("1 seconds").pipe(Stream.tap(() => log("tick"))) + * + * Effect.runPromise(Stream.runCollect(stream.pipe(Stream.take(5)))).then(console.log) + * // tick after 4ms + * // tick after 1003ms + * // tick after 1001ms + * // tick after 1002ms + * // tick after 1002ms + * // { _id: 'Chunk', values: [ undefined, undefined, undefined, undefined, undefined ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const tick = internal.tick; +/** + * Ends the stream if it does not produce a value after the specified duration. + * + * @since 2.0.0 + * @category utils + */ +export const timeout = internal.timeout; +/** + * Fails the stream with given error if it does not produce a value after d + * duration. + * + * @since 2.0.0 + * @category utils + */ +export const timeoutFail = internal.timeoutFail; +/** + * Fails the stream with given cause if it does not produce a value after d + * duration. + * + * @since 2.0.0 + * @category utils + */ +export const timeoutFailCause = internal.timeoutFailCause; +/** + * Switches the stream if it does not produce a value after the specified + * duration. + * + * @since 2.0.0 + * @category utils + */ +export const timeoutTo = internal.timeoutTo; +/** + * Converts the stream to a scoped `PubSub` of chunks. After the scope is closed, + * the `PubSub` will never again produce values and should be discarded. + * + * @since 2.0.0 + * @category destructors + */ +export const toPubSub = internal.toPubSub; +/** + * Returns in a scope an Effect that can be used to repeatedly pull chunks + * from the stream. The pull effect fails with None when the stream is + * finished, or with Some error if it fails, otherwise it returns a chunk of + * the stream's output. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * // Simulate a chunked stream + * const stream = Stream.fromIterable([1, 2, 3, 4, 5]).pipe(Stream.rechunk(2)) + * + * const program = Effect.gen(function*() { + * // Create an effect to get data chunks from the stream + * const getChunk = yield* Stream.toPull(stream) + * + * // Continuously fetch and process chunks + * while (true) { + * const chunk = yield* getChunk + * console.log(chunk) + * } + * }) + * + * Effect.runPromise(Effect.scoped(program)).then(console.log, console.error) + * // { _id: 'Chunk', values: [ 1, 2 ] } + * // { _id: 'Chunk', values: [ 3, 4 ] } + * // { _id: 'Chunk', values: [ 5 ] } + * // (FiberFailure) Error: { + * // "_id": "Option", + * // "_tag": "None" + * // } + * ``` + * + * @since 2.0.0 + * @category destructors + */ +export const toPull = internal.toPull; +/** + * Converts the stream to a scoped queue of chunks. After the scope is closed, + * the queue will never again produce values and should be discarded. + * + * Defaults to the "suspend" back pressure strategy with a capacity of 2. + * + * @since 2.0.0 + * @category destructors + */ +export const toQueue = internal.toQueue; +/** + * Converts the stream to a scoped queue of elements. After the scope is + * closed, the queue will never again produce values and should be discarded. + * + * Defaults to a capacity of 2. + * + * @since 2.0.0 + * @category destructors + */ +export const toQueueOfElements = internal.toQueueOfElements; +/** + * Converts the stream to a `ReadableStream`. + * + * See https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream. + * + * @since 2.0.0 + * @category destructors + */ +export const toReadableStream = internal.toReadableStream; +/** + * Converts the stream to a `Effect`. + * + * See https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream. + * + * @since 2.0.0 + * @category destructors + */ +export const toReadableStreamEffect = internal.toReadableStreamEffect; +/** + * Converts the stream to a `ReadableStream` using the provided runtime. + * + * See https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream. + * + * @since 2.0.0 + * @category destructors + */ +export const toReadableStreamRuntime = internal.toReadableStreamRuntime; +/** + * Converts the stream to a `AsyncIterable` using the provided runtime. + * + * @since 3.15.0 + * @category destructors + */ +export const toAsyncIterableRuntime = internal.toAsyncIterableRuntime; +/** + * Converts the stream to a `AsyncIterable` capturing the required dependencies. + * + * @since 3.15.0 + * @category destructors + */ +export const toAsyncIterableEffect = internal.toAsyncIterableEffect; +/** + * Converts the stream to a `AsyncIterable`. + * + * @since 3.15.0 + * @category destructors + */ +export const toAsyncIterable = internal.toAsyncIterable; +/** + * Applies the transducer to the stream and emits its outputs. + * + * @since 2.0.0 + * @category utils + */ +export const transduce = internal.transduce; +/** + * Creates a stream by peeling off the "layers" of a value of type `S`. + * + * @example + * ```ts + * import { Effect, Option, Stream } from "effect" + * + * const stream = Stream.unfold(1, (n) => Option.some([n, n + 1])) + * + * Effect.runPromise(Stream.runCollect(stream.pipe(Stream.take(5)))).then(console.log) + * // { _id: 'Chunk', values: [ 1, 2, 3, 4, 5 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const unfold = internal.unfold; +/** + * Creates a stream by peeling off the "layers" of a value of type `S`. + * + * @since 2.0.0 + * @category constructors + */ +export const unfoldChunk = internal.unfoldChunk; +/** + * Creates a stream by effectfully peeling off the "layers" of a value of type + * `S`. + * + * @since 2.0.0 + * @category constructors + */ +export const unfoldChunkEffect = internal.unfoldChunkEffect; +/** + * Creates a stream by effectfully peeling off the "layers" of a value of type + * `S`. + * + * @example + * ```ts + * import { Effect, Option, Random, Stream } from "effect" + * + * const stream = Stream.unfoldEffect(1, (n) => + * Random.nextBoolean.pipe( + * Effect.map((b) => (b ? Option.some([n, -n]) : Option.some([n, n]))) + * )) + * + * Effect.runPromise(Stream.runCollect(stream.pipe(Stream.take(5)))).then(console.log) + * // { _id: 'Chunk', values: [ 1, -1, -1, -1, -1 ] } + * ``` + * + * @since 2.0.0 + * @category constructors + */ +export const unfoldEffect = internal.unfoldEffect; +const void_ = internal.void; +export { +/** + * A stream that contains a single `void` value. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.void + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ undefined ] } + * + * ``` + * @since 2.0.0 + * @category constructors + */ +void_ as void }; +/** + * Creates a stream produced from an `Effect`. + * + * @since 2.0.0 + * @category constructors + */ +export const unwrap = internal.unwrap; +/** + * Creates a stream produced from a scoped `Effect`. + * + * @since 2.0.0 + * @category constructors + */ +export const unwrapScoped = internal.unwrapScoped; +/** + * Creates a stream produced from a function which receives a `Scope` and + * returns an `Effect`. The resulting stream will emit a single element, which + * will be the result of the returned effect, if successful. + * + * @since 3.11.0 + * @category constructors + */ +export const unwrapScopedWith = internal.unwrapScopedWith; +/** + * Updates the specified service within the context of the `Stream`. + * + * @since 2.0.0 + * @category context + */ +export const updateService = internal.updateService; +/** + * Returns the specified stream if the given condition is satisfied, otherwise + * returns an empty stream. + * + * @since 2.0.0 + * @category utils + */ +export const when = internal.when; +/** + * Returns the resulting stream when the given `PartialFunction` is defined + * for the given value, otherwise returns an empty stream. + * + * @since 2.0.0 + * @category constructors + */ +export const whenCase = internal.whenCase; +/** + * Returns the stream when the given partial function is defined for the given + * effectful value, otherwise returns an empty stream. + * + * @since 2.0.0 + * @category utils + */ +export const whenCaseEffect = internal.whenCaseEffect; +/** + * Returns the stream if the given effectful condition is satisfied, otherwise + * returns an empty stream. + * + * @since 2.0.0 + * @category utils + */ +export const whenEffect = internal.whenEffect; +/** + * Wraps the stream with a new span for tracing. + * + * @since 2.0.0 + * @category tracing + */ +export const withSpan = internal.withSpan; +/** + * Zips this stream with another point-wise and emits tuples of elements from + * both streams. + * + * The new stream will end when one of the sides ends. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * // We create two streams and zip them together. + * const stream = Stream.zip( + * Stream.make(1, 2, 3, 4, 5, 6), + * Stream.make("a", "b", "c") + * ) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ [ 1, 'a' ], [ 2, 'b' ], [ 3, 'c' ] ] } + * ``` + * + * @since 2.0.0 + * @category zipping + */ +export const zip = internal.zip; +/** + * Zips this stream with another point-wise and emits tuples of elements from + * both streams. + * + * The new stream will end when one of the sides ends. + * + * @since 2.0.0 + * @category zipping + */ +export const zipFlatten = internal.zipFlatten; +/** + * Zips this stream with another point-wise, creating a new stream of pairs of + * elements from both sides. + * + * The defaults `defaultLeft` and `defaultRight` will be used if the streams + * have different lengths and one of the streams has ended before the other. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.zipAll(Stream.make(1, 2, 3, 4, 5, 6), { + * other: Stream.make("a", "b", "c"), + * defaultSelf: 0, + * defaultOther: "x" + * }) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: "Chunk", values: [ [ 1, "a" ], [ 2, "b" ], [ 3, "c" ], [ 4, "x" ], [ 5, "x" ], [ 6, "x" ] ] } + * ``` + * + * @since 2.0.0 + * @category zipping + */ +export const zipAll = internal.zipAll; +/** + * Zips this stream with another point-wise, and keeps only elements from this + * stream. + * + * The provided default value will be used if the other stream ends before + * this one. + * + * @since 2.0.0 + * @category zipping + */ +export const zipAllLeft = internal.zipAllLeft; +/** + * Zips this stream with another point-wise, and keeps only elements from the + * other stream. + * + * The provided default value will be used if this stream ends before the + * other one. + * + * @since 2.0.0 + * @category zipping + */ +export const zipAllRight = internal.zipAllRight; +/** + * Zips this stream that is sorted by distinct keys and the specified stream + * that is sorted by distinct keys to produce a new stream that is sorted by + * distinct keys. Combines values associated with each key into a tuple, + * using the specified values `defaultLeft` and `defaultRight` to fill in + * missing values. + * + * This allows zipping potentially unbounded streams of data by key in + * constant space but the caller is responsible for ensuring that the + * streams are sorted by distinct keys. + * + * @since 2.0.0 + * @category zipping + */ +export const zipAllSortedByKey = internal.zipAllSortedByKey; +/** + * Zips this stream that is sorted by distinct keys and the specified stream + * that is sorted by distinct keys to produce a new stream that is sorted by + * distinct keys. Keeps only values from this stream, using the specified + * value `default` to fill in missing values. + * + * This allows zipping potentially unbounded streams of data by key in + * constant space but the caller is responsible for ensuring that the + * streams are sorted by distinct keys. + * + * @since 2.0.0 + * @category zipping + */ +export const zipAllSortedByKeyLeft = internal.zipAllSortedByKeyLeft; +/** + * Zips this stream that is sorted by distinct keys and the specified stream + * that is sorted by distinct keys to produce a new stream that is sorted by + * distinct keys. Keeps only values from that stream, using the specified + * value `default` to fill in missing values. + * + * This allows zipping potentially unbounded streams of data by key in + * constant space but the caller is responsible for ensuring that the + * streams are sorted by distinct keys. + * + * @since 2.0.0 + * @category zipping + */ +export const zipAllSortedByKeyRight = internal.zipAllSortedByKeyRight; +/** + * Zips this stream that is sorted by distinct keys and the specified stream + * that is sorted by distinct keys to produce a new stream that is sorted by + * distinct keys. Uses the functions `left`, `right`, and `both` to handle + * the cases where a key and value exist in this stream, that stream, or + * both streams. + * + * This allows zipping potentially unbounded streams of data by key in + * constant space but the caller is responsible for ensuring that the + * streams are sorted by distinct keys. + * + * @since 2.0.0 + * @category zipping + */ +export const zipAllSortedByKeyWith = internal.zipAllSortedByKeyWith; +/** + * Zips this stream with another point-wise. The provided functions will be + * used to create elements for the composed stream. + * + * The functions `left` and `right` will be used if the streams have different + * lengths and one of the streams has ended before the other. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.zipAllWith(Stream.make(1, 2, 3, 4, 5, 6), { + * other: Stream.make("a", "b", "c"), + * onSelf: (n) => [n, "x"], + * onOther: (s) => [0, s], + * onBoth: (n, s) => [n - s.length, s] + * }) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: "Chunk", values: [ [ 0, "a" ], [ 1, "b" ], [ 2, "c" ], [ 4, "x" ], [ 5, "x" ], [ 6, "x" ] ] } + * ``` + * + * @since 2.0.0 + * @category zipping + */ +export const zipAllWith = internal.zipAllWith; +/** + * Zips the two streams so that when a value is emitted by either of the two + * streams, it is combined with the latest value from the other stream to + * produce a result. + * + * Note: tracking the latest value is done on a per-chunk basis. That means + * that emitted elements that are not the last value in chunks will never be + * used for zipping. + * + * @example + * ```ts + * import { Effect, Schedule, Stream } from "effect" + * + * const s1 = Stream.make(1, 2, 3).pipe( + * Stream.schedule(Schedule.spaced("1 second")) + * ) + * + * const s2 = Stream.make("a", "b", "c", "d").pipe( + * Stream.schedule(Schedule.spaced("500 millis")) + * ) + * + * const stream = Stream.zipLatest(s1, s2) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: "Chunk", values: [ [ 1, "a" ], [ 1, "b" ], [ 2, "b" ], [ 2, "c" ], [ 2, "d" ], [ 3, "d" ] ] } + * ``` + * + * @since 2.0.0 + * @category zipping + */ +export const zipLatest = internal.zipLatest; +/** + * Zips multiple streams so that when a value is emitted by any of the streams, + * it is combined with the latest values from the other streams to produce a result. + * + * Note: tracking the latest value is done on a per-chunk basis. That means + * that emitted elements that are not the last value in chunks will never be + * used for zipping. + * + * @example + * ```ts + * import { Stream, Schedule, Console, Effect } from "effect" + * + * const stream = Stream.zipLatestAll( + * Stream.fromSchedule(Schedule.spaced('1 millis')), + * Stream.fromSchedule(Schedule.spaced('2 millis')), + * Stream.fromSchedule(Schedule.spaced('4 millis')), + * ).pipe(Stream.take(6), Stream.tap(Console.log)) + * + * Effect.runPromise(Stream.runDrain(stream)) + * // Output: + * // [ 0, 0, 0 ] + * // [ 1, 0, 0 ] + * // [ 1, 1, 0 ] + * // [ 2, 1, 0 ] + * // [ 3, 1, 0 ] + * // [ 3, 1, 1 ] + * // ..... + * ``` + * + * @since 3.3.0 + * @category zipping + */ +export const zipLatestAll = internal.zipLatestAll; +/** + * Zips the two streams so that when a value is emitted by either of the two + * streams, it is combined with the latest value from the other stream to + * produce a result. + * + * Note: tracking the latest value is done on a per-chunk basis. That means + * that emitted elements that are not the last value in chunks will never be + * used for zipping. + * + * @since 2.0.0 + * @category zipping + */ +export const zipLatestWith = internal.zipLatestWith; +/** + * Zips this stream with another point-wise, but keeps only the outputs of + * `left` stream. + * + * The new stream will end when one of the sides ends. + * + * @since 2.0.0 + * @category zipping + */ +export const zipLeft = internal.zipLeft; +/** + * Zips this stream with another point-wise, but keeps only the outputs of the + * `right` stream. + * + * The new stream will end when one of the sides ends. + * + * @since 2.0.0 + * @category zipping + */ +export const zipRight = internal.zipRight; +/** + * Zips this stream with another point-wise and applies the function to the + * paired elements. + * + * The new stream will end when one of the sides ends. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * // We create two streams and zip them with custom logic. + * const stream = Stream.zipWith( + * Stream.make(1, 2, 3, 4, 5, 6), + * Stream.make("a", "b", "c"), + * (n, s) => [n - s.length, s] + * ) + * + * Effect.runPromise(Stream.runCollect(stream)).then(console.log) + * // { _id: 'Chunk', values: [ [ 0, 'a' ], [ 1, 'b' ], [ 2, 'c' ] ] } + * ``` + * + * @since 2.0.0 + * @category zipping + */ +export const zipWith = internal.zipWith; +/** + * Zips this stream with another point-wise and applies the function to the + * paired elements. + * + * The new stream will end when one of the sides ends. + * + * @since 2.0.0 + * @category zipping + */ +export const zipWithChunks = internal.zipWithChunks; +/** + * Zips each element with the next element if present. + * + * @example + * ```ts + * import { Chunk, Effect, Stream } from "effect" + * + * const stream = Stream.zipWithNext(Stream.make(1, 2, 3, 4)) + * + * Effect.runPromise(Stream.runCollect(stream)).then((chunk) => console.log(Chunk.toArray(chunk))) + * // [ + * // [ 1, { _id: 'Option', _tag: 'Some', value: 2 } ], + * // [ 2, { _id: 'Option', _tag: 'Some', value: 3 } ], + * // [ 3, { _id: 'Option', _tag: 'Some', value: 4 } ], + * // [ 4, { _id: 'Option', _tag: 'None' } ] + * // ] + * ``` + * + * @since 2.0.0 + * @category zipping + */ +export const zipWithNext = internal.zipWithNext; +/** + * Zips each element with the previous element. Initially accompanied by + * `None`. + * + * @example + * ```ts + * import { Chunk, Effect, Stream } from "effect" + * + * const stream = Stream.zipWithPrevious(Stream.make(1, 2, 3, 4)) + * + * Effect.runPromise(Stream.runCollect(stream)).then((chunk) => console.log(Chunk.toArray(chunk))) + * // [ + * // [ { _id: 'Option', _tag: 'None' }, 1 ], + * // [ { _id: 'Option', _tag: 'Some', value: 1 }, 2 ], + * // [ { _id: 'Option', _tag: 'Some', value: 2 }, 3 ], + * // [ { _id: 'Option', _tag: 'Some', value: 3 }, 4 ] + * // ] + * ``` + * + * @since 2.0.0 + * @category zipping + */ +export const zipWithPrevious = internal.zipWithPrevious; +/** + * Zips each element with both the previous and next element. + * + * @example + * ```ts + * import { Chunk, Effect, Stream } from "effect" + * + * const stream = Stream.zipWithPreviousAndNext(Stream.make(1, 2, 3, 4)) + * + * Effect.runPromise(Stream.runCollect(stream)).then((chunk) => console.log(Chunk.toArray(chunk))) + * // [ + * // [ + * // { _id: 'Option', _tag: 'None' }, + * // 1, + * // { _id: 'Option', _tag: 'Some', value: 2 } + * // ], + * // [ + * // { _id: 'Option', _tag: 'Some', value: 1 }, + * // 2, + * // { _id: 'Option', _tag: 'Some', value: 3 } + * // ], + * // [ + * // { _id: 'Option', _tag: 'Some', value: 2 }, + * // 3, + * // { _id: 'Option', _tag: 'Some', value: 4 } + * // ], + * // [ + * // { _id: 'Option', _tag: 'Some', value: 3 }, + * // 4, + * // { _id: 'Option', _tag: 'None' } + * // ] + * // ] + * ``` + * + * @since 2.0.0 + * @category zipping + */ +export const zipWithPreviousAndNext = internal.zipWithPreviousAndNext; +/** + * Zips this stream together with the index of elements. + * + * @example + * ```ts + * import { Effect, Stream } from "effect" + * + * const stream = Stream.make("Mary", "James", "Robert", "Patricia") + * + * const indexedStream = Stream.zipWithIndex(stream) + * + * Effect.runPromise(Stream.runCollect(indexedStream)).then(console.log) + * // { + * // _id: 'Chunk', + * // values: [ [ 'Mary', 0 ], [ 'James', 1 ], [ 'Robert', 2 ], [ 'Patricia', 3 ] ] + * // } + * ``` + * + * @since 2.0.0 + * @category zipping + */ +export const zipWithIndex = internal.zipWithIndex; +// ------------------------------------------------------------------------------------- +// do notation +// ------------------------------------------------------------------------------------- +/** + * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Stream` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Chunk, Effect, pipe, Stream } from "effect" + * + * const result = pipe( + * Stream.Do, + * Stream.bind("x", () => Stream.succeed(2)), + * Stream.bind("y", () => Stream.succeed(3)), + * Stream.let("sum", ({ x, y }) => x + y) + * ) + * assert.deepStrictEqual(Effect.runSync(Stream.runCollect(result)), Chunk.of({ x: 2, y: 3, sum: 5 })) + * ``` + * + * @see {@link bindTo} + * @see {@link bind} + * @see {@link bindEffect} + * @see {@link let_ let} + * + * @category do notation + * @since 2.0.0 + */ +export const Do = internal.Do; +/** + * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Stream` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Chunk, Effect, pipe, Stream } from "effect" + * + * const result = pipe( + * Stream.Do, + * Stream.bind("x", () => Stream.succeed(2)), + * Stream.bind("y", () => Stream.succeed(3)), + * Stream.let("sum", ({ x, y }) => x + y) + * ) + * assert.deepStrictEqual(Effect.runSync(Stream.runCollect(result)), Chunk.of({ x: 2, y: 3, sum: 5 })) + * ``` + * + * @see {@link Do} + * @see {@link bindTo} + * @see {@link bindEffect} + * @see {@link let_ let} + * + * @category do notation + * @since 2.0.0 + */ +export const bind = internal.bind; +/** + * Binds an effectful value in a `do` scope + * + * @see {@link Do} + * @see {@link bindTo} + * @see {@link bind} + * @see {@link let_ let} + * + * @since 2.0.0 + * @category do notation + */ +export const bindEffect = groupBy_.bindEffect; +/** + * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Stream` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Chunk, Effect, pipe, Stream } from "effect" + * + * const result = pipe( + * Stream.Do, + * Stream.bind("x", () => Stream.succeed(2)), + * Stream.bind("y", () => Stream.succeed(3)), + * Stream.let("sum", ({ x, y }) => x + y) + * ) + * assert.deepStrictEqual(Effect.runSync(Stream.runCollect(result)), Chunk.of({ x: 2, y: 3, sum: 5 })) + * ``` + * + * @see {@link Do} + * @see {@link bind} + * @see {@link bindEffect} + * @see {@link let_ let} + * + * @category do notation + * @since 2.0.0 + */ +export const bindTo = internal.bindTo; +const let_ = internal.let_; +export { +/** + * The "do simulation" in Effect allows you to write code in a more declarative style, similar to the "do notation" in other programming languages. It provides a way to define variables and perform operations on them using functions like `bind` and `let`. + * + * Here's how the do simulation works: + * + * 1. Start the do simulation using the `Do` value + * 2. Within the do simulation scope, you can use the `bind` function to define variables and bind them to `Stream` values + * 3. You can accumulate multiple `bind` statements to define multiple variables within the scope + * 4. Inside the do simulation scope, you can also use the `let` function to define variables and bind them to simple values + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Chunk, Effect, pipe, Stream } from "effect" + * + * const result = pipe( + * Stream.Do, + * Stream.bind("x", () => Stream.succeed(2)), + * Stream.bind("y", () => Stream.succeed(3)), + * Stream.let("sum", ({ x, y }) => x + y) + * ) + * assert.deepStrictEqual(Effect.runSync(Stream.runCollect(result)), Chunk.of({ x: 2, y: 3, sum: 5 })) + * ``` + * + * @see {@link Do} + * @see {@link bindTo} + * @see {@link bind} + * @see {@link bindEffect} + * + * @category do notation + * @since 2.0.0 + */ +let_ as let }; +// ------------------------------------------------------------------------------------- +// encoding +// ------------------------------------------------------------------------------------- +/** + * Decode Uint8Array chunks into a stream of strings using the specified encoding. + * + * @since 2.0.0 + * @category encoding + */ +export const decodeText = internal.decodeText; +/** + * Encode a stream of strings into a stream of Uint8Array chunks using the specified encoding. + * + * @since 2.0.0 + * @category encoding + */ +export const encodeText = internal.encodeText; +/** + * Creates a `Stream` using addEventListener. + * @since 3.1.0 + */ +export const fromEventListener = internal.fromEventListener; +//# sourceMappingURL=Stream.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Stream.js.map b/backend/node_modules/effect/dist/esm/Stream.js.map new file mode 100644 index 0000000000000000000000000000000000000000..42c95848a4d088eeac60bc9ed9f9af3a3d78ccff --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Stream.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Stream.js","names":["groupBy_","internal","StreamTypeId","DefaultChunkSize","accumulate","accumulateChunks","acquireRelease","aggregate","aggregateWithin","aggregateWithinEither","as","_async","async","asyncEffect","asyncPush","asyncScoped","branchAfter","broadcast","share","broadcastDynamic","broadcastedQueues","broadcastedQueuesDynamic","buffer","bufferChunks","catchAll","catchAllCause","catchSome","catchTag","catchTags","catchSomeCause","changes","changesWith","changesWithEffect","chunks","chunksWith","combine","combineChunks","concat","concatAll","cross","crossLeft","crossRight","crossWith","debounce","die","dieSync","dieMessage","distributedWith","distributedWithDynamic","drain","drainFork","drop","dropRight","dropUntil","dropUntilEffect","dropWhile","dropWhileEffect","either","empty","ensuring","ensuringWith","context","contextWith","contextWithEffect","contextWithStream","execute","fail","failSync","failCause","failCauseSync","filter","filterEffect","filterMap","filterMapEffect","filterMapWhile","filterMapWhileEffect","finalizer","find","findEffect","flatMap","flatten","flattenChunks","flattenEffect","flattenExitOption","flattenIterables","flattenTake","forever","fromAsyncIterable","fromChannel","toChannel","fromChunk","fromChunkPubSub","fromChunkQueue","fromChunks","fromEffect","fromEffectOption","fromPubSub","fromTPubSub","fromIterable","fromIterableEffect","fromIteratorSucceed","fromPull","fromQueue","fromTQueue","fromReadableStream","fromReadableStreamByob","fromSchedule","groupAdjacentBy","groupBy","groupByKey","grouped","groupedWithin","haltAfter","haltWhen","haltWhenDeferred","identity","identityStream","interleave","interleaveWith","intersperse","intersperseAffixes","interruptAfter","interruptWhen","interruptWhenDeferred","iterate","make","map","mapAccum","mapAccumEffect","mapBoth","mapChunks","mapChunksEffect","mapConcat","mapConcatChunk","mapConcatChunkEffect","mapConcatEffect","mapEffect","mapEffectOptions","mapError","mapErrorCause","merge","mergeAll","mergeWithTag","mergeWith","mergeEither","mergeLeft","mergeRight","mkString","never","onEnd","onError","onDone","onStart","orDie","orDieWith","orElse","orElseEither","orElseFail","orElseIfEmpty","orElseIfEmptyChunk","orElseIfEmptyStream","orElseSucceed","paginate","paginateChunk","paginateChunkEffect","paginateEffect","partition","partitionEither","peel","pipeThrough","pipeThroughChannel","pipeThroughChannelOrFail","prepend","provideContext","provideSomeContext","provideLayer","provideService","provideServiceEffect","provideServiceStream","mapInputContext","provideSomeLayer","race","raceAll","range","rechunk","refineOrDie","refineOrDieWith","repeat","repeatEffect","repeatEffectChunk","repeatEffectChunkOption","repeatEffectOption","repeatEffectWithSchedule","repeatEither","repeatElements","repeatElementsWith","repeatValue","repeatWith","retry","withExecutionPlan","run","runCollect","runCount","runDrain","runFold","runFoldEffect","runFoldScoped","runFoldScopedEffect","runFoldWhile","runFoldWhileEffect","runFoldWhileScoped","runFoldWhileScopedEffect","runForEach","runForEachChunk","runForEachChunkScoped","runForEachScoped","runForEachWhile","runForEachWhileScoped","runHead","runIntoPubSub","runIntoPubSubScoped","runIntoQueue","runIntoQueueElementsScoped","runIntoQueueScoped","runLast","runScoped","runSum","scan","scanEffect","scanReduce","scanReduceEffect","schedule","scheduleWith","scoped","scopedWith","sliding","slidingSize","some","someOrElse","someOrFail","split","splitOnChunk","splitLines","succeed","sync","suspend","take","takeRight","takeUntil","takeUntilEffect","takeWhile","tap","tapBoth","tapError","tapErrorCause","tapSink","throttle","throttleEffect","tick","timeout","timeoutFail","timeoutFailCause","timeoutTo","toPubSub","toPull","toQueue","toQueueOfElements","toReadableStream","toReadableStreamEffect","toReadableStreamRuntime","toAsyncIterableRuntime","toAsyncIterableEffect","toAsyncIterable","transduce","unfold","unfoldChunk","unfoldChunkEffect","unfoldEffect","void_","void","unwrap","unwrapScoped","unwrapScopedWith","updateService","when","whenCase","whenCaseEffect","whenEffect","withSpan","zip","zipFlatten","zipAll","zipAllLeft","zipAllRight","zipAllSortedByKey","zipAllSortedByKeyLeft","zipAllSortedByKeyRight","zipAllSortedByKeyWith","zipAllWith","zipLatest","zipLatestAll","zipLatestWith","zipLeft","zipRight","zipWith","zipWithChunks","zipWithNext","zipWithPrevious","zipWithPreviousAndNext","zipWithIndex","Do","bind","bindEffect","bindTo","let_","let","decodeText","encodeText","fromEventListener"],"sources":["../../src/Stream.ts"],"sourcesContent":[null],"mappings":"AAgBA,OAAO,KAAKA,QAAQ,MAAM,uBAAuB;AACjD,OAAO,KAAKC,QAAQ,MAAM,sBAAsB;AAqBhD;;;;AAIA,OAAO,MAAMC,YAAY,GAAkBD,QAAQ,CAACC,YAAY;AA2HhE;;;;;;;AAOA,OAAO,MAAMC,gBAAgB,GAAWF,QAAQ,CAACE,gBAAgB;AAEjE;;;;;;;AAOA,OAAO,MAAMC,UAAU,GAAqEH,QAAQ,CAACG,UAAU;AAE/G;;;;;;AAMA,OAAO,MAAMC,gBAAgB,GAAwDJ,QAAQ,CAACI,gBAAgB;AAE9G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,OAAO,MAAMC,cAAc,GAGCL,QAAQ,CAACK,cAAc;AAEnD;;;;;;;;;;;;;;;;AAgBA,OAAO,MAAMC,SAAS,GAmClBN,QAAQ,CAACM,SAAS;AAEtB;;;;;;AAMA,OAAO,MAAMC,eAAe,GAsBxBP,QAAQ,CAACO,eAAe;AAE5B;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,qBAAqB,GAwC9BR,QAAQ,CAACQ,qBAAqB;AAElC;;;;;;;;;;;;;;;;AAgBA,OAAO,MAAMC,EAAE,GAmCXT,QAAQ,CAACS,EAAE;AAEf,MAAMC,MAAM,GAMWV,QAAQ,CAACU,MAAM;AAEtC;AACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCAA,MAAM,IAAIC,KAAK;AAGjB;;;;;;;;;AASA,OAAO,MAAMC,WAAW,GAMDZ,QAAQ,CAACY,W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;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCAA,IAAI,IAAIC,GAAG;AAGb;AACA;AACA;AAEA;;;;;;AAMA,OAAO,MAAMC,UAAU,GAuBnB3T,QAAQ,CAAC2T,UAAU;AAEvB;;;;;;AAMA,OAAO,MAAMC,UAAU,GAAmE5T,QAAQ,CAAC4T,UAAU;AA0B7G;;;;AAIA,OAAO,MAAMC,iBAAiB,GASb7T,QAAQ,CAAC6T,iBAAiB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/StreamEmit.js b/backend/node_modules/effect/dist/esm/StreamEmit.js new file mode 100644 index 0000000000000000000000000000000000000000..22a01e922a846073ff87adeaf16536171d1a6fc7 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/StreamEmit.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=StreamEmit.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/StreamEmit.js.map b/backend/node_modules/effect/dist/esm/StreamEmit.js.map new file mode 100644 index 0000000000000000000000000000000000000000..b97b0173f272ea739a2fca2e4da622c78a15e90e --- /dev/null +++ b/backend/node_modules/effect/dist/esm/StreamEmit.js.map @@ -0,0 +1 @@ +{"version":3,"file":"StreamEmit.js","names":[],"sources":["../../src/StreamEmit.ts"],"sourcesContent":[null],"mappings":"","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/StreamHaltStrategy.js b/backend/node_modules/effect/dist/esm/StreamHaltStrategy.js new file mode 100644 index 0000000000000000000000000000000000000000..2e85e360d89992c579521e0699942cf16eadf2bb --- /dev/null +++ b/backend/node_modules/effect/dist/esm/StreamHaltStrategy.js @@ -0,0 +1,57 @@ +/** + * @since 2.0.0 + */ +import * as internal from "./internal/stream/haltStrategy.js"; +/** + * @since 2.0.0 + * @category constructors + */ +export const Left = internal.Left; +/** + * @since 2.0.0 + * @category constructors + */ +export const Right = internal.Right; +/** + * @since 2.0.0 + * @category constructors + */ +export const Both = internal.Both; +/** + * @since 2.0.0 + * @category constructors + */ +export const Either = internal.Either; +/** + * @since 2.0.0 + * @category constructors + */ +export const fromInput = internal.fromInput; +/** + * @since 2.0.0 + * @category refinements + */ +export const isLeft = internal.isLeft; +/** + * @since 2.0.0 + * @category refinements + */ +export const isRight = internal.isRight; +/** + * @since 2.0.0 + * @category refinements + */ +export const isBoth = internal.isBoth; +/** + * @since 2.0.0 + * @category refinements + */ +export const isEither = internal.isEither; +/** + * Folds over the specified `HaltStrategy` using the provided case functions. + * + * @since 2.0.0 + * @category folding + */ +export const match = internal.match; +//# sourceMappingURL=StreamHaltStrategy.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/StreamHaltStrategy.js.map b/backend/node_modules/effect/dist/esm/StreamHaltStrategy.js.map new file mode 100644 index 0000000000000000000000000000000000000000..25d24d0ffd86d7282257c58bd49edc426d72db5b --- /dev/null +++ b/backend/node_modules/effect/dist/esm/StreamHaltStrategy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"StreamHaltStrategy.js","names":["internal","Left","Right","Both","Either","fromInput","isLeft","isRight","isBoth","isEither","match"],"sources":["../../src/StreamHaltStrategy.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,QAAQ,MAAM,mCAAmC;AA8C7D;;;;AAIA,OAAO,MAAMC,IAAI,GAAiBD,QAAQ,CAACC,IAAI;AAE/C;;;;AAIA,OAAO,MAAMC,KAAK,GAAiBF,QAAQ,CAACE,KAAK;AAEjD;;;;AAIA,OAAO,MAAMC,IAAI,GAAiBH,QAAQ,CAACG,IAAI;AAE/C;;;;AAIA,OAAO,MAAMC,MAAM,GAAiBJ,QAAQ,CAACI,MAAM;AAEnD;;;;AAIA,OAAO,MAAMC,SAAS,GAA+CL,QAAQ,CAACK,SAAS;AAEvF;;;;AAIA,OAAO,MAAMC,MAAM,GAAyCN,QAAQ,CAACM,MAAM;AAE3E;;;;AAIA,OAAO,MAAMC,OAAO,GAA0CP,QAAQ,CAACO,OAAO;AAE9E;;;;AAIA,OAAO,MAAMC,MAAM,GAAyCR,QAAQ,CAACQ,MAAM;AAE3E;;;;AAIA,OAAO,MAAMC,QAAQ,GAA2CT,QAAQ,CAACS,QAAQ;AAEjF;;;;;;AAMA,OAAO,MAAMC,KAAK,GA8BdV,QAAQ,CAACU,KAAK","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Streamable.js b/backend/node_modules/effect/dist/esm/Streamable.js new file mode 100644 index 0000000000000000000000000000000000000000..3d3f99acf537c7c3292446f23c25c44bc276b13b --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Streamable.js @@ -0,0 +1,36 @@ +/** + * @since 2.0.0 + */ +import { pipeArguments } from "./Pipeable.js"; +import * as Stream from "./Stream.js"; +const streamVariance = { + /* c8 ignore next */ + _R: _ => _, + /* c8 ignore next */ + _E: _ => _, + /* c8 ignore next */ + _A: _ => _ +}; +/** + * @since 2.0.0 + * @category constructors + */ +export class Class { + /** + * @since 2.0.0 + */ + [Stream.StreamTypeId] = streamVariance; + /** + * @since 2.0.0 + */ + pipe() { + return pipeArguments(this, arguments); + } + /** + * @internal + */ + get channel() { + return Stream.toChannel(this.toStream()); + } +} +//# sourceMappingURL=Streamable.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Streamable.js.map b/backend/node_modules/effect/dist/esm/Streamable.js.map new file mode 100644 index 0000000000000000000000000000000000000000..bc51940142f95bda9907faff97f2a19d55148d9f --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Streamable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Streamable.js","names":["pipeArguments","Stream","streamVariance","_R","_","_E","_A","Class","StreamTypeId","pipe","arguments","channel","toChannel","toStream"],"sources":["../../src/Streamable.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAIA,SAASA,aAAa,QAAQ,eAAe;AAC7C,OAAO,KAAKC,MAAM,MAAM,aAAa;AAErC,MAAMC,cAAc,GAAG;EACrB;EACAC,EAAE,EAAGC,CAAQ,IAAKA,CAAC;EACnB;EACAC,EAAE,EAAGD,CAAQ,IAAKA,CAAC;EACnB;EACAE,EAAE,EAAGF,CAAQ,IAAKA;CACnB;AAED;;;;AAIA,OAAM,MAAgBG,KAAK;EACzB;;;EAGS,CAACN,MAAM,CAACO,YAAY,IAAIN,cAAc;EAE/C;;;EAGAO,IAAIA,CAAA;IACF,OAAOT,aAAa,CAAC,IAAI,EAAEU,SAAS,CAAC;EACvC;EAOA;;;EAGA,IAAIC,OAAOA,CAAA;IACT,OAAOV,MAAM,CAACW,SAAS,CAAC,IAAI,CAACC,QAAQ,EAAE,CAAC;EAC1C","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Struct.js.map b/backend/node_modules/effect/dist/esm/Struct.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d32021c07e5d34fe00480cb7be88067bd3d28218 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Struct.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Struct.js","names":["Equivalence","dual","order","Predicate","pick","args","isObject","s","keys","out","k","omit","getEquivalence","struct","getOrder","evolve","obj","t","Object","prototype","hasOwnProperty","call","get","key","o","entries"],"sources":["../../src/Struct.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;AAMA,OAAO,KAAKA,WAAW,MAAM,kBAAkB;AAC/C,SAASC,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAG3C;;;;;;;;;;;;;;AAcA,OAAO,MAAMC,IAAI,gBAiCbH,IAAI,CACLI,IAAI,IAAKF,SAAS,CAACG,QAAQ,CAACD,IAAI,CAAC,CAAC,CAAC,CAAC,EACrC,CAAgDE,CAAI,EAAE,GAAGC,IAAU,KAAI;EACrE,MAAMC,GAAG,GAAQ,EAAE;EACnB,KAAK,MAAMC,CAAC,IAAIF,IAAI,EAAE;IACpB,IAAIE,CAAC,IAAIH,CAA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;AAuBA,OAAO,MAAMf,IAAI,GAAkBgB,CAAI,IAAgCN,MAAM,CAACV,IAAI,CAACgB,CAAC,CAA8B;AAElH;;;;;;;;;;;;;;;;;;;AAmBA,OAAO,MAAMC,OAAO,GAAaT,GAAM,IACrCE,MAAM,CAACO,OAAO,CAACT,GAAU,CAAQ","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Subscribable.js.map b/backend/node_modules/effect/dist/esm/Subscribable.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f3303b0191a13fda160ab45100418ad6e5e62c7b --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Subscribable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Subscribable.js","names":["Effect","dual","pipeArguments","hasProperty","Readable","Stream","TypeId","Symbol","for","isSubscribable","u","Proto","pipe","arguments","make","options","Object","assign","create","map","self","f","get","changes","mapEffect","flatMap","unwrap","effect","s"],"sources":["../../src/Subscribable.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,MAAM,MAAM,aAAa;AACrC,SAASC,IAAI,QAAQ,eAAe;AACpC,SAASC,aAAa,QAAQ,eAAe;AAC7C,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,MAAM,MAAM,aAAa;AAGrC;;;;AAIA,OAAO,MAAMC,MAAM,gBAAkBC,MAAM,CAACC,GAAG,CAAC,qBAAqB,CAAC;AAiBtE;;;;AAIA,OAAO,MAAMC,cAAc,GAAIC,CAAU,IAAmDP,WAAW,CAACO,CAAC,EAAEJ,MAAM,CAAC;AAElH,MAAMK,KAAK,GAA+C;EACxD,CAACP,QAAQ,CAACE,MAAM,GAAGF,QAAQ,CAACE,MAAM;EAClC,CAACA,MAAM,GAAGA,MAAM;EAChBM,IAAIA,CAAA;IACF,OAAOV,aAAa,CAAC,IAAI,EAAEW,SAAS,CAAC;EACvC;CACD;AAED;;;;AAIA,OAAO,MAAMC,IAAI,GAAaC,OAG7B,IAA4BC,MAAM,CAACC,MAAM,CAACD,MAAM,CAACE,MAAM,CAACP,KAAK,CAAC,EAAEI,OAAO,CAAC;AAEzE;;;;AAIA,OAAO,MAAMI,GAAG,gBAWZlB,IAAI,CAAC,CAAC,EAAE,CAAamB,IAA2B,EAAEC,CAAuB,KAC3EP,IAAI,CAAC;EACHQ,GAAG,EAAEtB,MAAM,CAACmB,GAAG,CAACC,IAAI,CAACE,GAAG,EAAED,CAAC,CAAC;EAC5BE,OAAO,EAAElB,MAAM,CAACc,GAAG,CAACC,IAAI,CAACG,OAAO,EAAEF,CAAC;CACpC,CAAC,CAAC;AAEL;;;;AAIA,OAAO,MAAMG,SAAS,gBAclBvB,IAAI,CAAC,CAAC,EAAE,CACVmB,IAA2B,EAC3BC,CAA8C,KAE9CP,IAAI,CAAC;EACHQ,GAAG,EAAEtB,MAAM,CAACyB,OAAO,CAACL,IAAI,CAACE,GAAG,EAAED,CAAC,CAAC;EAChCE,OAAO,EAAElB,MAAM,CAACmB,SAAS,CAACJ,IAAI,CAACG,OAAO,EAAEF,CAAC;CAC1C,CAAC,CAAC;AAEL;;;;AAIA,OAAO,MAAMK,MAAM,GACjBC,MAAoD,IAEpDb,IAAI,CAAC;EACHQ,GAAG,EAAEtB,MAAM,CAACyB,OAAO,CAACE,MAAM,EAAGC,CAAC,IAAKA,CAAC,CAACN,GAAG,CAAC;EACzCC,OAAO,EAAElB,MAAM,CAACqB,MAAM,CAAC1B,MAAM,CAACmB,GAAG,CAACQ,MAAM,EAAGC,CAAC,IAAKA,CAAC,CAACL,OAAO,CAAC;CAC5D,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/SubscriptionRef.js b/backend/node_modules/effect/dist/esm/SubscriptionRef.js new file mode 100644 index 0000000000000000000000000000000000000000..a32616daa9672a86b3575cb4f09bc18d390c4956 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/SubscriptionRef.js @@ -0,0 +1,116 @@ +import * as internal from "./internal/subscriptionRef.js"; +import * as Ref from "./Ref.js"; +import * as Synchronized from "./SynchronizedRef.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const SubscriptionRefTypeId = internal.SubscriptionRefTypeId; +/** + * @since 2.0.0 + * @category getters + */ +export const get = internal.get; +/** + * @since 2.0.0 + * @category utils + */ +export const getAndSet = Ref.getAndSet; +/** + * @since 2.0.0 + * @category utils + */ +export const getAndUpdate = Ref.getAndUpdate; +/** + * @since 2.0.0 + * @category utils + */ +export const getAndUpdateEffect = Synchronized.getAndUpdateEffect; +/** + * @since 2.0.0 + * @category utils + */ +export const getAndUpdateSome = Ref.getAndUpdateSome; +/** + * @since 2.0.0 + * @category utils + */ +export const getAndUpdateSomeEffect = Synchronized.getAndUpdateSomeEffect; +/** + * Creates a new `SubscriptionRef` with the specified value. + * + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * @since 2.0.0 + * @category utils + */ +export const modify = internal.modify; +/** + * @since 2.0.0 + * @category utils + */ +export const modifyEffect = internal.modifyEffect; +/** + * @since 2.0.0 + * @category utils + */ +export const modifySome = Ref.modifySome; +/** + * @since 2.0.0 + * @category utils + */ +export const modifySomeEffect = Synchronized.modifySomeEffect; +/** + * @since 2.0.0 + * @category utils + */ +export const set = internal.set; +/** + * @since 2.0.0 + * @category utils + */ +export const setAndGet = Ref.setAndGet; +/** + * @since 2.0.0 + * @category utils + */ +export const update = Ref.update; +/** + * @since 2.0.0 + * @category utils + */ +export const updateEffect = Synchronized.updateEffect; +/** + * @since 2.0.0 + * @category utils + */ +export const updateAndGet = Ref.updateAndGet; +/** + * @since 2.0.0 + * @category utils + */ +export const updateAndGetEffect = Synchronized.updateAndGetEffect; +/** + * @since 2.0.0 + * @category utils + */ +export const updateSome = Ref.updateSome; +/** + * @since 2.0.0 + * @category utils + */ +export const updateSomeEffect = Synchronized.updateSomeEffect; +/** + * @since 2.0.0 + * @category utils + */ +export const updateSomeAndGet = Ref.updateSomeAndGet; +/** + * @since 2.0.0 + * @category utils + */ +export const updateSomeAndGetEffect = Synchronized.updateSomeAndGetEffect; +//# sourceMappingURL=SubscriptionRef.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Supervisor.js b/backend/node_modules/effect/dist/esm/Supervisor.js new file mode 100644 index 0000000000000000000000000000000000000000..3e3e7d93d6416e2c02b601df2cb10505fd1335cd --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Supervisor.js @@ -0,0 +1,107 @@ +import * as core from "./internal/core.js"; +import * as circular from "./internal/layer/circular.js"; +import * as internal from "./internal/supervisor.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const SupervisorTypeId = internal.SupervisorTypeId; +/** + * @since 2.0.0 + * @category context + */ +export const addSupervisor = circular.addSupervisor; +/** + * Creates a new supervisor that tracks children in a set. + * + * @since 2.0.0 + * @category constructors + */ +export const fibersIn = internal.fibersIn; +/** + * Creates a new supervisor that constantly yields effect when polled + * + * @since 2.0.0 + * @category constructors + */ +export const fromEffect = internal.fromEffect; +/** + * A supervisor that doesn't do anything in response to supervision events. + * + * @since 2.0.0 + * @category constructors + */ +export const none = internal.none; +/** + * Creates a new supervisor that tracks children in a set. + * + * @since 2.0.0 + * @category constructors + */ +export const track = internal.track; +/** + * Unsafely creates a new supervisor that tracks children in a set. + * + * @since 2.0.0 + * @category unsafe + */ +export const unsafeTrack = internal.unsafeTrack; +/** + * @since 2.0.0 + * @category constructors + */ +export class AbstractSupervisor { + /** + * @since 2.0.0 + */ + onStart(_context, _effect, _parent, _fiber) { + // + } + /** + * @since 2.0.0 + */ + onEnd(_value, _fiber) { + // + } + /** + * @since 2.0.0 + */ + onEffect(_fiber, _effect) { + // + } + /** + * @since 2.0.0 + */ + onSuspend(_fiber) { + // + } + /** + * @since 2.0.0 + */ + onResume(_fiber) { + // + } + /** + * @since 2.0.0 + */ + map(f) { + return new internal.ProxySupervisor(this, core.map(this.value, f)); + } + /** + * @since 2.0.0 + */ + zip(right) { + return new internal.Zip(this, right); + } + /** + * @since 2.0.0 + */ + onRun(execution, _fiber) { + return execution(); + } + /** + * @since 2.0.0 + */ + [SupervisorTypeId] = internal.supervisorVariance; +} +//# sourceMappingURL=Supervisor.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Supervisor.js.map b/backend/node_modules/effect/dist/esm/Supervisor.js.map new file mode 100644 index 0000000000000000000000000000000000000000..ac27c80f9ada8019ddf7bbb9cb76cd84faed24d7 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Supervisor.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Supervisor.js","names":["core","circular","internal","SupervisorTypeId","addSupervisor","fibersIn","fromEffect","none","track","unsafeTrack","AbstractSupervisor","onStart","_context","_effect","_parent","_fiber","onEnd","_value","onEffect","onSuspend","onResume","map","f","ProxySupervisor","value","zip","right","Zip","onRun","execution","supervisorVariance"],"sources":["../../src/Supervisor.ts"],"sourcesContent":[null],"mappings":"AAUA,OAAO,KAAKA,IAAI,MAAM,oBAAoB;AAC1C,OAAO,KAAKC,QAAQ,MAAM,8BAA8B;AACxD,OAAO,KAAKC,QAAQ,MAAM,0BAA0B;AAOpD;;;;AAIA,OAAO,MAAMC,gBAAgB,GAAkBD,QAAQ,CAACC,gBAAgB;AA+ExE;;;;AAIA,OAAO,MAAMC,aAAa,GAAyDH,QAAQ,CAACG,aAAa;AAEzG;;;;;;AAMA,OAAO,MAAMC,QAAQ,GAE+DH,QAAQ,CAACG,QAAQ;AAErG;;;;;;AAMA,OAAO,MAAMC,UAAU,GAAmDJ,QAAQ,CAACI,UAAU;AAE7F;;;;;;AAMA,OAAO,MAAMC,IAAI,GAAqBL,QAAQ,CAACK,IAAI;AAEnD;;;;;;AAMA,OAAO,MAAMC,KAAK,GAAmEN,QAAQ,CAACM,KAAK;AAEnG;;;;;;AAMA,OAAO,MAAMC,WAAW,GAA0DP,QAAQ,CAACO,WAAW;AAEtG;;;;AAIA,OAAM,MAAgBC,kBAAkB;EAMtC;;;EAGAC,OAAOA,CACLC,QAA4B,EAC5BC,OAA+B,EAC/BC,OAAoD,EACpDC,MAAgC;IAEhC;EAAA;EAGF;;;EAGAC,KAAKA,CACHC,MAAuB,EACvBF,MAAgC;IAEhC;EAAA;EAGF;;;EAGAG,QAAQA,CACNH,MAAgC,EAChCF,OAAqC;IAErC;EAAA;EAGF;;;EAGAM,SAASA,CACPJ,MAAgC;IAEhC;EAAA;EAGF;;;EAGAK,QAAQA,CACNL,MAAgC;IAEhC;EAAA;EAGF;;;EAGAM,GAAGA,CAAIC,CAAc;IACnB,OAAO,IAAIpB,QAAQ,CAACqB,eAAe,CAAC,IAAI,EAAEvB,IAAI,CAACqB,GAAG,CAAC,IAAI,CAACG,KAAK,EAAEF,CAAC,CAAC,CAAC;EACpE;EAEA;;;EAGAG,GAAGA,CACDC,KAAoB;IAEpB,OAAO,IAAIxB,QAAQ,CAACyB,GAAG,CAAC,IAAI,EAAED,KAAK,CAAC;EACtC;EAEA;;;EAGAE,KAAKA,CAAUC,SAAkB,EAAEd,MAAgC;IACjE,OAAOc,SAAS,EAAE;EACpB;EAEA;;;EAGS,CAAC1B,gBAAgB,IAEtBD,QAAQ,CAAC4B,kBAAkB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Symbol.js b/backend/node_modules/effect/dist/esm/Symbol.js new file mode 100644 index 0000000000000000000000000000000000000000..80933707cb2303fb16cae0d5b96292e54b29f313 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Symbol.js @@ -0,0 +1,27 @@ +/** + * @since 2.0.0 + */ +import * as equivalence from "./Equivalence.js"; +import * as predicate from "./Predicate.js"; +/** + * Tests if a value is a `symbol`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Predicate } from "effect" + * + * assert.deepStrictEqual(Predicate.isSymbol(Symbol.for("a")), true) + * assert.deepStrictEqual(Predicate.isSymbol("a"), false) + * ``` + * + * @category guards + * @since 2.0.0 + */ +export const isSymbol = predicate.isSymbol; +/** + * @category instances + * @since 2.0.0 + */ +export const Equivalence = equivalence.symbol; +//# sourceMappingURL=Symbol.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Symbol.js.map b/backend/node_modules/effect/dist/esm/Symbol.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a44d17653f772ed516e79c12fb92c6bac813955e --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Symbol.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Symbol.js","names":["equivalence","predicate","isSymbol","Equivalence","symbol"],"sources":["../../src/Symbol.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAIA,OAAO,KAAKA,WAAW,MAAM,kBAAkB;AAC/C,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAE3C;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,QAAQ,GAAgCD,SAAS,CAACC,QAAQ;AAEvE;;;;AAIA,OAAO,MAAMC,WAAW,GAAoCH,WAAW,CAACI,MAAM","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/SynchronizedRef.js b/backend/node_modules/effect/dist/esm/SynchronizedRef.js new file mode 100644 index 0000000000000000000000000000000000000000..a1d07aad5223bdac93f6643b204b2481bb810d31 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/SynchronizedRef.js @@ -0,0 +1,119 @@ +import * as circular from "./internal/effect/circular.js"; +import * as ref from "./internal/ref.js"; +import * as internal from "./internal/synchronizedRef.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const SynchronizedRefTypeId = circular.SynchronizedTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +export const make = circular.makeSynchronized; +/** + * @since 2.0.0 + * @category getters + */ +export const get = ref.get; +/** + * @since 2.0.0 + * @category utils + */ +export const getAndSet = ref.getAndSet; +/** + * @since 2.0.0 + * @category utils + */ +export const getAndUpdate = ref.getAndUpdate; +/** + * @since 2.0.0 + * @category utils + */ +export const getAndUpdateEffect = internal.getAndUpdateEffect; +/** + * @since 2.0.0 + * @category utils + */ +export const getAndUpdateSome = ref.getAndUpdateSome; +/** + * @since 2.0.0 + * @category utils + */ +export const getAndUpdateSomeEffect = internal.getAndUpdateSomeEffect; +/** + * @since 2.0.0 + * @category utils + */ +export const modify = internal.modify; +/** + * @since 2.0.0 + * @category utils + */ +export const modifyEffect = internal.modifyEffect; +/** + * @since 2.0.0 + * @category utils + */ +export const modifySome = ref.modifySome; +/** + * @since 2.0.0 + * @category utils + */ +export const modifySomeEffect = internal.modifySomeEffect; +/** + * @since 2.0.0 + * @category utils + */ +export const set = ref.set; +/** + * @since 2.0.0 + * @category utils + */ +export const setAndGet = ref.setAndGet; +/** + * @since 2.0.0 + * @category utils + */ +export const update = ref.update; +/** + * @since 2.0.0 + * @category utils + */ +export const updateEffect = internal.updateEffect; +/** + * @since 2.0.0 + * @category utils + */ +export const updateAndGet = ref.updateAndGet; +/** + * @since 2.0.0 + * @category utils + */ +export const updateAndGetEffect = internal.updateAndGetEffect; +/** + * @since 2.0.0 + * @category utils + */ +export const updateSome = ref.updateSome; +/** + * @since 2.0.0 + * @category utils + */ +export const updateSomeEffect = internal.updateSomeEffect; +/** + * @since 2.0.0 + * @category utils + */ +export const updateSomeAndGet = ref.updateSomeAndGet; +/** + * @since 2.0.0 + * @category utils + */ +export const updateSomeAndGetEffect = circular.updateSomeAndGetEffectSynchronized; +/** + * @since 2.0.0 + * @category unsafe + */ +export const unsafeMake = circular.unsafeMakeSynchronized; +//# sourceMappingURL=SynchronizedRef.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/SynchronizedRef.js.map b/backend/node_modules/effect/dist/esm/SynchronizedRef.js.map new file mode 100644 index 0000000000000000000000000000000000000000..c553a112a7246ab038d2ca1bd1cbb749290e0519 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/SynchronizedRef.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SynchronizedRef.js","names":["circular","ref","internal","SynchronizedRefTypeId","SynchronizedTypeId","make","makeSynchronized","get","getAndSet","getAndUpdate","getAndUpdateEffect","getAndUpdateSome","getAndUpdateSomeEffect","modify","modifyEffect","modifySome","modifySomeEffect","set","setAndGet","update","updateEffect","updateAndGet","updateAndGetEffect","updateSome","updateSomeEffect","updateSomeAndGet","updateSomeAndGetEffect","updateSomeAndGetEffectSynchronized","unsafeMake","unsafeMakeSynchronized"],"sources":["../../src/SynchronizedRef.ts"],"sourcesContent":[null],"mappings":"AAIA,OAAO,KAAKA,QAAQ,MAAM,+BAA+B;AACzD,OAAO,KAAKC,GAAG,MAAM,mBAAmB;AACxC,OAAO,KAAKC,QAAQ,MAAM,+BAA+B;AAMzD;;;;AAIA,OAAO,MAAMC,qBAAqB,GAAkBH,QAAQ,CAACI,kBAAkB;AAkD/E;;;;AAIA,OAAO,MAAMC,IAAI,GAAuDL,QAAQ,CAACM,gBAAgB;AAEjG;;;;AAIA,OAAO,MAAMC,GAAG,GAAsDN,GAAG,CAACM,GAAG;AAE7E;;;;AAIA,OAAO,MAAMC,SAAS,GAWlBP,GAAG,CAACO,SAAS;AAEjB;;;;AAIA,OAAO,MAAMC,YAAY,GAWrBR,GAAG,CAACQ,YAAY;AAEpB;;;;AAIA,OAAO,MAAMC,kBAAkB,GAW3BR,QAAQ,CAACQ,kBAAkB;AAE/B;;;;AAIA,OAAO,MAAMC,gBAAgB,GAWzBV,GAAG,CAACU,gBAAgB;AAExB;;;;AAIA,OAAO,MAAMC,sBAAsB,GAc/BV,QAAQ,CAACU,sBAAsB;AAEnC;;;;AAIA,OAAO,MAAMC,MAAM,GAWfX,QAAQ,CAACW,MAAM;AAEnB;;;;AAIA,OAAO,MAAMC,YAAY,GAcrBZ,QAAQ,CAACY,YAAY;AAEzB;;;;AAIA,OAAO,MAAMC,UAAU,GAenBd,GAAG,CAACc,UAAU;AAElB;;;;AAIA,OAAO,MAAMC,gBAAgB,GAkBzBd,QAAQ,CAACc,gBAAgB;AAE7B;;;;AAIA,OAAO,MAAMC,GAAG,GAWZhB,GAAG,CAACgB,GAAG;AAEX;;;;AAIA,OAAO,MAAMC,SAAS,GAWlBjB,GAAG,CAACiB,SAAS;AAEjB;;;;AAIA,OAAO,MAAMC,MAAM,GAWflB,GAAG,CAACkB,MAAM;AAEd;;;;AAIA,OAAO,MAAMC,YAAY,GAWrBlB,QAAQ,CAACkB,YAAY;AAEzB;;;;AAIA,OAAO,MAAMC,YAAY,GAWrBpB,GAAG,CAACoB,YAAY;AAEpB;;;;AAIA,OAAO,MAAMC,kBAAkB,GAW3BpB,QAAQ,CAACoB,kBAAkB;AAE/B;;;;AAIA,OAAO,MAAMC,UAAU,GAWnBtB,GAAG,CAACsB,UAAU;AAElB;;;;AAIA,OAAO,MAAMC,gBAAgB,GAczBtB,QAAQ,CAACsB,gBAAgB;AAE7B;;;;AAIA,OAAO,MAAMC,gBAAgB,GAWzBxB,GAAG,CAACwB,gBAAgB;AAExB;;;;AAIA,OAAO,MAAMC,sBAAsB,GAc/B1B,QAAQ,CAAC2B,kCAAkC;AAE/C;;;;AAIA,OAAO,MAAMC,UAAU,GAAwC5B,QAAQ,CAAC6B,sBAAsB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TArray.js b/backend/node_modules/effect/dist/esm/TArray.js new file mode 100644 index 0000000000000000000000000000000000000000..c2b9c84844ab206b6d12d64bf5a71dee61fd8fa2 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TArray.js @@ -0,0 +1,306 @@ +/** + * @since 2.0.0 + */ +import * as internal from "./internal/stm/tArray.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const TArrayTypeId = internal.TArrayTypeId; +/** + * Finds the result of applying a partial function to the first value in its + * domain. + * + * @since 2.0.0 + * @category elements + */ +export const collectFirst = internal.collectFirst; +/** + * Finds the result of applying an transactional partial function to the first + * value in its domain. + * + * @since 2.0.0 + * @category elements + */ +export const collectFirstSTM = internal.collectFirstSTM; +/** + * Determine if the array contains a specified value. + * + * @macro trace + * @since 2.0.0 + * @category elements + */ +export const contains = internal.contains; +/** + * Count the values in the array matching a predicate. + * + * @macro trace + * @since 2.0.0 + * @category folding + */ +export const count = internal.count; +/** + * Count the values in the array matching a transactional predicate. + * + * @macro trace + * @since 2.0.0 + * @category folding + */ +export const countSTM = internal.countSTM; +/** + * Makes an empty `TArray`. + * + * @since 2.0.0 + * @category constructors + */ +export const empty = internal.empty; +/** + * Atomically evaluate the conjunction of a predicate across the members of + * the array. + * + * @since 2.0.0 + * @category elements + */ +export const every = internal.every; +/** + * Atomically evaluate the conjunction of a transactional predicate across the + * members of the array. + * + * @since 2.0.0 + * @category elements + */ +export const everySTM = internal.everySTM; +/** + * Find the first element in the array matching the specified predicate. + * + * @since 2.0.0 + * @category elements + */ +export const findFirst = internal.findFirst; +/** + * Get the first index of a specific value in the array. + * + * @since 2.0.0 + * @category elements + */ +export const findFirstIndex = internal.findFirstIndex; +/** + * Get the first index of a specific value in the array starting from the + * specified index. + * + * @since 2.0.0 + * @category elements + */ +export const findFirstIndexFrom = internal.findFirstIndexFrom; +/** + * Get the index of the first entry in the array matching a predicate. + * + * @since 2.0.0 + * @category elements + */ +export const findFirstIndexWhere = internal.findFirstIndexWhere; +/** + * Get the index of the first entry in the array starting from the specified + * index, matching a predicate. + * + * @since 2.0.0 + * @category elements + */ +export const findFirstIndexWhereFrom = internal.findFirstIndexWhereFrom; +/** + * Get the index of the next entry that matches a transactional predicate. + * + * @since 2.0.0 + * @category elements + */ +export const findFirstIndexWhereSTM = internal.findFirstIndexWhereSTM; +/** + * Starting at specified index, get the index of the next entry that matches a + * transactional predicate. + * + * @since 2.0.0 + * @category elements + */ +export const findFirstIndexWhereFromSTM = internal.findFirstIndexWhereFromSTM; +/** + * Find the first element in the array matching a transactional predicate. + * + * @since 2.0.0 + * @category elements + */ +export const findFirstSTM = internal.findFirstSTM; +/** + * Find the last element in the array matching a predicate. + * + * @since 2.0.0 + * @category elements + */ +export const findLast = internal.findLast; +/** + * Get the last index of a specific value in the array bounded above by a + * specific index. + * + * @since 2.0.0 + * @category elements + */ +export const findLastIndex = internal.findLastIndex; +/** + * Get the last index of a specific value in the array bounded above by a + * specific index. + * + * @since 2.0.0 + * @category elements + */ +export const findLastIndexFrom = internal.findLastIndexFrom; +/** + * Find the last element in the array matching a transactional predicate. + * + * @since 2.0.0 + * @category elements + */ +export const findLastSTM = internal.findLastSTM; +/** + * Atomically performs transactional effect for each item in array. + * + * @since 2.0.0 + * @category elements + */ +export const forEach = internal.forEach; +/** + * Creates a new `TArray` from an iterable collection of values. + * + * @since 2.0.0 + * @category constructors + */ +export const fromIterable = internal.fromIterable; +/** + * Extracts value from ref in array. + * + * @since 2.0.0 + * @category elements + */ +export const get = internal.get; +/** + * The first entry of the array, if it exists. + * + * @since 2.0.0 + * @category elements + */ +export const headOption = internal.headOption; +/** + * The last entry in the array, if it exists. + * + * @since 2.0.0 + * @category elements + */ +export const lastOption = internal.lastOption; +/** + * Makes a new `TArray` that is initialized with specified values. + * + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * Atomically compute the greatest element in the array, if it exists. + * + * @since 2.0.0 + * @category elements + */ +export const maxOption = internal.maxOption; +/** + * Atomically compute the least element in the array, if it exists. + * + * @since 2.0.0 + * @category elements + */ +export const minOption = internal.minOption; +/** + * Atomically folds using a pure function. + * + * @since 2.0.0 + * @category folding + */ +export const reduce = internal.reduce; +/** + * Atomically reduce the array, if non-empty, by a binary operator. + * + * @since 2.0.0 + * @category elements + */ +export const reduceOption = internal.reduceOption; +/** + * Atomically reduce the non-empty array using a transactional binary + * operator. + * + * @since 2.0.0 + * @category elements + */ +export const reduceOptionSTM = internal.reduceOptionSTM; +/** + * Atomically folds using a transactional function. + * + * @macro trace + * @since 2.0.0 + * @category folding + */ +export const reduceSTM = internal.reduceSTM; +/** + * Returns the size of the `TArray`. + * + * @since 2.0.0 + * @category getters + */ +export const size = internal.size; +/** + * Determine if the array contains a value satisfying a predicate. + * + * @since 2.0.0 + * @category elements + */ +export const some = internal.some; +/** + * Determine if the array contains a value satisfying a transactional + * predicate. + * + * @since 2.0.0 + * @category elements + */ +export const someSTM = internal.someSTM; +/** + * Collects all elements into a chunk. + * + * @since 2.0.0 + * @since 2.0.0 + * @category destructors + */ +export const toArray = internal.toArray; +/** + * Atomically updates all elements using a pure function. + * + * @since 2.0.0 + * @category elements + */ +export const transform = internal.transform; +/** + * Atomically updates all elements using a transactional effect. + * + * @since 2.0.0 + * @category elements + */ +export const transformSTM = internal.transformSTM; +/** + * Updates element in the array with given function. + * + * @since 2.0.0 + * @category elements + */ +export const update = internal.update; +/** + * Atomically updates element in the array with given transactional effect. + * + * @since 2.0.0 + * @category elements + */ +export const updateSTM = internal.updateSTM; +//# sourceMappingURL=TArray.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TDeferred.js b/backend/node_modules/effect/dist/esm/TDeferred.js new file mode 100644 index 0000000000000000000000000000000000000000..1461b9abb4ffcfb3f860d4deec7b7860ad3b7a93 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TDeferred.js @@ -0,0 +1,39 @@ +import * as internal from "./internal/stm/tDeferred.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const TDeferredTypeId = internal.TDeferredTypeId; +const _await = internal._await; +export { +/** + * @since 2.0.0 + * @category getters + */ +_await as await }; +/** + * @since 2.0.0 + * @category mutations + */ +export const done = internal.done; +/** + * @since 2.0.0 + * @category mutations + */ +export const fail = internal.fail; +/** + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * @since 2.0.0 + * @category getters + */ +export const poll = internal.poll; +/** + * @since 2.0.0 + * @category mutations + */ +export const succeed = internal.succeed; +//# sourceMappingURL=TDeferred.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TMap.js b/backend/node_modules/effect/dist/esm/TMap.js new file mode 100644 index 0000000000000000000000000000000000000000..5a416d14be6b4984bbcf5eaa4c6bf3b070b268b1 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TMap.js @@ -0,0 +1,279 @@ +import * as internal from "./internal/stm/tMap.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const TMapTypeId = internal.TMapTypeId; +/** + * Makes an empty `TMap`. + * + * @since 2.0.0 + * @category constructors + */ +export const empty = internal.empty; +/** + * Finds the key/value pair matching the specified predicate, and uses the + * provided function to extract a value out of it. + * + * @since 2.0.0 + * @category elements + */ +export const find = internal.find; +/** + * Finds the key/value pair matching the specified predicate, and uses the + * provided effectful function to extract a value out of it. + * + * @since 2.0.0 + * @category elements + */ +export const findSTM = internal.findSTM; +/** + * Finds all the key/value pairs matching the specified predicate, and uses + * the provided function to extract values out them. + * + * @since 2.0.0 + * @category elements + */ +export const findAll = internal.findAll; +/** + * Finds all the key/value pairs matching the specified predicate, and uses + * the provided effectful function to extract values out of them.. + * + * @since 2.0.0 + * @category elements + */ +export const findAllSTM = internal.findAllSTM; +/** + * Atomically performs transactional-effect for each binding present in map. + * + * @since 2.0.0 + * @category elements + */ +export const forEach = internal.forEach; +/** + * Creates a new `TMap` from an iterable collection of key/value pairs. + * + * @since 2.0.0 + * @category constructors + */ +export const fromIterable = internal.fromIterable; +/** + * Retrieves value associated with given key. + * + * @since 2.0.0 + * @category elements + */ +export const get = internal.get; +/** + * Retrieves value associated with given key or default value, in case the key + * isn't present. + * + * @since 2.0.0 + * @category elements + */ +export const getOrElse = internal.getOrElse; +/** + * Tests whether or not map contains a key. + * + * @since 2.0.0 + * @category elements + */ +export const has = internal.has; +/** + * Tests if the map is empty or not. + * + * @since 2.0.0 + * @category getters + */ +export const isEmpty = internal.isEmpty; +/** + * Collects all keys stored in map. + * + * @since 2.0.0 + * @category elements + */ +export const keys = internal.keys; +/** + * Makes a new `TMap` that is initialized with specified values. + * + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * If the key is not already associated with a value, stores the provided value, + * otherwise merge the existing value with the new one using function `f` and + * store the result. + * + * @since 2.0.0 + * @category mutations + */ +export const merge = internal.merge; +/** + * Atomically folds using a pure function. + * + * @since 2.0.0 + * @category folding + */ +export const reduce = internal.reduce; +/** + * Atomically folds using a transactional function. + * + * @since 2.0.0 + * @category folding + */ +export const reduceSTM = internal.reduceSTM; +/** + * Removes binding for given key. + * + * @since 2.0.0 + * @category mutations + */ +export const remove = internal.remove; +/** + * Deletes all entries associated with the specified keys. + * + * @since 2.0.0 + * @category mutations + */ +export const removeAll = internal.removeAll; +/** + * Removes entries from a `TMap` that satisfy the specified predicate and returns the removed entries + * (or `void` if `discard = true`). + * + * @since 2.0.0 + * @category mutations + */ +export const removeIf = internal.removeIf; +/** + * Retains entries in a `TMap` that satisfy the specified predicate and returns the removed entries + * (or `void` if `discard = true`). + * + * @since 2.0.0 + * @category mutations + */ +export const retainIf = internal.retainIf; +/** + * Stores new binding into the map. + * + * @since 2.0.0 + * @category mutations + */ +export const set = internal.set; +/** + * Stores new binding in the map if it does not already exist. + * + * @since 2.0.0 + * @category mutations + */ +export const setIfAbsent = internal.setIfAbsent; +/** + * Returns the number of bindings. + * + * @since 2.0.0 + * @category getters + */ +export const size = internal.size; +/** + * Takes the first matching value, or retries until there is one. + * + * @since 2.0.0 + * @category mutations + */ +export const takeFirst = internal.takeFirst; +/** + * Takes the first matching value, or retries until there is one. + * + * @since 2.0.0 + * @category mutations + */ +export const takeFirstSTM = internal.takeFirstSTM; +/** + * Takes all matching values, or retries until there is at least one. + * + * @since 2.0.0 + * @category mutations + */ +export const takeSome = internal.takeSome; +/** + * Takes all matching values, or retries until there is at least one. + * + * @since 2.0.0 + * @category mutations + */ +export const takeSomeSTM = internal.takeSomeSTM; +/** + * Collects all bindings into a `Chunk`. + * + * @since 2.0.0 + * @category destructors + */ +export const toChunk = internal.toChunk; +/** + * Collects all bindings into a `HashMap`. + * + * @since 2.0.0 + * @category destructors + */ +export const toHashMap = internal.toHashMap; +/** + * Collects all bindings into an `Array`. + * + * @since 2.0.0 + * @category destructors + */ +export const toArray = internal.toArray; +/** + * Collects all bindings into a `Map`. + * + * @since 2.0.0 + * @category destructors + */ +export const toMap = internal.toMap; +/** + * Atomically updates all bindings using a pure function. + * + * @since 2.0.0 + * @category mutations + */ +export const transform = internal.transform; +/** + * Atomically updates all bindings using a transactional function. + * + * @since 2.0.0 + * @category mutations + */ +export const transformSTM = internal.transformSTM; +/** + * Atomically updates all values using a pure function. + * + * @since 2.0.0 + * @category mutations + */ +export const transformValues = internal.transformValues; +/** + * Atomically updates all values using a transactional function. + * + * @since 2.0.0 + * @category mutations + */ +export const transformValuesSTM = internal.transformValuesSTM; +/** + * Updates the mapping for the specified key with the specified function, + * which takes the current value of the key as an input, if it exists, and + * either returns `Some` with a new value to indicate to update the value in + * the map or `None` to remove the value from the map. Returns `Some` with the + * updated value or `None` if the value was removed from the map. + * + * @since 2.0.0 + * @category mutations + */ +export const updateWith = internal.updateWith; +/** + * Collects all values stored in map. + * + * @since 2.0.0 + * @category elements + */ +export const values = internal.values; +//# sourceMappingURL=TMap.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TMap.js.map b/backend/node_modules/effect/dist/esm/TMap.js.map new file mode 100644 index 0000000000000000000000000000000000000000..a762e875ccbee3a5fbf20f40d536e09917526e15 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TMap.js","names":["internal","TMapTypeId","empty","find","findSTM","findAll","findAllSTM","forEach","fromIterable","get","getOrElse","has","isEmpty","keys","make","merge","reduce","reduceSTM","remove","removeAll","removeIf","retainIf","set","setIfAbsent","size","takeFirst","takeFirstSTM","takeSome","takeSomeSTM","toChunk","toHashMap","toArray","toMap","transform","transformSTM","transformValues","transformValuesSTM","updateWith","values"],"sources":["../../src/TMap.ts"],"sourcesContent":[null],"mappings":"AAMA,OAAO,KAAKA,QAAQ,MAAM,wBAAwB;AAOlD;;;;AAIA,OAAO,MAAMC,UAAU,GAAkBD,QAAQ,CAACC,UAAU;AA2C5D;;;;;;AAMA,OAAO,MAAMC,KAAK,GAAoCF,QAAQ,CAACE,KAAK;AAEpE;;;;;;;AAOA,O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a/backend/node_modules/effect/dist/esm/TPriorityQueue.js b/backend/node_modules/effect/dist/esm/TPriorityQueue.js new file mode 100644 index 0000000000000000000000000000000000000000..597a2cff12f19986a2bfd9db3df61b5264c4bbc8 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TPriorityQueue.js @@ -0,0 +1,136 @@ +import * as internal from "./internal/stm/tPriorityQueue.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const TPriorityQueueTypeId = internal.TPriorityQueueTypeId; +/** + * Constructs a new empty `TPriorityQueue` with the specified `Order`. + * + * @since 2.0.0 + * @category constructors + */ +export const empty = internal.empty; +/** + * Creates a new `TPriorityQueue` from an iterable collection of values. + * + * @since 2.0.0 + * @category constructors + */ +export const fromIterable = internal.fromIterable; +/** + * Checks whether the queue is empty. + * + * @since 2.0.0 + * @category getters + */ +export const isEmpty = internal.isEmpty; +/** + * Checks whether the queue is not empty. + * + * @since 2.0.0 + * @category getters + */ +export const isNonEmpty = internal.isNonEmpty; +/** + * Makes a new `TPriorityQueue` that is initialized with specified values. + * + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * Offers the specified value to the queue. + * + * @since 2.0.0 + * @category mutations + */ +export const offer = internal.offer; +/** + * Offers all of the elements in the specified collection to the queue. + * + * @since 2.0.0 + * @category mutations + */ +export const offerAll = internal.offerAll; +/** + * Peeks at the first value in the queue without removing it, retrying until a + * value is in the queue. + * + * @since 2.0.0 + * @category getters + */ +export const peek = internal.peek; +/** + * Peeks at the first value in the queue without removing it, returning `None` + * if there is not a value in the queue. + * + * @since 2.0.0 + * @category getters + */ +export const peekOption = internal.peekOption; +/** + * Removes all elements from the queue matching the specified predicate. + * + * @since 2.0.0 + * @category getters + */ +export const removeIf = internal.removeIf; +/** + * Retains only elements from the queue matching the specified predicate. + * + * @since 2.0.0 + * @category getters + */ +export const retainIf = internal.retainIf; +/** + * Returns the size of the queue. + * + * @since 2.0.0 + * @category getters + */ +export const size = internal.size; +/** + * Takes a value from the queue, retrying until a value is in the queue. + * + * @since 2.0.0 + * @category mutations + */ +export const take = internal.take; +/** + * Takes all values from the queue. + * + * @since 2.0.0 + * @category mutations + */ +export const takeAll = internal.takeAll; +/** + * Takes a value from the queue, returning `None` if there is not a value in + * the queue. + * + * @since 2.0.0 + * @category mutations + */ +export const takeOption = internal.takeOption; +/** + * Takes up to the specified maximum number of elements from the queue. + * + * @since 2.0.0 + * @category mutations + */ +export const takeUpTo = internal.takeUpTo; +/** + * Collects all values into a `Chunk`. + * + * @since 2.0.0 + * @category destructors + */ +export const toChunk = internal.toChunk; +/** + * Collects all values into an array. + * + * @since 2.0.0 + * @category destructors + */ +export const toArray = internal.toArray; +//# sourceMappingURL=TPriorityQueue.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TPriorityQueue.js.map b/backend/node_modules/effect/dist/esm/TPriorityQueue.js.map new file mode 100644 index 0000000000000000000000000000000000000000..90ba30dd2f51df511010308b753bc2ba69619885 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TPriorityQueue.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TPriorityQueue.js","names":["internal","TPriorityQueueTypeId","empty","fromIterable","isEmpty","isNonEmpty","make","offer","offerAll","peek","peekOption","removeIf","retainIf","size","take","takeAll","takeOption","takeUpTo","toChunk","toArray"],"sources":["../../src/TPriorityQueue.ts"],"sourcesContent":[null],"mappings":"AAIA,OAAO,KAAKA,QAAQ,MAAM,kCAAkC;AAS5D;;;;AAIA,OAAO,MAAMC,oBAAoB,GAAkBD,QAAQ,CAACC,oBAAoB;AA2ChF;;;;;;AAMA,OAAO,MAAMC,KAAK,GAA6DF,QAAQ,CAACE,KAAK;AAE7F;;;;;;AAMA,OAAO,MAAMC,YAAY,GAEoCH,QAAQ,CAACG,YAAY;AAElF;;;;;;AAMA,OAAO,MAAMC,OAAO,GAAqDJ,QAAQ,CAACI,OAAO;AAEzF;;;;;;AAMA,OAAO,MAAMC,UAAU,GAAqDL,QAAQ,CAACK,UAAU;AAE/F;;;;;;AAMA,OAAO,MAAMC,IAAI,GAAwFN,QAAQ,CAACM,IAAI;AAEtH;;;;;;AAMA,OAAO,MAAMC,KAAK,GAedP,QAAQ,CAACO,KAAK;AAElB;;;;;;AAMA,OAAO,MAAMC,QAAQ,GAejBR,QAAQ,CAACQ,QAAQ;AAErB;;;;;;;AAOA,OAAO,MAAMC,IAAI,GAA+CT,QAAQ,CAACS,IAAI;AAE7E;;;;;;;AAOA,OAAO,MAAMC,UAAU,GAA8DV,QAAQ,CAACU,UAAU;AAExG;;;;;;AAMA,OAAO,MAAMC,QAAQ,GAejBX,QAAQ,CAACW,QAAQ;AAErB;;;;;;AAMA,OAAO,MAAMC,QAAQ,GAejBZ,QAAQ,CAACY,QAAQ;AAErB;;;;;;AAMA,OAAO,MAAMC,IAAI,GAAoDb,QAAQ,CAACa,IAAI;AAElF;;;;;;AAMA,OAAO,MAAMC,IAAI,GAA+Cd,QAAQ,CAACc,IAAI;AAE7E;;;;;;AAMA,OAAO,MAAMC,OAAO,GAAsDf,QAAQ,CAACe,OAAO;AAE1F;;;;;;;AAOA,OAAO,MAAMC,UAAU,GAA8DhB,QAAQ,CAACgB,UAAU;AAExG;;;;;;AAMA,OAAO,MAAMC,QAAQ,GAejBjB,QAAQ,CAACiB,QAAQ;AAErB;;;;;;AAMA,OAAO,MAAMC,OAAO,GAA4DlB,QAAQ,CAACkB,OAAO;AAEhG;;;;;;AAMA,OAAO,MAAMC,OAAO,GAAsDnB,QAAQ,CAACmB,OAAO","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TPubSub.js b/backend/node_modules/effect/dist/esm/TPubSub.js new file mode 100644 index 0000000000000000000000000000000000000000..ed8d3f14b72b1a1a59d0864e4076c525dd83d48d --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TPubSub.js @@ -0,0 +1,131 @@ +import * as internal from "./internal/stm/tPubSub.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const TPubSubTypeId = internal.TPubSubTypeId; +/** + * Waits until the `TPubSub` is shutdown. The `STM` returned by this method will + * not resume until the queue has been shutdown. If the `TPubSub` is already + * shutdown, the `STM` will resume right away. + * + * @since 2.0.0 + * @category mutations + */ +export const awaitShutdown = internal.awaitShutdown; +/** + * Creates a bounded `TPubSub` with the back pressure strategy. The `TPubSub` will retain + * messages until they have been taken by all subscribers, applying back + * pressure to publishers if the `TPubSub` is at capacity. + * + * @since 2.0.0 + * @category constructors + */ +export const bounded = internal.bounded; +/** + * Returns the number of elements the `TPubSub` can hold. + * + * @since 2.0.0 + * @category getters + */ +export const capacity = internal.capacity; +/** + * Creates a bounded `TPubSub` with the dropping strategy. The `TPubSub` will drop new + * messages if the `TPubSub` is at capacity. + * + * @since 2.0.0 + * @category constructors + */ +export const dropping = internal.dropping; +/** + * Returns `true` if the `TPubSub` contains zero elements, `false` otherwise. + * + * @since 2.0.0 + * @category getters + */ +export const isEmpty = internal.isEmpty; +/** + * Returns `true` if the `TPubSub` contains at least one element, `false` + * otherwise. + * + * @since 2.0.0 + * @category getters + */ +export const isFull = internal.isFull; +/** + * Interrupts any fibers that are suspended on `offer` or `take`. Future calls + * to `offer*` and `take*` will be interrupted immediately. + * + * @since 2.0.0 + * @category utils + */ +export const shutdown = internal.shutdown; +/** + * Returns `true` if `shutdown` has been called, otherwise returns `false`. + * + * @since 2.0.0 + * @category getters + */ +export const isShutdown = internal.isShutdown; +/** + * Publishes a message to the `TPubSub`, returning whether the message was published + * to the `TPubSub`. + * + * @since 2.0.0 + * @category mutations + */ +export const publish = internal.publish; +/** + * Publishes all of the specified messages to the `TPubSub`, returning whether they + * were published to the `TPubSub`. + * + * @since 2.0.0 + * @category mutations + */ +export const publishAll = internal.publishAll; +/** + * Retrieves the size of the `TPubSub`, which is equal to the number of elements + * in the `TPubSub`. This may be negative if fibers are suspended waiting for + * elements to be added to the `TPubSub`. + * + * @since 2.0.0 + * @category getters + */ +export const size = internal.size; +/** + * Creates a bounded `TPubSub` with the sliding strategy. The `TPubSub` will add new + * messages and drop old messages if the `TPubSub` is at capacity. + * + * For best performance use capacities that are powers of two. + * + * @since 2.0.0 + * @category constructors + */ +export const sliding = internal.sliding; +/** + * Subscribes to receive messages from the `TPubSub`. The resulting subscription can + * be evaluated multiple times to take a message from the `TPubSub` each time. The + * caller is responsible for unsubscribing from the `TPubSub` by shutting down the + * queue. + * + * @since 2.0.0 + * @category mutations + */ +export const subscribe = internal.subscribe; +/** + * Subscribes to receive messages from the `TPubSub`. The resulting subscription can + * be evaluated multiple times within the scope to take a message from the `TPubSub` + * each time. + * + * @since 2.0.0 + * @category mutations + */ +export const subscribeScoped = internal.subscribeScoped; +/** + * Creates an unbounded `TPubSub`. + * + * @since 2.0.0 + * @category constructors + */ +export const unbounded = internal.unbounded; +//# sourceMappingURL=TPubSub.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TRandom.js b/backend/node_modules/effect/dist/esm/TRandom.js new file mode 100644 index 0000000000000000000000000000000000000000..c477e537cb116a54afd8477e535e7b2aff4eec69 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TRandom.js @@ -0,0 +1,65 @@ +import * as internal from "./internal/stm/tRandom.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const TRandomTypeId = internal.TRandomTypeId; +/** + * The service tag used to access `TRandom` in the environment of an effect. + * + * @since 2.0.0 + * @category context + */ +export const Tag = internal.Tag; +/** + * The "live" `TRandom` service wrapped into a `Layer`. + * + * @since 2.0.0 + * @category context + */ +export const live = internal.live; +/** + * Returns the next number from the pseudo-random number generator. + * + * @since 2.0.0 + * @category random + */ +export const next = internal.next; +/** + * Returns the next boolean value from the pseudo-random number generator. + * + * @since 2.0.0 + * @category random + */ +export const nextBoolean = internal.nextBoolean; +/** + * Returns the next integer from the pseudo-random number generator. + * + * @since 2.0.0 + * @category random + */ +export const nextInt = internal.nextInt; +/** + * Returns the next integer in the specified range from the pseudo-random number + * generator. + * + * @since 2.0.0 + * @category random + */ +export const nextIntBetween = internal.nextIntBetween; +/** + * Returns the next number in the specified range from the pseudo-random number + * generator. + * + * @since 2.0.0 + * @category random + */ +export const nextRange = internal.nextRange; +/** + * Uses the pseudo-random number generator to shuffle the specified iterable. + * + * @since 2.0.0 + * @category random + */ +export const shuffle = internal.shuffle; +//# sourceMappingURL=TRandom.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TReentrantLock.js.map b/backend/node_modules/effect/dist/esm/TReentrantLock.js.map new file mode 100644 index 0000000000000000000000000000000000000000..8e75f6ff35e48129e43870b872f96319c055cbf7 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TReentrantLock.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TReentrantLock.js","names":["internal","TReentrantLockTypeId","acquireRead","acquireWrite","fiberReadLocks","fiberWriteLocks","lock","locked","make","readLock","readLocks","readLocked","releaseRead","releaseWrite","withLock","withReadLock","withWriteLock","writeLock","writeLocked","writeLocks"],"sources":["../../src/TReentrantLock.ts"],"sourcesContent":[null],"mappings":"AAIA,OAAO,KAAKA,QAAQ,MAAM,kCAAkC;AAK5D;;;;AAIA,OAAO,MAAMC,oBAAoB,GAAkBD,QAAQ,CAACC,oBAAoB;AAkDhF;;;;;;;;AAQA,OAAO,MAAMC,WAAW,GAA8CF,QAAQ,CAACE,WAAW;AAE1F;;;;;;;;AAQA,OAAO,MAAMC,YAAY,GAA8CH,QAAQ,CAACG,YAAY;AAE5F;;;;;;AAMA,OAAO,MAAMC,cAAc,GAA8CJ,QAAQ,CAACI,cAAc;AAEhG;;;;;;AAMA,OAAO,MAAMC,eAAe,GAA8CL,QAAQ,CAACK,eAAe;AAElG;;;;;;;;;AASA,OAAO,MAAMC,IAAI,GAAwEN,QAAQ,CAACM,IAAI;AAEtG;;;;;;AAMA,OAAO,MAAMC,MAAM,GAA+CP,QAAQ,CAACO,MAAM;AAEjF;;;;;;AAMA,OAAO,MAAMC,IAAI,GAA4BR,QAAQ,CAACQ,IAAI;AAE1D;;;;;;AAMA,OAAO,MAAMC,QAAQ,GAAwET,QAAQ,CAACS,QAAQ;AAE9G;;;;;;AAMA,OAAO,MAAMC,SAAS,GAA8CV,QAAQ,CAACU,SAAS;AAEtF;;;;;;AAMA,OAAO,MAAMC,UAAU,GAA+CX,QAAQ,CAACW,UAAU;AAEzF;;;;;;;AAOA,OAAO,MAAMC,WAAW,GAA8CZ,QAAQ,CAACY,WAAW;AAE1F;;;;;;;AAOA,OAAO,MAAMC,YAAY,GAA8Cb,QAAQ,CAACa,YAAY;AAE5F;;;;;;AAMA,OAAO,MAAMC,QAAQ,GAejBd,QAAQ,CAACc,QAAQ;AAErB;;;;;;AAMA,OAAO,MAAMC,YAAY,GAerBf,QAAQ,CAACe,YAAY;AAEzB;;;;;;AAMA,OAAO,MAAMC,aAAa,GAetBhB,QAAQ,CAACgB,aAAa;AAE1B;;;;;;AAMA,OAAO,MAAMC,SAAS,GAAwEjB,QAAQ,CAACiB,SAAS;AAEhH;;;;;;AAMA,OAAO,MAAMC,WAAW,GAA+ClB,QAAQ,CAACkB,WAAW;AAE3F;;;;;;AAMA,OAAO,MAAMC,UAAU,GAA8CnB,QAAQ,CAACmB,UAAU","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TSemaphore.js b/backend/node_modules/effect/dist/esm/TSemaphore.js new file mode 100644 index 0000000000000000000000000000000000000000..cc339449e864c4f2ed59fab8a6994f0750168c44 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TSemaphore.js @@ -0,0 +1,65 @@ +/** + * @since 2.0.0 + */ +import * as internal from "./internal/stm/tSemaphore.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const TSemaphoreTypeId = internal.TSemaphoreTypeId; +/** + * @since 2.0.0 + * @category mutations + */ +export const acquire = internal.acquire; +/** + * @since 2.0.0 + * @category mutations + */ +export const acquireN = internal.acquireN; +/** + * @since 2.0.0 + * @category getters + */ +export const available = internal.available; +/** + * @since 2.0.0 + * @category constructors + */ +export const make = internal.make; +/** + * @since 2.0.0 + * @category mutations + */ +export const release = internal.release; +/** + * @since 2.0.0 + * @category mutations + */ +export const releaseN = internal.releaseN; +/** + * @since 2.0.0 + * @category mutations + */ +export const withPermit = internal.withPermit; +/** + * @since 2.0.0 + * @category mutations + */ +export const withPermits = internal.withPermits; +/** + * @since 2.0.0 + * @category mutations + */ +export const withPermitScoped = internal.withPermitScoped; +/** + * @since 2.0.0 + * @category mutations + */ +export const withPermitsScoped = internal.withPermitsScoped; +/** + * @since 2.0.0 + * @category unsafe + */ +export const unsafeMake = internal.unsafeMakeSemaphore; +//# sourceMappingURL=TSemaphore.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TSemaphore.js.map b/backend/node_modules/effect/dist/esm/TSemaphore.js.map new file mode 100644 index 0000000000000000000000000000000000000000..dab44c4747bc924b529ee94ba2b77320f69a7cdc --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TSemaphore.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TSemaphore.js","names":["internal","TSemaphoreTypeId","acquire","acquireN","available","make","release","releaseN","withPermit","withPermits","withPermitScoped","withPermitsScoped","unsafeMake","unsafeMakeSemaphore"],"sources":["../../src/TSemaphore.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAKA,OAAO,KAAKA,QAAQ,MAAM,8BAA8B;AAKxD;;;;AAIA,OAAO,MAAMC,gBAAgB,GAAkBD,QAAQ,CAACC,gBAAgB;AAmCxE;;;;AAIA,OAAO,MAAMC,OAAO,GAAwCF,QAAQ,CAACE,OAAO;AAE5E;;;;AAIA,OAAO,MAAMC,QAAQ,GAWjBH,QAAQ,CAACG,QAAQ;AAErB;;;;AAIA,OAAO,MAAMC,SAAS,GAA0CJ,QAAQ,CAACI,SAAS;AAElF;;;;AAIA,OAAO,MAAMC,IAAI,GAA6CL,QAAQ,CAACK,IAAI;AAE3E;;;;AAIA,OAAO,MAAMC,OAAO,GAAwCN,QAAQ,CAACM,OAAO;AAE5E;;;;AAIA,OAAO,MAAMC,QAAQ,GAWjBP,QAAQ,CAACO,QAAQ;AAErB;;;;AAIA,OAAO,MAAMC,UAAU,GAWnBR,QAAQ,CAACQ,UAAU;AAEvB;;;;AAIA,OAAO,MAAMC,WAAW,GAWpBT,QAAQ,CAACS,WAAW;AAExB;;;;AAIA,OAAO,MAAMC,gBAAgB,GAAkEV,QAAQ,CAACU,gBAAgB;AAExH;;;;AAIA,OAAO,MAAMC,iBAAiB,GAW1BX,QAAQ,CAACW,iBAAiB;AAE9B;;;;AAIA,OAAO,MAAMC,UAAU,GAAoCZ,QAAQ,CAACa,mBAAmB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TSubscriptionRef.js b/backend/node_modules/effect/dist/esm/TSubscriptionRef.js new file mode 100644 index 0000000000000000000000000000000000000000..ba0e4f028aed2d1fbccfb01804b1855f31091a76 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TSubscriptionRef.js @@ -0,0 +1,87 @@ +import * as internal from "./internal/stm/tSubscriptionRef.js"; +/** + * @since 3.10.0 + * @category symbols + */ +export const TSubscriptionRefTypeId = internal.TSubscriptionRefTypeId; +/** + * @since 3.10.0 + * @category mutations + */ +export const get = internal.get; +/** + * @since 3.10.0 + * @category mutations + */ +export const getAndSet = internal.getAndSet; +/** + * @since 3.10.0 + * @category mutations + */ +export const getAndUpdate = internal.getAndUpdate; +/** + * @since 3.10.0 + * @category mutations + */ +export const getAndUpdateSome = internal.getAndUpdateSome; +/** + * @since 3.10.0 + * @category constructors + */ +export const make = internal.make; +/** + * @since 3.10.0 + * @category mutations + */ +export const modify = internal.modify; +/** + * @since 3.10.0 + * @category mutations + */ +export const modifySome = internal.modifySome; +/** + * @since 3.10.0 + * @category mutations + */ +export const set = internal.set; +/** + * @since 3.10.0 + * @category mutations + */ +export const setAndGet = internal.setAndGet; +/** + * @since 3.10.0 + * @category mutations + */ +export const update = internal.update; +/** + * @since 3.10.0 + * @category mutations + */ +export const updateAndGet = internal.updateAndGet; +/** + * @since 3.10.0 + * @category mutations + */ +export const updateSome = internal.updateSome; +/** + * @since 3.10.0 + * @category mutations + */ +export const updateSomeAndGet = internal.updateSomeAndGet; +/** + * @since 3.10.0 + * @category mutations + */ +export const changesScoped = internal.changesScoped; +/** + * @since 3.10.0 + * @category mutations + */ +export const changesStream = internal.changesStream; +/** + * @since 3.10.0 + * @category mutations + */ +export const changes = self => self.changes; +//# sourceMappingURL=TSubscriptionRef.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TSubscriptionRef.js.map b/backend/node_modules/effect/dist/esm/TSubscriptionRef.js.map new file mode 100644 index 0000000000000000000000000000000000000000..288534b27dfd401b9c8932c5cd31d5891902e2bd --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TSubscriptionRef.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TSubscriptionRef.js","names":["internal","TSubscriptionRefTypeId","get","getAndSet","getAndUpdate","getAndUpdateSome","make","modify","modifySome","set","setAndGet","update","updateAndGet","updateSome","updateSomeAndGet","changesScoped","changesStream","changes","self"],"sources":["../../src/TSubscriptionRef.ts"],"sourcesContent":[null],"mappings":"AAIA,OAAO,KAAKA,QAAQ,MAAM,oCAAoC;AAU9D;;;;AAIA,OAAO,MAAMC,sBAAsB,GAAkBD,QAAQ,CAACC,sBAAsB;AA6CpF;;;;AAIA,OAAO,MAAMC,GAAG,GAAiDF,QAAQ,CAACE,GAAG;AAE7E;;;;AAIA,OAAO,MAAMC,SAAS,GAWlBH,QAAQ,CAACG,SAAS;AAEtB;;;;AAIA,OAAO,MAAMC,YAAY,GAWrBJ,QAAQ,CAACI,YAAY;AAEzB;;;;AAIA,OAAO,MAAMC,gBAAgB,GAWzBL,QAAQ,CAACK,gBAAgB;AAE7B;;;;AAIA,OAAO,MAAMC,IAAI,GAAkDN,QAAQ,CAACM,IAAI;AAEhF;;;;AAIA,OAAO,MAAMC,MAAM,GAWfP,QAAQ,CAACO,MAAM;AAEnB;;;;AAIA,OAAO,MAAMC,UAAU,GAenBR,QAAQ,CAACQ,UAAU;AAEvB;;;;AAIA,OAAO,MAAMC,GAAG,GAWZT,QAAQ,CAACS,GAAG;AAEhB;;;;AAIA,OAAO,MAAMC,SAAS,GAWlBV,QAAQ,CAACU,SAAS;AAEtB;;;;AAIA,OAAO,MAAMC,MAAM,GAWfX,QAAQ,CAACW,MAAM;AAEnB;;;;AAIA,OAAO,MAAMC,YAAY,GAWrBZ,QAAQ,CAACY,YAAY;AAEzB;;;;AAIA,OAAO,MAAMC,UAAU,GAWnBb,QAAQ,CAACa,UAAU;AAEvB;;;;AAIA,OAAO,MAAMC,gBAAgB,GAWzBd,QAAQ,CAACc,gBAAgB;AAE7B;;;;AAIA,OAAO,MAAMC,aAAa,GACxBf,QAAQ,CAACe,aAAa;AAExB;;;;AAIA,OAAO,MAAMC,aAAa,GAAuDhB,QAAQ,CAACgB,aAAa;AAEvG;;;;AAIA,OAAO,MAAMC,OAAO,GAAmEC,IAAI,IAAKA,IAAI,CAACD,OAAO","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TestAnnotation.js.map b/backend/node_modules/effect/dist/esm/TestAnnotation.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d40e958390e6257adc8a5927bb9a34bddbf5b0c6 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TestAnnotation.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TestAnnotation.js","names":["Chunk","Either","Equal","pipe","Hash","HashSet","getBugErrorMessage","hasProperty","TestAnnotationSymbolKey","TestAnnotationTypeId","Symbol","for","TestAnnotationImpl","identifier","initial","combine","_A","_","constructor","symbol","hash","cached","that","isTestAnnotation","u","make","compose","left","right","isLeft","isRight","appendAll","Error","fibers","ignored","a","b","repeated","retried","tagged","empty","union"],"sources":["../../src/TestAnnotation.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,K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CAAC,EACD,CAACU,CAAC,EAAEC,CAAC,KAAKD,CAAC,GAAGC,CAAC,CAChB;AAED;;;;;AAKA,OAAO,MAAME,OAAO,gBAA2Bb,IAAI,CACjD,SAAS,EACT,CAAC,EACD,CAACU,CAAC,EAAEC,CAAC,KAAKD,CAAC,GAAGC,CAAC,CAChB;AAED;;;;;AAKA,OAAO,MAAMG,MAAM,gBAA4Cd,IAAI,CACjE,QAAQ,eACRpB,OAAO,CAACmC,KAAK,EAAE,EACf,CAACL,CAAC,EAAEC,CAAC,KAAKjC,IAAI,CAACgC,CAAC,EAAE9B,OAAO,CAACoC,KAAK,CAACL,CAAC,CAAC,CAAC,CACpC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TestAnnotationMap.js b/backend/node_modules/effect/dist/esm/TestAnnotationMap.js new file mode 100644 index 0000000000000000000000000000000000000000..5b7c950cdafe757d9a49fcd3b3df8c7b247c5045 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TestAnnotationMap.js @@ -0,0 +1,80 @@ +/** + * @since 2.0.0 + */ +import { dual } from "./Function.js"; +import * as HashMap from "./HashMap.js"; +import { hasProperty } from "./Predicate.js"; +/** + * @since 2.0.0 + */ +export const TestAnnotationMapTypeId = /*#__PURE__*/Symbol.for("effect/TestAnnotationMap"); +/** @internal */ +class TestAnnotationMapImpl { + map; + [TestAnnotationMapTypeId] = TestAnnotationMapTypeId; + constructor(map) { + this.map = map; + } +} +/** + * @since 2.0.0 + */ +export const isTestAnnotationMap = u => hasProperty(u, TestAnnotationMapTypeId); +/** + * @since 2.0.0 + */ +export const empty = () => new TestAnnotationMapImpl(HashMap.empty()); +/** + * @since 2.0.0 + */ +export const make = map => { + return new TestAnnotationMapImpl(map); +}; +/** + * @since 2.0.0 + */ +export const overwrite = /*#__PURE__*/dual(3, (self, key, value) => make(HashMap.set(self.map, key, value))); +/** + * @since 2.0.0 + */ +export const update = /*#__PURE__*/dual(3, (self, key, f) => { + let value = key.initial; + if (HashMap.has(self.map, key)) { + value = HashMap.unsafeGet(self.map, key); + } + return overwrite(self, key, f(value)); +}); +/** + * Retrieves the annotation of the specified type, or its default value if + * there is none. + * + * @since 2.0.0 + */ +export const get = /*#__PURE__*/dual(2, (self, key) => { + if (HashMap.has(self.map, key)) { + return HashMap.unsafeGet(self.map, key); + } + return key.initial; +}); +/** + * Appends the specified annotation to the annotation map. + * + * @since 2.0.0 + */ +export const annotate = /*#__PURE__*/dual(3, (self, key, value) => update(self, key, _ => key.combine(_, value))); +/** + * @since 2.0.0 + */ +export const combine = /*#__PURE__*/dual(2, (self, that) => { + let result = self.map; + for (const entry of that.map) { + if (HashMap.has(result, entry[0])) { + const value = HashMap.get(result, entry[0]); + result = HashMap.set(result, entry[0], entry[0].combine(value, entry[1])); + } else { + result = HashMap.set(result, entry[0], entry[1]); + } + } + return make(result); +}); +//# sourceMappingURL=TestAnnotationMap.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TestAnnotations.js b/backend/node_modules/effect/dist/esm/TestAnnotations.js new file mode 100644 index 0000000000000000000000000000000000000000..f72de925a4cfd08f227163ad8f2883b9ddbfa230 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TestAnnotations.js @@ -0,0 +1,61 @@ +/** + * @since 2.0.0 + */ +import * as RA from "./Array.js"; +import * as Context from "./Context.js"; +import * as Equal from "./Equal.js"; +import { pipe } from "./Function.js"; +import * as effect from "./internal/core-effect.js"; +import * as core from "./internal/core.js"; +import * as fiber from "./internal/fiber.js"; +import * as MutableRef from "./MutableRef.js"; +import { hasProperty } from "./Predicate.js"; +import * as Ref from "./Ref.js"; +import * as SortedSet from "./SortedSet.js"; +import * as TestAnnotation from "./TestAnnotation.js"; +import * as TestAnnotationMap from "./TestAnnotationMap.js"; +/** + * @since 2.0.0 + */ +export const TestAnnotationsTypeId = /*#__PURE__*/Symbol.for("effect/TestAnnotations"); +/** @internal */ +class AnnotationsImpl { + ref; + [TestAnnotationsTypeId] = TestAnnotationsTypeId; + constructor(ref) { + this.ref = ref; + } + get(key) { + return core.map(Ref.get(this.ref), TestAnnotationMap.get(key)); + } + annotate(key, value) { + return Ref.update(this.ref, TestAnnotationMap.annotate(key, value)); + } + get supervisedFibers() { + return effect.descriptorWith(descriptor => core.flatMap(this.get(TestAnnotation.fibers), either => { + switch (either._tag) { + case "Left": + { + return core.succeed(SortedSet.empty(fiber.Order)); + } + case "Right": + { + return pipe(either.right, core.forEachSequential(ref => core.sync(() => MutableRef.get(ref))), core.map(RA.reduce(SortedSet.empty(fiber.Order), (a, b) => SortedSet.union(a, b))), core.map(SortedSet.filter(fiber => !Equal.equals(fiber.id(), descriptor.id)))); + } + } + })); + } +} +/** + * @since 2.0.0 + */ +export const TestAnnotations = /*#__PURE__*/Context.GenericTag("effect/Annotations"); +/** + * @since 2.0.0 + */ +export const isTestAnnotations = u => hasProperty(u, TestAnnotationsTypeId); +/** + * @since 2.0.0 + */ +export const make = ref => new AnnotationsImpl(ref); +//# sourceMappingURL=TestAnnotations.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TestAnnotations.js.map b/backend/node_modules/effect/dist/esm/TestAnnotations.js.map new file mode 100644 index 0000000000000000000000000000000000000000..551f54c9a3a835447db14d524a0a922ab9efc48c --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TestAnnotations.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TestAnnotations.js","names":["RA","Context","Equal","pipe","effect","core","fiber","MutableRef","hasProperty","Ref","SortedSet","TestAnnotation","TestAnnotationMap","TestAnnotationsTypeId","Symbol","for","AnnotationsImpl","ref","constructor","get","key","map","annotate","value","update","supervisedFibers","descriptorWith","descriptor","flatMap","fibers","either","_tag","succeed","empty","Order","right","forEachSequential","sync","reduce","a","b","union","filter","equals","id","TestAnnotations","GenericTag","isTestAnnotations","u","make"],"sources":["../../src/TestAnnotations.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,EAAE,MAAM,YAAY;AAChC,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C,IAAI;QACjB,KAAK,MAAM;UAAE;YACX,OAAO1B,IAAI,CAAC2B,OAAO,CAACtB,SAAS,CAACuB,KAAK,CAAC3B,KAAK,CAAC4B,KAAK,CAAC,CAAC;UACnD;QACA,KAAK,OAAO;UAAE;YACZ,OAAO/B,IAAI,CACT2B,MAAM,CAACK,KAAK,EACZ9B,IAAI,CAAC+B,iBAAiB,CAAEnB,GAAG,IAAKZ,IAAI,CAACgC,IAAI,CAAC,MAAM9B,UAAU,CAACY,GAAG,CAACF,GAAG,CAAC,CAAC,CAAC,EACrEZ,IAAI,CAACgB,GAAG,CAACrB,EAAE,CAACsC,MAAM,CAAC5B,SAAS,CAACuB,KAAK,CAAC3B,KAAK,CAAC4B,KAAK,CAAC,EAAE,CAACK,CAAC,EAAEC,CAAC,KAAK9B,SAAS,CAAC+B,KAAK,CAACF,CAAC,EAAEC,CAAC,CAAC,CAAC,CAAC,EAClFnC,IAAI,CAACgB,GAAG,CAACX,SAAS,CAACgC,MAAM,CAAEpC,KAAK,IAAK,CAACJ,KAAK,CAACyC,MAAM,CAACrC,KAAK,CAACsC,EAAE,EAAE,EAAEjB,UAAU,CAACiB,EAAE,CAAC,CAAC,CAAC,CAChF;UACH;MACF;IACF,CAAC,CAAC,CACH;EACH;;AAGF;;;AAGA,OAAO,MAAMC,eAAe,gBAAkD5C,OAAO,CAAC6C,UAAU,CAC9F,oBAAoB,CACrB;AAED;;;AAGA,OAAO,MAAMC,iBAAiB,GAAIC,CAAU,IAA2BxC,WAAW,CAACwC,CAAC,EAAEnC,qBAAqB,CAAC;AAE5G;;;AAGA,OAAO,MAAMoC,IAAI,GACfhC,GAAiD,IAC7B,IAAID,eAAe,CAACC,GAAG,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TestClock.js.map b/backend/node_modules/effect/dist/esm/TestClock.js.map new file mode 100644 index 0000000000000000000000000000000000000000..04d86a57ee6b05caa915ade17cea580cb33d4fac --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TestClock.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TestClock.js","names":["Chunk","Context","DateTime","Duration","Equal","FiberStatus","constVoid","dual","identity","pipe","HashMap","clock","effect","core","defaultServices","circular","fiberRuntime","layer","ref","synchronized","SuspendedWarningData","WarningData","number","Option","Order","Annotations","Live","makeData","instant","sleeps","TestClock","GenericTag","warning","suspendedWarning","TestClockImpl","clockState","live","annotations","warningState","suspendedWarningState","ClockTypeId","constructor","currentTimeMillis","map","get","data","currentTimeNanos","BigInt","unsafeCurrentTimeMillis","unsafeGet","unsafeCurrentTimeNanos","save","set","setTime","zipRight","warningDone","run","sleep","durationInput","duration","decode","flatMap","deferredMake","deferred","modify","end","toMillis","prepend","shouldAwait","warningStart","deferredAwait","deferredSucceed","asVoid","_","adjust","n","adjustWith","zipLeftOptions","concurrent","supervisedFibers","freeze","fibers","reduce","empty","fiber","status","isDone","succeed","id","isSuspended","fail","updateSomeEffect","isStart","some","provide","logWarning","delay","seconds","interruptible","fork","pending","none","warningData","done","isPending","interruptFiber","as","yieldTimer","async","resume","timer","setTimeout","void","sync","clearTimeout","suspended","zip","first","last","equals","awaitSuspended","suspendedWarningStart","zipWith","filterOrFail","eventually","suspendedWarningDone","suspendedWarningData","start","f","sorted","sort","mapInput","isNonEmpty","headNonEmpty","tailNonEmpty","option","_tag","value","yieldNow","scoped","gen","TestLive","TestAnnotations","unsafeMake","makeSynchronized","testClock","withClockScoped","addFinalizer","defaultTestClock","Date","getTime","testClockWith","input","epochMillis","fiberRefGetWith","currentServices","services","clockTag"],"sources":["../../src/TestClock.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,KAAK,MAAM,YAAY;AAEnC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AAEzC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AAEzC,OAAO,KAAKC,KAAK,MAAM,YAAY;AAGnC,OAAO,KAA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IACtBA,SAAS,CAAC5F,OAAO,CACf,OAAOmG,KAAK,KAAK,QAAQ,GACrBA,KAAK,GACLtJ,QAAQ,CAAC6I,UAAU,CAACS,KAAK,CAAC,CAACC,WAAW,CAC3C,CACF;AAEH;;;;;;;AAOA,OAAO,MAAMhG,KAAK,GAAIC,aAAqC,IAAyB;EAClF,MAAMC,QAAQ,GAAGxD,QAAQ,CAACyD,MAAM,CAACF,aAAa,CAAC;EAC/C,OAAO6F,aAAa,CAAEN,SAAS,IAAKA,SAAS,CAACxF,KAAK,CAACE,QAAQ,CAAC,CAAC;AAChE,CAAC;AAED;;;;;;AAMA,OAAO,MAAM9B,MAAM,GAAGA,CAAA,KAA0C0H,aAAa,CAAEN,SAAS,IAAKA,SAAS,CAACpH,MAAM,CAAC;AAE9G;;;;;AAKA,OAAO,MAAMoH,SAAS,GAAGA,CAAA,KAAgCM,aAAa,CAAC1I,IAAI,CAAC0E,OAAO,CAAC;AAEpF;;;;;;AAMA,OAAO,MAAMgE,aAAa,GAAavB,CAAmD,IACxFnH,IAAI,CAAC6I,eAAe,CAClB5I,eAAe,CAAC6I,eAAe,EAC9BC,QAAQ,IAAK5B,CAAC,CAACvH,IAAI,CAACmJ,QAAQ,EAAE3J,OAAO,CAAC2C,GAAG,CAACjC,KAAK,CAACkJ,QAAQ,CAAC,CAAc,CAAC,CAC1E;AAEH;;;;;;AAMA,OAAO,MAAMnH,iBAAiB,gBAA0B6G,aAAa,CAAEN,SAAS,IAAKA,SAAS,CAACvG,iBAAiB,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TestContext.js.map b/backend/node_modules/effect/dist/esm/TestContext.js.map new file mode 100644 index 0000000000000000000000000000000000000000..9372454ed9cf8ca569155ad169b0eec2cfecedcc --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TestContext.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TestContext.js","names":["pipe","defaultServices","layer","TestClock","TestServices","live","annotationsLayer","merge","liveLayer","sizedLayer","defaultTestClock","provideMerge","testConfigLayer","repeats","retries","samples","shrinks","LiveContext","syncContext","liveServices","TestContext"],"sources":["../../src/TestContext.ts"],"sourcesContent":[null],"mappings":"AAIA,SAASA,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,eAAe,MAAM,+BAA+B;AAChE,OAAO,KAAKC,KAAK,MAAM,qBAAqB;AAE5C,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAC3C,OAAO,KAAKC,YAAY,MAAM,mBAAmB;AAEjD;AACA,OAAO,MAAMC,IAAI,gBAAmFL,IAAI,cACtGI,YAAY,CAACE,gBAAgB,EAAE,eAC/BJ,KAAK,CAACK,KAAK,cAACH,YAAY,CAACI,SAAS,EAAE,CAAC,eACrCN,KAAK,CAACK,KAAK,cAACH,YAAY,CAACK,UAAU,CAAC,GAAG,CAAC,CAAC,eACzCP,KAAK,CAACK,KAAK,cAACP,IAAI,CACdG,SAAS,CAACO,gBAAgB,eAC1BR,KAAK,CAACS,YAAY,cAChBT,KAAK,CAACK,KAAK,cAACH,YAAY,CAACI,SAAS,EAAE,eAAEJ,YAAY,CAACE,gBAAgB,EAAE,CAAC,CACvE,CACF,CAAC,eACFJ,KAAK,CAACK,KAAK,cAACH,YAAY,CAACQ,eAAe,CAAC;EAAEC,OAAO,EAAE,GAAG;EAAEC,OAAO,EAAE,GAAG;EAAEC,OAAO,EAAE,GAAG;EAAEC,OAAO,EAAE;AAAI,CAAE,CAAC,CAAC,CACvG;AAED;;;AAGA,OAAO,MAAMC,WAAW,gBAAiDf,KAAK,CAACgB,WAAW,CAAC,MACzFjB,eAAe,CAACkB,YAAY,CAC7B;AAED;;;AAGA,OAAO,MAAMC,WAAW,gBAA2ClB,KAAK,CAACS,YAAY,CAACN,IAAI,EAAEY,WAAW,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TestLive.js b/backend/node_modules/effect/dist/esm/TestLive.js new file mode 100644 index 0000000000000000000000000000000000000000..74883c30897139cf513d4a56f6591aea144858a4 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TestLive.js @@ -0,0 +1,30 @@ +/** + * @since 2.0.0 + */ +import * as Context from "./Context.js"; +import * as core from "./internal/core.js"; +import * as defaultServices from "./internal/defaultServices.js"; +/** + * @since 2.0.0 + */ +export const TestLiveTypeId = /*#__PURE__*/Symbol.for("effect/TestLive"); +/** + * @since 2.0.0 + */ +export const TestLive = /*#__PURE__*/Context.GenericTag("effect/TestLive"); +/** @internal */ +class LiveImpl { + services; + [TestLiveTypeId] = TestLiveTypeId; + constructor(services) { + this.services = services; + } + provide(effect) { + return core.fiberRefLocallyWith(defaultServices.currentServices, Context.merge(this.services))(effect); + } +} +/** + * @since 2.0.0 + */ +export const make = services => new LiveImpl(services); +//# sourceMappingURL=TestLive.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TestLive.js.map b/backend/node_modules/effect/dist/esm/TestLive.js.map new file mode 100644 index 0000000000000000000000000000000000000000..0c47b0ceded6ea823772b6f82a8c67c9d8081f46 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TestLive.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TestLive.js","names":["Context","core","defaultServices","TestLiveTypeId","Symbol","for","TestLive","GenericTag","LiveImpl","services","constructor","provide","effect","fiberRefLocallyWith","currentServices","merge","make"],"sources":["../../src/TestLive.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,OAAO,MAAM,cAAc;AAGvC,OAAO,KAAKC,IAAI,MAAM,oBAAoB;AAC1C,OAAO,KAAKC,eAAe,MAAM,+BAA+B;AAEhE;;;AAGA,OAAO,MAAMC,cAAc,gBAAkBC,MAAM,CAACC,GAAG,CAAC,iBAAiB,CAAC;AAoB1E;;;AAGA,OAAO,MAAMC,QAAQ,gBAAoCN,OAAO,CAACO,UAAU,CAAW,iBAAiB,CAAC;AAExG;AACA,MAAMC,QAAQ;EAESC,QAAA;EADZ,CAACN,cAAc,IAAoBA,cAAc;EAC1DO,YAAqBD,QAA0D;IAA1D,KAAAA,QAAQ,GAARA,QAAQ;EAAqD;EAClFE,OAAOA,CAAUC,MAA8B;IAC7C,OAAOX,IAAI,CAACY,mBAAmB,CAC7BX,eAAe,CAACY,eAAe,EAC/Bd,OAAO,CAACe,KAAK,CAAC,IAAI,CAACN,QAAQ,CAAC,CAC7B,CAACG,MAAM,CAAC;EACX;;AAGF;;;AAGA,OAAO,MAAMI,IAAI,GAAIP,QAA0D,IAAe,IAAID,QAAQ,CAACC,QAAQ,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TestServices.js b/backend/node_modules/effect/dist/esm/TestServices.js new file mode 100644 index 0000000000000000000000000000000000000000..2900f4e1fc810192ad862b7dd1de4bb817f2895e --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TestServices.js @@ -0,0 +1,230 @@ +/** + * @since 2.0.0 + */ +import * as Context from "./Context.js"; +import * as Effect from "./Effect.js"; +import { dual, pipe } from "./Function.js"; +import * as core from "./internal/core.js"; +import * as defaultServices from "./internal/defaultServices.js"; +import * as fiberRuntime from "./internal/fiberRuntime.js"; +import * as layer from "./internal/layer.js"; +import * as ref from "./internal/ref.js"; +import * as TestAnnotationMap from "./TestAnnotationMap.js"; +import * as Annotations from "./TestAnnotations.js"; +import * as TestConfig from "./TestConfig.js"; +import * as Live from "./TestLive.js"; +import * as Sized from "./TestSized.js"; +/** + * The default Effect test services. + * + * @since 2.0.0 + */ +export const liveServices = /*#__PURE__*/pipe(/*#__PURE__*/Context.make(Annotations.TestAnnotations, /*#__PURE__*/Annotations.make(/*#__PURE__*/ref.unsafeMake(/*#__PURE__*/TestAnnotationMap.empty()))), /*#__PURE__*/Context.add(Live.TestLive, /*#__PURE__*/Live.make(defaultServices.liveServices)), /*#__PURE__*/Context.add(Sized.TestSized, /*#__PURE__*/Sized.make(100)), /*#__PURE__*/Context.add(TestConfig.TestConfig, /*#__PURE__*/TestConfig.make({ + repeats: 100, + retries: 100, + samples: 200, + shrinks: 1000 +}))); +/** + * @since 2.0.0 + */ +export const currentServices = /*#__PURE__*/core.fiberRefUnsafeMakeContext(liveServices); +/** + * Retrieves the `Annotations` service for this test. + * + * @since 2.0.0 + */ +export const annotations = () => annotationsWith(core.succeed); +/** + * Retrieves the `Annotations` service for this test and uses it to run the + * specified workflow. + * + * @since 2.0.0 + */ +export const annotationsWith = f => core.fiberRefGetWith(currentServices, services => f(Context.get(services, Annotations.TestAnnotations))); +/** + * Executes the specified workflow with the specified implementation of the + * annotations service. + * + * @since 2.0.0 + */ +export const withAnnotations = /*#__PURE__*/dual(2, (effect, annotations) => core.fiberRefLocallyWith(currentServices, Context.add(Annotations.TestAnnotations, annotations))(effect)); +/** + * Sets the implementation of the annotations service to the specified value + * and restores it to its original value when the scope is closed. + * + * @since 2.0.0 + */ +export const withAnnotationsScoped = annotations => fiberRuntime.fiberRefLocallyScopedWith(currentServices, Context.add(Annotations.TestAnnotations, annotations)); +/** + * Constructs a new `Annotations` service wrapped in a layer. + * + * @since 2.0.0 + */ +export const annotationsLayer = () => layer.scoped(Annotations.TestAnnotations, pipe(core.sync(() => ref.unsafeMake(TestAnnotationMap.empty())), core.map(Annotations.make), core.tap(withAnnotationsScoped))); +/** + * Accesses an `Annotations` instance in the context and retrieves the + * annotation of the specified type, or its default value if there is none. + * + * @since 2.0.0 + */ +export const get = key => annotationsWith(annotations => annotations.get(key)); +/** + * Accesses an `Annotations` instance in the context and appends the + * specified annotation to the annotation map. + * + * @since 2.0.0 + */ +export const annotate = (key, value) => annotationsWith(annotations => annotations.annotate(key, value)); +/** + * Returns the set of all fibers in this test. + * + * @since 2.0.0 + */ +export const supervisedFibers = () => annotationsWith(annotations => annotations.supervisedFibers); +/** + * Retrieves the `Live` service for this test and uses it to run the specified + * workflow. + * + * @since 2.0.0 + */ +export const liveWith = f => core.fiberRefGetWith(currentServices, services => f(Context.get(services, Live.TestLive))); +/** + * Retrieves the `Live` service for this test. + * + * @since 2.0.0 + */ +export const live = /*#__PURE__*/liveWith(core.succeed); +/** + * Executes the specified workflow with the specified implementation of the + * live service. + * + * @since 2.0.0 + */ +export const withLive = /*#__PURE__*/dual(2, (effect, live) => core.fiberRefLocallyWith(currentServices, Context.add(Live.TestLive, live))(effect)); +/** + * Sets the implementation of the live service to the specified value and + * restores it to its original value when the scope is closed. + * + * @since 2.0.0 + */ +export const withLiveScoped = live => fiberRuntime.fiberRefLocallyScopedWith(currentServices, Context.add(Live.TestLive, live)); +/** + * Constructs a new `Live` service wrapped in a layer. + * + * @since 2.0.0 + */ +export const liveLayer = () => layer.scoped(Live.TestLive, pipe(core.context(), core.map(Live.make), core.tap(withLiveScoped))); +/** + * Provides a workflow with the "live" default Effect services. + * + * @since 2.0.0 + */ +export const provideLive = effect => liveWith(live => live.provide(effect)); +/** + * Runs a transformation function with the live default Effect services while + * ensuring that the workflow itself is run with the test services. + * + * @since 2.0.0 + */ +export const provideWithLive = /*#__PURE__*/dual(2, (self, f) => core.fiberRefGetWith(defaultServices.currentServices, services => provideLive(f(core.fiberRefLocally(defaultServices.currentServices, services)(self))))); +/** + * Retrieves the `Sized` service for this test and uses it to run the + * specified workflow. + * + * @since 2.0.0 + */ +export const sizedWith = f => core.fiberRefGetWith(currentServices, services => f(Context.get(services, Sized.TestSized))); +/** + * Retrieves the `Sized` service for this test. + * + * @since 2.0.0 + */ +export const sized = /*#__PURE__*/sizedWith(core.succeed); +/** + * Executes the specified workflow with the specified implementation of the + * sized service. + * + * @since 2.0.0 + */ +export const withSized = /*#__PURE__*/dual(2, (effect, sized) => core.fiberRefLocallyWith(currentServices, Context.add(Sized.TestSized, sized))(effect)); +/** + * Sets the implementation of the sized service to the specified value and + * restores it to its original value when the scope is closed. + * + * @since 2.0.0 + */ +export const withSizedScoped = sized => fiberRuntime.fiberRefLocallyScopedWith(currentServices, Context.add(Sized.TestSized, sized)); +/** + * @since 2.0.0 + */ +export const sizedLayer = size => layer.scoped(Sized.TestSized, pipe(fiberRuntime.fiberRefMake(size), core.map(Sized.fromFiberRef), core.tap(withSizedScoped))); +/** + * @since 2.0.0 + */ +export const size = /*#__PURE__*/sizedWith(sized => sized.size); +/** + * @since 2.0.0 + */ +export const withSize = /*#__PURE__*/dual(2, (effect, size) => sizedWith(sized => sized.withSize(size)(effect))); +/** + * Retrieves the `TestConfig` service for this test and uses it to run the + * specified workflow. + * + * @since 2.0.0 + */ +export const testConfigWith = f => core.fiberRefGetWith(currentServices, services => f(Context.get(services, TestConfig.TestConfig))); +/** + * Retrieves the `TestConfig` service for this test. + * + * @since 2.0.0 + */ +export const testConfig = /*#__PURE__*/testConfigWith(core.succeed); +/** + * Executes the specified workflow with the specified implementation of the + * config service. + * + * @since 2.0.0 + */ +export const withTestConfig = /*#__PURE__*/dual(2, (effect, config) => core.fiberRefLocallyWith(currentServices, Context.add(TestConfig.TestConfig, config))(effect)); +/** + * Sets the implementation of the config service to the specified value and + * restores it to its original value when the scope is closed. + * + * @since 2.0.0 + */ +export const withTestConfigScoped = config => fiberRuntime.fiberRefLocallyScopedWith(currentServices, Context.add(TestConfig.TestConfig, config)); +/** + * Constructs a new `TestConfig` service with the specified settings. + * + * @since 2.0.0 + */ +export const testConfigLayer = params => layer.scoped(TestConfig.TestConfig, Effect.suspend(() => { + const testConfig = TestConfig.make(params); + return pipe(withTestConfigScoped(testConfig), core.as(testConfig)); +})); +/** + * The number of times to repeat tests to ensure they are stable. + * + * @since 2.0.0 + */ +export const repeats = /*#__PURE__*/testConfigWith(config => core.succeed(config.repeats)); +/** + * The number of times to retry flaky tests. + * + * @since 2.0.0 + */ +export const retries = /*#__PURE__*/testConfigWith(config => core.succeed(config.retries)); +/** + * The number of sufficient samples to check for a random variable. + * + * @since 2.0.0 + */ +export const samples = /*#__PURE__*/testConfigWith(config => core.succeed(config.samples)); +/** + * The maximum number of shrinkings to minimize large failures. + * + * @since 2.0.0 + */ +export const shrinks = /*#__PURE__*/testConfigWith(config => core.succeed(config.shrinks)); +//# sourceMappingURL=TestServices.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/TestSized.js.map b/backend/node_modules/effect/dist/esm/TestSized.js.map new file mode 100644 index 0000000000000000000000000000000000000000..7fc900e1e8a698ddcedd4a9f0510b961f5b529af --- /dev/null +++ b/backend/node_modules/effect/dist/esm/TestSized.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TestSized.js","names":["Context","core","TestSizedTypeId","Symbol","for","TestSized","GenericTag","SizedImpl","fiberRef","constructor","size","fiberRefGet","withSize","effect","fiberRefLocally","make","fiberRefUnsafeMake","fromFiberRef"],"sources":["../../src/TestSized.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,OAAO,MAAM,cAAc;AAGvC,OAAO,KAAKC,IAAI,MAAM,oBAAoB;AAE1C;;;AAGA,OAAO,MAAMC,eAAe,gBAAkBC,MAAM,CAACC,GAAG,CAAC,kBAAkB,CAAC;AAiB5E;;;AAGA,OAAO,MAAMC,SAAS,gBAAsCL,OAAO,CAACM,UAAU,CAAC,kBAAkB,CAAC;AAElG;AACA,MAAMC,SAAS;EAEQC,QAAA;EADZ,CAACN,eAAe,IAAqBA,eAAe;EAC7DO,YAAqBD,QAAmC;IAAnC,KAAAA,QAAQ,GAARA,QAAQ;EAA8B;EAC3D,IAAIE,IAAIA,CAAA;IACN,OAAOT,IAAI,CAACU,WAAW,CAAC,IAAI,CAACH,QAAQ,CAAC;EACxC;EACAI,QAAQA,CAACF,IAAY;IACnB,OAAiBG,MAA8B,IAC7CZ,IAAI,CAACa,eAAe,CAAC,IAAI,CAACN,QAAQ,EAAEE,IAAI,CAAC,CAACG,MAAM,CAAC;EACrD;;AAGF;;;AAGA,OAAO,MAAME,IAAI,GAAIL,IAAY,IAAgB,IAAIH,SAAS,CAACN,IAAI,CAACe,kBAAkB,CAACN,IAAI,CAAC,CAAC;AAE7F;;;AAGA,OAAO,MAAMO,YAAY,GAAIT,QAAmC,IAAgB,IAAID,SAAS,CAACC,QAAQ,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Tracer.js.map b/backend/node_modules/effect/dist/esm/Tracer.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f3426a4d67a49fb291808782f3b1dec43bb21dc5 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Tracer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Tracer.js","names":["defaultServices","internal","TracerTypeId","ParentSpan","spanTag","Tracer","tracerTag","make","externalSpan","tracerWith","DisablePropagation"],"sources":["../../src/Tracer.ts"],"sourcesContent":[null],"mappings":"AAQA,OAAO,KAAKA,eAAe,MAAM,+BAA+B;AAChE,OAAO,KAAKC,QAAQ,MAAM,sBAAsB;AAGhD;;;AAGA,OAAO,MAAMC,YAAY,GAAkBD,QAAQ,CAACC,YAAY;AAoDhE;;;;AAIA,OAAO,MAAMC,UAAU,GAAqCF,QAAQ,CAACG,OAAO;AAkE5E;;;;AAIA,OAAO,MAAMC,MAAM,GAAgCJ,QAAQ,CAACK,SAAS;AAErE;;;;AAIA,OAAO,MAAMC,IAAI,GAA2DN,QAAQ,CAACM,IAAI;AAEzF;;;;AAIA,OAAO,MAAMC,YAAY,GAOLP,QAAQ,CAACO,YAAY;AAEzC;;;;AAIA,OAAO,MAAMC,UAAU,GACrBT,eAAe,CAACS,UAAU;AAU5B;;;;AAIA,OAAO,MAAMC,kBAAkB,GAAmDT,QAAQ,CAACS,kBAAkB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Tuple.js b/backend/node_modules/effect/dist/esm/Tuple.js new file mode 100644 index 0000000000000000000000000000000000000000..3eb2137a32e8a82a21f20548872c3af299ec69d7 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Tuple.js @@ -0,0 +1,235 @@ +/** + * This module provides utility functions for working with tuples in TypeScript. + * + * @since 2.0.0 + */ +import * as Equivalence from "./Equivalence.js"; +import { dual } from "./Function.js"; +import * as order from "./Order.js"; +/** + * Constructs a new tuple from the provided values. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { make } from "effect/Tuple" + * + * assert.deepStrictEqual(make(1, 'hello', true), [1, 'hello', true]) + * ``` + * + * @category constructors + * @since 2.0.0 + */ +export const make = (...elements) => elements; +/** + * Return the first element from a tuple with two elements. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { getFirst } from "effect/Tuple" + * + * assert.deepStrictEqual(getFirst(["hello", 42]), "hello") + * ``` + * + * @category getters + * @since 2.0.0 + */ +export const getFirst = self => self[0]; +/** + * Return the second element from a tuple with two elements. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { getSecond } from "effect/Tuple" + * + * assert.deepStrictEqual(getSecond(["hello", 42]), 42) + * ``` + * + * @category getters + * @since 2.0.0 + */ +export const getSecond = self => self[1]; +/** + * Transforms each element of tuple using the given function, treating tuple homomorphically + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { pipe, Tuple } from "effect" + * + * const result = pipe( + * ["a", 1, false] as const, + * Tuple.map((el) => el.toString().toUpperCase()) + * ) + * assert.deepStrictEqual(result, ['A', '1', 'FALSE']) + * ``` + * + * @category mapping + * @since 3.9.0 + */ +export const map = /*#__PURE__*/dual(2, (self, fn) => self.map(element => fn(element))); +/** + * Transforms both elements of a tuple with two elements using the given functions. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { mapBoth } from "effect/Tuple" + * + * assert.deepStrictEqual( + * mapBoth(["hello", 42], { onFirst: s => s.toUpperCase(), onSecond: n => n.toString() }), + * ["HELLO", "42"] + * ) + * ``` + * + * @category mapping + * @since 2.0.0 + */ +export const mapBoth = /*#__PURE__*/dual(2, (self, { + onFirst, + onSecond +}) => [onFirst(self[0]), onSecond(self[1])]); +/** + * Transforms the first component of a tuple with two elements using a given function. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { mapFirst } from "effect/Tuple" + * + * assert.deepStrictEqual( + * mapFirst(["hello", 42], s => s.toUpperCase()), + * ["HELLO", 42] + * ) + * ``` + * + * @category mapping + * @since 2.0.0 + */ +export const mapFirst = /*#__PURE__*/dual(2, (self, f) => [f(self[0]), self[1]]); +/** + * Transforms the second component of a tuple with two elements using a given function. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { mapSecond } from "effect/Tuple" + * + * assert.deepStrictEqual( + * mapSecond(["hello", 42], n => n.toString()), + * ["hello", "42"] + * ) + * ``` + * + * @category mapping + * @since 2.0.0 + */ +export const mapSecond = /*#__PURE__*/dual(2, (self, f) => [self[0], f(self[1])]); +/** + * Swaps the elements of a tuple with two elements. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { swap } from "effect/Tuple" + * + * assert.deepStrictEqual(swap(["hello", 42]), [42, "hello"]) + * ``` + * + * @since 2.0.0 + */ +export const swap = self => [self[1], self[0]]; +/** + * Given a tuple of `Equivalence`s returns a new `Equivalence` that compares values of a tuple + * by applying each `Equivalence` to the corresponding element of the tuple. + * + * @category combinators + * @since 2.0.0 + */ +export const getEquivalence = Equivalence.tuple; +/** + * This function creates and returns a new `Order` for a tuple of values based on the given `Order`s for each element in the tuple. + * The returned `Order` compares two tuples of the same type by applying the corresponding `Order` to each element in the tuple. + * It is useful when you need to compare two tuples of the same type and you have a specific way of comparing each element + * of the tuple. + * + * @category combinators + * @since 2.0.0 + */ +export const getOrder = order.tuple; +/** + * Appends an element to the end of a tuple. + * + * @category concatenating + * @since 2.0.0 + */ +export const appendElement = /*#__PURE__*/dual(2, (self, that) => [...self, that]); +/** + * Retrieves the element at a specified index from a tuple. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { Tuple } from "effect" + * + * assert.deepStrictEqual(Tuple.at([1, 'hello', true], 1), 'hello') + * ``` + * + * @category getters + * @since 3.4.0 + */ +export const at = /*#__PURE__*/dual(2, (self, index) => self[index]); +export { +/** + * Determine if an `Array` is a tuple with exactly `N` elements, narrowing down the type to `TupleOf`. + * + * An `Array` is considered to be a `TupleOf` if its length is exactly `N`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isTupleOf } from "effect/Tuple" + * + * assert.deepStrictEqual(isTupleOf([1, 2, 3], 3), true); + * assert.deepStrictEqual(isTupleOf([1, 2, 3], 2), false); + * assert.deepStrictEqual(isTupleOf([1, 2, 3], 4), false); + * + * const arr: number[] = [1, 2, 3]; + * if (isTupleOf(arr, 3)) { + * console.log(arr); + * // ^? [number, number, number] + * } + * + * ``` + * @category guards + * @since 3.3.0 + */ +isTupleOf, +/** + * Determine if an `Array` is a tuple with at least `N` elements, narrowing down the type to `TupleOfAtLeast`. + * + * An `Array` is considered to be a `TupleOfAtLeast` if its length is at least `N`. + * + * @example + * ```ts + * import * as assert from "node:assert" + * import { isTupleOfAtLeast } from "effect/Tuple" + * + * assert.deepStrictEqual(isTupleOfAtLeast([1, 2, 3], 3), true); + * assert.deepStrictEqual(isTupleOfAtLeast([1, 2, 3], 2), true); + * assert.deepStrictEqual(isTupleOfAtLeast([1, 2, 3], 4), false); + * + * const arr: number[] = [1, 2, 3, 4]; + * if (isTupleOfAtLeast(arr, 3)) { + * console.log(arr); + * // ^? [number, number, number, ...number[]] + * } + * + * ``` + * @category guards + * @since 3.3.0 + */ +isTupleOfAtLeast } from "./Predicate.js"; +//# sourceMappingURL=Tuple.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Tuple.js.map b/backend/node_modules/effect/dist/esm/Tuple.js.map new file mode 100644 index 0000000000000000000000000000000000000000..be5d1062de009768bc1787bc3db680e56d68ab0c --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Tuple.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Tuple.js","names":["Equivalence","dual","order","make","elements","getFirst","self","getSecond","map","fn","element","mapBoth","onFirst","onSecond","mapFirst","f","mapSecond","swap","getEquivalence","tuple","getOrder","appendElement","that","at","index","isTupleOf","isTupleOfAtLeast"],"sources":["../../src/Tuple.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;AAKA,OAAO,KAAKA,WAAW,MAAM,kBAAkB;AAC/C,SAASC,IAAI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O,MAAMW,IAAI,GAAUX,IAAqB,IAAa,CAACA,IAAI,CAAC,CAAC,CAAC,EAAEA,IAAI,CAAC,CAAC,CAAC,CAAC;AAE/E;;;;;;;AAOA,OAAO,MAAMY,cAAc,GAIvBlB,WAAW,CAACmB,KAAK;AAErB;;;;;;;;;AASA,OAAO,MAAMC,QAAQ,GAEqElB,KAAK,CAACiB,KAAK;AAErG;;;;;;AAMA,OAAO,MAAME,aAAa,gBAetBpB,IAAI,CAAC,CAAC,EAAE,CAAsCK,IAAO,EAAEgB,IAAO,KAAgB,CAAC,GAAGhB,IAAI,EAAEgB,IAAI,CAAC,CAAC;AAElG;;;;;;;;;;;;;;AAcA,OAAO,MAAMC,EAAE,gBA+BXtB,IAAI,CAAC,CAAC,EAAE,CAAqDK,IAAO,EAAEkB,KAAQ,KAAWlB,IAAI,CAACkB,KAAK,CAAC,CAAC;AAEzG;AACE;;;;;;;;;;;;;;;;;;;;;;;;AAwBAC,SAAS;AACT;;;;;;;;;;;;;;;;;;;;;;;;AAwBAC,gBAAgB,QACX,gBAAgB","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Types.js b/backend/node_modules/effect/dist/esm/Types.js new file mode 100644 index 0000000000000000000000000000000000000000..4f78698cafde1a8682aeea181e7c1069a65bbd2e --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Types.js @@ -0,0 +1,7 @@ +/** + * A collection of types that are commonly used types. + * + * @since 2.0.0 + */ +export {}; +//# sourceMappingURL=Types.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Types.js.map b/backend/node_modules/effect/dist/esm/Types.js.map new file mode 100644 index 0000000000000000000000000000000000000000..2a0a270b2ab726cd3ae431dbff859fa45b95234a --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Types.js","names":[],"sources":["../../src/Types.ts"],"sourcesContent":[null],"mappings":"AAAA","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Unify.js b/backend/node_modules/effect/dist/esm/Unify.js new file mode 100644 index 0000000000000000000000000000000000000000..b2a0bb6fa4670ee1b0de8a05ab9b3cc5c4316f8f --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Unify.js @@ -0,0 +1,9 @@ +/** + * @since 2.0.0 + */ +import { identity } from "./Function.js"; +/** + * @since 2.0.0 + */ +export const unify = identity; +//# sourceMappingURL=Unify.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/Unify.js.map b/backend/node_modules/effect/dist/esm/Unify.js.map new file mode 100644 index 0000000000000000000000000000000000000000..2dd4c1573a0faff7465a6e8275e3d9cb0ba406f3 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/Unify.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Unify.js","names":["identity","unify"],"sources":["../../src/Unify.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAIA,SAASA,QAAQ,QAAQ,eAAe;AAiExC;;;AAGA,OAAO,MAAMC,KAAK,GAsDdD,QAAe","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/UpstreamPullRequest.js b/backend/node_modules/effect/dist/esm/UpstreamPullRequest.js new file mode 100644 index 0000000000000000000000000000000000000000..47aafae782560602b0cc07673d814fddeb2e1a1c --- /dev/null +++ b/backend/node_modules/effect/dist/esm/UpstreamPullRequest.js @@ -0,0 +1,51 @@ +/** + * @since 2.0.0 + */ +import * as internal from "./internal/channel/upstreamPullRequest.js"; +/** + * @since 2.0.0 + * @category symbols + */ +export const UpstreamPullRequestTypeId = internal.UpstreamPullRequestTypeId; +/** + * @since 2.0.0 + * @category constructors + */ +export const Pulled = internal.Pulled; +/** + * @since 2.0.0 + * @category constructors + */ +export const NoUpstream = internal.NoUpstream; +/** + * Returns `true` if the specified value is an `UpstreamPullRequest`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isUpstreamPullRequest = internal.isUpstreamPullRequest; +/** + * Returns `true` if the specified `UpstreamPullRequest` is a `Pulled`, `false` + * otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isPulled = internal.isPulled; +/** + * Returns `true` if the specified `UpstreamPullRequest` is a `NoUpstream`, + * `false` otherwise. + * + * @since 2.0.0 + * @category refinements + */ +export const isNoUpstream = internal.isNoUpstream; +/** + * Folds an `UpstreamPullRequest` into a value of type `Z`. + * + * @since 2.0.0 + * @category folding + */ +export const match = internal.match; +//# sourceMappingURL=UpstreamPullRequest.js.map \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/UpstreamPullRequest.js.map b/backend/node_modules/effect/dist/esm/UpstreamPullRequest.js.map new file mode 100644 index 0000000000000000000000000000000000000000..be4db4acd503fbd30ac4efe678208e372d1753b8 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/UpstreamPullRequest.js.map @@ -0,0 +1 @@ +{"version":3,"file":"UpstreamPullRequest.js","names":["internal","UpstreamPullRequestTypeId","Pulled","NoUpstream","isUpstreamPullRequest","isPulled","isNoUpstream","match"],"sources":["../../src/UpstreamPullRequest.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,QAAQ,MAAM,2CAA2C;AAGrE;;;;AAIA,OAAO,MAAMC,yBAAyB,GAAkBD,QAAQ,CAACC,yBAAyB;AA+C1F;;;;AAIA,OAAO,MAAMC,MAAM,GAA4CF,QAAQ,CAACE,MAAM;AAE9E;;;;AAIA,OAAO,MAAMC,UAAU,GAAkEH,QAAQ,CAACG,UAAU;AAE5G;;;;;;;AAOA,OAAO,MAAMC,qBAAqB,GAAsDJ,QAAQ,CAACI,qBAAqB;AAEtH;;;;;;;AAOA,OAAO,MAAMC,QAAQ,GAA2DL,QAAQ,CAACK,QAAQ;AAEjG;;;;;;;AAOA,OAAO,MAAMC,YAAY,GAA4DN,QAAQ,CAACM,YAAY;AAE1G;;;;;;AAMA,OAAO,MAAMC,KAAK,GA0BdP,QAAQ,CAACO,KAAK","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/UpstreamPullStrategy.js.map b/backend/node_modules/effect/dist/esm/UpstreamPullStrategy.js.map new file mode 100644 index 0000000000000000000000000000000000000000..5f8951e9a5118b6547d4086bfe0b4860dadc2a53 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/UpstreamPullStrategy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"UpstreamPullStrategy.js","names":["internal","UpstreamPullStrategyTypeId","PullAfterNext","PullAfterAllEnqueued","isUpstreamPullStrategy","isPullAfterNext","isPullAfterAllEnqueued","match"],"sources":["../../src/UpstreamPullStrategy.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,QAAQ,MAAM,4CAA4C;AAItE;;;;AAIA,OAAO,MAAMC,0BAA0B,GAAkBD,QAAQ,CAACC,0BAA0B;AA+C5F;;;;AAIA,OAAO,MAAMC,aAAa,GAAoEF,QAAQ,CAACE,aAAa;AAEpH;;;;AAIA,OAAO,MAAMC,oBAAoB,GAC/BH,QAAQ,CAACG,oBAAoB;AAE/B;;;;;;;AAOA,OAAO,MAAMC,sBAAsB,GACjCJ,QAAQ,CAACI,sBAAsB;AAEjC;;;;;;;AAOA,OAAO,MAAMC,eAAe,GAAmEL,QAAQ,CAACK,eAAe;AAEvH;;;;;;;AAOA,OAAO,MAAMC,sBAAsB,GACjCN,QAAQ,CAACM,sBAAsB;AAEjC;;;;;;AAMA,OAAO,MAAMC,KAAK,GA0BdP,QAAQ,CAACO,KAAK","ignoreList":[]} \ No newline at end of file diff --git a/backend/node_modules/effect/dist/esm/index.js b/backend/node_modules/effect/dist/esm/index.js new file mode 100644 index 0000000000000000000000000000000000000000..2a5aa4ba4a0f2c58816e619fb47e4bd057a95f04 --- /dev/null +++ b/backend/node_modules/effect/dist/esm/index.js @@ -0,0 +1,1385 @@ +/** + * @since 2.0.0 + */ +export { +/** + * @since 2.0.0 + */ +absurd, +/** + * @since 2.0.0 + */ +flow, +/** + * @since 2.0.0 + */ +hole, +/** + * @since 2.0.0 + */ +identity, +/** + * @since 2.0.0 + */ +pipe, +/** + * @since 2.0.0 + */ +unsafeCoerce } from "./Function.js"; +/** + * @since 3.10.0 + */ +export * as Arbitrary from "./Arbitrary.js"; +/** + * This module provides utility functions for working with arrays in TypeScript. + * + * @since 2.0.0 + */ +export * as Array from "./Array.js"; +/** + * This module provides utility functions and type class instances for working with the `BigDecimal` type in TypeScript. + * It includes functions for basic arithmetic operations, as well as type class instances for `Equivalence` and `Order`. + * + * A `BigDecimal` allows storing any real number to arbitrary precision; which avoids common floating point errors + * (such as 0.1 + 0.2 ≠ 0.3) at the cost of complexity. + * + * Internally, `BigDecimal` uses a `BigInt` object, paired with a 64-bit integer which determines the position of the + * decimal point. Therefore, the precision *is not* actually arbitrary, but limited to 263 decimal places. + * + * It is not recommended to convert a floating point number to a decimal directly, as the floating point representation + * may be unexpected. + * + * @module BigDecimal + * @since 2.0.0 + * @see {@link module:BigInt} for more similar operations on `bigint` types + * @see {@link module:Number} for more similar operations on `number` types + */ +export * as BigDecimal from "./BigDecimal.js"; +/** + * This module provides utility functions and type class instances for working with the `bigint` type in TypeScript. + * It includes functions for basic arithmetic operations, as well as type class instances for + * `Equivalence` and `Order`. + * + * @module BigInt + * @since 2.0.0 + * @see {@link module:BigDecimal} for more similar operations on `BigDecimal` types + * @see {@link module:Number} for more similar operations on `number` types + */ +export * as BigInt from "./BigInt.js"; +/** + * This module provides utility functions and type class instances for working with the `boolean` type in TypeScript. + * It includes functions for basic boolean operations, as well as type class instances for + * `Equivalence` and `Order`. + * + * @since 2.0.0 + */ +export * as Boolean from "./Boolean.js"; +/** + * This module provides types and utility functions to create and work with branded types, + * which are TypeScript types with an added type tag to prevent accidental usage of a value in the wrong context. + * + * The `refined` and `nominal` functions are both used to create branded types in TypeScript. + * The main difference between them is that `refined` allows for validation of the data, while `nominal` does not. + * + * The `nominal` function is used to create a new branded type that has the same underlying type as the input, but with a different name. + * This is useful when you want to distinguish between two values of the same type that have different meanings. + * The `nominal` function does not perform any validation of the input data. + * + * On the other hand, the `refined` function is used to create a new branded type that has the same underlying type as the input, + * but with a different name, and it also allows for validation of the input data. + * The `refined` function takes a predicate that is used to validate the input data. + * If the input data fails the validation, a `BrandErrors` is returned, which provides information about the specific validation failure. + * + * @since 2.0.0 + */ +export * as Brand from "./Brand.js"; +/** + * @since 2.0.0 + */ +export * as Cache from "./Cache.js"; +/** + * The `Effect` type is polymorphic in values of type `E` and we can + * work with any error type that we want. However, there is a lot of information + * that is not inside an arbitrary `E` value. So as a result, an `Effect` needs + * somewhere to store things like unexpected errors or defects, stack and + * execution traces, causes of fiber interruptions, and so forth. + * + * Effect-TS is very strict about preserving the full information related to a + * failure. It captures all type of errors into the `Cause` data type. `Effect` + * uses the `Cause` data type to store the full story of failure. So its + * error model is lossless. It doesn't throw information related to the failure + * result. So we can figure out exactly what happened during the operation of + * our effects. + * + * It is important to note that `Cause` is an underlying data type representing + * errors occuring within an `Effect` workflow. Thus, we don't usually deal with + * `Cause`s directly. Even though it is not a data type that we deal with very + * often, the `Cause` of a failing `Effect` workflow can be accessed at any + * time, which gives us total access to all parallel and sequential errors in + * occurring within our codebase. + * + * @since 2.0.0 + */ +export * as Cause from "./Cause.js"; +/** + * @since 2.0.0 + */ +export * as Channel from "./Channel.js"; +/** + * @since 2.0.0 + */ +export * as ChildExecutorDecision from "./ChildExecutorDecision.js"; +/** + * @since 2.0.0 + */ +export * as Chunk from "./Chunk.js"; +/** + * @since 2.0.0 + */ +export * as Clock from "./Clock.js"; +/** + * @since 2.0.0 + */ +export * as Config from "./Config.js"; +/** + * @since 2.0.0 + */ +export * as ConfigError from "./ConfigError.js"; +/** + * @since 2.0.0 + */ +export * as ConfigProvider from "./ConfigProvider.js"; +/** + * @since 2.0.0 + */ +export * as ConfigProviderPathPatch from "./ConfigProviderPathPatch.js"; +/** + * @since 2.0.0 + */ +export * as Console from "./Console.js"; +/** + * This module provides a data structure called `Context` that can be used for dependency injection in effectful + * programs. It is essentially a table mapping `Tag`s to their implementations (called `Service`s), and can be used to + * manage dependencies in a type-safe way. The `Context` data structure is essentially a way of providing access to a set + * of related services that can be passed around as a single unit. This module provides functions to create, modify, and + * query the contents of a `Context`, as well as a number of utility types for working with tags and services. + * + * @since 2.0.0 + */ +export * as Context from "./Context.js"; +/** + * @since 2.0.0 + */ +export * as Cron from "./Cron.js"; +/** + * @since 2.0.0 + */ +export * as Data from "./Data.js"; +/** + * @since 3.6.0 + */ +export * as DateTime from "./DateTime.js"; +/** + * @since 2.0.0 + */ +export * as DefaultServices from "./DefaultServices.js"; +/** + * @since 2.0.0 + */ +export * as Deferred from "./Deferred.js"; +/** + * @since 2.0.0 + */ +export * as Differ from "./Differ.js"; +/** + * @since 2.0.0 + */ +export * as Duration from "./Duration.js"; +/** + * @since 2.0.0 + */ +export * as Effect from "./Effect.js"; +/** + * @since 2.0.0 + */ +export * as Effectable from "./Effectable.js"; +/** + * @since 2.0.0 + */ +export * as Either from "./Either.js"; +/** + * This module provides encoding & decoding functionality for: + * + * - base64 (RFC4648) + * - base64 (URL) + * - hex + * + * @since 2.0.0 + */ +export * as Encoding from "./Encoding.js"; +/** + * @since 2.0.0 + */ +export * as Equal from "./Equal.js"; +/** + * This module provides an implementation of the `Equivalence` type class, which defines a binary relation + * that is reflexive, symmetric, and transitive. In other words, it defines a notion of equivalence between values of a certain type. + * These properties are also known in mathematics as an "equivalence relation". + * + * @since 2.0.0 + */ +export * as Equivalence from "./Equivalence.js"; +/** + * @since 3.16.0 + * @experimental + */ +export * as ExecutionPlan from "./ExecutionPlan.js"; +/** + * @since 2.0.0 + */ +export * as ExecutionStrategy from "./ExecutionStrategy.js"; +/** + * @since 2.0.0 + */ +export * as Exit from "./Exit.js"; +/** + * @since 3.10.0 + */ +export * as FastCheck from "./FastCheck.js"; +/** + * @since 2.0.0 + */ +export * as Fiber from "./Fiber.js"; +/** + * @since 2.0.0 + */ +export * as FiberHandle from "./FiberHandle.js"; +/** + * @since 2.0.0 + */ +export * as FiberId from "./FiberId.js"; +/** + * @since 2.0.0 + */ +export * as FiberMap from "./FiberMap.js"; +/** + * @since 2.0.0 + */ +export * as FiberRef from "./FiberRef.js"; +/** + * @since 2.0.0 + */ +export * as FiberRefs from "./FiberRefs.js"; +/** + * @since 2.0.0 + */ +export * as FiberRefsPatch from "./FiberRefsPatch.js"; +/** + * @since 2.0.0 + */ +export * as FiberSet from "./FiberSet.js"; +/** + * @since 2.0.0 + */ +export * as FiberStatus from "./FiberStatus.js"; +/** + * @since 2.0.0 + */ +export * as Function from "./Function.js"; +/** + * The `GlobalValue` module ensures that a single instance of a value is created globally, + * even when modules are imported multiple times (e.g., due to mixing CommonJS and ESM builds) + * or during hot-reloading in development environments like Next.js or Remix. + * + * It achieves this by using a versioned global store, identified by a unique `Symbol` tied to + * the current version of the `effect` library. The store holds values that are keyed by an identifier, + * allowing the reuse of previously computed instances across imports or reloads. + * + * This pattern is particularly useful in scenarios where frequent reloading can cause services or + * single-instance objects to be recreated unnecessarily, such as in development environments with hot-reloading. + * + * @since 2.0.0 + */ +export * as GlobalValue from "./GlobalValue.js"; +/** + * @experimental + * @since 3.18.0 + */ +export * as Graph from "./Graph.js"; +/** + * @since 2.0.0 + */ +export * as GroupBy from "./GroupBy.js"; +/** + * @since 2.0.0 + */ +export * as HKT from "./HKT.js"; +/** + * @since 2.0.0 + */ +export * as Hash from "./Hash.js"; +/** + * @since 2.0.0 + */ +export * as HashMap from "./HashMap.js"; +/** + * @since 3.19.0 + * @experimental + */ +export * as HashRing from "./HashRing.js"; +/** + * # HashSet + * + * An immutable `HashSet` provides a collection of unique values with efficient + * lookup, insertion and removal. Once created, a `HashSet` cannot be modified; + * any operation that would alter the set instead returns a new `HashSet` with + * the changes. This immutability offers benefits like predictable state + * management and easier reasoning about your code. + * + * ## What Problem Does It Solve? + * + * `HashSet` solves the problem of maintaining an unsorted collection where each + * value appears exactly once, with fast operations for checking membership and + * adding/removing values. + * + * ## When to Use + * + * Use `HashSet` when you need: + * + * - A collection with no duplicate values + * - Efficient membership testing (**`O(1)`** average complexity) + * - Set operations like union, intersection, and difference + * - An immutable data structure that preserves functional programming patterns + * + * ## Advanced Features + * + * HashSet provides operations for: + * + * - Transforming sets with map and flatMap + * - Filtering elements with filter + * - Combining sets with union, intersection and difference + * - Performance optimizations via mutable operations in controlled contexts + * + * ## Performance Characteristics + * + * - **Lookup** operations ({@link module:HashSet.has}): **`O(1)`** average time + * complexity + * - **Insertion** operations ({@link module:HashSet.add}): **`O(1)`** average time + * complexity + * - **Removal** operations ({@link module:HashSet.remove}): **`O(1)`** average + * time complexity + * - **Set** operations ({@link module:HashSet.union}, + * {@link module:HashSet.intersection}): **`O(n)`** where n is the size of the + * smaller set + * - **Iteration**: **`O(n)`** where n is the size of the set + * + * The HashSet data structure implements the following traits: + * + * - {@link Iterable}: allows iterating over the values in the set + * - {@link Equal}: allows comparing two sets for value-based equality + * - {@link Pipeable}: allows chaining operations with the pipe operator + * - {@link Inspectable}: allows inspecting the contents of the set + * + * ## Operations Reference + * + * | Category | Operation | Description | Complexity | + * | ------------ | ----------------------------------- | ------------------------------------------- | ---------- | + * | constructors | {@link module:HashSet.empty} | Creates an empty HashSet | O(1) | + * | constructors | {@link module:HashSet.fromIterable} | Creates a HashSet from an iterable | O(n) | + * | constructors | {@link module:HashSet.make} | Creates a HashSet from multiple values | O(n) | + * | | | | | + * | elements | {@link module:HashSet.has} | Checks if a value exists in the set | O(1) avg | + * | elements | {@link module:HashSet.some} | Checks if any element satisfies a predicate | O(n) | + * | elements | {@link module:HashSet.every} | Checks if all elements satisfy a predicate | O(n) | + * | elements | {@link module:HashSet.isSubset} | Checks if a set is a subset of another | O(n) | + * | | | | | + * | getters | {@link module:HashSet.values} | Gets an iterator of all values | O(1) | + * | getters | {@link module:HashSet.toValues} | Gets an array of all values | O(n) | + * | getters | {@link module:HashSet.size} | Gets the number of elements | O(1) | + * | | | | | + * | mutations | {@link module:HashSet.add} | Adds a value to the set | O(1) avg | + * | mutations | {@link module:HashSet.remove} | Removes a value from the set | O(1) avg | + * | mutations | {@link module:HashSet.toggle} | Toggles a value's presence | O(1) avg | + * | | | | | + * | operations | {@link module:HashSet.difference} | Computes set difference (A - B) | O(n) | + * | operations | {@link module:HashSet.intersection} | Computes set intersection (A ∩ B) | O(n) | + * | operations | {@link module:HashSet.union} | Computes set union (A ∪ B) | O(n) | + * | | | | | + * | mapping | {@link module:HashSet.map} | Transforms each element | O(n) | + * | | | | | + * | sequencing | {@link module:HashSet.flatMap} | Transforms and flattens elements | O(n) | + * | | | | | + * | traversing | {@link module:HashSet.forEach} | Applies a function to each element | O(n) | + * | | | | | + * | folding | {@link module:HashSet.reduce} | Reduces the set to a single value | O(n) | + * | | | | | + * | filtering | {@link module:HashSet.filter} | Keeps elements that satisfy a predicate | O(n) | + * | | | | | + * | partitioning | {@link module:HashSet.partition} | Splits into two sets by a predicate | O(n) | + * + * ## Notes + * + * ### Composability with the Effect Ecosystem: + * + * This `HashSet` is designed to work seamlessly within the Effect ecosystem. It + * implements the {@link Iterable}, {@link Equal}, {@link Pipeable}, and + * {@link Inspectable} traits from Effect. This ensures compatibility with other + * Effect data structures and functionalities. For example, you can easily use + * Effect's `pipe` method to chain operations on the `HashSet`. + * + * **Equality of Elements with Effect's {@link Equal `Equal`} Trait:** + * + * This `HashSet` relies on Effect's {@link Equal} trait to determine the + * uniqueness of elements within the set. The way equality is checked depends on + * the type of the elements: + * + * - **Primitive Values:** For primitive JavaScript values like strings, numbers, + * booleans, `null`, and `undefined`, equality is determined by their value + * (similar to the `===` operator). + * - **Objects and Custom Types:** For objects and other custom types, equality is + * determined by whether those types implement the {@link Equal} interface + * themselves. If an element type implements `Equal`, the `HashSet` will + * delegate to that implementation to perform the equality check. This allows + * you to define custom logic for determining when two instances of your + * objects should be considered equal based on their properties, rather than + * just their object identity. + * + * ```ts + * import { Equal, Hash, HashSet } from "effect" + * + * class Person implements Equal.Equal { + * constructor( + * readonly id: number, // Unique identifier + * readonly name: string, + * readonly age: number + * ) {} + * + * // Define equality based on id, name, and age + * [Equal.symbol](that: Equal.Equal): boolean { + * if (that instanceof Person) { + * return ( + * Equal.equals(this.id, that.id) && + * Equal.equals(this.name, that.name) && + * Equal.equals(this.age, that.age) + * ) + * } + * return false + * } + * + * // Generate a hash code based on the unique id + * [Hash.symbol](): number { + * return Hash.hash(this.id) + * } + * } + * + * // Creating a HashSet with objects that implement the Equal interface + * const set = HashSet.empty().pipe( + * HashSet.add(new Person(1, "Alice", 30)), + * HashSet.add(new Person(1, "Alice", 30)) + * ) + * + * // HashSet recognizes them as equal, so only one element is stored + * console.log(HashSet.size(set)) + * // Output: 1 + * ``` + * + * **Simplifying Equality and Hashing with `Data` and `Schema`:** + * + * Effect's {@link Data} and {@link Schema `Schema.Data`} modules offer powerful + * ways to automatically handle the implementation of both the {@link Equal} and + * {@link Hash} traits for your custom data structures. + * + * - **`Data` Module:** By using constructors like `Data.struct`, `Data.tuple`, + * `Data.array`, or `Data.case` to define your data types, Effect + * automatically generates the necessary implementations for value-based + * equality and consistent hashing. This significantly reduces boilerplate and + * ensures correctness. + * + * ```ts + * import { HashSet, Data, Equal } from "effect" + * import assert from "node:assert/strict" + * + * // Data.* implements the `Equal` traits for us + * const person1 = Data.struct({ id: 1, name: "Alice", age: 30 }) + * const person2 = Data.struct({ id: 1, name: "Alice", age: 30 }) + * + * assert(Equal.equals(person1, person2)) + * + * const set = HashSet.empty().pipe( + * HashSet.add(person1), + * HashSet.add(person2) + * ) + * + * // HashSet recognizes them as equal, so only one element is stored + * console.log(HashSet.size(set)) // Output: 1 + * ``` + * + * - **`Schema` Module:** When defining data schemas using the {@link Schema} + * module, you can use `Schema.Data` to automatically include the `Equal` and + * `Hash` traits in the decoded objects. This is particularly important when + * working with `HashSet`. **For decoded objects to be correctly recognized as + * equal within a `HashSet`, ensure that the schema for those objects is + * defined using `Schema.Data`.** + * + * ```ts + * import { Equal, HashSet, Schema } from "effect" + * import assert from "node:assert/strict" + * + * // Schema.Data implements the `Equal` traits for us + * const PersonSchema = Schema.Data( + * Schema.Struct({ + * id: Schema.Number, + * name: Schema.String, + * age: Schema.Number + * }) + * ) + * + * const Person = Schema.decode(PersonSchema) + * + * const person1 = Person({ id: 1, name: "Alice", age: 30 }) + * const person2 = Person({ id: 1, name: "Alice", age: 30 }) + * + * assert(Equal.equals(person1, person2)) // Output: true + * + * const set = HashSet.empty().pipe( + * HashSet.add(person1), + * HashSet.add(person2) + * ) + * + * // HashSet thanks to Schema.Data implementation of the `Equal` trait, recognizes the two Person as equal, so only one element is stored + * console.log(HashSet.size(set)) // Output: 1 + * ``` + * + * ### Interoperability with the JavaScript Runtime: + * + * To interoperate with the regular JavaScript runtime, Effect's `HashSet` + * provides methods to access its elements in formats readily usable by + * JavaScript APIs: {@link values `HashSet.values`}, + * {@link toValues `HashSet.toValues`} + * + * ```ts + * import { HashSet } from "effect" + * + * const hashSet: HashSet.HashSet = HashSet.make(1, 2, 3) + * + * // Using HashSet.values to convert HashSet.HashSet to IterableIterator + * const iterable: IterableIterator = HashSet.values(hashSet) + * + * console.log(...iterable) // Logs: 1 2 3 + * + * // Using HashSet.toValues to convert HashSet.HashSet to Array + * const array: Array = HashSet.toValues(hashSet) + * + * console.log(array) // Logs: [ 1, 2, 3 ] + * ``` + * + * Be mindful of performance implications (both time and space complexity) when + * frequently converting between Effect's immutable HashSet and mutable + * JavaScript data structures, especially for large collections. + * + * @module HashSet + * @since 2.0.0 + */ +export * as HashSet from "./HashSet.js"; +/** + * @since 2.0.0 + */ +export * as Inspectable from "./Inspectable.js"; +/** + * This module provides utility functions for working with Iterables in TypeScript. + * + * @since 2.0.0 + */ +export * as Iterable from "./Iterable.js"; +/** + * @since 3.10.0 + */ +export * as JSONSchema from "./JSONSchema.js"; +/** + * @since 2.0.0 + */ +export * as KeyedPool from "./KeyedPool.js"; +/** + * A `Layer` describes how to build one or more services in your + * application. Services can be injected into effects via + * `Effect.provideService`. Effects can require services via `Effect.service`. + * + * Layer can be thought of as recipes for producing bundles of services, given + * their dependencies (other services). + * + * Construction of services can be effectful and utilize resources that must be + * acquired and safely released when the services are done being utilized. + * + * By default layers are shared, meaning that if the same layer is used twice + * the layer will only be allocated a single time. + * + * Because of their excellent composition properties, layers are the idiomatic + * way in Effect-TS to create services that depend on other services. + * + * @since 2.0.0 + */ +export * as Layer from "./Layer.js"; +/** + * @since 3.14.0 + * @experimental + */ +export * as LayerMap from "./LayerMap.js"; +/** + * A data type for immutable linked lists representing ordered collections of elements of type `A`. + * + * This data type is optimal for last-in-first-out (LIFO), stack-like access patterns. If you need another access pattern, for example, random access or FIFO, consider using a collection more suited to this than `List`. + * + * **Performance** + * + * - Time: `List` has `O(1)` prepend and head/tail access. Most other operations are `O(n)` on the number of elements in the list. This includes the index-based lookup of elements, `length`, `append` and `reverse`. + * - Space: `List` implements structural sharing of the tail list. This means that many operations are either zero- or constant-memory cost. + * + * @since 2.0.0 + */ +export * as List from "./List.js"; +/** + * @since 2.0.0 + */ +export * as LogLevel from "./LogLevel.js"; +/** + * @since 2.0.0 + */ +export * as LogSpan from "./LogSpan.js"; +/** + * @since 2.0.0 + */ +export * as Logger from "./Logger.js"; +/** + * @since 3.8.0 + * @experimental + */ +export * as Mailbox from "./Mailbox.js"; +/** + * @since 2.0.0 + */ +export * as ManagedRuntime from "./ManagedRuntime.js"; +/** + * The `effect/match` module provides a type-safe pattern matching system for + * TypeScript. Inspired by functional programming, it simplifies conditional + * logic by replacing verbose if/else or switch statements with a structured and + * expressive API. + * + * This module supports matching against types, values, and discriminated unions + * while enforcing exhaustiveness checking to ensure all cases are handled. + * + * Although pattern matching is not yet a native JavaScript feature, + * `effect/match` offers a reliable implementation that is available today. + * + * **How Pattern Matching Works** + * + * Pattern matching follows a structured process: + * + * - **Creating a matcher**: Define a `Matcher` that operates on either a + * specific `Match.type` or `Match.value`. + * + * - **Defining patterns**: Use combinators such as `Match.when`, `Match.not`, + * and `Match.tag` to specify matching conditions. + * + * - **Completing the match**: Apply a finalizer such as `Match.exhaustive`, + * `Match.orElse`, or `Match.option` to determine how unmatched cases should + * be handled. + * + * @since 1.0.0 + */ +export * as Match from "./Match.js"; +/** + * @since 2.0.0 + */ +export * as MergeDecision from "./MergeDecision.js"; +/** + * @since 2.0.0 + */ +export * as MergeState from "./MergeState.js"; +/** + * @since 2.0.0 + */ +export * as MergeStrategy from "./MergeStrategy.js"; +/** + * @since 2.0.0 + */ +export * as Metric from "./Metric.js"; +/** + * @since 2.0.0 + */ +export * as MetricBoundaries from "./MetricBoundaries.js"; +/** + * @since 2.0.0 + */ +export * as MetricHook from "./MetricHook.js"; +/** + * @since 2.0.0 + */ +export * as MetricKey from "./MetricKey.js"; +/** + * @since 2.0.0 + */ +export * as MetricKeyType from "./MetricKeyType.js"; +/** + * @since 2.0.0 + */ +export * as MetricLabel from "./MetricLabel.js"; +/** + * @since 2.0.0 + */ +export * as MetricPair from "./MetricPair.js"; +/** + * @since 2.0.0 + */ +export * as MetricPolling from "./MetricPolling.js"; +/** + * @since 2.0.0 + */ +export * as MetricRegistry from "./MetricRegistry.js"; +/** + * @since 2.0.0 + */ +export * as MetricState from "./MetricState.js"; +/** + * A lightweight alternative to the `Effect` data type, with a subset of the functionality. + * + * @since 3.4.0 + * @experimental + */ +export * as Micro from "./Micro.js"; +/** + * @since 2.0.0 + * + * Enables low level framework authors to run on their own isolated effect version + */ +export * as ModuleVersion from "./ModuleVersion.js"; +/** + * @since 2.0.0 + */ +export * as MutableHashMap from "./MutableHashMap.js"; +/** + * # MutableHashSet + * + * A mutable `MutableHashSet` provides a collection of unique values with + * efficient lookup, insertion and removal. Unlike its immutable sibling + * {@link module:HashSet}, a `MutableHashSet` can be modified in-place; + * operations like add, remove, and clear directly modify the original set + * rather than creating a new one. This mutability offers benefits like improved + * performance in scenarios where you need to build or modify a set + * incrementally. + * + * ## What Problem Does It Solve? + * + * `MutableHashSet` solves the problem of maintaining an unsorted collection + * where each value appears exactly once, with fast operations for checking + * membership and adding/removing values, in contexts where mutability is + * preferred for performance or implementation simplicity. + * + * ## When to Use + * + * Use `MutableHashSet` when you need: + * + * - A collection with no duplicate values + * - Efficient membership testing (**`O(1)`** average complexity) + * - In-place modifications for better performance + * - A set that will be built or modified incrementally + * - Local mutability in otherwise immutable code + * + * ## Advanced Features + * + * MutableHashSet provides operations for: + * + * - Adding and removing elements with direct mutation + * - Checking for element existence + * - Clearing all elements at once + * - Converting to/from other collection types + * + * ## Performance Characteristics + * + * - **Lookup** operations ({@link module:MutableHashSet.has}): **`O(1)`** average + * time complexity + * - **Insertion** operations ({@link module:MutableHashSet.add}): **`O(1)`** + * average time complexity + * - **Removal** operations ({@link module:MutableHashSet.remove}): **`O(1)`** + * average time complexity + * - **Iteration**: **`O(n)`** where n is the size of the set + * + * The MutableHashSet data structure implements the following traits: + * + * - {@link Iterable}: allows iterating over the values in the set + * - {@link Pipeable}: allows chaining operations with the pipe operator + * - {@link Inspectable}: allows inspecting the contents of the set + * + * ## Operations Reference + * + * | Category | Operation | Description | Complexity | + * | ------------ | ------------------------------------------ | ----------------------------------- | ---------- | + * | constructors | {@link module:MutableHashSet.empty} | Creates an empty MutableHashSet | O(1) | + * | constructors | {@link module:MutableHashSet.fromIterable} | Creates a set from an iterable | O(n) | + * | constructors | {@link module:MutableHashSet.make} | Creates a set from multiple values | O(n) | + * | | | | | + * | elements | {@link module:MutableHashSet.has} | Checks if a value exists in the set | O(1) avg | + * | elements | {@link module:MutableHashSet.add} | Adds a value to the set | O(1) avg | + * | elements | {@link module:MutableHashSet.remove} | Removes a value from the set | O(1) avg | + * | elements | {@link module:MutableHashSet.size} | Gets the number of elements | O(1) | + * | elements | {@link module:MutableHashSet.clear} | Removes all values from the set | O(1) | + * + * ## Notes + * + * ### Mutability Considerations: + * + * Unlike most data structures in the Effect ecosystem, `MutableHashSet` is + * mutable. This means that operations like `add`, `remove`, and `clear` modify + * the original set rather than creating a new one. This can lead to more + * efficient code in some scenarios, but requires careful handling to avoid + * unexpected side effects. + * + * ### When to Choose `MutableHashSet` vs {@link module:HashSet}: + * + * - Use `MutableHashSet` when you need to build or modify a set incrementally and + * performance is a priority + * - Use `HashSet` when you want immutability guarantees and functional + * programming patterns + * - Consider using {@link module:HashSet}'s bounded mutation context (via + * {@link module:HashSet.beginMutation}, {@link module:HashSet.endMutation}, and + * {@link module:HashSet.mutate} methods) when you need temporary mutability + * within an otherwise immutable context - this approach might be sufficient + * for many use cases without requiring a separate `MutableHashSet` + * - `MutableHashSet` is often useful for local operations where the mutability is + * contained and doesn't leak into the broader application + * + * @module MutableHashSet + * @since 2.0.0 + */ +export * as MutableHashSet from "./MutableHashSet.js"; +/** + * @since 2.0.0 + */ +export * as MutableList from "./MutableList.js"; +/** + * @since 2.0.0 + */ +export * as MutableQueue from "./MutableQueue.js"; +/** + * @since 2.0.0 + */ +export * as MutableRef from "./MutableRef.js"; +/** + * @since 2.0.0 + */ +export * as NonEmptyIterable from "./NonEmptyIterable.js"; +/** + * # Number + * + * This module provides utility functions and type class instances for working + * with the `number` type in TypeScript. It includes functions for basic + * arithmetic operations, as well as type class instances for `Equivalence` and + * `Order`. + * + * ## Operations Reference + * + * | Category | Operation | Description | Domain | Co-domain | + * | ------------ | ------------------------------------------ | ------------------------------------------------------- | ------------------------------ | --------------------- | + * | constructors | {@link module:Number.parse} | Safely parses a string to a number | `string` | `Option` | + * | | | | | | + * | math | {@link module:Number.sum} | Adds two numbers | `number`, `number` | `number` | + * | math | {@link module:Number.sumAll} | Sums all numbers in a collection | `Iterable` | `number` | + * | math | {@link module:Number.subtract} | Subtracts one number from another | `number`, `number` | `number` | + * | math | {@link module:Number.multiply} | Multiplies two numbers | `number`, `number` | `number` | + * | math | {@link module:Number.multiplyAll} | Multiplies all numbers in a collection | `Iterable` | `number` | + * | math | {@link module:Number.divide} | Safely divides handling division by zero | `number`, `number` | `Option` | + * | math | {@link module:Number.unsafeDivide} | Divides but misbehaves for division by zero | `number`, `number` | `number` | + * | math | {@link module:Number.remainder} | Calculates remainder of division | `number`, `number` | `number` | + * | math | {@link module:Number.increment} | Adds 1 to a number | `number` | `number` | + * | math | {@link module:Number.decrement} | Subtracts 1 from a number | `number` | `number` | + * | math | {@link module:Number.sign} | Determines the sign of a number | `number` | `Ordering` | + * | math | {@link module:Number.nextPow2} | Finds the next power of 2 | `number` | `number` | + * | math | {@link module:Number.round} | Rounds a number with specified precision | `number`, `number` | `number` | + * | | | | | | + * | predicates | {@link module:Number.between} | Checks if a number is in a range | `number`, `{minimum, maximum}` | `boolean` | + * | predicates | {@link module:Number.lessThan} | Checks if one number is less than another | `number`, `number` | `boolean` | + * | predicates | {@link module:Number.lessThanOrEqualTo} | Checks if one number is less than or equal | `number`, `number` | `boolean` | + * | predicates | {@link module:Number.greaterThan} | Checks if one number is greater than another | `number`, `number` | `boolean` | + * | predicates | {@link module:Number.greaterThanOrEqualTo} | Checks if one number is greater or equal | `number`, `number` | `boolean` | + * | | | | | | + * | guards | {@link module:Number.isNumber} | Type guard for JavaScript numbers | `unknown` | `boolean` | + * | | | | | | + * | comparison | {@link module:Number.min} | Returns the minimum of two numbers | `number`, `number` | `number` | + * | comparison | {@link module:Number.max} | Returns the maximum of two numbers | `number`, `number` | `number` | + * | comparison | {@link module:Number.clamp} | Restricts a number to a range | `number`, `{minimum, maximum}` | `number` | + * | | | | | | + * | instances | {@link module:Number.Equivalence} | Equivalence instance for numbers | | `Equivalence` | + * | instances | {@link module:Number.Order} | Order instance for numbers | | `Order` | + * | | | | | | + * | errors | {@link module:Number.DivisionByZeroError} | Error thrown by unsafeDivide | | | + * + * ## Composition Patterns and Type Safety + * + * When building function pipelines, understanding how types flow through + * operations is critical: + * + * ### Composing with type-preserving operations + * + * Most operations in this module are type-preserving (`number → number`), + * making them easily composable in pipelines: + * + * ```ts + * import { pipe } from "effect" + * import * as Number from "effect/Number" + * + * const result = pipe( + * 10, + * Number.increment, // number → number + * Number.multiply(2), // number → number + * Number.round(1) // number → number + * ) // Result: number (21) + * ``` + * + * ### Working with Option results + * + * Operations that might fail (like division by zero) return Option types and + * require Option combinators: + * + * ```ts + * import { pipe, Option } from "effect" + * import * as Number from "effect/Number" + * + * const result = pipe( + * 10, + * Number.divide(0), // number → Option + * Option.getOrElse(() => 0) // Option → number + * ) // Result: number (0) + * ``` + * + * ### Composition best practices + * + * - Chain type-preserving operations for maximum composability + * - Use Option combinators when working with potentially failing operations + * - Consider using Effect for operations that might fail with specific errors + * - Remember that all operations maintain JavaScript's floating-point precision + * limitations + * + * @module Number + * @since 2.0.0 + * @see {@link module:BigInt} for more similar operations on `bigint` types + * @see {@link module:BigDecimal} for more similar operations on `BigDecimal` types + */ +export * as Number from "./Number.js"; +/** + * @since 2.0.0 + */ +export * as Option from "./Option.js"; +/** + * This module provides an implementation of the `Order` type class which is used to define a total ordering on some type `A`. + * An order is defined by a relation `<=`, which obeys the following laws: + * + * - either `x <= y` or `y <= x` (totality) + * - if `x <= y` and `y <= x`, then `x == y` (antisymmetry) + * - if `x <= y` and `y <= z`, then `x <= z` (transitivity) + * + * The truth table for compare is defined as follows: + * + * | `x <= y` | `x >= y` | Ordering | | + * | -------- | -------- | -------- | --------------------- | + * | `true` | `true` | `0` | corresponds to x == y | + * | `true` | `false` | `< 0` | corresponds to x < y | + * | `false` | `true` | `> 0` | corresponds to x > y | + * + * @since 2.0.0 + */ +export * as Order from "./Order.js"; +/** + * @since 2.0.0 + */ +export * as Ordering from "./Ordering.js"; +/** + * @since 3.10.0 + */ +export * as ParseResult from "./ParseResult.js"; +/** + * @since 3.19.4 + * @experimental + */ +export * as PartitionedSemaphore from "./PartitionedSemaphore.js"; +/** + * @since 2.0.0 + */ +export * as Pipeable from "./Pipeable.js"; +/** + * @since 2.0.0 + */ +export * as Pool from "./Pool.js"; +/** + * This module provides a collection of functions for working with predicates and refinements. + * + * A `Predicate` is a function that takes a value of type `A` and returns a boolean. + * It is used to check if a value satisfies a certain condition. + * + * A `Refinement` is a special type of predicate that not only checks a condition + * but also provides a type guard, allowing TypeScript to narrow the type of the input + * value from `A` to a more specific type `B` within a conditional block. + * + * The module includes: + * - Basic predicates and refinements for common types (e.g., `isString`, `isNumber`). + * - Combinators to create new predicates from existing ones (e.g., `and`, `or`, `not`). + * - Advanced combinators for working with data structures (e.g., `tuple`, `struct`). + * - Type-level utilities for inspecting predicate and refinement types. + * + * @since 2.0.0 + */ +export * as Predicate from "./Predicate.js"; +/** + * @since 3.10.0 + */ +export * as Pretty from "./Pretty.js"; +/** + * @since 2.0.0 + */ +export * as PrimaryKey from "./PrimaryKey.js"; +/** + * @since 2.0.0 + */ +export * as PubSub from "./PubSub.js"; +/** + * @since 2.0.0 + */ +export * as Queue from "./Queue.js"; +/** + * @since 2.0.0 + */ +export * as Random from "./Random.js"; +/** + * Limits the number of calls to a resource to a maximum amount in some interval. + * + * @since 2.0.0 + */ +export * as RateLimiter from "./RateLimiter.js"; +/** + * @since 3.5.0 + */ +export * as RcMap from "./RcMap.js"; +/** + * @since 3.5.0 + */ +export * as RcRef from "./RcRef.js"; +/** + * @since 2.0.0 + */ +export * as Readable from "./Readable.js"; +/** + * This module provides utility functions for working with records in TypeScript. + * + * @since 2.0.0 + */ +export * as Record from "./Record.js"; +/** + * @since 2.0.0 + */ +export * as RedBlackTree from "./RedBlackTree.js"; +/** + * The Redacted module provides functionality for handling sensitive information + * securely within your application. By using the `Redacted` data type, you can + * ensure that sensitive values are not accidentally exposed in logs or error + * messages. + * + * @since 3.3.0 + */ +export * as Redacted from "./Redacted.js"; +/** + * @since 2.0.0 + */ +export * as Ref from "./Ref.js"; +/** + * This module provides utility functions for working with RegExp in TypeScript. + * + * @since 2.0.0 + */ +export * as RegExp from "./RegExp.js"; +/** + * @since 2.0.0 + */ +export * as Reloadable from "./Reloadable.js"; +/** + * @since 2.0.0 + */ +export * as Request from "./Request.js"; +/** + * @since 2.0.0 + */ +export * as RequestBlock from "./RequestBlock.js"; +/** + * @since 2.0.0 + */ +export * as RequestResolver from "./RequestResolver.js"; +/** + * @since 2.0.0 + */ +export * as Resource from "./Resource.js"; +/** + * @since 2.0.0 + */ +export * as Runtime from "./Runtime.js"; +/** + * @since 2.0.0 + */ +export * as RuntimeFlags from "./RuntimeFlags.js"; +/** + * @since 2.0.0 + */ +export * as RuntimeFlagsPatch from "./RuntimeFlagsPatch.js"; +/** + * @since 2.0.0 + */ +export * as STM from "./STM.js"; +/** + * @since 2.0.0 + */ +export * as Schedule from "./Schedule.js"; +/** + * @since 2.0.0 + */ +export * as ScheduleDecision from "./ScheduleDecision.js"; +/** + * @since 2.0.0 + */ +export * as ScheduleInterval from "./ScheduleInterval.js"; +/** + * @since 2.0.0 + */ +export * as ScheduleIntervals from "./ScheduleIntervals.js"; +/** + * @since 2.0.0 + */ +export * as Scheduler from "./Scheduler.js"; +/** + * @since 3.10.0 + */ +export * as Schema from "./Schema.js"; +/** + * @since 3.10.0 + */ +export * as SchemaAST from "./SchemaAST.js"; +/** + * @since 2.0.0 + */ +export * as Scope from "./Scope.js"; +/** + * @since 2.0.0 + */ +export * as ScopedCache from "./ScopedCache.js"; +/** + * @since 2.0.0 + */ +export * as ScopedRef from "./ScopedRef.js"; +/** + * @since 2.0.0 + * @deprecated + */ +export * as Secret from "./Secret.js"; +/** + * @since 2.0.0 + */ +export * as SingleProducerAsyncInput from "./SingleProducerAsyncInput.js"; +/** + * @since 2.0.0 + */ +export * as Sink from "./Sink.js"; +/** + * @since 2.0.0 + */ +export * as SortedMap from "./SortedMap.js"; +/** + * @since 2.0.0 + */ +export * as SortedSet from "./SortedSet.js"; +/** + * @since 2.0.0 + */ +export * as Stream from "./Stream.js"; +/** + * @since 2.0.0 + */ +export * as StreamEmit from "./StreamEmit.js"; +/** + * @since 2.0.0 + */ +export * as StreamHaltStrategy from "./StreamHaltStrategy.js"; +/** + * @since 2.0.0 + */ +export * as Streamable from "./Streamable.js"; +/** + * This module provides utility functions and type class instances for working with the `string` type in TypeScript. + * It includes functions for basic string manipulation, as well as type class instances for + * `Equivalence` and `Order`. + * + * @since 2.0.0 + */ +export * as String from "./String.js"; +/** + * This module provides utility functions for working with structs in TypeScript. + * + * @since 2.0.0 + */ +export * as Struct from "./Struct.js"; +/** + * @since 2.0.0 + */ +export * as Subscribable from "./Subscribable.js"; +/** + * @since 2.0.0 + */ +export * as SubscriptionRef from "./SubscriptionRef.js"; +/** + * A `Supervisor` is allowed to supervise the launching and termination of + * fibers, producing some visible value of type `T` from the supervision. + * + * @since 2.0.0 + */ +export * as Supervisor from "./Supervisor.js"; +/** + * @since 2.0.0 + */ +export * as Symbol from "./Symbol.js"; +/** + * @since 2.0.0 + */ +export * as SynchronizedRef from "./SynchronizedRef.js"; +/** + * @since 2.0.0 + */ +export * as TArray from "./TArray.js"; +/** + * @since 2.0.0 + */ +export * as TDeferred from "./TDeferred.js"; +/** + * @since 2.0.0 + */ +export * as TMap from "./TMap.js"; +/** + * @since 2.0.0 + */ +export * as TPriorityQueue from "./TPriorityQueue.js"; +/** + * @since 2.0.0 + */ +export * as TPubSub from "./TPubSub.js"; +/** + * @since 2.0.0 + */ +export * as TQueue from "./TQueue.js"; +/** + * @since 2.0.0 + */ +export * as TRandom from "./TRandom.js"; +/** + * @since 2.0.0 + */ +export * as TReentrantLock from "./TReentrantLock.js"; +/** + * @since 2.0.0 + */ +export * as TRef from "./TRef.js"; +/** + * @since 2.0.0 + */ +export * as TSemaphore from "./TSemaphore.js"; +/** + * @since 2.0.0 + */ +export * as TSet from "./TSet.js"; +/** + * @since 3.10.0 + */ +export * as TSubscriptionRef from "./TSubscriptionRef.js"; +/** + * @since 2.0.0 + */ +export * as Take from "./Take.js"; +/** + * @since 2.0.0 + */ +export * as TestAnnotation from "./TestAnnotation.js"; +/** + * @since 2.0.0 + */ +export * as TestAnnotationMap from "./TestAnnotationMap.js"; +/** + * @since 2.0.0 + */ +export * as TestAnnotations from "./TestAnnotations.js"; +/** + * @since 2.0.0 + */ +export * as TestClock from "./TestClock.js"; +/** + * @since 2.0.0 + */ +export * as TestConfig from "./TestConfig.js"; +/** + * @since 2.0.0 + */ +export * as TestContext from "./TestContext.js"; +/** + * @since 2.0.0 + */ +export * as TestLive from "./TestLive.js"; +/** + * @since 2.0.0 + */ +export * as TestServices from "./TestServices.js"; +/** + * @since 2.0.0 + */ +export * as TestSized from "./TestSized.js"; +/** + * @since 2.0.0 + */ +export * as Tracer from "./Tracer.js"; +/** + * A `Trie` is used for locating specific `string` keys from within a set. + * + * It works similar to `HashMap`, but with keys required to be `string`. + * This constraint unlocks some performance optimizations and new methods to get string prefixes (e.g. `keysWithPrefix`, `longestPrefixOf`). + * + * Prefix search is also the main feature that makes a `Trie` more suited than `HashMap` for certain usecases. + * + * A `Trie` is often used to store a dictionary (list of words) that can be searched + * in a manner that allows for efficient generation of completion lists + * (e.g. predict the rest of a word a user is typing). + * + * A `Trie` has O(n) lookup time where `n` is the size of the key, + * or even less than `n` on search misses. + * + * @since 2.0.0 + */ +export * as Trie from "./Trie.js"; +/** + * This module provides utility functions for working with tuples in TypeScript. + * + * @since 2.0.0 + */ +export * as Tuple from "./Tuple.js"; +/** + * A collection of types that are commonly used types. + * + * @since 2.0.0 + */ +export * as Types from "./Types.js"; +/** + * @since 2.0.0 + */ +export * as Unify from "./Unify.js"; +/** + * @since 2.0.0 + */ +export * as UpstreamPullRequest from "./UpstreamPullRequest.js"; +/** + * @since 2.0.0 + */ +export * as UpstreamPullStrategy from "./UpstreamPullStrategy.js"; +/** + * @since 2.0.0 + */ +export * as Utils from "./Utils.js"; +//# sourceMappingURL=index.js.map \ No newline at end of file