diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/_virtual/_rolldown/runtime.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/_virtual/_rolldown/runtime.js new file mode 100644 index 0000000000000000000000000000000000000000..a78d9b85d4e925b0db18432fba8d0de5f9faf760 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/_virtual/_rolldown/runtime.js @@ -0,0 +1,13 @@ +//#region \0rolldown/runtime.js +var __defProp = Object.defineProperty; +var __exportAll = (all, no_symbols) => { + let target = {}; + for (var name in all) __defProp(target, name, { + get: all[name], + enumerable: true + }); + if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" }); + return target; +}; +//#endregion +exports.__exportAll = __exportAll; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/_virtual/_rolldown/runtime.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/_virtual/_rolldown/runtime.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d326bb2aaeb936d75a18893ce27b9eaddb8002f9 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/_virtual/_rolldown/runtime.mjs @@ -0,0 +1,13 @@ +//#region \0rolldown/runtime.js +var __defProp = Object.defineProperty; +var __exportAll = (all, no_symbols) => { + let target = {}; + for (var name in all) __defProp(target, name, { + get: all[name], + enumerable: true + }); + if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" }); + return target; +}; +//#endregion +export { __exportAll }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/at.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/at.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..c05245db729b20c62610234a6d79bd8c3dc83aff --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/at.d.mts @@ -0,0 +1,19 @@ +//#region src/array/at.d.ts +/** + * Retrieves elements from an array at the specified indices. + * + * This function supports negative indices, which count from the end of the array. + * + * @template T + * @param arr - The array to retrieve elements from. + * @param indices - An array of indices specifying the positions of elements to retrieve. + * @returns A new array containing the elements at the specified indices. + * + * @example + * const numbers = [10, 20, 30, 40, 50]; + * const result = at(numbers, [1, 3, 4]); + * console.log(result); // [20, 40, 50] + */ +declare function at(arr: readonly T[], indices: readonly number[]): T[]; +//#endregion +export { at }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/at.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/at.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c05245db729b20c62610234a6d79bd8c3dc83aff --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/at.d.ts @@ -0,0 +1,19 @@ +//#region src/array/at.d.ts +/** + * Retrieves elements from an array at the specified indices. + * + * This function supports negative indices, which count from the end of the array. + * + * @template T + * @param arr - The array to retrieve elements from. + * @param indices - An array of indices specifying the positions of elements to retrieve. + * @returns A new array containing the elements at the specified indices. + * + * @example + * const numbers = [10, 20, 30, 40, 50]; + * const result = at(numbers, [1, 3, 4]); + * console.log(result); // [20, 40, 50] + */ +declare function at(arr: readonly T[], indices: readonly number[]): T[]; +//#endregion +export { at }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/at.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/at.js new file mode 100644 index 0000000000000000000000000000000000000000..ecbe5aff7b6a54148fe8c5af7cd9194fc254d168 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/at.js @@ -0,0 +1,29 @@ +//#region src/array/at.ts +/** +* Retrieves elements from an array at the specified indices. +* +* This function supports negative indices, which count from the end of the array. +* +* @template T +* @param arr - The array to retrieve elements from. +* @param indices - An array of indices specifying the positions of elements to retrieve. +* @returns A new array containing the elements at the specified indices. +* +* @example +* const numbers = [10, 20, 30, 40, 50]; +* const result = at(numbers, [1, 3, 4]); +* console.log(result); // [20, 40, 50] +*/ +function at(arr, indices) { + const result = new Array(indices.length); + const length = arr.length; + for (let i = 0; i < indices.length; i++) { + let index = indices[i]; + index = Number.isInteger(index) ? index : Math.trunc(index) || 0; + if (index < 0) index += length; + result[i] = arr[index]; + } + return result; +} +//#endregion +exports.at = at; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/at.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/at.mjs new file mode 100644 index 0000000000000000000000000000000000000000..6b8fd4fabb496fd6c22fd1422b000f55c9f8d32a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/at.mjs @@ -0,0 +1,29 @@ +//#region src/array/at.ts +/** +* Retrieves elements from an array at the specified indices. +* +* This function supports negative indices, which count from the end of the array. +* +* @template T +* @param arr - The array to retrieve elements from. +* @param indices - An array of indices specifying the positions of elements to retrieve. +* @returns A new array containing the elements at the specified indices. +* +* @example +* const numbers = [10, 20, 30, 40, 50]; +* const result = at(numbers, [1, 3, 4]); +* console.log(result); // [20, 40, 50] +*/ +function at(arr, indices) { + const result = new Array(indices.length); + const length = arr.length; + for (let i = 0; i < indices.length; i++) { + let index = indices[i]; + index = Number.isInteger(index) ? index : Math.trunc(index) || 0; + if (index < 0) index += length; + result[i] = arr[index]; + } + return result; +} +//#endregion +export { at }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/cartesianProduct.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/cartesianProduct.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..838f3f8d25b8de1c0da3aea5977f78ead35aa732 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/cartesianProduct.d.mts @@ -0,0 +1,75 @@ +//#region src/array/cartesianProduct.d.ts +/** + * Computes the [Cartesian product](https://en.wikipedia.org/wiki/Cartesian_product) of the input arrays. + * + * @template T + * @param arr1 - The array to take the product of. + * @returns An array of single-element tuples. + */ +declare function cartesianProduct(arr1: readonly T[]): Array<[T]>; +/** + * Computes the [Cartesian product](https://en.wikipedia.org/wiki/Cartesian_product) of the input arrays. + * + * @template T, U + * @param arr1 - The first array to take the product of. + * @param arr2 - The second array to take the product of. + * @returns An array of tuples representing the Cartesian product. + * + * @example + * cartesianProduct([1, 2], ['a', 'b']); + * // => [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']] + */ +declare function cartesianProduct(arr1: readonly T[], arr2: readonly U[]): Array<[T, U]>; +/** + * Computes the [Cartesian product](https://en.wikipedia.org/wiki/Cartesian_product) of the input arrays. + * + * @template T, U, V + * @param arr1 - The first array to take the product of. + * @param arr2 - The second array to take the product of. + * @param arr3 - The third array to take the product of. + * @returns An array of tuples representing the Cartesian product. + */ +declare function cartesianProduct(arr1: readonly T[], arr2: readonly U[], arr3: readonly V[]): Array<[T, U, V]>; +/** + * Computes the [Cartesian product](https://en.wikipedia.org/wiki/Cartesian_product) of the input arrays. + * + * @template T, U, V, W + * @param arr1 - The first array to take the product of. + * @param arr2 - The second array to take the product of. + * @param arr3 - The third array to take the product of. + * @param arr4 - The fourth array to take the product of. + * @returns An array of tuples representing the Cartesian product. + */ +declare function cartesianProduct(arr1: readonly T[], arr2: readonly U[], arr3: readonly V[], arr4: readonly W[]): Array<[T, U, V, W]>; +/** + * Computes the [Cartesian product](https://en.wikipedia.org/wiki/Cartesian_product) of the input arrays. + * + * Returns every possible tuple formed by picking one element from each input array, in lexicographic order. + * The rightmost array advances fastest, like the digits of an odometer. + * + * If no arrays are passed, the result is `[[]]` (a single empty tuple). + * If any input array is empty, the result is `[]`. + * + * @template T + * @param arrs - The arrays to take the product of. + * @returns An array of tuples representing the Cartesian product. + * + * @example + * cartesianProduct([1, 2], ['a', 'b']); + * // => [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']] + * + * @example + * cartesianProduct([0, 1], [0, 1], [0, 1]); + * // => [[0,0,0], [0,0,1], [0,1,0], [0,1,1], [1,0,0], [1,0,1], [1,1,0], [1,1,1]] + * + * @example + * cartesianProduct([1, 2, 3], []); + * // => [] + * + * @example + * cartesianProduct(); + * // => [[]] + */ +declare function cartesianProduct(...arrs: Array): T[][]; +//#endregion +export { cartesianProduct }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/cartesianProduct.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/cartesianProduct.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..838f3f8d25b8de1c0da3aea5977f78ead35aa732 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/cartesianProduct.d.ts @@ -0,0 +1,75 @@ +//#region src/array/cartesianProduct.d.ts +/** + * Computes the [Cartesian product](https://en.wikipedia.org/wiki/Cartesian_product) of the input arrays. + * + * @template T + * @param arr1 - The array to take the product of. + * @returns An array of single-element tuples. + */ +declare function cartesianProduct(arr1: readonly T[]): Array<[T]>; +/** + * Computes the [Cartesian product](https://en.wikipedia.org/wiki/Cartesian_product) of the input arrays. + * + * @template T, U + * @param arr1 - The first array to take the product of. + * @param arr2 - The second array to take the product of. + * @returns An array of tuples representing the Cartesian product. + * + * @example + * cartesianProduct([1, 2], ['a', 'b']); + * // => [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']] + */ +declare function cartesianProduct(arr1: readonly T[], arr2: readonly U[]): Array<[T, U]>; +/** + * Computes the [Cartesian product](https://en.wikipedia.org/wiki/Cartesian_product) of the input arrays. + * + * @template T, U, V + * @param arr1 - The first array to take the product of. + * @param arr2 - The second array to take the product of. + * @param arr3 - The third array to take the product of. + * @returns An array of tuples representing the Cartesian product. + */ +declare function cartesianProduct(arr1: readonly T[], arr2: readonly U[], arr3: readonly V[]): Array<[T, U, V]>; +/** + * Computes the [Cartesian product](https://en.wikipedia.org/wiki/Cartesian_product) of the input arrays. + * + * @template T, U, V, W + * @param arr1 - The first array to take the product of. + * @param arr2 - The second array to take the product of. + * @param arr3 - The third array to take the product of. + * @param arr4 - The fourth array to take the product of. + * @returns An array of tuples representing the Cartesian product. + */ +declare function cartesianProduct(arr1: readonly T[], arr2: readonly U[], arr3: readonly V[], arr4: readonly W[]): Array<[T, U, V, W]>; +/** + * Computes the [Cartesian product](https://en.wikipedia.org/wiki/Cartesian_product) of the input arrays. + * + * Returns every possible tuple formed by picking one element from each input array, in lexicographic order. + * The rightmost array advances fastest, like the digits of an odometer. + * + * If no arrays are passed, the result is `[[]]` (a single empty tuple). + * If any input array is empty, the result is `[]`. + * + * @template T + * @param arrs - The arrays to take the product of. + * @returns An array of tuples representing the Cartesian product. + * + * @example + * cartesianProduct([1, 2], ['a', 'b']); + * // => [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']] + * + * @example + * cartesianProduct([0, 1], [0, 1], [0, 1]); + * // => [[0,0,0], [0,0,1], [0,1,0], [0,1,1], [1,0,0], [1,0,1], [1,1,0], [1,1,1]] + * + * @example + * cartesianProduct([1, 2, 3], []); + * // => [] + * + * @example + * cartesianProduct(); + * // => [[]] + */ +declare function cartesianProduct(...arrs: Array): T[][]; +//#endregion +export { cartesianProduct }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/cartesianProduct.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/cartesianProduct.js new file mode 100644 index 0000000000000000000000000000000000000000..9c12be0d2aa1a8e8028593386b66a363660273f8 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/cartesianProduct.js @@ -0,0 +1,23 @@ +//#region src/array/cartesianProduct.ts +function cartesianProduct(...arrs) { + if (arrs.length === 0) return [[]]; + let total = 1; + for (let i = 0; i < arrs.length; i++) total *= arrs[i].length; + if (total === 0) return []; + const n = arrs.length; + const result = Array(total); + for (let i = 0; i < total; i++) { + const tuple = Array(n); + let idx = i; + for (let j = n - 1; j >= 0; j--) { + const arr = arrs[j]; + const len = arr.length; + tuple[j] = arr[idx % len]; + idx = Math.floor(idx / len); + } + result[i] = tuple; + } + return result; +} +//#endregion +exports.cartesianProduct = cartesianProduct; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/cartesianProduct.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/cartesianProduct.mjs new file mode 100644 index 0000000000000000000000000000000000000000..1b4fc6b9a45b88f46c21020a4704cdb1bc97185f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/cartesianProduct.mjs @@ -0,0 +1,23 @@ +//#region src/array/cartesianProduct.ts +function cartesianProduct(...arrs) { + if (arrs.length === 0) return [[]]; + let total = 1; + for (let i = 0; i < arrs.length; i++) total *= arrs[i].length; + if (total === 0) return []; + const n = arrs.length; + const result = Array(total); + for (let i = 0; i < total; i++) { + const tuple = Array(n); + let idx = i; + for (let j = n - 1; j >= 0; j--) { + const arr = arrs[j]; + const len = arr.length; + tuple[j] = arr[idx % len]; + idx = Math.floor(idx / len); + } + result[i] = tuple; + } + return result; +} +//#endregion +export { cartesianProduct }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/chunk.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/chunk.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..54cdf45fe6be368453a3c6ef77bd0ad57c2f6815 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/chunk.d.mts @@ -0,0 +1,27 @@ +//#region src/array/chunk.d.ts +/** + * Splits an array into smaller arrays of a specified length. + * + * This function takes an input array and divides it into multiple smaller arrays, + * each of a specified length. If the input array cannot be evenly divided, + * the final sub-array will contain the remaining elements. + * + * @template T The type of elements in the array. + * @param arr - The array to be chunked into smaller arrays. + * @param size - The size of each smaller array. Must be a positive integer. + * @returns A two-dimensional array where each sub-array has a maximum length of `size`. + * @throws {Error} Throws an error if `size` is not a positive integer. + * + * @example + * // Splits an array of numbers into sub-arrays of length 2 + * chunk([1, 2, 3, 4, 5], 2); + * // Returns: [[1, 2], [3, 4], [5]] + * + * @example + * // Splits an array of strings into sub-arrays of length 3 + * chunk(['a', 'b', 'c', 'd', 'e', 'f', 'g'], 3); + * // Returns: [['a', 'b', 'c'], ['d', 'e', 'f'], ['g']] + */ +declare function chunk(arr: readonly T[], size: number): T[][]; +//#endregion +export { chunk }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/chunk.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/chunk.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..54cdf45fe6be368453a3c6ef77bd0ad57c2f6815 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/chunk.d.ts @@ -0,0 +1,27 @@ +//#region src/array/chunk.d.ts +/** + * Splits an array into smaller arrays of a specified length. + * + * This function takes an input array and divides it into multiple smaller arrays, + * each of a specified length. If the input array cannot be evenly divided, + * the final sub-array will contain the remaining elements. + * + * @template T The type of elements in the array. + * @param arr - The array to be chunked into smaller arrays. + * @param size - The size of each smaller array. Must be a positive integer. + * @returns A two-dimensional array where each sub-array has a maximum length of `size`. + * @throws {Error} Throws an error if `size` is not a positive integer. + * + * @example + * // Splits an array of numbers into sub-arrays of length 2 + * chunk([1, 2, 3, 4, 5], 2); + * // Returns: [[1, 2], [3, 4], [5]] + * + * @example + * // Splits an array of strings into sub-arrays of length 3 + * chunk(['a', 'b', 'c', 'd', 'e', 'f', 'g'], 3); + * // Returns: [['a', 'b', 'c'], ['d', 'e', 'f'], ['g']] + */ +declare function chunk(arr: readonly T[], size: number): T[][]; +//#endregion +export { chunk }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/chunk.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/chunk.js new file mode 100644 index 0000000000000000000000000000000000000000..ce480486056b46380b18b7272d4dca332bf4933e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/chunk.js @@ -0,0 +1,37 @@ +//#region src/array/chunk.ts +/** +* Splits an array into smaller arrays of a specified length. +* +* This function takes an input array and divides it into multiple smaller arrays, +* each of a specified length. If the input array cannot be evenly divided, +* the final sub-array will contain the remaining elements. +* +* @template T The type of elements in the array. +* @param arr - The array to be chunked into smaller arrays. +* @param size - The size of each smaller array. Must be a positive integer. +* @returns A two-dimensional array where each sub-array has a maximum length of `size`. +* @throws {Error} Throws an error if `size` is not a positive integer. +* +* @example +* // Splits an array of numbers into sub-arrays of length 2 +* chunk([1, 2, 3, 4, 5], 2); +* // Returns: [[1, 2], [3, 4], [5]] +* +* @example +* // Splits an array of strings into sub-arrays of length 3 +* chunk(['a', 'b', 'c', 'd', 'e', 'f', 'g'], 3); +* // Returns: [['a', 'b', 'c'], ['d', 'e', 'f'], ['g']] +*/ +function chunk(arr, size) { + if (!Number.isInteger(size) || size <= 0) throw new Error("Size must be an integer greater than zero."); + const chunkLength = Math.ceil(arr.length / size); + const result = Array(chunkLength); + for (let index = 0; index < chunkLength; index++) { + const start = index * size; + const end = start + size; + result[index] = arr.slice(start, end); + } + return result; +} +//#endregion +exports.chunk = chunk; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/chunk.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/chunk.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d104a2a3ce3575d9d5de43b2fff15de8ec33d966 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/chunk.mjs @@ -0,0 +1,37 @@ +//#region src/array/chunk.ts +/** +* Splits an array into smaller arrays of a specified length. +* +* This function takes an input array and divides it into multiple smaller arrays, +* each of a specified length. If the input array cannot be evenly divided, +* the final sub-array will contain the remaining elements. +* +* @template T The type of elements in the array. +* @param arr - The array to be chunked into smaller arrays. +* @param size - The size of each smaller array. Must be a positive integer. +* @returns A two-dimensional array where each sub-array has a maximum length of `size`. +* @throws {Error} Throws an error if `size` is not a positive integer. +* +* @example +* // Splits an array of numbers into sub-arrays of length 2 +* chunk([1, 2, 3, 4, 5], 2); +* // Returns: [[1, 2], [3, 4], [5]] +* +* @example +* // Splits an array of strings into sub-arrays of length 3 +* chunk(['a', 'b', 'c', 'd', 'e', 'f', 'g'], 3); +* // Returns: [['a', 'b', 'c'], ['d', 'e', 'f'], ['g']] +*/ +function chunk(arr, size) { + if (!Number.isInteger(size) || size <= 0) throw new Error("Size must be an integer greater than zero."); + const chunkLength = Math.ceil(arr.length / size); + const result = Array(chunkLength); + for (let index = 0; index < chunkLength; index++) { + const start = index * size; + const end = start + size; + result[index] = arr.slice(start, end); + } + return result; +} +//#endregion +export { chunk }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/chunkBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/chunkBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..791a7fecbc63945099b0d3204a35dd28a41e3204 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/chunkBy.d.mts @@ -0,0 +1,32 @@ +//#region src/array/chunkBy.d.ts +/** + * Splits an array into chunks of consecutive elements that share the same key. + * + * Walking left to right, each element's key is derived by `iteratee`. Whenever + * the key differs from the previous element's key, a new chunk is started; + * otherwise the element is appended to the current chunk. Keys are compared with + * `!==` (strict inequality), so equal primitives stay together while distinct + * object references always start a new chunk. + * + * Unlike {@link chunk}, which splits by a fixed size, `chunkBy` splits by a + * boundary condition, keeping runs of same-keyed elements together. + * + * @template T - The type of elements in the array. + * @param arr - The array to split into chunks. + * @param iteratee - A function that derives the comparison key for each element. + * @returns A two-dimensional array where each sub-array is a run of consecutive + * elements that produced the same key. + * + * @example + * // Group consecutive equal numbers + * chunkBy([1, 1, 2, 3, 3, 3], value => value); + * // Returns: [[1, 1], [2], [3, 3, 3]] + * + * @example + * // Group consecutive words by their length + * chunkBy(['a', 'b', 'cd', 'ef', 'g'], word => word.length); + * // Returns: [['a', 'b'], ['cd', 'ef'], ['g']] + */ +declare function chunkBy(arr: readonly T[], iteratee: (value: T) => unknown): T[][]; +//#endregion +export { chunkBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/chunkBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/chunkBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..791a7fecbc63945099b0d3204a35dd28a41e3204 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/chunkBy.d.ts @@ -0,0 +1,32 @@ +//#region src/array/chunkBy.d.ts +/** + * Splits an array into chunks of consecutive elements that share the same key. + * + * Walking left to right, each element's key is derived by `iteratee`. Whenever + * the key differs from the previous element's key, a new chunk is started; + * otherwise the element is appended to the current chunk. Keys are compared with + * `!==` (strict inequality), so equal primitives stay together while distinct + * object references always start a new chunk. + * + * Unlike {@link chunk}, which splits by a fixed size, `chunkBy` splits by a + * boundary condition, keeping runs of same-keyed elements together. + * + * @template T - The type of elements in the array. + * @param arr - The array to split into chunks. + * @param iteratee - A function that derives the comparison key for each element. + * @returns A two-dimensional array where each sub-array is a run of consecutive + * elements that produced the same key. + * + * @example + * // Group consecutive equal numbers + * chunkBy([1, 1, 2, 3, 3, 3], value => value); + * // Returns: [[1, 1], [2], [3, 3, 3]] + * + * @example + * // Group consecutive words by their length + * chunkBy(['a', 'b', 'cd', 'ef', 'g'], word => word.length); + * // Returns: [['a', 'b'], ['cd', 'ef'], ['g']] + */ +declare function chunkBy(arr: readonly T[], iteratee: (value: T) => unknown): T[][]; +//#endregion +export { chunkBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/chunkBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/chunkBy.js new file mode 100644 index 0000000000000000000000000000000000000000..ca8191c998961d9c83af226bc081db367674fda0 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/chunkBy.js @@ -0,0 +1,42 @@ +//#region src/array/chunkBy.ts +/** +* Splits an array into chunks of consecutive elements that share the same key. +* +* Walking left to right, each element's key is derived by `iteratee`. Whenever +* the key differs from the previous element's key, a new chunk is started; +* otherwise the element is appended to the current chunk. Keys are compared with +* `!==` (strict inequality), so equal primitives stay together while distinct +* object references always start a new chunk. +* +* Unlike {@link chunk}, which splits by a fixed size, `chunkBy` splits by a +* boundary condition, keeping runs of same-keyed elements together. +* +* @template T - The type of elements in the array. +* @param arr - The array to split into chunks. +* @param iteratee - A function that derives the comparison key for each element. +* @returns A two-dimensional array where each sub-array is a run of consecutive +* elements that produced the same key. +* +* @example +* // Group consecutive equal numbers +* chunkBy([1, 1, 2, 3, 3, 3], value => value); +* // Returns: [[1, 1], [2], [3, 3, 3]] +* +* @example +* // Group consecutive words by their length +* chunkBy(['a', 'b', 'cd', 'ef', 'g'], word => word.length); +* // Returns: [['a', 'b'], ['cd', 'ef'], ['g']] +*/ +function chunkBy(arr, iteratee) { + const result = []; + let prevKey; + for (let i = 0; i < arr.length; i++) { + const key = iteratee(arr[i]); + if (i === 0 || key !== prevKey) result.push([arr[i]]); + else result[result.length - 1].push(arr[i]); + prevKey = key; + } + return result; +} +//#endregion +exports.chunkBy = chunkBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/chunkBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/chunkBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..937433cab0c3ed246f99b0d9e71adbc74dae8224 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/chunkBy.mjs @@ -0,0 +1,42 @@ +//#region src/array/chunkBy.ts +/** +* Splits an array into chunks of consecutive elements that share the same key. +* +* Walking left to right, each element's key is derived by `iteratee`. Whenever +* the key differs from the previous element's key, a new chunk is started; +* otherwise the element is appended to the current chunk. Keys are compared with +* `!==` (strict inequality), so equal primitives stay together while distinct +* object references always start a new chunk. +* +* Unlike {@link chunk}, which splits by a fixed size, `chunkBy` splits by a +* boundary condition, keeping runs of same-keyed elements together. +* +* @template T - The type of elements in the array. +* @param arr - The array to split into chunks. +* @param iteratee - A function that derives the comparison key for each element. +* @returns A two-dimensional array where each sub-array is a run of consecutive +* elements that produced the same key. +* +* @example +* // Group consecutive equal numbers +* chunkBy([1, 1, 2, 3, 3, 3], value => value); +* // Returns: [[1, 1], [2], [3, 3, 3]] +* +* @example +* // Group consecutive words by their length +* chunkBy(['a', 'b', 'cd', 'ef', 'g'], word => word.length); +* // Returns: [['a', 'b'], ['cd', 'ef'], ['g']] +*/ +function chunkBy(arr, iteratee) { + const result = []; + let prevKey; + for (let i = 0; i < arr.length; i++) { + const key = iteratee(arr[i]); + if (i === 0 || key !== prevKey) result.push([arr[i]]); + else result[result.length - 1].push(arr[i]); + prevKey = key; + } + return result; +} +//#endregion +export { chunkBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/combinations.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/combinations.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..05b850562d5765a213594bf9840e135fab46aef4 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/combinations.d.mts @@ -0,0 +1,35 @@ +//#region src/array/combinations.d.ts +/** + * Returns all `r`-length combinations of elements from the input array. + * + * Combinations are emitted in lexicographic order based on the position of elements in the input array. + * Elements are treated as unique by position, not by value, so duplicates in the input may produce + * combinations that look identical. + * + * The number of combinations is `n! / r! / (n - r)!` when `0 <= r <= n`, and zero when `r > n`. + * + * @template T + * @param arr - The input array. + * @param r - The length of each combination. Must be a non-negative integer. + * @returns An array of `r`-length combinations. + * @throws {Error} If `r` is not a non-negative integer. + * + * @example + * combinations(['A', 'B', 'C', 'D'], 2); + * // => [['A','B'], ['A','C'], ['A','D'], ['B','C'], ['B','D'], ['C','D']] + * + * @example + * combinations([1, 2, 3, 4], 3); + * // => [[1,2,3], [1,2,4], [1,3,4], [2,3,4]] + * + * @example + * combinations([1, 2, 3], 0); + * // => [[]] + * + * @example + * combinations([1, 2], 5); + * // => [] + */ +declare function combinations(arr: readonly T[], r: number): T[][]; +//#endregion +export { combinations }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/combinations.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/combinations.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..05b850562d5765a213594bf9840e135fab46aef4 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/combinations.d.ts @@ -0,0 +1,35 @@ +//#region src/array/combinations.d.ts +/** + * Returns all `r`-length combinations of elements from the input array. + * + * Combinations are emitted in lexicographic order based on the position of elements in the input array. + * Elements are treated as unique by position, not by value, so duplicates in the input may produce + * combinations that look identical. + * + * The number of combinations is `n! / r! / (n - r)!` when `0 <= r <= n`, and zero when `r > n`. + * + * @template T + * @param arr - The input array. + * @param r - The length of each combination. Must be a non-negative integer. + * @returns An array of `r`-length combinations. + * @throws {Error} If `r` is not a non-negative integer. + * + * @example + * combinations(['A', 'B', 'C', 'D'], 2); + * // => [['A','B'], ['A','C'], ['A','D'], ['B','C'], ['B','D'], ['C','D']] + * + * @example + * combinations([1, 2, 3, 4], 3); + * // => [[1,2,3], [1,2,4], [1,3,4], [2,3,4]] + * + * @example + * combinations([1, 2, 3], 0); + * // => [[]] + * + * @example + * combinations([1, 2], 5); + * // => [] + */ +declare function combinations(arr: readonly T[], r: number): T[][]; +//#endregion +export { combinations }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/combinations.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/combinations.js new file mode 100644 index 0000000000000000000000000000000000000000..66e975fb027005e1d07e631ee523ba7b9fa67952 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/combinations.js @@ -0,0 +1,53 @@ +//#region src/array/combinations.ts +/** +* Returns all `r`-length combinations of elements from the input array. +* +* Combinations are emitted in lexicographic order based on the position of elements in the input array. +* Elements are treated as unique by position, not by value, so duplicates in the input may produce +* combinations that look identical. +* +* The number of combinations is `n! / r! / (n - r)!` when `0 <= r <= n`, and zero when `r > n`. +* +* @template T +* @param arr - The input array. +* @param r - The length of each combination. Must be a non-negative integer. +* @returns An array of `r`-length combinations. +* @throws {Error} If `r` is not a non-negative integer. +* +* @example +* combinations(['A', 'B', 'C', 'D'], 2); +* // => [['A','B'], ['A','C'], ['A','D'], ['B','C'], ['B','D'], ['C','D']] +* +* @example +* combinations([1, 2, 3, 4], 3); +* // => [[1,2,3], [1,2,4], [1,3,4], [2,3,4]] +* +* @example +* combinations([1, 2, 3], 0); +* // => [[]] +* +* @example +* combinations([1, 2], 5); +* // => [] +*/ +function combinations(arr, r) { + if (!Number.isInteger(r) || r < 0) throw new Error("r must be a non-negative integer."); + const n = arr.length; + if (r > n) return []; + if (r === 0) return [[]]; + const indices = Array(r); + for (let i = 0; i < r; i++) indices[i] = i; + const result = []; + while (true) { + const tuple = Array(r); + for (let i = 0; i < r; i++) tuple[i] = arr[indices[i]]; + result.push(tuple); + let i = r - 1; + while (i >= 0 && indices[i] === i + n - r) i--; + if (i < 0) return result; + indices[i]++; + for (let j = i + 1; j < r; j++) indices[j] = indices[j - 1] + 1; + } +} +//#endregion +exports.combinations = combinations; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/combinations.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/combinations.mjs new file mode 100644 index 0000000000000000000000000000000000000000..3e4a1010ac63db98b61d7bfd9f385ebb2a27cde0 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/combinations.mjs @@ -0,0 +1,53 @@ +//#region src/array/combinations.ts +/** +* Returns all `r`-length combinations of elements from the input array. +* +* Combinations are emitted in lexicographic order based on the position of elements in the input array. +* Elements are treated as unique by position, not by value, so duplicates in the input may produce +* combinations that look identical. +* +* The number of combinations is `n! / r! / (n - r)!` when `0 <= r <= n`, and zero when `r > n`. +* +* @template T +* @param arr - The input array. +* @param r - The length of each combination. Must be a non-negative integer. +* @returns An array of `r`-length combinations. +* @throws {Error} If `r` is not a non-negative integer. +* +* @example +* combinations(['A', 'B', 'C', 'D'], 2); +* // => [['A','B'], ['A','C'], ['A','D'], ['B','C'], ['B','D'], ['C','D']] +* +* @example +* combinations([1, 2, 3, 4], 3); +* // => [[1,2,3], [1,2,4], [1,3,4], [2,3,4]] +* +* @example +* combinations([1, 2, 3], 0); +* // => [[]] +* +* @example +* combinations([1, 2], 5); +* // => [] +*/ +function combinations(arr, r) { + if (!Number.isInteger(r) || r < 0) throw new Error("r must be a non-negative integer."); + const n = arr.length; + if (r > n) return []; + if (r === 0) return [[]]; + const indices = Array(r); + for (let i = 0; i < r; i++) indices[i] = i; + const result = []; + while (true) { + const tuple = Array(r); + for (let i = 0; i < r; i++) tuple[i] = arr[indices[i]]; + result.push(tuple); + let i = r - 1; + while (i >= 0 && indices[i] === i + n - r) i--; + if (i < 0) return result; + indices[i]++; + for (let j = i + 1; j < r; j++) indices[j] = indices[j - 1] + 1; + } +} +//#endregion +export { combinations }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/compact.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/compact.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..9c7d36333697b7441994c621eb0c29d40faee521 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/compact.d.mts @@ -0,0 +1,16 @@ +//#region src/array/compact.d.ts +type NotFalsey = Exclude; +/** + * Removes falsey values (false, null, 0, -0, 0n, '', undefined, NaN) from an array. + * + * @template T - The type of elements in the array. + * @param arr - The input array to remove falsey values. + * @returns A new array with all falsey values removed. + * + * @example + * compact([0, -0, 0n, 1, false, 2, '', 3, null, undefined, 4, NaN, 5]); + * Returns: [1, 2, 3, 4, 5] + */ +declare function compact(arr: readonly T[]): Array>; +//#endregion +export { compact }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/compact.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/compact.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9c7d36333697b7441994c621eb0c29d40faee521 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/compact.d.ts @@ -0,0 +1,16 @@ +//#region src/array/compact.d.ts +type NotFalsey = Exclude; +/** + * Removes falsey values (false, null, 0, -0, 0n, '', undefined, NaN) from an array. + * + * @template T - The type of elements in the array. + * @param arr - The input array to remove falsey values. + * @returns A new array with all falsey values removed. + * + * @example + * compact([0, -0, 0n, 1, false, 2, '', 3, null, undefined, 4, NaN, 5]); + * Returns: [1, 2, 3, 4, 5] + */ +declare function compact(arr: readonly T[]): Array>; +//#endregion +export { compact }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/compact.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/compact.js new file mode 100644 index 0000000000000000000000000000000000000000..62a26e222b4b47e338f8c9ee5031c3352fbe7657 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/compact.js @@ -0,0 +1,22 @@ +//#region src/array/compact.ts +/** +* Removes falsey values (false, null, 0, -0, 0n, '', undefined, NaN) from an array. +* +* @template T - The type of elements in the array. +* @param arr - The input array to remove falsey values. +* @returns A new array with all falsey values removed. +* +* @example +* compact([0, -0, 0n, 1, false, 2, '', 3, null, undefined, 4, NaN, 5]); +* Returns: [1, 2, 3, 4, 5] +*/ +function compact(arr) { + const result = []; + for (let i = 0; i < arr.length; i++) { + const item = arr[i]; + if (item) result.push(item); + } + return result; +} +//#endregion +exports.compact = compact; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/compact.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/compact.mjs new file mode 100644 index 0000000000000000000000000000000000000000..a7a2db407dcd8091ed965d0d52e4a1ee7362888d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/compact.mjs @@ -0,0 +1,22 @@ +//#region src/array/compact.ts +/** +* Removes falsey values (false, null, 0, -0, 0n, '', undefined, NaN) from an array. +* +* @template T - The type of elements in the array. +* @param arr - The input array to remove falsey values. +* @returns A new array with all falsey values removed. +* +* @example +* compact([0, -0, 0n, 1, false, 2, '', 3, null, undefined, 4, NaN, 5]); +* Returns: [1, 2, 3, 4, 5] +*/ +function compact(arr) { + const result = []; + for (let i = 0; i < arr.length; i++) { + const item = arr[i]; + if (item) result.push(item); + } + return result; +} +//#endregion +export { compact }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/countBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/countBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..019bcb2bbf45c3eb91d199ba20a159be5efc0538 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/countBy.d.mts @@ -0,0 +1,37 @@ +//#region src/array/countBy.d.ts +/** + * Count the occurrences of each item in an array + * based on a transformation function. + * + * This function takes an array and a transformation function + * that converts each item in the array to a key. It then + * counts the occurrences of each transformed item and returns + * an object with the transformed items as keys and the counts + * as values. + * + * @template T - The type of the items in the input array. + * @template K - The type of keys. + * @param arr - The input array to count occurrences. + * @param mapper - The transformation function that maps each item, its index, and the array to a key. + * @returns An object containing the transformed items as keys and the + * counts as values. + * + * @example + * const array = ['a', 'b', 'c', 'a', 'b', 'a']; + * const result = countBy(array, x => x); + * // result will be { a: 3, b: 2, c: 1 } + * + * @example + * const array = [1, 2, 3, 4, 5]; + * const result = countBy(array, item => item % 2 === 0 ? 'even' : 'odd'); + * // result will be { odd: 3, even: 2 } + * + * @example + * // Using index parameter + * const array = ['a', 'b', 'c', 'd']; + * const result = countBy(array, (item, index) => index < 2 ? 'first' : 'rest'); + * // result will be { first: 2, rest: 2 } + */ +declare function countBy(arr: readonly T[], mapper: (item: T, index: number, array: readonly T[]) => K): Record; +//#endregion +export { countBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/countBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/countBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..019bcb2bbf45c3eb91d199ba20a159be5efc0538 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/countBy.d.ts @@ -0,0 +1,37 @@ +//#region src/array/countBy.d.ts +/** + * Count the occurrences of each item in an array + * based on a transformation function. + * + * This function takes an array and a transformation function + * that converts each item in the array to a key. It then + * counts the occurrences of each transformed item and returns + * an object with the transformed items as keys and the counts + * as values. + * + * @template T - The type of the items in the input array. + * @template K - The type of keys. + * @param arr - The input array to count occurrences. + * @param mapper - The transformation function that maps each item, its index, and the array to a key. + * @returns An object containing the transformed items as keys and the + * counts as values. + * + * @example + * const array = ['a', 'b', 'c', 'a', 'b', 'a']; + * const result = countBy(array, x => x); + * // result will be { a: 3, b: 2, c: 1 } + * + * @example + * const array = [1, 2, 3, 4, 5]; + * const result = countBy(array, item => item % 2 === 0 ? 'even' : 'odd'); + * // result will be { odd: 3, even: 2 } + * + * @example + * // Using index parameter + * const array = ['a', 'b', 'c', 'd']; + * const result = countBy(array, (item, index) => index < 2 ? 'first' : 'rest'); + * // result will be { first: 2, rest: 2 } + */ +declare function countBy(arr: readonly T[], mapper: (item: T, index: number, array: readonly T[]) => K): Record; +//#endregion +export { countBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/countBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/countBy.js new file mode 100644 index 0000000000000000000000000000000000000000..75fd1af11485bef34e654be2779e63f062979dfd --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/countBy.js @@ -0,0 +1,45 @@ +//#region src/array/countBy.ts +/** +* Count the occurrences of each item in an array +* based on a transformation function. +* +* This function takes an array and a transformation function +* that converts each item in the array to a key. It then +* counts the occurrences of each transformed item and returns +* an object with the transformed items as keys and the counts +* as values. +* +* @template T - The type of the items in the input array. +* @template K - The type of keys. +* @param arr - The input array to count occurrences. +* @param mapper - The transformation function that maps each item, its index, and the array to a key. +* @returns An object containing the transformed items as keys and the +* counts as values. +* +* @example +* const array = ['a', 'b', 'c', 'a', 'b', 'a']; +* const result = countBy(array, x => x); +* // result will be { a: 3, b: 2, c: 1 } +* +* @example +* const array = [1, 2, 3, 4, 5]; +* const result = countBy(array, item => item % 2 === 0 ? 'even' : 'odd'); +* // result will be { odd: 3, even: 2 } +* +* @example +* // Using index parameter +* const array = ['a', 'b', 'c', 'd']; +* const result = countBy(array, (item, index) => index < 2 ? 'first' : 'rest'); +* // result will be { first: 2, rest: 2 } +*/ +function countBy(arr, mapper) { + const result = {}; + for (let i = 0; i < arr.length; i++) { + const item = arr[i]; + const key = mapper(item, i, arr); + result[key] = (result[key] ?? 0) + 1; + } + return result; +} +//#endregion +exports.countBy = countBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/countBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/countBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..9ba962514060085885dc8281c3ae833d35a55ff4 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/countBy.mjs @@ -0,0 +1,45 @@ +//#region src/array/countBy.ts +/** +* Count the occurrences of each item in an array +* based on a transformation function. +* +* This function takes an array and a transformation function +* that converts each item in the array to a key. It then +* counts the occurrences of each transformed item and returns +* an object with the transformed items as keys and the counts +* as values. +* +* @template T - The type of the items in the input array. +* @template K - The type of keys. +* @param arr - The input array to count occurrences. +* @param mapper - The transformation function that maps each item, its index, and the array to a key. +* @returns An object containing the transformed items as keys and the +* counts as values. +* +* @example +* const array = ['a', 'b', 'c', 'a', 'b', 'a']; +* const result = countBy(array, x => x); +* // result will be { a: 3, b: 2, c: 1 } +* +* @example +* const array = [1, 2, 3, 4, 5]; +* const result = countBy(array, item => item % 2 === 0 ? 'even' : 'odd'); +* // result will be { odd: 3, even: 2 } +* +* @example +* // Using index parameter +* const array = ['a', 'b', 'c', 'd']; +* const result = countBy(array, (item, index) => index < 2 ? 'first' : 'rest'); +* // result will be { first: 2, rest: 2 } +*/ +function countBy(arr, mapper) { + const result = {}; + for (let i = 0; i < arr.length; i++) { + const item = arr[i]; + const key = mapper(item, i, arr); + result[key] = (result[key] ?? 0) + 1; + } + return result; +} +//#endregion +export { countBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/difference.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/difference.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..d545a8f461144abd6f65d75ccf6315bd20417d74 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/difference.d.mts @@ -0,0 +1,26 @@ +//#region src/array/difference.d.ts +/** + * Computes the difference between two arrays. + * + * This function takes two arrays and returns a new array containing the elements + * that are present in the first array but not in the second array. It effectively + * filters out any elements from the first array that also appear in the second array. + * + * @template T + * @param firstArr - The array from which to derive the difference. This is the primary array + * from which elements will be compared and filtered. + * @param secondArr - The array containing elements to be excluded from the first array. + * Each element in this array will be checked against the first array, and if a match is found, + * that element will be excluded from the result. + * @returns A new array containing the elements that are present in the first array but not + * in the second array. + * + * @example + * const array1 = [1, 2, 3, 4, 5]; + * const array2 = [2, 4]; + * const result = difference(array1, array2); + * // result will be [1, 3, 5] since 2 and 4 are in both arrays and are excluded from the result. + */ +declare function difference(firstArr: readonly T[], secondArr: readonly T[]): T[]; +//#endregion +export { difference }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/difference.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/difference.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d545a8f461144abd6f65d75ccf6315bd20417d74 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/difference.d.ts @@ -0,0 +1,26 @@ +//#region src/array/difference.d.ts +/** + * Computes the difference between two arrays. + * + * This function takes two arrays and returns a new array containing the elements + * that are present in the first array but not in the second array. It effectively + * filters out any elements from the first array that also appear in the second array. + * + * @template T + * @param firstArr - The array from which to derive the difference. This is the primary array + * from which elements will be compared and filtered. + * @param secondArr - The array containing elements to be excluded from the first array. + * Each element in this array will be checked against the first array, and if a match is found, + * that element will be excluded from the result. + * @returns A new array containing the elements that are present in the first array but not + * in the second array. + * + * @example + * const array1 = [1, 2, 3, 4, 5]; + * const array2 = [2, 4]; + * const result = difference(array1, array2); + * // result will be [1, 3, 5] since 2 and 4 are in both arrays and are excluded from the result. + */ +declare function difference(firstArr: readonly T[], secondArr: readonly T[]): T[]; +//#endregion +export { difference }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/difference.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/difference.js new file mode 100644 index 0000000000000000000000000000000000000000..e5571c17606137449c3d305743adbcf52d714ba5 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/difference.js @@ -0,0 +1,29 @@ +//#region src/array/difference.ts +/** +* Computes the difference between two arrays. +* +* This function takes two arrays and returns a new array containing the elements +* that are present in the first array but not in the second array. It effectively +* filters out any elements from the first array that also appear in the second array. +* +* @template T +* @param firstArr - The array from which to derive the difference. This is the primary array +* from which elements will be compared and filtered. +* @param secondArr - The array containing elements to be excluded from the first array. +* Each element in this array will be checked against the first array, and if a match is found, +* that element will be excluded from the result. +* @returns A new array containing the elements that are present in the first array but not +* in the second array. +* +* @example +* const array1 = [1, 2, 3, 4, 5]; +* const array2 = [2, 4]; +* const result = difference(array1, array2); +* // result will be [1, 3, 5] since 2 and 4 are in both arrays and are excluded from the result. +*/ +function difference(firstArr, secondArr) { + const secondSet = new Set(secondArr); + return firstArr.filter((item) => !secondSet.has(item)); +} +//#endregion +exports.difference = difference; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/difference.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/difference.mjs new file mode 100644 index 0000000000000000000000000000000000000000..fe72a4694857d8ccf6ffdefda489d75b0c38008a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/difference.mjs @@ -0,0 +1,29 @@ +//#region src/array/difference.ts +/** +* Computes the difference between two arrays. +* +* This function takes two arrays and returns a new array containing the elements +* that are present in the first array but not in the second array. It effectively +* filters out any elements from the first array that also appear in the second array. +* +* @template T +* @param firstArr - The array from which to derive the difference. This is the primary array +* from which elements will be compared and filtered. +* @param secondArr - The array containing elements to be excluded from the first array. +* Each element in this array will be checked against the first array, and if a match is found, +* that element will be excluded from the result. +* @returns A new array containing the elements that are present in the first array but not +* in the second array. +* +* @example +* const array1 = [1, 2, 3, 4, 5]; +* const array2 = [2, 4]; +* const result = difference(array1, array2); +* // result will be [1, 3, 5] since 2 and 4 are in both arrays and are excluded from the result. +*/ +function difference(firstArr, secondArr) { + const secondSet = new Set(secondArr); + return firstArr.filter((item) => !secondSet.has(item)); +} +//#endregion +export { difference }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/differenceBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/differenceBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..b6743d2b1cfeb26e56643bb26ab2dd8c990ab437 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/differenceBy.d.mts @@ -0,0 +1,36 @@ +//#region src/array/differenceBy.d.ts +/** + * Computes the difference between two arrays after mapping their elements through a provided function. + * + * This function takes two arrays and a mapper function. It returns a new array containing the elements + * that are present in the first array but not in the second array, based on the identity calculated + * by the mapper function. + * + * Essentially, it filters out any elements from the first array that, when + * mapped, match an element in the mapped version of the second array. + * + * @template T, U + * @param firstArr - The primary array from which to derive the difference. + * @param secondArr - The array containing elements to be excluded from the first array. + * @param mapper - The function to map the elements of both arrays. This function + * is applied to each element in both arrays, and the comparison is made based on the mapped values. + * @returns A new array containing the elements from the first array that do not have a corresponding + * mapped identity in the second array. + * + * @example + * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }]; + * const array2 = [{ id: 2 }, { id: 4 }]; + * const mapper = item => item.id; + * const result = differenceBy(array1, array2, mapper); + * // result will be [{ id: 1 }, { id: 3 }] since the elements with id 2 are in both arrays and are excluded from the result. + * + * @example + * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }]; + * const array2 = [2, 4]; + * const mapper = item => (typeof item === 'object' ? item.id : item); + * const result = differenceBy(array1, array2, mapper); + * // result will be [{ id: 1 }, { id: 3 }] since 2 is present in both arrays after mapping, and is excluded from the result. + */ +declare function differenceBy(firstArr: readonly T[], secondArr: readonly U[], mapper: (value: T | U) => unknown): T[]; +//#endregion +export { differenceBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/differenceBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/differenceBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b6743d2b1cfeb26e56643bb26ab2dd8c990ab437 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/differenceBy.d.ts @@ -0,0 +1,36 @@ +//#region src/array/differenceBy.d.ts +/** + * Computes the difference between two arrays after mapping their elements through a provided function. + * + * This function takes two arrays and a mapper function. It returns a new array containing the elements + * that are present in the first array but not in the second array, based on the identity calculated + * by the mapper function. + * + * Essentially, it filters out any elements from the first array that, when + * mapped, match an element in the mapped version of the second array. + * + * @template T, U + * @param firstArr - The primary array from which to derive the difference. + * @param secondArr - The array containing elements to be excluded from the first array. + * @param mapper - The function to map the elements of both arrays. This function + * is applied to each element in both arrays, and the comparison is made based on the mapped values. + * @returns A new array containing the elements from the first array that do not have a corresponding + * mapped identity in the second array. + * + * @example + * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }]; + * const array2 = [{ id: 2 }, { id: 4 }]; + * const mapper = item => item.id; + * const result = differenceBy(array1, array2, mapper); + * // result will be [{ id: 1 }, { id: 3 }] since the elements with id 2 are in both arrays and are excluded from the result. + * + * @example + * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }]; + * const array2 = [2, 4]; + * const mapper = item => (typeof item === 'object' ? item.id : item); + * const result = differenceBy(array1, array2, mapper); + * // result will be [{ id: 1 }, { id: 3 }] since 2 is present in both arrays after mapping, and is excluded from the result. + */ +declare function differenceBy(firstArr: readonly T[], secondArr: readonly U[], mapper: (value: T | U) => unknown): T[]; +//#endregion +export { differenceBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/differenceBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/differenceBy.js new file mode 100644 index 0000000000000000000000000000000000000000..eef9d58129915c9125e5f73a144966732829ea10 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/differenceBy.js @@ -0,0 +1,41 @@ +//#region src/array/differenceBy.ts +/** +* Computes the difference between two arrays after mapping their elements through a provided function. +* +* This function takes two arrays and a mapper function. It returns a new array containing the elements +* that are present in the first array but not in the second array, based on the identity calculated +* by the mapper function. +* +* Essentially, it filters out any elements from the first array that, when +* mapped, match an element in the mapped version of the second array. +* +* @template T, U +* @param firstArr - The primary array from which to derive the difference. +* @param secondArr - The array containing elements to be excluded from the first array. +* @param mapper - The function to map the elements of both arrays. This function +* is applied to each element in both arrays, and the comparison is made based on the mapped values. +* @returns A new array containing the elements from the first array that do not have a corresponding +* mapped identity in the second array. +* +* @example +* const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }]; +* const array2 = [{ id: 2 }, { id: 4 }]; +* const mapper = item => item.id; +* const result = differenceBy(array1, array2, mapper); +* // result will be [{ id: 1 }, { id: 3 }] since the elements with id 2 are in both arrays and are excluded from the result. +* +* @example +* const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }]; +* const array2 = [2, 4]; +* const mapper = item => (typeof item === 'object' ? item.id : item); +* const result = differenceBy(array1, array2, mapper); +* // result will be [{ id: 1 }, { id: 3 }] since 2 is present in both arrays after mapping, and is excluded from the result. +*/ +function differenceBy(firstArr, secondArr, mapper) { + const mappedSecondSet = new Set(secondArr.map((item) => mapper(item))); + return firstArr.filter((item) => { + return !mappedSecondSet.has(mapper(item)); + }); +} +//#endregion +exports.differenceBy = differenceBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/differenceBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/differenceBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..14e5667a8dcec22f21d7e863905827d5b54e980e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/differenceBy.mjs @@ -0,0 +1,41 @@ +//#region src/array/differenceBy.ts +/** +* Computes the difference between two arrays after mapping their elements through a provided function. +* +* This function takes two arrays and a mapper function. It returns a new array containing the elements +* that are present in the first array but not in the second array, based on the identity calculated +* by the mapper function. +* +* Essentially, it filters out any elements from the first array that, when +* mapped, match an element in the mapped version of the second array. +* +* @template T, U +* @param firstArr - The primary array from which to derive the difference. +* @param secondArr - The array containing elements to be excluded from the first array. +* @param mapper - The function to map the elements of both arrays. This function +* is applied to each element in both arrays, and the comparison is made based on the mapped values. +* @returns A new array containing the elements from the first array that do not have a corresponding +* mapped identity in the second array. +* +* @example +* const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }]; +* const array2 = [{ id: 2 }, { id: 4 }]; +* const mapper = item => item.id; +* const result = differenceBy(array1, array2, mapper); +* // result will be [{ id: 1 }, { id: 3 }] since the elements with id 2 are in both arrays and are excluded from the result. +* +* @example +* const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }]; +* const array2 = [2, 4]; +* const mapper = item => (typeof item === 'object' ? item.id : item); +* const result = differenceBy(array1, array2, mapper); +* // result will be [{ id: 1 }, { id: 3 }] since 2 is present in both arrays after mapping, and is excluded from the result. +*/ +function differenceBy(firstArr, secondArr, mapper) { + const mappedSecondSet = new Set(secondArr.map((item) => mapper(item))); + return firstArr.filter((item) => { + return !mappedSecondSet.has(mapper(item)); + }); +} +//#endregion +export { differenceBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/differenceWith.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/differenceWith.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..5b8a2f73e290f75a684708fa0084a6a7cf9cf071 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/differenceWith.d.mts @@ -0,0 +1,32 @@ +//#region src/array/differenceWith.d.ts +/** + * Computes the difference between two arrays based on a custom equality function. + * + * This function takes two arrays and a custom comparison function. It returns a new array containing + * the elements that are present in the first array but not in the second array. The comparison to determine + * if elements are equal is made using the provided custom function. + * + * @template T, U + * @param firstArr - The array from which to get the difference. + * @param secondArr - The array containing elements to exclude from the first array. + * @param areItemsEqual - A function to determine if two items are equal. + * @returns A new array containing the elements from the first array that do not match any elements in the second array + * according to the custom equality function. + * + * @example + * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }]; + * const array2 = [{ id: 2 }, { id: 4 }]; + * const areItemsEqual = (a, b) => a.id === b.id; + * const result = differenceWith(array1, array2, areItemsEqual); + * // result will be [{ id: 1 }, { id: 3 }] since the elements with id 2 are considered equal and are excluded from the result. + * + * @example + * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }]; + * const array2 = [2, 4]; + * const areItemsEqual = (a, b) => a.id === b; + * const result = differenceWith(array1, array2, areItemsEqual); + * // result will be [{ id: 1 }, { id: 3 }] since the element with id 2 is considered equal to the second array's element and is excluded from the result. + */ +declare function differenceWith(firstArr: readonly T[], secondArr: readonly U[], areItemsEqual: (x: T, y: U) => boolean): T[]; +//#endregion +export { differenceWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/differenceWith.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/differenceWith.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..5b8a2f73e290f75a684708fa0084a6a7cf9cf071 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/differenceWith.d.ts @@ -0,0 +1,32 @@ +//#region src/array/differenceWith.d.ts +/** + * Computes the difference between two arrays based on a custom equality function. + * + * This function takes two arrays and a custom comparison function. It returns a new array containing + * the elements that are present in the first array but not in the second array. The comparison to determine + * if elements are equal is made using the provided custom function. + * + * @template T, U + * @param firstArr - The array from which to get the difference. + * @param secondArr - The array containing elements to exclude from the first array. + * @param areItemsEqual - A function to determine if two items are equal. + * @returns A new array containing the elements from the first array that do not match any elements in the second array + * according to the custom equality function. + * + * @example + * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }]; + * const array2 = [{ id: 2 }, { id: 4 }]; + * const areItemsEqual = (a, b) => a.id === b.id; + * const result = differenceWith(array1, array2, areItemsEqual); + * // result will be [{ id: 1 }, { id: 3 }] since the elements with id 2 are considered equal and are excluded from the result. + * + * @example + * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }]; + * const array2 = [2, 4]; + * const areItemsEqual = (a, b) => a.id === b; + * const result = differenceWith(array1, array2, areItemsEqual); + * // result will be [{ id: 1 }, { id: 3 }] since the element with id 2 is considered equal to the second array's element and is excluded from the result. + */ +declare function differenceWith(firstArr: readonly T[], secondArr: readonly U[], areItemsEqual: (x: T, y: U) => boolean): T[]; +//#endregion +export { differenceWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/differenceWith.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/differenceWith.js new file mode 100644 index 0000000000000000000000000000000000000000..2889c640bc09af903dfdbff290881430c52c3421 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/differenceWith.js @@ -0,0 +1,38 @@ +//#region src/array/differenceWith.ts +/** +* Computes the difference between two arrays based on a custom equality function. +* +* This function takes two arrays and a custom comparison function. It returns a new array containing +* the elements that are present in the first array but not in the second array. The comparison to determine +* if elements are equal is made using the provided custom function. +* +* @template T, U +* @param firstArr - The array from which to get the difference. +* @param secondArr - The array containing elements to exclude from the first array. +* @param areItemsEqual - A function to determine if two items are equal. +* @returns A new array containing the elements from the first array that do not match any elements in the second array +* according to the custom equality function. +* +* @example +* const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }]; +* const array2 = [{ id: 2 }, { id: 4 }]; +* const areItemsEqual = (a, b) => a.id === b.id; +* const result = differenceWith(array1, array2, areItemsEqual); +* // result will be [{ id: 1 }, { id: 3 }] since the elements with id 2 are considered equal and are excluded from the result. +* +* @example +* const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }]; +* const array2 = [2, 4]; +* const areItemsEqual = (a, b) => a.id === b; +* const result = differenceWith(array1, array2, areItemsEqual); +* // result will be [{ id: 1 }, { id: 3 }] since the element with id 2 is considered equal to the second array's element and is excluded from the result. +*/ +function differenceWith(firstArr, secondArr, areItemsEqual) { + return firstArr.filter((firstItem) => { + return secondArr.every((secondItem) => { + return !areItemsEqual(firstItem, secondItem); + }); + }); +} +//#endregion +exports.differenceWith = differenceWith; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/differenceWith.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/differenceWith.mjs new file mode 100644 index 0000000000000000000000000000000000000000..5a72cf87dd06c54b7668590ba24524372d278ff7 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/differenceWith.mjs @@ -0,0 +1,38 @@ +//#region src/array/differenceWith.ts +/** +* Computes the difference between two arrays based on a custom equality function. +* +* This function takes two arrays and a custom comparison function. It returns a new array containing +* the elements that are present in the first array but not in the second array. The comparison to determine +* if elements are equal is made using the provided custom function. +* +* @template T, U +* @param firstArr - The array from which to get the difference. +* @param secondArr - The array containing elements to exclude from the first array. +* @param areItemsEqual - A function to determine if two items are equal. +* @returns A new array containing the elements from the first array that do not match any elements in the second array +* according to the custom equality function. +* +* @example +* const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }]; +* const array2 = [{ id: 2 }, { id: 4 }]; +* const areItemsEqual = (a, b) => a.id === b.id; +* const result = differenceWith(array1, array2, areItemsEqual); +* // result will be [{ id: 1 }, { id: 3 }] since the elements with id 2 are considered equal and are excluded from the result. +* +* @example +* const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }]; +* const array2 = [2, 4]; +* const areItemsEqual = (a, b) => a.id === b; +* const result = differenceWith(array1, array2, areItemsEqual); +* // result will be [{ id: 1 }, { id: 3 }] since the element with id 2 is considered equal to the second array's element and is excluded from the result. +*/ +function differenceWith(firstArr, secondArr, areItemsEqual) { + return firstArr.filter((firstItem) => { + return secondArr.every((secondItem) => { + return !areItemsEqual(firstItem, secondItem); + }); + }); +} +//#endregion +export { differenceWith }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/drop.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/drop.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..f677e9cced7ac18930cb906bc111d1bf0081310f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/drop.d.mts @@ -0,0 +1,20 @@ +//#region src/array/drop.d.ts +/** + * Removes a specified number of elements from the beginning of an array and returns the rest. + * + * This function takes an array and a number, and returns a new array with the specified number + * of elements removed from the start. + * + * @template T - The type of elements in the array. + * @param arr - The array from which to drop elements. + * @param itemsCount - The number of elements to drop from the beginning of the array. + * @returns A new array with the specified number of elements removed from the start. + * + * @example + * const array = [1, 2, 3, 4, 5]; + * const result = drop(array, 2); + * // result will be [3, 4, 5] since the first two elements are dropped. + */ +declare function drop(arr: readonly T[], itemsCount: number): T[]; +//#endregion +export { drop }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/drop.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/drop.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f677e9cced7ac18930cb906bc111d1bf0081310f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/drop.d.ts @@ -0,0 +1,20 @@ +//#region src/array/drop.d.ts +/** + * Removes a specified number of elements from the beginning of an array and returns the rest. + * + * This function takes an array and a number, and returns a new array with the specified number + * of elements removed from the start. + * + * @template T - The type of elements in the array. + * @param arr - The array from which to drop elements. + * @param itemsCount - The number of elements to drop from the beginning of the array. + * @returns A new array with the specified number of elements removed from the start. + * + * @example + * const array = [1, 2, 3, 4, 5]; + * const result = drop(array, 2); + * // result will be [3, 4, 5] since the first two elements are dropped. + */ +declare function drop(arr: readonly T[], itemsCount: number): T[]; +//#endregion +export { drop }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/drop.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/drop.js new file mode 100644 index 0000000000000000000000000000000000000000..5bb6ee7a2cf6d04bb977b461db90b906433731b3 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/drop.js @@ -0,0 +1,23 @@ +//#region src/array/drop.ts +/** +* Removes a specified number of elements from the beginning of an array and returns the rest. +* +* This function takes an array and a number, and returns a new array with the specified number +* of elements removed from the start. +* +* @template T - The type of elements in the array. +* @param arr - The array from which to drop elements. +* @param itemsCount - The number of elements to drop from the beginning of the array. +* @returns A new array with the specified number of elements removed from the start. +* +* @example +* const array = [1, 2, 3, 4, 5]; +* const result = drop(array, 2); +* // result will be [3, 4, 5] since the first two elements are dropped. +*/ +function drop(arr, itemsCount) { + itemsCount = Math.max(itemsCount, 0); + return arr.slice(itemsCount); +} +//#endregion +exports.drop = drop; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/drop.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/drop.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b2bc5f3a70e2bfb457f253c36467d1da5084d66a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/drop.mjs @@ -0,0 +1,23 @@ +//#region src/array/drop.ts +/** +* Removes a specified number of elements from the beginning of an array and returns the rest. +* +* This function takes an array and a number, and returns a new array with the specified number +* of elements removed from the start. +* +* @template T - The type of elements in the array. +* @param arr - The array from which to drop elements. +* @param itemsCount - The number of elements to drop from the beginning of the array. +* @returns A new array with the specified number of elements removed from the start. +* +* @example +* const array = [1, 2, 3, 4, 5]; +* const result = drop(array, 2); +* // result will be [3, 4, 5] since the first two elements are dropped. +*/ +function drop(arr, itemsCount) { + itemsCount = Math.max(itemsCount, 0); + return arr.slice(itemsCount); +} +//#endregion +export { drop }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropRight.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropRight.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..bc11aef50544b009e7d4f65838c3a4b061419a7b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropRight.d.mts @@ -0,0 +1,20 @@ +//#region src/array/dropRight.d.ts +/** + * Removes a specified number of elements from the end of an array and returns the rest. + * + * This function takes an array and a number, and returns a new array with the specified number + * of elements removed from the end. + * + * @template T - The type of elements in the array. + * @param arr - The array from which to drop elements. + * @param itemsCount - The number of elements to drop from the end of the array. + * @returns A new array with the specified number of elements removed from the end. + * + * @example + * const array = [1, 2, 3, 4, 5]; + * const result = dropRight(array, 2); + * // result will be [1, 2, 3] since the last two elements are dropped. + */ +declare function dropRight(arr: readonly T[], itemsCount: number): T[]; +//#endregion +export { dropRight }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropRight.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropRight.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..bc11aef50544b009e7d4f65838c3a4b061419a7b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropRight.d.ts @@ -0,0 +1,20 @@ +//#region src/array/dropRight.d.ts +/** + * Removes a specified number of elements from the end of an array and returns the rest. + * + * This function takes an array and a number, and returns a new array with the specified number + * of elements removed from the end. + * + * @template T - The type of elements in the array. + * @param arr - The array from which to drop elements. + * @param itemsCount - The number of elements to drop from the end of the array. + * @returns A new array with the specified number of elements removed from the end. + * + * @example + * const array = [1, 2, 3, 4, 5]; + * const result = dropRight(array, 2); + * // result will be [1, 2, 3] since the last two elements are dropped. + */ +declare function dropRight(arr: readonly T[], itemsCount: number): T[]; +//#endregion +export { dropRight }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropRight.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropRight.js new file mode 100644 index 0000000000000000000000000000000000000000..cc74512542289e0bd3440f9ae62b20fb5030d441 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropRight.js @@ -0,0 +1,24 @@ +//#region src/array/dropRight.ts +/** +* Removes a specified number of elements from the end of an array and returns the rest. +* +* This function takes an array and a number, and returns a new array with the specified number +* of elements removed from the end. +* +* @template T - The type of elements in the array. +* @param arr - The array from which to drop elements. +* @param itemsCount - The number of elements to drop from the end of the array. +* @returns A new array with the specified number of elements removed from the end. +* +* @example +* const array = [1, 2, 3, 4, 5]; +* const result = dropRight(array, 2); +* // result will be [1, 2, 3] since the last two elements are dropped. +*/ +function dropRight(arr, itemsCount) { + itemsCount = Math.min(-itemsCount, 0); + if (itemsCount === 0) return arr.slice(); + return arr.slice(0, itemsCount); +} +//#endregion +exports.dropRight = dropRight; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropRight.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropRight.mjs new file mode 100644 index 0000000000000000000000000000000000000000..6f779f3779b93e3ba4b2013f140b1d6fd8f6ab68 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropRight.mjs @@ -0,0 +1,24 @@ +//#region src/array/dropRight.ts +/** +* Removes a specified number of elements from the end of an array and returns the rest. +* +* This function takes an array and a number, and returns a new array with the specified number +* of elements removed from the end. +* +* @template T - The type of elements in the array. +* @param arr - The array from which to drop elements. +* @param itemsCount - The number of elements to drop from the end of the array. +* @returns A new array with the specified number of elements removed from the end. +* +* @example +* const array = [1, 2, 3, 4, 5]; +* const result = dropRight(array, 2); +* // result will be [1, 2, 3] since the last two elements are dropped. +*/ +function dropRight(arr, itemsCount) { + itemsCount = Math.min(-itemsCount, 0); + if (itemsCount === 0) return arr.slice(); + return arr.slice(0, itemsCount); +} +//#endregion +export { dropRight }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropRightWhile.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropRightWhile.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..dc68c16e18b6d574421ec1f93dda8be45e330a27 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropRightWhile.d.mts @@ -0,0 +1,22 @@ +//#region src/array/dropRightWhile.d.ts +/** + * Removes elements from the end of an array until the predicate returns false. + * + * This function iterates over an array from the end and drops elements until the provided + * predicate function returns false. It then returns a new array with the remaining elements. + * + * @template T - The type of elements in the array. + * @param arr - The array from which to drop elements. + * @param canContinueDropping - A predicate function that determines + * whether to continue dropping elements. The function is called with each element from the end, + * and dropping continues as long as it returns true. + * @returns A new array with the elements remaining after the predicate returns false. + * + * @example + * const array = [1, 2, 3, 4, 5]; + * const result = dropRightWhile(array, x => x > 3); + * // result will be [1, 2, 3] since elements greater than 3 are dropped from the end. + */ +declare function dropRightWhile(arr: readonly T[], canContinueDropping: (item: T, index: number, arr: readonly T[]) => boolean): T[]; +//#endregion +export { dropRightWhile }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropRightWhile.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropRightWhile.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..dc68c16e18b6d574421ec1f93dda8be45e330a27 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropRightWhile.d.ts @@ -0,0 +1,22 @@ +//#region src/array/dropRightWhile.d.ts +/** + * Removes elements from the end of an array until the predicate returns false. + * + * This function iterates over an array from the end and drops elements until the provided + * predicate function returns false. It then returns a new array with the remaining elements. + * + * @template T - The type of elements in the array. + * @param arr - The array from which to drop elements. + * @param canContinueDropping - A predicate function that determines + * whether to continue dropping elements. The function is called with each element from the end, + * and dropping continues as long as it returns true. + * @returns A new array with the elements remaining after the predicate returns false. + * + * @example + * const array = [1, 2, 3, 4, 5]; + * const result = dropRightWhile(array, x => x > 3); + * // result will be [1, 2, 3] since elements greater than 3 are dropped from the end. + */ +declare function dropRightWhile(arr: readonly T[], canContinueDropping: (item: T, index: number, arr: readonly T[]) => boolean): T[]; +//#endregion +export { dropRightWhile }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropRightWhile.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropRightWhile.js new file mode 100644 index 0000000000000000000000000000000000000000..1d2e82940f77557a0409c7e2615c1b3d1f57d228 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropRightWhile.js @@ -0,0 +1,25 @@ +//#region src/array/dropRightWhile.ts +/** +* Removes elements from the end of an array until the predicate returns false. +* +* This function iterates over an array from the end and drops elements until the provided +* predicate function returns false. It then returns a new array with the remaining elements. +* +* @template T - The type of elements in the array. +* @param arr - The array from which to drop elements. +* @param canContinueDropping - A predicate function that determines +* whether to continue dropping elements. The function is called with each element from the end, +* and dropping continues as long as it returns true. +* @returns A new array with the elements remaining after the predicate returns false. +* +* @example +* const array = [1, 2, 3, 4, 5]; +* const result = dropRightWhile(array, x => x > 3); +* // result will be [1, 2, 3] since elements greater than 3 are dropped from the end. +*/ +function dropRightWhile(arr, canContinueDropping) { + for (let i = arr.length - 1; i >= 0; i--) if (!canContinueDropping(arr[i], i, arr)) return arr.slice(0, i + 1); + return []; +} +//#endregion +exports.dropRightWhile = dropRightWhile; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropRightWhile.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropRightWhile.mjs new file mode 100644 index 0000000000000000000000000000000000000000..9d947c72912d76ac2ffeb64419c8cc23ba574699 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropRightWhile.mjs @@ -0,0 +1,25 @@ +//#region src/array/dropRightWhile.ts +/** +* Removes elements from the end of an array until the predicate returns false. +* +* This function iterates over an array from the end and drops elements until the provided +* predicate function returns false. It then returns a new array with the remaining elements. +* +* @template T - The type of elements in the array. +* @param arr - The array from which to drop elements. +* @param canContinueDropping - A predicate function that determines +* whether to continue dropping elements. The function is called with each element from the end, +* and dropping continues as long as it returns true. +* @returns A new array with the elements remaining after the predicate returns false. +* +* @example +* const array = [1, 2, 3, 4, 5]; +* const result = dropRightWhile(array, x => x > 3); +* // result will be [1, 2, 3] since elements greater than 3 are dropped from the end. +*/ +function dropRightWhile(arr, canContinueDropping) { + for (let i = arr.length - 1; i >= 0; i--) if (!canContinueDropping(arr[i], i, arr)) return arr.slice(0, i + 1); + return []; +} +//#endregion +export { dropRightWhile }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropWhile.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropWhile.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..2cf9b2b26eeb97215ec943ea9d27fb8295009d19 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropWhile.d.mts @@ -0,0 +1,22 @@ +//#region src/array/dropWhile.d.ts +/** + * Removes elements from the beginning of an array until the predicate returns false. + * + * This function iterates over an array and drops elements from the start until the provided + * predicate function returns false. It then returns a new array with the remaining elements. + * + * @template T - The type of elements in the array. + * @param arr - The array from which to drop elements. + * @param canContinueDropping - A predicate function that determines + * whether to continue dropping elements. The function is called with each element, and dropping + * continues as long as it returns true. + * @returns A new array with the elements remaining after the predicate returns false. + * + * @example + * const array = [1, 2, 3, 4, 5]; + * const result = dropWhile(array, x => x < 3); + * // result will be [3, 4, 5] since elements less than 3 are dropped. + */ +declare function dropWhile(arr: readonly T[], canContinueDropping: (item: T, index: number, arr: readonly T[]) => boolean): T[]; +//#endregion +export { dropWhile }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropWhile.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropWhile.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..2cf9b2b26eeb97215ec943ea9d27fb8295009d19 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropWhile.d.ts @@ -0,0 +1,22 @@ +//#region src/array/dropWhile.d.ts +/** + * Removes elements from the beginning of an array until the predicate returns false. + * + * This function iterates over an array and drops elements from the start until the provided + * predicate function returns false. It then returns a new array with the remaining elements. + * + * @template T - The type of elements in the array. + * @param arr - The array from which to drop elements. + * @param canContinueDropping - A predicate function that determines + * whether to continue dropping elements. The function is called with each element, and dropping + * continues as long as it returns true. + * @returns A new array with the elements remaining after the predicate returns false. + * + * @example + * const array = [1, 2, 3, 4, 5]; + * const result = dropWhile(array, x => x < 3); + * // result will be [3, 4, 5] since elements less than 3 are dropped. + */ +declare function dropWhile(arr: readonly T[], canContinueDropping: (item: T, index: number, arr: readonly T[]) => boolean): T[]; +//#endregion +export { dropWhile }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropWhile.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropWhile.js new file mode 100644 index 0000000000000000000000000000000000000000..bbf9795bbee23ca84d7fc4c68a73eb5194c4cc1b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropWhile.js @@ -0,0 +1,26 @@ +//#region src/array/dropWhile.ts +/** +* Removes elements from the beginning of an array until the predicate returns false. +* +* This function iterates over an array and drops elements from the start until the provided +* predicate function returns false. It then returns a new array with the remaining elements. +* +* @template T - The type of elements in the array. +* @param arr - The array from which to drop elements. +* @param canContinueDropping - A predicate function that determines +* whether to continue dropping elements. The function is called with each element, and dropping +* continues as long as it returns true. +* @returns A new array with the elements remaining after the predicate returns false. +* +* @example +* const array = [1, 2, 3, 4, 5]; +* const result = dropWhile(array, x => x < 3); +* // result will be [3, 4, 5] since elements less than 3 are dropped. +*/ +function dropWhile(arr, canContinueDropping) { + const dropEndIndex = arr.findIndex((item, index, arr) => !canContinueDropping(item, index, arr)); + if (dropEndIndex === -1) return []; + return arr.slice(dropEndIndex); +} +//#endregion +exports.dropWhile = dropWhile; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropWhile.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropWhile.mjs new file mode 100644 index 0000000000000000000000000000000000000000..20248822bb4218e3d1a3d977f7d9c57ecd357941 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/dropWhile.mjs @@ -0,0 +1,26 @@ +//#region src/array/dropWhile.ts +/** +* Removes elements from the beginning of an array until the predicate returns false. +* +* This function iterates over an array and drops elements from the start until the provided +* predicate function returns false. It then returns a new array with the remaining elements. +* +* @template T - The type of elements in the array. +* @param arr - The array from which to drop elements. +* @param canContinueDropping - A predicate function that determines +* whether to continue dropping elements. The function is called with each element, and dropping +* continues as long as it returns true. +* @returns A new array with the elements remaining after the predicate returns false. +* +* @example +* const array = [1, 2, 3, 4, 5]; +* const result = dropWhile(array, x => x < 3); +* // result will be [3, 4, 5] since elements less than 3 are dropped. +*/ +function dropWhile(arr, canContinueDropping) { + const dropEndIndex = arr.findIndex((item, index, arr) => !canContinueDropping(item, index, arr)); + if (dropEndIndex === -1) return []; + return arr.slice(dropEndIndex); +} +//#endregion +export { dropWhile }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/fill.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/fill.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..6e861027f0dc30cdde819d6b1b203715b966c104 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/fill.d.mts @@ -0,0 +1,86 @@ +//#region src/array/fill.d.ts +/** + * Fills the whole array with a specified value. + * + * This function mutates the original array and replaces its elements with the provided value, starting from the specified + * start index up to the end index (non-inclusive). If the start or end indices are not provided, it defaults to filling the + * entire array. + * + * @template T - The type of the value to fill the array with. + * @param array - The array to fill. + * @param value - The value to fill the array with. + * @returns The array with the filled values. + * + * @example + * fill([1, 2, 3], 'a'); + * // => ['a', 'a', 'a'] + * + * fill(Array(3), 2); + * // => [2, 2, 2] + * + * fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + * + * fill([1, 2, 3], '*', -2, -1); + * // => [1, '*', 3] + */ +declare function fill(array: unknown[], value: T): T[]; +/** + * Fills elements of an array with a specified value from the start position up to the end of the array. + * + * This function mutates the original array and replaces its elements with the provided value, starting from the specified + * start index up to the end index (non-inclusive). If the start or end indices are not provided, it defaults to filling the + * entire array. + * + * @template T - The type of elements in the original array. + * @template U - The type of the value to fill the array with. + * @param array - The array to fill. + * @param value - The value to fill the array with. + * @param [start=0] - The start position. Defaults to 0. + * @returns The array with the filled values. + * + * @example + * fill([1, 2, 3], 'a'); + * // => ['a', 'a', 'a'] + * + * fill(Array(3), 2); + * // => [2, 2, 2] + * + * fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + * + * fill([1, 2, 3], '*', -2, -1); + * // => [1, '*', 3] + */ +declare function fill(array: Array, value: U, start: number): Array; +/** + * Fills elements of an array with a specified value from the start position up to, but not including, the end position. + * + * This function mutates the original array and replaces its elements with the provided value, starting from the specified + * start index up to the end index (non-inclusive). If the start or end indices are not provided, it defaults to filling the + * entire array. + * + * @template T - The type of elements in the original array. + * @template U - The type of the value to fill the array with. + * @param array - The array to fill. + * @param value - The value to fill the array with. + * @param [start=0] - The start position. Defaults to 0. + * @param [end=arr.length] - The end position. Defaults to the array's length. + * @returns The array with the filled values. + * + * @example + * fill([1, 2, 3], 'a'); + * // => ['a', 'a', 'a'] + * + * fill(Array(3), 2); + * // => [2, 2, 2] + * + * fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + * + * fill([1, 2, 3], '*', -2, -1); + * // => [1, '*', 3] + */ +declare function fill(array: Array, value: U, start: number, end: number): Array; +//#endregion +export { fill }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/fill.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/fill.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6e861027f0dc30cdde819d6b1b203715b966c104 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/fill.d.ts @@ -0,0 +1,86 @@ +//#region src/array/fill.d.ts +/** + * Fills the whole array with a specified value. + * + * This function mutates the original array and replaces its elements with the provided value, starting from the specified + * start index up to the end index (non-inclusive). If the start or end indices are not provided, it defaults to filling the + * entire array. + * + * @template T - The type of the value to fill the array with. + * @param array - The array to fill. + * @param value - The value to fill the array with. + * @returns The array with the filled values. + * + * @example + * fill([1, 2, 3], 'a'); + * // => ['a', 'a', 'a'] + * + * fill(Array(3), 2); + * // => [2, 2, 2] + * + * fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + * + * fill([1, 2, 3], '*', -2, -1); + * // => [1, '*', 3] + */ +declare function fill(array: unknown[], value: T): T[]; +/** + * Fills elements of an array with a specified value from the start position up to the end of the array. + * + * This function mutates the original array and replaces its elements with the provided value, starting from the specified + * start index up to the end index (non-inclusive). If the start or end indices are not provided, it defaults to filling the + * entire array. + * + * @template T - The type of elements in the original array. + * @template U - The type of the value to fill the array with. + * @param array - The array to fill. + * @param value - The value to fill the array with. + * @param [start=0] - The start position. Defaults to 0. + * @returns The array with the filled values. + * + * @example + * fill([1, 2, 3], 'a'); + * // => ['a', 'a', 'a'] + * + * fill(Array(3), 2); + * // => [2, 2, 2] + * + * fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + * + * fill([1, 2, 3], '*', -2, -1); + * // => [1, '*', 3] + */ +declare function fill(array: Array, value: U, start: number): Array; +/** + * Fills elements of an array with a specified value from the start position up to, but not including, the end position. + * + * This function mutates the original array and replaces its elements with the provided value, starting from the specified + * start index up to the end index (non-inclusive). If the start or end indices are not provided, it defaults to filling the + * entire array. + * + * @template T - The type of elements in the original array. + * @template U - The type of the value to fill the array with. + * @param array - The array to fill. + * @param value - The value to fill the array with. + * @param [start=0] - The start position. Defaults to 0. + * @param [end=arr.length] - The end position. Defaults to the array's length. + * @returns The array with the filled values. + * + * @example + * fill([1, 2, 3], 'a'); + * // => ['a', 'a', 'a'] + * + * fill(Array(3), 2); + * // => [2, 2, 2] + * + * fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + * + * fill([1, 2, 3], '*', -2, -1); + * // => [1, '*', 3] + */ +declare function fill(array: Array, value: U, start: number, end: number): Array; +//#endregion +export { fill }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/fill.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/fill.js new file mode 100644 index 0000000000000000000000000000000000000000..50f1be951aac99ae6227d1b56093111717ddb826 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/fill.js @@ -0,0 +1,38 @@ +//#region src/array/fill.ts +/** +* Fills elements of an array with a specified value from the start position up to, but not including, the end position. +* +* This function mutates the original array and replaces its elements with the provided value, starting from the specified +* start index up to the end index (non-inclusive). If the start or end indices are not provided, it defaults to filling the +* entire array. +* +* @template T - The type of elements in the original array. +* @template U - The type of the value to fill the array with. +* @param array - The array to fill. +* @param value - The value to fill the array with. +* @param [start=0] - The start position. Defaults to 0. +* @param [end=arr.length] - The end position. Defaults to the array's length. +* @returns The array with the filled values. +* +* @example +* fill([1, 2, 3], 'a'); +* // => ['a', 'a', 'a'] +* +* fill(Array(3), 2); +* // => [2, 2, 2] +* +* fill([4, 6, 8, 10], '*', 1, 3); +* // => [4, '*', '*', 10] +* +* fill([1, 2, 3], '*', -2, -1); +* // => [1, '*', 3] +*/ +function fill(array, value, start = 0, end = array.length) { + const length = array.length; + const finalStart = Math.max(start >= 0 ? start : length + start, 0); + const finalEnd = Math.min(end >= 0 ? end : length + end, length); + for (let i = finalStart; i < finalEnd; i++) array[i] = value; + return array; +} +//#endregion +exports.fill = fill; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/fill.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/fill.mjs new file mode 100644 index 0000000000000000000000000000000000000000..bcfdde68abd4f6086c3792da75c08239ae898a09 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/fill.mjs @@ -0,0 +1,38 @@ +//#region src/array/fill.ts +/** +* Fills elements of an array with a specified value from the start position up to, but not including, the end position. +* +* This function mutates the original array and replaces its elements with the provided value, starting from the specified +* start index up to the end index (non-inclusive). If the start or end indices are not provided, it defaults to filling the +* entire array. +* +* @template T - The type of elements in the original array. +* @template U - The type of the value to fill the array with. +* @param array - The array to fill. +* @param value - The value to fill the array with. +* @param [start=0] - The start position. Defaults to 0. +* @param [end=arr.length] - The end position. Defaults to the array's length. +* @returns The array with the filled values. +* +* @example +* fill([1, 2, 3], 'a'); +* // => ['a', 'a', 'a'] +* +* fill(Array(3), 2); +* // => [2, 2, 2] +* +* fill([4, 6, 8, 10], '*', 1, 3); +* // => [4, '*', '*', 10] +* +* fill([1, 2, 3], '*', -2, -1); +* // => [1, '*', 3] +*/ +function fill(array, value, start = 0, end = array.length) { + const length = array.length; + const finalStart = Math.max(start >= 0 ? start : length + start, 0); + const finalEnd = Math.min(end >= 0 ? end : length + end, length); + for (let i = finalStart; i < finalEnd; i++) array[i] = value; + return array; +} +//#endregion +export { fill }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/filterAsync.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/filterAsync.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..bb271eb86e9dfd73ba2c0c1c9dd31bb50c8e3760 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/filterAsync.d.mts @@ -0,0 +1,36 @@ +//#region src/array/filterAsync.d.ts +interface FilterAsyncOptions { + concurrency?: number; +} +/** + * Filters an array asynchronously using an async predicate function. + * + * Returns a promise that resolves to a new array containing only the elements + * for which the predicate function returns a truthy value. + * + * @template T - The type of elements in the array. + * @param array The array to filter. + * @param predicate An async function that tests each element. + * @param [options] Optional configuration object. + * @param [options.concurrency] Maximum number of concurrent async operations. If not specified, all operations run concurrently. + * @returns A promise that resolves to the filtered array. + * @example + * const users = [{ id: 1, active: true }, { id: 2, active: false }, { id: 3, active: true }]; + * const activeUsers = await filterAsync(users, async (user) => { + * return await checkUserStatus(user.id); + * }); + * // Returns: [{ id: 1, active: true }, { id: 3, active: true }] + * + * @example + * // With concurrency limit + * const numbers = [1, 2, 3, 4, 5]; + * const evenNumbers = await filterAsync( + * numbers, + * async (n) => await isEvenAsync(n), + * { concurrency: 2 } + * ); + * // Processes at most 2 operations concurrently + */ +declare function filterAsync(array: readonly T[], predicate: (item: T, index: number, array: readonly T[]) => Promise, options?: FilterAsyncOptions): Promise; +//#endregion +export { filterAsync }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/filterAsync.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/filterAsync.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..bb271eb86e9dfd73ba2c0c1c9dd31bb50c8e3760 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/filterAsync.d.ts @@ -0,0 +1,36 @@ +//#region src/array/filterAsync.d.ts +interface FilterAsyncOptions { + concurrency?: number; +} +/** + * Filters an array asynchronously using an async predicate function. + * + * Returns a promise that resolves to a new array containing only the elements + * for which the predicate function returns a truthy value. + * + * @template T - The type of elements in the array. + * @param array The array to filter. + * @param predicate An async function that tests each element. + * @param [options] Optional configuration object. + * @param [options.concurrency] Maximum number of concurrent async operations. If not specified, all operations run concurrently. + * @returns A promise that resolves to the filtered array. + * @example + * const users = [{ id: 1, active: true }, { id: 2, active: false }, { id: 3, active: true }]; + * const activeUsers = await filterAsync(users, async (user) => { + * return await checkUserStatus(user.id); + * }); + * // Returns: [{ id: 1, active: true }, { id: 3, active: true }] + * + * @example + * // With concurrency limit + * const numbers = [1, 2, 3, 4, 5]; + * const evenNumbers = await filterAsync( + * numbers, + * async (n) => await isEvenAsync(n), + * { concurrency: 2 } + * ); + * // Processes at most 2 operations concurrently + */ +declare function filterAsync(array: readonly T[], predicate: (item: T, index: number, array: readonly T[]) => Promise, options?: FilterAsyncOptions): Promise; +//#endregion +export { filterAsync }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/filterAsync.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/filterAsync.js new file mode 100644 index 0000000000000000000000000000000000000000..2422e70e0ab267fff7f751f845fe1e7362081066 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/filterAsync.js @@ -0,0 +1,38 @@ +const require_limitAsync = require("../promise/limitAsync.js"); +//#region src/array/filterAsync.ts +/** +* Filters an array asynchronously using an async predicate function. +* +* Returns a promise that resolves to a new array containing only the elements +* for which the predicate function returns a truthy value. +* +* @template T - The type of elements in the array. +* @param array The array to filter. +* @param predicate An async function that tests each element. +* @param [options] Optional configuration object. +* @param [options.concurrency] Maximum number of concurrent async operations. If not specified, all operations run concurrently. +* @returns A promise that resolves to the filtered array. +* @example +* const users = [{ id: 1, active: true }, { id: 2, active: false }, { id: 3, active: true }]; +* const activeUsers = await filterAsync(users, async (user) => { +* return await checkUserStatus(user.id); +* }); +* // Returns: [{ id: 1, active: true }, { id: 3, active: true }] +* +* @example +* // With concurrency limit +* const numbers = [1, 2, 3, 4, 5]; +* const evenNumbers = await filterAsync( +* numbers, +* async (n) => await isEvenAsync(n), +* { concurrency: 2 } +* ); +* // Processes at most 2 operations concurrently +*/ +async function filterAsync(array, predicate, options) { + if (options?.concurrency != null) predicate = require_limitAsync.limitAsync(predicate, options.concurrency); + const results = await Promise.all(array.map(predicate)); + return array.filter((_, index) => results[index]); +} +//#endregion +exports.filterAsync = filterAsync; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/filterAsync.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/filterAsync.mjs new file mode 100644 index 0000000000000000000000000000000000000000..350d68876ff8fa5127a4dc8784814f90d428fa87 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/filterAsync.mjs @@ -0,0 +1,38 @@ +import { limitAsync } from "../promise/limitAsync.mjs"; +//#region src/array/filterAsync.ts +/** +* Filters an array asynchronously using an async predicate function. +* +* Returns a promise that resolves to a new array containing only the elements +* for which the predicate function returns a truthy value. +* +* @template T - The type of elements in the array. +* @param array The array to filter. +* @param predicate An async function that tests each element. +* @param [options] Optional configuration object. +* @param [options.concurrency] Maximum number of concurrent async operations. If not specified, all operations run concurrently. +* @returns A promise that resolves to the filtered array. +* @example +* const users = [{ id: 1, active: true }, { id: 2, active: false }, { id: 3, active: true }]; +* const activeUsers = await filterAsync(users, async (user) => { +* return await checkUserStatus(user.id); +* }); +* // Returns: [{ id: 1, active: true }, { id: 3, active: true }] +* +* @example +* // With concurrency limit +* const numbers = [1, 2, 3, 4, 5]; +* const evenNumbers = await filterAsync( +* numbers, +* async (n) => await isEvenAsync(n), +* { concurrency: 2 } +* ); +* // Processes at most 2 operations concurrently +*/ +async function filterAsync(array, predicate, options) { + if (options?.concurrency != null) predicate = limitAsync(predicate, options.concurrency); + const results = await Promise.all(array.map(predicate)); + return array.filter((_, index) => results[index]); +} +//#endregion +export { filterAsync }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMap.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMap.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..9f79976b13f38e16201dd0d83f8111e21a1cd565 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMap.d.mts @@ -0,0 +1,24 @@ +//#region src/array/flatMap.d.ts +/** + * Maps each element in the array using the iteratee function and flattens the result up to the specified depth. + * + * @template T - The type of elements within the array. + * @template U - The type of elements within the returned array from the iteratee function. + * @template D - The depth to which the array should be flattened. + * @param arr - The array to flatten. + * @param iteratee - The function that produces the new array elements. It receives the element, its index, and the array. + * @param depth - The depth level specifying how deep a nested array structure should be flattened. Defaults to 1. + * @returns The new array with the mapped and flattened elements. + * + * @example + * const arr = [1, 2, 3]; + * + * flatMap(arr, (item: number) => [item, item]); + * // [1, 1, 2, 2, 3, 3] + * + * flatMap(arr, (item: number) => [[item, item]], 2); + * // [1, 1, 2, 2, 3, 3] + */ +declare function flatMap(arr: readonly T[], iteratee: (item: T, index: number, array: readonly T[]) => U, depth?: D): Array>; +//#endregion +export { flatMap }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMap.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMap.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9f79976b13f38e16201dd0d83f8111e21a1cd565 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMap.d.ts @@ -0,0 +1,24 @@ +//#region src/array/flatMap.d.ts +/** + * Maps each element in the array using the iteratee function and flattens the result up to the specified depth. + * + * @template T - The type of elements within the array. + * @template U - The type of elements within the returned array from the iteratee function. + * @template D - The depth to which the array should be flattened. + * @param arr - The array to flatten. + * @param iteratee - The function that produces the new array elements. It receives the element, its index, and the array. + * @param depth - The depth level specifying how deep a nested array structure should be flattened. Defaults to 1. + * @returns The new array with the mapped and flattened elements. + * + * @example + * const arr = [1, 2, 3]; + * + * flatMap(arr, (item: number) => [item, item]); + * // [1, 1, 2, 2, 3, 3] + * + * flatMap(arr, (item: number) => [[item, item]], 2); + * // [1, 1, 2, 2, 3, 3] + */ +declare function flatMap(arr: readonly T[], iteratee: (item: T, index: number, array: readonly T[]) => U, depth?: D): Array>; +//#endregion +export { flatMap }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMap.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMap.js new file mode 100644 index 0000000000000000000000000000000000000000..dbb6a95d9747e8f9a4edaab19a7f38e687b5ec11 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMap.js @@ -0,0 +1,27 @@ +const require_flatten = require("./flatten.js"); +//#region src/array/flatMap.ts +/** +* Maps each element in the array using the iteratee function and flattens the result up to the specified depth. +* +* @template T - The type of elements within the array. +* @template U - The type of elements within the returned array from the iteratee function. +* @template D - The depth to which the array should be flattened. +* @param arr - The array to flatten. +* @param iteratee - The function that produces the new array elements. It receives the element, its index, and the array. +* @param depth - The depth level specifying how deep a nested array structure should be flattened. Defaults to 1. +* @returns The new array with the mapped and flattened elements. +* +* @example +* const arr = [1, 2, 3]; +* +* flatMap(arr, (item: number) => [item, item]); +* // [1, 1, 2, 2, 3, 3] +* +* flatMap(arr, (item: number) => [[item, item]], 2); +* // [1, 1, 2, 2, 3, 3] +*/ +function flatMap(arr, iteratee, depth = 1) { + return require_flatten.flatten(arr.map((item, index) => iteratee(item, index, arr)), depth); +} +//#endregion +exports.flatMap = flatMap; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMap.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMap.mjs new file mode 100644 index 0000000000000000000000000000000000000000..7883a189512f5a7e8516af98880f50f07a52191a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMap.mjs @@ -0,0 +1,27 @@ +import { flatten } from "./flatten.mjs"; +//#region src/array/flatMap.ts +/** +* Maps each element in the array using the iteratee function and flattens the result up to the specified depth. +* +* @template T - The type of elements within the array. +* @template U - The type of elements within the returned array from the iteratee function. +* @template D - The depth to which the array should be flattened. +* @param arr - The array to flatten. +* @param iteratee - The function that produces the new array elements. It receives the element, its index, and the array. +* @param depth - The depth level specifying how deep a nested array structure should be flattened. Defaults to 1. +* @returns The new array with the mapped and flattened elements. +* +* @example +* const arr = [1, 2, 3]; +* +* flatMap(arr, (item: number) => [item, item]); +* // [1, 1, 2, 2, 3, 3] +* +* flatMap(arr, (item: number) => [[item, item]], 2); +* // [1, 1, 2, 2, 3, 3] +*/ +function flatMap(arr, iteratee, depth = 1) { + return flatten(arr.map((item, index) => iteratee(item, index, arr)), depth); +} +//#endregion +export { flatMap }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMapAsync.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMapAsync.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..d9cfae1c7bff1cf42e9e6c73d610f23f5a79c266 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMapAsync.d.mts @@ -0,0 +1,38 @@ +//#region src/array/flatMapAsync.d.ts +interface FlatMapAsyncOptions { + concurrency?: number; +} +/** + * Maps each element in an array using an async callback function and flattens the result by one level. + * + * This is equivalent to calling `mapAsync` followed by `flat(1)`, but more efficient. + * Each callback should return an array, and all returned arrays are concatenated into + * a single output array. + * + * @template T - The type of elements in the input array. + * @template R - The type of elements in the arrays returned by the callback. + * @param array The array to transform. + * @param callback An async function that transforms each element into an array. + * @param [options] Optional configuration object. + * @param [options.concurrency] Maximum number of concurrent async operations. If not specified, all operations run concurrently. + * @returns A promise that resolves to a flattened array of transformed values. + * @example + * const users = [{ id: 1 }, { id: 2 }]; + * const allPosts = await flatMapAsync(users, async (user) => { + * return await fetchUserPosts(user.id); + * }); + * // Returns: [post1, post2, post3, ...] (all posts from all users) + * + * @example + * // With concurrency limit + * const numbers = [1, 2, 3]; + * const results = await flatMapAsync( + * numbers, + * async (n) => await fetchRelatedItems(n), + * { concurrency: 2 } + * ); + * // Processes at most 2 operations concurrently + */ +declare function flatMapAsync(array: readonly T[], callback: (item: T, index: number, array: readonly T[]) => Promise, options?: FlatMapAsyncOptions): Promise; +//#endregion +export { flatMapAsync }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMapAsync.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMapAsync.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d9cfae1c7bff1cf42e9e6c73d610f23f5a79c266 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMapAsync.d.ts @@ -0,0 +1,38 @@ +//#region src/array/flatMapAsync.d.ts +interface FlatMapAsyncOptions { + concurrency?: number; +} +/** + * Maps each element in an array using an async callback function and flattens the result by one level. + * + * This is equivalent to calling `mapAsync` followed by `flat(1)`, but more efficient. + * Each callback should return an array, and all returned arrays are concatenated into + * a single output array. + * + * @template T - The type of elements in the input array. + * @template R - The type of elements in the arrays returned by the callback. + * @param array The array to transform. + * @param callback An async function that transforms each element into an array. + * @param [options] Optional configuration object. + * @param [options.concurrency] Maximum number of concurrent async operations. If not specified, all operations run concurrently. + * @returns A promise that resolves to a flattened array of transformed values. + * @example + * const users = [{ id: 1 }, { id: 2 }]; + * const allPosts = await flatMapAsync(users, async (user) => { + * return await fetchUserPosts(user.id); + * }); + * // Returns: [post1, post2, post3, ...] (all posts from all users) + * + * @example + * // With concurrency limit + * const numbers = [1, 2, 3]; + * const results = await flatMapAsync( + * numbers, + * async (n) => await fetchRelatedItems(n), + * { concurrency: 2 } + * ); + * // Processes at most 2 operations concurrently + */ +declare function flatMapAsync(array: readonly T[], callback: (item: T, index: number, array: readonly T[]) => Promise, options?: FlatMapAsyncOptions): Promise; +//#endregion +export { flatMapAsync }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMapAsync.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMapAsync.js new file mode 100644 index 0000000000000000000000000000000000000000..da737abd972b7592d955ff0d3514f8744202d32e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMapAsync.js @@ -0,0 +1,41 @@ +const require_limitAsync = require("../promise/limitAsync.js"); +const require_flatten = require("./flatten.js"); +//#region src/array/flatMapAsync.ts +/** +* Maps each element in an array using an async callback function and flattens the result by one level. +* +* This is equivalent to calling `mapAsync` followed by `flat(1)`, but more efficient. +* Each callback should return an array, and all returned arrays are concatenated into +* a single output array. +* +* @template T - The type of elements in the input array. +* @template R - The type of elements in the arrays returned by the callback. +* @param array The array to transform. +* @param callback An async function that transforms each element into an array. +* @param [options] Optional configuration object. +* @param [options.concurrency] Maximum number of concurrent async operations. If not specified, all operations run concurrently. +* @returns A promise that resolves to a flattened array of transformed values. +* @example +* const users = [{ id: 1 }, { id: 2 }]; +* const allPosts = await flatMapAsync(users, async (user) => { +* return await fetchUserPosts(user.id); +* }); +* // Returns: [post1, post2, post3, ...] (all posts from all users) +* +* @example +* // With concurrency limit +* const numbers = [1, 2, 3]; +* const results = await flatMapAsync( +* numbers, +* async (n) => await fetchRelatedItems(n), +* { concurrency: 2 } +* ); +* // Processes at most 2 operations concurrently +*/ +async function flatMapAsync(array, callback, options) { + if (options?.concurrency != null) callback = require_limitAsync.limitAsync(callback, options.concurrency); + const results = await Promise.all(array.map(callback)); + return require_flatten.flatten(results); +} +//#endregion +exports.flatMapAsync = flatMapAsync; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMapAsync.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMapAsync.mjs new file mode 100644 index 0000000000000000000000000000000000000000..5422b756f364b48a249f25ee770dba7546fa1c38 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMapAsync.mjs @@ -0,0 +1,40 @@ +import { limitAsync } from "../promise/limitAsync.mjs"; +import { flatten } from "./flatten.mjs"; +//#region src/array/flatMapAsync.ts +/** +* Maps each element in an array using an async callback function and flattens the result by one level. +* +* This is equivalent to calling `mapAsync` followed by `flat(1)`, but more efficient. +* Each callback should return an array, and all returned arrays are concatenated into +* a single output array. +* +* @template T - The type of elements in the input array. +* @template R - The type of elements in the arrays returned by the callback. +* @param array The array to transform. +* @param callback An async function that transforms each element into an array. +* @param [options] Optional configuration object. +* @param [options.concurrency] Maximum number of concurrent async operations. If not specified, all operations run concurrently. +* @returns A promise that resolves to a flattened array of transformed values. +* @example +* const users = [{ id: 1 }, { id: 2 }]; +* const allPosts = await flatMapAsync(users, async (user) => { +* return await fetchUserPosts(user.id); +* }); +* // Returns: [post1, post2, post3, ...] (all posts from all users) +* +* @example +* // With concurrency limit +* const numbers = [1, 2, 3]; +* const results = await flatMapAsync( +* numbers, +* async (n) => await fetchRelatedItems(n), +* { concurrency: 2 } +* ); +* // Processes at most 2 operations concurrently +*/ +async function flatMapAsync(array, callback, options) { + if (options?.concurrency != null) callback = limitAsync(callback, options.concurrency); + return flatten(await Promise.all(array.map(callback))); +} +//#endregion +export { flatMapAsync }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMapDeep.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMapDeep.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..6070b75f1776f5308e9dc011b7479eb4b6cb26b7 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMapDeep.d.mts @@ -0,0 +1,19 @@ +import { ExtractNestedArrayType } from "./flattenDeep.mjs"; + +//#region src/array/flatMapDeep.d.ts +/** + * Recursively maps each element in an array using a provided iteratee function and then deeply flattens the resulting array. + * + * @template T - The type of elements within the array. + * @template U - The type of elements within the returned array from the iteratee function. + * @param arr - The array to flatten. + * @param iteratee - The function that produces the new array elements. It receives the element, its index, and the array. + * @returns A new array that has been flattened. + * + * @example + * const result = flatMapDeep([1, 2, 3], n => [[n, n]]); + * // [1, 1, 2, 2, 3, 3] + */ +declare function flatMapDeep(arr: readonly T[], iteratee: (item: T, index: number, array: readonly T[]) => U): Array>; +//#endregion +export { flatMapDeep }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMapDeep.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMapDeep.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c16e3b2605cef1aee02a00ac8de59534dd499f0d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMapDeep.d.ts @@ -0,0 +1,19 @@ +import { ExtractNestedArrayType } from "./flattenDeep.js"; + +//#region src/array/flatMapDeep.d.ts +/** + * Recursively maps each element in an array using a provided iteratee function and then deeply flattens the resulting array. + * + * @template T - The type of elements within the array. + * @template U - The type of elements within the returned array from the iteratee function. + * @param arr - The array to flatten. + * @param iteratee - The function that produces the new array elements. It receives the element, its index, and the array. + * @returns A new array that has been flattened. + * + * @example + * const result = flatMapDeep([1, 2, 3], n => [[n, n]]); + * // [1, 1, 2, 2, 3, 3] + */ +declare function flatMapDeep(arr: readonly T[], iteratee: (item: T, index: number, array: readonly T[]) => U): Array>; +//#endregion +export { flatMapDeep }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMapDeep.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMapDeep.js new file mode 100644 index 0000000000000000000000000000000000000000..7399386029c1df3358a09aab3eef2d8bc53415de --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMapDeep.js @@ -0,0 +1,20 @@ +const require_flattenDeep = require("./flattenDeep.js"); +//#region src/array/flatMapDeep.ts +/** +* Recursively maps each element in an array using a provided iteratee function and then deeply flattens the resulting array. +* +* @template T - The type of elements within the array. +* @template U - The type of elements within the returned array from the iteratee function. +* @param arr - The array to flatten. +* @param iteratee - The function that produces the new array elements. It receives the element, its index, and the array. +* @returns A new array that has been flattened. +* +* @example +* const result = flatMapDeep([1, 2, 3], n => [[n, n]]); +* // [1, 1, 2, 2, 3, 3] +*/ +function flatMapDeep(arr, iteratee) { + return require_flattenDeep.flattenDeep(arr.map((item, index) => iteratee(item, index, arr))); +} +//#endregion +exports.flatMapDeep = flatMapDeep; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMapDeep.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMapDeep.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e992ded6960808353dbfc2aca163a2352607c84f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatMapDeep.mjs @@ -0,0 +1,20 @@ +import { flattenDeep } from "./flattenDeep.mjs"; +//#region src/array/flatMapDeep.ts +/** +* Recursively maps each element in an array using a provided iteratee function and then deeply flattens the resulting array. +* +* @template T - The type of elements within the array. +* @template U - The type of elements within the returned array from the iteratee function. +* @param arr - The array to flatten. +* @param iteratee - The function that produces the new array elements. It receives the element, its index, and the array. +* @returns A new array that has been flattened. +* +* @example +* const result = flatMapDeep([1, 2, 3], n => [[n, n]]); +* // [1, 1, 2, 2, 3, 3] +*/ +function flatMapDeep(arr, iteratee) { + return flattenDeep(arr.map((item, index) => iteratee(item, index, arr))); +} +//#endregion +export { flatMapDeep }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatten.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatten.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..c635ec8fbbcce6af1843df198f6db3377a8cff2b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatten.d.mts @@ -0,0 +1,20 @@ +//#region src/array/flatten.d.ts +/** + * Flattens an array up to the specified depth. + * + * @template T - The type of elements within the array. + * @template D - The depth to which the array should be flattened. + * @param arr - The array to flatten. + * @param depth - The depth level specifying how deep a nested array structure should be flattened. Defaults to 1. + * @returns A new array that has been flattened. + * + * @example + * const arr = flatten([1, [2, 3], [4, [5, 6]]], 1); + * // Returns: [1, 2, 3, 4, [5, 6]] + * + * const arr = flatten([1, [2, 3], [4, [5, 6]]], 2); + * // Returns: [1, 2, 3, 4, 5, 6] + */ +declare function flatten(arr: readonly T[], depth?: D): Array>; +//#endregion +export { flatten }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatten.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatten.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c635ec8fbbcce6af1843df198f6db3377a8cff2b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatten.d.ts @@ -0,0 +1,20 @@ +//#region src/array/flatten.d.ts +/** + * Flattens an array up to the specified depth. + * + * @template T - The type of elements within the array. + * @template D - The depth to which the array should be flattened. + * @param arr - The array to flatten. + * @param depth - The depth level specifying how deep a nested array structure should be flattened. Defaults to 1. + * @returns A new array that has been flattened. + * + * @example + * const arr = flatten([1, [2, 3], [4, [5, 6]]], 1); + * // Returns: [1, 2, 3, 4, [5, 6]] + * + * const arr = flatten([1, [2, 3], [4, [5, 6]]], 2); + * // Returns: [1, 2, 3, 4, 5, 6] + */ +declare function flatten(arr: readonly T[], depth?: D): Array>; +//#endregion +export { flatten }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatten.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatten.js new file mode 100644 index 0000000000000000000000000000000000000000..d021ecfe35e980ce1f20073ddbabac8e1ebe495f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatten.js @@ -0,0 +1,32 @@ +//#region src/array/flatten.ts +/** +* Flattens an array up to the specified depth. +* +* @template T - The type of elements within the array. +* @template D - The depth to which the array should be flattened. +* @param arr - The array to flatten. +* @param depth - The depth level specifying how deep a nested array structure should be flattened. Defaults to 1. +* @returns A new array that has been flattened. +* +* @example +* const arr = flatten([1, [2, 3], [4, [5, 6]]], 1); +* // Returns: [1, 2, 3, 4, [5, 6]] +* +* const arr = flatten([1, [2, 3], [4, [5, 6]]], 2); +* // Returns: [1, 2, 3, 4, 5, 6] +*/ +function flatten(arr, depth = 1) { + const result = []; + const flooredDepth = Math.floor(depth); + const recursive = (arr, currentDepth) => { + for (let i = 0; i < arr.length; i++) { + const item = arr[i]; + if (Array.isArray(item) && currentDepth < flooredDepth) recursive(item, currentDepth + 1); + else result.push(item); + } + }; + recursive(arr, 0); + return result; +} +//#endregion +exports.flatten = flatten; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatten.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatten.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b04d677fc1172a7420dd9d5d747cff90bac1a995 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flatten.mjs @@ -0,0 +1,32 @@ +//#region src/array/flatten.ts +/** +* Flattens an array up to the specified depth. +* +* @template T - The type of elements within the array. +* @template D - The depth to which the array should be flattened. +* @param arr - The array to flatten. +* @param depth - The depth level specifying how deep a nested array structure should be flattened. Defaults to 1. +* @returns A new array that has been flattened. +* +* @example +* const arr = flatten([1, [2, 3], [4, [5, 6]]], 1); +* // Returns: [1, 2, 3, 4, [5, 6]] +* +* const arr = flatten([1, [2, 3], [4, [5, 6]]], 2); +* // Returns: [1, 2, 3, 4, 5, 6] +*/ +function flatten(arr, depth = 1) { + const result = []; + const flooredDepth = Math.floor(depth); + const recursive = (arr, currentDepth) => { + for (let i = 0; i < arr.length; i++) { + const item = arr[i]; + if (Array.isArray(item) && currentDepth < flooredDepth) recursive(item, currentDepth + 1); + else result.push(item); + } + }; + recursive(arr, 0); + return result; +} +//#endregion +export { flatten }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flattenDeep.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flattenDeep.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..910c7dd3f5341d66c6282456a38689951a10bb5e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flattenDeep.d.mts @@ -0,0 +1,26 @@ +//#region src/array/flattenDeep.d.ts +/** + * Utility type for recursively unpacking nested array types to extract the type of the innermost element + * + * @example + * ExtractNestedArrayType<(number | (number | number[])[])[]> + * // number + * + * ExtractNestedArrayType<(boolean | (string | number[])[])[]> + * // string | number | boolean + */ +type ExtractNestedArrayType = T extends ReadonlyArray ? ExtractNestedArrayType : T; +/** + * Flattens all depths of a nested array. + * + * @template T - The type of elements within the array. + * @param arr - The array to flatten. + * @returns A new array that has been flattened. + * + * @example + * const arr = flattenDeep([1, [2, [3]], [4, [5, 6]]]); + * // Returns: [1, 2, 3, 4, 5, 6] + */ +declare function flattenDeep(arr: readonly T[]): Array>; +//#endregion +export { ExtractNestedArrayType, flattenDeep }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flattenDeep.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flattenDeep.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..910c7dd3f5341d66c6282456a38689951a10bb5e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flattenDeep.d.ts @@ -0,0 +1,26 @@ +//#region src/array/flattenDeep.d.ts +/** + * Utility type for recursively unpacking nested array types to extract the type of the innermost element + * + * @example + * ExtractNestedArrayType<(number | (number | number[])[])[]> + * // number + * + * ExtractNestedArrayType<(boolean | (string | number[])[])[]> + * // string | number | boolean + */ +type ExtractNestedArrayType = T extends ReadonlyArray ? ExtractNestedArrayType : T; +/** + * Flattens all depths of a nested array. + * + * @template T - The type of elements within the array. + * @param arr - The array to flatten. + * @returns A new array that has been flattened. + * + * @example + * const arr = flattenDeep([1, [2, [3]], [4, [5, 6]]]); + * // Returns: [1, 2, 3, 4, 5, 6] + */ +declare function flattenDeep(arr: readonly T[]): Array>; +//#endregion +export { ExtractNestedArrayType, flattenDeep }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flattenDeep.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flattenDeep.js new file mode 100644 index 0000000000000000000000000000000000000000..eced8174004135d57f398acec2f712723728963a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flattenDeep.js @@ -0,0 +1,18 @@ +const require_flatten = require("./flatten.js"); +//#region src/array/flattenDeep.ts +/** +* Flattens all depths of a nested array. +* +* @template T - The type of elements within the array. +* @param arr - The array to flatten. +* @returns A new array that has been flattened. +* +* @example +* const arr = flattenDeep([1, [2, [3]], [4, [5, 6]]]); +* // Returns: [1, 2, 3, 4, 5, 6] +*/ +function flattenDeep(arr) { + return require_flatten.flatten(arr, Infinity); +} +//#endregion +exports.flattenDeep = flattenDeep; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flattenDeep.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flattenDeep.mjs new file mode 100644 index 0000000000000000000000000000000000000000..bf719e421a7124756660dacb9ddb14f094e3ac75 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/flattenDeep.mjs @@ -0,0 +1,18 @@ +import { flatten } from "./flatten.mjs"; +//#region src/array/flattenDeep.ts +/** +* Flattens all depths of a nested array. +* +* @template T - The type of elements within the array. +* @param arr - The array to flatten. +* @returns A new array that has been flattened. +* +* @example +* const arr = flattenDeep([1, [2, [3]], [4, [5, 6]]]); +* // Returns: [1, 2, 3, 4, 5, 6] +*/ +function flattenDeep(arr) { + return flatten(arr, Infinity); +} +//#endregion +export { flattenDeep }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/forEachAsync.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/forEachAsync.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..e1f1d3e3504d4decf547a0d270dfeac59fccfe12 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/forEachAsync.d.mts @@ -0,0 +1,36 @@ +//#region src/array/forEachAsync.d.ts +interface ForEachAsyncOptions { + concurrency?: number; +} +/** + * Executes an async callback function for each element in an array. + * + * Unlike the native `forEach`, this function returns a promise that resolves + * when all async operations complete. It supports optional concurrency limiting. + * + * @template T - The type of elements in the array. + * @param array The array to iterate over. + * @param callback An async function to execute for each element. + * @param [options] Optional configuration object. + * @param [options.concurrency] Maximum number of concurrent async operations. If not specified, all operations run concurrently. + * @returns A promise that resolves when all operations complete. + * @example + * const users = [{ id: 1 }, { id: 2 }, { id: 3 }]; + * await forEachAsync(users, async (user) => { + * await updateUser(user.id); + * }); + * // All users have been updated + * + * @example + * // With concurrency limit + * const items = [1, 2, 3, 4, 5]; + * await forEachAsync( + * items, + * async (item) => await processItem(item), + * { concurrency: 2 } + * ); + * // Processes at most 2 items concurrently + */ +declare function forEachAsync(array: readonly T[], callback: (item: T, index: number, array: readonly T[]) => Promise, options?: ForEachAsyncOptions): Promise; +//#endregion +export { forEachAsync }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/forEachAsync.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/forEachAsync.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e1f1d3e3504d4decf547a0d270dfeac59fccfe12 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/forEachAsync.d.ts @@ -0,0 +1,36 @@ +//#region src/array/forEachAsync.d.ts +interface ForEachAsyncOptions { + concurrency?: number; +} +/** + * Executes an async callback function for each element in an array. + * + * Unlike the native `forEach`, this function returns a promise that resolves + * when all async operations complete. It supports optional concurrency limiting. + * + * @template T - The type of elements in the array. + * @param array The array to iterate over. + * @param callback An async function to execute for each element. + * @param [options] Optional configuration object. + * @param [options.concurrency] Maximum number of concurrent async operations. If not specified, all operations run concurrently. + * @returns A promise that resolves when all operations complete. + * @example + * const users = [{ id: 1 }, { id: 2 }, { id: 3 }]; + * await forEachAsync(users, async (user) => { + * await updateUser(user.id); + * }); + * // All users have been updated + * + * @example + * // With concurrency limit + * const items = [1, 2, 3, 4, 5]; + * await forEachAsync( + * items, + * async (item) => await processItem(item), + * { concurrency: 2 } + * ); + * // Processes at most 2 items concurrently + */ +declare function forEachAsync(array: readonly T[], callback: (item: T, index: number, array: readonly T[]) => Promise, options?: ForEachAsyncOptions): Promise; +//#endregion +export { forEachAsync }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/forEachAsync.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/forEachAsync.js new file mode 100644 index 0000000000000000000000000000000000000000..ae6db818b428a9468b73f1d1403c0ae7cb16e3f1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/forEachAsync.js @@ -0,0 +1,37 @@ +const require_limitAsync = require("../promise/limitAsync.js"); +//#region src/array/forEachAsync.ts +/** +* Executes an async callback function for each element in an array. +* +* Unlike the native `forEach`, this function returns a promise that resolves +* when all async operations complete. It supports optional concurrency limiting. +* +* @template T - The type of elements in the array. +* @param array The array to iterate over. +* @param callback An async function to execute for each element. +* @param [options] Optional configuration object. +* @param [options.concurrency] Maximum number of concurrent async operations. If not specified, all operations run concurrently. +* @returns A promise that resolves when all operations complete. +* @example +* const users = [{ id: 1 }, { id: 2 }, { id: 3 }]; +* await forEachAsync(users, async (user) => { +* await updateUser(user.id); +* }); +* // All users have been updated +* +* @example +* // With concurrency limit +* const items = [1, 2, 3, 4, 5]; +* await forEachAsync( +* items, +* async (item) => await processItem(item), +* { concurrency: 2 } +* ); +* // Processes at most 2 items concurrently +*/ +async function forEachAsync(array, callback, options) { + if (options?.concurrency != null) callback = require_limitAsync.limitAsync(callback, options.concurrency); + await Promise.all(array.map(callback)); +} +//#endregion +exports.forEachAsync = forEachAsync; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/forEachAsync.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/forEachAsync.mjs new file mode 100644 index 0000000000000000000000000000000000000000..28ef9cf6e44a92ba73c10edc269fdb23fef8549f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/forEachAsync.mjs @@ -0,0 +1,37 @@ +import { limitAsync } from "../promise/limitAsync.mjs"; +//#region src/array/forEachAsync.ts +/** +* Executes an async callback function for each element in an array. +* +* Unlike the native `forEach`, this function returns a promise that resolves +* when all async operations complete. It supports optional concurrency limiting. +* +* @template T - The type of elements in the array. +* @param array The array to iterate over. +* @param callback An async function to execute for each element. +* @param [options] Optional configuration object. +* @param [options.concurrency] Maximum number of concurrent async operations. If not specified, all operations run concurrently. +* @returns A promise that resolves when all operations complete. +* @example +* const users = [{ id: 1 }, { id: 2 }, { id: 3 }]; +* await forEachAsync(users, async (user) => { +* await updateUser(user.id); +* }); +* // All users have been updated +* +* @example +* // With concurrency limit +* const items = [1, 2, 3, 4, 5]; +* await forEachAsync( +* items, +* async (item) => await processItem(item), +* { concurrency: 2 } +* ); +* // Processes at most 2 items concurrently +*/ +async function forEachAsync(array, callback, options) { + if (options?.concurrency != null) callback = limitAsync(callback, options.concurrency); + await Promise.all(array.map(callback)); +} +//#endregion +export { forEachAsync }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/forEachRight.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/forEachRight.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..dc3dec4cd859cb1aed0131000b529dc563e12552 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/forEachRight.d.mts @@ -0,0 +1,49 @@ +//#region src/array/forEachRight.d.ts +/** + * Iterates over elements of 'arr' from right to left and invokes 'callback' for each element. + * + * @template T - The type of elements in the array. + * @param arr - The array to iterate over. + * @param callback - The function invoked per iteration. + * The callback function receives three arguments: + * - 'value': The current element being processed in the array. + * - 'index': The index of the current element being processed in the array. + * - 'arr': The array 'forEachRight' was called upon. + * + * @example + * const array = [1, 2, 3]; + * const result: number[] = []; + * + * // Use the forEachRight function to iterate through the array and add each element to the result array. + * forEachRight(array, (value) => { + * result.push(value); + * }) + * + * console.log(result) // Output: [3, 2, 1] + */ +declare function forEachRight(arr: T[], callback: (value: T, index: number, arr: T[]) => void): void; +/** + * Iterates over elements of 'arr' from right to left and invokes 'callback' for each element. + * + * @template T - The type of elements in the array. + * @param arr - The array to iterate over. + * @param callback - The function invoked per iteration. + * The callback function receives three arguments: + * - 'value': The current element being processed in the array. + * - 'index': The index of the current element being processed in the array. + * - 'arr': The array 'forEachRight' was called upon. + * + * @example + * const array = [1, 2, 3]; + * const result: number[] = []; + * + * // Use the forEachRight function to iterate through the array and add each element to the result array. + * forEachRight(array, (value) => { + * result.push(value); + * }) + * + * console.log(result) // Output: [3, 2, 1] + */ +declare function forEachRight(arr: readonly T[], callback: (value: T, index: number, arr: readonly T[]) => void): void; +//#endregion +export { forEachRight }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/forEachRight.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/forEachRight.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..dc3dec4cd859cb1aed0131000b529dc563e12552 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/forEachRight.d.ts @@ -0,0 +1,49 @@ +//#region src/array/forEachRight.d.ts +/** + * Iterates over elements of 'arr' from right to left and invokes 'callback' for each element. + * + * @template T - The type of elements in the array. + * @param arr - The array to iterate over. + * @param callback - The function invoked per iteration. + * The callback function receives three arguments: + * - 'value': The current element being processed in the array. + * - 'index': The index of the current element being processed in the array. + * - 'arr': The array 'forEachRight' was called upon. + * + * @example + * const array = [1, 2, 3]; + * const result: number[] = []; + * + * // Use the forEachRight function to iterate through the array and add each element to the result array. + * forEachRight(array, (value) => { + * result.push(value); + * }) + * + * console.log(result) // Output: [3, 2, 1] + */ +declare function forEachRight(arr: T[], callback: (value: T, index: number, arr: T[]) => void): void; +/** + * Iterates over elements of 'arr' from right to left and invokes 'callback' for each element. + * + * @template T - The type of elements in the array. + * @param arr - The array to iterate over. + * @param callback - The function invoked per iteration. + * The callback function receives three arguments: + * - 'value': The current element being processed in the array. + * - 'index': The index of the current element being processed in the array. + * - 'arr': The array 'forEachRight' was called upon. + * + * @example + * const array = [1, 2, 3]; + * const result: number[] = []; + * + * // Use the forEachRight function to iterate through the array and add each element to the result array. + * forEachRight(array, (value) => { + * result.push(value); + * }) + * + * console.log(result) // Output: [3, 2, 1] + */ +declare function forEachRight(arr: readonly T[], callback: (value: T, index: number, arr: readonly T[]) => void): void; +//#endregion +export { forEachRight }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/forEachRight.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/forEachRight.js new file mode 100644 index 0000000000000000000000000000000000000000..152de4768b3542755b160f0276bc4d62fd368a12 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/forEachRight.js @@ -0,0 +1,31 @@ +//#region src/array/forEachRight.ts +/** +* Iterates over elements of 'arr' from right to left and invokes 'callback' for each element. +* +* @template T - The type of elements in the array. +* @param arr - The array to iterate over. +* @param callback - The function invoked per iteration. +* The callback function receives three arguments: +* - 'value': The current element being processed in the array. +* - 'index': The index of the current element being processed in the array. +* - 'arr': The array 'forEachRight' was called upon. +* +* @example +* const array = [1, 2, 3]; +* const result: number[] = []; +* +* // Use the forEachRight function to iterate through the array and add each element to the result array. +* forEachRight(array, (value) => { +* result.push(value); +* }) +* +* console.log(result) // Output: [3, 2, 1] +*/ +function forEachRight(arr, callback) { + for (let i = arr.length - 1; i >= 0; i--) { + const element = arr[i]; + callback(element, i, arr); + } +} +//#endregion +exports.forEachRight = forEachRight; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/forEachRight.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/forEachRight.mjs new file mode 100644 index 0000000000000000000000000000000000000000..346e9133a5c8e68bdb1663fadb8f8a86606bd623 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/forEachRight.mjs @@ -0,0 +1,31 @@ +//#region src/array/forEachRight.ts +/** +* Iterates over elements of 'arr' from right to left and invokes 'callback' for each element. +* +* @template T - The type of elements in the array. +* @param arr - The array to iterate over. +* @param callback - The function invoked per iteration. +* The callback function receives three arguments: +* - 'value': The current element being processed in the array. +* - 'index': The index of the current element being processed in the array. +* - 'arr': The array 'forEachRight' was called upon. +* +* @example +* const array = [1, 2, 3]; +* const result: number[] = []; +* +* // Use the forEachRight function to iterate through the array and add each element to the result array. +* forEachRight(array, (value) => { +* result.push(value); +* }) +* +* console.log(result) // Output: [3, 2, 1] +*/ +function forEachRight(arr, callback) { + for (let i = arr.length - 1; i >= 0; i--) { + const element = arr[i]; + callback(element, i, arr); + } +} +//#endregion +export { forEachRight }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/groupBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/groupBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..ba3da7bbc3b1fed01ebf8f749f5b305d5c7688d2 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/groupBy.d.mts @@ -0,0 +1,42 @@ +//#region src/array/groupBy.d.ts +/** + * Groups the elements of an array based on a provided key-generating function. + * + * This function takes an array and a function that generates a key from each element. It returns + * an object where the keys are the generated keys and the values are arrays of elements that share + * the same key. + * + * @template T - The type of elements in the array. + * @template K - The type of keys. + * @param arr - The array to group. + * @param getKeyFromItem - A function that generates a key from an element, its index, and the array. + * @returns An object where each key is associated with an array of elements that + * share that key. + * + * @example + * const array = [ + * { category: 'fruit', name: 'apple' }, + * { category: 'fruit', name: 'banana' }, + * { category: 'vegetable', name: 'carrot' } + * ]; + * const result = groupBy(array, item => item.category); + * // result will be: + * // { + * // fruit: [ + * // { category: 'fruit', name: 'apple' }, + * // { category: 'fruit', name: 'banana' } + * // ], + * // vegetable: [ + * // { category: 'vegetable', name: 'carrot' } + * // ] + * // } + * + * @example + * // Using index parameter + * const items = ['a', 'b', 'c', 'd']; + * const result = groupBy(items, (item, index) => index % 2 === 0 ? 'even' : 'odd'); + * // result will be: { even: ['a', 'c'], odd: ['b', 'd'] } + */ +declare function groupBy(arr: readonly T[], getKeyFromItem: (item: T, index: number, array: readonly T[]) => K): Record; +//#endregion +export { groupBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/groupBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/groupBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ba3da7bbc3b1fed01ebf8f749f5b305d5c7688d2 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/groupBy.d.ts @@ -0,0 +1,42 @@ +//#region src/array/groupBy.d.ts +/** + * Groups the elements of an array based on a provided key-generating function. + * + * This function takes an array and a function that generates a key from each element. It returns + * an object where the keys are the generated keys and the values are arrays of elements that share + * the same key. + * + * @template T - The type of elements in the array. + * @template K - The type of keys. + * @param arr - The array to group. + * @param getKeyFromItem - A function that generates a key from an element, its index, and the array. + * @returns An object where each key is associated with an array of elements that + * share that key. + * + * @example + * const array = [ + * { category: 'fruit', name: 'apple' }, + * { category: 'fruit', name: 'banana' }, + * { category: 'vegetable', name: 'carrot' } + * ]; + * const result = groupBy(array, item => item.category); + * // result will be: + * // { + * // fruit: [ + * // { category: 'fruit', name: 'apple' }, + * // { category: 'fruit', name: 'banana' } + * // ], + * // vegetable: [ + * // { category: 'vegetable', name: 'carrot' } + * // ] + * // } + * + * @example + * // Using index parameter + * const items = ['a', 'b', 'c', 'd']; + * const result = groupBy(items, (item, index) => index % 2 === 0 ? 'even' : 'odd'); + * // result will be: { even: ['a', 'c'], odd: ['b', 'd'] } + */ +declare function groupBy(arr: readonly T[], getKeyFromItem: (item: T, index: number, array: readonly T[]) => K): Record; +//#endregion +export { groupBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/groupBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/groupBy.js new file mode 100644 index 0000000000000000000000000000000000000000..3d2824c7348fdbf51eb7986013f40f63bb3b754a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/groupBy.js @@ -0,0 +1,51 @@ +//#region src/array/groupBy.ts +/** +* Groups the elements of an array based on a provided key-generating function. +* +* This function takes an array and a function that generates a key from each element. It returns +* an object where the keys are the generated keys and the values are arrays of elements that share +* the same key. +* +* @template T - The type of elements in the array. +* @template K - The type of keys. +* @param arr - The array to group. +* @param getKeyFromItem - A function that generates a key from an element, its index, and the array. +* @returns An object where each key is associated with an array of elements that +* share that key. +* +* @example +* const array = [ +* { category: 'fruit', name: 'apple' }, +* { category: 'fruit', name: 'banana' }, +* { category: 'vegetable', name: 'carrot' } +* ]; +* const result = groupBy(array, item => item.category); +* // result will be: +* // { +* // fruit: [ +* // { category: 'fruit', name: 'apple' }, +* // { category: 'fruit', name: 'banana' } +* // ], +* // vegetable: [ +* // { category: 'vegetable', name: 'carrot' } +* // ] +* // } +* +* @example +* // Using index parameter +* const items = ['a', 'b', 'c', 'd']; +* const result = groupBy(items, (item, index) => index % 2 === 0 ? 'even' : 'odd'); +* // result will be: { even: ['a', 'c'], odd: ['b', 'd'] } +*/ +function groupBy(arr, getKeyFromItem) { + const result = {}; + for (let i = 0; i < arr.length; i++) { + const item = arr[i]; + const key = getKeyFromItem(item, i, arr); + if (!Object.hasOwn(result, key)) result[key] = []; + result[key].push(item); + } + return result; +} +//#endregion +exports.groupBy = groupBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/groupBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/groupBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e6eb803b97aab44c23bed46543805c6469d11a64 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/groupBy.mjs @@ -0,0 +1,51 @@ +//#region src/array/groupBy.ts +/** +* Groups the elements of an array based on a provided key-generating function. +* +* This function takes an array and a function that generates a key from each element. It returns +* an object where the keys are the generated keys and the values are arrays of elements that share +* the same key. +* +* @template T - The type of elements in the array. +* @template K - The type of keys. +* @param arr - The array to group. +* @param getKeyFromItem - A function that generates a key from an element, its index, and the array. +* @returns An object where each key is associated with an array of elements that +* share that key. +* +* @example +* const array = [ +* { category: 'fruit', name: 'apple' }, +* { category: 'fruit', name: 'banana' }, +* { category: 'vegetable', name: 'carrot' } +* ]; +* const result = groupBy(array, item => item.category); +* // result will be: +* // { +* // fruit: [ +* // { category: 'fruit', name: 'apple' }, +* // { category: 'fruit', name: 'banana' } +* // ], +* // vegetable: [ +* // { category: 'vegetable', name: 'carrot' } +* // ] +* // } +* +* @example +* // Using index parameter +* const items = ['a', 'b', 'c', 'd']; +* const result = groupBy(items, (item, index) => index % 2 === 0 ? 'even' : 'odd'); +* // result will be: { even: ['a', 'c'], odd: ['b', 'd'] } +*/ +function groupBy(arr, getKeyFromItem) { + const result = {}; + for (let i = 0; i < arr.length; i++) { + const item = arr[i]; + const key = getKeyFromItem(item, i, arr); + if (!Object.hasOwn(result, key)) result[key] = []; + result[key].push(item); + } + return result; +} +//#endregion +export { groupBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/head.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/head.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..3e2dd450c438af746b6ecc1266fc64d597ed2d04 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/head.d.mts @@ -0,0 +1,35 @@ +//#region src/array/head.d.ts +/** + * Returns the first element of an array. + * + * This function takes an array and returns the first element of the array. + * If the array is empty, the function returns `undefined`. + * + * @template T - The type of elements in the array. + * @param arr - A non-empty array from which to get the first element. + * @returns The first element of the array. + * + * @example + * const arr = [1, 2, 3]; + * const firstElement = head(arr); + * // firstElement will be 1 + */ +declare function head(arr: readonly [T, ...T[]]): T; +/** + * Returns the first element of an array or `undefined` if the array is empty. + * + * This function takes an array and returns the first element of the array. + * If the array is empty, the function returns `undefined`. + * + * @template T - The type of elements in the array. + * @param arr - The array from which to get the first element. + * @returns The first element of the array, or `undefined` if the array is empty. + * + * @example + * const emptyArr: number[] = []; + * const noElement = head(emptyArr); + * // noElement will be undefined + */ +declare function head(arr: readonly T[]): T | undefined; +//#endregion +export { head }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/head.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/head.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3e2dd450c438af746b6ecc1266fc64d597ed2d04 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/head.d.ts @@ -0,0 +1,35 @@ +//#region src/array/head.d.ts +/** + * Returns the first element of an array. + * + * This function takes an array and returns the first element of the array. + * If the array is empty, the function returns `undefined`. + * + * @template T - The type of elements in the array. + * @param arr - A non-empty array from which to get the first element. + * @returns The first element of the array. + * + * @example + * const arr = [1, 2, 3]; + * const firstElement = head(arr); + * // firstElement will be 1 + */ +declare function head(arr: readonly [T, ...T[]]): T; +/** + * Returns the first element of an array or `undefined` if the array is empty. + * + * This function takes an array and returns the first element of the array. + * If the array is empty, the function returns `undefined`. + * + * @template T - The type of elements in the array. + * @param arr - The array from which to get the first element. + * @returns The first element of the array, or `undefined` if the array is empty. + * + * @example + * const emptyArr: number[] = []; + * const noElement = head(emptyArr); + * // noElement will be undefined + */ +declare function head(arr: readonly T[]): T | undefined; +//#endregion +export { head }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/head.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/head.js new file mode 100644 index 0000000000000000000000000000000000000000..e1765ab9d51592a9b915fa989ebc1b8eca497895 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/head.js @@ -0,0 +1,21 @@ +//#region src/array/head.ts +/** +* Returns the first element of an array or `undefined` if the array is empty. +* +* This function takes an array and returns the first element of the array. +* If the array is empty, the function returns `undefined`. +* +* @template T - The type of elements in the array. +* @param arr - The array from which to get the first element. +* @returns The first element of the array, or `undefined` if the array is empty. +* +* @example +* const emptyArr: number[] = []; +* const noElement = head(emptyArr); +* // noElement will be undefined +*/ +function head(arr) { + return arr[0]; +} +//#endregion +exports.head = head; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/head.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/head.mjs new file mode 100644 index 0000000000000000000000000000000000000000..cfad4f828b963a36d73b148d4c582cb18b6f1f4c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/head.mjs @@ -0,0 +1,21 @@ +//#region src/array/head.ts +/** +* Returns the first element of an array or `undefined` if the array is empty. +* +* This function takes an array and returns the first element of the array. +* If the array is empty, the function returns `undefined`. +* +* @template T - The type of elements in the array. +* @param arr - The array from which to get the first element. +* @returns The first element of the array, or `undefined` if the array is empty. +* +* @example +* const emptyArr: number[] = []; +* const noElement = head(emptyArr); +* // noElement will be undefined +*/ +function head(arr) { + return arr[0]; +} +//#endregion +export { head }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/index.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..c99086e18e2f2b423b1deca9ee0df5bf6339fc1e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/index.d.mts @@ -0,0 +1,70 @@ +import { at } from "./at.mjs"; +import { cartesianProduct } from "./cartesianProduct.mjs"; +import { chunk } from "./chunk.mjs"; +import { chunkBy } from "./chunkBy.mjs"; +import { combinations } from "./combinations.mjs"; +import { compact } from "./compact.mjs"; +import { countBy } from "./countBy.mjs"; +import { difference } from "./difference.mjs"; +import { differenceBy } from "./differenceBy.mjs"; +import { differenceWith } from "./differenceWith.mjs"; +import { drop } from "./drop.mjs"; +import { dropRight } from "./dropRight.mjs"; +import { dropRightWhile } from "./dropRightWhile.mjs"; +import { dropWhile } from "./dropWhile.mjs"; +import { fill } from "./fill.mjs"; +import { filterAsync } from "./filterAsync.mjs"; +import { flatMap } from "./flatMap.mjs"; +import { flatMapAsync } from "./flatMapAsync.mjs"; +import { flattenDeep } from "./flattenDeep.mjs"; +import { flatMapDeep } from "./flatMapDeep.mjs"; +import { flatten } from "./flatten.mjs"; +import { forEachAsync } from "./forEachAsync.mjs"; +import { forEachRight } from "./forEachRight.mjs"; +import { groupBy } from "./groupBy.mjs"; +import { head } from "./head.mjs"; +import { initial } from "./initial.mjs"; +import { intersection } from "./intersection.mjs"; +import { intersectionBy } from "./intersectionBy.mjs"; +import { intersectionWith } from "./intersectionWith.mjs"; +import { isSubset } from "./isSubset.mjs"; +import { isSubsetWith } from "./isSubsetWith.mjs"; +import { keyBy } from "./keyBy.mjs"; +import { last } from "./last.mjs"; +import { limitAsync } from "./limitAsync.mjs"; +import { mapAsync } from "./mapAsync.mjs"; +import { maxBy } from "./maxBy.mjs"; +import { minBy } from "./minBy.mjs"; +import { orderBy } from "./orderBy.mjs"; +import { partition } from "./partition.mjs"; +import { pull } from "./pull.mjs"; +import { pullAt } from "./pullAt.mjs"; +import { reduceAsync } from "./reduceAsync.mjs"; +import { remove } from "./remove.mjs"; +import { sample } from "./sample.mjs"; +import { sampleSize } from "./sampleSize.mjs"; +import { shuffle } from "./shuffle.mjs"; +import { sortBy } from "./sortBy.mjs"; +import { tail } from "./tail.mjs"; +import { take } from "./take.mjs"; +import { takeRight } from "./takeRight.mjs"; +import { takeRightWhile } from "./takeRightWhile.mjs"; +import { takeWhile } from "./takeWhile.mjs"; +import { toFilled } from "./toFilled.mjs"; +import { union } from "./union.mjs"; +import { unionBy } from "./unionBy.mjs"; +import { unionWith } from "./unionWith.mjs"; +import { uniq } from "./uniq.mjs"; +import { uniqBy } from "./uniqBy.mjs"; +import { uniqWith } from "./uniqWith.mjs"; +import { unzip } from "./unzip.mjs"; +import { unzipWith } from "./unzipWith.mjs"; +import { windowed } from "./windowed.mjs"; +import { without } from "./without.mjs"; +import { xor } from "./xor.mjs"; +import { xorBy } from "./xorBy.mjs"; +import { xorWith } from "./xorWith.mjs"; +import { zip } from "./zip.mjs"; +import { zipObject } from "./zipObject.mjs"; +import { zipWith } from "./zipWith.mjs"; +export { at, cartesianProduct, chunk, chunkBy, combinations, compact, countBy, difference, differenceBy, differenceWith, drop, dropRight, dropRightWhile, dropWhile, fill, filterAsync, flatMap, flatMapAsync, flatMapDeep, flatten, flattenDeep, forEachAsync, forEachRight, groupBy, head, initial, intersection, intersectionBy, intersectionWith, isSubset, isSubsetWith, keyBy, last, limitAsync, mapAsync, maxBy, minBy, orderBy, partition, pull, pullAt, reduceAsync, remove, sample, sampleSize, shuffle, sortBy, tail, take, takeRight, takeRightWhile, takeWhile, toFilled, union, unionBy, unionWith, uniq, uniqBy, uniqWith, unzip, unzipWith, windowed, without, xor, xorBy, xorWith, zip, zipObject, zipWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/index.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a58ae446b66bc195ebe059dbed2c31171bd4f157 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/index.d.ts @@ -0,0 +1,70 @@ +import { at } from "./at.js"; +import { cartesianProduct } from "./cartesianProduct.js"; +import { chunk } from "./chunk.js"; +import { chunkBy } from "./chunkBy.js"; +import { combinations } from "./combinations.js"; +import { compact } from "./compact.js"; +import { countBy } from "./countBy.js"; +import { difference } from "./difference.js"; +import { differenceBy } from "./differenceBy.js"; +import { differenceWith } from "./differenceWith.js"; +import { drop } from "./drop.js"; +import { dropRight } from "./dropRight.js"; +import { dropRightWhile } from "./dropRightWhile.js"; +import { dropWhile } from "./dropWhile.js"; +import { fill } from "./fill.js"; +import { filterAsync } from "./filterAsync.js"; +import { flatMap } from "./flatMap.js"; +import { flatMapAsync } from "./flatMapAsync.js"; +import { flattenDeep } from "./flattenDeep.js"; +import { flatMapDeep } from "./flatMapDeep.js"; +import { flatten } from "./flatten.js"; +import { forEachAsync } from "./forEachAsync.js"; +import { forEachRight } from "./forEachRight.js"; +import { groupBy } from "./groupBy.js"; +import { head } from "./head.js"; +import { initial } from "./initial.js"; +import { intersection } from "./intersection.js"; +import { intersectionBy } from "./intersectionBy.js"; +import { intersectionWith } from "./intersectionWith.js"; +import { isSubset } from "./isSubset.js"; +import { isSubsetWith } from "./isSubsetWith.js"; +import { keyBy } from "./keyBy.js"; +import { last } from "./last.js"; +import { limitAsync } from "./limitAsync.js"; +import { mapAsync } from "./mapAsync.js"; +import { maxBy } from "./maxBy.js"; +import { minBy } from "./minBy.js"; +import { orderBy } from "./orderBy.js"; +import { partition } from "./partition.js"; +import { pull } from "./pull.js"; +import { pullAt } from "./pullAt.js"; +import { reduceAsync } from "./reduceAsync.js"; +import { remove } from "./remove.js"; +import { sample } from "./sample.js"; +import { sampleSize } from "./sampleSize.js"; +import { shuffle } from "./shuffle.js"; +import { sortBy } from "./sortBy.js"; +import { tail } from "./tail.js"; +import { take } from "./take.js"; +import { takeRight } from "./takeRight.js"; +import { takeRightWhile } from "./takeRightWhile.js"; +import { takeWhile } from "./takeWhile.js"; +import { toFilled } from "./toFilled.js"; +import { union } from "./union.js"; +import { unionBy } from "./unionBy.js"; +import { unionWith } from "./unionWith.js"; +import { uniq } from "./uniq.js"; +import { uniqBy } from "./uniqBy.js"; +import { uniqWith } from "./uniqWith.js"; +import { unzip } from "./unzip.js"; +import { unzipWith } from "./unzipWith.js"; +import { windowed } from "./windowed.js"; +import { without } from "./without.js"; +import { xor } from "./xor.js"; +import { xorBy } from "./xorBy.js"; +import { xorWith } from "./xorWith.js"; +import { zip } from "./zip.js"; +import { zipObject } from "./zipObject.js"; +import { zipWith } from "./zipWith.js"; +export { at, cartesianProduct, chunk, chunkBy, combinations, compact, countBy, difference, differenceBy, differenceWith, drop, dropRight, dropRightWhile, dropWhile, fill, filterAsync, flatMap, flatMapAsync, flatMapDeep, flatten, flattenDeep, forEachAsync, forEachRight, groupBy, head, initial, intersection, intersectionBy, intersectionWith, isSubset, isSubsetWith, keyBy, last, limitAsync, mapAsync, maxBy, minBy, orderBy, partition, pull, pullAt, reduceAsync, remove, sample, sampleSize, shuffle, sortBy, tail, take, takeRight, takeRightWhile, takeWhile, toFilled, union, unionBy, unionWith, uniq, uniqBy, uniqWith, unzip, unzipWith, windowed, without, xor, xorBy, xorWith, zip, zipObject, zipWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/index.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/index.js new file mode 100644 index 0000000000000000000000000000000000000000..d6310eca253057a6ae1bae6dd8be88fc83403730 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/index.js @@ -0,0 +1,139 @@ +Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); +const require_at = require("./at.js"); +const require_cartesianProduct = require("./cartesianProduct.js"); +const require_chunk = require("./chunk.js"); +const require_chunkBy = require("./chunkBy.js"); +const require_combinations = require("./combinations.js"); +const require_compact = require("./compact.js"); +const require_countBy = require("./countBy.js"); +const require_difference = require("./difference.js"); +const require_differenceBy = require("./differenceBy.js"); +const require_differenceWith = require("./differenceWith.js"); +const require_drop = require("./drop.js"); +const require_dropRight = require("./dropRight.js"); +const require_dropRightWhile = require("./dropRightWhile.js"); +const require_dropWhile = require("./dropWhile.js"); +const require_fill = require("./fill.js"); +const require_filterAsync = require("./filterAsync.js"); +const require_flatten = require("./flatten.js"); +const require_flatMap = require("./flatMap.js"); +const require_flatMapAsync = require("./flatMapAsync.js"); +const require_flattenDeep = require("./flattenDeep.js"); +const require_flatMapDeep = require("./flatMapDeep.js"); +const require_forEachAsync = require("./forEachAsync.js"); +const require_forEachRight = require("./forEachRight.js"); +const require_groupBy = require("./groupBy.js"); +const require_head = require("./head.js"); +const require_initial = require("./initial.js"); +const require_intersection = require("./intersection.js"); +const require_intersectionBy = require("./intersectionBy.js"); +const require_intersectionWith = require("./intersectionWith.js"); +const require_isSubset = require("./isSubset.js"); +const require_isSubsetWith = require("./isSubsetWith.js"); +const require_keyBy = require("./keyBy.js"); +const require_last = require("./last.js"); +const require_limitAsync = require("./limitAsync.js"); +const require_mapAsync = require("./mapAsync.js"); +const require_maxBy = require("./maxBy.js"); +const require_minBy = require("./minBy.js"); +const require_orderBy = require("./orderBy.js"); +const require_partition = require("./partition.js"); +const require_pull = require("./pull.js"); +const require_pullAt = require("./pullAt.js"); +const require_reduceAsync = require("./reduceAsync.js"); +const require_remove = require("./remove.js"); +const require_sample = require("./sample.js"); +const require_sampleSize = require("./sampleSize.js"); +const require_shuffle = require("./shuffle.js"); +const require_sortBy = require("./sortBy.js"); +const require_tail = require("./tail.js"); +const require_take = require("./take.js"); +const require_takeRight = require("./takeRight.js"); +const require_takeRightWhile = require("./takeRightWhile.js"); +const require_takeWhile = require("./takeWhile.js"); +const require_toFilled = require("./toFilled.js"); +const require_uniq = require("./uniq.js"); +const require_union = require("./union.js"); +const require_uniqBy = require("./uniqBy.js"); +const require_unionBy = require("./unionBy.js"); +const require_uniqWith = require("./uniqWith.js"); +const require_unionWith = require("./unionWith.js"); +const require_unzip = require("./unzip.js"); +const require_unzipWith = require("./unzipWith.js"); +const require_windowed = require("./windowed.js"); +const require_without = require("./without.js"); +const require_xor = require("./xor.js"); +const require_xorBy = require("./xorBy.js"); +const require_xorWith = require("./xorWith.js"); +const require_zip = require("./zip.js"); +const require_zipObject = require("./zipObject.js"); +const require_zipWith = require("./zipWith.js"); +exports.at = require_at.at; +exports.cartesianProduct = require_cartesianProduct.cartesianProduct; +exports.chunk = require_chunk.chunk; +exports.chunkBy = require_chunkBy.chunkBy; +exports.combinations = require_combinations.combinations; +exports.compact = require_compact.compact; +exports.countBy = require_countBy.countBy; +exports.difference = require_difference.difference; +exports.differenceBy = require_differenceBy.differenceBy; +exports.differenceWith = require_differenceWith.differenceWith; +exports.drop = require_drop.drop; +exports.dropRight = require_dropRight.dropRight; +exports.dropRightWhile = require_dropRightWhile.dropRightWhile; +exports.dropWhile = require_dropWhile.dropWhile; +exports.fill = require_fill.fill; +exports.filterAsync = require_filterAsync.filterAsync; +exports.flatMap = require_flatMap.flatMap; +exports.flatMapAsync = require_flatMapAsync.flatMapAsync; +exports.flatMapDeep = require_flatMapDeep.flatMapDeep; +exports.flatten = require_flatten.flatten; +exports.flattenDeep = require_flattenDeep.flattenDeep; +exports.forEachAsync = require_forEachAsync.forEachAsync; +exports.forEachRight = require_forEachRight.forEachRight; +exports.groupBy = require_groupBy.groupBy; +exports.head = require_head.head; +exports.initial = require_initial.initial; +exports.intersection = require_intersection.intersection; +exports.intersectionBy = require_intersectionBy.intersectionBy; +exports.intersectionWith = require_intersectionWith.intersectionWith; +exports.isSubset = require_isSubset.isSubset; +exports.isSubsetWith = require_isSubsetWith.isSubsetWith; +exports.keyBy = require_keyBy.keyBy; +exports.last = require_last.last; +exports.limitAsync = require_limitAsync.limitAsync; +exports.mapAsync = require_mapAsync.mapAsync; +exports.maxBy = require_maxBy.maxBy; +exports.minBy = require_minBy.minBy; +exports.orderBy = require_orderBy.orderBy; +exports.partition = require_partition.partition; +exports.pull = require_pull.pull; +exports.pullAt = require_pullAt.pullAt; +exports.reduceAsync = require_reduceAsync.reduceAsync; +exports.remove = require_remove.remove; +exports.sample = require_sample.sample; +exports.sampleSize = require_sampleSize.sampleSize; +exports.shuffle = require_shuffle.shuffle; +exports.sortBy = require_sortBy.sortBy; +exports.tail = require_tail.tail; +exports.take = require_take.take; +exports.takeRight = require_takeRight.takeRight; +exports.takeRightWhile = require_takeRightWhile.takeRightWhile; +exports.takeWhile = require_takeWhile.takeWhile; +exports.toFilled = require_toFilled.toFilled; +exports.union = require_union.union; +exports.unionBy = require_unionBy.unionBy; +exports.unionWith = require_unionWith.unionWith; +exports.uniq = require_uniq.uniq; +exports.uniqBy = require_uniqBy.uniqBy; +exports.uniqWith = require_uniqWith.uniqWith; +exports.unzip = require_unzip.unzip; +exports.unzipWith = require_unzipWith.unzipWith; +exports.windowed = require_windowed.windowed; +exports.without = require_without.without; +exports.xor = require_xor.xor; +exports.xorBy = require_xorBy.xorBy; +exports.xorWith = require_xorWith.xorWith; +exports.zip = require_zip.zip; +exports.zipObject = require_zipObject.zipObject; +exports.zipWith = require_zipWith.zipWith; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/index.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..13ee55c8b47e8cfba9245f477968e6d4d2e52e42 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/index.mjs @@ -0,0 +1,70 @@ +import { at } from "./at.mjs"; +import { cartesianProduct } from "./cartesianProduct.mjs"; +import { chunk } from "./chunk.mjs"; +import { chunkBy } from "./chunkBy.mjs"; +import { combinations } from "./combinations.mjs"; +import { compact } from "./compact.mjs"; +import { countBy } from "./countBy.mjs"; +import { difference } from "./difference.mjs"; +import { differenceBy } from "./differenceBy.mjs"; +import { differenceWith } from "./differenceWith.mjs"; +import { drop } from "./drop.mjs"; +import { dropRight } from "./dropRight.mjs"; +import { dropRightWhile } from "./dropRightWhile.mjs"; +import { dropWhile } from "./dropWhile.mjs"; +import { fill } from "./fill.mjs"; +import { filterAsync } from "./filterAsync.mjs"; +import { flatten } from "./flatten.mjs"; +import { flatMap } from "./flatMap.mjs"; +import { flatMapAsync } from "./flatMapAsync.mjs"; +import { flattenDeep } from "./flattenDeep.mjs"; +import { flatMapDeep } from "./flatMapDeep.mjs"; +import { forEachAsync } from "./forEachAsync.mjs"; +import { forEachRight } from "./forEachRight.mjs"; +import { groupBy } from "./groupBy.mjs"; +import { head } from "./head.mjs"; +import { initial } from "./initial.mjs"; +import { intersection } from "./intersection.mjs"; +import { intersectionBy } from "./intersectionBy.mjs"; +import { intersectionWith } from "./intersectionWith.mjs"; +import { isSubset } from "./isSubset.mjs"; +import { isSubsetWith } from "./isSubsetWith.mjs"; +import { keyBy } from "./keyBy.mjs"; +import { last } from "./last.mjs"; +import { limitAsync } from "./limitAsync.mjs"; +import { mapAsync } from "./mapAsync.mjs"; +import { maxBy } from "./maxBy.mjs"; +import { minBy } from "./minBy.mjs"; +import { orderBy } from "./orderBy.mjs"; +import { partition } from "./partition.mjs"; +import { pull } from "./pull.mjs"; +import { pullAt } from "./pullAt.mjs"; +import { reduceAsync } from "./reduceAsync.mjs"; +import { remove } from "./remove.mjs"; +import { sample } from "./sample.mjs"; +import { sampleSize } from "./sampleSize.mjs"; +import { shuffle } from "./shuffle.mjs"; +import { sortBy } from "./sortBy.mjs"; +import { tail } from "./tail.mjs"; +import { take } from "./take.mjs"; +import { takeRight } from "./takeRight.mjs"; +import { takeRightWhile } from "./takeRightWhile.mjs"; +import { takeWhile } from "./takeWhile.mjs"; +import { toFilled } from "./toFilled.mjs"; +import { uniq } from "./uniq.mjs"; +import { union } from "./union.mjs"; +import { uniqBy } from "./uniqBy.mjs"; +import { unionBy } from "./unionBy.mjs"; +import { uniqWith } from "./uniqWith.mjs"; +import { unionWith } from "./unionWith.mjs"; +import { unzip } from "./unzip.mjs"; +import { unzipWith } from "./unzipWith.mjs"; +import { windowed } from "./windowed.mjs"; +import { without } from "./without.mjs"; +import { xor } from "./xor.mjs"; +import { xorBy } from "./xorBy.mjs"; +import { xorWith } from "./xorWith.mjs"; +import { zip } from "./zip.mjs"; +import { zipObject } from "./zipObject.mjs"; +import { zipWith } from "./zipWith.mjs"; +export { at, cartesianProduct, chunk, chunkBy, combinations, compact, countBy, difference, differenceBy, differenceWith, drop, dropRight, dropRightWhile, dropWhile, fill, filterAsync, flatMap, flatMapAsync, flatMapDeep, flatten, flattenDeep, forEachAsync, forEachRight, groupBy, head, initial, intersection, intersectionBy, intersectionWith, isSubset, isSubsetWith, keyBy, last, limitAsync, mapAsync, maxBy, minBy, orderBy, partition, pull, pullAt, reduceAsync, remove, sample, sampleSize, shuffle, sortBy, tail, take, takeRight, takeRightWhile, takeWhile, toFilled, union, unionBy, unionWith, uniq, uniqBy, uniqWith, unzip, unzipWith, windowed, without, xor, xorBy, xorWith, zip, zipObject, zipWith }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/initial.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/initial.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..2e88e91b7fed156be6ead20d74cc540415f1a72c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/initial.d.mts @@ -0,0 +1,55 @@ +//#region src/array/initial.d.ts +/** + * Returns an empty array when the input is a tuple containing exactly one element. + * + * @template T The type of the single element. + * @param arr - A tuple containing exactly one element. + * @returns An empty array since there is only one element. + * + * @example + * const array = [100] as const; + * const result = initial(array); + * // result will be [] + */ +declare function initial(arr: readonly [T]): []; +/** + * Returns an empty array when the input array is empty. + * + * @returns Always returns an empty array for an empty input. + * + * @example + * const array = [] as const; + * const result = initial(array); + * // result will be [] + */ +declare function initial(arr: readonly []): []; +/** + * Returns a new array containing all elements except the last one from a tuple with multiple elements. + * + * @template T The types of the initial elements. + * @template U The type of the last element in the tuple. + * @param arr - A tuple with one or more elements. + * @returns A new array containing all but the last element of the tuple. + * + * @example + * const array = ['apple', 'banana', 'cherry'] as const; + * const result = initial(array); + * // result will be ['apple', 'banana'] + */ +declare function initial(arr: readonly [...T[], U]): T[]; +/** + * Returns a new array containing all elements except the last one from the input array. + * If the input array is empty or has only one element, the function returns an empty array. + * + * @template T The type of elements in the array. + * @param arr - The input array. + * @returns A new array containing all but the last element of the input array. + * + * @example + * const arr = [1, 2, 3, 4]; + * const result = initial(arr); + * // result will be [1, 2, 3] + */ +declare function initial(arr: readonly T[]): T[]; +//#endregion +export { initial }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/initial.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/initial.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..2e88e91b7fed156be6ead20d74cc540415f1a72c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/initial.d.ts @@ -0,0 +1,55 @@ +//#region src/array/initial.d.ts +/** + * Returns an empty array when the input is a tuple containing exactly one element. + * + * @template T The type of the single element. + * @param arr - A tuple containing exactly one element. + * @returns An empty array since there is only one element. + * + * @example + * const array = [100] as const; + * const result = initial(array); + * // result will be [] + */ +declare function initial(arr: readonly [T]): []; +/** + * Returns an empty array when the input array is empty. + * + * @returns Always returns an empty array for an empty input. + * + * @example + * const array = [] as const; + * const result = initial(array); + * // result will be [] + */ +declare function initial(arr: readonly []): []; +/** + * Returns a new array containing all elements except the last one from a tuple with multiple elements. + * + * @template T The types of the initial elements. + * @template U The type of the last element in the tuple. + * @param arr - A tuple with one or more elements. + * @returns A new array containing all but the last element of the tuple. + * + * @example + * const array = ['apple', 'banana', 'cherry'] as const; + * const result = initial(array); + * // result will be ['apple', 'banana'] + */ +declare function initial(arr: readonly [...T[], U]): T[]; +/** + * Returns a new array containing all elements except the last one from the input array. + * If the input array is empty or has only one element, the function returns an empty array. + * + * @template T The type of elements in the array. + * @param arr - The input array. + * @returns A new array containing all but the last element of the input array. + * + * @example + * const arr = [1, 2, 3, 4]; + * const result = initial(arr); + * // result will be [1, 2, 3] + */ +declare function initial(arr: readonly T[]): T[]; +//#endregion +export { initial }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/initial.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/initial.js new file mode 100644 index 0000000000000000000000000000000000000000..11063e72d89a3423f0b763c843ef76c0c4541a84 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/initial.js @@ -0,0 +1,19 @@ +//#region src/array/initial.ts +/** +* Returns a new array containing all elements except the last one from the input array. +* If the input array is empty or has only one element, the function returns an empty array. +* +* @template T The type of elements in the array. +* @param arr - The input array. +* @returns A new array containing all but the last element of the input array. +* +* @example +* const arr = [1, 2, 3, 4]; +* const result = initial(arr); +* // result will be [1, 2, 3] +*/ +function initial(arr) { + return arr.slice(0, -1); +} +//#endregion +exports.initial = initial; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/initial.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/initial.mjs new file mode 100644 index 0000000000000000000000000000000000000000..3459dd701585130d1743248cbb322eafb9c84fe5 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/initial.mjs @@ -0,0 +1,19 @@ +//#region src/array/initial.ts +/** +* Returns a new array containing all elements except the last one from the input array. +* If the input array is empty or has only one element, the function returns an empty array. +* +* @template T The type of elements in the array. +* @param arr - The input array. +* @returns A new array containing all but the last element of the input array. +* +* @example +* const arr = [1, 2, 3, 4]; +* const result = initial(arr); +* // result will be [1, 2, 3] +*/ +function initial(arr) { + return arr.slice(0, -1); +} +//#endregion +export { initial }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersection.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersection.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..1d183805a9a5cb4ccae7b146ed8aebbb9ff16279 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersection.d.mts @@ -0,0 +1,22 @@ +//#region src/array/intersection.d.ts +/** + * Returns the intersection of two arrays. + * + * This function takes two arrays and returns a new array containing the elements that are + * present in both arrays. It effectively filters out any elements from the first array that + * are not found in the second array. + * + * @template T - The type of elements in the array. + * @param firstArr - The first array to compare. + * @param secondArr - The second array to compare. + * @returns A new array containing the elements that are present in both arrays. + * + * @example + * const array1 = [1, 2, 3, 4, 5]; + * const array2 = [3, 4, 5, 6, 7]; + * const result = intersection(array1, array2); + * // result will be [3, 4, 5] since these elements are in both arrays. + */ +declare function intersection(firstArr: readonly T[], secondArr: readonly T[]): T[]; +//#endregion +export { intersection }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersection.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersection.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1d183805a9a5cb4ccae7b146ed8aebbb9ff16279 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersection.d.ts @@ -0,0 +1,22 @@ +//#region src/array/intersection.d.ts +/** + * Returns the intersection of two arrays. + * + * This function takes two arrays and returns a new array containing the elements that are + * present in both arrays. It effectively filters out any elements from the first array that + * are not found in the second array. + * + * @template T - The type of elements in the array. + * @param firstArr - The first array to compare. + * @param secondArr - The second array to compare. + * @returns A new array containing the elements that are present in both arrays. + * + * @example + * const array1 = [1, 2, 3, 4, 5]; + * const array2 = [3, 4, 5, 6, 7]; + * const result = intersection(array1, array2); + * // result will be [3, 4, 5] since these elements are in both arrays. + */ +declare function intersection(firstArr: readonly T[], secondArr: readonly T[]): T[]; +//#endregion +export { intersection }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersection.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersection.js new file mode 100644 index 0000000000000000000000000000000000000000..a2553a86b4a24a4d41b1c79a5fae3b6950aac55f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersection.js @@ -0,0 +1,25 @@ +//#region src/array/intersection.ts +/** +* Returns the intersection of two arrays. +* +* This function takes two arrays and returns a new array containing the elements that are +* present in both arrays. It effectively filters out any elements from the first array that +* are not found in the second array. +* +* @template T - The type of elements in the array. +* @param firstArr - The first array to compare. +* @param secondArr - The second array to compare. +* @returns A new array containing the elements that are present in both arrays. +* +* @example +* const array1 = [1, 2, 3, 4, 5]; +* const array2 = [3, 4, 5, 6, 7]; +* const result = intersection(array1, array2); +* // result will be [3, 4, 5] since these elements are in both arrays. +*/ +function intersection(firstArr, secondArr) { + const secondSet = new Set(secondArr); + return firstArr.filter((item) => secondSet.has(item)); +} +//#endregion +exports.intersection = intersection; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersection.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersection.mjs new file mode 100644 index 0000000000000000000000000000000000000000..14f0fb96754ce0686b3c6597308ddf2fd3c049a4 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersection.mjs @@ -0,0 +1,25 @@ +//#region src/array/intersection.ts +/** +* Returns the intersection of two arrays. +* +* This function takes two arrays and returns a new array containing the elements that are +* present in both arrays. It effectively filters out any elements from the first array that +* are not found in the second array. +* +* @template T - The type of elements in the array. +* @param firstArr - The first array to compare. +* @param secondArr - The second array to compare. +* @returns A new array containing the elements that are present in both arrays. +* +* @example +* const array1 = [1, 2, 3, 4, 5]; +* const array2 = [3, 4, 5, 6, 7]; +* const result = intersection(array1, array2); +* // result will be [3, 4, 5] since these elements are in both arrays. +*/ +function intersection(firstArr, secondArr) { + const secondSet = new Set(secondArr); + return firstArr.filter((item) => secondSet.has(item)); +} +//#endregion +export { intersection }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersectionBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersectionBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..afe532adf19ae414ccf20578b7075b2b86eabc42 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersectionBy.d.mts @@ -0,0 +1,37 @@ +//#region src/array/intersectionBy.d.ts +/** + * Returns the intersection of two arrays based on a mapping function. + * + * This function takes two arrays and a mapping function. It returns a new array containing + * the elements from the first array that, when mapped using the provided function, have matching + * mapped elements in the second array. It effectively filters out any elements from the first array + * that do not have corresponding mapped values in the second array. + * + * @template T - The type of elements in the first array. + * @template U - The type of elements in the second array. + * @param firstArr - The first array to compare. + * @param secondArr - The second array to compare. + * @param mapper - A function to map the elements of both arrays for comparison. + * @returns A new array containing the elements from the first array that have corresponding mapped values in the second array. + * + * @example + * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }]; + * const array2 = [{ id: 2 }, { id: 4 }]; + * const mapper = item => item.id; + * const result = intersectionBy(array1, array2, mapper); + * // result will be [{ id: 2 }] since only this element has a matching id in both arrays. + * + * @example + * const array1 = [ + * { id: 1, name: 'jane' }, + * { id: 2, name: 'amy' }, + * { id: 3, name: 'michael' }, + * ]; + * const array2 = [2, 4]; + * const mapper = item => (typeof item === 'object' ? item.id : item); + * const result = intersectionBy(array1, array2, mapper); + * // result will be [{ id: 2, name: 'amy' }] since only this element has a matching id that is equal to seconds array's element. + */ +declare function intersectionBy(firstArr: readonly T[], secondArr: readonly U[], mapper: (item: T | U) => unknown): T[]; +//#endregion +export { intersectionBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersectionBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersectionBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..afe532adf19ae414ccf20578b7075b2b86eabc42 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersectionBy.d.ts @@ -0,0 +1,37 @@ +//#region src/array/intersectionBy.d.ts +/** + * Returns the intersection of two arrays based on a mapping function. + * + * This function takes two arrays and a mapping function. It returns a new array containing + * the elements from the first array that, when mapped using the provided function, have matching + * mapped elements in the second array. It effectively filters out any elements from the first array + * that do not have corresponding mapped values in the second array. + * + * @template T - The type of elements in the first array. + * @template U - The type of elements in the second array. + * @param firstArr - The first array to compare. + * @param secondArr - The second array to compare. + * @param mapper - A function to map the elements of both arrays for comparison. + * @returns A new array containing the elements from the first array that have corresponding mapped values in the second array. + * + * @example + * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }]; + * const array2 = [{ id: 2 }, { id: 4 }]; + * const mapper = item => item.id; + * const result = intersectionBy(array1, array2, mapper); + * // result will be [{ id: 2 }] since only this element has a matching id in both arrays. + * + * @example + * const array1 = [ + * { id: 1, name: 'jane' }, + * { id: 2, name: 'amy' }, + * { id: 3, name: 'michael' }, + * ]; + * const array2 = [2, 4]; + * const mapper = item => (typeof item === 'object' ? item.id : item); + * const result = intersectionBy(array1, array2, mapper); + * // result will be [{ id: 2, name: 'amy' }] since only this element has a matching id that is equal to seconds array's element. + */ +declare function intersectionBy(firstArr: readonly T[], secondArr: readonly U[], mapper: (item: T | U) => unknown): T[]; +//#endregion +export { intersectionBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersectionBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersectionBy.js new file mode 100644 index 0000000000000000000000000000000000000000..dca8fa7bdf4f34c27bf3899b13da2ea611ed6277 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersectionBy.js @@ -0,0 +1,49 @@ +//#region src/array/intersectionBy.ts +/** +* Returns the intersection of two arrays based on a mapping function. +* +* This function takes two arrays and a mapping function. It returns a new array containing +* the elements from the first array that, when mapped using the provided function, have matching +* mapped elements in the second array. It effectively filters out any elements from the first array +* that do not have corresponding mapped values in the second array. +* +* @template T - The type of elements in the first array. +* @template U - The type of elements in the second array. +* @param firstArr - The first array to compare. +* @param secondArr - The second array to compare. +* @param mapper - A function to map the elements of both arrays for comparison. +* @returns A new array containing the elements from the first array that have corresponding mapped values in the second array. +* +* @example +* const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }]; +* const array2 = [{ id: 2 }, { id: 4 }]; +* const mapper = item => item.id; +* const result = intersectionBy(array1, array2, mapper); +* // result will be [{ id: 2 }] since only this element has a matching id in both arrays. +* +* @example +* const array1 = [ +* { id: 1, name: 'jane' }, +* { id: 2, name: 'amy' }, +* { id: 3, name: 'michael' }, +* ]; +* const array2 = [2, 4]; +* const mapper = item => (typeof item === 'object' ? item.id : item); +* const result = intersectionBy(array1, array2, mapper); +* // result will be [{ id: 2, name: 'amy' }] since only this element has a matching id that is equal to seconds array's element. +*/ +function intersectionBy(firstArr, secondArr, mapper) { + const result = []; + const mappedSecondSet = new Set(secondArr.map(mapper)); + for (let i = 0; i < firstArr.length; i++) { + const item = firstArr[i]; + const mappedItem = mapper(item); + if (mappedSecondSet.has(mappedItem)) { + result.push(item); + mappedSecondSet.delete(mappedItem); + } + } + return result; +} +//#endregion +exports.intersectionBy = intersectionBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersectionBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersectionBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f2816fd9d9d4933d0051af8f0dcaae6a5734e9fc --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersectionBy.mjs @@ -0,0 +1,49 @@ +//#region src/array/intersectionBy.ts +/** +* Returns the intersection of two arrays based on a mapping function. +* +* This function takes two arrays and a mapping function. It returns a new array containing +* the elements from the first array that, when mapped using the provided function, have matching +* mapped elements in the second array. It effectively filters out any elements from the first array +* that do not have corresponding mapped values in the second array. +* +* @template T - The type of elements in the first array. +* @template U - The type of elements in the second array. +* @param firstArr - The first array to compare. +* @param secondArr - The second array to compare. +* @param mapper - A function to map the elements of both arrays for comparison. +* @returns A new array containing the elements from the first array that have corresponding mapped values in the second array. +* +* @example +* const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }]; +* const array2 = [{ id: 2 }, { id: 4 }]; +* const mapper = item => item.id; +* const result = intersectionBy(array1, array2, mapper); +* // result will be [{ id: 2 }] since only this element has a matching id in both arrays. +* +* @example +* const array1 = [ +* { id: 1, name: 'jane' }, +* { id: 2, name: 'amy' }, +* { id: 3, name: 'michael' }, +* ]; +* const array2 = [2, 4]; +* const mapper = item => (typeof item === 'object' ? item.id : item); +* const result = intersectionBy(array1, array2, mapper); +* // result will be [{ id: 2, name: 'amy' }] since only this element has a matching id that is equal to seconds array's element. +*/ +function intersectionBy(firstArr, secondArr, mapper) { + const result = []; + const mappedSecondSet = new Set(secondArr.map(mapper)); + for (let i = 0; i < firstArr.length; i++) { + const item = firstArr[i]; + const mappedItem = mapper(item); + if (mappedSecondSet.has(mappedItem)) { + result.push(item); + mappedSecondSet.delete(mappedItem); + } + } + return result; +} +//#endregion +export { intersectionBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersectionWith.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersectionWith.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..ade6a3d3d4921e924676a43aafa9dd765b88327b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersectionWith.d.mts @@ -0,0 +1,38 @@ +//#region src/array/intersectionWith.d.ts +/** + * Returns the intersection of two arrays based on a custom equality function. + * + * This function takes two arrays and a custom equality function. It returns a new array containing + * the elements from the first array that have matching elements in the second array, as determined + * by the custom equality function. It effectively filters out any elements from the first array that + * do not have corresponding matches in the second array according to the equality function. + * + * @template T - The type of elements in the first array. + * @template U - The type of elements in the second array. + * @param firstArr - The first array to compare. + * @param secondArr - The second array to compare. + * @param areItemsEqual - A custom function to determine if two elements are equal. + * This function takes two arguments, one from each array, and returns `true` if the elements are considered equal, and `false` otherwise. + * @returns A new array containing the elements from the first array that have corresponding matches in the second array according to the custom equality function. + * + * @example + * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }]; + * const array2 = [{ id: 2 }, { id: 4 }]; + * const areItemsEqual = (a, b) => a.id === b.id; + * const result = intersectionWith(array1, array2, areItemsEqual); + * // result will be [{ id: 2 }] since this element has a matching id in both arrays. + * + * @example + * const array1 = [ + * { id: 1, name: 'jane' }, + * { id: 2, name: 'amy' }, + * { id: 3, name: 'michael' }, + * ]; + * const array2 = [2, 4]; + * const areItemsEqual = (a, b) => a.id === b; + * const result = intersectionWith(array1, array2, areItemsEqual); + * // result will be [{ id: 2, name: 'amy' }] since this element has a matching id that is equal to seconds array's element. + */ +declare function intersectionWith(firstArr: readonly T[], secondArr: readonly U[], areItemsEqual: (x: T, y: U) => boolean): T[]; +//#endregion +export { intersectionWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersectionWith.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersectionWith.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ade6a3d3d4921e924676a43aafa9dd765b88327b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersectionWith.d.ts @@ -0,0 +1,38 @@ +//#region src/array/intersectionWith.d.ts +/** + * Returns the intersection of two arrays based on a custom equality function. + * + * This function takes two arrays and a custom equality function. It returns a new array containing + * the elements from the first array that have matching elements in the second array, as determined + * by the custom equality function. It effectively filters out any elements from the first array that + * do not have corresponding matches in the second array according to the equality function. + * + * @template T - The type of elements in the first array. + * @template U - The type of elements in the second array. + * @param firstArr - The first array to compare. + * @param secondArr - The second array to compare. + * @param areItemsEqual - A custom function to determine if two elements are equal. + * This function takes two arguments, one from each array, and returns `true` if the elements are considered equal, and `false` otherwise. + * @returns A new array containing the elements from the first array that have corresponding matches in the second array according to the custom equality function. + * + * @example + * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }]; + * const array2 = [{ id: 2 }, { id: 4 }]; + * const areItemsEqual = (a, b) => a.id === b.id; + * const result = intersectionWith(array1, array2, areItemsEqual); + * // result will be [{ id: 2 }] since this element has a matching id in both arrays. + * + * @example + * const array1 = [ + * { id: 1, name: 'jane' }, + * { id: 2, name: 'amy' }, + * { id: 3, name: 'michael' }, + * ]; + * const array2 = [2, 4]; + * const areItemsEqual = (a, b) => a.id === b; + * const result = intersectionWith(array1, array2, areItemsEqual); + * // result will be [{ id: 2, name: 'amy' }] since this element has a matching id that is equal to seconds array's element. + */ +declare function intersectionWith(firstArr: readonly T[], secondArr: readonly U[], areItemsEqual: (x: T, y: U) => boolean): T[]; +//#endregion +export { intersectionWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersectionWith.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersectionWith.js new file mode 100644 index 0000000000000000000000000000000000000000..cfbedbf3034b22f00cc0b991b5c7b31eaad5c73e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersectionWith.js @@ -0,0 +1,44 @@ +//#region src/array/intersectionWith.ts +/** +* Returns the intersection of two arrays based on a custom equality function. +* +* This function takes two arrays and a custom equality function. It returns a new array containing +* the elements from the first array that have matching elements in the second array, as determined +* by the custom equality function. It effectively filters out any elements from the first array that +* do not have corresponding matches in the second array according to the equality function. +* +* @template T - The type of elements in the first array. +* @template U - The type of elements in the second array. +* @param firstArr - The first array to compare. +* @param secondArr - The second array to compare. +* @param areItemsEqual - A custom function to determine if two elements are equal. +* This function takes two arguments, one from each array, and returns `true` if the elements are considered equal, and `false` otherwise. +* @returns A new array containing the elements from the first array that have corresponding matches in the second array according to the custom equality function. +* +* @example +* const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }]; +* const array2 = [{ id: 2 }, { id: 4 }]; +* const areItemsEqual = (a, b) => a.id === b.id; +* const result = intersectionWith(array1, array2, areItemsEqual); +* // result will be [{ id: 2 }] since this element has a matching id in both arrays. +* +* @example +* const array1 = [ +* { id: 1, name: 'jane' }, +* { id: 2, name: 'amy' }, +* { id: 3, name: 'michael' }, +* ]; +* const array2 = [2, 4]; +* const areItemsEqual = (a, b) => a.id === b; +* const result = intersectionWith(array1, array2, areItemsEqual); +* // result will be [{ id: 2, name: 'amy' }] since this element has a matching id that is equal to seconds array's element. +*/ +function intersectionWith(firstArr, secondArr, areItemsEqual) { + return firstArr.filter((firstItem) => { + return secondArr.some((secondItem) => { + return areItemsEqual(firstItem, secondItem); + }); + }); +} +//#endregion +exports.intersectionWith = intersectionWith; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersectionWith.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersectionWith.mjs new file mode 100644 index 0000000000000000000000000000000000000000..9ed08a743eb5d9d90c609f7a4261c87bdb0c8cd5 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/intersectionWith.mjs @@ -0,0 +1,44 @@ +//#region src/array/intersectionWith.ts +/** +* Returns the intersection of two arrays based on a custom equality function. +* +* This function takes two arrays and a custom equality function. It returns a new array containing +* the elements from the first array that have matching elements in the second array, as determined +* by the custom equality function. It effectively filters out any elements from the first array that +* do not have corresponding matches in the second array according to the equality function. +* +* @template T - The type of elements in the first array. +* @template U - The type of elements in the second array. +* @param firstArr - The first array to compare. +* @param secondArr - The second array to compare. +* @param areItemsEqual - A custom function to determine if two elements are equal. +* This function takes two arguments, one from each array, and returns `true` if the elements are considered equal, and `false` otherwise. +* @returns A new array containing the elements from the first array that have corresponding matches in the second array according to the custom equality function. +* +* @example +* const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }]; +* const array2 = [{ id: 2 }, { id: 4 }]; +* const areItemsEqual = (a, b) => a.id === b.id; +* const result = intersectionWith(array1, array2, areItemsEqual); +* // result will be [{ id: 2 }] since this element has a matching id in both arrays. +* +* @example +* const array1 = [ +* { id: 1, name: 'jane' }, +* { id: 2, name: 'amy' }, +* { id: 3, name: 'michael' }, +* ]; +* const array2 = [2, 4]; +* const areItemsEqual = (a, b) => a.id === b; +* const result = intersectionWith(array1, array2, areItemsEqual); +* // result will be [{ id: 2, name: 'amy' }] since this element has a matching id that is equal to seconds array's element. +*/ +function intersectionWith(firstArr, secondArr, areItemsEqual) { + return firstArr.filter((firstItem) => { + return secondArr.some((secondItem) => { + return areItemsEqual(firstItem, secondItem); + }); + }); +} +//#endregion +export { intersectionWith }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/isSubset.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/isSubset.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..e2df609a6ea944bc384b2f90774adb2a3d0cb15f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/isSubset.d.mts @@ -0,0 +1,27 @@ +//#region src/array/isSubset.d.ts +/** + * Checks if the `subset` array is entirely contained within the `superset` array. + * + * + * @template T - The type of elements contained in the arrays. + * @param superset - The array that may contain all elements of the subset. + * @param subset - The array to check against the superset. + * @returns Returns `true` if all elements of the `subset` are present in the `superset`, otherwise returns `false`. + * + * @example + * ```typescript + * const superset = [1, 2, 3, 4, 5]; + * const subset = [2, 3, 4]; + * isSubset(superset, subset); // true + * ``` + * + * @example + * ```typescript + * const superset = ['a', 'b', 'c']; + * const subset = ['a', 'd']; + * isSubset(superset, subset); // false + * ``` + */ +declare function isSubset(superset: readonly T[], subset: readonly T[]): boolean; +//#endregion +export { isSubset }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/isSubset.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/isSubset.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e2df609a6ea944bc384b2f90774adb2a3d0cb15f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/isSubset.d.ts @@ -0,0 +1,27 @@ +//#region src/array/isSubset.d.ts +/** + * Checks if the `subset` array is entirely contained within the `superset` array. + * + * + * @template T - The type of elements contained in the arrays. + * @param superset - The array that may contain all elements of the subset. + * @param subset - The array to check against the superset. + * @returns Returns `true` if all elements of the `subset` are present in the `superset`, otherwise returns `false`. + * + * @example + * ```typescript + * const superset = [1, 2, 3, 4, 5]; + * const subset = [2, 3, 4]; + * isSubset(superset, subset); // true + * ``` + * + * @example + * ```typescript + * const superset = ['a', 'b', 'c']; + * const subset = ['a', 'd']; + * isSubset(superset, subset); // false + * ``` + */ +declare function isSubset(superset: readonly T[], subset: readonly T[]): boolean; +//#endregion +export { isSubset }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/isSubset.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/isSubset.js new file mode 100644 index 0000000000000000000000000000000000000000..b9fa8053ab27ed6abb6c48248f288c6c2a45f392 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/isSubset.js @@ -0,0 +1,30 @@ +const require_difference = require("./difference.js"); +//#region src/array/isSubset.ts +/** +* Checks if the `subset` array is entirely contained within the `superset` array. +* +* +* @template T - The type of elements contained in the arrays. +* @param superset - The array that may contain all elements of the subset. +* @param subset - The array to check against the superset. +* @returns Returns `true` if all elements of the `subset` are present in the `superset`, otherwise returns `false`. +* +* @example +* ```typescript +* const superset = [1, 2, 3, 4, 5]; +* const subset = [2, 3, 4]; +* isSubset(superset, subset); // true +* ``` +* +* @example +* ```typescript +* const superset = ['a', 'b', 'c']; +* const subset = ['a', 'd']; +* isSubset(superset, subset); // false +* ``` +*/ +function isSubset(superset, subset) { + return require_difference.difference(subset, superset).length === 0; +} +//#endregion +exports.isSubset = isSubset; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/isSubset.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/isSubset.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e8b6943dc76b5b7527a8dbbb2ad52da7eaf79af2 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/isSubset.mjs @@ -0,0 +1,30 @@ +import { difference } from "./difference.mjs"; +//#region src/array/isSubset.ts +/** +* Checks if the `subset` array is entirely contained within the `superset` array. +* +* +* @template T - The type of elements contained in the arrays. +* @param superset - The array that may contain all elements of the subset. +* @param subset - The array to check against the superset. +* @returns Returns `true` if all elements of the `subset` are present in the `superset`, otherwise returns `false`. +* +* @example +* ```typescript +* const superset = [1, 2, 3, 4, 5]; +* const subset = [2, 3, 4]; +* isSubset(superset, subset); // true +* ``` +* +* @example +* ```typescript +* const superset = ['a', 'b', 'c']; +* const subset = ['a', 'd']; +* isSubset(superset, subset); // false +* ``` +*/ +function isSubset(superset, subset) { + return difference(subset, superset).length === 0; +} +//#endregion +export { isSubset }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/isSubsetWith.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/isSubsetWith.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..1d4c3267b29dd26c1950794fdef8101a8cbc295e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/isSubsetWith.d.mts @@ -0,0 +1,34 @@ +//#region src/array/isSubsetWith.d.ts +/** + * Checks if the `subset` array is entirely contained within the `superset` array based on a custom equality function. + * + * This function takes two arrays and a custom comparison function. It returns a boolean indicating + * whether all elements in the subset array are present in the superset array, as determined by the provided + * custom equality function. + * + * @template T - The type of elements contained in the arrays. + * @param superset - The array that may contain all elements of the subset. + * @param subset - The array to check against the superset. + * @param areItemsEqual - A function to determine if two items are equal. + * @returns Returns `true` if all elements of the subset are present in the superset + * according to the custom equality function, otherwise returns `false`. + * + * @example + * ```typescript + * const superset = [{ id: 1 }, { id: 2 }, { id: 3 }]; + * const subset = [{ id: 2 }, { id: 1 }]; + * const areItemsEqual = (a, b) => a.id === b.id; + * isSubsetWith(superset, subset, areItemsEqual); // true + * ``` + * + * @example + * ```typescript + * const superset = [{ id: 1 }, { id: 2 }, { id: 3 }]; + * const subset = [{ id: 4 }]; + * const areItemsEqual = (a, b) => a.id === b.id; + * isSubsetWith(superset, subset, areItemsEqual); // false + * ``` + */ +declare function isSubsetWith(superset: readonly T[], subset: readonly T[], areItemsEqual: (x: T, y: T) => boolean): boolean; +//#endregion +export { isSubsetWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/isSubsetWith.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/isSubsetWith.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1d4c3267b29dd26c1950794fdef8101a8cbc295e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/isSubsetWith.d.ts @@ -0,0 +1,34 @@ +//#region src/array/isSubsetWith.d.ts +/** + * Checks if the `subset` array is entirely contained within the `superset` array based on a custom equality function. + * + * This function takes two arrays and a custom comparison function. It returns a boolean indicating + * whether all elements in the subset array are present in the superset array, as determined by the provided + * custom equality function. + * + * @template T - The type of elements contained in the arrays. + * @param superset - The array that may contain all elements of the subset. + * @param subset - The array to check against the superset. + * @param areItemsEqual - A function to determine if two items are equal. + * @returns Returns `true` if all elements of the subset are present in the superset + * according to the custom equality function, otherwise returns `false`. + * + * @example + * ```typescript + * const superset = [{ id: 1 }, { id: 2 }, { id: 3 }]; + * const subset = [{ id: 2 }, { id: 1 }]; + * const areItemsEqual = (a, b) => a.id === b.id; + * isSubsetWith(superset, subset, areItemsEqual); // true + * ``` + * + * @example + * ```typescript + * const superset = [{ id: 1 }, { id: 2 }, { id: 3 }]; + * const subset = [{ id: 4 }]; + * const areItemsEqual = (a, b) => a.id === b.id; + * isSubsetWith(superset, subset, areItemsEqual); // false + * ``` + */ +declare function isSubsetWith(superset: readonly T[], subset: readonly T[], areItemsEqual: (x: T, y: T) => boolean): boolean; +//#endregion +export { isSubsetWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/isSubsetWith.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/isSubsetWith.js new file mode 100644 index 0000000000000000000000000000000000000000..90437dd0a5e5cf92842cbb5567b6dfb4d59d54fd --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/isSubsetWith.js @@ -0,0 +1,37 @@ +const require_differenceWith = require("./differenceWith.js"); +//#region src/array/isSubsetWith.ts +/** +* Checks if the `subset` array is entirely contained within the `superset` array based on a custom equality function. +* +* This function takes two arrays and a custom comparison function. It returns a boolean indicating +* whether all elements in the subset array are present in the superset array, as determined by the provided +* custom equality function. +* +* @template T - The type of elements contained in the arrays. +* @param superset - The array that may contain all elements of the subset. +* @param subset - The array to check against the superset. +* @param areItemsEqual - A function to determine if two items are equal. +* @returns Returns `true` if all elements of the subset are present in the superset +* according to the custom equality function, otherwise returns `false`. +* +* @example +* ```typescript +* const superset = [{ id: 1 }, { id: 2 }, { id: 3 }]; +* const subset = [{ id: 2 }, { id: 1 }]; +* const areItemsEqual = (a, b) => a.id === b.id; +* isSubsetWith(superset, subset, areItemsEqual); // true +* ``` +* +* @example +* ```typescript +* const superset = [{ id: 1 }, { id: 2 }, { id: 3 }]; +* const subset = [{ id: 4 }]; +* const areItemsEqual = (a, b) => a.id === b.id; +* isSubsetWith(superset, subset, areItemsEqual); // false +* ``` +*/ +function isSubsetWith(superset, subset, areItemsEqual) { + return require_differenceWith.differenceWith(subset, superset, areItemsEqual).length === 0; +} +//#endregion +exports.isSubsetWith = isSubsetWith; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/isSubsetWith.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/isSubsetWith.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b87e027b2f58bbe6f662e420edbc7962a7684cdc --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/isSubsetWith.mjs @@ -0,0 +1,37 @@ +import { differenceWith } from "./differenceWith.mjs"; +//#region src/array/isSubsetWith.ts +/** +* Checks if the `subset` array is entirely contained within the `superset` array based on a custom equality function. +* +* This function takes two arrays and a custom comparison function. It returns a boolean indicating +* whether all elements in the subset array are present in the superset array, as determined by the provided +* custom equality function. +* +* @template T - The type of elements contained in the arrays. +* @param superset - The array that may contain all elements of the subset. +* @param subset - The array to check against the superset. +* @param areItemsEqual - A function to determine if two items are equal. +* @returns Returns `true` if all elements of the subset are present in the superset +* according to the custom equality function, otherwise returns `false`. +* +* @example +* ```typescript +* const superset = [{ id: 1 }, { id: 2 }, { id: 3 }]; +* const subset = [{ id: 2 }, { id: 1 }]; +* const areItemsEqual = (a, b) => a.id === b.id; +* isSubsetWith(superset, subset, areItemsEqual); // true +* ``` +* +* @example +* ```typescript +* const superset = [{ id: 1 }, { id: 2 }, { id: 3 }]; +* const subset = [{ id: 4 }]; +* const areItemsEqual = (a, b) => a.id === b.id; +* isSubsetWith(superset, subset, areItemsEqual); // false +* ``` +*/ +function isSubsetWith(superset, subset, areItemsEqual) { + return differenceWith(subset, superset, areItemsEqual).length === 0; +} +//#endregion +export { isSubsetWith }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/keyBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/keyBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..18da996c2d300baadb91b830c1f4414e1ed5e6a1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/keyBy.d.mts @@ -0,0 +1,37 @@ +//#region src/array/keyBy.d.ts +/** + * Maps each element of an array based on a provided key-generating function. + * + * This function takes an array and a function that generates a key from each element. It returns + * an object where the keys are the generated keys and the values are the corresponding elements. + * If there are multiple elements generating the same key, the last element among them is used + * as the value. + * + * @template T - The type of elements in the array. + * @template K - The type of keys. + * @param arr - The array of elements to be mapped. + * @param getKeyFromItem - A function that generates a key from an element, its index, and the array. + * @returns An object where keys are mapped to each element of an array. + * + * @example + * const array = [ + * { category: 'fruit', name: 'apple' }, + * { category: 'fruit', name: 'banana' }, + * { category: 'vegetable', name: 'carrot' } + * ]; + * const result = keyBy(array, item => item.category); + * // result will be: + * // { + * // fruit: { category: 'fruit', name: 'banana' }, + * // vegetable: { category: 'vegetable', name: 'carrot' } + * // } + * + * @example + * // Using index parameter + * const items = ['a', 'b', 'c']; + * const result = keyBy(items, (item, index) => index); + * // result will be: { 0: 'a', 1: 'b', 2: 'c' } + */ +declare function keyBy(arr: readonly T[], getKeyFromItem: (item: T, index: number, array: readonly T[]) => K): Record; +//#endregion +export { keyBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/keyBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/keyBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..18da996c2d300baadb91b830c1f4414e1ed5e6a1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/keyBy.d.ts @@ -0,0 +1,37 @@ +//#region src/array/keyBy.d.ts +/** + * Maps each element of an array based on a provided key-generating function. + * + * This function takes an array and a function that generates a key from each element. It returns + * an object where the keys are the generated keys and the values are the corresponding elements. + * If there are multiple elements generating the same key, the last element among them is used + * as the value. + * + * @template T - The type of elements in the array. + * @template K - The type of keys. + * @param arr - The array of elements to be mapped. + * @param getKeyFromItem - A function that generates a key from an element, its index, and the array. + * @returns An object where keys are mapped to each element of an array. + * + * @example + * const array = [ + * { category: 'fruit', name: 'apple' }, + * { category: 'fruit', name: 'banana' }, + * { category: 'vegetable', name: 'carrot' } + * ]; + * const result = keyBy(array, item => item.category); + * // result will be: + * // { + * // fruit: { category: 'fruit', name: 'banana' }, + * // vegetable: { category: 'vegetable', name: 'carrot' } + * // } + * + * @example + * // Using index parameter + * const items = ['a', 'b', 'c']; + * const result = keyBy(items, (item, index) => index); + * // result will be: { 0: 'a', 1: 'b', 2: 'c' } + */ +declare function keyBy(arr: readonly T[], getKeyFromItem: (item: T, index: number, array: readonly T[]) => K): Record; +//#endregion +export { keyBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/keyBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/keyBy.js new file mode 100644 index 0000000000000000000000000000000000000000..23683d57c2df2ad9bfc87a38c4e1035db036ba94 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/keyBy.js @@ -0,0 +1,45 @@ +//#region src/array/keyBy.ts +/** +* Maps each element of an array based on a provided key-generating function. +* +* This function takes an array and a function that generates a key from each element. It returns +* an object where the keys are the generated keys and the values are the corresponding elements. +* If there are multiple elements generating the same key, the last element among them is used +* as the value. +* +* @template T - The type of elements in the array. +* @template K - The type of keys. +* @param arr - The array of elements to be mapped. +* @param getKeyFromItem - A function that generates a key from an element, its index, and the array. +* @returns An object where keys are mapped to each element of an array. +* +* @example +* const array = [ +* { category: 'fruit', name: 'apple' }, +* { category: 'fruit', name: 'banana' }, +* { category: 'vegetable', name: 'carrot' } +* ]; +* const result = keyBy(array, item => item.category); +* // result will be: +* // { +* // fruit: { category: 'fruit', name: 'banana' }, +* // vegetable: { category: 'vegetable', name: 'carrot' } +* // } +* +* @example +* // Using index parameter +* const items = ['a', 'b', 'c']; +* const result = keyBy(items, (item, index) => index); +* // result will be: { 0: 'a', 1: 'b', 2: 'c' } +*/ +function keyBy(arr, getKeyFromItem) { + const result = {}; + for (let i = 0; i < arr.length; i++) { + const item = arr[i]; + const key = getKeyFromItem(item, i, arr); + result[key] = item; + } + return result; +} +//#endregion +exports.keyBy = keyBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/keyBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/keyBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..50f2f3a49f4e0dae308c94b8c40ec83697e5f351 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/keyBy.mjs @@ -0,0 +1,45 @@ +//#region src/array/keyBy.ts +/** +* Maps each element of an array based on a provided key-generating function. +* +* This function takes an array and a function that generates a key from each element. It returns +* an object where the keys are the generated keys and the values are the corresponding elements. +* If there are multiple elements generating the same key, the last element among them is used +* as the value. +* +* @template T - The type of elements in the array. +* @template K - The type of keys. +* @param arr - The array of elements to be mapped. +* @param getKeyFromItem - A function that generates a key from an element, its index, and the array. +* @returns An object where keys are mapped to each element of an array. +* +* @example +* const array = [ +* { category: 'fruit', name: 'apple' }, +* { category: 'fruit', name: 'banana' }, +* { category: 'vegetable', name: 'carrot' } +* ]; +* const result = keyBy(array, item => item.category); +* // result will be: +* // { +* // fruit: { category: 'fruit', name: 'banana' }, +* // vegetable: { category: 'vegetable', name: 'carrot' } +* // } +* +* @example +* // Using index parameter +* const items = ['a', 'b', 'c']; +* const result = keyBy(items, (item, index) => index); +* // result will be: { 0: 'a', 1: 'b', 2: 'c' } +*/ +function keyBy(arr, getKeyFromItem) { + const result = {}; + for (let i = 0; i < arr.length; i++) { + const item = arr[i]; + const key = getKeyFromItem(item, i, arr); + result[key] = item; + } + return result; +} +//#endregion +export { keyBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/last.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/last.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..833d72c3d62767123a16a9de10d80c344e49eb35 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/last.d.mts @@ -0,0 +1,49 @@ +//#region src/array/last.d.ts +/** + * Returns the last element of an array. + * + * This function takes an array and returns the last element of the array. + * If the array is empty, the function returns `undefined`. + * + * Unlike some implementations, this function is optimized for performance + * by directly accessing the last index of the array. + * + * @template T - The type of elements in the array. + * @param arr - The array from which to get the last element. + * @returns The last element of the array, or `undefined` if the array is empty. + * + * @example + * const arr = [1, 2, 3]; + * const lastElement = last(arr); + * // lastElement will be 3 + * + * const emptyArr: number[] = []; + * const noElement = last(emptyArr); + * // noElement will be undefined + */ +declare function last(arr: readonly [...T[], T]): T; +/** + * Returns the last element of an array. + * + * This function takes an array and returns the last element of the array. + * If the array is empty, the function returns `undefined`. + * + * Unlike some implementations, this function is optimized for performance + * by directly accessing the last index of the array. + * + * @template T - The type of elements in the array. + * @param arr - The array from which to get the last element. + * @returns The last element of the array, or `undefined` if the array is empty. + * + * @example + * const arr = [1, 2, 3]; + * const lastElement = last(arr); + * // lastElement will be 3 + * + * const emptyArr: number[] = []; + * const noElement = last(emptyArr); + * // noElement will be undefined + */ +declare function last(arr: readonly T[]): T | undefined; +//#endregion +export { last }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/last.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/last.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..833d72c3d62767123a16a9de10d80c344e49eb35 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/last.d.ts @@ -0,0 +1,49 @@ +//#region src/array/last.d.ts +/** + * Returns the last element of an array. + * + * This function takes an array and returns the last element of the array. + * If the array is empty, the function returns `undefined`. + * + * Unlike some implementations, this function is optimized for performance + * by directly accessing the last index of the array. + * + * @template T - The type of elements in the array. + * @param arr - The array from which to get the last element. + * @returns The last element of the array, or `undefined` if the array is empty. + * + * @example + * const arr = [1, 2, 3]; + * const lastElement = last(arr); + * // lastElement will be 3 + * + * const emptyArr: number[] = []; + * const noElement = last(emptyArr); + * // noElement will be undefined + */ +declare function last(arr: readonly [...T[], T]): T; +/** + * Returns the last element of an array. + * + * This function takes an array and returns the last element of the array. + * If the array is empty, the function returns `undefined`. + * + * Unlike some implementations, this function is optimized for performance + * by directly accessing the last index of the array. + * + * @template T - The type of elements in the array. + * @param arr - The array from which to get the last element. + * @returns The last element of the array, or `undefined` if the array is empty. + * + * @example + * const arr = [1, 2, 3]; + * const lastElement = last(arr); + * // lastElement will be 3 + * + * const emptyArr: number[] = []; + * const noElement = last(emptyArr); + * // noElement will be undefined + */ +declare function last(arr: readonly T[]): T | undefined; +//#endregion +export { last }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/last.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/last.js new file mode 100644 index 0000000000000000000000000000000000000000..ba55267b81e57e2cc7be11cec3151cc3d0d941a9 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/last.js @@ -0,0 +1,28 @@ +//#region src/array/last.ts +/** +* Returns the last element of an array. +* +* This function takes an array and returns the last element of the array. +* If the array is empty, the function returns `undefined`. +* +* Unlike some implementations, this function is optimized for performance +* by directly accessing the last index of the array. +* +* @template T - The type of elements in the array. +* @param arr - The array from which to get the last element. +* @returns The last element of the array, or `undefined` if the array is empty. +* +* @example +* const arr = [1, 2, 3]; +* const lastElement = last(arr); +* // lastElement will be 3 +* +* const emptyArr: number[] = []; +* const noElement = last(emptyArr); +* // noElement will be undefined +*/ +function last(arr) { + return arr[arr.length - 1]; +} +//#endregion +exports.last = last; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/last.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/last.mjs new file mode 100644 index 0000000000000000000000000000000000000000..2d8d5ba576bbc0f5f943e7a20cc280621d274ae9 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/last.mjs @@ -0,0 +1,28 @@ +//#region src/array/last.ts +/** +* Returns the last element of an array. +* +* This function takes an array and returns the last element of the array. +* If the array is empty, the function returns `undefined`. +* +* Unlike some implementations, this function is optimized for performance +* by directly accessing the last index of the array. +* +* @template T - The type of elements in the array. +* @param arr - The array from which to get the last element. +* @returns The last element of the array, or `undefined` if the array is empty. +* +* @example +* const arr = [1, 2, 3]; +* const lastElement = last(arr); +* // lastElement will be 3 +* +* const emptyArr: number[] = []; +* const noElement = last(emptyArr); +* // noElement will be undefined +*/ +function last(arr) { + return arr[arr.length - 1]; +} +//#endregion +export { last }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/limitAsync.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/limitAsync.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..4a8ca61739addfafd3a930754f87a3598f59825e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/limitAsync.d.mts @@ -0,0 +1,11 @@ +import { limitAsync as limitAsync$1 } from "../promise/limitAsync.mjs"; + +//#region src/array/limitAsync.d.ts +/** + * Wraps an async function to limit the number of concurrent executions. + * + * @deprecated Use `limitAsync` from `es-toolkit/promise` instead. This export will be removed from `es-toolkit/array` in a future major version. + */ +declare const limitAsync: typeof limitAsync$1; +//#endregion +export { limitAsync }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/limitAsync.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/limitAsync.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..fa66b07df751b79da1c599f488c1b340347993c8 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/limitAsync.d.ts @@ -0,0 +1,11 @@ +import { limitAsync as limitAsync$1 } from "../promise/limitAsync.js"; + +//#region src/array/limitAsync.d.ts +/** + * Wraps an async function to limit the number of concurrent executions. + * + * @deprecated Use `limitAsync` from `es-toolkit/promise` instead. This export will be removed from `es-toolkit/array` in a future major version. + */ +declare const limitAsync: typeof limitAsync$1; +//#endregion +export { limitAsync }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/limitAsync.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/limitAsync.js new file mode 100644 index 0000000000000000000000000000000000000000..e5d497c349bd165d9eef13d80ef6115c842f2dbf --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/limitAsync.js @@ -0,0 +1,9 @@ +//#region src/array/limitAsync.ts +/** +* Wraps an async function to limit the number of concurrent executions. +* +* @deprecated Use `limitAsync` from `es-toolkit/promise` instead. This export will be removed from `es-toolkit/array` in a future major version. +*/ +const limitAsync = require("../promise/limitAsync.js").limitAsync; +//#endregion +exports.limitAsync = limitAsync; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/limitAsync.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/limitAsync.mjs new file mode 100644 index 0000000000000000000000000000000000000000..65a510afcdfc5813d5daaa9dcf8902d77157b649 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/limitAsync.mjs @@ -0,0 +1,10 @@ +import { limitAsync as limitAsync$1 } from "../promise/limitAsync.mjs"; +//#region src/array/limitAsync.ts +/** +* Wraps an async function to limit the number of concurrent executions. +* +* @deprecated Use `limitAsync` from `es-toolkit/promise` instead. This export will be removed from `es-toolkit/array` in a future major version. +*/ +const limitAsync = limitAsync$1; +//#endregion +export { limitAsync }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/mapAsync.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/mapAsync.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..370dc58c64abab1fd1d07948c2065e0d035fffd7 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/mapAsync.d.mts @@ -0,0 +1,35 @@ +//#region src/array/mapAsync.d.ts +interface MapAsyncOptions { + concurrency?: number; +} +/** + * Transforms each element in an array using an async callback function and returns + * a promise that resolves to an array of transformed values. + * + * @template T - The type of elements in the input array. + * @template R - The type of elements in the output array. + * @param array The array to transform. + * @param callback An async function that transforms each element. + * @param [options] Optional configuration object. + * @param [options.concurrency] Maximum number of concurrent async operations. If not specified, all operations run concurrently. + * @returns A promise that resolves to an array of transformed values. + * @example + * const users = [{ id: 1 }, { id: 2 }, { id: 3 }]; + * const userDetails = await mapAsync(users, async (user) => { + * return await fetchUserDetails(user.id); + * }); + * // Returns: [{ id: 1, name: '...' }, { id: 2, name: '...' }, { id: 3, name: '...' }] + * + * @example + * // With concurrency limit + * const numbers = [1, 2, 3, 4, 5]; + * const results = await mapAsync( + * numbers, + * async (n) => await slowOperation(n), + * { concurrency: 2 } + * ); + * // Processes at most 2 operations concurrently + */ +declare function mapAsync(array: readonly T[], callback: (item: T, index: number, array: readonly T[]) => Promise, options?: MapAsyncOptions): Promise; +//#endregion +export { mapAsync }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/mapAsync.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/mapAsync.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..370dc58c64abab1fd1d07948c2065e0d035fffd7 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/mapAsync.d.ts @@ -0,0 +1,35 @@ +//#region src/array/mapAsync.d.ts +interface MapAsyncOptions { + concurrency?: number; +} +/** + * Transforms each element in an array using an async callback function and returns + * a promise that resolves to an array of transformed values. + * + * @template T - The type of elements in the input array. + * @template R - The type of elements in the output array. + * @param array The array to transform. + * @param callback An async function that transforms each element. + * @param [options] Optional configuration object. + * @param [options.concurrency] Maximum number of concurrent async operations. If not specified, all operations run concurrently. + * @returns A promise that resolves to an array of transformed values. + * @example + * const users = [{ id: 1 }, { id: 2 }, { id: 3 }]; + * const userDetails = await mapAsync(users, async (user) => { + * return await fetchUserDetails(user.id); + * }); + * // Returns: [{ id: 1, name: '...' }, { id: 2, name: '...' }, { id: 3, name: '...' }] + * + * @example + * // With concurrency limit + * const numbers = [1, 2, 3, 4, 5]; + * const results = await mapAsync( + * numbers, + * async (n) => await slowOperation(n), + * { concurrency: 2 } + * ); + * // Processes at most 2 operations concurrently + */ +declare function mapAsync(array: readonly T[], callback: (item: T, index: number, array: readonly T[]) => Promise, options?: MapAsyncOptions): Promise; +//#endregion +export { mapAsync }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/mapAsync.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/mapAsync.js new file mode 100644 index 0000000000000000000000000000000000000000..e6227c099fe55a762566a28f4c5cd51d38b29577 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/mapAsync.js @@ -0,0 +1,36 @@ +const require_limitAsync = require("../promise/limitAsync.js"); +//#region src/array/mapAsync.ts +/** +* Transforms each element in an array using an async callback function and returns +* a promise that resolves to an array of transformed values. +* +* @template T - The type of elements in the input array. +* @template R - The type of elements in the output array. +* @param array The array to transform. +* @param callback An async function that transforms each element. +* @param [options] Optional configuration object. +* @param [options.concurrency] Maximum number of concurrent async operations. If not specified, all operations run concurrently. +* @returns A promise that resolves to an array of transformed values. +* @example +* const users = [{ id: 1 }, { id: 2 }, { id: 3 }]; +* const userDetails = await mapAsync(users, async (user) => { +* return await fetchUserDetails(user.id); +* }); +* // Returns: [{ id: 1, name: '...' }, { id: 2, name: '...' }, { id: 3, name: '...' }] +* +* @example +* // With concurrency limit +* const numbers = [1, 2, 3, 4, 5]; +* const results = await mapAsync( +* numbers, +* async (n) => await slowOperation(n), +* { concurrency: 2 } +* ); +* // Processes at most 2 operations concurrently +*/ +function mapAsync(array, callback, options) { + if (options?.concurrency != null) callback = require_limitAsync.limitAsync(callback, options.concurrency); + return Promise.all(array.map(callback)); +} +//#endregion +exports.mapAsync = mapAsync; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/mapAsync.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/mapAsync.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d7d315b33809334a6f0e320161b1b57aff41ea46 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/mapAsync.mjs @@ -0,0 +1,36 @@ +import { limitAsync } from "../promise/limitAsync.mjs"; +//#region src/array/mapAsync.ts +/** +* Transforms each element in an array using an async callback function and returns +* a promise that resolves to an array of transformed values. +* +* @template T - The type of elements in the input array. +* @template R - The type of elements in the output array. +* @param array The array to transform. +* @param callback An async function that transforms each element. +* @param [options] Optional configuration object. +* @param [options.concurrency] Maximum number of concurrent async operations. If not specified, all operations run concurrently. +* @returns A promise that resolves to an array of transformed values. +* @example +* const users = [{ id: 1 }, { id: 2 }, { id: 3 }]; +* const userDetails = await mapAsync(users, async (user) => { +* return await fetchUserDetails(user.id); +* }); +* // Returns: [{ id: 1, name: '...' }, { id: 2, name: '...' }, { id: 3, name: '...' }] +* +* @example +* // With concurrency limit +* const numbers = [1, 2, 3, 4, 5]; +* const results = await mapAsync( +* numbers, +* async (n) => await slowOperation(n), +* { concurrency: 2 } +* ); +* // Processes at most 2 operations concurrently +*/ +function mapAsync(array, callback, options) { + if (options?.concurrency != null) callback = limitAsync(callback, options.concurrency); + return Promise.all(array.map(callback)); +} +//#endregion +export { mapAsync }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/maxBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/maxBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..c654d169763a20c51f3d50e52b1c11d02c169697 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/maxBy.d.mts @@ -0,0 +1,48 @@ +//#region src/array/maxBy.d.ts +/** + * Finds the element in an array that has the maximum value when applying + * the `getValue` function to each element. + * + * @template T - The type of elements in the array. + * @param items The nonempty array of elements to search. + * @param getValue A function that selects a numeric value from each element. + * @returns The element with the maximum value as determined by the `getValue` function. + * @example + * maxBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 3 } + * maxBy([], x => x.a); // Returns: undefined + * maxBy([3, NaN, 1], x => x); // Returns: NaN (NaN propagates, matching Math.max) + * maxBy( + * [ + * { name: 'john', age: 30 }, + * { name: 'jane', age: 28 }, + * { name: 'joe', age: 26 }, + * ], + * x => x.age + * ); // Returns: { name: 'john', age: 30 } + */ +declare function maxBy(items: readonly [T, ...T[]], getValue: (element: T, index: number, array: readonly T[]) => number): T; +/** + * Finds the element in an array that has the maximum value when applying + * the `getValue` function to each element. + * + * @template T - The type of elements in the array. + * @param items The array of elements to search. + * @param getValue A function that selects a numeric value from each element. + * @returns The element with the maximum value as determined by the `getValue` function, + * or `undefined` if the array is empty. + * @example + * maxBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 3 } + * maxBy([], x => x.a); // Returns: undefined + * maxBy([3, NaN, 1], x => x); // Returns: NaN (NaN propagates, matching Math.max) + * maxBy( + * [ + * { name: 'john', age: 30 }, + * { name: 'jane', age: 28 }, + * { name: 'joe', age: 26 }, + * ], + * x => x.age + * ); // Returns: { name: 'john', age: 30 } + */ +declare function maxBy(items: readonly T[], getValue: (element: T, index: number, array: readonly T[]) => number): T | undefined; +//#endregion +export { maxBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/maxBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/maxBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c654d169763a20c51f3d50e52b1c11d02c169697 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/maxBy.d.ts @@ -0,0 +1,48 @@ +//#region src/array/maxBy.d.ts +/** + * Finds the element in an array that has the maximum value when applying + * the `getValue` function to each element. + * + * @template T - The type of elements in the array. + * @param items The nonempty array of elements to search. + * @param getValue A function that selects a numeric value from each element. + * @returns The element with the maximum value as determined by the `getValue` function. + * @example + * maxBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 3 } + * maxBy([], x => x.a); // Returns: undefined + * maxBy([3, NaN, 1], x => x); // Returns: NaN (NaN propagates, matching Math.max) + * maxBy( + * [ + * { name: 'john', age: 30 }, + * { name: 'jane', age: 28 }, + * { name: 'joe', age: 26 }, + * ], + * x => x.age + * ); // Returns: { name: 'john', age: 30 } + */ +declare function maxBy(items: readonly [T, ...T[]], getValue: (element: T, index: number, array: readonly T[]) => number): T; +/** + * Finds the element in an array that has the maximum value when applying + * the `getValue` function to each element. + * + * @template T - The type of elements in the array. + * @param items The array of elements to search. + * @param getValue A function that selects a numeric value from each element. + * @returns The element with the maximum value as determined by the `getValue` function, + * or `undefined` if the array is empty. + * @example + * maxBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 3 } + * maxBy([], x => x.a); // Returns: undefined + * maxBy([3, NaN, 1], x => x); // Returns: NaN (NaN propagates, matching Math.max) + * maxBy( + * [ + * { name: 'john', age: 30 }, + * { name: 'jane', age: 28 }, + * { name: 'joe', age: 26 }, + * ], + * x => x.age + * ); // Returns: { name: 'john', age: 30 } + */ +declare function maxBy(items: readonly T[], getValue: (element: T, index: number, array: readonly T[]) => number): T | undefined; +//#endregion +export { maxBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/maxBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/maxBy.js new file mode 100644 index 0000000000000000000000000000000000000000..47558ecee62cd214c22c3886d85be529e639a2e0 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/maxBy.js @@ -0,0 +1,40 @@ +//#region src/array/maxBy.ts +/** +* Finds the element in an array that has the maximum value when applying +* the `getValue` function to each element. +* +* @template T - The type of elements in the array. +* @param items The array of elements to search. +* @param getValue A function that selects a numeric value from each element. +* @returns The element with the maximum value as determined by the `getValue` function, +* or `undefined` if the array is empty. +* @example +* maxBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 3 } +* maxBy([], x => x.a); // Returns: undefined +* maxBy([3, NaN, 1], x => x); // Returns: NaN (NaN propagates, matching Math.max) +* maxBy( +* [ +* { name: 'john', age: 30 }, +* { name: 'jane', age: 28 }, +* { name: 'joe', age: 26 }, +* ], +* x => x.age +* ); // Returns: { name: 'john', age: 30 } +*/ +function maxBy(items, getValue) { + if (items.length === 0) return; + let maxElement = items[0]; + let max = -Infinity; + for (let i = 0; i < items.length; i++) { + const element = items[i]; + const value = getValue(element, i, items); + if (Number.isNaN(value)) return element; + if (value > max) { + max = value; + maxElement = element; + } + } + return maxElement; +} +//#endregion +exports.maxBy = maxBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/maxBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/maxBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b7d2018223c1e585fad16f980bc2b7c9b746b287 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/maxBy.mjs @@ -0,0 +1,40 @@ +//#region src/array/maxBy.ts +/** +* Finds the element in an array that has the maximum value when applying +* the `getValue` function to each element. +* +* @template T - The type of elements in the array. +* @param items The array of elements to search. +* @param getValue A function that selects a numeric value from each element. +* @returns The element with the maximum value as determined by the `getValue` function, +* or `undefined` if the array is empty. +* @example +* maxBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 3 } +* maxBy([], x => x.a); // Returns: undefined +* maxBy([3, NaN, 1], x => x); // Returns: NaN (NaN propagates, matching Math.max) +* maxBy( +* [ +* { name: 'john', age: 30 }, +* { name: 'jane', age: 28 }, +* { name: 'joe', age: 26 }, +* ], +* x => x.age +* ); // Returns: { name: 'john', age: 30 } +*/ +function maxBy(items, getValue) { + if (items.length === 0) return; + let maxElement = items[0]; + let max = -Infinity; + for (let i = 0; i < items.length; i++) { + const element = items[i]; + const value = getValue(element, i, items); + if (Number.isNaN(value)) return element; + if (value > max) { + max = value; + maxElement = element; + } + } + return maxElement; +} +//#endregion +export { maxBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/minBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/minBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..6e3d214ab30df5583341129e66a21923be0dcfda --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/minBy.d.mts @@ -0,0 +1,48 @@ +//#region src/array/minBy.d.ts +/** + * Finds the element in an array that has the minimum value when applying + * the `getValue` function to each element. + * + * @template T - The type of elements in the array. + * @param items The nonempty array of elements to search. + * @param getValue A function that selects a numeric value from each element. + * @returns The element with the minimum value as determined by the `getValue` function. + * @example + * minBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 1 } + * minBy([], x => x.a); // Returns: undefined + * minBy([3, NaN, 1], x => x); // Returns: NaN (NaN propagates, matching Math.min) + * minBy( + * [ + * { name: 'john', age: 30 }, + * { name: 'jane', age: 28 }, + * { name: 'joe', age: 26 }, + * ], + * x => x.age + * ); // Returns: { name: 'joe', age: 26 } + */ +declare function minBy(items: readonly [T, ...T[]], getValue: (element: T, index: number, array: readonly T[]) => number): T; +/** + * Finds the element in an array that has the minimum value when applying + * the `getValue` function to each element. + * + * @template T - The type of elements in the array. + * @param items The array of elements to search. + * @param getValue A function that selects a numeric value from each element. + * @returns The element with the minimum value as determined by the `getValue` function, + * or `undefined` if the array is empty. + * @example + * minBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 1 } + * minBy([], x => x.a); // Returns: undefined + * minBy([3, NaN, 1], x => x); // Returns: NaN (NaN propagates, matching Math.min) + * minBy( + * [ + * { name: 'john', age: 30 }, + * { name: 'jane', age: 28 }, + * { name: 'joe', age: 26 }, + * ], + * x => x.age + * ); // Returns: { name: 'joe', age: 26 } + */ +declare function minBy(items: readonly T[], getValue: (element: T, index: number, array: readonly T[]) => number): T | undefined; +//#endregion +export { minBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/minBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/minBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6e3d214ab30df5583341129e66a21923be0dcfda --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/minBy.d.ts @@ -0,0 +1,48 @@ +//#region src/array/minBy.d.ts +/** + * Finds the element in an array that has the minimum value when applying + * the `getValue` function to each element. + * + * @template T - The type of elements in the array. + * @param items The nonempty array of elements to search. + * @param getValue A function that selects a numeric value from each element. + * @returns The element with the minimum value as determined by the `getValue` function. + * @example + * minBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 1 } + * minBy([], x => x.a); // Returns: undefined + * minBy([3, NaN, 1], x => x); // Returns: NaN (NaN propagates, matching Math.min) + * minBy( + * [ + * { name: 'john', age: 30 }, + * { name: 'jane', age: 28 }, + * { name: 'joe', age: 26 }, + * ], + * x => x.age + * ); // Returns: { name: 'joe', age: 26 } + */ +declare function minBy(items: readonly [T, ...T[]], getValue: (element: T, index: number, array: readonly T[]) => number): T; +/** + * Finds the element in an array that has the minimum value when applying + * the `getValue` function to each element. + * + * @template T - The type of elements in the array. + * @param items The array of elements to search. + * @param getValue A function that selects a numeric value from each element. + * @returns The element with the minimum value as determined by the `getValue` function, + * or `undefined` if the array is empty. + * @example + * minBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 1 } + * minBy([], x => x.a); // Returns: undefined + * minBy([3, NaN, 1], x => x); // Returns: NaN (NaN propagates, matching Math.min) + * minBy( + * [ + * { name: 'john', age: 30 }, + * { name: 'jane', age: 28 }, + * { name: 'joe', age: 26 }, + * ], + * x => x.age + * ); // Returns: { name: 'joe', age: 26 } + */ +declare function minBy(items: readonly T[], getValue: (element: T, index: number, array: readonly T[]) => number): T | undefined; +//#endregion +export { minBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/minBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/minBy.js new file mode 100644 index 0000000000000000000000000000000000000000..3ac4f43aaecc3e8c06502634b2ccae39bda65e36 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/minBy.js @@ -0,0 +1,40 @@ +//#region src/array/minBy.ts +/** +* Finds the element in an array that has the minimum value when applying +* the `getValue` function to each element. +* +* @template T - The type of elements in the array. +* @param items The array of elements to search. +* @param getValue A function that selects a numeric value from each element. +* @returns The element with the minimum value as determined by the `getValue` function, +* or `undefined` if the array is empty. +* @example +* minBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 1 } +* minBy([], x => x.a); // Returns: undefined +* minBy([3, NaN, 1], x => x); // Returns: NaN (NaN propagates, matching Math.min) +* minBy( +* [ +* { name: 'john', age: 30 }, +* { name: 'jane', age: 28 }, +* { name: 'joe', age: 26 }, +* ], +* x => x.age +* ); // Returns: { name: 'joe', age: 26 } +*/ +function minBy(items, getValue) { + if (items.length === 0) return; + let minElement = items[0]; + let min = Infinity; + for (let i = 0; i < items.length; i++) { + const element = items[i]; + const value = getValue(element, i, items); + if (Number.isNaN(value)) return element; + if (value < min) { + min = value; + minElement = element; + } + } + return minElement; +} +//#endregion +exports.minBy = minBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/minBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/minBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..5d3913e8289cce9cd150e8784f39128017c873d9 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/minBy.mjs @@ -0,0 +1,40 @@ +//#region src/array/minBy.ts +/** +* Finds the element in an array that has the minimum value when applying +* the `getValue` function to each element. +* +* @template T - The type of elements in the array. +* @param items The array of elements to search. +* @param getValue A function that selects a numeric value from each element. +* @returns The element with the minimum value as determined by the `getValue` function, +* or `undefined` if the array is empty. +* @example +* minBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 1 } +* minBy([], x => x.a); // Returns: undefined +* minBy([3, NaN, 1], x => x); // Returns: NaN (NaN propagates, matching Math.min) +* minBy( +* [ +* { name: 'john', age: 30 }, +* { name: 'jane', age: 28 }, +* { name: 'joe', age: 26 }, +* ], +* x => x.age +* ); // Returns: { name: 'joe', age: 26 } +*/ +function minBy(items, getValue) { + if (items.length === 0) return; + let minElement = items[0]; + let min = Infinity; + for (let i = 0; i < items.length; i++) { + const element = items[i]; + const value = getValue(element, i, items); + if (Number.isNaN(value)) return element; + if (value < min) { + min = value; + minElement = element; + } + } + return minElement; +} +//#endregion +export { minBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/orderBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/orderBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..3a7c02042b23191192aeff2ce2c94f26c597a6af --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/orderBy.d.mts @@ -0,0 +1,38 @@ +//#region src/array/orderBy.d.ts +/** + * Sorts an array of objects based on the given `criteria` and their corresponding order directions. + * + * - If you provide keys, it sorts the objects by the values of those keys. + * - If you provide functions, it sorts based on the values returned by those functions. + * + * The function returns the array of objects sorted in corresponding order directions. + * If two objects have the same value for the current criterion, it uses the next criterion to determine their order. + * If the number of orders is less than the number of criteria, it uses the last order for the rest of the criteria. + * + * @template T - The type of elements in the array. + * @param arr - The array of objects to be sorted. + * @param criteria - The criteria for sorting. This can be an array of object keys or functions that return values used for sorting. + * @param orders - An array of order directions ('asc' for ascending or 'desc' for descending). + * @returns The sorted array. + * + * @example + * // Sort an array of objects by 'user' in ascending order and 'age' in descending order. + * const users = [ + * { user: 'fred', age: 48 }, + * { user: 'barney', age: 34 }, + * { user: 'fred', age: 40 }, + * { user: 'barney', age: 36 }, + * ]; + * + * const result = orderBy(users, [obj => obj.user, 'age'], ['asc', 'desc']); + * // result will be: + * // [ + * // { user: 'barney', age: 36 }, + * // { user: 'barney', age: 34 }, + * // { user: 'fred', age: 48 }, + * // { user: 'fred', age: 40 }, + * // ] + */ +declare function orderBy(arr: readonly T[], criteria: ReadonlyArray<((item: T) => unknown) | keyof T>, orders: ReadonlyArray<'asc' | 'desc'>): T[]; +//#endregion +export { orderBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/orderBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/orderBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3a7c02042b23191192aeff2ce2c94f26c597a6af --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/orderBy.d.ts @@ -0,0 +1,38 @@ +//#region src/array/orderBy.d.ts +/** + * Sorts an array of objects based on the given `criteria` and their corresponding order directions. + * + * - If you provide keys, it sorts the objects by the values of those keys. + * - If you provide functions, it sorts based on the values returned by those functions. + * + * The function returns the array of objects sorted in corresponding order directions. + * If two objects have the same value for the current criterion, it uses the next criterion to determine their order. + * If the number of orders is less than the number of criteria, it uses the last order for the rest of the criteria. + * + * @template T - The type of elements in the array. + * @param arr - The array of objects to be sorted. + * @param criteria - The criteria for sorting. This can be an array of object keys or functions that return values used for sorting. + * @param orders - An array of order directions ('asc' for ascending or 'desc' for descending). + * @returns The sorted array. + * + * @example + * // Sort an array of objects by 'user' in ascending order and 'age' in descending order. + * const users = [ + * { user: 'fred', age: 48 }, + * { user: 'barney', age: 34 }, + * { user: 'fred', age: 40 }, + * { user: 'barney', age: 36 }, + * ]; + * + * const result = orderBy(users, [obj => obj.user, 'age'], ['asc', 'desc']); + * // result will be: + * // [ + * // { user: 'barney', age: 36 }, + * // { user: 'barney', age: 34 }, + * // { user: 'fred', age: 48 }, + * // { user: 'fred', age: 40 }, + * // ] + */ +declare function orderBy(arr: readonly T[], criteria: ReadonlyArray<((item: T) => unknown) | keyof T>, orders: ReadonlyArray<'asc' | 'desc'>): T[]; +//#endregion +export { orderBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/orderBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/orderBy.js new file mode 100644 index 0000000000000000000000000000000000000000..6f211317ed1f39c56b49b6767108d8ad323b1289 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/orderBy.js @@ -0,0 +1,53 @@ +const require_compareValues = require("../_internal/compareValues.js"); +//#region src/array/orderBy.ts +/** +* Sorts an array of objects based on the given `criteria` and their corresponding order directions. +* +* - If you provide keys, it sorts the objects by the values of those keys. +* - If you provide functions, it sorts based on the values returned by those functions. +* +* The function returns the array of objects sorted in corresponding order directions. +* If two objects have the same value for the current criterion, it uses the next criterion to determine their order. +* If the number of orders is less than the number of criteria, it uses the last order for the rest of the criteria. +* +* @template T - The type of elements in the array. +* @param arr - The array of objects to be sorted. +* @param criteria - The criteria for sorting. This can be an array of object keys or functions that return values used for sorting. +* @param orders - An array of order directions ('asc' for ascending or 'desc' for descending). +* @returns The sorted array. +* +* @example +* // Sort an array of objects by 'user' in ascending order and 'age' in descending order. +* const users = [ +* { user: 'fred', age: 48 }, +* { user: 'barney', age: 34 }, +* { user: 'fred', age: 40 }, +* { user: 'barney', age: 36 }, +* ]; +* +* const result = orderBy(users, [obj => obj.user, 'age'], ['asc', 'desc']); +* // result will be: +* // [ +* // { user: 'barney', age: 36 }, +* // { user: 'barney', age: 34 }, +* // { user: 'fred', age: 48 }, +* // { user: 'fred', age: 40 }, +* // ] +*/ +function orderBy(arr, criteria, orders) { + return arr.slice().sort((a, b) => { + const ordersLength = orders.length; + for (let i = 0; i < criteria.length; i++) { + const order = ordersLength > i ? orders[i] : orders[ordersLength - 1]; + const criterion = criteria[i]; + const criterionIsFunction = typeof criterion === "function"; + const valueA = criterionIsFunction ? criterion(a) : a[criterion]; + const valueB = criterionIsFunction ? criterion(b) : b[criterion]; + const result = require_compareValues.compareValues(valueA, valueB, order); + if (result !== 0) return result; + } + return 0; + }); +} +//#endregion +exports.orderBy = orderBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/orderBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/orderBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..60197b5ca3a733f2779b2718cf3a04dabafe95dd --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/orderBy.mjs @@ -0,0 +1,51 @@ +import { compareValues } from "../_internal/compareValues.mjs"; +//#region src/array/orderBy.ts +/** +* Sorts an array of objects based on the given `criteria` and their corresponding order directions. +* +* - If you provide keys, it sorts the objects by the values of those keys. +* - If you provide functions, it sorts based on the values returned by those functions. +* +* The function returns the array of objects sorted in corresponding order directions. +* If two objects have the same value for the current criterion, it uses the next criterion to determine their order. +* If the number of orders is less than the number of criteria, it uses the last order for the rest of the criteria. +* +* @template T - The type of elements in the array. +* @param arr - The array of objects to be sorted. +* @param criteria - The criteria for sorting. This can be an array of object keys or functions that return values used for sorting. +* @param orders - An array of order directions ('asc' for ascending or 'desc' for descending). +* @returns The sorted array. +* +* @example +* // Sort an array of objects by 'user' in ascending order and 'age' in descending order. +* const users = [ +* { user: 'fred', age: 48 }, +* { user: 'barney', age: 34 }, +* { user: 'fred', age: 40 }, +* { user: 'barney', age: 36 }, +* ]; +* +* const result = orderBy(users, [obj => obj.user, 'age'], ['asc', 'desc']); +* // result will be: +* // [ +* // { user: 'barney', age: 36 }, +* // { user: 'barney', age: 34 }, +* // { user: 'fred', age: 48 }, +* // { user: 'fred', age: 40 }, +* // ] +*/ +function orderBy(arr, criteria, orders) { + return arr.slice().sort((a, b) => { + const ordersLength = orders.length; + for (let i = 0; i < criteria.length; i++) { + const order = ordersLength > i ? orders[i] : orders[ordersLength - 1]; + const criterion = criteria[i]; + const criterionIsFunction = typeof criterion === "function"; + const result = compareValues(criterionIsFunction ? criterion(a) : a[criterion], criterionIsFunction ? criterion(b) : b[criterion], order); + if (result !== 0) return result; + } + return 0; + }); +} +//#endregion +export { orderBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/partition.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/partition.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..5edad2bdfce1f77c4dc617db95904050c5dc0e4d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/partition.d.mts @@ -0,0 +1,51 @@ +//#region src/array/partition.d.ts +/** + * Splits an array into two groups based on a predicate function. + * + * This function takes an array and a predicate function. It returns a tuple of two arrays: + * the first array contains elements for which the predicate function returns true, and + * the second array contains elements for which the predicate function returns false. + * + * @template T - The type of elements in the array. + * @template {T} U - The type being filtered for. + * @param arr - The array to partition. + * @param isInTruthy - A type guard that determines whether an + * element should be placed in the truthy array. The function is called with each element + * of the array and its index. + * @returns A tuple containing two arrays: the first array contains elements for + * which the predicate returned true, and the second array contains elements for which the + * predicate returned false. + * + * @example + * const array = [1, 2, 3, 4] as const; + * const isEven = (x: number): x is 2 | 4 => x % 2 === 0; + * const [even, odd]: [(2 | 4)[], (2 | 4)[]] = partition(array, isEven); + * // even will be [2, 4], and odd will be [1, 3] + */ +declare function partition(arr: readonly T[], isInTruthy: (value: T, index: number, array: readonly T[]) => value is U): [truthy: U[], falsy: Array>]; +/** + * Splits an array into two groups based on a predicate function. + * + * This function takes an array and a predicate function. It returns a tuple of two arrays: + * the first array contains elements for which the predicate function returns true, and + * the second array contains elements for which the predicate function returns false. + * + * @template T - The type of elements in the array. + * @param arr - The array to partition. + * @param isInTruthy - A predicate function that determines + * whether an element should be placed in the truthy array. An element is placed in the truthy + * array when the function returns a truthy value. The function is called with each + * element of the array and its index. + * @returns A tuple containing two arrays: the first array contains elements for + * which the predicate returned a truthy value, and the second array contains elements for which the + * predicate returned a falsy value. + * + * @example + * const array = [1, 2, 3, 4, 5]; + * const isEven = x => x % 2 === 0; + * const [even, odd] = partition(array, isEven); + * // even will be [2, 4], and odd will be [1, 3, 5] + */ +declare function partition(arr: readonly T[], isInTruthy: (value: T, index: number, array: readonly T[]) => unknown): [truthy: T[], falsy: T[]]; +//#endregion +export { partition }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/partition.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/partition.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..5edad2bdfce1f77c4dc617db95904050c5dc0e4d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/partition.d.ts @@ -0,0 +1,51 @@ +//#region src/array/partition.d.ts +/** + * Splits an array into two groups based on a predicate function. + * + * This function takes an array and a predicate function. It returns a tuple of two arrays: + * the first array contains elements for which the predicate function returns true, and + * the second array contains elements for which the predicate function returns false. + * + * @template T - The type of elements in the array. + * @template {T} U - The type being filtered for. + * @param arr - The array to partition. + * @param isInTruthy - A type guard that determines whether an + * element should be placed in the truthy array. The function is called with each element + * of the array and its index. + * @returns A tuple containing two arrays: the first array contains elements for + * which the predicate returned true, and the second array contains elements for which the + * predicate returned false. + * + * @example + * const array = [1, 2, 3, 4] as const; + * const isEven = (x: number): x is 2 | 4 => x % 2 === 0; + * const [even, odd]: [(2 | 4)[], (2 | 4)[]] = partition(array, isEven); + * // even will be [2, 4], and odd will be [1, 3] + */ +declare function partition(arr: readonly T[], isInTruthy: (value: T, index: number, array: readonly T[]) => value is U): [truthy: U[], falsy: Array>]; +/** + * Splits an array into two groups based on a predicate function. + * + * This function takes an array and a predicate function. It returns a tuple of two arrays: + * the first array contains elements for which the predicate function returns true, and + * the second array contains elements for which the predicate function returns false. + * + * @template T - The type of elements in the array. + * @param arr - The array to partition. + * @param isInTruthy - A predicate function that determines + * whether an element should be placed in the truthy array. An element is placed in the truthy + * array when the function returns a truthy value. The function is called with each + * element of the array and its index. + * @returns A tuple containing two arrays: the first array contains elements for + * which the predicate returned a truthy value, and the second array contains elements for which the + * predicate returned a falsy value. + * + * @example + * const array = [1, 2, 3, 4, 5]; + * const isEven = x => x % 2 === 0; + * const [even, odd] = partition(array, isEven); + * // even will be [2, 4], and odd will be [1, 3, 5] + */ +declare function partition(arr: readonly T[], isInTruthy: (value: T, index: number, array: readonly T[]) => unknown): [truthy: T[], falsy: T[]]; +//#endregion +export { partition }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/partition.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/partition.js new file mode 100644 index 0000000000000000000000000000000000000000..62c814094c11a3538f568ab4767081c9b2b94748 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/partition.js @@ -0,0 +1,13 @@ +//#region src/array/partition.ts +function partition(arr, isInTruthy) { + const truthy = []; + const falsy = []; + for (let i = 0; i < arr.length; i++) { + const item = arr[i]; + if (isInTruthy(item, i, arr)) truthy.push(item); + else falsy.push(item); + } + return [truthy, falsy]; +} +//#endregion +exports.partition = partition; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/partition.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/partition.mjs new file mode 100644 index 0000000000000000000000000000000000000000..611687fabbdf5a7d8274310dcd85aa355cb20d71 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/partition.mjs @@ -0,0 +1,13 @@ +//#region src/array/partition.ts +function partition(arr, isInTruthy) { + const truthy = []; + const falsy = []; + for (let i = 0; i < arr.length; i++) { + const item = arr[i]; + if (isInTruthy(item, i, arr)) truthy.push(item); + else falsy.push(item); + } + return [truthy, falsy]; +} +//#endregion +export { partition }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/pull.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/pull.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..67064510f1ba6f3f5f36c2c36993afdaf7a01c97 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/pull.d.mts @@ -0,0 +1,20 @@ +//#region src/array/pull.d.ts +/** + * Removes all specified values from an array. + * + * This function changes `arr` in place. + * If you want to remove values without modifying the original array, use `difference`. + * + * @template T + * @param arr - The array to modify. + * @param valuesToRemove - The values to remove from the array. + * @returns The modified array with the specified values removed. + * + * @example + * const numbers = [1, 2, 3, 4, 5, 2, 4]; + * pull(numbers, [2, 4]); + * console.log(numbers); // [1, 3, 5] + */ +declare function pull(arr: T[], valuesToRemove: readonly unknown[]): T[]; +//#endregion +export { pull }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/pull.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/pull.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..67064510f1ba6f3f5f36c2c36993afdaf7a01c97 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/pull.d.ts @@ -0,0 +1,20 @@ +//#region src/array/pull.d.ts +/** + * Removes all specified values from an array. + * + * This function changes `arr` in place. + * If you want to remove values without modifying the original array, use `difference`. + * + * @template T + * @param arr - The array to modify. + * @param valuesToRemove - The values to remove from the array. + * @returns The modified array with the specified values removed. + * + * @example + * const numbers = [1, 2, 3, 4, 5, 2, 4]; + * pull(numbers, [2, 4]); + * console.log(numbers); // [1, 3, 5] + */ +declare function pull(arr: T[], valuesToRemove: readonly unknown[]): T[]; +//#endregion +export { pull }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/pull.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/pull.js new file mode 100644 index 0000000000000000000000000000000000000000..f139282fb4d4a4ebaa493899a8be8303a2e86df2 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/pull.js @@ -0,0 +1,33 @@ +//#region src/array/pull.ts +/** +* Removes all specified values from an array. +* +* This function changes `arr` in place. +* If you want to remove values without modifying the original array, use `difference`. +* +* @template T +* @param arr - The array to modify. +* @param valuesToRemove - The values to remove from the array. +* @returns The modified array with the specified values removed. +* +* @example +* const numbers = [1, 2, 3, 4, 5, 2, 4]; +* pull(numbers, [2, 4]); +* console.log(numbers); // [1, 3, 5] +*/ +function pull(arr, valuesToRemove) { + const valuesSet = new Set(valuesToRemove); + let resultIndex = 0; + for (let i = 0; i < arr.length; i++) { + if (valuesSet.has(arr[i])) continue; + if (!Object.hasOwn(arr, i)) { + delete arr[resultIndex++]; + continue; + } + arr[resultIndex++] = arr[i]; + } + arr.length = resultIndex; + return arr; +} +//#endregion +exports.pull = pull; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/pull.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/pull.mjs new file mode 100644 index 0000000000000000000000000000000000000000..a676bab49eb837d0f254146c5e546f26aa1d1515 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/pull.mjs @@ -0,0 +1,33 @@ +//#region src/array/pull.ts +/** +* Removes all specified values from an array. +* +* This function changes `arr` in place. +* If you want to remove values without modifying the original array, use `difference`. +* +* @template T +* @param arr - The array to modify. +* @param valuesToRemove - The values to remove from the array. +* @returns The modified array with the specified values removed. +* +* @example +* const numbers = [1, 2, 3, 4, 5, 2, 4]; +* pull(numbers, [2, 4]); +* console.log(numbers); // [1, 3, 5] +*/ +function pull(arr, valuesToRemove) { + const valuesSet = new Set(valuesToRemove); + let resultIndex = 0; + for (let i = 0; i < arr.length; i++) { + if (valuesSet.has(arr[i])) continue; + if (!Object.hasOwn(arr, i)) { + delete arr[resultIndex++]; + continue; + } + arr[resultIndex++] = arr[i]; + } + arr.length = resultIndex; + return arr; +} +//#endregion +export { pull }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/pullAt.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/pullAt.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..813a859969796641dc5bedb09a39d03f3f626eae --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/pullAt.d.mts @@ -0,0 +1,20 @@ +//#region src/array/pullAt.d.ts +/** + * Removes elements from an array at specified indices and returns the removed elements. + * + * This function supports negative indices, which count from the end of the array. + * + * @template T + * @param arr - The array from which elements will be removed. + * @param indicesToRemove - An array of indices specifying the positions of elements to remove. + * @returns An array containing the elements that were removed from the original array. + * + * @example + * const numbers = [10, 20, 30, 40, 50]; + * const removed = pullAt(numbers, [1, 3, 4]); + * console.log(removed); // [20, 40, 50] + * console.log(numbers); // [10, 30] + */ +declare function pullAt(arr: T[], indicesToRemove: readonly number[]): T[]; +//#endregion +export { pullAt }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/pullAt.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/pullAt.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..813a859969796641dc5bedb09a39d03f3f626eae --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/pullAt.d.ts @@ -0,0 +1,20 @@ +//#region src/array/pullAt.d.ts +/** + * Removes elements from an array at specified indices and returns the removed elements. + * + * This function supports negative indices, which count from the end of the array. + * + * @template T + * @param arr - The array from which elements will be removed. + * @param indicesToRemove - An array of indices specifying the positions of elements to remove. + * @returns An array containing the elements that were removed from the original array. + * + * @example + * const numbers = [10, 20, 30, 40, 50]; + * const removed = pullAt(numbers, [1, 3, 4]); + * console.log(removed); // [20, 40, 50] + * console.log(numbers); // [10, 30] + */ +declare function pullAt(arr: T[], indicesToRemove: readonly number[]): T[]; +//#endregion +export { pullAt }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/pullAt.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/pullAt.js new file mode 100644 index 0000000000000000000000000000000000000000..e4c7bcf74934ef0da63cc88a62f0bed323180760 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/pullAt.js @@ -0,0 +1,26 @@ +const require_at = require("./at.js"); +//#region src/array/pullAt.ts +/** +* Removes elements from an array at specified indices and returns the removed elements. +* +* This function supports negative indices, which count from the end of the array. +* +* @template T +* @param arr - The array from which elements will be removed. +* @param indicesToRemove - An array of indices specifying the positions of elements to remove. +* @returns An array containing the elements that were removed from the original array. +* +* @example +* const numbers = [10, 20, 30, 40, 50]; +* const removed = pullAt(numbers, [1, 3, 4]); +* console.log(removed); // [20, 40, 50] +* console.log(numbers); // [10, 30] +*/ +function pullAt(arr, indicesToRemove) { + const removed = require_at.at(arr, indicesToRemove); + const indices = new Set(indicesToRemove.map((index) => index < 0 ? index + arr.length : index).sort((x, y) => y - x)); + for (const index of indices) arr.splice(index, 1); + return removed; +} +//#endregion +exports.pullAt = pullAt; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/pullAt.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/pullAt.mjs new file mode 100644 index 0000000000000000000000000000000000000000..2680f03f9cf5e36d3b31bdde63afc2f2fc1ae6b9 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/pullAt.mjs @@ -0,0 +1,26 @@ +import { at } from "./at.mjs"; +//#region src/array/pullAt.ts +/** +* Removes elements from an array at specified indices and returns the removed elements. +* +* This function supports negative indices, which count from the end of the array. +* +* @template T +* @param arr - The array from which elements will be removed. +* @param indicesToRemove - An array of indices specifying the positions of elements to remove. +* @returns An array containing the elements that were removed from the original array. +* +* @example +* const numbers = [10, 20, 30, 40, 50]; +* const removed = pullAt(numbers, [1, 3, 4]); +* console.log(removed); // [20, 40, 50] +* console.log(numbers); // [10, 30] +*/ +function pullAt(arr, indicesToRemove) { + const removed = at(arr, indicesToRemove); + const indices = new Set(indicesToRemove.map((index) => index < 0 ? index + arr.length : index).sort((x, y) => y - x)); + for (const index of indices) arr.splice(index, 1); + return removed; +} +//#endregion +export { pullAt }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/reduceAsync.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/reduceAsync.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..52e9451f816ff81ab7e16b6615232a2c401dbd00 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/reduceAsync.d.mts @@ -0,0 +1,72 @@ +//#region src/array/reduceAsync.d.ts +/** + * Reduces an array to a single value using an async reducer function. + * + * Applies the reducer function sequentially to each element (left to right), + * carrying an accumulated result from one call to the next. Unlike other async + * array methods, reduce must process elements sequentially and does not support + * concurrency limiting. + * + * @template T - The type of elements in the array. + * @template U - The type of the accumulated result. + * @param array The array to reduce. + * @param reducer An async function that processes each element. + * @param initialValue The initial value of the accumulator. + * @returns A promise that resolves to the final accumulated value. + * @example + * const numbers = [1, 2, 3, 4, 5]; + * const sum = await reduceAsync( + * numbers, + * async (acc, n) => acc + await fetchValue(n), + * 0 + * ); + * // Returns: sum of all fetched values + * + * @example + * const users = [{ id: 1 }, { id: 2 }, { id: 3 }]; + * const userMap = await reduceAsync( + * users, + * async (acc, user) => { + * const details = await fetchUserDetails(user.id); + * acc[user.id] = details; + * return acc; + * }, + * {} as Record + * ); + * // Returns: { 1: {...}, 2: {...}, 3: {...} } + */ +declare function reduceAsync(array: readonly T[], reducer: (accumulator: U, currentValue: T, currentIndex: number, array: readonly T[]) => Promise, initialValue: U): Promise; +/** + * Reduces an array to a single value using an async reducer function. + * + * Applies the reducer function sequentially to each element (left to right), + * carrying an accumulated result from one call to the next. Unlike other async + * array methods, reduce must process elements sequentially and does not support + * concurrency limiting. + * + * When no initial value is provided, the first element of the array is used as + * the initial value and the reduction starts from the second element. + * + * @template T - The type of elements in the array. + * @param array The array to reduce. + * @param reducer An async function that processes each element. + * @returns A promise that resolves to the final accumulated value, or undefined if the array is empty. + * @example + * const numbers = [1, 2, 3, 4, 5]; + * const sum = await reduceAsync( + * numbers, + * async (acc, n) => acc + n + * ); + * // Returns: 15 + * + * @example + * const emptyArray: number[] = []; + * const result = await reduceAsync( + * emptyArray, + * async (acc, n) => acc + n + * ); + * // Returns: undefined + */ +declare function reduceAsync(array: readonly T[], reducer: (accumulator: T, currentValue: T, currentIndex: number, array: readonly T[]) => Promise): Promise; +//#endregion +export { reduceAsync }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/reduceAsync.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/reduceAsync.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..52e9451f816ff81ab7e16b6615232a2c401dbd00 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/reduceAsync.d.ts @@ -0,0 +1,72 @@ +//#region src/array/reduceAsync.d.ts +/** + * Reduces an array to a single value using an async reducer function. + * + * Applies the reducer function sequentially to each element (left to right), + * carrying an accumulated result from one call to the next. Unlike other async + * array methods, reduce must process elements sequentially and does not support + * concurrency limiting. + * + * @template T - The type of elements in the array. + * @template U - The type of the accumulated result. + * @param array The array to reduce. + * @param reducer An async function that processes each element. + * @param initialValue The initial value of the accumulator. + * @returns A promise that resolves to the final accumulated value. + * @example + * const numbers = [1, 2, 3, 4, 5]; + * const sum = await reduceAsync( + * numbers, + * async (acc, n) => acc + await fetchValue(n), + * 0 + * ); + * // Returns: sum of all fetched values + * + * @example + * const users = [{ id: 1 }, { id: 2 }, { id: 3 }]; + * const userMap = await reduceAsync( + * users, + * async (acc, user) => { + * const details = await fetchUserDetails(user.id); + * acc[user.id] = details; + * return acc; + * }, + * {} as Record + * ); + * // Returns: { 1: {...}, 2: {...}, 3: {...} } + */ +declare function reduceAsync(array: readonly T[], reducer: (accumulator: U, currentValue: T, currentIndex: number, array: readonly T[]) => Promise, initialValue: U): Promise; +/** + * Reduces an array to a single value using an async reducer function. + * + * Applies the reducer function sequentially to each element (left to right), + * carrying an accumulated result from one call to the next. Unlike other async + * array methods, reduce must process elements sequentially and does not support + * concurrency limiting. + * + * When no initial value is provided, the first element of the array is used as + * the initial value and the reduction starts from the second element. + * + * @template T - The type of elements in the array. + * @param array The array to reduce. + * @param reducer An async function that processes each element. + * @returns A promise that resolves to the final accumulated value, or undefined if the array is empty. + * @example + * const numbers = [1, 2, 3, 4, 5]; + * const sum = await reduceAsync( + * numbers, + * async (acc, n) => acc + n + * ); + * // Returns: 15 + * + * @example + * const emptyArray: number[] = []; + * const result = await reduceAsync( + * emptyArray, + * async (acc, n) => acc + n + * ); + * // Returns: undefined + */ +declare function reduceAsync(array: readonly T[], reducer: (accumulator: T, currentValue: T, currentIndex: number, array: readonly T[]) => Promise): Promise; +//#endregion +export { reduceAsync }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/reduceAsync.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/reduceAsync.js new file mode 100644 index 0000000000000000000000000000000000000000..ae96beee48cd75cff14457a49eb121d5604d473a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/reduceAsync.js @@ -0,0 +1,13 @@ +//#region src/array/reduceAsync.ts +async function reduceAsync(array, reducer, initialValue) { + let startIndex = 0; + if (initialValue == null) { + initialValue = array[0]; + startIndex = 1; + } + let accumulator = initialValue; + for (let i = startIndex; i < array.length; i++) accumulator = await reducer(accumulator, array[i], i, array); + return accumulator; +} +//#endregion +exports.reduceAsync = reduceAsync; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/reduceAsync.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/reduceAsync.mjs new file mode 100644 index 0000000000000000000000000000000000000000..6d0b08e83b399547eb1e3210f72f00b13839fc3c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/reduceAsync.mjs @@ -0,0 +1,13 @@ +//#region src/array/reduceAsync.ts +async function reduceAsync(array, reducer, initialValue) { + let startIndex = 0; + if (initialValue == null) { + initialValue = array[0]; + startIndex = 1; + } + let accumulator = initialValue; + for (let i = startIndex; i < array.length; i++) accumulator = await reducer(accumulator, array[i], i, array); + return accumulator; +} +//#endregion +export { reduceAsync }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/remove.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/remove.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..f2cc2ecea4a61e5dbab20f4c4ce48e5c4b7be82c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/remove.d.mts @@ -0,0 +1,20 @@ +//#region src/array/remove.d.ts +/** + * Removes elements from an array based on a predicate function. + * + * This function changes `arr` in place. + * If you want to remove elements without modifying the original array, use `filter`. + * + * @template T + * @param arr - The array to modify. + * @param shouldRemoveElement - The function invoked per iteration to determine if an element should be removed. + * @returns The modified array with the specified elements removed. + * + * @example + * const numbers = [1, 2, 3, 4, 5]; + * remove(numbers, (value) => value % 2 === 0); + * console.log(numbers); // [1, 3, 5] + */ +declare function remove(arr: T[], shouldRemoveElement: (value: T, index: number, array: T[]) => boolean): T[]; +//#endregion +export { remove }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/remove.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/remove.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f2cc2ecea4a61e5dbab20f4c4ce48e5c4b7be82c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/remove.d.ts @@ -0,0 +1,20 @@ +//#region src/array/remove.d.ts +/** + * Removes elements from an array based on a predicate function. + * + * This function changes `arr` in place. + * If you want to remove elements without modifying the original array, use `filter`. + * + * @template T + * @param arr - The array to modify. + * @param shouldRemoveElement - The function invoked per iteration to determine if an element should be removed. + * @returns The modified array with the specified elements removed. + * + * @example + * const numbers = [1, 2, 3, 4, 5]; + * remove(numbers, (value) => value % 2 === 0); + * console.log(numbers); // [1, 3, 5] + */ +declare function remove(arr: T[], shouldRemoveElement: (value: T, index: number, array: T[]) => boolean): T[]; +//#endregion +export { remove }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/remove.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/remove.js new file mode 100644 index 0000000000000000000000000000000000000000..d81fb6bcd30522d218423b3df617684ab6cad007 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/remove.js @@ -0,0 +1,37 @@ +//#region src/array/remove.ts +/** +* Removes elements from an array based on a predicate function. +* +* This function changes `arr` in place. +* If you want to remove elements without modifying the original array, use `filter`. +* +* @template T +* @param arr - The array to modify. +* @param shouldRemoveElement - The function invoked per iteration to determine if an element should be removed. +* @returns The modified array with the specified elements removed. +* +* @example +* const numbers = [1, 2, 3, 4, 5]; +* remove(numbers, (value) => value % 2 === 0); +* console.log(numbers); // [1, 3, 5] +*/ +function remove(arr, shouldRemoveElement) { + const originalArr = arr.slice(); + const removed = []; + let resultIndex = 0; + for (let i = 0; i < arr.length; i++) { + if (shouldRemoveElement(arr[i], i, originalArr)) { + removed.push(arr[i]); + continue; + } + if (!Object.hasOwn(arr, i)) { + delete arr[resultIndex++]; + continue; + } + arr[resultIndex++] = arr[i]; + } + arr.length = resultIndex; + return removed; +} +//#endregion +exports.remove = remove; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/remove.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/remove.mjs new file mode 100644 index 0000000000000000000000000000000000000000..275d2ebe1a0664b76b448a741613f63b5dff1787 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/remove.mjs @@ -0,0 +1,37 @@ +//#region src/array/remove.ts +/** +* Removes elements from an array based on a predicate function. +* +* This function changes `arr` in place. +* If you want to remove elements without modifying the original array, use `filter`. +* +* @template T +* @param arr - The array to modify. +* @param shouldRemoveElement - The function invoked per iteration to determine if an element should be removed. +* @returns The modified array with the specified elements removed. +* +* @example +* const numbers = [1, 2, 3, 4, 5]; +* remove(numbers, (value) => value % 2 === 0); +* console.log(numbers); // [1, 3, 5] +*/ +function remove(arr, shouldRemoveElement) { + const originalArr = arr.slice(); + const removed = []; + let resultIndex = 0; + for (let i = 0; i < arr.length; i++) { + if (shouldRemoveElement(arr[i], i, originalArr)) { + removed.push(arr[i]); + continue; + } + if (!Object.hasOwn(arr, i)) { + delete arr[resultIndex++]; + continue; + } + arr[resultIndex++] = arr[i]; + } + arr.length = resultIndex; + return removed; +} +//#endregion +export { remove }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sample.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sample.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..507a35f9a8232b8ab80387942e3109c24a47ceab --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sample.d.mts @@ -0,0 +1,18 @@ +//#region src/array/sample.d.ts +/** + * Returns a random element from an array. + * + * This function takes an array and returns a single element selected randomly from the array. + * + * @template T - The type of elements in the array. + * @param arr - The array to sample from. + * @returns A random element from the array. + * + * @example + * const array = [1, 2, 3, 4, 5]; + * const randomElement = sample(array); + * // randomElement will be one of the elements from the array, selected randomly. + */ +declare function sample(arr: readonly T[]): T; +//#endregion +export { sample }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sample.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sample.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..507a35f9a8232b8ab80387942e3109c24a47ceab --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sample.d.ts @@ -0,0 +1,18 @@ +//#region src/array/sample.d.ts +/** + * Returns a random element from an array. + * + * This function takes an array and returns a single element selected randomly from the array. + * + * @template T - The type of elements in the array. + * @param arr - The array to sample from. + * @returns A random element from the array. + * + * @example + * const array = [1, 2, 3, 4, 5]; + * const randomElement = sample(array); + * // randomElement will be one of the elements from the array, selected randomly. + */ +declare function sample(arr: readonly T[]): T; +//#endregion +export { sample }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sample.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sample.js new file mode 100644 index 0000000000000000000000000000000000000000..30324242d7c07f2d2e1df784276cedeea64e874c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sample.js @@ -0,0 +1,20 @@ +//#region src/array/sample.ts +/** +* Returns a random element from an array. +* +* This function takes an array and returns a single element selected randomly from the array. +* +* @template T - The type of elements in the array. +* @param arr - The array to sample from. +* @returns A random element from the array. +* +* @example +* const array = [1, 2, 3, 4, 5]; +* const randomElement = sample(array); +* // randomElement will be one of the elements from the array, selected randomly. +*/ +function sample(arr) { + return arr[Math.floor(Math.random() * arr.length)]; +} +//#endregion +exports.sample = sample; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sample.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sample.mjs new file mode 100644 index 0000000000000000000000000000000000000000..617a491bbdb010fb118c2fecffc9e93a39f191a9 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sample.mjs @@ -0,0 +1,20 @@ +//#region src/array/sample.ts +/** +* Returns a random element from an array. +* +* This function takes an array and returns a single element selected randomly from the array. +* +* @template T - The type of elements in the array. +* @param arr - The array to sample from. +* @returns A random element from the array. +* +* @example +* const array = [1, 2, 3, 4, 5]; +* const randomElement = sample(array); +* // randomElement will be one of the elements from the array, selected randomly. +*/ +function sample(arr) { + return arr[Math.floor(Math.random() * arr.length)]; +} +//#endregion +export { sample }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sampleSize.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sampleSize.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..fc1ba693c4b384c1bcc8a20ea55747cfdcb4a10f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sampleSize.d.mts @@ -0,0 +1,22 @@ +//#region src/array/sampleSize.d.ts +/** + * Returns a sample element array of a specified `size`. + * + * This function takes an array and a number, and returns an array containing the sampled elements using Floyd's algorithm. + * + * {@link https://www.nowherenearithaca.com/2013/05/robert-floyds-tiny-and-beautiful.html Floyd's algorithm} + * + * @template T - The type of elements in the array. + * @param array - The array to sample from. + * @param size - The size of sample. + * @returns A new array with sample size applied. + * @throws {Error} Throws an error if `size` is greater than the length of `array`. + * + * @example + * const result = sampleSize([1, 2, 3], 2) + * // result will be an array containing two of the elements from the array. + * // [1, 2] or [1, 3] or [2, 3] + */ +declare function sampleSize(array: readonly T[], size: number): T[]; +//#endregion +export { sampleSize }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sampleSize.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sampleSize.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..fc1ba693c4b384c1bcc8a20ea55747cfdcb4a10f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sampleSize.d.ts @@ -0,0 +1,22 @@ +//#region src/array/sampleSize.d.ts +/** + * Returns a sample element array of a specified `size`. + * + * This function takes an array and a number, and returns an array containing the sampled elements using Floyd's algorithm. + * + * {@link https://www.nowherenearithaca.com/2013/05/robert-floyds-tiny-and-beautiful.html Floyd's algorithm} + * + * @template T - The type of elements in the array. + * @param array - The array to sample from. + * @param size - The size of sample. + * @returns A new array with sample size applied. + * @throws {Error} Throws an error if `size` is greater than the length of `array`. + * + * @example + * const result = sampleSize([1, 2, 3], 2) + * // result will be an array containing two of the elements from the array. + * // [1, 2] or [1, 3] or [2, 3] + */ +declare function sampleSize(array: readonly T[], size: number): T[]; +//#endregion +export { sampleSize }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sampleSize.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sampleSize.js new file mode 100644 index 0000000000000000000000000000000000000000..9e39c5445fdb5e082e7c6e452cef1bb914820983 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sampleSize.js @@ -0,0 +1,34 @@ +const require_randomInt = require("../math/randomInt.js"); +//#region src/array/sampleSize.ts +/** +* Returns a sample element array of a specified `size`. +* +* This function takes an array and a number, and returns an array containing the sampled elements using Floyd's algorithm. +* +* {@link https://www.nowherenearithaca.com/2013/05/robert-floyds-tiny-and-beautiful.html Floyd's algorithm} +* +* @template T - The type of elements in the array. +* @param array - The array to sample from. +* @param size - The size of sample. +* @returns A new array with sample size applied. +* @throws {Error} Throws an error if `size` is greater than the length of `array`. +* +* @example +* const result = sampleSize([1, 2, 3], 2) +* // result will be an array containing two of the elements from the array. +* // [1, 2] or [1, 3] or [2, 3] +*/ +function sampleSize(array, size) { + if (size > array.length) throw new Error("Size must be less than or equal to the length of array."); + const result = new Array(size); + const selected = /* @__PURE__ */ new Set(); + for (let step = array.length - size, resultIndex = 0; step < array.length; step++, resultIndex++) { + let index = require_randomInt.randomInt(0, step + 1); + if (selected.has(index)) index = step; + selected.add(index); + result[resultIndex] = array[index]; + } + return result; +} +//#endregion +exports.sampleSize = sampleSize; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sampleSize.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sampleSize.mjs new file mode 100644 index 0000000000000000000000000000000000000000..8373c1d977fef0ea76a43b21ba39292918a3a16f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sampleSize.mjs @@ -0,0 +1,34 @@ +import { randomInt } from "../math/randomInt.mjs"; +//#region src/array/sampleSize.ts +/** +* Returns a sample element array of a specified `size`. +* +* This function takes an array and a number, and returns an array containing the sampled elements using Floyd's algorithm. +* +* {@link https://www.nowherenearithaca.com/2013/05/robert-floyds-tiny-and-beautiful.html Floyd's algorithm} +* +* @template T - The type of elements in the array. +* @param array - The array to sample from. +* @param size - The size of sample. +* @returns A new array with sample size applied. +* @throws {Error} Throws an error if `size` is greater than the length of `array`. +* +* @example +* const result = sampleSize([1, 2, 3], 2) +* // result will be an array containing two of the elements from the array. +* // [1, 2] or [1, 3] or [2, 3] +*/ +function sampleSize(array, size) { + if (size > array.length) throw new Error("Size must be less than or equal to the length of array."); + const result = new Array(size); + const selected = /* @__PURE__ */ new Set(); + for (let step = array.length - size, resultIndex = 0; step < array.length; step++, resultIndex++) { + let index = randomInt(0, step + 1); + if (selected.has(index)) index = step; + selected.add(index); + result[resultIndex] = array[index]; + } + return result; +} +//#endregion +export { sampleSize }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/shuffle.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/shuffle.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..54643730444fcf0328376a73c15daad047fc34e3 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/shuffle.d.mts @@ -0,0 +1,18 @@ +//#region src/array/shuffle.d.ts +/** + * Randomizes the order of elements in an array using the Fisher-Yates algorithm. + * + * This function takes an array and returns a new array with its elements shuffled in a random order. + * + * @template T - The type of elements in the array. + * @param arr - The array to shuffle. + * @returns A new array with its elements shuffled in random order. + * + * @example + * const array = [1, 2, 3, 4, 5]; + * const shuffledArray = shuffle(array); + * // shuffledArray will be a new array with elements of array in random order, e.g., [3, 1, 4, 5, 2] + */ +declare function shuffle(arr: readonly T[]): T[]; +//#endregion +export { shuffle }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/shuffle.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/shuffle.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..54643730444fcf0328376a73c15daad047fc34e3 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/shuffle.d.ts @@ -0,0 +1,18 @@ +//#region src/array/shuffle.d.ts +/** + * Randomizes the order of elements in an array using the Fisher-Yates algorithm. + * + * This function takes an array and returns a new array with its elements shuffled in a random order. + * + * @template T - The type of elements in the array. + * @param arr - The array to shuffle. + * @returns A new array with its elements shuffled in random order. + * + * @example + * const array = [1, 2, 3, 4, 5]; + * const shuffledArray = shuffle(array); + * // shuffledArray will be a new array with elements of array in random order, e.g., [3, 1, 4, 5, 2] + */ +declare function shuffle(arr: readonly T[]): T[]; +//#endregion +export { shuffle }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/shuffle.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/shuffle.js new file mode 100644 index 0000000000000000000000000000000000000000..7048ea797af92f468f9b61201797f9493e234d1f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/shuffle.js @@ -0,0 +1,28 @@ +//#region src/array/shuffle.ts +/** +* Randomizes the order of elements in an array using the Fisher-Yates algorithm. +* +* This function takes an array and returns a new array with its elements shuffled in a random order. +* +* @template T - The type of elements in the array. +* @param arr - The array to shuffle. +* @returns A new array with its elements shuffled in random order. +* +* @example +* const array = [1, 2, 3, 4, 5]; +* const shuffledArray = shuffle(array); +* // shuffledArray will be a new array with elements of array in random order, e.g., [3, 1, 4, 5, 2] +*/ +function shuffle(arr) { + const result = arr.slice(); + /** + * https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#The_modern_algorithm + */ + for (let i = result.length - 1; i >= 1; i--) { + const j = Math.floor(Math.random() * (i + 1)); + [result[i], result[j]] = [result[j], result[i]]; + } + return result; +} +//#endregion +exports.shuffle = shuffle; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/shuffle.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/shuffle.mjs new file mode 100644 index 0000000000000000000000000000000000000000..8a3c8d84b0c204dac2e76e41def36d3d89edbeca --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/shuffle.mjs @@ -0,0 +1,28 @@ +//#region src/array/shuffle.ts +/** +* Randomizes the order of elements in an array using the Fisher-Yates algorithm. +* +* This function takes an array and returns a new array with its elements shuffled in a random order. +* +* @template T - The type of elements in the array. +* @param arr - The array to shuffle. +* @returns A new array with its elements shuffled in random order. +* +* @example +* const array = [1, 2, 3, 4, 5]; +* const shuffledArray = shuffle(array); +* // shuffledArray will be a new array with elements of array in random order, e.g., [3, 1, 4, 5, 2] +*/ +function shuffle(arr) { + const result = arr.slice(); + /** + * https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#The_modern_algorithm + */ + for (let i = result.length - 1; i >= 1; i--) { + const j = Math.floor(Math.random() * (i + 1)); + [result[i], result[j]] = [result[j], result[i]]; + } + return result; +} +//#endregion +export { shuffle }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sortBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sortBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..069cb97faa16544d025a00cb2e3a64b505294578 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sortBy.d.mts @@ -0,0 +1,36 @@ +//#region src/array/sortBy.d.ts +/** + * Sorts an array of objects based on the given `criteria`. + * + * - If you provide keys, it sorts the objects by the values of those keys. + * - If you provide functions, it sorts based on the values returned by those functions. + * + * The function returns the array of objects sorted in ascending order. + * If two objects have the same value for the current criterion, it uses the next criterion to determine their order. + * + * @template T - The type of the objects in the array. + * @param arr - The array of objects to be sorted. + * @param criteria - The criteria for sorting. This can be an array of object keys or functions that return values used for sorting. + * @returns The sorted array. + * + * @example + * const users = [ + * { user: 'foo', age: 24 }, + * { user: 'bar', age: 7 }, + * { user: 'foo', age: 8 }, + * { user: 'bar', age: 29 }, + * ]; + * + * sortBy(users, ['user', 'age']); + * sortBy(users, [obj => obj.user, 'age']); + * // results will be: + * // [ + * // { user : 'bar', age: 7 }, + * // { user : 'bar', age: 29 }, + * // { user : 'foo', age: 8 }, + * // { user : 'foo', age: 24 }, + * // ] + */ +declare function sortBy(arr: readonly T[], criteria: ReadonlyArray<((item: T) => unknown) | keyof T>): T[]; +//#endregion +export { sortBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sortBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sortBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..069cb97faa16544d025a00cb2e3a64b505294578 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sortBy.d.ts @@ -0,0 +1,36 @@ +//#region src/array/sortBy.d.ts +/** + * Sorts an array of objects based on the given `criteria`. + * + * - If you provide keys, it sorts the objects by the values of those keys. + * - If you provide functions, it sorts based on the values returned by those functions. + * + * The function returns the array of objects sorted in ascending order. + * If two objects have the same value for the current criterion, it uses the next criterion to determine their order. + * + * @template T - The type of the objects in the array. + * @param arr - The array of objects to be sorted. + * @param criteria - The criteria for sorting. This can be an array of object keys or functions that return values used for sorting. + * @returns The sorted array. + * + * @example + * const users = [ + * { user: 'foo', age: 24 }, + * { user: 'bar', age: 7 }, + * { user: 'foo', age: 8 }, + * { user: 'bar', age: 29 }, + * ]; + * + * sortBy(users, ['user', 'age']); + * sortBy(users, [obj => obj.user, 'age']); + * // results will be: + * // [ + * // { user : 'bar', age: 7 }, + * // { user : 'bar', age: 29 }, + * // { user : 'foo', age: 8 }, + * // { user : 'foo', age: 24 }, + * // ] + */ +declare function sortBy(arr: readonly T[], criteria: ReadonlyArray<((item: T) => unknown) | keyof T>): T[]; +//#endregion +export { sortBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sortBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sortBy.js new file mode 100644 index 0000000000000000000000000000000000000000..583a5c07542cf3df0f495fae8d6bf49e4b9fa081 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sortBy.js @@ -0,0 +1,39 @@ +const require_orderBy = require("./orderBy.js"); +//#region src/array/sortBy.ts +/** +* Sorts an array of objects based on the given `criteria`. +* +* - If you provide keys, it sorts the objects by the values of those keys. +* - If you provide functions, it sorts based on the values returned by those functions. +* +* The function returns the array of objects sorted in ascending order. +* If two objects have the same value for the current criterion, it uses the next criterion to determine their order. +* +* @template T - The type of the objects in the array. +* @param arr - The array of objects to be sorted. +* @param criteria - The criteria for sorting. This can be an array of object keys or functions that return values used for sorting. +* @returns The sorted array. +* +* @example +* const users = [ +* { user: 'foo', age: 24 }, +* { user: 'bar', age: 7 }, +* { user: 'foo', age: 8 }, +* { user: 'bar', age: 29 }, +* ]; +* +* sortBy(users, ['user', 'age']); +* sortBy(users, [obj => obj.user, 'age']); +* // results will be: +* // [ +* // { user : 'bar', age: 7 }, +* // { user : 'bar', age: 29 }, +* // { user : 'foo', age: 8 }, +* // { user : 'foo', age: 24 }, +* // ] +*/ +function sortBy(arr, criteria) { + return require_orderBy.orderBy(arr, criteria, ["asc"]); +} +//#endregion +exports.sortBy = sortBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sortBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sortBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e04c255d5aaa9d3f071d149a7628a404200d5709 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/sortBy.mjs @@ -0,0 +1,39 @@ +import { orderBy } from "./orderBy.mjs"; +//#region src/array/sortBy.ts +/** +* Sorts an array of objects based on the given `criteria`. +* +* - If you provide keys, it sorts the objects by the values of those keys. +* - If you provide functions, it sorts based on the values returned by those functions. +* +* The function returns the array of objects sorted in ascending order. +* If two objects have the same value for the current criterion, it uses the next criterion to determine their order. +* +* @template T - The type of the objects in the array. +* @param arr - The array of objects to be sorted. +* @param criteria - The criteria for sorting. This can be an array of object keys or functions that return values used for sorting. +* @returns The sorted array. +* +* @example +* const users = [ +* { user: 'foo', age: 24 }, +* { user: 'bar', age: 7 }, +* { user: 'foo', age: 8 }, +* { user: 'bar', age: 29 }, +* ]; +* +* sortBy(users, ['user', 'age']); +* sortBy(users, [obj => obj.user, 'age']); +* // results will be: +* // [ +* // { user : 'bar', age: 7 }, +* // { user : 'bar', age: 29 }, +* // { user : 'foo', age: 8 }, +* // { user : 'foo', age: 24 }, +* // ] +*/ +function sortBy(arr, criteria) { + return orderBy(arr, criteria, ["asc"]); +} +//#endregion +export { sortBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/tail.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/tail.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..85aa8d4f96c358a265d37a4b19bed2199e64804f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/tail.d.mts @@ -0,0 +1,68 @@ +//#region src/array/tail.d.ts +/** + * Returns an empty array when the input is a single-element array. + * + * @template T - The type of the single element in the array. + * @param arr - The single-element array to process. + * @returns An empty array. + * + * @example + * const arr = [1]; + * const result = tail(arr); + * // result will be [] + */ +declare function tail(arr: readonly [T]): []; +/** + * Returns an empty array when the input is an empty array. + * + * @template T - The type of elements in the array. + * @param arr - The empty array to process. + * @returns An empty array. + * + * @example + * const arr = []; + * const result = tail(arr); + * // result will be [] + */ +declare function tail(arr: readonly []): []; +/** + * Returns a new array with all elements except for the first when the input is a tuple array. + * + * @template T - The type of the first element in the tuple array. + * @template U - The type of the remaining elements in the tuple array. + * @param arr - The tuple array to process. + * @returns A new array containing all elements of the input array except for the first one. + * + * @example + * const arr = [1, 2, 3]; + * const result = tail(arr); + * // result will be [2, 3] + */ +declare function tail(arr: readonly [T, ...U[]]): U[]; +/** + * Returns a new array with all elements except for the first. + * + * This function takes an array and returns a new array containing all the elements + * except for the first one. If the input array is empty or has only one element, + * an empty array is returned. + * + * @template T - The type of elements in the array. + * @param arr - The array to get the tail of. + * @returns A new array containing all elements of the input array except for the first one. + * + * @example + * const arr1 = [1, 2, 3]; + * const result = tail(arr1); + * // result will be [2, 3] + * + * const arr2 = [1]; + * const result2 = tail(arr2); + * // result2 will be [] + * + * const arr3 = []; + * const result3 = tail(arr3); + * // result3 will be [] + */ +declare function tail(arr: readonly T[]): T[]; +//#endregion +export { tail }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/tail.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/tail.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..85aa8d4f96c358a265d37a4b19bed2199e64804f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/tail.d.ts @@ -0,0 +1,68 @@ +//#region src/array/tail.d.ts +/** + * Returns an empty array when the input is a single-element array. + * + * @template T - The type of the single element in the array. + * @param arr - The single-element array to process. + * @returns An empty array. + * + * @example + * const arr = [1]; + * const result = tail(arr); + * // result will be [] + */ +declare function tail(arr: readonly [T]): []; +/** + * Returns an empty array when the input is an empty array. + * + * @template T - The type of elements in the array. + * @param arr - The empty array to process. + * @returns An empty array. + * + * @example + * const arr = []; + * const result = tail(arr); + * // result will be [] + */ +declare function tail(arr: readonly []): []; +/** + * Returns a new array with all elements except for the first when the input is a tuple array. + * + * @template T - The type of the first element in the tuple array. + * @template U - The type of the remaining elements in the tuple array. + * @param arr - The tuple array to process. + * @returns A new array containing all elements of the input array except for the first one. + * + * @example + * const arr = [1, 2, 3]; + * const result = tail(arr); + * // result will be [2, 3] + */ +declare function tail(arr: readonly [T, ...U[]]): U[]; +/** + * Returns a new array with all elements except for the first. + * + * This function takes an array and returns a new array containing all the elements + * except for the first one. If the input array is empty or has only one element, + * an empty array is returned. + * + * @template T - The type of elements in the array. + * @param arr - The array to get the tail of. + * @returns A new array containing all elements of the input array except for the first one. + * + * @example + * const arr1 = [1, 2, 3]; + * const result = tail(arr1); + * // result will be [2, 3] + * + * const arr2 = [1]; + * const result2 = tail(arr2); + * // result2 will be [] + * + * const arr3 = []; + * const result3 = tail(arr3); + * // result3 will be [] + */ +declare function tail(arr: readonly T[]): T[]; +//#endregion +export { tail }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/tail.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/tail.js new file mode 100644 index 0000000000000000000000000000000000000000..feb120414fbd0277068a0578a3bfe7bfc81bb0db --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/tail.js @@ -0,0 +1,30 @@ +//#region src/array/tail.ts +/** +* Returns a new array with all elements except for the first. +* +* This function takes an array and returns a new array containing all the elements +* except for the first one. If the input array is empty or has only one element, +* an empty array is returned. +* +* @template T - The type of elements in the array. +* @param arr - The array to get the tail of. +* @returns A new array containing all elements of the input array except for the first one. +* +* @example +* const arr1 = [1, 2, 3]; +* const result = tail(arr1); +* // result will be [2, 3] +* +* const arr2 = [1]; +* const result2 = tail(arr2); +* // result2 will be [] +* +* const arr3 = []; +* const result3 = tail(arr3); +* // result3 will be [] +*/ +function tail(arr) { + return arr.slice(1); +} +//#endregion +exports.tail = tail; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/tail.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/tail.mjs new file mode 100644 index 0000000000000000000000000000000000000000..31dc0abf7872d3e6659a0455391cb2246eb12468 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/tail.mjs @@ -0,0 +1,30 @@ +//#region src/array/tail.ts +/** +* Returns a new array with all elements except for the first. +* +* This function takes an array and returns a new array containing all the elements +* except for the first one. If the input array is empty or has only one element, +* an empty array is returned. +* +* @template T - The type of elements in the array. +* @param arr - The array to get the tail of. +* @returns A new array containing all elements of the input array except for the first one. +* +* @example +* const arr1 = [1, 2, 3]; +* const result = tail(arr1); +* // result will be [2, 3] +* +* const arr2 = [1]; +* const result2 = tail(arr2); +* // result2 will be [] +* +* const arr3 = []; +* const result3 = tail(arr3); +* // result3 will be [] +*/ +function tail(arr) { + return arr.slice(1); +} +//#endregion +export { tail }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/take.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/take.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..d16220486f6c8ad403a152e1602f2b78cf2db03e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/take.d.mts @@ -0,0 +1,26 @@ +//#region src/array/take.d.ts +/** + * Returns a new array containing the first `count` elements from the input array `arr`. + * If `count` is greater than the length of `arr`, the entire array is returned. + * + * @template T - Type of elements in the input array. + * + * @param arr - The array to take elements from. + * @param count - The number of elements to take. + * @returns A new array containing the first `count` elements from `arr`. + * + * @example + * // Returns [1, 2, 3] + * take([1, 2, 3, 4, 5], 3); + * + * @example + * // Returns ['a', 'b'] + * take(['a', 'b', 'c'], 2); + * + * @example + * // Returns [1, 2, 3] + * take([1, 2, 3], 5); + */ +declare function take(arr: readonly T[], count: number): T[]; +//#endregion +export { take }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/take.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/take.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d16220486f6c8ad403a152e1602f2b78cf2db03e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/take.d.ts @@ -0,0 +1,26 @@ +//#region src/array/take.d.ts +/** + * Returns a new array containing the first `count` elements from the input array `arr`. + * If `count` is greater than the length of `arr`, the entire array is returned. + * + * @template T - Type of elements in the input array. + * + * @param arr - The array to take elements from. + * @param count - The number of elements to take. + * @returns A new array containing the first `count` elements from `arr`. + * + * @example + * // Returns [1, 2, 3] + * take([1, 2, 3, 4, 5], 3); + * + * @example + * // Returns ['a', 'b'] + * take(['a', 'b', 'c'], 2); + * + * @example + * // Returns [1, 2, 3] + * take([1, 2, 3], 5); + */ +declare function take(arr: readonly T[], count: number): T[]; +//#endregion +export { take }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/take.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/take.js new file mode 100644 index 0000000000000000000000000000000000000000..568f7480845826243b847e60159d0ab7f020e3bb --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/take.js @@ -0,0 +1,28 @@ +//#region src/array/take.ts +/** +* Returns a new array containing the first `count` elements from the input array `arr`. +* If `count` is greater than the length of `arr`, the entire array is returned. +* +* @template T - Type of elements in the input array. +* +* @param arr - The array to take elements from. +* @param count - The number of elements to take. +* @returns A new array containing the first `count` elements from `arr`. +* +* @example +* // Returns [1, 2, 3] +* take([1, 2, 3, 4, 5], 3); +* +* @example +* // Returns ['a', 'b'] +* take(['a', 'b', 'c'], 2); +* +* @example +* // Returns [1, 2, 3] +* take([1, 2, 3], 5); +*/ +function take(arr, count) { + return arr.slice(0, count); +} +//#endregion +exports.take = take; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/take.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/take.mjs new file mode 100644 index 0000000000000000000000000000000000000000..8d16dcae317c142ec5343d3ad330d9603ef34930 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/take.mjs @@ -0,0 +1,28 @@ +//#region src/array/take.ts +/** +* Returns a new array containing the first `count` elements from the input array `arr`. +* If `count` is greater than the length of `arr`, the entire array is returned. +* +* @template T - Type of elements in the input array. +* +* @param arr - The array to take elements from. +* @param count - The number of elements to take. +* @returns A new array containing the first `count` elements from `arr`. +* +* @example +* // Returns [1, 2, 3] +* take([1, 2, 3, 4, 5], 3); +* +* @example +* // Returns ['a', 'b'] +* take(['a', 'b', 'c'], 2); +* +* @example +* // Returns [1, 2, 3] +* take([1, 2, 3], 5); +*/ +function take(arr, count) { + return arr.slice(0, count); +} +//#endregion +export { take }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeRight.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeRight.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..7fed3218fa905198d5af714264862e2bcda6d251 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeRight.d.mts @@ -0,0 +1,25 @@ +//#region src/array/takeRight.d.ts +/** + * Returns a new array containing the last `count` elements from the input array `arr`. + * If `count` is greater than the length of `arr`, the entire array is returned. + * + * @template T - The type of elements in the array. + * @param arr - The array to take elements from. + * @param count - The number of elements to take. + * @returns A new array containing the last `count` elements from `arr`. + * + * @example + * // Returns [4, 5] + * takeRight([1, 2, 3, 4, 5], 2); + * + * @example + * // Returns ['b', 'c'] + * takeRight(['a', 'b', 'c'], 2); + * + * @example + * // Returns [1, 2, 3] + * takeRight([1, 2, 3], 5); + */ +declare function takeRight(arr: readonly T[], count: number): T[]; +//#endregion +export { takeRight }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeRight.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeRight.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7fed3218fa905198d5af714264862e2bcda6d251 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeRight.d.ts @@ -0,0 +1,25 @@ +//#region src/array/takeRight.d.ts +/** + * Returns a new array containing the last `count` elements from the input array `arr`. + * If `count` is greater than the length of `arr`, the entire array is returned. + * + * @template T - The type of elements in the array. + * @param arr - The array to take elements from. + * @param count - The number of elements to take. + * @returns A new array containing the last `count` elements from `arr`. + * + * @example + * // Returns [4, 5] + * takeRight([1, 2, 3, 4, 5], 2); + * + * @example + * // Returns ['b', 'c'] + * takeRight(['a', 'b', 'c'], 2); + * + * @example + * // Returns [1, 2, 3] + * takeRight([1, 2, 3], 5); + */ +declare function takeRight(arr: readonly T[], count: number): T[]; +//#endregion +export { takeRight }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeRight.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeRight.js new file mode 100644 index 0000000000000000000000000000000000000000..5323746bfb78c57c3f9843aa5eff0681adf7f642 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeRight.js @@ -0,0 +1,28 @@ +//#region src/array/takeRight.ts +/** +* Returns a new array containing the last `count` elements from the input array `arr`. +* If `count` is greater than the length of `arr`, the entire array is returned. +* +* @template T - The type of elements in the array. +* @param arr - The array to take elements from. +* @param count - The number of elements to take. +* @returns A new array containing the last `count` elements from `arr`. +* +* @example +* // Returns [4, 5] +* takeRight([1, 2, 3, 4, 5], 2); +* +* @example +* // Returns ['b', 'c'] +* takeRight(['a', 'b', 'c'], 2); +* +* @example +* // Returns [1, 2, 3] +* takeRight([1, 2, 3], 5); +*/ +function takeRight(arr, count) { + if (count <= 0 || arr.length === 0) return []; + return arr.slice(-count); +} +//#endregion +exports.takeRight = takeRight; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeRight.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeRight.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d9bffb68f6052de446d96c738d76c50d15c5964b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeRight.mjs @@ -0,0 +1,28 @@ +//#region src/array/takeRight.ts +/** +* Returns a new array containing the last `count` elements from the input array `arr`. +* If `count` is greater than the length of `arr`, the entire array is returned. +* +* @template T - The type of elements in the array. +* @param arr - The array to take elements from. +* @param count - The number of elements to take. +* @returns A new array containing the last `count` elements from `arr`. +* +* @example +* // Returns [4, 5] +* takeRight([1, 2, 3, 4, 5], 2); +* +* @example +* // Returns ['b', 'c'] +* takeRight(['a', 'b', 'c'], 2); +* +* @example +* // Returns [1, 2, 3] +* takeRight([1, 2, 3], 5); +*/ +function takeRight(arr, count) { + if (count <= 0 || arr.length === 0) return []; + return arr.slice(-count); +} +//#endregion +export { takeRight }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeRightWhile.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeRightWhile.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..d04a7a9c25f95b5644ce65baafce32ec0208d31a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeRightWhile.d.mts @@ -0,0 +1,26 @@ +//#region src/array/takeRightWhile.d.ts +/** + * Takes elements from the end of the array while the predicate function returns `true`. + * + * @template T - Type of elements in the input array. + * + * @param arr - The array to take elements from. + * @param shouldContinueTaking - The function invoked per element with the item, its index, and the array. + * @returns A new array containing the elements taken from the end while the predicate returns `true`. + * + * @example + * // Returns [3, 2, 1] + * takeRightWhile([5, 4, 3, 2, 1], n => n < 4); + * + * @example + * // Returns [] + * takeRightWhile([1, 2, 3], n => n > 3); + * + * @example + * // Using index parameter + * takeRightWhile([10, 20, 30, 40], (x, index) => index > 1); + * // Returns: [30, 40] + */ +declare function takeRightWhile(arr: readonly T[], shouldContinueTaking: (item: T, index: number, array: readonly T[]) => boolean): T[]; +//#endregion +export { takeRightWhile }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeRightWhile.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeRightWhile.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d04a7a9c25f95b5644ce65baafce32ec0208d31a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeRightWhile.d.ts @@ -0,0 +1,26 @@ +//#region src/array/takeRightWhile.d.ts +/** + * Takes elements from the end of the array while the predicate function returns `true`. + * + * @template T - Type of elements in the input array. + * + * @param arr - The array to take elements from. + * @param shouldContinueTaking - The function invoked per element with the item, its index, and the array. + * @returns A new array containing the elements taken from the end while the predicate returns `true`. + * + * @example + * // Returns [3, 2, 1] + * takeRightWhile([5, 4, 3, 2, 1], n => n < 4); + * + * @example + * // Returns [] + * takeRightWhile([1, 2, 3], n => n > 3); + * + * @example + * // Using index parameter + * takeRightWhile([10, 20, 30, 40], (x, index) => index > 1); + * // Returns: [30, 40] + */ +declare function takeRightWhile(arr: readonly T[], shouldContinueTaking: (item: T, index: number, array: readonly T[]) => boolean): T[]; +//#endregion +export { takeRightWhile }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeRightWhile.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeRightWhile.js new file mode 100644 index 0000000000000000000000000000000000000000..f4d339aa402e5b4e8115a2683d47d5df3c78e722 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeRightWhile.js @@ -0,0 +1,29 @@ +//#region src/array/takeRightWhile.ts +/** +* Takes elements from the end of the array while the predicate function returns `true`. +* +* @template T - Type of elements in the input array. +* +* @param arr - The array to take elements from. +* @param shouldContinueTaking - The function invoked per element with the item, its index, and the array. +* @returns A new array containing the elements taken from the end while the predicate returns `true`. +* +* @example +* // Returns [3, 2, 1] +* takeRightWhile([5, 4, 3, 2, 1], n => n < 4); +* +* @example +* // Returns [] +* takeRightWhile([1, 2, 3], n => n > 3); +* +* @example +* // Using index parameter +* takeRightWhile([10, 20, 30, 40], (x, index) => index > 1); +* // Returns: [30, 40] +*/ +function takeRightWhile(arr, shouldContinueTaking) { + for (let i = arr.length - 1; i >= 0; i--) if (!shouldContinueTaking(arr[i], i, arr)) return arr.slice(i + 1); + return arr.slice(); +} +//#endregion +exports.takeRightWhile = takeRightWhile; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeRightWhile.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeRightWhile.mjs new file mode 100644 index 0000000000000000000000000000000000000000..a792ce82f99e93169c4195b5763e9e55fd0a6e59 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeRightWhile.mjs @@ -0,0 +1,29 @@ +//#region src/array/takeRightWhile.ts +/** +* Takes elements from the end of the array while the predicate function returns `true`. +* +* @template T - Type of elements in the input array. +* +* @param arr - The array to take elements from. +* @param shouldContinueTaking - The function invoked per element with the item, its index, and the array. +* @returns A new array containing the elements taken from the end while the predicate returns `true`. +* +* @example +* // Returns [3, 2, 1] +* takeRightWhile([5, 4, 3, 2, 1], n => n < 4); +* +* @example +* // Returns [] +* takeRightWhile([1, 2, 3], n => n > 3); +* +* @example +* // Using index parameter +* takeRightWhile([10, 20, 30, 40], (x, index) => index > 1); +* // Returns: [30, 40] +*/ +function takeRightWhile(arr, shouldContinueTaking) { + for (let i = arr.length - 1; i >= 0; i--) if (!shouldContinueTaking(arr[i], i, arr)) return arr.slice(i + 1); + return arr.slice(); +} +//#endregion +export { takeRightWhile }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeWhile.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeWhile.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..1c35eb9d2d89a47b444d0ee97093f57f30b04a13 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeWhile.d.mts @@ -0,0 +1,27 @@ +//#region src/array/takeWhile.d.ts +/** + * Returns a new array containing the leading elements of the provided array + * that satisfy the provided predicate function. It stops taking elements as soon + * as an element does not satisfy the predicate. + * + * @template T - The type of elements in the array. + * @param arr - The array to process. + * @param shouldContinueTaking - The predicate function that is called with each element, its index, and the array. Elements are included in the result as long as this function returns true. + * @returns A new array containing the leading elements that satisfy the predicate. + * + * @example + * // Returns [1, 2] + * takeWhile([1, 2, 3, 4], x => x < 3); + * + * @example + * // Returns [] + * takeWhile([1, 2, 3, 4], x => x > 3); + * + * @example + * // Using index parameter + * takeWhile([10, 20, 30, 40], (x, index) => index < 2); + * // Returns: [10, 20] + */ +declare function takeWhile(arr: readonly T[], shouldContinueTaking: (element: T, index: number, array: readonly T[]) => boolean): T[]; +//#endregion +export { takeWhile }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeWhile.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeWhile.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1c35eb9d2d89a47b444d0ee97093f57f30b04a13 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeWhile.d.ts @@ -0,0 +1,27 @@ +//#region src/array/takeWhile.d.ts +/** + * Returns a new array containing the leading elements of the provided array + * that satisfy the provided predicate function. It stops taking elements as soon + * as an element does not satisfy the predicate. + * + * @template T - The type of elements in the array. + * @param arr - The array to process. + * @param shouldContinueTaking - The predicate function that is called with each element, its index, and the array. Elements are included in the result as long as this function returns true. + * @returns A new array containing the leading elements that satisfy the predicate. + * + * @example + * // Returns [1, 2] + * takeWhile([1, 2, 3, 4], x => x < 3); + * + * @example + * // Returns [] + * takeWhile([1, 2, 3, 4], x => x > 3); + * + * @example + * // Using index parameter + * takeWhile([10, 20, 30, 40], (x, index) => index < 2); + * // Returns: [10, 20] + */ +declare function takeWhile(arr: readonly T[], shouldContinueTaking: (element: T, index: number, array: readonly T[]) => boolean): T[]; +//#endregion +export { takeWhile }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeWhile.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeWhile.js new file mode 100644 index 0000000000000000000000000000000000000000..700decceba658bf6a29da6f3d2be7d4deefa7b09 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeWhile.js @@ -0,0 +1,35 @@ +//#region src/array/takeWhile.ts +/** +* Returns a new array containing the leading elements of the provided array +* that satisfy the provided predicate function. It stops taking elements as soon +* as an element does not satisfy the predicate. +* +* @template T - The type of elements in the array. +* @param arr - The array to process. +* @param shouldContinueTaking - The predicate function that is called with each element, its index, and the array. Elements are included in the result as long as this function returns true. +* @returns A new array containing the leading elements that satisfy the predicate. +* +* @example +* // Returns [1, 2] +* takeWhile([1, 2, 3, 4], x => x < 3); +* +* @example +* // Returns [] +* takeWhile([1, 2, 3, 4], x => x > 3); +* +* @example +* // Using index parameter +* takeWhile([10, 20, 30, 40], (x, index) => index < 2); +* // Returns: [10, 20] +*/ +function takeWhile(arr, shouldContinueTaking) { + const result = []; + for (let i = 0; i < arr.length; i++) { + const item = arr[i]; + if (!shouldContinueTaking(item, i, arr)) break; + result.push(item); + } + return result; +} +//#endregion +exports.takeWhile = takeWhile; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeWhile.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeWhile.mjs new file mode 100644 index 0000000000000000000000000000000000000000..8d95e77da44daa2e0bc1554b16aeef086fee8478 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/takeWhile.mjs @@ -0,0 +1,35 @@ +//#region src/array/takeWhile.ts +/** +* Returns a new array containing the leading elements of the provided array +* that satisfy the provided predicate function. It stops taking elements as soon +* as an element does not satisfy the predicate. +* +* @template T - The type of elements in the array. +* @param arr - The array to process. +* @param shouldContinueTaking - The predicate function that is called with each element, its index, and the array. Elements are included in the result as long as this function returns true. +* @returns A new array containing the leading elements that satisfy the predicate. +* +* @example +* // Returns [1, 2] +* takeWhile([1, 2, 3, 4], x => x < 3); +* +* @example +* // Returns [] +* takeWhile([1, 2, 3, 4], x => x > 3); +* +* @example +* // Using index parameter +* takeWhile([10, 20, 30, 40], (x, index) => index < 2); +* // Returns: [10, 20] +*/ +function takeWhile(arr, shouldContinueTaking) { + const result = []; + for (let i = 0; i < arr.length; i++) { + const item = arr[i]; + if (!shouldContinueTaking(item, i, arr)) break; + result.push(item); + } + return result; +} +//#endregion +export { takeWhile }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/toFilled.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/toFilled.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..c840df0fbb263901bed3dd31908feb8fe029c500 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/toFilled.d.mts @@ -0,0 +1,93 @@ +//#region src/array/toFilled.d.ts +/** + * Creates a new array filled with the specified value from the start position up to, but not including, the end position. + * This function does not mutate the original array. + * + * @template T - The type of elements in the original array. + * @template U - The type of the value to fill the new array with. + * @param arr - The array to base the new array on. + * @param value - The value to fill the new array with. + * @returns The new array with the filled values. + * + * @example + * const array = [1, 2, 3, 4, 5]; + * let result = toFilled(array, '*', 2); + * console.log(result); // [1, 2, '*', '*', '*'] + * console.log(array); // [1, 2, 3, 4, 5] + * + * result = toFilled(array, '*', 1, 4); + * console.log(result); // [1, '*', '*', '*', 5] + * console.log(array); // [1, 2, 3, 4, 5] + * + * result = toFilled(array, '*'); + * console.log(result); // ['*', '*', '*', '*', '*'] + * console.log(array); // [1, 2, 3, 4, 5] + * + * result = toFilled(array, '*', -4, -1); + * console.log(result); // [1, '*', '*', '*', 5] + * console.log(array); // [1, 2, 3, 4, 5] + */ +declare function toFilled(arr: readonly T[], value: U): Array; +/** + * Creates a new array filled with the specified value from the start position up to, but not including, the end position. + * This function does not mutate the original array. + * + * @template T - The type of elements in the original array. + * @template U - The type of the value to fill the new array with. + * @param arr - The array to base the new array on. + * @param value - The value to fill the new array with. + * @param [start=0] - The start position. Defaults to 0. + * @returns The new array with the filled values. + * + * @example + * const array = [1, 2, 3, 4, 5]; + * let result = toFilled(array, '*', 2); + * console.log(result); // [1, 2, '*', '*', '*'] + * console.log(array); // [1, 2, 3, 4, 5] + * + * result = toFilled(array, '*', 1, 4); + * console.log(result); // [1, '*', '*', '*', 5] + * console.log(array); // [1, 2, 3, 4, 5] + * + * result = toFilled(array, '*'); + * console.log(result); // ['*', '*', '*', '*', '*'] + * console.log(array); // [1, 2, 3, 4, 5] + * + * result = toFilled(array, '*', -4, -1); + * console.log(result); // [1, '*', '*', '*', 5] + * console.log(array); // [1, 2, 3, 4, 5] + */ +declare function toFilled(arr: readonly T[], value: U, start: number): Array; +/** + * Creates a new array filled with the specified value from the start position up to, but not including, the end position. + * This function does not mutate the original array. + * + * @template T - The type of elements in the original array. + * @template U - The type of the value to fill the new array with. + * @param arr - The array to base the new array on. + * @param value - The value to fill the new array with. + * @param [start=0] - The start position. Defaults to 0. + * @param [end=arr.length] - The end position. Defaults to the array's length. + * @returns The new array with the filled values. + * + * @example + * const array = [1, 2, 3, 4, 5]; + * let result = toFilled(array, '*', 2); + * console.log(result); // [1, 2, '*', '*', '*'] + * console.log(array); // [1, 2, 3, 4, 5] + * + * result = toFilled(array, '*', 1, 4); + * console.log(result); // [1, '*', '*', '*', 5] + * console.log(array); // [1, 2, 3, 4, 5] + * + * result = toFilled(array, '*'); + * console.log(result); // ['*', '*', '*', '*', '*'] + * console.log(array); // [1, 2, 3, 4, 5] + * + * result = toFilled(array, '*', -4, -1); + * console.log(result); // [1, '*', '*', '*', 5] + * console.log(array); // [1, 2, 3, 4, 5] + */ +declare function toFilled(arr: readonly T[], value: U, start: number, end: number): Array; +//#endregion +export { toFilled }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/toFilled.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/toFilled.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c840df0fbb263901bed3dd31908feb8fe029c500 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/toFilled.d.ts @@ -0,0 +1,93 @@ +//#region src/array/toFilled.d.ts +/** + * Creates a new array filled with the specified value from the start position up to, but not including, the end position. + * This function does not mutate the original array. + * + * @template T - The type of elements in the original array. + * @template U - The type of the value to fill the new array with. + * @param arr - The array to base the new array on. + * @param value - The value to fill the new array with. + * @returns The new array with the filled values. + * + * @example + * const array = [1, 2, 3, 4, 5]; + * let result = toFilled(array, '*', 2); + * console.log(result); // [1, 2, '*', '*', '*'] + * console.log(array); // [1, 2, 3, 4, 5] + * + * result = toFilled(array, '*', 1, 4); + * console.log(result); // [1, '*', '*', '*', 5] + * console.log(array); // [1, 2, 3, 4, 5] + * + * result = toFilled(array, '*'); + * console.log(result); // ['*', '*', '*', '*', '*'] + * console.log(array); // [1, 2, 3, 4, 5] + * + * result = toFilled(array, '*', -4, -1); + * console.log(result); // [1, '*', '*', '*', 5] + * console.log(array); // [1, 2, 3, 4, 5] + */ +declare function toFilled(arr: readonly T[], value: U): Array; +/** + * Creates a new array filled with the specified value from the start position up to, but not including, the end position. + * This function does not mutate the original array. + * + * @template T - The type of elements in the original array. + * @template U - The type of the value to fill the new array with. + * @param arr - The array to base the new array on. + * @param value - The value to fill the new array with. + * @param [start=0] - The start position. Defaults to 0. + * @returns The new array with the filled values. + * + * @example + * const array = [1, 2, 3, 4, 5]; + * let result = toFilled(array, '*', 2); + * console.log(result); // [1, 2, '*', '*', '*'] + * console.log(array); // [1, 2, 3, 4, 5] + * + * result = toFilled(array, '*', 1, 4); + * console.log(result); // [1, '*', '*', '*', 5] + * console.log(array); // [1, 2, 3, 4, 5] + * + * result = toFilled(array, '*'); + * console.log(result); // ['*', '*', '*', '*', '*'] + * console.log(array); // [1, 2, 3, 4, 5] + * + * result = toFilled(array, '*', -4, -1); + * console.log(result); // [1, '*', '*', '*', 5] + * console.log(array); // [1, 2, 3, 4, 5] + */ +declare function toFilled(arr: readonly T[], value: U, start: number): Array; +/** + * Creates a new array filled with the specified value from the start position up to, but not including, the end position. + * This function does not mutate the original array. + * + * @template T - The type of elements in the original array. + * @template U - The type of the value to fill the new array with. + * @param arr - The array to base the new array on. + * @param value - The value to fill the new array with. + * @param [start=0] - The start position. Defaults to 0. + * @param [end=arr.length] - The end position. Defaults to the array's length. + * @returns The new array with the filled values. + * + * @example + * const array = [1, 2, 3, 4, 5]; + * let result = toFilled(array, '*', 2); + * console.log(result); // [1, 2, '*', '*', '*'] + * console.log(array); // [1, 2, 3, 4, 5] + * + * result = toFilled(array, '*', 1, 4); + * console.log(result); // [1, '*', '*', '*', 5] + * console.log(array); // [1, 2, 3, 4, 5] + * + * result = toFilled(array, '*'); + * console.log(result); // ['*', '*', '*', '*', '*'] + * console.log(array); // [1, 2, 3, 4, 5] + * + * result = toFilled(array, '*', -4, -1); + * console.log(result); // [1, '*', '*', '*', 5] + * console.log(array); // [1, 2, 3, 4, 5] + */ +declare function toFilled(arr: readonly T[], value: U, start: number, end: number): Array; +//#endregion +export { toFilled }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/toFilled.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/toFilled.js new file mode 100644 index 0000000000000000000000000000000000000000..0e8c3166abaaeaec5967ad7e8032630a0dc24603 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/toFilled.js @@ -0,0 +1,23 @@ +//#region src/array/toFilled.ts +/** +* Creates a new array filled with the specified value from the start position up to, but not including, the end position. +* This function does not mutate the original array. +* +* @template T - The type of elements in the original array. +* @template U - The type of the value to fill the new array with. +* @param arr - The array to base the new array on. +* @param value - The value to fill the new array with. +* @param [start=0] - The start position. Defaults to 0. +* @param [end=arr.length] - The end position. Defaults to the array's length. +* @returns The new array with the filled values. +*/ +function toFilled(arr, value, start = 0, end = arr.length) { + const length = arr.length; + const finalStart = Math.max(start >= 0 ? start : length + start, 0); + const finalEnd = Math.min(end >= 0 ? end : length + end, length); + const newArr = arr.slice(); + for (let i = finalStart; i < finalEnd; i++) newArr[i] = value; + return newArr; +} +//#endregion +exports.toFilled = toFilled; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/toFilled.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/toFilled.mjs new file mode 100644 index 0000000000000000000000000000000000000000..0883f4a207efb0eba1c022368cbc46259088c832 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/toFilled.mjs @@ -0,0 +1,23 @@ +//#region src/array/toFilled.ts +/** +* Creates a new array filled with the specified value from the start position up to, but not including, the end position. +* This function does not mutate the original array. +* +* @template T - The type of elements in the original array. +* @template U - The type of the value to fill the new array with. +* @param arr - The array to base the new array on. +* @param value - The value to fill the new array with. +* @param [start=0] - The start position. Defaults to 0. +* @param [end=arr.length] - The end position. Defaults to the array's length. +* @returns The new array with the filled values. +*/ +function toFilled(arr, value, start = 0, end = arr.length) { + const length = arr.length; + const finalStart = Math.max(start >= 0 ? start : length + start, 0); + const finalEnd = Math.min(end >= 0 ? end : length + end, length); + const newArr = arr.slice(); + for (let i = finalStart; i < finalEnd; i++) newArr[i] = value; + return newArr; +} +//#endregion +export { toFilled }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/union.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/union.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..a26b69a54afb4e79e6765fd1ae9867e272077f1e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/union.d.mts @@ -0,0 +1,21 @@ +//#region src/array/union.d.ts +/** + * Creates an array of unique values from all given arrays. + * + * This function takes two arrays, merges them into a single array, and returns a new array + * containing only the unique values from the merged array. + * + * @template T - The type of elements in the array. + * @param arr1 - The first array to merge and filter for unique values. + * @param arr2 - The second array to merge and filter for unique values. + * @returns A new array of unique values. + * + * @example + * const array1 = [1, 2, 3]; + * const array2 = [3, 4, 5]; + * const result = union(array1, array2); + * // result will be [1, 2, 3, 4, 5] + */ +declare function union(arr1: readonly T[], arr2: readonly T[]): T[]; +//#endregion +export { union }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/union.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/union.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a26b69a54afb4e79e6765fd1ae9867e272077f1e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/union.d.ts @@ -0,0 +1,21 @@ +//#region src/array/union.d.ts +/** + * Creates an array of unique values from all given arrays. + * + * This function takes two arrays, merges them into a single array, and returns a new array + * containing only the unique values from the merged array. + * + * @template T - The type of elements in the array. + * @param arr1 - The first array to merge and filter for unique values. + * @param arr2 - The second array to merge and filter for unique values. + * @returns A new array of unique values. + * + * @example + * const array1 = [1, 2, 3]; + * const array2 = [3, 4, 5]; + * const result = union(array1, array2); + * // result will be [1, 2, 3, 4, 5] + */ +declare function union(arr1: readonly T[], arr2: readonly T[]): T[]; +//#endregion +export { union }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/union.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/union.js new file mode 100644 index 0000000000000000000000000000000000000000..c4ded9dbe1aeae5d8a41ce53e1ed4cb7963ed3a8 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/union.js @@ -0,0 +1,24 @@ +const require_uniq = require("./uniq.js"); +//#region src/array/union.ts +/** +* Creates an array of unique values from all given arrays. +* +* This function takes two arrays, merges them into a single array, and returns a new array +* containing only the unique values from the merged array. +* +* @template T - The type of elements in the array. +* @param arr1 - The first array to merge and filter for unique values. +* @param arr2 - The second array to merge and filter for unique values. +* @returns A new array of unique values. +* +* @example +* const array1 = [1, 2, 3]; +* const array2 = [3, 4, 5]; +* const result = union(array1, array2); +* // result will be [1, 2, 3, 4, 5] +*/ +function union(arr1, arr2) { + return require_uniq.uniq(arr1.concat(arr2)); +} +//#endregion +exports.union = union; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/union.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/union.mjs new file mode 100644 index 0000000000000000000000000000000000000000..3afc700eccd365fafcba2b7974a712d38709e1b5 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/union.mjs @@ -0,0 +1,24 @@ +import { uniq } from "./uniq.mjs"; +//#region src/array/union.ts +/** +* Creates an array of unique values from all given arrays. +* +* This function takes two arrays, merges them into a single array, and returns a new array +* containing only the unique values from the merged array. +* +* @template T - The type of elements in the array. +* @param arr1 - The first array to merge and filter for unique values. +* @param arr2 - The second array to merge and filter for unique values. +* @returns A new array of unique values. +* +* @example +* const array1 = [1, 2, 3]; +* const array2 = [3, 4, 5]; +* const result = union(array1, array2); +* // result will be [1, 2, 3, 4, 5] +*/ +function union(arr1, arr2) { + return uniq(arr1.concat(arr2)); +} +//#endregion +export { union }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unionBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unionBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..43082d89143b477010b00cc20a3cbe558f30fe40 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unionBy.d.mts @@ -0,0 +1,26 @@ +//#region src/array/unionBy.d.ts +/** + * Creates an array of unique values, in order, from all given arrays using a provided mapping function to determine equality. + * + * @template T - The type of elements in the array. + * @template U - The type of mapped elements. + * @param arr1 - The first array. + * @param arr2 - The second array. + * @param mapper - The function to map array elements to comparison values. + * @returns A new array containing the union of unique elements from `arr1` and `arr2`, based on the values returned by the mapping function. + * + * @example + * // Custom mapping function for numbers (modulo comparison) + * const moduloMapper = (x) => x % 3; + * unionBy([1, 2, 3], [4, 5, 6], moduloMapper); + * // Returns [1, 2, 3] + * + * @example + * // Custom mapping function for objects with an 'id' property + * const idMapper = (obj) => obj.id; + * unionBy([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], idMapper); + * // Returns [{ id: 1 }, { id: 2 }, { id: 3 }] + */ +declare function unionBy(arr1: readonly T[], arr2: readonly T[], mapper: (item: T) => U): T[]; +//#endregion +export { unionBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unionBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unionBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..43082d89143b477010b00cc20a3cbe558f30fe40 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unionBy.d.ts @@ -0,0 +1,26 @@ +//#region src/array/unionBy.d.ts +/** + * Creates an array of unique values, in order, from all given arrays using a provided mapping function to determine equality. + * + * @template T - The type of elements in the array. + * @template U - The type of mapped elements. + * @param arr1 - The first array. + * @param arr2 - The second array. + * @param mapper - The function to map array elements to comparison values. + * @returns A new array containing the union of unique elements from `arr1` and `arr2`, based on the values returned by the mapping function. + * + * @example + * // Custom mapping function for numbers (modulo comparison) + * const moduloMapper = (x) => x % 3; + * unionBy([1, 2, 3], [4, 5, 6], moduloMapper); + * // Returns [1, 2, 3] + * + * @example + * // Custom mapping function for objects with an 'id' property + * const idMapper = (obj) => obj.id; + * unionBy([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], idMapper); + * // Returns [{ id: 1 }, { id: 2 }, { id: 3 }] + */ +declare function unionBy(arr1: readonly T[], arr2: readonly T[], mapper: (item: T) => U): T[]; +//#endregion +export { unionBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unionBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unionBy.js new file mode 100644 index 0000000000000000000000000000000000000000..540ab3d257b1a7efe9b9f5d3921d5dee9493dcff --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unionBy.js @@ -0,0 +1,29 @@ +const require_uniqBy = require("./uniqBy.js"); +//#region src/array/unionBy.ts +/** +* Creates an array of unique values, in order, from all given arrays using a provided mapping function to determine equality. +* +* @template T - The type of elements in the array. +* @template U - The type of mapped elements. +* @param arr1 - The first array. +* @param arr2 - The second array. +* @param mapper - The function to map array elements to comparison values. +* @returns A new array containing the union of unique elements from `arr1` and `arr2`, based on the values returned by the mapping function. +* +* @example +* // Custom mapping function for numbers (modulo comparison) +* const moduloMapper = (x) => x % 3; +* unionBy([1, 2, 3], [4, 5, 6], moduloMapper); +* // Returns [1, 2, 3] +* +* @example +* // Custom mapping function for objects with an 'id' property +* const idMapper = (obj) => obj.id; +* unionBy([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], idMapper); +* // Returns [{ id: 1 }, { id: 2 }, { id: 3 }] +*/ +function unionBy(arr1, arr2, mapper) { + return require_uniqBy.uniqBy(arr1.concat(arr2), mapper); +} +//#endregion +exports.unionBy = unionBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unionBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unionBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..65d9294f55fd2afbc1166ea4045cec993c1c4a3e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unionBy.mjs @@ -0,0 +1,29 @@ +import { uniqBy } from "./uniqBy.mjs"; +//#region src/array/unionBy.ts +/** +* Creates an array of unique values, in order, from all given arrays using a provided mapping function to determine equality. +* +* @template T - The type of elements in the array. +* @template U - The type of mapped elements. +* @param arr1 - The first array. +* @param arr2 - The second array. +* @param mapper - The function to map array elements to comparison values. +* @returns A new array containing the union of unique elements from `arr1` and `arr2`, based on the values returned by the mapping function. +* +* @example +* // Custom mapping function for numbers (modulo comparison) +* const moduloMapper = (x) => x % 3; +* unionBy([1, 2, 3], [4, 5, 6], moduloMapper); +* // Returns [1, 2, 3] +* +* @example +* // Custom mapping function for objects with an 'id' property +* const idMapper = (obj) => obj.id; +* unionBy([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], idMapper); +* // Returns [{ id: 1 }, { id: 2 }, { id: 3 }] +*/ +function unionBy(arr1, arr2, mapper) { + return uniqBy(arr1.concat(arr2), mapper); +} +//#endregion +export { unionBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unionWith.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unionWith.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..dc91aca979df077d9dada376bc48fbcdbb1fd488 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unionWith.d.mts @@ -0,0 +1,24 @@ +//#region src/array/unionWith.d.ts +/** + * Creates an array of unique values from two given arrays based on a custom equality function. + * + * This function takes two arrays and a custom equality function, merges the arrays, and returns + * a new array containing only the unique values as determined by the custom equality function. + * + * @template T - The type of elements in the array. + * @param arr1 - The first array to merge and filter for unique values. + * @param arr2 - The second array to merge and filter for unique values. + * @param areItemsEqual - A custom function to determine if two elements are equal. + * It takes two arguments and returns `true` if the elements are considered equal, and `false` otherwise. + * @returns A new array of unique values based on the custom equality function. + * + * @example + * const array1 = [{ id: 1 }, { id: 2 }]; + * const array2 = [{ id: 2 }, { id: 3 }]; + * const areItemsEqual = (a, b) => a.id === b.id; + * const result = unionWith(array1, array2, areItemsEqual); + * // result will be [{ id: 1 }, { id: 2 }, { id: 3 }] since { id: 2 } is considered equal in both arrays + */ +declare function unionWith(arr1: readonly T[], arr2: readonly T[], areItemsEqual: (item1: T, item2: T) => boolean): T[]; +//#endregion +export { unionWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unionWith.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unionWith.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..dc91aca979df077d9dada376bc48fbcdbb1fd488 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unionWith.d.ts @@ -0,0 +1,24 @@ +//#region src/array/unionWith.d.ts +/** + * Creates an array of unique values from two given arrays based on a custom equality function. + * + * This function takes two arrays and a custom equality function, merges the arrays, and returns + * a new array containing only the unique values as determined by the custom equality function. + * + * @template T - The type of elements in the array. + * @param arr1 - The first array to merge and filter for unique values. + * @param arr2 - The second array to merge and filter for unique values. + * @param areItemsEqual - A custom function to determine if two elements are equal. + * It takes two arguments and returns `true` if the elements are considered equal, and `false` otherwise. + * @returns A new array of unique values based on the custom equality function. + * + * @example + * const array1 = [{ id: 1 }, { id: 2 }]; + * const array2 = [{ id: 2 }, { id: 3 }]; + * const areItemsEqual = (a, b) => a.id === b.id; + * const result = unionWith(array1, array2, areItemsEqual); + * // result will be [{ id: 1 }, { id: 2 }, { id: 3 }] since { id: 2 } is considered equal in both arrays + */ +declare function unionWith(arr1: readonly T[], arr2: readonly T[], areItemsEqual: (item1: T, item2: T) => boolean): T[]; +//#endregion +export { unionWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unionWith.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unionWith.js new file mode 100644 index 0000000000000000000000000000000000000000..5503f410491ce5153de478880ed2ff691e8c7759 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unionWith.js @@ -0,0 +1,27 @@ +const require_uniqWith = require("./uniqWith.js"); +//#region src/array/unionWith.ts +/** +* Creates an array of unique values from two given arrays based on a custom equality function. +* +* This function takes two arrays and a custom equality function, merges the arrays, and returns +* a new array containing only the unique values as determined by the custom equality function. +* +* @template T - The type of elements in the array. +* @param arr1 - The first array to merge and filter for unique values. +* @param arr2 - The second array to merge and filter for unique values. +* @param areItemsEqual - A custom function to determine if two elements are equal. +* It takes two arguments and returns `true` if the elements are considered equal, and `false` otherwise. +* @returns A new array of unique values based on the custom equality function. +* +* @example +* const array1 = [{ id: 1 }, { id: 2 }]; +* const array2 = [{ id: 2 }, { id: 3 }]; +* const areItemsEqual = (a, b) => a.id === b.id; +* const result = unionWith(array1, array2, areItemsEqual); +* // result will be [{ id: 1 }, { id: 2 }, { id: 3 }] since { id: 2 } is considered equal in both arrays +*/ +function unionWith(arr1, arr2, areItemsEqual) { + return require_uniqWith.uniqWith(arr1.concat(arr2), areItemsEqual); +} +//#endregion +exports.unionWith = unionWith; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unionWith.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unionWith.mjs new file mode 100644 index 0000000000000000000000000000000000000000..31270af1fb7019f9ecb297fda1fa41679fb7dc4a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unionWith.mjs @@ -0,0 +1,27 @@ +import { uniqWith } from "./uniqWith.mjs"; +//#region src/array/unionWith.ts +/** +* Creates an array of unique values from two given arrays based on a custom equality function. +* +* This function takes two arrays and a custom equality function, merges the arrays, and returns +* a new array containing only the unique values as determined by the custom equality function. +* +* @template T - The type of elements in the array. +* @param arr1 - The first array to merge and filter for unique values. +* @param arr2 - The second array to merge and filter for unique values. +* @param areItemsEqual - A custom function to determine if two elements are equal. +* It takes two arguments and returns `true` if the elements are considered equal, and `false` otherwise. +* @returns A new array of unique values based on the custom equality function. +* +* @example +* const array1 = [{ id: 1 }, { id: 2 }]; +* const array2 = [{ id: 2 }, { id: 3 }]; +* const areItemsEqual = (a, b) => a.id === b.id; +* const result = unionWith(array1, array2, areItemsEqual); +* // result will be [{ id: 1 }, { id: 2 }, { id: 3 }] since { id: 2 } is considered equal in both arrays +*/ +function unionWith(arr1, arr2, areItemsEqual) { + return uniqWith(arr1.concat(arr2), areItemsEqual); +} +//#endregion +export { unionWith }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniq.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniq.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..e2ee31048f69d4ed2179aa2c25b0b174e35d223c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniq.d.mts @@ -0,0 +1,19 @@ +//#region src/array/uniq.d.ts +/** + * Creates a duplicate-free version of an array. + * + * This function takes an array and returns a new array containing only the unique values + * from the original array, preserving the order of first occurrence. + * + * @template T - The type of elements in the array. + * @param arr - The array to process. + * @returns A new array with only unique values from the original array. + * + * @example + * const array = [1, 2, 2, 3, 4, 4, 5]; + * const result = uniq(array); + * // result will be [1, 2, 3, 4, 5] + */ +declare function uniq(arr: readonly T[]): T[]; +//#endregion +export { uniq }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniq.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniq.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e2ee31048f69d4ed2179aa2c25b0b174e35d223c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniq.d.ts @@ -0,0 +1,19 @@ +//#region src/array/uniq.d.ts +/** + * Creates a duplicate-free version of an array. + * + * This function takes an array and returns a new array containing only the unique values + * from the original array, preserving the order of first occurrence. + * + * @template T - The type of elements in the array. + * @param arr - The array to process. + * @returns A new array with only unique values from the original array. + * + * @example + * const array = [1, 2, 2, 3, 4, 4, 5]; + * const result = uniq(array); + * // result will be [1, 2, 3, 4, 5] + */ +declare function uniq(arr: readonly T[]): T[]; +//#endregion +export { uniq }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniq.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniq.js new file mode 100644 index 0000000000000000000000000000000000000000..467782bb1fbc08ab7cafc0aaee9027b86424707f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniq.js @@ -0,0 +1,21 @@ +//#region src/array/uniq.ts +/** +* Creates a duplicate-free version of an array. +* +* This function takes an array and returns a new array containing only the unique values +* from the original array, preserving the order of first occurrence. +* +* @template T - The type of elements in the array. +* @param arr - The array to process. +* @returns A new array with only unique values from the original array. +* +* @example +* const array = [1, 2, 2, 3, 4, 4, 5]; +* const result = uniq(array); +* // result will be [1, 2, 3, 4, 5] +*/ +function uniq(arr) { + return [...new Set(arr)]; +} +//#endregion +exports.uniq = uniq; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniq.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniq.mjs new file mode 100644 index 0000000000000000000000000000000000000000..5d901a7696fee950867ed30d94fdec2e8cff8801 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniq.mjs @@ -0,0 +1,21 @@ +//#region src/array/uniq.ts +/** +* Creates a duplicate-free version of an array. +* +* This function takes an array and returns a new array containing only the unique values +* from the original array, preserving the order of first occurrence. +* +* @template T - The type of elements in the array. +* @param arr - The array to process. +* @returns A new array with only unique values from the original array. +* +* @example +* const array = [1, 2, 2, 3, 4, 4, 5]; +* const result = uniq(array); +* // result will be [1, 2, 3, 4, 5] +*/ +function uniq(arr) { + return [...new Set(arr)]; +} +//#endregion +export { uniq }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniqBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniqBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..1505e5a46422844b20967346230ece2d47bb4391 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniqBy.d.mts @@ -0,0 +1,32 @@ +//#region src/array/uniqBy.d.ts +/** + * Returns a new array containing only the unique elements from the original array, + * based on the values returned by the mapper function. + * + * When duplicates are found, the first occurrence is kept and the rest are discarded. + * + * @template T - The type of elements in the array. + * @template U - The type of mapped elements. + * @param arr - The array to process. + * @param mapper - The function used to convert the array elements. + * @returns A new array containing only the unique elements from the original array, based on the values returned by the mapper function. + * + * @example + * ```ts + * uniqBy([1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19], Math.floor); + * // [1.2, 2.1, 3.2, 5.7, 7.19] + * ``` + * + * @example + * const array = [ + * { category: 'fruit', name: 'apple' }, + * { category: 'fruit', name: 'banana' }, + * { category: 'vegetable', name: 'carrot' }, + * ]; + * uniqBy(array, item => item.category).length + * // 2 + * ``` + */ +declare function uniqBy(arr: readonly T[], mapper: (item: T, index: number, array: readonly T[]) => U): T[]; +//#endregion +export { uniqBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniqBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniqBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1505e5a46422844b20967346230ece2d47bb4391 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniqBy.d.ts @@ -0,0 +1,32 @@ +//#region src/array/uniqBy.d.ts +/** + * Returns a new array containing only the unique elements from the original array, + * based on the values returned by the mapper function. + * + * When duplicates are found, the first occurrence is kept and the rest are discarded. + * + * @template T - The type of elements in the array. + * @template U - The type of mapped elements. + * @param arr - The array to process. + * @param mapper - The function used to convert the array elements. + * @returns A new array containing only the unique elements from the original array, based on the values returned by the mapper function. + * + * @example + * ```ts + * uniqBy([1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19], Math.floor); + * // [1.2, 2.1, 3.2, 5.7, 7.19] + * ``` + * + * @example + * const array = [ + * { category: 'fruit', name: 'apple' }, + * { category: 'fruit', name: 'banana' }, + * { category: 'vegetable', name: 'carrot' }, + * ]; + * uniqBy(array, item => item.category).length + * // 2 + * ``` + */ +declare function uniqBy(arr: readonly T[], mapper: (item: T, index: number, array: readonly T[]) => U): T[]; +//#endregion +export { uniqBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniqBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniqBy.js new file mode 100644 index 0000000000000000000000000000000000000000..759b247a03b60972eaacf0a234f3eaacba6bf8f3 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniqBy.js @@ -0,0 +1,40 @@ +//#region src/array/uniqBy.ts +/** +* Returns a new array containing only the unique elements from the original array, +* based on the values returned by the mapper function. +* +* When duplicates are found, the first occurrence is kept and the rest are discarded. +* +* @template T - The type of elements in the array. +* @template U - The type of mapped elements. +* @param arr - The array to process. +* @param mapper - The function used to convert the array elements. +* @returns A new array containing only the unique elements from the original array, based on the values returned by the mapper function. +* +* @example +* ```ts +* uniqBy([1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19], Math.floor); +* // [1.2, 2.1, 3.2, 5.7, 7.19] +* ``` +* +* @example +* const array = [ +* { category: 'fruit', name: 'apple' }, +* { category: 'fruit', name: 'banana' }, +* { category: 'vegetable', name: 'carrot' }, +* ]; +* uniqBy(array, item => item.category).length +* // 2 +* ``` +*/ +function uniqBy(arr, mapper) { + const map = /* @__PURE__ */ new Map(); + for (let i = 0; i < arr.length; i++) { + const item = arr[i]; + const key = mapper(item, i, arr); + if (!map.has(key)) map.set(key, item); + } + return Array.from(map.values()); +} +//#endregion +exports.uniqBy = uniqBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniqBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniqBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..897fe04517428b8cecc5c6797c7ed89acad421d1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniqBy.mjs @@ -0,0 +1,40 @@ +//#region src/array/uniqBy.ts +/** +* Returns a new array containing only the unique elements from the original array, +* based on the values returned by the mapper function. +* +* When duplicates are found, the first occurrence is kept and the rest are discarded. +* +* @template T - The type of elements in the array. +* @template U - The type of mapped elements. +* @param arr - The array to process. +* @param mapper - The function used to convert the array elements. +* @returns A new array containing only the unique elements from the original array, based on the values returned by the mapper function. +* +* @example +* ```ts +* uniqBy([1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19], Math.floor); +* // [1.2, 2.1, 3.2, 5.7, 7.19] +* ``` +* +* @example +* const array = [ +* { category: 'fruit', name: 'apple' }, +* { category: 'fruit', name: 'banana' }, +* { category: 'vegetable', name: 'carrot' }, +* ]; +* uniqBy(array, item => item.category).length +* // 2 +* ``` +*/ +function uniqBy(arr, mapper) { + const map = /* @__PURE__ */ new Map(); + for (let i = 0; i < arr.length; i++) { + const item = arr[i]; + const key = mapper(item, i, arr); + if (!map.has(key)) map.set(key, item); + } + return Array.from(map.values()); +} +//#endregion +export { uniqBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniqWith.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniqWith.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..a83ca4d3e0da75e7e8a4d1b84f4eb9f07bf5f066 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniqWith.d.mts @@ -0,0 +1,19 @@ +//#region src/array/uniqWith.d.ts +/** + * Returns a new array containing only the unique elements from the original array, + * based on the values returned by the comparator function. + * + * @template T - The type of elements in the array. + * @param arr - The array to process. + * @param areItemsEqual - The function used to compare the array elements. + * @returns A new array containing only the unique elements from the original array, based on the values returned by the comparator function. + * + * @example + * ```ts + * uniqWith([1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19], (a, b) => Math.abs(a - b) < 1); + * // [1.2, 3.2, 5.7, 7.19] + * ``` + */ +declare function uniqWith(arr: readonly T[], areItemsEqual: (item1: T, item2: T) => boolean): T[]; +//#endregion +export { uniqWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniqWith.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniqWith.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a83ca4d3e0da75e7e8a4d1b84f4eb9f07bf5f066 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniqWith.d.ts @@ -0,0 +1,19 @@ +//#region src/array/uniqWith.d.ts +/** + * Returns a new array containing only the unique elements from the original array, + * based on the values returned by the comparator function. + * + * @template T - The type of elements in the array. + * @param arr - The array to process. + * @param areItemsEqual - The function used to compare the array elements. + * @returns A new array containing only the unique elements from the original array, based on the values returned by the comparator function. + * + * @example + * ```ts + * uniqWith([1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19], (a, b) => Math.abs(a - b) < 1); + * // [1.2, 3.2, 5.7, 7.19] + * ``` + */ +declare function uniqWith(arr: readonly T[], areItemsEqual: (item1: T, item2: T) => boolean): T[]; +//#endregion +export { uniqWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniqWith.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniqWith.js new file mode 100644 index 0000000000000000000000000000000000000000..a4e6678eae4890a03a6b285626f8e895384e2860 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniqWith.js @@ -0,0 +1,26 @@ +//#region src/array/uniqWith.ts +/** +* Returns a new array containing only the unique elements from the original array, +* based on the values returned by the comparator function. +* +* @template T - The type of elements in the array. +* @param arr - The array to process. +* @param areItemsEqual - The function used to compare the array elements. +* @returns A new array containing only the unique elements from the original array, based on the values returned by the comparator function. +* +* @example +* ```ts +* uniqWith([1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19], (a, b) => Math.abs(a - b) < 1); +* // [1.2, 3.2, 5.7, 7.19] +* ``` +*/ +function uniqWith(arr, areItemsEqual) { + const result = []; + for (let i = 0; i < arr.length; i++) { + const item = arr[i]; + if (result.every((v) => !areItemsEqual(v, item))) result.push(item); + } + return result; +} +//#endregion +exports.uniqWith = uniqWith; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniqWith.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniqWith.mjs new file mode 100644 index 0000000000000000000000000000000000000000..02bb914fa8347ada8b57179275715937e67f6297 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/uniqWith.mjs @@ -0,0 +1,26 @@ +//#region src/array/uniqWith.ts +/** +* Returns a new array containing only the unique elements from the original array, +* based on the values returned by the comparator function. +* +* @template T - The type of elements in the array. +* @param arr - The array to process. +* @param areItemsEqual - The function used to compare the array elements. +* @returns A new array containing only the unique elements from the original array, based on the values returned by the comparator function. +* +* @example +* ```ts +* uniqWith([1.2, 1.5, 2.1, 3.2, 5.7, 5.3, 7.19], (a, b) => Math.abs(a - b) < 1); +* // [1.2, 3.2, 5.7, 7.19] +* ``` +*/ +function uniqWith(arr, areItemsEqual) { + const result = []; + for (let i = 0; i < arr.length; i++) { + const item = arr[i]; + if (result.every((v) => !areItemsEqual(v, item))) result.push(item); + } + return result; +} +//#endregion +export { uniqWith }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unzip.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unzip.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..2662a54ab835197f958e63357df8bc906a4aaa92 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unzip.d.mts @@ -0,0 +1,21 @@ +//#region src/array/unzip.d.ts +/** + * Gathers elements in the same position in an internal array + * from a grouped array of elements and returns them as a new array. + * + * The returned array's length matches the longest nested array. + * Missing positions in shorter arrays are filled with `undefined`. + * + * @template T - The type of elements in the nested array. + * @param zipped - The nested array to unzip. + * @returns A new array of unzipped elements. + * + * @example + * const zipped = [['a', true, 1],['b', false, 2]]; + * const result = unzip(zipped); + * // result will be [['a', 'b'], [true, false], [1, 2]] + */ +declare function unzip(zipped: ReadonlyArray<[...T]>): Unzip; +type Unzip = { [I in keyof K]: Array }; +//#endregion +export { unzip }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unzip.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unzip.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..2662a54ab835197f958e63357df8bc906a4aaa92 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unzip.d.ts @@ -0,0 +1,21 @@ +//#region src/array/unzip.d.ts +/** + * Gathers elements in the same position in an internal array + * from a grouped array of elements and returns them as a new array. + * + * The returned array's length matches the longest nested array. + * Missing positions in shorter arrays are filled with `undefined`. + * + * @template T - The type of elements in the nested array. + * @param zipped - The nested array to unzip. + * @returns A new array of unzipped elements. + * + * @example + * const zipped = [['a', true, 1],['b', false, 2]]; + * const result = unzip(zipped); + * // result will be [['a', 'b'], [true, false], [1, 2]] + */ +declare function unzip(zipped: ReadonlyArray<[...T]>): Unzip; +type Unzip = { [I in keyof K]: Array }; +//#endregion +export { unzip }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unzip.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unzip.js new file mode 100644 index 0000000000000000000000000000000000000000..78e0b1423a2360df3a2265fc3115750f9a4f1ce8 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unzip.js @@ -0,0 +1,29 @@ +//#region src/array/unzip.ts +/** +* Gathers elements in the same position in an internal array +* from a grouped array of elements and returns them as a new array. +* +* The returned array's length matches the longest nested array. +* Missing positions in shorter arrays are filled with `undefined`. +* +* @template T - The type of elements in the nested array. +* @param zipped - The nested array to unzip. +* @returns A new array of unzipped elements. +* +* @example +* const zipped = [['a', true, 1],['b', false, 2]]; +* const result = unzip(zipped); +* // result will be [['a', 'b'], [true, false], [1, 2]] +*/ +function unzip(zipped) { + let maxLen = 0; + for (let i = 0; i < zipped.length; i++) if (zipped[i].length > maxLen) maxLen = zipped[i].length; + const result = new Array(maxLen); + for (let i = 0; i < maxLen; i++) { + result[i] = new Array(zipped.length); + for (let j = 0; j < zipped.length; j++) result[i][j] = zipped[j][i]; + } + return result; +} +//#endregion +exports.unzip = unzip; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unzip.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unzip.mjs new file mode 100644 index 0000000000000000000000000000000000000000..056b4ef5d008e3aeef0ed7020957a9d864aee31b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unzip.mjs @@ -0,0 +1,29 @@ +//#region src/array/unzip.ts +/** +* Gathers elements in the same position in an internal array +* from a grouped array of elements and returns them as a new array. +* +* The returned array's length matches the longest nested array. +* Missing positions in shorter arrays are filled with `undefined`. +* +* @template T - The type of elements in the nested array. +* @param zipped - The nested array to unzip. +* @returns A new array of unzipped elements. +* +* @example +* const zipped = [['a', true, 1],['b', false, 2]]; +* const result = unzip(zipped); +* // result will be [['a', 'b'], [true, false], [1, 2]] +*/ +function unzip(zipped) { + let maxLen = 0; + for (let i = 0; i < zipped.length; i++) if (zipped[i].length > maxLen) maxLen = zipped[i].length; + const result = new Array(maxLen); + for (let i = 0; i < maxLen; i++) { + result[i] = new Array(zipped.length); + for (let j = 0; j < zipped.length; j++) result[i][j] = zipped[j][i]; + } + return result; +} +//#endregion +export { unzip }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unzipWith.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unzipWith.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..df88ee6474c556170781295190d0d2a2ce85264a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unzipWith.d.mts @@ -0,0 +1,18 @@ +//#region src/array/unzipWith.d.ts +/** + * Unzips an array of arrays, applying an `iteratee` function to regrouped elements. + * + * @template T, R + * @param target - The nested array to unzip. This is an array of arrays, + * where each inner array contains elements to be unzipped. + * @param iteratee - A function to transform the unzipped elements. + * @returns A new array of unzipped and transformed elements. + * + * @example + * const nestedArray = [[1, 2], [3, 4], [5, 6]]; + * const result = unzipWith(nestedArray, (item, item2, item3) => item + item2 + item3); + * // result will be [9, 12] + */ +declare function unzipWith(target: readonly T[][], iteratee: (...args: T[]) => R): R[]; +//#endregion +export { unzipWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unzipWith.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unzipWith.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..df88ee6474c556170781295190d0d2a2ce85264a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unzipWith.d.ts @@ -0,0 +1,18 @@ +//#region src/array/unzipWith.d.ts +/** + * Unzips an array of arrays, applying an `iteratee` function to regrouped elements. + * + * @template T, R + * @param target - The nested array to unzip. This is an array of arrays, + * where each inner array contains elements to be unzipped. + * @param iteratee - A function to transform the unzipped elements. + * @returns A new array of unzipped and transformed elements. + * + * @example + * const nestedArray = [[1, 2], [3, 4], [5, 6]]; + * const result = unzipWith(nestedArray, (item, item2, item3) => item + item2 + item3); + * // result will be [9, 12] + */ +declare function unzipWith(target: readonly T[][], iteratee: (...args: T[]) => R): R[]; +//#endregion +export { unzipWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unzipWith.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unzipWith.js new file mode 100644 index 0000000000000000000000000000000000000000..f66af0b3e74f3b0ad85bc2ba976767ed7223e1b4 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unzipWith.js @@ -0,0 +1,27 @@ +//#region src/array/unzipWith.ts +/** +* Unzips an array of arrays, applying an `iteratee` function to regrouped elements. +* +* @template T, R +* @param target - The nested array to unzip. This is an array of arrays, +* where each inner array contains elements to be unzipped. +* @param iteratee - A function to transform the unzipped elements. +* @returns A new array of unzipped and transformed elements. +* +* @example +* const nestedArray = [[1, 2], [3, 4], [5, 6]]; +* const result = unzipWith(nestedArray, (item, item2, item3) => item + item2 + item3); +* // result will be [9, 12] +*/ +function unzipWith(target, iteratee) { + const maxLength = Math.max(0, ...target.map((innerArray) => innerArray.length)); + const result = new Array(maxLength); + for (let i = 0; i < maxLength; i++) { + const group = new Array(target.length); + for (let j = 0; j < target.length; j++) group[j] = target[j][i]; + result[i] = iteratee(...group); + } + return result; +} +//#endregion +exports.unzipWith = unzipWith; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unzipWith.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unzipWith.mjs new file mode 100644 index 0000000000000000000000000000000000000000..cbd48b0d71cc2b06b7835c923dbda207b1b4a884 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/unzipWith.mjs @@ -0,0 +1,27 @@ +//#region src/array/unzipWith.ts +/** +* Unzips an array of arrays, applying an `iteratee` function to regrouped elements. +* +* @template T, R +* @param target - The nested array to unzip. This is an array of arrays, +* where each inner array contains elements to be unzipped. +* @param iteratee - A function to transform the unzipped elements. +* @returns A new array of unzipped and transformed elements. +* +* @example +* const nestedArray = [[1, 2], [3, 4], [5, 6]]; +* const result = unzipWith(nestedArray, (item, item2, item3) => item + item2 + item3); +* // result will be [9, 12] +*/ +function unzipWith(target, iteratee) { + const maxLength = Math.max(0, ...target.map((innerArray) => innerArray.length)); + const result = new Array(maxLength); + for (let i = 0; i < maxLength; i++) { + const group = new Array(target.length); + for (let j = 0; j < target.length; j++) group[j] = target[j][i]; + result[i] = iteratee(...group); + } + return result; +} +//#endregion +export { unzipWith }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/windowed.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/windowed.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..1736b92225eca20420ddfa5a95b99643c41c2577 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/windowed.d.mts @@ -0,0 +1,53 @@ +//#region src/array/windowed.d.ts +/** + * Options for the windowed function. + * + * @interface WindowedOptions + * @property {boolean} [partialWindows=false] - Whether to include partial windows at the end of the array. + */ +interface WindowedOptions { + /** + * Whether to include partial windows at the end of the array. + * + * By default, `windowed` only includes full windows in the result, + * ignoring any leftover elements that can't form a full window. + * + * If `partialWindows` is true, the function will also include these smaller, partial windows at the end of the result. + */ + partialWindows?: boolean; +} +/** + * Creates an array of sub-arrays (windows) from the input array, each of the specified size. + * The windows can overlap depending on the step size provided. + * + * By default, only full windows are included in the result, and any leftover elements that can't form a full window are ignored. + * + * If the `partialWindows` option is set to true in the options object, the function will also include partial windows at the end of the result. + * Partial windows are smaller sub-arrays created when there aren't enough elements left in the input array to form a full window. + * + * @template T + * @param arr - The input array to create windows from. + * @param size - The size of each window. Must be a positive integer. + * @param [step=1] - The step size between the start of each window. Must be a positive integer. + * @param [options={}] - Options object to configure the behavior of the function. + * @param [options.partialWindows=false] - Whether to include partial windows at the end of the array. + * @returns An array of windows (sub-arrays) created from the input array. + * @throws {Error} If the size or step is not a positive integer. + * + * @example + * windowed([1, 2, 3, 4], 2); + * // => [[1, 2], [2, 3], [3, 4]] + * + * @example + * windowed([1, 2, 3, 4, 5, 6], 3, 2); + * // => [[1, 2, 3], [3, 4, 5]] + * + * @example + * windowed([1, 2, 3, 4, 5, 6], 3, 2, { partialWindows: true }); + * // => [[1, 2, 3], [3, 4, 5], [5, 6]] + */ +declare function windowed(arr: readonly T[], size: number, step?: number, { + partialWindows +}?: WindowedOptions): T[][]; +//#endregion +export { WindowedOptions, windowed }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/windowed.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/windowed.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1736b92225eca20420ddfa5a95b99643c41c2577 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/windowed.d.ts @@ -0,0 +1,53 @@ +//#region src/array/windowed.d.ts +/** + * Options for the windowed function. + * + * @interface WindowedOptions + * @property {boolean} [partialWindows=false] - Whether to include partial windows at the end of the array. + */ +interface WindowedOptions { + /** + * Whether to include partial windows at the end of the array. + * + * By default, `windowed` only includes full windows in the result, + * ignoring any leftover elements that can't form a full window. + * + * If `partialWindows` is true, the function will also include these smaller, partial windows at the end of the result. + */ + partialWindows?: boolean; +} +/** + * Creates an array of sub-arrays (windows) from the input array, each of the specified size. + * The windows can overlap depending on the step size provided. + * + * By default, only full windows are included in the result, and any leftover elements that can't form a full window are ignored. + * + * If the `partialWindows` option is set to true in the options object, the function will also include partial windows at the end of the result. + * Partial windows are smaller sub-arrays created when there aren't enough elements left in the input array to form a full window. + * + * @template T + * @param arr - The input array to create windows from. + * @param size - The size of each window. Must be a positive integer. + * @param [step=1] - The step size between the start of each window. Must be a positive integer. + * @param [options={}] - Options object to configure the behavior of the function. + * @param [options.partialWindows=false] - Whether to include partial windows at the end of the array. + * @returns An array of windows (sub-arrays) created from the input array. + * @throws {Error} If the size or step is not a positive integer. + * + * @example + * windowed([1, 2, 3, 4], 2); + * // => [[1, 2], [2, 3], [3, 4]] + * + * @example + * windowed([1, 2, 3, 4, 5, 6], 3, 2); + * // => [[1, 2, 3], [3, 4, 5]] + * + * @example + * windowed([1, 2, 3, 4, 5, 6], 3, 2, { partialWindows: true }); + * // => [[1, 2, 3], [3, 4, 5], [5, 6]] + */ +declare function windowed(arr: readonly T[], size: number, step?: number, { + partialWindows +}?: WindowedOptions): T[][]; +//#endregion +export { WindowedOptions, windowed }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/windowed.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/windowed.js new file mode 100644 index 0000000000000000000000000000000000000000..74c05689b8d3244f7a86ec4da47233e1fdda24ca --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/windowed.js @@ -0,0 +1,41 @@ +//#region src/array/windowed.ts +/** +* Creates an array of sub-arrays (windows) from the input array, each of the specified size. +* The windows can overlap depending on the step size provided. +* +* By default, only full windows are included in the result, and any leftover elements that can't form a full window are ignored. +* +* If the `partialWindows` option is set to true in the options object, the function will also include partial windows at the end of the result. +* Partial windows are smaller sub-arrays created when there aren't enough elements left in the input array to form a full window. +* +* @template T +* @param arr - The input array to create windows from. +* @param size - The size of each window. Must be a positive integer. +* @param [step=1] - The step size between the start of each window. Must be a positive integer. +* @param [options={}] - Options object to configure the behavior of the function. +* @param [options.partialWindows=false] - Whether to include partial windows at the end of the array. +* @returns An array of windows (sub-arrays) created from the input array. +* @throws {Error} If the size or step is not a positive integer. +* +* @example +* windowed([1, 2, 3, 4], 2); +* // => [[1, 2], [2, 3], [3, 4]] +* +* @example +* windowed([1, 2, 3, 4, 5, 6], 3, 2); +* // => [[1, 2, 3], [3, 4, 5]] +* +* @example +* windowed([1, 2, 3, 4, 5, 6], 3, 2, { partialWindows: true }); +* // => [[1, 2, 3], [3, 4, 5], [5, 6]] +*/ +function windowed(arr, size, step = 1, { partialWindows = false } = {}) { + if (size <= 0 || !Number.isInteger(size)) throw new Error("Size must be a positive integer."); + if (step <= 0 || !Number.isInteger(step)) throw new Error("Step must be a positive integer."); + const result = []; + const end = partialWindows ? arr.length : arr.length - size + 1; + for (let i = 0; i < end; i += step) result.push(arr.slice(i, i + size)); + return result; +} +//#endregion +exports.windowed = windowed; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/windowed.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/windowed.mjs new file mode 100644 index 0000000000000000000000000000000000000000..4e8d8b203dc4cd16f14a0518bc147dbaa1592d15 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/windowed.mjs @@ -0,0 +1,41 @@ +//#region src/array/windowed.ts +/** +* Creates an array of sub-arrays (windows) from the input array, each of the specified size. +* The windows can overlap depending on the step size provided. +* +* By default, only full windows are included in the result, and any leftover elements that can't form a full window are ignored. +* +* If the `partialWindows` option is set to true in the options object, the function will also include partial windows at the end of the result. +* Partial windows are smaller sub-arrays created when there aren't enough elements left in the input array to form a full window. +* +* @template T +* @param arr - The input array to create windows from. +* @param size - The size of each window. Must be a positive integer. +* @param [step=1] - The step size between the start of each window. Must be a positive integer. +* @param [options={}] - Options object to configure the behavior of the function. +* @param [options.partialWindows=false] - Whether to include partial windows at the end of the array. +* @returns An array of windows (sub-arrays) created from the input array. +* @throws {Error} If the size or step is not a positive integer. +* +* @example +* windowed([1, 2, 3, 4], 2); +* // => [[1, 2], [2, 3], [3, 4]] +* +* @example +* windowed([1, 2, 3, 4, 5, 6], 3, 2); +* // => [[1, 2, 3], [3, 4, 5]] +* +* @example +* windowed([1, 2, 3, 4, 5, 6], 3, 2, { partialWindows: true }); +* // => [[1, 2, 3], [3, 4, 5], [5, 6]] +*/ +function windowed(arr, size, step = 1, { partialWindows = false } = {}) { + if (size <= 0 || !Number.isInteger(size)) throw new Error("Size must be a positive integer."); + if (step <= 0 || !Number.isInteger(step)) throw new Error("Step must be a positive integer."); + const result = []; + const end = partialWindows ? arr.length : arr.length - size + 1; + for (let i = 0; i < end; i += step) result.push(arr.slice(i, i + size)); + return result; +} +//#endregion +export { windowed }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/without.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/without.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..80f973084021fc1b82e1ba898409ffe635450633 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/without.d.mts @@ -0,0 +1,24 @@ +//#region src/array/without.d.ts +/** + * Creates an array that excludes all specified values. + * + * It correctly excludes `NaN`, as it compares values using [SameValueZero](https://tc39.es/ecma262/multipage/abstract-operations.html#sec-samevaluezero). + * + * @template T The type of elements in the array. + * @param array - The array to filter. + * @param values - The values to exclude. + * @returns A new array without the specified values. + * + * @example + * // Removes the specified values from the array + * without([1, 2, 3, 4, 5], 2, 4); + * // Returns: [1, 3, 5] + * + * @example + * // Removes specified string values from the array + * without(['a', 'b', 'c', 'a'], 'a'); + * // Returns: ['b', 'c'] + */ +declare function without(array: readonly T[], ...values: T[]): T[]; +//#endregion +export { without }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/without.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/without.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..80f973084021fc1b82e1ba898409ffe635450633 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/without.d.ts @@ -0,0 +1,24 @@ +//#region src/array/without.d.ts +/** + * Creates an array that excludes all specified values. + * + * It correctly excludes `NaN`, as it compares values using [SameValueZero](https://tc39.es/ecma262/multipage/abstract-operations.html#sec-samevaluezero). + * + * @template T The type of elements in the array. + * @param array - The array to filter. + * @param values - The values to exclude. + * @returns A new array without the specified values. + * + * @example + * // Removes the specified values from the array + * without([1, 2, 3, 4, 5], 2, 4); + * // Returns: [1, 3, 5] + * + * @example + * // Removes specified string values from the array + * without(['a', 'b', 'c', 'a'], 'a'); + * // Returns: ['b', 'c'] + */ +declare function without(array: readonly T[], ...values: T[]): T[]; +//#endregion +export { without }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/without.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/without.js new file mode 100644 index 0000000000000000000000000000000000000000..3f9f7ec42ffeb868d34a6cf0d4754684391cf845 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/without.js @@ -0,0 +1,27 @@ +const require_difference = require("./difference.js"); +//#region src/array/without.ts +/** +* Creates an array that excludes all specified values. +* +* It correctly excludes `NaN`, as it compares values using [SameValueZero](https://tc39.es/ecma262/multipage/abstract-operations.html#sec-samevaluezero). +* +* @template T The type of elements in the array. +* @param array - The array to filter. +* @param values - The values to exclude. +* @returns A new array without the specified values. +* +* @example +* // Removes the specified values from the array +* without([1, 2, 3, 4, 5], 2, 4); +* // Returns: [1, 3, 5] +* +* @example +* // Removes specified string values from the array +* without(['a', 'b', 'c', 'a'], 'a'); +* // Returns: ['b', 'c'] +*/ +function without(array, ...values) { + return require_difference.difference(array, values); +} +//#endregion +exports.without = without; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/without.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/without.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c723997767370dc0915c2ac52cafb4ccf8192f4c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/without.mjs @@ -0,0 +1,27 @@ +import { difference } from "./difference.mjs"; +//#region src/array/without.ts +/** +* Creates an array that excludes all specified values. +* +* It correctly excludes `NaN`, as it compares values using [SameValueZero](https://tc39.es/ecma262/multipage/abstract-operations.html#sec-samevaluezero). +* +* @template T The type of elements in the array. +* @param array - The array to filter. +* @param values - The values to exclude. +* @returns A new array without the specified values. +* +* @example +* // Removes the specified values from the array +* without([1, 2, 3, 4, 5], 2, 4); +* // Returns: [1, 3, 5] +* +* @example +* // Removes specified string values from the array +* without(['a', 'b', 'c', 'a'], 'a'); +* // Returns: ['b', 'c'] +*/ +function without(array, ...values) { + return difference(array, values); +} +//#endregion +export { without }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xor.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xor.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..f4340a6d1b87000102a35f113c97e2e55e3a9c48 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xor.d.mts @@ -0,0 +1,21 @@ +//#region src/array/xor.d.ts +/** + * Computes the symmetric difference between two arrays. The symmetric difference is the set of elements + * which are in either of the arrays, but not in their intersection. + * + * @template T - The type of elements in the array. + * @param arr1 - The first array. + * @param arr2 - The second array. + * @returns An array containing the elements that are present in either `arr1` or `arr2` but not in both. + * + * @example + * // Returns [1, 2, 5, 6] + * xor([1, 2, 3, 4], [3, 4, 5, 6]); + * + * @example + * // Returns ['a', 'c'] + * xor(['a', 'b'], ['b', 'c']); + */ +declare function xor(arr1: readonly T[], arr2: readonly T[]): T[]; +//#endregion +export { xor }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xor.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xor.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f4340a6d1b87000102a35f113c97e2e55e3a9c48 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xor.d.ts @@ -0,0 +1,21 @@ +//#region src/array/xor.d.ts +/** + * Computes the symmetric difference between two arrays. The symmetric difference is the set of elements + * which are in either of the arrays, but not in their intersection. + * + * @template T - The type of elements in the array. + * @param arr1 - The first array. + * @param arr2 - The second array. + * @returns An array containing the elements that are present in either `arr1` or `arr2` but not in both. + * + * @example + * // Returns [1, 2, 5, 6] + * xor([1, 2, 3, 4], [3, 4, 5, 6]); + * + * @example + * // Returns ['a', 'c'] + * xor(['a', 'b'], ['b', 'c']); + */ +declare function xor(arr1: readonly T[], arr2: readonly T[]): T[]; +//#endregion +export { xor }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xor.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xor.js new file mode 100644 index 0000000000000000000000000000000000000000..8773ffc96c83ce0c8e5d3a36e4d5c86bb9f819d3 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xor.js @@ -0,0 +1,26 @@ +const require_difference = require("./difference.js"); +const require_intersection = require("./intersection.js"); +const require_union = require("./union.js"); +//#region src/array/xor.ts +/** +* Computes the symmetric difference between two arrays. The symmetric difference is the set of elements +* which are in either of the arrays, but not in their intersection. +* +* @template T - The type of elements in the array. +* @param arr1 - The first array. +* @param arr2 - The second array. +* @returns An array containing the elements that are present in either `arr1` or `arr2` but not in both. +* +* @example +* // Returns [1, 2, 5, 6] +* xor([1, 2, 3, 4], [3, 4, 5, 6]); +* +* @example +* // Returns ['a', 'c'] +* xor(['a', 'b'], ['b', 'c']); +*/ +function xor(arr1, arr2) { + return require_difference.difference(require_union.union(arr1, arr2), require_intersection.intersection(arr1, arr2)); +} +//#endregion +exports.xor = xor; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xor.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xor.mjs new file mode 100644 index 0000000000000000000000000000000000000000..80dcf200a25db28ad2104a140158acc4c17ba0de --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xor.mjs @@ -0,0 +1,26 @@ +import { difference } from "./difference.mjs"; +import { intersection } from "./intersection.mjs"; +import { union } from "./union.mjs"; +//#region src/array/xor.ts +/** +* Computes the symmetric difference between two arrays. The symmetric difference is the set of elements +* which are in either of the arrays, but not in their intersection. +* +* @template T - The type of elements in the array. +* @param arr1 - The first array. +* @param arr2 - The second array. +* @returns An array containing the elements that are present in either `arr1` or `arr2` but not in both. +* +* @example +* // Returns [1, 2, 5, 6] +* xor([1, 2, 3, 4], [3, 4, 5, 6]); +* +* @example +* // Returns ['a', 'c'] +* xor(['a', 'b'], ['b', 'c']); +*/ +function xor(arr1, arr2) { + return difference(union(arr1, arr2), intersection(arr1, arr2)); +} +//#endregion +export { xor }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xorBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xorBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..6cff91132630a756ee19c2dec0042ec4310c56b5 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xorBy.d.mts @@ -0,0 +1,23 @@ +//#region src/array/xorBy.d.ts +/** + * Computes the symmetric difference between two arrays using a custom mapping function. + * The symmetric difference is the set of elements which are in either of the arrays, + * but not in their intersection, determined by the result of the mapping function. + * + * @template T - Type of elements in the input arrays. + * @template U - Type of the values returned by the mapping function. + * + * @param arr1 - The first array. + * @param arr2 - The second array. + * @param mapper - The function to map array elements to comparison values. + * @returns An array containing the elements that are present in either `arr1` or `arr2` but not in both, based on the values returned by the mapping function. + * + * @example + * // Custom mapping function for objects with an 'id' property + * const idMapper = obj => obj.id; + * xorBy([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], idMapper); + * // Returns [{ id: 1 }, { id: 3 }] + */ +declare function xorBy(arr1: readonly T[], arr2: readonly T[], mapper: (item: T) => U): T[]; +//#endregion +export { xorBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xorBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xorBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6cff91132630a756ee19c2dec0042ec4310c56b5 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xorBy.d.ts @@ -0,0 +1,23 @@ +//#region src/array/xorBy.d.ts +/** + * Computes the symmetric difference between two arrays using a custom mapping function. + * The symmetric difference is the set of elements which are in either of the arrays, + * but not in their intersection, determined by the result of the mapping function. + * + * @template T - Type of elements in the input arrays. + * @template U - Type of the values returned by the mapping function. + * + * @param arr1 - The first array. + * @param arr2 - The second array. + * @param mapper - The function to map array elements to comparison values. + * @returns An array containing the elements that are present in either `arr1` or `arr2` but not in both, based on the values returned by the mapping function. + * + * @example + * // Custom mapping function for objects with an 'id' property + * const idMapper = obj => obj.id; + * xorBy([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], idMapper); + * // Returns [{ id: 1 }, { id: 3 }] + */ +declare function xorBy(arr1: readonly T[], arr2: readonly T[], mapper: (item: T) => U): T[]; +//#endregion +export { xorBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xorBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xorBy.js new file mode 100644 index 0000000000000000000000000000000000000000..484056ea136962d630979cd701bdb431287bf891 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xorBy.js @@ -0,0 +1,30 @@ +const require_differenceBy = require("./differenceBy.js"); +const require_intersectionBy = require("./intersectionBy.js"); +const require_unionBy = require("./unionBy.js"); +//#region src/array/xorBy.ts +/** +* Computes the symmetric difference between two arrays using a custom mapping function. +* The symmetric difference is the set of elements which are in either of the arrays, +* but not in their intersection, determined by the result of the mapping function. +* +* @template T - Type of elements in the input arrays. +* @template U - Type of the values returned by the mapping function. +* +* @param arr1 - The first array. +* @param arr2 - The second array. +* @param mapper - The function to map array elements to comparison values. +* @returns An array containing the elements that are present in either `arr1` or `arr2` but not in both, based on the values returned by the mapping function. +* +* @example +* // Custom mapping function for objects with an 'id' property +* const idMapper = obj => obj.id; +* xorBy([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], idMapper); +* // Returns [{ id: 1 }, { id: 3 }] +*/ +function xorBy(arr1, arr2, mapper) { + const union = require_unionBy.unionBy(arr1, arr2, mapper); + const intersection = require_intersectionBy.intersectionBy(arr1, arr2, mapper); + return require_differenceBy.differenceBy(union, intersection, mapper); +} +//#endregion +exports.xorBy = xorBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xorBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xorBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..37f2a768db6bf46c397b6a6a4e59c456354d6f73 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xorBy.mjs @@ -0,0 +1,28 @@ +import { differenceBy } from "./differenceBy.mjs"; +import { intersectionBy } from "./intersectionBy.mjs"; +import { unionBy } from "./unionBy.mjs"; +//#region src/array/xorBy.ts +/** +* Computes the symmetric difference between two arrays using a custom mapping function. +* The symmetric difference is the set of elements which are in either of the arrays, +* but not in their intersection, determined by the result of the mapping function. +* +* @template T - Type of elements in the input arrays. +* @template U - Type of the values returned by the mapping function. +* +* @param arr1 - The first array. +* @param arr2 - The second array. +* @param mapper - The function to map array elements to comparison values. +* @returns An array containing the elements that are present in either `arr1` or `arr2` but not in both, based on the values returned by the mapping function. +* +* @example +* // Custom mapping function for objects with an 'id' property +* const idMapper = obj => obj.id; +* xorBy([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], idMapper); +* // Returns [{ id: 1 }, { id: 3 }] +*/ +function xorBy(arr1, arr2, mapper) { + return differenceBy(unionBy(arr1, arr2, mapper), intersectionBy(arr1, arr2, mapper), mapper); +} +//#endregion +export { xorBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xorWith.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xorWith.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..e666a858a13d26e25bfef2474eaa484c39256f4b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xorWith.d.mts @@ -0,0 +1,22 @@ +//#region src/array/xorWith.d.ts +/** + * Computes the symmetric difference between two arrays using a custom equality function. + * The symmetric difference is the set of elements which are in either of the arrays, + * but not in their intersection. + * + * @template T - Type of elements in the input arrays. + * + * @param arr1 - The first array. + * @param arr2 - The second array. + * @param areElementsEqual - The custom equality function to compare elements. + * @returns An array containing the elements that are present in either `arr1` or `arr2` but not in both, based on the custom equality function. + * + * @example + * // Custom equality function for objects with an 'id' property + * const areObjectsEqual = (a, b) => a.id === b.id; + * xorWith([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], areObjectsEqual); + * // Returns [{ id: 1 }, { id: 3 }] + */ +declare function xorWith(arr1: readonly T[], arr2: readonly T[], areElementsEqual: (item1: T, item2: T) => boolean): T[]; +//#endregion +export { xorWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xorWith.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xorWith.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e666a858a13d26e25bfef2474eaa484c39256f4b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xorWith.d.ts @@ -0,0 +1,22 @@ +//#region src/array/xorWith.d.ts +/** + * Computes the symmetric difference between two arrays using a custom equality function. + * The symmetric difference is the set of elements which are in either of the arrays, + * but not in their intersection. + * + * @template T - Type of elements in the input arrays. + * + * @param arr1 - The first array. + * @param arr2 - The second array. + * @param areElementsEqual - The custom equality function to compare elements. + * @returns An array containing the elements that are present in either `arr1` or `arr2` but not in both, based on the custom equality function. + * + * @example + * // Custom equality function for objects with an 'id' property + * const areObjectsEqual = (a, b) => a.id === b.id; + * xorWith([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], areObjectsEqual); + * // Returns [{ id: 1 }, { id: 3 }] + */ +declare function xorWith(arr1: readonly T[], arr2: readonly T[], areElementsEqual: (item1: T, item2: T) => boolean): T[]; +//#endregion +export { xorWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xorWith.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xorWith.js new file mode 100644 index 0000000000000000000000000000000000000000..aaf4ca1c4ac226cf58de8f549a766f8756c6681b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xorWith.js @@ -0,0 +1,29 @@ +const require_differenceWith = require("./differenceWith.js"); +const require_intersectionWith = require("./intersectionWith.js"); +const require_unionWith = require("./unionWith.js"); +//#region src/array/xorWith.ts +/** +* Computes the symmetric difference between two arrays using a custom equality function. +* The symmetric difference is the set of elements which are in either of the arrays, +* but not in their intersection. +* +* @template T - Type of elements in the input arrays. +* +* @param arr1 - The first array. +* @param arr2 - The second array. +* @param areElementsEqual - The custom equality function to compare elements. +* @returns An array containing the elements that are present in either `arr1` or `arr2` but not in both, based on the custom equality function. +* +* @example +* // Custom equality function for objects with an 'id' property +* const areObjectsEqual = (a, b) => a.id === b.id; +* xorWith([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], areObjectsEqual); +* // Returns [{ id: 1 }, { id: 3 }] +*/ +function xorWith(arr1, arr2, areElementsEqual) { + const union = require_unionWith.unionWith(arr1, arr2, areElementsEqual); + const intersection = require_intersectionWith.intersectionWith(arr1, arr2, areElementsEqual); + return require_differenceWith.differenceWith(union, intersection, areElementsEqual); +} +//#endregion +exports.xorWith = xorWith; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xorWith.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xorWith.mjs new file mode 100644 index 0000000000000000000000000000000000000000..76eb64775f7a07099a29c97a9382e1d25cfdde0b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/xorWith.mjs @@ -0,0 +1,27 @@ +import { differenceWith } from "./differenceWith.mjs"; +import { intersectionWith } from "./intersectionWith.mjs"; +import { unionWith } from "./unionWith.mjs"; +//#region src/array/xorWith.ts +/** +* Computes the symmetric difference between two arrays using a custom equality function. +* The symmetric difference is the set of elements which are in either of the arrays, +* but not in their intersection. +* +* @template T - Type of elements in the input arrays. +* +* @param arr1 - The first array. +* @param arr2 - The second array. +* @param areElementsEqual - The custom equality function to compare elements. +* @returns An array containing the elements that are present in either `arr1` or `arr2` but not in both, based on the custom equality function. +* +* @example +* // Custom equality function for objects with an 'id' property +* const areObjectsEqual = (a, b) => a.id === b.id; +* xorWith([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], areObjectsEqual); +* // Returns [{ id: 1 }, { id: 3 }] +*/ +function xorWith(arr1, arr2, areElementsEqual) { + return differenceWith(unionWith(arr1, arr2, areElementsEqual), intersectionWith(arr1, arr2, areElementsEqual), areElementsEqual); +} +//#endregion +export { xorWith }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zip.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zip.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..1b0db1c233f9927f0e3f34b30baa39ea9e0e2001 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zip.d.mts @@ -0,0 +1,107 @@ +//#region src/array/zip.d.ts +/** + * Combines multiple arrays into a single array of tuples. + * + * This function takes multiple arrays and returns a new array where each element is a tuple + * containing the corresponding elements from the input arrays. If the input arrays are of + * different lengths, the resulting array will have the length of the longest input array, + * with undefined values for missing elements. + * + * @template T + * @param arr1 - The first array to zip. + * @returns A new array of tuples containing the corresponding elements from the input arrays. + * + * @example + * const arr1 = [1, 2, 3]; + * const result = zip(arr1); + * // result will be [[1], [2], [3]] + */ +declare function zip(arr1: readonly T[]): Array<[T]>; +/** + * Combines multiple arrays into a single array of tuples. + * + * This function takes multiple arrays and returns a new array where each element is a tuple + * containing the corresponding elements from the input arrays. If the input arrays are of + * different lengths, the resulting array will have the length of the longest input array, + * with undefined values for missing elements. + * + * @template T, U + * @param arr1 - The first array to zip. + * @param arr2 - The second array to zip. + * @returns A new array of tuples containing the corresponding elements from the input arrays. + * + * @example + * const arr1 = [1, 2, 3]; + * const arr2 = ['a', 'b', 'c']; + * const result = zip(arr1, arr2); + * // result will be [[1, 'a'], [2, 'b'], [3, 'c']] + */ +declare function zip(arr1: readonly T[], arr2: readonly U[]): Array<[T, U]>; +/** + * Combines multiple arrays into a single array of tuples. + * + * This function takes multiple arrays and returns a new array where each element is a tuple + * containing the corresponding elements from the input arrays. If the input arrays are of + * different lengths, the resulting array will have the length of the longest input array, + * with undefined values for missing elements. + * + * @template T, U, V + * @param arr1 - The first array to zip. + * @param arr2 - The second array to zip. + * @param arr3 - The third array to zip. + * @returns A new array of tuples containing the corresponding elements from the input arrays. + * + * @example + * const arr1 = [1, 2, 3]; + * const arr2 = ['a', 'b', 'c']; + * const arr3 = [true, false]; + * const result = zip(arr1, arr2, arr3); + * // result will be [[1, 'a', true], [2, 'b', false], [3, 'c', undefined]] + */ +declare function zip(arr1: readonly T[], arr2: readonly U[], arr3: readonly V[]): Array<[T, U, V]>; +/** + * Combines multiple arrays into a single array of tuples. + * + * This function takes multiple arrays and returns a new array where each element is a tuple + * containing the corresponding elements from the input arrays. If the input arrays are of + * different lengths, the resulting array will have the length of the longest input array, + * with undefined values for missing elements. + * + * @template T, U, V, W + * @param arr1 - The first array to zip. + * @param arr2 - The second array to zip. + * @param arr3 - The third array to zip. + * @param arr4 - The fourth array to zip. + * @returns A new array of tuples containing the corresponding elements from the input arrays. + * + * @example + * const arr1 = [1, 2, 3]; + * const arr2 = ['a', 'b', 'c']; + * const arr3 = [true, false]; + * const arr4 = [null, null, null]; + * const result = zip(arr1, arr2, arr3, arr4); + * // result will be [[1, 'a', true, null], [2, 'b', false, null], [3, 'c', undefined, null]] + */ +declare function zip(arr1: readonly T[], arr2: readonly U[], arr3: readonly V[], arr4: readonly W[]): Array<[T, U, V, W]>; +/** + * Combines multiple arrays into a single array of tuples. + * + * This function takes multiple arrays and returns a new array where each element is a tuple + * containing the corresponding elements from the input arrays. If the input arrays are of + * different lengths, the resulting array will have the length of the longest input array, + * with undefined values for missing elements. + * + * @template T + * @param arrs - The arrays to zip together. + * @returns A new array of tuples containing the corresponding elements from the input arrays. + * + * @example + * const arr1 = [1, 2, 3]; + * const arr2 = ['a', 'b', 'c']; + * const arr3 = [true, false]; + * const result = zip(arr1, arr2, arr3); + * // result will be [[1, 'a', true], [2, 'b', false], [3, 'c', undefined]] + */ +declare function zip(...arrs: Array): T[][]; +//#endregion +export { zip }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zip.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zip.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1b0db1c233f9927f0e3f34b30baa39ea9e0e2001 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zip.d.ts @@ -0,0 +1,107 @@ +//#region src/array/zip.d.ts +/** + * Combines multiple arrays into a single array of tuples. + * + * This function takes multiple arrays and returns a new array where each element is a tuple + * containing the corresponding elements from the input arrays. If the input arrays are of + * different lengths, the resulting array will have the length of the longest input array, + * with undefined values for missing elements. + * + * @template T + * @param arr1 - The first array to zip. + * @returns A new array of tuples containing the corresponding elements from the input arrays. + * + * @example + * const arr1 = [1, 2, 3]; + * const result = zip(arr1); + * // result will be [[1], [2], [3]] + */ +declare function zip(arr1: readonly T[]): Array<[T]>; +/** + * Combines multiple arrays into a single array of tuples. + * + * This function takes multiple arrays and returns a new array where each element is a tuple + * containing the corresponding elements from the input arrays. If the input arrays are of + * different lengths, the resulting array will have the length of the longest input array, + * with undefined values for missing elements. + * + * @template T, U + * @param arr1 - The first array to zip. + * @param arr2 - The second array to zip. + * @returns A new array of tuples containing the corresponding elements from the input arrays. + * + * @example + * const arr1 = [1, 2, 3]; + * const arr2 = ['a', 'b', 'c']; + * const result = zip(arr1, arr2); + * // result will be [[1, 'a'], [2, 'b'], [3, 'c']] + */ +declare function zip(arr1: readonly T[], arr2: readonly U[]): Array<[T, U]>; +/** + * Combines multiple arrays into a single array of tuples. + * + * This function takes multiple arrays and returns a new array where each element is a tuple + * containing the corresponding elements from the input arrays. If the input arrays are of + * different lengths, the resulting array will have the length of the longest input array, + * with undefined values for missing elements. + * + * @template T, U, V + * @param arr1 - The first array to zip. + * @param arr2 - The second array to zip. + * @param arr3 - The third array to zip. + * @returns A new array of tuples containing the corresponding elements from the input arrays. + * + * @example + * const arr1 = [1, 2, 3]; + * const arr2 = ['a', 'b', 'c']; + * const arr3 = [true, false]; + * const result = zip(arr1, arr2, arr3); + * // result will be [[1, 'a', true], [2, 'b', false], [3, 'c', undefined]] + */ +declare function zip(arr1: readonly T[], arr2: readonly U[], arr3: readonly V[]): Array<[T, U, V]>; +/** + * Combines multiple arrays into a single array of tuples. + * + * This function takes multiple arrays and returns a new array where each element is a tuple + * containing the corresponding elements from the input arrays. If the input arrays are of + * different lengths, the resulting array will have the length of the longest input array, + * with undefined values for missing elements. + * + * @template T, U, V, W + * @param arr1 - The first array to zip. + * @param arr2 - The second array to zip. + * @param arr3 - The third array to zip. + * @param arr4 - The fourth array to zip. + * @returns A new array of tuples containing the corresponding elements from the input arrays. + * + * @example + * const arr1 = [1, 2, 3]; + * const arr2 = ['a', 'b', 'c']; + * const arr3 = [true, false]; + * const arr4 = [null, null, null]; + * const result = zip(arr1, arr2, arr3, arr4); + * // result will be [[1, 'a', true, null], [2, 'b', false, null], [3, 'c', undefined, null]] + */ +declare function zip(arr1: readonly T[], arr2: readonly U[], arr3: readonly V[], arr4: readonly W[]): Array<[T, U, V, W]>; +/** + * Combines multiple arrays into a single array of tuples. + * + * This function takes multiple arrays and returns a new array where each element is a tuple + * containing the corresponding elements from the input arrays. If the input arrays are of + * different lengths, the resulting array will have the length of the longest input array, + * with undefined values for missing elements. + * + * @template T + * @param arrs - The arrays to zip together. + * @returns A new array of tuples containing the corresponding elements from the input arrays. + * + * @example + * const arr1 = [1, 2, 3]; + * const arr2 = ['a', 'b', 'c']; + * const arr3 = [true, false]; + * const result = zip(arr1, arr2, arr3); + * // result will be [[1, 'a', true], [2, 'b', false], [3, 'c', undefined]] + */ +declare function zip(...arrs: Array): T[][]; +//#endregion +export { zip }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zip.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zip.js new file mode 100644 index 0000000000000000000000000000000000000000..d395f00920dc583afff1be010b0727e11906efb0 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zip.js @@ -0,0 +1,34 @@ +//#region src/array/zip.ts +/** +* Combines multiple arrays into a single array of tuples. +* +* This function takes multiple arrays and returns a new array where each element is a tuple +* containing the corresponding elements from the input arrays. If the input arrays are of +* different lengths, the resulting array will have the length of the longest input array, +* with undefined values for missing elements. +* +* @template T +* @param arrs - The arrays to zip together. +* @returns A new array of tuples containing the corresponding elements from the input arrays. +* +* @example +* const arr1 = [1, 2, 3]; +* const arr2 = ['a', 'b', 'c']; +* const arr3 = [true, false]; +* const result = zip(arr1, arr2, arr3); +* // result will be [[1, 'a', true], [2, 'b', false], [3, 'c', undefined]] +*/ +function zip(...arrs) { + let rowCount = 0; + for (let i = 0; i < arrs.length; i++) if (arrs[i].length > rowCount) rowCount = arrs[i].length; + const columnCount = arrs.length; + const result = Array(rowCount); + for (let i = 0; i < rowCount; ++i) { + const row = Array(columnCount); + for (let j = 0; j < columnCount; ++j) row[j] = arrs[j][i]; + result[i] = row; + } + return result; +} +//#endregion +exports.zip = zip; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zip.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zip.mjs new file mode 100644 index 0000000000000000000000000000000000000000..54d1c2af2b4ccb36bbecdb6ae4d1670c47c53fd3 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zip.mjs @@ -0,0 +1,34 @@ +//#region src/array/zip.ts +/** +* Combines multiple arrays into a single array of tuples. +* +* This function takes multiple arrays and returns a new array where each element is a tuple +* containing the corresponding elements from the input arrays. If the input arrays are of +* different lengths, the resulting array will have the length of the longest input array, +* with undefined values for missing elements. +* +* @template T +* @param arrs - The arrays to zip together. +* @returns A new array of tuples containing the corresponding elements from the input arrays. +* +* @example +* const arr1 = [1, 2, 3]; +* const arr2 = ['a', 'b', 'c']; +* const arr3 = [true, false]; +* const result = zip(arr1, arr2, arr3); +* // result will be [[1, 'a', true], [2, 'b', false], [3, 'c', undefined]] +*/ +function zip(...arrs) { + let rowCount = 0; + for (let i = 0; i < arrs.length; i++) if (arrs[i].length > rowCount) rowCount = arrs[i].length; + const columnCount = arrs.length; + const result = Array(rowCount); + for (let i = 0; i < rowCount; ++i) { + const row = Array(columnCount); + for (let j = 0; j < columnCount; ++j) row[j] = arrs[j][i]; + result[i] = row; + } + return result; +} +//#endregion +export { zip }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zipObject.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zipObject.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..d49db1ba910cf4aa4ccb78c07a3fe4e5909bd101 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zipObject.d.mts @@ -0,0 +1,34 @@ +//#region src/array/zipObject.d.ts +/** + * Combines two arrays, one of property names and one of corresponding values, into a single object. + * + * This function takes two arrays: one containing property names and another containing corresponding values. + * It returns a new object where the property names from the first array are keys, and the corresponding elements + * from the second array are values. If the `keys` array is longer than the `values` array, the remaining keys will + * have `undefined` as their values. + * + * @template P - The type of elements in the array. + * @template V - The type of elements in the array. + * @param keys - An array of property names. + * @param values - An array of values corresponding to the property names. + * @returns A new object composed of the given property names and values. + * + * @example + * const keys = ['a', 'b', 'c']; + * const values = [1, 2, 3]; + * const result = zipObject(keys, values); + * // result will be { a: 1, b: 2, c: 3 } + * + * const keys2 = ['a', 'b', 'c']; + * const values2 = [1, 2]; + * const result2 = zipObject(keys2, values2); + * // result2 will be { a: 1, b: 2, c: undefined } + * + * const keys2 = ['a', 'b']; + * const values2 = [1, 2, 3]; + * const result2 = zipObject(keys2, values2); + * // result2 will be { a: 1, b: 2 } + */ +declare function zipObject

(keys: readonly P[], values: readonly V[]): Record; +//#endregion +export { zipObject }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zipObject.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zipObject.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d49db1ba910cf4aa4ccb78c07a3fe4e5909bd101 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zipObject.d.ts @@ -0,0 +1,34 @@ +//#region src/array/zipObject.d.ts +/** + * Combines two arrays, one of property names and one of corresponding values, into a single object. + * + * This function takes two arrays: one containing property names and another containing corresponding values. + * It returns a new object where the property names from the first array are keys, and the corresponding elements + * from the second array are values. If the `keys` array is longer than the `values` array, the remaining keys will + * have `undefined` as their values. + * + * @template P - The type of elements in the array. + * @template V - The type of elements in the array. + * @param keys - An array of property names. + * @param values - An array of values corresponding to the property names. + * @returns A new object composed of the given property names and values. + * + * @example + * const keys = ['a', 'b', 'c']; + * const values = [1, 2, 3]; + * const result = zipObject(keys, values); + * // result will be { a: 1, b: 2, c: 3 } + * + * const keys2 = ['a', 'b', 'c']; + * const values2 = [1, 2]; + * const result2 = zipObject(keys2, values2); + * // result2 will be { a: 1, b: 2, c: undefined } + * + * const keys2 = ['a', 'b']; + * const values2 = [1, 2, 3]; + * const result2 = zipObject(keys2, values2); + * // result2 will be { a: 1, b: 2 } + */ +declare function zipObject

(keys: readonly P[], values: readonly V[]): Record; +//#endregion +export { zipObject }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zipObject.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zipObject.js new file mode 100644 index 0000000000000000000000000000000000000000..15a53d12156a2e776d14c3b71ab71214bb3c835a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zipObject.js @@ -0,0 +1,38 @@ +//#region src/array/zipObject.ts +/** +* Combines two arrays, one of property names and one of corresponding values, into a single object. +* +* This function takes two arrays: one containing property names and another containing corresponding values. +* It returns a new object where the property names from the first array are keys, and the corresponding elements +* from the second array are values. If the `keys` array is longer than the `values` array, the remaining keys will +* have `undefined` as their values. +* +* @template P - The type of elements in the array. +* @template V - The type of elements in the array. +* @param keys - An array of property names. +* @param values - An array of values corresponding to the property names. +* @returns A new object composed of the given property names and values. +* +* @example +* const keys = ['a', 'b', 'c']; +* const values = [1, 2, 3]; +* const result = zipObject(keys, values); +* // result will be { a: 1, b: 2, c: 3 } +* +* const keys2 = ['a', 'b', 'c']; +* const values2 = [1, 2]; +* const result2 = zipObject(keys2, values2); +* // result2 will be { a: 1, b: 2, c: undefined } +* +* const keys2 = ['a', 'b']; +* const values2 = [1, 2, 3]; +* const result2 = zipObject(keys2, values2); +* // result2 will be { a: 1, b: 2 } +*/ +function zipObject(keys, values) { + const result = {}; + for (let i = 0; i < keys.length; i++) result[keys[i]] = values[i]; + return result; +} +//#endregion +exports.zipObject = zipObject; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zipObject.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zipObject.mjs new file mode 100644 index 0000000000000000000000000000000000000000..28a6f875a33f252fe1c67b39c3f210d21e3da67e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zipObject.mjs @@ -0,0 +1,38 @@ +//#region src/array/zipObject.ts +/** +* Combines two arrays, one of property names and one of corresponding values, into a single object. +* +* This function takes two arrays: one containing property names and another containing corresponding values. +* It returns a new object where the property names from the first array are keys, and the corresponding elements +* from the second array are values. If the `keys` array is longer than the `values` array, the remaining keys will +* have `undefined` as their values. +* +* @template P - The type of elements in the array. +* @template V - The type of elements in the array. +* @param keys - An array of property names. +* @param values - An array of values corresponding to the property names. +* @returns A new object composed of the given property names and values. +* +* @example +* const keys = ['a', 'b', 'c']; +* const values = [1, 2, 3]; +* const result = zipObject(keys, values); +* // result will be { a: 1, b: 2, c: 3 } +* +* const keys2 = ['a', 'b', 'c']; +* const values2 = [1, 2]; +* const result2 = zipObject(keys2, values2); +* // result2 will be { a: 1, b: 2, c: undefined } +* +* const keys2 = ['a', 'b']; +* const values2 = [1, 2, 3]; +* const result2 = zipObject(keys2, values2); +* // result2 will be { a: 1, b: 2 } +*/ +function zipObject(keys, values) { + const result = {}; + for (let i = 0; i < keys.length; i++) result[keys[i]] = values[i]; + return result; +} +//#endregion +export { zipObject }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zipWith.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zipWith.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..a1dcf0bd9a341b07bb18a636a054c0fca3f9ecd4 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zipWith.d.mts @@ -0,0 +1,73 @@ +//#region src/array/zipWith.d.ts +/** + * Combines multiple arrays into a single array using a custom combiner function. + * + * This function takes multiple arrays and a combiner function, and returns a new array where each element + * is the result of applying the combiner function to the corresponding elements of the input arrays. + * + * @template T - The type of elements in the first array. + * @template R - The type of elements in the resulting array. + * @param arr1 - The first array to zip. + * @param combine - The combiner function that takes corresponding elements from each array, their index, and returns a single value. + * @returns A new array where each element is the result of applying the combiner function to the corresponding elements of the input arrays. + * + * @example + * // Example usage with two arrays: + * const arr1 = [1, 2, 3]; + * const arr2 = [4, 5, 6]; + * const result = zipWith(arr1, arr2, (a, b) => a + b); + * // result will be [5, 7, 9] + * + * @example + * // Example usage with three arrays: + * const arr1 = [1, 2]; + * const arr2 = [3, 4]; + * const arr3 = [5, 6]; + * const result = zipWith(arr1, arr2, arr3, (a, b, c) => `${a}${b}${c}`); + * // result will be [`135`, `246`] + */ +declare function zipWith(arr1: readonly T[], combine: (item: T, index: number) => R): R[]; +/** + * Combines two arrays into a single array using a custom combiner function. + * + * @template T - The type of elements in the first array. + * @template U - The type of elements in the second array. + * @template R - The type of elements in the resulting array. + * @param arr1 - The first array to zip. + * @param arr2 - The second array to zip. + * @param combine - The combiner function that takes corresponding elements from each array, their index, and returns a single value. + * @returns A new array where each element is the result of applying the combiner function to the corresponding elements of the input arrays. + */ +declare function zipWith(arr1: readonly T[], arr2: readonly U[], combine: (item1: T, item2: U, index: number) => R): R[]; +/** + * Combines three arrays into a single array using a custom combiner function. + * + * @template T - The type of elements in the first array. + * @template U - The type of elements in the second array. + * @template V - The type of elements in the third array. + * @template R - The type of elements in the resulting array. + * @param arr1 - The first array to zip. + * @param arr2 - The second array to zip. + * @param arr3 - The third array to zip. + * @param combine - The combiner function that takes corresponding elements from each array, their index, and returns a single value. + * @returns A new array where each element is the result of applying the combiner function to the corresponding elements of the input arrays. + */ +declare function zipWith(arr1: readonly T[], arr2: readonly U[], arr3: readonly V[], combine: (item1: T, item2: U, item3: V, index: number) => R): R[]; +/** + * Combines four arrays into a single array using a custom combiner function. + * + * @template T - The type of elements in the first array. + * @template U - The type of elements in the second array. + * @template V - The type of elements in the third array. + * @template W - The type of elements in the fourth array. + * @template R - The type of elements in the resulting array. + * @param arr1 - The first array to zip. + * @param arr2 - The second array to zip. + * @param arr3 - The third array to zip. + * @param arr4 - The fourth array to zip. + * @param combine - The combiner function that takes corresponding elements from each array, their index, and returns a single value. + * @returns A new array where each element is the result of applying the combiner function to the corresponding elements of the input arrays. + */ +declare function zipWith(arr1: readonly T[], arr2: readonly U[], arr3: readonly V[], arr4: readonly W[], combine: (item1: T, item2: U, item3: V, item4: W, index: number) => R): R[]; +//#endregion +export { zipWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zipWith.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zipWith.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a1dcf0bd9a341b07bb18a636a054c0fca3f9ecd4 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zipWith.d.ts @@ -0,0 +1,73 @@ +//#region src/array/zipWith.d.ts +/** + * Combines multiple arrays into a single array using a custom combiner function. + * + * This function takes multiple arrays and a combiner function, and returns a new array where each element + * is the result of applying the combiner function to the corresponding elements of the input arrays. + * + * @template T - The type of elements in the first array. + * @template R - The type of elements in the resulting array. + * @param arr1 - The first array to zip. + * @param combine - The combiner function that takes corresponding elements from each array, their index, and returns a single value. + * @returns A new array where each element is the result of applying the combiner function to the corresponding elements of the input arrays. + * + * @example + * // Example usage with two arrays: + * const arr1 = [1, 2, 3]; + * const arr2 = [4, 5, 6]; + * const result = zipWith(arr1, arr2, (a, b) => a + b); + * // result will be [5, 7, 9] + * + * @example + * // Example usage with three arrays: + * const arr1 = [1, 2]; + * const arr2 = [3, 4]; + * const arr3 = [5, 6]; + * const result = zipWith(arr1, arr2, arr3, (a, b, c) => `${a}${b}${c}`); + * // result will be [`135`, `246`] + */ +declare function zipWith(arr1: readonly T[], combine: (item: T, index: number) => R): R[]; +/** + * Combines two arrays into a single array using a custom combiner function. + * + * @template T - The type of elements in the first array. + * @template U - The type of elements in the second array. + * @template R - The type of elements in the resulting array. + * @param arr1 - The first array to zip. + * @param arr2 - The second array to zip. + * @param combine - The combiner function that takes corresponding elements from each array, their index, and returns a single value. + * @returns A new array where each element is the result of applying the combiner function to the corresponding elements of the input arrays. + */ +declare function zipWith(arr1: readonly T[], arr2: readonly U[], combine: (item1: T, item2: U, index: number) => R): R[]; +/** + * Combines three arrays into a single array using a custom combiner function. + * + * @template T - The type of elements in the first array. + * @template U - The type of elements in the second array. + * @template V - The type of elements in the third array. + * @template R - The type of elements in the resulting array. + * @param arr1 - The first array to zip. + * @param arr2 - The second array to zip. + * @param arr3 - The third array to zip. + * @param combine - The combiner function that takes corresponding elements from each array, their index, and returns a single value. + * @returns A new array where each element is the result of applying the combiner function to the corresponding elements of the input arrays. + */ +declare function zipWith(arr1: readonly T[], arr2: readonly U[], arr3: readonly V[], combine: (item1: T, item2: U, item3: V, index: number) => R): R[]; +/** + * Combines four arrays into a single array using a custom combiner function. + * + * @template T - The type of elements in the first array. + * @template U - The type of elements in the second array. + * @template V - The type of elements in the third array. + * @template W - The type of elements in the fourth array. + * @template R - The type of elements in the resulting array. + * @param arr1 - The first array to zip. + * @param arr2 - The second array to zip. + * @param arr3 - The third array to zip. + * @param arr4 - The fourth array to zip. + * @param combine - The combiner function that takes corresponding elements from each array, their index, and returns a single value. + * @returns A new array where each element is the result of applying the combiner function to the corresponding elements of the input arrays. + */ +declare function zipWith(arr1: readonly T[], arr2: readonly U[], arr3: readonly V[], arr4: readonly W[], combine: (item1: T, item2: U, item3: V, item4: W, index: number) => R): R[]; +//#endregion +export { zipWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zipWith.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zipWith.js new file mode 100644 index 0000000000000000000000000000000000000000..35824ec15ea07b3f3ccd3c3bd54a0640134757a7 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zipWith.js @@ -0,0 +1,32 @@ +//#region src/array/zipWith.ts +/** +* Combines multiple arrays into a single array using a custom combiner function. +* +* This function takes one array and a variable number of additional arrays, +* applying the provided combiner function to the corresponding elements of each array. +* If the input arrays are of different lengths, the resulting array will have the length +* of the longest input array, with undefined values for missing elements. +* +* @template T - The type of elements in the input arrays. +* @template R - The type of elements in the resulting array. +* @param arr1 - The first array to zip. +* @param rest - The additional arrays to zip together, followed by the combiner function. +* @param combine - The combiner function that takes corresponding elements from each array, followed by their index, and returns a single value. +* @returns A new array where each element is the result of applying the combiner function to the corresponding elements of the input arrays. +* +* @example +* const arr1 = [1, 2, 3]; +* const arr2 = ['a', 'b', 'c']; +* const result = zipWith(arr1, arr2, (num, char) => `${num}${char}`); +* // result will be ['1a', '2b', '3c'] +*/ +function zipWith(arr1, ...rest) { + const arrs = [arr1, ...rest.slice(0, -1)]; + const combine = rest[rest.length - 1]; + const maxIndex = Math.max(...arrs.map((arr) => arr.length)); + const result = Array(maxIndex); + for (let i = 0; i < maxIndex; i++) result[i] = combine(...arrs.map((arr) => arr[i]), i); + return result; +} +//#endregion +exports.zipWith = zipWith; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zipWith.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zipWith.mjs new file mode 100644 index 0000000000000000000000000000000000000000..96fd9c6f1ec5208bb3805d9301224bd11ac07103 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/array/zipWith.mjs @@ -0,0 +1,32 @@ +//#region src/array/zipWith.ts +/** +* Combines multiple arrays into a single array using a custom combiner function. +* +* This function takes one array and a variable number of additional arrays, +* applying the provided combiner function to the corresponding elements of each array. +* If the input arrays are of different lengths, the resulting array will have the length +* of the longest input array, with undefined values for missing elements. +* +* @template T - The type of elements in the input arrays. +* @template R - The type of elements in the resulting array. +* @param arr1 - The first array to zip. +* @param rest - The additional arrays to zip together, followed by the combiner function. +* @param combine - The combiner function that takes corresponding elements from each array, followed by their index, and returns a single value. +* @returns A new array where each element is the result of applying the combiner function to the corresponding elements of the input arrays. +* +* @example +* const arr1 = [1, 2, 3]; +* const arr2 = ['a', 'b', 'c']; +* const result = zipWith(arr1, arr2, (num, char) => `${num}${char}`); +* // result will be ['1a', '2b', '3c'] +*/ +function zipWith(arr1, ...rest) { + const arrs = [arr1, ...rest.slice(0, -1)]; + const combine = rest[rest.length - 1]; + const maxIndex = Math.max(...arrs.map((arr) => arr.length)); + const result = Array(maxIndex); + for (let i = 0; i < maxIndex; i++) result[i] = combine(...arrs.map((arr) => arr[i]), i); + return result; +} +//#endregion +export { zipWith }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/clamp.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/clamp.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..1080b5b9e105db39560638e991a2cb6469b88587 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/clamp.d.mts @@ -0,0 +1,37 @@ +//#region src/bigint/clamp.d.ts +/** + * Clamps a bigint within the inclusive lower and upper bounds. + * + * This function takes a bigint and returns it constrained to the given range. Unlike `Math.min` and + * `Math.max`, which cannot accept bigints, it compares values directly so large integers stay exact. + * + * @param value - The bigint to clamp. + * @param maximum - The upper bound to clamp to. + * @returns The clamped bigint. + * + * @example + * const result = clamp(10n, 5n); + * // result will be 5n, because 10n is greater than the maximum + */ +declare function clamp(value: bigint, maximum: bigint): bigint; +/** + * Clamps a bigint within the inclusive lower and upper bounds. + * + * This function takes a bigint and returns it constrained to the given range. Unlike `Math.min` and + * `Math.max`, which cannot accept bigints, it compares values directly so large integers stay exact. + * + * @param value - The bigint to clamp. + * @param minimum - The lower bound to clamp to. + * @param maximum - The upper bound to clamp to. + * @returns The clamped bigint. + * + * @example + * const result = clamp(10n, 0n, 5n); + * // result will be 5n, because 10n is greater than the maximum + * + * const result2 = clamp(-10n, 0n, 5n); + * // result2 will be 0n, because -10n is less than the minimum + */ +declare function clamp(value: bigint, minimum: bigint, maximum: bigint): bigint; +//#endregion +export { clamp }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/clamp.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/clamp.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1080b5b9e105db39560638e991a2cb6469b88587 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/clamp.d.ts @@ -0,0 +1,37 @@ +//#region src/bigint/clamp.d.ts +/** + * Clamps a bigint within the inclusive lower and upper bounds. + * + * This function takes a bigint and returns it constrained to the given range. Unlike `Math.min` and + * `Math.max`, which cannot accept bigints, it compares values directly so large integers stay exact. + * + * @param value - The bigint to clamp. + * @param maximum - The upper bound to clamp to. + * @returns The clamped bigint. + * + * @example + * const result = clamp(10n, 5n); + * // result will be 5n, because 10n is greater than the maximum + */ +declare function clamp(value: bigint, maximum: bigint): bigint; +/** + * Clamps a bigint within the inclusive lower and upper bounds. + * + * This function takes a bigint and returns it constrained to the given range. Unlike `Math.min` and + * `Math.max`, which cannot accept bigints, it compares values directly so large integers stay exact. + * + * @param value - The bigint to clamp. + * @param minimum - The lower bound to clamp to. + * @param maximum - The upper bound to clamp to. + * @returns The clamped bigint. + * + * @example + * const result = clamp(10n, 0n, 5n); + * // result will be 5n, because 10n is greater than the maximum + * + * const result2 = clamp(-10n, 0n, 5n); + * // result2 will be 0n, because -10n is less than the minimum + */ +declare function clamp(value: bigint, minimum: bigint, maximum: bigint): bigint; +//#endregion +export { clamp }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/clamp.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/clamp.js new file mode 100644 index 0000000000000000000000000000000000000000..27ec0e2f0a1084b5f2ff7f90ff0c6e710687e3bd --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/clamp.js @@ -0,0 +1,16 @@ +//#region src/bigint/clamp.ts +/** +* Clamps a bigint within the inclusive lower and upper bounds. +* +* @param value - The bigint to clamp. +* @param bound1 - The upper bound when called with two arguments, otherwise the lower bound. +* @param bound2 - The upper bound when called with three arguments. +* @returns The clamped bigint. +*/ +function clamp(value, bound1, bound2) { + if (bound2 == null) return value < bound1 ? value : bound1; + const lowerClamped = value > bound1 ? value : bound1; + return lowerClamped < bound2 ? lowerClamped : bound2; +} +//#endregion +exports.clamp = clamp; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/clamp.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/clamp.mjs new file mode 100644 index 0000000000000000000000000000000000000000..2109d90186d1cabe681fb5133de065950b12a020 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/clamp.mjs @@ -0,0 +1,16 @@ +//#region src/bigint/clamp.ts +/** +* Clamps a bigint within the inclusive lower and upper bounds. +* +* @param value - The bigint to clamp. +* @param bound1 - The upper bound when called with two arguments, otherwise the lower bound. +* @param bound2 - The upper bound when called with three arguments. +* @returns The clamped bigint. +*/ +function clamp(value, bound1, bound2) { + if (bound2 == null) return value < bound1 ? value : bound1; + const lowerClamped = value > bound1 ? value : bound1; + return lowerClamped < bound2 ? lowerClamped : bound2; +} +//#endregion +export { clamp }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/inRange.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/inRange.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..5649bcbb5412978eb016eeb27fa622d0c1598649 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/inRange.d.mts @@ -0,0 +1,37 @@ +//#region src/bigint/inRange.d.ts +/** + * Checks whether a bigint is within a range. + * + * The lower bound is inclusive and the upper bound is exclusive, so `inRange(5n, 0n, 5n)` is `false`. + * + * @param value - The bigint to check. + * @param maximum - The exclusive upper bound. The lower bound defaults to `0n`. + * @returns `true` if the bigint is within the range, `false` otherwise. + * @throws {Error} If the minimum is greater than or equal to the maximum. + * + * @example + * const result = inRange(3n, 5n); + * // result will be true, because 3n is within [0n, 5n) + */ +declare function inRange(value: bigint, maximum: bigint): boolean; +/** + * Checks whether a bigint is within a range. + * + * The lower bound is inclusive and the upper bound is exclusive, so `inRange(5n, 0n, 5n)` is `false`. + * + * @param value - The bigint to check. + * @param minimum - The inclusive lower bound. + * @param maximum - The exclusive upper bound. + * @returns `true` if the bigint is within the range, `false` otherwise. + * @throws {Error} If the minimum is greater than or equal to the maximum. + * + * @example + * const result = inRange(5n, 0n, 10n); + * // result will be true + * + * const result2 = inRange(10n, 0n, 10n); + * // result2 will be false, because the upper bound is exclusive + */ +declare function inRange(value: bigint, minimum: bigint, maximum: bigint): boolean; +//#endregion +export { inRange }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/inRange.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/inRange.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..5649bcbb5412978eb016eeb27fa622d0c1598649 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/inRange.d.ts @@ -0,0 +1,37 @@ +//#region src/bigint/inRange.d.ts +/** + * Checks whether a bigint is within a range. + * + * The lower bound is inclusive and the upper bound is exclusive, so `inRange(5n, 0n, 5n)` is `false`. + * + * @param value - The bigint to check. + * @param maximum - The exclusive upper bound. The lower bound defaults to `0n`. + * @returns `true` if the bigint is within the range, `false` otherwise. + * @throws {Error} If the minimum is greater than or equal to the maximum. + * + * @example + * const result = inRange(3n, 5n); + * // result will be true, because 3n is within [0n, 5n) + */ +declare function inRange(value: bigint, maximum: bigint): boolean; +/** + * Checks whether a bigint is within a range. + * + * The lower bound is inclusive and the upper bound is exclusive, so `inRange(5n, 0n, 5n)` is `false`. + * + * @param value - The bigint to check. + * @param minimum - The inclusive lower bound. + * @param maximum - The exclusive upper bound. + * @returns `true` if the bigint is within the range, `false` otherwise. + * @throws {Error} If the minimum is greater than or equal to the maximum. + * + * @example + * const result = inRange(5n, 0n, 10n); + * // result will be true + * + * const result2 = inRange(10n, 0n, 10n); + * // result2 will be false, because the upper bound is exclusive + */ +declare function inRange(value: bigint, minimum: bigint, maximum: bigint): boolean; +//#endregion +export { inRange }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/inRange.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/inRange.js new file mode 100644 index 0000000000000000000000000000000000000000..21d1343b23cc2a7b66cd34001365d557b7e8c1e1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/inRange.js @@ -0,0 +1,20 @@ +//#region src/bigint/inRange.ts +/** +* Checks whether a bigint is within a range. +* +* @param value - The bigint to check. +* @param minimum - The exclusive upper bound when called with two arguments, otherwise the inclusive lower bound. +* @param maximum - The exclusive upper bound when called with three arguments. +* @returns `true` if the bigint is within the range, `false` otherwise. +* @throws {Error} If the minimum is greater than or equal to the maximum. +*/ +function inRange(value, minimum, maximum) { + if (maximum == null) { + maximum = minimum; + minimum = 0n; + } + if (minimum >= maximum) throw new Error("The maximum value must be greater than the minimum value."); + return minimum <= value && value < maximum; +} +//#endregion +exports.inRange = inRange; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/inRange.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/inRange.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f7426f445021ccc117ec78994a03b9a639ece017 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/inRange.mjs @@ -0,0 +1,20 @@ +//#region src/bigint/inRange.ts +/** +* Checks whether a bigint is within a range. +* +* @param value - The bigint to check. +* @param minimum - The exclusive upper bound when called with two arguments, otherwise the inclusive lower bound. +* @param maximum - The exclusive upper bound when called with three arguments. +* @returns `true` if the bigint is within the range, `false` otherwise. +* @throws {Error} If the minimum is greater than or equal to the maximum. +*/ +function inRange(value, minimum, maximum) { + if (maximum == null) { + maximum = minimum; + minimum = 0n; + } + if (minimum >= maximum) throw new Error("The maximum value must be greater than the minimum value."); + return minimum <= value && value < maximum; +} +//#endregion +export { inRange }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/index.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..ecfe300b9ccc95baf2fef0132772a991f70e8406 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/index.d.mts @@ -0,0 +1,14 @@ +import { clamp } from "./clamp.mjs"; +import { inRange } from "./inRange.mjs"; +import { max } from "./max.mjs"; +import { maxBy } from "./maxBy.mjs"; +import { median } from "./median.mjs"; +import { medianBy } from "./medianBy.mjs"; +import { min } from "./min.mjs"; +import { minBy } from "./minBy.mjs"; +import { percentile } from "./percentile.mjs"; +import { range } from "./range.mjs"; +import { rangeRight } from "./rangeRight.mjs"; +import { sum } from "./sum.mjs"; +import { sumBy } from "./sumBy.mjs"; +export { clamp, inRange, max, maxBy, median, medianBy, min, minBy, percentile, range, rangeRight, sum, sumBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/index.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..40869dd15f1cf2bb30f110d3020c48dcaa904497 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/index.d.ts @@ -0,0 +1,14 @@ +import { clamp } from "./clamp.js"; +import { inRange } from "./inRange.js"; +import { max } from "./max.js"; +import { maxBy } from "./maxBy.js"; +import { median } from "./median.js"; +import { medianBy } from "./medianBy.js"; +import { min } from "./min.js"; +import { minBy } from "./minBy.js"; +import { percentile } from "./percentile.js"; +import { range } from "./range.js"; +import { rangeRight } from "./rangeRight.js"; +import { sum } from "./sum.js"; +import { sumBy } from "./sumBy.js"; +export { clamp, inRange, max, maxBy, median, medianBy, min, minBy, percentile, range, rangeRight, sum, sumBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/index.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/index.js new file mode 100644 index 0000000000000000000000000000000000000000..1d37cbe6d04f901d4dd9702f7b2ed8e784b85ee8 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/index.js @@ -0,0 +1,27 @@ +Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); +const require_clamp = require("./clamp.js"); +const require_inRange = require("./inRange.js"); +const require_max = require("./max.js"); +const require_maxBy = require("./maxBy.js"); +const require_median = require("./median.js"); +const require_medianBy = require("./medianBy.js"); +const require_min = require("./min.js"); +const require_minBy = require("./minBy.js"); +const require_percentile = require("./percentile.js"); +const require_range = require("./range.js"); +const require_rangeRight = require("./rangeRight.js"); +const require_sum = require("./sum.js"); +const require_sumBy = require("./sumBy.js"); +exports.clamp = require_clamp.clamp; +exports.inRange = require_inRange.inRange; +exports.max = require_max.max; +exports.maxBy = require_maxBy.maxBy; +exports.median = require_median.median; +exports.medianBy = require_medianBy.medianBy; +exports.min = require_min.min; +exports.minBy = require_minBy.minBy; +exports.percentile = require_percentile.percentile; +exports.range = require_range.range; +exports.rangeRight = require_rangeRight.rangeRight; +exports.sum = require_sum.sum; +exports.sumBy = require_sumBy.sumBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/index.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f5e9b855ae32b42e6ba01a8d42544e5d072d452b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/index.mjs @@ -0,0 +1,14 @@ +import { clamp } from "./clamp.mjs"; +import { inRange } from "./inRange.mjs"; +import { max } from "./max.mjs"; +import { maxBy } from "./maxBy.mjs"; +import { median } from "./median.mjs"; +import { medianBy } from "./medianBy.mjs"; +import { min } from "./min.mjs"; +import { minBy } from "./minBy.mjs"; +import { percentile } from "./percentile.mjs"; +import { range } from "./range.mjs"; +import { rangeRight } from "./rangeRight.mjs"; +import { sum } from "./sum.mjs"; +import { sumBy } from "./sumBy.mjs"; +export { clamp, inRange, max, maxBy, median, medianBy, min, minBy, percentile, range, rangeRight, sum, sumBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/max.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/max.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..afee5bedacd9206af54923bff2c3998a0d57d9ac --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/max.d.mts @@ -0,0 +1,21 @@ +//#region src/bigint/max.d.ts +/** + * Finds the largest bigint in an array. + * + * This function iterates through the array and returns the largest element. Unlike `Math.max`, + * which cannot accept bigints, it compares values directly so arbitrarily large integers stay exact. + * + * @param nums - An array of bigints to search. + * @returns The largest bigint in the array. + * @throws {RangeError} If the array is empty, since there is no bigint that represents "no maximum". + * + * @example + * const result = max([1n, 5n, 3n]); + * // result will be 5n + * + * const huge = max([9007199254740993n, 9007199254740992n]); + * // huge will be 9007199254740993n, a value `Math.max` cannot distinguish + */ +declare function max(nums: readonly bigint[]): bigint; +//#endregion +export { max }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/max.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/max.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..afee5bedacd9206af54923bff2c3998a0d57d9ac --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/max.d.ts @@ -0,0 +1,21 @@ +//#region src/bigint/max.d.ts +/** + * Finds the largest bigint in an array. + * + * This function iterates through the array and returns the largest element. Unlike `Math.max`, + * which cannot accept bigints, it compares values directly so arbitrarily large integers stay exact. + * + * @param nums - An array of bigints to search. + * @returns The largest bigint in the array. + * @throws {RangeError} If the array is empty, since there is no bigint that represents "no maximum". + * + * @example + * const result = max([1n, 5n, 3n]); + * // result will be 5n + * + * const huge = max([9007199254740993n, 9007199254740992n]); + * // huge will be 9007199254740993n, a value `Math.max` cannot distinguish + */ +declare function max(nums: readonly bigint[]): bigint; +//#endregion +export { max }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/max.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/max.js new file mode 100644 index 0000000000000000000000000000000000000000..f3090389eaa7439484e00bc098e9b8f2c3e1e2bf --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/max.js @@ -0,0 +1,26 @@ +//#region src/bigint/max.ts +/** +* Finds the largest bigint in an array. +* +* This function iterates through the array and returns the largest element. Unlike `Math.max`, +* which cannot accept bigints, it compares values directly so arbitrarily large integers stay exact. +* +* @param nums - An array of bigints to search. +* @returns The largest bigint in the array. +* @throws {RangeError} If the array is empty, since there is no bigint that represents "no maximum". +* +* @example +* const result = max([1n, 5n, 3n]); +* // result will be 5n +* +* const huge = max([9007199254740993n, 9007199254740992n]); +* // huge will be 9007199254740993n, a value `Math.max` cannot distinguish +*/ +function max(nums) { + if (nums.length === 0) throw new RangeError("Cannot find the maximum of an empty array."); + let result = nums[0]; + for (let i = 1; i < nums.length; i++) if (nums[i] > result) result = nums[i]; + return result; +} +//#endregion +exports.max = max; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/max.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/max.mjs new file mode 100644 index 0000000000000000000000000000000000000000..6b704440e73ffc260511441ebe20f3f6bc977364 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/max.mjs @@ -0,0 +1,26 @@ +//#region src/bigint/max.ts +/** +* Finds the largest bigint in an array. +* +* This function iterates through the array and returns the largest element. Unlike `Math.max`, +* which cannot accept bigints, it compares values directly so arbitrarily large integers stay exact. +* +* @param nums - An array of bigints to search. +* @returns The largest bigint in the array. +* @throws {RangeError} If the array is empty, since there is no bigint that represents "no maximum". +* +* @example +* const result = max([1n, 5n, 3n]); +* // result will be 5n +* +* const huge = max([9007199254740993n, 9007199254740992n]); +* // huge will be 9007199254740993n, a value `Math.max` cannot distinguish +*/ +function max(nums) { + if (nums.length === 0) throw new RangeError("Cannot find the maximum of an empty array."); + let result = nums[0]; + for (let i = 1; i < nums.length; i++) if (nums[i] > result) result = nums[i]; + return result; +} +//#endregion +export { max }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/maxBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/maxBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..6c2b320d74dc1d17aeee070d1a9738f4bb1b8e8a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/maxBy.d.mts @@ -0,0 +1,21 @@ +//#region src/bigint/maxBy.d.ts +/** + * Finds the element in an array that has the largest bigint value returned by `getValue`. + * + * This function maps every element to a bigint and returns the element with the largest value. + * If several elements tie, the first one is returned. + * + * @template T - The type of elements in the array. + * @param items - An array of elements to search. + * @param getValue - A function that maps an element to the bigint to compare by. + * @returns The element with the largest mapped bigint. + * @throws {RangeError} If the array is empty, since there is no element to return. + * + * @example + * const accounts = [{ balance: 10n }, { balance: 30n }, { balance: 20n }]; + * const result = maxBy(accounts, account => account.balance); + * // result will be { balance: 30n } + */ +declare function maxBy(items: readonly T[], getValue: (element: T, index: number, array: readonly T[]) => bigint): T; +//#endregion +export { maxBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/maxBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/maxBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6c2b320d74dc1d17aeee070d1a9738f4bb1b8e8a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/maxBy.d.ts @@ -0,0 +1,21 @@ +//#region src/bigint/maxBy.d.ts +/** + * Finds the element in an array that has the largest bigint value returned by `getValue`. + * + * This function maps every element to a bigint and returns the element with the largest value. + * If several elements tie, the first one is returned. + * + * @template T - The type of elements in the array. + * @param items - An array of elements to search. + * @param getValue - A function that maps an element to the bigint to compare by. + * @returns The element with the largest mapped bigint. + * @throws {RangeError} If the array is empty, since there is no element to return. + * + * @example + * const accounts = [{ balance: 10n }, { balance: 30n }, { balance: 20n }]; + * const result = maxBy(accounts, account => account.balance); + * // result will be { balance: 30n } + */ +declare function maxBy(items: readonly T[], getValue: (element: T, index: number, array: readonly T[]) => bigint): T; +//#endregion +export { maxBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/maxBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/maxBy.js new file mode 100644 index 0000000000000000000000000000000000000000..d5f72ce7ccd22be3478609645f9d49b150d5a887 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/maxBy.js @@ -0,0 +1,34 @@ +//#region src/bigint/maxBy.ts +/** +* Finds the element in an array that has the largest bigint value returned by `getValue`. +* +* This function maps every element to a bigint and returns the element with the largest value. +* If several elements tie, the first one is returned. +* +* @template T - The type of elements in the array. +* @param items - An array of elements to search. +* @param getValue - A function that maps an element to the bigint to compare by. +* @returns The element with the largest mapped bigint. +* @throws {RangeError} If the array is empty, since there is no element to return. +* +* @example +* const accounts = [{ balance: 10n }, { balance: 30n }, { balance: 20n }]; +* const result = maxBy(accounts, account => account.balance); +* // result will be { balance: 30n } +*/ +function maxBy(items, getValue) { + if (items.length === 0) throw new RangeError("Cannot find the maximum of an empty array."); + let maxElement = items[0]; + let max = getValue(items[0], 0, items); + for (let i = 1; i < items.length; i++) { + const element = items[i]; + const value = getValue(element, i, items); + if (value > max) { + max = value; + maxElement = element; + } + } + return maxElement; +} +//#endregion +exports.maxBy = maxBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/maxBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/maxBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..60abb43c578c3c9551c0af8a746c69b8deabd4e0 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/maxBy.mjs @@ -0,0 +1,34 @@ +//#region src/bigint/maxBy.ts +/** +* Finds the element in an array that has the largest bigint value returned by `getValue`. +* +* This function maps every element to a bigint and returns the element with the largest value. +* If several elements tie, the first one is returned. +* +* @template T - The type of elements in the array. +* @param items - An array of elements to search. +* @param getValue - A function that maps an element to the bigint to compare by. +* @returns The element with the largest mapped bigint. +* @throws {RangeError} If the array is empty, since there is no element to return. +* +* @example +* const accounts = [{ balance: 10n }, { balance: 30n }, { balance: 20n }]; +* const result = maxBy(accounts, account => account.balance); +* // result will be { balance: 30n } +*/ +function maxBy(items, getValue) { + if (items.length === 0) throw new RangeError("Cannot find the maximum of an empty array."); + let maxElement = items[0]; + let max = getValue(items[0], 0, items); + for (let i = 1; i < items.length; i++) { + const element = items[i]; + const value = getValue(element, i, items); + if (value > max) { + max = value; + maxElement = element; + } + } + return maxElement; +} +//#endregion +export { maxBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/median.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/median.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..d21d39145a6f233a80bb4b21bd99b5618ae2723d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/median.d.mts @@ -0,0 +1,22 @@ +//#region src/bigint/median.d.ts +/** + * Calculates the median of an array of bigints. + * + * The median is the middle value of a sorted array. When the array has an even number of elements, + * the two middle values are averaged. Because bigints have no fractional part, that average is + * truncated toward zero: `median([1n, 2n])` is `1n` and `median([-3n, -2n])` is `-2n`. + * + * @param nums - An array of bigints to calculate the median of. + * @returns The median of the array. + * @throws {RangeError} If the array is empty, since there is no bigint that represents "no median". + * + * @example + * const result = median([1n, 2n, 3n, 4n, 5n]); + * // result will be 3n + * + * const truncated = median([1n, 2n, 3n, 4n]); + * // truncated will be 2n, because (2n + 3n) / 2n truncates toward zero + */ +declare function median(nums: readonly bigint[]): bigint; +//#endregion +export { median }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/median.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/median.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d21d39145a6f233a80bb4b21bd99b5618ae2723d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/median.d.ts @@ -0,0 +1,22 @@ +//#region src/bigint/median.d.ts +/** + * Calculates the median of an array of bigints. + * + * The median is the middle value of a sorted array. When the array has an even number of elements, + * the two middle values are averaged. Because bigints have no fractional part, that average is + * truncated toward zero: `median([1n, 2n])` is `1n` and `median([-3n, -2n])` is `-2n`. + * + * @param nums - An array of bigints to calculate the median of. + * @returns The median of the array. + * @throws {RangeError} If the array is empty, since there is no bigint that represents "no median". + * + * @example + * const result = median([1n, 2n, 3n, 4n, 5n]); + * // result will be 3n + * + * const truncated = median([1n, 2n, 3n, 4n]); + * // truncated will be 2n, because (2n + 3n) / 2n truncates toward zero + */ +declare function median(nums: readonly bigint[]): bigint; +//#endregion +export { median }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/median.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/median.js new file mode 100644 index 0000000000000000000000000000000000000000..0c2713e27a54cbec6e2dd37fa5debafd3f28d3ae --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/median.js @@ -0,0 +1,28 @@ +//#region src/bigint/median.ts +/** +* Calculates the median of an array of bigints. +* +* The median is the middle value of a sorted array. When the array has an even number of elements, +* the two middle values are averaged. Because bigints have no fractional part, that average is +* truncated toward zero: `median([1n, 2n])` is `1n` and `median([-3n, -2n])` is `-2n`. +* +* @param nums - An array of bigints to calculate the median of. +* @returns The median of the array. +* @throws {RangeError} If the array is empty, since there is no bigint that represents "no median". +* +* @example +* const result = median([1n, 2n, 3n, 4n, 5n]); +* // result will be 3n +* +* const truncated = median([1n, 2n, 3n, 4n]); +* // truncated will be 2n, because (2n + 3n) / 2n truncates toward zero +*/ +function median(nums) { + if (nums.length === 0) throw new RangeError("Cannot compute the median of an empty array."); + const sorted = nums.slice().sort((a, b) => a < b ? -1 : a > b ? 1 : 0); + const middleIndex = Math.floor(sorted.length / 2); + if (sorted.length % 2 === 0) return (sorted[middleIndex - 1] + sorted[middleIndex]) / 2n; + return sorted[middleIndex]; +} +//#endregion +exports.median = median; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/median.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/median.mjs new file mode 100644 index 0000000000000000000000000000000000000000..273d85b7b25f054205d5eb375fcee9259ec185a3 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/median.mjs @@ -0,0 +1,28 @@ +//#region src/bigint/median.ts +/** +* Calculates the median of an array of bigints. +* +* The median is the middle value of a sorted array. When the array has an even number of elements, +* the two middle values are averaged. Because bigints have no fractional part, that average is +* truncated toward zero: `median([1n, 2n])` is `1n` and `median([-3n, -2n])` is `-2n`. +* +* @param nums - An array of bigints to calculate the median of. +* @returns The median of the array. +* @throws {RangeError} If the array is empty, since there is no bigint that represents "no median". +* +* @example +* const result = median([1n, 2n, 3n, 4n, 5n]); +* // result will be 3n +* +* const truncated = median([1n, 2n, 3n, 4n]); +* // truncated will be 2n, because (2n + 3n) / 2n truncates toward zero +*/ +function median(nums) { + if (nums.length === 0) throw new RangeError("Cannot compute the median of an empty array."); + const sorted = nums.slice().sort((a, b) => a < b ? -1 : a > b ? 1 : 0); + const middleIndex = Math.floor(sorted.length / 2); + if (sorted.length % 2 === 0) return (sorted[middleIndex - 1] + sorted[middleIndex]) / 2n; + return sorted[middleIndex]; +} +//#endregion +export { median }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/medianBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/medianBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..7271d138702a9b78c7cb110da37f5498c72fe093 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/medianBy.d.mts @@ -0,0 +1,21 @@ +//#region src/bigint/medianBy.d.ts +/** + * Calculates the median of an array by mapping each element to a bigint. + * + * This function maps every element to a bigint and returns the median of those values. Because + * bigints have no fractional part, the average taken for even-length arrays is truncated toward zero. + * + * @template T - The type of elements in the array. + * @param items - An array of elements to calculate the median of. + * @param getValue - A function that maps an element to the bigint to use. + * @returns The median of the mapped bigints. + * @throws {RangeError} If the array is empty, since there is no bigint that represents "no median". + * + * @example + * const accounts = [{ balance: 10n }, { balance: 30n }, { balance: 20n }]; + * const result = medianBy(accounts, account => account.balance); + * // result will be 20n + */ +declare function medianBy(items: readonly T[], getValue: (element: T) => bigint): bigint; +//#endregion +export { medianBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/medianBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/medianBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7271d138702a9b78c7cb110da37f5498c72fe093 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/medianBy.d.ts @@ -0,0 +1,21 @@ +//#region src/bigint/medianBy.d.ts +/** + * Calculates the median of an array by mapping each element to a bigint. + * + * This function maps every element to a bigint and returns the median of those values. Because + * bigints have no fractional part, the average taken for even-length arrays is truncated toward zero. + * + * @template T - The type of elements in the array. + * @param items - An array of elements to calculate the median of. + * @param getValue - A function that maps an element to the bigint to use. + * @returns The median of the mapped bigints. + * @throws {RangeError} If the array is empty, since there is no bigint that represents "no median". + * + * @example + * const accounts = [{ balance: 10n }, { balance: 30n }, { balance: 20n }]; + * const result = medianBy(accounts, account => account.balance); + * // result will be 20n + */ +declare function medianBy(items: readonly T[], getValue: (element: T) => bigint): bigint; +//#endregion +export { medianBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/medianBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/medianBy.js new file mode 100644 index 0000000000000000000000000000000000000000..e6121bcc8b37eaaa1ea77027e564bfc70777053f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/medianBy.js @@ -0,0 +1,24 @@ +const require_median = require("./median.js"); +//#region src/bigint/medianBy.ts +/** +* Calculates the median of an array by mapping each element to a bigint. +* +* This function maps every element to a bigint and returns the median of those values. Because +* bigints have no fractional part, the average taken for even-length arrays is truncated toward zero. +* +* @template T - The type of elements in the array. +* @param items - An array of elements to calculate the median of. +* @param getValue - A function that maps an element to the bigint to use. +* @returns The median of the mapped bigints. +* @throws {RangeError} If the array is empty, since there is no bigint that represents "no median". +* +* @example +* const accounts = [{ balance: 10n }, { balance: 30n }, { balance: 20n }]; +* const result = medianBy(accounts, account => account.balance); +* // result will be 20n +*/ +function medianBy(items, getValue) { + return require_median.median(items.map((item) => getValue(item))); +} +//#endregion +exports.medianBy = medianBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/medianBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/medianBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..4df7a0b3ee0029263427fc1848c5d22d440507fb --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/medianBy.mjs @@ -0,0 +1,24 @@ +import { median } from "./median.mjs"; +//#region src/bigint/medianBy.ts +/** +* Calculates the median of an array by mapping each element to a bigint. +* +* This function maps every element to a bigint and returns the median of those values. Because +* bigints have no fractional part, the average taken for even-length arrays is truncated toward zero. +* +* @template T - The type of elements in the array. +* @param items - An array of elements to calculate the median of. +* @param getValue - A function that maps an element to the bigint to use. +* @returns The median of the mapped bigints. +* @throws {RangeError} If the array is empty, since there is no bigint that represents "no median". +* +* @example +* const accounts = [{ balance: 10n }, { balance: 30n }, { balance: 20n }]; +* const result = medianBy(accounts, account => account.balance); +* // result will be 20n +*/ +function medianBy(items, getValue) { + return median(items.map((item) => getValue(item))); +} +//#endregion +export { medianBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/min.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/min.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..e8d10bed0b85617e6ba4230af51a48211b6b8a3d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/min.d.mts @@ -0,0 +1,18 @@ +//#region src/bigint/min.d.ts +/** + * Finds the smallest bigint in an array. + * + * This function iterates through the array and returns the smallest element. Unlike `Math.min`, + * which cannot accept bigints, it compares values directly so arbitrarily large integers stay exact. + * + * @param nums - An array of bigints to search. + * @returns The smallest bigint in the array. + * @throws {RangeError} If the array is empty, since there is no bigint that represents "no minimum". + * + * @example + * const result = min([1n, 5n, 3n]); + * // result will be 1n + */ +declare function min(nums: readonly bigint[]): bigint; +//#endregion +export { min }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/min.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/min.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e8d10bed0b85617e6ba4230af51a48211b6b8a3d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/min.d.ts @@ -0,0 +1,18 @@ +//#region src/bigint/min.d.ts +/** + * Finds the smallest bigint in an array. + * + * This function iterates through the array and returns the smallest element. Unlike `Math.min`, + * which cannot accept bigints, it compares values directly so arbitrarily large integers stay exact. + * + * @param nums - An array of bigints to search. + * @returns The smallest bigint in the array. + * @throws {RangeError} If the array is empty, since there is no bigint that represents "no minimum". + * + * @example + * const result = min([1n, 5n, 3n]); + * // result will be 1n + */ +declare function min(nums: readonly bigint[]): bigint; +//#endregion +export { min }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/min.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/min.js new file mode 100644 index 0000000000000000000000000000000000000000..cdbfc725c7e5bde5a9101bf56fb036b122293f93 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/min.js @@ -0,0 +1,23 @@ +//#region src/bigint/min.ts +/** +* Finds the smallest bigint in an array. +* +* This function iterates through the array and returns the smallest element. Unlike `Math.min`, +* which cannot accept bigints, it compares values directly so arbitrarily large integers stay exact. +* +* @param nums - An array of bigints to search. +* @returns The smallest bigint in the array. +* @throws {RangeError} If the array is empty, since there is no bigint that represents "no minimum". +* +* @example +* const result = min([1n, 5n, 3n]); +* // result will be 1n +*/ +function min(nums) { + if (nums.length === 0) throw new RangeError("Cannot find the minimum of an empty array."); + let result = nums[0]; + for (let i = 1; i < nums.length; i++) if (nums[i] < result) result = nums[i]; + return result; +} +//#endregion +exports.min = min; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/min.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/min.mjs new file mode 100644 index 0000000000000000000000000000000000000000..11a1f06ce62d936f8db38a94504ab24e3b0fc86a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/min.mjs @@ -0,0 +1,23 @@ +//#region src/bigint/min.ts +/** +* Finds the smallest bigint in an array. +* +* This function iterates through the array and returns the smallest element. Unlike `Math.min`, +* which cannot accept bigints, it compares values directly so arbitrarily large integers stay exact. +* +* @param nums - An array of bigints to search. +* @returns The smallest bigint in the array. +* @throws {RangeError} If the array is empty, since there is no bigint that represents "no minimum". +* +* @example +* const result = min([1n, 5n, 3n]); +* // result will be 1n +*/ +function min(nums) { + if (nums.length === 0) throw new RangeError("Cannot find the minimum of an empty array."); + let result = nums[0]; + for (let i = 1; i < nums.length; i++) if (nums[i] < result) result = nums[i]; + return result; +} +//#endregion +export { min }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/minBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/minBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..368820d3947907c6fae76d251c5a85b54f7b0905 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/minBy.d.mts @@ -0,0 +1,21 @@ +//#region src/bigint/minBy.d.ts +/** + * Finds the element in an array that has the smallest bigint value returned by `getValue`. + * + * This function maps every element to a bigint and returns the element with the smallest value. + * If several elements tie, the first one is returned. + * + * @template T - The type of elements in the array. + * @param items - An array of elements to search. + * @param getValue - A function that maps an element to the bigint to compare by. + * @returns The element with the smallest mapped bigint. + * @throws {RangeError} If the array is empty, since there is no element to return. + * + * @example + * const accounts = [{ balance: 10n }, { balance: 30n }, { balance: 20n }]; + * const result = minBy(accounts, account => account.balance); + * // result will be { balance: 10n } + */ +declare function minBy(items: readonly T[], getValue: (element: T, index: number, array: readonly T[]) => bigint): T; +//#endregion +export { minBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/minBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/minBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..368820d3947907c6fae76d251c5a85b54f7b0905 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/minBy.d.ts @@ -0,0 +1,21 @@ +//#region src/bigint/minBy.d.ts +/** + * Finds the element in an array that has the smallest bigint value returned by `getValue`. + * + * This function maps every element to a bigint and returns the element with the smallest value. + * If several elements tie, the first one is returned. + * + * @template T - The type of elements in the array. + * @param items - An array of elements to search. + * @param getValue - A function that maps an element to the bigint to compare by. + * @returns The element with the smallest mapped bigint. + * @throws {RangeError} If the array is empty, since there is no element to return. + * + * @example + * const accounts = [{ balance: 10n }, { balance: 30n }, { balance: 20n }]; + * const result = minBy(accounts, account => account.balance); + * // result will be { balance: 10n } + */ +declare function minBy(items: readonly T[], getValue: (element: T, index: number, array: readonly T[]) => bigint): T; +//#endregion +export { minBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/minBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/minBy.js new file mode 100644 index 0000000000000000000000000000000000000000..fa52cb8d5499efe294f797a155c8129fdc94d631 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/minBy.js @@ -0,0 +1,34 @@ +//#region src/bigint/minBy.ts +/** +* Finds the element in an array that has the smallest bigint value returned by `getValue`. +* +* This function maps every element to a bigint and returns the element with the smallest value. +* If several elements tie, the first one is returned. +* +* @template T - The type of elements in the array. +* @param items - An array of elements to search. +* @param getValue - A function that maps an element to the bigint to compare by. +* @returns The element with the smallest mapped bigint. +* @throws {RangeError} If the array is empty, since there is no element to return. +* +* @example +* const accounts = [{ balance: 10n }, { balance: 30n }, { balance: 20n }]; +* const result = minBy(accounts, account => account.balance); +* // result will be { balance: 10n } +*/ +function minBy(items, getValue) { + if (items.length === 0) throw new RangeError("Cannot find the minimum of an empty array."); + let minElement = items[0]; + let min = getValue(items[0], 0, items); + for (let i = 1; i < items.length; i++) { + const element = items[i]; + const value = getValue(element, i, items); + if (value < min) { + min = value; + minElement = element; + } + } + return minElement; +} +//#endregion +exports.minBy = minBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/minBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/minBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..baa0a004ae0fbd5f0f049ea78205c6082269f8e5 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/minBy.mjs @@ -0,0 +1,34 @@ +//#region src/bigint/minBy.ts +/** +* Finds the element in an array that has the smallest bigint value returned by `getValue`. +* +* This function maps every element to a bigint and returns the element with the smallest value. +* If several elements tie, the first one is returned. +* +* @template T - The type of elements in the array. +* @param items - An array of elements to search. +* @param getValue - A function that maps an element to the bigint to compare by. +* @returns The element with the smallest mapped bigint. +* @throws {RangeError} If the array is empty, since there is no element to return. +* +* @example +* const accounts = [{ balance: 10n }, { balance: 30n }, { balance: 20n }]; +* const result = minBy(accounts, account => account.balance); +* // result will be { balance: 10n } +*/ +function minBy(items, getValue) { + if (items.length === 0) throw new RangeError("Cannot find the minimum of an empty array."); + let minElement = items[0]; + let min = getValue(items[0], 0, items); + for (let i = 1; i < items.length; i++) { + const element = items[i]; + const value = getValue(element, i, items); + if (value < min) { + min = value; + minElement = element; + } + } + return minElement; +} +//#endregion +export { minBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/percentile.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/percentile.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..7a1649ea4410048da149ac07fd6bb73be82fe8c2 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/percentile.d.mts @@ -0,0 +1,23 @@ +//#region src/bigint/percentile.d.ts +/** + * Calculates the value at a given percentile in an array of bigints. + * + * This function uses the [nearest-rank method](https://en.wikipedia.org/wiki/Percentile#The_nearest-rank_method), + * so it always returns one of the values that is already in the array and never interpolates between them. + * + * @param arr - An array of bigints to calculate the percentile of. + * @param percentile - The percentile to look up, as a number between `0` and `100`. + * @returns The bigint at the given percentile. + * @throws {Error} If `percentile` is not a number between `0` and `100`. + * @throws {RangeError} If the array is empty, since there is no bigint to return. + * + * @example + * const result = percentile([1n, 2n, 3n, 4n, 5n], 50); + * // result will be 3n + * + * const p90 = percentile([1n, 2n, 3n, 4n, 5n], 90); + * // p90 will be 5n + */ +declare function percentile(arr: readonly bigint[], percentile: number): bigint; +//#endregion +export { percentile }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/percentile.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/percentile.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7a1649ea4410048da149ac07fd6bb73be82fe8c2 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/percentile.d.ts @@ -0,0 +1,23 @@ +//#region src/bigint/percentile.d.ts +/** + * Calculates the value at a given percentile in an array of bigints. + * + * This function uses the [nearest-rank method](https://en.wikipedia.org/wiki/Percentile#The_nearest-rank_method), + * so it always returns one of the values that is already in the array and never interpolates between them. + * + * @param arr - An array of bigints to calculate the percentile of. + * @param percentile - The percentile to look up, as a number between `0` and `100`. + * @returns The bigint at the given percentile. + * @throws {Error} If `percentile` is not a number between `0` and `100`. + * @throws {RangeError} If the array is empty, since there is no bigint to return. + * + * @example + * const result = percentile([1n, 2n, 3n, 4n, 5n], 50); + * // result will be 3n + * + * const p90 = percentile([1n, 2n, 3n, 4n, 5n], 90); + * // p90 will be 5n + */ +declare function percentile(arr: readonly bigint[], percentile: number): bigint; +//#endregion +export { percentile }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/percentile.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/percentile.js new file mode 100644 index 0000000000000000000000000000000000000000..bb8e5bb78c646f3e513597c3fbee868b9380dd73 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/percentile.js @@ -0,0 +1,31 @@ +//#region src/bigint/percentile.ts +/** +* Calculates the value at a given percentile in an array of bigints. +* +* This function uses the [nearest-rank method](https://en.wikipedia.org/wiki/Percentile#The_nearest-rank_method), +* so it always returns one of the values that is already in the array and never interpolates between them. +* +* @param arr - An array of bigints to calculate the percentile of. +* @param percentile - The percentile to look up, as a number between `0` and `100`. +* @returns The bigint at the given percentile. +* @throws {Error} If `percentile` is not a number between `0` and `100`. +* @throws {RangeError} If the array is empty, since there is no bigint to return. +* +* @example +* const result = percentile([1n, 2n, 3n, 4n, 5n], 50); +* // result will be 3n +* +* const p90 = percentile([1n, 2n, 3n, 4n, 5n], 90); +* // p90 will be 5n +*/ +function percentile(arr, percentile) { + if (Number.isNaN(Number(percentile))) throw new Error(`Expected percentile to be a number but got "${percentile}".`); + if (percentile < 0) throw new Error(`Expected percentile to be >= 0 but got "${percentile}".`); + if (percentile > 100) throw new Error(`Expected percentile to be <= 100 but got "${percentile}".`); + if (arr.length === 0) throw new RangeError("Cannot compute the percentile of an empty array."); + const sorted = arr.slice().sort((a, b) => a < b ? -1 : a > b ? 1 : 0); + if (percentile === 0) return sorted[0]; + return sorted[Math.ceil(sorted.length * (percentile / 100)) - 1]; +} +//#endregion +exports.percentile = percentile; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/percentile.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/percentile.mjs new file mode 100644 index 0000000000000000000000000000000000000000..29258f7d5de0b339e50f2ce805eb6f26c923e2e2 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/percentile.mjs @@ -0,0 +1,31 @@ +//#region src/bigint/percentile.ts +/** +* Calculates the value at a given percentile in an array of bigints. +* +* This function uses the [nearest-rank method](https://en.wikipedia.org/wiki/Percentile#The_nearest-rank_method), +* so it always returns one of the values that is already in the array and never interpolates between them. +* +* @param arr - An array of bigints to calculate the percentile of. +* @param percentile - The percentile to look up, as a number between `0` and `100`. +* @returns The bigint at the given percentile. +* @throws {Error} If `percentile` is not a number between `0` and `100`. +* @throws {RangeError} If the array is empty, since there is no bigint to return. +* +* @example +* const result = percentile([1n, 2n, 3n, 4n, 5n], 50); +* // result will be 3n +* +* const p90 = percentile([1n, 2n, 3n, 4n, 5n], 90); +* // p90 will be 5n +*/ +function percentile(arr, percentile) { + if (Number.isNaN(Number(percentile))) throw new Error(`Expected percentile to be a number but got "${percentile}".`); + if (percentile < 0) throw new Error(`Expected percentile to be >= 0 but got "${percentile}".`); + if (percentile > 100) throw new Error(`Expected percentile to be <= 100 but got "${percentile}".`); + if (arr.length === 0) throw new RangeError("Cannot compute the percentile of an empty array."); + const sorted = arr.slice().sort((a, b) => a < b ? -1 : a > b ? 1 : 0); + if (percentile === 0) return sorted[0]; + return sorted[Math.ceil(sorted.length * (percentile / 100)) - 1]; +} +//#endregion +export { percentile }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/range.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/range.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..81ddcb38a3b2b3a7bf84e18a697b9352f9d646dd --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/range.d.mts @@ -0,0 +1,45 @@ +//#region src/bigint/range.d.ts +/** + * Returns an array of bigints from `0n` up to, but not including, `end`. + * + * @param end - The exclusive end of the range. + * @returns An array of bigints. + * + * @example + * const result = range(4n); + * // result will be [0n, 1n, 2n, 3n] + */ +declare function range(end: bigint): bigint[]; +/** + * Returns an array of bigints from `start` up to, but not including, `end`. + * + * @param start - The inclusive start of the range. + * @param end - The exclusive end of the range. + * @returns An array of bigints. + * + * @example + * const result = range(2n, 5n); + * // result will be [2n, 3n, 4n] + */ +declare function range(start: bigint, end: bigint): bigint[]; +/** + * Returns an array of bigints from `start` up to, but not including, `end`, incrementing by `step`. + * + * A negative `step` counts down. If `step` points away from `end`, an empty array is returned. + * + * @param start - The inclusive start of the range. + * @param end - The exclusive end of the range. + * @param step - The amount to increment by. Must not be `0n`. + * @returns An array of bigints. + * @throws {Error} If `step` is `0n`. + * + * @example + * const result = range(0n, 10n, 2n); + * // result will be [0n, 2n, 4n, 6n, 8n] + * + * const countdown = range(5n, 0n, -1n); + * // countdown will be [5n, 4n, 3n, 2n, 1n] + */ +declare function range(start: bigint, end: bigint, step: bigint): bigint[]; +//#endregion +export { range }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/range.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/range.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..81ddcb38a3b2b3a7bf84e18a697b9352f9d646dd --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/range.d.ts @@ -0,0 +1,45 @@ +//#region src/bigint/range.d.ts +/** + * Returns an array of bigints from `0n` up to, but not including, `end`. + * + * @param end - The exclusive end of the range. + * @returns An array of bigints. + * + * @example + * const result = range(4n); + * // result will be [0n, 1n, 2n, 3n] + */ +declare function range(end: bigint): bigint[]; +/** + * Returns an array of bigints from `start` up to, but not including, `end`. + * + * @param start - The inclusive start of the range. + * @param end - The exclusive end of the range. + * @returns An array of bigints. + * + * @example + * const result = range(2n, 5n); + * // result will be [2n, 3n, 4n] + */ +declare function range(start: bigint, end: bigint): bigint[]; +/** + * Returns an array of bigints from `start` up to, but not including, `end`, incrementing by `step`. + * + * A negative `step` counts down. If `step` points away from `end`, an empty array is returned. + * + * @param start - The inclusive start of the range. + * @param end - The exclusive end of the range. + * @param step - The amount to increment by. Must not be `0n`. + * @returns An array of bigints. + * @throws {Error} If `step` is `0n`. + * + * @example + * const result = range(0n, 10n, 2n); + * // result will be [0n, 2n, 4n, 6n, 8n] + * + * const countdown = range(5n, 0n, -1n); + * // countdown will be [5n, 4n, 3n, 2n, 1n] + */ +declare function range(start: bigint, end: bigint, step: bigint): bigint[]; +//#endregion +export { range }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/range.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/range.js new file mode 100644 index 0000000000000000000000000000000000000000..049d30fbb17bd94c4f12d1e8e82f099ddfcfd0dc --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/range.js @@ -0,0 +1,24 @@ +const require_bigIntRangeLength = require("../_internal/bigIntRangeLength.js"); +//#region src/bigint/range.ts +/** +* Returns an array of bigints from `start` up to, but not including, `end`, incrementing by `step`. +* +* @param start - The exclusive end of the range when called with one argument, otherwise the inclusive start. +* @param end - The exclusive end of the range. +* @param step - The amount to increment by. Must not be `0n`. +* @returns An array of bigints. +* @throws {Error} If `step` is `0n`. +*/ +function range(start, end, step = 1n) { + if (end == null) { + end = start; + start = 0n; + } + if (step === 0n) throw new Error("The step value must be a non-zero bigint."); + const length = require_bigIntRangeLength.bigIntRangeLength(start, end, step); + const result = new Array(length); + for (let i = 0; i < length; i++) result[i] = start + BigInt(i) * step; + return result; +} +//#endregion +exports.range = range; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/range.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/range.mjs new file mode 100644 index 0000000000000000000000000000000000000000..89ad8c0fa37c9cc2ba717ef5e8f85251c5a0f2ae --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/range.mjs @@ -0,0 +1,24 @@ +import { bigIntRangeLength } from "../_internal/bigIntRangeLength.mjs"; +//#region src/bigint/range.ts +/** +* Returns an array of bigints from `start` up to, but not including, `end`, incrementing by `step`. +* +* @param start - The exclusive end of the range when called with one argument, otherwise the inclusive start. +* @param end - The exclusive end of the range. +* @param step - The amount to increment by. Must not be `0n`. +* @returns An array of bigints. +* @throws {Error} If `step` is `0n`. +*/ +function range(start, end, step = 1n) { + if (end == null) { + end = start; + start = 0n; + } + if (step === 0n) throw new Error("The step value must be a non-zero bigint."); + const length = bigIntRangeLength(start, end, step); + const result = new Array(length); + for (let i = 0; i < length; i++) result[i] = start + BigInt(i) * step; + return result; +} +//#endregion +export { range }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/rangeRight.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/rangeRight.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..a8401757ce8c0013b72040d201e7181f3f5856af --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/rangeRight.d.mts @@ -0,0 +1,43 @@ +//#region src/bigint/rangeRight.d.ts +/** + * Returns an array of bigints from `0n` up to, but not including, `end`, in descending order. + * + * @param end - The exclusive end of the range. + * @returns An array of bigints. + * + * @example + * const result = rangeRight(4n); + * // result will be [3n, 2n, 1n, 0n] + */ +declare function rangeRight(end: bigint): bigint[]; +/** + * Returns an array of bigints from `start` up to, but not including, `end`, in descending order. + * + * @param start - The inclusive start of the range. + * @param end - The exclusive end of the range. + * @returns An array of bigints. + * + * @example + * const result = rangeRight(2n, 5n); + * // result will be [4n, 3n, 2n] + */ +declare function rangeRight(start: bigint, end: bigint): bigint[]; +/** + * Returns an array of bigints from `start` up to, but not including, `end`, incrementing by `step`, + * in descending order. + * + * A negative `step` counts down. If `step` points away from `end`, an empty array is returned. + * + * @param start - The inclusive start of the range. + * @param end - The exclusive end of the range. + * @param step - The amount to increment by. Must not be `0n`. + * @returns An array of bigints. + * @throws {Error} If `step` is `0n`. + * + * @example + * const result = rangeRight(0n, 10n, 2n); + * // result will be [8n, 6n, 4n, 2n, 0n] + */ +declare function rangeRight(start: bigint, end: bigint, step: bigint): bigint[]; +//#endregion +export { rangeRight }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/rangeRight.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/rangeRight.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a8401757ce8c0013b72040d201e7181f3f5856af --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/rangeRight.d.ts @@ -0,0 +1,43 @@ +//#region src/bigint/rangeRight.d.ts +/** + * Returns an array of bigints from `0n` up to, but not including, `end`, in descending order. + * + * @param end - The exclusive end of the range. + * @returns An array of bigints. + * + * @example + * const result = rangeRight(4n); + * // result will be [3n, 2n, 1n, 0n] + */ +declare function rangeRight(end: bigint): bigint[]; +/** + * Returns an array of bigints from `start` up to, but not including, `end`, in descending order. + * + * @param start - The inclusive start of the range. + * @param end - The exclusive end of the range. + * @returns An array of bigints. + * + * @example + * const result = rangeRight(2n, 5n); + * // result will be [4n, 3n, 2n] + */ +declare function rangeRight(start: bigint, end: bigint): bigint[]; +/** + * Returns an array of bigints from `start` up to, but not including, `end`, incrementing by `step`, + * in descending order. + * + * A negative `step` counts down. If `step` points away from `end`, an empty array is returned. + * + * @param start - The inclusive start of the range. + * @param end - The exclusive end of the range. + * @param step - The amount to increment by. Must not be `0n`. + * @returns An array of bigints. + * @throws {Error} If `step` is `0n`. + * + * @example + * const result = rangeRight(0n, 10n, 2n); + * // result will be [8n, 6n, 4n, 2n, 0n] + */ +declare function rangeRight(start: bigint, end: bigint, step: bigint): bigint[]; +//#endregion +export { rangeRight }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/rangeRight.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/rangeRight.js new file mode 100644 index 0000000000000000000000000000000000000000..372b3925c8852b889af25b63665e1af0ea613a63 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/rangeRight.js @@ -0,0 +1,25 @@ +const require_bigIntRangeLength = require("../_internal/bigIntRangeLength.js"); +//#region src/bigint/rangeRight.ts +/** +* Returns an array of bigints from `start` up to, but not including, `end`, incrementing by `step`, +* in descending order. +* +* @param start - The exclusive end of the range when called with one argument, otherwise the inclusive start. +* @param end - The exclusive end of the range. +* @param step - The amount to increment by. Must not be `0n`. +* @returns An array of bigints. +* @throws {Error} If `step` is `0n`. +*/ +function rangeRight(start, end, step = 1n) { + if (end == null) { + end = start; + start = 0n; + } + if (step === 0n) throw new Error("The step value must be a non-zero bigint."); + const length = require_bigIntRangeLength.bigIntRangeLength(start, end, step); + const result = new Array(length); + for (let i = 0; i < length; i++) result[i] = start + BigInt(length - i - 1) * step; + return result; +} +//#endregion +exports.rangeRight = rangeRight; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/rangeRight.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/rangeRight.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d1e6d2074e2904ac5d1f9eb2c1bcb1ba6854662f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/rangeRight.mjs @@ -0,0 +1,25 @@ +import { bigIntRangeLength } from "../_internal/bigIntRangeLength.mjs"; +//#region src/bigint/rangeRight.ts +/** +* Returns an array of bigints from `start` up to, but not including, `end`, incrementing by `step`, +* in descending order. +* +* @param start - The exclusive end of the range when called with one argument, otherwise the inclusive start. +* @param end - The exclusive end of the range. +* @param step - The amount to increment by. Must not be `0n`. +* @returns An array of bigints. +* @throws {Error} If `step` is `0n`. +*/ +function rangeRight(start, end, step = 1n) { + if (end == null) { + end = start; + start = 0n; + } + if (step === 0n) throw new Error("The step value must be a non-zero bigint."); + const length = bigIntRangeLength(start, end, step); + const result = new Array(length); + for (let i = 0; i < length; i++) result[i] = start + BigInt(length - i - 1) * step; + return result; +} +//#endregion +export { rangeRight }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/sum.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/sum.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..4e13b1a9418b1effd4d4c93085ad132570922c6a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/sum.d.mts @@ -0,0 +1,18 @@ +//#region src/bigint/sum.d.ts +/** + * Calculates the sum of an array of bigints. + * + * This function takes an array of bigints and returns the sum of all the elements in the array. + * An empty array returns `0n`, so `sum(a) + sum(b)` always equals `sum([...a, ...b])`. + * + * @param nums - An array of bigints to be summed. + * @returns The sum of all the bigints in the array. Returns `0n` for an empty array. + * + * @example + * const numbers = [1n, 2n, 3n, 4n, 5n]; + * const result = sum(numbers); + * // result will be 15n + */ +declare function sum(nums: readonly bigint[]): bigint; +//#endregion +export { sum }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/sum.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/sum.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..4e13b1a9418b1effd4d4c93085ad132570922c6a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/sum.d.ts @@ -0,0 +1,18 @@ +//#region src/bigint/sum.d.ts +/** + * Calculates the sum of an array of bigints. + * + * This function takes an array of bigints and returns the sum of all the elements in the array. + * An empty array returns `0n`, so `sum(a) + sum(b)` always equals `sum([...a, ...b])`. + * + * @param nums - An array of bigints to be summed. + * @returns The sum of all the bigints in the array. Returns `0n` for an empty array. + * + * @example + * const numbers = [1n, 2n, 3n, 4n, 5n]; + * const result = sum(numbers); + * // result will be 15n + */ +declare function sum(nums: readonly bigint[]): bigint; +//#endregion +export { sum }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/sum.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/sum.js new file mode 100644 index 0000000000000000000000000000000000000000..e7a3c3cffd9789a399e30c8c8dc0ebbba4754e54 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/sum.js @@ -0,0 +1,22 @@ +//#region src/bigint/sum.ts +/** +* Calculates the sum of an array of bigints. +* +* This function takes an array of bigints and returns the sum of all the elements in the array. +* An empty array returns `0n`, so `sum(a) + sum(b)` always equals `sum([...a, ...b])`. +* +* @param nums - An array of bigints to be summed. +* @returns The sum of all the bigints in the array. Returns `0n` for an empty array. +* +* @example +* const numbers = [1n, 2n, 3n, 4n, 5n]; +* const result = sum(numbers); +* // result will be 15n +*/ +function sum(nums) { + let result = 0n; + for (let i = 0; i < nums.length; i++) result += nums[i]; + return result; +} +//#endregion +exports.sum = sum; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/sum.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/sum.mjs new file mode 100644 index 0000000000000000000000000000000000000000..fe674d1c5a74502606c3455683f82e882fe4744e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/sum.mjs @@ -0,0 +1,22 @@ +//#region src/bigint/sum.ts +/** +* Calculates the sum of an array of bigints. +* +* This function takes an array of bigints and returns the sum of all the elements in the array. +* An empty array returns `0n`, so `sum(a) + sum(b)` always equals `sum([...a, ...b])`. +* +* @param nums - An array of bigints to be summed. +* @returns The sum of all the bigints in the array. Returns `0n` for an empty array. +* +* @example +* const numbers = [1n, 2n, 3n, 4n, 5n]; +* const result = sum(numbers); +* // result will be 15n +*/ +function sum(nums) { + let result = 0n; + for (let i = 0; i < nums.length; i++) result += nums[i]; + return result; +} +//#endregion +export { sum }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/sumBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/sumBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..3cc8609d6285d30fd4dfcdde407bd16fe9219084 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/sumBy.d.mts @@ -0,0 +1,20 @@ +//#region src/bigint/sumBy.d.ts +/** + * Calculates the sum of an array by mapping each element to a bigint. + * + * This function takes an array and a function that maps each element to a bigint, + * and returns the sum of the mapped values. An empty array returns `0n`. + * + * @template T - The type of elements in the array. + * @param items - An array of elements to be summed. + * @param getValue - A function that maps an element to the bigint to add. + * @returns The sum of the mapped bigints. Returns `0n` for an empty array. + * + * @example + * const items = [{ balance: 10n }, { balance: 20n }, { balance: 30n }]; + * const result = sumBy(items, item => item.balance); + * // result will be 60n + */ +declare function sumBy(items: readonly T[], getValue: (element: T, index: number) => bigint): bigint; +//#endregion +export { sumBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/sumBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/sumBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3cc8609d6285d30fd4dfcdde407bd16fe9219084 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/sumBy.d.ts @@ -0,0 +1,20 @@ +//#region src/bigint/sumBy.d.ts +/** + * Calculates the sum of an array by mapping each element to a bigint. + * + * This function takes an array and a function that maps each element to a bigint, + * and returns the sum of the mapped values. An empty array returns `0n`. + * + * @template T - The type of elements in the array. + * @param items - An array of elements to be summed. + * @param getValue - A function that maps an element to the bigint to add. + * @returns The sum of the mapped bigints. Returns `0n` for an empty array. + * + * @example + * const items = [{ balance: 10n }, { balance: 20n }, { balance: 30n }]; + * const result = sumBy(items, item => item.balance); + * // result will be 60n + */ +declare function sumBy(items: readonly T[], getValue: (element: T, index: number) => bigint): bigint; +//#endregion +export { sumBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/sumBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/sumBy.js new file mode 100644 index 0000000000000000000000000000000000000000..94f596aabd2f32df2ea204ef4d192c51315c47e1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/sumBy.js @@ -0,0 +1,24 @@ +//#region src/bigint/sumBy.ts +/** +* Calculates the sum of an array by mapping each element to a bigint. +* +* This function takes an array and a function that maps each element to a bigint, +* and returns the sum of the mapped values. An empty array returns `0n`. +* +* @template T - The type of elements in the array. +* @param items - An array of elements to be summed. +* @param getValue - A function that maps an element to the bigint to add. +* @returns The sum of the mapped bigints. Returns `0n` for an empty array. +* +* @example +* const items = [{ balance: 10n }, { balance: 20n }, { balance: 30n }]; +* const result = sumBy(items, item => item.balance); +* // result will be 60n +*/ +function sumBy(items, getValue) { + let result = 0n; + for (let i = 0; i < items.length; i++) result += getValue(items[i], i); + return result; +} +//#endregion +exports.sumBy = sumBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/sumBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/sumBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..2aba7495d2c2a793fd31357ae2dbf50a6d27f62b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/bigint/sumBy.mjs @@ -0,0 +1,24 @@ +//#region src/bigint/sumBy.ts +/** +* Calculates the sum of an array by mapping each element to a bigint. +* +* This function takes an array and a function that maps each element to a bigint, +* and returns the sum of the mapped values. An empty array returns `0n`. +* +* @template T - The type of elements in the array. +* @param items - An array of elements to be summed. +* @param getValue - A function that maps an element to the bigint to add. +* @returns The sum of the mapped bigints. Returns `0n` for an empty array. +* +* @example +* const items = [{ balance: 10n }, { balance: 20n }, { balance: 30n }]; +* const result = sumBy(items, item => item.balance); +* // result will be 60n +*/ +function sumBy(items, getValue) { + let result = 0n; + for (let i = 0; i < items.length; i++) result += getValue(items[i], i); + return result; +} +//#endregion +export { sumBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/assign.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/assign.js new file mode 100644 index 0000000000000000000000000000000000000000..0aa5f3263aa7b86785358186d617c04254da85bf --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/assign.js @@ -0,0 +1,32 @@ +const require_eq = require("../util/eq.js"); +const require_keys = require("./keys.js"); +//#region src/compat/object/assign.ts +/** +* Assigns properties from multiple source objects to a target object. +* +* This function merges the properties of the source objects into the target object. +* If a property in the source objects is equal to the corresponding property in the target object, +* it will not be overwritten. +* +* @param object - The target object to which properties will be assigned. +* @param sources - The source objects whose properties will be assigned to the target object. +* @returns The updated target object with properties from the source objects assigned. +* +* @example +* const target = { a: 1 }; +* const result = assign(target, { b: 2 }, { c: 3 }); +* console.log(result); // Output: { a: 1, b: 2, c: 3 } +*/ +function assign(object, ...sources) { + for (let i = 0; i < sources.length; i++) assignImpl(object, sources[i]); + return object; +} +function assignImpl(object, source) { + const keys$1 = require_keys.keys(source); + for (let i = 0; i < keys$1.length; i++) { + const key = keys$1[i]; + if (!(key in object) || !require_eq.eq(object[key], source[key])) object[key] = source[key]; + } +} +//#endregion +exports.assign = assign; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/assignIn.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/assignIn.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..4420a024783d4b51ec5b897b30d46c18a5b20ed4 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/assignIn.d.mts @@ -0,0 +1,112 @@ +//#region src/compat/object/assignIn.d.ts +/** + * Assigns own and inherited properties from one source object to a target object. + * + * @template T - The type of the target object. + * @template U - The type of the source object. + * @param object - The target object to which properties will be assigned. + * @param source - The source object whose properties will be assigned to the target object. + * @returns The updated target object with properties from the source object assigned. + * + * @example + * const target = { a: 1, b: 2 }; + * const source = { b: 3, c: 4 }; + * const result = assignIn(target, source); + * // => { a: 1, b: 3, c: 4 } + */ +declare function assignIn(object: T, source: U): T & U; +/** + * Assigns own and inherited properties from two source objects to a target object. + * + * @template T - The type of the target object. + * @template U - The type of the first source object. + * @template V - The type of the second source object. + * @param object - The target object to which properties will be assigned. + * @param source1 - The first source object whose properties will be assigned to the target object. + * @param source2 - The second source object whose properties will be assigned to the target object. + * @returns The updated target object with properties from the source objects assigned. + * + * @example + * const target = { a: 1 }; + * const source1 = { b: 2 }; + * const source2 = { c: 3 }; + * const result = assignIn(target, source1, source2); + * // => { a: 1, b: 2, c: 3 } + */ +declare function assignIn(object: T, source1: U, source2: V): T & U & V; +/** + * Assigns own and inherited properties from three source objects to a target object. + * + * @template T - The type of the target object. + * @template U - The type of the first source object. + * @template V - The type of the second source object. + * @template W - The type of the third source object. + * @param object - The target object to which properties will be assigned. + * @param source1 - The first source object whose properties will be assigned to the target object. + * @param source2 - The second source object whose properties will be assigned to the target object. + * @param source3 - The third source object whose properties will be assigned to the target object. + * @returns The updated target object with properties from the source objects assigned. + * + * @example + * const target = { a: 1 }; + * const source1 = { b: 2 }; + * const source2 = { c: 3 }; + * const source3 = { d: 4 }; + * const result = assignIn(target, source1, source2, source3); + * // => { a: 1, b: 2, c: 3, d: 4 } + */ +declare function assignIn(object: T, source1: U, source2: V, source3: W): T & U & V & W; +/** + * Assigns own and inherited properties from four source objects to a target object. + * + * @template T - The type of the target object. + * @template U - The type of the first source object. + * @template V - The type of the second source object. + * @template W - The type of the third source object. + * @template X - The type of the fourth source object. + * @param object - The target object to which properties will be assigned. + * @param source1 - The first source object whose properties will be assigned to the target object. + * @param source2 - The second source object whose properties will be assigned to the target object. + * @param source3 - The third source object whose properties will be assigned to the target object. + * @param source4 - The fourth source object whose properties will be assigned to the target object. + * @returns The updated target object with properties from the source objects assigned. + * + * @example + * const target = { a: 1 }; + * const source1 = { b: 2 }; + * const source2 = { c: 3 }; + * const source3 = { d: 4 }; + * const source4 = { e: 5 }; + * const result = assignIn(target, source1, source2, source3, source4); + * // => { a: 1, b: 2, c: 3, d: 4, e: 5 } + */ +declare function assignIn(object: T, source1: U, source2: V, source3: W, source4: X): T & U & V & W & X; +/** + * Returns the target object as-is. + * + * @template T - The type of the target object. + * @param object - The target object. + * @returns The target object. + * + * @example + * const target = { a: 1, b: 2 }; + * const result = assignIn(target); + * // => { a: 1, b: 2 } + */ +declare function assignIn(object: T): T; +/** + * Assigns own and inherited properties from multiple source objects to a target object. + * + * @template R - The type of the result. + * @param object - The target object to which properties will be assigned. + * @param otherArgs - The source objects whose properties will be assigned to the target object. + * @returns The updated target object with properties from the source objects assigned. + * + * @example + * const target = { a: 1 }; + * const result = assignIn(target, { b: 2 }, { c: 3 }, { d: 4 }); + * // => { a: 1, b: 2, c: 3, d: 4 } + */ +declare function assignIn(object: any, ...otherArgs: any[]): R; +//#endregion +export { assignIn }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/assignIn.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/assignIn.mjs new file mode 100644 index 0000000000000000000000000000000000000000..2a8087bdf47c47953e3f47f6f64054f96d583149 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/assignIn.mjs @@ -0,0 +1,32 @@ +import { eq } from "../util/eq.mjs"; +import { keysIn } from "./keysIn.mjs"; +//#region src/compat/object/assignIn.ts +/** +* Assigns properties from multiple source objects to a target object. +* +* This function merges the properties of the source objects into the target object, +* including properties from the prototype chain. If a property in the source objects +* is equal to the corresponding property in the target object, it will not be overwritten. +* +* @param object - The target object to which properties will be assigned. +* @param sources - The source objects whose properties will be assigned to the target object. +* @returns The updated target object with properties from the source objects assigned. +* +* @example +* const target = { a: 1 }; +* const result = assignIn(target, { b: 2 }, { c: 3 }); +* console.log(result); // Output: { a: 1, b: 2, c: 3 } +*/ +function assignIn(object, ...sources) { + for (let i = 0; i < sources.length; i++) assignInImpl(object, sources[i]); + return object; +} +function assignInImpl(object, source) { + const keys = keysIn(source); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + if (!(key in object) || !eq(object[key], source[key])) object[key] = source[key]; + } +} +//#endregion +export { assignIn }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/assignInWith.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/assignInWith.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..34889b964d79d1c1dce856f1eb59f925c8d0890f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/assignInWith.d.mts @@ -0,0 +1,127 @@ +//#region src/compat/object/assignInWith.d.ts +type AssignCustomizer = (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}) => any; +/** + * Assigns own and inherited properties from one source object to a target object using a customizer function. + * + * @template T - The type of the target object. + * @template U - The type of the source object. + * @param object - The target object to which properties will be assigned. + * @param source - The source object whose properties will be assigned to the target object. + * @param customizer - The function to customize assigned values. + * @returns The updated target object with properties from the source object assigned. + * + * @example + * const target = { a: 1, b: 2 }; + * const source = { b: 3, c: 4 }; + * const result = assignInWith(target, source, (objValue, srcValue) => { + * return objValue === undefined ? srcValue : objValue; + * }); + * // => { a: 1, b: 2, c: 4 } + */ +declare function assignInWith(object: T, source: U, customizer: AssignCustomizer): T & U; +/** + * Assigns own and inherited properties from two source objects to a target object using a customizer function. + * + * @template T - The type of the target object. + * @template U - The type of the first source object. + * @template V - The type of the second source object. + * @param object - The target object to which properties will be assigned. + * @param source1 - The first source object whose properties will be assigned to the target object. + * @param source2 - The second source object whose properties will be assigned to the target object. + * @param customizer - The function to customize assigned values. + * @returns The updated target object with properties from the source objects assigned. + * + * @example + * const target = { a: 1 }; + * const source1 = { b: 2 }; + * const source2 = { c: 3 }; + * const result = assignInWith(target, source1, source2, (objValue, srcValue) => { + * return objValue === undefined ? srcValue : objValue; + * }); + * // => { a: 1, b: 2, c: 3 } + */ +declare function assignInWith(object: T, source1: U, source2: V, customizer: AssignCustomizer): T & U & V; +/** + * Assigns own and inherited properties from three source objects to a target object using a customizer function. + * + * @template T - The type of the target object. + * @template U - The type of the first source object. + * @template V - The type of the second source object. + * @template W - The type of the third source object. + * @param object - The target object to which properties will be assigned. + * @param source1 - The first source object whose properties will be assigned to the target object. + * @param source2 - The second source object whose properties will be assigned to the target object. + * @param source3 - The third source object whose properties will be assigned to the target object. + * @param customizer - The function to customize assigned values. + * @returns The updated target object with properties from the source objects assigned. + * + * @example + * const target = { a: 1 }; + * const source1 = { b: 2 }; + * const source2 = { c: 3 }; + * const source3 = { d: 4 }; + * const result = assignInWith(target, source1, source2, source3, (objValue, srcValue) => { + * return objValue === undefined ? srcValue : objValue; + * }); + * // => { a: 1, b: 2, c: 3, d: 4 } + */ +declare function assignInWith(object: T, source1: U, source2: V, source3: W, customizer: AssignCustomizer): T & U & V & W; +/** + * Assigns own and inherited properties from four source objects to a target object using a customizer function. + * + * @template T - The type of the target object. + * @template U - The type of the first source object. + * @template V - The type of the second source object. + * @template W - The type of the third source object. + * @template X - The type of the fourth source object. + * @param object - The target object to which properties will be assigned. + * @param source1 - The first source object whose properties will be assigned to the target object. + * @param source2 - The second source object whose properties will be assigned to the target object. + * @param source3 - The third source object whose properties will be assigned to the target object. + * @param source4 - The fourth source object whose properties will be assigned to the target object. + * @param customizer - The function to customize assigned values. + * @returns The updated target object with properties from the source objects assigned. + * + * @example + * const target = { a: 1 }; + * const source1 = { b: 2 }; + * const source2 = { c: 3 }; + * const source3 = { d: 4 }; + * const source4 = { e: 5 }; + * const result = assignInWith(target, source1, source2, source3, source4, (objValue, srcValue) => { + * return objValue === undefined ? srcValue : objValue; + * }); + * // => { a: 1, b: 2, c: 3, d: 4, e: 5 } + */ +declare function assignInWith(object: T, source1: U, source2: V, source3: W, source4: X, customizer: AssignCustomizer): T & U & V & W & X; +/** + * Returns the target object as-is. + * + * @template T - The type of the target object. + * @param object - The target object. + * @returns The target object. + * + * @example + * const target = { a: 1, b: 2 }; + * const result = assignInWith(target); + * // => { a: 1, b: 2 } + */ +declare function assignInWith(object: T): T; +/** + * Assigns own and inherited properties from multiple source objects to a target object using a customizer function. + * + * @template R - The type of the result. + * @param object - The target object to which properties will be assigned. + * @param otherArgs - The source objects and customizer function. + * @returns The updated target object with properties from the source objects assigned. + * + * @example + * const target = { a: 1 }; + * const result = assignInWith(target, { b: 2 }, { c: 3 }, (objValue, srcValue) => { + * return objValue === undefined ? srcValue : objValue; + * }); + * // => { a: 1, b: 2, c: 3 } + */ +declare function assignInWith(object: any, ...otherArgs: any[]): R; +//#endregion +export { assignInWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/assignWith.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/assignWith.mjs new file mode 100644 index 0000000000000000000000000000000000000000..da6bbf17c141619ad14c9c6e1940cf32b0546ee5 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/assignWith.mjs @@ -0,0 +1,47 @@ +import { eq } from "../util/eq.mjs"; +import { keys } from "./keys.mjs"; +//#region src/compat/object/assignWith.ts +/** +* Assigns properties from multiple source objects to a target object. +* You can provide a `getValueToAssign` function to determine what value will be assigned for each property. +* +* This function merges the properties of the source objects into the target object. +* If a property in the source objects is equal to the corresponding property in the target object, +* it will not be overwritten. +* +* Unlike `assign`, this method accepts a `getValueToAssign` function that determines +* the final value to be assigned to each property in the target object. The return value +* of this function will be directly assigned to the corresponding property. This allows for +* more precise control over how properties are merged between objects. If not provided, +* the default behavior is equivalent to using the identity function (returning the source value). +* +* @param object - The target object to which properties will be assigned. +* @param sources - The source objects whose properties will be assigned to the target object. +* @returns The updated target object with properties from the source objects assigned. +* +* @example +* const target = { a: 1 }; +* const result = assignWith(target, { b: 2 }, { c: 3 }, function(objValue, srcValue) { +* return objValue === undefined ? srcValue : objValue; +* }); +* console.log(result); // Output: { a: 1, b: 2, c: 3 } +*/ +function assignWith(object, ...sources) { + let getValueToAssign = sources[sources.length - 1]; + if (typeof getValueToAssign === "function") sources.pop(); + else getValueToAssign = void 0; + for (let i = 0; i < sources.length; i++) assignWithImpl(object, sources[i], getValueToAssign); + return object; +} +function assignWithImpl(object, source, getValueToAssign) { + const keys$1 = keys(source); + for (let i = 0; i < keys$1.length; i++) { + const key = keys$1[i]; + const objValue = object[key]; + const srcValue = source[key]; + const newValue = getValueToAssign?.(objValue, srcValue, key, object, source) ?? srcValue; + if (!(key in object) || !eq(objValue, newValue)) object[key] = newValue; + } +} +//#endregion +export { assignWith }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/at.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/at.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..278d8c92301c88def49cdc78219d62428d6557f0 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/at.d.ts @@ -0,0 +1,34 @@ +//#region src/compat/object/at.d.ts +type PropertyName = string | number | symbol; +type Many = T | readonly T[]; +type PropertyPath = Many; +/** + * Gets values at given paths from a dictionary or numeric dictionary. + * + * @template T - The type of the values in the dictionary. + * @param object - The dictionary to query. + * @param props - The property paths to get values for. + * @returns Returns an array of the picked values. + * + * @example + * const object = { 'a': 1, 'b': 2, 'c': 3 }; + * at(object, 'a', 'c'); + * // => [1, 3] + */ +declare function at(object: Record | Record | null | undefined, ...props: PropertyPath[]): T[]; +/** + * Gets values at given keys from an object. + * + * @template T - The type of the object. + * @param object - The object to query. + * @param props - The property keys to get values for. + * @returns Returns an array of the picked values. + * + * @example + * const object = { 'a': 1, 'b': 2, 'c': 3 }; + * at(object, 'a', 'c'); + * // => [1, 3] + */ +declare function at(object: T | null | undefined, ...props: Array>): Array; +//#endregion +export { at }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/at.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/at.mjs new file mode 100644 index 0000000000000000000000000000000000000000..0e987f10d990dcd0b6508d5f864958bad4f1309e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/at.mjs @@ -0,0 +1,37 @@ +import { isArrayLike } from "../predicate/isArrayLike.mjs"; +import { get } from "./get.mjs"; +import { isString } from "../predicate/isString.mjs"; +//#region src/compat/object/at.ts +/** +* Returns an array of values corresponding to `paths` of `object`. +* +* @template T - The type of the object. +* @param object - The object to iterate over. +* @param [paths] - The property paths to pick. +* @returns Returns the picked values. +* +* @example +* ```js +* const object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; +* +* at(object, ['a[0].b.c', 'a[1]']); +* // => [3, 4] +* ``` +*/ +function at(object, ...paths) { + if (paths.length === 0) return []; + const allPaths = []; + for (let i = 0; i < paths.length; i++) { + const path = paths[i]; + if (!isArrayLike(path) || isString(path)) { + allPaths.push(path); + continue; + } + for (let j = 0; j < path.length; j++) allPaths.push(path[j]); + } + const result = []; + for (let i = 0; i < allPaths.length; i++) result.push(get(object, allPaths[i])); + return result; +} +//#endregion +export { at }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/clone.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/clone.js new file mode 100644 index 0000000000000000000000000000000000000000..39927f5983fc252ab1cfecd38ebd78df171e4675 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/clone.js @@ -0,0 +1,156 @@ +const require_isPrimitive = require("../../predicate/isPrimitive.js"); +const require_getTag = require("../_internal/getTag.js"); +const require_tags = require("../_internal/tags.js"); +const require_isArray = require("../predicate/isArray.js"); +const require_isTypedArray = require("../predicate/isTypedArray.js"); +//#region src/compat/object/clone.ts +/** +* Creates a shallow clone of the given object. +* +* @template T - The type of the object. +* @param obj - The object to clone. +* @returns A shallow clone of the given object. +* +* @example +* // Clone a primitive object +* const num = 29; +* const clonedNum = clone(num); +* console.log(clonedNum); // 29 +* console.log(clonedNum === num); // true +* +* @example +* // Clone an array +* const arr = [1, 2, 3]; +* const clonedArr = clone(arr); +* console.log(clonedArr); // [1, 2, 3] +* console.log(clonedArr === arr); // false +* +* @example +* // Clone an object +* const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] }; +* const clonedObj = clone(obj); +* console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] } +* console.log(clonedObj === obj); // false +*/ +function clone(obj) { + if (require_isPrimitive.isPrimitive(obj)) return obj; + const tag = require_getTag.getTag(obj); + if (!isCloneableObject(obj)) return {}; + if (require_isArray.isArray(obj)) { + const result = Array.from(obj); + if (obj.length > 0 && typeof obj[0] === "string" && Object.hasOwn(obj, "index")) { + result.index = obj.index; + result.input = obj.input; + } + return result; + } + if (require_isTypedArray.isTypedArray(obj)) { + const typedArray = obj; + const Ctor = typedArray.constructor; + return new Ctor(typedArray.buffer, typedArray.byteOffset, typedArray.length); + } + if (tag === "[object ArrayBuffer]") return new ArrayBuffer(obj.byteLength); + if (tag === "[object DataView]") { + const dataView = obj; + const buffer = dataView.buffer; + const byteOffset = dataView.byteOffset; + const byteLength = dataView.byteLength; + const clonedBuffer = new ArrayBuffer(byteLength); + const srcView = new Uint8Array(buffer, byteOffset, byteLength); + new Uint8Array(clonedBuffer).set(srcView); + return new DataView(clonedBuffer); + } + if (tag === "[object Boolean]" || tag === "[object Number]" || tag === "[object String]") { + const Ctor = obj.constructor; + const clone = new Ctor(obj.valueOf()); + if (tag === "[object String]") cloneStringObjectProperties(clone, obj); + else copyOwnProperties(clone, obj); + return clone; + } + if (tag === "[object Date]") return new Date(Number(obj)); + if (tag === "[object RegExp]") { + const regExp = obj; + const clone = new RegExp(regExp.source, regExp.flags); + clone.lastIndex = regExp.lastIndex; + return clone; + } + if (tag === "[object Symbol]") return Object(Symbol.prototype.valueOf.call(obj)); + if (tag === "[object Map]") { + const map = obj; + const result = /* @__PURE__ */ new Map(); + map.forEach((obj, key) => { + result.set(key, obj); + }); + return result; + } + if (tag === "[object Set]") { + const set = obj; + const result = /* @__PURE__ */ new Set(); + set.forEach((obj) => { + result.add(obj); + }); + return result; + } + if (tag === "[object Arguments]") { + const args = obj; + const result = {}; + copyOwnProperties(result, args); + result.length = args.length; + result[Symbol.iterator] = args[Symbol.iterator]; + return result; + } + const result = {}; + copyPrototype(result, obj); + copyOwnProperties(result, obj); + copySymbolProperties(result, obj); + return result; +} +function isCloneableObject(object) { + switch (require_getTag.getTag(object)) { + case require_tags.argumentsTag: + case require_tags.arrayTag: + case require_tags.arrayBufferTag: + case require_tags.dataViewTag: + case require_tags.booleanTag: + case require_tags.dateTag: + case require_tags.float32ArrayTag: + case require_tags.float64ArrayTag: + case require_tags.int8ArrayTag: + case require_tags.int16ArrayTag: + case require_tags.int32ArrayTag: + case require_tags.mapTag: + case require_tags.numberTag: + case require_tags.objectTag: + case require_tags.regexpTag: + case require_tags.setTag: + case require_tags.stringTag: + case require_tags.symbolTag: + case require_tags.uint8ArrayTag: + case require_tags.uint8ClampedArrayTag: + case require_tags.uint16ArrayTag: + case require_tags.uint32ArrayTag: return true; + default: return false; + } +} +function copyOwnProperties(target, source) { + for (const key in source) if (Object.hasOwn(source, key)) target[key] = source[key]; +} +function copySymbolProperties(target, source) { + const symbols = Object.getOwnPropertySymbols(source); + for (let i = 0; i < symbols.length; i++) { + const symbol = symbols[i]; + if (Object.prototype.propertyIsEnumerable.call(source, symbol)) target[symbol] = source[symbol]; + } +} +function cloneStringObjectProperties(target, source) { + const stringLength = source.valueOf().length; + for (const key in source) if (Object.hasOwn(source, key) && (Number.isNaN(Number(key)) || Number(key) >= stringLength)) target[key] = source[key]; +} +function copyPrototype(target, source) { + const proto = Object.getPrototypeOf(source); + if (proto !== null) { + if (typeof source.constructor === "function") Object.setPrototypeOf(target, proto); + } +} +//#endregion +exports.clone = clone; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/clone.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/clone.mjs new file mode 100644 index 0000000000000000000000000000000000000000..0d13a65fd451df2d8f8ab411005ce52c8a660b8f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/clone.mjs @@ -0,0 +1,156 @@ +import { isPrimitive } from "../../predicate/isPrimitive.mjs"; +import { getTag } from "../_internal/getTag.mjs"; +import { argumentsTag, arrayBufferTag, arrayTag, booleanTag, dataViewTag, dateTag, float32ArrayTag, float64ArrayTag, int16ArrayTag, int32ArrayTag, int8ArrayTag, mapTag, numberTag, objectTag, regexpTag, setTag, stringTag, symbolTag, uint16ArrayTag, uint32ArrayTag, uint8ArrayTag, uint8ClampedArrayTag } from "../_internal/tags.mjs"; +import { isArray } from "../predicate/isArray.mjs"; +import { isTypedArray } from "../predicate/isTypedArray.mjs"; +//#region src/compat/object/clone.ts +/** +* Creates a shallow clone of the given object. +* +* @template T - The type of the object. +* @param obj - The object to clone. +* @returns A shallow clone of the given object. +* +* @example +* // Clone a primitive object +* const num = 29; +* const clonedNum = clone(num); +* console.log(clonedNum); // 29 +* console.log(clonedNum === num); // true +* +* @example +* // Clone an array +* const arr = [1, 2, 3]; +* const clonedArr = clone(arr); +* console.log(clonedArr); // [1, 2, 3] +* console.log(clonedArr === arr); // false +* +* @example +* // Clone an object +* const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] }; +* const clonedObj = clone(obj); +* console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] } +* console.log(clonedObj === obj); // false +*/ +function clone(obj) { + if (isPrimitive(obj)) return obj; + const tag = getTag(obj); + if (!isCloneableObject(obj)) return {}; + if (isArray(obj)) { + const result = Array.from(obj); + if (obj.length > 0 && typeof obj[0] === "string" && Object.hasOwn(obj, "index")) { + result.index = obj.index; + result.input = obj.input; + } + return result; + } + if (isTypedArray(obj)) { + const typedArray = obj; + const Ctor = typedArray.constructor; + return new Ctor(typedArray.buffer, typedArray.byteOffset, typedArray.length); + } + if (tag === "[object ArrayBuffer]") return new ArrayBuffer(obj.byteLength); + if (tag === "[object DataView]") { + const dataView = obj; + const buffer = dataView.buffer; + const byteOffset = dataView.byteOffset; + const byteLength = dataView.byteLength; + const clonedBuffer = new ArrayBuffer(byteLength); + const srcView = new Uint8Array(buffer, byteOffset, byteLength); + new Uint8Array(clonedBuffer).set(srcView); + return new DataView(clonedBuffer); + } + if (tag === "[object Boolean]" || tag === "[object Number]" || tag === "[object String]") { + const Ctor = obj.constructor; + const clone = new Ctor(obj.valueOf()); + if (tag === "[object String]") cloneStringObjectProperties(clone, obj); + else copyOwnProperties(clone, obj); + return clone; + } + if (tag === "[object Date]") return new Date(Number(obj)); + if (tag === "[object RegExp]") { + const regExp = obj; + const clone = new RegExp(regExp.source, regExp.flags); + clone.lastIndex = regExp.lastIndex; + return clone; + } + if (tag === "[object Symbol]") return Object(Symbol.prototype.valueOf.call(obj)); + if (tag === "[object Map]") { + const map = obj; + const result = /* @__PURE__ */ new Map(); + map.forEach((obj, key) => { + result.set(key, obj); + }); + return result; + } + if (tag === "[object Set]") { + const set = obj; + const result = /* @__PURE__ */ new Set(); + set.forEach((obj) => { + result.add(obj); + }); + return result; + } + if (tag === "[object Arguments]") { + const args = obj; + const result = {}; + copyOwnProperties(result, args); + result.length = args.length; + result[Symbol.iterator] = args[Symbol.iterator]; + return result; + } + const result = {}; + copyPrototype(result, obj); + copyOwnProperties(result, obj); + copySymbolProperties(result, obj); + return result; +} +function isCloneableObject(object) { + switch (getTag(object)) { + case argumentsTag: + case arrayTag: + case arrayBufferTag: + case dataViewTag: + case booleanTag: + case dateTag: + case float32ArrayTag: + case float64ArrayTag: + case int8ArrayTag: + case int16ArrayTag: + case int32ArrayTag: + case mapTag: + case numberTag: + case objectTag: + case regexpTag: + case setTag: + case stringTag: + case symbolTag: + case uint8ArrayTag: + case uint8ClampedArrayTag: + case uint16ArrayTag: + case uint32ArrayTag: return true; + default: return false; + } +} +function copyOwnProperties(target, source) { + for (const key in source) if (Object.hasOwn(source, key)) target[key] = source[key]; +} +function copySymbolProperties(target, source) { + const symbols = Object.getOwnPropertySymbols(source); + for (let i = 0; i < symbols.length; i++) { + const symbol = symbols[i]; + if (Object.prototype.propertyIsEnumerable.call(source, symbol)) target[symbol] = source[symbol]; + } +} +function cloneStringObjectProperties(target, source) { + const stringLength = source.valueOf().length; + for (const key in source) if (Object.hasOwn(source, key) && (Number.isNaN(Number(key)) || Number(key) >= stringLength)) target[key] = source[key]; +} +function copyPrototype(target, source) { + const proto = Object.getPrototypeOf(source); + if (proto !== null) { + if (typeof source.constructor === "function") Object.setPrototypeOf(target, proto); + } +} +//#endregion +export { clone }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/cloneDeep.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/cloneDeep.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..fd484a2a349ce505d15db66c014d1eda62f3ecb9 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/cloneDeep.d.ts @@ -0,0 +1,50 @@ +//#region src/compat/object/cloneDeep.d.ts +/** + * Creates a deep clone of the given object. + * + * @template T - The type of the object. + * @param obj - The object to clone. + * @returns A deep clone of the given object. + * + * @example + * // Clone a primitive value + * const num = 29; + * const clonedNum = clone(num); + * console.log(clonedNum); // 29 + * console.log(clonedNum === num); // true + * + * @example + * // Clone an array + * const arr = [1, 2, 3]; + * const clonedArr = cloneDeep(arr); + * console.log(clonedArr); // [1, 2, 3] + * console.log(clonedArr === arr); // false + * + * @example + * // Clone an array with nested objects + * const arr = [1, { a: 1 }, [1, 2, 3]]; + * const clonedArr = cloneDeep(arr); + * arr[1].a = 2; + * console.log(arr); // [1, { a: 2 }, [1, 2, 3]] + * console.log(clonedArr); // [1, { a: 1 }, [1, 2, 3]] + * console.log(clonedArr === arr); // false + * + * @example + * // Clone an object + * const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] }; + * const clonedObj = cloneDeep(obj); + * console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] } + * console.log(clonedObj === obj); // false + * + * @example + * // Clone an object with nested objects + * const obj = { a: 1, b: { c: 1 } }; + * const clonedObj = cloneDeep(obj); + * obj.b.c = 2; + * console.log(obj); // { a: 1, b: { c: 2 } } + * console.log(clonedObj); // { a: 1, b: { c: 1 } } + * console.log(clonedObj === obj); // false + */ +declare function cloneDeep(obj: T): T; +//#endregion +export { cloneDeep }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/cloneDeep.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/cloneDeep.js new file mode 100644 index 0000000000000000000000000000000000000000..b95caec22ffbee9ddd4461c1654caeb06f698a12 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/cloneDeep.js @@ -0,0 +1,53 @@ +const require_cloneDeepWith = require("./cloneDeepWith.js"); +//#region src/compat/object/cloneDeep.ts +/** +* Creates a deep clone of the given object. +* +* @template T - The type of the object. +* @param obj - The object to clone. +* @returns A deep clone of the given object. +* +* @example +* // Clone a primitive value +* const num = 29; +* const clonedNum = clone(num); +* console.log(clonedNum); // 29 +* console.log(clonedNum === num); // true +* +* @example +* // Clone an array +* const arr = [1, 2, 3]; +* const clonedArr = cloneDeep(arr); +* console.log(clonedArr); // [1, 2, 3] +* console.log(clonedArr === arr); // false +* +* @example +* // Clone an array with nested objects +* const arr = [1, { a: 1 }, [1, 2, 3]]; +* const clonedArr = cloneDeep(arr); +* arr[1].a = 2; +* console.log(arr); // [1, { a: 2 }, [1, 2, 3]] +* console.log(clonedArr); // [1, { a: 1 }, [1, 2, 3]] +* console.log(clonedArr === arr); // false +* +* @example +* // Clone an object +* const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] }; +* const clonedObj = cloneDeep(obj); +* console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] } +* console.log(clonedObj === obj); // false +* +* @example +* // Clone an object with nested objects +* const obj = { a: 1, b: { c: 1 } }; +* const clonedObj = cloneDeep(obj); +* obj.b.c = 2; +* console.log(obj); // { a: 1, b: { c: 2 } } +* console.log(clonedObj); // { a: 1, b: { c: 1 } } +* console.log(clonedObj === obj); // false +*/ +function cloneDeep(obj) { + return require_cloneDeepWith.cloneDeepWith(obj); +} +//#endregion +exports.cloneDeep = cloneDeep; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.mjs new file mode 100644 index 0000000000000000000000000000000000000000..3b453f8ea43c5198ba839be984ff93ce04c0af8c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.mjs @@ -0,0 +1,73 @@ +import { getTag } from "../_internal/getTag.mjs"; +import { argumentsTag, booleanTag, numberTag, stringTag } from "../_internal/tags.mjs"; +import { cloneDeepWith as cloneDeepWith$1, copyProperties } from "../../object/cloneDeepWith.mjs"; +//#region src/compat/object/cloneDeepWith.ts +/** +* Creates a deep clone of the given object using a customizer function. +* +* @template T - The type of the object. +* @param obj - The object to clone. +* @param [cloneValue] - A function to customize the cloning process. +* @returns A deep clone of the given object. +* +* @example +* // Clone a primitive value +* const num = 29; +* const clonedNum = cloneDeepWith(num); +* console.log(clonedNum); // 29 +* console.log(clonedNum === num); // true +* +* @example +* // Clone an object with a customizer +* const obj = { a: 1, b: 2 }; +* const clonedObj = cloneDeepWith(obj, (value) => { +* if (typeof value === 'number') { +* return value * 2; // Double the number +* } +* }); +* console.log(clonedObj); // { a: 2, b: 4 } +* console.log(clonedObj === obj); // false +* +* @example +* // Clone an array with a customizer +* const arr = [1, 2, 3]; +* const clonedArr = cloneDeepWith(arr, (value) => { +* if (typeof value === 'number') { +* return value + 1; // Increment each number +* } +* }); +* console.log(clonedArr); // [2, 3, 4] +* console.log(clonedArr === arr); // false +*/ +function cloneDeepWith(obj, customizer) { + return cloneDeepWith$1(obj, (value, key, object, stack) => { + const cloned = customizer?.(value, key, object, stack); + if (cloned !== void 0) return cloned; + if (typeof obj !== "object") return; + if (getTag(obj) === "[object Object]" && typeof obj.constructor !== "function") { + const result = {}; + stack.set(obj, result); + copyProperties(result, obj, object, stack); + return result; + } + switch (Object.prototype.toString.call(obj)) { + case numberTag: + case stringTag: + case booleanTag: { + const result = new obj.constructor(obj?.valueOf()); + copyProperties(result, obj); + return result; + } + case argumentsTag: { + const result = {}; + copyProperties(result, obj); + result.length = obj.length; + result[Symbol.iterator] = obj[Symbol.iterator]; + return result; + } + default: return; + } + }); +} +//#endregion +export { cloneDeepWith }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/create.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/create.mjs new file mode 100644 index 0000000000000000000000000000000000000000..436f8537cd7afd576a5082b5d6759a27692290ae --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/create.mjs @@ -0,0 +1,31 @@ +import { isObject } from "../predicate/isObject.mjs"; +import { keys } from "./keys.mjs"; +import { assignValue } from "../_internal/assignValue.mjs"; +//#region src/compat/object/create.ts +/** +* Creates an object that inherits from the prototype object. +* +* If `properties` are provided, they will be added to the new object. +* Only string-keyed enumerable properties directly owned by the `properties` object are copied. +* Inherited properties or those with `Symbol` keys are not copied. +* +* @template T - The prototype object type. +* @template U - The properties object type. +* @param prototype - The object to inherit from. +* @param properties - The properties to assign to the created object. +* @returns The new object. +*/ +function create(prototype, properties) { + const proto = isObject(prototype) ? Object.create(prototype) : {}; + if (properties != null) { + const propsKeys = keys(properties); + for (let i = 0; i < propsKeys.length; i++) { + const key = propsKeys[i]; + const propsValue = properties[key]; + assignValue(proto, key, propsValue); + } + } + return proto; +} +//#endregion +export { create }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/defaults.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/defaults.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..e2ba1d408bf497aa278d2feb717623000653bb81 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/defaults.d.mts @@ -0,0 +1,101 @@ +//#region src/compat/object/defaults.d.ts +/** + * Assigns default values to an `object`, ensuring that certain properties do not remain `undefined`. + * It sets default values for properties that are either `undefined` or inherited from `Object.prototype`. + * + * @template T - The type of the object being processed. + * @template S - The type of the object that provides default values. + * @param object - The target object that will receive default values. + * @param source - The object that specifies the default values to apply. + * @returns The `object` that has been updated with default values from `source`. + * + * @example + * defaults({ a: 1 }, { b: 2 }); // { a: 1, b: 2 } + * defaults({ a: undefined }, { a: 1 }); // { a: 1 } + */ +declare function defaults(object: T, source: S): NonNullable; +/** + * Assigns default values to an `object`, ensuring that certain properties do not remain `undefined`. + * It sets default values for properties that are either `undefined` or inherited from `Object.prototype`. + * + * @template T - The type of the object being processed. + * @template S1 - The type of the first object that provides default values. + * @template S2 - The type of the second object that provides default values. + * @param object - The target object that will receive default values. + * @param source1 - The first object that specifies the default values to apply. + * @param source2 - The second object that specifies the default values to apply. + * @returns The `object` that has been updated with default values from `source1` and `source2`. + * + * @example + * defaults({ a: 1 }, { b: 2 }, { c: 3 }); // { a: 1, b: 2, c: 3 } + * defaults({ a: undefined }, { a: 1 }, { b: 2 }); // { a: 1, b: 2 } + */ +declare function defaults(object: T, source1: S1, source2: S2): NonNullable; +/** + * Assigns default values to an `object`, ensuring that certain properties do not remain `undefined`. + * It sets default values for properties that are either `undefined` or inherited from `Object.prototype`. + * + * @template T - The type of the object being processed. + * @template S1 - The type of the first object that provides default values. + * @template S2 - The type of the second object that provides default values. + * @template S3 - The type of the third object that provides default values. + * @param object - The target object that will receive default values. + * @param source1 - The first object that specifies the default values to apply. + * @param source2 - The second object that specifies the default values to apply. + * @param source3 - The third object that specifies the default values to apply. + * @returns The `object` that has been updated with default values from `source1`, `source2`, and `source3`. + * + * @example + * defaults({ a: 1 }, { b: 2 }, { c: 3 }, { d: 4 }); // { a: 1, b: 2, c: 3, d: 4 } + * defaults({ a: undefined }, { a: 1 }, { b: 2 }, { c: 3 }); // { a: 1, b: 2, c: 3 } + */ +declare function defaults(object: T, source1: S1, source2: S2, source3: S3): NonNullable; +/** + * Assigns default values to an `object`, ensuring that certain properties do not remain `undefined`. + * It sets default values for properties that are either `undefined` or inherited from `Object.prototype`. + * + * @template T - The type of the object being processed. + * @template S1 - The type of the first object that provides default values. + * @template S2 - The type of the second object that provides default values. + * @template S3 - The type of the third object that provides default values. + * @template S4 - The type of the fourth object that provides default values. + * @param object - The target object that will receive default values. + * @param source1 - The first object that specifies the default values to apply. + * @param source2 - The second object that specifies the default values to apply. + * @param source3 - The third object that specifies the default values to apply. + * @param source4 - The fourth object that specifies the default values to apply. + * @returns The `object` that has been updated with default values from `source1`, `source2`, `source3`, and `source4`. + * + * @example + * defaults({ a: 1 }, { b: 2 }, { c: 3 }, { d: 4 }, { e: 5 }); // { a: 1, b: 2, c: 3, d: 4, e: 5 } + * defaults({ a: undefined }, { a: 1 }, { b: 2 }, { c: 3 }, { d: 4 }); // { a: 1, b: 2, c: 3, d: 4 } + */ +declare function defaults(object: T, source1: S1, source2: S2, source3: S3, source4: S4): NonNullable; +/** + * Assigns default values to an `object`, ensuring that certain properties do not remain `undefined`. + * It sets default values for properties that are either `undefined` or inherited from `Object.prototype`. + * + * @template T - The type of the object being processed. + * @param object - The target object that will receive default values. + * @returns The `object` that has been updated with default values. + * + * @example + * defaults({ a: 1 }); // { a: 1 } + * defaults({ a: undefined }); // { a: undefined } + */ +declare function defaults(object: T): NonNullable; +/** + * Assigns default values to an `object`, ensuring that certain properties do not remain `undefined`. + * It sets default values for properties that are either `undefined` or inherited from `Object.prototype`. + * + * @param object - The target object that will receive default values. + * @param sources - The objects that specify the default values to apply. + * @returns The `object` that has been updated with default values from `sources`. + * + * @example + * defaults({}, { a: 1 }, { b: 2 }); // { a: 1, b: 2 } + * defaults({ a: undefined }, { a: 1 }); // { a: 1 } + */ +declare function defaults(object: any, ...sources: any[]): any; +//#endregion +export { defaults }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/defaults.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/defaults.js new file mode 100644 index 0000000000000000000000000000000000000000..87b74a4278e838b05063f7113f5b26d8ddd6d34d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/defaults.js @@ -0,0 +1,46 @@ +const require_eq = require("../util/eq.js"); +const require_isNil = require("../../predicate/isNil.js"); +const require_isIterateeCall = require("../_internal/isIterateeCall.js"); +//#region src/compat/object/defaults.ts +/** +* Assigns default values to an `object`, ensuring that certain properties do not remain `undefined`. +* It sets default values for properties that are either `undefined` or inherited from `Object.prototype`. +* +* You can pass in multiple objects to define these default values, +* and they will be applied in order from left to right. +* Once a property has been assigned a value, any subsequent values for that property will be ignored. +* +* Note: This function modifies the first argument, `object`. If you want to keep `object` unchanged, consider using `toDefaulted` instead. +* +* @template T - The type of the object being processed. +* @template S - The type of the objects that provides default values. +* @param object - The target object that will receive default values. +* @param source - The objects that specifies the default values to apply. +* @returns The `object` that has been updated with default values from `sources`, ensuring that all properties are defined and none are left as `undefined`. +* +* @example +* defaults({ a: 1 }, { a: 2, b: 2 }, { c: 3 }); // { a: 1, b: 2, c: 3 } +* defaults({ a: 1, b: 2 }, { b: 3 }, { c: 3 }); // { a: 1, b: 2, c: 3 } +* defaults({ a: null }, { a: 1 }); // { a: null } +* defaults({ a: undefined }, { a: 1 }); // { a: 1 } +*/ +function defaults(object, ...sources) { + object = Object(object); + const objectProto = Object.prototype; + let length = sources.length; + const guard = length > 2 ? sources[2] : void 0; + if (guard && require_isIterateeCall.isIterateeCall(sources[0], sources[1], guard)) length = 1; + for (let i = 0; i < length; i++) { + if (require_isNil.isNil(sources[i])) continue; + const source = sources[i]; + const keys = Object.keys(source); + for (let j = 0; j < keys.length; j++) { + const key = keys[j]; + const value = object[key]; + if (value === void 0 || !Object.hasOwn(object, key) && require_eq.eq(value, objectProto[key])) object[key] = source[key]; + } + } + return object; +} +//#endregion +exports.defaults = defaults; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/defaultsDeep.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/defaultsDeep.js new file mode 100644 index 0000000000000000000000000000000000000000..1894dcc9e970307d7c1c66fdaff4446a45be1ae9 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/defaultsDeep.js @@ -0,0 +1,70 @@ +const require_isPlainObject = require("../predicate/isPlainObject.js"); +//#region src/compat/object/defaultsDeep.ts +/** +* Recursively assigns default values to an `object`, ensuring that certain properties do not remain `undefined`. +* It sets default values for properties that are either `undefined` or inherited from `Object.prototype`. +* +* Similar to `defaults` but recursively applies default values to nested objects. +* Source objects are applied in order from left to right, and once a property has been assigned a value, +* any subsequent values for that property will be ignored. +* +* Note: This function modifies the first argument, `object`. +* +* @template T - The type of the object being processed. +* @param target - The target object that will receive default values. +* @param sources - One or more source objects that specify default values to apply. +* @returns The `object` that has been updated with default values from all sources, recursively merging nested objects. +* +* @example +* defaultsDeep({ a: { b: 2 } }, { a: { b: 3, c: 3 }, d: 4 }); // { a: { b: 2, c: 3 }, d: 4 } +* defaultsDeep({ a: { b: undefined } }, { a: { b: 1 } }); // { a: { b: 1 } } +* defaultsDeep({ a: null }, { a: { b: 1 } }); // { a: null } +*/ +function defaultsDeep(target, ...sources) { + target = Object(target); + for (let i = 0; i < sources.length; i++) { + const source = sources[i]; + if (source != null) defaultsDeepRecursive(target, source, /* @__PURE__ */ new WeakMap()); + } + return target; +} +function defaultsDeepRecursive(target, source, stack) { + for (const key in source) { + const sourceValue = source[key]; + const targetValue = target[key]; + if (targetValue === void 0 || !Object.hasOwn(target, key)) { + target[key] = handleMissingProperty(sourceValue, stack); + continue; + } + if (stack.get(sourceValue) === targetValue) continue; + handleExistingProperty(targetValue, sourceValue, stack); + } +} +function handleMissingProperty(sourceValue, stack) { + if (stack.has(sourceValue)) return stack.get(sourceValue); + if (require_isPlainObject.isPlainObject(sourceValue)) { + const newObj = {}; + stack.set(sourceValue, newObj); + defaultsDeepRecursive(newObj, sourceValue, stack); + return newObj; + } + return sourceValue; +} +function handleExistingProperty(targetValue, sourceValue, stack) { + if (require_isPlainObject.isPlainObject(targetValue) && require_isPlainObject.isPlainObject(sourceValue)) { + stack.set(sourceValue, targetValue); + defaultsDeepRecursive(targetValue, sourceValue, stack); + return; + } + if (Array.isArray(targetValue) && Array.isArray(sourceValue)) { + stack.set(sourceValue, targetValue); + mergeArrays(targetValue, sourceValue, stack); + } +} +function mergeArrays(targetArray, sourceArray, stack) { + const minLength = Math.min(sourceArray.length, targetArray.length); + for (let i = 0; i < minLength; i++) if (require_isPlainObject.isPlainObject(targetArray[i]) && require_isPlainObject.isPlainObject(sourceArray[i])) defaultsDeepRecursive(targetArray[i], sourceArray[i], stack); + for (let i = minLength; i < sourceArray.length; i++) targetArray.push(sourceArray[i]); +} +//#endregion +exports.defaultsDeep = defaultsDeep; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/entries.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/entries.js new file mode 100644 index 0000000000000000000000000000000000000000..d83684b123ab83facf32941e6ed52905243f0e5e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/entries.js @@ -0,0 +1 @@ +require("./toPairs.js"); diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/entriesIn.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/entriesIn.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..ba006563d5b6eff35a96260802c44245fed057fa --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/entriesIn.d.mts @@ -0,0 +1 @@ +import { toPairsIn } from "./toPairsIn.mjs"; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/entriesIn.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/entriesIn.js new file mode 100644 index 0000000000000000000000000000000000000000..ccfafb70420e4321511dfea651c64e61672a8704 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/entriesIn.js @@ -0,0 +1 @@ +require("./toPairsIn.js"); diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/extend.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/extend.mjs new file mode 100644 index 0000000000000000000000000000000000000000..4615ce68d4f231478be8b783e567035119f9f0c1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/extend.mjs @@ -0,0 +1 @@ +import "./assignIn.mjs"; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/extendWith.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/extendWith.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e2647c04444a0afeb09449ea79fd7316a759f7ee --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/extendWith.d.ts @@ -0,0 +1 @@ +import { assignInWith } from "./assignInWith.js"; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/findLastKey.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/findLastKey.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..21cfd4ffa95d9e00374fc990a747e2fdc8505684 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/findLastKey.d.mts @@ -0,0 +1,18 @@ +import { ObjectIteratee } from "../_internal/ObjectIteratee.mjs"; + +//#region src/compat/object/findLastKey.d.ts +/** + * Finds the key of the last element that matches the given predicate. + * + * This function determines the type of the predicate and delegates the search + * to the appropriate helper function. It supports predicates as functions, objects, + * arrays, or strings. + * + * @template T - The type of the object. + * @param obj - The object to inspect. + * @param predicate - The predicate to match. + * @returns Returns the key of the matched element, else `undefined`. + */ +declare function findLastKey(obj: T | null | undefined, predicate?: ObjectIteratee): string | undefined; +//#endregion +export { findLastKey }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/findLastKey.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/findLastKey.js new file mode 100644 index 0000000000000000000000000000000000000000..4268d1ee5b3d6558216938b3590816df9ede9daf --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/findLastKey.js @@ -0,0 +1,23 @@ +const require_isObject = require("../predicate/isObject.js"); +const require_iteratee = require("../util/iteratee.js"); +const require_identity = require("../function/identity.js"); +//#region src/compat/object/findLastKey.ts +/** +* Finds the key of the last element that matches the given predicate. +* +* This function determines the type of the predicate and delegates the search +* to the appropriate helper function. It supports predicates as functions, objects, +* arrays, or strings. +* +* @template T - The type of the object. +* @param obj - The object to inspect. +* @param predicate - The predicate to match. +* @returns Returns the key of the matched element, else `undefined`. +*/ +function findLastKey(obj, predicate) { + if (!require_isObject.isObject(obj)) return; + const iteratee$1 = require_iteratee.iteratee(predicate ?? require_identity.identity); + return Object.keys(obj).findLast((key) => iteratee$1(obj[key], key, obj)); +} +//#endregion +exports.findLastKey = findLastKey; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/forIn.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/forIn.js new file mode 100644 index 0000000000000000000000000000000000000000..caced35e0d86470fcc017d4ab3613b904894b758 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/forIn.js @@ -0,0 +1,36 @@ +const require_identity = require("../../function/identity.js"); +//#region src/compat/object/forIn.ts +/** +* Iterates over an object and invokes the `iteratee` function for each property. +* +* Iterates over string keyed properties including inherited properties. +* +* The iteration is terminated early if the `iteratee` function returns `false`. +* +* @template T - The type of the object +* @param object - The object to iterate over +* @param iteratee - The function invoked per iteration +* @returns Returns the object +* +* @example +* // Iterate over all properties including inherited ones +* const obj = { a: 1, b: 2 }; +* forIn(obj, (value, key) => { +* console.log(key, value); +* }); +* // Output: 'a' 1, 'b' 2 +* +* // Early termination +* forIn(obj, (value, key) => { +* console.log(key, value); +* return key !== 'a'; // stop after 'a' +* }); +* // Output: 'a' 1 +*/ +function forIn(object, iteratee = require_identity.identity) { + if (object == null) return object; + for (const key in object) if (iteratee(object[key], key, object) === false) break; + return object; +} +//#endregion +exports.forIn = forIn; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/forInRight.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/forInRight.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..43c401cf1cba7706329a39dbe1e80701e2e3155c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/forInRight.d.mts @@ -0,0 +1,59 @@ +//#region src/compat/object/forInRight.d.ts +/** + * Iterates over an object in reverse order and invokes the `iteratee` function for each property. + * + * Iterates over string keyed properties including inherited properties in reverse order. + * + * The iteration is terminated early if the `iteratee` function returns `false`. + * + * @template T - The type of the object + * @param object - The object to iterate over + * @param iteratee - The function invoked per iteration + * @returns Returns the object + * + * @example + * // Iterate over all properties including inherited ones + * const obj = { a: 1, b: 2 }; + * forInRight(obj, (value, key) => { + * console.log(key, value); + * }); + * // Output: 'b' 2, 'a' 1 + * + * // Early termination + * forInRight(obj, (value, key) => { + * console.log(key, value); + * return key !== 'a'; // stop after 'a' + * }); + * // Output: 'b' 2 + */ +declare function forInRight(object: T, iteratee?: (value: T[keyof T], key: string, collection: T) => any): T; +/** + * Iterates over an object in reverse order and invokes the `iteratee` function for each property. + * + * Iterates over string keyed properties including inherited properties in reverse order. + * + * The iteration is terminated early if the `iteratee` function returns `false`. + * + * @template T - The type of the object + * @param object - The object to iterate over + * @param iteratee - The function invoked per iteration + * @returns Returns the object + * + * @example + * // Iterate over all properties including inherited ones + * const obj = { a: 1, b: 2 }; + * forInRight(obj, (value, key) => { + * console.log(key, value); + * }); + * // Output: 'b' 2, 'a' 1 + * + * // Early termination + * forInRight(obj, (value, key) => { + * console.log(key, value); + * return key !== 'a'; // stop after 'a' + * }); + * // Output: 'b' 2 + */ +declare function forInRight(object: T | null | undefined, iteratee?: (value: T[keyof T], key: string, collection: T) => any): T | null | undefined; +//#endregion +export { forInRight }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/forInRight.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/forInRight.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..43c401cf1cba7706329a39dbe1e80701e2e3155c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/forInRight.d.ts @@ -0,0 +1,59 @@ +//#region src/compat/object/forInRight.d.ts +/** + * Iterates over an object in reverse order and invokes the `iteratee` function for each property. + * + * Iterates over string keyed properties including inherited properties in reverse order. + * + * The iteration is terminated early if the `iteratee` function returns `false`. + * + * @template T - The type of the object + * @param object - The object to iterate over + * @param iteratee - The function invoked per iteration + * @returns Returns the object + * + * @example + * // Iterate over all properties including inherited ones + * const obj = { a: 1, b: 2 }; + * forInRight(obj, (value, key) => { + * console.log(key, value); + * }); + * // Output: 'b' 2, 'a' 1 + * + * // Early termination + * forInRight(obj, (value, key) => { + * console.log(key, value); + * return key !== 'a'; // stop after 'a' + * }); + * // Output: 'b' 2 + */ +declare function forInRight(object: T, iteratee?: (value: T[keyof T], key: string, collection: T) => any): T; +/** + * Iterates over an object in reverse order and invokes the `iteratee` function for each property. + * + * Iterates over string keyed properties including inherited properties in reverse order. + * + * The iteration is terminated early if the `iteratee` function returns `false`. + * + * @template T - The type of the object + * @param object - The object to iterate over + * @param iteratee - The function invoked per iteration + * @returns Returns the object + * + * @example + * // Iterate over all properties including inherited ones + * const obj = { a: 1, b: 2 }; + * forInRight(obj, (value, key) => { + * console.log(key, value); + * }); + * // Output: 'b' 2, 'a' 1 + * + * // Early termination + * forInRight(obj, (value, key) => { + * console.log(key, value); + * return key !== 'a'; // stop after 'a' + * }); + * // Output: 'b' 2 + */ +declare function forInRight(object: T | null | undefined, iteratee?: (value: T[keyof T], key: string, collection: T) => any): T | null | undefined; +//#endregion +export { forInRight }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/forInRight.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/forInRight.js new file mode 100644 index 0000000000000000000000000000000000000000..dbeb757f9e58624e80882095a219d528973188a4 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/forInRight.js @@ -0,0 +1,41 @@ +const require_identity = require("../../function/identity.js"); +//#region src/compat/object/forInRight.ts +/** +* Iterates over an object in reverse order and invokes the `iteratee` function for each property. +* +* Iterates over string keyed properties including inherited properties in reverse order. +* +* The iteration is terminated early if the `iteratee` function returns `false`. +* +* @template T - The type of the object +* @param object - The object to iterate over +* @param iteratee - The function invoked per iteration +* @returns Returns the object +* +* @example +* // Iterate over all properties including inherited ones +* const obj = { a: 1, b: 2 }; +* forInRight(obj, (value, key) => { +* console.log(key, value); +* }); +* // Output: 'b' 2, 'a' 1 +* +* // Early termination +* forInRight(obj, (value, key) => { +* console.log(key, value); +* return key !== 'a'; // stop after 'a' +* }); +* // Output: 'b' 2 +*/ +function forInRight(object, iteratee = require_identity.identity) { + if (object == null) return object; + const keys = []; + for (const key in object) keys.push(key); + for (let i = keys.length - 1; i >= 0; i--) { + const key = keys[i]; + if (iteratee(object[key], key, object) === false) break; + } + return object; +} +//#endregion +exports.forInRight = forInRight; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/forOwnRight.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/forOwnRight.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..dd98d247b5cd7c05c1d61e7e13eefe5ae42fb35e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/forOwnRight.d.ts @@ -0,0 +1,55 @@ +//#region src/compat/object/forOwnRight.d.ts +/** + * Iterates over an object's properties in reverse order and calls the `iteratee` function for each property. + * + * It only iterates over the object's own properties, not including inherited properties or properties with `Symbol` keys. + * + * The `iteratee` function can terminate the iteration early by returning `false`. + * + * @template T - The type of the object. + * @param object The object to iterate over. + * @param [iteratee=identity] The function invoked per iteration. If not provided, the identity function will be used. + * @return {T} Returns object. + * + * @example + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * forOwnRight(new Foo(), function(value, key) { + * console.log(key); + * }); + * // => Logs 'b' then 'a' (iteration order is not guaranteed). + */ +declare function forOwnRight(object: T, iteratee?: (value: T[keyof T], key: string, collection: T) => any): T; +/** + * Iterates over an object's properties in reverse order and calls the `iteratee` function for each property. + * + * It only iterates over the object's own properties, not including inherited properties or properties with `Symbol` keys. + * + * The `iteratee` function can terminate the iteration early by returning `false`. + * + * @template T - The type of the object. + * @param object The object to iterate over. + * @param [iteratee=identity] The function invoked per iteration. If not provided, the identity function will be used. + * @return {T | null | undefined} Returns object. + * + * @example + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * forOwnRight(new Foo(), function(value, key) { + * console.log(key); + * }); + * // => Logs 'b' then 'a' (iteration order is not guaranteed). + */ +declare function forOwnRight(object: T | null | undefined, iteratee?: (value: T[keyof T], key: string, collection: T) => any): T | null | undefined; +//#endregion +export { forOwnRight }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/forOwnRight.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/forOwnRight.mjs new file mode 100644 index 0000000000000000000000000000000000000000..9944aeff38522556d09029099e4f84173a686e68 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/forOwnRight.mjs @@ -0,0 +1,40 @@ +import { identity } from "../../function/identity.mjs"; +import { keys } from "./keys.mjs"; +//#region src/compat/object/forOwnRight.ts +/** +* Iterates over an object's properties in reverse order and calls the `iteratee` function for each property. +* +* It only iterates over the object's own properties, not including inherited properties or properties with `Symbol` keys. +* +* The `iteratee` function can terminate the iteration early by returning `false`. +* +* @template T - The type of the object. +* @param object The object to iterate over. +* @param [iteratee=identity] The function invoked per iteration. If not provided, the identity function will be used. +* @return {T | null | undefined} Returns object. +* +* @example +* function Foo() { +* this.a = 1; +* this.b = 2; +* } +* +* Foo.prototype.c = 3; +* +* forOwnRight(new Foo(), function(value, key) { +* console.log(key); +* }); +* // => Logs 'b' then 'a' (iteration order is not guaranteed). +*/ +function forOwnRight(object, iteratee = identity) { + if (object == null) return object; + const iterable = Object(object); + const keys$1 = keys(object); + for (let i = keys$1.length - 1; i >= 0; --i) { + const key = keys$1[i]; + if (iteratee(iterable[key], key, iterable) === false) break; + } + return object; +} +//#endregion +export { forOwnRight }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/fromPairs.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/fromPairs.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..4f499cef3021353ebc2017ea01044d59d483a714 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/fromPairs.d.mts @@ -0,0 +1,29 @@ +//#region src/compat/object/fromPairs.d.ts +type PropertyName = string | number | symbol; +/** + * Converts an array of key-value pairs into an object. + * + * @template T - The type of the values. + * @param pairs - An array of key-value pairs. + * @returns An object where keys are strings and values are of type T. + * + * @example + * const pairs = [['a', 1], ['b', 2]]; + * const result = fromPairs(pairs); + * // => { a: 1, b: 2 } + */ +declare function fromPairs(pairs: ArrayLike<[PropertyName, T]> | null | undefined): Record; +/** + * Converts an array of key-value pairs into an object. + * + * @param pairs - An array of key-value pairs. + * @returns An object where keys are strings and values can be any type. + * + * @example + * const pairs = [['a', 1], ['b', 'hello']]; + * const result = fromPairs(pairs); + * // => { a: 1, b: 'hello' } + */ +declare function fromPairs(pairs: ArrayLike | null | undefined): Record; +//#endregion +export { fromPairs }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/functions.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/functions.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9267e237fc5b765e19a315aff840d990a67c65ca --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/functions.d.ts @@ -0,0 +1,21 @@ +//#region src/compat/object/functions.d.ts +/** + * Creates an array of property names from an object where the property values are functions. + * + * @param object - The object to inspect. + * @returns An array of function property names. + * + * @example + * function Foo() { + * this.a = () => 'a'; + * this.b = () => 'b'; + * } + * + * Foo.prototype.c = () => 'c'; + * + * functions(new Foo); + * // => ['a', 'b'] + */ +declare function functions(object: any): string[]; +//#endregion +export { functions }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/functionsIn.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/functionsIn.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ea7da91da0f09ae4eca71b01c6551e0f885e6186 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/functionsIn.d.ts @@ -0,0 +1,21 @@ +//#region src/compat/object/functionsIn.d.ts +/** + * Returns an array of property names whose values are functions, including inherited properties. + * + * @param object The object to inspect. + * @returns Returns the function names. + * @example + * + * function Foo() { + * this.a = function() { return 'a'; }; + * this.b = function() { return 'b'; }; + * } + * + * Foo.prototype.c = function() { return 'c'; }; + * + * functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ +declare function functionsIn(object: any): string[]; +//#endregion +export { functionsIn }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/functionsIn.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/functionsIn.mjs new file mode 100644 index 0000000000000000000000000000000000000000..70d3f6434b3b9424121397ed44ba4c8009c33b4c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/functionsIn.mjs @@ -0,0 +1,27 @@ +import { isFunction } from "../../predicate/isFunction.mjs"; +//#region src/compat/object/functionsIn.ts +/** +* Returns an array of property names whose values are functions, including inherited properties. +* +* @param object The object to inspect. +* @returns Returns the function names. +* @example +* +* function Foo() { +* this.a = function() { return 'a'; }; +* this.b = function() { return 'b'; }; +* } +* +* Foo.prototype.c = function() { return 'c'; }; +* +* functionsIn(new Foo); +* // => ['a', 'b', 'c'] +*/ +function functionsIn(object) { + if (object == null) return []; + const result = []; + for (const key in object) if (isFunction(object[key])) result.push(key); + return result; +} +//#endregion +export { functionsIn }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/get.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/get.js new file mode 100644 index 0000000000000000000000000000000000000000..989bee8db5c315b5e35548d2bcc3ccd9fd73b6e2 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/get.js @@ -0,0 +1,65 @@ +const require_isUnsafeProperty = require("../../_internal/isUnsafeProperty.js"); +const require_isDeepKey = require("../_internal/isDeepKey.js"); +const require_toKey = require("../_internal/toKey.js"); +const require_toPath = require("../util/toPath.js"); +//#region src/compat/object/get.ts +/** +* Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead. +* +* @param object - The object to query. +* @param path - The path of the property to get. +* @param [defaultValue] - The value returned if the resolved value is undefined. +* @returns Returns the resolved value. +* +* @example +* const object = { a: { b: { c: 1 } } }; +* get(object, 'a.b.c'); +* // => 1 +* +* get(object, ['a', 'b', 'c']); +* // => 1 +* +* get(object, 'a.b.d', 'default'); +* // => 'default' +*/ +function get(object, path, defaultValue) { + if (object == null) return defaultValue; + switch (typeof path) { + case "string": { + if (require_isUnsafeProperty.isUnsafeProperty(path)) return defaultValue; + const result = object[path]; + if (result === void 0) if (require_isDeepKey.isDeepKey(path) && !Object.hasOwn(object, path)) return get(object, require_toPath.toPath(path), defaultValue); + else return defaultValue; + return result; + } + case "number": + case "symbol": { + if (typeof path === "number") path = require_toKey.toKey(path); + const result = object[path]; + if (result === void 0) return defaultValue; + return result; + } + default: { + if (Array.isArray(path)) return getWithPath(object, path, defaultValue); + if (Object.is(path?.valueOf(), -0)) path = "-0"; + else path = String(path); + if (require_isUnsafeProperty.isUnsafeProperty(path)) return defaultValue; + const result = object[path]; + if (result === void 0) return defaultValue; + return result; + } + } +} +function getWithPath(object, path, defaultValue) { + if (path.length === 0) return defaultValue; + let current = object; + for (let index = 0; index < path.length; index++) { + if (current == null) return defaultValue; + if (require_isUnsafeProperty.isUnsafeProperty(path[index])) return defaultValue; + current = current[path[index]]; + } + if (current === void 0) return defaultValue; + return current; +} +//#endregion +exports.get = get; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/get.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/get.mjs new file mode 100644 index 0000000000000000000000000000000000000000..32f9febfada0a42c12cfbc55ba96bbb7a29adb17 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/get.mjs @@ -0,0 +1,65 @@ +import { isUnsafeProperty } from "../../_internal/isUnsafeProperty.mjs"; +import { isDeepKey } from "../_internal/isDeepKey.mjs"; +import { toKey } from "../_internal/toKey.mjs"; +import { toPath } from "../util/toPath.mjs"; +//#region src/compat/object/get.ts +/** +* Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead. +* +* @param object - The object to query. +* @param path - The path of the property to get. +* @param [defaultValue] - The value returned if the resolved value is undefined. +* @returns Returns the resolved value. +* +* @example +* const object = { a: { b: { c: 1 } } }; +* get(object, 'a.b.c'); +* // => 1 +* +* get(object, ['a', 'b', 'c']); +* // => 1 +* +* get(object, 'a.b.d', 'default'); +* // => 'default' +*/ +function get(object, path, defaultValue) { + if (object == null) return defaultValue; + switch (typeof path) { + case "string": { + if (isUnsafeProperty(path)) return defaultValue; + const result = object[path]; + if (result === void 0) if (isDeepKey(path) && !Object.hasOwn(object, path)) return get(object, toPath(path), defaultValue); + else return defaultValue; + return result; + } + case "number": + case "symbol": { + if (typeof path === "number") path = toKey(path); + const result = object[path]; + if (result === void 0) return defaultValue; + return result; + } + default: { + if (Array.isArray(path)) return getWithPath(object, path, defaultValue); + if (Object.is(path?.valueOf(), -0)) path = "-0"; + else path = String(path); + if (isUnsafeProperty(path)) return defaultValue; + const result = object[path]; + if (result === void 0) return defaultValue; + return result; + } + } +} +function getWithPath(object, path, defaultValue) { + if (path.length === 0) return defaultValue; + let current = object; + for (let index = 0; index < path.length; index++) { + if (current == null) return defaultValue; + if (isUnsafeProperty(path[index])) return defaultValue; + current = current[path[index]]; + } + if (current === void 0) return defaultValue; + return current; +} +//#endregion +export { get }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/has.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/has.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..405556f3d5b38a7706453b801434d558b7a8f4fc --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/has.d.ts @@ -0,0 +1,51 @@ +import { PropertyPath } from "../_internal/PropertyPath.js"; + +//#region src/compat/object/has.d.ts +/** + * Checks if a given path exists within an object. + * + * @template T + * @template K + * @param object - The object to query. + * @param path - The path to check. + * @returns & { [key: symbol]: unknown }} Returns a type guard indicating if the path exists in the object. + * + * @example + * const obj = { a: 1, b: { c: 2 } }; + * + * if (has(obj, 'a')) { + * console.log(obj.a); // TypeScript knows obj.a exists + * } + * + * if (has(obj, 'b')) { + * console.log(obj.b.c); // TypeScript knows obj.b exists + * } + */ +declare function has(object: T, path: K): object is T & { [P in K]: P extends keyof T ? T[P] : Record extends T ? T[keyof T] : unknown } & { + [key: symbol]: unknown; +}; +/** + * Checks if a given path exists within an object. + * + * @template T + * @param object - The object to query. + * @param path - The path to check. This can be a single property key, + * an array of property keys, or a string representing a deep path. + * @returns Returns `true` if the path exists in the object, `false` otherwise. + * + * @example + * const obj = { a: { b: { c: 3 } } }; + * + * has(obj, 'a'); // true + * has(obj, ['a', 'b']); // true + * has(obj, ['a', 'b', 'c']); // true + * has(obj, 'a.b.c'); // true + * has(obj, 'a.b.d'); // false + * has(obj, ['a', 'b', 'c', 'd']); // false + * has([], 0); // false + * has([1, 2, 3], 2); // true + * has([1, 2, 3], 5); // false + */ +declare function has(object: T, path: PropertyPath): boolean; +//#endregion +export { has }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/has.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/has.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c5d699322b2965d018ff5d1833d4dd2e761a3937 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/has.mjs @@ -0,0 +1,53 @@ +import { isDeepKey } from "../_internal/isDeepKey.mjs"; +import { toKey } from "../_internal/toKey.mjs"; +import { toPath } from "../util/toPath.mjs"; +import { isIndex } from "../_internal/isIndex.mjs"; +import { isArguments } from "../predicate/isArguments.mjs"; +//#region src/compat/object/has.ts +/** +* Checks if a given path exists within an object. +* +* You can provide the path as a single property key, an array of property keys, +* or a string representing a deep path. +* +* If the path is an index and the object is an array or an arguments object, the function will verify +* if the index is valid and within the bounds of the array or arguments object, even if the array or +* arguments object is sparse (i.e., not all indexes are defined). +* +* @param object - The object to query. +* @param path - The path to check. This can be a single property key, +* an array of property keys, or a string representing a deep path. +* @returns Returns `true` if the path exists in the object, `false` otherwise. +* +* @example +* +* const obj = { a: { b: { c: 3 } } }; +* +* has(obj, 'a'); // true +* has(obj, ['a', 'b']); // true +* has(obj, ['a', 'b', 'c']); // true +* has(obj, 'a.b.c'); // true +* has(obj, 'a.b.d'); // false +* has(obj, ['a', 'b', 'c', 'd']); // false +* has([], 0); // false +* has([1, 2, 3], 2); // true +* has([1, 2, 3], 5); // false +*/ +function has(object, path) { + let resolvedPath; + if (Array.isArray(path)) resolvedPath = path; + else if (typeof path === "string" && isDeepKey(path) && !(path in Object(object))) resolvedPath = toPath(path); + else resolvedPath = [path]; + if (resolvedPath.length === 0) return false; + let current = object; + for (let i = 0; i < resolvedPath.length; i++) { + const key = toKey(resolvedPath[i]); + if (current == null || !Object.hasOwn(current, key)) { + if (!((Array.isArray(current) || isArguments(current)) && isIndex(key) && Number(key) < current.length)) return false; + } + current = current[key]; + } + return true; +} +//#endregion +export { has }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/hasIn.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/hasIn.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0a2a9dc23beff5146db192b2cdce044f081cb599 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/hasIn.d.ts @@ -0,0 +1,44 @@ +import { PropertyPath } from "../_internal/PropertyPath.js"; + +//#region src/compat/object/hasIn.d.ts +/** + * Checks if a given path exists in an object, **including inherited properties**. + * + * You can provide the path as a single property key, an array of property keys, + * or a string representing a deep path. + * + * Unlike `has`, which only checks for own properties, `hasIn` also checks for properties + * in the prototype chain. + * + * If the path is an index and the object is an array or an arguments object, the function will verify + * if the index is valid and within the bounds of the array or arguments object, even if the array or + * arguments object is sparse (i.e., not all indexes are defined). + * + * @template T + * @param object - The object to query. + * @param path - The path to check. This can be a single property key, + * an array of property keys, or a string representing a deep path. + * @returns Returns `true` if the path exists (own or inherited), `false` otherwise. + * + * @example + * + * const obj = { a: { b: { c: 3 } } }; + * + * hasIn(obj, 'a'); // true + * hasIn(obj, ['a', 'b']); // true + * hasIn(obj, ['a', 'b', 'c']); // true + * hasIn(obj, 'a.b.c'); // true + * hasIn(obj, 'a.b.d'); // false + * hasIn(obj, ['a', 'b', 'c', 'd']); // false + * + * // Example with inherited properties: + * function Rectangle() {} + * Rectangle.prototype.area = function() {}; + * + * const rect = new Rectangle(); + * hasIn(rect, 'area'); // true + * has(rect, 'area'); // false - has only checks own properties + */ +declare function hasIn(object: T, path: PropertyPath): boolean; +//#endregion +export { hasIn }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/hasIn.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/hasIn.mjs new file mode 100644 index 0000000000000000000000000000000000000000..0873c4cdf705983feb04365ca51d46ee514d1924 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/hasIn.mjs @@ -0,0 +1,63 @@ +import { isDeepKey } from "../_internal/isDeepKey.mjs"; +import { toKey } from "../_internal/toKey.mjs"; +import { toPath } from "../util/toPath.mjs"; +import { isIndex } from "../_internal/isIndex.mjs"; +import { isArguments } from "../predicate/isArguments.mjs"; +//#region src/compat/object/hasIn.ts +/** +* Checks if a given path exists in an object, **including inherited properties**. +* +* You can provide the path as a single property key, an array of property keys, +* or a string representing a deep path. +* +* Unlike `has`, which only checks for own properties, `hasIn` also checks for properties +* in the prototype chain. +* +* If the path is an index and the object is an array or an arguments object, the function will verify +* if the index is valid and within the bounds of the array or arguments object, even if the array or +* arguments object is sparse (i.e., not all indexes are defined). +* +* @template T +* @param object - The object to query. +* @param path - The path to check. This can be a single property key, +* an array of property keys, or a string representing a deep path. +* @returns Returns `true` if the path exists (own or inherited), `false` otherwise. +* +* @example +* +* const obj = { a: { b: { c: 3 } } }; +* +* hasIn(obj, 'a'); // true +* hasIn(obj, ['a', 'b']); // true +* hasIn(obj, ['a', 'b', 'c']); // true +* hasIn(obj, 'a.b.c'); // true +* hasIn(obj, 'a.b.d'); // false +* hasIn(obj, ['a', 'b', 'c', 'd']); // false +* +* // Example with inherited properties: +* function Rectangle() {} +* Rectangle.prototype.area = function() {}; +* +* const rect = new Rectangle(); +* hasIn(rect, 'area'); // true +* has(rect, 'area'); // false - has only checks own properties +*/ +function hasIn(object, path) { + if (object == null) return false; + let resolvedPath; + if (Array.isArray(path)) resolvedPath = path; + else if (typeof path === "string" && isDeepKey(path) && !(path in Object(object))) resolvedPath = toPath(path); + else resolvedPath = [path]; + if (resolvedPath.length === 0) return false; + let current = object; + for (let i = 0; i < resolvedPath.length; i++) { + const key = toKey(resolvedPath[i]); + if (current == null || !(key in Object(current))) { + if (!((Array.isArray(current) || isArguments(current)) && isIndex(key) && Number(key) < current.length)) return false; + } + current = current[key]; + } + return true; +} +//#endregion +export { hasIn }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/invertBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/invertBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..948bc6598245ad3d27e223b22f955113cf3f4b05 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/invertBy.mjs @@ -0,0 +1,45 @@ +import { identity } from "../../function/identity.mjs"; +import { isNil } from "../../predicate/isNil.mjs"; +import { iteratee } from "../util/iteratee.mjs"; +//#region src/compat/object/invertBy.ts +/** +* Creates a new object that reverses the keys and values of the given object, similar to the invert. +* +* The `iteratee` function specifies how the values are reversed into keys. If no `iteratee` function is provided, the values are used as keys as-is. +* +* The values of the new object are arrays of keys that correspond to the value returned by the `iteratee` function. +* +* @param object - The object to iterate over. +* @param [iteratee] - Optional. A function that generates a key based on each value in the object. +* If not provided, the function defaults to using the value as a string. +* +* @returns An object where the keys are generated by the iteratee, and the values +* are arrays of property names (keys) from the input object that correspond to those keys. +* +* @example +* const obj = { a: 1, b: 2, c: 1 }; +* const result = invertBy(obj); +* // result => { '1': ['a', 'c'], '2': ['b'] } +* +* @example +* const obj = { a: 1, b: 2, c: 1 }; +* const result = invertBy(obj, value => `group${value}`); +* // result => { 'group1': ['a', 'c'], 'group2': ['b'] } +*/ +function invertBy(object, iteratee$1) { + const result = {}; + if (isNil(object)) return result; + if (iteratee$1 == null) iteratee$1 = identity; + const keys = Object.keys(object); + const getString = iteratee(iteratee$1); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + const value = object[key]; + const valueStr = getString(value); + if (Array.isArray(result[valueStr])) result[valueStr].push(key); + else result[valueStr] = [key]; + } + return result; +} +//#endregion +export { invertBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/keys.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/keys.mjs new file mode 100644 index 0000000000000000000000000000000000000000..8e67b016139a75177602988d9e440eb9324cc062 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/keys.mjs @@ -0,0 +1,49 @@ +import { isBuffer } from "../../predicate/isBuffer.mjs"; +import { isArrayLike } from "../predicate/isArrayLike.mjs"; +import { isPrototype } from "../_internal/isPrototype.mjs"; +import { isTypedArray } from "../predicate/isTypedArray.mjs"; +import { times } from "../util/times.mjs"; +//#region src/compat/object/keys.ts +/** +* Creates an array of the own enumerable property names of `object`. +* +* Non-object values are coerced to objects. +* +* @param object The object to query. +* @returns Returns the array of property names. +* @example +* function Foo() { +* this.a = 1; +* this.b = 2; +* } +* Foo.prototype.c = 3; +* keys(new Foo); // ['a', 'b'] (iteration order is not guaranteed) +* +* keys('hi'); // ['0', '1'] +* keys([1, 2, 3]); // ['0', '1', '2'] +* keys({ a: 1, b: 2 }); // ['a', 'b'] +*/ +function keys(object) { + if (isArrayLike(object)) return arrayLikeKeys(object); + const result = Object.keys(Object(object)); + if (!isPrototype(object)) return result; + return result.filter((key) => key !== "constructor"); +} +function arrayLikeKeys(object) { + const indices = times(object.length, (index) => `${index}`); + const filteredKeys = new Set(indices); + if (isBuffer(object)) { + filteredKeys.add("offset"); + filteredKeys.add("parent"); + } + if (isTypedArray(object)) { + filteredKeys.add("buffer"); + filteredKeys.add("byteLength"); + filteredKeys.add("byteOffset"); + } + const inheritedKeys = Object.keys(object).filter((key) => !filteredKeys.has(key)); + if (Array.isArray(object)) return [...indices, ...inheritedKeys]; + return [...indices.filter((index) => Object.hasOwn(object, index)), ...inheritedKeys]; +} +//#endregion +export { keys }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/keysIn.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/keysIn.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6657731254ac6e41b96b5a145c98dda678541902 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/keysIn.d.ts @@ -0,0 +1,27 @@ +//#region src/compat/object/keysIn.d.ts +/** + * This function retrieves the names of string-keyed properties from an object, including those inherited from its prototype. + * + * - If the value is not an object, it is converted to an object. + * - Array-like objects are treated like arrays. + * - Sparse arrays with some missing indices are treated like dense arrays. + * - If the value is `null` or `undefined`, an empty array is returned. + * - When handling prototype objects, the `constructor` property is excluded from the results. + * + * @param [object] - The object to inspect for keys. + * @returns An array of string keys from the object. + * + * @example + * const obj = { a: 1, b: 2 }; + * console.log(keysIn(obj)); // ['a', 'b'] + * + * const arr = [1, 2, 3]; + * console.log(keysIn(arr)); // ['0', '1', '2'] + * + * function Foo() {} + * Foo.prototype.a = 1; + * console.log(keysIn(new Foo())); // ['a'] + */ +declare function keysIn(object?: any): string[]; +//#endregion +export { keysIn }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/mapKeys.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/mapKeys.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..194e5e65129772fb8967252260bb060515d74b51 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/mapKeys.d.ts @@ -0,0 +1,32 @@ +import { ListIteratee } from "../_internal/ListIteratee.js"; +import { ObjectIteratee } from "../_internal/ObjectIteratee.js"; + +//#region src/compat/object/mapKeys.d.ts +/** + * Creates an object with the same values as `object` and keys generated by running each own enumerable string keyed property through `iteratee`. + * + * @template T + * @param object - The object to iterate over. + * @param [iteratee] - The function invoked per iteration. + * @returns Returns the new mapped object. + * + * @example + * mapKeys([1, 2, 3], (value, index) => `key${index}`); + * // => { 'key0': 1, 'key1': 2, 'key2': 3 } + */ +declare function mapKeys(object: ArrayLike | null | undefined, iteratee?: ListIteratee): Record; +/** + * Creates an object with the same values as `object` and keys generated by running each own enumerable string keyed property through `iteratee`. + * + * @template T + * @param object - The object to iterate over. + * @param [iteratee] - The function invoked per iteration. + * @returns Returns the new mapped object. + * + * @example + * mapKeys({ a: 1, b: 2 }, (value, key) => key + value); + * // => { 'a1': 1, 'b2': 2 } + */ +declare function mapKeys(object: T | null | undefined, iteratee?: ObjectIteratee): Record; +//#endregion +export { mapKeys }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/mapKeys.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/mapKeys.mjs new file mode 100644 index 0000000000000000000000000000000000000000..95ca0c1635ed385158a99f2b8ff13566618b74b9 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/mapKeys.mjs @@ -0,0 +1,28 @@ +import { identity } from "../../function/identity.mjs"; +import { mapKeys as mapKeys$1 } from "../../object/mapKeys.mjs"; +import { iteratee } from "../util/iteratee.mjs"; +//#region src/compat/object/mapKeys.ts +/** +* Creates a new object with the same values as the given object, but with keys generated +* by running each own enumerable property of the object through the iteratee function. +* +* @template T - The type of the object. +* @template K1 - The type of the keys in the object. +* @template K2 - The type of the new keys generated by the iteratee function. +* +* @param object - The object to iterate over. +* @param [getNewKey] - The function invoked per own enumerable property, or a path to generate new keys. +* @returns Returns the new mapped object. +* +* @example +* // Example usage: +* const obj = { a: 1, b: 2 }; +* const result = mapKeys(obj, (value, key) => key + value); +* console.log(result); // { a1: 1, b2: 2 } +*/ +function mapKeys(object, getNewKey = identity) { + if (object == null) return {}; + return mapKeys$1(object, iteratee(getNewKey)); +} +//#endregion +export { mapKeys }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/mapValues.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/mapValues.mjs new file mode 100644 index 0000000000000000000000000000000000000000..ac8b254131b5c59b3737effcc95e084c1757dd6d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/mapValues.mjs @@ -0,0 +1,29 @@ +import { identity } from "../../function/identity.mjs"; +import { mapValues as mapValues$1 } from "../../object/mapValues.mjs"; +import { iteratee } from "../util/iteratee.mjs"; +//#region src/compat/object/mapValues.ts +/** +* Creates a new object with the same keys as the given object, but with values generated +* by running each own enumerable property of the object through the iteratee function. +* +* @template T - The type of the object. +* @template K - The type of the keys in the object. +* @template V - The type of the new values generated by the iteratee function. +* +* @param object - The object to iterate over. +* @param [getNewValue] - +* The function invoked per own enumerable property, or a path to generate new values. +* @returns Returns the new mapped object. +* +* @example +* // Example usage: +* const obj = { a: 1, b: 2 }; +* const result = mapValues(obj, (value) => value * 2); +* console.log(result); // { a: 2, b: 4 } +*/ +function mapValues(object, getNewValue = identity) { + if (object == null) return {}; + return mapValues$1(object, iteratee(getNewValue)); +} +//#endregion +export { mapValues }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/merge.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/merge.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..bb16e43d5bd7e3d0946fc00d3c18cd42e2bd12a0 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/merge.d.mts @@ -0,0 +1,85 @@ +//#region src/compat/object/merge.d.ts +/** + * Recursively merges own and inherited enumerable string keyed properties of source objects into the destination object. + * + * @template T + * @template U + * @param object - The destination object. + * @param source - The source object. + * @returns Returns `object`. + * + * @example + * const object = { a: [{ b: 2 }, { d: 4 }] }; + * const other = { a: [{ c: 3 }, { e: 5 }] }; + * merge(object, other); + * // => { a: [{ b: 2, c: 3 }, { d: 4, e: 5 }] } + */ +declare function merge(object: T, source: U): T & U; +/** + * Recursively merges own and inherited enumerable string keyed properties of source objects into the destination object. + * + * @template T + * @template U + * @template V + * @param object - The destination object. + * @param source1 - The first source object. + * @param source2 - The second source object. + * @returns Returns `object`. + * + * @example + * merge({ a: 1 }, { b: 2 }, { c: 3 }); + * // => { a: 1, b: 2, c: 3 } + */ +declare function merge(object: T, source1: U, source2: V): T & U & V; +/** + * Recursively merges own and inherited enumerable string keyed properties of source objects into the destination object. + * + * @template T + * @template U + * @template V + * @template W + * @param object - The destination object. + * @param source1 - The first source object. + * @param source2 - The second source object. + * @param source3 - The third source object. + * @returns Returns `object`. + * + * @example + * merge({ a: 1 }, { b: 2 }, { c: 3 }, { d: 4 }); + * // => { a: 1, b: 2, c: 3, d: 4 } + */ +declare function merge(object: T, source1: U, source2: V, source3: W): T & U & V & W; +/** + * Recursively merges own and inherited enumerable string keyed properties of source objects into the destination object. + * + * @template T + * @template U + * @template V + * @template W + * @template X + * @param object - The destination object. + * @param source1 - The first source object. + * @param source2 - The second source object. + * @param source3 - The third source object. + * @param source4 - The fourth source object. + * @returns Returns `object`. + * + * @example + * merge({ a: 1 }, { b: 2 }, { c: 3 }, { d: 4 }, { e: 5 }); + * // => { a: 1, b: 2, c: 3, d: 4, e: 5 } + */ +declare function merge(object: T, source1: U, source2: V, source3: W, source4: X): T & U & V & W & X; +/** + * Recursively merges own and inherited enumerable string keyed properties of source objects into the destination object. + * + * @param object - The destination object. + * @param otherArgs - The source objects. + * @returns Returns `object`. + * + * @example + * merge({ a: 1 }, { b: 2 }, { c: 3 }); + * // => { a: 1, b: 2, c: 3 } + */ +declare function merge(object: any, ...otherArgs: any[]): any; +//#endregion +export { merge }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/merge.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/merge.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..bb16e43d5bd7e3d0946fc00d3c18cd42e2bd12a0 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/merge.d.ts @@ -0,0 +1,85 @@ +//#region src/compat/object/merge.d.ts +/** + * Recursively merges own and inherited enumerable string keyed properties of source objects into the destination object. + * + * @template T + * @template U + * @param object - The destination object. + * @param source - The source object. + * @returns Returns `object`. + * + * @example + * const object = { a: [{ b: 2 }, { d: 4 }] }; + * const other = { a: [{ c: 3 }, { e: 5 }] }; + * merge(object, other); + * // => { a: [{ b: 2, c: 3 }, { d: 4, e: 5 }] } + */ +declare function merge(object: T, source: U): T & U; +/** + * Recursively merges own and inherited enumerable string keyed properties of source objects into the destination object. + * + * @template T + * @template U + * @template V + * @param object - The destination object. + * @param source1 - The first source object. + * @param source2 - The second source object. + * @returns Returns `object`. + * + * @example + * merge({ a: 1 }, { b: 2 }, { c: 3 }); + * // => { a: 1, b: 2, c: 3 } + */ +declare function merge(object: T, source1: U, source2: V): T & U & V; +/** + * Recursively merges own and inherited enumerable string keyed properties of source objects into the destination object. + * + * @template T + * @template U + * @template V + * @template W + * @param object - The destination object. + * @param source1 - The first source object. + * @param source2 - The second source object. + * @param source3 - The third source object. + * @returns Returns `object`. + * + * @example + * merge({ a: 1 }, { b: 2 }, { c: 3 }, { d: 4 }); + * // => { a: 1, b: 2, c: 3, d: 4 } + */ +declare function merge(object: T, source1: U, source2: V, source3: W): T & U & V & W; +/** + * Recursively merges own and inherited enumerable string keyed properties of source objects into the destination object. + * + * @template T + * @template U + * @template V + * @template W + * @template X + * @param object - The destination object. + * @param source1 - The first source object. + * @param source2 - The second source object. + * @param source3 - The third source object. + * @param source4 - The fourth source object. + * @returns Returns `object`. + * + * @example + * merge({ a: 1 }, { b: 2 }, { c: 3 }, { d: 4 }, { e: 5 }); + * // => { a: 1, b: 2, c: 3, d: 4, e: 5 } + */ +declare function merge(object: T, source1: U, source2: V, source3: W, source4: X): T & U & V & W & X; +/** + * Recursively merges own and inherited enumerable string keyed properties of source objects into the destination object. + * + * @param object - The destination object. + * @param otherArgs - The source objects. + * @returns Returns `object`. + * + * @example + * merge({ a: 1 }, { b: 2 }, { c: 3 }); + * // => { a: 1, b: 2, c: 3 } + */ +declare function merge(object: any, ...otherArgs: any[]): any; +//#endregion +export { merge }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/mergeWith.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/mergeWith.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..b5fb4897fb8c1c2230cd4380c23b94766d47e3ae --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/mergeWith.d.mts @@ -0,0 +1,126 @@ +//#region src/compat/object/mergeWith.d.ts +type MergeWithCustomizer = (objValue: any, srcValue: any, key: string, object: any, source: any, stack: any) => any; +/** + * Merges the properties of a source object into the target object using a customizer function. + * + * @template TObject + * @template TSource + * @param object - The target object into which the source object properties will be merged. + * @param source - The source object whose properties will be merged into the target object. + * @param customizer - The function to customize assigned values. + * @returns Returns the updated target object with properties from the source object merged in. + * + * @example + * const target = { a: 1, b: 2 }; + * const source = { b: 3, c: 4 }; + * + * const result = mergeWith(target, source, (objValue, srcValue) => { + * if (typeof objValue === 'number' && typeof srcValue === 'number') { + * return objValue + srcValue; + * } + * }); + * // => { a: 1, b: 5, c: 4 } + */ +declare function mergeWith(object: TObject, source: TSource, customizer: MergeWithCustomizer): TObject & TSource; +/** + * Merges the properties of two source objects into the target object using a customizer function. + * + * @template TObject + * @template TSource1 + * @template TSource2 + * @param object - The target object into which the source objects properties will be merged. + * @param source1 - The first source object. + * @param source2 - The second source object. + * @param customizer - The function to customize assigned values. + * @returns Returns the updated target object with properties from the source objects merged in. + * + * @example + * const target = { a: 1 }; + * const source1 = { b: 2 }; + * const source2 = { c: 3 }; + * + * const result = mergeWith(target, source1, source2, (objValue, srcValue) => { + * if (typeof objValue === 'number' && typeof srcValue === 'number') { + * return objValue + srcValue; + * } + * }); + * // => { a: 1, b: 2, c: 3 } + */ +declare function mergeWith(object: TObject, source1: TSource1, source2: TSource2, customizer: MergeWithCustomizer): TObject & TSource1 & TSource2; +/** + * Merges the properties of three source objects into the target object using a customizer function. + * + * @template TObject + * @template TSource1 + * @template TSource2 + * @template TSource3 + * @param object - The target object into which the source objects properties will be merged. + * @param source1 - The first source object. + * @param source2 - The second source object. + * @param source3 - The third source object. + * @param customizer - The function to customize assigned values. + * @returns Returns the updated target object with properties from the source objects merged in. + * + * @example + * const target = { a: 1 }; + * const source1 = { b: 2 }; + * const source2 = { c: 3 }; + * const source3 = { d: 4 }; + * + * const result = mergeWith(target, source1, source2, source3, (objValue, srcValue) => { + * if (typeof objValue === 'number' && typeof srcValue === 'number') { + * return objValue + srcValue; + * } + * }); + * // => { a: 1, b: 2, c: 3, d: 4 } + */ +declare function mergeWith(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, customizer: MergeWithCustomizer): TObject & TSource1 & TSource2 & TSource3; +/** + * Merges the properties of four source objects into the target object using a customizer function. + * + * @template TObject + * @template TSource1 + * @template TSource2 + * @template TSource3 + * @template TSource4 + * @param object - The target object into which the source objects properties will be merged. + * @param source1 - The first source object. + * @param source2 - The second source object. + * @param source3 - The third source object. + * @param source4 - The fourth source object. + * @param customizer - The function to customize assigned values. + * @returns Returns the updated target object with properties from the source objects merged in. + * + * @example + * const target = { a: 1 }; + * const source1 = { b: 2 }; + * const source2 = { c: 3 }; + * const source3 = { d: 4 }; + * const source4 = { e: 5 }; + * + * const result = mergeWith(target, source1, source2, source3, source4, (objValue, srcValue) => { + * if (typeof objValue === 'number' && typeof srcValue === 'number') { + * return objValue + srcValue; + * } + * }); + * // => { a: 1, b: 2, c: 3, d: 4, e: 5 } + */ +declare function mergeWith(object: TObject, source1: TSource1, source2: TSource2, source3: TSource3, source4: TSource4, customizer: MergeWithCustomizer): TObject & TSource1 & TSource2 & TSource3 & TSource4; +/** + * Merges the properties of one or more source objects into the target object. + * + * @param object - The target object into which the source object properties will be merged. + * @param otherArgs - Additional source objects to merge into the target object, including the custom `merge` function. + * @returns The updated target object with properties from the source object(s) merged in. + * + * @example + * const target = { a: 1, b: 2 }; + * const source = { b: 3, c: 4 }; + * + * const result = mergeWith(target, source, (objValue, srcValue) => { + * if (typeof objValue === 'number' && typeof srcValue === 'number') { + * return objValue + srcValue; + */ +declare function mergeWith(object: any, ...otherArgs: any[]): any; +//#endregion +export { mergeWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/mergeWith.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/mergeWith.js new file mode 100644 index 0000000000000000000000000000000000000000..0e8d14b126b16b866f9f992575cb323a21353d50 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/mergeWith.js @@ -0,0 +1,111 @@ +const require_isPrimitive = require("../../predicate/isPrimitive.js"); +const require_clone = require("../../object/clone.js"); +const require_getSymbols = require("../_internal/getSymbols.js"); +const require_isBuffer = require("../../predicate/isBuffer.js"); +const require_isUnsafeProperty = require("../../_internal/isUnsafeProperty.js"); +const require_isPlainObject = require("../predicate/isPlainObject.js"); +const require_cloneDeep = require("./cloneDeep.js"); +const require_isArguments = require("../predicate/isArguments.js"); +const require_isObjectLike = require("../predicate/isObjectLike.js"); +const require_isArrayLikeObject = require("../predicate/isArrayLikeObject.js"); +const require_isTypedArray = require("../predicate/isTypedArray.js"); +//#region src/compat/object/mergeWith.ts +/** +* Merges the properties of one or more source objects into the target object using a customizer function. +* +* This function performs a deep merge, recursively merging nested objects and arrays. +* If a property in the source object is an array or object and the corresponding property in the target object is also an array or object, they will be merged. +* If a property in the source object is `undefined`, it will not overwrite a defined property in the target object. +* +* You can provide a custom `merge` function to control how properties are merged. The `merge` function is called for each property that is being merged and receives the following arguments: +* +* - `targetValue`: The current value of the property in the target object. +* - `sourceValue`: The value of the property in the source object. +* - `key`: The key of the property being merged. +* - `target`: The target object. +* - `source`: The source object. +* - `stack`: A `Map` used to keep track of objects that have already been processed to handle circular references. +* +* The `merge` function should return the value to be set in the target object. If it returns `undefined`, a default deep merge will be applied for arrays and objects. +* +* The function can handle multiple source objects and will merge them all into the target object. +* +* @param object - The target object into which the source object properties will be merged. This object is modified in place. +* @param otherArgs - Additional source objects to merge into the target object, including the custom `merge` function. +* @returns The updated target object with properties from the source object(s) merged in. +* +* @example +* const target = { a: 1, b: 2 }; +* const source = { b: 3, c: 4 }; +* +* mergeWith(target, source, (targetValue, sourceValue) => { +* if (typeof targetValue === 'number' && typeof sourceValue === 'number') { +* return targetValue + sourceValue; +* } +* }); +* // Returns { a: 1, b: 5, c: 4 } +* @example +* const target = { a: [1], b: [2] }; +* const source = { a: [3], b: [4] }; +* +* const result = mergeWith(target, source, (objValue, srcValue) => { +* if (Array.isArray(objValue)) { +* return objValue.concat(srcValue); +* } +* }); +* +* expect(result).toEqual({ a: [1, 3], b: [2, 4] }); +*/ +function mergeWith(object, ...otherArgs) { + const sources = otherArgs.slice(0, -1); + const merge = otherArgs[otherArgs.length - 1]; + let result = object; + for (let i = 0; i < sources.length; i++) { + const source = sources[i]; + result = mergeWithDeep(result, source, merge, /* @__PURE__ */ new Map()); + } + return result; +} +function mergeWithDeep(target, source, merge, stack) { + if (require_isPrimitive.isPrimitive(target)) target = Object(target); + if (source == null || typeof source !== "object") return target; + if (stack.has(source)) return require_clone.clone(stack.get(source)); + stack.set(source, target); + if (Array.isArray(source)) { + source = source.slice(); + for (let i = 0; i < source.length; i++) if (!(i in source)) source[i] = void 0; + } + const sourceKeys = [...Object.keys(source), ...require_getSymbols.getSymbols(source)]; + for (let i = 0; i < sourceKeys.length; i++) { + const key = sourceKeys[i]; + if (require_isUnsafeProperty.isUnsafeProperty(key)) continue; + let sourceValue = source[key]; + let targetValue = target[key]; + if (require_isArguments.isArguments(sourceValue)) sourceValue = { ...sourceValue }; + if (require_isArguments.isArguments(targetValue)) targetValue = { ...targetValue }; + if (require_isBuffer.isBuffer(sourceValue)) sourceValue = require_cloneDeep.cloneDeep(sourceValue); + if (Array.isArray(sourceValue)) if (Array.isArray(targetValue)) { + const cloned = []; + const targetKeys = Reflect.ownKeys(targetValue); + for (let i = 0; i < targetKeys.length; i++) { + const targetKey = targetKeys[i]; + cloned[targetKey] = targetValue[targetKey]; + } + targetValue = cloned; + } else if (require_isArrayLikeObject.isArrayLikeObject(targetValue)) { + const cloned = []; + for (let i = 0; i < targetValue.length; i++) cloned[i] = targetValue[i]; + targetValue = cloned; + } else targetValue = []; + const merged = merge(targetValue, sourceValue, key, target, source, stack); + if (merged !== void 0) target[key] = merged; + else if (Array.isArray(sourceValue)) target[key] = mergeWithDeep(targetValue, sourceValue, merge, stack); + else if (require_isObjectLike.isObjectLike(targetValue) && require_isObjectLike.isObjectLike(sourceValue) && (require_isPlainObject.isPlainObject(targetValue) || require_isPlainObject.isPlainObject(sourceValue) || require_isTypedArray.isTypedArray(targetValue) || require_isTypedArray.isTypedArray(sourceValue))) target[key] = mergeWithDeep(targetValue, sourceValue, merge, stack); + else if (targetValue == null && require_isPlainObject.isPlainObject(sourceValue)) target[key] = mergeWithDeep({}, sourceValue, merge, stack); + else if (targetValue == null && require_isTypedArray.isTypedArray(sourceValue)) target[key] = require_cloneDeep.cloneDeep(sourceValue); + else if (targetValue === void 0 || sourceValue !== void 0) target[key] = sourceValue; + } + return target; +} +//#endregion +exports.mergeWith = mergeWith; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/omit.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/omit.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..12c8832b1add25ddf7011cc3d329ea4b59bd9e0f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/omit.d.mts @@ -0,0 +1,46 @@ +import { Many } from "../_internal/Many.mjs"; + +//#region src/compat/object/omit.d.ts +/** + * Creates a new object with specified keys omitted. + * + * @template T - The type of object. + * @template K - The type of keys to omit. + * @param object - The object to omit keys from. + * @param paths - The keys to be omitted from the object. + * @returns A new object with the specified keys omitted. + * + * @example + * omit({ a: 1, b: 2, c: 3 }, 'a', 'c'); + * // => { b: 2 } + */ +declare function omit(object: T | null | undefined, ...paths: K): Pick>; +/** + * Creates a new object with specified keys omitted. + * + * @template T - The type of object. + * @template K - The type of keys to omit. + * @param object - The object to omit keys from. + * @param paths - The keys to be omitted from the object. + * @returns A new object with the specified keys omitted. + * + * @example + * omit({ a: 1, b: 2, c: 3 }, 'a', ['b', 'c']); + * // => {} + */ +declare function omit(object: T | null | undefined, ...paths: Array>): Omit; +/** + * Creates a new object with specified keys omitted. + * + * @template T - The type of object. + * @param object - The object to omit keys from. + * @param paths - The keys to be omitted from the object. + * @returns A new object with the specified keys omitted. + * + * @example + * omit({ a: 1, b: 2, c: 3 }, 'a', 'b'); + * // => { c: 3 } + */ +declare function omit(object: T | null | undefined, ...paths: Array>): Partial; +//#endregion +export { omit }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/omit.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/omit.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a0c2594ff4155c85d73789e18e9b294d86c9fbe0 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/omit.d.ts @@ -0,0 +1,46 @@ +import { Many } from "../_internal/Many.js"; + +//#region src/compat/object/omit.d.ts +/** + * Creates a new object with specified keys omitted. + * + * @template T - The type of object. + * @template K - The type of keys to omit. + * @param object - The object to omit keys from. + * @param paths - The keys to be omitted from the object. + * @returns A new object with the specified keys omitted. + * + * @example + * omit({ a: 1, b: 2, c: 3 }, 'a', 'c'); + * // => { b: 2 } + */ +declare function omit(object: T | null | undefined, ...paths: K): Pick>; +/** + * Creates a new object with specified keys omitted. + * + * @template T - The type of object. + * @template K - The type of keys to omit. + * @param object - The object to omit keys from. + * @param paths - The keys to be omitted from the object. + * @returns A new object with the specified keys omitted. + * + * @example + * omit({ a: 1, b: 2, c: 3 }, 'a', ['b', 'c']); + * // => {} + */ +declare function omit(object: T | null | undefined, ...paths: Array>): Omit; +/** + * Creates a new object with specified keys omitted. + * + * @template T - The type of object. + * @param object - The object to omit keys from. + * @param paths - The keys to be omitted from the object. + * @returns A new object with the specified keys omitted. + * + * @example + * omit({ a: 1, b: 2, c: 3 }, 'a', 'b'); + * // => { c: 3 } + */ +declare function omit(object: T | null | undefined, ...paths: Array>): Partial; +//#endregion +export { omit }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/omitBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/omitBy.js new file mode 100644 index 0000000000000000000000000000000000000000..45b0bed88814a57065991ed12ee7563a3bdf29fb --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/omitBy.js @@ -0,0 +1,39 @@ +const require_isSymbol = require("../predicate/isSymbol.js"); +const require_iteratee = require("../util/iteratee.js"); +const require_identity = require("../function/identity.js"); +const require_keysIn = require("./keysIn.js"); +const require_getSymbolsIn = require("../_internal/getSymbolsIn.js"); +//#region src/compat/object/omitBy.ts +/** +* Creates a new object composed of the properties that do not satisfy the predicate function. +* +* This function takes an object and a predicate function, and returns a new object that +* includes only the properties for which the predicate function returns false. +* +* @template T - The type of object. +* @param obj - The object to omit properties from. +* @param shouldOmit - A predicate function that determines +* whether a property should be omitted. It takes the property's value, key, and the source object as arguments and returns `true` +* if the property should be omitted, and `false` otherwise. +* @returns Returns the new object. +* +* @example +* const obj = { a: 1, b: 'omit', c: 3 }; +* const shouldOmit = (value) => typeof value === 'string'; +* const result = omitBy(obj, shouldOmit); +* // result will be { a: 1, c: 3 } +*/ +function omitBy(object, shouldOmit) { + if (object == null) return {}; + const result = {}; + const predicate = require_iteratee.iteratee(shouldOmit ?? require_identity.identity); + const keys = [...require_keysIn.keysIn(object), ...require_getSymbolsIn.getSymbolsIn(object)]; + for (let i = 0; i < keys.length; i++) { + const key = require_isSymbol.isSymbol(keys[i]) ? keys[i] : keys[i].toString(); + const value = object[key]; + if (!predicate(value, key, object)) result[key] = value; + } + return result; +} +//#endregion +exports.omitBy = omitBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/pick.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/pick.js new file mode 100644 index 0000000000000000000000000000000000000000..bc0c5e18ea3cd9e96d6309aba08145d869be5213 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/pick.js @@ -0,0 +1,60 @@ +const require_isArrayLike = require("../predicate/isArrayLike.js"); +const require_get = require("./get.js"); +const require_has = require("./has.js"); +const require_isNil = require("../predicate/isNil.js"); +const require_set = require("./set.js"); +//#region src/compat/object/pick.ts +/** +* Creates a new object composed of the picked object properties. +* +* This function takes an object and an array of keys, and returns a new object that +* includes only the properties corresponding to the specified keys. +* +* @template T - The type of object. +* @template U - The type of keys to pick. +* @param object - The object to pick keys from. +* @param props - An array of keys to be picked from the object. received keys goes through a flattening process before being used. +* @returns A new object with the specified keys picked. +* +* @example +* const obj = { a: 1, b: 2, c: 3 }; +* const result = pick(obj, ['a', 'c']); +* // result will be { a: 1, c: 3 } +* +* // each path can be passed individually as an argument +* const obj = { a: 1, b: 2, c: 3 }; +* const result = pick(obj, 'a', 'c'); +* // result will be { a: 1, c: 3 } +* +* // pick a key over a path +* const obj = { 'a.b': 1, a: { b: 2 } }; +* const result = pick(obj, 'a.b'); +* // result will be { 'a.b': 1 } +*/ +function pick(object, ...keysArr) { + if (require_isNil.isNil(object)) return {}; + const result = {}; + for (let i = 0; i < keysArr.length; i++) { + let keys = keysArr[i]; + switch (typeof keys) { + case "object": + if (!Array.isArray(keys)) if (require_isArrayLike.isArrayLike(keys)) keys = Array.from(keys); + else keys = [keys]; + break; + case "string": + case "symbol": + case "number": + keys = [keys]; + break; + } + for (const key of keys) { + const value = require_get.get(object, key); + if (value === void 0 && !require_has.has(object, key)) continue; + if (typeof key === "string" && Object.hasOwn(object, key)) result[key] = object[key]; + else require_set.set(result, key, value); + } + } + return result; +} +//#endregion +exports.pick = pick; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/pick.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/pick.mjs new file mode 100644 index 0000000000000000000000000000000000000000..780266e0331e4e4590b028d3359ed13cb83c981f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/pick.mjs @@ -0,0 +1,60 @@ +import { isArrayLike } from "../predicate/isArrayLike.mjs"; +import { get } from "./get.mjs"; +import { has } from "./has.mjs"; +import { isNil } from "../predicate/isNil.mjs"; +import { set } from "./set.mjs"; +//#region src/compat/object/pick.ts +/** +* Creates a new object composed of the picked object properties. +* +* This function takes an object and an array of keys, and returns a new object that +* includes only the properties corresponding to the specified keys. +* +* @template T - The type of object. +* @template U - The type of keys to pick. +* @param object - The object to pick keys from. +* @param props - An array of keys to be picked from the object. received keys goes through a flattening process before being used. +* @returns A new object with the specified keys picked. +* +* @example +* const obj = { a: 1, b: 2, c: 3 }; +* const result = pick(obj, ['a', 'c']); +* // result will be { a: 1, c: 3 } +* +* // each path can be passed individually as an argument +* const obj = { a: 1, b: 2, c: 3 }; +* const result = pick(obj, 'a', 'c'); +* // result will be { a: 1, c: 3 } +* +* // pick a key over a path +* const obj = { 'a.b': 1, a: { b: 2 } }; +* const result = pick(obj, 'a.b'); +* // result will be { 'a.b': 1 } +*/ +function pick(object, ...keysArr) { + if (isNil(object)) return {}; + const result = {}; + for (let i = 0; i < keysArr.length; i++) { + let keys = keysArr[i]; + switch (typeof keys) { + case "object": + if (!Array.isArray(keys)) if (isArrayLike(keys)) keys = Array.from(keys); + else keys = [keys]; + break; + case "string": + case "symbol": + case "number": + keys = [keys]; + break; + } + for (const key of keys) { + const value = get(object, key); + if (value === void 0 && !has(object, key)) continue; + if (typeof key === "string" && Object.hasOwn(object, key)) result[key] = object[key]; + else set(result, key, value); + } + } + return result; +} +//#endregion +export { pick }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/pickBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/pickBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..07f5aa0f5d21785eb306f38dd08c49876b224c4a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/pickBy.d.ts @@ -0,0 +1,81 @@ +import { ValueKeyIteratee } from "../_internal/ValueKeyIteratee.js"; +import { ValueKeyIterateeTypeGuard } from "../_internal/ValueKeyIterateeTypeGuard.js"; + +//#region src/compat/object/pickBy.d.ts +/** + * Creates a new object composed of the properties that satisfy the predicate function. + * + * @template T - The type of object values. + * @template S - The type of filtered values. + * @param object - The source object. + * @param predicate - The function invoked per property. + * @returns Returns the new filtered object. + * + * @example + * const users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * pickBy(users, ({ age }) => age < 40); + * // => { 'pebbles': { 'user': 'pebbles', 'age': 1 } } + */ +declare function pickBy(object: Record | null | undefined, predicate: ValueKeyIterateeTypeGuard): Record; +/** + * Creates a new object composed of the properties that satisfy the predicate function. + * + * @template T - The type of object values. + * @template S - The type of filtered values. + * @param object - The source object. + * @param predicate - The function invoked per property. + * @returns Returns the new filtered object. + * + * @example + * const array = [1, 2, 3, 4]; + * pickBy(array, (value) => value % 2 === 0); + * // => { 1: 2, 3: 4 } + */ +declare function pickBy(object: Record | null | undefined, predicate: ValueKeyIterateeTypeGuard): Record; +/** + * Creates a new object composed of the properties that satisfy the predicate function. + * + * @template T - The type of object values. + * @param object - The source object. + * @param [predicate] - The function invoked per property. + * @returns Returns the new filtered object. + * + * @example + * const object = { 'a': 1, 'b': '2', 'c': 3 }; + * pickBy(object, (value) => typeof value === 'string'); + * // => { 'b': '2' } + */ +declare function pickBy(object: Record | null | undefined, predicate?: ValueKeyIteratee): Record; +/** + * Creates a new object composed of the properties that satisfy the predicate function. + * + * @template T - The type of object values. + * @param object - The source object. + * @param [predicate] - The function invoked per property. + * @returns Returns the new filtered object. + * + * @example + * const array = [1, 2, 3, 4]; + * pickBy(array, (value) => value > 2); + * // => { 2: 3, 3: 4 } + */ +declare function pickBy(object: Record | null | undefined, predicate?: ValueKeyIteratee): Record; +/** + * Creates a new object composed of the properties that satisfy the predicate function. + * + * @template T - The type of object. + * @param object - The source object. + * @param [predicate] - The function invoked per property. + * @returns Returns the new filtered object. + * + * @example + * const object = { 'a': 1, 'b': '2', 'c': 3 }; + * pickBy(object, (value) => typeof value === 'string'); + * // => { 'b': '2' } + */ +declare function pickBy(object: T | null | undefined, predicate?: ValueKeyIteratee): Partial; +//#endregion +export { pickBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/property.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/property.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..507c08a1e3dc75fc3ee300bed723b0190dfee171 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/property.d.ts @@ -0,0 +1,6 @@ +import { PropertyPath } from "../_internal/PropertyPath.js"; + +//#region src/compat/object/property.d.ts +declare function property(path: PropertyPath): (obj: T) => R; +//#endregion +export { property }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/propertyOf.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/propertyOf.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..bda9eb59430bd55e98d15aea6a364a7d48cd3f2e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/propertyOf.d.ts @@ -0,0 +1,6 @@ +import { PropertyPath } from "../_internal/PropertyPath.js"; + +//#region src/compat/object/propertyOf.d.ts +declare function propertyOf(object: T): (path: PropertyPath) => any; +//#endregion +export { propertyOf }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/result.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/result.js new file mode 100644 index 0000000000000000000000000000000000000000..354526b0660f4b7b54327afbb06a47ee8b60d298 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/result.js @@ -0,0 +1,50 @@ +const require_toKey = require("../_internal/toKey.js"); +const require_toString = require("../util/toString.js"); +const require_toPath = require("../util/toPath.js"); +const require_isKey = require("../_internal/isKey.js"); +//#region src/compat/object/result.ts +/** +* Retrieves the value at a given path of an object. +* If the resolved value is a function, it is invoked with the object as its `this` context. +* If the value is `undefined`, the `defaultValue` is returned. +* +* @template T - The type of object. +* @template R - The type of the value to return. +* @param object - The object to query. +* @param path - The path of the property to get. +* @param [defaultValue] - The value returned if the resolved value is `undefined`. +* @returns Returns the resolved value. +* +* @example +* const obj = { a: { b: { c: 3 } } }; +* result(obj, 'a.b.c'); +* // => 3 +* +* @example +* const obj = { a: () => 5 }; +* result(obj, 'a'); +* // => 5 (calls the function `a` and returns its result) +* +* @example +* const obj = { a: { b: null } }; +* result(obj, 'a.b.c', 'default'); +* // => 'default' +* +* @example +* const obj = { a: { b: { c: 3 } } }; +* result(obj, 'a.b.d', () => 'default'); +* // => 'default' +*/ +function result(object, path, defaultValue) { + if (require_isKey.isKey(path, object)) path = [path]; + else if (!Array.isArray(path)) path = require_toPath.toPath(require_toString.toString(path)); + const pathLength = Math.max(path.length, 1); + for (let index = 0; index < pathLength; index++) { + const value = object == null ? void 0 : object[require_toKey.toKey(path[index])]; + if (value === void 0) return typeof defaultValue === "function" ? defaultValue.call(object) : defaultValue; + object = typeof value === "function" ? value.call(object) : value; + } + return object; +} +//#endregion +exports.result = result; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/result.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/result.mjs new file mode 100644 index 0000000000000000000000000000000000000000..3ee4541632edfdc9f650b639e2381911c63512ec --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/result.mjs @@ -0,0 +1,50 @@ +import { toKey } from "../_internal/toKey.mjs"; +import { toString } from "../util/toString.mjs"; +import { toPath } from "../util/toPath.mjs"; +import { isKey } from "../_internal/isKey.mjs"; +//#region src/compat/object/result.ts +/** +* Retrieves the value at a given path of an object. +* If the resolved value is a function, it is invoked with the object as its `this` context. +* If the value is `undefined`, the `defaultValue` is returned. +* +* @template T - The type of object. +* @template R - The type of the value to return. +* @param object - The object to query. +* @param path - The path of the property to get. +* @param [defaultValue] - The value returned if the resolved value is `undefined`. +* @returns Returns the resolved value. +* +* @example +* const obj = { a: { b: { c: 3 } } }; +* result(obj, 'a.b.c'); +* // => 3 +* +* @example +* const obj = { a: () => 5 }; +* result(obj, 'a'); +* // => 5 (calls the function `a` and returns its result) +* +* @example +* const obj = { a: { b: null } }; +* result(obj, 'a.b.c', 'default'); +* // => 'default' +* +* @example +* const obj = { a: { b: { c: 3 } } }; +* result(obj, 'a.b.d', () => 'default'); +* // => 'default' +*/ +function result(object, path, defaultValue) { + if (isKey(path, object)) path = [path]; + else if (!Array.isArray(path)) path = toPath(toString(path)); + const pathLength = Math.max(path.length, 1); + for (let index = 0; index < pathLength; index++) { + const value = object == null ? void 0 : object[toKey(path[index])]; + if (value === void 0) return typeof defaultValue === "function" ? defaultValue.call(object) : defaultValue; + object = typeof value === "function" ? value.call(object) : value; + } + return object; +} +//#endregion +export { result }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/setWith.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/setWith.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..60bc41be9e1c0e804f68c5f428fe8f5dab52c2af --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/setWith.d.ts @@ -0,0 +1,52 @@ +import { PropertyPath } from "../_internal/PropertyPath.js"; + +//#region src/compat/object/setWith.d.ts +/** + * Sets the value at the specified path of the given object using a customizer function. + * If any part of the path does not exist, it will be created based on the customizer's result. + * + * The customizer is invoked to produce the objects of the path. If the customizer returns + * a value, that value is used for the current path segment. If the customizer returns + * `undefined`, the method will create an appropriate object based on the path - an array + * if the next path segment is a valid array index, or an object otherwise. + * + * @template T - The type of the object. + * @param object - The object to modify. + * @param path - The path of the property to set. + * @param value - The value to set. + * @param [customizer] - The function to customize assigned values. + * @returns The modified object. + * + * @example + * // Set a value with a customizer that creates arrays for numeric path segments + * const object = {}; + * setWith(object, '[0][1]', 'a', (value) => Array.isArray(value) ? value : []); + * // => { '0': [, 'a'] } + */ +declare function setWith(object: T, path: PropertyPath, value: any, customizer?: (nsValue: any, key: string, nsObject: T) => any): T; +/** + * Sets the value at the specified path of the given object using a customizer function. + * If any part of the path does not exist, it will be created based on the customizer's result. + * + * The customizer is invoked to produce the objects of the path. If the customizer returns + * a value, that value is used for the current path segment. If the customizer returns + * `undefined`, the method will create an appropriate object based on the path - an array + * if the next path segment is a valid array index, or an object otherwise. + * + * @template T - The type of the object. + * @template R - The type of the return value. + * @param object - The object to modify. + * @param path - The path of the property to set. + * @param value - The value to set. + * @param [customizer] - The function to customize assigned values. + * @returns The modified object. + * + * @example + * // Set a value with a customizer that creates arrays for numeric path segments + * const object = {}; + * setWith(object, '[0][1]', 'a', (value) => Array.isArray(value) ? value : []); + * // => { '0': [, 'a'] } + */ +declare function setWith(object: T, path: PropertyPath, value: any, customizer?: (nsValue: any, key: string, nsObject: T) => any): R; +//#endregion +export { setWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/setWith.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/setWith.js new file mode 100644 index 0000000000000000000000000000000000000000..627d491658923e30eaa70c9754b5f7ad86060c38 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/setWith.js @@ -0,0 +1,33 @@ +const require_updateWith = require("./updateWith.js"); +//#region src/compat/object/setWith.ts +/** +* Sets the value at the specified path of the given object using a customizer function. +* If any part of the path does not exist, it will be created based on the customizer's result. +* +* The customizer is invoked to produce the objects of the path. If the customizer returns +* a value, that value is used for the current path segment. If the customizer returns +* `undefined`, the method will create an appropriate object based on the path - an array +* if the next path segment is a valid array index, or an object otherwise. +* +* @template T - The type of the object. +* @template R - The type of the return value. +* @param obj - The object to modify. +* @param path - The path of the property to set. +* @param value - The value to set. +* @param [customizer] - The function to customize assigned values. +* @returns The modified object. +* +* @example +* // Set a value with a customizer that creates arrays for numeric path segments +* const object = {}; +* setWith(object, '[0][1]', 'a', (value) => Array.isArray(value) ? value : []); +* // => { '0': [, 'a'] } +*/ +function setWith(obj, path, value, customizer) { + let customizerFn; + if (typeof customizer === "function") customizerFn = customizer; + else customizerFn = () => void 0; + return require_updateWith.updateWith(obj, path, () => value, customizerFn); +} +//#endregion +exports.setWith = setWith; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/setWith.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/setWith.mjs new file mode 100644 index 0000000000000000000000000000000000000000..632da7f99b2987dd2af684b79894ffd65e4d53e1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/setWith.mjs @@ -0,0 +1,33 @@ +import { updateWith } from "./updateWith.mjs"; +//#region src/compat/object/setWith.ts +/** +* Sets the value at the specified path of the given object using a customizer function. +* If any part of the path does not exist, it will be created based on the customizer's result. +* +* The customizer is invoked to produce the objects of the path. If the customizer returns +* a value, that value is used for the current path segment. If the customizer returns +* `undefined`, the method will create an appropriate object based on the path - an array +* if the next path segment is a valid array index, or an object otherwise. +* +* @template T - The type of the object. +* @template R - The type of the return value. +* @param obj - The object to modify. +* @param path - The path of the property to set. +* @param value - The value to set. +* @param [customizer] - The function to customize assigned values. +* @returns The modified object. +* +* @example +* // Set a value with a customizer that creates arrays for numeric path segments +* const object = {}; +* setWith(object, '[0][1]', 'a', (value) => Array.isArray(value) ? value : []); +* // => { '0': [, 'a'] } +*/ +function setWith(obj, path, value, customizer) { + let customizerFn; + if (typeof customizer === "function") customizerFn = customizer; + else customizerFn = () => void 0; + return updateWith(obj, path, () => value, customizerFn); +} +//#endregion +export { setWith }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/toDefaulted.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/toDefaulted.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..4215e85c8de7eb0f94f0f0cca5082eb8ca554e96 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/toDefaulted.d.mts @@ -0,0 +1,123 @@ +//#region src/compat/object/toDefaulted.d.ts +/** + * Creates a new object based on the provided `object`, applying default values from the `sources` to ensure that no properties are left `undefined`. + * It assigns default values to properties that are either `undefined` or come from `Object.prototype`. + * + * You can provide multiple source objects to set these default values, + * and they will be applied in the order they are given, from left to right. + * Once a property has been set, any later values for that property will be ignored. + * + * Note: This function creates a new object. If you want to modify the `object`, use the `defaults` function instead. + * + * Note: This function creates a new object. If you want to modify the `object`, use the `defaults` function instead. + * + * @template T - The type of the object being processed. + * @param object - The target object. + * @returns The cloned object. + */ +declare function toDefaulted(object: T): T; +/** + * Creates a new object based on the provided `object`, applying default values from the `sources` to ensure that no properties are left `undefined`. + * It assigns default values to properties that are either `undefined` or come from `Object.prototype`. + * + * You can provide multiple source objects to set these default values, + * and they will be applied in the order they are given, from left to right. + * Once a property has been set, any later values for that property will be ignored. + * + * Note: This function creates a new object. If you want to modify the `object`, use the `defaults` function instead. + * + * @template T - The type of the object being processed. + * @template S - The type of the object that provides default values. + * @param object - The target object that will receive default values. + * @param source - The object that specifies the default values to apply. + * @returns A new object that combines the target and default values, ensuring no properties are left undefined. + */ +declare function toDefaulted(object: T, source: S): NonNullable; +/** + * Creates a new object based on the provided `object`, applying default values from the `sources` to ensure that no properties are left `undefined`. + * It assigns default values to properties that are either `undefined` or come from `Object.prototype`. + * + * You can provide multiple source objects to set these default values, + * and they will be applied in the order they are given, from left to right. + * Once a property has been set, any later values for that property will be ignored. + * + * Note: This function creates a new object. If you want to modify the `object`, use the `defaults` function instead. + * + * @template T - The type of the object being processed. + * @template S1 - The type of the first object that provides default values. + * @template S2 - The type of the second object that provides default values. + * @param object - The target object that will receive default values. + * @param source1 - The first object that specifies the default values to apply. + * @param source2 - The second object that specifies the default values to apply. + * @returns A new object that combines the target and default values, ensuring no properties are left undefined. + */ +declare function toDefaulted(object: T, source1: S1, source2: S2): NonNullable; +/** + * Creates a new object based on the provided `object`, applying default values from the `sources` to ensure that no properties are left `undefined`. + * It assigns default values to properties that are either `undefined` or come from `Object.prototype`. + * + * You can provide multiple source objects to set these default values, + * and they will be applied in the order they are given, from left to right. + * Once a property has been set, any later values for that property will be ignored. + * + * Note: This function creates a new object. If you want to modify the `object`, use the `defaults` function instead. + * + * @template T - The type of the object being processed. + * @template S1 - The type of the first object that provides default values. + * @template S2 - The type of the second object that provides default values. + * @template S3 - The type of the third object that provides default values. + * @param object - The target object that will receive default values. + * @param source1 - The first object that specifies the default values to apply. + * @param source2 - The second object that specifies the default values to apply. + * @param source3 - The third object that specifies the default values to apply. + * @returns A new object that combines the target and default values, ensuring no properties are left undefined. + */ +declare function toDefaulted(object: T, source1: S1, source2: S2, source3: S3): NonNullable; +/** + * Creates a new object based on the provided `object`, applying default values from the `sources` to ensure that no properties are left `undefined`. + * It assigns default values to properties that are either `undefined` or come from `Object.prototype`. + * + * You can provide multiple source objects to set these default values, + * and they will be applied in the order they are given, from left to right. + * Once a property has been set, any later values for that property will be ignored. + * + * Note: This function creates a new object. If you want to modify the `object`, use the `defaults` function instead. + * + * @template T - The type of the object being processed. + * @template S1 - The type of the first object that provides default values. + * @template S2 - The type of the second object that provides default values. + * @template S3 - The type of the third object that provides default values. + * @template S4 - The type of the fourth object that provides default values. + * @param object - The target object that will receive default values. + * @param source1 - The first object that specifies the default values to apply. + * @param source2 - The second object that specifies the default values to apply. + * @param source3 - The third object that specifies the default values to apply. + * @param source4 - The fourth object that specifies the default values to apply. + * @returns A new object that combines the target and default values, ensuring no properties are left undefined. + */ +declare function toDefaulted(object: T, source1: S1, source2: S2, source3: S3, source4: S4): NonNullable; +/** + * Creates a new object based on the provided `object`, applying default values from the `sources` to ensure that no properties are left `undefined`. + * It assigns default values to properties that are either `undefined` or come from `Object.prototype`. + * + * You can provide multiple source objects to set these default values, + * and they will be applied in the order they are given, from left to right. + * Once a property has been set, any later values for that property will be ignored. + * + * Note: This function creates a new object. If you want to modify the `object`, use the `defaults` function instead. + * + * @template T - The type of the object being processed. + * @template S - The type of the objects that provides default values. + * @param object - The target object that will receive default values. + * @param sources - The objects that specifies the default values to apply. + * @returns A new object that combines the target and default values, ensuring no properties are left undefined. + * + * @example + * toDefaulted({ a: 1 }, { a: 2, b: 2 }, { c: 3 }); // { a: 1, b: 2, c: 3 } + * toDefaulted({ a: 1, b: 2 }, { b: 3 }, { c: 3 }); // { a: 1, b: 2, c: 3 } + * toDefaulted({ a: null }, { a: 1 }); // { a: null } + * toDefaulted({ a: undefined }, { a: 1 }); // { a: 1 } + */ +declare function toDefaulted(object: T, ...sources: S[]): object; +//#endregion +export { toDefaulted }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/toPairs.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/toPairs.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9e0d41369e9c8883c747e3dc851d7fb41a5ae6d0 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/toPairs.d.ts @@ -0,0 +1,26 @@ +//#region src/compat/object/toPairs.d.ts +/** + * Creates an array of key-value pairs from an object. + * + * @template T + * @param object - The object to query. + * @returns Returns the array of key-value pairs. + * + * @example + * const object = { a: 1, b: 2 }; + * toPairs(object); // [['a', 1], ['b', 2]] + */ +declare function toPairs(object?: Record | Record): Array<[string, T]>; +/** + * Creates an array of key-value pairs from an object. + * + * @param object - The object to query. + * @returns Returns the array of key-value pairs. + * + * @example + * const object = { a: 1, b: 2 }; + * toPairs(object); // [['a', 1], ['b', 2]] + */ +declare function toPairs(object?: object): Array<[string, any]>; +//#endregion +export { toPairs }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/toPairs.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/toPairs.js new file mode 100644 index 0000000000000000000000000000000000000000..197357c772b697c163329c48d45ce3c96ecb1239 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/toPairs.js @@ -0,0 +1,37 @@ +const require_keys = require("./keys.js"); +const require_mapToEntries = require("../_internal/mapToEntries.js"); +const require_setToEntries = require("../_internal/setToEntries.js"); +//#region src/compat/object/toPairs.ts +/** +* Creates an array of key-value pairs from an object, set, or map. +* +* @template T +* @param object - The object, set, or map to query. +* @returns Returns the array of key-value pairs. +* +* @example +* const object = { a: 1, b: 2 }; +* toPairs(object); // [['a', 1], ['b', 2]] +* +* const set = new Set([1, 2]); +* toPairs(set); // [[1, 1], [2, 2]] +* +* const map = new Map(); +* map.set('a', 1); +* map.set('b', 2); +* toPairs(map); // [['a', 1], ['b', 2]] +*/ +function toPairs(object) { + if (object == null) return []; + if (object instanceof Set) return require_setToEntries.setToEntries(object); + if (object instanceof Map) return require_mapToEntries.mapToEntries(object); + const keys$1 = require_keys.keys(object); + const result = new Array(keys$1.length); + for (let i = 0; i < keys$1.length; i++) { + const key = keys$1[i]; + result[i] = [key, object[key]]; + } + return result; +} +//#endregion +exports.toPairs = toPairs; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/toPairs.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/toPairs.mjs new file mode 100644 index 0000000000000000000000000000000000000000..4ef16dd6a6a84bf6ebf2e2d86cc22e8918b6cdab --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/toPairs.mjs @@ -0,0 +1,37 @@ +import { keys } from "./keys.mjs"; +import { mapToEntries } from "../_internal/mapToEntries.mjs"; +import { setToEntries } from "../_internal/setToEntries.mjs"; +//#region src/compat/object/toPairs.ts +/** +* Creates an array of key-value pairs from an object, set, or map. +* +* @template T +* @param object - The object, set, or map to query. +* @returns Returns the array of key-value pairs. +* +* @example +* const object = { a: 1, b: 2 }; +* toPairs(object); // [['a', 1], ['b', 2]] +* +* const set = new Set([1, 2]); +* toPairs(set); // [[1, 1], [2, 2]] +* +* const map = new Map(); +* map.set('a', 1); +* map.set('b', 2); +* toPairs(map); // [['a', 1], ['b', 2]] +*/ +function toPairs(object) { + if (object == null) return []; + if (object instanceof Set) return setToEntries(object); + if (object instanceof Map) return mapToEntries(object); + const keys$1 = keys(object); + const result = new Array(keys$1.length); + for (let i = 0; i < keys$1.length; i++) { + const key = keys$1[i]; + result[i] = [key, object[key]]; + } + return result; +} +//#endregion +export { toPairs }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/toPairsIn.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/toPairsIn.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..1919429b93822ffc83e7479c563fbad3aeabb094 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/toPairsIn.d.mts @@ -0,0 +1,26 @@ +//#region src/compat/object/toPairsIn.d.ts +/** + * Creates an array of key-value pairs from an object, including inherited properties. + * + * @template T + * @param object - The object to query. + * @returns Returns the array of key-value pairs. + * + * @example + * const object = { a: 1, b: 2 }; + * toPairsIn(object); // [['a', 1], ['b', 2]] + */ +declare function toPairsIn(object?: Record | Record): Array<[string, T]>; +/** + * Creates an array of key-value pairs from an object, including inherited properties. + * + * @param object - The object to query. + * @returns Returns the array of key-value pairs. + * + * @example + * const object = { a: 1, b: 2 }; + * toPairsIn(object); // [['a', 1], ['b', 2]] + */ +declare function toPairsIn(object?: object): Array<[string, any]>; +//#endregion +export { toPairsIn }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/transform.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/transform.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..c29d3d8503e156b8d4271e462825e8f91bbc66d4 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/transform.d.mts @@ -0,0 +1,75 @@ +//#region src/compat/object/transform.d.ts +/** + * Traverses object values and creates a new object by accumulating them in the desired form. + * + * @template T - The type of object. + * @template R - The type of accumulator. + * @param object - The array to iterate over. + * @param iteratee - The function invoked per iteration. + * @param [accumulator] - The initial value. + * @returns Returns the accumulated value. + * + * @example + * const array = [2, 3, 4]; + * transform(array, (acc, value) => { acc.push(value * 2); }, []); + * // => [4, 6, 8] + */ +declare function transform(object: readonly T[], iteratee: (acc: R, curr: T, index: number, arr: T[]) => void, accumulator?: R): R; +/** + * Traverses object values and creates a new object by accumulating them in the desired form. + * + * @template T - The type of object. + * @template R - The type of accumulator. + * @param object - The object to iterate over. + * @param iteratee - The function invoked per iteration. + * @param [accumulator] - The initial value. + * @returns Returns the accumulated value. + * + * @example + * const obj = { 'a': 1, 'b': 2, 'c': 1 }; + * transform(obj, (result, value, key) => { (result[value] || (result[value] = [])).push(key) }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } + */ +declare function transform(object: Record, iteratee: (acc: R, curr: T, key: string, dict: Record) => void, accumulator?: R): R; +/** + * Traverses object values and creates a new object by accumulating them in the desired form. + * + * @template T - The type of object. + * @template R - The type of accumulator. + * @param object - The object to iterate over. + * @param iteratee - The function invoked per iteration. + * @param [accumulator] - The initial value. + * @returns Returns the accumulated value. + * + * @example + * const obj = { x: 1, y: 2, z: 3 }; + * transform(obj, (acc, value, key) => { acc[key] = value * 2; }, {}); + * // => { x: 2, y: 4, z: 6 } + */ +declare function transform(object: T, iteratee: (acc: R, curr: T[keyof T], key: keyof T, dict: Record) => void, accumulator?: R): R; +/** + * Traverses object values and creates a new object by accumulating them in the desired form. + * + * @param object - The array to iterate over. + * @returns Returns the accumulated value. + * + * @example + * const array = [1, 2, 3]; + * transform(array); + * // => [1, 2, 3] + */ +declare function transform(object: any[]): any[]; +/** + * Traverses object values and creates a new object by accumulating them in the desired form. + * + * @param object - The object to iterate over. + * @returns Returns the accumulated value. + * + * @example + * const obj = { a: 1, b: 2 }; + * transform(obj); + * // => { a: 1, b: 2 } + */ +declare function transform(object: object): Record; +//#endregion +export { transform }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/transform.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/transform.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c29d3d8503e156b8d4271e462825e8f91bbc66d4 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/transform.d.ts @@ -0,0 +1,75 @@ +//#region src/compat/object/transform.d.ts +/** + * Traverses object values and creates a new object by accumulating them in the desired form. + * + * @template T - The type of object. + * @template R - The type of accumulator. + * @param object - The array to iterate over. + * @param iteratee - The function invoked per iteration. + * @param [accumulator] - The initial value. + * @returns Returns the accumulated value. + * + * @example + * const array = [2, 3, 4]; + * transform(array, (acc, value) => { acc.push(value * 2); }, []); + * // => [4, 6, 8] + */ +declare function transform(object: readonly T[], iteratee: (acc: R, curr: T, index: number, arr: T[]) => void, accumulator?: R): R; +/** + * Traverses object values and creates a new object by accumulating them in the desired form. + * + * @template T - The type of object. + * @template R - The type of accumulator. + * @param object - The object to iterate over. + * @param iteratee - The function invoked per iteration. + * @param [accumulator] - The initial value. + * @returns Returns the accumulated value. + * + * @example + * const obj = { 'a': 1, 'b': 2, 'c': 1 }; + * transform(obj, (result, value, key) => { (result[value] || (result[value] = [])).push(key) }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } + */ +declare function transform(object: Record, iteratee: (acc: R, curr: T, key: string, dict: Record) => void, accumulator?: R): R; +/** + * Traverses object values and creates a new object by accumulating them in the desired form. + * + * @template T - The type of object. + * @template R - The type of accumulator. + * @param object - The object to iterate over. + * @param iteratee - The function invoked per iteration. + * @param [accumulator] - The initial value. + * @returns Returns the accumulated value. + * + * @example + * const obj = { x: 1, y: 2, z: 3 }; + * transform(obj, (acc, value, key) => { acc[key] = value * 2; }, {}); + * // => { x: 2, y: 4, z: 6 } + */ +declare function transform(object: T, iteratee: (acc: R, curr: T[keyof T], key: keyof T, dict: Record) => void, accumulator?: R): R; +/** + * Traverses object values and creates a new object by accumulating them in the desired form. + * + * @param object - The array to iterate over. + * @returns Returns the accumulated value. + * + * @example + * const array = [1, 2, 3]; + * transform(array); + * // => [1, 2, 3] + */ +declare function transform(object: any[]): any[]; +/** + * Traverses object values and creates a new object by accumulating them in the desired form. + * + * @param object - The object to iterate over. + * @returns Returns the accumulated value. + * + * @example + * const obj = { a: 1, b: 2 }; + * transform(obj); + * // => { a: 1, b: 2 } + */ +declare function transform(object: object): Record; +//#endregion +export { transform }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/transform.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/transform.js new file mode 100644 index 0000000000000000000000000000000000000000..1a3dcb6db3d0fda2dcd4e1e7717024d5247b13a6 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/transform.js @@ -0,0 +1,44 @@ +const require_identity = require("../../function/identity.js"); +const require_isFunction = require("../../predicate/isFunction.js"); +const require_isObject = require("../predicate/isObject.js"); +const require_iteratee = require("../util/iteratee.js"); +const require_forEach = require("../array/forEach.js"); +const require_isTypedArray = require("../predicate/isTypedArray.js"); +const require_isBuffer = require("../predicate/isBuffer.js"); +//#region src/compat/object/transform.ts +/** +* Traverses object values and creates a new object by accumulating them in the desired form. +* +* If no initial value is provided for `accumulator`, it creates a new array or object with the same prototype. +* +The traversal is interrupted when the `iteratee` function returns `false`. +* +* @template T - The type of object. +* @template U - The type of accumulator. +* @param object - The object to iterate over. +* @param [iteratee] - The function invoked per iteration. +* @param [accumulator] - The initial value. +* @returns Returns the accumulated value. +* +* @example +* // Transform an array +* const array = [2, 3, 4]; +* transform(array, (acc, value) => { acc.sum += value; return value % 2 === 0; }, { sum: 0 }) // => { sum: 5 } +* +* @example +* // Transform an object +* const obj = { 'a': 1, 'b': 2, 'c': 1 }; +* transform(obj, (result, value, key) => { (result[value] || (result[value] = [])).push(key) }, {}) // => { '1': ['a', 'c'], '2': ['b'] } +*/ +function transform(object, iteratee$1 = require_identity.identity, accumulator) { + const isArrayOrBufferOrTypedArray = Array.isArray(object) || require_isBuffer.isBuffer(object) || require_isTypedArray.isTypedArray(object); + iteratee$1 = require_iteratee.iteratee(iteratee$1); + if (accumulator == null) if (isArrayOrBufferOrTypedArray) accumulator = []; + else if (require_isObject.isObject(object) && require_isFunction.isFunction(object.constructor)) accumulator = Object.create(Object.getPrototypeOf(object)); + else accumulator = {}; + if (object == null) return accumulator; + require_forEach.forEach(object, (value, key, object) => iteratee$1(accumulator, value, key, object)); + return accumulator; +} +//#endregion +exports.transform = transform; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/transform.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/transform.mjs new file mode 100644 index 0000000000000000000000000000000000000000..40ec26d8a6c575631756867fa36e539e2a4cd6d4 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/transform.mjs @@ -0,0 +1,44 @@ +import { identity } from "../../function/identity.mjs"; +import { isFunction } from "../../predicate/isFunction.mjs"; +import { isObject } from "../predicate/isObject.mjs"; +import { iteratee } from "../util/iteratee.mjs"; +import { forEach } from "../array/forEach.mjs"; +import { isTypedArray } from "../predicate/isTypedArray.mjs"; +import { isBuffer } from "../predicate/isBuffer.mjs"; +//#region src/compat/object/transform.ts +/** +* Traverses object values and creates a new object by accumulating them in the desired form. +* +* If no initial value is provided for `accumulator`, it creates a new array or object with the same prototype. +* +The traversal is interrupted when the `iteratee` function returns `false`. +* +* @template T - The type of object. +* @template U - The type of accumulator. +* @param object - The object to iterate over. +* @param [iteratee] - The function invoked per iteration. +* @param [accumulator] - The initial value. +* @returns Returns the accumulated value. +* +* @example +* // Transform an array +* const array = [2, 3, 4]; +* transform(array, (acc, value) => { acc.sum += value; return value % 2 === 0; }, { sum: 0 }) // => { sum: 5 } +* +* @example +* // Transform an object +* const obj = { 'a': 1, 'b': 2, 'c': 1 }; +* transform(obj, (result, value, key) => { (result[value] || (result[value] = [])).push(key) }, {}) // => { '1': ['a', 'c'], '2': ['b'] } +*/ +function transform(object, iteratee$1 = identity, accumulator) { + const isArrayOrBufferOrTypedArray = Array.isArray(object) || isBuffer(object) || isTypedArray(object); + iteratee$1 = iteratee(iteratee$1); + if (accumulator == null) if (isArrayOrBufferOrTypedArray) accumulator = []; + else if (isObject(object) && isFunction(object.constructor)) accumulator = Object.create(Object.getPrototypeOf(object)); + else accumulator = {}; + if (object == null) return accumulator; + forEach(object, (value, key, object) => iteratee$1(accumulator, value, key, object)); + return accumulator; +} +//#endregion +export { transform }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/unset.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/unset.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c36ba5749377b3ee40dfdf17374eaef992350c1c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/unset.d.ts @@ -0,0 +1,21 @@ +//#region src/compat/object/unset.d.ts +/** + * Removes the property at the given path of the object. + * + * @param obj - The object to modify. + * @param path - The path of the property to unset. + * @returns Returns true if the property is deleted, else false. + * + * @example + * const obj = { a: { b: { c: 42 } } }; + * unset(obj, 'a.b.c'); // true + * console.log(obj); // { a: { b: {} } } + * + * @example + * const obj = { a: { b: { c: 42 } } }; + * unset(obj, ['a', 'b', 'c']); // true + * console.log(obj); // { a: { b: {} } } + */ +declare function unset(obj: any, path: PropertyKey | readonly PropertyKey[]): boolean; +//#endregion +export { unset }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/unset.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/unset.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e39696f37b8cadd594a4cfdc0c91366fab91e818 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/unset.mjs @@ -0,0 +1,66 @@ +import { isUnsafeProperty } from "../../_internal/isUnsafeProperty.mjs"; +import { isDeepKey } from "../_internal/isDeepKey.mjs"; +import { toKey } from "../_internal/toKey.mjs"; +import { toPath } from "../util/toPath.mjs"; +import { get } from "./get.mjs"; +//#region src/compat/object/unset.ts +/** +* Removes the property at the given path of the object. +* +* @param obj - The object to modify. +* @param path - The path of the property to unset. +* @returns Returns true if the property is deleted, else false. +* +* @example +* const obj = { a: { b: { c: 42 } } }; +* unset(obj, 'a.b.c'); // true +* console.log(obj); // { a: { b: {} } } +* +* @example +* const obj = { a: { b: { c: 42 } } }; +* unset(obj, ['a', 'b', 'c']); // true +* console.log(obj); // { a: { b: {} } } +*/ +function unset(obj, path) { + if (obj == null) return true; + switch (typeof path) { + case "symbol": + case "number": + case "object": + if (Array.isArray(path)) return unsetWithPath(obj, path); + if (typeof path === "number") path = toKey(path); + else if (typeof path === "object") if (Object.is(path?.valueOf(), -0)) path = "-0"; + else path = String(path); + if (isUnsafeProperty(path)) return false; + if (obj?.[path] === void 0) return true; + try { + delete obj[path]; + return true; + } catch { + return false; + } + case "string": + if (obj?.[path] === void 0 && isDeepKey(path) && !Object.hasOwn(obj, path)) return unsetWithPath(obj, toPath(path)); + if (isUnsafeProperty(path)) return false; + try { + delete obj[path]; + return true; + } catch { + return false; + } + } +} +function unsetWithPath(obj, path) { + const parent = path.length === 1 ? obj : get(obj, path.slice(0, -1)); + const lastKey = path[path.length - 1]; + if (parent?.[lastKey] === void 0) return true; + if (isUnsafeProperty(lastKey)) return false; + try { + delete parent[lastKey]; + return true; + } catch { + return false; + } +} +//#endregion +export { unset }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/update.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/update.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6531c430e0e1d6053840dbb99f4999455c0d473e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/update.d.ts @@ -0,0 +1,15 @@ +import { PropertyPath } from "../_internal/PropertyPath.js"; + +//#region src/compat/object/update.d.ts +/** + * Updates the value at the specified path of the given object using an updater function. + * If any part of the path does not exist, it will be created. + * + * @param obj - The object to modify. + * @param path - The path of the property to update. + * @param updater - The function to produce the updated value. + * @returns The modified object. + */ +declare function update(obj: object, path: PropertyPath, updater: (value: any) => any): any; +//#endregion +export { update }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/updateWith.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/updateWith.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..15001b0d6f32267d62b839007234d03c4bc00dde --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/updateWith.d.mts @@ -0,0 +1,40 @@ +import { PropertyPath } from "../_internal/PropertyPath.mjs"; + +//#region src/compat/object/updateWith.d.ts +/** + * Updates the value at the specified path of the given object using an updater function and a customizer. + * If any part of the path does not exist, it will be created. + * + * @template T - The type of the object. + * @param object - The object to modify. + * @param path - The path of the property to update. + * @param updater - The function to produce the updated value. + * @param customizer - The function to customize the update process. + * @returns The modified object. + * + * @example + * const object = { 'a': [{ 'b': { 'c': 3 } }] }; + * updateWith(object, 'a[0].b.c', (n) => n * n); + * // => { 'a': [{ 'b': { 'c': 9 } }] } + */ +declare function updateWith(object: T, path: PropertyPath, updater: (oldValue: any) => any, customizer?: (value: any, key: string, object: T) => any): T; +/** + * Updates the value at the specified path of the given object using an updater function and a customizer. + * If any part of the path does not exist, it will be created. + * + * @template T - The type of the object. + * @template R - The type of the return value. + * @param object - The object to modify. + * @param path - The path of the property to update. + * @param updater - The function to produce the updated value. + * @param customizer - The function to customize the update process. + * @returns The modified object. + * + * @example + * const object = { 'a': [{ 'b': { 'c': 3 } }] }; + * updateWith(object, 'a[0].b.c', (n) => n * n); + * // => { 'a': [{ 'b': { 'c': 9 } }] } + */ +declare function updateWith(object: T, path: PropertyPath, updater: (oldValue: any) => any, customizer?: (value: any, key: string, object: T) => any): R; +//#endregion +export { updateWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/updateWith.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/updateWith.mjs new file mode 100644 index 0000000000000000000000000000000000000000..8af7f36ae21931695efde698f5f20ccc1a527c2f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/updateWith.mjs @@ -0,0 +1,51 @@ +import { toKey } from "../_internal/toKey.mjs"; +import { toPath } from "../util/toPath.mjs"; +import { get } from "./get.mjs"; +import { isObject } from "../predicate/isObject.mjs"; +import { isIndex } from "../_internal/isIndex.mjs"; +import { isKey } from "../_internal/isKey.mjs"; +import { assignValue } from "../_internal/assignValue.mjs"; +import { isUnsafeToWriteProperty } from "../../_internal/isUnsafeToWriteProperty.mjs"; +//#region src/compat/object/updateWith.ts +/** +* Updates the value at the specified path of the given object using an updater function and a customizer. +* If any part of the path does not exist, it will be created. +* +* @template T - The type of the object. +* @template R - The type of the return value. +* @param obj - The object to modify. +* @param path - The path of the property to update. +* @param updater - The function to produce the updated value. +* @param customizer - The function to customize the update process. +* @returns The modified object. +* +* @example +* const object = { 'a': [{ 'b': { 'c': 3 } }] }; +* updateWith(object, 'a[0].b.c', (n) => n * n); +* // => { 'a': [{ 'b': { 'c': 9 } }] } +*/ +function updateWith(obj, path, updater, customizer) { + if (obj == null && !isObject(obj)) return obj; + let resolvedPath; + if (isKey(path, obj)) resolvedPath = [path]; + else if (Array.isArray(path)) resolvedPath = path; + else resolvedPath = toPath(path); + const updateValue = updater(get(obj, resolvedPath)); + let current = obj; + for (let i = 0; i < resolvedPath.length && current != null; i++) { + const key = toKey(resolvedPath[i]); + if (isUnsafeToWriteProperty(key)) return obj; + let newValue; + if (i === resolvedPath.length - 1) newValue = updateValue; + else { + const objValue = current[key]; + const customizerResult = customizer?.(objValue, key, obj); + newValue = customizerResult !== void 0 ? customizerResult : isObject(objValue) ? objValue : isIndex(resolvedPath[i + 1]) ? [] : {}; + } + assignValue(current, key, newValue); + current = current[key]; + } + return obj; +} +//#endregion +export { updateWith }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/values.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/values.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..7dfe5e910394d974ca1de719a0d7fb94fddf58d3 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/values.d.mts @@ -0,0 +1,38 @@ +//#region src/compat/object/values.d.ts +/** + * Creates an array of the own enumerable property values of `object`. + * + * @template T + * @param object - The object to query. + * @returns Returns an array of property values. + * + * @example + * const obj = { a: 1, b: 2, c: 3 }; + * values(obj); // => [1, 2, 3] + */ +declare function values(object: Record | Record | ArrayLike | null | undefined): T[]; +/** + * Creates an array of the own enumerable property values of `object`. + * + * @template T + * @param object - The object to query. + * @returns Returns an array of property values. + * + * @example + * const obj = { a: 1, b: 2, c: 3 }; + * values(obj); // => [1, 2, 3] + */ +declare function values(object: T | null | undefined): Array; +/** + * Creates an array of the own enumerable property values of `object`. + * + * @param object - The object to query. + * @returns Returns an array of property values. + * + * @example + * const obj = { a: 1, b: 2, c: 3 }; + * values(obj); // => [1, 2, 3] + */ +declare function values(object: any): any[]; +//#endregion +export { values }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/values.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/values.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7dfe5e910394d974ca1de719a0d7fb94fddf58d3 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/values.d.ts @@ -0,0 +1,38 @@ +//#region src/compat/object/values.d.ts +/** + * Creates an array of the own enumerable property values of `object`. + * + * @template T + * @param object - The object to query. + * @returns Returns an array of property values. + * + * @example + * const obj = { a: 1, b: 2, c: 3 }; + * values(obj); // => [1, 2, 3] + */ +declare function values(object: Record | Record | ArrayLike | null | undefined): T[]; +/** + * Creates an array of the own enumerable property values of `object`. + * + * @template T + * @param object - The object to query. + * @returns Returns an array of property values. + * + * @example + * const obj = { a: 1, b: 2, c: 3 }; + * values(obj); // => [1, 2, 3] + */ +declare function values(object: T | null | undefined): Array; +/** + * Creates an array of the own enumerable property values of `object`. + * + * @param object - The object to query. + * @returns Returns an array of property values. + * + * @example + * const obj = { a: 1, b: 2, c: 3 }; + * values(obj); // => [1, 2, 3] + */ +declare function values(object: any): any[]; +//#endregion +export { values }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/values.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/values.mjs new file mode 100644 index 0000000000000000000000000000000000000000..923f6583709d88fe3e69970e59cc0600af299b0a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/values.mjs @@ -0,0 +1,20 @@ +import { keys } from "./keys.mjs"; +//#region src/compat/object/values.ts +/** +* Creates an array of the own enumerable property values of `object`. +* +* @param object The object to query. +* @returns Returns an array of property values. +* @example +* const obj = { a: 1, b: 2, c: 3 }; +* values(obj); // => [1, 2, 3] +*/ +function values(object) { + if (object == null) return []; + const objectKeys = keys(object); + const result = new Array(objectKeys.length); + for (let i = 0; i < objectKeys.length; i++) result[i] = object[objectKeys[i]]; + return result; +} +//#endregion +export { values }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/valuesIn.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/valuesIn.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6c1500f7579c6b5a9d6bbfa9291556bc1115bc9e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/object/valuesIn.d.ts @@ -0,0 +1,27 @@ +//#region src/compat/object/valuesIn.d.ts +/** + * Retrieves the values from an object, including those inherited from its prototype. + * + * @template T + * @param object - The object to query. + * @returns Returns an array of property values. + * + * @example + * const obj = { a: 1, b: 2, c: 3 }; + * valuesIn(obj); // => [1, 2, 3] + */ +declare function valuesIn(object: Record | Record | ArrayLike | null | undefined): T[]; +/** + * Retrieves the values from an object, including those inherited from its prototype. + * + * @template T + * @param object - The object to query. + * @returns Returns an array of property values. + * + * @example + * const obj = { a: 1, b: 2, c: 3 }; + * valuesIn(obj); // => [1, 2, 3] + */ +declare function valuesIn(object: T | null | undefined): Array; +//#endregion +export { valuesIn }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/camelCase.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/camelCase.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..a86a656e15dcd0ea834ee28c47818f2d711335ff --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/camelCase.d.mts @@ -0,0 +1,19 @@ +//#region src/compat/string/camelCase.d.ts +/** + * Converts a string to camel case. + * + * Camel case is the naming convention in which the first word is written in lowercase and + * each subsequent word begins with a capital letter, concatenated without any separator characters. + * + * @param str - The string that is to be changed to camel case. + * @returns The converted string to camel case. + * + * @example + * const convertedStr1 = camelCase('camelCase') // returns 'camelCase' + * const convertedStr2 = camelCase('some whitespace') // returns 'someWhitespace' + * const convertedStr3 = camelCase('hyphen-text') // returns 'hyphenText' + * const convertedStr4 = camelCase('HTTPRequest') // returns 'httpRequest' + */ +declare function camelCase(str?: string): string; +//#endregion +export { camelCase }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/camelCase.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/camelCase.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a86a656e15dcd0ea834ee28c47818f2d711335ff --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/camelCase.d.ts @@ -0,0 +1,19 @@ +//#region src/compat/string/camelCase.d.ts +/** + * Converts a string to camel case. + * + * Camel case is the naming convention in which the first word is written in lowercase and + * each subsequent word begins with a capital letter, concatenated without any separator characters. + * + * @param str - The string that is to be changed to camel case. + * @returns The converted string to camel case. + * + * @example + * const convertedStr1 = camelCase('camelCase') // returns 'camelCase' + * const convertedStr2 = camelCase('some whitespace') // returns 'someWhitespace' + * const convertedStr3 = camelCase('hyphen-text') // returns 'hyphenText' + * const convertedStr4 = camelCase('HTTPRequest') // returns 'httpRequest' + */ +declare function camelCase(str?: string): string; +//#endregion +export { camelCase }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/camelCase.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/camelCase.js new file mode 100644 index 0000000000000000000000000000000000000000..36cbfeb40c9b7a5c68f1f6845103b1b117996bba --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/camelCase.js @@ -0,0 +1,28 @@ +const require_capitalize = require("../../string/capitalize.js"); +const require_deburr = require("./deburr.js"); +const require_words = require("./words.js"); +const require_normalizeForCase = require("../_internal/normalizeForCase.js"); +//#region src/compat/string/camelCase.ts +/** +* Converts a string to camel case. +* +* Camel case is the naming convention in which the first word is written in lowercase and +* each subsequent word begins with a capital letter, concatenated without any separator characters. +* +* @param str - The string that is to be changed to camel case. +* @returns The converted string to camel case. +* +* @example +* const convertedStr1 = camelCase('camelCase') // returns 'camelCase' +* const convertedStr2 = camelCase('some whitespace') // returns 'someWhitespace' +* const convertedStr3 = camelCase('hyphen-text') // returns 'hyphenText' +* const convertedStr4 = camelCase('HTTPRequest') // returns 'httpRequest' +*/ +function camelCase(str) { + const splitWords = require_words.words(require_normalizeForCase.normalizeForCase(require_deburr.deburr(str))); + if (splitWords.length === 0) return ""; + const [first, ...rest] = splitWords; + return `${first.toLowerCase()}${rest.map((word) => require_capitalize.capitalize(word)).join("")}`; +} +//#endregion +exports.camelCase = camelCase; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/camelCase.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/camelCase.mjs new file mode 100644 index 0000000000000000000000000000000000000000..dd20eefbc89de31641dcc08b84e4e43094b7e774 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/camelCase.mjs @@ -0,0 +1,28 @@ +import { capitalize } from "../../string/capitalize.mjs"; +import { deburr } from "./deburr.mjs"; +import { words } from "./words.mjs"; +import { normalizeForCase } from "../_internal/normalizeForCase.mjs"; +//#region src/compat/string/camelCase.ts +/** +* Converts a string to camel case. +* +* Camel case is the naming convention in which the first word is written in lowercase and +* each subsequent word begins with a capital letter, concatenated without any separator characters. +* +* @param str - The string that is to be changed to camel case. +* @returns The converted string to camel case. +* +* @example +* const convertedStr1 = camelCase('camelCase') // returns 'camelCase' +* const convertedStr2 = camelCase('some whitespace') // returns 'someWhitespace' +* const convertedStr3 = camelCase('hyphen-text') // returns 'hyphenText' +* const convertedStr4 = camelCase('HTTPRequest') // returns 'httpRequest' +*/ +function camelCase(str) { + const splitWords = words(normalizeForCase(deburr(str))); + if (splitWords.length === 0) return ""; + const [first, ...rest] = splitWords; + return `${first.toLowerCase()}${rest.map((word) => capitalize(word)).join("")}`; +} +//#endregion +export { camelCase }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/capitalize.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/capitalize.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..eeb58d077da39eb342203b5a2d95a588ecf76b7a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/capitalize.d.mts @@ -0,0 +1,15 @@ +//#region src/compat/string/capitalize.d.ts +/** + * Converts the first character of string to upper case and the remaining to lower case. + * + * @param string - The string to capitalize. + * @returns The capitalized string. + * + * @example + * const convertedStr1 = capitalize('fred') // returns 'Fred' + * const convertedStr2 = capitalize('FRED') // returns 'Fred' + * const convertedStr3 = capitalize('') // returns '' + */ +declare function capitalize(str?: T): string extends T ? string : Capitalize>; +//#endregion +export { capitalize }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/capitalize.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/capitalize.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..eeb58d077da39eb342203b5a2d95a588ecf76b7a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/capitalize.d.ts @@ -0,0 +1,15 @@ +//#region src/compat/string/capitalize.d.ts +/** + * Converts the first character of string to upper case and the remaining to lower case. + * + * @param string - The string to capitalize. + * @returns The capitalized string. + * + * @example + * const convertedStr1 = capitalize('fred') // returns 'Fred' + * const convertedStr2 = capitalize('FRED') // returns 'Fred' + * const convertedStr3 = capitalize('') // returns '' + */ +declare function capitalize(str?: T): string extends T ? string : Capitalize>; +//#endregion +export { capitalize }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/capitalize.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/capitalize.js new file mode 100644 index 0000000000000000000000000000000000000000..0d958ffa8104e3336ec899dec8351a7ae63a2ead --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/capitalize.js @@ -0,0 +1,19 @@ +const require_capitalize = require("../../string/capitalize.js"); +const require_toString = require("../util/toString.js"); +//#region src/compat/string/capitalize.ts +/** +* Converts the first character of string to upper case and the remaining to lower case. +* +* @param string - The string to capitalize. +* @returns The capitalized string. +* +* @example +* const convertedStr1 = capitalize('fred') // returns 'Fred' +* const convertedStr2 = capitalize('FRED') // returns 'Fred' +* const convertedStr3 = capitalize('') // returns '' +*/ +function capitalize(str) { + return require_capitalize.capitalize(require_toString.toString(str)); +} +//#endregion +exports.capitalize = capitalize; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/capitalize.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/capitalize.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b53331f8d035a503fbe02d50c5c5db4586257d33 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/capitalize.mjs @@ -0,0 +1,19 @@ +import { capitalize as capitalize$1 } from "../../string/capitalize.mjs"; +import { toString } from "../util/toString.mjs"; +//#region src/compat/string/capitalize.ts +/** +* Converts the first character of string to upper case and the remaining to lower case. +* +* @param string - The string to capitalize. +* @returns The capitalized string. +* +* @example +* const convertedStr1 = capitalize('fred') // returns 'Fred' +* const convertedStr2 = capitalize('FRED') // returns 'Fred' +* const convertedStr3 = capitalize('') // returns '' +*/ +function capitalize(str) { + return capitalize$1(toString(str)); +} +//#endregion +export { capitalize }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/deburr.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/deburr.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..67ac07d81f29561f222f522ea676c0c47a89007c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/deburr.d.mts @@ -0,0 +1,23 @@ +//#region src/compat/string/deburr.d.ts +/** + * Converts a string by replacing special characters and diacritical marks with their ASCII equivalents. + * For example, "Crème brûlée" becomes "Creme brulee". + * + * @param str - The input string to be deburred. + * @returns The deburred string with special characters replaced by their ASCII equivalents. + * + * @example + * // Basic usage: + * deburr('Æthelred') // returns 'Aethelred' + * + * @example + * // Handling diacritical marks: + * deburr('München') // returns 'Munchen' + * + * @example + * // Special characters: + * deburr('Crème brûlée') // returns 'Creme brulee' + */ +declare function deburr(str?: string): string; +//#endregion +export { deburr }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/deburr.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/deburr.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..67ac07d81f29561f222f522ea676c0c47a89007c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/deburr.d.ts @@ -0,0 +1,23 @@ +//#region src/compat/string/deburr.d.ts +/** + * Converts a string by replacing special characters and diacritical marks with their ASCII equivalents. + * For example, "Crème brûlée" becomes "Creme brulee". + * + * @param str - The input string to be deburred. + * @returns The deburred string with special characters replaced by their ASCII equivalents. + * + * @example + * // Basic usage: + * deburr('Æthelred') // returns 'Aethelred' + * + * @example + * // Handling diacritical marks: + * deburr('München') // returns 'Munchen' + * + * @example + * // Special characters: + * deburr('Crème brûlée') // returns 'Creme brulee' + */ +declare function deburr(str?: string): string; +//#endregion +export { deburr }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/deburr.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/deburr.js new file mode 100644 index 0000000000000000000000000000000000000000..84e64039dcbb29135ca543ece879cca3d3c9e167 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/deburr.js @@ -0,0 +1,27 @@ +const require_deburr = require("../../string/deburr.js"); +const require_toString = require("../util/toString.js"); +//#region src/compat/string/deburr.ts +/** +* Converts a string by replacing special characters and diacritical marks with their ASCII equivalents. +* For example, "Crème brûlée" becomes "Creme brulee". +* +* @param str - The input string to be deburred. +* @returns The deburred string with special characters replaced by their ASCII equivalents. +* +* @example +* // Basic usage: +* deburr('Æthelred') // returns 'Aethelred' +* +* @example +* // Handling diacritical marks: +* deburr('München') // returns 'Munchen' +* +* @example +* // Special characters: +* deburr('Crème brûlée') // returns 'Creme brulee' +*/ +function deburr(str) { + return require_deburr.deburr(require_toString.toString(str)); +} +//#endregion +exports.deburr = deburr; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/deburr.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/deburr.mjs new file mode 100644 index 0000000000000000000000000000000000000000..fe2dc915b886d211f513c399979fa0046ec324aa --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/deburr.mjs @@ -0,0 +1,27 @@ +import { deburr as deburr$1 } from "../../string/deburr.mjs"; +import { toString } from "../util/toString.mjs"; +//#region src/compat/string/deburr.ts +/** +* Converts a string by replacing special characters and diacritical marks with their ASCII equivalents. +* For example, "Crème brûlée" becomes "Creme brulee". +* +* @param str - The input string to be deburred. +* @returns The deburred string with special characters replaced by their ASCII equivalents. +* +* @example +* // Basic usage: +* deburr('Æthelred') // returns 'Aethelred' +* +* @example +* // Handling diacritical marks: +* deburr('München') // returns 'Munchen' +* +* @example +* // Special characters: +* deburr('Crème brûlée') // returns 'Creme brulee' +*/ +function deburr(str) { + return deburr$1(toString(str)); +} +//#endregion +export { deburr }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/endsWith.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/endsWith.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..09464aad8e989879651f095c4ffac139ea1efb11 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/endsWith.d.mts @@ -0,0 +1,21 @@ +//#region src/compat/string/endsWith.d.ts +/** + * Checks if a string contains another string at the end of the string. + * + * Checks if one string endsWith another string. Optional position parameter to offset searching before a certain index. + * + * @param str - The string that might contain the target string. + * @param target - The string to search for. + * @param position - An optional position from the start to search up to this index + * @returns True if the str string ends with the target string. + * + * @example + * const isPrefix = endsWith('fooBar', 'foo') // returns true + * const isPrefix = endsWith('fooBar', 'bar') // returns false + * const isPrefix = endsWith('fooBar', 'abc') // returns false + * const isPrefix = endsWith('fooBar', 'foo', 3) // returns true + * const isPrefix = endsWith('fooBar', 'abc', 5) // returns false + */ +declare function endsWith(str?: string, target?: string, position?: number): boolean; +//#endregion +export { endsWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/endsWith.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/endsWith.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..09464aad8e989879651f095c4ffac139ea1efb11 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/endsWith.d.ts @@ -0,0 +1,21 @@ +//#region src/compat/string/endsWith.d.ts +/** + * Checks if a string contains another string at the end of the string. + * + * Checks if one string endsWith another string. Optional position parameter to offset searching before a certain index. + * + * @param str - The string that might contain the target string. + * @param target - The string to search for. + * @param position - An optional position from the start to search up to this index + * @returns True if the str string ends with the target string. + * + * @example + * const isPrefix = endsWith('fooBar', 'foo') // returns true + * const isPrefix = endsWith('fooBar', 'bar') // returns false + * const isPrefix = endsWith('fooBar', 'abc') // returns false + * const isPrefix = endsWith('fooBar', 'foo', 3) // returns true + * const isPrefix = endsWith('fooBar', 'abc', 5) // returns false + */ +declare function endsWith(str?: string, target?: string, position?: number): boolean; +//#endregion +export { endsWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/endsWith.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/endsWith.js new file mode 100644 index 0000000000000000000000000000000000000000..efe18dab0b571425041e9435982361080ab8a2f5 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/endsWith.js @@ -0,0 +1,25 @@ +//#region src/compat/string/endsWith.ts +/** +* Checks if a string contains another string at the end of the string. +* +* Checks if one string endsWith another string. Optional position parameter to offset searching before a certain index. +* +* @param str - The string that might contain the target string. +* @param target - The string to search for. +* @param position - An optional position from the start to search up to this index +* @returns True if the str string ends with the target string. +* +* @example +* const isPrefix = endsWith('fooBar', 'foo') // returns true +* const isPrefix = endsWith('fooBar', 'bar') // returns false +* const isPrefix = endsWith('fooBar', 'abc') // returns false +* const isPrefix = endsWith('fooBar', 'foo', 3) // returns true +* const isPrefix = endsWith('fooBar', 'abc', 5) // returns false +*/ +function endsWith(str, target, position) { + if (str == null || target == null) return false; + if (position == null) position = str.length; + return str.endsWith(target, position); +} +//#endregion +exports.endsWith = endsWith; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/endsWith.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/endsWith.mjs new file mode 100644 index 0000000000000000000000000000000000000000..08504526f77fd9afe00e9364938bf45b60b4a962 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/endsWith.mjs @@ -0,0 +1,25 @@ +//#region src/compat/string/endsWith.ts +/** +* Checks if a string contains another string at the end of the string. +* +* Checks if one string endsWith another string. Optional position parameter to offset searching before a certain index. +* +* @param str - The string that might contain the target string. +* @param target - The string to search for. +* @param position - An optional position from the start to search up to this index +* @returns True if the str string ends with the target string. +* +* @example +* const isPrefix = endsWith('fooBar', 'foo') // returns true +* const isPrefix = endsWith('fooBar', 'bar') // returns false +* const isPrefix = endsWith('fooBar', 'abc') // returns false +* const isPrefix = endsWith('fooBar', 'foo', 3) // returns true +* const isPrefix = endsWith('fooBar', 'abc', 5) // returns false +*/ +function endsWith(str, target, position) { + if (str == null || target == null) return false; + if (position == null) position = str.length; + return str.endsWith(target, position); +} +//#endregion +export { endsWith }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/escape.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/escape.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..8ca6e8b41f2bc504a4e50029e7b6ee27c0ae4fa7 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/escape.d.mts @@ -0,0 +1,17 @@ +//#region src/compat/string/escape.d.ts +/** + * Converts the characters "&", "<", ">", '"', and "'" in `str` to their corresponding HTML entities. + * For example, "<" becomes "<". + * + * @param str The string to escape. + * @returns Returns the escaped string. + * + * @example + * escape('This is a

element.'); // returns 'This is a <div> element.' + * escape('This is a "quote"'); // returns 'This is a "quote"' + * escape("This is a 'quote'"); // returns 'This is a 'quote'' + * escape('This is a & symbol'); // returns 'This is a & symbol' + */ +declare function escape(string?: string): string; +//#endregion +export { escape }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/escape.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/escape.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8ca6e8b41f2bc504a4e50029e7b6ee27c0ae4fa7 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/escape.d.ts @@ -0,0 +1,17 @@ +//#region src/compat/string/escape.d.ts +/** + * Converts the characters "&", "<", ">", '"', and "'" in `str` to their corresponding HTML entities. + * For example, "<" becomes "<". + * + * @param str The string to escape. + * @returns Returns the escaped string. + * + * @example + * escape('This is a
element.'); // returns 'This is a <div> element.' + * escape('This is a "quote"'); // returns 'This is a "quote"' + * escape("This is a 'quote'"); // returns 'This is a 'quote'' + * escape('This is a & symbol'); // returns 'This is a & symbol' + */ +declare function escape(string?: string): string; +//#endregion +export { escape }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/escape.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/escape.js new file mode 100644 index 0000000000000000000000000000000000000000..f78a77990f3cd8605e98725d6e578dac73e74630 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/escape.js @@ -0,0 +1,21 @@ +const require_escape = require("../../string/escape.js"); +const require_toString = require("../util/toString.js"); +//#region src/compat/string/escape.ts +/** +* Converts the characters "&", "<", ">", '"', and "'" in `str` to their corresponding HTML entities. +* For example, "<" becomes "<". +* +* @param str The string to escape. +* @returns Returns the escaped string. +* +* @example +* escape('This is a
element.'); // returns 'This is a <div> element.' +* escape('This is a "quote"'); // returns 'This is a "quote"' +* escape("This is a 'quote'"); // returns 'This is a 'quote'' +* escape('This is a & symbol'); // returns 'This is a & symbol' +*/ +function escape(string) { + return require_escape.escape(require_toString.toString(string)); +} +//#endregion +exports.escape = escape; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/escape.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/escape.mjs new file mode 100644 index 0000000000000000000000000000000000000000..36b004473e8609bb6bbf4169aaf2257bc42e259e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/escape.mjs @@ -0,0 +1,21 @@ +import { escape as escape$1 } from "../../string/escape.mjs"; +import { toString } from "../util/toString.mjs"; +//#region src/compat/string/escape.ts +/** +* Converts the characters "&", "<", ">", '"', and "'" in `str` to their corresponding HTML entities. +* For example, "<" becomes "<". +* +* @param str The string to escape. +* @returns Returns the escaped string. +* +* @example +* escape('This is a
element.'); // returns 'This is a <div> element.' +* escape('This is a "quote"'); // returns 'This is a "quote"' +* escape("This is a 'quote'"); // returns 'This is a 'quote'' +* escape('This is a & symbol'); // returns 'This is a & symbol' +*/ +function escape(string) { + return escape$1(toString(string)); +} +//#endregion +export { escape }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/escapeRegExp.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/escapeRegExp.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..7450247c563f69bcbfc8c43c766c6faadf76cc60 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/escapeRegExp.d.mts @@ -0,0 +1,15 @@ +//#region src/compat/string/escapeRegExp.d.ts +/** + * Escapes the RegExp special characters "^", "$", "\\", ".", "*", "+", "?", "(", ")", "[", "]", "{", "}", and "|" in `str`. + * + * @param str The string to escape. + * @returns Returns the escaped string. + * + * @example + * import { escapeRegExp } from 'es-toolkit/string'; + * + * escapeRegExp('[es-toolkit](https://es-toolkit.dev/)'); // returns '\[es-toolkit\]\(https://es-toolkit\.dev/\)' + */ +declare function escapeRegExp(str?: string): string; +//#endregion +export { escapeRegExp }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/escapeRegExp.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/escapeRegExp.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7450247c563f69bcbfc8c43c766c6faadf76cc60 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/escapeRegExp.d.ts @@ -0,0 +1,15 @@ +//#region src/compat/string/escapeRegExp.d.ts +/** + * Escapes the RegExp special characters "^", "$", "\\", ".", "*", "+", "?", "(", ")", "[", "]", "{", "}", and "|" in `str`. + * + * @param str The string to escape. + * @returns Returns the escaped string. + * + * @example + * import { escapeRegExp } from 'es-toolkit/string'; + * + * escapeRegExp('[es-toolkit](https://es-toolkit.dev/)'); // returns '\[es-toolkit\]\(https://es-toolkit\.dev/\)' + */ +declare function escapeRegExp(str?: string): string; +//#endregion +export { escapeRegExp }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/escapeRegExp.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/escapeRegExp.js new file mode 100644 index 0000000000000000000000000000000000000000..d60dd9c8c0bf7de4014a7f5bf27dac57620da815 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/escapeRegExp.js @@ -0,0 +1,19 @@ +const require_escapeRegExp = require("../../string/escapeRegExp.js"); +const require_toString = require("../util/toString.js"); +//#region src/compat/string/escapeRegExp.ts +/** +* Escapes the RegExp special characters "^", "$", "\\", ".", "*", "+", "?", "(", ")", "[", "]", "{", "}", and "|" in `str`. +* +* @param str The string to escape. +* @returns Returns the escaped string. +* +* @example +* import { escapeRegExp } from 'es-toolkit/string'; +* +* escapeRegExp('[es-toolkit](https://es-toolkit.dev/)'); // returns '\[es-toolkit\]\(https://es-toolkit\.dev/\)' +*/ +function escapeRegExp(str) { + return require_escapeRegExp.escapeRegExp(require_toString.toString(str)); +} +//#endregion +exports.escapeRegExp = escapeRegExp; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/escapeRegExp.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/escapeRegExp.mjs new file mode 100644 index 0000000000000000000000000000000000000000..6c7f98d15ebe2d96aea8708b8d708210c13da8be --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/escapeRegExp.mjs @@ -0,0 +1,19 @@ +import { escapeRegExp as escapeRegExp$1 } from "../../string/escapeRegExp.mjs"; +import { toString } from "../util/toString.mjs"; +//#region src/compat/string/escapeRegExp.ts +/** +* Escapes the RegExp special characters "^", "$", "\\", ".", "*", "+", "?", "(", ")", "[", "]", "{", "}", and "|" in `str`. +* +* @param str The string to escape. +* @returns Returns the escaped string. +* +* @example +* import { escapeRegExp } from 'es-toolkit/string'; +* +* escapeRegExp('[es-toolkit](https://es-toolkit.dev/)'); // returns '\[es-toolkit\]\(https://es-toolkit\.dev/\)' +*/ +function escapeRegExp(str) { + return escapeRegExp$1(toString(str)); +} +//#endregion +export { escapeRegExp }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/kebabCase.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/kebabCase.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..86f360af0ad9af6631d6c758363e83c1fa89652d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/kebabCase.d.mts @@ -0,0 +1,18 @@ +//#region src/compat/string/kebabCase.d.ts +/** + * Converts a string to kebab case. + * + * Kebab case is the naming convention in which each word is written in lowercase and separated by a dash (-) character. + * + * @param str - The string that is to be changed to kebab case. + * @returns The converted string to kebab case. + * + * @example + * const convertedStr1 = kebabCase('camelCase') // returns 'camel-case' + * const convertedStr2 = kebabCase('some whitespace') // returns 'some-whitespace' + * const convertedStr3 = kebabCase('hyphen-text') // returns 'hyphen-text' + * const convertedStr4 = kebabCase('HTTPRequest') // returns 'http-request' + */ +declare function kebabCase(str?: string): string; +//#endregion +export { kebabCase }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/kebabCase.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/kebabCase.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..86f360af0ad9af6631d6c758363e83c1fa89652d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/kebabCase.d.ts @@ -0,0 +1,18 @@ +//#region src/compat/string/kebabCase.d.ts +/** + * Converts a string to kebab case. + * + * Kebab case is the naming convention in which each word is written in lowercase and separated by a dash (-) character. + * + * @param str - The string that is to be changed to kebab case. + * @returns The converted string to kebab case. + * + * @example + * const convertedStr1 = kebabCase('camelCase') // returns 'camel-case' + * const convertedStr2 = kebabCase('some whitespace') // returns 'some-whitespace' + * const convertedStr3 = kebabCase('hyphen-text') // returns 'hyphen-text' + * const convertedStr4 = kebabCase('HTTPRequest') // returns 'http-request' + */ +declare function kebabCase(str?: string): string; +//#endregion +export { kebabCase }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/kebabCase.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/kebabCase.js new file mode 100644 index 0000000000000000000000000000000000000000..6aa1706b1a39c2045ea72c49ea3cc8e2e6031bef --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/kebabCase.js @@ -0,0 +1,23 @@ +const require_deburr = require("./deburr.js"); +const require_words = require("./words.js"); +const require_normalizeForCase = require("../_internal/normalizeForCase.js"); +//#region src/compat/string/kebabCase.ts +/** +* Converts a string to kebab case. +* +* Kebab case is the naming convention in which each word is written in lowercase and separated by a dash (-) character. +* +* @param str - The string that is to be changed to kebab case. +* @returns The converted string to kebab case. +* +* @example +* const convertedStr1 = kebabCase('camelCase') // returns 'camel-case' +* const convertedStr2 = kebabCase('some whitespace') // returns 'some-whitespace' +* const convertedStr3 = kebabCase('hyphen-text') // returns 'hyphen-text' +* const convertedStr4 = kebabCase('HTTPRequest') // returns 'http-request' +*/ +function kebabCase(str) { + return require_words.words(require_normalizeForCase.normalizeForCase(require_deburr.deburr(str))).map((word) => word.toLowerCase()).join("-"); +} +//#endregion +exports.kebabCase = kebabCase; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/kebabCase.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/kebabCase.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b99ab8939fe7adb050555319a0e39f011749e545 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/kebabCase.mjs @@ -0,0 +1,23 @@ +import { deburr } from "./deburr.mjs"; +import { words } from "./words.mjs"; +import { normalizeForCase } from "../_internal/normalizeForCase.mjs"; +//#region src/compat/string/kebabCase.ts +/** +* Converts a string to kebab case. +* +* Kebab case is the naming convention in which each word is written in lowercase and separated by a dash (-) character. +* +* @param str - The string that is to be changed to kebab case. +* @returns The converted string to kebab case. +* +* @example +* const convertedStr1 = kebabCase('camelCase') // returns 'camel-case' +* const convertedStr2 = kebabCase('some whitespace') // returns 'some-whitespace' +* const convertedStr3 = kebabCase('hyphen-text') // returns 'hyphen-text' +* const convertedStr4 = kebabCase('HTTPRequest') // returns 'http-request' +*/ +function kebabCase(str) { + return words(normalizeForCase(deburr(str))).map((word) => word.toLowerCase()).join("-"); +} +//#endregion +export { kebabCase }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/lowerCase.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/lowerCase.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..79b5ca692113b6350340bee9b0b9431d78ecda32 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/lowerCase.d.mts @@ -0,0 +1,18 @@ +//#region src/compat/string/lowerCase.d.ts +/** + * Converts a string to lower case. + * + * Lower case is the naming convention in which each word is written in lowercase and separated by an space ( ) character. + * + * @param str - The string that is to be changed to lower case. + * @returns The converted string to lower case. + * + * @example + * const convertedStr1 = lowerCase('camelCase') // returns 'camel case' + * const convertedStr2 = lowerCase('some whitespace') // returns 'some whitespace' + * const convertedStr3 = lowerCase('hyphen-text') // returns 'hyphen text' + * const convertedStr4 = lowerCase('HTTPRequest') // returns 'http request' + */ +declare function lowerCase(str?: string): string; +//#endregion +export { lowerCase }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/lowerCase.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/lowerCase.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..79b5ca692113b6350340bee9b0b9431d78ecda32 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/lowerCase.d.ts @@ -0,0 +1,18 @@ +//#region src/compat/string/lowerCase.d.ts +/** + * Converts a string to lower case. + * + * Lower case is the naming convention in which each word is written in lowercase and separated by an space ( ) character. + * + * @param str - The string that is to be changed to lower case. + * @returns The converted string to lower case. + * + * @example + * const convertedStr1 = lowerCase('camelCase') // returns 'camel case' + * const convertedStr2 = lowerCase('some whitespace') // returns 'some whitespace' + * const convertedStr3 = lowerCase('hyphen-text') // returns 'hyphen text' + * const convertedStr4 = lowerCase('HTTPRequest') // returns 'http request' + */ +declare function lowerCase(str?: string): string; +//#endregion +export { lowerCase }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/lowerCase.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/lowerCase.js new file mode 100644 index 0000000000000000000000000000000000000000..30ec460d84167cd655edf575d9945582bb668e85 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/lowerCase.js @@ -0,0 +1,23 @@ +const require_deburr = require("./deburr.js"); +const require_words = require("./words.js"); +const require_normalizeForCase = require("../_internal/normalizeForCase.js"); +//#region src/compat/string/lowerCase.ts +/** +* Converts a string to lower case. +* +* Lower case is the naming convention in which each word is written in lowercase and separated by an space ( ) character. +* +* @param str - The string that is to be changed to lower case. +* @returns The converted string to lower case. +* +* @example +* const convertedStr1 = lowerCase('camelCase') // returns 'camel case' +* const convertedStr2 = lowerCase('some whitespace') // returns 'some whitespace' +* const convertedStr3 = lowerCase('hyphen-text') // returns 'hyphen text' +* const convertedStr4 = lowerCase('HTTPRequest') // returns 'http request' +*/ +function lowerCase(str) { + return require_words.words(require_normalizeForCase.normalizeForCase(require_deburr.deburr(str))).map((word) => word.toLowerCase()).join(" "); +} +//#endregion +exports.lowerCase = lowerCase; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/lowerCase.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/lowerCase.mjs new file mode 100644 index 0000000000000000000000000000000000000000..86f906b6ca5b2fae3ba23b1bc9c6686d5a13b9b1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/lowerCase.mjs @@ -0,0 +1,23 @@ +import { deburr } from "./deburr.mjs"; +import { words } from "./words.mjs"; +import { normalizeForCase } from "../_internal/normalizeForCase.mjs"; +//#region src/compat/string/lowerCase.ts +/** +* Converts a string to lower case. +* +* Lower case is the naming convention in which each word is written in lowercase and separated by an space ( ) character. +* +* @param str - The string that is to be changed to lower case. +* @returns The converted string to lower case. +* +* @example +* const convertedStr1 = lowerCase('camelCase') // returns 'camel case' +* const convertedStr2 = lowerCase('some whitespace') // returns 'some whitespace' +* const convertedStr3 = lowerCase('hyphen-text') // returns 'hyphen text' +* const convertedStr4 = lowerCase('HTTPRequest') // returns 'http request' +*/ +function lowerCase(str) { + return words(normalizeForCase(deburr(str))).map((word) => word.toLowerCase()).join(" "); +} +//#endregion +export { lowerCase }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/lowerFirst.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/lowerFirst.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..9ffe2c5d17c88d9cfd8b27037fb6c8dfe2f4dac0 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/lowerFirst.d.mts @@ -0,0 +1,15 @@ +//#region src/compat/string/lowerFirst.d.ts +/** + * Converts the first character of string to lower case. + * + * @param str - The string that is to be changed + * @returns The converted string. + * + * @example + * const convertedStr1 = lowerCase('fred') // returns 'fred' + * const convertedStr2 = lowerCase('Fred') // returns 'fred' + * const convertedStr3 = lowerCase('FRED') // returns 'fRED' + */ +declare function lowerFirst(str?: T): Uncapitalize; +//#endregion +export { lowerFirst }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/lowerFirst.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/lowerFirst.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9ffe2c5d17c88d9cfd8b27037fb6c8dfe2f4dac0 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/lowerFirst.d.ts @@ -0,0 +1,15 @@ +//#region src/compat/string/lowerFirst.d.ts +/** + * Converts the first character of string to lower case. + * + * @param str - The string that is to be changed + * @returns The converted string. + * + * @example + * const convertedStr1 = lowerCase('fred') // returns 'fred' + * const convertedStr2 = lowerCase('Fred') // returns 'fred' + * const convertedStr3 = lowerCase('FRED') // returns 'fRED' + */ +declare function lowerFirst(str?: T): Uncapitalize; +//#endregion +export { lowerFirst }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/lowerFirst.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/lowerFirst.js new file mode 100644 index 0000000000000000000000000000000000000000..f2d724d9f554e8f56136f11de0538a115eee4159 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/lowerFirst.js @@ -0,0 +1,19 @@ +const require_lowerFirst = require("../../string/lowerFirst.js"); +const require_toString = require("../util/toString.js"); +//#region src/compat/string/lowerFirst.ts +/** +* Converts the first character of string to lower case. +* +* @param str - The string that is to be changed +* @returns The converted string. +* +* @example +* const convertedStr1 = lowerCase('fred') // returns 'fred' +* const convertedStr2 = lowerCase('Fred') // returns 'fred' +* const convertedStr3 = lowerCase('FRED') // returns 'fRED' +*/ +function lowerFirst(str) { + return require_lowerFirst.lowerFirst(require_toString.toString(str)); +} +//#endregion +exports.lowerFirst = lowerFirst; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/lowerFirst.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/lowerFirst.mjs new file mode 100644 index 0000000000000000000000000000000000000000..61e2306f6f2322048d1558bfc532cd6e6d2c362d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/lowerFirst.mjs @@ -0,0 +1,19 @@ +import { lowerFirst as lowerFirst$1 } from "../../string/lowerFirst.mjs"; +import { toString } from "../util/toString.mjs"; +//#region src/compat/string/lowerFirst.ts +/** +* Converts the first character of string to lower case. +* +* @param str - The string that is to be changed +* @returns The converted string. +* +* @example +* const convertedStr1 = lowerCase('fred') // returns 'fred' +* const convertedStr2 = lowerCase('Fred') // returns 'fred' +* const convertedStr3 = lowerCase('FRED') // returns 'fRED' +*/ +function lowerFirst(str) { + return lowerFirst$1(toString(str)); +} +//#endregion +export { lowerFirst }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/pad.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/pad.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..6d3b36f4941bd5fb93140adc82a2c59ad1971bde --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/pad.d.mts @@ -0,0 +1,20 @@ +//#region src/compat/string/pad.d.ts +/** + * Pads string on the left and right sides if it's shorter than length. Padding characters are truncated if they can't be evenly divided by length. + * If the length is less than or equal to the original string's length, or if the padding character is an empty string, the original string is returned unchanged. + * + * @param str - The string to pad. + * @param [length] - The length of the resulting string once padded. + * @param [chars] - The character(s) to use for padding. + * @returns The padded string, or the original string if padding is not required. + * + * @example + * const result1 = pad('abc', 8); // result will be ' abc ' + * const result2 = pad('abc', 8, '_-'); // result will be '_-abc_-_' + * const result3 = pad('abc', 3); // result will be 'abc' + * const result4 = pad('abc', 2); // result will be 'abc' + * + */ +declare function pad(str?: string, length?: number, chars?: string): string; +//#endregion +export { pad }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/pad.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/pad.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6d3b36f4941bd5fb93140adc82a2c59ad1971bde --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/pad.d.ts @@ -0,0 +1,20 @@ +//#region src/compat/string/pad.d.ts +/** + * Pads string on the left and right sides if it's shorter than length. Padding characters are truncated if they can't be evenly divided by length. + * If the length is less than or equal to the original string's length, or if the padding character is an empty string, the original string is returned unchanged. + * + * @param str - The string to pad. + * @param [length] - The length of the resulting string once padded. + * @param [chars] - The character(s) to use for padding. + * @returns The padded string, or the original string if padding is not required. + * + * @example + * const result1 = pad('abc', 8); // result will be ' abc ' + * const result2 = pad('abc', 8, '_-'); // result will be '_-abc_-_' + * const result3 = pad('abc', 3); // result will be 'abc' + * const result4 = pad('abc', 2); // result will be 'abc' + * + */ +declare function pad(str?: string, length?: number, chars?: string): string; +//#endregion +export { pad }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/pad.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/pad.js new file mode 100644 index 0000000000000000000000000000000000000000..e7bd946f97025d8c049f2ae90d9d03077068cc6d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/pad.js @@ -0,0 +1,31 @@ +const require_toString = require("../util/toString.js"); +const require_toInteger = require("../util/toInteger.js"); +const require_createPadding = require("../_internal/createPadding.js"); +//#region src/compat/string/pad.ts +/** +* Pads string on the left and right sides if it's shorter than length. Padding characters are truncated if they can't be evenly divided by length. +* If the length is less than or equal to the original string's length, or if the padding character is an empty string, the original string is returned unchanged. +* +* @param str - The string to pad. +* @param [length] - The length of the resulting string once padded. +* @param [chars] - The character(s) to use for padding. +* @returns The padded string, or the original string if padding is not required. +* +* @example +* const result1 = pad('abc', 8); // result will be ' abc ' +* const result2 = pad('abc', 8, '_-'); // result will be '_-abc_-_' +* const result3 = pad('abc', 3); // result will be 'abc' +* const result4 = pad('abc', 2); // result will be 'abc' +* +*/ +function pad(str, length = 0, chars = " ") { + const value = require_toString.toString(str); + const targetLength = require_toInteger.toInteger(length); + const strLength = require_createPadding.stringSize(value); + if (targetLength <= strLength) return value; + const mid = (targetLength - strLength) / 2; + const padChars = `${chars}`; + return require_createPadding.createPadding(Math.floor(mid), padChars) + value + require_createPadding.createPadding(Math.ceil(mid), padChars); +} +//#endregion +exports.pad = pad; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/pad.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/pad.mjs new file mode 100644 index 0000000000000000000000000000000000000000..cfa4f96c1065d2bb23276506730423165ea2bc5f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/pad.mjs @@ -0,0 +1,31 @@ +import { toString } from "../util/toString.mjs"; +import { toInteger } from "../util/toInteger.mjs"; +import { createPadding, stringSize } from "../_internal/createPadding.mjs"; +//#region src/compat/string/pad.ts +/** +* Pads string on the left and right sides if it's shorter than length. Padding characters are truncated if they can't be evenly divided by length. +* If the length is less than or equal to the original string's length, or if the padding character is an empty string, the original string is returned unchanged. +* +* @param str - The string to pad. +* @param [length] - The length of the resulting string once padded. +* @param [chars] - The character(s) to use for padding. +* @returns The padded string, or the original string if padding is not required. +* +* @example +* const result1 = pad('abc', 8); // result will be ' abc ' +* const result2 = pad('abc', 8, '_-'); // result will be '_-abc_-_' +* const result3 = pad('abc', 3); // result will be 'abc' +* const result4 = pad('abc', 2); // result will be 'abc' +* +*/ +function pad(str, length = 0, chars = " ") { + const value = toString(str); + const targetLength = toInteger(length); + const strLength = stringSize(value); + if (targetLength <= strLength) return value; + const mid = (targetLength - strLength) / 2; + const padChars = `${chars}`; + return createPadding(Math.floor(mid), padChars) + value + createPadding(Math.ceil(mid), padChars); +} +//#endregion +export { pad }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/padEnd.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/padEnd.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..1dc749eceb932d568a5963edc271791682c27a1d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/padEnd.d.mts @@ -0,0 +1,21 @@ +//#region src/compat/string/padEnd.d.ts +/** + * Pads the end of a string with a given character until it reaches the specified length. + * + * If the length is less than or equal to the original string's length, or if the padding character is an empty string, + * the original string is returned unchanged. + * + * @param str - The string to pad. + * @param [length] - The length of the resulting string once padded. + * @param [chars] - The character(s) to use for padding. + * @returns The padded string, or the original string if padding is not required. + * + * @example + * const result1 = padEnd('abc', 6); // result will be 'abc ' + * const result2 = padEnd('abc', 6, '_-'); // result will be 'abc_-_' + * const result3 = padEnd('abc', 3); // result will be 'abc' + * const result4 = padEnd('abc', 2); // result will be 'abc' + */ +declare function padEnd(str?: string, length?: number, chars?: string): string; +//#endregion +export { padEnd }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/padEnd.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/padEnd.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1dc749eceb932d568a5963edc271791682c27a1d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/padEnd.d.ts @@ -0,0 +1,21 @@ +//#region src/compat/string/padEnd.d.ts +/** + * Pads the end of a string with a given character until it reaches the specified length. + * + * If the length is less than or equal to the original string's length, or if the padding character is an empty string, + * the original string is returned unchanged. + * + * @param str - The string to pad. + * @param [length] - The length of the resulting string once padded. + * @param [chars] - The character(s) to use for padding. + * @returns The padded string, or the original string if padding is not required. + * + * @example + * const result1 = padEnd('abc', 6); // result will be 'abc ' + * const result2 = padEnd('abc', 6, '_-'); // result will be 'abc_-_' + * const result3 = padEnd('abc', 3); // result will be 'abc' + * const result4 = padEnd('abc', 2); // result will be 'abc' + */ +declare function padEnd(str?: string, length?: number, chars?: string): string; +//#endregion +export { padEnd }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/padEnd.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/padEnd.js new file mode 100644 index 0000000000000000000000000000000000000000..eef5d9fb305b43b043daeb33e97da852e27e4aa6 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/padEnd.js @@ -0,0 +1,30 @@ +const require_toString = require("../util/toString.js"); +const require_toInteger = require("../util/toInteger.js"); +const require_createPadding = require("../_internal/createPadding.js"); +//#region src/compat/string/padEnd.ts +/** +* Pads the end of a string with a given character until it reaches the specified length. +* +* If the length is less than or equal to the original string's length, or if the padding character is an empty string, +* the original string is returned unchanged. +* +* @param str - The string to pad. +* @param [length] - The length of the resulting string once padded. +* @param [chars] - The character(s) to use for padding. +* @returns The padded string, or the original string if padding is not required. +* +* @example +* const result1 = padEnd('abc', 6); // result will be 'abc ' +* const result2 = padEnd('abc', 6, '_-'); // result will be 'abc_-_' +* const result3 = padEnd('abc', 3); // result will be 'abc' +* const result4 = padEnd('abc', 2); // result will be 'abc' +*/ +function padEnd(str, length = 0, chars = " ") { + const value = require_toString.toString(str); + const targetLength = require_toInteger.toInteger(length); + const strLength = require_createPadding.stringSize(value); + if (targetLength <= strLength) return value; + return value + require_createPadding.createPadding(targetLength - strLength, `${chars}`); +} +//#endregion +exports.padEnd = padEnd; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/padEnd.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/padEnd.mjs new file mode 100644 index 0000000000000000000000000000000000000000..53f541d2cebdc88a39298916a296b720806bb2f3 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/padEnd.mjs @@ -0,0 +1,30 @@ +import { toString } from "../util/toString.mjs"; +import { toInteger } from "../util/toInteger.mjs"; +import { createPadding, stringSize } from "../_internal/createPadding.mjs"; +//#region src/compat/string/padEnd.ts +/** +* Pads the end of a string with a given character until it reaches the specified length. +* +* If the length is less than or equal to the original string's length, or if the padding character is an empty string, +* the original string is returned unchanged. +* +* @param str - The string to pad. +* @param [length] - The length of the resulting string once padded. +* @param [chars] - The character(s) to use for padding. +* @returns The padded string, or the original string if padding is not required. +* +* @example +* const result1 = padEnd('abc', 6); // result will be 'abc ' +* const result2 = padEnd('abc', 6, '_-'); // result will be 'abc_-_' +* const result3 = padEnd('abc', 3); // result will be 'abc' +* const result4 = padEnd('abc', 2); // result will be 'abc' +*/ +function padEnd(str, length = 0, chars = " ") { + const value = toString(str); + const targetLength = toInteger(length); + const strLength = stringSize(value); + if (targetLength <= strLength) return value; + return value + createPadding(targetLength - strLength, `${chars}`); +} +//#endregion +export { padEnd }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/padStart.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/padStart.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..01c3c422ad554cde13a2b833be04e94c73a6d7c9 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/padStart.d.mts @@ -0,0 +1,21 @@ +//#region src/compat/string/padStart.d.ts +/** + * Pads the start of a string with a given character until it reaches the specified length. + * + * If the length is less than or equal to the original string's length, or if the padding character is an empty string, + * the original string is returned unchanged. + * + * @param str - The string to pad. + * @param [length] - The length of the resulting string once padded. + * @param [chars] - The character(s) to use for padding. + * @returns The padded string, or the original string if padding is not required. + * + * @example + * const result1 = padStart('abc', 6); // result will be ' abc' + * const result2 = padStart('abc', 6, '_-'); // result will be '_-_abc' + * const result3 = padStart('abc', 3); // result will be 'abc' + * const result4 = padStart('abc', 2); // result will be 'abc' + */ +declare function padStart(str?: string, length?: number, chars?: string): string; +//#endregion +export { padStart }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/padStart.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/padStart.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..01c3c422ad554cde13a2b833be04e94c73a6d7c9 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/padStart.d.ts @@ -0,0 +1,21 @@ +//#region src/compat/string/padStart.d.ts +/** + * Pads the start of a string with a given character until it reaches the specified length. + * + * If the length is less than or equal to the original string's length, or if the padding character is an empty string, + * the original string is returned unchanged. + * + * @param str - The string to pad. + * @param [length] - The length of the resulting string once padded. + * @param [chars] - The character(s) to use for padding. + * @returns The padded string, or the original string if padding is not required. + * + * @example + * const result1 = padStart('abc', 6); // result will be ' abc' + * const result2 = padStart('abc', 6, '_-'); // result will be '_-_abc' + * const result3 = padStart('abc', 3); // result will be 'abc' + * const result4 = padStart('abc', 2); // result will be 'abc' + */ +declare function padStart(str?: string, length?: number, chars?: string): string; +//#endregion +export { padStart }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/padStart.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/padStart.js new file mode 100644 index 0000000000000000000000000000000000000000..47ee7b9ddaf08c8e3f8eacb35aaf9384c11d54f2 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/padStart.js @@ -0,0 +1,30 @@ +const require_toString = require("../util/toString.js"); +const require_toInteger = require("../util/toInteger.js"); +const require_createPadding = require("../_internal/createPadding.js"); +//#region src/compat/string/padStart.ts +/** +* Pads the start of a string with a given character until it reaches the specified length. +* +* If the length is less than or equal to the original string's length, or if the padding character is an empty string, +* the original string is returned unchanged. +* +* @param str - The string to pad. +* @param [length] - The length of the resulting string once padded. +* @param [chars] - The character(s) to use for padding. +* @returns The padded string, or the original string if padding is not required. +* +* @example +* const result1 = padStart('abc', 6); // result will be ' abc' +* const result2 = padStart('abc', 6, '_-'); // result will be '_-_abc' +* const result3 = padStart('abc', 3); // result will be 'abc' +* const result4 = padStart('abc', 2); // result will be 'abc' +*/ +function padStart(str, length = 0, chars = " ") { + const value = require_toString.toString(str); + const targetLength = require_toInteger.toInteger(length); + const strLength = require_createPadding.stringSize(value); + if (targetLength <= strLength) return value; + return require_createPadding.createPadding(targetLength - strLength, `${chars}`) + value; +} +//#endregion +exports.padStart = padStart; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/padStart.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/padStart.mjs new file mode 100644 index 0000000000000000000000000000000000000000..533d051150012133565080eb8da8779764a11477 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/padStart.mjs @@ -0,0 +1,30 @@ +import { toString } from "../util/toString.mjs"; +import { toInteger } from "../util/toInteger.mjs"; +import { createPadding, stringSize } from "../_internal/createPadding.mjs"; +//#region src/compat/string/padStart.ts +/** +* Pads the start of a string with a given character until it reaches the specified length. +* +* If the length is less than or equal to the original string's length, or if the padding character is an empty string, +* the original string is returned unchanged. +* +* @param str - The string to pad. +* @param [length] - The length of the resulting string once padded. +* @param [chars] - The character(s) to use for padding. +* @returns The padded string, or the original string if padding is not required. +* +* @example +* const result1 = padStart('abc', 6); // result will be ' abc' +* const result2 = padStart('abc', 6, '_-'); // result will be '_-_abc' +* const result3 = padStart('abc', 3); // result will be 'abc' +* const result4 = padStart('abc', 2); // result will be 'abc' +*/ +function padStart(str, length = 0, chars = " ") { + const value = toString(str); + const targetLength = toInteger(length); + const strLength = stringSize(value); + if (targetLength <= strLength) return value; + return createPadding(targetLength - strLength, `${chars}`) + value; +} +//#endregion +export { padStart }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/repeat.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/repeat.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..13139c7f1768e27a3f8aae6484f76a7adc2cff85 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/repeat.d.mts @@ -0,0 +1,18 @@ +//#region src/compat/string/repeat.d.ts +/** + * Repeats the given string n times. + * + * If n is less than 1, an empty string is returned, or if the string is an empty string, + * the original string is returned unchanged. + * + * @param str - The string to repeat. + * @param n - The number of times to repeat the string. + * @returns The repeated string, or an empty string if n is less than 1. + * + * @example + * repeat('abc', 0); // '' + * repeat('abc', 2); // 'abcabc' + */ +declare function repeat(str?: string, n?: number): string; +//#endregion +export { repeat }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/repeat.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/repeat.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..13139c7f1768e27a3f8aae6484f76a7adc2cff85 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/repeat.d.ts @@ -0,0 +1,18 @@ +//#region src/compat/string/repeat.d.ts +/** + * Repeats the given string n times. + * + * If n is less than 1, an empty string is returned, or if the string is an empty string, + * the original string is returned unchanged. + * + * @param str - The string to repeat. + * @param n - The number of times to repeat the string. + * @returns The repeated string, or an empty string if n is less than 1. + * + * @example + * repeat('abc', 0); // '' + * repeat('abc', 2); // 'abcabc' + */ +declare function repeat(str?: string, n?: number): string; +//#endregion +export { repeat }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/repeat.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/repeat.js new file mode 100644 index 0000000000000000000000000000000000000000..5c88c9f35e515ca36237c59df60d53eb50bf9900 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/repeat.js @@ -0,0 +1,27 @@ +const require_toString = require("../util/toString.js"); +const require_toInteger = require("../util/toInteger.js"); +const require_isIterateeCall = require("../_internal/isIterateeCall.js"); +const require_MAX_SAFE_INTEGER = require("../_internal/MAX_SAFE_INTEGER.js"); +//#region src/compat/string/repeat.ts +/** +* Repeats the given string n times. +* +* If n is less than 1, an empty string is returned, or if the string is an empty string, +* the original string is returned unchanged. +* +* @param str - The string to repeat. +* @param n - The number of times to repeat the string. +* @returns The repeated string, or an empty string if n is less than 1. +* +* @example +* repeat('abc', 0); // '' +* repeat('abc', 2); // 'abcabc' +*/ +function repeat(str, n, guard) { + if (guard ? require_isIterateeCall.isIterateeCall(str, n, guard) : n === void 0) n = 1; + else n = require_toInteger.toInteger(n); + if (n < 1 || n > require_MAX_SAFE_INTEGER.MAX_SAFE_INTEGER) return ""; + return require_toString.toString(str).repeat(n); +} +//#endregion +exports.repeat = repeat; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/repeat.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/repeat.mjs new file mode 100644 index 0000000000000000000000000000000000000000..5493cbb109cfca3ec19aa0c4a604ad3e3d8454ce --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/repeat.mjs @@ -0,0 +1,27 @@ +import { toString } from "../util/toString.mjs"; +import { toInteger } from "../util/toInteger.mjs"; +import { isIterateeCall } from "../_internal/isIterateeCall.mjs"; +import { MAX_SAFE_INTEGER } from "../_internal/MAX_SAFE_INTEGER.mjs"; +//#region src/compat/string/repeat.ts +/** +* Repeats the given string n times. +* +* If n is less than 1, an empty string is returned, or if the string is an empty string, +* the original string is returned unchanged. +* +* @param str - The string to repeat. +* @param n - The number of times to repeat the string. +* @returns The repeated string, or an empty string if n is less than 1. +* +* @example +* repeat('abc', 0); // '' +* repeat('abc', 2); // 'abcabc' +*/ +function repeat(str, n, guard) { + if (guard ? isIterateeCall(str, n, guard) : n === void 0) n = 1; + else n = toInteger(n); + if (n < 1 || n > MAX_SAFE_INTEGER) return ""; + return toString(str).repeat(n); +} +//#endregion +export { repeat }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/replace.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/replace.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..cf1474ec3cd2111ce6e0305f6a5574d5c3a32c10 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/replace.d.mts @@ -0,0 +1,6 @@ +//#region src/compat/string/replace.d.ts +type ReplaceFunction = (match: string, ...args: any[]) => string; +declare function replace(string: string, pattern: RegExp | string, replacement: ReplaceFunction | string): string; +declare function replace(pattern: RegExp | string, replacement: ReplaceFunction | string): string; +//#endregion +export { replace }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/replace.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/replace.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..cf1474ec3cd2111ce6e0305f6a5574d5c3a32c10 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/replace.d.ts @@ -0,0 +1,6 @@ +//#region src/compat/string/replace.d.ts +type ReplaceFunction = (match: string, ...args: any[]) => string; +declare function replace(string: string, pattern: RegExp | string, replacement: ReplaceFunction | string): string; +declare function replace(pattern: RegExp | string, replacement: ReplaceFunction | string): string; +//#endregion +export { replace }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/replace.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/replace.js new file mode 100644 index 0000000000000000000000000000000000000000..7d4d064e774a550c5c68f9ba1f24e2c0b039a161 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/replace.js @@ -0,0 +1,22 @@ +const require_toString = require("../util/toString.js"); +//#region src/compat/string/replace.ts +/** +* Replaces the matched pattern with the replacement string. +* +* @param {} target - The target string. +* @param {} pattern - The pattern to match. +* @param {} replacement - The replacement string or a function that returns the replacement string. +* @returns The new string with the matched pattern replaced. +* +* @example +* replace('abcde', 'de', '123'); // 'abc123' +* replace('abcde', /[bd]/g, '-'); // 'a-c-e' +* replace('abcde', 'de', substring => substring.toUpperCase()); // 'abcDE' +* replace('abcde', /[bd]/g, substring => substring.toUpperCase()); // 'aBcDe' +*/ +function replace(target, pattern, replacement) { + if (arguments.length < 3) return require_toString.toString(target); + return require_toString.toString(target).replace(pattern, replacement); +} +//#endregion +exports.replace = replace; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/replace.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/replace.mjs new file mode 100644 index 0000000000000000000000000000000000000000..8178ba1c58953fd48178c5c9cd67cda36cd1e187 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/replace.mjs @@ -0,0 +1,22 @@ +import { toString } from "../util/toString.mjs"; +//#region src/compat/string/replace.ts +/** +* Replaces the matched pattern with the replacement string. +* +* @param {} target - The target string. +* @param {} pattern - The pattern to match. +* @param {} replacement - The replacement string or a function that returns the replacement string. +* @returns The new string with the matched pattern replaced. +* +* @example +* replace('abcde', 'de', '123'); // 'abc123' +* replace('abcde', /[bd]/g, '-'); // 'a-c-e' +* replace('abcde', 'de', substring => substring.toUpperCase()); // 'abcDE' +* replace('abcde', /[bd]/g, substring => substring.toUpperCase()); // 'aBcDe' +*/ +function replace(target, pattern, replacement) { + if (arguments.length < 3) return toString(target); + return toString(target).replace(pattern, replacement); +} +//#endregion +export { replace }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/snakeCase.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/snakeCase.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..15d6e887a97615188f900942a6b006a7fbc101f1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/snakeCase.d.mts @@ -0,0 +1,18 @@ +//#region src/compat/string/snakeCase.d.ts +/** + * Converts a string to snake case. + * + * Snake case is the naming convention in which each word is written in lowercase and separated by an underscore (_) character. + * + * @param str - The string that is to be changed to snake case. + * @returns The converted string to snake case. + * + * @example + * const convertedStr1 = snakeCase('camelCase') // returns 'camel_case' + * const convertedStr2 = snakeCase('some whitespace') // returns 'some_whitespace' + * const convertedStr3 = snakeCase('hyphen-text') // returns 'hyphen_text' + * const convertedStr4 = snakeCase('HTTPRequest') // returns 'http_request' + */ +declare function snakeCase(str?: string): string; +//#endregion +export { snakeCase }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/snakeCase.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/snakeCase.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..15d6e887a97615188f900942a6b006a7fbc101f1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/snakeCase.d.ts @@ -0,0 +1,18 @@ +//#region src/compat/string/snakeCase.d.ts +/** + * Converts a string to snake case. + * + * Snake case is the naming convention in which each word is written in lowercase and separated by an underscore (_) character. + * + * @param str - The string that is to be changed to snake case. + * @returns The converted string to snake case. + * + * @example + * const convertedStr1 = snakeCase('camelCase') // returns 'camel_case' + * const convertedStr2 = snakeCase('some whitespace') // returns 'some_whitespace' + * const convertedStr3 = snakeCase('hyphen-text') // returns 'hyphen_text' + * const convertedStr4 = snakeCase('HTTPRequest') // returns 'http_request' + */ +declare function snakeCase(str?: string): string; +//#endregion +export { snakeCase }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/snakeCase.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/snakeCase.js new file mode 100644 index 0000000000000000000000000000000000000000..04d3b8e8cf4b135d8121cb865efe67a2c78f4043 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/snakeCase.js @@ -0,0 +1,23 @@ +const require_deburr = require("./deburr.js"); +const require_words = require("./words.js"); +const require_normalizeForCase = require("../_internal/normalizeForCase.js"); +//#region src/compat/string/snakeCase.ts +/** +* Converts a string to snake case. +* +* Snake case is the naming convention in which each word is written in lowercase and separated by an underscore (_) character. +* +* @param str - The string that is to be changed to snake case. +* @returns The converted string to snake case. +* +* @example +* const convertedStr1 = snakeCase('camelCase') // returns 'camel_case' +* const convertedStr2 = snakeCase('some whitespace') // returns 'some_whitespace' +* const convertedStr3 = snakeCase('hyphen-text') // returns 'hyphen_text' +* const convertedStr4 = snakeCase('HTTPRequest') // returns 'http_request' +*/ +function snakeCase(str) { + return require_words.words(require_normalizeForCase.normalizeForCase(require_deburr.deburr(str))).map((word) => word.toLowerCase()).join("_"); +} +//#endregion +exports.snakeCase = snakeCase; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/snakeCase.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/snakeCase.mjs new file mode 100644 index 0000000000000000000000000000000000000000..292ce418d874f5e28b4cf1ec17d7247031081675 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/snakeCase.mjs @@ -0,0 +1,23 @@ +import { deburr } from "./deburr.mjs"; +import { words } from "./words.mjs"; +import { normalizeForCase } from "../_internal/normalizeForCase.mjs"; +//#region src/compat/string/snakeCase.ts +/** +* Converts a string to snake case. +* +* Snake case is the naming convention in which each word is written in lowercase and separated by an underscore (_) character. +* +* @param str - The string that is to be changed to snake case. +* @returns The converted string to snake case. +* +* @example +* const convertedStr1 = snakeCase('camelCase') // returns 'camel_case' +* const convertedStr2 = snakeCase('some whitespace') // returns 'some_whitespace' +* const convertedStr3 = snakeCase('hyphen-text') // returns 'hyphen_text' +* const convertedStr4 = snakeCase('HTTPRequest') // returns 'http_request' +*/ +function snakeCase(str) { + return words(normalizeForCase(deburr(str))).map((word) => word.toLowerCase()).join("_"); +} +//#endregion +export { snakeCase }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/split.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/split.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..75361d3174d93aee10d48a36dc8a6ec723183359 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/split.d.mts @@ -0,0 +1,37 @@ +//#region src/compat/string/split.d.ts +/** + * Splits the input string by the specified `separator` + * and returns a new array containing the split segments. + * + * @param [string=''] The string to split. + * @param [separator] The separator pattern to split by. + * @param [limit] The length to truncate results to. + * @returns Returns the string segments. + * + * @example + * split('a-b-c', '-'); + * // => ['a', 'b', 'c'] + * + * split('a-b-c', '-', 2); + * // => ['a', 'b'] + */ +declare function split(string: string | null | undefined, separator?: RegExp | string, limit?: number): string[]; +/** + * Splits the input string by the specified `separator` + * and returns a new array containing the split segments. + * + * @param [string=''] The string to split. + * @param [separator] The separator pattern to split by. + * @param [limit] The length to truncate results to. + * @returns Returns the string segments. + * + * @example + * split('a-b-c', '-'); + * // => ['a', 'b', 'c'] + * + * split('a-b-c', '-', 2); + * // => ['a', 'b'] + */ +declare function split(string: string | null | undefined, index: string | number, guard: object): string[]; +//#endregion +export { split }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/split.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/split.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..75361d3174d93aee10d48a36dc8a6ec723183359 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/split.d.ts @@ -0,0 +1,37 @@ +//#region src/compat/string/split.d.ts +/** + * Splits the input string by the specified `separator` + * and returns a new array containing the split segments. + * + * @param [string=''] The string to split. + * @param [separator] The separator pattern to split by. + * @param [limit] The length to truncate results to. + * @returns Returns the string segments. + * + * @example + * split('a-b-c', '-'); + * // => ['a', 'b', 'c'] + * + * split('a-b-c', '-', 2); + * // => ['a', 'b'] + */ +declare function split(string: string | null | undefined, separator?: RegExp | string, limit?: number): string[]; +/** + * Splits the input string by the specified `separator` + * and returns a new array containing the split segments. + * + * @param [string=''] The string to split. + * @param [separator] The separator pattern to split by. + * @param [limit] The length to truncate results to. + * @returns Returns the string segments. + * + * @example + * split('a-b-c', '-'); + * // => ['a', 'b', 'c'] + * + * split('a-b-c', '-', 2); + * // => ['a', 'b'] + */ +declare function split(string: string | null | undefined, index: string | number, guard: object): string[]; +//#endregion +export { split }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/split.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/split.js new file mode 100644 index 0000000000000000000000000000000000000000..3b2d329dc165719fd39ea0a3025e5cdc1d3ada52 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/split.js @@ -0,0 +1,7 @@ +const require_toString = require("../util/toString.js"); +//#region src/compat/string/split.ts +function split(string, separator, limit) { + return require_toString.toString(string).split(separator, limit); +} +//#endregion +exports.split = split; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/split.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/split.mjs new file mode 100644 index 0000000000000000000000000000000000000000..455c394862fdac463636aeacb0afc3ba550ae97b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/split.mjs @@ -0,0 +1,7 @@ +import { toString } from "../util/toString.mjs"; +//#region src/compat/string/split.ts +function split(string, separator, limit) { + return toString(string).split(separator, limit); +} +//#endregion +export { split }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/startCase.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/startCase.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..593b9bdb29f9e3280acb50bea8994659917e5d3a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/startCase.d.mts @@ -0,0 +1,17 @@ +//#region src/compat/string/startCase.d.ts +/** + * Converts the first character of each word in a string to uppercase and the remaining characters to lowercase. + * + * Start case is the naming convention in which each word is written with an initial capital letter. + * @param str - The string to convert. + * @returns The converted string. + * + * @example + * const result1 = startCase('hello world'); // result will be 'Hello World' + * const result2 = startCase('HELLO WORLD'); // result will be 'HELLO WORLD' + * const result3 = startCase('hello-world'); // result will be 'Hello World' + * const result4 = startCase('hello_world'); // result will be 'Hello World' + */ +declare function startCase(str?: string): string; +//#endregion +export { startCase }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/startCase.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/startCase.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..593b9bdb29f9e3280acb50bea8994659917e5d3a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/startCase.d.ts @@ -0,0 +1,17 @@ +//#region src/compat/string/startCase.d.ts +/** + * Converts the first character of each word in a string to uppercase and the remaining characters to lowercase. + * + * Start case is the naming convention in which each word is written with an initial capital letter. + * @param str - The string to convert. + * @returns The converted string. + * + * @example + * const result1 = startCase('hello world'); // result will be 'Hello World' + * const result2 = startCase('HELLO WORLD'); // result will be 'HELLO WORLD' + * const result3 = startCase('hello-world'); // result will be 'Hello World' + * const result4 = startCase('hello_world'); // result will be 'Hello World' + */ +declare function startCase(str?: string): string; +//#endregion +export { startCase }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/startCase.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/startCase.js new file mode 100644 index 0000000000000000000000000000000000000000..626c2e192dc28b4b842a536bcf81a51a6befa691 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/startCase.js @@ -0,0 +1,30 @@ +const require_deburr = require("./deburr.js"); +const require_words = require("./words.js"); +const require_normalizeForCase = require("../_internal/normalizeForCase.js"); +//#region src/compat/string/startCase.ts +/** +* Converts the first character of each word in a string to uppercase and the remaining characters to lowercase. +* +* Start case is the naming convention in which each word is written with an initial capital letter. +* @param str - The string to convert. +* @returns The converted string. +* +* @example +* const result1 = startCase('hello world'); // result will be 'Hello World' +* const result2 = startCase('HELLO WORLD'); // result will be 'HELLO WORLD' +* const result3 = startCase('hello-world'); // result will be 'Hello World' +* const result4 = startCase('hello_world'); // result will be 'Hello World' +*/ +function startCase(str) { + const words$1 = require_words.words(require_normalizeForCase.normalizeForCase(require_deburr.deburr(str)).trim()); + let result = ""; + for (let i = 0; i < words$1.length; i++) { + const word = words$1[i]; + if (result) result += " "; + if (word === word.toUpperCase()) result += word; + else result += word[0].toUpperCase() + word.slice(1).toLowerCase(); + } + return result; +} +//#endregion +exports.startCase = startCase; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/startCase.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/startCase.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c8dfcecf9f436c9070a4df8251e46f4cef9398f9 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/startCase.mjs @@ -0,0 +1,30 @@ +import { deburr } from "./deburr.mjs"; +import { words } from "./words.mjs"; +import { normalizeForCase } from "../_internal/normalizeForCase.mjs"; +//#region src/compat/string/startCase.ts +/** +* Converts the first character of each word in a string to uppercase and the remaining characters to lowercase. +* +* Start case is the naming convention in which each word is written with an initial capital letter. +* @param str - The string to convert. +* @returns The converted string. +* +* @example +* const result1 = startCase('hello world'); // result will be 'Hello World' +* const result2 = startCase('HELLO WORLD'); // result will be 'HELLO WORLD' +* const result3 = startCase('hello-world'); // result will be 'Hello World' +* const result4 = startCase('hello_world'); // result will be 'Hello World' +*/ +function startCase(str) { + const words$1 = words(normalizeForCase(deburr(str)).trim()); + let result = ""; + for (let i = 0; i < words$1.length; i++) { + const word = words$1[i]; + if (result) result += " "; + if (word === word.toUpperCase()) result += word; + else result += word[0].toUpperCase() + word.slice(1).toLowerCase(); + } + return result; +} +//#endregion +export { startCase }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/startsWith.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/startsWith.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..c3d4175e9f5e18b8beb26a47c8008625d50db908 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/startsWith.d.mts @@ -0,0 +1,21 @@ +//#region src/compat/string/startsWith.d.ts +/** + * Checks if a string contains another string at the beginning of the string. + * + * Checks if one string startsWith another string. Optional position parameter to start searching from a certain index. + * + * @param str - The string that might contain the target string. + * @param target - The string to search for. + * @param position - An optional offset to start searching in the str string + * @returns True if the str string starts with the target string. + * + * @example + * const isPrefix = startsWith('fooBar', 'foo') // returns true + * const isPrefix = startsWith('fooBar', 'bar') // returns false + * const isPrefix = startsWith('fooBar', 'abc') // returns false + * const isPrefix = startsWith('fooBar', 'Bar', 2) // returns true + * const isPrefix = startsWith('fooBar', 'Bar', 5) // returns false + */ +declare function startsWith(str?: string, target?: string, position?: number): boolean; +//#endregion +export { startsWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/startsWith.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/startsWith.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c3d4175e9f5e18b8beb26a47c8008625d50db908 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/startsWith.d.ts @@ -0,0 +1,21 @@ +//#region src/compat/string/startsWith.d.ts +/** + * Checks if a string contains another string at the beginning of the string. + * + * Checks if one string startsWith another string. Optional position parameter to start searching from a certain index. + * + * @param str - The string that might contain the target string. + * @param target - The string to search for. + * @param position - An optional offset to start searching in the str string + * @returns True if the str string starts with the target string. + * + * @example + * const isPrefix = startsWith('fooBar', 'foo') // returns true + * const isPrefix = startsWith('fooBar', 'bar') // returns false + * const isPrefix = startsWith('fooBar', 'abc') // returns false + * const isPrefix = startsWith('fooBar', 'Bar', 2) // returns true + * const isPrefix = startsWith('fooBar', 'Bar', 5) // returns false + */ +declare function startsWith(str?: string, target?: string, position?: number): boolean; +//#endregion +export { startsWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/startsWith.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/startsWith.js new file mode 100644 index 0000000000000000000000000000000000000000..b0525aa2c621b61cd92ddd1bcc47d067bff67f8b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/startsWith.js @@ -0,0 +1,25 @@ +//#region src/compat/string/startsWith.ts +/** +* Checks if a string contains another string at the beginning of the string. +* +* Checks if one string startsWith another string. Optional position parameter to start searching from a certain index. +* +* @param str - The string that might contain the target string. +* @param target - The string to search for. +* @param position - An optional offset to start searching in the str string +* @returns True if the str string starts with the target string. +* +* @example +* const isPrefix = startsWith('fooBar', 'foo') // returns true +* const isPrefix = startsWith('fooBar', 'bar') // returns false +* const isPrefix = startsWith('fooBar', 'abc') // returns false +* const isPrefix = startsWith('fooBar', 'Bar', 2) // returns true +* const isPrefix = startsWith('fooBar', 'Bar', 5) // returns false +*/ +function startsWith(str, target, position) { + if (str == null || target == null) return false; + if (position == null) position = 0; + return str.startsWith(target, position); +} +//#endregion +exports.startsWith = startsWith; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/startsWith.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/startsWith.mjs new file mode 100644 index 0000000000000000000000000000000000000000..6ddc10a6bc224756a50c6cb67dbb7a5458998230 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/startsWith.mjs @@ -0,0 +1,25 @@ +//#region src/compat/string/startsWith.ts +/** +* Checks if a string contains another string at the beginning of the string. +* +* Checks if one string startsWith another string. Optional position parameter to start searching from a certain index. +* +* @param str - The string that might contain the target string. +* @param target - The string to search for. +* @param position - An optional offset to start searching in the str string +* @returns True if the str string starts with the target string. +* +* @example +* const isPrefix = startsWith('fooBar', 'foo') // returns true +* const isPrefix = startsWith('fooBar', 'bar') // returns false +* const isPrefix = startsWith('fooBar', 'abc') // returns false +* const isPrefix = startsWith('fooBar', 'Bar', 2) // returns true +* const isPrefix = startsWith('fooBar', 'Bar', 5) // returns false +*/ +function startsWith(str, target, position) { + if (str == null || target == null) return false; + if (position == null) position = 0; + return str.startsWith(target, position); +} +//#endregion +export { startsWith }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/template.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/template.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..a971acf7b20b5384e5aba9d2cdaae69ae2c5f330 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/template.d.mts @@ -0,0 +1,30 @@ +import { escape } from "./escape.mjs"; + +//#region src/compat/string/template.d.ts +declare const templateSettings: { + escape: RegExp; + evaluate: RegExp; + interpolate: RegExp; + variable: string; + imports: { + _: { + escape: typeof escape; + template: typeof template; + }; + }; +}; +interface TemplateOptions { + escape?: RegExp | null | undefined; + evaluate?: RegExp | null | undefined; + interpolate?: RegExp | null | undefined; + variable?: string | undefined; + imports?: Record | undefined; + sourceURL?: string; +} +interface TemplateExecutor { + (data?: object): string; + source: string; +} +declare function template(string?: string, options?: TemplateOptions): TemplateExecutor; +//#endregion +export { template }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/template.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/template.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f681a5a5e2876abe407fa622509f415c46e6e73e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/template.d.ts @@ -0,0 +1,30 @@ +import { escape } from "./escape.js"; + +//#region src/compat/string/template.d.ts +declare const templateSettings: { + escape: RegExp; + evaluate: RegExp; + interpolate: RegExp; + variable: string; + imports: { + _: { + escape: typeof escape; + template: typeof template; + }; + }; +}; +interface TemplateOptions { + escape?: RegExp | null | undefined; + evaluate?: RegExp | null | undefined; + interpolate?: RegExp | null | undefined; + variable?: string | undefined; + imports?: Record | undefined; + sourceURL?: string; +} +interface TemplateExecutor { + (data?: object): string; + source: string; +} +declare function template(string?: string, options?: TemplateOptions): TemplateExecutor; +//#endregion +export { template }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/template.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/template.js new file mode 100644 index 0000000000000000000000000000000000000000..a37d321b3ec01d7831c87d56eaab283317fb8a08 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/template.js @@ -0,0 +1,139 @@ +const require_toString = require("../util/toString.js"); +const require_isIterateeCall = require("../_internal/isIterateeCall.js"); +const require_attempt = require("../function/attempt.js"); +const require_defaults = require("../object/defaults.js"); +const require_escape = require("./escape.js"); +//#region src/compat/string/template.ts +const esTemplateRegExp = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; +const unEscapedRegExp = /['\n\r\u2028\u2029\\]/g; +const noMatchExp = /($^)/; +const escapeMap = new Map([ + ["\\", "\\"], + ["'", "'"], + ["\n", "n"], + ["\r", "r"], + ["\u2028", "u2028"], + ["\u2029", "u2029"] +]); +function escapeString(match) { + return `\\${escapeMap.get(match)}`; +} +const defaultInterpolateRegExp = /<%=([\s\S]+?)%>/g; +const templateSettings = { + escape: /<%-([\s\S]+?)%>/g, + evaluate: /<%([\s\S]+?)%>/g, + interpolate: defaultInterpolateRegExp, + variable: "", + imports: { _: { + escape: require_escape.escape, + template + } } +}; +/** +* Compiles a template string into a function that can interpolate data properties. +* +* This function allows you to create a template with custom delimiters for escaping, +* evaluating, and interpolating values. It can also handle custom variable names and +* imported functions. +* +* @param string - The template string. +* @param [options] - The options object. +* @param [options.escape] - The regular expression for "escape" delimiter. +* @param [options.evaluate] - The regular expression for "evaluate" delimiter. +* @param [options.interpolate] - The regular expression for "interpolate" delimiter. +* @param [options.variable] - The data object variable name. +* @param [options.imports] - The object of imported functions. +* @param [options.sourceURL] - The source URL of the template. +* @param [guard] - The guard to detect if the function is called with `options`. +* @returns Returns the compiled template function. +* +* @example +* // Use the "escape" delimiter to escape data properties. +* const compiled = template('<%- value %>'); +* compiled({ value: '
' }); // returns '<div>' +* +* @example +* // Use the "interpolate" delimiter to interpolate data properties. +* const compiled = template('<%= value %>'); +* compiled({ value: 'Hello, World!' }); // returns 'Hello, World!' +* +* @example +* // Use the "evaluate" delimiter to evaluate JavaScript code. +* const compiled = template('<% if (value) { %>Yes<% } else { %>No<% } %>'); +* compiled({ value: true }); // returns 'Yes' +* +* @example +* // Use the "variable" option to specify the data object variable name. +* const compiled = template('<%= data.value %>', { variable: 'data' }); +* compiled({ value: 'Hello, World!' }); // returns 'Hello, World!' +* +* @example +* // Use the "imports" option to import functions. +* const compiled = template('<%= _.toUpper(value) %>', { imports: { _: { toUpper } } }); +* compiled({ value: 'hello, world!' }); // returns 'HELLO, WORLD!' +* +* @example +* // Use the custom "escape" delimiter. +* const compiled = template('<@ value @>', { escape: /<@([\s\S]+?)@>/g }); +* compiled({ value: '
' }); // returns '<div>' +* +* @example +* // Use the custom "evaluate" delimiter. +* const compiled = template('<# if (value) { #>Yes<# } else { #>No<# } #>', { evaluate: /<#([\s\S]+?)#>/g }); +* compiled({ value: true }); // returns 'Yes' +* +* @example +* // Use the custom "interpolate" delimiter. +* const compiled = template('<$ value $>', { interpolate: /<\$([\s\S]+?)\$>/g }); +* compiled({ value: 'Hello, World!' }); // returns 'Hello, World!' +* +* @example +* // Use the "sourceURL" option to specify the source URL of the template. +* const compiled = template('hello <%= user %>!', { sourceURL: 'template.js' }); +*/ +function template(string, options, guard) { + string = require_toString.toString(string); + if (guard && require_isIterateeCall.isIterateeCall(string, options, guard)) options = templateSettings; + options = require_defaults.defaults({ ...options }, templateSettings); + const delimitersRegExp = new RegExp([ + options.escape?.source ?? noMatchExp.source, + options.interpolate?.source ?? noMatchExp.source, + options.interpolate === defaultInterpolateRegExp ? esTemplateRegExp.source : noMatchExp.source, + options.evaluate?.source ?? noMatchExp.source, + "$" + ].join("|"), "g"); + let lastIndex = 0; + let isEvaluated = false; + let source = `__p += ''`; + for (const match of string.matchAll(delimitersRegExp)) { + const [fullMatch, escapeValue, interpolateValue, esTemplateValue, evaluateValue] = match; + const { index } = match; + source += ` + '${string.slice(lastIndex, index).replace(unEscapedRegExp, escapeString)}'`; + if (escapeValue) source += ` + _.escape(${escapeValue})`; + if (interpolateValue) source += ` + ((${interpolateValue}) == null ? '' : ${interpolateValue})`; + else if (esTemplateValue) source += ` + ((${esTemplateValue}) == null ? '' : ${esTemplateValue})`; + if (evaluateValue) { + source += `;\n${evaluateValue};\n __p += ''`; + isEvaluated = true; + } + lastIndex = index + fullMatch.length; + } + const imports = require_defaults.defaults({ ...options.imports }, templateSettings.imports); + const importsKeys = Object.keys(imports); + const importValues = Object.values(imports); + const sourceURL = `//# sourceURL=${options.sourceURL ? String(options.sourceURL).replace(/[\r\n]/g, " ") : `es-toolkit.templateSource[${Date.now()}]`}\n`; + const compiledFunction = `function(${options.variable || "obj"}) { + let __p = ''; + ${options.variable ? "" : "if (obj == null) { obj = {}; }"} + ${isEvaluated ? `function print() { __p += Array.prototype.join.call(arguments, ''); }` : ""} + ${options.variable ? source : `with(obj) {\n${source}\n}`} + return __p; + }`; + const result = require_attempt.attempt(() => new Function(...importsKeys, `${sourceURL}return ${compiledFunction}`)(...importValues)); + result.source = compiledFunction; + if (result instanceof Error) throw result; + return result; +} +//#endregion +exports.template = template; +exports.templateSettings = templateSettings; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/template.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/template.mjs new file mode 100644 index 0000000000000000000000000000000000000000..587c137d16f2e49c8c6eac9d1cb1002ad8dcb09b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/template.mjs @@ -0,0 +1,138 @@ +import { toString } from "../util/toString.mjs"; +import { isIterateeCall } from "../_internal/isIterateeCall.mjs"; +import { attempt } from "../function/attempt.mjs"; +import { defaults } from "../object/defaults.mjs"; +import { escape } from "./escape.mjs"; +//#region src/compat/string/template.ts +const esTemplateRegExp = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; +const unEscapedRegExp = /['\n\r\u2028\u2029\\]/g; +const noMatchExp = /($^)/; +const escapeMap = new Map([ + ["\\", "\\"], + ["'", "'"], + ["\n", "n"], + ["\r", "r"], + ["\u2028", "u2028"], + ["\u2029", "u2029"] +]); +function escapeString(match) { + return `\\${escapeMap.get(match)}`; +} +const defaultInterpolateRegExp = /<%=([\s\S]+?)%>/g; +const templateSettings = { + escape: /<%-([\s\S]+?)%>/g, + evaluate: /<%([\s\S]+?)%>/g, + interpolate: defaultInterpolateRegExp, + variable: "", + imports: { _: { + escape, + template + } } +}; +/** +* Compiles a template string into a function that can interpolate data properties. +* +* This function allows you to create a template with custom delimiters for escaping, +* evaluating, and interpolating values. It can also handle custom variable names and +* imported functions. +* +* @param string - The template string. +* @param [options] - The options object. +* @param [options.escape] - The regular expression for "escape" delimiter. +* @param [options.evaluate] - The regular expression for "evaluate" delimiter. +* @param [options.interpolate] - The regular expression for "interpolate" delimiter. +* @param [options.variable] - The data object variable name. +* @param [options.imports] - The object of imported functions. +* @param [options.sourceURL] - The source URL of the template. +* @param [guard] - The guard to detect if the function is called with `options`. +* @returns Returns the compiled template function. +* +* @example +* // Use the "escape" delimiter to escape data properties. +* const compiled = template('<%- value %>'); +* compiled({ value: '
' }); // returns '<div>' +* +* @example +* // Use the "interpolate" delimiter to interpolate data properties. +* const compiled = template('<%= value %>'); +* compiled({ value: 'Hello, World!' }); // returns 'Hello, World!' +* +* @example +* // Use the "evaluate" delimiter to evaluate JavaScript code. +* const compiled = template('<% if (value) { %>Yes<% } else { %>No<% } %>'); +* compiled({ value: true }); // returns 'Yes' +* +* @example +* // Use the "variable" option to specify the data object variable name. +* const compiled = template('<%= data.value %>', { variable: 'data' }); +* compiled({ value: 'Hello, World!' }); // returns 'Hello, World!' +* +* @example +* // Use the "imports" option to import functions. +* const compiled = template('<%= _.toUpper(value) %>', { imports: { _: { toUpper } } }); +* compiled({ value: 'hello, world!' }); // returns 'HELLO, WORLD!' +* +* @example +* // Use the custom "escape" delimiter. +* const compiled = template('<@ value @>', { escape: /<@([\s\S]+?)@>/g }); +* compiled({ value: '
' }); // returns '<div>' +* +* @example +* // Use the custom "evaluate" delimiter. +* const compiled = template('<# if (value) { #>Yes<# } else { #>No<# } #>', { evaluate: /<#([\s\S]+?)#>/g }); +* compiled({ value: true }); // returns 'Yes' +* +* @example +* // Use the custom "interpolate" delimiter. +* const compiled = template('<$ value $>', { interpolate: /<\$([\s\S]+?)\$>/g }); +* compiled({ value: 'Hello, World!' }); // returns 'Hello, World!' +* +* @example +* // Use the "sourceURL" option to specify the source URL of the template. +* const compiled = template('hello <%= user %>!', { sourceURL: 'template.js' }); +*/ +function template(string, options, guard) { + string = toString(string); + if (guard && isIterateeCall(string, options, guard)) options = templateSettings; + options = defaults({ ...options }, templateSettings); + const delimitersRegExp = new RegExp([ + options.escape?.source ?? noMatchExp.source, + options.interpolate?.source ?? noMatchExp.source, + options.interpolate === defaultInterpolateRegExp ? esTemplateRegExp.source : noMatchExp.source, + options.evaluate?.source ?? noMatchExp.source, + "$" + ].join("|"), "g"); + let lastIndex = 0; + let isEvaluated = false; + let source = `__p += ''`; + for (const match of string.matchAll(delimitersRegExp)) { + const [fullMatch, escapeValue, interpolateValue, esTemplateValue, evaluateValue] = match; + const { index } = match; + source += ` + '${string.slice(lastIndex, index).replace(unEscapedRegExp, escapeString)}'`; + if (escapeValue) source += ` + _.escape(${escapeValue})`; + if (interpolateValue) source += ` + ((${interpolateValue}) == null ? '' : ${interpolateValue})`; + else if (esTemplateValue) source += ` + ((${esTemplateValue}) == null ? '' : ${esTemplateValue})`; + if (evaluateValue) { + source += `;\n${evaluateValue};\n __p += ''`; + isEvaluated = true; + } + lastIndex = index + fullMatch.length; + } + const imports = defaults({ ...options.imports }, templateSettings.imports); + const importsKeys = Object.keys(imports); + const importValues = Object.values(imports); + const sourceURL = `//# sourceURL=${options.sourceURL ? String(options.sourceURL).replace(/[\r\n]/g, " ") : `es-toolkit.templateSource[${Date.now()}]`}\n`; + const compiledFunction = `function(${options.variable || "obj"}) { + let __p = ''; + ${options.variable ? "" : "if (obj == null) { obj = {}; }"} + ${isEvaluated ? `function print() { __p += Array.prototype.join.call(arguments, ''); }` : ""} + ${options.variable ? source : `with(obj) {\n${source}\n}`} + return __p; + }`; + const result = attempt(() => new Function(...importsKeys, `${sourceURL}return ${compiledFunction}`)(...importValues)); + result.source = compiledFunction; + if (result instanceof Error) throw result; + return result; +} +//#endregion +export { template, templateSettings }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/templateSettings.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/templateSettings.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..23c690a46bf32a9982bbc28a630fd594ee063046 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/templateSettings.d.mts @@ -0,0 +1,18 @@ +import { escape } from "./escape.mjs"; +import { template } from "./template.mjs"; + +//#region src/compat/string/templateSettings.d.ts +declare const templateSettings: { + escape: RegExp; + evaluate: RegExp; + interpolate: RegExp; + variable: string; + imports: { + _: { + escape: typeof escape; + template: typeof template; + }; + }; +}; +//#endregion +export { templateSettings }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/templateSettings.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/templateSettings.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..87d33af056d196c28415b98531aab72cb9c55f09 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/templateSettings.d.ts @@ -0,0 +1,18 @@ +import { escape } from "./escape.js"; +import { template } from "./template.js"; + +//#region src/compat/string/templateSettings.d.ts +declare const templateSettings: { + escape: RegExp; + evaluate: RegExp; + interpolate: RegExp; + variable: string; + imports: { + _: { + escape: typeof escape; + template: typeof template; + }; + }; +}; +//#endregion +export { templateSettings }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/templateSettings.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/templateSettings.js new file mode 100644 index 0000000000000000000000000000000000000000..7868e6abe674a0095005f02ddb20376382fcecaa --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/templateSettings.js @@ -0,0 +1,4 @@ +//#region src/compat/string/templateSettings.ts +const templateSettings = require("./template.js").templateSettings; +//#endregion +exports.templateSettings = templateSettings; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/templateSettings.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/templateSettings.mjs new file mode 100644 index 0000000000000000000000000000000000000000..febd2c5f033b30936265289b1df02c6ba58ad734 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/templateSettings.mjs @@ -0,0 +1,5 @@ +import { templateSettings as templateSettings$1 } from "./template.mjs"; +//#region src/compat/string/templateSettings.ts +const templateSettings = templateSettings$1; +//#endregion +export { templateSettings }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/toLower.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/toLower.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..090071830716d9626407d691aa87cc0953ba2982 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/toLower.d.mts @@ -0,0 +1,21 @@ +//#region src/compat/string/toLower.d.ts +/** + * Converts the given value to a string and transforms it to lower case. + * The function can handle various input types by first converting them to strings. + * + * @param [value=''] The value to convert. + * @returns Returns the lower cased string. + * @example + * + * toLower('--FOO-BAR--'); + * // => '--foo-bar--' + * + * toLower(null); + * // => '' + * + * toLower([1, 2, 3]); + * // => '1,2,3' + */ +declare function toLower(value?: T): Lowercase; +//#endregion +export { toLower }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/toLower.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/toLower.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..090071830716d9626407d691aa87cc0953ba2982 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/toLower.d.ts @@ -0,0 +1,21 @@ +//#region src/compat/string/toLower.d.ts +/** + * Converts the given value to a string and transforms it to lower case. + * The function can handle various input types by first converting them to strings. + * + * @param [value=''] The value to convert. + * @returns Returns the lower cased string. + * @example + * + * toLower('--FOO-BAR--'); + * // => '--foo-bar--' + * + * toLower(null); + * // => '' + * + * toLower([1, 2, 3]); + * // => '1,2,3' + */ +declare function toLower(value?: T): Lowercase; +//#endregion +export { toLower }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/toLower.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/toLower.js new file mode 100644 index 0000000000000000000000000000000000000000..fc3e027869fce68987dcb01ed54f8a39bba5579e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/toLower.js @@ -0,0 +1,24 @@ +const require_toString = require("../util/toString.js"); +//#region src/compat/string/toLower.ts +/** +* Converts the given value to a string and transforms it to lower case. +* The function can handle various input types by first converting them to strings. +* +* @param [value=''] The value to convert. +* @returns Returns the lower cased string. +* @example +* +* toLower('--FOO-BAR--'); +* // => '--foo-bar--' +* +* toLower(null); +* // => '' +* +* toLower([1, 2, 3]); +* // => '1,2,3' +*/ +function toLower(value) { + return require_toString.toString(value).toLowerCase(); +} +//#endregion +exports.toLower = toLower; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/toLower.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/toLower.mjs new file mode 100644 index 0000000000000000000000000000000000000000..7cd94415bb16832b34aeea1662a2e74b0b528853 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/toLower.mjs @@ -0,0 +1,24 @@ +import { toString } from "../util/toString.mjs"; +//#region src/compat/string/toLower.ts +/** +* Converts the given value to a string and transforms it to lower case. +* The function can handle various input types by first converting them to strings. +* +* @param [value=''] The value to convert. +* @returns Returns the lower cased string. +* @example +* +* toLower('--FOO-BAR--'); +* // => '--foo-bar--' +* +* toLower(null); +* // => '' +* +* toLower([1, 2, 3]); +* // => '1,2,3' +*/ +function toLower(value) { + return toString(value).toLowerCase(); +} +//#endregion +export { toLower }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/toUpper.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/toUpper.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..b422a05230a20b3a3ffd6b0412ba4e393c2e0617 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/toUpper.d.mts @@ -0,0 +1,21 @@ +//#region src/compat/string/toUpper.d.ts +/** + * Converts `string`, as a whole, to upper case just like + * [String#toUpperCase](https://mdn.io/toUpperCase). + * + * @param [value=''] The value to convert. + * @returns Returns the upper cased string. + * @example + * + * toUpper('--foo-bar--'); + * // => '--FOO-BAR--' + * + * toUpper(null); + * // => '' + * + * toUpper([1, 2, 3]); + * // => '1,2,3' + */ +declare function toUpper(value?: T): Uppercase; +//#endregion +export { toUpper }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/toUpper.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/toUpper.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b422a05230a20b3a3ffd6b0412ba4e393c2e0617 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/toUpper.d.ts @@ -0,0 +1,21 @@ +//#region src/compat/string/toUpper.d.ts +/** + * Converts `string`, as a whole, to upper case just like + * [String#toUpperCase](https://mdn.io/toUpperCase). + * + * @param [value=''] The value to convert. + * @returns Returns the upper cased string. + * @example + * + * toUpper('--foo-bar--'); + * // => '--FOO-BAR--' + * + * toUpper(null); + * // => '' + * + * toUpper([1, 2, 3]); + * // => '1,2,3' + */ +declare function toUpper(value?: T): Uppercase; +//#endregion +export { toUpper }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/toUpper.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/toUpper.js new file mode 100644 index 0000000000000000000000000000000000000000..d2a787a027aedb163fd313f0c53a2c3d2d71df9c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/toUpper.js @@ -0,0 +1,24 @@ +const require_toString = require("../util/toString.js"); +//#region src/compat/string/toUpper.ts +/** +* Converts `string`, as a whole, to upper case just like +* [String#toUpperCase](https://mdn.io/toUpperCase). +* +* @param [value=''] The value to convert. +* @returns Returns the upper cased string. +* @example +* +* toUpper('--foo-bar--'); +* // => '--FOO-BAR--' +* +* toUpper(null); +* // => '' +* +* toUpper([1, 2, 3]); +* // => '1,2,3' +*/ +function toUpper(value) { + return require_toString.toString(value).toUpperCase(); +} +//#endregion +exports.toUpper = toUpper; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/toUpper.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/toUpper.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f3f7c63c50fc7b56f01bd1b2ea5d88098813ab45 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/toUpper.mjs @@ -0,0 +1,24 @@ +import { toString } from "../util/toString.mjs"; +//#region src/compat/string/toUpper.ts +/** +* Converts `string`, as a whole, to upper case just like +* [String#toUpperCase](https://mdn.io/toUpperCase). +* +* @param [value=''] The value to convert. +* @returns Returns the upper cased string. +* @example +* +* toUpper('--foo-bar--'); +* // => '--FOO-BAR--' +* +* toUpper(null); +* // => '' +* +* toUpper([1, 2, 3]); +* // => '1,2,3' +*/ +function toUpper(value) { + return toString(value).toUpperCase(); +} +//#endregion +export { toUpper }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trim.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trim.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..67600e4e687d83ec7111e1c06fcd9439fea080e7 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trim.d.mts @@ -0,0 +1,29 @@ +//#region src/compat/string/trim.d.ts +/** + * Removes leading and trailing whitespace or specified characters from a string. + * + * @param str - The string from which leading and trailing characters will be trimmed. + * @param chars - The character(s) to remove from the end of the string. Defaults to `" "`. + * @returns The resulting string after the specified leading and trailing characters have been removed. + * + * @example + * trim(" hello "); // "hello" + * trim("--hello--", "-"); // "hello" + * trim("##hello##", ["#", "o"]); // "hell" + */ +declare function trim(string?: string, chars?: string): string; +/** + * Removes leading and trailing whitespace or specified characters from a string. + * + * @param str - The string from which leading and trailing characters will be trimmed. + * @param chars - The character(s) to remove from the end of the string. Defaults to `" "`. + * @returns The resulting string after the specified leading and trailing characters have been removed. + * + * @example + * trim(" hello "); // "hello" + * trim("--hello--", "-"); // "hello" + * trim("##hello##", ["#", "o"]); // "hell" + */ +declare function trim(string: string, index: string | number, guard: object): string; +//#endregion +export { trim }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trim.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trim.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..67600e4e687d83ec7111e1c06fcd9439fea080e7 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trim.d.ts @@ -0,0 +1,29 @@ +//#region src/compat/string/trim.d.ts +/** + * Removes leading and trailing whitespace or specified characters from a string. + * + * @param str - The string from which leading and trailing characters will be trimmed. + * @param chars - The character(s) to remove from the end of the string. Defaults to `" "`. + * @returns The resulting string after the specified leading and trailing characters have been removed. + * + * @example + * trim(" hello "); // "hello" + * trim("--hello--", "-"); // "hello" + * trim("##hello##", ["#", "o"]); // "hell" + */ +declare function trim(string?: string, chars?: string): string; +/** + * Removes leading and trailing whitespace or specified characters from a string. + * + * @param str - The string from which leading and trailing characters will be trimmed. + * @param chars - The character(s) to remove from the end of the string. Defaults to `" "`. + * @returns The resulting string after the specified leading and trailing characters have been removed. + * + * @example + * trim(" hello "); // "hello" + * trim("--hello--", "-"); // "hello" + * trim("##hello##", ["#", "o"]); // "hell" + */ +declare function trim(string: string, index: string | number, guard: object): string; +//#endregion +export { trim }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trim.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trim.js new file mode 100644 index 0000000000000000000000000000000000000000..b0e881fe48b560c41224ecbdae5f1cc90e180d36 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trim.js @@ -0,0 +1,13 @@ +const require_trim = require("../../string/trim.js"); +//#region src/compat/string/trim.ts +function trim(str, chars, guard) { + if (str == null) return ""; + if (guard != null || chars == null) return str.toString().trim(); + switch (typeof chars) { + case "object": if (Array.isArray(chars)) return require_trim.trim(str, chars.flatMap((x) => x.toString().split(""))); + else return require_trim.trim(str, chars.toString().split("")); + default: return require_trim.trim(str, chars.toString().split("")); + } +} +//#endregion +exports.trim = trim; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trim.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trim.mjs new file mode 100644 index 0000000000000000000000000000000000000000..850092cc1ffa14c2fb15d6e1fec9dd35c655ea88 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trim.mjs @@ -0,0 +1,13 @@ +import { trim as trim$1 } from "../../string/trim.mjs"; +//#region src/compat/string/trim.ts +function trim(str, chars, guard) { + if (str == null) return ""; + if (guard != null || chars == null) return str.toString().trim(); + switch (typeof chars) { + case "object": if (Array.isArray(chars)) return trim$1(str, chars.flatMap((x) => x.toString().split(""))); + else return trim$1(str, chars.toString().split("")); + default: return trim$1(str, chars.toString().split("")); + } +} +//#endregion +export { trim }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trimEnd.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trimEnd.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..9e2c9fddfebccf3f074229963358fa565f897e09 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trimEnd.d.mts @@ -0,0 +1,31 @@ +//#region src/compat/string/trimEnd.d.ts +/** + * Removes trailing whitespace or specified characters from a string. + * + * @param string - The string to trim. + * @param chars - The characters to trim from the end of the string. + * @returns Returns the trimmed string. + * + * @example + * trimEnd(' abc '); + * // => ' abc' + * + * trimEnd('-_-abc-_-', '_-'); + * // => '-_-abc' + */ +declare function trimEnd(string?: string, chars?: string): string; +/** + * Removes trailing whitespace or specified characters from a string. + * + * @param string - The string to trim. + * @param index - The index parameter (used with guard). + * @param guard - Enables use as an iteratee for methods like `map`. + * @returns Returns the trimmed string. + * + * @example + * trimEnd(' abc ', 0, {}); + * // => ' abc' + */ +declare function trimEnd(string: string, index: string | number, guard: object): string; +//#endregion +export { trimEnd }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trimEnd.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trimEnd.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9e2c9fddfebccf3f074229963358fa565f897e09 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trimEnd.d.ts @@ -0,0 +1,31 @@ +//#region src/compat/string/trimEnd.d.ts +/** + * Removes trailing whitespace or specified characters from a string. + * + * @param string - The string to trim. + * @param chars - The characters to trim from the end of the string. + * @returns Returns the trimmed string. + * + * @example + * trimEnd(' abc '); + * // => ' abc' + * + * trimEnd('-_-abc-_-', '_-'); + * // => '-_-abc' + */ +declare function trimEnd(string?: string, chars?: string): string; +/** + * Removes trailing whitespace or specified characters from a string. + * + * @param string - The string to trim. + * @param index - The index parameter (used with guard). + * @param guard - Enables use as an iteratee for methods like `map`. + * @returns Returns the trimmed string. + * + * @example + * trimEnd(' abc ', 0, {}); + * // => ' abc' + */ +declare function trimEnd(string: string, index: string | number, guard: object): string; +//#endregion +export { trimEnd }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trimEnd.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trimEnd.js new file mode 100644 index 0000000000000000000000000000000000000000..6835f9d1ebf159e9f43206ea613b33b595d6216e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trimEnd.js @@ -0,0 +1,24 @@ +const require_trimEnd = require("../../string/trimEnd.js"); +//#region src/compat/string/trimEnd.ts +/** +* Removes trailing whitespace or specified characters from a string. +* +* @param str - The string from which trailing characters will be trimmed. +* @param chars - The character(s) to remove from the end of the string. +* @param guard - Enables use as an iteratee for methods like `map`. +* @returns Returns the trimmed string. +* +* @example +* trimEnd(' abc '); +* // => ' abc' +* +* trimEnd('-_-abc-_-', '_-'); +* // => '-_-abc' +*/ +function trimEnd(str, chars, guard) { + if (str == null) return ""; + if (guard != null || chars == null) return str.toString().trimEnd(); + return require_trimEnd.trimEnd(str, chars.toString().split("")); +} +//#endregion +exports.trimEnd = trimEnd; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trimEnd.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trimEnd.mjs new file mode 100644 index 0000000000000000000000000000000000000000..dea17488effc4879ddcbb44f56b005a0f88f59b9 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trimEnd.mjs @@ -0,0 +1,24 @@ +import { trimEnd as trimEnd$1 } from "../../string/trimEnd.mjs"; +//#region src/compat/string/trimEnd.ts +/** +* Removes trailing whitespace or specified characters from a string. +* +* @param str - The string from which trailing characters will be trimmed. +* @param chars - The character(s) to remove from the end of the string. +* @param guard - Enables use as an iteratee for methods like `map`. +* @returns Returns the trimmed string. +* +* @example +* trimEnd(' abc '); +* // => ' abc' +* +* trimEnd('-_-abc-_-', '_-'); +* // => '-_-abc' +*/ +function trimEnd(str, chars, guard) { + if (str == null) return ""; + if (guard != null || chars == null) return str.toString().trimEnd(); + return trimEnd$1(str, chars.toString().split("")); +} +//#endregion +export { trimEnd }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trimStart.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trimStart.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..614887a6aceca4aaf82d74f6d8947658036ff602 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trimStart.d.mts @@ -0,0 +1,31 @@ +//#region src/compat/string/trimStart.d.ts +/** + * Removes leading whitespace or specified characters from a string. + * + * @param string - The string to trim. + * @param chars - The characters to trim from the start of the string. + * @returns Returns the trimmed string. + * + * @example + * trimStart(' abc '); + * // => 'abc ' + * + * trimStart('-_-abc-_-', '_-'); + * // => 'abc-_-' + */ +declare function trimStart(string?: string, chars?: string): string; +/** + * Removes leading whitespace or specified characters from a string. + * + * @param string - The string to trim. + * @param index - The index parameter (used with guard). + * @param guard - Enables use as an iteratee for methods like `map`. + * @returns Returns the trimmed string. + * + * @example + * trimStart(' abc ', 0, {}); + * // => 'abc ' + */ +declare function trimStart(string: string, index: string | number, guard: object): string; +//#endregion +export { trimStart }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trimStart.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trimStart.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..614887a6aceca4aaf82d74f6d8947658036ff602 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trimStart.d.ts @@ -0,0 +1,31 @@ +//#region src/compat/string/trimStart.d.ts +/** + * Removes leading whitespace or specified characters from a string. + * + * @param string - The string to trim. + * @param chars - The characters to trim from the start of the string. + * @returns Returns the trimmed string. + * + * @example + * trimStart(' abc '); + * // => 'abc ' + * + * trimStart('-_-abc-_-', '_-'); + * // => 'abc-_-' + */ +declare function trimStart(string?: string, chars?: string): string; +/** + * Removes leading whitespace or specified characters from a string. + * + * @param string - The string to trim. + * @param index - The index parameter (used with guard). + * @param guard - Enables use as an iteratee for methods like `map`. + * @returns Returns the trimmed string. + * + * @example + * trimStart(' abc ', 0, {}); + * // => 'abc ' + */ +declare function trimStart(string: string, index: string | number, guard: object): string; +//#endregion +export { trimStart }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trimStart.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trimStart.js new file mode 100644 index 0000000000000000000000000000000000000000..5cb8f08f3375fd4d277bfc49b2714ed08f7701e8 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trimStart.js @@ -0,0 +1,24 @@ +const require_trimStart = require("../../string/trimStart.js"); +//#region src/compat/string/trimStart.ts +/** +* Removes leading whitespace or specified characters from a string. +* +* @param str - The string from which leading characters will be trimmed. +* @param chars - The character(s) to remove from the start of the string. +* @param guard - Enables use as an iteratee for methods like `map`. +* @returns Returns the trimmed string. +* +* @example +* trimStart(' abc '); +* // => 'abc ' +* +* trimStart('-_-abc-_-', '_-'); +* // => 'abc-_-' +*/ +function trimStart(str, chars, guard) { + if (str == null) return ""; + if (guard != null || chars == null) return str.toString().trimStart(); + return require_trimStart.trimStart(str, chars.toString().split("")); +} +//#endregion +exports.trimStart = trimStart; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trimStart.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trimStart.mjs new file mode 100644 index 0000000000000000000000000000000000000000..bd230d89d563c270d794d55bfc365cbb7b4428e4 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/trimStart.mjs @@ -0,0 +1,24 @@ +import { trimStart as trimStart$1 } from "../../string/trimStart.mjs"; +//#region src/compat/string/trimStart.ts +/** +* Removes leading whitespace or specified characters from a string. +* +* @param str - The string from which leading characters will be trimmed. +* @param chars - The character(s) to remove from the start of the string. +* @param guard - Enables use as an iteratee for methods like `map`. +* @returns Returns the trimmed string. +* +* @example +* trimStart(' abc '); +* // => 'abc ' +* +* trimStart('-_-abc-_-', '_-'); +* // => 'abc-_-' +*/ +function trimStart(str, chars, guard) { + if (str == null) return ""; + if (guard != null || chars == null) return str.toString().trimStart(); + return trimStart$1(str, chars.toString().split("")); +} +//#endregion +export { trimStart }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/truncate.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/truncate.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..3b5773cfa1a57ebdbc6409a057cf21a01d366b93 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/truncate.d.mts @@ -0,0 +1,35 @@ +//#region src/compat/string/truncate.d.ts +type TruncateOptions = { + length?: number; + separator?: string | RegExp; + omission?: string; +}; +/** + * This regex might more completely detect unicode, but it is slower and this project + * desires to mimic the behavior of lodash. + */ +/** + * Truncates `string` if it's longer than the given maximum string length. + * The last characters of the truncated string are replaced with the omission + * string which defaults to "...". + * + * @param [string=''] The string to truncate. + * @param [options={}] The options object. + * @param [options.length=30] The maximum string length. + * @param [options.omission='...'] The string to indicate text is omitted. + * @param [options.separator] The separator pattern to truncate to. + * + * @example + * const test = 'hi-diddly-ho there, neighborino'; + * const truncatedStr1 = truncate(test) // returns 'hi-diddly-ho there, neighbo...' + * const truncatedStr2 = truncate(test, { length: 24, separator: ' ' }) // returns 'hi-diddly-ho there,...' + * const truncatedStr3 = truncate(test, { length: 24, separator: /,? +/ }) // returns 'hi-diddly-ho there...' + * const truncatedStr4 = truncate(test, { omission: ' [...]' }) // returns 'hi-diddly-ho there, neig [...]' + * const truncatedStr5 = truncate('ABC', { length: 3 }) // returns 'ABC' + * const truncatedStr6 = truncate('ABC', { length: 2 }) // returns '...' + * const truncatedStr7 = truncate('¥§✈✉🤓', { length: 5 }) // returns '¥§✈✉🤓' + * const truncatedStr8 = truncate('¥§✈✉🤓', { length: 4, omission: '…' }) // returns '¥§✈…' + */ +declare function truncate(string?: string, options?: TruncateOptions): string; +//#endregion +export { truncate }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/truncate.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/truncate.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3b5773cfa1a57ebdbc6409a057cf21a01d366b93 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/truncate.d.ts @@ -0,0 +1,35 @@ +//#region src/compat/string/truncate.d.ts +type TruncateOptions = { + length?: number; + separator?: string | RegExp; + omission?: string; +}; +/** + * This regex might more completely detect unicode, but it is slower and this project + * desires to mimic the behavior of lodash. + */ +/** + * Truncates `string` if it's longer than the given maximum string length. + * The last characters of the truncated string are replaced with the omission + * string which defaults to "...". + * + * @param [string=''] The string to truncate. + * @param [options={}] The options object. + * @param [options.length=30] The maximum string length. + * @param [options.omission='...'] The string to indicate text is omitted. + * @param [options.separator] The separator pattern to truncate to. + * + * @example + * const test = 'hi-diddly-ho there, neighborino'; + * const truncatedStr1 = truncate(test) // returns 'hi-diddly-ho there, neighbo...' + * const truncatedStr2 = truncate(test, { length: 24, separator: ' ' }) // returns 'hi-diddly-ho there,...' + * const truncatedStr3 = truncate(test, { length: 24, separator: /,? +/ }) // returns 'hi-diddly-ho there...' + * const truncatedStr4 = truncate(test, { omission: ' [...]' }) // returns 'hi-diddly-ho there, neig [...]' + * const truncatedStr5 = truncate('ABC', { length: 3 }) // returns 'ABC' + * const truncatedStr6 = truncate('ABC', { length: 2 }) // returns '...' + * const truncatedStr7 = truncate('¥§✈✉🤓', { length: 5 }) // returns '¥§✈✉🤓' + * const truncatedStr8 = truncate('¥§✈✉🤓', { length: 4, omission: '…' }) // returns '¥§✈…' + */ +declare function truncate(string?: string, options?: TruncateOptions): string; +//#endregion +export { truncate }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/truncate.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/truncate.js new file mode 100644 index 0000000000000000000000000000000000000000..a0c23b653ea6d6b98522249d7b23ab208b7e679f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/truncate.js @@ -0,0 +1,65 @@ +const require_isObject = require("../predicate/isObject.js"); +const require_regexMultiByte = require("../_internal/regexMultiByte.js"); +//#region src/compat/string/truncate.ts +/** +* This regex might more completely detect unicode, but it is slower and this project +* desires to mimic the behavior of lodash. +*/ +/** +* Truncates `string` if it's longer than the given maximum string length. +* The last characters of the truncated string are replaced with the omission +* string which defaults to "...". +* +* @param [string=''] The string to truncate. +* @param [options={}] The options object. +* @param [options.length=30] The maximum string length. +* @param [options.omission='...'] The string to indicate text is omitted. +* @param [options.separator] The separator pattern to truncate to. +* +* @example +* const test = 'hi-diddly-ho there, neighborino'; +* const truncatedStr1 = truncate(test) // returns 'hi-diddly-ho there, neighbo...' +* const truncatedStr2 = truncate(test, { length: 24, separator: ' ' }) // returns 'hi-diddly-ho there,...' +* const truncatedStr3 = truncate(test, { length: 24, separator: /,? +/ }) // returns 'hi-diddly-ho there...' +* const truncatedStr4 = truncate(test, { omission: ' [...]' }) // returns 'hi-diddly-ho there, neig [...]' +* const truncatedStr5 = truncate('ABC', { length: 3 }) // returns 'ABC' +* const truncatedStr6 = truncate('ABC', { length: 2 }) // returns '...' +* const truncatedStr7 = truncate('¥§✈✉🤓', { length: 5 }) // returns '¥§✈✉🤓' +* const truncatedStr8 = truncate('¥§✈✉🤓', { length: 4, omission: '…' }) // returns '¥§✈…' +*/ +function truncate(string, options) { + string = string != null ? `${string}` : ""; + let length = 30; + let omission = "..."; + if (require_isObject.isObject(options)) { + length = parseLength(options.length); + omission = "omission" in options ? `${options.omission}` : "..."; + } + let i = string.length; + const lengthOmission = Array.from(omission).length; + const lengthBase = Math.max(length - lengthOmission, 0); + let strArray = void 0; + if (require_regexMultiByte.regexMultiByte.test(string)) { + strArray = Array.from(string); + i = strArray.length; + } + if (length >= i) return string; + if (i <= lengthOmission) return omission; + let base = strArray === void 0 ? string.slice(0, lengthBase) : strArray?.slice(0, lengthBase).join(""); + const separator = options?.separator; + if (!separator) { + base += omission; + return base; + } + const search = separator instanceof RegExp ? separator.source : separator; + const flags = "u" + (separator instanceof RegExp ? separator.flags.replace("u", "") : ""); + const withoutSeparator = new RegExp(`(?.*(?:(?!${search}).))(?:${search})`, flags).exec(base); + return (!withoutSeparator?.groups ? base : withoutSeparator.groups.result) + omission; +} +function parseLength(length) { + if (length == null) return 30; + if (length <= 0) return 0; + return length; +} +//#endregion +exports.truncate = truncate; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/truncate.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/truncate.mjs new file mode 100644 index 0000000000000000000000000000000000000000..4568e9961c09884b5a735f34a807960367d158e6 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/truncate.mjs @@ -0,0 +1,65 @@ +import { isObject } from "../predicate/isObject.mjs"; +import { regexMultiByte } from "../_internal/regexMultiByte.mjs"; +//#region src/compat/string/truncate.ts +/** +* This regex might more completely detect unicode, but it is slower and this project +* desires to mimic the behavior of lodash. +*/ +/** +* Truncates `string` if it's longer than the given maximum string length. +* The last characters of the truncated string are replaced with the omission +* string which defaults to "...". +* +* @param [string=''] The string to truncate. +* @param [options={}] The options object. +* @param [options.length=30] The maximum string length. +* @param [options.omission='...'] The string to indicate text is omitted. +* @param [options.separator] The separator pattern to truncate to. +* +* @example +* const test = 'hi-diddly-ho there, neighborino'; +* const truncatedStr1 = truncate(test) // returns 'hi-diddly-ho there, neighbo...' +* const truncatedStr2 = truncate(test, { length: 24, separator: ' ' }) // returns 'hi-diddly-ho there,...' +* const truncatedStr3 = truncate(test, { length: 24, separator: /,? +/ }) // returns 'hi-diddly-ho there...' +* const truncatedStr4 = truncate(test, { omission: ' [...]' }) // returns 'hi-diddly-ho there, neig [...]' +* const truncatedStr5 = truncate('ABC', { length: 3 }) // returns 'ABC' +* const truncatedStr6 = truncate('ABC', { length: 2 }) // returns '...' +* const truncatedStr7 = truncate('¥§✈✉🤓', { length: 5 }) // returns '¥§✈✉🤓' +* const truncatedStr8 = truncate('¥§✈✉🤓', { length: 4, omission: '…' }) // returns '¥§✈…' +*/ +function truncate(string, options) { + string = string != null ? `${string}` : ""; + let length = 30; + let omission = "..."; + if (isObject(options)) { + length = parseLength(options.length); + omission = "omission" in options ? `${options.omission}` : "..."; + } + let i = string.length; + const lengthOmission = Array.from(omission).length; + const lengthBase = Math.max(length - lengthOmission, 0); + let strArray = void 0; + if (regexMultiByte.test(string)) { + strArray = Array.from(string); + i = strArray.length; + } + if (length >= i) return string; + if (i <= lengthOmission) return omission; + let base = strArray === void 0 ? string.slice(0, lengthBase) : strArray?.slice(0, lengthBase).join(""); + const separator = options?.separator; + if (!separator) { + base += omission; + return base; + } + const search = separator instanceof RegExp ? separator.source : separator; + const flags = "u" + (separator instanceof RegExp ? separator.flags.replace("u", "") : ""); + const withoutSeparator = new RegExp(`(?.*(?:(?!${search}).))(?:${search})`, flags).exec(base); + return (!withoutSeparator?.groups ? base : withoutSeparator.groups.result) + omission; +} +function parseLength(length) { + if (length == null) return 30; + if (length <= 0) return 0; + return length; +} +//#endregion +export { truncate }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/unescape.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/unescape.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..85f9d5d5e3b5a37213c654672bbed6c8e92c9732 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/unescape.d.mts @@ -0,0 +1,17 @@ +//#region src/compat/string/unescape.d.ts +/** + * Converts the HTML entities `&`, `<`, `>`, `"`, and `'` in `str` to their corresponding characters. + * It is the inverse of `escape`. + * + * @param str The string to unescape. + * @returns Returns the unescaped string. + * + * @example + * unescape('This is a <div> element.'); // returns 'This is a
element.' + * unescape('This is a "quote"'); // returns 'This is a "quote"' + * unescape('This is a 'quote''); // returns 'This is a 'quote'' + * unescape('This is a & symbol'); // returns 'This is a & symbol' + */ +declare function unescape(str?: string): string; +//#endregion +export { unescape }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/unescape.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/unescape.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..85f9d5d5e3b5a37213c654672bbed6c8e92c9732 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/unescape.d.ts @@ -0,0 +1,17 @@ +//#region src/compat/string/unescape.d.ts +/** + * Converts the HTML entities `&`, `<`, `>`, `"`, and `'` in `str` to their corresponding characters. + * It is the inverse of `escape`. + * + * @param str The string to unescape. + * @returns Returns the unescaped string. + * + * @example + * unescape('This is a <div> element.'); // returns 'This is a
element.' + * unescape('This is a "quote"'); // returns 'This is a "quote"' + * unescape('This is a 'quote''); // returns 'This is a 'quote'' + * unescape('This is a & symbol'); // returns 'This is a & symbol' + */ +declare function unescape(str?: string): string; +//#endregion +export { unescape }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/unescape.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/unescape.js new file mode 100644 index 0000000000000000000000000000000000000000..a30ce8d3188de968bdd42d93885895be287044c4 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/unescape.js @@ -0,0 +1,21 @@ +const require_unescape = require("../../string/unescape.js"); +const require_toString = require("../util/toString.js"); +//#region src/compat/string/unescape.ts +/** +* Converts the HTML entities `&`, `<`, `>`, `"`, and `'` in `str` to their corresponding characters. +* It is the inverse of `escape`. +* +* @param str The string to unescape. +* @returns Returns the unescaped string. +* +* @example +* unescape('This is a <div> element.'); // returns 'This is a
element.' +* unescape('This is a "quote"'); // returns 'This is a "quote"' +* unescape('This is a 'quote''); // returns 'This is a 'quote'' +* unescape('This is a & symbol'); // returns 'This is a & symbol' +*/ +function unescape(str) { + return require_unescape.unescape(require_toString.toString(str)); +} +//#endregion +exports.unescape = unescape; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/unescape.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/unescape.mjs new file mode 100644 index 0000000000000000000000000000000000000000..086e7180964fae606ffc2008b126f8e3eb093d04 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/unescape.mjs @@ -0,0 +1,21 @@ +import { unescape as unescape$1 } from "../../string/unescape.mjs"; +import { toString } from "../util/toString.mjs"; +//#region src/compat/string/unescape.ts +/** +* Converts the HTML entities `&`, `<`, `>`, `"`, and `'` in `str` to their corresponding characters. +* It is the inverse of `escape`. +* +* @param str The string to unescape. +* @returns Returns the unescaped string. +* +* @example +* unescape('This is a <div> element.'); // returns 'This is a
element.' +* unescape('This is a "quote"'); // returns 'This is a "quote"' +* unescape('This is a 'quote''); // returns 'This is a 'quote'' +* unescape('This is a & symbol'); // returns 'This is a & symbol' +*/ +function unescape(str) { + return unescape$1(toString(str)); +} +//#endregion +export { unescape }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/upperCase.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/upperCase.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..f8addc79ccc5c8c9ec0a564ed98ab867fb6e7b37 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/upperCase.d.mts @@ -0,0 +1,18 @@ +//#region src/compat/string/upperCase.d.ts +/** + * Converts a string to upper case. + * + * Upper case is the naming convention in which each word is written in uppercase and separated by an space ( ) character. + * + * @param str - The string that is to be changed to upper case. + * @returns The converted string to upper case. + * + * @example + * const convertedStr1 = upperCase('camelCase') // returns 'CAMEL CASE' + * const convertedStr2 = upperCase('some whitespace') // returns 'SOME WHITESPACE' + * const convertedStr3 = upperCase('hyphen-text') // returns 'HYPHEN TEXT' + * const convertedStr4 = upperCase('HTTPRequest') // returns 'HTTP REQUEST' + */ +declare function upperCase(str?: string): string; +//#endregion +export { upperCase }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/upperCase.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/upperCase.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f8addc79ccc5c8c9ec0a564ed98ab867fb6e7b37 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/upperCase.d.ts @@ -0,0 +1,18 @@ +//#region src/compat/string/upperCase.d.ts +/** + * Converts a string to upper case. + * + * Upper case is the naming convention in which each word is written in uppercase and separated by an space ( ) character. + * + * @param str - The string that is to be changed to upper case. + * @returns The converted string to upper case. + * + * @example + * const convertedStr1 = upperCase('camelCase') // returns 'CAMEL CASE' + * const convertedStr2 = upperCase('some whitespace') // returns 'SOME WHITESPACE' + * const convertedStr3 = upperCase('hyphen-text') // returns 'HYPHEN TEXT' + * const convertedStr4 = upperCase('HTTPRequest') // returns 'HTTP REQUEST' + */ +declare function upperCase(str?: string): string; +//#endregion +export { upperCase }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/upperCase.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/upperCase.js new file mode 100644 index 0000000000000000000000000000000000000000..343603544f9c763f5513d1cdbe188ed51f78b1a4 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/upperCase.js @@ -0,0 +1,23 @@ +const require_deburr = require("./deburr.js"); +const require_words = require("./words.js"); +const require_normalizeForCase = require("../_internal/normalizeForCase.js"); +//#region src/compat/string/upperCase.ts +/** +* Converts a string to upper case. +* +* Upper case is the naming convention in which each word is written in uppercase and separated by an space ( ) character. +* +* @param str - The string that is to be changed to upper case. +* @returns The converted string to upper case. +* +* @example +* const convertedStr1 = upperCase('camelCase') // returns 'CAMEL CASE' +* const convertedStr2 = upperCase('some whitespace') // returns 'SOME WHITESPACE' +* const convertedStr3 = upperCase('hyphen-text') // returns 'HYPHEN TEXT' +* const convertedStr4 = upperCase('HTTPRequest') // returns 'HTTP REQUEST' +*/ +function upperCase(str) { + return require_words.words(require_normalizeForCase.normalizeForCase(require_deburr.deburr(str))).map((word) => word.toUpperCase()).join(" "); +} +//#endregion +exports.upperCase = upperCase; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/upperCase.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/upperCase.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c7280980f735e3a889791cd7217b5255a579fffc --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/upperCase.mjs @@ -0,0 +1,23 @@ +import { deburr } from "./deburr.mjs"; +import { words } from "./words.mjs"; +import { normalizeForCase } from "../_internal/normalizeForCase.mjs"; +//#region src/compat/string/upperCase.ts +/** +* Converts a string to upper case. +* +* Upper case is the naming convention in which each word is written in uppercase and separated by an space ( ) character. +* +* @param str - The string that is to be changed to upper case. +* @returns The converted string to upper case. +* +* @example +* const convertedStr1 = upperCase('camelCase') // returns 'CAMEL CASE' +* const convertedStr2 = upperCase('some whitespace') // returns 'SOME WHITESPACE' +* const convertedStr3 = upperCase('hyphen-text') // returns 'HYPHEN TEXT' +* const convertedStr4 = upperCase('HTTPRequest') // returns 'HTTP REQUEST' +*/ +function upperCase(str) { + return words(normalizeForCase(deburr(str))).map((word) => word.toUpperCase()).join(" "); +} +//#endregion +export { upperCase }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/upperFirst.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/upperFirst.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..30078a3d46a71f76bbfa01c8520f24201452244f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/upperFirst.d.mts @@ -0,0 +1,15 @@ +//#region src/compat/string/upperFirst.d.ts +/** + * Converts the first character of string to upper case. + * + * @param str - The string that is to be changed + * @returns The converted string. + * + * @example + * const convertedStr1 = upperFirst('fred') // returns 'Fred' + * const convertedStr2 = upperFirst('Fred') // returns 'Fred' + * const convertedStr3 = upperFirst('FRED') // returns 'FRED' + */ +declare function upperFirst(str?: T): Capitalize; +//#endregion +export { upperFirst }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/upperFirst.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/upperFirst.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..30078a3d46a71f76bbfa01c8520f24201452244f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/upperFirst.d.ts @@ -0,0 +1,15 @@ +//#region src/compat/string/upperFirst.d.ts +/** + * Converts the first character of string to upper case. + * + * @param str - The string that is to be changed + * @returns The converted string. + * + * @example + * const convertedStr1 = upperFirst('fred') // returns 'Fred' + * const convertedStr2 = upperFirst('Fred') // returns 'Fred' + * const convertedStr3 = upperFirst('FRED') // returns 'FRED' + */ +declare function upperFirst(str?: T): Capitalize; +//#endregion +export { upperFirst }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/upperFirst.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/upperFirst.js new file mode 100644 index 0000000000000000000000000000000000000000..ea85cab03d23ac98d662a6e9b5e098c3b77e6834 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/upperFirst.js @@ -0,0 +1,19 @@ +const require_upperFirst = require("../../string/upperFirst.js"); +const require_toString = require("../util/toString.js"); +//#region src/compat/string/upperFirst.ts +/** +* Converts the first character of string to upper case. +* +* @param str - The string that is to be changed +* @returns The converted string. +* +* @example +* const convertedStr1 = upperFirst('fred') // returns 'Fred' +* const convertedStr2 = upperFirst('Fred') // returns 'Fred' +* const convertedStr3 = upperFirst('FRED') // returns 'FRED' +*/ +function upperFirst(str) { + return require_upperFirst.upperFirst(require_toString.toString(str)); +} +//#endregion +exports.upperFirst = upperFirst; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/upperFirst.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/upperFirst.mjs new file mode 100644 index 0000000000000000000000000000000000000000..a76a38d296e951a8d39ada46a1a090c9e78486ae --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/upperFirst.mjs @@ -0,0 +1,19 @@ +import { upperFirst as upperFirst$1 } from "../../string/upperFirst.mjs"; +import { toString } from "../util/toString.mjs"; +//#region src/compat/string/upperFirst.ts +/** +* Converts the first character of string to upper case. +* +* @param str - The string that is to be changed +* @returns The converted string. +* +* @example +* const convertedStr1 = upperFirst('fred') // returns 'Fred' +* const convertedStr2 = upperFirst('Fred') // returns 'Fred' +* const convertedStr3 = upperFirst('FRED') // returns 'FRED' +*/ +function upperFirst(str) { + return upperFirst$1(toString(str)); +} +//#endregion +export { upperFirst }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/words.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/words.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..b731f2b886cf678487799d490cf14d77e8ca3f8d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/words.d.mts @@ -0,0 +1,28 @@ +//#region src/compat/string/words.d.ts +/** + * Splits `string` into an array of its words. + * + * @param str - The string or object that is to be split into words. + * @param [pattern] - The pattern to match words. + * @returns Returns the words of `string`. + * + * @example + * const wordsArray1 = words('fred, barney, & pebbles'); + * // => ['fred', 'barney', 'pebbles'] + * + */ +declare function words(string?: string, pattern?: string | RegExp): string[]; +/** + * Splits `string` into an array of its words. + * + * @param str - The string or object that is to be split into words. + * @param [pattern] - The pattern to match words. + * @returns Returns the words of `string`. + * + * @example + * const wordsArray1 = words('fred, barney, & pebbles'); + * // => ['fred', 'barney', 'pebbles'] + */ +declare function words(string: string, index: string | number, guard: object): string[]; +//#endregion +export { words }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/words.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/words.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b731f2b886cf678487799d490cf14d77e8ca3f8d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/words.d.ts @@ -0,0 +1,28 @@ +//#region src/compat/string/words.d.ts +/** + * Splits `string` into an array of its words. + * + * @param str - The string or object that is to be split into words. + * @param [pattern] - The pattern to match words. + * @returns Returns the words of `string`. + * + * @example + * const wordsArray1 = words('fred, barney, & pebbles'); + * // => ['fred', 'barney', 'pebbles'] + * + */ +declare function words(string?: string, pattern?: string | RegExp): string[]; +/** + * Splits `string` into an array of its words. + * + * @param str - The string or object that is to be split into words. + * @param [pattern] - The pattern to match words. + * @returns Returns the words of `string`. + * + * @example + * const wordsArray1 = words('fred, barney, & pebbles'); + * // => ['fred', 'barney', 'pebbles'] + */ +declare function words(string: string, index: string | number, guard: object): string[]; +//#endregion +export { words }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/words.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/words.js new file mode 100644 index 0000000000000000000000000000000000000000..530c9c2150de222e9e351aabf08a52abcded4fe4 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/words.js @@ -0,0 +1,46 @@ +const require_toString = require("../util/toString.js"); +//#region src/compat/string/words.ts +const rNonCharLatin = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\xd7\\xf7"; +const rUnicodeUpper = "\\p{Lu}"; +const rUnicodeLower = "\\p{Ll}"; +const rMisc = "(?:[\\p{Lm}\\p{Lo}]\\p{M}*)"; +const rNumber = "\\d"; +const rUnicodeOptContrLower = "(?:['’](?:d|ll|m|re|s|t|ve))?"; +const rUnicodeOptContrUpper = "(?:['’](?:D|LL|M|RE|S|T|VE))?"; +const rUnicodeBreak = `[\\p{Z}\\p{P}${rNonCharLatin}]`; +const rUnicodeMiscUpper = `(?:${rUnicodeUpper}|${rMisc})`; +const rUnicodeMiscLower = `(?:${rUnicodeLower}|${rMisc})`; +let rUnicodeWord; +function getUnicodeWordPattern() { + if (rUnicodeWord == null) rUnicodeWord = RegExp([ + `${rUnicodeUpper}?${rUnicodeLower}+${rUnicodeOptContrLower}(?=${rUnicodeBreak}|${rUnicodeUpper}|$)`, + `${rUnicodeMiscUpper}+${rUnicodeOptContrUpper}(?=${rUnicodeBreak}|${rUnicodeUpper}${rUnicodeMiscLower}|$)`, + `${rUnicodeUpper}?${rUnicodeMiscLower}+${rUnicodeOptContrLower}`, + `${rUnicodeUpper}+${rUnicodeOptContrUpper}`, + `${rNumber}*(?:1ST|2ND|3RD|(?![123])${rNumber}TH)(?=\\b|[a-z_])`, + `${rNumber}*(?:1st|2nd|3rd|(?![123])${rNumber}th)(?=\\b|[A-Z_])`, + `${rNumber}+`, + "\\p{Emoji_Presentation}", + "\\p{Extended_Pictographic}" + ].join("|"), "gu"); + return rUnicodeWord; +} +/** +* Splits `string` into an array of its words. +* +* @param str - The string or object that is to be split into words. +* @param [pattern] - The pattern to match words. +* @returns Returns the words of `string`. +* +* @example +* const wordsArray1 = words('fred, barney, & pebbles'); +* // => ['fred', 'barney', 'pebbles'] +*/ +function words(str, pattern, guard) { + const input = require_toString.toString(str); + if (guard || pattern === void 0) pattern = getUnicodeWordPattern(); + if (typeof pattern === "number") pattern = pattern.toString(); + return Array.from(input.match(pattern) ?? []).filter((x) => x !== ""); +} +//#endregion +exports.words = words; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/words.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/words.mjs new file mode 100644 index 0000000000000000000000000000000000000000..00043440c6738ae388176ec5c33b6d1f84f7b3d7 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/compat/string/words.mjs @@ -0,0 +1,46 @@ +import { toString } from "../util/toString.mjs"; +//#region src/compat/string/words.ts +const rNonCharLatin = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\xd7\\xf7"; +const rUnicodeUpper = "\\p{Lu}"; +const rUnicodeLower = "\\p{Ll}"; +const rMisc = "(?:[\\p{Lm}\\p{Lo}]\\p{M}*)"; +const rNumber = "\\d"; +const rUnicodeOptContrLower = "(?:['’](?:d|ll|m|re|s|t|ve))?"; +const rUnicodeOptContrUpper = "(?:['’](?:D|LL|M|RE|S|T|VE))?"; +const rUnicodeBreak = `[\\p{Z}\\p{P}${rNonCharLatin}]`; +const rUnicodeMiscUpper = `(?:${rUnicodeUpper}|${rMisc})`; +const rUnicodeMiscLower = `(?:${rUnicodeLower}|${rMisc})`; +let rUnicodeWord; +function getUnicodeWordPattern() { + if (rUnicodeWord == null) rUnicodeWord = RegExp([ + `${rUnicodeUpper}?${rUnicodeLower}+${rUnicodeOptContrLower}(?=${rUnicodeBreak}|${rUnicodeUpper}|$)`, + `${rUnicodeMiscUpper}+${rUnicodeOptContrUpper}(?=${rUnicodeBreak}|${rUnicodeUpper}${rUnicodeMiscLower}|$)`, + `${rUnicodeUpper}?${rUnicodeMiscLower}+${rUnicodeOptContrLower}`, + `${rUnicodeUpper}+${rUnicodeOptContrUpper}`, + `${rNumber}*(?:1ST|2ND|3RD|(?![123])${rNumber}TH)(?=\\b|[a-z_])`, + `${rNumber}*(?:1st|2nd|3rd|(?![123])${rNumber}th)(?=\\b|[A-Z_])`, + `${rNumber}+`, + "\\p{Emoji_Presentation}", + "\\p{Extended_Pictographic}" + ].join("|"), "gu"); + return rUnicodeWord; +} +/** +* Splits `string` into an array of its words. +* +* @param str - The string or object that is to be split into words. +* @param [pattern] - The pattern to match words. +* @returns Returns the words of `string`. +* +* @example +* const wordsArray1 = words('fred, barney, & pebbles'); +* // => ['fred', 'barney', 'pebbles'] +*/ +function words(str, pattern, guard) { + const input = toString(str); + if (guard || pattern === void 0) pattern = getUnicodeWordPattern(); + if (typeof pattern === "number") pattern = pattern.toString(); + return Array.from(input.match(pattern) ?? []).filter((x) => x !== ""); +} +//#endregion +export { words }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/_internal/lazy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/_internal/lazy.js new file mode 100644 index 0000000000000000000000000000000000000000..2a099e936df56ae4bc56efdaf992a627c14ee89d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/_internal/lazy.js @@ -0,0 +1,58 @@ +//#region src/fp/_internal/lazy.ts +/** +* Pairs an eager data-last function with a lazy transform (see +* {@link createLazyFunction}). +* +* The returned function behaves exactly like `eager` when called directly. When +* placed inside a {@link pipe}, the attached transform lets `pipe` fuse it with +* adjacent lazy functions into a single, short-circuiting pass. +* +* @template Eager - The eager data-last function type. +* @param eager - The eager `(array) => result` implementation. +* @param lazy - The lazy transform built by {@link createLazyFunction}. +* @param options - Set `shortCircuit: true` for functions that can end a run early. +* @returns `eager`, augmented in place with the lazy metadata. +*/ +function combineEagerAndLazyFunctions(eager, lazy, { shortCircuit } = {}) { + return Object.assign(eager, { + lazy, + shortCircuit + }); +} +/** +* Builds a {@link LazyTransform} from a per-element `step`. +* +* `step` receives each input `value`, its zero-based `index` within this stage, +* and an `emit` callback that forwards a result to the next stage. Call `emit` +* zero times (drop), once (`map`), or many times (`flatMap`). Return +* `false` to end the run after this element (used by short-circuiting functions +* like `take`); returning nothing continues. +* +* @template T - The type of values entering this stage. +* @template U - The type of values it emits. +* @param step - The per-element push function. +* @returns A lazy transform that `pipe` can fuse and drive. +* +* @example +* // map +* createLazyFunction((value, index, emit) => { +* emit(callback(value, index)); +* }); +*/ +function createLazyFunction(step) { + return (emit) => { + let index = 0; + let active = true; + const _emit = (value) => { + if (!active) return; + if (emit(value) === false) active = false; + }; + return (value) => { + if (step(value, index++, _emit) === false) active = false; + return active; + }; + }; +} +//#endregion +exports.combineEagerAndLazyFunctions = combineEagerAndLazyFunctions; +exports.createLazyFunction = createLazyFunction; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/_internal/lazy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/_internal/lazy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..0a3c8d418380572224e165a31bdd73b7c267d1fe --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/_internal/lazy.mjs @@ -0,0 +1,57 @@ +//#region src/fp/_internal/lazy.ts +/** +* Pairs an eager data-last function with a lazy transform (see +* {@link createLazyFunction}). +* +* The returned function behaves exactly like `eager` when called directly. When +* placed inside a {@link pipe}, the attached transform lets `pipe` fuse it with +* adjacent lazy functions into a single, short-circuiting pass. +* +* @template Eager - The eager data-last function type. +* @param eager - The eager `(array) => result` implementation. +* @param lazy - The lazy transform built by {@link createLazyFunction}. +* @param options - Set `shortCircuit: true` for functions that can end a run early. +* @returns `eager`, augmented in place with the lazy metadata. +*/ +function combineEagerAndLazyFunctions(eager, lazy, { shortCircuit } = {}) { + return Object.assign(eager, { + lazy, + shortCircuit + }); +} +/** +* Builds a {@link LazyTransform} from a per-element `step`. +* +* `step` receives each input `value`, its zero-based `index` within this stage, +* and an `emit` callback that forwards a result to the next stage. Call `emit` +* zero times (drop), once (`map`), or many times (`flatMap`). Return +* `false` to end the run after this element (used by short-circuiting functions +* like `take`); returning nothing continues. +* +* @template T - The type of values entering this stage. +* @template U - The type of values it emits. +* @param step - The per-element push function. +* @returns A lazy transform that `pipe` can fuse and drive. +* +* @example +* // map +* createLazyFunction((value, index, emit) => { +* emit(callback(value, index)); +* }); +*/ +function createLazyFunction(step) { + return (emit) => { + let index = 0; + let active = true; + const _emit = (value) => { + if (!active) return; + if (emit(value) === false) active = false; + }; + return (value) => { + if (step(value, index++, _emit) === false) active = false; + return active; + }; + }; +} +//#endregion +export { combineEagerAndLazyFunctions, createLazyFunction }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/at.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/at.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..b4ccbeaa35611c21e260b1ca8d397fae2116f700 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/at.d.mts @@ -0,0 +1,20 @@ +//#region src/fp/array/at.d.ts +/** + * Creates a function that retrieves elements from the piped array at the specified indices. + * + * Negative indices count back from the end of the array, matching the main {@link at} + * implementation. Use the returned function with {@link pipe}. + * + * @template T - The type of elements in the array. + * @param indices - The indices of the elements to retrieve from the piped array. + * @returns A function that maps a readonly array to a new array of selected values. + * + * @example + * import { at, pipe } from 'es-toolkit/fp'; + * + * pipe([10, 20, 30, 40], at([1, -1])); + * // => [20, 40] + */ +declare function at(indices: readonly number[]): (array: readonly T[]) => T[]; +//#endregion +export { at }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/at.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/at.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b4ccbeaa35611c21e260b1ca8d397fae2116f700 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/at.d.ts @@ -0,0 +1,20 @@ +//#region src/fp/array/at.d.ts +/** + * Creates a function that retrieves elements from the piped array at the specified indices. + * + * Negative indices count back from the end of the array, matching the main {@link at} + * implementation. Use the returned function with {@link pipe}. + * + * @template T - The type of elements in the array. + * @param indices - The indices of the elements to retrieve from the piped array. + * @returns A function that maps a readonly array to a new array of selected values. + * + * @example + * import { at, pipe } from 'es-toolkit/fp'; + * + * pipe([10, 20, 30, 40], at([1, -1])); + * // => [20, 40] + */ +declare function at(indices: readonly number[]): (array: readonly T[]) => T[]; +//#endregion +export { at }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/at.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/at.js new file mode 100644 index 0000000000000000000000000000000000000000..a98741136ebffa42a297991627e98ce3cd4cd5ed --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/at.js @@ -0,0 +1,25 @@ +const require_at = require("../../array/at.js"); +//#region src/fp/array/at.ts +/** +* Creates a function that retrieves elements from the piped array at the specified indices. +* +* Negative indices count back from the end of the array, matching the main {@link at} +* implementation. Use the returned function with {@link pipe}. +* +* @template T - The type of elements in the array. +* @param indices - The indices of the elements to retrieve from the piped array. +* @returns A function that maps a readonly array to a new array of selected values. +* +* @example +* import { at, pipe } from 'es-toolkit/fp'; +* +* pipe([10, 20, 30, 40], at([1, -1])); +* // => [20, 40] +*/ +function at(indices) { + return function(array) { + return require_at.at(array, indices); + }; +} +//#endregion +exports.at = at; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/at.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/at.mjs new file mode 100644 index 0000000000000000000000000000000000000000..403ae0cc7b6a30086049c1dba8f675cf7bc9959e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/at.mjs @@ -0,0 +1,25 @@ +import { at as at$1 } from "../../array/at.mjs"; +//#region src/fp/array/at.ts +/** +* Creates a function that retrieves elements from the piped array at the specified indices. +* +* Negative indices count back from the end of the array, matching the main {@link at} +* implementation. Use the returned function with {@link pipe}. +* +* @template T - The type of elements in the array. +* @param indices - The indices of the elements to retrieve from the piped array. +* @returns A function that maps a readonly array to a new array of selected values. +* +* @example +* import { at, pipe } from 'es-toolkit/fp'; +* +* pipe([10, 20, 30, 40], at([1, -1])); +* // => [20, 40] +*/ +function at(indices) { + return function(array) { + return at$1(array, indices); + }; +} +//#endregion +export { at }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/cartesianProduct.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/cartesianProduct.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..c47e7e018c9980ed450a1a70cad6568f01222288 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/cartesianProduct.d.mts @@ -0,0 +1,61 @@ +//#region src/fp/array/cartesianProduct.d.ts +/** + * Creates a function that wraps each element of the piped array in a one-item tuple. + * + * @template T - The type of elements in the piped array. + * @returns A function that maps the piped array to one-item cartesian product tuples. + * + * @example + * import { cartesianProduct, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2], cartesianProduct()); + * // => [[1], [2]] + */ +declare function cartesianProduct(): (array: readonly T[]) => Array<[T]>; +/** + * Creates a function that computes the cartesian product of the piped array and one configured array. + * + * @template T - The type of elements in the piped array. + * @template U - The type of elements in the configured array. + * @param arr2 - The second array in the cartesian product. + * @returns A function that maps the piped array to two-item cartesian product tuples. + * + * @example + * pipe([1, 2], cartesianProduct(['a', 'b'])); + * // => [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']] + */ +declare function cartesianProduct(arr2: readonly U[]): (array: readonly T[]) => Array<[T, U]>; +/** + * Creates a function that computes the cartesian product of the piped array and two configured arrays. + * + * @template T - The type of elements in the piped array. + * @template U - The type of elements in the second array. + * @template V - The type of elements in the third array. + * @param arr2 - The second array in the cartesian product. + * @param arr3 - The third array in the cartesian product. + * @returns A function that maps the piped array to three-item cartesian product tuples. + */ +declare function cartesianProduct(arr2: readonly U[], arr3: readonly V[]): (array: readonly T[]) => Array<[T, U, V]>; +/** + * Creates a function that computes the cartesian product of the piped array and three configured arrays. + * + * @template T - The type of elements in the piped array. + * @template U - The type of elements in the second array. + * @template V - The type of elements in the third array. + * @template W - The type of elements in the fourth array. + * @param arr2 - The second array in the cartesian product. + * @param arr3 - The third array in the cartesian product. + * @param arr4 - The fourth array in the cartesian product. + * @returns A function that maps the piped array to four-item cartesian product tuples. + */ +declare function cartesianProduct(arr2: readonly U[], arr3: readonly V[], arr4: readonly W[]): (array: readonly T[]) => Array<[T, U, V, W]>; +/** + * Creates a function that computes the cartesian product of the piped array and any number of configured arrays. + * + * @template T - The shared element type of the arrays. + * @param arrs - Additional arrays included in the cartesian product. + * @returns A function that maps the piped array to cartesian product rows. + */ +declare function cartesianProduct(...arrs: Array): (array: readonly T[]) => T[][]; +//#endregion +export { cartesianProduct }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/cartesianProduct.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/cartesianProduct.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c47e7e018c9980ed450a1a70cad6568f01222288 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/cartesianProduct.d.ts @@ -0,0 +1,61 @@ +//#region src/fp/array/cartesianProduct.d.ts +/** + * Creates a function that wraps each element of the piped array in a one-item tuple. + * + * @template T - The type of elements in the piped array. + * @returns A function that maps the piped array to one-item cartesian product tuples. + * + * @example + * import { cartesianProduct, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2], cartesianProduct()); + * // => [[1], [2]] + */ +declare function cartesianProduct(): (array: readonly T[]) => Array<[T]>; +/** + * Creates a function that computes the cartesian product of the piped array and one configured array. + * + * @template T - The type of elements in the piped array. + * @template U - The type of elements in the configured array. + * @param arr2 - The second array in the cartesian product. + * @returns A function that maps the piped array to two-item cartesian product tuples. + * + * @example + * pipe([1, 2], cartesianProduct(['a', 'b'])); + * // => [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']] + */ +declare function cartesianProduct(arr2: readonly U[]): (array: readonly T[]) => Array<[T, U]>; +/** + * Creates a function that computes the cartesian product of the piped array and two configured arrays. + * + * @template T - The type of elements in the piped array. + * @template U - The type of elements in the second array. + * @template V - The type of elements in the third array. + * @param arr2 - The second array in the cartesian product. + * @param arr3 - The third array in the cartesian product. + * @returns A function that maps the piped array to three-item cartesian product tuples. + */ +declare function cartesianProduct(arr2: readonly U[], arr3: readonly V[]): (array: readonly T[]) => Array<[T, U, V]>; +/** + * Creates a function that computes the cartesian product of the piped array and three configured arrays. + * + * @template T - The type of elements in the piped array. + * @template U - The type of elements in the second array. + * @template V - The type of elements in the third array. + * @template W - The type of elements in the fourth array. + * @param arr2 - The second array in the cartesian product. + * @param arr3 - The third array in the cartesian product. + * @param arr4 - The fourth array in the cartesian product. + * @returns A function that maps the piped array to four-item cartesian product tuples. + */ +declare function cartesianProduct(arr2: readonly U[], arr3: readonly V[], arr4: readonly W[]): (array: readonly T[]) => Array<[T, U, V, W]>; +/** + * Creates a function that computes the cartesian product of the piped array and any number of configured arrays. + * + * @template T - The shared element type of the arrays. + * @param arrs - Additional arrays included in the cartesian product. + * @returns A function that maps the piped array to cartesian product rows. + */ +declare function cartesianProduct(...arrs: Array): (array: readonly T[]) => T[][]; +//#endregion +export { cartesianProduct }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/cartesianProduct.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/cartesianProduct.js new file mode 100644 index 0000000000000000000000000000000000000000..ed770ea4f634dc9fe27c8a59165628eee741170b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/cartesianProduct.js @@ -0,0 +1,9 @@ +const require_cartesianProduct = require("../../array/cartesianProduct.js"); +//#region src/fp/array/cartesianProduct.ts +function cartesianProduct(...arrs) { + return function(array) { + return require_cartesianProduct.cartesianProduct(array, ...arrs); + }; +} +//#endregion +exports.cartesianProduct = cartesianProduct; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/cartesianProduct.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/cartesianProduct.mjs new file mode 100644 index 0000000000000000000000000000000000000000..0c6ad8b0ba1c7178397acaf6b81dee85a25456fe --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/cartesianProduct.mjs @@ -0,0 +1,9 @@ +import { cartesianProduct as cartesianProduct$1 } from "../../array/cartesianProduct.mjs"; +//#region src/fp/array/cartesianProduct.ts +function cartesianProduct(...arrs) { + return function(array) { + return cartesianProduct$1(array, ...arrs); + }; +} +//#endregion +export { cartesianProduct }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/chunk.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/chunk.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..a25f2fa2ddc33932519d3bc1a8370079645c14aa --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/chunk.d.mts @@ -0,0 +1,19 @@ +//#region src/fp/array/chunk.d.ts +/** + * Creates a function that splits an array into sub-arrays of length `size`. The + * final chunk holds the remaining elements when the array cannot be divided + * evenly. Use it with {@link pipe}. + * + * @template T - The type of elements in the array. + * @param size - The length of each chunk. Must be a positive integer. + * @returns A function that maps a `readonly T[]` to a `T[][]`. + * @throws {Error} When `size` is not a positive integer (propagated from the underlying implementation). + * + * @example + * import { pipe, chunk } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 4, 5], chunk(2)); // => [[1, 2], [3, 4], [5]] + */ +declare function chunk(size: number): (array: readonly T[]) => T[][]; +//#endregion +export { chunk }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/chunk.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/chunk.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a25f2fa2ddc33932519d3bc1a8370079645c14aa --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/chunk.d.ts @@ -0,0 +1,19 @@ +//#region src/fp/array/chunk.d.ts +/** + * Creates a function that splits an array into sub-arrays of length `size`. The + * final chunk holds the remaining elements when the array cannot be divided + * evenly. Use it with {@link pipe}. + * + * @template T - The type of elements in the array. + * @param size - The length of each chunk. Must be a positive integer. + * @returns A function that maps a `readonly T[]` to a `T[][]`. + * @throws {Error} When `size` is not a positive integer (propagated from the underlying implementation). + * + * @example + * import { pipe, chunk } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 4, 5], chunk(2)); // => [[1, 2], [3, 4], [5]] + */ +declare function chunk(size: number): (array: readonly T[]) => T[][]; +//#endregion +export { chunk }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/chunk.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/chunk.js new file mode 100644 index 0000000000000000000000000000000000000000..0b740253a5332c52ab07a743df8444297730027a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/chunk.js @@ -0,0 +1,24 @@ +const require_chunk = require("../../array/chunk.js"); +//#region src/fp/array/chunk.ts +/** +* Creates a function that splits an array into sub-arrays of length `size`. The +* final chunk holds the remaining elements when the array cannot be divided +* evenly. Use it with {@link pipe}. +* +* @template T - The type of elements in the array. +* @param size - The length of each chunk. Must be a positive integer. +* @returns A function that maps a `readonly T[]` to a `T[][]`. +* @throws {Error} When `size` is not a positive integer (propagated from the underlying implementation). +* +* @example +* import { pipe, chunk } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3, 4, 5], chunk(2)); // => [[1, 2], [3, 4], [5]] +*/ +function chunk(size) { + return function(array) { + return require_chunk.chunk(array, size); + }; +} +//#endregion +exports.chunk = chunk; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/chunk.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/chunk.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b6e500d82982fa8019a63292ded418505f0130e8 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/chunk.mjs @@ -0,0 +1,24 @@ +import { chunk as chunk$1 } from "../../array/chunk.mjs"; +//#region src/fp/array/chunk.ts +/** +* Creates a function that splits an array into sub-arrays of length `size`. The +* final chunk holds the remaining elements when the array cannot be divided +* evenly. Use it with {@link pipe}. +* +* @template T - The type of elements in the array. +* @param size - The length of each chunk. Must be a positive integer. +* @returns A function that maps a `readonly T[]` to a `T[][]`. +* @throws {Error} When `size` is not a positive integer (propagated from the underlying implementation). +* +* @example +* import { pipe, chunk } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3, 4, 5], chunk(2)); // => [[1, 2], [3, 4], [5]] +*/ +function chunk(size) { + return function(array) { + return chunk$1(array, size); + }; +} +//#endregion +export { chunk }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/chunkBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/chunkBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..a5b20bed2055f73f5e74e907131ca24f768a3dd8 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/chunkBy.d.mts @@ -0,0 +1,20 @@ +//#region src/fp/array/chunkBy.d.ts +/** + * Creates a function that splits consecutive elements whenever the derived key changes. + * + * The iteratee is called from left to right. A new chunk starts when its key differs + * from the previous key by strict inequality. Use the returned function with {@link pipe}. + * + * @template T - The type of elements in the array. + * @param iteratee - Called for each value to produce the comparison key. + * @returns A function that maps a readonly array to consecutive same-key chunks. + * + * @example + * import { chunkBy, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 1, 2, 3, 3], chunkBy(value => value)); + * // => [[1, 1], [2], [3, 3]] + */ +declare function chunkBy(iteratee: (value: T) => unknown): (array: readonly T[]) => T[][]; +//#endregion +export { chunkBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/chunkBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/chunkBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a5b20bed2055f73f5e74e907131ca24f768a3dd8 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/chunkBy.d.ts @@ -0,0 +1,20 @@ +//#region src/fp/array/chunkBy.d.ts +/** + * Creates a function that splits consecutive elements whenever the derived key changes. + * + * The iteratee is called from left to right. A new chunk starts when its key differs + * from the previous key by strict inequality. Use the returned function with {@link pipe}. + * + * @template T - The type of elements in the array. + * @param iteratee - Called for each value to produce the comparison key. + * @returns A function that maps a readonly array to consecutive same-key chunks. + * + * @example + * import { chunkBy, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 1, 2, 3, 3], chunkBy(value => value)); + * // => [[1, 1], [2], [3, 3]] + */ +declare function chunkBy(iteratee: (value: T) => unknown): (array: readonly T[]) => T[][]; +//#endregion +export { chunkBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/chunkBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/chunkBy.js new file mode 100644 index 0000000000000000000000000000000000000000..c95d0f49b19668da8fe672688690f2e8f3c11911 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/chunkBy.js @@ -0,0 +1,25 @@ +const require_chunkBy = require("../../array/chunkBy.js"); +//#region src/fp/array/chunkBy.ts +/** +* Creates a function that splits consecutive elements whenever the derived key changes. +* +* The iteratee is called from left to right. A new chunk starts when its key differs +* from the previous key by strict inequality. Use the returned function with {@link pipe}. +* +* @template T - The type of elements in the array. +* @param iteratee - Called for each value to produce the comparison key. +* @returns A function that maps a readonly array to consecutive same-key chunks. +* +* @example +* import { chunkBy, pipe } from 'es-toolkit/fp'; +* +* pipe([1, 1, 2, 3, 3], chunkBy(value => value)); +* // => [[1, 1], [2], [3, 3]] +*/ +function chunkBy(iteratee) { + return function(array) { + return require_chunkBy.chunkBy(array, iteratee); + }; +} +//#endregion +exports.chunkBy = chunkBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/chunkBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/chunkBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..db7433ac862e20f852dec73b5b29ffbd76b6f316 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/chunkBy.mjs @@ -0,0 +1,25 @@ +import { chunkBy as chunkBy$1 } from "../../array/chunkBy.mjs"; +//#region src/fp/array/chunkBy.ts +/** +* Creates a function that splits consecutive elements whenever the derived key changes. +* +* The iteratee is called from left to right. A new chunk starts when its key differs +* from the previous key by strict inequality. Use the returned function with {@link pipe}. +* +* @template T - The type of elements in the array. +* @param iteratee - Called for each value to produce the comparison key. +* @returns A function that maps a readonly array to consecutive same-key chunks. +* +* @example +* import { chunkBy, pipe } from 'es-toolkit/fp'; +* +* pipe([1, 1, 2, 3, 3], chunkBy(value => value)); +* // => [[1, 1], [2], [3, 3]] +*/ +function chunkBy(iteratee) { + return function(array) { + return chunkBy$1(array, iteratee); + }; +} +//#endregion +export { chunkBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/combinations.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/combinations.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..6f213d375bdbca65c28f448dba273609bbdd77aa --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/combinations.d.mts @@ -0,0 +1,21 @@ +//#region src/fp/array/combinations.d.ts +/** + * Creates a function that returns every combination of the configured size. + * + * Elements are treated as unique by position, so duplicate values can produce identical-looking + * combinations. The returned function throws when size is not a non-negative integer. + * + * @template T - The type of elements in the array. + * @param size - The number of items in each combination. + * @returns A function that maps a readonly array to its size-length combinations. + * @throws {Error} When size is not a non-negative integer. + * + * @example + * import { combinations, pipe } from 'es-toolkit/fp'; + * + * pipe(['A', 'B', 'C'], combinations(2)); + * // => [['A', 'B'], ['A', 'C'], ['B', 'C']] + */ +declare function combinations(size: number): (array: readonly T[]) => T[][]; +//#endregion +export { combinations }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/combinations.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/combinations.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6f213d375bdbca65c28f448dba273609bbdd77aa --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/combinations.d.ts @@ -0,0 +1,21 @@ +//#region src/fp/array/combinations.d.ts +/** + * Creates a function that returns every combination of the configured size. + * + * Elements are treated as unique by position, so duplicate values can produce identical-looking + * combinations. The returned function throws when size is not a non-negative integer. + * + * @template T - The type of elements in the array. + * @param size - The number of items in each combination. + * @returns A function that maps a readonly array to its size-length combinations. + * @throws {Error} When size is not a non-negative integer. + * + * @example + * import { combinations, pipe } from 'es-toolkit/fp'; + * + * pipe(['A', 'B', 'C'], combinations(2)); + * // => [['A', 'B'], ['A', 'C'], ['B', 'C']] + */ +declare function combinations(size: number): (array: readonly T[]) => T[][]; +//#endregion +export { combinations }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/combinations.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/combinations.js new file mode 100644 index 0000000000000000000000000000000000000000..432df2ba8858efd08d0852af23b72cca574c212d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/combinations.js @@ -0,0 +1,26 @@ +const require_combinations = require("../../array/combinations.js"); +//#region src/fp/array/combinations.ts +/** +* Creates a function that returns every combination of the configured size. +* +* Elements are treated as unique by position, so duplicate values can produce identical-looking +* combinations. The returned function throws when size is not a non-negative integer. +* +* @template T - The type of elements in the array. +* @param size - The number of items in each combination. +* @returns A function that maps a readonly array to its size-length combinations. +* @throws {Error} When size is not a non-negative integer. +* +* @example +* import { combinations, pipe } from 'es-toolkit/fp'; +* +* pipe(['A', 'B', 'C'], combinations(2)); +* // => [['A', 'B'], ['A', 'C'], ['B', 'C']] +*/ +function combinations(size) { + return function(array) { + return require_combinations.combinations(array, size); + }; +} +//#endregion +exports.combinations = combinations; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/combinations.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/combinations.mjs new file mode 100644 index 0000000000000000000000000000000000000000..7187e316fff68551a51b4e3f2954caaae49edab2 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/combinations.mjs @@ -0,0 +1,26 @@ +import { combinations as combinations$1 } from "../../array/combinations.mjs"; +//#region src/fp/array/combinations.ts +/** +* Creates a function that returns every combination of the configured size. +* +* Elements are treated as unique by position, so duplicate values can produce identical-looking +* combinations. The returned function throws when size is not a non-negative integer. +* +* @template T - The type of elements in the array. +* @param size - The number of items in each combination. +* @returns A function that maps a readonly array to its size-length combinations. +* @throws {Error} When size is not a non-negative integer. +* +* @example +* import { combinations, pipe } from 'es-toolkit/fp'; +* +* pipe(['A', 'B', 'C'], combinations(2)); +* // => [['A', 'B'], ['A', 'C'], ['B', 'C']] +*/ +function combinations(size) { + return function(array) { + return combinations$1(array, size); + }; +} +//#endregion +export { combinations }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/compact.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/compact.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..39e2a4220e88931499f920d86c1b41bde465fd49 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/compact.d.mts @@ -0,0 +1,22 @@ +//#region src/fp/array/compact.d.ts +type NotFalsey = Exclude; +/** + * Creates a function that removes falsey values from an array. Use it with {@link pipe}. + * + * Falsey values include false, null, 0, -0, 0n, an empty string, undefined, + * and NaN. The returned function is lazy-capable inside {@link pipe}, so a + * trailing short-circuiting operator such as {@link take} can stop once enough + * truthy values have been emitted. + * + * @template T - The type of elements in the array. + * @returns A function that maps a readonly array to a new array with falsey values removed. + * + * @example + * import { compact, pipe } from 'es-toolkit/fp'; + * + * pipe([0, 1, false, 2, '', 3], compact()); + * // => [1, 2, 3] + */ +declare function compact(): (array: readonly T[]) => Array>; +//#endregion +export { compact }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/compact.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/compact.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..39e2a4220e88931499f920d86c1b41bde465fd49 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/compact.d.ts @@ -0,0 +1,22 @@ +//#region src/fp/array/compact.d.ts +type NotFalsey = Exclude; +/** + * Creates a function that removes falsey values from an array. Use it with {@link pipe}. + * + * Falsey values include false, null, 0, -0, 0n, an empty string, undefined, + * and NaN. The returned function is lazy-capable inside {@link pipe}, so a + * trailing short-circuiting operator such as {@link take} can stop once enough + * truthy values have been emitted. + * + * @template T - The type of elements in the array. + * @returns A function that maps a readonly array to a new array with falsey values removed. + * + * @example + * import { compact, pipe } from 'es-toolkit/fp'; + * + * pipe([0, 1, false, 2, '', 3], compact()); + * // => [1, 2, 3] + */ +declare function compact(): (array: readonly T[]) => Array>; +//#endregion +export { compact }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/compact.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/compact.js new file mode 100644 index 0000000000000000000000000000000000000000..a1fa8383a26259fc8e5d7524bccb1f2fb0b874db --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/compact.js @@ -0,0 +1,31 @@ +const require_compact = require("../../array/compact.js"); +const require_lazy = require("../_internal/lazy.js"); +//#region src/fp/array/compact.ts +/** +* Creates a function that removes falsey values from an array. Use it with {@link pipe}. +* +* Falsey values include false, null, 0, -0, 0n, an empty string, undefined, +* and NaN. The returned function is lazy-capable inside {@link pipe}, so a +* trailing short-circuiting operator such as {@link take} can stop once enough +* truthy values have been emitted. +* +* @template T - The type of elements in the array. +* @returns A function that maps a readonly array to a new array with falsey values removed. +* +* @example +* import { compact, pipe } from 'es-toolkit/fp'; +* +* pipe([0, 1, false, 2, '', 3], compact()); +* // => [1, 2, 3] +*/ +function compact() { + function compactEager(array) { + return require_compact.compact(array); + } + const compactLazy = require_lazy.createLazyFunction((value, _index, emit) => { + if (value) emit(value); + }); + return require_lazy.combineEagerAndLazyFunctions(compactEager, compactLazy); +} +//#endregion +exports.compact = compact; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/compact.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/compact.mjs new file mode 100644 index 0000000000000000000000000000000000000000..cc30021e11048d6310bc8604ee3f04f1c318f29a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/compact.mjs @@ -0,0 +1,30 @@ +import { compact as compact$1 } from "../../array/compact.mjs"; +import { combineEagerAndLazyFunctions, createLazyFunction } from "../_internal/lazy.mjs"; +//#region src/fp/array/compact.ts +/** +* Creates a function that removes falsey values from an array. Use it with {@link pipe}. +* +* Falsey values include false, null, 0, -0, 0n, an empty string, undefined, +* and NaN. The returned function is lazy-capable inside {@link pipe}, so a +* trailing short-circuiting operator such as {@link take} can stop once enough +* truthy values have been emitted. +* +* @template T - The type of elements in the array. +* @returns A function that maps a readonly array to a new array with falsey values removed. +* +* @example +* import { compact, pipe } from 'es-toolkit/fp'; +* +* pipe([0, 1, false, 2, '', 3], compact()); +* // => [1, 2, 3] +*/ +function compact() { + function compactEager(array) { + return compact$1(array); + } + return combineEagerAndLazyFunctions(compactEager, createLazyFunction((value, _index, emit) => { + if (value) emit(value); + })); +} +//#endregion +export { compact }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/countBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/countBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..83ed89af46adfb815ddb3d9659da7b58ce553b83 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/countBy.d.mts @@ -0,0 +1,21 @@ +//#region src/fp/array/countBy.d.ts +/** + * Creates a function that counts values by a derived key. + * + * The mapper receives each value, its index, and the full input array. The returned object + * uses mapper results as keys and occurrence counts as values. + * + * @template T - The type of elements in the array. + * @template K - The property-key type produced by the mapper. + * @param mapper - Called with each value, index, and array to produce a key. + * @returns A function that maps a readonly array to counts by key. + * + * @example + * import { countBy, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 4, 5], countBy(value => (value % 2 === 0 ? 'even' : 'odd'))); + * // => { odd: 3, even: 2 } + */ +declare function countBy(mapper: (item: T, index: number, array: readonly T[]) => K): (array: readonly T[]) => Record; +//#endregion +export { countBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/countBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/countBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..83ed89af46adfb815ddb3d9659da7b58ce553b83 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/countBy.d.ts @@ -0,0 +1,21 @@ +//#region src/fp/array/countBy.d.ts +/** + * Creates a function that counts values by a derived key. + * + * The mapper receives each value, its index, and the full input array. The returned object + * uses mapper results as keys and occurrence counts as values. + * + * @template T - The type of elements in the array. + * @template K - The property-key type produced by the mapper. + * @param mapper - Called with each value, index, and array to produce a key. + * @returns A function that maps a readonly array to counts by key. + * + * @example + * import { countBy, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 4, 5], countBy(value => (value % 2 === 0 ? 'even' : 'odd'))); + * // => { odd: 3, even: 2 } + */ +declare function countBy(mapper: (item: T, index: number, array: readonly T[]) => K): (array: readonly T[]) => Record; +//#endregion +export { countBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/countBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/countBy.js new file mode 100644 index 0000000000000000000000000000000000000000..2301be9a4ec7c578ffb0835a32da7b49bb8b9ef8 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/countBy.js @@ -0,0 +1,26 @@ +const require_countBy = require("../../array/countBy.js"); +//#region src/fp/array/countBy.ts +/** +* Creates a function that counts values by a derived key. +* +* The mapper receives each value, its index, and the full input array. The returned object +* uses mapper results as keys and occurrence counts as values. +* +* @template T - The type of elements in the array. +* @template K - The property-key type produced by the mapper. +* @param mapper - Called with each value, index, and array to produce a key. +* @returns A function that maps a readonly array to counts by key. +* +* @example +* import { countBy, pipe } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3, 4, 5], countBy(value => (value % 2 === 0 ? 'even' : 'odd'))); +* // => { odd: 3, even: 2 } +*/ +function countBy(mapper) { + return function(array) { + return require_countBy.countBy(array, mapper); + }; +} +//#endregion +exports.countBy = countBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/countBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/countBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..09b5d8485532099b34d450ae8d01fee3c8d471c3 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/countBy.mjs @@ -0,0 +1,26 @@ +import { countBy as countBy$1 } from "../../array/countBy.mjs"; +//#region src/fp/array/countBy.ts +/** +* Creates a function that counts values by a derived key. +* +* The mapper receives each value, its index, and the full input array. The returned object +* uses mapper results as keys and occurrence counts as values. +* +* @template T - The type of elements in the array. +* @template K - The property-key type produced by the mapper. +* @param mapper - Called with each value, index, and array to produce a key. +* @returns A function that maps a readonly array to counts by key. +* +* @example +* import { countBy, pipe } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3, 4, 5], countBy(value => (value % 2 === 0 ? 'even' : 'odd'))); +* // => { odd: 3, even: 2 } +*/ +function countBy(mapper) { + return function(array) { + return countBy$1(array, mapper); + }; +} +//#endregion +export { countBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/difference.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/difference.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..675443eba955114b8acd073962eff57e0b14ab90 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/difference.d.mts @@ -0,0 +1,21 @@ +//#region src/fp/array/difference.d.ts +/** + * Creates a function that returns values from the piped array that are not present in another array. + * + * Equality follows SameValueZero through Set membership, matching the main + * {@link difference} implementation. The returned function is lazy-capable + * inside {@link pipe}. + * + * @template T - The type of elements in the arrays. + * @param secondArray - Values to exclude from the piped array. + * @returns A function that maps the piped array to its difference. + * + * @example + * import { difference, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3], difference([2, 4])); + * // => [1, 3] + */ +declare function difference(secondArray: readonly T[]): (array: readonly T[]) => T[]; +//#endregion +export { difference }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/difference.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/difference.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..675443eba955114b8acd073962eff57e0b14ab90 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/difference.d.ts @@ -0,0 +1,21 @@ +//#region src/fp/array/difference.d.ts +/** + * Creates a function that returns values from the piped array that are not present in another array. + * + * Equality follows SameValueZero through Set membership, matching the main + * {@link difference} implementation. The returned function is lazy-capable + * inside {@link pipe}. + * + * @template T - The type of elements in the arrays. + * @param secondArray - Values to exclude from the piped array. + * @returns A function that maps the piped array to its difference. + * + * @example + * import { difference, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3], difference([2, 4])); + * // => [1, 3] + */ +declare function difference(secondArray: readonly T[]): (array: readonly T[]) => T[]; +//#endregion +export { difference }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/difference.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/difference.js new file mode 100644 index 0000000000000000000000000000000000000000..11a2c38270d9e429eafd050491e0d683c05dd4a0 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/difference.js @@ -0,0 +1,32 @@ +const require_difference = require("../../array/difference.js"); +const require_lazy = require("../_internal/lazy.js"); +//#region src/fp/array/difference.ts +/** +* Creates a function that returns values from the piped array that are not present in another array. +* +* Equality follows SameValueZero through Set membership, matching the main +* {@link difference} implementation. The returned function is lazy-capable +* inside {@link pipe}. +* +* @template T - The type of elements in the arrays. +* @param secondArray - Values to exclude from the piped array. +* @returns A function that maps the piped array to its difference. +* +* @example +* import { difference, pipe } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3], difference([2, 4])); +* // => [1, 3] +*/ +function difference(secondArray) { + const secondSet = new Set(secondArray); + function differenceEager(array) { + return require_difference.difference(array, secondArray); + } + const differenceLazy = require_lazy.createLazyFunction((value, _index, emit) => { + if (!secondSet.has(value)) emit(value); + }); + return require_lazy.combineEagerAndLazyFunctions(differenceEager, differenceLazy); +} +//#endregion +exports.difference = difference; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/difference.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/difference.mjs new file mode 100644 index 0000000000000000000000000000000000000000..99fc2a19d387668cbd7167deb20611d0e20f9903 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/difference.mjs @@ -0,0 +1,31 @@ +import { difference as difference$1 } from "../../array/difference.mjs"; +import { combineEagerAndLazyFunctions, createLazyFunction } from "../_internal/lazy.mjs"; +//#region src/fp/array/difference.ts +/** +* Creates a function that returns values from the piped array that are not present in another array. +* +* Equality follows SameValueZero through Set membership, matching the main +* {@link difference} implementation. The returned function is lazy-capable +* inside {@link pipe}. +* +* @template T - The type of elements in the arrays. +* @param secondArray - Values to exclude from the piped array. +* @returns A function that maps the piped array to its difference. +* +* @example +* import { difference, pipe } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3], difference([2, 4])); +* // => [1, 3] +*/ +function difference(secondArray) { + const secondSet = new Set(secondArray); + function differenceEager(array) { + return difference$1(array, secondArray); + } + return combineEagerAndLazyFunctions(differenceEager, createLazyFunction((value, _index, emit) => { + if (!secondSet.has(value)) emit(value); + })); +} +//#endregion +export { difference }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/differenceBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/differenceBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..a020c29f78939f1b2e7e6586fb8640ce81fb77db --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/differenceBy.d.mts @@ -0,0 +1,22 @@ +//#region src/fp/array/differenceBy.d.ts +/** + * Creates a function that returns values whose mapped identity is absent from another array. + * + * The mapper is applied to values from both arrays. The returned function is + * lazy-capable inside {@link pipe}. + * + * @template T - The type of elements in the piped array. + * @template U - The type of elements in the configured array. + * @param secondArray - Values to exclude from the piped array after mapping. + * @param mapper - Maps values from both arrays to comparison keys. + * @returns A function that maps the piped array to its mapped difference. + * + * @example + * import { differenceBy, pipe } from 'es-toolkit/fp'; + * + * pipe([{ id: 1 }, { id: 2 }], differenceBy([2], value => typeof value === 'number' ? value : value.id)); + * // => [{ id: 1 }] + */ +declare function differenceBy(secondArray: readonly U[], mapper: (value: T | U) => unknown): (array: readonly T[]) => T[]; +//#endregion +export { differenceBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/differenceBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/differenceBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a020c29f78939f1b2e7e6586fb8640ce81fb77db --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/differenceBy.d.ts @@ -0,0 +1,22 @@ +//#region src/fp/array/differenceBy.d.ts +/** + * Creates a function that returns values whose mapped identity is absent from another array. + * + * The mapper is applied to values from both arrays. The returned function is + * lazy-capable inside {@link pipe}. + * + * @template T - The type of elements in the piped array. + * @template U - The type of elements in the configured array. + * @param secondArray - Values to exclude from the piped array after mapping. + * @param mapper - Maps values from both arrays to comparison keys. + * @returns A function that maps the piped array to its mapped difference. + * + * @example + * import { differenceBy, pipe } from 'es-toolkit/fp'; + * + * pipe([{ id: 1 }, { id: 2 }], differenceBy([2], value => typeof value === 'number' ? value : value.id)); + * // => [{ id: 1 }] + */ +declare function differenceBy(secondArray: readonly U[], mapper: (value: T | U) => unknown): (array: readonly T[]) => T[]; +//#endregion +export { differenceBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/differenceBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/differenceBy.js new file mode 100644 index 0000000000000000000000000000000000000000..039f106fe1317c766e5e867320f255c34ccf3395 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/differenceBy.js @@ -0,0 +1,33 @@ +const require_differenceBy = require("../../array/differenceBy.js"); +const require_lazy = require("../_internal/lazy.js"); +//#region src/fp/array/differenceBy.ts +/** +* Creates a function that returns values whose mapped identity is absent from another array. +* +* The mapper is applied to values from both arrays. The returned function is +* lazy-capable inside {@link pipe}. +* +* @template T - The type of elements in the piped array. +* @template U - The type of elements in the configured array. +* @param secondArray - Values to exclude from the piped array after mapping. +* @param mapper - Maps values from both arrays to comparison keys. +* @returns A function that maps the piped array to its mapped difference. +* +* @example +* import { differenceBy, pipe } from 'es-toolkit/fp'; +* +* pipe([{ id: 1 }, { id: 2 }], differenceBy([2], value => typeof value === 'number' ? value : value.id)); +* // => [{ id: 1 }] +*/ +function differenceBy(secondArray, mapper) { + const mappedSecondSet = new Set(secondArray.map((item) => mapper(item))); + function differenceByEager(array) { + return require_differenceBy.differenceBy(array, secondArray, mapper); + } + const differenceByLazy = require_lazy.createLazyFunction((value, _index, emit) => { + if (!mappedSecondSet.has(mapper(value))) emit(value); + }); + return require_lazy.combineEagerAndLazyFunctions(differenceByEager, differenceByLazy); +} +//#endregion +exports.differenceBy = differenceBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/differenceBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/differenceBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..adc34fe88c87ff136d7cddd7216e96836ab77082 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/differenceBy.mjs @@ -0,0 +1,32 @@ +import { differenceBy as differenceBy$1 } from "../../array/differenceBy.mjs"; +import { combineEagerAndLazyFunctions, createLazyFunction } from "../_internal/lazy.mjs"; +//#region src/fp/array/differenceBy.ts +/** +* Creates a function that returns values whose mapped identity is absent from another array. +* +* The mapper is applied to values from both arrays. The returned function is +* lazy-capable inside {@link pipe}. +* +* @template T - The type of elements in the piped array. +* @template U - The type of elements in the configured array. +* @param secondArray - Values to exclude from the piped array after mapping. +* @param mapper - Maps values from both arrays to comparison keys. +* @returns A function that maps the piped array to its mapped difference. +* +* @example +* import { differenceBy, pipe } from 'es-toolkit/fp'; +* +* pipe([{ id: 1 }, { id: 2 }], differenceBy([2], value => typeof value === 'number' ? value : value.id)); +* // => [{ id: 1 }] +*/ +function differenceBy(secondArray, mapper) { + const mappedSecondSet = new Set(secondArray.map((item) => mapper(item))); + function differenceByEager(array) { + return differenceBy$1(array, secondArray, mapper); + } + return combineEagerAndLazyFunctions(differenceByEager, createLazyFunction((value, _index, emit) => { + if (!mappedSecondSet.has(mapper(value))) emit(value); + })); +} +//#endregion +export { differenceBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/differenceWith.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/differenceWith.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..77dbaee18b9c3403877c584310e25ba4d76133da --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/differenceWith.d.mts @@ -0,0 +1,22 @@ +//#region src/fp/array/differenceWith.d.ts +/** + * Creates a function that returns values that are not equal to any configured value. + * + * Equality is decided by the provided comparator. The returned function is + * lazy-capable inside {@link pipe}. + * + * @template T - The type of elements in the piped array. + * @template U - The type of elements in the configured array. + * @param secondArray - Values to compare against the piped array. + * @param areItemsEqual - Returns true when a piped value equals a configured value. + * @returns A function that maps the piped array to its custom difference. + * + * @example + * import { differenceWith, pipe } from 'es-toolkit/fp'; + * + * pipe([{ id: 1 }, { id: 2 }], differenceWith([2], (item, id) => item.id === id)); + * // => [{ id: 1 }] + */ +declare function differenceWith(secondArray: readonly U[], areItemsEqual: (item: T, other: U) => boolean): (array: readonly T[]) => T[]; +//#endregion +export { differenceWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/differenceWith.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/differenceWith.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..77dbaee18b9c3403877c584310e25ba4d76133da --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/differenceWith.d.ts @@ -0,0 +1,22 @@ +//#region src/fp/array/differenceWith.d.ts +/** + * Creates a function that returns values that are not equal to any configured value. + * + * Equality is decided by the provided comparator. The returned function is + * lazy-capable inside {@link pipe}. + * + * @template T - The type of elements in the piped array. + * @template U - The type of elements in the configured array. + * @param secondArray - Values to compare against the piped array. + * @param areItemsEqual - Returns true when a piped value equals a configured value. + * @returns A function that maps the piped array to its custom difference. + * + * @example + * import { differenceWith, pipe } from 'es-toolkit/fp'; + * + * pipe([{ id: 1 }, { id: 2 }], differenceWith([2], (item, id) => item.id === id)); + * // => [{ id: 1 }] + */ +declare function differenceWith(secondArray: readonly U[], areItemsEqual: (item: T, other: U) => boolean): (array: readonly T[]) => T[]; +//#endregion +export { differenceWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/differenceWith.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/differenceWith.js new file mode 100644 index 0000000000000000000000000000000000000000..2e6bd7a3d002cea12477705309425854d308935a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/differenceWith.js @@ -0,0 +1,32 @@ +const require_differenceWith = require("../../array/differenceWith.js"); +const require_lazy = require("../_internal/lazy.js"); +//#region src/fp/array/differenceWith.ts +/** +* Creates a function that returns values that are not equal to any configured value. +* +* Equality is decided by the provided comparator. The returned function is +* lazy-capable inside {@link pipe}. +* +* @template T - The type of elements in the piped array. +* @template U - The type of elements in the configured array. +* @param secondArray - Values to compare against the piped array. +* @param areItemsEqual - Returns true when a piped value equals a configured value. +* @returns A function that maps the piped array to its custom difference. +* +* @example +* import { differenceWith, pipe } from 'es-toolkit/fp'; +* +* pipe([{ id: 1 }, { id: 2 }], differenceWith([2], (item, id) => item.id === id)); +* // => [{ id: 1 }] +*/ +function differenceWith(secondArray, areItemsEqual) { + function differenceWithEager(array) { + return require_differenceWith.differenceWith(array, secondArray, areItemsEqual); + } + const differenceWithLazy = require_lazy.createLazyFunction((value, _index, emit) => { + if (secondArray.every((other) => !areItemsEqual(value, other))) emit(value); + }); + return require_lazy.combineEagerAndLazyFunctions(differenceWithEager, differenceWithLazy); +} +//#endregion +exports.differenceWith = differenceWith; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/differenceWith.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/differenceWith.mjs new file mode 100644 index 0000000000000000000000000000000000000000..2b22b9f0afaac0e46e5b4c7f08bbb9cb2891e963 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/differenceWith.mjs @@ -0,0 +1,31 @@ +import { differenceWith as differenceWith$1 } from "../../array/differenceWith.mjs"; +import { combineEagerAndLazyFunctions, createLazyFunction } from "../_internal/lazy.mjs"; +//#region src/fp/array/differenceWith.ts +/** +* Creates a function that returns values that are not equal to any configured value. +* +* Equality is decided by the provided comparator. The returned function is +* lazy-capable inside {@link pipe}. +* +* @template T - The type of elements in the piped array. +* @template U - The type of elements in the configured array. +* @param secondArray - Values to compare against the piped array. +* @param areItemsEqual - Returns true when a piped value equals a configured value. +* @returns A function that maps the piped array to its custom difference. +* +* @example +* import { differenceWith, pipe } from 'es-toolkit/fp'; +* +* pipe([{ id: 1 }, { id: 2 }], differenceWith([2], (item, id) => item.id === id)); +* // => [{ id: 1 }] +*/ +function differenceWith(secondArray, areItemsEqual) { + function differenceWithEager(array) { + return differenceWith$1(array, secondArray, areItemsEqual); + } + return combineEagerAndLazyFunctions(differenceWithEager, createLazyFunction((value, _index, emit) => { + if (secondArray.every((other) => !areItemsEqual(value, other))) emit(value); + })); +} +//#endregion +export { differenceWith }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/drop.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/drop.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..57dc7f0cdfadcd93ccbb448f55b1a73f1f0c4c3e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/drop.d.mts @@ -0,0 +1,20 @@ +//#region src/fp/array/drop.d.ts +/** + * Creates a function that removes a number of values from the start of an array. + * + * Negative counts are treated as 0, matching the main {@link drop} + * implementation. The returned function is lazy-capable inside {@link pipe}. + * + * @template T - The type of elements in the array. + * @param count - The number of values to skip from the start. + * @returns A function that maps the piped array to the remaining suffix. + * + * @example + * import { drop, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 4], drop(2)); + * // => [3, 4] + */ +declare function drop(count: number): (array: readonly T[]) => T[]; +//#endregion +export { drop }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/drop.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/drop.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..57dc7f0cdfadcd93ccbb448f55b1a73f1f0c4c3e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/drop.d.ts @@ -0,0 +1,20 @@ +//#region src/fp/array/drop.d.ts +/** + * Creates a function that removes a number of values from the start of an array. + * + * Negative counts are treated as 0, matching the main {@link drop} + * implementation. The returned function is lazy-capable inside {@link pipe}. + * + * @template T - The type of elements in the array. + * @param count - The number of values to skip from the start. + * @returns A function that maps the piped array to the remaining suffix. + * + * @example + * import { drop, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 4], drop(2)); + * // => [3, 4] + */ +declare function drop(count: number): (array: readonly T[]) => T[]; +//#endregion +export { drop }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/drop.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/drop.js new file mode 100644 index 0000000000000000000000000000000000000000..a6d3f84f5cdd002f5aa66397fddd513f1ff86ec0 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/drop.js @@ -0,0 +1,31 @@ +const require_drop = require("../../array/drop.js"); +const require_lazy = require("../_internal/lazy.js"); +//#region src/fp/array/drop.ts +/** +* Creates a function that removes a number of values from the start of an array. +* +* Negative counts are treated as 0, matching the main {@link drop} +* implementation. The returned function is lazy-capable inside {@link pipe}. +* +* @template T - The type of elements in the array. +* @param count - The number of values to skip from the start. +* @returns A function that maps the piped array to the remaining suffix. +* +* @example +* import { drop, pipe } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3, 4], drop(2)); +* // => [3, 4] +*/ +function drop(count) { + const normalizedCount = Number.isNaN(count) ? 0 : Math.trunc(Math.max(count, 0)); + function dropEager(array) { + return require_drop.drop(array, count); + } + const dropLazy = require_lazy.createLazyFunction((value, index, emit) => { + if (index >= normalizedCount) emit(value); + }); + return require_lazy.combineEagerAndLazyFunctions(dropEager, dropLazy); +} +//#endregion +exports.drop = drop; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/drop.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/drop.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e4b9b72854b8335045acf20f77240396b33372b5 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/drop.mjs @@ -0,0 +1,30 @@ +import { drop as drop$1 } from "../../array/drop.mjs"; +import { combineEagerAndLazyFunctions, createLazyFunction } from "../_internal/lazy.mjs"; +//#region src/fp/array/drop.ts +/** +* Creates a function that removes a number of values from the start of an array. +* +* Negative counts are treated as 0, matching the main {@link drop} +* implementation. The returned function is lazy-capable inside {@link pipe}. +* +* @template T - The type of elements in the array. +* @param count - The number of values to skip from the start. +* @returns A function that maps the piped array to the remaining suffix. +* +* @example +* import { drop, pipe } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3, 4], drop(2)); +* // => [3, 4] +*/ +function drop(count) { + const normalizedCount = Number.isNaN(count) ? 0 : Math.trunc(Math.max(count, 0)); + function dropEager(array) { + return drop$1(array, count); + } + return combineEagerAndLazyFunctions(dropEager, createLazyFunction((value, index, emit) => { + if (index >= normalizedCount) emit(value); + })); +} +//#endregion +export { drop }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropRight.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropRight.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..3d80364e36d208a777798e12d37a648661400b71 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropRight.d.mts @@ -0,0 +1,20 @@ +//#region src/fp/array/dropRight.d.ts +/** + * Creates a function that removes a number of values from the end of an array. + * + * The returned function follows the main {@link dropRight} behavior and returns a new array. + * Use it with {@link pipe}. + * + * @template T - The type of elements in the array. + * @param count - The number of values to drop from the end. + * @returns A function that maps a readonly array to the remaining prefix. + * + * @example + * import { dropRight, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 4], dropRight(2)); + * // => [1, 2] + */ +declare function dropRight(count: number): (array: readonly T[]) => T[]; +//#endregion +export { dropRight }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropRight.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropRight.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3d80364e36d208a777798e12d37a648661400b71 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropRight.d.ts @@ -0,0 +1,20 @@ +//#region src/fp/array/dropRight.d.ts +/** + * Creates a function that removes a number of values from the end of an array. + * + * The returned function follows the main {@link dropRight} behavior and returns a new array. + * Use it with {@link pipe}. + * + * @template T - The type of elements in the array. + * @param count - The number of values to drop from the end. + * @returns A function that maps a readonly array to the remaining prefix. + * + * @example + * import { dropRight, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 4], dropRight(2)); + * // => [1, 2] + */ +declare function dropRight(count: number): (array: readonly T[]) => T[]; +//#endregion +export { dropRight }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropRight.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropRight.js new file mode 100644 index 0000000000000000000000000000000000000000..4ba06f8dd52b0ee94bb4cb964ec8cbc31aaf844f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropRight.js @@ -0,0 +1,25 @@ +const require_dropRight = require("../../array/dropRight.js"); +//#region src/fp/array/dropRight.ts +/** +* Creates a function that removes a number of values from the end of an array. +* +* The returned function follows the main {@link dropRight} behavior and returns a new array. +* Use it with {@link pipe}. +* +* @template T - The type of elements in the array. +* @param count - The number of values to drop from the end. +* @returns A function that maps a readonly array to the remaining prefix. +* +* @example +* import { dropRight, pipe } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3, 4], dropRight(2)); +* // => [1, 2] +*/ +function dropRight(count) { + return function(array) { + return require_dropRight.dropRight(array, count); + }; +} +//#endregion +exports.dropRight = dropRight; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropRight.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropRight.mjs new file mode 100644 index 0000000000000000000000000000000000000000..4fb5735cbeced729605981b5eaa31da98eed13d7 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropRight.mjs @@ -0,0 +1,25 @@ +import { dropRight as dropRight$1 } from "../../array/dropRight.mjs"; +//#region src/fp/array/dropRight.ts +/** +* Creates a function that removes a number of values from the end of an array. +* +* The returned function follows the main {@link dropRight} behavior and returns a new array. +* Use it with {@link pipe}. +* +* @template T - The type of elements in the array. +* @param count - The number of values to drop from the end. +* @returns A function that maps a readonly array to the remaining prefix. +* +* @example +* import { dropRight, pipe } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3, 4], dropRight(2)); +* // => [1, 2] +*/ +function dropRight(count) { + return function(array) { + return dropRight$1(array, count); + }; +} +//#endregion +export { dropRight }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropRightWhile.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropRightWhile.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..c75faab4ddbbf32570de4dbbab036564ceb99c71 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropRightWhile.d.mts @@ -0,0 +1,20 @@ +//#region src/fp/array/dropRightWhile.d.ts +/** + * Creates a function that drops trailing values while a predicate returns true. + * + * The predicate is evaluated from right to left and receives the value, index, and full + * input array. Use the returned function with {@link pipe}. + * + * @template T - The type of elements in the array. + * @param predicate - Called with each value, index, and array while dropping from the end. + * @returns A function that maps a readonly array to the remaining prefix. + * + * @example + * import { dropRightWhile, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 4], dropRightWhile(value => value > 2)); + * // => [1, 2] + */ +declare function dropRightWhile(predicate: (item: T, index: number, array: readonly T[]) => boolean): (array: readonly T[]) => T[]; +//#endregion +export { dropRightWhile }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropRightWhile.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropRightWhile.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c75faab4ddbbf32570de4dbbab036564ceb99c71 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropRightWhile.d.ts @@ -0,0 +1,20 @@ +//#region src/fp/array/dropRightWhile.d.ts +/** + * Creates a function that drops trailing values while a predicate returns true. + * + * The predicate is evaluated from right to left and receives the value, index, and full + * input array. Use the returned function with {@link pipe}. + * + * @template T - The type of elements in the array. + * @param predicate - Called with each value, index, and array while dropping from the end. + * @returns A function that maps a readonly array to the remaining prefix. + * + * @example + * import { dropRightWhile, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 4], dropRightWhile(value => value > 2)); + * // => [1, 2] + */ +declare function dropRightWhile(predicate: (item: T, index: number, array: readonly T[]) => boolean): (array: readonly T[]) => T[]; +//#endregion +export { dropRightWhile }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropRightWhile.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropRightWhile.js new file mode 100644 index 0000000000000000000000000000000000000000..2eec3d3c1d382792e83ac1fce0e8e7b798baab0f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropRightWhile.js @@ -0,0 +1,25 @@ +const require_dropRightWhile = require("../../array/dropRightWhile.js"); +//#region src/fp/array/dropRightWhile.ts +/** +* Creates a function that drops trailing values while a predicate returns true. +* +* The predicate is evaluated from right to left and receives the value, index, and full +* input array. Use the returned function with {@link pipe}. +* +* @template T - The type of elements in the array. +* @param predicate - Called with each value, index, and array while dropping from the end. +* @returns A function that maps a readonly array to the remaining prefix. +* +* @example +* import { dropRightWhile, pipe } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3, 4], dropRightWhile(value => value > 2)); +* // => [1, 2] +*/ +function dropRightWhile(predicate) { + return function(array) { + return require_dropRightWhile.dropRightWhile(array, predicate); + }; +} +//#endregion +exports.dropRightWhile = dropRightWhile; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropRightWhile.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropRightWhile.mjs new file mode 100644 index 0000000000000000000000000000000000000000..879d681b0458cd9dbfadef7b6d60c811e630dad0 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropRightWhile.mjs @@ -0,0 +1,25 @@ +import { dropRightWhile as dropRightWhile$1 } from "../../array/dropRightWhile.mjs"; +//#region src/fp/array/dropRightWhile.ts +/** +* Creates a function that drops trailing values while a predicate returns true. +* +* The predicate is evaluated from right to left and receives the value, index, and full +* input array. Use the returned function with {@link pipe}. +* +* @template T - The type of elements in the array. +* @param predicate - Called with each value, index, and array while dropping from the end. +* @returns A function that maps a readonly array to the remaining prefix. +* +* @example +* import { dropRightWhile, pipe } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3, 4], dropRightWhile(value => value > 2)); +* // => [1, 2] +*/ +function dropRightWhile(predicate) { + return function(array) { + return dropRightWhile$1(array, predicate); + }; +} +//#endregion +export { dropRightWhile }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropWhile.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropWhile.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..0a3a9f0026baa627c20b187af6385b2d81fb6079 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropWhile.d.mts @@ -0,0 +1,20 @@ +//#region src/fp/array/dropWhile.d.ts +/** + * Creates a function that removes leading values while a predicate returns true. + * + * Once the predicate returns false, that value and all following values are + * emitted. The returned function is lazy-capable inside {@link pipe}. + * + * @template T - The type of elements in the array. + * @param predicate - Called with each leading value and index while values are being dropped. + * @returns A function that maps the piped array to the remaining suffix. + * + * @example + * import { dropWhile, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 1], dropWhile(value => value < 3)); + * // => [3, 1] + */ +declare function dropWhile(predicate: (item: T, index: number) => boolean): (array: readonly T[]) => T[]; +//#endregion +export { dropWhile }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropWhile.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropWhile.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0a3a9f0026baa627c20b187af6385b2d81fb6079 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropWhile.d.ts @@ -0,0 +1,20 @@ +//#region src/fp/array/dropWhile.d.ts +/** + * Creates a function that removes leading values while a predicate returns true. + * + * Once the predicate returns false, that value and all following values are + * emitted. The returned function is lazy-capable inside {@link pipe}. + * + * @template T - The type of elements in the array. + * @param predicate - Called with each leading value and index while values are being dropped. + * @returns A function that maps the piped array to the remaining suffix. + * + * @example + * import { dropWhile, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 1], dropWhile(value => value < 3)); + * // => [3, 1] + */ +declare function dropWhile(predicate: (item: T, index: number) => boolean): (array: readonly T[]) => T[]; +//#endregion +export { dropWhile }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropWhile.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropWhile.js new file mode 100644 index 0000000000000000000000000000000000000000..77155fb443a567eb56973e1b54503fa737861daf --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropWhile.js @@ -0,0 +1,36 @@ +const require_dropWhile = require("../../array/dropWhile.js"); +const require_lazy = require("../_internal/lazy.js"); +//#region src/fp/array/dropWhile.ts +/** +* Creates a function that removes leading values while a predicate returns true. +* +* Once the predicate returns false, that value and all following values are +* emitted. The returned function is lazy-capable inside {@link pipe}. +* +* @template T - The type of elements in the array. +* @param predicate - Called with each leading value and index while values are being dropped. +* @returns A function that maps the piped array to the remaining suffix. +* +* @example +* import { dropWhile, pipe } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3, 1], dropWhile(value => value < 3)); +* // => [3, 1] +*/ +function dropWhile(predicate) { + function dropWhileEager(array) { + return require_dropWhile.dropWhile(array, (item, index) => predicate(item, index)); + } + const dropWhileLazy = (emit) => { + let dropping = true; + let index = 0; + return (value) => { + if (dropping && predicate(value, index++)) return true; + dropping = false; + return emit(value); + }; + }; + return require_lazy.combineEagerAndLazyFunctions(dropWhileEager, dropWhileLazy); +} +//#endregion +exports.dropWhile = dropWhile; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropWhile.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropWhile.mjs new file mode 100644 index 0000000000000000000000000000000000000000..99197f6b628878eae8d0b0db3cfe33b801a43217 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/dropWhile.mjs @@ -0,0 +1,36 @@ +import { dropWhile as dropWhile$1 } from "../../array/dropWhile.mjs"; +import { combineEagerAndLazyFunctions } from "../_internal/lazy.mjs"; +//#region src/fp/array/dropWhile.ts +/** +* Creates a function that removes leading values while a predicate returns true. +* +* Once the predicate returns false, that value and all following values are +* emitted. The returned function is lazy-capable inside {@link pipe}. +* +* @template T - The type of elements in the array. +* @param predicate - Called with each leading value and index while values are being dropped. +* @returns A function that maps the piped array to the remaining suffix. +* +* @example +* import { dropWhile, pipe } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3, 1], dropWhile(value => value < 3)); +* // => [3, 1] +*/ +function dropWhile(predicate) { + function dropWhileEager(array) { + return dropWhile$1(array, (item, index) => predicate(item, index)); + } + const dropWhileLazy = (emit) => { + let dropping = true; + let index = 0; + return (value) => { + if (dropping && predicate(value, index++)) return true; + dropping = false; + return emit(value); + }; + }; + return combineEagerAndLazyFunctions(dropWhileEager, dropWhileLazy); +} +//#endregion +export { dropWhile }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/filter.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/filter.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..db7cd1df6b03680da555005c8aae1d26bbf9e1d8 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/filter.d.mts @@ -0,0 +1,45 @@ +//#region src/fp/array/filter.d.ts +/** + * Creates a function that keeps only the elements for which `predicate` returns + * a truthy value, equivalent to `Array.prototype.filter`. A type predicate + * narrows the element type of the result. Use it with {@link pipe}. + * + * The returned function is **lazy-capable**: inside a {@link pipe} it is fused + * with adjacent lazy functions and runs element-by-element. + * + * @template T - The type of elements in the input array. + * @template S - The narrowed element type when `predicate` is a type guard. + * @param predicate - Called with `(value, index)` for each element; return + * `true` to keep the element. + * @returns A function that maps a `readonly T[]` to a filtered array. + * + * @example + * import { pipe, filter } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 4], filter(x => x % 2 === 0)); // => [2, 4] + * + * @example + * // A type guard narrows the result type to `string[]`. + * pipe([1, 'a', 2, 'b'], filter((x): x is string => typeof x === 'string')); // => ['a', 'b'] + */ +declare function filter(predicate: (value: T, index: number) => value is S): (array: readonly T[]) => S[]; +/** + * Creates a function that keeps only the elements for which `predicate` returns + * a truthy value, equivalent to `Array.prototype.filter`. Use it with {@link pipe}. + * + * The returned function is **lazy-capable**: inside a {@link pipe} it is fused + * with adjacent lazy functions and runs element-by-element. + * + * @template T - The type of elements in the input array. + * @param predicate - Called with `(value, index)` for each element; return + * `true` to keep the element. + * @returns A function that maps a `readonly T[]` to a filtered array. + * + * @example + * import { pipe, filter } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 4], filter(x => x % 2 === 0)); // => [2, 4] + */ +declare function filter(predicate: (value: T, index: number) => boolean): (array: readonly T[]) => T[]; +//#endregion +export { filter }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/filter.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/filter.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..db7cd1df6b03680da555005c8aae1d26bbf9e1d8 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/filter.d.ts @@ -0,0 +1,45 @@ +//#region src/fp/array/filter.d.ts +/** + * Creates a function that keeps only the elements for which `predicate` returns + * a truthy value, equivalent to `Array.prototype.filter`. A type predicate + * narrows the element type of the result. Use it with {@link pipe}. + * + * The returned function is **lazy-capable**: inside a {@link pipe} it is fused + * with adjacent lazy functions and runs element-by-element. + * + * @template T - The type of elements in the input array. + * @template S - The narrowed element type when `predicate` is a type guard. + * @param predicate - Called with `(value, index)` for each element; return + * `true` to keep the element. + * @returns A function that maps a `readonly T[]` to a filtered array. + * + * @example + * import { pipe, filter } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 4], filter(x => x % 2 === 0)); // => [2, 4] + * + * @example + * // A type guard narrows the result type to `string[]`. + * pipe([1, 'a', 2, 'b'], filter((x): x is string => typeof x === 'string')); // => ['a', 'b'] + */ +declare function filter(predicate: (value: T, index: number) => value is S): (array: readonly T[]) => S[]; +/** + * Creates a function that keeps only the elements for which `predicate` returns + * a truthy value, equivalent to `Array.prototype.filter`. Use it with {@link pipe}. + * + * The returned function is **lazy-capable**: inside a {@link pipe} it is fused + * with adjacent lazy functions and runs element-by-element. + * + * @template T - The type of elements in the input array. + * @param predicate - Called with `(value, index)` for each element; return + * `true` to keep the element. + * @returns A function that maps a `readonly T[]` to a filtered array. + * + * @example + * import { pipe, filter } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 4], filter(x => x % 2 === 0)); // => [2, 4] + */ +declare function filter(predicate: (value: T, index: number) => boolean): (array: readonly T[]) => T[]; +//#endregion +export { filter }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/filter.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/filter.js new file mode 100644 index 0000000000000000000000000000000000000000..42c32c92c2114fd8769e59049cb4b03f7e6b0570 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/filter.js @@ -0,0 +1,13 @@ +const require_lazy = require("../_internal/lazy.js"); +//#region src/fp/array/filter.ts +function filter(predicate) { + function filterEager(array) { + return array.filter(predicate); + } + const filterLazy = require_lazy.createLazyFunction((value, index, emit) => { + if (predicate(value, index)) emit(value); + }); + return require_lazy.combineEagerAndLazyFunctions(filterEager, filterLazy); +} +//#endregion +exports.filter = filter; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/filter.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/filter.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e6faa796f4e1a8bab0c17f0ae1e70a6cc1449ff2 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/filter.mjs @@ -0,0 +1,12 @@ +import { combineEagerAndLazyFunctions, createLazyFunction } from "../_internal/lazy.mjs"; +//#region src/fp/array/filter.ts +function filter(predicate) { + function filterEager(array) { + return array.filter(predicate); + } + return combineEagerAndLazyFunctions(filterEager, createLazyFunction((value, index, emit) => { + if (predicate(value, index)) emit(value); + })); +} +//#endregion +export { filter }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/find.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/find.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..3ba4d4e59689cc7138c59f7ad2cae7e49e516daa --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/find.d.mts @@ -0,0 +1,39 @@ +//#region src/fp/array/find.d.ts +/** + * Creates a function that returns the first value accepted by a type guard. + * + * The predicate receives the value, index, and full input array. The returned + * function returns undefined when no value matches. + * + * @template T - The type of elements in the array. + * @template S - The narrowed element type accepted by the type guard. + * @param predicate - Type guard called with each value, index, and array until it returns true. + * @returns A function that maps a readonly array to the first matching value, or undefined. + * + * @example + * import { find, pipe } from 'es-toolkit/fp'; + * + * const isString = (value: string | number): value is string => typeof value === 'string'; + * pipe([1, 'a', 2], find(isString)); + * // => 'a' + */ +declare function find(predicate: (value: T, index: number, array: readonly T[]) => value is S): (array: readonly T[]) => S | undefined; +/** + * Creates a function that returns the first value matching a predicate. + * + * The predicate receives the value, index, and full input array. The returned + * function returns undefined when no value matches. + * + * @template T - The type of elements in the array. + * @param predicate - Predicate called with each value, index, and array until it returns true. + * @returns A function that maps a readonly array to the first matching value, or undefined. + * + * @example + * import { find, pipe } from 'es-toolkit/fp'; + * + * pipe([{ id: 1 }, { id: 2 }], find(item => item.id === 2)); + * // => { id: 2 } + */ +declare function find(predicate: (value: T, index: number, array: readonly T[]) => boolean): (array: readonly T[]) => T | undefined; +//#endregion +export { find }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/find.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/find.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3ba4d4e59689cc7138c59f7ad2cae7e49e516daa --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/find.d.ts @@ -0,0 +1,39 @@ +//#region src/fp/array/find.d.ts +/** + * Creates a function that returns the first value accepted by a type guard. + * + * The predicate receives the value, index, and full input array. The returned + * function returns undefined when no value matches. + * + * @template T - The type of elements in the array. + * @template S - The narrowed element type accepted by the type guard. + * @param predicate - Type guard called with each value, index, and array until it returns true. + * @returns A function that maps a readonly array to the first matching value, or undefined. + * + * @example + * import { find, pipe } from 'es-toolkit/fp'; + * + * const isString = (value: string | number): value is string => typeof value === 'string'; + * pipe([1, 'a', 2], find(isString)); + * // => 'a' + */ +declare function find(predicate: (value: T, index: number, array: readonly T[]) => value is S): (array: readonly T[]) => S | undefined; +/** + * Creates a function that returns the first value matching a predicate. + * + * The predicate receives the value, index, and full input array. The returned + * function returns undefined when no value matches. + * + * @template T - The type of elements in the array. + * @param predicate - Predicate called with each value, index, and array until it returns true. + * @returns A function that maps a readonly array to the first matching value, or undefined. + * + * @example + * import { find, pipe } from 'es-toolkit/fp'; + * + * pipe([{ id: 1 }, { id: 2 }], find(item => item.id === 2)); + * // => { id: 2 } + */ +declare function find(predicate: (value: T, index: number, array: readonly T[]) => boolean): (array: readonly T[]) => T | undefined; +//#endregion +export { find }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/find.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/find.js new file mode 100644 index 0000000000000000000000000000000000000000..1688b5d6bf3b936de297e43bcb7ecb949fcaae45 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/find.js @@ -0,0 +1,8 @@ +//#region src/fp/array/find.ts +function find(predicate) { + return function(array) { + return array.find(predicate); + }; +} +//#endregion +exports.find = find; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/find.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/find.mjs new file mode 100644 index 0000000000000000000000000000000000000000..ae088537c31e1bd1a930cd9fa50f8d9c1896ca39 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/find.mjs @@ -0,0 +1,8 @@ +//#region src/fp/array/find.ts +function find(predicate) { + return function(array) { + return array.find(predicate); + }; +} +//#endregion +export { find }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findIndex.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findIndex.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..83f58aee6fdae6c33e9beb71125c9479414d6cfb --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findIndex.d.mts @@ -0,0 +1,20 @@ +//#region src/fp/array/findIndex.d.ts +/** + * Creates a function that returns the index of the first value matching a predicate. + * + * The predicate receives the value, index, and full input array. The returned function + * returns -1 when no value matches, matching Array.prototype.findIndex. + * + * @template T - The type of elements in the array. + * @param predicate - Called with each value, index, and array until it returns true. + * @returns A function that maps a readonly array to the first matching index, or -1. + * + * @example + * import { findIndex, pipe } from 'es-toolkit/fp'; + * + * pipe([{ id: 1 }, { id: 2 }], findIndex(item => item.id === 2)); + * // => 1 + */ +declare function findIndex(predicate: (value: T, index: number, array: readonly T[]) => boolean): (array: readonly T[]) => number; +//#endregion +export { findIndex }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findIndex.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findIndex.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..83f58aee6fdae6c33e9beb71125c9479414d6cfb --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findIndex.d.ts @@ -0,0 +1,20 @@ +//#region src/fp/array/findIndex.d.ts +/** + * Creates a function that returns the index of the first value matching a predicate. + * + * The predicate receives the value, index, and full input array. The returned function + * returns -1 when no value matches, matching Array.prototype.findIndex. + * + * @template T - The type of elements in the array. + * @param predicate - Called with each value, index, and array until it returns true. + * @returns A function that maps a readonly array to the first matching index, or -1. + * + * @example + * import { findIndex, pipe } from 'es-toolkit/fp'; + * + * pipe([{ id: 1 }, { id: 2 }], findIndex(item => item.id === 2)); + * // => 1 + */ +declare function findIndex(predicate: (value: T, index: number, array: readonly T[]) => boolean): (array: readonly T[]) => number; +//#endregion +export { findIndex }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findIndex.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findIndex.js new file mode 100644 index 0000000000000000000000000000000000000000..38e071a455cf3184661658f2cc9394f7a84eacc6 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findIndex.js @@ -0,0 +1,24 @@ +//#region src/fp/array/findIndex.ts +/** +* Creates a function that returns the index of the first value matching a predicate. +* +* The predicate receives the value, index, and full input array. The returned function +* returns -1 when no value matches, matching Array.prototype.findIndex. +* +* @template T - The type of elements in the array. +* @param predicate - Called with each value, index, and array until it returns true. +* @returns A function that maps a readonly array to the first matching index, or -1. +* +* @example +* import { findIndex, pipe } from 'es-toolkit/fp'; +* +* pipe([{ id: 1 }, { id: 2 }], findIndex(item => item.id === 2)); +* // => 1 +*/ +function findIndex(predicate) { + return function(array) { + return array.findIndex(predicate); + }; +} +//#endregion +exports.findIndex = findIndex; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findIndex.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findIndex.mjs new file mode 100644 index 0000000000000000000000000000000000000000..3d55479a377451641e74fd48d522ac4013d4edd4 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findIndex.mjs @@ -0,0 +1,24 @@ +//#region src/fp/array/findIndex.ts +/** +* Creates a function that returns the index of the first value matching a predicate. +* +* The predicate receives the value, index, and full input array. The returned function +* returns -1 when no value matches, matching Array.prototype.findIndex. +* +* @template T - The type of elements in the array. +* @param predicate - Called with each value, index, and array until it returns true. +* @returns A function that maps a readonly array to the first matching index, or -1. +* +* @example +* import { findIndex, pipe } from 'es-toolkit/fp'; +* +* pipe([{ id: 1 }, { id: 2 }], findIndex(item => item.id === 2)); +* // => 1 +*/ +function findIndex(predicate) { + return function(array) { + return array.findIndex(predicate); + }; +} +//#endregion +export { findIndex }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findLast.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findLast.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..9410c4b3b48ba1cfa60de870bb9b3f8f86aeb56a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findLast.d.mts @@ -0,0 +1,39 @@ +//#region src/fp/array/findLast.d.ts +/** + * Creates a function that returns the last value accepted by a type guard. + * + * The predicate receives the value, index, and full input array while scanning + * from right to left. The returned function returns undefined when no value matches. + * + * @template T - The type of elements in the array. + * @template S - The narrowed element type accepted by the type guard. + * @param predicate - Type guard called with each value, index, and array from right to left. + * @returns A function that maps a readonly array to the last matching value, or undefined. + * + * @example + * import { findLast, pipe } from 'es-toolkit/fp'; + * + * const isString = (value: string | number): value is string => typeof value === 'string'; + * pipe([1, 'a', 2, 'b'], findLast(isString)); + * // => 'b' + */ +declare function findLast(predicate: (value: T, index: number, array: readonly T[]) => value is S): (array: readonly T[]) => S | undefined; +/** + * Creates a function that returns the last value matching a predicate. + * + * The predicate receives the value, index, and full input array while scanning + * from right to left. The returned function returns undefined when no value matches. + * + * @template T - The type of elements in the array. + * @param predicate - Predicate called with each value, index, and array from right to left. + * @returns A function that maps a readonly array to the last matching value, or undefined. + * + * @example + * import { findLast, pipe } from 'es-toolkit/fp'; + * + * pipe([{ id: 1 }, { id: 2 }, { id: 1 }], findLast(item => item.id === 1)); + * // => { id: 1 } + */ +declare function findLast(predicate: (value: T, index: number, array: readonly T[]) => boolean): (array: readonly T[]) => T | undefined; +//#endregion +export { findLast }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findLast.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findLast.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9410c4b3b48ba1cfa60de870bb9b3f8f86aeb56a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findLast.d.ts @@ -0,0 +1,39 @@ +//#region src/fp/array/findLast.d.ts +/** + * Creates a function that returns the last value accepted by a type guard. + * + * The predicate receives the value, index, and full input array while scanning + * from right to left. The returned function returns undefined when no value matches. + * + * @template T - The type of elements in the array. + * @template S - The narrowed element type accepted by the type guard. + * @param predicate - Type guard called with each value, index, and array from right to left. + * @returns A function that maps a readonly array to the last matching value, or undefined. + * + * @example + * import { findLast, pipe } from 'es-toolkit/fp'; + * + * const isString = (value: string | number): value is string => typeof value === 'string'; + * pipe([1, 'a', 2, 'b'], findLast(isString)); + * // => 'b' + */ +declare function findLast(predicate: (value: T, index: number, array: readonly T[]) => value is S): (array: readonly T[]) => S | undefined; +/** + * Creates a function that returns the last value matching a predicate. + * + * The predicate receives the value, index, and full input array while scanning + * from right to left. The returned function returns undefined when no value matches. + * + * @template T - The type of elements in the array. + * @param predicate - Predicate called with each value, index, and array from right to left. + * @returns A function that maps a readonly array to the last matching value, or undefined. + * + * @example + * import { findLast, pipe } from 'es-toolkit/fp'; + * + * pipe([{ id: 1 }, { id: 2 }, { id: 1 }], findLast(item => item.id === 1)); + * // => { id: 1 } + */ +declare function findLast(predicate: (value: T, index: number, array: readonly T[]) => boolean): (array: readonly T[]) => T | undefined; +//#endregion +export { findLast }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findLast.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findLast.js new file mode 100644 index 0000000000000000000000000000000000000000..e667c2ee9659007f3eb8a6ce23d3dd7e3e265040 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findLast.js @@ -0,0 +1,11 @@ +//#region src/fp/array/findLast.ts +function findLast(predicate) { + return function(array) { + for (let index = array.length - 1; index >= 0; index--) { + const value = array[index]; + if (predicate(value, index, array)) return value; + } + }; +} +//#endregion +exports.findLast = findLast; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findLast.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findLast.mjs new file mode 100644 index 0000000000000000000000000000000000000000..51c0ae1e822fc898c7befe6cac2eb0daae6b410c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findLast.mjs @@ -0,0 +1,11 @@ +//#region src/fp/array/findLast.ts +function findLast(predicate) { + return function(array) { + for (let index = array.length - 1; index >= 0; index--) { + const value = array[index]; + if (predicate(value, index, array)) return value; + } + }; +} +//#endregion +export { findLast }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findLastIndex.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findLastIndex.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..36eaa33593cd386b988cc2fc08d83d57bf861a4f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findLastIndex.d.mts @@ -0,0 +1,20 @@ +//#region src/fp/array/findLastIndex.d.ts +/** + * Creates a function that returns the index of the last value matching a predicate. + * + * The predicate receives the value, index, and full input array while scanning from right + * to left. The returned function returns -1 when no value matches. + * + * @template T - The type of elements in the array. + * @param predicate - Called with each value, index, and array from right to left until it returns true. + * @returns A function that maps a readonly array to the last matching index, or -1. + * + * @example + * import { findLastIndex, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 2], findLastIndex(value => value === 2)); + * // => 3 + */ +declare function findLastIndex(predicate: (value: T, index: number, array: readonly T[]) => boolean): (array: readonly T[]) => number; +//#endregion +export { findLastIndex }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findLastIndex.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findLastIndex.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..36eaa33593cd386b988cc2fc08d83d57bf861a4f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findLastIndex.d.ts @@ -0,0 +1,20 @@ +//#region src/fp/array/findLastIndex.d.ts +/** + * Creates a function that returns the index of the last value matching a predicate. + * + * The predicate receives the value, index, and full input array while scanning from right + * to left. The returned function returns -1 when no value matches. + * + * @template T - The type of elements in the array. + * @param predicate - Called with each value, index, and array from right to left until it returns true. + * @returns A function that maps a readonly array to the last matching index, or -1. + * + * @example + * import { findLastIndex, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 2], findLastIndex(value => value === 2)); + * // => 3 + */ +declare function findLastIndex(predicate: (value: T, index: number, array: readonly T[]) => boolean): (array: readonly T[]) => number; +//#endregion +export { findLastIndex }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findLastIndex.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findLastIndex.js new file mode 100644 index 0000000000000000000000000000000000000000..30fc0c182fc48a6b4eab4272313e5a3614ccd65b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findLastIndex.js @@ -0,0 +1,25 @@ +//#region src/fp/array/findLastIndex.ts +/** +* Creates a function that returns the index of the last value matching a predicate. +* +* The predicate receives the value, index, and full input array while scanning from right +* to left. The returned function returns -1 when no value matches. +* +* @template T - The type of elements in the array. +* @param predicate - Called with each value, index, and array from right to left until it returns true. +* @returns A function that maps a readonly array to the last matching index, or -1. +* +* @example +* import { findLastIndex, pipe } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3, 2], findLastIndex(value => value === 2)); +* // => 3 +*/ +function findLastIndex(predicate) { + return function(array) { + for (let index = array.length - 1; index >= 0; index--) if (predicate(array[index], index, array)) return index; + return -1; + }; +} +//#endregion +exports.findLastIndex = findLastIndex; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findLastIndex.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findLastIndex.mjs new file mode 100644 index 0000000000000000000000000000000000000000..ddb93e70496849f3b4e360faf5caebbb141d4f86 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/findLastIndex.mjs @@ -0,0 +1,25 @@ +//#region src/fp/array/findLastIndex.ts +/** +* Creates a function that returns the index of the last value matching a predicate. +* +* The predicate receives the value, index, and full input array while scanning from right +* to left. The returned function returns -1 when no value matches. +* +* @template T - The type of elements in the array. +* @param predicate - Called with each value, index, and array from right to left until it returns true. +* @returns A function that maps a readonly array to the last matching index, or -1. +* +* @example +* import { findLastIndex, pipe } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3, 2], findLastIndex(value => value === 2)); +* // => 3 +*/ +function findLastIndex(predicate) { + return function(array) { + for (let index = array.length - 1; index >= 0; index--) if (predicate(array[index], index, array)) return index; + return -1; + }; +} +//#endregion +export { findLastIndex }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatMap.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatMap.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..accab151106f32df7d2b105941a8d7aa1e190514 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatMap.d.mts @@ -0,0 +1,28 @@ +//#region src/fp/array/flatMap.d.ts +/** + * Creates a function that maps every element to an array with `callback` and + * concatenates the results, equivalent to `Array.prototype.flatMap`. Use it + * with {@link pipe}. + * + * The returned function is **lazy-capable**: inside a {@link pipe} it is fused + * with adjacent lazy functions and runs element-by-element, so a trailing + * `take` can terminate the walk early without expanding the rest of the input. + * + * @template T - The type of elements in the input array. + * @template U - The type of elements in the output array. + * @param callback - Called with `(value, index)` for each element; returns an + * array whose elements are flattened into the output. + * @returns A function that maps a `readonly T[]` to a new `U[]`. + * + * @example + * import { pipe, flatMap } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3], flatMap(x => [x, x * 10])); // => [1, 10, 2, 20, 3, 30] + * + * @example + * // Returning an empty array drops the element. + * pipe([1, 2, 3, 4], flatMap(x => (x % 2 === 0 ? [x] : []))); // => [2, 4] + */ +declare function flatMap(callback: (value: T, index: number) => U[]): (array: readonly T[]) => U[]; +//#endregion +export { flatMap }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatMap.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatMap.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..accab151106f32df7d2b105941a8d7aa1e190514 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatMap.d.ts @@ -0,0 +1,28 @@ +//#region src/fp/array/flatMap.d.ts +/** + * Creates a function that maps every element to an array with `callback` and + * concatenates the results, equivalent to `Array.prototype.flatMap`. Use it + * with {@link pipe}. + * + * The returned function is **lazy-capable**: inside a {@link pipe} it is fused + * with adjacent lazy functions and runs element-by-element, so a trailing + * `take` can terminate the walk early without expanding the rest of the input. + * + * @template T - The type of elements in the input array. + * @template U - The type of elements in the output array. + * @param callback - Called with `(value, index)` for each element; returns an + * array whose elements are flattened into the output. + * @returns A function that maps a `readonly T[]` to a new `U[]`. + * + * @example + * import { pipe, flatMap } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3], flatMap(x => [x, x * 10])); // => [1, 10, 2, 20, 3, 30] + * + * @example + * // Returning an empty array drops the element. + * pipe([1, 2, 3, 4], flatMap(x => (x % 2 === 0 ? [x] : []))); // => [2, 4] + */ +declare function flatMap(callback: (value: T, index: number) => U[]): (array: readonly T[]) => U[]; +//#endregion +export { flatMap }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatMap.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatMap.js new file mode 100644 index 0000000000000000000000000000000000000000..9a7d2ea687366914ed2433f13284e816074b1b61 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatMap.js @@ -0,0 +1,39 @@ +const require_flatMap = require("../../array/flatMap.js"); +const require_lazy = require("../_internal/lazy.js"); +//#region src/fp/array/flatMap.ts +/** +* Creates a function that maps every element to an array with `callback` and +* concatenates the results, equivalent to `Array.prototype.flatMap`. Use it +* with {@link pipe}. +* +* The returned function is **lazy-capable**: inside a {@link pipe} it is fused +* with adjacent lazy functions and runs element-by-element, so a trailing +* `take` can terminate the walk early without expanding the rest of the input. +* +* @template T - The type of elements in the input array. +* @template U - The type of elements in the output array. +* @param callback - Called with `(value, index)` for each element; returns an +* array whose elements are flattened into the output. +* @returns A function that maps a `readonly T[]` to a new `U[]`. +* +* @example +* import { pipe, flatMap } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3], flatMap(x => [x, x * 10])); // => [1, 10, 2, 20, 3, 30] +* +* @example +* // Returning an empty array drops the element. +* pipe([1, 2, 3, 4], flatMap(x => (x % 2 === 0 ? [x] : []))); // => [2, 4] +*/ +function flatMap(callback) { + function flatMapEager(array) { + return require_flatMap.flatMap(array, callback); + } + const flatMapLazy = require_lazy.createLazyFunction((value, index, emit) => { + const items = callback(value, index); + for (let i = 0; i < items.length; i++) emit(items[i]); + }); + return require_lazy.combineEagerAndLazyFunctions(flatMapEager, flatMapLazy); +} +//#endregion +exports.flatMap = flatMap; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatMap.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatMap.mjs new file mode 100644 index 0000000000000000000000000000000000000000..3a6d0a8fb86541bfcf64ebdf45055b3920f580b6 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatMap.mjs @@ -0,0 +1,38 @@ +import { flatMap as flatMap$1 } from "../../array/flatMap.mjs"; +import { combineEagerAndLazyFunctions, createLazyFunction } from "../_internal/lazy.mjs"; +//#region src/fp/array/flatMap.ts +/** +* Creates a function that maps every element to an array with `callback` and +* concatenates the results, equivalent to `Array.prototype.flatMap`. Use it +* with {@link pipe}. +* +* The returned function is **lazy-capable**: inside a {@link pipe} it is fused +* with adjacent lazy functions and runs element-by-element, so a trailing +* `take` can terminate the walk early without expanding the rest of the input. +* +* @template T - The type of elements in the input array. +* @template U - The type of elements in the output array. +* @param callback - Called with `(value, index)` for each element; returns an +* array whose elements are flattened into the output. +* @returns A function that maps a `readonly T[]` to a new `U[]`. +* +* @example +* import { pipe, flatMap } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3], flatMap(x => [x, x * 10])); // => [1, 10, 2, 20, 3, 30] +* +* @example +* // Returning an empty array drops the element. +* pipe([1, 2, 3, 4], flatMap(x => (x % 2 === 0 ? [x] : []))); // => [2, 4] +*/ +function flatMap(callback) { + function flatMapEager(array) { + return flatMap$1(array, callback); + } + return combineEagerAndLazyFunctions(flatMapEager, createLazyFunction((value, index, emit) => { + const items = callback(value, index); + for (let i = 0; i < items.length; i++) emit(items[i]); + })); +} +//#endregion +export { flatMap }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatMapDeep.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatMapDeep.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..ee94b0582efc92cdc031ed472f4f8836b7cbf78f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatMapDeep.d.mts @@ -0,0 +1,23 @@ +import { ExtractNestedArrayType } from "../../array/flattenDeep.mjs"; + +//#region src/fp/array/flatMapDeep.d.ts +/** + * Creates a function that maps each element and recursively flattens the mapped values. + * + * The iteratee receives each value and index. The returned function is lazy-capable inside + * {@link pipe}; a trailing short-circuiting operator can stop before later input values are mapped. + * + * @template T - The type of elements in the input array. + * @template U - The type returned by the iteratee before recursive flattening. + * @param iteratee - Called with each value and index to produce values to flatten. + * @returns A function that maps a readonly array to a deeply flattened array. + * + * @example + * import { flatMapDeep, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2], flatMapDeep(value => [[value, value * 10]])); + * // => [1, 10, 2, 20] + */ +declare function flatMapDeep(iteratee: (item: T, index: number) => U): (array: readonly T[]) => Array>; +//#endregion +export { flatMapDeep }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatMapDeep.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatMapDeep.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..96e7f3ef978446b40946dd8cdccfcd16989add89 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatMapDeep.d.ts @@ -0,0 +1,23 @@ +import { ExtractNestedArrayType } from "../../array/flattenDeep.js"; + +//#region src/fp/array/flatMapDeep.d.ts +/** + * Creates a function that maps each element and recursively flattens the mapped values. + * + * The iteratee receives each value and index. The returned function is lazy-capable inside + * {@link pipe}; a trailing short-circuiting operator can stop before later input values are mapped. + * + * @template T - The type of elements in the input array. + * @template U - The type returned by the iteratee before recursive flattening. + * @param iteratee - Called with each value and index to produce values to flatten. + * @returns A function that maps a readonly array to a deeply flattened array. + * + * @example + * import { flatMapDeep, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2], flatMapDeep(value => [[value, value * 10]])); + * // => [1, 10, 2, 20] + */ +declare function flatMapDeep(iteratee: (item: T, index: number) => U): (array: readonly T[]) => Array>; +//#endregion +export { flatMapDeep }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatMapDeep.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatMapDeep.js new file mode 100644 index 0000000000000000000000000000000000000000..8f8337e1c3e4f258bcb6b1ec29d051c76338ca5d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatMapDeep.js @@ -0,0 +1,38 @@ +const require_flatMapDeep = require("../../array/flatMapDeep.js"); +const require_lazy = require("../_internal/lazy.js"); +//#region src/fp/array/flatMapDeep.ts +/** +* Creates a function that maps each element and recursively flattens the mapped values. +* +* The iteratee receives each value and index. The returned function is lazy-capable inside +* {@link pipe}; a trailing short-circuiting operator can stop before later input values are mapped. +* +* @template T - The type of elements in the input array. +* @template U - The type returned by the iteratee before recursive flattening. +* @param iteratee - Called with each value and index to produce values to flatten. +* @returns A function that maps a readonly array to a deeply flattened array. +* +* @example +* import { flatMapDeep, pipe } from 'es-toolkit/fp'; +* +* pipe([1, 2], flatMapDeep(value => [[value, value * 10]])); +* // => [1, 10, 2, 20] +*/ +function flatMapDeep(iteratee) { + function flatMapDeepEager(array) { + return require_flatMapDeep.flatMapDeep(array, (item, index) => iteratee(item, index)); + } + const flatMapDeepLazy = require_lazy.createLazyFunction((value, index, emit) => { + emitDeep(iteratee(value, index), emit); + }); + return require_lazy.combineEagerAndLazyFunctions(flatMapDeepEager, flatMapDeepLazy); +} +function emitDeep(value, emit) { + if (Array.isArray(value)) { + for (let index = 0; index < value.length; index++) emitDeep(value[index], emit); + return; + } + emit(value); +} +//#endregion +exports.flatMapDeep = flatMapDeep; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatMapDeep.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatMapDeep.mjs new file mode 100644 index 0000000000000000000000000000000000000000..9892677f14182611bca09e718ae3103f92063eb1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatMapDeep.mjs @@ -0,0 +1,37 @@ +import { flatMapDeep as flatMapDeep$1 } from "../../array/flatMapDeep.mjs"; +import { combineEagerAndLazyFunctions, createLazyFunction } from "../_internal/lazy.mjs"; +//#region src/fp/array/flatMapDeep.ts +/** +* Creates a function that maps each element and recursively flattens the mapped values. +* +* The iteratee receives each value and index. The returned function is lazy-capable inside +* {@link pipe}; a trailing short-circuiting operator can stop before later input values are mapped. +* +* @template T - The type of elements in the input array. +* @template U - The type returned by the iteratee before recursive flattening. +* @param iteratee - Called with each value and index to produce values to flatten. +* @returns A function that maps a readonly array to a deeply flattened array. +* +* @example +* import { flatMapDeep, pipe } from 'es-toolkit/fp'; +* +* pipe([1, 2], flatMapDeep(value => [[value, value * 10]])); +* // => [1, 10, 2, 20] +*/ +function flatMapDeep(iteratee) { + function flatMapDeepEager(array) { + return flatMapDeep$1(array, (item, index) => iteratee(item, index)); + } + return combineEagerAndLazyFunctions(flatMapDeepEager, createLazyFunction((value, index, emit) => { + emitDeep(iteratee(value, index), emit); + })); +} +function emitDeep(value, emit) { + if (Array.isArray(value)) { + for (let index = 0; index < value.length; index++) emitDeep(value[index], emit); + return; + } + emit(value); +} +//#endregion +export { flatMapDeep }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatten.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatten.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..2f006a617121da18b2b0e9c1a12ac937045db4e2 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatten.d.mts @@ -0,0 +1,21 @@ +//#region src/fp/array/flatten.d.ts +/** + * Creates a function that flattens an array up to the specified depth. + * + * The returned function is lazy-capable inside {@link pipe}. A trailing + * short-circuiting operator can stop before later nested values are visited. + * + * @template T - The type of elements in the array. + * @template D - The depth to which nested arrays should be flattened. + * @param depth - The flattening depth. Defaults to 1. + * @returns A function that maps the piped array to a flattened array. + * + * @example + * import { flatten, pipe } from 'es-toolkit/fp'; + * + * pipe([1, [2, [3]]], flatten(2)); + * // => [1, 2, 3] + */ +declare function flatten(depth?: D): (array: readonly T[]) => Array>; +//#endregion +export { flatten }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatten.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatten.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..2f006a617121da18b2b0e9c1a12ac937045db4e2 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatten.d.ts @@ -0,0 +1,21 @@ +//#region src/fp/array/flatten.d.ts +/** + * Creates a function that flattens an array up to the specified depth. + * + * The returned function is lazy-capable inside {@link pipe}. A trailing + * short-circuiting operator can stop before later nested values are visited. + * + * @template T - The type of elements in the array. + * @template D - The depth to which nested arrays should be flattened. + * @param depth - The flattening depth. Defaults to 1. + * @returns A function that maps the piped array to a flattened array. + * + * @example + * import { flatten, pipe } from 'es-toolkit/fp'; + * + * pipe([1, [2, [3]]], flatten(2)); + * // => [1, 2, 3] + */ +declare function flatten(depth?: D): (array: readonly T[]) => Array>; +//#endregion +export { flatten }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatten.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatten.js new file mode 100644 index 0000000000000000000000000000000000000000..4dfebc432bf9b2538753f2a7a062c49714d57a91 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatten.js @@ -0,0 +1,39 @@ +const require_flatten = require("../../array/flatten.js"); +const require_lazy = require("../_internal/lazy.js"); +//#region src/fp/array/flatten.ts +/** +* Creates a function that flattens an array up to the specified depth. +* +* The returned function is lazy-capable inside {@link pipe}. A trailing +* short-circuiting operator can stop before later nested values are visited. +* +* @template T - The type of elements in the array. +* @template D - The depth to which nested arrays should be flattened. +* @param depth - The flattening depth. Defaults to 1. +* @returns A function that maps the piped array to a flattened array. +* +* @example +* import { flatten, pipe } from 'es-toolkit/fp'; +* +* pipe([1, [2, [3]]], flatten(2)); +* // => [1, 2, 3] +*/ +function flatten(depth = 1) { + const flooredDepth = Math.floor(depth); + function flattenEager(array) { + return require_flatten.flatten(array, depth); + } + const flattenLazy = require_lazy.createLazyFunction((value, _index, emit) => { + emitFlattened(value, 0, flooredDepth, emit); + }); + return require_lazy.combineEagerAndLazyFunctions(flattenEager, flattenLazy); +} +function emitFlattened(value, currentDepth, maxDepth, emit) { + if (Array.isArray(value) && currentDepth < maxDepth) { + for (let index = 0; index < value.length; index++) emitFlattened(value[index], currentDepth + 1, maxDepth, emit); + return; + } + emit(value); +} +//#endregion +exports.flatten = flatten; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatten.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatten.mjs new file mode 100644 index 0000000000000000000000000000000000000000..5dd3f87b49f497d665c71b36110b8ec20c2fd558 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flatten.mjs @@ -0,0 +1,38 @@ +import { flatten as flatten$1 } from "../../array/flatten.mjs"; +import { combineEagerAndLazyFunctions, createLazyFunction } from "../_internal/lazy.mjs"; +//#region src/fp/array/flatten.ts +/** +* Creates a function that flattens an array up to the specified depth. +* +* The returned function is lazy-capable inside {@link pipe}. A trailing +* short-circuiting operator can stop before later nested values are visited. +* +* @template T - The type of elements in the array. +* @template D - The depth to which nested arrays should be flattened. +* @param depth - The flattening depth. Defaults to 1. +* @returns A function that maps the piped array to a flattened array. +* +* @example +* import { flatten, pipe } from 'es-toolkit/fp'; +* +* pipe([1, [2, [3]]], flatten(2)); +* // => [1, 2, 3] +*/ +function flatten(depth = 1) { + const flooredDepth = Math.floor(depth); + function flattenEager(array) { + return flatten$1(array, depth); + } + return combineEagerAndLazyFunctions(flattenEager, createLazyFunction((value, _index, emit) => { + emitFlattened(value, 0, flooredDepth, emit); + })); +} +function emitFlattened(value, currentDepth, maxDepth, emit) { + if (Array.isArray(value) && currentDepth < maxDepth) { + for (let index = 0; index < value.length; index++) emitFlattened(value[index], currentDepth + 1, maxDepth, emit); + return; + } + emit(value); +} +//#endregion +export { flatten }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flattenDeep.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flattenDeep.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..7dd639ff7245cb05d37f4edfc8b7352fcc1fdd44 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flattenDeep.d.mts @@ -0,0 +1,21 @@ +import { ExtractNestedArrayType } from "../../array/flattenDeep.mjs"; + +//#region src/fp/array/flattenDeep.d.ts +/** + * Creates a function that recursively flattens an array. + * + * The returned function is lazy-capable inside {@link pipe}. A trailing + * short-circuiting operator can stop before later nested values are visited. + * + * @template T - The type of elements in the array. + * @returns A function that maps the piped array to a deeply flattened array. + * + * @example + * import { flattenDeep, pipe } from 'es-toolkit/fp'; + * + * pipe([1, [2, [3]]], flattenDeep()); + * // => [1, 2, 3] + */ +declare function flattenDeep(): (array: readonly T[]) => Array>; +//#endregion +export { flattenDeep }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flattenDeep.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flattenDeep.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..de046565a5b71a859d8a26bacc0969982b7de515 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flattenDeep.d.ts @@ -0,0 +1,21 @@ +import { ExtractNestedArrayType } from "../../array/flattenDeep.js"; + +//#region src/fp/array/flattenDeep.d.ts +/** + * Creates a function that recursively flattens an array. + * + * The returned function is lazy-capable inside {@link pipe}. A trailing + * short-circuiting operator can stop before later nested values are visited. + * + * @template T - The type of elements in the array. + * @returns A function that maps the piped array to a deeply flattened array. + * + * @example + * import { flattenDeep, pipe } from 'es-toolkit/fp'; + * + * pipe([1, [2, [3]]], flattenDeep()); + * // => [1, 2, 3] + */ +declare function flattenDeep(): (array: readonly T[]) => Array>; +//#endregion +export { flattenDeep }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flattenDeep.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flattenDeep.js new file mode 100644 index 0000000000000000000000000000000000000000..b3b03641b08584794fd083bf1268a2f43e274b08 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flattenDeep.js @@ -0,0 +1,36 @@ +const require_flattenDeep = require("../../array/flattenDeep.js"); +const require_lazy = require("../_internal/lazy.js"); +//#region src/fp/array/flattenDeep.ts +/** +* Creates a function that recursively flattens an array. +* +* The returned function is lazy-capable inside {@link pipe}. A trailing +* short-circuiting operator can stop before later nested values are visited. +* +* @template T - The type of elements in the array. +* @returns A function that maps the piped array to a deeply flattened array. +* +* @example +* import { flattenDeep, pipe } from 'es-toolkit/fp'; +* +* pipe([1, [2, [3]]], flattenDeep()); +* // => [1, 2, 3] +*/ +function flattenDeep() { + function flattenDeepEager(array) { + return require_flattenDeep.flattenDeep(array); + } + const flattenDeepLazy = require_lazy.createLazyFunction((value, _index, emit) => { + emitDeep(value, emit); + }); + return require_lazy.combineEagerAndLazyFunctions(flattenDeepEager, flattenDeepLazy); +} +function emitDeep(value, emit) { + if (Array.isArray(value)) { + for (let index = 0; index < value.length; index++) emitDeep(value[index], emit); + return; + } + emit(value); +} +//#endregion +exports.flattenDeep = flattenDeep; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flattenDeep.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flattenDeep.mjs new file mode 100644 index 0000000000000000000000000000000000000000..2cb7dc2890b6c3a8f63f820eafd04fe8f8665877 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/flattenDeep.mjs @@ -0,0 +1,35 @@ +import { flattenDeep as flattenDeep$1 } from "../../array/flattenDeep.mjs"; +import { combineEagerAndLazyFunctions, createLazyFunction } from "../_internal/lazy.mjs"; +//#region src/fp/array/flattenDeep.ts +/** +* Creates a function that recursively flattens an array. +* +* The returned function is lazy-capable inside {@link pipe}. A trailing +* short-circuiting operator can stop before later nested values are visited. +* +* @template T - The type of elements in the array. +* @returns A function that maps the piped array to a deeply flattened array. +* +* @example +* import { flattenDeep, pipe } from 'es-toolkit/fp'; +* +* pipe([1, [2, [3]]], flattenDeep()); +* // => [1, 2, 3] +*/ +function flattenDeep() { + function flattenDeepEager(array) { + return flattenDeep$1(array); + } + return combineEagerAndLazyFunctions(flattenDeepEager, createLazyFunction((value, _index, emit) => { + emitDeep(value, emit); + })); +} +function emitDeep(value, emit) { + if (Array.isArray(value)) { + for (let index = 0; index < value.length; index++) emitDeep(value[index], emit); + return; + } + emit(value); +} +//#endregion +export { flattenDeep }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/forEach.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/forEach.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..b05cde999babe0045371368db01c94eb685d6610 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/forEach.d.mts @@ -0,0 +1,22 @@ +//#region src/fp/array/forEach.d.ts +/** + * Creates a function that runs a callback for every element and returns the original array. + * + * This mirrors Remeda's pipeline-friendly `forEach` behavior: the side effect + * runs, then the input continues through the pipeline by reference. The returned + * function is lazy-capable inside {@link pipe}; when followed by a + * short-circuiting operator, the callback only runs for consumed values. + * + * @template T - The type of elements in the array. + * @param callback - Called with each value and index. + * @returns A function that performs the side effect and returns the original array. + * + * @example + * import { forEach, map, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3], forEach(value => console.log(value)), map(value => value * 2)); + * // => [2, 4, 6] + */ +declare function forEach(callback: (value: T, index: number) => void): (array: readonly T[]) => readonly T[]; +//#endregion +export { forEach }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/forEach.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/forEach.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b05cde999babe0045371368db01c94eb685d6610 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/forEach.d.ts @@ -0,0 +1,22 @@ +//#region src/fp/array/forEach.d.ts +/** + * Creates a function that runs a callback for every element and returns the original array. + * + * This mirrors Remeda's pipeline-friendly `forEach` behavior: the side effect + * runs, then the input continues through the pipeline by reference. The returned + * function is lazy-capable inside {@link pipe}; when followed by a + * short-circuiting operator, the callback only runs for consumed values. + * + * @template T - The type of elements in the array. + * @param callback - Called with each value and index. + * @returns A function that performs the side effect and returns the original array. + * + * @example + * import { forEach, map, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3], forEach(value => console.log(value)), map(value => value * 2)); + * // => [2, 4, 6] + */ +declare function forEach(callback: (value: T, index: number) => void): (array: readonly T[]) => readonly T[]; +//#endregion +export { forEach }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/forEach.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/forEach.js new file mode 100644 index 0000000000000000000000000000000000000000..01ce3bb570844c85bd6fb4da4f05b7bf0a44af3c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/forEach.js @@ -0,0 +1,33 @@ +const require_lazy = require("../_internal/lazy.js"); +//#region src/fp/array/forEach.ts +/** +* Creates a function that runs a callback for every element and returns the original array. +* +* This mirrors Remeda's pipeline-friendly `forEach` behavior: the side effect +* runs, then the input continues through the pipeline by reference. The returned +* function is lazy-capable inside {@link pipe}; when followed by a +* short-circuiting operator, the callback only runs for consumed values. +* +* @template T - The type of elements in the array. +* @param callback - Called with each value and index. +* @returns A function that performs the side effect and returns the original array. +* +* @example +* import { forEach, map, pipe } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3], forEach(value => console.log(value)), map(value => value * 2)); +* // => [2, 4, 6] +*/ +function forEach(callback) { + function forEachEager(array) { + array.forEach(callback); + return array; + } + const forEachLazy = require_lazy.createLazyFunction((value, index, emit) => { + callback(value, index); + emit(value); + }); + return require_lazy.combineEagerAndLazyFunctions(forEachEager, forEachLazy); +} +//#endregion +exports.forEach = forEach; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/forEach.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/forEach.mjs new file mode 100644 index 0000000000000000000000000000000000000000..af36badd81fe0670a7bf494594092430774ff789 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/forEach.mjs @@ -0,0 +1,32 @@ +import { combineEagerAndLazyFunctions, createLazyFunction } from "../_internal/lazy.mjs"; +//#region src/fp/array/forEach.ts +/** +* Creates a function that runs a callback for every element and returns the original array. +* +* This mirrors Remeda's pipeline-friendly `forEach` behavior: the side effect +* runs, then the input continues through the pipeline by reference. The returned +* function is lazy-capable inside {@link pipe}; when followed by a +* short-circuiting operator, the callback only runs for consumed values. +* +* @template T - The type of elements in the array. +* @param callback - Called with each value and index. +* @returns A function that performs the side effect and returns the original array. +* +* @example +* import { forEach, map, pipe } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3], forEach(value => console.log(value)), map(value => value * 2)); +* // => [2, 4, 6] +*/ +function forEach(callback) { + function forEachEager(array) { + array.forEach(callback); + return array; + } + return combineEagerAndLazyFunctions(forEachEager, createLazyFunction((value, index, emit) => { + callback(value, index); + emit(value); + })); +} +//#endregion +export { forEach }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/groupBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/groupBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..ba0d334bf7c15276bcb2e4c7e39dc9ea24ac15a5 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/groupBy.d.mts @@ -0,0 +1,21 @@ +//#region src/fp/array/groupBy.d.ts +/** + * Creates a function that groups values by a derived key. + * + * The key selector receives each value, index, and full input array. Values that produce + * the same key are collected in insertion order. + * + * @template T - The type of elements in the array. + * @template K - The property-key type produced by the selector. + * @param getKey - Called with each value, index, and array to produce a group key. + * @returns A function that maps a readonly array to grouped values. + * + * @example + * import { groupBy, pipe } from 'es-toolkit/fp'; + * + * pipe(['ant', 'bear', 'cat'], groupBy(word => word.length)); + * // => { 3: ['ant', 'cat'], 4: ['bear'] } + */ +declare function groupBy(getKey: (item: T, index: number, array: readonly T[]) => K): (array: readonly T[]) => Record; +//#endregion +export { groupBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/groupBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/groupBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ba0d334bf7c15276bcb2e4c7e39dc9ea24ac15a5 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/groupBy.d.ts @@ -0,0 +1,21 @@ +//#region src/fp/array/groupBy.d.ts +/** + * Creates a function that groups values by a derived key. + * + * The key selector receives each value, index, and full input array. Values that produce + * the same key are collected in insertion order. + * + * @template T - The type of elements in the array. + * @template K - The property-key type produced by the selector. + * @param getKey - Called with each value, index, and array to produce a group key. + * @returns A function that maps a readonly array to grouped values. + * + * @example + * import { groupBy, pipe } from 'es-toolkit/fp'; + * + * pipe(['ant', 'bear', 'cat'], groupBy(word => word.length)); + * // => { 3: ['ant', 'cat'], 4: ['bear'] } + */ +declare function groupBy(getKey: (item: T, index: number, array: readonly T[]) => K): (array: readonly T[]) => Record; +//#endregion +export { groupBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/groupBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/groupBy.js new file mode 100644 index 0000000000000000000000000000000000000000..933494379e53c9042aedc99cabee2cf6b167ed0d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/groupBy.js @@ -0,0 +1,26 @@ +const require_groupBy = require("../../array/groupBy.js"); +//#region src/fp/array/groupBy.ts +/** +* Creates a function that groups values by a derived key. +* +* The key selector receives each value, index, and full input array. Values that produce +* the same key are collected in insertion order. +* +* @template T - The type of elements in the array. +* @template K - The property-key type produced by the selector. +* @param getKey - Called with each value, index, and array to produce a group key. +* @returns A function that maps a readonly array to grouped values. +* +* @example +* import { groupBy, pipe } from 'es-toolkit/fp'; +* +* pipe(['ant', 'bear', 'cat'], groupBy(word => word.length)); +* // => { 3: ['ant', 'cat'], 4: ['bear'] } +*/ +function groupBy(getKey) { + return function(array) { + return require_groupBy.groupBy(array, getKey); + }; +} +//#endregion +exports.groupBy = groupBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/groupBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/groupBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..3ec6b20e22496f94e66acb043436ff173645c093 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/groupBy.mjs @@ -0,0 +1,26 @@ +import { groupBy as groupBy$1 } from "../../array/groupBy.mjs"; +//#region src/fp/array/groupBy.ts +/** +* Creates a function that groups values by a derived key. +* +* The key selector receives each value, index, and full input array. Values that produce +* the same key are collected in insertion order. +* +* @template T - The type of elements in the array. +* @template K - The property-key type produced by the selector. +* @param getKey - Called with each value, index, and array to produce a group key. +* @returns A function that maps a readonly array to grouped values. +* +* @example +* import { groupBy, pipe } from 'es-toolkit/fp'; +* +* pipe(['ant', 'bear', 'cat'], groupBy(word => word.length)); +* // => { 3: ['ant', 'cat'], 4: ['bear'] } +*/ +function groupBy(getKey) { + return function(array) { + return groupBy$1(array, getKey); + }; +} +//#endregion +export { groupBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/head.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/head.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..ef18029859932f56d36c23c9251b88f5137e980f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/head.d.mts @@ -0,0 +1,35 @@ +//#region src/fp/array/head.d.ts +/** + * Creates a function that returns the first element of a non-empty array. + * + * This overload preserves the non-empty tuple guarantee: the returned function + * always returns T when the piped array has at least one element. + * + * @template T - The type of elements in the array. + * @returns A function that maps a non-empty readonly array to its first element. + * + * @example + * import { head, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3] as const, head()); + * // => 1 + */ +declare function head(): (array: readonly [T, ...T[]]) => T; +/** + * Creates a function that returns the first element of an array, or undefined. + * + * Empty arrays return undefined, matching the main {@link head} behavior. Use + * the returned function with {@link pipe}. + * + * @template T - The type of elements in the array. + * @returns A function that maps a readonly array to its first element, or undefined. + * + * @example + * import { head, pipe } from 'es-toolkit/fp'; + * + * pipe([] as number[], head()); + * // => undefined + */ +declare function head(): (array: readonly T[]) => T | undefined; +//#endregion +export { head }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/head.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/head.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ef18029859932f56d36c23c9251b88f5137e980f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/head.d.ts @@ -0,0 +1,35 @@ +//#region src/fp/array/head.d.ts +/** + * Creates a function that returns the first element of a non-empty array. + * + * This overload preserves the non-empty tuple guarantee: the returned function + * always returns T when the piped array has at least one element. + * + * @template T - The type of elements in the array. + * @returns A function that maps a non-empty readonly array to its first element. + * + * @example + * import { head, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3] as const, head()); + * // => 1 + */ +declare function head(): (array: readonly [T, ...T[]]) => T; +/** + * Creates a function that returns the first element of an array, or undefined. + * + * Empty arrays return undefined, matching the main {@link head} behavior. Use + * the returned function with {@link pipe}. + * + * @template T - The type of elements in the array. + * @returns A function that maps a readonly array to its first element, or undefined. + * + * @example + * import { head, pipe } from 'es-toolkit/fp'; + * + * pipe([] as number[], head()); + * // => undefined + */ +declare function head(): (array: readonly T[]) => T | undefined; +//#endregion +export { head }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/head.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/head.js new file mode 100644 index 0000000000000000000000000000000000000000..f2ede37a110c849f933b81958de5d08b39b1b92c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/head.js @@ -0,0 +1,9 @@ +const require_head = require("../../array/head.js"); +//#region src/fp/array/head.ts +function head() { + return function(array) { + return require_head.head(array); + }; +} +//#endregion +exports.head = head; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/head.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/head.mjs new file mode 100644 index 0000000000000000000000000000000000000000..4267b019f0a4bf377c7b1948abc6a20ec8fe670b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/head.mjs @@ -0,0 +1,9 @@ +import { head as head$1 } from "../../array/head.mjs"; +//#region src/fp/array/head.ts +function head() { + return function(array) { + return head$1(array); + }; +} +//#endregion +export { head }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/index.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..e5f60e8ec2deefb32bbc8cd98228797d1b6f010a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/index.d.mts @@ -0,0 +1,69 @@ +import { WindowedOptions } from "../../array/windowed.mjs"; +import { at } from "./at.mjs"; +import { cartesianProduct } from "./cartesianProduct.mjs"; +import { chunk } from "./chunk.mjs"; +import { chunkBy } from "./chunkBy.mjs"; +import { combinations } from "./combinations.mjs"; +import { compact } from "./compact.mjs"; +import { countBy } from "./countBy.mjs"; +import { difference } from "./difference.mjs"; +import { differenceBy } from "./differenceBy.mjs"; +import { differenceWith } from "./differenceWith.mjs"; +import { drop } from "./drop.mjs"; +import { dropRight } from "./dropRight.mjs"; +import { dropRightWhile } from "./dropRightWhile.mjs"; +import { dropWhile } from "./dropWhile.mjs"; +import { filter } from "./filter.mjs"; +import { find } from "./find.mjs"; +import { findIndex } from "./findIndex.mjs"; +import { findLast } from "./findLast.mjs"; +import { findLastIndex } from "./findLastIndex.mjs"; +import { flatMap } from "./flatMap.mjs"; +import { flatMapDeep } from "./flatMapDeep.mjs"; +import { flatten } from "./flatten.mjs"; +import { flattenDeep } from "./flattenDeep.mjs"; +import { forEach } from "./forEach.mjs"; +import { groupBy } from "./groupBy.mjs"; +import { head } from "./head.mjs"; +import { initial } from "./initial.mjs"; +import { intersection } from "./intersection.mjs"; +import { intersectionBy } from "./intersectionBy.mjs"; +import { intersectionWith } from "./intersectionWith.mjs"; +import { isSubset } from "./isSubset.mjs"; +import { isSubsetWith } from "./isSubsetWith.mjs"; +import { join } from "./join.mjs"; +import { keyBy } from "./keyBy.mjs"; +import { last } from "./last.mjs"; +import { length } from "./length.mjs"; +import { map } from "./map.mjs"; +import { maxBy } from "./maxBy.mjs"; +import { minBy } from "./minBy.mjs"; +import { orderBy } from "./orderBy.mjs"; +import { partition } from "./partition.mjs"; +import { reverse } from "./reverse.mjs"; +import { sample } from "./sample.mjs"; +import { sampleSize } from "./sampleSize.mjs"; +import { shuffle } from "./shuffle.mjs"; +import { sortBy } from "./sortBy.mjs"; +import { tail } from "./tail.mjs"; +import { take } from "./take.mjs"; +import { takeRight } from "./takeRight.mjs"; +import { takeRightWhile } from "./takeRightWhile.mjs"; +import { takeWhile } from "./takeWhile.mjs"; +import { toFilled } from "./toFilled.mjs"; +import { union } from "./union.mjs"; +import { unionBy } from "./unionBy.mjs"; +import { unionWith } from "./unionWith.mjs"; +import { uniq } from "./uniq.mjs"; +import { uniqBy } from "./uniqBy.mjs"; +import { uniqWith } from "./uniqWith.mjs"; +import { unzip } from "./unzip.mjs"; +import { unzipWith } from "./unzipWith.mjs"; +import { windowed } from "./windowed.mjs"; +import { without } from "./without.mjs"; +import { xor } from "./xor.mjs"; +import { xorBy } from "./xorBy.mjs"; +import { xorWith } from "./xorWith.mjs"; +import { zip } from "./zip.mjs"; +import { zipObject } from "./zipObject.mjs"; +import { zipWith } from "./zipWith.mjs"; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/index.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ab43cb32ea461720fa39066eb7598aadb6928cab --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/index.d.ts @@ -0,0 +1,69 @@ +import { WindowedOptions } from "../../array/windowed.js"; +import { at } from "./at.js"; +import { cartesianProduct } from "./cartesianProduct.js"; +import { chunk } from "./chunk.js"; +import { chunkBy } from "./chunkBy.js"; +import { combinations } from "./combinations.js"; +import { compact } from "./compact.js"; +import { countBy } from "./countBy.js"; +import { difference } from "./difference.js"; +import { differenceBy } from "./differenceBy.js"; +import { differenceWith } from "./differenceWith.js"; +import { drop } from "./drop.js"; +import { dropRight } from "./dropRight.js"; +import { dropRightWhile } from "./dropRightWhile.js"; +import { dropWhile } from "./dropWhile.js"; +import { filter } from "./filter.js"; +import { find } from "./find.js"; +import { findIndex } from "./findIndex.js"; +import { findLast } from "./findLast.js"; +import { findLastIndex } from "./findLastIndex.js"; +import { flatMap } from "./flatMap.js"; +import { flatMapDeep } from "./flatMapDeep.js"; +import { flatten } from "./flatten.js"; +import { flattenDeep } from "./flattenDeep.js"; +import { forEach } from "./forEach.js"; +import { groupBy } from "./groupBy.js"; +import { head } from "./head.js"; +import { initial } from "./initial.js"; +import { intersection } from "./intersection.js"; +import { intersectionBy } from "./intersectionBy.js"; +import { intersectionWith } from "./intersectionWith.js"; +import { isSubset } from "./isSubset.js"; +import { isSubsetWith } from "./isSubsetWith.js"; +import { join } from "./join.js"; +import { keyBy } from "./keyBy.js"; +import { last } from "./last.js"; +import { length } from "./length.js"; +import { map } from "./map.js"; +import { maxBy } from "./maxBy.js"; +import { minBy } from "./minBy.js"; +import { orderBy } from "./orderBy.js"; +import { partition } from "./partition.js"; +import { reverse } from "./reverse.js"; +import { sample } from "./sample.js"; +import { sampleSize } from "./sampleSize.js"; +import { shuffle } from "./shuffle.js"; +import { sortBy } from "./sortBy.js"; +import { tail } from "./tail.js"; +import { take } from "./take.js"; +import { takeRight } from "./takeRight.js"; +import { takeRightWhile } from "./takeRightWhile.js"; +import { takeWhile } from "./takeWhile.js"; +import { toFilled } from "./toFilled.js"; +import { union } from "./union.js"; +import { unionBy } from "./unionBy.js"; +import { unionWith } from "./unionWith.js"; +import { uniq } from "./uniq.js"; +import { uniqBy } from "./uniqBy.js"; +import { uniqWith } from "./uniqWith.js"; +import { unzip } from "./unzip.js"; +import { unzipWith } from "./unzipWith.js"; +import { windowed } from "./windowed.js"; +import { without } from "./without.js"; +import { xor } from "./xor.js"; +import { xorBy } from "./xorBy.js"; +import { xorWith } from "./xorWith.js"; +import { zip } from "./zip.js"; +import { zipObject } from "./zipObject.js"; +import { zipWith } from "./zipWith.js"; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/index.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/index.js new file mode 100644 index 0000000000000000000000000000000000000000..addc37bf3699bb7bf1b8a86115584b31b0f6fb41 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/index.js @@ -0,0 +1,68 @@ +require("./at.js"); +require("./cartesianProduct.js"); +require("./chunk.js"); +require("./chunkBy.js"); +require("./combinations.js"); +require("./compact.js"); +require("./countBy.js"); +require("./difference.js"); +require("./differenceBy.js"); +require("./differenceWith.js"); +require("./drop.js"); +require("./dropRight.js"); +require("./dropRightWhile.js"); +require("./dropWhile.js"); +require("./filter.js"); +require("./find.js"); +require("./findIndex.js"); +require("./findLast.js"); +require("./findLastIndex.js"); +require("./flatMap.js"); +require("./flatMapDeep.js"); +require("./flatten.js"); +require("./flattenDeep.js"); +require("./forEach.js"); +require("./groupBy.js"); +require("./head.js"); +require("./initial.js"); +require("./intersection.js"); +require("./intersectionBy.js"); +require("./intersectionWith.js"); +require("./isSubset.js"); +require("./isSubsetWith.js"); +require("./join.js"); +require("./keyBy.js"); +require("./last.js"); +require("./length.js"); +require("./map.js"); +require("./maxBy.js"); +require("./minBy.js"); +require("./orderBy.js"); +require("./partition.js"); +require("./reverse.js"); +require("./sample.js"); +require("./sampleSize.js"); +require("./shuffle.js"); +require("./sortBy.js"); +require("./tail.js"); +require("./take.js"); +require("./takeRight.js"); +require("./takeRightWhile.js"); +require("./takeWhile.js"); +require("./toFilled.js"); +require("./union.js"); +require("./unionBy.js"); +require("./unionWith.js"); +require("./uniq.js"); +require("./uniqBy.js"); +require("./uniqWith.js"); +require("./unzip.js"); +require("./unzipWith.js"); +require("./windowed.js"); +require("./without.js"); +require("./xor.js"); +require("./xorBy.js"); +require("./xorWith.js"); +require("./zip.js"); +require("./zipObject.js"); +require("./zipWith.js"); diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/index.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..6e6fc17c4d7b60bd17471857e6989ee72bc66b58 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/index.mjs @@ -0,0 +1,68 @@ +import "./at.mjs"; +import "./cartesianProduct.mjs"; +import "./chunk.mjs"; +import "./chunkBy.mjs"; +import "./combinations.mjs"; +import "./compact.mjs"; +import "./countBy.mjs"; +import "./difference.mjs"; +import "./differenceBy.mjs"; +import "./differenceWith.mjs"; +import "./drop.mjs"; +import "./dropRight.mjs"; +import "./dropRightWhile.mjs"; +import "./dropWhile.mjs"; +import "./filter.mjs"; +import "./find.mjs"; +import "./findIndex.mjs"; +import "./findLast.mjs"; +import "./findLastIndex.mjs"; +import "./flatMap.mjs"; +import "./flatMapDeep.mjs"; +import "./flatten.mjs"; +import "./flattenDeep.mjs"; +import "./forEach.mjs"; +import "./groupBy.mjs"; +import "./head.mjs"; +import "./initial.mjs"; +import "./intersection.mjs"; +import "./intersectionBy.mjs"; +import "./intersectionWith.mjs"; +import "./isSubset.mjs"; +import "./isSubsetWith.mjs"; +import "./join.mjs"; +import "./keyBy.mjs"; +import "./last.mjs"; +import "./length.mjs"; +import "./map.mjs"; +import "./maxBy.mjs"; +import "./minBy.mjs"; +import "./orderBy.mjs"; +import "./partition.mjs"; +import "./reverse.mjs"; +import "./sample.mjs"; +import "./sampleSize.mjs"; +import "./shuffle.mjs"; +import "./sortBy.mjs"; +import "./tail.mjs"; +import "./take.mjs"; +import "./takeRight.mjs"; +import "./takeRightWhile.mjs"; +import "./takeWhile.mjs"; +import "./toFilled.mjs"; +import "./union.mjs"; +import "./unionBy.mjs"; +import "./unionWith.mjs"; +import "./uniq.mjs"; +import "./uniqBy.mjs"; +import "./uniqWith.mjs"; +import "./unzip.mjs"; +import "./unzipWith.mjs"; +import "./windowed.mjs"; +import "./without.mjs"; +import "./xor.mjs"; +import "./xorBy.mjs"; +import "./xorWith.mjs"; +import "./zip.mjs"; +import "./zipObject.mjs"; +import "./zipWith.mjs"; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/initial.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/initial.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..d1d13603687ea8dc3cf96ac839d9014d6aab7a66 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/initial.d.mts @@ -0,0 +1,19 @@ +//#region src/fp/array/initial.d.ts +/** + * Creates a function that returns every element except the last one. + * + * The returned function follows the main {@link initial} behavior and always returns a new array. + * Use it with {@link pipe}. + * + * @template T - The type of elements in the array. + * @returns A function that maps a readonly array to its initial elements. + * + * @example + * import { initial, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3], initial()); + * // => [1, 2] + */ +declare function initial(): (array: readonly T[]) => T[]; +//#endregion +export { initial }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/initial.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/initial.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d1d13603687ea8dc3cf96ac839d9014d6aab7a66 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/initial.d.ts @@ -0,0 +1,19 @@ +//#region src/fp/array/initial.d.ts +/** + * Creates a function that returns every element except the last one. + * + * The returned function follows the main {@link initial} behavior and always returns a new array. + * Use it with {@link pipe}. + * + * @template T - The type of elements in the array. + * @returns A function that maps a readonly array to its initial elements. + * + * @example + * import { initial, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3], initial()); + * // => [1, 2] + */ +declare function initial(): (array: readonly T[]) => T[]; +//#endregion +export { initial }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/initial.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/initial.js new file mode 100644 index 0000000000000000000000000000000000000000..6fcc56dcd8574598ed5345535b8a3334c0868a56 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/initial.js @@ -0,0 +1,24 @@ +const require_initial = require("../../array/initial.js"); +//#region src/fp/array/initial.ts +/** +* Creates a function that returns every element except the last one. +* +* The returned function follows the main {@link initial} behavior and always returns a new array. +* Use it with {@link pipe}. +* +* @template T - The type of elements in the array. +* @returns A function that maps a readonly array to its initial elements. +* +* @example +* import { initial, pipe } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3], initial()); +* // => [1, 2] +*/ +function initial() { + return function(array) { + return require_initial.initial(array); + }; +} +//#endregion +exports.initial = initial; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/initial.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/initial.mjs new file mode 100644 index 0000000000000000000000000000000000000000..5a6039d02c923507d22908654254a735608b2df6 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/initial.mjs @@ -0,0 +1,24 @@ +import { initial as initial$1 } from "../../array/initial.mjs"; +//#region src/fp/array/initial.ts +/** +* Creates a function that returns every element except the last one. +* +* The returned function follows the main {@link initial} behavior and always returns a new array. +* Use it with {@link pipe}. +* +* @template T - The type of elements in the array. +* @returns A function that maps a readonly array to its initial elements. +* +* @example +* import { initial, pipe } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3], initial()); +* // => [1, 2] +*/ +function initial() { + return function(array) { + return initial$1(array); + }; +} +//#endregion +export { initial }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersection.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersection.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..3c6ffa6bec025303bdf7fdfa0d318393ce3595b1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersection.d.mts @@ -0,0 +1,21 @@ +//#region src/fp/array/intersection.d.ts +/** + * Creates a function that keeps values from the piped array that are also present in another array. + * + * Equality follows SameValueZero through Set membership, matching the main + * {@link intersection} implementation. The returned function is lazy-capable + * inside {@link pipe}. + * + * @template T - The type of elements in the arrays. + * @param secondArray - Values to intersect with the piped array. + * @returns A function that maps the piped array to its intersection. + * + * @example + * import { intersection, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3], intersection([2, 4])); + * // => [2] + */ +declare function intersection(secondArray: readonly T[]): (array: readonly T[]) => T[]; +//#endregion +export { intersection }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersection.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersection.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3c6ffa6bec025303bdf7fdfa0d318393ce3595b1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersection.d.ts @@ -0,0 +1,21 @@ +//#region src/fp/array/intersection.d.ts +/** + * Creates a function that keeps values from the piped array that are also present in another array. + * + * Equality follows SameValueZero through Set membership, matching the main + * {@link intersection} implementation. The returned function is lazy-capable + * inside {@link pipe}. + * + * @template T - The type of elements in the arrays. + * @param secondArray - Values to intersect with the piped array. + * @returns A function that maps the piped array to its intersection. + * + * @example + * import { intersection, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3], intersection([2, 4])); + * // => [2] + */ +declare function intersection(secondArray: readonly T[]): (array: readonly T[]) => T[]; +//#endregion +export { intersection }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersection.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersection.js new file mode 100644 index 0000000000000000000000000000000000000000..c4d1ce026a5e91c1bb404149865f46d7a78c389d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersection.js @@ -0,0 +1,32 @@ +const require_intersection = require("../../array/intersection.js"); +const require_lazy = require("../_internal/lazy.js"); +//#region src/fp/array/intersection.ts +/** +* Creates a function that keeps values from the piped array that are also present in another array. +* +* Equality follows SameValueZero through Set membership, matching the main +* {@link intersection} implementation. The returned function is lazy-capable +* inside {@link pipe}. +* +* @template T - The type of elements in the arrays. +* @param secondArray - Values to intersect with the piped array. +* @returns A function that maps the piped array to its intersection. +* +* @example +* import { intersection, pipe } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3], intersection([2, 4])); +* // => [2] +*/ +function intersection(secondArray) { + const secondSet = new Set(secondArray); + function intersectionEager(array) { + return require_intersection.intersection(array, secondArray); + } + const intersectionLazy = require_lazy.createLazyFunction((value, _index, emit) => { + if (secondSet.has(value)) emit(value); + }); + return require_lazy.combineEagerAndLazyFunctions(intersectionEager, intersectionLazy); +} +//#endregion +exports.intersection = intersection; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersection.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersection.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b5b9cf3f0bcc2f53dc67477a1fb9fba201f19ed1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersection.mjs @@ -0,0 +1,31 @@ +import { intersection as intersection$1 } from "../../array/intersection.mjs"; +import { combineEagerAndLazyFunctions, createLazyFunction } from "../_internal/lazy.mjs"; +//#region src/fp/array/intersection.ts +/** +* Creates a function that keeps values from the piped array that are also present in another array. +* +* Equality follows SameValueZero through Set membership, matching the main +* {@link intersection} implementation. The returned function is lazy-capable +* inside {@link pipe}. +* +* @template T - The type of elements in the arrays. +* @param secondArray - Values to intersect with the piped array. +* @returns A function that maps the piped array to its intersection. +* +* @example +* import { intersection, pipe } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3], intersection([2, 4])); +* // => [2] +*/ +function intersection(secondArray) { + const secondSet = new Set(secondArray); + function intersectionEager(array) { + return intersection$1(array, secondArray); + } + return combineEagerAndLazyFunctions(intersectionEager, createLazyFunction((value, _index, emit) => { + if (secondSet.has(value)) emit(value); + })); +} +//#endregion +export { intersection }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersectionBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersectionBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..3f632df68c67ba340e61d5bcee2d7989141ae442 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersectionBy.d.mts @@ -0,0 +1,22 @@ +//#region src/fp/array/intersectionBy.d.ts +/** + * Creates a function that keeps values whose mapped identity appears in another array. + * + * The mapper is applied to values from both arrays. The returned function is + * lazy-capable inside {@link pipe}. + * + * @template T - The type of elements in the piped array. + * @template U - The type of elements in the configured array. + * @param secondArray - Values to intersect with the piped array after mapping. + * @param mapper - Maps values from both arrays to comparison keys. + * @returns A function that maps the piped array to its mapped intersection. + * + * @example + * import { intersectionBy, pipe } from 'es-toolkit/fp'; + * + * pipe([{ id: 1 }, { id: 2 }], intersectionBy([2], value => typeof value === 'number' ? value : value.id)); + * // => [{ id: 2 }] + */ +declare function intersectionBy(secondArray: readonly U[], mapper: (value: T | U) => unknown): (array: readonly T[]) => T[]; +//#endregion +export { intersectionBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersectionBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersectionBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3f632df68c67ba340e61d5bcee2d7989141ae442 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersectionBy.d.ts @@ -0,0 +1,22 @@ +//#region src/fp/array/intersectionBy.d.ts +/** + * Creates a function that keeps values whose mapped identity appears in another array. + * + * The mapper is applied to values from both arrays. The returned function is + * lazy-capable inside {@link pipe}. + * + * @template T - The type of elements in the piped array. + * @template U - The type of elements in the configured array. + * @param secondArray - Values to intersect with the piped array after mapping. + * @param mapper - Maps values from both arrays to comparison keys. + * @returns A function that maps the piped array to its mapped intersection. + * + * @example + * import { intersectionBy, pipe } from 'es-toolkit/fp'; + * + * pipe([{ id: 1 }, { id: 2 }], intersectionBy([2], value => typeof value === 'number' ? value : value.id)); + * // => [{ id: 2 }] + */ +declare function intersectionBy(secondArray: readonly U[], mapper: (value: T | U) => unknown): (array: readonly T[]) => T[]; +//#endregion +export { intersectionBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersectionBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersectionBy.js new file mode 100644 index 0000000000000000000000000000000000000000..57336e5af696a427a0e6dad12c2c0658538224a8 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersectionBy.js @@ -0,0 +1,33 @@ +const require_intersectionBy = require("../../array/intersectionBy.js"); +const require_lazy = require("../_internal/lazy.js"); +//#region src/fp/array/intersectionBy.ts +/** +* Creates a function that keeps values whose mapped identity appears in another array. +* +* The mapper is applied to values from both arrays. The returned function is +* lazy-capable inside {@link pipe}. +* +* @template T - The type of elements in the piped array. +* @template U - The type of elements in the configured array. +* @param secondArray - Values to intersect with the piped array after mapping. +* @param mapper - Maps values from both arrays to comparison keys. +* @returns A function that maps the piped array to its mapped intersection. +* +* @example +* import { intersectionBy, pipe } from 'es-toolkit/fp'; +* +* pipe([{ id: 1 }, { id: 2 }], intersectionBy([2], value => typeof value === 'number' ? value : value.id)); +* // => [{ id: 2 }] +*/ +function intersectionBy(secondArray, mapper) { + const mappedSecondSet = new Set(secondArray.map((item) => mapper(item))); + function intersectionByEager(array) { + return require_intersectionBy.intersectionBy(array, secondArray, mapper); + } + const intersectionByLazy = require_lazy.createLazyFunction((value, _index, emit) => { + if (mappedSecondSet.has(mapper(value))) emit(value); + }); + return require_lazy.combineEagerAndLazyFunctions(intersectionByEager, intersectionByLazy); +} +//#endregion +exports.intersectionBy = intersectionBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersectionBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersectionBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e261b78e0c2263ed9363c474af2ff78b988d5600 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersectionBy.mjs @@ -0,0 +1,32 @@ +import { intersectionBy as intersectionBy$1 } from "../../array/intersectionBy.mjs"; +import { combineEagerAndLazyFunctions, createLazyFunction } from "../_internal/lazy.mjs"; +//#region src/fp/array/intersectionBy.ts +/** +* Creates a function that keeps values whose mapped identity appears in another array. +* +* The mapper is applied to values from both arrays. The returned function is +* lazy-capable inside {@link pipe}. +* +* @template T - The type of elements in the piped array. +* @template U - The type of elements in the configured array. +* @param secondArray - Values to intersect with the piped array after mapping. +* @param mapper - Maps values from both arrays to comparison keys. +* @returns A function that maps the piped array to its mapped intersection. +* +* @example +* import { intersectionBy, pipe } from 'es-toolkit/fp'; +* +* pipe([{ id: 1 }, { id: 2 }], intersectionBy([2], value => typeof value === 'number' ? value : value.id)); +* // => [{ id: 2 }] +*/ +function intersectionBy(secondArray, mapper) { + const mappedSecondSet = new Set(secondArray.map((item) => mapper(item))); + function intersectionByEager(array) { + return intersectionBy$1(array, secondArray, mapper); + } + return combineEagerAndLazyFunctions(intersectionByEager, createLazyFunction((value, _index, emit) => { + if (mappedSecondSet.has(mapper(value))) emit(value); + })); +} +//#endregion +export { intersectionBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersectionWith.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersectionWith.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..972dea1ccba5d9278ec331457cd2fb78cd5accc1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersectionWith.d.mts @@ -0,0 +1,22 @@ +//#region src/fp/array/intersectionWith.d.ts +/** + * Creates a function that keeps values equal to at least one configured value. + * + * Equality is decided by the provided comparator. The returned function is + * lazy-capable inside {@link pipe}. + * + * @template T - The type of elements in the piped array. + * @template U - The type of elements in the configured array. + * @param secondArray - Values to compare against the piped array. + * @param areItemsEqual - Returns true when a piped value equals a configured value. + * @returns A function that maps the piped array to its custom intersection. + * + * @example + * import { intersectionWith, pipe } from 'es-toolkit/fp'; + * + * pipe([{ id: 1 }, { id: 2 }], intersectionWith([2], (item, id) => item.id === id)); + * // => [{ id: 2 }] + */ +declare function intersectionWith(secondArray: readonly U[], areItemsEqual: (item: T, other: U) => boolean): (array: readonly T[]) => T[]; +//#endregion +export { intersectionWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersectionWith.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersectionWith.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..972dea1ccba5d9278ec331457cd2fb78cd5accc1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersectionWith.d.ts @@ -0,0 +1,22 @@ +//#region src/fp/array/intersectionWith.d.ts +/** + * Creates a function that keeps values equal to at least one configured value. + * + * Equality is decided by the provided comparator. The returned function is + * lazy-capable inside {@link pipe}. + * + * @template T - The type of elements in the piped array. + * @template U - The type of elements in the configured array. + * @param secondArray - Values to compare against the piped array. + * @param areItemsEqual - Returns true when a piped value equals a configured value. + * @returns A function that maps the piped array to its custom intersection. + * + * @example + * import { intersectionWith, pipe } from 'es-toolkit/fp'; + * + * pipe([{ id: 1 }, { id: 2 }], intersectionWith([2], (item, id) => item.id === id)); + * // => [{ id: 2 }] + */ +declare function intersectionWith(secondArray: readonly U[], areItemsEqual: (item: T, other: U) => boolean): (array: readonly T[]) => T[]; +//#endregion +export { intersectionWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersectionWith.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersectionWith.js new file mode 100644 index 0000000000000000000000000000000000000000..dc7fbe380c4bf37d714439bf923863355bac4871 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersectionWith.js @@ -0,0 +1,32 @@ +const require_intersectionWith = require("../../array/intersectionWith.js"); +const require_lazy = require("../_internal/lazy.js"); +//#region src/fp/array/intersectionWith.ts +/** +* Creates a function that keeps values equal to at least one configured value. +* +* Equality is decided by the provided comparator. The returned function is +* lazy-capable inside {@link pipe}. +* +* @template T - The type of elements in the piped array. +* @template U - The type of elements in the configured array. +* @param secondArray - Values to compare against the piped array. +* @param areItemsEqual - Returns true when a piped value equals a configured value. +* @returns A function that maps the piped array to its custom intersection. +* +* @example +* import { intersectionWith, pipe } from 'es-toolkit/fp'; +* +* pipe([{ id: 1 }, { id: 2 }], intersectionWith([2], (item, id) => item.id === id)); +* // => [{ id: 2 }] +*/ +function intersectionWith(secondArray, areItemsEqual) { + function intersectionWithEager(array) { + return require_intersectionWith.intersectionWith(array, secondArray, areItemsEqual); + } + const intersectionWithLazy = require_lazy.createLazyFunction((value, _index, emit) => { + if (secondArray.some((other) => areItemsEqual(value, other))) emit(value); + }); + return require_lazy.combineEagerAndLazyFunctions(intersectionWithEager, intersectionWithLazy); +} +//#endregion +exports.intersectionWith = intersectionWith; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersectionWith.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersectionWith.mjs new file mode 100644 index 0000000000000000000000000000000000000000..905794bf3d7b0c6470874585be8e74716f3a4ddd --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/intersectionWith.mjs @@ -0,0 +1,31 @@ +import { intersectionWith as intersectionWith$1 } from "../../array/intersectionWith.mjs"; +import { combineEagerAndLazyFunctions, createLazyFunction } from "../_internal/lazy.mjs"; +//#region src/fp/array/intersectionWith.ts +/** +* Creates a function that keeps values equal to at least one configured value. +* +* Equality is decided by the provided comparator. The returned function is +* lazy-capable inside {@link pipe}. +* +* @template T - The type of elements in the piped array. +* @template U - The type of elements in the configured array. +* @param secondArray - Values to compare against the piped array. +* @param areItemsEqual - Returns true when a piped value equals a configured value. +* @returns A function that maps the piped array to its custom intersection. +* +* @example +* import { intersectionWith, pipe } from 'es-toolkit/fp'; +* +* pipe([{ id: 1 }, { id: 2 }], intersectionWith([2], (item, id) => item.id === id)); +* // => [{ id: 2 }] +*/ +function intersectionWith(secondArray, areItemsEqual) { + function intersectionWithEager(array) { + return intersectionWith$1(array, secondArray, areItemsEqual); + } + return combineEagerAndLazyFunctions(intersectionWithEager, createLazyFunction((value, _index, emit) => { + if (secondArray.some((other) => areItemsEqual(value, other))) emit(value); + })); +} +//#endregion +export { intersectionWith }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/isSubset.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/isSubset.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..d3dd5290dd35902cec6b45c625fd7496dfc8dbaf --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/isSubset.d.mts @@ -0,0 +1,20 @@ +//#region src/fp/array/isSubset.d.ts +/** + * Creates a predicate that checks whether the piped array is a subset of superset. + * + * Every value in the piped array must be present in superset, using the main + * {@link isSubset} equality behavior. + * + * @template T - The type of elements in the arrays. + * @param superset - The array that may contain all values from the piped array. + * @returns A predicate for the piped array. + * + * @example + * import { isSubset, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2], isSubset([1, 2, 3])); + * // => true + */ +declare function isSubset(superset: readonly T[]): (array: readonly T[]) => boolean; +//#endregion +export { isSubset }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/isSubset.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/isSubset.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d3dd5290dd35902cec6b45c625fd7496dfc8dbaf --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/isSubset.d.ts @@ -0,0 +1,20 @@ +//#region src/fp/array/isSubset.d.ts +/** + * Creates a predicate that checks whether the piped array is a subset of superset. + * + * Every value in the piped array must be present in superset, using the main + * {@link isSubset} equality behavior. + * + * @template T - The type of elements in the arrays. + * @param superset - The array that may contain all values from the piped array. + * @returns A predicate for the piped array. + * + * @example + * import { isSubset, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2], isSubset([1, 2, 3])); + * // => true + */ +declare function isSubset(superset: readonly T[]): (array: readonly T[]) => boolean; +//#endregion +export { isSubset }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/isSubset.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/isSubset.js new file mode 100644 index 0000000000000000000000000000000000000000..d71f0bc5df3c9e4ed793adfdfa0d5941b3b60792 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/isSubset.js @@ -0,0 +1,25 @@ +const require_isSubset = require("../../array/isSubset.js"); +//#region src/fp/array/isSubset.ts +/** +* Creates a predicate that checks whether the piped array is a subset of superset. +* +* Every value in the piped array must be present in superset, using the main +* {@link isSubset} equality behavior. +* +* @template T - The type of elements in the arrays. +* @param superset - The array that may contain all values from the piped array. +* @returns A predicate for the piped array. +* +* @example +* import { isSubset, pipe } from 'es-toolkit/fp'; +* +* pipe([1, 2], isSubset([1, 2, 3])); +* // => true +*/ +function isSubset(superset) { + return function(array) { + return require_isSubset.isSubset(superset, array); + }; +} +//#endregion +exports.isSubset = isSubset; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/isSubset.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/isSubset.mjs new file mode 100644 index 0000000000000000000000000000000000000000..8e89edc6abe20ab5cdfc77ccfc1c818b7cd0833e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/isSubset.mjs @@ -0,0 +1,25 @@ +import { isSubset as isSubset$1 } from "../../array/isSubset.mjs"; +//#region src/fp/array/isSubset.ts +/** +* Creates a predicate that checks whether the piped array is a subset of superset. +* +* Every value in the piped array must be present in superset, using the main +* {@link isSubset} equality behavior. +* +* @template T - The type of elements in the arrays. +* @param superset - The array that may contain all values from the piped array. +* @returns A predicate for the piped array. +* +* @example +* import { isSubset, pipe } from 'es-toolkit/fp'; +* +* pipe([1, 2], isSubset([1, 2, 3])); +* // => true +*/ +function isSubset(superset) { + return function(array) { + return isSubset$1(superset, array); + }; +} +//#endregion +export { isSubset }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/isSubsetWith.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/isSubsetWith.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..8d9323b0b670419713e9a0192fd257b0843390a4 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/isSubsetWith.d.mts @@ -0,0 +1,21 @@ +//#region src/fp/array/isSubsetWith.d.ts +/** + * Creates a predicate that checks subset membership with a custom equality function. + * + * Every value in the piped array must match at least one value in superset according + * to areItemsEqual. + * + * @template T - The type of elements in the arrays. + * @param superset - The array that may contain all values from the piped array. + * @param areItemsEqual - Returns true when a piped value and a superset value are equal. + * @returns A predicate for the piped array. + * + * @example + * import { isSubsetWith, pipe } from 'es-toolkit/fp'; + * + * pipe([{ id: 1 }], isSubsetWith([{ id: 1 }, { id: 2 }], (a, b) => a.id === b.id)); + * // => true + */ +declare function isSubsetWith(superset: readonly T[], areItemsEqual: (item: T, other: T) => boolean): (array: readonly T[]) => boolean; +//#endregion +export { isSubsetWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/isSubsetWith.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/isSubsetWith.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8d9323b0b670419713e9a0192fd257b0843390a4 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/isSubsetWith.d.ts @@ -0,0 +1,21 @@ +//#region src/fp/array/isSubsetWith.d.ts +/** + * Creates a predicate that checks subset membership with a custom equality function. + * + * Every value in the piped array must match at least one value in superset according + * to areItemsEqual. + * + * @template T - The type of elements in the arrays. + * @param superset - The array that may contain all values from the piped array. + * @param areItemsEqual - Returns true when a piped value and a superset value are equal. + * @returns A predicate for the piped array. + * + * @example + * import { isSubsetWith, pipe } from 'es-toolkit/fp'; + * + * pipe([{ id: 1 }], isSubsetWith([{ id: 1 }, { id: 2 }], (a, b) => a.id === b.id)); + * // => true + */ +declare function isSubsetWith(superset: readonly T[], areItemsEqual: (item: T, other: T) => boolean): (array: readonly T[]) => boolean; +//#endregion +export { isSubsetWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/isSubsetWith.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/isSubsetWith.js new file mode 100644 index 0000000000000000000000000000000000000000..1a6d9ff6913002faf3edd4ebf3669a99d9f2e785 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/isSubsetWith.js @@ -0,0 +1,26 @@ +const require_isSubsetWith = require("../../array/isSubsetWith.js"); +//#region src/fp/array/isSubsetWith.ts +/** +* Creates a predicate that checks subset membership with a custom equality function. +* +* Every value in the piped array must match at least one value in superset according +* to areItemsEqual. +* +* @template T - The type of elements in the arrays. +* @param superset - The array that may contain all values from the piped array. +* @param areItemsEqual - Returns true when a piped value and a superset value are equal. +* @returns A predicate for the piped array. +* +* @example +* import { isSubsetWith, pipe } from 'es-toolkit/fp'; +* +* pipe([{ id: 1 }], isSubsetWith([{ id: 1 }, { id: 2 }], (a, b) => a.id === b.id)); +* // => true +*/ +function isSubsetWith(superset, areItemsEqual) { + return function(array) { + return require_isSubsetWith.isSubsetWith(superset, array, areItemsEqual); + }; +} +//#endregion +exports.isSubsetWith = isSubsetWith; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/isSubsetWith.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/isSubsetWith.mjs new file mode 100644 index 0000000000000000000000000000000000000000..53b5c4a6fd0c6ba3a4551c8583d3695c0ae2ba00 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/isSubsetWith.mjs @@ -0,0 +1,26 @@ +import { isSubsetWith as isSubsetWith$1 } from "../../array/isSubsetWith.mjs"; +//#region src/fp/array/isSubsetWith.ts +/** +* Creates a predicate that checks subset membership with a custom equality function. +* +* Every value in the piped array must match at least one value in superset according +* to areItemsEqual. +* +* @template T - The type of elements in the arrays. +* @param superset - The array that may contain all values from the piped array. +* @param areItemsEqual - Returns true when a piped value and a superset value are equal. +* @returns A predicate for the piped array. +* +* @example +* import { isSubsetWith, pipe } from 'es-toolkit/fp'; +* +* pipe([{ id: 1 }], isSubsetWith([{ id: 1 }, { id: 2 }], (a, b) => a.id === b.id)); +* // => true +*/ +function isSubsetWith(superset, areItemsEqual) { + return function(array) { + return isSubsetWith$1(superset, array, areItemsEqual); + }; +} +//#endregion +export { isSubsetWith }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/join.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/join.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..311ea4f92f866ac24dc3665381ab8665e844fdcd --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/join.d.mts @@ -0,0 +1,20 @@ +//#region src/fp/array/join.d.ts +/** + * Creates a function that joins array values into a string. + * + * The separator is passed to Array.prototype.join, so undefined uses a comma. + * Use the returned function with {@link pipe}. + * + * @template T - The type of elements in the array. + * @param separator - The separator placed between values. + * @returns A function that maps a readonly array to a joined string. + * + * @example + * import { join, pipe } from 'es-toolkit/fp'; + * + * pipe(['a', 'b', 'c'], join('-')); + * // => 'a-b-c' + */ +declare function join(separator?: string): (array: readonly T[]) => string; +//#endregion +export { join }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/join.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/join.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..311ea4f92f866ac24dc3665381ab8665e844fdcd --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/join.d.ts @@ -0,0 +1,20 @@ +//#region src/fp/array/join.d.ts +/** + * Creates a function that joins array values into a string. + * + * The separator is passed to Array.prototype.join, so undefined uses a comma. + * Use the returned function with {@link pipe}. + * + * @template T - The type of elements in the array. + * @param separator - The separator placed between values. + * @returns A function that maps a readonly array to a joined string. + * + * @example + * import { join, pipe } from 'es-toolkit/fp'; + * + * pipe(['a', 'b', 'c'], join('-')); + * // => 'a-b-c' + */ +declare function join(separator?: string): (array: readonly T[]) => string; +//#endregion +export { join }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/join.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/join.js new file mode 100644 index 0000000000000000000000000000000000000000..438c76407deb8b83af59d88264c356a6c1e260aa --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/join.js @@ -0,0 +1,24 @@ +//#region src/fp/array/join.ts +/** +* Creates a function that joins array values into a string. +* +* The separator is passed to Array.prototype.join, so undefined uses a comma. +* Use the returned function with {@link pipe}. +* +* @template T - The type of elements in the array. +* @param separator - The separator placed between values. +* @returns A function that maps a readonly array to a joined string. +* +* @example +* import { join, pipe } from 'es-toolkit/fp'; +* +* pipe(['a', 'b', 'c'], join('-')); +* // => 'a-b-c' +*/ +function join(separator) { + return function(array) { + return array.join(separator); + }; +} +//#endregion +exports.join = join; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/join.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/join.mjs new file mode 100644 index 0000000000000000000000000000000000000000..db09116ea5f292c39c21a684a49d09ec977ad6ca --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/join.mjs @@ -0,0 +1,24 @@ +//#region src/fp/array/join.ts +/** +* Creates a function that joins array values into a string. +* +* The separator is passed to Array.prototype.join, so undefined uses a comma. +* Use the returned function with {@link pipe}. +* +* @template T - The type of elements in the array. +* @param separator - The separator placed between values. +* @returns A function that maps a readonly array to a joined string. +* +* @example +* import { join, pipe } from 'es-toolkit/fp'; +* +* pipe(['a', 'b', 'c'], join('-')); +* // => 'a-b-c' +*/ +function join(separator) { + return function(array) { + return array.join(separator); + }; +} +//#endregion +export { join }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/keyBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/keyBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..919d189d6c946015fbdf338b879342fe18f60d9d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/keyBy.d.mts @@ -0,0 +1,21 @@ +//#region src/fp/array/keyBy.d.ts +/** + * Creates a function that indexes values by a derived key. + * + * The key selector receives each value, index, and full input array. When multiple values + * produce the same key, the last value wins, matching the main {@link keyBy} behavior. + * + * @template T - The type of elements in the array. + * @template K - The property-key type produced by the selector. + * @param getKey - Called with each value, index, and array to produce an object key. + * @returns A function that maps a readonly array to an object keyed by the derived keys. + * + * @example + * import { keyBy, pipe } from 'es-toolkit/fp'; + * + * pipe([{ id: 'a', value: 1 }, { id: 'b', value: 2 }], keyBy(item => item.id)); + * // => { a: { id: 'a', value: 1 }, b: { id: 'b', value: 2 } } + */ +declare function keyBy(getKey: (item: T, index: number, array: readonly T[]) => K): (array: readonly T[]) => Record; +//#endregion +export { keyBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/keyBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/keyBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..919d189d6c946015fbdf338b879342fe18f60d9d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/keyBy.d.ts @@ -0,0 +1,21 @@ +//#region src/fp/array/keyBy.d.ts +/** + * Creates a function that indexes values by a derived key. + * + * The key selector receives each value, index, and full input array. When multiple values + * produce the same key, the last value wins, matching the main {@link keyBy} behavior. + * + * @template T - The type of elements in the array. + * @template K - The property-key type produced by the selector. + * @param getKey - Called with each value, index, and array to produce an object key. + * @returns A function that maps a readonly array to an object keyed by the derived keys. + * + * @example + * import { keyBy, pipe } from 'es-toolkit/fp'; + * + * pipe([{ id: 'a', value: 1 }, { id: 'b', value: 2 }], keyBy(item => item.id)); + * // => { a: { id: 'a', value: 1 }, b: { id: 'b', value: 2 } } + */ +declare function keyBy(getKey: (item: T, index: number, array: readonly T[]) => K): (array: readonly T[]) => Record; +//#endregion +export { keyBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/keyBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/keyBy.js new file mode 100644 index 0000000000000000000000000000000000000000..039b52b941e336686471a52c2b4e74812e0671c4 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/keyBy.js @@ -0,0 +1,26 @@ +const require_keyBy = require("../../array/keyBy.js"); +//#region src/fp/array/keyBy.ts +/** +* Creates a function that indexes values by a derived key. +* +* The key selector receives each value, index, and full input array. When multiple values +* produce the same key, the last value wins, matching the main {@link keyBy} behavior. +* +* @template T - The type of elements in the array. +* @template K - The property-key type produced by the selector. +* @param getKey - Called with each value, index, and array to produce an object key. +* @returns A function that maps a readonly array to an object keyed by the derived keys. +* +* @example +* import { keyBy, pipe } from 'es-toolkit/fp'; +* +* pipe([{ id: 'a', value: 1 }, { id: 'b', value: 2 }], keyBy(item => item.id)); +* // => { a: { id: 'a', value: 1 }, b: { id: 'b', value: 2 } } +*/ +function keyBy(getKey) { + return function(array) { + return require_keyBy.keyBy(array, getKey); + }; +} +//#endregion +exports.keyBy = keyBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/keyBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/keyBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f1d262a5f293b2242846d3e7c3d5707bbe642d65 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/keyBy.mjs @@ -0,0 +1,26 @@ +import { keyBy as keyBy$1 } from "../../array/keyBy.mjs"; +//#region src/fp/array/keyBy.ts +/** +* Creates a function that indexes values by a derived key. +* +* The key selector receives each value, index, and full input array. When multiple values +* produce the same key, the last value wins, matching the main {@link keyBy} behavior. +* +* @template T - The type of elements in the array. +* @template K - The property-key type produced by the selector. +* @param getKey - Called with each value, index, and array to produce an object key. +* @returns A function that maps a readonly array to an object keyed by the derived keys. +* +* @example +* import { keyBy, pipe } from 'es-toolkit/fp'; +* +* pipe([{ id: 'a', value: 1 }, { id: 'b', value: 2 }], keyBy(item => item.id)); +* // => { a: { id: 'a', value: 1 }, b: { id: 'b', value: 2 } } +*/ +function keyBy(getKey) { + return function(array) { + return keyBy$1(array, getKey); + }; +} +//#endregion +export { keyBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/last.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/last.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..a92831ce2476f32cfb8ce69de79773609f5ce9b9 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/last.d.mts @@ -0,0 +1,35 @@ +//#region src/fp/array/last.d.ts +/** + * Creates a function that returns the last element of a non-empty array. + * + * This overload preserves the non-empty tuple guarantee: the returned function + * always returns T when the piped array has at least one element. + * + * @template T - The type of elements in the array. + * @returns A function that maps a non-empty readonly array to its last element. + * + * @example + * import { last, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3] as const, last()); + * // => 3 + */ +declare function last(): (array: readonly [...T[], T]) => T; +/** + * Creates a function that returns the last element of an array, or undefined. + * + * Empty arrays return undefined, matching the main {@link last} behavior. Use + * the returned function with {@link pipe}. + * + * @template T - The type of elements in the array. + * @returns A function that maps a readonly array to its last element, or undefined. + * + * @example + * import { last, pipe } from 'es-toolkit/fp'; + * + * pipe([] as number[], last()); + * // => undefined + */ +declare function last(): (array: readonly T[]) => T | undefined; +//#endregion +export { last }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/last.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/last.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a92831ce2476f32cfb8ce69de79773609f5ce9b9 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/last.d.ts @@ -0,0 +1,35 @@ +//#region src/fp/array/last.d.ts +/** + * Creates a function that returns the last element of a non-empty array. + * + * This overload preserves the non-empty tuple guarantee: the returned function + * always returns T when the piped array has at least one element. + * + * @template T - The type of elements in the array. + * @returns A function that maps a non-empty readonly array to its last element. + * + * @example + * import { last, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3] as const, last()); + * // => 3 + */ +declare function last(): (array: readonly [...T[], T]) => T; +/** + * Creates a function that returns the last element of an array, or undefined. + * + * Empty arrays return undefined, matching the main {@link last} behavior. Use + * the returned function with {@link pipe}. + * + * @template T - The type of elements in the array. + * @returns A function that maps a readonly array to its last element, or undefined. + * + * @example + * import { last, pipe } from 'es-toolkit/fp'; + * + * pipe([] as number[], last()); + * // => undefined + */ +declare function last(): (array: readonly T[]) => T | undefined; +//#endregion +export { last }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/last.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/last.js new file mode 100644 index 0000000000000000000000000000000000000000..e4832660500ab28fae2aa578c09917b45a1b888d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/last.js @@ -0,0 +1,9 @@ +const require_last = require("../../array/last.js"); +//#region src/fp/array/last.ts +function last() { + return function(array) { + return require_last.last(array); + }; +} +//#endregion +exports.last = last; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/last.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/last.mjs new file mode 100644 index 0000000000000000000000000000000000000000..89ce84f735fbe0437dfa10ced1cf5a674db9f9b0 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/last.mjs @@ -0,0 +1,9 @@ +import { last as last$1 } from "../../array/last.mjs"; +//#region src/fp/array/last.ts +function last() { + return function(array) { + return last$1(array); + }; +} +//#endregion +export { last }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/length.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/length.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..8445a59d5924cd5a306f730f0259f2303dd02058 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/length.d.mts @@ -0,0 +1,18 @@ +//#region src/fp/array/length.d.ts +/** + * Creates a function that returns the length of an array. + * + * Use it with {@link pipe} when a pipeline should end with the number of input values. + * + * @template T - The type of elements in the array. + * @returns A function that maps a readonly array to its length. + * + * @example + * import { length, pipe } from 'es-toolkit/fp'; + * + * pipe(['a', 'b', 'c'], length()); + * // => 3 + */ +declare function length(): (array: readonly T[]) => number; +//#endregion +export { length }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/length.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/length.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8445a59d5924cd5a306f730f0259f2303dd02058 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/length.d.ts @@ -0,0 +1,18 @@ +//#region src/fp/array/length.d.ts +/** + * Creates a function that returns the length of an array. + * + * Use it with {@link pipe} when a pipeline should end with the number of input values. + * + * @template T - The type of elements in the array. + * @returns A function that maps a readonly array to its length. + * + * @example + * import { length, pipe } from 'es-toolkit/fp'; + * + * pipe(['a', 'b', 'c'], length()); + * // => 3 + */ +declare function length(): (array: readonly T[]) => number; +//#endregion +export { length }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/length.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/length.js new file mode 100644 index 0000000000000000000000000000000000000000..e7aa37b3dd1809a7e30e14d90186d2dfb1cffe57 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/length.js @@ -0,0 +1,22 @@ +//#region src/fp/array/length.ts +/** +* Creates a function that returns the length of an array. +* +* Use it with {@link pipe} when a pipeline should end with the number of input values. +* +* @template T - The type of elements in the array. +* @returns A function that maps a readonly array to its length. +* +* @example +* import { length, pipe } from 'es-toolkit/fp'; +* +* pipe(['a', 'b', 'c'], length()); +* // => 3 +*/ +function length() { + return function(array) { + return array.length; + }; +} +//#endregion +exports.length = length; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/length.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/length.mjs new file mode 100644 index 0000000000000000000000000000000000000000..ec74a0626805e29a5be1e15033986abd38169cd6 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/length.mjs @@ -0,0 +1,22 @@ +//#region src/fp/array/length.ts +/** +* Creates a function that returns the length of an array. +* +* Use it with {@link pipe} when a pipeline should end with the number of input values. +* +* @template T - The type of elements in the array. +* @returns A function that maps a readonly array to its length. +* +* @example +* import { length, pipe } from 'es-toolkit/fp'; +* +* pipe(['a', 'b', 'c'], length()); +* // => 3 +*/ +function length() { + return function(array) { + return array.length; + }; +} +//#endregion +export { length }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/map.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/map.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..d62acaecc53e2d00544b8a2dfb37197103f0142b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/map.d.mts @@ -0,0 +1,27 @@ +//#region src/fp/array/map.d.ts +/** + * Creates a function that builds a new array by calling `callback` on every + * element, equivalent to `Array.prototype.map`. Use it with {@link pipe}. + * + * The returned function is **lazy-capable**: inside a {@link pipe} it is fused + * with adjacent lazy functions and runs element-by-element, so a trailing + * `take` can terminate the walk early without mapping the rest of the input. + * + * @template T - The type of elements in the input array. + * @template U - The type of elements in the output array. + * @param callback - Called with `(value, index)` for each element; its return + * value becomes the corresponding element of the output array. + * @returns A function that maps a `readonly T[]` to a new `U[]`. + * + * @example + * import { pipe, map } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3], map(x => x * 2)); // => [2, 4, 6] + * + * @example + * // The index is available as the second argument. + * pipe([10, 20, 30], map((value, index) => value + index)); // => [10, 21, 32] + */ +declare function map(callback: (value: T, index: number) => U): (array: readonly T[]) => U[]; +//#endregion +export { map }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/map.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/map.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d62acaecc53e2d00544b8a2dfb37197103f0142b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/map.d.ts @@ -0,0 +1,27 @@ +//#region src/fp/array/map.d.ts +/** + * Creates a function that builds a new array by calling `callback` on every + * element, equivalent to `Array.prototype.map`. Use it with {@link pipe}. + * + * The returned function is **lazy-capable**: inside a {@link pipe} it is fused + * with adjacent lazy functions and runs element-by-element, so a trailing + * `take` can terminate the walk early without mapping the rest of the input. + * + * @template T - The type of elements in the input array. + * @template U - The type of elements in the output array. + * @param callback - Called with `(value, index)` for each element; its return + * value becomes the corresponding element of the output array. + * @returns A function that maps a `readonly T[]` to a new `U[]`. + * + * @example + * import { pipe, map } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3], map(x => x * 2)); // => [2, 4, 6] + * + * @example + * // The index is available as the second argument. + * pipe([10, 20, 30], map((value, index) => value + index)); // => [10, 21, 32] + */ +declare function map(callback: (value: T, index: number) => U): (array: readonly T[]) => U[]; +//#endregion +export { map }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/map.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/map.js new file mode 100644 index 0000000000000000000000000000000000000000..28c0fa759372fbac1c6145264c443abd84e32619 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/map.js @@ -0,0 +1,36 @@ +const require_lazy = require("../_internal/lazy.js"); +//#region src/fp/array/map.ts +/** +* Creates a function that builds a new array by calling `callback` on every +* element, equivalent to `Array.prototype.map`. Use it with {@link pipe}. +* +* The returned function is **lazy-capable**: inside a {@link pipe} it is fused +* with adjacent lazy functions and runs element-by-element, so a trailing +* `take` can terminate the walk early without mapping the rest of the input. +* +* @template T - The type of elements in the input array. +* @template U - The type of elements in the output array. +* @param callback - Called with `(value, index)` for each element; its return +* value becomes the corresponding element of the output array. +* @returns A function that maps a `readonly T[]` to a new `U[]`. +* +* @example +* import { pipe, map } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3], map(x => x * 2)); // => [2, 4, 6] +* +* @example +* // The index is available as the second argument. +* pipe([10, 20, 30], map((value, index) => value + index)); // => [10, 21, 32] +*/ +function map(callback) { + function mapEager(array) { + return array.map(callback); + } + const mapLazy = require_lazy.createLazyFunction((value, index, emit) => { + emit(callback(value, index)); + }); + return require_lazy.combineEagerAndLazyFunctions(mapEager, mapLazy); +} +//#endregion +exports.map = map; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/map.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/map.mjs new file mode 100644 index 0000000000000000000000000000000000000000..50cc7ab11c4f7cb1a6dfe457f852c0d4375c10fd --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/map.mjs @@ -0,0 +1,35 @@ +import { combineEagerAndLazyFunctions, createLazyFunction } from "../_internal/lazy.mjs"; +//#region src/fp/array/map.ts +/** +* Creates a function that builds a new array by calling `callback` on every +* element, equivalent to `Array.prototype.map`. Use it with {@link pipe}. +* +* The returned function is **lazy-capable**: inside a {@link pipe} it is fused +* with adjacent lazy functions and runs element-by-element, so a trailing +* `take` can terminate the walk early without mapping the rest of the input. +* +* @template T - The type of elements in the input array. +* @template U - The type of elements in the output array. +* @param callback - Called with `(value, index)` for each element; its return +* value becomes the corresponding element of the output array. +* @returns A function that maps a `readonly T[]` to a new `U[]`. +* +* @example +* import { pipe, map } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3], map(x => x * 2)); // => [2, 4, 6] +* +* @example +* // The index is available as the second argument. +* pipe([10, 20, 30], map((value, index) => value + index)); // => [10, 21, 32] +*/ +function map(callback) { + function mapEager(array) { + return array.map(callback); + } + return combineEagerAndLazyFunctions(mapEager, createLazyFunction((value, index, emit) => { + emit(callback(value, index)); + })); +} +//#endregion +export { map }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/maxBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/maxBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..b5be6aac08d644c82d5969eff19e075159d32804 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/maxBy.d.mts @@ -0,0 +1,37 @@ +//#region src/fp/array/maxBy.d.ts +/** + * Creates a function that returns the element with the maximum selected number from a non-empty array. + * + * If the selector returns NaN, the element that produced NaN is returned, matching + * the main {@link maxBy} behavior. + * + * @template T - The type of elements in the array. + * @param getValue - Selects a numeric value from each element, index, and array. + * @returns A function that maps a non-empty readonly array to the maximum element. + * + * @example + * import { maxBy, pipe } from 'es-toolkit/fp'; + * + * pipe([{ score: 10 }, { score: 20 }] as const, maxBy(item => item.score)); + * // => { score: 20 } + */ +declare function maxBy(getValue: (element: T, index: number, array: readonly T[]) => number): (array: readonly [T, ...T[]]) => T; +/** + * Creates a function that returns the element with the maximum selected number. + * + * Empty arrays return undefined. If the selector returns NaN, the element that + * produced NaN is returned, matching the main {@link maxBy} behavior. + * + * @template T - The type of elements in the array. + * @param getValue - Selects a numeric value from each element, index, and array. + * @returns A function that maps a readonly array to the maximum element, or undefined. + * + * @example + * import { maxBy, pipe } from 'es-toolkit/fp'; + * + * pipe([] as Array<{ score: number }>, maxBy(item => item.score)); + * // => undefined + */ +declare function maxBy(getValue: (element: T, index: number, array: readonly T[]) => number): (array: readonly T[]) => T | undefined; +//#endregion +export { maxBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/maxBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/maxBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b5be6aac08d644c82d5969eff19e075159d32804 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/maxBy.d.ts @@ -0,0 +1,37 @@ +//#region src/fp/array/maxBy.d.ts +/** + * Creates a function that returns the element with the maximum selected number from a non-empty array. + * + * If the selector returns NaN, the element that produced NaN is returned, matching + * the main {@link maxBy} behavior. + * + * @template T - The type of elements in the array. + * @param getValue - Selects a numeric value from each element, index, and array. + * @returns A function that maps a non-empty readonly array to the maximum element. + * + * @example + * import { maxBy, pipe } from 'es-toolkit/fp'; + * + * pipe([{ score: 10 }, { score: 20 }] as const, maxBy(item => item.score)); + * // => { score: 20 } + */ +declare function maxBy(getValue: (element: T, index: number, array: readonly T[]) => number): (array: readonly [T, ...T[]]) => T; +/** + * Creates a function that returns the element with the maximum selected number. + * + * Empty arrays return undefined. If the selector returns NaN, the element that + * produced NaN is returned, matching the main {@link maxBy} behavior. + * + * @template T - The type of elements in the array. + * @param getValue - Selects a numeric value from each element, index, and array. + * @returns A function that maps a readonly array to the maximum element, or undefined. + * + * @example + * import { maxBy, pipe } from 'es-toolkit/fp'; + * + * pipe([] as Array<{ score: number }>, maxBy(item => item.score)); + * // => undefined + */ +declare function maxBy(getValue: (element: T, index: number, array: readonly T[]) => number): (array: readonly T[]) => T | undefined; +//#endregion +export { maxBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/maxBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/maxBy.js new file mode 100644 index 0000000000000000000000000000000000000000..81a34a0754ab489ea8f7e5978ca44307ad4bd596 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/maxBy.js @@ -0,0 +1,9 @@ +const require_maxBy = require("../../array/maxBy.js"); +//#region src/fp/array/maxBy.ts +function maxBy(getValue) { + return function(array) { + return require_maxBy.maxBy(array, getValue); + }; +} +//#endregion +exports.maxBy = maxBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/maxBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/maxBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..1d94e0fd8d19f5f599adc8e663f6a509da48772e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/maxBy.mjs @@ -0,0 +1,9 @@ +import { maxBy as maxBy$1 } from "../../array/maxBy.mjs"; +//#region src/fp/array/maxBy.ts +function maxBy(getValue) { + return function(array) { + return maxBy$1(array, getValue); + }; +} +//#endregion +export { maxBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/minBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/minBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..b4c242c5956a57f353888666df2a1671d8ace3e8 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/minBy.d.mts @@ -0,0 +1,37 @@ +//#region src/fp/array/minBy.d.ts +/** + * Creates a function that returns the element with the minimum selected number from a non-empty array. + * + * If the selector returns NaN, the element that produced NaN is returned, matching + * the main {@link minBy} behavior. + * + * @template T - The type of elements in the array. + * @param getValue - Selects a numeric value from each element, index, and array. + * @returns A function that maps a non-empty readonly array to the minimum element. + * + * @example + * import { minBy, pipe } from 'es-toolkit/fp'; + * + * pipe([{ score: 10 }, { score: 20 }] as const, minBy(item => item.score)); + * // => { score: 10 } + */ +declare function minBy(getValue: (element: T, index: number, array: readonly T[]) => number): (array: readonly [T, ...T[]]) => T; +/** + * Creates a function that returns the element with the minimum selected number. + * + * Empty arrays return undefined. If the selector returns NaN, the element that + * produced NaN is returned, matching the main {@link minBy} behavior. + * + * @template T - The type of elements in the array. + * @param getValue - Selects a numeric value from each element, index, and array. + * @returns A function that maps a readonly array to the minimum element, or undefined. + * + * @example + * import { minBy, pipe } from 'es-toolkit/fp'; + * + * pipe([] as Array<{ score: number }>, minBy(item => item.score)); + * // => undefined + */ +declare function minBy(getValue: (element: T, index: number, array: readonly T[]) => number): (array: readonly T[]) => T | undefined; +//#endregion +export { minBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/minBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/minBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b4c242c5956a57f353888666df2a1671d8ace3e8 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/minBy.d.ts @@ -0,0 +1,37 @@ +//#region src/fp/array/minBy.d.ts +/** + * Creates a function that returns the element with the minimum selected number from a non-empty array. + * + * If the selector returns NaN, the element that produced NaN is returned, matching + * the main {@link minBy} behavior. + * + * @template T - The type of elements in the array. + * @param getValue - Selects a numeric value from each element, index, and array. + * @returns A function that maps a non-empty readonly array to the minimum element. + * + * @example + * import { minBy, pipe } from 'es-toolkit/fp'; + * + * pipe([{ score: 10 }, { score: 20 }] as const, minBy(item => item.score)); + * // => { score: 10 } + */ +declare function minBy(getValue: (element: T, index: number, array: readonly T[]) => number): (array: readonly [T, ...T[]]) => T; +/** + * Creates a function that returns the element with the minimum selected number. + * + * Empty arrays return undefined. If the selector returns NaN, the element that + * produced NaN is returned, matching the main {@link minBy} behavior. + * + * @template T - The type of elements in the array. + * @param getValue - Selects a numeric value from each element, index, and array. + * @returns A function that maps a readonly array to the minimum element, or undefined. + * + * @example + * import { minBy, pipe } from 'es-toolkit/fp'; + * + * pipe([] as Array<{ score: number }>, minBy(item => item.score)); + * // => undefined + */ +declare function minBy(getValue: (element: T, index: number, array: readonly T[]) => number): (array: readonly T[]) => T | undefined; +//#endregion +export { minBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/minBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/minBy.js new file mode 100644 index 0000000000000000000000000000000000000000..bbcdf9488729fe113c8447619f22dc79bcee3420 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/minBy.js @@ -0,0 +1,9 @@ +const require_minBy = require("../../array/minBy.js"); +//#region src/fp/array/minBy.ts +function minBy(getValue) { + return function(array) { + return require_minBy.minBy(array, getValue); + }; +} +//#endregion +exports.minBy = minBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/minBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/minBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..78ae26faf2660a47746a558e766dfba5e616b9c0 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/minBy.mjs @@ -0,0 +1,9 @@ +import { minBy as minBy$1 } from "../../array/minBy.mjs"; +//#region src/fp/array/minBy.ts +function minBy(getValue) { + return function(array) { + return minBy$1(array, getValue); + }; +} +//#endregion +export { minBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/orderBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/orderBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..ed31eaef76bc82a164f56922dad8b3ce079e6bc2 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/orderBy.d.mts @@ -0,0 +1,21 @@ +//#region src/fp/array/orderBy.d.ts +/** + * Creates a function that sorts objects by criteria and order directions. + * + * Criteria can be object keys or selector functions. The returned function does not mutate + * the input array; it returns a sorted copy following the main {@link orderBy} behavior. + * + * @template T - The object type in the array. + * @param criteria - Keys or selector functions used for comparison. + * @param orders - Sort directions corresponding to the criteria. + * @returns A function that maps a readonly array to a sorted copy. + * + * @example + * import { orderBy, pipe } from 'es-toolkit/fp'; + * + * pipe([{ name: 'a', age: 2 }, { name: 'b', age: 1 }], orderBy(['age'], ['asc'])); + * // => [{ name: 'b', age: 1 }, { name: 'a', age: 2 }] + */ +declare function orderBy(criteria: ReadonlyArray<((item: T) => unknown) | keyof T>, orders: ReadonlyArray<'asc' | 'desc'>): (array: readonly T[]) => T[]; +//#endregion +export { orderBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/orderBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/orderBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ed31eaef76bc82a164f56922dad8b3ce079e6bc2 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/orderBy.d.ts @@ -0,0 +1,21 @@ +//#region src/fp/array/orderBy.d.ts +/** + * Creates a function that sorts objects by criteria and order directions. + * + * Criteria can be object keys or selector functions. The returned function does not mutate + * the input array; it returns a sorted copy following the main {@link orderBy} behavior. + * + * @template T - The object type in the array. + * @param criteria - Keys or selector functions used for comparison. + * @param orders - Sort directions corresponding to the criteria. + * @returns A function that maps a readonly array to a sorted copy. + * + * @example + * import { orderBy, pipe } from 'es-toolkit/fp'; + * + * pipe([{ name: 'a', age: 2 }, { name: 'b', age: 1 }], orderBy(['age'], ['asc'])); + * // => [{ name: 'b', age: 1 }, { name: 'a', age: 2 }] + */ +declare function orderBy(criteria: ReadonlyArray<((item: T) => unknown) | keyof T>, orders: ReadonlyArray<'asc' | 'desc'>): (array: readonly T[]) => T[]; +//#endregion +export { orderBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/orderBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/orderBy.js new file mode 100644 index 0000000000000000000000000000000000000000..09942747577ef291ca6e954ca6b234b368a7f5af --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/orderBy.js @@ -0,0 +1,26 @@ +const require_orderBy = require("../../array/orderBy.js"); +//#region src/fp/array/orderBy.ts +/** +* Creates a function that sorts objects by criteria and order directions. +* +* Criteria can be object keys or selector functions. The returned function does not mutate +* the input array; it returns a sorted copy following the main {@link orderBy} behavior. +* +* @template T - The object type in the array. +* @param criteria - Keys or selector functions used for comparison. +* @param orders - Sort directions corresponding to the criteria. +* @returns A function that maps a readonly array to a sorted copy. +* +* @example +* import { orderBy, pipe } from 'es-toolkit/fp'; +* +* pipe([{ name: 'a', age: 2 }, { name: 'b', age: 1 }], orderBy(['age'], ['asc'])); +* // => [{ name: 'b', age: 1 }, { name: 'a', age: 2 }] +*/ +function orderBy(criteria, orders) { + return function(array) { + return require_orderBy.orderBy(array, criteria, orders); + }; +} +//#endregion +exports.orderBy = orderBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/orderBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/orderBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..372b20d7799f671d9268f9eebd98ef0e1d2c5ffe --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/orderBy.mjs @@ -0,0 +1,26 @@ +import { orderBy as orderBy$1 } from "../../array/orderBy.mjs"; +//#region src/fp/array/orderBy.ts +/** +* Creates a function that sorts objects by criteria and order directions. +* +* Criteria can be object keys or selector functions. The returned function does not mutate +* the input array; it returns a sorted copy following the main {@link orderBy} behavior. +* +* @template T - The object type in the array. +* @param criteria - Keys or selector functions used for comparison. +* @param orders - Sort directions corresponding to the criteria. +* @returns A function that maps a readonly array to a sorted copy. +* +* @example +* import { orderBy, pipe } from 'es-toolkit/fp'; +* +* pipe([{ name: 'a', age: 2 }, { name: 'b', age: 1 }], orderBy(['age'], ['asc'])); +* // => [{ name: 'b', age: 1 }, { name: 'a', age: 2 }] +*/ +function orderBy(criteria, orders) { + return function(array) { + return orderBy$1(array, criteria, orders); + }; +} +//#endregion +export { orderBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/partition.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/partition.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..fc56b56712b79350a9bd3e473a8e744073fc7f6b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/partition.d.mts @@ -0,0 +1,39 @@ +//#region src/fp/array/partition.d.ts +/** + * Creates a function that splits an array with a type-guard predicate. + * + * Values for which the predicate returns true are placed in the first array and + * narrowed to U. The remaining values are placed in the second array as Exclude. + * + * @template T - The type of elements in the array. + * @template U - The narrowed element type accepted by the type guard. + * @param predicate - Type guard called with each value, index, and array. + * @returns A function that maps a readonly array to truthy and falsy partitions. + * + * @example + * import { partition, pipe } from 'es-toolkit/fp'; + * + * const isString = (value: string | number): value is string => typeof value === 'string'; + * pipe([1, 'a', 2, 'b'], partition(isString)); + * // => [['a', 'b'], [1, 2]] + */ +declare function partition(predicate: (value: T, index: number, array: readonly T[]) => value is U): (array: readonly T[]) => [truthy: U[], falsy: Array>]; +/** + * Creates a function that splits an array by a predicate. + * + * Values for which the predicate returns true are placed in the first array; all + * other values are placed in the second array. + * + * @template T - The type of elements in the array. + * @param predicate - Predicate called with each value, index, and array. + * @returns A function that maps a readonly array to truthy and falsy partitions. + * + * @example + * import { partition, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 4], partition(value => value % 2 === 0)); + * // => [[2, 4], [1, 3]] + */ +declare function partition(predicate: (value: T, index: number, array: readonly T[]) => boolean): (array: readonly T[]) => [truthy: T[], falsy: T[]]; +//#endregion +export { partition }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/partition.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/partition.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..fc56b56712b79350a9bd3e473a8e744073fc7f6b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/partition.d.ts @@ -0,0 +1,39 @@ +//#region src/fp/array/partition.d.ts +/** + * Creates a function that splits an array with a type-guard predicate. + * + * Values for which the predicate returns true are placed in the first array and + * narrowed to U. The remaining values are placed in the second array as Exclude. + * + * @template T - The type of elements in the array. + * @template U - The narrowed element type accepted by the type guard. + * @param predicate - Type guard called with each value, index, and array. + * @returns A function that maps a readonly array to truthy and falsy partitions. + * + * @example + * import { partition, pipe } from 'es-toolkit/fp'; + * + * const isString = (value: string | number): value is string => typeof value === 'string'; + * pipe([1, 'a', 2, 'b'], partition(isString)); + * // => [['a', 'b'], [1, 2]] + */ +declare function partition(predicate: (value: T, index: number, array: readonly T[]) => value is U): (array: readonly T[]) => [truthy: U[], falsy: Array>]; +/** + * Creates a function that splits an array by a predicate. + * + * Values for which the predicate returns true are placed in the first array; all + * other values are placed in the second array. + * + * @template T - The type of elements in the array. + * @param predicate - Predicate called with each value, index, and array. + * @returns A function that maps a readonly array to truthy and falsy partitions. + * + * @example + * import { partition, pipe } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 4], partition(value => value % 2 === 0)); + * // => [[2, 4], [1, 3]] + */ +declare function partition(predicate: (value: T, index: number, array: readonly T[]) => boolean): (array: readonly T[]) => [truthy: T[], falsy: T[]]; +//#endregion +export { partition }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/partition.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/partition.js new file mode 100644 index 0000000000000000000000000000000000000000..8f6b7f87782af9a9286b79f038131f8443b761ce --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/partition.js @@ -0,0 +1,9 @@ +const require_partition = require("../../array/partition.js"); +//#region src/fp/array/partition.ts +function partition(predicate) { + return function(array) { + return require_partition.partition(array, predicate); + }; +} +//#endregion +exports.partition = partition; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/partition.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/partition.mjs new file mode 100644 index 0000000000000000000000000000000000000000..fb2d3b454630964433ba2b55eb2440bf3a439d94 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/partition.mjs @@ -0,0 +1,9 @@ +import { partition as partition$1 } from "../../array/partition.mjs"; +//#region src/fp/array/partition.ts +function partition(predicate) { + return function(array) { + return partition$1(array, predicate); + }; +} +//#endregion +export { partition }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/reverse.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/reverse.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..c57798777d9f62b6e50009814fa3993109fff658 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/reverse.d.mts @@ -0,0 +1,19 @@ +//#region src/fp/array/reverse.d.ts +/** + * Creates a function that returns a reversed copy of an array. + * + * Unlike Array.prototype.reverse, the returned function does not mutate the input array. + * Use it with {@link pipe}. + * + * @template T - The type of elements in the array. + * @returns A function that maps a readonly array to a reversed copy. + * + * @example + * import { pipe, reverse } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3], reverse()); + * // => [3, 2, 1] + */ +declare function reverse(): (array: readonly T[]) => T[]; +//#endregion +export { reverse }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/reverse.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/reverse.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c57798777d9f62b6e50009814fa3993109fff658 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/reverse.d.ts @@ -0,0 +1,19 @@ +//#region src/fp/array/reverse.d.ts +/** + * Creates a function that returns a reversed copy of an array. + * + * Unlike Array.prototype.reverse, the returned function does not mutate the input array. + * Use it with {@link pipe}. + * + * @template T - The type of elements in the array. + * @returns A function that maps a readonly array to a reversed copy. + * + * @example + * import { pipe, reverse } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3], reverse()); + * // => [3, 2, 1] + */ +declare function reverse(): (array: readonly T[]) => T[]; +//#endregion +export { reverse }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/reverse.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/reverse.js new file mode 100644 index 0000000000000000000000000000000000000000..7fc7163c3fb983864cf86e41f0383a4f032a14d8 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/reverse.js @@ -0,0 +1,23 @@ +//#region src/fp/array/reverse.ts +/** +* Creates a function that returns a reversed copy of an array. +* +* Unlike Array.prototype.reverse, the returned function does not mutate the input array. +* Use it with {@link pipe}. +* +* @template T - The type of elements in the array. +* @returns A function that maps a readonly array to a reversed copy. +* +* @example +* import { pipe, reverse } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3], reverse()); +* // => [3, 2, 1] +*/ +function reverse() { + return function(array) { + return array.slice().reverse(); + }; +} +//#endregion +exports.reverse = reverse; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/reverse.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/reverse.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e8aeb8ab554e1ff99429131baebd99dbc5186961 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/reverse.mjs @@ -0,0 +1,23 @@ +//#region src/fp/array/reverse.ts +/** +* Creates a function that returns a reversed copy of an array. +* +* Unlike Array.prototype.reverse, the returned function does not mutate the input array. +* Use it with {@link pipe}. +* +* @template T - The type of elements in the array. +* @returns A function that maps a readonly array to a reversed copy. +* +* @example +* import { pipe, reverse } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3], reverse()); +* // => [3, 2, 1] +*/ +function reverse() { + return function(array) { + return array.slice().reverse(); + }; +} +//#endregion +export { reverse }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sample.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sample.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..266dffe81d1c334703140bdaa459c990aa8ad9c1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sample.d.mts @@ -0,0 +1,18 @@ +//#region src/fp/array/sample.d.ts +/** + * Creates a function that returns one random element from an array. + * + * The returned function follows the main {@link sample} behavior. Use it with {@link pipe}. + * + * @template T - The type of elements in the array. + * @returns A function that maps a readonly array to a random element. + * + * @example + * import { pipe, sample } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3], sample()); + * // => one of 1, 2, or 3 + */ +declare function sample(): (array: readonly T[]) => T; +//#endregion +export { sample }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sample.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sample.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..266dffe81d1c334703140bdaa459c990aa8ad9c1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sample.d.ts @@ -0,0 +1,18 @@ +//#region src/fp/array/sample.d.ts +/** + * Creates a function that returns one random element from an array. + * + * The returned function follows the main {@link sample} behavior. Use it with {@link pipe}. + * + * @template T - The type of elements in the array. + * @returns A function that maps a readonly array to a random element. + * + * @example + * import { pipe, sample } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3], sample()); + * // => one of 1, 2, or 3 + */ +declare function sample(): (array: readonly T[]) => T; +//#endregion +export { sample }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sample.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sample.js new file mode 100644 index 0000000000000000000000000000000000000000..19a97682864f74fb12df031ded44d743ea5db5a4 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sample.js @@ -0,0 +1,23 @@ +const require_sample = require("../../array/sample.js"); +//#region src/fp/array/sample.ts +/** +* Creates a function that returns one random element from an array. +* +* The returned function follows the main {@link sample} behavior. Use it with {@link pipe}. +* +* @template T - The type of elements in the array. +* @returns A function that maps a readonly array to a random element. +* +* @example +* import { pipe, sample } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3], sample()); +* // => one of 1, 2, or 3 +*/ +function sample() { + return function(array) { + return require_sample.sample(array); + }; +} +//#endregion +exports.sample = sample; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sample.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sample.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e04544fe3b195752905b029650529c97d94d72bd --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sample.mjs @@ -0,0 +1,23 @@ +import { sample as sample$1 } from "../../array/sample.mjs"; +//#region src/fp/array/sample.ts +/** +* Creates a function that returns one random element from an array. +* +* The returned function follows the main {@link sample} behavior. Use it with {@link pipe}. +* +* @template T - The type of elements in the array. +* @returns A function that maps a readonly array to a random element. +* +* @example +* import { pipe, sample } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3], sample()); +* // => one of 1, 2, or 3 +*/ +function sample() { + return function(array) { + return sample$1(array); + }; +} +//#endregion +export { sample }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sampleSize.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sampleSize.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..b776b592646b7efccf1366aa8979008c8d8ce79c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sampleSize.d.mts @@ -0,0 +1,20 @@ +//#region src/fp/array/sampleSize.d.ts +/** + * Creates a function that returns random elements from an array. + * + * The returned function follows the main {@link sampleSize} behavior and returns a new array. + * Use it with {@link pipe}. + * + * @template T - The type of elements in the array. + * @param size - The number of elements to sample. + * @returns A function that maps a readonly array to sampled elements. + * + * @example + * import { pipe, sampleSize } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 4], sampleSize(2)); + * // => two random elements + */ +declare function sampleSize(size: number): (array: readonly T[]) => T[]; +//#endregion +export { sampleSize }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sampleSize.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sampleSize.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b776b592646b7efccf1366aa8979008c8d8ce79c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sampleSize.d.ts @@ -0,0 +1,20 @@ +//#region src/fp/array/sampleSize.d.ts +/** + * Creates a function that returns random elements from an array. + * + * The returned function follows the main {@link sampleSize} behavior and returns a new array. + * Use it with {@link pipe}. + * + * @template T - The type of elements in the array. + * @param size - The number of elements to sample. + * @returns A function that maps a readonly array to sampled elements. + * + * @example + * import { pipe, sampleSize } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 4], sampleSize(2)); + * // => two random elements + */ +declare function sampleSize(size: number): (array: readonly T[]) => T[]; +//#endregion +export { sampleSize }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sampleSize.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sampleSize.js new file mode 100644 index 0000000000000000000000000000000000000000..8c8ef45a6631a32fabc7e88b48f95f6ac13cdf84 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sampleSize.js @@ -0,0 +1,25 @@ +const require_sampleSize = require("../../array/sampleSize.js"); +//#region src/fp/array/sampleSize.ts +/** +* Creates a function that returns random elements from an array. +* +* The returned function follows the main {@link sampleSize} behavior and returns a new array. +* Use it with {@link pipe}. +* +* @template T - The type of elements in the array. +* @param size - The number of elements to sample. +* @returns A function that maps a readonly array to sampled elements. +* +* @example +* import { pipe, sampleSize } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3, 4], sampleSize(2)); +* // => two random elements +*/ +function sampleSize(size) { + return function(array) { + return require_sampleSize.sampleSize(array, size); + }; +} +//#endregion +exports.sampleSize = sampleSize; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sampleSize.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sampleSize.mjs new file mode 100644 index 0000000000000000000000000000000000000000..6865144ab1d544753b86408d69516273e70f75de --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sampleSize.mjs @@ -0,0 +1,25 @@ +import { sampleSize as sampleSize$1 } from "../../array/sampleSize.mjs"; +//#region src/fp/array/sampleSize.ts +/** +* Creates a function that returns random elements from an array. +* +* The returned function follows the main {@link sampleSize} behavior and returns a new array. +* Use it with {@link pipe}. +* +* @template T - The type of elements in the array. +* @param size - The number of elements to sample. +* @returns A function that maps a readonly array to sampled elements. +* +* @example +* import { pipe, sampleSize } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3, 4], sampleSize(2)); +* // => two random elements +*/ +function sampleSize(size) { + return function(array) { + return sampleSize$1(array, size); + }; +} +//#endregion +export { sampleSize }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/shuffle.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/shuffle.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..e9683dfe50e7686db44e6b634de0a146db16d5aa --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/shuffle.d.mts @@ -0,0 +1,19 @@ +//#region src/fp/array/shuffle.d.ts +/** + * Creates a function that returns a shuffled copy of an array. + * + * The returned function uses the main {@link shuffle} implementation and does not mutate + * the input array. Use it with {@link pipe}. + * + * @template T - The type of elements in the array. + * @returns A function that maps a readonly array to a shuffled copy. + * + * @example + * import { pipe, shuffle } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3], shuffle()); + * // => the same values in random order + */ +declare function shuffle(): (array: readonly T[]) => T[]; +//#endregion +export { shuffle }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/shuffle.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/shuffle.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e9683dfe50e7686db44e6b634de0a146db16d5aa --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/shuffle.d.ts @@ -0,0 +1,19 @@ +//#region src/fp/array/shuffle.d.ts +/** + * Creates a function that returns a shuffled copy of an array. + * + * The returned function uses the main {@link shuffle} implementation and does not mutate + * the input array. Use it with {@link pipe}. + * + * @template T - The type of elements in the array. + * @returns A function that maps a readonly array to a shuffled copy. + * + * @example + * import { pipe, shuffle } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3], shuffle()); + * // => the same values in random order + */ +declare function shuffle(): (array: readonly T[]) => T[]; +//#endregion +export { shuffle }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/shuffle.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/shuffle.js new file mode 100644 index 0000000000000000000000000000000000000000..20bb2589a69691faefc4ea081d958c4a1ba1145f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/shuffle.js @@ -0,0 +1,24 @@ +const require_shuffle = require("../../array/shuffle.js"); +//#region src/fp/array/shuffle.ts +/** +* Creates a function that returns a shuffled copy of an array. +* +* The returned function uses the main {@link shuffle} implementation and does not mutate +* the input array. Use it with {@link pipe}. +* +* @template T - The type of elements in the array. +* @returns A function that maps a readonly array to a shuffled copy. +* +* @example +* import { pipe, shuffle } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3], shuffle()); +* // => the same values in random order +*/ +function shuffle() { + return function(array) { + return require_shuffle.shuffle(array); + }; +} +//#endregion +exports.shuffle = shuffle; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/shuffle.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/shuffle.mjs new file mode 100644 index 0000000000000000000000000000000000000000..ce071abc578867bdbdc7e103f687bb395cdf07d7 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/shuffle.mjs @@ -0,0 +1,24 @@ +import { shuffle as shuffle$1 } from "../../array/shuffle.mjs"; +//#region src/fp/array/shuffle.ts +/** +* Creates a function that returns a shuffled copy of an array. +* +* The returned function uses the main {@link shuffle} implementation and does not mutate +* the input array. Use it with {@link pipe}. +* +* @template T - The type of elements in the array. +* @returns A function that maps a readonly array to a shuffled copy. +* +* @example +* import { pipe, shuffle } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3], shuffle()); +* // => the same values in random order +*/ +function shuffle() { + return function(array) { + return shuffle$1(array); + }; +} +//#endregion +export { shuffle }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sortBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sortBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..881e9366618fea7c071ddbfd387371ac78712c41 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sortBy.d.mts @@ -0,0 +1,26 @@ +//#region src/fp/array/sortBy.d.ts +/** + * Creates a function that sorts an array of objects in ascending order by the + * given `criteria`. Each criterion is either an object key or a function + * returning the value to compare. When two elements tie on a criterion, the + * next criterion breaks the tie. The sort is stable. Use it with {@link pipe}. + * + * @template T - The type of the objects in the array. + * @param criteria - Object keys and/or selector functions used for comparison, applied in order. + * @returns A function that maps a `readonly T[]` to a new, sorted `T[]`. + * + * @example + * import { pipe, sortBy } from 'es-toolkit/fp'; + * + * const users = [ + * { user: 'foo', age: 24 }, + * { user: 'bar', age: 7 }, + * { user: 'foo', age: 8 }, + * ]; + * + * pipe(users, sortBy(['user', 'age'])); + * // => [{ user: 'bar', age: 7 }, { user: 'foo', age: 8 }, { user: 'foo', age: 24 }] + */ +declare function sortBy(criteria: ReadonlyArray<((item: T) => unknown) | keyof T>): (array: readonly T[]) => T[]; +//#endregion +export { sortBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sortBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sortBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..881e9366618fea7c071ddbfd387371ac78712c41 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sortBy.d.ts @@ -0,0 +1,26 @@ +//#region src/fp/array/sortBy.d.ts +/** + * Creates a function that sorts an array of objects in ascending order by the + * given `criteria`. Each criterion is either an object key or a function + * returning the value to compare. When two elements tie on a criterion, the + * next criterion breaks the tie. The sort is stable. Use it with {@link pipe}. + * + * @template T - The type of the objects in the array. + * @param criteria - Object keys and/or selector functions used for comparison, applied in order. + * @returns A function that maps a `readonly T[]` to a new, sorted `T[]`. + * + * @example + * import { pipe, sortBy } from 'es-toolkit/fp'; + * + * const users = [ + * { user: 'foo', age: 24 }, + * { user: 'bar', age: 7 }, + * { user: 'foo', age: 8 }, + * ]; + * + * pipe(users, sortBy(['user', 'age'])); + * // => [{ user: 'bar', age: 7 }, { user: 'foo', age: 8 }, { user: 'foo', age: 24 }] + */ +declare function sortBy(criteria: ReadonlyArray<((item: T) => unknown) | keyof T>): (array: readonly T[]) => T[]; +//#endregion +export { sortBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sortBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sortBy.js new file mode 100644 index 0000000000000000000000000000000000000000..ac1a5c472e81fa0196a84cf1145df7217fba44ca --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sortBy.js @@ -0,0 +1,31 @@ +const require_sortBy = require("../../array/sortBy.js"); +//#region src/fp/array/sortBy.ts +/** +* Creates a function that sorts an array of objects in ascending order by the +* given `criteria`. Each criterion is either an object key or a function +* returning the value to compare. When two elements tie on a criterion, the +* next criterion breaks the tie. The sort is stable. Use it with {@link pipe}. +* +* @template T - The type of the objects in the array. +* @param criteria - Object keys and/or selector functions used for comparison, applied in order. +* @returns A function that maps a `readonly T[]` to a new, sorted `T[]`. +* +* @example +* import { pipe, sortBy } from 'es-toolkit/fp'; +* +* const users = [ +* { user: 'foo', age: 24 }, +* { user: 'bar', age: 7 }, +* { user: 'foo', age: 8 }, +* ]; +* +* pipe(users, sortBy(['user', 'age'])); +* // => [{ user: 'bar', age: 7 }, { user: 'foo', age: 8 }, { user: 'foo', age: 24 }] +*/ +function sortBy(criteria) { + return function(array) { + return require_sortBy.sortBy(array, criteria); + }; +} +//#endregion +exports.sortBy = sortBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sortBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sortBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f44b9a32dc7afd4329ecf83d050a3af831a2c781 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/sortBy.mjs @@ -0,0 +1,31 @@ +import { sortBy as sortBy$1 } from "../../array/sortBy.mjs"; +//#region src/fp/array/sortBy.ts +/** +* Creates a function that sorts an array of objects in ascending order by the +* given `criteria`. Each criterion is either an object key or a function +* returning the value to compare. When two elements tie on a criterion, the +* next criterion breaks the tie. The sort is stable. Use it with {@link pipe}. +* +* @template T - The type of the objects in the array. +* @param criteria - Object keys and/or selector functions used for comparison, applied in order. +* @returns A function that maps a `readonly T[]` to a new, sorted `T[]`. +* +* @example +* import { pipe, sortBy } from 'es-toolkit/fp'; +* +* const users = [ +* { user: 'foo', age: 24 }, +* { user: 'bar', age: 7 }, +* { user: 'foo', age: 8 }, +* ]; +* +* pipe(users, sortBy(['user', 'age'])); +* // => [{ user: 'bar', age: 7 }, { user: 'foo', age: 8 }, { user: 'foo', age: 24 }] +*/ +function sortBy(criteria) { + return function(array) { + return sortBy$1(array, criteria); + }; +} +//#endregion +export { sortBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/tail.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/tail.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..05c6f1cae63e749adee92ccfd3f6215ce5a4a518 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/tail.d.mts @@ -0,0 +1,19 @@ +//#region src/fp/array/tail.d.ts +/** + * Creates a function that returns every element except the first one. + * + * Empty and single-element arrays return an empty array, matching the main {@link tail} + * behavior. Use the returned function with {@link pipe}. + * + * @template T - The type of elements in the array. + * @returns A function that maps a readonly array to its tail elements. + * + * @example + * import { pipe, tail } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3], tail()); + * // => [2, 3] + */ +declare function tail(): (array: readonly T[]) => T[]; +//#endregion +export { tail }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/tail.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/tail.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..05c6f1cae63e749adee92ccfd3f6215ce5a4a518 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/tail.d.ts @@ -0,0 +1,19 @@ +//#region src/fp/array/tail.d.ts +/** + * Creates a function that returns every element except the first one. + * + * Empty and single-element arrays return an empty array, matching the main {@link tail} + * behavior. Use the returned function with {@link pipe}. + * + * @template T - The type of elements in the array. + * @returns A function that maps a readonly array to its tail elements. + * + * @example + * import { pipe, tail } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3], tail()); + * // => [2, 3] + */ +declare function tail(): (array: readonly T[]) => T[]; +//#endregion +export { tail }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/tail.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/tail.js new file mode 100644 index 0000000000000000000000000000000000000000..3173807ce58b74de5bf647105ac453b529ef5b65 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/tail.js @@ -0,0 +1,24 @@ +const require_tail = require("../../array/tail.js"); +//#region src/fp/array/tail.ts +/** +* Creates a function that returns every element except the first one. +* +* Empty and single-element arrays return an empty array, matching the main {@link tail} +* behavior. Use the returned function with {@link pipe}. +* +* @template T - The type of elements in the array. +* @returns A function that maps a readonly array to its tail elements. +* +* @example +* import { pipe, tail } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3], tail()); +* // => [2, 3] +*/ +function tail() { + return function(array) { + return require_tail.tail(array); + }; +} +//#endregion +exports.tail = tail; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/tail.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/tail.mjs new file mode 100644 index 0000000000000000000000000000000000000000..264fe2ffa47c8e63f0f1871c9ec2f37b18b432cf --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/tail.mjs @@ -0,0 +1,24 @@ +import { tail as tail$1 } from "../../array/tail.mjs"; +//#region src/fp/array/tail.ts +/** +* Creates a function that returns every element except the first one. +* +* Empty and single-element arrays return an empty array, matching the main {@link tail} +* behavior. Use the returned function with {@link pipe}. +* +* @template T - The type of elements in the array. +* @returns A function that maps a readonly array to its tail elements. +* +* @example +* import { pipe, tail } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3], tail()); +* // => [2, 3] +*/ +function tail() { + return function(array) { + return tail$1(array); + }; +} +//#endregion +export { tail }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/take.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/take.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..bfb534a49ddce9c2a4681627fa95f6fe106ffbcc --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/take.d.mts @@ -0,0 +1,26 @@ +//#region src/fp/array/take.d.ts +/** + * Creates a function that returns the first `count` elements of an array. If + * `count` is greater than the array length, the whole array is returned. Use it + * with {@link pipe}. + * + * The returned function is **lazy-capable** for a non-negative integer `count`: + * inside a {@link pipe} it stops the walk as soon as `count` elements have been + * collected, so preceding lazy functions never process the rest of the input. + * + * @template T - The type of elements in the array. + * @param count - The number of elements to take from the front of the array. + * @returns A function that maps a `readonly T[]` to a new `T[]`. + * + * @example + * import { pipe, take } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 4, 5], take(3)); // => [1, 2, 3] + * + * @example + * // Early termination: `map` only runs three times. + * pipe([1, 2, 3, 4, 5], map(expensive), take(3)); + */ +declare function take(count: number): (array: readonly T[]) => T[]; +//#endregion +export { take }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/take.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/take.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..bfb534a49ddce9c2a4681627fa95f6fe106ffbcc --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/take.d.ts @@ -0,0 +1,26 @@ +//#region src/fp/array/take.d.ts +/** + * Creates a function that returns the first `count` elements of an array. If + * `count` is greater than the array length, the whole array is returned. Use it + * with {@link pipe}. + * + * The returned function is **lazy-capable** for a non-negative integer `count`: + * inside a {@link pipe} it stops the walk as soon as `count` elements have been + * collected, so preceding lazy functions never process the rest of the input. + * + * @template T - The type of elements in the array. + * @param count - The number of elements to take from the front of the array. + * @returns A function that maps a `readonly T[]` to a new `T[]`. + * + * @example + * import { pipe, take } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 4, 5], take(3)); // => [1, 2, 3] + * + * @example + * // Early termination: `map` only runs three times. + * pipe([1, 2, 3, 4, 5], map(expensive), take(3)); + */ +declare function take(count: number): (array: readonly T[]) => T[]; +//#endregion +export { take }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/take.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/take.js new file mode 100644 index 0000000000000000000000000000000000000000..0d295e69cd4ed4ec9178f430ef4cfd2389d31f0b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/take.js @@ -0,0 +1,39 @@ +const require_take = require("../../array/take.js"); +const require_lazy = require("../_internal/lazy.js"); +//#region src/fp/array/take.ts +/** +* Creates a function that returns the first `count` elements of an array. If +* `count` is greater than the array length, the whole array is returned. Use it +* with {@link pipe}. +* +* The returned function is **lazy-capable** for a non-negative integer `count`: +* inside a {@link pipe} it stops the walk as soon as `count` elements have been +* collected, so preceding lazy functions never process the rest of the input. +* +* @template T - The type of elements in the array. +* @param count - The number of elements to take from the front of the array. +* @returns A function that maps a `readonly T[]` to a new `T[]`. +* +* @example +* import { pipe, take } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3, 4, 5], take(3)); // => [1, 2, 3] +* +* @example +* // Early termination: `map` only runs three times. +* pipe([1, 2, 3, 4, 5], map(expensive), take(3)); +*/ +function take(count) { + function takeEager(array) { + return require_take.take(array, count); + } + if (!Number.isInteger(count) || count < 0) return takeEager; + const takeLazy = require_lazy.createLazyFunction((value, index, emit) => { + if (index >= count) return false; + emit(value); + return index < count - 1; + }); + return require_lazy.combineEagerAndLazyFunctions(takeEager, takeLazy, { shortCircuit: true }); +} +//#endregion +exports.take = take; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/take.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/take.mjs new file mode 100644 index 0000000000000000000000000000000000000000..4b1ea023a22bdbab9677491b3e22bf41c94b900a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/take.mjs @@ -0,0 +1,38 @@ +import { take as take$1 } from "../../array/take.mjs"; +import { combineEagerAndLazyFunctions, createLazyFunction } from "../_internal/lazy.mjs"; +//#region src/fp/array/take.ts +/** +* Creates a function that returns the first `count` elements of an array. If +* `count` is greater than the array length, the whole array is returned. Use it +* with {@link pipe}. +* +* The returned function is **lazy-capable** for a non-negative integer `count`: +* inside a {@link pipe} it stops the walk as soon as `count` elements have been +* collected, so preceding lazy functions never process the rest of the input. +* +* @template T - The type of elements in the array. +* @param count - The number of elements to take from the front of the array. +* @returns A function that maps a `readonly T[]` to a new `T[]`. +* +* @example +* import { pipe, take } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3, 4, 5], take(3)); // => [1, 2, 3] +* +* @example +* // Early termination: `map` only runs three times. +* pipe([1, 2, 3, 4, 5], map(expensive), take(3)); +*/ +function take(count) { + function takeEager(array) { + return take$1(array, count); + } + if (!Number.isInteger(count) || count < 0) return takeEager; + return combineEagerAndLazyFunctions(takeEager, createLazyFunction((value, index, emit) => { + if (index >= count) return false; + emit(value); + return index < count - 1; + }), { shortCircuit: true }); +} +//#endregion +export { take }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeRight.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeRight.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..23ef4e9b40bce3cc7fc1879149a6658a74695555 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeRight.d.mts @@ -0,0 +1,20 @@ +//#region src/fp/array/takeRight.d.ts +/** + * Creates a function that returns the last count values of an array. + * + * The returned function follows the main {@link takeRight} behavior and returns a new array. + * Use it with {@link pipe}. + * + * @template T - The type of elements in the array. + * @param count - The number of values to take from the end. + * @returns A function that maps a readonly array to its suffix. + * + * @example + * import { pipe, takeRight } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 4], takeRight(2)); + * // => [3, 4] + */ +declare function takeRight(count: number): (array: readonly T[]) => T[]; +//#endregion +export { takeRight }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeRight.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeRight.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..23ef4e9b40bce3cc7fc1879149a6658a74695555 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeRight.d.ts @@ -0,0 +1,20 @@ +//#region src/fp/array/takeRight.d.ts +/** + * Creates a function that returns the last count values of an array. + * + * The returned function follows the main {@link takeRight} behavior and returns a new array. + * Use it with {@link pipe}. + * + * @template T - The type of elements in the array. + * @param count - The number of values to take from the end. + * @returns A function that maps a readonly array to its suffix. + * + * @example + * import { pipe, takeRight } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 4], takeRight(2)); + * // => [3, 4] + */ +declare function takeRight(count: number): (array: readonly T[]) => T[]; +//#endregion +export { takeRight }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeRight.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeRight.js new file mode 100644 index 0000000000000000000000000000000000000000..ad7586e2de24f7570aa39892aa3a9ac102facef7 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeRight.js @@ -0,0 +1,25 @@ +const require_takeRight = require("../../array/takeRight.js"); +//#region src/fp/array/takeRight.ts +/** +* Creates a function that returns the last count values of an array. +* +* The returned function follows the main {@link takeRight} behavior and returns a new array. +* Use it with {@link pipe}. +* +* @template T - The type of elements in the array. +* @param count - The number of values to take from the end. +* @returns A function that maps a readonly array to its suffix. +* +* @example +* import { pipe, takeRight } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3, 4], takeRight(2)); +* // => [3, 4] +*/ +function takeRight(count) { + return function(array) { + return require_takeRight.takeRight(array, count); + }; +} +//#endregion +exports.takeRight = takeRight; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeRight.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeRight.mjs new file mode 100644 index 0000000000000000000000000000000000000000..2b99a9878d36e6e14290df8f6e8246a971d562dc --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeRight.mjs @@ -0,0 +1,25 @@ +import { takeRight as takeRight$1 } from "../../array/takeRight.mjs"; +//#region src/fp/array/takeRight.ts +/** +* Creates a function that returns the last count values of an array. +* +* The returned function follows the main {@link takeRight} behavior and returns a new array. +* Use it with {@link pipe}. +* +* @template T - The type of elements in the array. +* @param count - The number of values to take from the end. +* @returns A function that maps a readonly array to its suffix. +* +* @example +* import { pipe, takeRight } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3, 4], takeRight(2)); +* // => [3, 4] +*/ +function takeRight(count) { + return function(array) { + return takeRight$1(array, count); + }; +} +//#endregion +export { takeRight }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeRightWhile.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeRightWhile.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..54072ba1b3366e27f1699581ddeb49279857e968 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeRightWhile.d.mts @@ -0,0 +1,20 @@ +//#region src/fp/array/takeRightWhile.d.ts +/** + * Creates a function that takes trailing values while a predicate returns true. + * + * The predicate is evaluated from right to left and receives the value, index, and full + * input array. Use the returned function with {@link pipe}. + * + * @template T - The type of elements in the array. + * @param predicate - Called with each value, index, and array while taking from the end. + * @returns A function that maps a readonly array to the matching suffix. + * + * @example + * import { pipe, takeRightWhile } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 4], takeRightWhile(value => value > 2)); + * // => [3, 4] + */ +declare function takeRightWhile(predicate: (element: T, index: number, array: readonly T[]) => boolean): (array: readonly T[]) => T[]; +//#endregion +export { takeRightWhile }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeRightWhile.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeRightWhile.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..54072ba1b3366e27f1699581ddeb49279857e968 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeRightWhile.d.ts @@ -0,0 +1,20 @@ +//#region src/fp/array/takeRightWhile.d.ts +/** + * Creates a function that takes trailing values while a predicate returns true. + * + * The predicate is evaluated from right to left and receives the value, index, and full + * input array. Use the returned function with {@link pipe}. + * + * @template T - The type of elements in the array. + * @param predicate - Called with each value, index, and array while taking from the end. + * @returns A function that maps a readonly array to the matching suffix. + * + * @example + * import { pipe, takeRightWhile } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 4], takeRightWhile(value => value > 2)); + * // => [3, 4] + */ +declare function takeRightWhile(predicate: (element: T, index: number, array: readonly T[]) => boolean): (array: readonly T[]) => T[]; +//#endregion +export { takeRightWhile }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeRightWhile.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeRightWhile.js new file mode 100644 index 0000000000000000000000000000000000000000..a83749aebe9e7f26e7607931cdf478d1ed0f3560 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeRightWhile.js @@ -0,0 +1,25 @@ +const require_takeRightWhile = require("../../array/takeRightWhile.js"); +//#region src/fp/array/takeRightWhile.ts +/** +* Creates a function that takes trailing values while a predicate returns true. +* +* The predicate is evaluated from right to left and receives the value, index, and full +* input array. Use the returned function with {@link pipe}. +* +* @template T - The type of elements in the array. +* @param predicate - Called with each value, index, and array while taking from the end. +* @returns A function that maps a readonly array to the matching suffix. +* +* @example +* import { pipe, takeRightWhile } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3, 4], takeRightWhile(value => value > 2)); +* // => [3, 4] +*/ +function takeRightWhile(predicate) { + return function(array) { + return require_takeRightWhile.takeRightWhile(array, predicate); + }; +} +//#endregion +exports.takeRightWhile = takeRightWhile; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeRightWhile.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeRightWhile.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f3a4820e12bdaf446a819121dba5f5721faac2ef --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeRightWhile.mjs @@ -0,0 +1,25 @@ +import { takeRightWhile as takeRightWhile$1 } from "../../array/takeRightWhile.mjs"; +//#region src/fp/array/takeRightWhile.ts +/** +* Creates a function that takes trailing values while a predicate returns true. +* +* The predicate is evaluated from right to left and receives the value, index, and full +* input array. Use the returned function with {@link pipe}. +* +* @template T - The type of elements in the array. +* @param predicate - Called with each value, index, and array while taking from the end. +* @returns A function that maps a readonly array to the matching suffix. +* +* @example +* import { pipe, takeRightWhile } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3, 4], takeRightWhile(value => value > 2)); +* // => [3, 4] +*/ +function takeRightWhile(predicate) { + return function(array) { + return takeRightWhile$1(array, predicate); + }; +} +//#endregion +export { takeRightWhile }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeWhile.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeWhile.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..29a4ec0c44ee5dcc75a26d6c9e1a036ee87542b2 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeWhile.d.mts @@ -0,0 +1,21 @@ +//#region src/fp/array/takeWhile.d.ts +/** + * Creates a function that takes leading values while a predicate returns true. + * + * The returned function is lazy-capable and short-circuiting inside + * {@link pipe}; once the predicate returns false, upstream lazy operators stop + * processing further input. + * + * @template T - The type of elements in the array. + * @param predicate - Called with each value and index until it returns false. + * @returns A function that maps the piped array to the matching prefix. + * + * @example + * import { pipe, takeWhile } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 1], takeWhile(value => value < 3)); + * // => [1, 2] + */ +declare function takeWhile(predicate: (element: T, index: number) => boolean): (array: readonly T[]) => T[]; +//#endregion +export { takeWhile }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeWhile.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeWhile.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..29a4ec0c44ee5dcc75a26d6c9e1a036ee87542b2 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeWhile.d.ts @@ -0,0 +1,21 @@ +//#region src/fp/array/takeWhile.d.ts +/** + * Creates a function that takes leading values while a predicate returns true. + * + * The returned function is lazy-capable and short-circuiting inside + * {@link pipe}; once the predicate returns false, upstream lazy operators stop + * processing further input. + * + * @template T - The type of elements in the array. + * @param predicate - Called with each value and index until it returns false. + * @returns A function that maps the piped array to the matching prefix. + * + * @example + * import { pipe, takeWhile } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 1], takeWhile(value => value < 3)); + * // => [1, 2] + */ +declare function takeWhile(predicate: (element: T, index: number) => boolean): (array: readonly T[]) => T[]; +//#endregion +export { takeWhile }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeWhile.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeWhile.js new file mode 100644 index 0000000000000000000000000000000000000000..f35b552f31e4cacf2e19021395c243ec929817a6 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeWhile.js @@ -0,0 +1,32 @@ +const require_takeWhile = require("../../array/takeWhile.js"); +const require_lazy = require("../_internal/lazy.js"); +//#region src/fp/array/takeWhile.ts +/** +* Creates a function that takes leading values while a predicate returns true. +* +* The returned function is lazy-capable and short-circuiting inside +* {@link pipe}; once the predicate returns false, upstream lazy operators stop +* processing further input. +* +* @template T - The type of elements in the array. +* @param predicate - Called with each value and index until it returns false. +* @returns A function that maps the piped array to the matching prefix. +* +* @example +* import { pipe, takeWhile } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3, 1], takeWhile(value => value < 3)); +* // => [1, 2] +*/ +function takeWhile(predicate) { + function takeWhileEager(array) { + return require_takeWhile.takeWhile(array, (element, index) => predicate(element, index)); + } + const takeWhileLazy = require_lazy.createLazyFunction((value, index, emit) => { + if (!predicate(value, index)) return false; + emit(value); + }); + return require_lazy.combineEagerAndLazyFunctions(takeWhileEager, takeWhileLazy, { shortCircuit: true }); +} +//#endregion +exports.takeWhile = takeWhile; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeWhile.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeWhile.mjs new file mode 100644 index 0000000000000000000000000000000000000000..5f7881147b167bd7b63ad0b2dfbdc87055e5e5a4 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/takeWhile.mjs @@ -0,0 +1,31 @@ +import { takeWhile as takeWhile$1 } from "../../array/takeWhile.mjs"; +import { combineEagerAndLazyFunctions, createLazyFunction } from "../_internal/lazy.mjs"; +//#region src/fp/array/takeWhile.ts +/** +* Creates a function that takes leading values while a predicate returns true. +* +* The returned function is lazy-capable and short-circuiting inside +* {@link pipe}; once the predicate returns false, upstream lazy operators stop +* processing further input. +* +* @template T - The type of elements in the array. +* @param predicate - Called with each value and index until it returns false. +* @returns A function that maps the piped array to the matching prefix. +* +* @example +* import { pipe, takeWhile } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3, 1], takeWhile(value => value < 3)); +* // => [1, 2] +*/ +function takeWhile(predicate) { + function takeWhileEager(array) { + return takeWhile$1(array, (element, index) => predicate(element, index)); + } + return combineEagerAndLazyFunctions(takeWhileEager, createLazyFunction((value, index, emit) => { + if (!predicate(value, index)) return false; + emit(value); + }), { shortCircuit: true }); +} +//#endregion +export { takeWhile }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/toFilled.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/toFilled.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..864f9b87692d7321613dd19b793101fa3e40d228 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/toFilled.d.mts @@ -0,0 +1,23 @@ +//#region src/fp/array/toFilled.d.ts +/** + * Creates a function that returns a filled copy of an array. + * + * The returned function follows Array.prototype.fill indexing semantics through the main + * {@link toFilled} implementation and does not mutate the input array. + * + * @template T - The type of elements in the input array. + * @template U - The type of the fill value. + * @param value - The value to write into the returned array. + * @param start - The start index. Defaults to 0. + * @param end - The end index. Defaults to the array length. + * @returns A function that maps a readonly array to a filled copy. + * + * @example + * import { pipe, toFilled } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3], toFilled(0, 1)); + * // => [1, 0, 0] + */ +declare function toFilled(value: U, start?: number, end?: number): (array: readonly T[]) => Array; +//#endregion +export { toFilled }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/toFilled.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/toFilled.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..864f9b87692d7321613dd19b793101fa3e40d228 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/toFilled.d.ts @@ -0,0 +1,23 @@ +//#region src/fp/array/toFilled.d.ts +/** + * Creates a function that returns a filled copy of an array. + * + * The returned function follows Array.prototype.fill indexing semantics through the main + * {@link toFilled} implementation and does not mutate the input array. + * + * @template T - The type of elements in the input array. + * @template U - The type of the fill value. + * @param value - The value to write into the returned array. + * @param start - The start index. Defaults to 0. + * @param end - The end index. Defaults to the array length. + * @returns A function that maps a readonly array to a filled copy. + * + * @example + * import { pipe, toFilled } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3], toFilled(0, 1)); + * // => [1, 0, 0] + */ +declare function toFilled(value: U, start?: number, end?: number): (array: readonly T[]) => Array; +//#endregion +export { toFilled }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/toFilled.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/toFilled.js new file mode 100644 index 0000000000000000000000000000000000000000..8bd40d679c4947b423cb35bdcf4afc0855761ba0 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/toFilled.js @@ -0,0 +1,30 @@ +const require_toFilled = require("../../array/toFilled.js"); +//#region src/fp/array/toFilled.ts +/** +* Creates a function that returns a filled copy of an array. +* +* The returned function follows Array.prototype.fill indexing semantics through the main +* {@link toFilled} implementation and does not mutate the input array. +* +* @template T - The type of elements in the input array. +* @template U - The type of the fill value. +* @param value - The value to write into the returned array. +* @param start - The start index. Defaults to 0. +* @param end - The end index. Defaults to the array length. +* @returns A function that maps a readonly array to a filled copy. +* +* @example +* import { pipe, toFilled } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3], toFilled(0, 1)); +* // => [1, 0, 0] +*/ +function toFilled(value, start, end) { + return function(array) { + if (start == null) return require_toFilled.toFilled(array, value); + if (end == null) return require_toFilled.toFilled(array, value, start); + return require_toFilled.toFilled(array, value, start, end); + }; +} +//#endregion +exports.toFilled = toFilled; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/toFilled.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/toFilled.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c1e1eaba31f42302f389fb1a4bddbe989859b1aa --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/toFilled.mjs @@ -0,0 +1,30 @@ +import { toFilled as toFilled$1 } from "../../array/toFilled.mjs"; +//#region src/fp/array/toFilled.ts +/** +* Creates a function that returns a filled copy of an array. +* +* The returned function follows Array.prototype.fill indexing semantics through the main +* {@link toFilled} implementation and does not mutate the input array. +* +* @template T - The type of elements in the input array. +* @template U - The type of the fill value. +* @param value - The value to write into the returned array. +* @param start - The start index. Defaults to 0. +* @param end - The end index. Defaults to the array length. +* @returns A function that maps a readonly array to a filled copy. +* +* @example +* import { pipe, toFilled } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3], toFilled(0, 1)); +* // => [1, 0, 0] +*/ +function toFilled(value, start, end) { + return function(array) { + if (start == null) return toFilled$1(array, value); + if (end == null) return toFilled$1(array, value, start); + return toFilled$1(array, value, start, end); + }; +} +//#endregion +export { toFilled }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/union.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/union.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..7914c993db0e7ddcfcc03f59db698e43be5402e0 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/union.d.mts @@ -0,0 +1,20 @@ +//#region src/fp/array/union.d.ts +/** + * Creates a function that returns unique values from the piped array and secondArray. + * + * Values keep their first occurrence order, matching the main {@link union} behavior. + * Use the returned function with {@link pipe}. + * + * @template T - The type of elements in the arrays. + * @param secondArray - Values to include after the piped array. + * @returns A function that maps a readonly array to its union with secondArray. + * + * @example + * import { pipe, union } from 'es-toolkit/fp'; + * + * pipe([1, 2], union([2, 3])); + * // => [1, 2, 3] + */ +declare function union(secondArray: readonly T[]): (array: readonly T[]) => T[]; +//#endregion +export { union }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/union.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/union.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7914c993db0e7ddcfcc03f59db698e43be5402e0 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/union.d.ts @@ -0,0 +1,20 @@ +//#region src/fp/array/union.d.ts +/** + * Creates a function that returns unique values from the piped array and secondArray. + * + * Values keep their first occurrence order, matching the main {@link union} behavior. + * Use the returned function with {@link pipe}. + * + * @template T - The type of elements in the arrays. + * @param secondArray - Values to include after the piped array. + * @returns A function that maps a readonly array to its union with secondArray. + * + * @example + * import { pipe, union } from 'es-toolkit/fp'; + * + * pipe([1, 2], union([2, 3])); + * // => [1, 2, 3] + */ +declare function union(secondArray: readonly T[]): (array: readonly T[]) => T[]; +//#endregion +export { union }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/union.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/union.js new file mode 100644 index 0000000000000000000000000000000000000000..97c73b1d7b91d4d58f29765fc7fe49df3d0c6c76 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/union.js @@ -0,0 +1,25 @@ +const require_union = require("../../array/union.js"); +//#region src/fp/array/union.ts +/** +* Creates a function that returns unique values from the piped array and secondArray. +* +* Values keep their first occurrence order, matching the main {@link union} behavior. +* Use the returned function with {@link pipe}. +* +* @template T - The type of elements in the arrays. +* @param secondArray - Values to include after the piped array. +* @returns A function that maps a readonly array to its union with secondArray. +* +* @example +* import { pipe, union } from 'es-toolkit/fp'; +* +* pipe([1, 2], union([2, 3])); +* // => [1, 2, 3] +*/ +function union(secondArray) { + return function(array) { + return require_union.union(array, secondArray); + }; +} +//#endregion +exports.union = union; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/union.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/union.mjs new file mode 100644 index 0000000000000000000000000000000000000000..2976261eb150944892def2941b084358a3130e5d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/union.mjs @@ -0,0 +1,25 @@ +import { union as union$1 } from "../../array/union.mjs"; +//#region src/fp/array/union.ts +/** +* Creates a function that returns unique values from the piped array and secondArray. +* +* Values keep their first occurrence order, matching the main {@link union} behavior. +* Use the returned function with {@link pipe}. +* +* @template T - The type of elements in the arrays. +* @param secondArray - Values to include after the piped array. +* @returns A function that maps a readonly array to its union with secondArray. +* +* @example +* import { pipe, union } from 'es-toolkit/fp'; +* +* pipe([1, 2], union([2, 3])); +* // => [1, 2, 3] +*/ +function union(secondArray) { + return function(array) { + return union$1(array, secondArray); + }; +} +//#endregion +export { union }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unionBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unionBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..4315a7ca6163d3bb3ad69ea4a7348e209c5a3c26 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unionBy.d.mts @@ -0,0 +1,22 @@ +//#region src/fp/array/unionBy.d.ts +/** + * Creates a function that returns unique values by mapped identity. + * + * Values from the piped array are considered before values from secondArray. The mapper + * is used to compare identities, matching the main {@link unionBy} behavior. + * + * @template T - The type of elements in the arrays. + * @template U - The type of comparison keys returned by the mapper. + * @param secondArray - Values to include after the piped array. + * @param mapper - Called for values from both arrays to produce comparison keys. + * @returns A function that maps a readonly array to its union with secondArray. + * + * @example + * import { pipe, unionBy } from 'es-toolkit/fp'; + * + * pipe([{ id: 1 }], unionBy([{ id: 1 }, { id: 2 }], item => item.id)); + * // => [{ id: 1 }, { id: 2 }] + */ +declare function unionBy(secondArray: readonly T[], mapper: (item: T) => U): (array: readonly T[]) => T[]; +//#endregion +export { unionBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unionBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unionBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..4315a7ca6163d3bb3ad69ea4a7348e209c5a3c26 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unionBy.d.ts @@ -0,0 +1,22 @@ +//#region src/fp/array/unionBy.d.ts +/** + * Creates a function that returns unique values by mapped identity. + * + * Values from the piped array are considered before values from secondArray. The mapper + * is used to compare identities, matching the main {@link unionBy} behavior. + * + * @template T - The type of elements in the arrays. + * @template U - The type of comparison keys returned by the mapper. + * @param secondArray - Values to include after the piped array. + * @param mapper - Called for values from both arrays to produce comparison keys. + * @returns A function that maps a readonly array to its union with secondArray. + * + * @example + * import { pipe, unionBy } from 'es-toolkit/fp'; + * + * pipe([{ id: 1 }], unionBy([{ id: 1 }, { id: 2 }], item => item.id)); + * // => [{ id: 1 }, { id: 2 }] + */ +declare function unionBy(secondArray: readonly T[], mapper: (item: T) => U): (array: readonly T[]) => T[]; +//#endregion +export { unionBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unionBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unionBy.js new file mode 100644 index 0000000000000000000000000000000000000000..c15c3d24365a50f025fe871b453eb1a58aa517cd --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unionBy.js @@ -0,0 +1,27 @@ +const require_unionBy = require("../../array/unionBy.js"); +//#region src/fp/array/unionBy.ts +/** +* Creates a function that returns unique values by mapped identity. +* +* Values from the piped array are considered before values from secondArray. The mapper +* is used to compare identities, matching the main {@link unionBy} behavior. +* +* @template T - The type of elements in the arrays. +* @template U - The type of comparison keys returned by the mapper. +* @param secondArray - Values to include after the piped array. +* @param mapper - Called for values from both arrays to produce comparison keys. +* @returns A function that maps a readonly array to its union with secondArray. +* +* @example +* import { pipe, unionBy } from 'es-toolkit/fp'; +* +* pipe([{ id: 1 }], unionBy([{ id: 1 }, { id: 2 }], item => item.id)); +* // => [{ id: 1 }, { id: 2 }] +*/ +function unionBy(secondArray, mapper) { + return function(array) { + return require_unionBy.unionBy(array, secondArray, mapper); + }; +} +//#endregion +exports.unionBy = unionBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unionBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unionBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..a28220d346e1981a435214f59e6b48d0a8d2ad84 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unionBy.mjs @@ -0,0 +1,27 @@ +import { unionBy as unionBy$1 } from "../../array/unionBy.mjs"; +//#region src/fp/array/unionBy.ts +/** +* Creates a function that returns unique values by mapped identity. +* +* Values from the piped array are considered before values from secondArray. The mapper +* is used to compare identities, matching the main {@link unionBy} behavior. +* +* @template T - The type of elements in the arrays. +* @template U - The type of comparison keys returned by the mapper. +* @param secondArray - Values to include after the piped array. +* @param mapper - Called for values from both arrays to produce comparison keys. +* @returns A function that maps a readonly array to its union with secondArray. +* +* @example +* import { pipe, unionBy } from 'es-toolkit/fp'; +* +* pipe([{ id: 1 }], unionBy([{ id: 1 }, { id: 2 }], item => item.id)); +* // => [{ id: 1 }, { id: 2 }] +*/ +function unionBy(secondArray, mapper) { + return function(array) { + return unionBy$1(array, secondArray, mapper); + }; +} +//#endregion +export { unionBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unionWith.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unionWith.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..58cde764b26ecac8fbd317934f3956f17d7c440b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unionWith.d.mts @@ -0,0 +1,21 @@ +//#region src/fp/array/unionWith.d.ts +/** + * Creates a function that returns unique values using a custom equality function. + * + * Values from the piped array are considered before values from secondArray. The equality + * function decides whether two values represent the same item. + * + * @template T - The type of elements in the arrays. + * @param secondArray - Values to include after the piped array. + * @param areItemsEqual - Returns true when two values are equal. + * @returns A function that maps a readonly array to its union with secondArray. + * + * @example + * import { pipe, unionWith } from 'es-toolkit/fp'; + * + * pipe([{ id: 1 }], unionWith([{ id: 1 }, { id: 2 }], (a, b) => a.id === b.id)); + * // => [{ id: 1 }, { id: 2 }] + */ +declare function unionWith(secondArray: readonly T[], areItemsEqual: (item: T, other: T) => boolean): (array: readonly T[]) => T[]; +//#endregion +export { unionWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unionWith.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unionWith.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..58cde764b26ecac8fbd317934f3956f17d7c440b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unionWith.d.ts @@ -0,0 +1,21 @@ +//#region src/fp/array/unionWith.d.ts +/** + * Creates a function that returns unique values using a custom equality function. + * + * Values from the piped array are considered before values from secondArray. The equality + * function decides whether two values represent the same item. + * + * @template T - The type of elements in the arrays. + * @param secondArray - Values to include after the piped array. + * @param areItemsEqual - Returns true when two values are equal. + * @returns A function that maps a readonly array to its union with secondArray. + * + * @example + * import { pipe, unionWith } from 'es-toolkit/fp'; + * + * pipe([{ id: 1 }], unionWith([{ id: 1 }, { id: 2 }], (a, b) => a.id === b.id)); + * // => [{ id: 1 }, { id: 2 }] + */ +declare function unionWith(secondArray: readonly T[], areItemsEqual: (item: T, other: T) => boolean): (array: readonly T[]) => T[]; +//#endregion +export { unionWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unionWith.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unionWith.js new file mode 100644 index 0000000000000000000000000000000000000000..468f86230640a498797a0f0c25da04113000b2e8 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unionWith.js @@ -0,0 +1,26 @@ +const require_unionWith = require("../../array/unionWith.js"); +//#region src/fp/array/unionWith.ts +/** +* Creates a function that returns unique values using a custom equality function. +* +* Values from the piped array are considered before values from secondArray. The equality +* function decides whether two values represent the same item. +* +* @template T - The type of elements in the arrays. +* @param secondArray - Values to include after the piped array. +* @param areItemsEqual - Returns true when two values are equal. +* @returns A function that maps a readonly array to its union with secondArray. +* +* @example +* import { pipe, unionWith } from 'es-toolkit/fp'; +* +* pipe([{ id: 1 }], unionWith([{ id: 1 }, { id: 2 }], (a, b) => a.id === b.id)); +* // => [{ id: 1 }, { id: 2 }] +*/ +function unionWith(secondArray, areItemsEqual) { + return function(array) { + return require_unionWith.unionWith(array, secondArray, areItemsEqual); + }; +} +//#endregion +exports.unionWith = unionWith; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unionWith.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unionWith.mjs new file mode 100644 index 0000000000000000000000000000000000000000..2e725ef35a481c902142b1d32128b4d9b1090b0d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unionWith.mjs @@ -0,0 +1,26 @@ +import { unionWith as unionWith$1 } from "../../array/unionWith.mjs"; +//#region src/fp/array/unionWith.ts +/** +* Creates a function that returns unique values using a custom equality function. +* +* Values from the piped array are considered before values from secondArray. The equality +* function decides whether two values represent the same item. +* +* @template T - The type of elements in the arrays. +* @param secondArray - Values to include after the piped array. +* @param areItemsEqual - Returns true when two values are equal. +* @returns A function that maps a readonly array to its union with secondArray. +* +* @example +* import { pipe, unionWith } from 'es-toolkit/fp'; +* +* pipe([{ id: 1 }], unionWith([{ id: 1 }, { id: 2 }], (a, b) => a.id === b.id)); +* // => [{ id: 1 }, { id: 2 }] +*/ +function unionWith(secondArray, areItemsEqual) { + return function(array) { + return unionWith$1(array, secondArray, areItemsEqual); + }; +} +//#endregion +export { unionWith }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniq.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniq.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..97480915f09bd6dd6e5e3b958aeb19b87c0309b8 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniq.d.mts @@ -0,0 +1,21 @@ +//#region src/fp/array/uniq.d.ts +/** + * Creates a function that removes duplicate values from an array, preserving + * the order of first occurrence. Equality follows SameValueZero, matching + * Set semantics. Use it with {@link pipe}. + * + * The returned function is lazy-capable inside {@link pipe}. It keeps a Set of + * values already emitted during each pipeline run. + * + * @template T - The type of elements in the array. + * @returns A function that maps a readonly array to a duplicate-free array. + * + * @example + * import { pipe, uniq } from 'es-toolkit/fp'; + * + * pipe([1, 2, 2, 3, 3, 3], uniq()); + * // => [1, 2, 3] + */ +declare function uniq(): (array: readonly T[]) => T[]; +//#endregion +export { uniq }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniq.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniq.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..97480915f09bd6dd6e5e3b958aeb19b87c0309b8 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniq.d.ts @@ -0,0 +1,21 @@ +//#region src/fp/array/uniq.d.ts +/** + * Creates a function that removes duplicate values from an array, preserving + * the order of first occurrence. Equality follows SameValueZero, matching + * Set semantics. Use it with {@link pipe}. + * + * The returned function is lazy-capable inside {@link pipe}. It keeps a Set of + * values already emitted during each pipeline run. + * + * @template T - The type of elements in the array. + * @returns A function that maps a readonly array to a duplicate-free array. + * + * @example + * import { pipe, uniq } from 'es-toolkit/fp'; + * + * pipe([1, 2, 2, 3, 3, 3], uniq()); + * // => [1, 2, 3] + */ +declare function uniq(): (array: readonly T[]) => T[]; +//#endregion +export { uniq }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniq.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniq.js new file mode 100644 index 0000000000000000000000000000000000000000..11e686af7fe8765dc286ad794d27e5b962b62e9a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniq.js @@ -0,0 +1,36 @@ +const require_uniq = require("../../array/uniq.js"); +const require_lazy = require("../_internal/lazy.js"); +//#region src/fp/array/uniq.ts +/** +* Creates a function that removes duplicate values from an array, preserving +* the order of first occurrence. Equality follows SameValueZero, matching +* Set semantics. Use it with {@link pipe}. +* +* The returned function is lazy-capable inside {@link pipe}. It keeps a Set of +* values already emitted during each pipeline run. +* +* @template T - The type of elements in the array. +* @returns A function that maps a readonly array to a duplicate-free array. +* +* @example +* import { pipe, uniq } from 'es-toolkit/fp'; +* +* pipe([1, 2, 2, 3, 3, 3], uniq()); +* // => [1, 2, 3] +*/ +function uniq() { + function uniqEager(array) { + return require_uniq.uniq(array); + } + const uniqLazy = (emit) => { + const seen = /* @__PURE__ */ new Set(); + return (value) => { + if (seen.has(value)) return true; + seen.add(value); + return emit(value); + }; + }; + return require_lazy.combineEagerAndLazyFunctions(uniqEager, uniqLazy); +} +//#endregion +exports.uniq = uniq; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniq.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniq.mjs new file mode 100644 index 0000000000000000000000000000000000000000..85ad046705316c01f94ce095a3554d484f9a1abe --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniq.mjs @@ -0,0 +1,36 @@ +import { uniq as uniq$1 } from "../../array/uniq.mjs"; +import { combineEagerAndLazyFunctions } from "../_internal/lazy.mjs"; +//#region src/fp/array/uniq.ts +/** +* Creates a function that removes duplicate values from an array, preserving +* the order of first occurrence. Equality follows SameValueZero, matching +* Set semantics. Use it with {@link pipe}. +* +* The returned function is lazy-capable inside {@link pipe}. It keeps a Set of +* values already emitted during each pipeline run. +* +* @template T - The type of elements in the array. +* @returns A function that maps a readonly array to a duplicate-free array. +* +* @example +* import { pipe, uniq } from 'es-toolkit/fp'; +* +* pipe([1, 2, 2, 3, 3, 3], uniq()); +* // => [1, 2, 3] +*/ +function uniq() { + function uniqEager(array) { + return uniq$1(array); + } + const uniqLazy = (emit) => { + const seen = /* @__PURE__ */ new Set(); + return (value) => { + if (seen.has(value)) return true; + seen.add(value); + return emit(value); + }; + }; + return combineEagerAndLazyFunctions(uniqEager, uniqLazy); +} +//#endregion +export { uniq }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniqBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniqBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..7c261f85bb496a2327efac005cd511abeb290b5d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniqBy.d.mts @@ -0,0 +1,21 @@ +//#region src/fp/array/uniqBy.d.ts +/** + * Creates a function that removes duplicate values by mapped identity. + * + * The first value for each mapped key is preserved. The returned function is + * lazy-capable inside {@link pipe}. + * + * @template T - The type of elements in the array. + * @template U - The type of comparison keys returned by the mapper. + * @param mapper - Called with each value and index to produce a comparison key. + * @returns A function that maps the piped array to unique values. + * + * @example + * import { pipe, uniqBy } from 'es-toolkit/fp'; + * + * pipe([{ id: 1 }, { id: 1 }, { id: 2 }], uniqBy(item => item.id)); + * // => [{ id: 1 }, { id: 2 }] + */ +declare function uniqBy(mapper: (item: T, index: number) => U): (array: readonly T[]) => T[]; +//#endregion +export { uniqBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniqBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniqBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7c261f85bb496a2327efac005cd511abeb290b5d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniqBy.d.ts @@ -0,0 +1,21 @@ +//#region src/fp/array/uniqBy.d.ts +/** + * Creates a function that removes duplicate values by mapped identity. + * + * The first value for each mapped key is preserved. The returned function is + * lazy-capable inside {@link pipe}. + * + * @template T - The type of elements in the array. + * @template U - The type of comparison keys returned by the mapper. + * @param mapper - Called with each value and index to produce a comparison key. + * @returns A function that maps the piped array to unique values. + * + * @example + * import { pipe, uniqBy } from 'es-toolkit/fp'; + * + * pipe([{ id: 1 }, { id: 1 }, { id: 2 }], uniqBy(item => item.id)); + * // => [{ id: 1 }, { id: 2 }] + */ +declare function uniqBy(mapper: (item: T, index: number) => U): (array: readonly T[]) => T[]; +//#endregion +export { uniqBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniqBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniqBy.js new file mode 100644 index 0000000000000000000000000000000000000000..174e60db4293994e8d5488325e5a01ce2c0b84f3 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniqBy.js @@ -0,0 +1,38 @@ +const require_uniqBy = require("../../array/uniqBy.js"); +const require_lazy = require("../_internal/lazy.js"); +//#region src/fp/array/uniqBy.ts +/** +* Creates a function that removes duplicate values by mapped identity. +* +* The first value for each mapped key is preserved. The returned function is +* lazy-capable inside {@link pipe}. +* +* @template T - The type of elements in the array. +* @template U - The type of comparison keys returned by the mapper. +* @param mapper - Called with each value and index to produce a comparison key. +* @returns A function that maps the piped array to unique values. +* +* @example +* import { pipe, uniqBy } from 'es-toolkit/fp'; +* +* pipe([{ id: 1 }, { id: 1 }, { id: 2 }], uniqBy(item => item.id)); +* // => [{ id: 1 }, { id: 2 }] +*/ +function uniqBy(mapper) { + function uniqByEager(array) { + return require_uniqBy.uniqBy(array, (item, index) => mapper(item, index)); + } + const uniqByLazy = (emit) => { + const seen = /* @__PURE__ */ new Set(); + let index = 0; + return (value) => { + const key = mapper(value, index++); + if (seen.has(key)) return true; + seen.add(key); + return emit(value); + }; + }; + return require_lazy.combineEagerAndLazyFunctions(uniqByEager, uniqByLazy); +} +//#endregion +exports.uniqBy = uniqBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniqBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniqBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..5f644b529d157b75edb9e4081fbbd19454fe79f3 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniqBy.mjs @@ -0,0 +1,38 @@ +import { uniqBy as uniqBy$1 } from "../../array/uniqBy.mjs"; +import { combineEagerAndLazyFunctions } from "../_internal/lazy.mjs"; +//#region src/fp/array/uniqBy.ts +/** +* Creates a function that removes duplicate values by mapped identity. +* +* The first value for each mapped key is preserved. The returned function is +* lazy-capable inside {@link pipe}. +* +* @template T - The type of elements in the array. +* @template U - The type of comparison keys returned by the mapper. +* @param mapper - Called with each value and index to produce a comparison key. +* @returns A function that maps the piped array to unique values. +* +* @example +* import { pipe, uniqBy } from 'es-toolkit/fp'; +* +* pipe([{ id: 1 }, { id: 1 }, { id: 2 }], uniqBy(item => item.id)); +* // => [{ id: 1 }, { id: 2 }] +*/ +function uniqBy(mapper) { + function uniqByEager(array) { + return uniqBy$1(array, (item, index) => mapper(item, index)); + } + const uniqByLazy = (emit) => { + const seen = /* @__PURE__ */ new Set(); + let index = 0; + return (value) => { + const key = mapper(value, index++); + if (seen.has(key)) return true; + seen.add(key); + return emit(value); + }; + }; + return combineEagerAndLazyFunctions(uniqByEager, uniqByLazy); +} +//#endregion +export { uniqBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniqWith.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniqWith.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..1aeebe6f3ccaec99d7056ca8ed5ed21454f42f98 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniqWith.d.mts @@ -0,0 +1,20 @@ +//#region src/fp/array/uniqWith.d.ts +/** + * Creates a function that removes duplicate values using a custom equality function. + * + * The first value in each equality group is preserved. The returned function is + * lazy-capable inside {@link pipe}. + * + * @template T - The type of elements in the array. + * @param areItemsEqual - Returns true when two values should be treated as equal. + * @returns A function that maps the piped array to unique values. + * + * @example + * import { pipe, uniqWith } from 'es-toolkit/fp'; + * + * pipe([{ id: 1 }, { id: 1 }, { id: 2 }], uniqWith((a, b) => a.id === b.id)); + * // => [{ id: 1 }, { id: 2 }] + */ +declare function uniqWith(areItemsEqual: (item: T, other: T) => boolean): (array: readonly T[]) => T[]; +//#endregion +export { uniqWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniqWith.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniqWith.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1aeebe6f3ccaec99d7056ca8ed5ed21454f42f98 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniqWith.d.ts @@ -0,0 +1,20 @@ +//#region src/fp/array/uniqWith.d.ts +/** + * Creates a function that removes duplicate values using a custom equality function. + * + * The first value in each equality group is preserved. The returned function is + * lazy-capable inside {@link pipe}. + * + * @template T - The type of elements in the array. + * @param areItemsEqual - Returns true when two values should be treated as equal. + * @returns A function that maps the piped array to unique values. + * + * @example + * import { pipe, uniqWith } from 'es-toolkit/fp'; + * + * pipe([{ id: 1 }, { id: 1 }, { id: 2 }], uniqWith((a, b) => a.id === b.id)); + * // => [{ id: 1 }, { id: 2 }] + */ +declare function uniqWith(areItemsEqual: (item: T, other: T) => boolean): (array: readonly T[]) => T[]; +//#endregion +export { uniqWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniqWith.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniqWith.js new file mode 100644 index 0000000000000000000000000000000000000000..138d716e4645c964c85e23ed16c21142bf6d158a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniqWith.js @@ -0,0 +1,35 @@ +const require_uniqWith = require("../../array/uniqWith.js"); +const require_lazy = require("../_internal/lazy.js"); +//#region src/fp/array/uniqWith.ts +/** +* Creates a function that removes duplicate values using a custom equality function. +* +* The first value in each equality group is preserved. The returned function is +* lazy-capable inside {@link pipe}. +* +* @template T - The type of elements in the array. +* @param areItemsEqual - Returns true when two values should be treated as equal. +* @returns A function that maps the piped array to unique values. +* +* @example +* import { pipe, uniqWith } from 'es-toolkit/fp'; +* +* pipe([{ id: 1 }, { id: 1 }, { id: 2 }], uniqWith((a, b) => a.id === b.id)); +* // => [{ id: 1 }, { id: 2 }] +*/ +function uniqWith(areItemsEqual) { + function uniqWithEager(array) { + return require_uniqWith.uniqWith(array, areItemsEqual); + } + const uniqWithLazy = (emit) => { + const seen = []; + return (value) => { + if (seen.some((item) => areItemsEqual(item, value))) return true; + seen.push(value); + return emit(value); + }; + }; + return require_lazy.combineEagerAndLazyFunctions(uniqWithEager, uniqWithLazy); +} +//#endregion +exports.uniqWith = uniqWith; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniqWith.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniqWith.mjs new file mode 100644 index 0000000000000000000000000000000000000000..3056758c3d8038cfb2e83ceb619b1910fb7f9e40 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/uniqWith.mjs @@ -0,0 +1,35 @@ +import { uniqWith as uniqWith$1 } from "../../array/uniqWith.mjs"; +import { combineEagerAndLazyFunctions } from "../_internal/lazy.mjs"; +//#region src/fp/array/uniqWith.ts +/** +* Creates a function that removes duplicate values using a custom equality function. +* +* The first value in each equality group is preserved. The returned function is +* lazy-capable inside {@link pipe}. +* +* @template T - The type of elements in the array. +* @param areItemsEqual - Returns true when two values should be treated as equal. +* @returns A function that maps the piped array to unique values. +* +* @example +* import { pipe, uniqWith } from 'es-toolkit/fp'; +* +* pipe([{ id: 1 }, { id: 1 }, { id: 2 }], uniqWith((a, b) => a.id === b.id)); +* // => [{ id: 1 }, { id: 2 }] +*/ +function uniqWith(areItemsEqual) { + function uniqWithEager(array) { + return uniqWith$1(array, areItemsEqual); + } + const uniqWithLazy = (emit) => { + const seen = []; + return (value) => { + if (seen.some((item) => areItemsEqual(item, value))) return true; + seen.push(value); + return emit(value); + }; + }; + return combineEagerAndLazyFunctions(uniqWithEager, uniqWithLazy); +} +//#endregion +export { uniqWith }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unzip.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unzip.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..bfa7ad7e24f50459a1de0c722e9434f465a2d63d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unzip.d.mts @@ -0,0 +1,23 @@ +//#region src/fp/array/unzip.d.ts +type Unzip = { [I in keyof K]: Array }; +/** + * Creates a function that unzips grouped tuples into arrays by position. + * + * The returned function is the data-last form of the main {@link unzip} utility. + * Use it with {@link pipe}. + * + * When the returned function is invoked, the result's length matches the longest nested array. + * Missing positions in shorter arrays are filled with `undefined`. + * + * @template T - The tuple type inside the zipped array. + * @returns A function that maps zipped tuples to arrays grouped by tuple position. + * + * @example + * import { pipe, unzip } from 'es-toolkit/fp'; + * + * pipe([[1, 'a'], [2, 'b']] as Array<[number, string]>, unzip()); + * // => [[1, 2], ['a', 'b']] + */ +declare function unzip(): (zipped: ReadonlyArray<[...T]>) => Unzip; +//#endregion +export { unzip }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unzip.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unzip.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..bfa7ad7e24f50459a1de0c722e9434f465a2d63d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unzip.d.ts @@ -0,0 +1,23 @@ +//#region src/fp/array/unzip.d.ts +type Unzip = { [I in keyof K]: Array }; +/** + * Creates a function that unzips grouped tuples into arrays by position. + * + * The returned function is the data-last form of the main {@link unzip} utility. + * Use it with {@link pipe}. + * + * When the returned function is invoked, the result's length matches the longest nested array. + * Missing positions in shorter arrays are filled with `undefined`. + * + * @template T - The tuple type inside the zipped array. + * @returns A function that maps zipped tuples to arrays grouped by tuple position. + * + * @example + * import { pipe, unzip } from 'es-toolkit/fp'; + * + * pipe([[1, 'a'], [2, 'b']] as Array<[number, string]>, unzip()); + * // => [[1, 2], ['a', 'b']] + */ +declare function unzip(): (zipped: ReadonlyArray<[...T]>) => Unzip; +//#endregion +export { unzip }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unzip.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unzip.js new file mode 100644 index 0000000000000000000000000000000000000000..784a088afdc1824400a4a748e215f2bc36c3c43e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unzip.js @@ -0,0 +1,27 @@ +const require_unzip = require("../../array/unzip.js"); +//#region src/fp/array/unzip.ts +/** +* Creates a function that unzips grouped tuples into arrays by position. +* +* The returned function is the data-last form of the main {@link unzip} utility. +* Use it with {@link pipe}. +* +* When the returned function is invoked, the result's length matches the longest nested array. +* Missing positions in shorter arrays are filled with `undefined`. +* +* @template T - The tuple type inside the zipped array. +* @returns A function that maps zipped tuples to arrays grouped by tuple position. +* +* @example +* import { pipe, unzip } from 'es-toolkit/fp'; +* +* pipe([[1, 'a'], [2, 'b']] as Array<[number, string]>, unzip()); +* // => [[1, 2], ['a', 'b']] +*/ +function unzip() { + return function(zipped) { + return require_unzip.unzip(zipped); + }; +} +//#endregion +exports.unzip = unzip; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unzip.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unzip.mjs new file mode 100644 index 0000000000000000000000000000000000000000..9a0a885e1e0f080860b1b126774d0e53524b0e57 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unzip.mjs @@ -0,0 +1,27 @@ +import { unzip as unzip$1 } from "../../array/unzip.mjs"; +//#region src/fp/array/unzip.ts +/** +* Creates a function that unzips grouped tuples into arrays by position. +* +* The returned function is the data-last form of the main {@link unzip} utility. +* Use it with {@link pipe}. +* +* When the returned function is invoked, the result's length matches the longest nested array. +* Missing positions in shorter arrays are filled with `undefined`. +* +* @template T - The tuple type inside the zipped array. +* @returns A function that maps zipped tuples to arrays grouped by tuple position. +* +* @example +* import { pipe, unzip } from 'es-toolkit/fp'; +* +* pipe([[1, 'a'], [2, 'b']] as Array<[number, string]>, unzip()); +* // => [[1, 2], ['a', 'b']] +*/ +function unzip() { + return function(zipped) { + return unzip$1(zipped); + }; +} +//#endregion +export { unzip }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unzipWith.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unzipWith.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..14c7878b2a0c3d70ef4a7e20963ece24154d4bcd --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unzipWith.d.mts @@ -0,0 +1,21 @@ +//#region src/fp/array/unzipWith.d.ts +/** + * Creates a function that unzips grouped arrays and combines values by position. + * + * Values at the same position are passed to iteratee, and its return values form the + * resulting array. + * + * @template T - The element type inside each grouped array. + * @template R - The value returned by the iteratee. + * @param iteratee - Called with the values at each position. + * @returns A function that maps grouped arrays to combined values. + * + * @example + * import { pipe, unzipWith } from 'es-toolkit/fp'; + * + * pipe([[1, 10], [2, 20]], unzipWith((a, b) => a + b)); + * // => [3, 30] + */ +declare function unzipWith(iteratee: (...args: T[]) => R): (target: readonly T[][]) => R[]; +//#endregion +export { unzipWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unzipWith.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unzipWith.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..14c7878b2a0c3d70ef4a7e20963ece24154d4bcd --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unzipWith.d.ts @@ -0,0 +1,21 @@ +//#region src/fp/array/unzipWith.d.ts +/** + * Creates a function that unzips grouped arrays and combines values by position. + * + * Values at the same position are passed to iteratee, and its return values form the + * resulting array. + * + * @template T - The element type inside each grouped array. + * @template R - The value returned by the iteratee. + * @param iteratee - Called with the values at each position. + * @returns A function that maps grouped arrays to combined values. + * + * @example + * import { pipe, unzipWith } from 'es-toolkit/fp'; + * + * pipe([[1, 10], [2, 20]], unzipWith((a, b) => a + b)); + * // => [3, 30] + */ +declare function unzipWith(iteratee: (...args: T[]) => R): (target: readonly T[][]) => R[]; +//#endregion +export { unzipWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unzipWith.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unzipWith.js new file mode 100644 index 0000000000000000000000000000000000000000..9711fde66aa73713670f1a4ca8dc22caac289748 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unzipWith.js @@ -0,0 +1,26 @@ +const require_unzipWith = require("../../array/unzipWith.js"); +//#region src/fp/array/unzipWith.ts +/** +* Creates a function that unzips grouped arrays and combines values by position. +* +* Values at the same position are passed to iteratee, and its return values form the +* resulting array. +* +* @template T - The element type inside each grouped array. +* @template R - The value returned by the iteratee. +* @param iteratee - Called with the values at each position. +* @returns A function that maps grouped arrays to combined values. +* +* @example +* import { pipe, unzipWith } from 'es-toolkit/fp'; +* +* pipe([[1, 10], [2, 20]], unzipWith((a, b) => a + b)); +* // => [3, 30] +*/ +function unzipWith(iteratee) { + return function(target) { + return require_unzipWith.unzipWith(target, iteratee); + }; +} +//#endregion +exports.unzipWith = unzipWith; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unzipWith.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unzipWith.mjs new file mode 100644 index 0000000000000000000000000000000000000000..bc15d3c0929214414309beeb5a3b81734f04b7f2 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/unzipWith.mjs @@ -0,0 +1,26 @@ +import { unzipWith as unzipWith$1 } from "../../array/unzipWith.mjs"; +//#region src/fp/array/unzipWith.ts +/** +* Creates a function that unzips grouped arrays and combines values by position. +* +* Values at the same position are passed to iteratee, and its return values form the +* resulting array. +* +* @template T - The element type inside each grouped array. +* @template R - The value returned by the iteratee. +* @param iteratee - Called with the values at each position. +* @returns A function that maps grouped arrays to combined values. +* +* @example +* import { pipe, unzipWith } from 'es-toolkit/fp'; +* +* pipe([[1, 10], [2, 20]], unzipWith((a, b) => a + b)); +* // => [3, 30] +*/ +function unzipWith(iteratee) { + return function(target) { + return unzipWith$1(target, iteratee); + }; +} +//#endregion +export { unzipWith }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/windowed.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/windowed.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..927d140129c5a2a3b49a741879b86bc68b2c30b3 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/windowed.d.mts @@ -0,0 +1,25 @@ +import { WindowedOptions } from "../../array/windowed.mjs"; + +//#region src/fp/array/windowed.d.ts +/** + * Creates a function that returns sliding windows from an array. + * + * By default only full windows are returned. Pass partialWindows: true to include shorter + * trailing windows. The full-window form is lazy-capable inside {@link pipe}. + * + * @template T - The type of elements in the array. + * @param size - The size of each window. Must be a positive integer. + * @param step - The step between window starts. Defaults to 1. + * @param options - Window options. + * @returns A function that maps a readonly array to sliding windows. + * @throws {Error} When size or step is not a positive integer. + * + * @example + * import { pipe, windowed } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 4], windowed(2)); + * // => [[1, 2], [2, 3], [3, 4]] + */ +declare function windowed(size: number, step?: number, options?: WindowedOptions): (array: readonly T[]) => T[][]; +//#endregion +export { windowed }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/windowed.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/windowed.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d835f3b6d67ed8e1c5b1c2b5c4411ea89fbfcb97 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/windowed.d.ts @@ -0,0 +1,25 @@ +import { WindowedOptions } from "../../array/windowed.js"; + +//#region src/fp/array/windowed.d.ts +/** + * Creates a function that returns sliding windows from an array. + * + * By default only full windows are returned. Pass partialWindows: true to include shorter + * trailing windows. The full-window form is lazy-capable inside {@link pipe}. + * + * @template T - The type of elements in the array. + * @param size - The size of each window. Must be a positive integer. + * @param step - The step between window starts. Defaults to 1. + * @param options - Window options. + * @returns A function that maps a readonly array to sliding windows. + * @throws {Error} When size or step is not a positive integer. + * + * @example + * import { pipe, windowed } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 4], windowed(2)); + * // => [[1, 2], [2, 3], [3, 4]] + */ +declare function windowed(size: number, step?: number, options?: WindowedOptions): (array: readonly T[]) => T[][]; +//#endregion +export { windowed }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/windowed.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/windowed.js new file mode 100644 index 0000000000000000000000000000000000000000..5087f10cc4df3c187847b564f911aff257bb1e55 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/windowed.js @@ -0,0 +1,50 @@ +const require_windowed = require("../../array/windowed.js"); +const require_lazy = require("../_internal/lazy.js"); +//#region src/fp/array/windowed.ts +/** +* Creates a function that returns sliding windows from an array. +* +* By default only full windows are returned. Pass partialWindows: true to include shorter +* trailing windows. The full-window form is lazy-capable inside {@link pipe}. +* +* @template T - The type of elements in the array. +* @param size - The size of each window. Must be a positive integer. +* @param step - The step between window starts. Defaults to 1. +* @param options - Window options. +* @returns A function that maps a readonly array to sliding windows. +* @throws {Error} When size or step is not a positive integer. +* +* @example +* import { pipe, windowed } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3, 4], windowed(2)); +* // => [[1, 2], [2, 3], [3, 4]] +*/ +function windowed(size, step, options) { + const resolvedStep = step ?? 1; + const partialWindows = options?.partialWindows ?? false; + function windowedEager(array) { + return require_windowed.windowed(array, size, step, options); + } + if (partialWindows || !Number.isInteger(size) || size <= 0 || !Number.isInteger(resolvedStep) || resolvedStep <= 0) return windowedEager; + const windowedLazy = (emit) => { + const buffer = []; + let index = 0; + return (value) => { + buffer.push(value); + if (buffer.length > size) buffer.shift(); + if (buffer.length === size) { + if ((index - size + 1) % resolvedStep === 0) { + const shouldContinue = emit(buffer.slice()); + index++; + return shouldContinue; + } + } + index++; + return true; + }; + }; + return require_lazy.combineEagerAndLazyFunctions(windowedEager, windowedLazy); +} +//#endregion +exports.windowed = windowed; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/windowed.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/windowed.mjs new file mode 100644 index 0000000000000000000000000000000000000000..13bc9ee82f70d657f488eece812ffeb29daae751 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/windowed.mjs @@ -0,0 +1,50 @@ +import { windowed as windowed$1 } from "../../array/windowed.mjs"; +import { combineEagerAndLazyFunctions } from "../_internal/lazy.mjs"; +//#region src/fp/array/windowed.ts +/** +* Creates a function that returns sliding windows from an array. +* +* By default only full windows are returned. Pass partialWindows: true to include shorter +* trailing windows. The full-window form is lazy-capable inside {@link pipe}. +* +* @template T - The type of elements in the array. +* @param size - The size of each window. Must be a positive integer. +* @param step - The step between window starts. Defaults to 1. +* @param options - Window options. +* @returns A function that maps a readonly array to sliding windows. +* @throws {Error} When size or step is not a positive integer. +* +* @example +* import { pipe, windowed } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3, 4], windowed(2)); +* // => [[1, 2], [2, 3], [3, 4]] +*/ +function windowed(size, step, options) { + const resolvedStep = step ?? 1; + const partialWindows = options?.partialWindows ?? false; + function windowedEager(array) { + return windowed$1(array, size, step, options); + } + if (partialWindows || !Number.isInteger(size) || size <= 0 || !Number.isInteger(resolvedStep) || resolvedStep <= 0) return windowedEager; + const windowedLazy = (emit) => { + const buffer = []; + let index = 0; + return (value) => { + buffer.push(value); + if (buffer.length > size) buffer.shift(); + if (buffer.length === size) { + if ((index - size + 1) % resolvedStep === 0) { + const shouldContinue = emit(buffer.slice()); + index++; + return shouldContinue; + } + } + index++; + return true; + }; + }; + return combineEagerAndLazyFunctions(windowedEager, windowedLazy); +} +//#endregion +export { windowed }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/without.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/without.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..d27dcc53823fa7edf97897e6b45e6850aa7d4522 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/without.d.mts @@ -0,0 +1,19 @@ +//#region src/fp/array/without.d.ts +/** + * Creates a function that removes the configured values from an array. + * + * The returned function is lazy-capable inside {@link pipe}. + * + * @template T - The type of elements in the array. + * @param values - Values to remove from the piped array. + * @returns A function that maps the piped array to the remaining values. + * + * @example + * import { pipe, without } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 2], without(2)); + * // => [1, 3] + */ +declare function without(...values: T[]): (array: readonly T[]) => T[]; +//#endregion +export { without }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/without.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/without.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d27dcc53823fa7edf97897e6b45e6850aa7d4522 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/without.d.ts @@ -0,0 +1,19 @@ +//#region src/fp/array/without.d.ts +/** + * Creates a function that removes the configured values from an array. + * + * The returned function is lazy-capable inside {@link pipe}. + * + * @template T - The type of elements in the array. + * @param values - Values to remove from the piped array. + * @returns A function that maps the piped array to the remaining values. + * + * @example + * import { pipe, without } from 'es-toolkit/fp'; + * + * pipe([1, 2, 3, 2], without(2)); + * // => [1, 3] + */ +declare function without(...values: T[]): (array: readonly T[]) => T[]; +//#endregion +export { without }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/without.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/without.js new file mode 100644 index 0000000000000000000000000000000000000000..244d6cf4b70b32238bf4a3adbe367ad468678038 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/without.js @@ -0,0 +1,30 @@ +const require_without = require("../../array/without.js"); +const require_lazy = require("../_internal/lazy.js"); +//#region src/fp/array/without.ts +/** +* Creates a function that removes the configured values from an array. +* +* The returned function is lazy-capable inside {@link pipe}. +* +* @template T - The type of elements in the array. +* @param values - Values to remove from the piped array. +* @returns A function that maps the piped array to the remaining values. +* +* @example +* import { pipe, without } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3, 2], without(2)); +* // => [1, 3] +*/ +function without(...values) { + const valueSet = new Set(values); + function withoutEager(array) { + return require_without.without(array, ...values); + } + const withoutLazy = require_lazy.createLazyFunction((value, _index, emit) => { + if (!valueSet.has(value)) emit(value); + }); + return require_lazy.combineEagerAndLazyFunctions(withoutEager, withoutLazy); +} +//#endregion +exports.without = without; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/without.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/without.mjs new file mode 100644 index 0000000000000000000000000000000000000000..de4af4c73ae4734d0dc406495b61799a56291f6b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/without.mjs @@ -0,0 +1,29 @@ +import { without as without$1 } from "../../array/without.mjs"; +import { combineEagerAndLazyFunctions, createLazyFunction } from "../_internal/lazy.mjs"; +//#region src/fp/array/without.ts +/** +* Creates a function that removes the configured values from an array. +* +* The returned function is lazy-capable inside {@link pipe}. +* +* @template T - The type of elements in the array. +* @param values - Values to remove from the piped array. +* @returns A function that maps the piped array to the remaining values. +* +* @example +* import { pipe, without } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3, 2], without(2)); +* // => [1, 3] +*/ +function without(...values) { + const valueSet = new Set(values); + function withoutEager(array) { + return without$1(array, ...values); + } + return combineEagerAndLazyFunctions(withoutEager, createLazyFunction((value, _index, emit) => { + if (!valueSet.has(value)) emit(value); + })); +} +//#endregion +export { without }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xor.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xor.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..12d7dc7704453a6edb15595856c22a67ebce33a3 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xor.d.mts @@ -0,0 +1,20 @@ +//#region src/fp/array/xor.d.ts +/** + * Creates a function that returns the symmetric difference with secondArray. + * + * The result contains values that appear in exactly one of the arrays, matching the main + * {@link xor} behavior. + * + * @template T - The type of elements in the arrays. + * @param secondArray - Values to compare with the piped array. + * @returns A function that maps a readonly array to its symmetric difference. + * + * @example + * import { pipe, xor } from 'es-toolkit/fp'; + * + * pipe([1, 2], xor([2, 3])); + * // => [1, 3] + */ +declare function xor(secondArray: readonly T[]): (array: readonly T[]) => T[]; +//#endregion +export { xor }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xor.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xor.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..12d7dc7704453a6edb15595856c22a67ebce33a3 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xor.d.ts @@ -0,0 +1,20 @@ +//#region src/fp/array/xor.d.ts +/** + * Creates a function that returns the symmetric difference with secondArray. + * + * The result contains values that appear in exactly one of the arrays, matching the main + * {@link xor} behavior. + * + * @template T - The type of elements in the arrays. + * @param secondArray - Values to compare with the piped array. + * @returns A function that maps a readonly array to its symmetric difference. + * + * @example + * import { pipe, xor } from 'es-toolkit/fp'; + * + * pipe([1, 2], xor([2, 3])); + * // => [1, 3] + */ +declare function xor(secondArray: readonly T[]): (array: readonly T[]) => T[]; +//#endregion +export { xor }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xor.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xor.js new file mode 100644 index 0000000000000000000000000000000000000000..8ee37bb4d2cee962c607d57682bdcd047aa0cfa3 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xor.js @@ -0,0 +1,25 @@ +const require_xor = require("../../array/xor.js"); +//#region src/fp/array/xor.ts +/** +* Creates a function that returns the symmetric difference with secondArray. +* +* The result contains values that appear in exactly one of the arrays, matching the main +* {@link xor} behavior. +* +* @template T - The type of elements in the arrays. +* @param secondArray - Values to compare with the piped array. +* @returns A function that maps a readonly array to its symmetric difference. +* +* @example +* import { pipe, xor } from 'es-toolkit/fp'; +* +* pipe([1, 2], xor([2, 3])); +* // => [1, 3] +*/ +function xor(secondArray) { + return function(array) { + return require_xor.xor(array, secondArray); + }; +} +//#endregion +exports.xor = xor; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xor.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xor.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b0466b3b3608bc08ebb3f4c1f332599dde364d82 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xor.mjs @@ -0,0 +1,25 @@ +import { xor as xor$1 } from "../../array/xor.mjs"; +//#region src/fp/array/xor.ts +/** +* Creates a function that returns the symmetric difference with secondArray. +* +* The result contains values that appear in exactly one of the arrays, matching the main +* {@link xor} behavior. +* +* @template T - The type of elements in the arrays. +* @param secondArray - Values to compare with the piped array. +* @returns A function that maps a readonly array to its symmetric difference. +* +* @example +* import { pipe, xor } from 'es-toolkit/fp'; +* +* pipe([1, 2], xor([2, 3])); +* // => [1, 3] +*/ +function xor(secondArray) { + return function(array) { + return xor$1(array, secondArray); + }; +} +//#endregion +export { xor }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xorBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xorBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..25e9c981f6d5706f3815aa91f1e1bb772e5c55e9 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xorBy.d.mts @@ -0,0 +1,22 @@ +//#region src/fp/array/xorBy.d.ts +/** + * Creates a function that returns the symmetric difference by mapped identity. + * + * The mapper is used to decide which values appear in exactly one array, matching the main + * {@link xorBy} behavior. + * + * @template T - The type of elements in the arrays. + * @template U - The type of comparison keys returned by the mapper. + * @param secondArray - Values to compare with the piped array. + * @param mapper - Called for values from both arrays to produce comparison keys. + * @returns A function that maps a readonly array to its symmetric difference. + * + * @example + * import { pipe, xorBy } from 'es-toolkit/fp'; + * + * pipe([{ id: 1 }, { id: 2 }], xorBy([{ id: 2 }, { id: 3 }], item => item.id)); + * // => [{ id: 1 }, { id: 3 }] + */ +declare function xorBy(secondArray: readonly T[], mapper: (item: T) => U): (array: readonly T[]) => T[]; +//#endregion +export { xorBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xorBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xorBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..25e9c981f6d5706f3815aa91f1e1bb772e5c55e9 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xorBy.d.ts @@ -0,0 +1,22 @@ +//#region src/fp/array/xorBy.d.ts +/** + * Creates a function that returns the symmetric difference by mapped identity. + * + * The mapper is used to decide which values appear in exactly one array, matching the main + * {@link xorBy} behavior. + * + * @template T - The type of elements in the arrays. + * @template U - The type of comparison keys returned by the mapper. + * @param secondArray - Values to compare with the piped array. + * @param mapper - Called for values from both arrays to produce comparison keys. + * @returns A function that maps a readonly array to its symmetric difference. + * + * @example + * import { pipe, xorBy } from 'es-toolkit/fp'; + * + * pipe([{ id: 1 }, { id: 2 }], xorBy([{ id: 2 }, { id: 3 }], item => item.id)); + * // => [{ id: 1 }, { id: 3 }] + */ +declare function xorBy(secondArray: readonly T[], mapper: (item: T) => U): (array: readonly T[]) => T[]; +//#endregion +export { xorBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xorBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xorBy.js new file mode 100644 index 0000000000000000000000000000000000000000..08462a2a01c308301707ecb07bfe1304a3ab3010 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xorBy.js @@ -0,0 +1,27 @@ +const require_xorBy = require("../../array/xorBy.js"); +//#region src/fp/array/xorBy.ts +/** +* Creates a function that returns the symmetric difference by mapped identity. +* +* The mapper is used to decide which values appear in exactly one array, matching the main +* {@link xorBy} behavior. +* +* @template T - The type of elements in the arrays. +* @template U - The type of comparison keys returned by the mapper. +* @param secondArray - Values to compare with the piped array. +* @param mapper - Called for values from both arrays to produce comparison keys. +* @returns A function that maps a readonly array to its symmetric difference. +* +* @example +* import { pipe, xorBy } from 'es-toolkit/fp'; +* +* pipe([{ id: 1 }, { id: 2 }], xorBy([{ id: 2 }, { id: 3 }], item => item.id)); +* // => [{ id: 1 }, { id: 3 }] +*/ +function xorBy(secondArray, mapper) { + return function(array) { + return require_xorBy.xorBy(array, secondArray, mapper); + }; +} +//#endregion +exports.xorBy = xorBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xorBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xorBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..fcbcf81ce680ce69f9778721633328784be36781 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xorBy.mjs @@ -0,0 +1,27 @@ +import { xorBy as xorBy$1 } from "../../array/xorBy.mjs"; +//#region src/fp/array/xorBy.ts +/** +* Creates a function that returns the symmetric difference by mapped identity. +* +* The mapper is used to decide which values appear in exactly one array, matching the main +* {@link xorBy} behavior. +* +* @template T - The type of elements in the arrays. +* @template U - The type of comparison keys returned by the mapper. +* @param secondArray - Values to compare with the piped array. +* @param mapper - Called for values from both arrays to produce comparison keys. +* @returns A function that maps a readonly array to its symmetric difference. +* +* @example +* import { pipe, xorBy } from 'es-toolkit/fp'; +* +* pipe([{ id: 1 }, { id: 2 }], xorBy([{ id: 2 }, { id: 3 }], item => item.id)); +* // => [{ id: 1 }, { id: 3 }] +*/ +function xorBy(secondArray, mapper) { + return function(array) { + return xorBy$1(array, secondArray, mapper); + }; +} +//#endregion +export { xorBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xorWith.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xorWith.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..2bbfe5c47d1d008b38f1992e1075bbb55e4cedee --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xorWith.d.mts @@ -0,0 +1,21 @@ +//#region src/fp/array/xorWith.d.ts +/** + * Creates a function that returns the symmetric difference using a custom equality function. + * + * The equality function decides whether two values represent the same item, matching the + * main {@link xorWith} behavior. + * + * @template T - The type of elements in the arrays. + * @param secondArray - Values to compare with the piped array. + * @param areItemsEqual - Returns true when two values are equal. + * @returns A function that maps a readonly array to its symmetric difference. + * + * @example + * import { pipe, xorWith } from 'es-toolkit/fp'; + * + * pipe([{ id: 1 }, { id: 2 }], xorWith([{ id: 2 }, { id: 3 }], (a, b) => a.id === b.id)); + * // => [{ id: 1 }, { id: 3 }] + */ +declare function xorWith(secondArray: readonly T[], areItemsEqual: (item: T, other: T) => boolean): (array: readonly T[]) => T[]; +//#endregion +export { xorWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xorWith.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xorWith.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..2bbfe5c47d1d008b38f1992e1075bbb55e4cedee --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xorWith.d.ts @@ -0,0 +1,21 @@ +//#region src/fp/array/xorWith.d.ts +/** + * Creates a function that returns the symmetric difference using a custom equality function. + * + * The equality function decides whether two values represent the same item, matching the + * main {@link xorWith} behavior. + * + * @template T - The type of elements in the arrays. + * @param secondArray - Values to compare with the piped array. + * @param areItemsEqual - Returns true when two values are equal. + * @returns A function that maps a readonly array to its symmetric difference. + * + * @example + * import { pipe, xorWith } from 'es-toolkit/fp'; + * + * pipe([{ id: 1 }, { id: 2 }], xorWith([{ id: 2 }, { id: 3 }], (a, b) => a.id === b.id)); + * // => [{ id: 1 }, { id: 3 }] + */ +declare function xorWith(secondArray: readonly T[], areItemsEqual: (item: T, other: T) => boolean): (array: readonly T[]) => T[]; +//#endregion +export { xorWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xorWith.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xorWith.js new file mode 100644 index 0000000000000000000000000000000000000000..6a22c57e4bfadf7c5ad452854a7a4b83e864cf90 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xorWith.js @@ -0,0 +1,26 @@ +const require_xorWith = require("../../array/xorWith.js"); +//#region src/fp/array/xorWith.ts +/** +* Creates a function that returns the symmetric difference using a custom equality function. +* +* The equality function decides whether two values represent the same item, matching the +* main {@link xorWith} behavior. +* +* @template T - The type of elements in the arrays. +* @param secondArray - Values to compare with the piped array. +* @param areItemsEqual - Returns true when two values are equal. +* @returns A function that maps a readonly array to its symmetric difference. +* +* @example +* import { pipe, xorWith } from 'es-toolkit/fp'; +* +* pipe([{ id: 1 }, { id: 2 }], xorWith([{ id: 2 }, { id: 3 }], (a, b) => a.id === b.id)); +* // => [{ id: 1 }, { id: 3 }] +*/ +function xorWith(secondArray, areItemsEqual) { + return function(array) { + return require_xorWith.xorWith(array, secondArray, areItemsEqual); + }; +} +//#endregion +exports.xorWith = xorWith; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xorWith.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xorWith.mjs new file mode 100644 index 0000000000000000000000000000000000000000..725b654709913675c4f85de8325acc667208354a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/xorWith.mjs @@ -0,0 +1,26 @@ +import { xorWith as xorWith$1 } from "../../array/xorWith.mjs"; +//#region src/fp/array/xorWith.ts +/** +* Creates a function that returns the symmetric difference using a custom equality function. +* +* The equality function decides whether two values represent the same item, matching the +* main {@link xorWith} behavior. +* +* @template T - The type of elements in the arrays. +* @param secondArray - Values to compare with the piped array. +* @param areItemsEqual - Returns true when two values are equal. +* @returns A function that maps a readonly array to its symmetric difference. +* +* @example +* import { pipe, xorWith } from 'es-toolkit/fp'; +* +* pipe([{ id: 1 }, { id: 2 }], xorWith([{ id: 2 }, { id: 3 }], (a, b) => a.id === b.id)); +* // => [{ id: 1 }, { id: 3 }] +*/ +function xorWith(secondArray, areItemsEqual) { + return function(array) { + return xorWith$1(array, secondArray, areItemsEqual); + }; +} +//#endregion +export { xorWith }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zip.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zip.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..0a745d861320dba05d2f55fbeeab35c10cd9d963 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zip.d.mts @@ -0,0 +1,61 @@ +//#region src/fp/array/zip.d.ts +/** + * Creates a function that wraps each element of the piped array in a one-item tuple. + * + * @template T - The type of elements in the piped array. + * @returns A function that maps the piped array to one-item tuples. + * + * @example + * import { pipe, zip } from 'es-toolkit/fp'; + * + * pipe([1, 2], zip()); + * // => [[1], [2]] + */ +declare function zip(): (array: readonly T[]) => Array<[T]>; +/** + * Creates a function that zips the piped array with one configured array. + * + * @template T - The type of elements in the piped array. + * @template U - The type of elements in the configured array. + * @param arr2 - The second array to zip. + * @returns A function that maps the piped array to two-item tuples. + * + * @example + * pipe([1, 2], zip(['a', 'b'])); + * // => [[1, 'a'], [2, 'b']] + */ +declare function zip(arr2: readonly U[]): (array: readonly T[]) => Array<[T, U]>; +/** + * Creates a function that zips the piped array with two configured arrays. + * + * @template T - The type of elements in the piped array. + * @template U - The type of elements in the second array. + * @template V - The type of elements in the third array. + * @param arr2 - The second array to zip. + * @param arr3 - The third array to zip. + * @returns A function that maps the piped array to three-item tuples. + */ +declare function zip(arr2: readonly U[], arr3: readonly V[]): (array: readonly T[]) => Array<[T, U, V]>; +/** + * Creates a function that zips the piped array with three configured arrays. + * + * @template T - The type of elements in the piped array. + * @template U - The type of elements in the second array. + * @template V - The type of elements in the third array. + * @template W - The type of elements in the fourth array. + * @param arr2 - The second array to zip. + * @param arr3 - The third array to zip. + * @param arr4 - The fourth array to zip. + * @returns A function that maps the piped array to four-item tuples. + */ +declare function zip(arr2: readonly U[], arr3: readonly V[], arr4: readonly W[]): (array: readonly T[]) => Array<[T, U, V, W]>; +/** + * Creates a function that zips the piped array with any number of configured arrays. + * + * @template T - The shared element type of the arrays. + * @param arrs - Additional arrays to zip. + * @returns A function that maps the piped array to grouped rows. + */ +declare function zip(...arrs: Array): (array: readonly T[]) => T[][]; +//#endregion +export { zip }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zip.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zip.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0a745d861320dba05d2f55fbeeab35c10cd9d963 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zip.d.ts @@ -0,0 +1,61 @@ +//#region src/fp/array/zip.d.ts +/** + * Creates a function that wraps each element of the piped array in a one-item tuple. + * + * @template T - The type of elements in the piped array. + * @returns A function that maps the piped array to one-item tuples. + * + * @example + * import { pipe, zip } from 'es-toolkit/fp'; + * + * pipe([1, 2], zip()); + * // => [[1], [2]] + */ +declare function zip(): (array: readonly T[]) => Array<[T]>; +/** + * Creates a function that zips the piped array with one configured array. + * + * @template T - The type of elements in the piped array. + * @template U - The type of elements in the configured array. + * @param arr2 - The second array to zip. + * @returns A function that maps the piped array to two-item tuples. + * + * @example + * pipe([1, 2], zip(['a', 'b'])); + * // => [[1, 'a'], [2, 'b']] + */ +declare function zip(arr2: readonly U[]): (array: readonly T[]) => Array<[T, U]>; +/** + * Creates a function that zips the piped array with two configured arrays. + * + * @template T - The type of elements in the piped array. + * @template U - The type of elements in the second array. + * @template V - The type of elements in the third array. + * @param arr2 - The second array to zip. + * @param arr3 - The third array to zip. + * @returns A function that maps the piped array to three-item tuples. + */ +declare function zip(arr2: readonly U[], arr3: readonly V[]): (array: readonly T[]) => Array<[T, U, V]>; +/** + * Creates a function that zips the piped array with three configured arrays. + * + * @template T - The type of elements in the piped array. + * @template U - The type of elements in the second array. + * @template V - The type of elements in the third array. + * @template W - The type of elements in the fourth array. + * @param arr2 - The second array to zip. + * @param arr3 - The third array to zip. + * @param arr4 - The fourth array to zip. + * @returns A function that maps the piped array to four-item tuples. + */ +declare function zip(arr2: readonly U[], arr3: readonly V[], arr4: readonly W[]): (array: readonly T[]) => Array<[T, U, V, W]>; +/** + * Creates a function that zips the piped array with any number of configured arrays. + * + * @template T - The shared element type of the arrays. + * @param arrs - Additional arrays to zip. + * @returns A function that maps the piped array to grouped rows. + */ +declare function zip(...arrs: Array): (array: readonly T[]) => T[][]; +//#endregion +export { zip }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zip.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zip.js new file mode 100644 index 0000000000000000000000000000000000000000..423c7cdde693111cf1d3973bb370598829fe6059 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zip.js @@ -0,0 +1,9 @@ +const require_zip = require("../../array/zip.js"); +//#region src/fp/array/zip.ts +function zip(...arrs) { + return function(array) { + return require_zip.zip(array, ...arrs); + }; +} +//#endregion +exports.zip = zip; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zip.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zip.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d6b801d15a005eebabed767ab24e15db368fd353 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zip.mjs @@ -0,0 +1,9 @@ +import { zip as zip$1 } from "../../array/zip.mjs"; +//#region src/fp/array/zip.ts +function zip(...arrs) { + return function(array) { + return zip$1(array, ...arrs); + }; +} +//#endregion +export { zip }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zipObject.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zipObject.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..97dd334e37e1f9dc5441dc118e8007a0ae708a13 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zipObject.d.mts @@ -0,0 +1,21 @@ +//#region src/fp/array/zipObject.d.ts +/** + * Creates a function that builds an object from the piped keys and configured values. + * + * Keys are read from the piped array and paired with values by index, matching the main + * {@link zipObject} behavior. + * + * @template P - The property-key type from the piped keys. + * @template V - The type of configured values. + * @param values - Values assigned to the piped keys by index. + * @returns A function that maps keys to an object. + * + * @example + * import { pipe, zipObject } from 'es-toolkit/fp'; + * + * pipe(['a', 'b'] as const, zipObject([1, 2])); + * // => { a: 1, b: 2 } + */ +declare function zipObject

(values: readonly V[]): (keys: readonly P[]) => Record; +//#endregion +export { zipObject }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zipObject.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zipObject.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..97dd334e37e1f9dc5441dc118e8007a0ae708a13 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zipObject.d.ts @@ -0,0 +1,21 @@ +//#region src/fp/array/zipObject.d.ts +/** + * Creates a function that builds an object from the piped keys and configured values. + * + * Keys are read from the piped array and paired with values by index, matching the main + * {@link zipObject} behavior. + * + * @template P - The property-key type from the piped keys. + * @template V - The type of configured values. + * @param values - Values assigned to the piped keys by index. + * @returns A function that maps keys to an object. + * + * @example + * import { pipe, zipObject } from 'es-toolkit/fp'; + * + * pipe(['a', 'b'] as const, zipObject([1, 2])); + * // => { a: 1, b: 2 } + */ +declare function zipObject

(values: readonly V[]): (keys: readonly P[]) => Record; +//#endregion +export { zipObject }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zipObject.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zipObject.js new file mode 100644 index 0000000000000000000000000000000000000000..5aa81e454a1e1722d74243287e125a06f37bccd1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zipObject.js @@ -0,0 +1,26 @@ +const require_zipObject = require("../../array/zipObject.js"); +//#region src/fp/array/zipObject.ts +/** +* Creates a function that builds an object from the piped keys and configured values. +* +* Keys are read from the piped array and paired with values by index, matching the main +* {@link zipObject} behavior. +* +* @template P - The property-key type from the piped keys. +* @template V - The type of configured values. +* @param values - Values assigned to the piped keys by index. +* @returns A function that maps keys to an object. +* +* @example +* import { pipe, zipObject } from 'es-toolkit/fp'; +* +* pipe(['a', 'b'] as const, zipObject([1, 2])); +* // => { a: 1, b: 2 } +*/ +function zipObject(values) { + return function(keys) { + return require_zipObject.zipObject(keys, values); + }; +} +//#endregion +exports.zipObject = zipObject; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zipObject.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zipObject.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e8a5a21abab77d15585b9b66d78944f4a43fa16d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zipObject.mjs @@ -0,0 +1,26 @@ +import { zipObject as zipObject$1 } from "../../array/zipObject.mjs"; +//#region src/fp/array/zipObject.ts +/** +* Creates a function that builds an object from the piped keys and configured values. +* +* Keys are read from the piped array and paired with values by index, matching the main +* {@link zipObject} behavior. +* +* @template P - The property-key type from the piped keys. +* @template V - The type of configured values. +* @param values - Values assigned to the piped keys by index. +* @returns A function that maps keys to an object. +* +* @example +* import { pipe, zipObject } from 'es-toolkit/fp'; +* +* pipe(['a', 'b'] as const, zipObject([1, 2])); +* // => { a: 1, b: 2 } +*/ +function zipObject(values) { + return function(keys) { + return zipObject$1(keys, values); + }; +} +//#endregion +export { zipObject }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zipWith.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zipWith.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..bb99d84584a4b80368f542544b05da2fa19e0a18 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zipWith.d.mts @@ -0,0 +1,57 @@ +//#region src/fp/array/zipWith.d.ts +/** + * Creates a function that maps each value in the piped array with its index. + * + * @template T - The type of elements in the piped array. + * @template R - The type returned by the combiner. + * @param combine - Called with each value and index. + * @returns A function that maps the piped array to combined values. + * + * @example + * import { pipe, zipWith } from 'es-toolkit/fp'; + * + * pipe([1, 2], zipWith((value, index) => value + index)); + * // => [1, 3] + */ +declare function zipWith(combine: (item: T, index: number) => R): (array: readonly T[]) => R[]; +/** + * Creates a function that zips the piped array with one configured array and combines each group. + * + * @template T - The type of elements in the piped array. + * @template U - The type of elements in the configured array. + * @template R - The type returned by the combiner. + * @param arr2 - The second array to zip. + * @param combine - Called with a value from each array and the index. + * @returns A function that maps the piped array to combined values. + */ +declare function zipWith(arr2: readonly U[], combine: (item1: T, item2: U, index: number) => R): (array: readonly T[]) => R[]; +/** + * Creates a function that zips the piped array with two configured arrays and combines each group. + * + * @template T - The type of elements in the piped array. + * @template U - The type of elements in the second array. + * @template V - The type of elements in the third array. + * @template R - The type returned by the combiner. + * @param arr2 - The second array to zip. + * @param arr3 - The third array to zip. + * @param combine - Called with a value from each array and the index. + * @returns A function that maps the piped array to combined values. + */ +declare function zipWith(arr2: readonly U[], arr3: readonly V[], combine: (item1: T, item2: U, item3: V, index: number) => R): (array: readonly T[]) => R[]; +/** + * Creates a function that zips the piped array with three configured arrays and combines each group. + * + * @template T - The type of elements in the piped array. + * @template U - The type of elements in the second array. + * @template V - The type of elements in the third array. + * @template W - The type of elements in the fourth array. + * @template R - The type returned by the combiner. + * @param arr2 - The second array to zip. + * @param arr3 - The third array to zip. + * @param arr4 - The fourth array to zip. + * @param combine - Called with a value from each array and the index. + * @returns A function that maps the piped array to combined values. + */ +declare function zipWith(arr2: readonly U[], arr3: readonly V[], arr4: readonly W[], combine: (item1: T, item2: U, item3: V, item4: W, index: number) => R): (array: readonly T[]) => R[]; +//#endregion +export { zipWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zipWith.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zipWith.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..bb99d84584a4b80368f542544b05da2fa19e0a18 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zipWith.d.ts @@ -0,0 +1,57 @@ +//#region src/fp/array/zipWith.d.ts +/** + * Creates a function that maps each value in the piped array with its index. + * + * @template T - The type of elements in the piped array. + * @template R - The type returned by the combiner. + * @param combine - Called with each value and index. + * @returns A function that maps the piped array to combined values. + * + * @example + * import { pipe, zipWith } from 'es-toolkit/fp'; + * + * pipe([1, 2], zipWith((value, index) => value + index)); + * // => [1, 3] + */ +declare function zipWith(combine: (item: T, index: number) => R): (array: readonly T[]) => R[]; +/** + * Creates a function that zips the piped array with one configured array and combines each group. + * + * @template T - The type of elements in the piped array. + * @template U - The type of elements in the configured array. + * @template R - The type returned by the combiner. + * @param arr2 - The second array to zip. + * @param combine - Called with a value from each array and the index. + * @returns A function that maps the piped array to combined values. + */ +declare function zipWith(arr2: readonly U[], combine: (item1: T, item2: U, index: number) => R): (array: readonly T[]) => R[]; +/** + * Creates a function that zips the piped array with two configured arrays and combines each group. + * + * @template T - The type of elements in the piped array. + * @template U - The type of elements in the second array. + * @template V - The type of elements in the third array. + * @template R - The type returned by the combiner. + * @param arr2 - The second array to zip. + * @param arr3 - The third array to zip. + * @param combine - Called with a value from each array and the index. + * @returns A function that maps the piped array to combined values. + */ +declare function zipWith(arr2: readonly U[], arr3: readonly V[], combine: (item1: T, item2: U, item3: V, index: number) => R): (array: readonly T[]) => R[]; +/** + * Creates a function that zips the piped array with three configured arrays and combines each group. + * + * @template T - The type of elements in the piped array. + * @template U - The type of elements in the second array. + * @template V - The type of elements in the third array. + * @template W - The type of elements in the fourth array. + * @template R - The type returned by the combiner. + * @param arr2 - The second array to zip. + * @param arr3 - The third array to zip. + * @param arr4 - The fourth array to zip. + * @param combine - Called with a value from each array and the index. + * @returns A function that maps the piped array to combined values. + */ +declare function zipWith(arr2: readonly U[], arr3: readonly V[], arr4: readonly W[], combine: (item1: T, item2: U, item3: V, item4: W, index: number) => R): (array: readonly T[]) => R[]; +//#endregion +export { zipWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zipWith.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zipWith.js new file mode 100644 index 0000000000000000000000000000000000000000..0f47b3cdceaf81cda0ca631f4ad0984974058974 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zipWith.js @@ -0,0 +1,9 @@ +const require_zipWith = require("../../array/zipWith.js"); +//#region src/fp/array/zipWith.ts +function zipWith(...rest) { + return function(array) { + return require_zipWith.zipWith(array, ...rest); + }; +} +//#endregion +exports.zipWith = zipWith; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zipWith.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zipWith.mjs new file mode 100644 index 0000000000000000000000000000000000000000..6213ef1bec335cf2dd0440b343ba66b526cba4fa --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/array/zipWith.mjs @@ -0,0 +1,9 @@ +import { zipWith as zipWith$1 } from "../../array/zipWith.mjs"; +//#region src/fp/array/zipWith.ts +function zipWith(...rest) { + return function(array) { + return zipWith$1(array, ...rest); + }; +} +//#endregion +export { zipWith }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/flow.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/flow.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..d3f62f03d95c85a2d8083f8384dfb452f82e8f36 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/flow.d.mts @@ -0,0 +1,213 @@ +//#region src/fp/flow.d.ts +/** + * Creates a reusable function from a single function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @returns A function with the same parameters as `fn1` that returns its result. + */ +declare function flow(fn1: (...args: A) => R1): (...args: A) => R1; +/** + * Composes `fn1` and `fn2` left-to-right into a single reusable function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the result of `fn1`. + * @returns A function with the same parameters as `fn1` that returns the result of `fn2`. + */ +declare function flow(fn1: (...args: A) => R1, fn2: (input: R1) => R2): (...args: A) => R2; +/** + * Composes `fn1` through `fn3` left-to-right into a single reusable function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @returns A function with the same parameters as `fn1` that returns the result of `fn3`. + */ +declare function flow(fn1: (...args: A) => R1, fn2: (input: R1) => R2, fn3: (input: R2) => R3): (...args: A) => R3; +/** + * Composes `fn1` through `fn4` left-to-right into a single reusable function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @returns A function with the same parameters as `fn1` that returns the result of `fn4`. + */ +declare function flow(fn1: (...args: A) => R1, fn2: (input: R1) => R2, fn3: (input: R2) => R3, fn4: (input: R3) => R4): (...args: A) => R4; +/** + * Composes `fn1` through `fn5` left-to-right into a single reusable function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @returns A function with the same parameters as `fn1` that returns the result of `fn5`. + */ +declare function flow(fn1: (...args: A) => R1, fn2: (input: R1) => R2, fn3: (input: R2) => R3, fn4: (input: R3) => R4, fn5: (input: R4) => R5): (...args: A) => R5; +/** + * Composes `fn1` through `fn6` left-to-right into a single reusable function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @returns A function with the same parameters as `fn1` that returns the result of `fn6`. + */ +declare function flow(fn1: (...args: A) => R1, fn2: (input: R1) => R2, fn3: (input: R2) => R3, fn4: (input: R3) => R4, fn5: (input: R4) => R5, fn6: (input: R5) => R6): (...args: A) => R6; +/** + * Composes `fn1` through `fn7` left-to-right into a single reusable function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @returns A function with the same parameters as `fn1` that returns the result of `fn7`. + */ +declare function flow(fn1: (...args: A) => R1, fn2: (input: R1) => R2, fn3: (input: R2) => R3, fn4: (input: R3) => R4, fn5: (input: R4) => R5, fn6: (input: R5) => R6, fn7: (input: R6) => R7): (...args: A) => R7; +/** + * Composes `fn1` through `fn8` left-to-right into a single reusable function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @returns A function with the same parameters as `fn1` that returns the result of `fn8`. + */ +declare function flow(fn1: (...args: A) => R1, fn2: (input: R1) => R2, fn3: (input: R2) => R3, fn4: (input: R3) => R4, fn5: (input: R4) => R5, fn6: (input: R5) => R6, fn7: (input: R6) => R7, fn8: (input: R7) => R8): (...args: A) => R8; +/** + * Composes `fn1` through `fn9` left-to-right into a single reusable function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @param fn9 - Applied to the result of `fn8`. + * @returns A function with the same parameters as `fn1` that returns the result of `fn9`. + */ +declare function flow(fn1: (...args: A) => R1, fn2: (input: R1) => R2, fn3: (input: R2) => R3, fn4: (input: R3) => R4, fn5: (input: R4) => R5, fn6: (input: R5) => R6, fn7: (input: R6) => R7, fn8: (input: R7) => R8, fn9: (input: R8) => R9): (...args: A) => R9; +/** + * Composes `fn1` through `fn10` left-to-right into a single reusable function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @param fn9 - Applied to the result of `fn8`. + * @param fn10 - Applied to the result of `fn9`. + * @returns A function with the same parameters as `fn1` that returns the result of `fn10`. + */ +declare function flow(fn1: (...args: A) => R1, fn2: (input: R1) => R2, fn3: (input: R2) => R3, fn4: (input: R3) => R4, fn5: (input: R4) => R5, fn6: (input: R5) => R6, fn7: (input: R6) => R7, fn8: (input: R7) => R8, fn9: (input: R8) => R9, fn10: (input: R9) => R10): (...args: A) => R10; +/** + * Composes `fn1` through `fn11` left-to-right into a single reusable function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @param fn9 - Applied to the result of `fn8`. + * @param fn10 - Applied to the result of `fn9`. + * @param fn11 - Applied to the result of `fn10`. + * @returns A function with the same parameters as `fn1` that returns the result of `fn11`. + */ +declare function flow(fn1: (...args: A) => R1, fn2: (input: R1) => R2, fn3: (input: R2) => R3, fn4: (input: R3) => R4, fn5: (input: R4) => R5, fn6: (input: R5) => R6, fn7: (input: R6) => R7, fn8: (input: R7) => R8, fn9: (input: R8) => R9, fn10: (input: R9) => R10, fn11: (input: R10) => R11): (...args: A) => R11; +/** + * Composes `fn1` through `fn12` left-to-right into a single reusable function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @param fn9 - Applied to the result of `fn8`. + * @param fn10 - Applied to the result of `fn9`. + * @param fn11 - Applied to the result of `fn10`. + * @param fn12 - Applied to the result of `fn11`. + * @returns A function with the same parameters as `fn1` that returns the result of `fn12`. + */ +declare function flow(fn1: (...args: A) => R1, fn2: (input: R1) => R2, fn3: (input: R2) => R3, fn4: (input: R3) => R4, fn5: (input: R4) => R5, fn6: (input: R5) => R6, fn7: (input: R6) => R7, fn8: (input: R7) => R8, fn9: (input: R8) => R9, fn10: (input: R9) => R10, fn11: (input: R10) => R11, fn12: (input: R11) => R12): (...args: A) => R12; +/** + * Composes `fn1` through `fn13` left-to-right into a single reusable function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @param fn9 - Applied to the result of `fn8`. + * @param fn10 - Applied to the result of `fn9`. + * @param fn11 - Applied to the result of `fn10`. + * @param fn12 - Applied to the result of `fn11`. + * @param fn13 - Applied to the result of `fn12`. + * @returns A function with the same parameters as `fn1` that returns the result of `fn13`. + */ +declare function flow(fn1: (...args: A) => R1, fn2: (input: R1) => R2, fn3: (input: R2) => R3, fn4: (input: R3) => R4, fn5: (input: R4) => R5, fn6: (input: R5) => R6, fn7: (input: R6) => R7, fn8: (input: R7) => R8, fn9: (input: R8) => R9, fn10: (input: R9) => R10, fn11: (input: R10) => R11, fn12: (input: R11) => R12, fn13: (input: R12) => R13): (...args: A) => R13; +/** + * Composes `fn1` through `fn14` left-to-right into a single reusable function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @param fn9 - Applied to the result of `fn8`. + * @param fn10 - Applied to the result of `fn9`. + * @param fn11 - Applied to the result of `fn10`. + * @param fn12 - Applied to the result of `fn11`. + * @param fn13 - Applied to the result of `fn12`. + * @param fn14 - Applied to the result of `fn13`. + * @returns A function with the same parameters as `fn1` that returns the result of `fn14`. + */ +declare function flow(fn1: (...args: A) => R1, fn2: (input: R1) => R2, fn3: (input: R2) => R3, fn4: (input: R3) => R4, fn5: (input: R4) => R5, fn6: (input: R5) => R6, fn7: (input: R6) => R7, fn8: (input: R7) => R8, fn9: (input: R8) => R9, fn10: (input: R9) => R10, fn11: (input: R10) => R11, fn12: (input: R11) => R12, fn13: (input: R12) => R13, fn14: (input: R13) => R14): (...args: A) => R14; +/** + * Composes `fn1` through `fn15` left-to-right into a single reusable function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @param fn9 - Applied to the result of `fn8`. + * @param fn10 - Applied to the result of `fn9`. + * @param fn11 - Applied to the result of `fn10`. + * @param fn12 - Applied to the result of `fn11`. + * @param fn13 - Applied to the result of `fn12`. + * @param fn14 - Applied to the result of `fn13`. + * @param fn15 - Applied to the result of `fn14`. + * @returns A function with the same parameters as `fn1` that returns the result of `fn15`. + */ +declare function flow(fn1: (...args: A) => R1, fn2: (input: R1) => R2, fn3: (input: R2) => R3, fn4: (input: R3) => R4, fn5: (input: R4) => R5, fn6: (input: R5) => R6, fn7: (input: R6) => R7, fn8: (input: R7) => R8, fn9: (input: R8) => R9, fn10: (input: R9) => R10, fn11: (input: R10) => R11, fn12: (input: R11) => R12, fn13: (input: R12) => R13, fn14: (input: R13) => R14, fn15: (input: R14) => R15): (...args: A) => R15; +//#endregion +export { flow }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/flow.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/flow.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d3f62f03d95c85a2d8083f8384dfb452f82e8f36 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/flow.d.ts @@ -0,0 +1,213 @@ +//#region src/fp/flow.d.ts +/** + * Creates a reusable function from a single function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @returns A function with the same parameters as `fn1` that returns its result. + */ +declare function flow(fn1: (...args: A) => R1): (...args: A) => R1; +/** + * Composes `fn1` and `fn2` left-to-right into a single reusable function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the result of `fn1`. + * @returns A function with the same parameters as `fn1` that returns the result of `fn2`. + */ +declare function flow(fn1: (...args: A) => R1, fn2: (input: R1) => R2): (...args: A) => R2; +/** + * Composes `fn1` through `fn3` left-to-right into a single reusable function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @returns A function with the same parameters as `fn1` that returns the result of `fn3`. + */ +declare function flow(fn1: (...args: A) => R1, fn2: (input: R1) => R2, fn3: (input: R2) => R3): (...args: A) => R3; +/** + * Composes `fn1` through `fn4` left-to-right into a single reusable function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @returns A function with the same parameters as `fn1` that returns the result of `fn4`. + */ +declare function flow(fn1: (...args: A) => R1, fn2: (input: R1) => R2, fn3: (input: R2) => R3, fn4: (input: R3) => R4): (...args: A) => R4; +/** + * Composes `fn1` through `fn5` left-to-right into a single reusable function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @returns A function with the same parameters as `fn1` that returns the result of `fn5`. + */ +declare function flow(fn1: (...args: A) => R1, fn2: (input: R1) => R2, fn3: (input: R2) => R3, fn4: (input: R3) => R4, fn5: (input: R4) => R5): (...args: A) => R5; +/** + * Composes `fn1` through `fn6` left-to-right into a single reusable function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @returns A function with the same parameters as `fn1` that returns the result of `fn6`. + */ +declare function flow(fn1: (...args: A) => R1, fn2: (input: R1) => R2, fn3: (input: R2) => R3, fn4: (input: R3) => R4, fn5: (input: R4) => R5, fn6: (input: R5) => R6): (...args: A) => R6; +/** + * Composes `fn1` through `fn7` left-to-right into a single reusable function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @returns A function with the same parameters as `fn1` that returns the result of `fn7`. + */ +declare function flow(fn1: (...args: A) => R1, fn2: (input: R1) => R2, fn3: (input: R2) => R3, fn4: (input: R3) => R4, fn5: (input: R4) => R5, fn6: (input: R5) => R6, fn7: (input: R6) => R7): (...args: A) => R7; +/** + * Composes `fn1` through `fn8` left-to-right into a single reusable function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @returns A function with the same parameters as `fn1` that returns the result of `fn8`. + */ +declare function flow(fn1: (...args: A) => R1, fn2: (input: R1) => R2, fn3: (input: R2) => R3, fn4: (input: R3) => R4, fn5: (input: R4) => R5, fn6: (input: R5) => R6, fn7: (input: R6) => R7, fn8: (input: R7) => R8): (...args: A) => R8; +/** + * Composes `fn1` through `fn9` left-to-right into a single reusable function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @param fn9 - Applied to the result of `fn8`. + * @returns A function with the same parameters as `fn1` that returns the result of `fn9`. + */ +declare function flow(fn1: (...args: A) => R1, fn2: (input: R1) => R2, fn3: (input: R2) => R3, fn4: (input: R3) => R4, fn5: (input: R4) => R5, fn6: (input: R5) => R6, fn7: (input: R6) => R7, fn8: (input: R7) => R8, fn9: (input: R8) => R9): (...args: A) => R9; +/** + * Composes `fn1` through `fn10` left-to-right into a single reusable function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @param fn9 - Applied to the result of `fn8`. + * @param fn10 - Applied to the result of `fn9`. + * @returns A function with the same parameters as `fn1` that returns the result of `fn10`. + */ +declare function flow(fn1: (...args: A) => R1, fn2: (input: R1) => R2, fn3: (input: R2) => R3, fn4: (input: R3) => R4, fn5: (input: R4) => R5, fn6: (input: R5) => R6, fn7: (input: R6) => R7, fn8: (input: R7) => R8, fn9: (input: R8) => R9, fn10: (input: R9) => R10): (...args: A) => R10; +/** + * Composes `fn1` through `fn11` left-to-right into a single reusable function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @param fn9 - Applied to the result of `fn8`. + * @param fn10 - Applied to the result of `fn9`. + * @param fn11 - Applied to the result of `fn10`. + * @returns A function with the same parameters as `fn1` that returns the result of `fn11`. + */ +declare function flow(fn1: (...args: A) => R1, fn2: (input: R1) => R2, fn3: (input: R2) => R3, fn4: (input: R3) => R4, fn5: (input: R4) => R5, fn6: (input: R5) => R6, fn7: (input: R6) => R7, fn8: (input: R7) => R8, fn9: (input: R8) => R9, fn10: (input: R9) => R10, fn11: (input: R10) => R11): (...args: A) => R11; +/** + * Composes `fn1` through `fn12` left-to-right into a single reusable function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @param fn9 - Applied to the result of `fn8`. + * @param fn10 - Applied to the result of `fn9`. + * @param fn11 - Applied to the result of `fn10`. + * @param fn12 - Applied to the result of `fn11`. + * @returns A function with the same parameters as `fn1` that returns the result of `fn12`. + */ +declare function flow(fn1: (...args: A) => R1, fn2: (input: R1) => R2, fn3: (input: R2) => R3, fn4: (input: R3) => R4, fn5: (input: R4) => R5, fn6: (input: R5) => R6, fn7: (input: R6) => R7, fn8: (input: R7) => R8, fn9: (input: R8) => R9, fn10: (input: R9) => R10, fn11: (input: R10) => R11, fn12: (input: R11) => R12): (...args: A) => R12; +/** + * Composes `fn1` through `fn13` left-to-right into a single reusable function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @param fn9 - Applied to the result of `fn8`. + * @param fn10 - Applied to the result of `fn9`. + * @param fn11 - Applied to the result of `fn10`. + * @param fn12 - Applied to the result of `fn11`. + * @param fn13 - Applied to the result of `fn12`. + * @returns A function with the same parameters as `fn1` that returns the result of `fn13`. + */ +declare function flow(fn1: (...args: A) => R1, fn2: (input: R1) => R2, fn3: (input: R2) => R3, fn4: (input: R3) => R4, fn5: (input: R4) => R5, fn6: (input: R5) => R6, fn7: (input: R6) => R7, fn8: (input: R7) => R8, fn9: (input: R8) => R9, fn10: (input: R9) => R10, fn11: (input: R10) => R11, fn12: (input: R11) => R12, fn13: (input: R12) => R13): (...args: A) => R13; +/** + * Composes `fn1` through `fn14` left-to-right into a single reusable function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @param fn9 - Applied to the result of `fn8`. + * @param fn10 - Applied to the result of `fn9`. + * @param fn11 - Applied to the result of `fn10`. + * @param fn12 - Applied to the result of `fn11`. + * @param fn13 - Applied to the result of `fn12`. + * @param fn14 - Applied to the result of `fn13`. + * @returns A function with the same parameters as `fn1` that returns the result of `fn14`. + */ +declare function flow(fn1: (...args: A) => R1, fn2: (input: R1) => R2, fn3: (input: R2) => R3, fn4: (input: R3) => R4, fn5: (input: R4) => R5, fn6: (input: R5) => R6, fn7: (input: R6) => R7, fn8: (input: R7) => R8, fn9: (input: R8) => R9, fn10: (input: R9) => R10, fn11: (input: R10) => R11, fn12: (input: R11) => R12, fn13: (input: R12) => R13, fn14: (input: R13) => R14): (...args: A) => R14; +/** + * Composes `fn1` through `fn15` left-to-right into a single reusable function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @param fn9 - Applied to the result of `fn8`. + * @param fn10 - Applied to the result of `fn9`. + * @param fn11 - Applied to the result of `fn10`. + * @param fn12 - Applied to the result of `fn11`. + * @param fn13 - Applied to the result of `fn12`. + * @param fn14 - Applied to the result of `fn13`. + * @param fn15 - Applied to the result of `fn14`. + * @returns A function with the same parameters as `fn1` that returns the result of `fn15`. + */ +declare function flow(fn1: (...args: A) => R1, fn2: (input: R1) => R2, fn3: (input: R2) => R3, fn4: (input: R3) => R4, fn5: (input: R4) => R5, fn6: (input: R5) => R6, fn7: (input: R6) => R7, fn8: (input: R7) => R8, fn9: (input: R8) => R9, fn10: (input: R9) => R10, fn11: (input: R10) => R11, fn12: (input: R11) => R12, fn13: (input: R12) => R13, fn14: (input: R13) => R14, fn15: (input: R14) => R15): (...args: A) => R15; +//#endregion +export { flow }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/flow.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/flow.js new file mode 100644 index 0000000000000000000000000000000000000000..9ba5c36a29752c6182c1f6fad399529cb7abcf05 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/flow.js @@ -0,0 +1,50 @@ +const require_pipe = require("./pipe.js"); +//#region src/fp/flow.ts +/** +* Performs left-to-right function composition, returning a **reusable function** +* instead of running immediately. The first function may take any number of +* arguments; every later function is unary and receives the previous result. +* +* `flow` is the deferred sibling of {@link pipe}: where `pipe(value, ...fns)` +* threads a concrete value through the functions right away, `flow(...fns)` +* builds a function you can call later (and reuse) with the data. Internally it +* delegates to `pipe`, so lazy-capable functions (`map`, `filter`, `take`, …) +* are fused exactly the same way and benefit from early termination. +* +* @param functions - The functions to compose. The first may be variadic; the +* rest are unary, each receiving the previous function's output. +* @returns A function that, when called, applies every function left-to-right. +* +* @example +* import { flow } from 'es-toolkit/fp'; +* +* const addThenSquare = flow( +* (x: number, y: number) => x + y, +* n => n * n +* ); +* +* addThenSquare(1, 2); // => 9 +* +* @example +* import { flow, map, filter, take } from 'es-toolkit/fp'; +* +* // A reusable lazy pipeline. Only the first two even squares are computed. +* const firstTwoEvenSquares = flow( +* map((x: number) => x * x), +* filter(x => x % 2 === 0), +* take(2) +* ); +* +* firstTwoEvenSquares([1, 2, 3, 4, 5, 6, 7, 8]); // => [4, 16] +*/ +function flow(...functions) { + const run = require_pipe.pipe; + return function(...args) { + if (functions.length === 0) return args[0]; + if (args.length <= 1) return run(args[0], ...functions); + const [first, ...rest] = functions; + return run(first.apply(this, args), ...rest); + }; +} +//#endregion +exports.flow = flow; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/flow.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/flow.mjs new file mode 100644 index 0000000000000000000000000000000000000000..a54858b45ddb5d37c0a98f2509a248db8afdcd7c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/flow.mjs @@ -0,0 +1,50 @@ +import { pipe } from "./pipe.mjs"; +//#region src/fp/flow.ts +/** +* Performs left-to-right function composition, returning a **reusable function** +* instead of running immediately. The first function may take any number of +* arguments; every later function is unary and receives the previous result. +* +* `flow` is the deferred sibling of {@link pipe}: where `pipe(value, ...fns)` +* threads a concrete value through the functions right away, `flow(...fns)` +* builds a function you can call later (and reuse) with the data. Internally it +* delegates to `pipe`, so lazy-capable functions (`map`, `filter`, `take`, …) +* are fused exactly the same way and benefit from early termination. +* +* @param functions - The functions to compose. The first may be variadic; the +* rest are unary, each receiving the previous function's output. +* @returns A function that, when called, applies every function left-to-right. +* +* @example +* import { flow } from 'es-toolkit/fp'; +* +* const addThenSquare = flow( +* (x: number, y: number) => x + y, +* n => n * n +* ); +* +* addThenSquare(1, 2); // => 9 +* +* @example +* import { flow, map, filter, take } from 'es-toolkit/fp'; +* +* // A reusable lazy pipeline. Only the first two even squares are computed. +* const firstTwoEvenSquares = flow( +* map((x: number) => x * x), +* filter(x => x % 2 === 0), +* take(2) +* ); +* +* firstTwoEvenSquares([1, 2, 3, 4, 5, 6, 7, 8]); // => [4, 16] +*/ +function flow(...functions) { + const run = pipe; + return function(...args) { + if (functions.length === 0) return args[0]; + if (args.length <= 1) return run(args[0], ...functions); + const [first, ...rest] = functions; + return run(first.apply(this, args), ...rest); + }; +} +//#endregion +export { flow }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/flowAsync.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/flowAsync.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..67b0914d9998b5dc572a468cd6e3bbcc890ee7ae --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/flowAsync.d.mts @@ -0,0 +1,213 @@ +//#region src/fp/flowAsync.d.ts +/** + * Creates a reusable async function from a single function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @returns An async function with the same parameters as `fn1` that resolves to its awaited result. + */ +declare function flowAsync(fn1: (...args: A) => R1): (...args: A) => Promise>; +/** + * Composes `fn1` and `fn2` left-to-right into a single reusable async function, awaiting each result. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the awaited result of `fn1`. + * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn2`. + */ +declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2): (...args: A) => Promise>; +/** + * Composes `fn1` through `fn3` left-to-right into a single reusable async function, awaiting each result. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the awaited result of `fn1`. + * @param fn3 - Applied to the awaited result of `fn2`. + * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn3`. + */ +declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3): (...args: A) => Promise>; +/** + * Composes `fn1` through `fn4` left-to-right into a single reusable async function, awaiting each result. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the awaited result of `fn1`. + * @param fn3 - Applied to the awaited result of `fn2`. + * @param fn4 - Applied to the awaited result of `fn3`. + * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn4`. + */ +declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4): (...args: A) => Promise>; +/** + * Composes `fn1` through `fn5` left-to-right into a single reusable async function, awaiting each result. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the awaited result of `fn1`. + * @param fn3 - Applied to the awaited result of `fn2`. + * @param fn4 - Applied to the awaited result of `fn3`. + * @param fn5 - Applied to the awaited result of `fn4`. + * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn5`. + */ +declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5): (...args: A) => Promise>; +/** + * Composes `fn1` through `fn6` left-to-right into a single reusable async function, awaiting each result. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the awaited result of `fn1`. + * @param fn3 - Applied to the awaited result of `fn2`. + * @param fn4 - Applied to the awaited result of `fn3`. + * @param fn5 - Applied to the awaited result of `fn4`. + * @param fn6 - Applied to the awaited result of `fn5`. + * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn6`. + */ +declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6): (...args: A) => Promise>; +/** + * Composes `fn1` through `fn7` left-to-right into a single reusable async function, awaiting each result. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the awaited result of `fn1`. + * @param fn3 - Applied to the awaited result of `fn2`. + * @param fn4 - Applied to the awaited result of `fn3`. + * @param fn5 - Applied to the awaited result of `fn4`. + * @param fn6 - Applied to the awaited result of `fn5`. + * @param fn7 - Applied to the awaited result of `fn6`. + * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn7`. + */ +declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6, fn7: (input: Awaited) => R7): (...args: A) => Promise>; +/** + * Composes `fn1` through `fn8` left-to-right into a single reusable async function, awaiting each result. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the awaited result of `fn1`. + * @param fn3 - Applied to the awaited result of `fn2`. + * @param fn4 - Applied to the awaited result of `fn3`. + * @param fn5 - Applied to the awaited result of `fn4`. + * @param fn6 - Applied to the awaited result of `fn5`. + * @param fn7 - Applied to the awaited result of `fn6`. + * @param fn8 - Applied to the awaited result of `fn7`. + * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn8`. + */ +declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6, fn7: (input: Awaited) => R7, fn8: (input: Awaited) => R8): (...args: A) => Promise>; +/** + * Composes `fn1` through `fn9` left-to-right into a single reusable async function, awaiting each result. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the awaited result of `fn1`. + * @param fn3 - Applied to the awaited result of `fn2`. + * @param fn4 - Applied to the awaited result of `fn3`. + * @param fn5 - Applied to the awaited result of `fn4`. + * @param fn6 - Applied to the awaited result of `fn5`. + * @param fn7 - Applied to the awaited result of `fn6`. + * @param fn8 - Applied to the awaited result of `fn7`. + * @param fn9 - Applied to the awaited result of `fn8`. + * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn9`. + */ +declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6, fn7: (input: Awaited) => R7, fn8: (input: Awaited) => R8, fn9: (input: Awaited) => R9): (...args: A) => Promise>; +/** + * Composes `fn1` through `fn10` left-to-right into a single reusable async function, awaiting each result. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the awaited result of `fn1`. + * @param fn3 - Applied to the awaited result of `fn2`. + * @param fn4 - Applied to the awaited result of `fn3`. + * @param fn5 - Applied to the awaited result of `fn4`. + * @param fn6 - Applied to the awaited result of `fn5`. + * @param fn7 - Applied to the awaited result of `fn6`. + * @param fn8 - Applied to the awaited result of `fn7`. + * @param fn9 - Applied to the awaited result of `fn8`. + * @param fn10 - Applied to the awaited result of `fn9`. + * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn10`. + */ +declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6, fn7: (input: Awaited) => R7, fn8: (input: Awaited) => R8, fn9: (input: Awaited) => R9, fn10: (input: Awaited) => R10): (...args: A) => Promise>; +/** + * Composes `fn1` through `fn11` left-to-right into a single reusable async function, awaiting each result. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the awaited result of `fn1`. + * @param fn3 - Applied to the awaited result of `fn2`. + * @param fn4 - Applied to the awaited result of `fn3`. + * @param fn5 - Applied to the awaited result of `fn4`. + * @param fn6 - Applied to the awaited result of `fn5`. + * @param fn7 - Applied to the awaited result of `fn6`. + * @param fn8 - Applied to the awaited result of `fn7`. + * @param fn9 - Applied to the awaited result of `fn8`. + * @param fn10 - Applied to the awaited result of `fn9`. + * @param fn11 - Applied to the awaited result of `fn10`. + * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn11`. + */ +declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6, fn7: (input: Awaited) => R7, fn8: (input: Awaited) => R8, fn9: (input: Awaited) => R9, fn10: (input: Awaited) => R10, fn11: (input: Awaited) => R11): (...args: A) => Promise>; +/** + * Composes `fn1` through `fn12` left-to-right into a single reusable async function, awaiting each result. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the awaited result of `fn1`. + * @param fn3 - Applied to the awaited result of `fn2`. + * @param fn4 - Applied to the awaited result of `fn3`. + * @param fn5 - Applied to the awaited result of `fn4`. + * @param fn6 - Applied to the awaited result of `fn5`. + * @param fn7 - Applied to the awaited result of `fn6`. + * @param fn8 - Applied to the awaited result of `fn7`. + * @param fn9 - Applied to the awaited result of `fn8`. + * @param fn10 - Applied to the awaited result of `fn9`. + * @param fn11 - Applied to the awaited result of `fn10`. + * @param fn12 - Applied to the awaited result of `fn11`. + * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn12`. + */ +declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6, fn7: (input: Awaited) => R7, fn8: (input: Awaited) => R8, fn9: (input: Awaited) => R9, fn10: (input: Awaited) => R10, fn11: (input: Awaited) => R11, fn12: (input: Awaited) => R12): (...args: A) => Promise>; +/** + * Composes `fn1` through `fn13` left-to-right into a single reusable async function, awaiting each result. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the awaited result of `fn1`. + * @param fn3 - Applied to the awaited result of `fn2`. + * @param fn4 - Applied to the awaited result of `fn3`. + * @param fn5 - Applied to the awaited result of `fn4`. + * @param fn6 - Applied to the awaited result of `fn5`. + * @param fn7 - Applied to the awaited result of `fn6`. + * @param fn8 - Applied to the awaited result of `fn7`. + * @param fn9 - Applied to the awaited result of `fn8`. + * @param fn10 - Applied to the awaited result of `fn9`. + * @param fn11 - Applied to the awaited result of `fn10`. + * @param fn12 - Applied to the awaited result of `fn11`. + * @param fn13 - Applied to the awaited result of `fn12`. + * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn13`. + */ +declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6, fn7: (input: Awaited) => R7, fn8: (input: Awaited) => R8, fn9: (input: Awaited) => R9, fn10: (input: Awaited) => R10, fn11: (input: Awaited) => R11, fn12: (input: Awaited) => R12, fn13: (input: Awaited) => R13): (...args: A) => Promise>; +/** + * Composes `fn1` through `fn14` left-to-right into a single reusable async function, awaiting each result. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the awaited result of `fn1`. + * @param fn3 - Applied to the awaited result of `fn2`. + * @param fn4 - Applied to the awaited result of `fn3`. + * @param fn5 - Applied to the awaited result of `fn4`. + * @param fn6 - Applied to the awaited result of `fn5`. + * @param fn7 - Applied to the awaited result of `fn6`. + * @param fn8 - Applied to the awaited result of `fn7`. + * @param fn9 - Applied to the awaited result of `fn8`. + * @param fn10 - Applied to the awaited result of `fn9`. + * @param fn11 - Applied to the awaited result of `fn10`. + * @param fn12 - Applied to the awaited result of `fn11`. + * @param fn13 - Applied to the awaited result of `fn12`. + * @param fn14 - Applied to the awaited result of `fn13`. + * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn14`. + */ +declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6, fn7: (input: Awaited) => R7, fn8: (input: Awaited) => R8, fn9: (input: Awaited) => R9, fn10: (input: Awaited) => R10, fn11: (input: Awaited) => R11, fn12: (input: Awaited) => R12, fn13: (input: Awaited) => R13, fn14: (input: Awaited) => R14): (...args: A) => Promise>; +/** + * Composes `fn1` through `fn15` left-to-right into a single reusable async function, awaiting each result. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the awaited result of `fn1`. + * @param fn3 - Applied to the awaited result of `fn2`. + * @param fn4 - Applied to the awaited result of `fn3`. + * @param fn5 - Applied to the awaited result of `fn4`. + * @param fn6 - Applied to the awaited result of `fn5`. + * @param fn7 - Applied to the awaited result of `fn6`. + * @param fn8 - Applied to the awaited result of `fn7`. + * @param fn9 - Applied to the awaited result of `fn8`. + * @param fn10 - Applied to the awaited result of `fn9`. + * @param fn11 - Applied to the awaited result of `fn10`. + * @param fn12 - Applied to the awaited result of `fn11`. + * @param fn13 - Applied to the awaited result of `fn12`. + * @param fn14 - Applied to the awaited result of `fn13`. + * @param fn15 - Applied to the awaited result of `fn14`. + * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn15`. + */ +declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6, fn7: (input: Awaited) => R7, fn8: (input: Awaited) => R8, fn9: (input: Awaited) => R9, fn10: (input: Awaited) => R10, fn11: (input: Awaited) => R11, fn12: (input: Awaited) => R12, fn13: (input: Awaited) => R13, fn14: (input: Awaited) => R14, fn15: (input: Awaited) => R15): (...args: A) => Promise>; +//#endregion +export { flowAsync }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/flowAsync.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/flowAsync.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..67b0914d9998b5dc572a468cd6e3bbcc890ee7ae --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/flowAsync.d.ts @@ -0,0 +1,213 @@ +//#region src/fp/flowAsync.d.ts +/** + * Creates a reusable async function from a single function. + * + * @param fn1 - The first function, which may take any number of arguments. + * @returns An async function with the same parameters as `fn1` that resolves to its awaited result. + */ +declare function flowAsync(fn1: (...args: A) => R1): (...args: A) => Promise>; +/** + * Composes `fn1` and `fn2` left-to-right into a single reusable async function, awaiting each result. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the awaited result of `fn1`. + * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn2`. + */ +declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2): (...args: A) => Promise>; +/** + * Composes `fn1` through `fn3` left-to-right into a single reusable async function, awaiting each result. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the awaited result of `fn1`. + * @param fn3 - Applied to the awaited result of `fn2`. + * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn3`. + */ +declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3): (...args: A) => Promise>; +/** + * Composes `fn1` through `fn4` left-to-right into a single reusable async function, awaiting each result. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the awaited result of `fn1`. + * @param fn3 - Applied to the awaited result of `fn2`. + * @param fn4 - Applied to the awaited result of `fn3`. + * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn4`. + */ +declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4): (...args: A) => Promise>; +/** + * Composes `fn1` through `fn5` left-to-right into a single reusable async function, awaiting each result. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the awaited result of `fn1`. + * @param fn3 - Applied to the awaited result of `fn2`. + * @param fn4 - Applied to the awaited result of `fn3`. + * @param fn5 - Applied to the awaited result of `fn4`. + * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn5`. + */ +declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5): (...args: A) => Promise>; +/** + * Composes `fn1` through `fn6` left-to-right into a single reusable async function, awaiting each result. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the awaited result of `fn1`. + * @param fn3 - Applied to the awaited result of `fn2`. + * @param fn4 - Applied to the awaited result of `fn3`. + * @param fn5 - Applied to the awaited result of `fn4`. + * @param fn6 - Applied to the awaited result of `fn5`. + * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn6`. + */ +declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6): (...args: A) => Promise>; +/** + * Composes `fn1` through `fn7` left-to-right into a single reusable async function, awaiting each result. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the awaited result of `fn1`. + * @param fn3 - Applied to the awaited result of `fn2`. + * @param fn4 - Applied to the awaited result of `fn3`. + * @param fn5 - Applied to the awaited result of `fn4`. + * @param fn6 - Applied to the awaited result of `fn5`. + * @param fn7 - Applied to the awaited result of `fn6`. + * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn7`. + */ +declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6, fn7: (input: Awaited) => R7): (...args: A) => Promise>; +/** + * Composes `fn1` through `fn8` left-to-right into a single reusable async function, awaiting each result. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the awaited result of `fn1`. + * @param fn3 - Applied to the awaited result of `fn2`. + * @param fn4 - Applied to the awaited result of `fn3`. + * @param fn5 - Applied to the awaited result of `fn4`. + * @param fn6 - Applied to the awaited result of `fn5`. + * @param fn7 - Applied to the awaited result of `fn6`. + * @param fn8 - Applied to the awaited result of `fn7`. + * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn8`. + */ +declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6, fn7: (input: Awaited) => R7, fn8: (input: Awaited) => R8): (...args: A) => Promise>; +/** + * Composes `fn1` through `fn9` left-to-right into a single reusable async function, awaiting each result. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the awaited result of `fn1`. + * @param fn3 - Applied to the awaited result of `fn2`. + * @param fn4 - Applied to the awaited result of `fn3`. + * @param fn5 - Applied to the awaited result of `fn4`. + * @param fn6 - Applied to the awaited result of `fn5`. + * @param fn7 - Applied to the awaited result of `fn6`. + * @param fn8 - Applied to the awaited result of `fn7`. + * @param fn9 - Applied to the awaited result of `fn8`. + * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn9`. + */ +declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6, fn7: (input: Awaited) => R7, fn8: (input: Awaited) => R8, fn9: (input: Awaited) => R9): (...args: A) => Promise>; +/** + * Composes `fn1` through `fn10` left-to-right into a single reusable async function, awaiting each result. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the awaited result of `fn1`. + * @param fn3 - Applied to the awaited result of `fn2`. + * @param fn4 - Applied to the awaited result of `fn3`. + * @param fn5 - Applied to the awaited result of `fn4`. + * @param fn6 - Applied to the awaited result of `fn5`. + * @param fn7 - Applied to the awaited result of `fn6`. + * @param fn8 - Applied to the awaited result of `fn7`. + * @param fn9 - Applied to the awaited result of `fn8`. + * @param fn10 - Applied to the awaited result of `fn9`. + * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn10`. + */ +declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6, fn7: (input: Awaited) => R7, fn8: (input: Awaited) => R8, fn9: (input: Awaited) => R9, fn10: (input: Awaited) => R10): (...args: A) => Promise>; +/** + * Composes `fn1` through `fn11` left-to-right into a single reusable async function, awaiting each result. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the awaited result of `fn1`. + * @param fn3 - Applied to the awaited result of `fn2`. + * @param fn4 - Applied to the awaited result of `fn3`. + * @param fn5 - Applied to the awaited result of `fn4`. + * @param fn6 - Applied to the awaited result of `fn5`. + * @param fn7 - Applied to the awaited result of `fn6`. + * @param fn8 - Applied to the awaited result of `fn7`. + * @param fn9 - Applied to the awaited result of `fn8`. + * @param fn10 - Applied to the awaited result of `fn9`. + * @param fn11 - Applied to the awaited result of `fn10`. + * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn11`. + */ +declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6, fn7: (input: Awaited) => R7, fn8: (input: Awaited) => R8, fn9: (input: Awaited) => R9, fn10: (input: Awaited) => R10, fn11: (input: Awaited) => R11): (...args: A) => Promise>; +/** + * Composes `fn1` through `fn12` left-to-right into a single reusable async function, awaiting each result. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the awaited result of `fn1`. + * @param fn3 - Applied to the awaited result of `fn2`. + * @param fn4 - Applied to the awaited result of `fn3`. + * @param fn5 - Applied to the awaited result of `fn4`. + * @param fn6 - Applied to the awaited result of `fn5`. + * @param fn7 - Applied to the awaited result of `fn6`. + * @param fn8 - Applied to the awaited result of `fn7`. + * @param fn9 - Applied to the awaited result of `fn8`. + * @param fn10 - Applied to the awaited result of `fn9`. + * @param fn11 - Applied to the awaited result of `fn10`. + * @param fn12 - Applied to the awaited result of `fn11`. + * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn12`. + */ +declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6, fn7: (input: Awaited) => R7, fn8: (input: Awaited) => R8, fn9: (input: Awaited) => R9, fn10: (input: Awaited) => R10, fn11: (input: Awaited) => R11, fn12: (input: Awaited) => R12): (...args: A) => Promise>; +/** + * Composes `fn1` through `fn13` left-to-right into a single reusable async function, awaiting each result. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the awaited result of `fn1`. + * @param fn3 - Applied to the awaited result of `fn2`. + * @param fn4 - Applied to the awaited result of `fn3`. + * @param fn5 - Applied to the awaited result of `fn4`. + * @param fn6 - Applied to the awaited result of `fn5`. + * @param fn7 - Applied to the awaited result of `fn6`. + * @param fn8 - Applied to the awaited result of `fn7`. + * @param fn9 - Applied to the awaited result of `fn8`. + * @param fn10 - Applied to the awaited result of `fn9`. + * @param fn11 - Applied to the awaited result of `fn10`. + * @param fn12 - Applied to the awaited result of `fn11`. + * @param fn13 - Applied to the awaited result of `fn12`. + * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn13`. + */ +declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6, fn7: (input: Awaited) => R7, fn8: (input: Awaited) => R8, fn9: (input: Awaited) => R9, fn10: (input: Awaited) => R10, fn11: (input: Awaited) => R11, fn12: (input: Awaited) => R12, fn13: (input: Awaited) => R13): (...args: A) => Promise>; +/** + * Composes `fn1` through `fn14` left-to-right into a single reusable async function, awaiting each result. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the awaited result of `fn1`. + * @param fn3 - Applied to the awaited result of `fn2`. + * @param fn4 - Applied to the awaited result of `fn3`. + * @param fn5 - Applied to the awaited result of `fn4`. + * @param fn6 - Applied to the awaited result of `fn5`. + * @param fn7 - Applied to the awaited result of `fn6`. + * @param fn8 - Applied to the awaited result of `fn7`. + * @param fn9 - Applied to the awaited result of `fn8`. + * @param fn10 - Applied to the awaited result of `fn9`. + * @param fn11 - Applied to the awaited result of `fn10`. + * @param fn12 - Applied to the awaited result of `fn11`. + * @param fn13 - Applied to the awaited result of `fn12`. + * @param fn14 - Applied to the awaited result of `fn13`. + * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn14`. + */ +declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6, fn7: (input: Awaited) => R7, fn8: (input: Awaited) => R8, fn9: (input: Awaited) => R9, fn10: (input: Awaited) => R10, fn11: (input: Awaited) => R11, fn12: (input: Awaited) => R12, fn13: (input: Awaited) => R13, fn14: (input: Awaited) => R14): (...args: A) => Promise>; +/** + * Composes `fn1` through `fn15` left-to-right into a single reusable async function, awaiting each result. + * + * @param fn1 - The first function, which may take any number of arguments. + * @param fn2 - Applied to the awaited result of `fn1`. + * @param fn3 - Applied to the awaited result of `fn2`. + * @param fn4 - Applied to the awaited result of `fn3`. + * @param fn5 - Applied to the awaited result of `fn4`. + * @param fn6 - Applied to the awaited result of `fn5`. + * @param fn7 - Applied to the awaited result of `fn6`. + * @param fn8 - Applied to the awaited result of `fn7`. + * @param fn9 - Applied to the awaited result of `fn8`. + * @param fn10 - Applied to the awaited result of `fn9`. + * @param fn11 - Applied to the awaited result of `fn10`. + * @param fn12 - Applied to the awaited result of `fn11`. + * @param fn13 - Applied to the awaited result of `fn12`. + * @param fn14 - Applied to the awaited result of `fn13`. + * @param fn15 - Applied to the awaited result of `fn14`. + * @returns An async function with the same parameters as `fn1` that resolves to the awaited result of `fn15`. + */ +declare function flowAsync(fn1: (...args: A) => R1, fn2: (input: Awaited) => R2, fn3: (input: Awaited) => R3, fn4: (input: Awaited) => R4, fn5: (input: Awaited) => R5, fn6: (input: Awaited) => R6, fn7: (input: Awaited) => R7, fn8: (input: Awaited) => R8, fn9: (input: Awaited) => R9, fn10: (input: Awaited) => R10, fn11: (input: Awaited) => R11, fn12: (input: Awaited) => R12, fn13: (input: Awaited) => R13, fn14: (input: Awaited) => R14, fn15: (input: Awaited) => R15): (...args: A) => Promise>; +//#endregion +export { flowAsync }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/flowAsync.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/flowAsync.js new file mode 100644 index 0000000000000000000000000000000000000000..fe4b2549673c1bc397b1a7a65402e2488f717643 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/flowAsync.js @@ -0,0 +1,37 @@ +//#region src/fp/flowAsync.ts +/** +* Performs left-to-right async function composition, returning a **reusable +* async function** instead of running immediately. The first function may take +* any number of arguments; every later function is unary and receives the +* awaited result of the previous one. +* +* `flowAsync` is the promise-aware sibling of {@link flow}: where `flow` passes +* each raw return value straight to the next function (so a returned `Promise` +* arrives unresolved), `flowAsync` awaits every step, letting synchronous and +* asynchronous functions mix freely in one chain. The composed function always +* returns a `Promise`. +* +* @param functions - The functions to compose. The first may be variadic; the +* rest are unary, each receiving the awaited output of the previous function. +* @returns An async function that, when called, applies every function +* left-to-right, awaiting each result. +* +* @example +* import { flowAsync } from 'es-toolkit/fp'; +* +* const fetchUser = async (id: number) => ({ id, name: 'Alice' }); +* const getName = (user: { name: string }) => user.name; +* +* const getUserName = flowAsync(fetchUser, getName); +* await getUserName(1); // => 'Alice' +*/ +function flowAsync(...functions) { + return async function(...args) { + if (functions.length === 0) return args[0]; + let result = await functions[0].apply(this, args); + for (let i = 1; i < functions.length; i++) result = await functions[i].call(this, result); + return result; + }; +} +//#endregion +exports.flowAsync = flowAsync; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/flowAsync.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/flowAsync.mjs new file mode 100644 index 0000000000000000000000000000000000000000..6b18b505a8365c64635a6e10e446d9d67bb1fae6 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/flowAsync.mjs @@ -0,0 +1,37 @@ +//#region src/fp/flowAsync.ts +/** +* Performs left-to-right async function composition, returning a **reusable +* async function** instead of running immediately. The first function may take +* any number of arguments; every later function is unary and receives the +* awaited result of the previous one. +* +* `flowAsync` is the promise-aware sibling of {@link flow}: where `flow` passes +* each raw return value straight to the next function (so a returned `Promise` +* arrives unresolved), `flowAsync` awaits every step, letting synchronous and +* asynchronous functions mix freely in one chain. The composed function always +* returns a `Promise`. +* +* @param functions - The functions to compose. The first may be variadic; the +* rest are unary, each receiving the awaited output of the previous function. +* @returns An async function that, when called, applies every function +* left-to-right, awaiting each result. +* +* @example +* import { flowAsync } from 'es-toolkit/fp'; +* +* const fetchUser = async (id: number) => ({ id, name: 'Alice' }); +* const getName = (user: { name: string }) => user.name; +* +* const getUserName = flowAsync(fetchUser, getName); +* await getUserName(1); // => 'Alice' +*/ +function flowAsync(...functions) { + return async function(...args) { + if (functions.length === 0) return args[0]; + let result = await functions[0].apply(this, args); + for (let i = 1; i < functions.length; i++) result = await functions[i].call(this, result); + return result; + }; +} +//#endregion +export { flowAsync }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/index.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..05ad6c4c149aedfb5ba21d737a6d494f3f13990c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/index.d.mts @@ -0,0 +1,77 @@ +import { WindowedOptions } from "../array/windowed.mjs"; +import { at } from "./array/at.mjs"; +import { cartesianProduct } from "./array/cartesianProduct.mjs"; +import { chunk } from "./array/chunk.mjs"; +import { chunkBy } from "./array/chunkBy.mjs"; +import { combinations } from "./array/combinations.mjs"; +import { compact } from "./array/compact.mjs"; +import { countBy } from "./array/countBy.mjs"; +import { difference } from "./array/difference.mjs"; +import { differenceBy } from "./array/differenceBy.mjs"; +import { differenceWith } from "./array/differenceWith.mjs"; +import { drop } from "./array/drop.mjs"; +import { dropRight } from "./array/dropRight.mjs"; +import { dropRightWhile } from "./array/dropRightWhile.mjs"; +import { dropWhile } from "./array/dropWhile.mjs"; +import { filter } from "./array/filter.mjs"; +import { find } from "./array/find.mjs"; +import { findIndex } from "./array/findIndex.mjs"; +import { findLast } from "./array/findLast.mjs"; +import { findLastIndex } from "./array/findLastIndex.mjs"; +import { flatMap } from "./array/flatMap.mjs"; +import { flatMapDeep } from "./array/flatMapDeep.mjs"; +import { flatten } from "./array/flatten.mjs"; +import { flattenDeep } from "./array/flattenDeep.mjs"; +import { forEach } from "./array/forEach.mjs"; +import { groupBy } from "./array/groupBy.mjs"; +import { head } from "./array/head.mjs"; +import { initial } from "./array/initial.mjs"; +import { intersection } from "./array/intersection.mjs"; +import { intersectionBy } from "./array/intersectionBy.mjs"; +import { intersectionWith } from "./array/intersectionWith.mjs"; +import { isSubset } from "./array/isSubset.mjs"; +import { isSubsetWith } from "./array/isSubsetWith.mjs"; +import { join } from "./array/join.mjs"; +import { keyBy } from "./array/keyBy.mjs"; +import { last } from "./array/last.mjs"; +import { length } from "./array/length.mjs"; +import { map } from "./array/map.mjs"; +import { maxBy } from "./array/maxBy.mjs"; +import { minBy } from "./array/minBy.mjs"; +import { orderBy } from "./array/orderBy.mjs"; +import { partition } from "./array/partition.mjs"; +import { reverse } from "./array/reverse.mjs"; +import { sample } from "./array/sample.mjs"; +import { sampleSize } from "./array/sampleSize.mjs"; +import { shuffle } from "./array/shuffle.mjs"; +import { sortBy } from "./array/sortBy.mjs"; +import { tail } from "./array/tail.mjs"; +import { take } from "./array/take.mjs"; +import { takeRight } from "./array/takeRight.mjs"; +import { takeRightWhile } from "./array/takeRightWhile.mjs"; +import { takeWhile } from "./array/takeWhile.mjs"; +import { toFilled } from "./array/toFilled.mjs"; +import { union } from "./array/union.mjs"; +import { unionBy } from "./array/unionBy.mjs"; +import { unionWith } from "./array/unionWith.mjs"; +import { uniq } from "./array/uniq.mjs"; +import { uniqBy } from "./array/uniqBy.mjs"; +import { uniqWith } from "./array/uniqWith.mjs"; +import { unzip } from "./array/unzip.mjs"; +import { unzipWith } from "./array/unzipWith.mjs"; +import { windowed } from "./array/windowed.mjs"; +import { without } from "./array/without.mjs"; +import { xor } from "./array/xor.mjs"; +import { xorBy } from "./array/xorBy.mjs"; +import { xorWith } from "./array/xorWith.mjs"; +import { zip } from "./array/zip.mjs"; +import { zipObject } from "./array/zipObject.mjs"; +import { zipWith } from "./array/zipWith.mjs"; +import { flow } from "./flow.mjs"; +import { flowAsync } from "./flowAsync.mjs"; +import { add } from "./math/add.mjs"; +import { multiply } from "./math/multiply.mjs"; +import { omit } from "./object/omit.mjs"; +import { pick } from "./object/pick.mjs"; +import { pipe } from "./pipe.mjs"; +export { WindowedOptions, add, at, cartesianProduct, chunk, chunkBy, combinations, compact, countBy, difference, differenceBy, differenceWith, drop, dropRight, dropRightWhile, dropWhile, filter, find, findIndex, findLast, findLastIndex, flatMap, flatMapDeep, flatten, flattenDeep, flow, flowAsync, forEach, groupBy, head, initial, intersection, intersectionBy, intersectionWith, isSubset, isSubsetWith, join, keyBy, last, length, map, maxBy, minBy, multiply, omit, orderBy, partition, pick, pipe, reverse, sample, sampleSize, shuffle, sortBy, tail, take, takeRight, takeRightWhile, takeWhile, toFilled, union, unionBy, unionWith, uniq, uniqBy, uniqWith, unzip, unzipWith, windowed, without, xor, xorBy, xorWith, zip, zipObject, zipWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/index.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..71019ac6299431c9c6b10c7a94d1f55b449af917 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/index.d.ts @@ -0,0 +1,77 @@ +import { WindowedOptions } from "../array/windowed.js"; +import { at } from "./array/at.js"; +import { cartesianProduct } from "./array/cartesianProduct.js"; +import { chunk } from "./array/chunk.js"; +import { chunkBy } from "./array/chunkBy.js"; +import { combinations } from "./array/combinations.js"; +import { compact } from "./array/compact.js"; +import { countBy } from "./array/countBy.js"; +import { difference } from "./array/difference.js"; +import { differenceBy } from "./array/differenceBy.js"; +import { differenceWith } from "./array/differenceWith.js"; +import { drop } from "./array/drop.js"; +import { dropRight } from "./array/dropRight.js"; +import { dropRightWhile } from "./array/dropRightWhile.js"; +import { dropWhile } from "./array/dropWhile.js"; +import { filter } from "./array/filter.js"; +import { find } from "./array/find.js"; +import { findIndex } from "./array/findIndex.js"; +import { findLast } from "./array/findLast.js"; +import { findLastIndex } from "./array/findLastIndex.js"; +import { flatMap } from "./array/flatMap.js"; +import { flatMapDeep } from "./array/flatMapDeep.js"; +import { flatten } from "./array/flatten.js"; +import { flattenDeep } from "./array/flattenDeep.js"; +import { forEach } from "./array/forEach.js"; +import { groupBy } from "./array/groupBy.js"; +import { head } from "./array/head.js"; +import { initial } from "./array/initial.js"; +import { intersection } from "./array/intersection.js"; +import { intersectionBy } from "./array/intersectionBy.js"; +import { intersectionWith } from "./array/intersectionWith.js"; +import { isSubset } from "./array/isSubset.js"; +import { isSubsetWith } from "./array/isSubsetWith.js"; +import { join } from "./array/join.js"; +import { keyBy } from "./array/keyBy.js"; +import { last } from "./array/last.js"; +import { length } from "./array/length.js"; +import { map } from "./array/map.js"; +import { maxBy } from "./array/maxBy.js"; +import { minBy } from "./array/minBy.js"; +import { orderBy } from "./array/orderBy.js"; +import { partition } from "./array/partition.js"; +import { reverse } from "./array/reverse.js"; +import { sample } from "./array/sample.js"; +import { sampleSize } from "./array/sampleSize.js"; +import { shuffle } from "./array/shuffle.js"; +import { sortBy } from "./array/sortBy.js"; +import { tail } from "./array/tail.js"; +import { take } from "./array/take.js"; +import { takeRight } from "./array/takeRight.js"; +import { takeRightWhile } from "./array/takeRightWhile.js"; +import { takeWhile } from "./array/takeWhile.js"; +import { toFilled } from "./array/toFilled.js"; +import { union } from "./array/union.js"; +import { unionBy } from "./array/unionBy.js"; +import { unionWith } from "./array/unionWith.js"; +import { uniq } from "./array/uniq.js"; +import { uniqBy } from "./array/uniqBy.js"; +import { uniqWith } from "./array/uniqWith.js"; +import { unzip } from "./array/unzip.js"; +import { unzipWith } from "./array/unzipWith.js"; +import { windowed } from "./array/windowed.js"; +import { without } from "./array/without.js"; +import { xor } from "./array/xor.js"; +import { xorBy } from "./array/xorBy.js"; +import { xorWith } from "./array/xorWith.js"; +import { zip } from "./array/zip.js"; +import { zipObject } from "./array/zipObject.js"; +import { zipWith } from "./array/zipWith.js"; +import { flow } from "./flow.js"; +import { flowAsync } from "./flowAsync.js"; +import { add } from "./math/add.js"; +import { multiply } from "./math/multiply.js"; +import { omit } from "./object/omit.js"; +import { pick } from "./object/pick.js"; +import { pipe } from "./pipe.js"; +export { WindowedOptions, add, at, cartesianProduct, chunk, chunkBy, combinations, compact, countBy, difference, differenceBy, differenceWith, drop, dropRight, dropRightWhile, dropWhile, filter, find, findIndex, findLast, findLastIndex, flatMap, flatMapDeep, flatten, flattenDeep, flow, flowAsync, forEach, groupBy, head, initial, intersection, intersectionBy, intersectionWith, isSubset, isSubsetWith, join, keyBy, last, length, map, maxBy, minBy, multiply, omit, orderBy, partition, pick, pipe, reverse, sample, sampleSize, shuffle, sortBy, tail, take, takeRight, takeRightWhile, takeWhile, toFilled, union, unionBy, unionWith, uniq, uniqBy, uniqWith, unzip, unzipWith, windowed, without, xor, xorBy, xorWith, zip, zipObject, zipWith }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/index.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/index.js new file mode 100644 index 0000000000000000000000000000000000000000..50cc5d66ad66631414cd2045c209882bbe90e88d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/index.js @@ -0,0 +1,154 @@ +Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); +const require_at = require("./array/at.js"); +const require_cartesianProduct = require("./array/cartesianProduct.js"); +const require_chunk = require("./array/chunk.js"); +const require_chunkBy = require("./array/chunkBy.js"); +const require_combinations = require("./array/combinations.js"); +const require_compact = require("./array/compact.js"); +const require_countBy = require("./array/countBy.js"); +const require_difference = require("./array/difference.js"); +const require_differenceBy = require("./array/differenceBy.js"); +const require_differenceWith = require("./array/differenceWith.js"); +const require_drop = require("./array/drop.js"); +const require_dropRight = require("./array/dropRight.js"); +const require_dropRightWhile = require("./array/dropRightWhile.js"); +const require_dropWhile = require("./array/dropWhile.js"); +const require_filter = require("./array/filter.js"); +const require_find = require("./array/find.js"); +const require_findIndex = require("./array/findIndex.js"); +const require_findLast = require("./array/findLast.js"); +const require_findLastIndex = require("./array/findLastIndex.js"); +const require_flatMap = require("./array/flatMap.js"); +const require_flatMapDeep = require("./array/flatMapDeep.js"); +const require_flatten = require("./array/flatten.js"); +const require_flattenDeep = require("./array/flattenDeep.js"); +const require_forEach = require("./array/forEach.js"); +const require_groupBy = require("./array/groupBy.js"); +const require_head = require("./array/head.js"); +const require_initial = require("./array/initial.js"); +const require_intersection = require("./array/intersection.js"); +const require_intersectionBy = require("./array/intersectionBy.js"); +const require_intersectionWith = require("./array/intersectionWith.js"); +const require_isSubset = require("./array/isSubset.js"); +const require_isSubsetWith = require("./array/isSubsetWith.js"); +const require_join = require("./array/join.js"); +const require_keyBy = require("./array/keyBy.js"); +const require_last = require("./array/last.js"); +const require_length = require("./array/length.js"); +const require_map = require("./array/map.js"); +const require_maxBy = require("./array/maxBy.js"); +const require_minBy = require("./array/minBy.js"); +const require_orderBy = require("./array/orderBy.js"); +const require_partition = require("./array/partition.js"); +const require_reverse = require("./array/reverse.js"); +const require_sample = require("./array/sample.js"); +const require_sampleSize = require("./array/sampleSize.js"); +const require_shuffle = require("./array/shuffle.js"); +const require_sortBy = require("./array/sortBy.js"); +const require_tail = require("./array/tail.js"); +const require_take = require("./array/take.js"); +const require_takeRight = require("./array/takeRight.js"); +const require_takeRightWhile = require("./array/takeRightWhile.js"); +const require_takeWhile = require("./array/takeWhile.js"); +const require_toFilled = require("./array/toFilled.js"); +const require_union = require("./array/union.js"); +const require_unionBy = require("./array/unionBy.js"); +const require_unionWith = require("./array/unionWith.js"); +const require_uniq = require("./array/uniq.js"); +const require_uniqBy = require("./array/uniqBy.js"); +const require_uniqWith = require("./array/uniqWith.js"); +const require_unzip = require("./array/unzip.js"); +const require_unzipWith = require("./array/unzipWith.js"); +const require_windowed = require("./array/windowed.js"); +const require_without = require("./array/without.js"); +const require_xor = require("./array/xor.js"); +const require_xorBy = require("./array/xorBy.js"); +const require_xorWith = require("./array/xorWith.js"); +const require_zip = require("./array/zip.js"); +const require_zipObject = require("./array/zipObject.js"); +const require_zipWith = require("./array/zipWith.js"); +require("./array/index.js"); +const require_pipe = require("./pipe.js"); +const require_flow = require("./flow.js"); +const require_flowAsync = require("./flowAsync.js"); +const require_add = require("./math/add.js"); +const require_multiply = require("./math/multiply.js"); +require("./math/index.js"); +const require_omit = require("./object/omit.js"); +const require_pick = require("./object/pick.js"); +require("./object/index.js"); +exports.add = require_add.add; +exports.at = require_at.at; +exports.cartesianProduct = require_cartesianProduct.cartesianProduct; +exports.chunk = require_chunk.chunk; +exports.chunkBy = require_chunkBy.chunkBy; +exports.combinations = require_combinations.combinations; +exports.compact = require_compact.compact; +exports.countBy = require_countBy.countBy; +exports.difference = require_difference.difference; +exports.differenceBy = require_differenceBy.differenceBy; +exports.differenceWith = require_differenceWith.differenceWith; +exports.drop = require_drop.drop; +exports.dropRight = require_dropRight.dropRight; +exports.dropRightWhile = require_dropRightWhile.dropRightWhile; +exports.dropWhile = require_dropWhile.dropWhile; +exports.filter = require_filter.filter; +exports.find = require_find.find; +exports.findIndex = require_findIndex.findIndex; +exports.findLast = require_findLast.findLast; +exports.findLastIndex = require_findLastIndex.findLastIndex; +exports.flatMap = require_flatMap.flatMap; +exports.flatMapDeep = require_flatMapDeep.flatMapDeep; +exports.flatten = require_flatten.flatten; +exports.flattenDeep = require_flattenDeep.flattenDeep; +exports.flow = require_flow.flow; +exports.flowAsync = require_flowAsync.flowAsync; +exports.forEach = require_forEach.forEach; +exports.groupBy = require_groupBy.groupBy; +exports.head = require_head.head; +exports.initial = require_initial.initial; +exports.intersection = require_intersection.intersection; +exports.intersectionBy = require_intersectionBy.intersectionBy; +exports.intersectionWith = require_intersectionWith.intersectionWith; +exports.isSubset = require_isSubset.isSubset; +exports.isSubsetWith = require_isSubsetWith.isSubsetWith; +exports.join = require_join.join; +exports.keyBy = require_keyBy.keyBy; +exports.last = require_last.last; +exports.length = require_length.length; +exports.map = require_map.map; +exports.maxBy = require_maxBy.maxBy; +exports.minBy = require_minBy.minBy; +exports.multiply = require_multiply.multiply; +exports.omit = require_omit.omit; +exports.orderBy = require_orderBy.orderBy; +exports.partition = require_partition.partition; +exports.pick = require_pick.pick; +exports.pipe = require_pipe.pipe; +exports.reverse = require_reverse.reverse; +exports.sample = require_sample.sample; +exports.sampleSize = require_sampleSize.sampleSize; +exports.shuffle = require_shuffle.shuffle; +exports.sortBy = require_sortBy.sortBy; +exports.tail = require_tail.tail; +exports.take = require_take.take; +exports.takeRight = require_takeRight.takeRight; +exports.takeRightWhile = require_takeRightWhile.takeRightWhile; +exports.takeWhile = require_takeWhile.takeWhile; +exports.toFilled = require_toFilled.toFilled; +exports.union = require_union.union; +exports.unionBy = require_unionBy.unionBy; +exports.unionWith = require_unionWith.unionWith; +exports.uniq = require_uniq.uniq; +exports.uniqBy = require_uniqBy.uniqBy; +exports.uniqWith = require_uniqWith.uniqWith; +exports.unzip = require_unzip.unzip; +exports.unzipWith = require_unzipWith.unzipWith; +exports.windowed = require_windowed.windowed; +exports.without = require_without.without; +exports.xor = require_xor.xor; +exports.xorBy = require_xorBy.xorBy; +exports.xorWith = require_xorWith.xorWith; +exports.zip = require_zip.zip; +exports.zipObject = require_zipObject.zipObject; +exports.zipWith = require_zipWith.zipWith; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/index.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d9197bef13ddfe3ac5cd94728b0a3d5a55ca8f86 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/index.mjs @@ -0,0 +1,79 @@ +import { at } from "./array/at.mjs"; +import { cartesianProduct } from "./array/cartesianProduct.mjs"; +import { chunk } from "./array/chunk.mjs"; +import { chunkBy } from "./array/chunkBy.mjs"; +import { combinations } from "./array/combinations.mjs"; +import { compact } from "./array/compact.mjs"; +import { countBy } from "./array/countBy.mjs"; +import { difference } from "./array/difference.mjs"; +import { differenceBy } from "./array/differenceBy.mjs"; +import { differenceWith } from "./array/differenceWith.mjs"; +import { drop } from "./array/drop.mjs"; +import { dropRight } from "./array/dropRight.mjs"; +import { dropRightWhile } from "./array/dropRightWhile.mjs"; +import { dropWhile } from "./array/dropWhile.mjs"; +import { filter } from "./array/filter.mjs"; +import { find } from "./array/find.mjs"; +import { findIndex } from "./array/findIndex.mjs"; +import { findLast } from "./array/findLast.mjs"; +import { findLastIndex } from "./array/findLastIndex.mjs"; +import { flatMap } from "./array/flatMap.mjs"; +import { flatMapDeep } from "./array/flatMapDeep.mjs"; +import { flatten } from "./array/flatten.mjs"; +import { flattenDeep } from "./array/flattenDeep.mjs"; +import { forEach } from "./array/forEach.mjs"; +import { groupBy } from "./array/groupBy.mjs"; +import { head } from "./array/head.mjs"; +import { initial } from "./array/initial.mjs"; +import { intersection } from "./array/intersection.mjs"; +import { intersectionBy } from "./array/intersectionBy.mjs"; +import { intersectionWith } from "./array/intersectionWith.mjs"; +import { isSubset } from "./array/isSubset.mjs"; +import { isSubsetWith } from "./array/isSubsetWith.mjs"; +import { join } from "./array/join.mjs"; +import { keyBy } from "./array/keyBy.mjs"; +import { last } from "./array/last.mjs"; +import { length } from "./array/length.mjs"; +import { map } from "./array/map.mjs"; +import { maxBy } from "./array/maxBy.mjs"; +import { minBy } from "./array/minBy.mjs"; +import { orderBy } from "./array/orderBy.mjs"; +import { partition } from "./array/partition.mjs"; +import { reverse } from "./array/reverse.mjs"; +import { sample } from "./array/sample.mjs"; +import { sampleSize } from "./array/sampleSize.mjs"; +import { shuffle } from "./array/shuffle.mjs"; +import { sortBy } from "./array/sortBy.mjs"; +import { tail } from "./array/tail.mjs"; +import { take } from "./array/take.mjs"; +import { takeRight } from "./array/takeRight.mjs"; +import { takeRightWhile } from "./array/takeRightWhile.mjs"; +import { takeWhile } from "./array/takeWhile.mjs"; +import { toFilled } from "./array/toFilled.mjs"; +import { union } from "./array/union.mjs"; +import { unionBy } from "./array/unionBy.mjs"; +import { unionWith } from "./array/unionWith.mjs"; +import { uniq } from "./array/uniq.mjs"; +import { uniqBy } from "./array/uniqBy.mjs"; +import { uniqWith } from "./array/uniqWith.mjs"; +import { unzip } from "./array/unzip.mjs"; +import { unzipWith } from "./array/unzipWith.mjs"; +import { windowed } from "./array/windowed.mjs"; +import { without } from "./array/without.mjs"; +import { xor } from "./array/xor.mjs"; +import { xorBy } from "./array/xorBy.mjs"; +import { xorWith } from "./array/xorWith.mjs"; +import { zip } from "./array/zip.mjs"; +import { zipObject } from "./array/zipObject.mjs"; +import { zipWith } from "./array/zipWith.mjs"; +import "./array/index.mjs"; +import { pipe } from "./pipe.mjs"; +import { flow } from "./flow.mjs"; +import { flowAsync } from "./flowAsync.mjs"; +import { add } from "./math/add.mjs"; +import { multiply } from "./math/multiply.mjs"; +import "./math/index.mjs"; +import { omit } from "./object/omit.mjs"; +import { pick } from "./object/pick.mjs"; +import "./object/index.mjs"; +export { add, at, cartesianProduct, chunk, chunkBy, combinations, compact, countBy, difference, differenceBy, differenceWith, drop, dropRight, dropRightWhile, dropWhile, filter, find, findIndex, findLast, findLastIndex, flatMap, flatMapDeep, flatten, flattenDeep, flow, flowAsync, forEach, groupBy, head, initial, intersection, intersectionBy, intersectionWith, isSubset, isSubsetWith, join, keyBy, last, length, map, maxBy, minBy, multiply, omit, orderBy, partition, pick, pipe, reverse, sample, sampleSize, shuffle, sortBy, tail, take, takeRight, takeRightWhile, takeWhile, toFilled, union, unionBy, unionWith, uniq, uniqBy, uniqWith, unzip, unzipWith, windowed, without, xor, xorBy, xorWith, zip, zipObject, zipWith }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/cartesianProduct.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/cartesianProduct.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..760c9f32288c29358bfca3d729ea804a38d883eb --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/cartesianProduct.d.mts @@ -0,0 +1,23 @@ +//#region src/fp/iterator/cartesianProduct.d.ts +/** + * Creates a function that lazily takes the Cartesian product of the piped + * iterator and `other`, for use with {@link pipe}. Every element of the piped + * iterator is paired with every element of `other`, with `other` advancing + * fastest. `other` is buffered into an array when iteration starts, while the + * piped iterator is consumed lazily, so it may be infinite. + * + * @template T - The type of elements produced by the piped iterator. + * @template U - The type of elements produced by `other`. + * @param other - The iterator to take the product with. + * @returns A function mapping an `Iterator` to a lazy `IteratorObject<[T, U]>`. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { cartesianProduct, toArray } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2].values(), cartesianProduct(['a', 'b'].values()), toArray()); + * // => [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']] + */ +declare function cartesianProduct(other: Iterator): (source: Iterator) => IteratorObject<[T, U], undefined>; +//#endregion +export { cartesianProduct }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/cartesianProduct.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/cartesianProduct.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..760c9f32288c29358bfca3d729ea804a38d883eb --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/cartesianProduct.d.ts @@ -0,0 +1,23 @@ +//#region src/fp/iterator/cartesianProduct.d.ts +/** + * Creates a function that lazily takes the Cartesian product of the piped + * iterator and `other`, for use with {@link pipe}. Every element of the piped + * iterator is paired with every element of `other`, with `other` advancing + * fastest. `other` is buffered into an array when iteration starts, while the + * piped iterator is consumed lazily, so it may be infinite. + * + * @template T - The type of elements produced by the piped iterator. + * @template U - The type of elements produced by `other`. + * @param other - The iterator to take the product with. + * @returns A function mapping an `Iterator` to a lazy `IteratorObject<[T, U]>`. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { cartesianProduct, toArray } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2].values(), cartesianProduct(['a', 'b'].values()), toArray()); + * // => [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']] + */ +declare function cartesianProduct(other: Iterator): (source: Iterator) => IteratorObject<[T, U], undefined>; +//#endregion +export { cartesianProduct }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/cartesianProduct.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/cartesianProduct.js new file mode 100644 index 0000000000000000000000000000000000000000..049ad9936577e6f094687f7970795ca4be4276cd --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/cartesianProduct.js @@ -0,0 +1,28 @@ +const require_cartesianProduct = require("../../iterator/cartesianProduct.js"); +//#region src/fp/iterator/cartesianProduct.ts +/** +* Creates a function that lazily takes the Cartesian product of the piped +* iterator and `other`, for use with {@link pipe}. Every element of the piped +* iterator is paired with every element of `other`, with `other` advancing +* fastest. `other` is buffered into an array when iteration starts, while the +* piped iterator is consumed lazily, so it may be infinite. +* +* @template T - The type of elements produced by the piped iterator. +* @template U - The type of elements produced by `other`. +* @param other - The iterator to take the product with. +* @returns A function mapping an `Iterator` to a lazy `IteratorObject<[T, U]>`. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { cartesianProduct, toArray } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2].values(), cartesianProduct(['a', 'b'].values()), toArray()); +* // => [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']] +*/ +function cartesianProduct(other) { + return function cartesianProductInIterator(source) { + return require_cartesianProduct.cartesianProduct(source, other); + }; +} +//#endregion +exports.cartesianProduct = cartesianProduct; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/cartesianProduct.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/cartesianProduct.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c41117e8e80873201712c73f0407a9ccade581e8 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/cartesianProduct.mjs @@ -0,0 +1,28 @@ +import { cartesianProduct as cartesianProduct$1 } from "../../iterator/cartesianProduct.mjs"; +//#region src/fp/iterator/cartesianProduct.ts +/** +* Creates a function that lazily takes the Cartesian product of the piped +* iterator and `other`, for use with {@link pipe}. Every element of the piped +* iterator is paired with every element of `other`, with `other` advancing +* fastest. `other` is buffered into an array when iteration starts, while the +* piped iterator is consumed lazily, so it may be infinite. +* +* @template T - The type of elements produced by the piped iterator. +* @template U - The type of elements produced by `other`. +* @param other - The iterator to take the product with. +* @returns A function mapping an `Iterator` to a lazy `IteratorObject<[T, U]>`. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { cartesianProduct, toArray } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2].values(), cartesianProduct(['a', 'b'].values()), toArray()); +* // => [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']] +*/ +function cartesianProduct(other) { + return function cartesianProductInIterator(source) { + return cartesianProduct$1(source, other); + }; +} +//#endregion +export { cartesianProduct }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/chunk.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/chunk.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..d3fc345266960999e045e6ee5e9476d6c1a99e2d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/chunk.d.mts @@ -0,0 +1,19 @@ +//#region src/fp/iterator/chunk.d.ts +/** + * Creates a function that lazily groups the elements of an iterator into arrays + * of length `size`, for use with {@link pipe}. The final chunk may be shorter. + * + * @template T - The type of elements produced by the source iterator. + * @param size - The length of each chunk; must be an integer greater than zero. + * @returns A function mapping an `Iterator` to a lazy `IteratorObject`. + * @throws {Error} Throws an error if `size` is not an integer greater than zero. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { chunk, toArray } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3, 4, 5].values(), chunk(2), toArray()); // => [[1, 2], [3, 4], [5]] + */ +declare function chunk(size: number): (source: Iterator) => IteratorObject; +//#endregion +export { chunk }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/chunk.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/chunk.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d3fc345266960999e045e6ee5e9476d6c1a99e2d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/chunk.d.ts @@ -0,0 +1,19 @@ +//#region src/fp/iterator/chunk.d.ts +/** + * Creates a function that lazily groups the elements of an iterator into arrays + * of length `size`, for use with {@link pipe}. The final chunk may be shorter. + * + * @template T - The type of elements produced by the source iterator. + * @param size - The length of each chunk; must be an integer greater than zero. + * @returns A function mapping an `Iterator` to a lazy `IteratorObject`. + * @throws {Error} Throws an error if `size` is not an integer greater than zero. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { chunk, toArray } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3, 4, 5].values(), chunk(2), toArray()); // => [[1, 2], [3, 4], [5]] + */ +declare function chunk(size: number): (source: Iterator) => IteratorObject; +//#endregion +export { chunk }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/chunk.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/chunk.js new file mode 100644 index 0000000000000000000000000000000000000000..6d70a1ed33fc6545aa4f52fc23e54479f9b5061e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/chunk.js @@ -0,0 +1,24 @@ +const require_chunk = require("../../iterator/chunk.js"); +//#region src/fp/iterator/chunk.ts +/** +* Creates a function that lazily groups the elements of an iterator into arrays +* of length `size`, for use with {@link pipe}. The final chunk may be shorter. +* +* @template T - The type of elements produced by the source iterator. +* @param size - The length of each chunk; must be an integer greater than zero. +* @returns A function mapping an `Iterator` to a lazy `IteratorObject`. +* @throws {Error} Throws an error if `size` is not an integer greater than zero. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { chunk, toArray } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3, 4, 5].values(), chunk(2), toArray()); // => [[1, 2], [3, 4], [5]] +*/ +function chunk(size) { + return function chunkInIterator(source) { + return require_chunk.chunk(source, size); + }; +} +//#endregion +exports.chunk = chunk; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/chunk.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/chunk.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f78f332dd5c7e2ec1dd1098815914144a5c88d0b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/chunk.mjs @@ -0,0 +1,24 @@ +import { chunk as chunk$1 } from "../../iterator/chunk.mjs"; +//#region src/fp/iterator/chunk.ts +/** +* Creates a function that lazily groups the elements of an iterator into arrays +* of length `size`, for use with {@link pipe}. The final chunk may be shorter. +* +* @template T - The type of elements produced by the source iterator. +* @param size - The length of each chunk; must be an integer greater than zero. +* @returns A function mapping an `Iterator` to a lazy `IteratorObject`. +* @throws {Error} Throws an error if `size` is not an integer greater than zero. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { chunk, toArray } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3, 4, 5].values(), chunk(2), toArray()); // => [[1, 2], [3, 4], [5]] +*/ +function chunk(size) { + return function chunkInIterator(source) { + return chunk$1(source, size); + }; +} +//#endregion +export { chunk }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/count.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/count.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..117d9e43b78a2b84419e79daf7a2cb1d9f2ff9a1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/count.d.mts @@ -0,0 +1,20 @@ +//#region src/fp/iterator/count.d.ts +/** + * Creates a function that consumes an iterator and returns the number of + * elements it produces, for use as the terminal step of a {@link pipe}. + * + * This is a terminal operation: it pulls every element, so it must not be used + * on an infinite iterator. + * + * @template T - The type of elements produced by the source iterator. + * @returns A function mapping an `Iterator` to its element count. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { filter, count } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3, 4].values(), filter(x => x % 2 === 0), count()); // => 2 + */ +declare function count(): (source: Iterator) => number; +//#endregion +export { count }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/count.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/count.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..117d9e43b78a2b84419e79daf7a2cb1d9f2ff9a1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/count.d.ts @@ -0,0 +1,20 @@ +//#region src/fp/iterator/count.d.ts +/** + * Creates a function that consumes an iterator and returns the number of + * elements it produces, for use as the terminal step of a {@link pipe}. + * + * This is a terminal operation: it pulls every element, so it must not be used + * on an infinite iterator. + * + * @template T - The type of elements produced by the source iterator. + * @returns A function mapping an `Iterator` to its element count. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { filter, count } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3, 4].values(), filter(x => x % 2 === 0), count()); // => 2 + */ +declare function count(): (source: Iterator) => number; +//#endregion +export { count }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/count.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/count.js new file mode 100644 index 0000000000000000000000000000000000000000..009c1a6a9ff354c656c8407416699323b738006a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/count.js @@ -0,0 +1,25 @@ +const require_count = require("../../iterator/count.js"); +//#region src/fp/iterator/count.ts +/** +* Creates a function that consumes an iterator and returns the number of +* elements it produces, for use as the terminal step of a {@link pipe}. +* +* This is a terminal operation: it pulls every element, so it must not be used +* on an infinite iterator. +* +* @template T - The type of elements produced by the source iterator. +* @returns A function mapping an `Iterator` to its element count. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { filter, count } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3, 4].values(), filter(x => x % 2 === 0), count()); // => 2 +*/ +function count() { + return function countInIterator(source) { + return require_count.count(source); + }; +} +//#endregion +exports.count = count; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/count.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/count.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e244fcbb525cf81e2e7ecc319e8bdd64521ac350 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/count.mjs @@ -0,0 +1,25 @@ +import { count as count$1 } from "../../iterator/count.mjs"; +//#region src/fp/iterator/count.ts +/** +* Creates a function that consumes an iterator and returns the number of +* elements it produces, for use as the terminal step of a {@link pipe}. +* +* This is a terminal operation: it pulls every element, so it must not be used +* on an infinite iterator. +* +* @template T - The type of elements produced by the source iterator. +* @returns A function mapping an `Iterator` to its element count. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { filter, count } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3, 4].values(), filter(x => x % 2 === 0), count()); // => 2 +*/ +function count() { + return function countInIterator(source) { + return count$1(source); + }; +} +//#endregion +export { count }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/drop.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/drop.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..8ef4c51a092a63c5db441a9b0e014a8bc19615a7 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/drop.d.mts @@ -0,0 +1,20 @@ +//#region src/fp/iterator/drop.d.ts +/** + * Creates a function that lazily skips the first `count` elements of an iterator + * and yields the rest, for use with {@link pipe}. It delegates to the native + * `Iterator.prototype.drop`. + * + * @template T - The type of elements produced by the source iterator. + * @param count - The number of elements to skip; must be a non-negative integer. + * @returns A function mapping an `Iterator` to a lazy `IteratorObject`. + * @throws {RangeError} Throws if `count` is negative or `NaN` (native behavior). + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { drop } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3, 4, 5].values(), drop(2)).toArray(); // => [3, 4, 5] + */ +declare function drop(count: number): (source: Iterator) => IteratorObject; +//#endregion +export { drop }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/drop.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/drop.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8ef4c51a092a63c5db441a9b0e014a8bc19615a7 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/drop.d.ts @@ -0,0 +1,20 @@ +//#region src/fp/iterator/drop.d.ts +/** + * Creates a function that lazily skips the first `count` elements of an iterator + * and yields the rest, for use with {@link pipe}. It delegates to the native + * `Iterator.prototype.drop`. + * + * @template T - The type of elements produced by the source iterator. + * @param count - The number of elements to skip; must be a non-negative integer. + * @returns A function mapping an `Iterator` to a lazy `IteratorObject`. + * @throws {RangeError} Throws if `count` is negative or `NaN` (native behavior). + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { drop } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3, 4, 5].values(), drop(2)).toArray(); // => [3, 4, 5] + */ +declare function drop(count: number): (source: Iterator) => IteratorObject; +//#endregion +export { drop }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/drop.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/drop.js new file mode 100644 index 0000000000000000000000000000000000000000..8014a1dd908d74995bc910e1e433a808bd0fd1b3 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/drop.js @@ -0,0 +1,24 @@ +//#region src/fp/iterator/drop.ts +/** +* Creates a function that lazily skips the first `count` elements of an iterator +* and yields the rest, for use with {@link pipe}. It delegates to the native +* `Iterator.prototype.drop`. +* +* @template T - The type of elements produced by the source iterator. +* @param count - The number of elements to skip; must be a non-negative integer. +* @returns A function mapping an `Iterator` to a lazy `IteratorObject`. +* @throws {RangeError} Throws if `count` is negative or `NaN` (native behavior). +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { drop } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3, 4, 5].values(), drop(2)).toArray(); // => [3, 4, 5] +*/ +function drop(count) { + return function dropInIterator(source) { + return Iterator.from(source).drop(count); + }; +} +//#endregion +exports.drop = drop; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/drop.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/drop.mjs new file mode 100644 index 0000000000000000000000000000000000000000..6dfa8c185fd0419c70d7d4ed2ee8e1b95c39a5d7 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/drop.mjs @@ -0,0 +1,24 @@ +//#region src/fp/iterator/drop.ts +/** +* Creates a function that lazily skips the first `count` elements of an iterator +* and yields the rest, for use with {@link pipe}. It delegates to the native +* `Iterator.prototype.drop`. +* +* @template T - The type of elements produced by the source iterator. +* @param count - The number of elements to skip; must be a non-negative integer. +* @returns A function mapping an `Iterator` to a lazy `IteratorObject`. +* @throws {RangeError} Throws if `count` is negative or `NaN` (native behavior). +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { drop } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3, 4, 5].values(), drop(2)).toArray(); // => [3, 4, 5] +*/ +function drop(count) { + return function dropInIterator(source) { + return Iterator.from(source).drop(count); + }; +} +//#endregion +export { drop }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/dropWhile.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/dropWhile.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..94b3095147169bc08d8d4a307d44f500c80ef512 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/dropWhile.d.mts @@ -0,0 +1,18 @@ +//#region src/fp/iterator/dropWhile.d.ts +/** + * Creates a function that lazily skips elements of an iterator while `shouldDrop` + * returns truthy, then yields the rest, for use with {@link pipe}. + * + * @template T - The type of elements produced by the source iterator. + * @param shouldDrop - Called with `(value, index)`; elements are skipped while it returns truthy. + * @returns A function mapping an `Iterator` to a lazy `IteratorObject`. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { dropWhile, toArray } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3, 1].values(), dropWhile(x => x < 3), toArray()); // => [3, 1] + */ +declare function dropWhile(shouldDrop: (value: T, index: number) => boolean): (source: Iterator) => IteratorObject; +//#endregion +export { dropWhile }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/dropWhile.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/dropWhile.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..94b3095147169bc08d8d4a307d44f500c80ef512 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/dropWhile.d.ts @@ -0,0 +1,18 @@ +//#region src/fp/iterator/dropWhile.d.ts +/** + * Creates a function that lazily skips elements of an iterator while `shouldDrop` + * returns truthy, then yields the rest, for use with {@link pipe}. + * + * @template T - The type of elements produced by the source iterator. + * @param shouldDrop - Called with `(value, index)`; elements are skipped while it returns truthy. + * @returns A function mapping an `Iterator` to a lazy `IteratorObject`. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { dropWhile, toArray } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3, 1].values(), dropWhile(x => x < 3), toArray()); // => [3, 1] + */ +declare function dropWhile(shouldDrop: (value: T, index: number) => boolean): (source: Iterator) => IteratorObject; +//#endregion +export { dropWhile }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/dropWhile.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/dropWhile.js new file mode 100644 index 0000000000000000000000000000000000000000..6d02b1b08878cc66d935cb45f21db6af35575c9e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/dropWhile.js @@ -0,0 +1,23 @@ +const require_dropWhile = require("../../iterator/dropWhile.js"); +//#region src/fp/iterator/dropWhile.ts +/** +* Creates a function that lazily skips elements of an iterator while `shouldDrop` +* returns truthy, then yields the rest, for use with {@link pipe}. +* +* @template T - The type of elements produced by the source iterator. +* @param shouldDrop - Called with `(value, index)`; elements are skipped while it returns truthy. +* @returns A function mapping an `Iterator` to a lazy `IteratorObject`. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { dropWhile, toArray } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3, 1].values(), dropWhile(x => x < 3), toArray()); // => [3, 1] +*/ +function dropWhile(shouldDrop) { + return function dropWhileInIterator(source) { + return require_dropWhile.dropWhile(source, shouldDrop); + }; +} +//#endregion +exports.dropWhile = dropWhile; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/dropWhile.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/dropWhile.mjs new file mode 100644 index 0000000000000000000000000000000000000000..2e7eed5ebbec143a445be0c059719a417449504f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/dropWhile.mjs @@ -0,0 +1,23 @@ +import { dropWhile as dropWhile$1 } from "../../iterator/dropWhile.mjs"; +//#region src/fp/iterator/dropWhile.ts +/** +* Creates a function that lazily skips elements of an iterator while `shouldDrop` +* returns truthy, then yields the rest, for use with {@link pipe}. +* +* @template T - The type of elements produced by the source iterator. +* @param shouldDrop - Called with `(value, index)`; elements are skipped while it returns truthy. +* @returns A function mapping an `Iterator` to a lazy `IteratorObject`. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { dropWhile, toArray } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3, 1].values(), dropWhile(x => x < 3), toArray()); // => [3, 1] +*/ +function dropWhile(shouldDrop) { + return function dropWhileInIterator(source) { + return dropWhile$1(source, shouldDrop); + }; +} +//#endregion +export { dropWhile }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/every.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/every.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..0d256484f8e81c3985a5e86cee0092c980d895ae --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/every.d.mts @@ -0,0 +1,20 @@ +//#region src/fp/iterator/every.d.ts +/** + * Creates a function that consumes an iterator until `predicate` returns falsy + * and reports whether every element matched, for use as the terminal step of a + * {@link pipe}. It delegates to the native `Iterator.prototype.every` and stops + * pulling at the first non-match. + * + * @template T - The type of elements produced by the source iterator. + * @param predicate - Called with `(value, index)`; falsy short-circuits to `false`. + * @returns A function mapping an `Iterator` to a boolean. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { every } from 'es-toolkit/fp/iterator'; + * + * pipe([2, 4, 6].values(), every(x => x % 2 === 0)); // => true + */ +declare function every(predicate: (value: T, index: number) => unknown): (source: Iterator) => boolean; +//#endregion +export { every }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/every.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/every.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0d256484f8e81c3985a5e86cee0092c980d895ae --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/every.d.ts @@ -0,0 +1,20 @@ +//#region src/fp/iterator/every.d.ts +/** + * Creates a function that consumes an iterator until `predicate` returns falsy + * and reports whether every element matched, for use as the terminal step of a + * {@link pipe}. It delegates to the native `Iterator.prototype.every` and stops + * pulling at the first non-match. + * + * @template T - The type of elements produced by the source iterator. + * @param predicate - Called with `(value, index)`; falsy short-circuits to `false`. + * @returns A function mapping an `Iterator` to a boolean. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { every } from 'es-toolkit/fp/iterator'; + * + * pipe([2, 4, 6].values(), every(x => x % 2 === 0)); // => true + */ +declare function every(predicate: (value: T, index: number) => unknown): (source: Iterator) => boolean; +//#endregion +export { every }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/every.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/every.js new file mode 100644 index 0000000000000000000000000000000000000000..add9ffab8b19ea3ad608fd8e9586240cd65958ba --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/every.js @@ -0,0 +1,24 @@ +//#region src/fp/iterator/every.ts +/** +* Creates a function that consumes an iterator until `predicate` returns falsy +* and reports whether every element matched, for use as the terminal step of a +* {@link pipe}. It delegates to the native `Iterator.prototype.every` and stops +* pulling at the first non-match. +* +* @template T - The type of elements produced by the source iterator. +* @param predicate - Called with `(value, index)`; falsy short-circuits to `false`. +* @returns A function mapping an `Iterator` to a boolean. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { every } from 'es-toolkit/fp/iterator'; +* +* pipe([2, 4, 6].values(), every(x => x % 2 === 0)); // => true +*/ +function every(predicate) { + return function everyInIterator(source) { + return Iterator.from(source).every(predicate); + }; +} +//#endregion +exports.every = every; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/every.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/every.mjs new file mode 100644 index 0000000000000000000000000000000000000000..df06e79046b3d470aaa98c9ba53d7562a9792705 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/every.mjs @@ -0,0 +1,24 @@ +//#region src/fp/iterator/every.ts +/** +* Creates a function that consumes an iterator until `predicate` returns falsy +* and reports whether every element matched, for use as the terminal step of a +* {@link pipe}. It delegates to the native `Iterator.prototype.every` and stops +* pulling at the first non-match. +* +* @template T - The type of elements produced by the source iterator. +* @param predicate - Called with `(value, index)`; falsy short-circuits to `false`. +* @returns A function mapping an `Iterator` to a boolean. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { every } from 'es-toolkit/fp/iterator'; +* +* pipe([2, 4, 6].values(), every(x => x % 2 === 0)); // => true +*/ +function every(predicate) { + return function everyInIterator(source) { + return Iterator.from(source).every(predicate); + }; +} +//#endregion +export { every }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/filter.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/filter.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..780244e9e96d85381d90995cf5fe1c5dcee66778 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/filter.d.mts @@ -0,0 +1,37 @@ +//#region src/fp/iterator/filter.d.ts +/** + * Creates a function that lazily keeps the elements of an iterator for which + * `predicate` returns truthy, narrowing the element type when `predicate` is a + * type guard. For use with {@link pipe}. It delegates to the native + * `Iterator.prototype.filter`. + * + * @template T - The type of elements produced by the source iterator. + * @template S - The narrowed element type when `predicate` is a type guard. + * @param predicate - Called with `(value, index)`; truthy keeps the element. + * @returns A function mapping an `Iterator` to a lazy `IteratorObject`. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { filter } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3, 4].values(), filter(x => x % 2 === 0)).toArray(); // => [2, 4] + */ +declare function filter(predicate: (value: T, index: number) => value is S): (source: Iterator) => IteratorObject; +/** + * Creates a function that lazily keeps the elements of an iterator for which + * `predicate` returns truthy, for use with {@link pipe}. It delegates to the + * native `Iterator.prototype.filter`. + * + * @template T - The type of elements produced by the source iterator. + * @param predicate - Called with `(value, index)`; truthy keeps the element. + * @returns A function mapping an `Iterator` to a lazy `IteratorObject`. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { filter } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3, 4].values(), filter(x => x % 2 === 0)).toArray(); // => [2, 4] + */ +declare function filter(predicate: (value: T, index: number) => unknown): (source: Iterator) => IteratorObject; +//#endregion +export { filter }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/filter.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/filter.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..780244e9e96d85381d90995cf5fe1c5dcee66778 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/filter.d.ts @@ -0,0 +1,37 @@ +//#region src/fp/iterator/filter.d.ts +/** + * Creates a function that lazily keeps the elements of an iterator for which + * `predicate` returns truthy, narrowing the element type when `predicate` is a + * type guard. For use with {@link pipe}. It delegates to the native + * `Iterator.prototype.filter`. + * + * @template T - The type of elements produced by the source iterator. + * @template S - The narrowed element type when `predicate` is a type guard. + * @param predicate - Called with `(value, index)`; truthy keeps the element. + * @returns A function mapping an `Iterator` to a lazy `IteratorObject`. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { filter } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3, 4].values(), filter(x => x % 2 === 0)).toArray(); // => [2, 4] + */ +declare function filter(predicate: (value: T, index: number) => value is S): (source: Iterator) => IteratorObject; +/** + * Creates a function that lazily keeps the elements of an iterator for which + * `predicate` returns truthy, for use with {@link pipe}. It delegates to the + * native `Iterator.prototype.filter`. + * + * @template T - The type of elements produced by the source iterator. + * @param predicate - Called with `(value, index)`; truthy keeps the element. + * @returns A function mapping an `Iterator` to a lazy `IteratorObject`. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { filter } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3, 4].values(), filter(x => x % 2 === 0)).toArray(); // => [2, 4] + */ +declare function filter(predicate: (value: T, index: number) => unknown): (source: Iterator) => IteratorObject; +//#endregion +export { filter }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/filter.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/filter.js new file mode 100644 index 0000000000000000000000000000000000000000..8e545b34b0f79cf368be05eda8f7a0c51adc5a69 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/filter.js @@ -0,0 +1,8 @@ +//#region src/fp/iterator/filter.ts +function filter(predicate) { + return function filterInIterator(source) { + return Iterator.from(source).filter(predicate); + }; +} +//#endregion +exports.filter = filter; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/filter.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/filter.mjs new file mode 100644 index 0000000000000000000000000000000000000000..bfb2e4a9f72622a224fc52d61faed8c839d7a69c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/filter.mjs @@ -0,0 +1,8 @@ +//#region src/fp/iterator/filter.ts +function filter(predicate) { + return function filterInIterator(source) { + return Iterator.from(source).filter(predicate); + }; +} +//#endregion +export { filter }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/find.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/find.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..e8b3ef3a11455f05635ef054b6b8b64a4a072030 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/find.d.mts @@ -0,0 +1,20 @@ +//#region src/fp/iterator/find.d.ts +/** + * Creates a function that consumes an iterator until `predicate` returns truthy + * and returns that element (or `undefined` if none match), for use as the + * terminal step of a {@link pipe}. It delegates to the native + * `Iterator.prototype.find` and stops pulling at the first match. + * + * @template T - The type of elements produced by the source iterator. + * @param predicate - Called with `(value, index)`; truthy selects the element. + * @returns A function mapping an `Iterator` to the matching element or `undefined`. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { find } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3, 4].values(), find(x => x > 2)); // => 3 + */ +declare function find(predicate: (value: T, index: number) => unknown): (source: Iterator) => T | undefined; +//#endregion +export { find }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/find.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/find.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e8b3ef3a11455f05635ef054b6b8b64a4a072030 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/find.d.ts @@ -0,0 +1,20 @@ +//#region src/fp/iterator/find.d.ts +/** + * Creates a function that consumes an iterator until `predicate` returns truthy + * and returns that element (or `undefined` if none match), for use as the + * terminal step of a {@link pipe}. It delegates to the native + * `Iterator.prototype.find` and stops pulling at the first match. + * + * @template T - The type of elements produced by the source iterator. + * @param predicate - Called with `(value, index)`; truthy selects the element. + * @returns A function mapping an `Iterator` to the matching element or `undefined`. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { find } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3, 4].values(), find(x => x > 2)); // => 3 + */ +declare function find(predicate: (value: T, index: number) => unknown): (source: Iterator) => T | undefined; +//#endregion +export { find }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/find.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/find.js new file mode 100644 index 0000000000000000000000000000000000000000..5ef7cd569eaad703106c641656c8617f276487fb --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/find.js @@ -0,0 +1,24 @@ +//#region src/fp/iterator/find.ts +/** +* Creates a function that consumes an iterator until `predicate` returns truthy +* and returns that element (or `undefined` if none match), for use as the +* terminal step of a {@link pipe}. It delegates to the native +* `Iterator.prototype.find` and stops pulling at the first match. +* +* @template T - The type of elements produced by the source iterator. +* @param predicate - Called with `(value, index)`; truthy selects the element. +* @returns A function mapping an `Iterator` to the matching element or `undefined`. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { find } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3, 4].values(), find(x => x > 2)); // => 3 +*/ +function find(predicate) { + return function findInIterator(source) { + return Iterator.from(source).find(predicate); + }; +} +//#endregion +exports.find = find; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/find.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/find.mjs new file mode 100644 index 0000000000000000000000000000000000000000..1ee4d09ad19db5d3e247ac5cf53248f34820a153 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/find.mjs @@ -0,0 +1,24 @@ +//#region src/fp/iterator/find.ts +/** +* Creates a function that consumes an iterator until `predicate` returns truthy +* and returns that element (or `undefined` if none match), for use as the +* terminal step of a {@link pipe}. It delegates to the native +* `Iterator.prototype.find` and stops pulling at the first match. +* +* @template T - The type of elements produced by the source iterator. +* @param predicate - Called with `(value, index)`; truthy selects the element. +* @returns A function mapping an `Iterator` to the matching element or `undefined`. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { find } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3, 4].values(), find(x => x > 2)); // => 3 +*/ +function find(predicate) { + return function findInIterator(source) { + return Iterator.from(source).find(predicate); + }; +} +//#endregion +export { find }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/flatMap.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/flatMap.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..ae1fad903177844e63a10f1873bc33f69c5a6f8a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/flatMap.d.mts @@ -0,0 +1,20 @@ +//#region src/fp/iterator/flatMap.d.ts +/** + * Creates a function that lazily maps each element of an iterator to an iterable + * (or iterator) and flattens the results one level, for use with {@link pipe}. + * It delegates to the native `Iterator.prototype.flatMap`. + * + * @template T - The type of elements produced by the source iterator. + * @template U - The type of elements produced by the result. + * @param callback - Called with `(value, index)`; returns the iterable to flatten in. + * @returns A function mapping an `Iterator` to a lazy `IteratorObject`. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { flatMap } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2].values(), flatMap(x => [x, x * 10])).toArray(); // => [1, 10, 2, 20] + */ +declare function flatMap(callback: (value: T, index: number) => Iterator | Iterable): (source: Iterator) => IteratorObject; +//#endregion +export { flatMap }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/flatMap.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/flatMap.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ae1fad903177844e63a10f1873bc33f69c5a6f8a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/flatMap.d.ts @@ -0,0 +1,20 @@ +//#region src/fp/iterator/flatMap.d.ts +/** + * Creates a function that lazily maps each element of an iterator to an iterable + * (or iterator) and flattens the results one level, for use with {@link pipe}. + * It delegates to the native `Iterator.prototype.flatMap`. + * + * @template T - The type of elements produced by the source iterator. + * @template U - The type of elements produced by the result. + * @param callback - Called with `(value, index)`; returns the iterable to flatten in. + * @returns A function mapping an `Iterator` to a lazy `IteratorObject`. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { flatMap } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2].values(), flatMap(x => [x, x * 10])).toArray(); // => [1, 10, 2, 20] + */ +declare function flatMap(callback: (value: T, index: number) => Iterator | Iterable): (source: Iterator) => IteratorObject; +//#endregion +export { flatMap }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/flatMap.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/flatMap.js new file mode 100644 index 0000000000000000000000000000000000000000..dd62215c21f4efd5e3a1522307fab69fe78b7332 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/flatMap.js @@ -0,0 +1,24 @@ +//#region src/fp/iterator/flatMap.ts +/** +* Creates a function that lazily maps each element of an iterator to an iterable +* (or iterator) and flattens the results one level, for use with {@link pipe}. +* It delegates to the native `Iterator.prototype.flatMap`. +* +* @template T - The type of elements produced by the source iterator. +* @template U - The type of elements produced by the result. +* @param callback - Called with `(value, index)`; returns the iterable to flatten in. +* @returns A function mapping an `Iterator` to a lazy `IteratorObject`. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { flatMap } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2].values(), flatMap(x => [x, x * 10])).toArray(); // => [1, 10, 2, 20] +*/ +function flatMap(callback) { + return function flatMapInIterator(source) { + return Iterator.from(source).flatMap(callback); + }; +} +//#endregion +exports.flatMap = flatMap; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/flatMap.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/flatMap.mjs new file mode 100644 index 0000000000000000000000000000000000000000..97a371928f281e00c95348bb0eafdba26a93f367 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/flatMap.mjs @@ -0,0 +1,24 @@ +//#region src/fp/iterator/flatMap.ts +/** +* Creates a function that lazily maps each element of an iterator to an iterable +* (or iterator) and flattens the results one level, for use with {@link pipe}. +* It delegates to the native `Iterator.prototype.flatMap`. +* +* @template T - The type of elements produced by the source iterator. +* @template U - The type of elements produced by the result. +* @param callback - Called with `(value, index)`; returns the iterable to flatten in. +* @returns A function mapping an `Iterator` to a lazy `IteratorObject`. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { flatMap } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2].values(), flatMap(x => [x, x * 10])).toArray(); // => [1, 10, 2, 20] +*/ +function flatMap(callback) { + return function flatMapInIterator(source) { + return Iterator.from(source).flatMap(callback); + }; +} +//#endregion +export { flatMap }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/forEach.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/forEach.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..72a884313fe5d45b2843e157fd06c22dc5214b08 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/forEach.d.mts @@ -0,0 +1,22 @@ +//#region src/fp/iterator/forEach.d.ts +/** + * Creates a function that consumes an iterator and runs `callback` for each + * element, for use as the terminal step of a {@link pipe}. It delegates to the + * native `Iterator.prototype.forEach`. + * + * This is a terminal operation: it pulls every element, so it must not be used + * on an infinite iterator. + * + * @template T - The type of elements produced by the source iterator. + * @param callback - Called with `(value, index)` for each element. + * @returns A function mapping an `Iterator` to `void`. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { forEach } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3].values(), forEach(x => console.log(x))); // logs 1, 2, 3 + */ +declare function forEach(callback: (value: T, index: number) => void): (source: Iterator) => void; +//#endregion +export { forEach }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/forEach.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/forEach.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..72a884313fe5d45b2843e157fd06c22dc5214b08 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/forEach.d.ts @@ -0,0 +1,22 @@ +//#region src/fp/iterator/forEach.d.ts +/** + * Creates a function that consumes an iterator and runs `callback` for each + * element, for use as the terminal step of a {@link pipe}. It delegates to the + * native `Iterator.prototype.forEach`. + * + * This is a terminal operation: it pulls every element, so it must not be used + * on an infinite iterator. + * + * @template T - The type of elements produced by the source iterator. + * @param callback - Called with `(value, index)` for each element. + * @returns A function mapping an `Iterator` to `void`. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { forEach } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3].values(), forEach(x => console.log(x))); // logs 1, 2, 3 + */ +declare function forEach(callback: (value: T, index: number) => void): (source: Iterator) => void; +//#endregion +export { forEach }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/forEach.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/forEach.js new file mode 100644 index 0000000000000000000000000000000000000000..6a2c542b2c864b471555c6bbbc1b7cb4b73104ce --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/forEach.js @@ -0,0 +1,26 @@ +//#region src/fp/iterator/forEach.ts +/** +* Creates a function that consumes an iterator and runs `callback` for each +* element, for use as the terminal step of a {@link pipe}. It delegates to the +* native `Iterator.prototype.forEach`. +* +* This is a terminal operation: it pulls every element, so it must not be used +* on an infinite iterator. +* +* @template T - The type of elements produced by the source iterator. +* @param callback - Called with `(value, index)` for each element. +* @returns A function mapping an `Iterator` to `void`. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { forEach } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3].values(), forEach(x => console.log(x))); // logs 1, 2, 3 +*/ +function forEach(callback) { + return function forEachInIterator(source) { + Iterator.from(source).forEach(callback); + }; +} +//#endregion +exports.forEach = forEach; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/forEach.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/forEach.mjs new file mode 100644 index 0000000000000000000000000000000000000000..809eb8c92e086c002843471869794b2ee29ad968 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/forEach.mjs @@ -0,0 +1,26 @@ +//#region src/fp/iterator/forEach.ts +/** +* Creates a function that consumes an iterator and runs `callback` for each +* element, for use as the terminal step of a {@link pipe}. It delegates to the +* native `Iterator.prototype.forEach`. +* +* This is a terminal operation: it pulls every element, so it must not be used +* on an infinite iterator. +* +* @template T - The type of elements produced by the source iterator. +* @param callback - Called with `(value, index)` for each element. +* @returns A function mapping an `Iterator` to `void`. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { forEach } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3].values(), forEach(x => console.log(x))); // logs 1, 2, 3 +*/ +function forEach(callback) { + return function forEachInIterator(source) { + Iterator.from(source).forEach(callback); + }; +} +//#endregion +export { forEach }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/head.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/head.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..8f1abf9afabd6def255d7911c20103cadafc05f1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/head.d.mts @@ -0,0 +1,19 @@ +//#region src/fp/iterator/head.d.ts +/** + * Creates a function that returns the first element of an iterator (or + * `undefined` if it is empty), for use as the terminal step of a {@link pipe}. + * It pulls a single element and then closes the source via its `return` method, + * so it is safe on an infinite iterator. + * + * @template T - The type of elements produced by the source iterator. + * @returns A function mapping an `Iterator` to its first element or `undefined`. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { filter, head } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3, 4].values(), filter(x => x % 2 === 0), head()); // => 2 + */ +declare function head(): (source: Iterator) => T | undefined; +//#endregion +export { head }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/head.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/head.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8f1abf9afabd6def255d7911c20103cadafc05f1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/head.d.ts @@ -0,0 +1,19 @@ +//#region src/fp/iterator/head.d.ts +/** + * Creates a function that returns the first element of an iterator (or + * `undefined` if it is empty), for use as the terminal step of a {@link pipe}. + * It pulls a single element and then closes the source via its `return` method, + * so it is safe on an infinite iterator. + * + * @template T - The type of elements produced by the source iterator. + * @returns A function mapping an `Iterator` to its first element or `undefined`. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { filter, head } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3, 4].values(), filter(x => x % 2 === 0), head()); // => 2 + */ +declare function head(): (source: Iterator) => T | undefined; +//#endregion +export { head }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/head.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/head.js new file mode 100644 index 0000000000000000000000000000000000000000..60f24be6b24b5d384512d6a18460990126c858de --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/head.js @@ -0,0 +1,24 @@ +const require_head = require("../../iterator/head.js"); +//#region src/fp/iterator/head.ts +/** +* Creates a function that returns the first element of an iterator (or +* `undefined` if it is empty), for use as the terminal step of a {@link pipe}. +* It pulls a single element and then closes the source via its `return` method, +* so it is safe on an infinite iterator. +* +* @template T - The type of elements produced by the source iterator. +* @returns A function mapping an `Iterator` to its first element or `undefined`. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { filter, head } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3, 4].values(), filter(x => x % 2 === 0), head()); // => 2 +*/ +function head() { + return function headInIterator(source) { + return require_head.head(source); + }; +} +//#endregion +exports.head = head; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/head.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/head.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e3c75c3027694499cb232122260bce8564422fa4 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/head.mjs @@ -0,0 +1,24 @@ +import { head as head$1 } from "../../iterator/head.mjs"; +//#region src/fp/iterator/head.ts +/** +* Creates a function that returns the first element of an iterator (or +* `undefined` if it is empty), for use as the terminal step of a {@link pipe}. +* It pulls a single element and then closes the source via its `return` method, +* so it is safe on an infinite iterator. +* +* @template T - The type of elements produced by the source iterator. +* @returns A function mapping an `Iterator` to its first element or `undefined`. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { filter, head } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3, 4].values(), filter(x => x % 2 === 0), head()); // => 2 +*/ +function head() { + return function headInIterator(source) { + return head$1(source); + }; +} +//#endregion +export { head }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/index.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..b00b407359b8d53315430218a58da9775c0c439b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/index.d.mts @@ -0,0 +1,22 @@ +import { cartesianProduct } from "./cartesianProduct.mjs"; +import { chunk } from "./chunk.mjs"; +import { count } from "./count.mjs"; +import { drop } from "./drop.mjs"; +import { dropWhile } from "./dropWhile.mjs"; +import { every } from "./every.mjs"; +import { filter } from "./filter.mjs"; +import { find } from "./find.mjs"; +import { flatMap } from "./flatMap.mjs"; +import { forEach } from "./forEach.mjs"; +import { head } from "./head.mjs"; +import { map } from "./map.mjs"; +import { partition } from "./partition.mjs"; +import { reduce } from "./reduce.mjs"; +import { scan } from "./scan.mjs"; +import { some } from "./some.mjs"; +import { take } from "./take.mjs"; +import { takeWhile } from "./takeWhile.mjs"; +import { toArray } from "./toArray.mjs"; +import { uniqBy } from "./uniqBy.mjs"; +import { zip } from "./zip.mjs"; +export { cartesianProduct, chunk, count, drop, dropWhile, every, filter, find, flatMap, forEach, head, map, partition, reduce, scan, some, take, takeWhile, toArray, uniqBy, zip }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/index.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a232c7b0227ec3430b1de370e099c2f16762cda2 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/index.d.ts @@ -0,0 +1,22 @@ +import { cartesianProduct } from "./cartesianProduct.js"; +import { chunk } from "./chunk.js"; +import { count } from "./count.js"; +import { drop } from "./drop.js"; +import { dropWhile } from "./dropWhile.js"; +import { every } from "./every.js"; +import { filter } from "./filter.js"; +import { find } from "./find.js"; +import { flatMap } from "./flatMap.js"; +import { forEach } from "./forEach.js"; +import { head } from "./head.js"; +import { map } from "./map.js"; +import { partition } from "./partition.js"; +import { reduce } from "./reduce.js"; +import { scan } from "./scan.js"; +import { some } from "./some.js"; +import { take } from "./take.js"; +import { takeWhile } from "./takeWhile.js"; +import { toArray } from "./toArray.js"; +import { uniqBy } from "./uniqBy.js"; +import { zip } from "./zip.js"; +export { cartesianProduct, chunk, count, drop, dropWhile, every, filter, find, flatMap, forEach, head, map, partition, reduce, scan, some, take, takeWhile, toArray, uniqBy, zip }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/index.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/index.js new file mode 100644 index 0000000000000000000000000000000000000000..8b897060a8901a9528dbfd9b36a5216fbb26b251 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/index.js @@ -0,0 +1,43 @@ +Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); +const require_cartesianProduct = require("./cartesianProduct.js"); +const require_chunk = require("./chunk.js"); +const require_count = require("./count.js"); +const require_drop = require("./drop.js"); +const require_dropWhile = require("./dropWhile.js"); +const require_every = require("./every.js"); +const require_filter = require("./filter.js"); +const require_find = require("./find.js"); +const require_flatMap = require("./flatMap.js"); +const require_forEach = require("./forEach.js"); +const require_head = require("./head.js"); +const require_map = require("./map.js"); +const require_partition = require("./partition.js"); +const require_reduce = require("./reduce.js"); +const require_scan = require("./scan.js"); +const require_some = require("./some.js"); +const require_take = require("./take.js"); +const require_takeWhile = require("./takeWhile.js"); +const require_toArray = require("./toArray.js"); +const require_uniqBy = require("./uniqBy.js"); +const require_zip = require("./zip.js"); +exports.cartesianProduct = require_cartesianProduct.cartesianProduct; +exports.chunk = require_chunk.chunk; +exports.count = require_count.count; +exports.drop = require_drop.drop; +exports.dropWhile = require_dropWhile.dropWhile; +exports.every = require_every.every; +exports.filter = require_filter.filter; +exports.find = require_find.find; +exports.flatMap = require_flatMap.flatMap; +exports.forEach = require_forEach.forEach; +exports.head = require_head.head; +exports.map = require_map.map; +exports.partition = require_partition.partition; +exports.reduce = require_reduce.reduce; +exports.scan = require_scan.scan; +exports.some = require_some.some; +exports.take = require_take.take; +exports.takeWhile = require_takeWhile.takeWhile; +exports.toArray = require_toArray.toArray; +exports.uniqBy = require_uniqBy.uniqBy; +exports.zip = require_zip.zip; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/index.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..351edf2f90d06e0d5b8b0ace1bc0551b954c3659 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/index.mjs @@ -0,0 +1,22 @@ +import { cartesianProduct } from "./cartesianProduct.mjs"; +import { chunk } from "./chunk.mjs"; +import { count } from "./count.mjs"; +import { drop } from "./drop.mjs"; +import { dropWhile } from "./dropWhile.mjs"; +import { every } from "./every.mjs"; +import { filter } from "./filter.mjs"; +import { find } from "./find.mjs"; +import { flatMap } from "./flatMap.mjs"; +import { forEach } from "./forEach.mjs"; +import { head } from "./head.mjs"; +import { map } from "./map.mjs"; +import { partition } from "./partition.mjs"; +import { reduce } from "./reduce.mjs"; +import { scan } from "./scan.mjs"; +import { some } from "./some.mjs"; +import { take } from "./take.mjs"; +import { takeWhile } from "./takeWhile.mjs"; +import { toArray } from "./toArray.mjs"; +import { uniqBy } from "./uniqBy.mjs"; +import { zip } from "./zip.mjs"; +export { cartesianProduct, chunk, count, drop, dropWhile, every, filter, find, flatMap, forEach, head, map, partition, reduce, scan, some, take, takeWhile, toArray, uniqBy, zip }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/map.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/map.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..eab06dcbc596ef69adfebc203017efaa0ba29f85 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/map.d.mts @@ -0,0 +1,20 @@ +//#region src/fp/iterator/map.d.ts +/** + * Creates a function that lazily transforms each element of an iterator with + * `callback`, for use with {@link pipe}. It delegates to the native + * `Iterator.prototype.map`, so the result is a lazy, single-shot iterator. + * + * @template T - The type of elements produced by the source iterator. + * @template U - The type of elements produced by the result. + * @param callback - Called with `(value, index)`; its return value is yielded. + * @returns A function mapping an `Iterator` to a lazy `IteratorObject`. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { map } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3].values(), map(x => x * 2)).toArray(); // => [2, 4, 6] + */ +declare function map(callback: (value: T, index: number) => U): (source: Iterator) => IteratorObject; +//#endregion +export { map }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/map.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/map.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..eab06dcbc596ef69adfebc203017efaa0ba29f85 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/map.d.ts @@ -0,0 +1,20 @@ +//#region src/fp/iterator/map.d.ts +/** + * Creates a function that lazily transforms each element of an iterator with + * `callback`, for use with {@link pipe}. It delegates to the native + * `Iterator.prototype.map`, so the result is a lazy, single-shot iterator. + * + * @template T - The type of elements produced by the source iterator. + * @template U - The type of elements produced by the result. + * @param callback - Called with `(value, index)`; its return value is yielded. + * @returns A function mapping an `Iterator` to a lazy `IteratorObject`. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { map } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3].values(), map(x => x * 2)).toArray(); // => [2, 4, 6] + */ +declare function map(callback: (value: T, index: number) => U): (source: Iterator) => IteratorObject; +//#endregion +export { map }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/map.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/map.js new file mode 100644 index 0000000000000000000000000000000000000000..13b0403d08182b09e4ceaa0ab80d6637831ac87e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/map.js @@ -0,0 +1,24 @@ +//#region src/fp/iterator/map.ts +/** +* Creates a function that lazily transforms each element of an iterator with +* `callback`, for use with {@link pipe}. It delegates to the native +* `Iterator.prototype.map`, so the result is a lazy, single-shot iterator. +* +* @template T - The type of elements produced by the source iterator. +* @template U - The type of elements produced by the result. +* @param callback - Called with `(value, index)`; its return value is yielded. +* @returns A function mapping an `Iterator` to a lazy `IteratorObject`. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { map } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3].values(), map(x => x * 2)).toArray(); // => [2, 4, 6] +*/ +function map(callback) { + return function mapInIterator(source) { + return Iterator.from(source).map(callback); + }; +} +//#endregion +exports.map = map; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/map.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/map.mjs new file mode 100644 index 0000000000000000000000000000000000000000..9e9a000e401e999842de87934bddd0377fbcb95d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/map.mjs @@ -0,0 +1,24 @@ +//#region src/fp/iterator/map.ts +/** +* Creates a function that lazily transforms each element of an iterator with +* `callback`, for use with {@link pipe}. It delegates to the native +* `Iterator.prototype.map`, so the result is a lazy, single-shot iterator. +* +* @template T - The type of elements produced by the source iterator. +* @template U - The type of elements produced by the result. +* @param callback - Called with `(value, index)`; its return value is yielded. +* @returns A function mapping an `Iterator` to a lazy `IteratorObject`. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { map } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3].values(), map(x => x * 2)).toArray(); // => [2, 4, 6] +*/ +function map(callback) { + return function mapInIterator(source) { + return Iterator.from(source).map(callback); + }; +} +//#endregion +export { map }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/partition.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/partition.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..a7c103ceb4f458723354ae6fa39e5907669cb47d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/partition.d.mts @@ -0,0 +1,22 @@ +//#region src/fp/iterator/partition.d.ts +/** + * Creates a function that consumes an iterator and splits its elements into + * `[matched, unmatched]` arrays by `predicate`, for use as the terminal step of + * a {@link pipe}. + * + * This is a terminal operation: it pulls every element, so it must not be used + * on an infinite iterator. + * + * @template T - The type of elements produced by the source iterator. + * @param predicate - Called with `(value, index)`; truthy sends the element to the first array. + * @returns A function mapping an `Iterator` to a `[T[], T[]]` tuple. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { partition } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3, 4].values(), partition(x => x % 2 === 0)); // => [[2, 4], [1, 3]] + */ +declare function partition(predicate: (value: T, index: number) => boolean): (source: Iterator) => [T[], T[]]; +//#endregion +export { partition }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/partition.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/partition.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a7c103ceb4f458723354ae6fa39e5907669cb47d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/partition.d.ts @@ -0,0 +1,22 @@ +//#region src/fp/iterator/partition.d.ts +/** + * Creates a function that consumes an iterator and splits its elements into + * `[matched, unmatched]` arrays by `predicate`, for use as the terminal step of + * a {@link pipe}. + * + * This is a terminal operation: it pulls every element, so it must not be used + * on an infinite iterator. + * + * @template T - The type of elements produced by the source iterator. + * @param predicate - Called with `(value, index)`; truthy sends the element to the first array. + * @returns A function mapping an `Iterator` to a `[T[], T[]]` tuple. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { partition } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3, 4].values(), partition(x => x % 2 === 0)); // => [[2, 4], [1, 3]] + */ +declare function partition(predicate: (value: T, index: number) => boolean): (source: Iterator) => [T[], T[]]; +//#endregion +export { partition }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/partition.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/partition.js new file mode 100644 index 0000000000000000000000000000000000000000..5e66b72d5d1cb4f311352c5e3ba3cace003f065c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/partition.js @@ -0,0 +1,27 @@ +const require_partition = require("../../iterator/partition.js"); +//#region src/fp/iterator/partition.ts +/** +* Creates a function that consumes an iterator and splits its elements into +* `[matched, unmatched]` arrays by `predicate`, for use as the terminal step of +* a {@link pipe}. +* +* This is a terminal operation: it pulls every element, so it must not be used +* on an infinite iterator. +* +* @template T - The type of elements produced by the source iterator. +* @param predicate - Called with `(value, index)`; truthy sends the element to the first array. +* @returns A function mapping an `Iterator` to a `[T[], T[]]` tuple. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { partition } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3, 4].values(), partition(x => x % 2 === 0)); // => [[2, 4], [1, 3]] +*/ +function partition(predicate) { + return function partitionInIterator(source) { + return require_partition.partition(source, predicate); + }; +} +//#endregion +exports.partition = partition; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/partition.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/partition.mjs new file mode 100644 index 0000000000000000000000000000000000000000..72d951c2a7ba48261660c532a1bb32392819af53 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/partition.mjs @@ -0,0 +1,27 @@ +import { partition as partition$1 } from "../../iterator/partition.mjs"; +//#region src/fp/iterator/partition.ts +/** +* Creates a function that consumes an iterator and splits its elements into +* `[matched, unmatched]` arrays by `predicate`, for use as the terminal step of +* a {@link pipe}. +* +* This is a terminal operation: it pulls every element, so it must not be used +* on an infinite iterator. +* +* @template T - The type of elements produced by the source iterator. +* @param predicate - Called with `(value, index)`; truthy sends the element to the first array. +* @returns A function mapping an `Iterator` to a `[T[], T[]]` tuple. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { partition } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3, 4].values(), partition(x => x % 2 === 0)); // => [[2, 4], [1, 3]] +*/ +function partition(predicate) { + return function partitionInIterator(source) { + return partition$1(source, predicate); + }; +} +//#endregion +export { partition }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/reduce.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/reduce.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..1d7e675930070f4a3fd6f39b29cad7ac1ee84fa1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/reduce.d.mts @@ -0,0 +1,24 @@ +//#region src/fp/iterator/reduce.d.ts +/** + * Creates a function that consumes an iterator and folds its elements into a + * single value, starting from `initial`, for use as the terminal step of a + * {@link pipe}. It delegates to the native `Iterator.prototype.reduce`. + * + * This is a terminal operation: it pulls every element, so it must not be used + * on an infinite iterator. + * + * @template T - The type of elements produced by the source iterator. + * @template U - The type of the accumulated value. + * @param callback - Called with `(accumulator, value, index)`; returns the next accumulator. + * @param initial - The initial accumulator value. + * @returns A function mapping an `Iterator` to the final accumulated value. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { reduce } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3].values(), reduce((acc, x) => acc + x, 0)); // => 6 + */ +declare function reduce(callback: (accumulator: U, value: T, index: number) => U, initial: U): (source: Iterator) => U; +//#endregion +export { reduce }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/reduce.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/reduce.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1d7e675930070f4a3fd6f39b29cad7ac1ee84fa1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/reduce.d.ts @@ -0,0 +1,24 @@ +//#region src/fp/iterator/reduce.d.ts +/** + * Creates a function that consumes an iterator and folds its elements into a + * single value, starting from `initial`, for use as the terminal step of a + * {@link pipe}. It delegates to the native `Iterator.prototype.reduce`. + * + * This is a terminal operation: it pulls every element, so it must not be used + * on an infinite iterator. + * + * @template T - The type of elements produced by the source iterator. + * @template U - The type of the accumulated value. + * @param callback - Called with `(accumulator, value, index)`; returns the next accumulator. + * @param initial - The initial accumulator value. + * @returns A function mapping an `Iterator` to the final accumulated value. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { reduce } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3].values(), reduce((acc, x) => acc + x, 0)); // => 6 + */ +declare function reduce(callback: (accumulator: U, value: T, index: number) => U, initial: U): (source: Iterator) => U; +//#endregion +export { reduce }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/reduce.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/reduce.js new file mode 100644 index 0000000000000000000000000000000000000000..02cff0fbfa46c8999248bc04bad3e59e77c0d2c0 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/reduce.js @@ -0,0 +1,28 @@ +//#region src/fp/iterator/reduce.ts +/** +* Creates a function that consumes an iterator and folds its elements into a +* single value, starting from `initial`, for use as the terminal step of a +* {@link pipe}. It delegates to the native `Iterator.prototype.reduce`. +* +* This is a terminal operation: it pulls every element, so it must not be used +* on an infinite iterator. +* +* @template T - The type of elements produced by the source iterator. +* @template U - The type of the accumulated value. +* @param callback - Called with `(accumulator, value, index)`; returns the next accumulator. +* @param initial - The initial accumulator value. +* @returns A function mapping an `Iterator` to the final accumulated value. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { reduce } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3].values(), reduce((acc, x) => acc + x, 0)); // => 6 +*/ +function reduce(callback, initial) { + return function reduceInIterator(source) { + return Iterator.from(source).reduce(callback, initial); + }; +} +//#endregion +exports.reduce = reduce; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/reduce.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/reduce.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c722a7700ea05c9d4f4b7333b54bb76dfdc30fdc --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/reduce.mjs @@ -0,0 +1,28 @@ +//#region src/fp/iterator/reduce.ts +/** +* Creates a function that consumes an iterator and folds its elements into a +* single value, starting from `initial`, for use as the terminal step of a +* {@link pipe}. It delegates to the native `Iterator.prototype.reduce`. +* +* This is a terminal operation: it pulls every element, so it must not be used +* on an infinite iterator. +* +* @template T - The type of elements produced by the source iterator. +* @template U - The type of the accumulated value. +* @param callback - Called with `(accumulator, value, index)`; returns the next accumulator. +* @param initial - The initial accumulator value. +* @returns A function mapping an `Iterator` to the final accumulated value. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { reduce } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3].values(), reduce((acc, x) => acc + x, 0)); // => 6 +*/ +function reduce(callback, initial) { + return function reduceInIterator(source) { + return Iterator.from(source).reduce(callback, initial); + }; +} +//#endregion +export { reduce }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/scan.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/scan.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..f3e9a5c01b3e3fe8c6e19a81b86430091051eb42 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/scan.d.mts @@ -0,0 +1,21 @@ +//#region src/fp/iterator/scan.d.ts +/** + * Creates a function that lazily yields the running accumulation of an iterator, + * emitting `initial` first and then the accumulator after each element, for use + * with {@link pipe}. + * + * @template T - The type of elements produced by the source iterator. + * @template U - The type of the accumulated value. + * @param callback - Called with `(accumulator, value, index)`; returns the next accumulator. + * @param initial - The initial accumulator, emitted as the first value. + * @returns A function mapping an `Iterator` to a lazy `IteratorObject`. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { scan, toArray } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3].values(), scan((acc, x) => acc + x, 0), toArray()); // => [0, 1, 3, 6] + */ +declare function scan(callback: (accumulator: U, value: T, index: number) => U, initial: U): (source: Iterator) => IteratorObject; +//#endregion +export { scan }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/scan.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/scan.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f3e9a5c01b3e3fe8c6e19a81b86430091051eb42 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/scan.d.ts @@ -0,0 +1,21 @@ +//#region src/fp/iterator/scan.d.ts +/** + * Creates a function that lazily yields the running accumulation of an iterator, + * emitting `initial` first and then the accumulator after each element, for use + * with {@link pipe}. + * + * @template T - The type of elements produced by the source iterator. + * @template U - The type of the accumulated value. + * @param callback - Called with `(accumulator, value, index)`; returns the next accumulator. + * @param initial - The initial accumulator, emitted as the first value. + * @returns A function mapping an `Iterator` to a lazy `IteratorObject`. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { scan, toArray } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3].values(), scan((acc, x) => acc + x, 0), toArray()); // => [0, 1, 3, 6] + */ +declare function scan(callback: (accumulator: U, value: T, index: number) => U, initial: U): (source: Iterator) => IteratorObject; +//#endregion +export { scan }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/scan.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/scan.js new file mode 100644 index 0000000000000000000000000000000000000000..7ee32e05cfeffd5c5258b90ad8f701653944d722 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/scan.js @@ -0,0 +1,26 @@ +const require_scan = require("../../iterator/scan.js"); +//#region src/fp/iterator/scan.ts +/** +* Creates a function that lazily yields the running accumulation of an iterator, +* emitting `initial` first and then the accumulator after each element, for use +* with {@link pipe}. +* +* @template T - The type of elements produced by the source iterator. +* @template U - The type of the accumulated value. +* @param callback - Called with `(accumulator, value, index)`; returns the next accumulator. +* @param initial - The initial accumulator, emitted as the first value. +* @returns A function mapping an `Iterator` to a lazy `IteratorObject`. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { scan, toArray } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3].values(), scan((acc, x) => acc + x, 0), toArray()); // => [0, 1, 3, 6] +*/ +function scan(callback, initial) { + return function scanInIterator(source) { + return require_scan.scan(source, callback, initial); + }; +} +//#endregion +exports.scan = scan; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/scan.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/scan.mjs new file mode 100644 index 0000000000000000000000000000000000000000..4571f0d4c4e962468b7b0ea091975578af70c2c2 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/scan.mjs @@ -0,0 +1,26 @@ +import { scan as scan$1 } from "../../iterator/scan.mjs"; +//#region src/fp/iterator/scan.ts +/** +* Creates a function that lazily yields the running accumulation of an iterator, +* emitting `initial` first and then the accumulator after each element, for use +* with {@link pipe}. +* +* @template T - The type of elements produced by the source iterator. +* @template U - The type of the accumulated value. +* @param callback - Called with `(accumulator, value, index)`; returns the next accumulator. +* @param initial - The initial accumulator, emitted as the first value. +* @returns A function mapping an `Iterator` to a lazy `IteratorObject`. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { scan, toArray } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3].values(), scan((acc, x) => acc + x, 0), toArray()); // => [0, 1, 3, 6] +*/ +function scan(callback, initial) { + return function scanInIterator(source) { + return scan$1(source, callback, initial); + }; +} +//#endregion +export { scan }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/some.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/some.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..103580a588d5d5d72c965bf7b3c94fb3a4c23b53 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/some.d.mts @@ -0,0 +1,20 @@ +//#region src/fp/iterator/some.d.ts +/** + * Creates a function that consumes an iterator until `predicate` returns truthy + * and reports whether any element matched, for use as the terminal step of a + * {@link pipe}. It delegates to the native `Iterator.prototype.some` and stops + * pulling at the first match. + * + * @template T - The type of elements produced by the source iterator. + * @param predicate - Called with `(value, index)`; truthy short-circuits to `true`. + * @returns A function mapping an `Iterator` to a boolean. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { some } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3].values(), some(x => x > 2)); // => true + */ +declare function some(predicate: (value: T, index: number) => unknown): (source: Iterator) => boolean; +//#endregion +export { some }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/some.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/some.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..103580a588d5d5d72c965bf7b3c94fb3a4c23b53 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/some.d.ts @@ -0,0 +1,20 @@ +//#region src/fp/iterator/some.d.ts +/** + * Creates a function that consumes an iterator until `predicate` returns truthy + * and reports whether any element matched, for use as the terminal step of a + * {@link pipe}. It delegates to the native `Iterator.prototype.some` and stops + * pulling at the first match. + * + * @template T - The type of elements produced by the source iterator. + * @param predicate - Called with `(value, index)`; truthy short-circuits to `true`. + * @returns A function mapping an `Iterator` to a boolean. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { some } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3].values(), some(x => x > 2)); // => true + */ +declare function some(predicate: (value: T, index: number) => unknown): (source: Iterator) => boolean; +//#endregion +export { some }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/some.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/some.js new file mode 100644 index 0000000000000000000000000000000000000000..17a83cb5f6bbddbbd0866fcf3a7073448c603dcf --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/some.js @@ -0,0 +1,24 @@ +//#region src/fp/iterator/some.ts +/** +* Creates a function that consumes an iterator until `predicate` returns truthy +* and reports whether any element matched, for use as the terminal step of a +* {@link pipe}. It delegates to the native `Iterator.prototype.some` and stops +* pulling at the first match. +* +* @template T - The type of elements produced by the source iterator. +* @param predicate - Called with `(value, index)`; truthy short-circuits to `true`. +* @returns A function mapping an `Iterator` to a boolean. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { some } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3].values(), some(x => x > 2)); // => true +*/ +function some(predicate) { + return function someInIterator(source) { + return Iterator.from(source).some(predicate); + }; +} +//#endregion +exports.some = some; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/some.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/some.mjs new file mode 100644 index 0000000000000000000000000000000000000000..a0986a9b0d4cbd74520c7c40ad6cda41d6eef980 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/some.mjs @@ -0,0 +1,24 @@ +//#region src/fp/iterator/some.ts +/** +* Creates a function that consumes an iterator until `predicate` returns truthy +* and reports whether any element matched, for use as the terminal step of a +* {@link pipe}. It delegates to the native `Iterator.prototype.some` and stops +* pulling at the first match. +* +* @template T - The type of elements produced by the source iterator. +* @param predicate - Called with `(value, index)`; truthy short-circuits to `true`. +* @returns A function mapping an `Iterator` to a boolean. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { some } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3].values(), some(x => x > 2)); // => true +*/ +function some(predicate) { + return function someInIterator(source) { + return Iterator.from(source).some(predicate); + }; +} +//#endregion +export { some }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/take.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/take.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..8aab5bfbb54e9a8c9bc7970fd4461b0a14fa09d0 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/take.d.mts @@ -0,0 +1,21 @@ +//#region src/fp/iterator/take.d.ts +/** + * Creates a function that lazily yields the first `limit` elements of an + * iterator, for use with {@link pipe}. It delegates to the native + * `Iterator.prototype.take`, which stops pulling from the source once `limit` + * elements have been produced. + * + * @template T - The type of elements produced by the source iterator. + * @param limit - The number of elements to take; must be a non-negative integer. + * @returns A function mapping an `Iterator` to a lazy `IteratorObject`. + * @throws {RangeError} Throws if `limit` is negative or `NaN` (native behavior). + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { take } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3, 4, 5].values(), take(3)).toArray(); // => [1, 2, 3] + */ +declare function take(limit: number): (source: Iterator) => IteratorObject; +//#endregion +export { take }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/take.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/take.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8aab5bfbb54e9a8c9bc7970fd4461b0a14fa09d0 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/take.d.ts @@ -0,0 +1,21 @@ +//#region src/fp/iterator/take.d.ts +/** + * Creates a function that lazily yields the first `limit` elements of an + * iterator, for use with {@link pipe}. It delegates to the native + * `Iterator.prototype.take`, which stops pulling from the source once `limit` + * elements have been produced. + * + * @template T - The type of elements produced by the source iterator. + * @param limit - The number of elements to take; must be a non-negative integer. + * @returns A function mapping an `Iterator` to a lazy `IteratorObject`. + * @throws {RangeError} Throws if `limit` is negative or `NaN` (native behavior). + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { take } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3, 4, 5].values(), take(3)).toArray(); // => [1, 2, 3] + */ +declare function take(limit: number): (source: Iterator) => IteratorObject; +//#endregion +export { take }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/take.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/take.js new file mode 100644 index 0000000000000000000000000000000000000000..c7a0843f74b1a0372020bb5fd6555cfd117dc249 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/take.js @@ -0,0 +1,25 @@ +//#region src/fp/iterator/take.ts +/** +* Creates a function that lazily yields the first `limit` elements of an +* iterator, for use with {@link pipe}. It delegates to the native +* `Iterator.prototype.take`, which stops pulling from the source once `limit` +* elements have been produced. +* +* @template T - The type of elements produced by the source iterator. +* @param limit - The number of elements to take; must be a non-negative integer. +* @returns A function mapping an `Iterator` to a lazy `IteratorObject`. +* @throws {RangeError} Throws if `limit` is negative or `NaN` (native behavior). +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { take } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3, 4, 5].values(), take(3)).toArray(); // => [1, 2, 3] +*/ +function take(limit) { + return function takeInIterator(source) { + return Iterator.from(source).take(limit); + }; +} +//#endregion +exports.take = take; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/take.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/take.mjs new file mode 100644 index 0000000000000000000000000000000000000000..89219ae8806e05493a3742c67d67cc1f1c997508 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/take.mjs @@ -0,0 +1,25 @@ +//#region src/fp/iterator/take.ts +/** +* Creates a function that lazily yields the first `limit` elements of an +* iterator, for use with {@link pipe}. It delegates to the native +* `Iterator.prototype.take`, which stops pulling from the source once `limit` +* elements have been produced. +* +* @template T - The type of elements produced by the source iterator. +* @param limit - The number of elements to take; must be a non-negative integer. +* @returns A function mapping an `Iterator` to a lazy `IteratorObject`. +* @throws {RangeError} Throws if `limit` is negative or `NaN` (native behavior). +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { take } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3, 4, 5].values(), take(3)).toArray(); // => [1, 2, 3] +*/ +function take(limit) { + return function takeInIterator(source) { + return Iterator.from(source).take(limit); + }; +} +//#endregion +export { take }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/takeWhile.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/takeWhile.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..b615c95d0cd75c06354cb9521bd4d342ac3670d1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/takeWhile.d.mts @@ -0,0 +1,19 @@ +//#region src/fp/iterator/takeWhile.d.ts +/** + * Creates a function that lazily yields elements of an iterator while + * `shouldContinue` returns truthy, stopping at the first failure, for use with + * {@link pipe}. + * + * @template T - The type of elements produced by the source iterator. + * @param shouldContinue - Called with `(value, index)`; iteration stops once it returns falsy. + * @returns A function mapping an `Iterator` to a lazy `IteratorObject`. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { takeWhile, toArray } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3, 1].values(), takeWhile(x => x < 3), toArray()); // => [1, 2] + */ +declare function takeWhile(shouldContinue: (value: T, index: number) => boolean): (source: Iterator) => IteratorObject; +//#endregion +export { takeWhile }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/takeWhile.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/takeWhile.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b615c95d0cd75c06354cb9521bd4d342ac3670d1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/takeWhile.d.ts @@ -0,0 +1,19 @@ +//#region src/fp/iterator/takeWhile.d.ts +/** + * Creates a function that lazily yields elements of an iterator while + * `shouldContinue` returns truthy, stopping at the first failure, for use with + * {@link pipe}. + * + * @template T - The type of elements produced by the source iterator. + * @param shouldContinue - Called with `(value, index)`; iteration stops once it returns falsy. + * @returns A function mapping an `Iterator` to a lazy `IteratorObject`. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { takeWhile, toArray } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3, 1].values(), takeWhile(x => x < 3), toArray()); // => [1, 2] + */ +declare function takeWhile(shouldContinue: (value: T, index: number) => boolean): (source: Iterator) => IteratorObject; +//#endregion +export { takeWhile }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/takeWhile.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/takeWhile.js new file mode 100644 index 0000000000000000000000000000000000000000..a611a173f005c59055c684201dad70bb6e6e39ce --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/takeWhile.js @@ -0,0 +1,24 @@ +const require_takeWhile = require("../../iterator/takeWhile.js"); +//#region src/fp/iterator/takeWhile.ts +/** +* Creates a function that lazily yields elements of an iterator while +* `shouldContinue` returns truthy, stopping at the first failure, for use with +* {@link pipe}. +* +* @template T - The type of elements produced by the source iterator. +* @param shouldContinue - Called with `(value, index)`; iteration stops once it returns falsy. +* @returns A function mapping an `Iterator` to a lazy `IteratorObject`. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { takeWhile, toArray } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3, 1].values(), takeWhile(x => x < 3), toArray()); // => [1, 2] +*/ +function takeWhile(shouldContinue) { + return function takeWhileInIterator(source) { + return require_takeWhile.takeWhile(source, shouldContinue); + }; +} +//#endregion +exports.takeWhile = takeWhile; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/takeWhile.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/takeWhile.mjs new file mode 100644 index 0000000000000000000000000000000000000000..37ec85bf5a530705fd29318c83ee4b1a949b66d7 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/takeWhile.mjs @@ -0,0 +1,24 @@ +import { takeWhile as takeWhile$1 } from "../../iterator/takeWhile.mjs"; +//#region src/fp/iterator/takeWhile.ts +/** +* Creates a function that lazily yields elements of an iterator while +* `shouldContinue` returns truthy, stopping at the first failure, for use with +* {@link pipe}. +* +* @template T - The type of elements produced by the source iterator. +* @param shouldContinue - Called with `(value, index)`; iteration stops once it returns falsy. +* @returns A function mapping an `Iterator` to a lazy `IteratorObject`. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { takeWhile, toArray } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3, 1].values(), takeWhile(x => x < 3), toArray()); // => [1, 2] +*/ +function takeWhile(shouldContinue) { + return function takeWhileInIterator(source) { + return takeWhile$1(source, shouldContinue); + }; +} +//#endregion +export { takeWhile }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/toArray.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/toArray.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..efd61668ba2ed5f83ec9130e06d273fef4d318b3 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/toArray.d.mts @@ -0,0 +1,21 @@ +//#region src/fp/iterator/toArray.d.ts +/** + * Creates a function that consumes an iterator and collects its elements into an + * array, for use as the terminal step of a {@link pipe}. It delegates to the + * native `Iterator.prototype.toArray`. + * + * This is a terminal operation: it pulls every element, so it must not be used + * on an infinite iterator. + * + * @template T - The type of elements produced by the source iterator. + * @returns A function mapping an `Iterator` to a `T[]`. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { map, toArray } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3].values(), map(x => x * 2), toArray()); // => [2, 4, 6] + */ +declare function toArray(): (source: Iterator) => T[]; +//#endregion +export { toArray }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/toArray.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/toArray.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..efd61668ba2ed5f83ec9130e06d273fef4d318b3 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/toArray.d.ts @@ -0,0 +1,21 @@ +//#region src/fp/iterator/toArray.d.ts +/** + * Creates a function that consumes an iterator and collects its elements into an + * array, for use as the terminal step of a {@link pipe}. It delegates to the + * native `Iterator.prototype.toArray`. + * + * This is a terminal operation: it pulls every element, so it must not be used + * on an infinite iterator. + * + * @template T - The type of elements produced by the source iterator. + * @returns A function mapping an `Iterator` to a `T[]`. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { map, toArray } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3].values(), map(x => x * 2), toArray()); // => [2, 4, 6] + */ +declare function toArray(): (source: Iterator) => T[]; +//#endregion +export { toArray }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/toArray.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/toArray.js new file mode 100644 index 0000000000000000000000000000000000000000..f972e5c35245d74feedec60b25c1536dc39181d6 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/toArray.js @@ -0,0 +1,25 @@ +//#region src/fp/iterator/toArray.ts +/** +* Creates a function that consumes an iterator and collects its elements into an +* array, for use as the terminal step of a {@link pipe}. It delegates to the +* native `Iterator.prototype.toArray`. +* +* This is a terminal operation: it pulls every element, so it must not be used +* on an infinite iterator. +* +* @template T - The type of elements produced by the source iterator. +* @returns A function mapping an `Iterator` to a `T[]`. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { map, toArray } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3].values(), map(x => x * 2), toArray()); // => [2, 4, 6] +*/ +function toArray() { + return function toArrayInIterator(source) { + return Iterator.from(source).toArray(); + }; +} +//#endregion +exports.toArray = toArray; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/toArray.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/toArray.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d58f7e1414e0263f642dea4ed3cbe049bd441d09 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/toArray.mjs @@ -0,0 +1,25 @@ +//#region src/fp/iterator/toArray.ts +/** +* Creates a function that consumes an iterator and collects its elements into an +* array, for use as the terminal step of a {@link pipe}. It delegates to the +* native `Iterator.prototype.toArray`. +* +* This is a terminal operation: it pulls every element, so it must not be used +* on an infinite iterator. +* +* @template T - The type of elements produced by the source iterator. +* @returns A function mapping an `Iterator` to a `T[]`. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { map, toArray } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3].values(), map(x => x * 2), toArray()); // => [2, 4, 6] +*/ +function toArray() { + return function toArrayInIterator(source) { + return Iterator.from(source).toArray(); + }; +} +//#endregion +export { toArray }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/uniqBy.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/uniqBy.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..2e5dfde15917a06f72b8594cb4688cadbb472f0f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/uniqBy.d.mts @@ -0,0 +1,20 @@ +//#region src/fp/iterator/uniqBy.d.ts +/** + * Creates a function that lazily yields the elements of an iterator whose mapped + * key has not been seen before, preserving first-occurrence order, for use with + * {@link pipe}. Keys are compared with SameValueZero semantics. + * + * @template T - The type of elements produced by the source iterator. + * @template K - The type of the key used for comparison. + * @param getKey - Maps an element to the key used to detect duplicates. + * @returns A function mapping an `Iterator` to a lazy `IteratorObject`. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { uniqBy, toArray } from 'es-toolkit/fp/iterator'; + * + * pipe([1.1, 1.2, 2.3].values(), uniqBy(Math.floor), toArray()); // => [1.1, 2.3] + */ +declare function uniqBy(getKey: (value: T) => K): (source: Iterator) => IteratorObject; +//#endregion +export { uniqBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/uniqBy.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/uniqBy.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..2e5dfde15917a06f72b8594cb4688cadbb472f0f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/uniqBy.d.ts @@ -0,0 +1,20 @@ +//#region src/fp/iterator/uniqBy.d.ts +/** + * Creates a function that lazily yields the elements of an iterator whose mapped + * key has not been seen before, preserving first-occurrence order, for use with + * {@link pipe}. Keys are compared with SameValueZero semantics. + * + * @template T - The type of elements produced by the source iterator. + * @template K - The type of the key used for comparison. + * @param getKey - Maps an element to the key used to detect duplicates. + * @returns A function mapping an `Iterator` to a lazy `IteratorObject`. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { uniqBy, toArray } from 'es-toolkit/fp/iterator'; + * + * pipe([1.1, 1.2, 2.3].values(), uniqBy(Math.floor), toArray()); // => [1.1, 2.3] + */ +declare function uniqBy(getKey: (value: T) => K): (source: Iterator) => IteratorObject; +//#endregion +export { uniqBy }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/uniqBy.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/uniqBy.js new file mode 100644 index 0000000000000000000000000000000000000000..9628864ae8df417211d25168a8dbab6d4fc41375 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/uniqBy.js @@ -0,0 +1,25 @@ +const require_uniqBy = require("../../iterator/uniqBy.js"); +//#region src/fp/iterator/uniqBy.ts +/** +* Creates a function that lazily yields the elements of an iterator whose mapped +* key has not been seen before, preserving first-occurrence order, for use with +* {@link pipe}. Keys are compared with SameValueZero semantics. +* +* @template T - The type of elements produced by the source iterator. +* @template K - The type of the key used for comparison. +* @param getKey - Maps an element to the key used to detect duplicates. +* @returns A function mapping an `Iterator` to a lazy `IteratorObject`. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { uniqBy, toArray } from 'es-toolkit/fp/iterator'; +* +* pipe([1.1, 1.2, 2.3].values(), uniqBy(Math.floor), toArray()); // => [1.1, 2.3] +*/ +function uniqBy(getKey) { + return function uniqByInIterator(source) { + return require_uniqBy.uniqBy(source, getKey); + }; +} +//#endregion +exports.uniqBy = uniqBy; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/uniqBy.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/uniqBy.mjs new file mode 100644 index 0000000000000000000000000000000000000000..ba0460ad45578b7f961438ed258d1fce8951bc19 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/uniqBy.mjs @@ -0,0 +1,25 @@ +import { uniqBy as uniqBy$1 } from "../../iterator/uniqBy.mjs"; +//#region src/fp/iterator/uniqBy.ts +/** +* Creates a function that lazily yields the elements of an iterator whose mapped +* key has not been seen before, preserving first-occurrence order, for use with +* {@link pipe}. Keys are compared with SameValueZero semantics. +* +* @template T - The type of elements produced by the source iterator. +* @template K - The type of the key used for comparison. +* @param getKey - Maps an element to the key used to detect duplicates. +* @returns A function mapping an `Iterator` to a lazy `IteratorObject`. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { uniqBy, toArray } from 'es-toolkit/fp/iterator'; +* +* pipe([1.1, 1.2, 2.3].values(), uniqBy(Math.floor), toArray()); // => [1.1, 2.3] +*/ +function uniqBy(getKey) { + return function uniqByInIterator(source) { + return uniqBy$1(source, getKey); + }; +} +//#endregion +export { uniqBy }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/zip.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/zip.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..d1bc0f9c609d732c138c2c9a2f1d23096b020670 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/zip.d.mts @@ -0,0 +1,20 @@ +//#region src/fp/iterator/zip.d.ts +/** + * Creates a function that lazily pairs the elements of the piped iterator with + * those of `other`, for use with {@link pipe}. Iteration stops as soon as either + * iterator is exhausted. + * + * @template T - The type of elements produced by the piped iterator. + * @template U - The type of elements produced by `other`. + * @param other - The iterator to pair with the piped one. + * @returns A function mapping an `Iterator` to a lazy `IteratorObject<[T, U]>`. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { zip, toArray } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3].values(), zip(['a', 'b'].values()), toArray()); // => [[1, 'a'], [2, 'b']] + */ +declare function zip(other: Iterator): (source: Iterator) => IteratorObject<[T, U], undefined>; +//#endregion +export { zip }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/zip.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/zip.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d1bc0f9c609d732c138c2c9a2f1d23096b020670 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/zip.d.ts @@ -0,0 +1,20 @@ +//#region src/fp/iterator/zip.d.ts +/** + * Creates a function that lazily pairs the elements of the piped iterator with + * those of `other`, for use with {@link pipe}. Iteration stops as soon as either + * iterator is exhausted. + * + * @template T - The type of elements produced by the piped iterator. + * @template U - The type of elements produced by `other`. + * @param other - The iterator to pair with the piped one. + * @returns A function mapping an `Iterator` to a lazy `IteratorObject<[T, U]>`. + * + * @example + * import { pipe } from 'es-toolkit/fp'; + * import { zip, toArray } from 'es-toolkit/fp/iterator'; + * + * pipe([1, 2, 3].values(), zip(['a', 'b'].values()), toArray()); // => [[1, 'a'], [2, 'b']] + */ +declare function zip(other: Iterator): (source: Iterator) => IteratorObject<[T, U], undefined>; +//#endregion +export { zip }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/zip.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/zip.js new file mode 100644 index 0000000000000000000000000000000000000000..db8d9db397211475544149de5f6ba4a59f03acb6 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/zip.js @@ -0,0 +1,25 @@ +const require_zip = require("../../iterator/zip.js"); +//#region src/fp/iterator/zip.ts +/** +* Creates a function that lazily pairs the elements of the piped iterator with +* those of `other`, for use with {@link pipe}. Iteration stops as soon as either +* iterator is exhausted. +* +* @template T - The type of elements produced by the piped iterator. +* @template U - The type of elements produced by `other`. +* @param other - The iterator to pair with the piped one. +* @returns A function mapping an `Iterator` to a lazy `IteratorObject<[T, U]>`. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { zip, toArray } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3].values(), zip(['a', 'b'].values()), toArray()); // => [[1, 'a'], [2, 'b']] +*/ +function zip(other) { + return function zipInIterator(source) { + return require_zip.zip(source, other); + }; +} +//#endregion +exports.zip = zip; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/zip.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/zip.mjs new file mode 100644 index 0000000000000000000000000000000000000000..ec892b3fb9f275496b05e6f18df9e2b330f39dac --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/iterator/zip.mjs @@ -0,0 +1,25 @@ +import { zip as zip$1 } from "../../iterator/zip.mjs"; +//#region src/fp/iterator/zip.ts +/** +* Creates a function that lazily pairs the elements of the piped iterator with +* those of `other`, for use with {@link pipe}. Iteration stops as soon as either +* iterator is exhausted. +* +* @template T - The type of elements produced by the piped iterator. +* @template U - The type of elements produced by `other`. +* @param other - The iterator to pair with the piped one. +* @returns A function mapping an `Iterator` to a lazy `IteratorObject<[T, U]>`. +* +* @example +* import { pipe } from 'es-toolkit/fp'; +* import { zip, toArray } from 'es-toolkit/fp/iterator'; +* +* pipe([1, 2, 3].values(), zip(['a', 'b'].values()), toArray()); // => [[1, 'a'], [2, 'b']] +*/ +function zip(other) { + return function zipInIterator(source) { + return zip$1(source, other); + }; +} +//#endregion +export { zip }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/add.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/add.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..313d3b7b25e6237962f204152aa8df395451efb7 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/add.d.mts @@ -0,0 +1,17 @@ +//#region src/fp/math/add.d.ts +/** + * Creates a function that adds `addend` to its input. Use it with {@link pipe}, + * or as the callback of a function such as {@link map}. + * + * @param addend - The number to add to the input. + * @returns A function that maps a `number` to `value + addend`. + * + * @example + * import { pipe, map, add } from 'es-toolkit/fp'; + * + * pipe(3, add(2)); // => 5 + * pipe([1, 2, 3], map(add(10))); // => [11, 12, 13] + */ +declare function add(addend: number): (value: number) => number; +//#endregion +export { add }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/add.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/add.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..313d3b7b25e6237962f204152aa8df395451efb7 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/add.d.ts @@ -0,0 +1,17 @@ +//#region src/fp/math/add.d.ts +/** + * Creates a function that adds `addend` to its input. Use it with {@link pipe}, + * or as the callback of a function such as {@link map}. + * + * @param addend - The number to add to the input. + * @returns A function that maps a `number` to `value + addend`. + * + * @example + * import { pipe, map, add } from 'es-toolkit/fp'; + * + * pipe(3, add(2)); // => 5 + * pipe([1, 2, 3], map(add(10))); // => [11, 12, 13] + */ +declare function add(addend: number): (value: number) => number; +//#endregion +export { add }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/add.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/add.js new file mode 100644 index 0000000000000000000000000000000000000000..b704cf6d980053c48a25bf8725b3f1ae72f3a3d0 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/add.js @@ -0,0 +1,21 @@ +//#region src/fp/math/add.ts +/** +* Creates a function that adds `addend` to its input. Use it with {@link pipe}, +* or as the callback of a function such as {@link map}. +* +* @param addend - The number to add to the input. +* @returns A function that maps a `number` to `value + addend`. +* +* @example +* import { pipe, map, add } from 'es-toolkit/fp'; +* +* pipe(3, add(2)); // => 5 +* pipe([1, 2, 3], map(add(10))); // => [11, 12, 13] +*/ +function add(addend) { + return function(value) { + return value + addend; + }; +} +//#endregion +exports.add = add; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/add.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/add.mjs new file mode 100644 index 0000000000000000000000000000000000000000..9fd10cb5e8f7fd6545ed5b528f25bca2b4cac70d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/add.mjs @@ -0,0 +1,21 @@ +//#region src/fp/math/add.ts +/** +* Creates a function that adds `addend` to its input. Use it with {@link pipe}, +* or as the callback of a function such as {@link map}. +* +* @param addend - The number to add to the input. +* @returns A function that maps a `number` to `value + addend`. +* +* @example +* import { pipe, map, add } from 'es-toolkit/fp'; +* +* pipe(3, add(2)); // => 5 +* pipe([1, 2, 3], map(add(10))); // => [11, 12, 13] +*/ +function add(addend) { + return function(value) { + return value + addend; + }; +} +//#endregion +export { add }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/index.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..b6087f4867b0147c1014e25e66c9e06d02abf805 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/index.d.mts @@ -0,0 +1,2 @@ +import { add } from "./add.mjs"; +import { multiply } from "./multiply.mjs"; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/index.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1eca2a25f2f6f413f5a262d391a98113752d0d6c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/index.d.ts @@ -0,0 +1,2 @@ +import { add } from "./add.js"; +import { multiply } from "./multiply.js"; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/index.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/index.js new file mode 100644 index 0000000000000000000000000000000000000000..9f0ca265dc290b20522e2447c0aae5f16ce43624 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/index.js @@ -0,0 +1,2 @@ +require("./add.js"); +require("./multiply.js"); diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/index.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..71073a9e03ab63eeb0c6dade8e331ce512adce45 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/index.mjs @@ -0,0 +1,2 @@ +import "./add.mjs"; +import "./multiply.mjs"; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/multiply.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/multiply.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..0cf4a7d22525ad1afdcfcf97f65fc72d6e7628c0 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/multiply.d.mts @@ -0,0 +1,17 @@ +//#region src/fp/math/multiply.d.ts +/** + * Creates a function that multiplies its input by `multiplicand`. Use it with + * {@link pipe}, or as the callback of a function such as {@link map}. + * + * @param multiplicand - The number to multiply the input by. + * @returns A function that maps a `number` to `value * multiplicand`. + * + * @example + * import { pipe, map, multiply } from 'es-toolkit/fp'; + * + * pipe(3, multiply(2)); // => 6 + * pipe([1, 2, 3], map(multiply(3))); // => [3, 6, 9] + */ +declare function multiply(multiplicand: number): (value: number) => number; +//#endregion +export { multiply }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/multiply.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/multiply.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0cf4a7d22525ad1afdcfcf97f65fc72d6e7628c0 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/multiply.d.ts @@ -0,0 +1,17 @@ +//#region src/fp/math/multiply.d.ts +/** + * Creates a function that multiplies its input by `multiplicand`. Use it with + * {@link pipe}, or as the callback of a function such as {@link map}. + * + * @param multiplicand - The number to multiply the input by. + * @returns A function that maps a `number` to `value * multiplicand`. + * + * @example + * import { pipe, map, multiply } from 'es-toolkit/fp'; + * + * pipe(3, multiply(2)); // => 6 + * pipe([1, 2, 3], map(multiply(3))); // => [3, 6, 9] + */ +declare function multiply(multiplicand: number): (value: number) => number; +//#endregion +export { multiply }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/multiply.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/multiply.js new file mode 100644 index 0000000000000000000000000000000000000000..4f7bac84ca163bd8455d299898ed96ff5099de2f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/multiply.js @@ -0,0 +1,21 @@ +//#region src/fp/math/multiply.ts +/** +* Creates a function that multiplies its input by `multiplicand`. Use it with +* {@link pipe}, or as the callback of a function such as {@link map}. +* +* @param multiplicand - The number to multiply the input by. +* @returns A function that maps a `number` to `value * multiplicand`. +* +* @example +* import { pipe, map, multiply } from 'es-toolkit/fp'; +* +* pipe(3, multiply(2)); // => 6 +* pipe([1, 2, 3], map(multiply(3))); // => [3, 6, 9] +*/ +function multiply(multiplicand) { + return function(value) { + return value * multiplicand; + }; +} +//#endregion +exports.multiply = multiply; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/multiply.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/multiply.mjs new file mode 100644 index 0000000000000000000000000000000000000000..cc80f0feef28956cd8e1c36b9dbcc08cf250e1a2 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/math/multiply.mjs @@ -0,0 +1,21 @@ +//#region src/fp/math/multiply.ts +/** +* Creates a function that multiplies its input by `multiplicand`. Use it with +* {@link pipe}, or as the callback of a function such as {@link map}. +* +* @param multiplicand - The number to multiply the input by. +* @returns A function that maps a `number` to `value * multiplicand`. +* +* @example +* import { pipe, map, multiply } from 'es-toolkit/fp'; +* +* pipe(3, multiply(2)); // => 6 +* pipe([1, 2, 3], map(multiply(3))); // => [3, 6, 9] +*/ +function multiply(multiplicand) { + return function(value) { + return value * multiplicand; + }; +} +//#endregion +export { multiply }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/object/index.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/object/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..98a8732ec393ad52ab7967b798e440196d6bb149 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/object/index.d.mts @@ -0,0 +1,2 @@ +import { omit } from "./omit.mjs"; +import { pick } from "./pick.mjs"; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/object/pick.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/object/pick.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..f290a65dcd3c6df713eaf1d5e17ea1f5115a4be4 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/object/pick.d.mts @@ -0,0 +1,19 @@ +//#region src/fp/object/pick.d.ts +/** + * Creates a function that builds a new object containing only the given `keys` + * from the input object. Keys that are absent on the input are skipped. Use it + * with {@link pipe}. + * + * @template T - The type of the input object. + * @template K - The union of keys to pick. + * @param keys - The keys to copy into the new object. + * @returns A function that maps an object `T` to `Pick`. + * + * @example + * import { pipe, pick } from 'es-toolkit/fp'; + * + * pipe({ a: 1, b: 2, c: 3 }, pick(['a', 'c'])); // => { a: 1, c: 3 } + */ +declare function pick, K extends keyof T>(keys: readonly K[]): (obj: T) => Pick; +//#endregion +export { pick }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/pipe.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/pipe.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..ea1af59d29d9e1278fd4d99487123e53dd2474f5 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/pipe.d.mts @@ -0,0 +1,235 @@ +//#region src/fp/pipe.d.ts +/** + * Returns `value` unchanged — the identity case of {@link pipe} with no functions. + * + * @param value - The initial value fed into the pipe. + * @returns `value`, unchanged. + */ +declare function pipe(value: A): A; +/** + * Pipes `value` through `fn1`, returning its result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @returns The result of `fn1`. + */ +declare function pipe(value: A, fn1: (input: A) => B): B; +/** + * Pipes `value` left-to-right through `fn1` to `fn2`, returning the final result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @param fn2 - Applied to the result of `fn1`. + * @returns The result of `fn2` — the value returned by the last function. + */ +declare function pipe(value: A, fn1: (input: A) => B, fn2: (input: B) => C): C; +/** + * Pipes `value` left-to-right through `fn1` to `fn3`, returning the final result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @returns The result of `fn3` — the value returned by the last function. + */ +declare function pipe(value: A, fn1: (input: A) => B, fn2: (input: B) => C, fn3: (input: C) => D): D; +/** + * Pipes `value` left-to-right through `fn1` to `fn4`, returning the final result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @returns The result of `fn4` — the value returned by the last function. + */ +declare function pipe(value: A, fn1: (input: A) => B, fn2: (input: B) => C, fn3: (input: C) => D, fn4: (input: D) => E): E; +/** + * Pipes `value` left-to-right through `fn1` to `fn5`, returning the final result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @returns The result of `fn5` — the value returned by the last function. + */ +declare function pipe(value: A, fn1: (input: A) => B, fn2: (input: B) => C, fn3: (input: C) => D, fn4: (input: D) => E, fn5: (input: E) => F): F; +/** + * Pipes `value` left-to-right through `fn1` to `fn6`, returning the final result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @returns The result of `fn6` — the value returned by the last function. + */ +declare function pipe(value: A, fn1: (input: A) => B, fn2: (input: B) => C, fn3: (input: C) => D, fn4: (input: D) => E, fn5: (input: E) => F, fn6: (input: F) => G): G; +/** + * Pipes `value` left-to-right through `fn1` to `fn7`, returning the final result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @returns The result of `fn7` — the value returned by the last function. + */ +declare function pipe(value: A, fn1: (input: A) => B, fn2: (input: B) => C, fn3: (input: C) => D, fn4: (input: D) => E, fn5: (input: E) => F, fn6: (input: F) => G, fn7: (input: G) => H): H; +/** + * Pipes `value` left-to-right through `fn1` to `fn8`, returning the final result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @returns The result of `fn8` — the value returned by the last function. + */ +declare function pipe(value: A, fn1: (input: A) => B, fn2: (input: B) => C, fn3: (input: C) => D, fn4: (input: D) => E, fn5: (input: E) => F, fn6: (input: F) => G, fn7: (input: G) => H, fn8: (input: H) => I): I; +/** + * Pipes `value` left-to-right through `fn1` to `fn9`, returning the final result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @param fn9 - Applied to the result of `fn8`. + * @returns The result of `fn9` — the value returned by the last function. + */ +declare function pipe(value: A, fn1: (input: A) => B, fn2: (input: B) => C, fn3: (input: C) => D, fn4: (input: D) => E, fn5: (input: E) => F, fn6: (input: F) => G, fn7: (input: G) => H, fn8: (input: H) => I, fn9: (input: I) => J): J; +/** + * Pipes `value` left-to-right through `fn1` to `fn10`, returning the final result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @param fn9 - Applied to the result of `fn8`. + * @param fn10 - Applied to the result of `fn9`. + * @returns The result of `fn10` — the value returned by the last function. + */ +declare function pipe(value: A, fn1: (input: A) => B, fn2: (input: B) => C, fn3: (input: C) => D, fn4: (input: D) => E, fn5: (input: E) => F, fn6: (input: F) => G, fn7: (input: G) => H, fn8: (input: H) => I, fn9: (input: I) => J, fn10: (input: J) => K): K; +/** + * Pipes `value` left-to-right through `fn1` to `fn11`, returning the final result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @param fn9 - Applied to the result of `fn8`. + * @param fn10 - Applied to the result of `fn9`. + * @param fn11 - Applied to the result of `fn10`. + * @returns The result of `fn11` — the value returned by the last function. + */ +declare function pipe(value: A, fn1: (input: A) => B, fn2: (input: B) => C, fn3: (input: C) => D, fn4: (input: D) => E, fn5: (input: E) => F, fn6: (input: F) => G, fn7: (input: G) => H, fn8: (input: H) => I, fn9: (input: I) => J, fn10: (input: J) => K, fn11: (input: K) => L): L; +/** + * Pipes `value` left-to-right through `fn1` to `fn12`, returning the final result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @param fn9 - Applied to the result of `fn8`. + * @param fn10 - Applied to the result of `fn9`. + * @param fn11 - Applied to the result of `fn10`. + * @param fn12 - Applied to the result of `fn11`. + * @returns The result of `fn12` — the value returned by the last function. + */ +declare function pipe(value: A, fn1: (input: A) => B, fn2: (input: B) => C, fn3: (input: C) => D, fn4: (input: D) => E, fn5: (input: E) => F, fn6: (input: F) => G, fn7: (input: G) => H, fn8: (input: H) => I, fn9: (input: I) => J, fn10: (input: J) => K, fn11: (input: K) => L, fn12: (input: L) => M): M; +/** + * Pipes `value` left-to-right through `fn1` to `fn13`, returning the final result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @param fn9 - Applied to the result of `fn8`. + * @param fn10 - Applied to the result of `fn9`. + * @param fn11 - Applied to the result of `fn10`. + * @param fn12 - Applied to the result of `fn11`. + * @param fn13 - Applied to the result of `fn12`. + * @returns The result of `fn13` — the value returned by the last function. + */ +declare function pipe(value: A, fn1: (input: A) => B, fn2: (input: B) => C, fn3: (input: C) => D, fn4: (input: D) => E, fn5: (input: E) => F, fn6: (input: F) => G, fn7: (input: G) => H, fn8: (input: H) => I, fn9: (input: I) => J, fn10: (input: J) => K, fn11: (input: K) => L, fn12: (input: L) => M, fn13: (input: M) => N): N; +/** + * Pipes `value` left-to-right through `fn1` to `fn14`, returning the final result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @param fn9 - Applied to the result of `fn8`. + * @param fn10 - Applied to the result of `fn9`. + * @param fn11 - Applied to the result of `fn10`. + * @param fn12 - Applied to the result of `fn11`. + * @param fn13 - Applied to the result of `fn12`. + * @param fn14 - Applied to the result of `fn13`. + * @returns The result of `fn14` — the value returned by the last function. + */ +declare function pipe(value: A, fn1: (input: A) => B, fn2: (input: B) => C, fn3: (input: C) => D, fn4: (input: D) => E, fn5: (input: E) => F, fn6: (input: F) => G, fn7: (input: G) => H, fn8: (input: H) => I, fn9: (input: I) => J, fn10: (input: J) => K, fn11: (input: K) => L, fn12: (input: L) => M, fn13: (input: M) => N, fn14: (input: N) => O): O; +/** + * Pipes `value` left-to-right through `fn1` to `fn15`, returning the final result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @param fn9 - Applied to the result of `fn8`. + * @param fn10 - Applied to the result of `fn9`. + * @param fn11 - Applied to the result of `fn10`. + * @param fn12 - Applied to the result of `fn11`. + * @param fn13 - Applied to the result of `fn12`. + * @param fn14 - Applied to the result of `fn13`. + * @param fn15 - Applied to the result of `fn14`. + * @returns The result of `fn15` — the value returned by the last function. + */ +declare function pipe(value: A, fn1: (input: A) => B, fn2: (input: B) => C, fn3: (input: C) => D, fn4: (input: D) => E, fn5: (input: E) => F, fn6: (input: F) => G, fn7: (input: G) => H, fn8: (input: H) => I, fn9: (input: I) => J, fn10: (input: J) => K, fn11: (input: K) => L, fn12: (input: L) => M, fn13: (input: M) => N, fn14: (input: N) => O, fn15: (input: O) => P): P; +//#endregion +export { pipe }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/pipe.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/pipe.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ea1af59d29d9e1278fd4d99487123e53dd2474f5 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/pipe.d.ts @@ -0,0 +1,235 @@ +//#region src/fp/pipe.d.ts +/** + * Returns `value` unchanged — the identity case of {@link pipe} with no functions. + * + * @param value - The initial value fed into the pipe. + * @returns `value`, unchanged. + */ +declare function pipe(value: A): A; +/** + * Pipes `value` through `fn1`, returning its result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @returns The result of `fn1`. + */ +declare function pipe(value: A, fn1: (input: A) => B): B; +/** + * Pipes `value` left-to-right through `fn1` to `fn2`, returning the final result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @param fn2 - Applied to the result of `fn1`. + * @returns The result of `fn2` — the value returned by the last function. + */ +declare function pipe(value: A, fn1: (input: A) => B, fn2: (input: B) => C): C; +/** + * Pipes `value` left-to-right through `fn1` to `fn3`, returning the final result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @returns The result of `fn3` — the value returned by the last function. + */ +declare function pipe(value: A, fn1: (input: A) => B, fn2: (input: B) => C, fn3: (input: C) => D): D; +/** + * Pipes `value` left-to-right through `fn1` to `fn4`, returning the final result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @returns The result of `fn4` — the value returned by the last function. + */ +declare function pipe(value: A, fn1: (input: A) => B, fn2: (input: B) => C, fn3: (input: C) => D, fn4: (input: D) => E): E; +/** + * Pipes `value` left-to-right through `fn1` to `fn5`, returning the final result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @returns The result of `fn5` — the value returned by the last function. + */ +declare function pipe(value: A, fn1: (input: A) => B, fn2: (input: B) => C, fn3: (input: C) => D, fn4: (input: D) => E, fn5: (input: E) => F): F; +/** + * Pipes `value` left-to-right through `fn1` to `fn6`, returning the final result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @returns The result of `fn6` — the value returned by the last function. + */ +declare function pipe(value: A, fn1: (input: A) => B, fn2: (input: B) => C, fn3: (input: C) => D, fn4: (input: D) => E, fn5: (input: E) => F, fn6: (input: F) => G): G; +/** + * Pipes `value` left-to-right through `fn1` to `fn7`, returning the final result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @returns The result of `fn7` — the value returned by the last function. + */ +declare function pipe(value: A, fn1: (input: A) => B, fn2: (input: B) => C, fn3: (input: C) => D, fn4: (input: D) => E, fn5: (input: E) => F, fn6: (input: F) => G, fn7: (input: G) => H): H; +/** + * Pipes `value` left-to-right through `fn1` to `fn8`, returning the final result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @returns The result of `fn8` — the value returned by the last function. + */ +declare function pipe(value: A, fn1: (input: A) => B, fn2: (input: B) => C, fn3: (input: C) => D, fn4: (input: D) => E, fn5: (input: E) => F, fn6: (input: F) => G, fn7: (input: G) => H, fn8: (input: H) => I): I; +/** + * Pipes `value` left-to-right through `fn1` to `fn9`, returning the final result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @param fn9 - Applied to the result of `fn8`. + * @returns The result of `fn9` — the value returned by the last function. + */ +declare function pipe(value: A, fn1: (input: A) => B, fn2: (input: B) => C, fn3: (input: C) => D, fn4: (input: D) => E, fn5: (input: E) => F, fn6: (input: F) => G, fn7: (input: G) => H, fn8: (input: H) => I, fn9: (input: I) => J): J; +/** + * Pipes `value` left-to-right through `fn1` to `fn10`, returning the final result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @param fn9 - Applied to the result of `fn8`. + * @param fn10 - Applied to the result of `fn9`. + * @returns The result of `fn10` — the value returned by the last function. + */ +declare function pipe(value: A, fn1: (input: A) => B, fn2: (input: B) => C, fn3: (input: C) => D, fn4: (input: D) => E, fn5: (input: E) => F, fn6: (input: F) => G, fn7: (input: G) => H, fn8: (input: H) => I, fn9: (input: I) => J, fn10: (input: J) => K): K; +/** + * Pipes `value` left-to-right through `fn1` to `fn11`, returning the final result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @param fn9 - Applied to the result of `fn8`. + * @param fn10 - Applied to the result of `fn9`. + * @param fn11 - Applied to the result of `fn10`. + * @returns The result of `fn11` — the value returned by the last function. + */ +declare function pipe(value: A, fn1: (input: A) => B, fn2: (input: B) => C, fn3: (input: C) => D, fn4: (input: D) => E, fn5: (input: E) => F, fn6: (input: F) => G, fn7: (input: G) => H, fn8: (input: H) => I, fn9: (input: I) => J, fn10: (input: J) => K, fn11: (input: K) => L): L; +/** + * Pipes `value` left-to-right through `fn1` to `fn12`, returning the final result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @param fn9 - Applied to the result of `fn8`. + * @param fn10 - Applied to the result of `fn9`. + * @param fn11 - Applied to the result of `fn10`. + * @param fn12 - Applied to the result of `fn11`. + * @returns The result of `fn12` — the value returned by the last function. + */ +declare function pipe(value: A, fn1: (input: A) => B, fn2: (input: B) => C, fn3: (input: C) => D, fn4: (input: D) => E, fn5: (input: E) => F, fn6: (input: F) => G, fn7: (input: G) => H, fn8: (input: H) => I, fn9: (input: I) => J, fn10: (input: J) => K, fn11: (input: K) => L, fn12: (input: L) => M): M; +/** + * Pipes `value` left-to-right through `fn1` to `fn13`, returning the final result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @param fn9 - Applied to the result of `fn8`. + * @param fn10 - Applied to the result of `fn9`. + * @param fn11 - Applied to the result of `fn10`. + * @param fn12 - Applied to the result of `fn11`. + * @param fn13 - Applied to the result of `fn12`. + * @returns The result of `fn13` — the value returned by the last function. + */ +declare function pipe(value: A, fn1: (input: A) => B, fn2: (input: B) => C, fn3: (input: C) => D, fn4: (input: D) => E, fn5: (input: E) => F, fn6: (input: F) => G, fn7: (input: G) => H, fn8: (input: H) => I, fn9: (input: I) => J, fn10: (input: J) => K, fn11: (input: K) => L, fn12: (input: L) => M, fn13: (input: M) => N): N; +/** + * Pipes `value` left-to-right through `fn1` to `fn14`, returning the final result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @param fn9 - Applied to the result of `fn8`. + * @param fn10 - Applied to the result of `fn9`. + * @param fn11 - Applied to the result of `fn10`. + * @param fn12 - Applied to the result of `fn11`. + * @param fn13 - Applied to the result of `fn12`. + * @param fn14 - Applied to the result of `fn13`. + * @returns The result of `fn14` — the value returned by the last function. + */ +declare function pipe(value: A, fn1: (input: A) => B, fn2: (input: B) => C, fn3: (input: C) => D, fn4: (input: D) => E, fn5: (input: E) => F, fn6: (input: F) => G, fn7: (input: G) => H, fn8: (input: H) => I, fn9: (input: I) => J, fn10: (input: J) => K, fn11: (input: K) => L, fn12: (input: L) => M, fn13: (input: M) => N, fn14: (input: N) => O): O; +/** + * Pipes `value` left-to-right through `fn1` to `fn15`, returning the final result. + * + * @param value - The initial value fed into the pipe. + * @param fn1 - Applied to `value`. + * @param fn2 - Applied to the result of `fn1`. + * @param fn3 - Applied to the result of `fn2`. + * @param fn4 - Applied to the result of `fn3`. + * @param fn5 - Applied to the result of `fn4`. + * @param fn6 - Applied to the result of `fn5`. + * @param fn7 - Applied to the result of `fn6`. + * @param fn8 - Applied to the result of `fn7`. + * @param fn9 - Applied to the result of `fn8`. + * @param fn10 - Applied to the result of `fn9`. + * @param fn11 - Applied to the result of `fn10`. + * @param fn12 - Applied to the result of `fn11`. + * @param fn13 - Applied to the result of `fn12`. + * @param fn14 - Applied to the result of `fn13`. + * @param fn15 - Applied to the result of `fn14`. + * @returns The result of `fn15` — the value returned by the last function. + */ +declare function pipe(value: A, fn1: (input: A) => B, fn2: (input: B) => C, fn3: (input: C) => D, fn4: (input: D) => E, fn5: (input: E) => F, fn6: (input: F) => G, fn7: (input: G) => H, fn8: (input: H) => I, fn9: (input: I) => J, fn10: (input: J) => K, fn11: (input: K) => L, fn12: (input: L) => M, fn13: (input: M) => N, fn14: (input: N) => O, fn15: (input: O) => P): P; +//#endregion +export { pipe }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/pipe.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/pipe.js new file mode 100644 index 0000000000000000000000000000000000000000..44d8768879c13cfa0132d7ba4110a6ed58a710bc --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/pipe.js @@ -0,0 +1,112 @@ +//#region src/fp/pipe.ts +/** +* Performs left-to-right function composition, threading `value` through each +* function in sequence. Every function receives the output of the previous +* one, so the data flows top-to-bottom in the same order it is read. This +* turns deeply nested calls into clear, sequential steps without temporary +* variables. +* +* This is the entry point of `es-toolkit/fp`. Each `es-toolkit/fp` function is +* called with its configuration (e.g. `map(fn)`, `take(2)`) and returns a +* function that takes the data, which `pipe` then supplies. +* +* When consecutive **lazy-capable** functions (`map`, `filter`, `take`, ...) +* appear together, `pipe` fuses them and processes the input element-by-element +* instead of building an intermediate array after every step. This allows +* early termination: a trailing `take(n)` stops the walk as soon as `n` +* results exist, so the remaining input is never visited. +* +* @param value - The initial value fed into the pipe. +* @param functions - Data-last operators (or any unary functions) applied in order. +* @returns The result of applying every function, left to right. +* +* @example +* import { pipe, map, filter, take } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3], map(x => x * 3)); // => [3, 6, 9] +* +* @example +* // Lazy evaluation with early termination: only the first two even squares +* // are ever computed, the rest of the array is never touched. +* pipe( +* [1, 2, 3, 4, 5, 6, 7, 8], +* map(x => x * x), +* filter(x => x % 2 === 0), +* take(2) +* ); // => [4, 16] +* +* @example +* // Any unary function works inside a pipe, not just es-toolkit operators. +* pipe( +* ' Hello ', +* s => s.trim(), +* s => s.toLowerCase() +* ); // => 'hello' +*/ +function pipe(value, ...functions) { + let output = value; + const groups = chunkFunctions(functions); + for (let groupIndex = 0; groupIndex < groups.length; groupIndex++) { + const group = groups[groupIndex]; + if (group.lazy && isIterable(output) && (group.shortCircuit || !Array.isArray(output))) output = lazyPipe(output, group); + else for (let index = 0; index < group.length; index++) output = group[index](output); + } + return output; +} +function chunkFunctions(functions) { + const result = []; + let currentGroup; + for (let index = 0; index < functions.length; index++) { + const func = functions[index]; + const isLazy = func.lazy != null; + if (currentGroup === void 0 || currentGroup.lazy !== isLazy) { + currentGroup = []; + currentGroup.lazy = isLazy; + result.push(currentGroup); + } + currentGroup.push(func); + if (func.shortCircuit) currentGroup.shortCircuit = true; + } + return result; +} +/** +* Fuses a run of lazy functions into a single pass over `data`. The functions' +* push transforms are composed (last function first) into one sink, then `data` +* is driven through it element-by-element. A short-circuiting function (e.g. +* `take`) returns `false`, which stops the drive loop at once, so the functions +* before it never run on the rest of the input — no intermediate arrays. +* +* @param data - The iterable fed into the run (an array, `Set`, generator, ...). +* @param lazyFunctions - The consecutive lazy functions to fuse, in order. +* @returns The collected results. +*/ +function lazyPipe(data, lazyFunctions) { + const result = []; + let sink = (value) => { + result.push(value); + return true; + }; + for (let index = lazyFunctions.length - 1; index >= 0; index--) sink = lazyFunctions[index].lazy(sink); + if (Array.isArray(data)) { + for (let index = 0; index < data.length; index++) if (sink(data[index]) === false) break; + } else { + const iterator = data[Symbol.iterator](); + let step = iterator.next(); + while (!step.done) { + if (sink(step.value) === false) break; + step = iterator.next(); + } + } + return result; +} +/** +* Whether `value` can be fed through the lazy path. A non-array iterable (a +* `Set`, a generator, ...) can only go through `lazyPipe`, since the eager path +* relies on array methods. Primitives and plain objects (no `Symbol.iterator`) +* fall through to the eager branch. +*/ +function isIterable(value) { + return typeof value === "object" && value !== null && Symbol.iterator in value; +} +//#endregion +exports.pipe = pipe; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/pipe.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/pipe.mjs new file mode 100644 index 0000000000000000000000000000000000000000..93fe329b1dc58a4ae95e4413f5c4abfae444c1dd --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/fp/pipe.mjs @@ -0,0 +1,112 @@ +//#region src/fp/pipe.ts +/** +* Performs left-to-right function composition, threading `value` through each +* function in sequence. Every function receives the output of the previous +* one, so the data flows top-to-bottom in the same order it is read. This +* turns deeply nested calls into clear, sequential steps without temporary +* variables. +* +* This is the entry point of `es-toolkit/fp`. Each `es-toolkit/fp` function is +* called with its configuration (e.g. `map(fn)`, `take(2)`) and returns a +* function that takes the data, which `pipe` then supplies. +* +* When consecutive **lazy-capable** functions (`map`, `filter`, `take`, ...) +* appear together, `pipe` fuses them and processes the input element-by-element +* instead of building an intermediate array after every step. This allows +* early termination: a trailing `take(n)` stops the walk as soon as `n` +* results exist, so the remaining input is never visited. +* +* @param value - The initial value fed into the pipe. +* @param functions - Data-last operators (or any unary functions) applied in order. +* @returns The result of applying every function, left to right. +* +* @example +* import { pipe, map, filter, take } from 'es-toolkit/fp'; +* +* pipe([1, 2, 3], map(x => x * 3)); // => [3, 6, 9] +* +* @example +* // Lazy evaluation with early termination: only the first two even squares +* // are ever computed, the rest of the array is never touched. +* pipe( +* [1, 2, 3, 4, 5, 6, 7, 8], +* map(x => x * x), +* filter(x => x % 2 === 0), +* take(2) +* ); // => [4, 16] +* +* @example +* // Any unary function works inside a pipe, not just es-toolkit operators. +* pipe( +* ' Hello ', +* s => s.trim(), +* s => s.toLowerCase() +* ); // => 'hello' +*/ +function pipe(value, ...functions) { + let output = value; + const groups = chunkFunctions(functions); + for (let groupIndex = 0; groupIndex < groups.length; groupIndex++) { + const group = groups[groupIndex]; + if (group.lazy && isIterable(output) && (group.shortCircuit || !Array.isArray(output))) output = lazyPipe(output, group); + else for (let index = 0; index < group.length; index++) output = group[index](output); + } + return output; +} +function chunkFunctions(functions) { + const result = []; + let currentGroup; + for (let index = 0; index < functions.length; index++) { + const func = functions[index]; + const isLazy = func.lazy != null; + if (currentGroup === void 0 || currentGroup.lazy !== isLazy) { + currentGroup = []; + currentGroup.lazy = isLazy; + result.push(currentGroup); + } + currentGroup.push(func); + if (func.shortCircuit) currentGroup.shortCircuit = true; + } + return result; +} +/** +* Fuses a run of lazy functions into a single pass over `data`. The functions' +* push transforms are composed (last function first) into one sink, then `data` +* is driven through it element-by-element. A short-circuiting function (e.g. +* `take`) returns `false`, which stops the drive loop at once, so the functions +* before it never run on the rest of the input — no intermediate arrays. +* +* @param data - The iterable fed into the run (an array, `Set`, generator, ...). +* @param lazyFunctions - The consecutive lazy functions to fuse, in order. +* @returns The collected results. +*/ +function lazyPipe(data, lazyFunctions) { + const result = []; + let sink = (value) => { + result.push(value); + return true; + }; + for (let index = lazyFunctions.length - 1; index >= 0; index--) sink = lazyFunctions[index].lazy(sink); + if (Array.isArray(data)) { + for (let index = 0; index < data.length; index++) if (sink(data[index]) === false) break; + } else { + const iterator = data[Symbol.iterator](); + let step = iterator.next(); + while (!step.done) { + if (sink(step.value) === false) break; + step = iterator.next(); + } + } + return result; +} +/** +* Whether `value` can be fed through the lazy path. A non-array iterable (a +* `Set`, a generator, ...) can only go through `lazyPipe`, since the eager path +* relies on array methods. Primitives and plain objects (no `Symbol.iterator`) +* fall through to the eager branch. +*/ +function isIterable(value) { + return typeof value === "object" && value !== null && Symbol.iterator in value; +} +//#endregion +export { pipe }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/DeepPartial.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/DeepPartial.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..9e1140e9a83e068882bfe66983e704738bccc5c3 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/DeepPartial.d.mts @@ -0,0 +1,21 @@ +//#region src/types/DeepPartial.d.ts +/** + * Makes all properties of `T` optional recursively, unlike the built-in + * `Partial` which only affects the first level. + * + * Recurses into plain objects, arrays/tuples (elements do not become sparse), + * and `Map`/`Set` contents. Functions, `Date`, and `RegExp` pass through + * unchanged. + * + * @template T - The type to make deeply optional. + * + * @example + * type Config = { server: { host: string; port: number }; debug: boolean }; + * type ConfigPatch = DeepPartial; + * // => { server?: { host?: string; port?: number }; debug?: boolean } + * + * const patch: ConfigPatch = { server: { port: 8080 } }; // ok, host omitted + */ +type DeepPartial = T extends ((...args: any[]) => unknown) | Date | RegExp ? T : T extends Map ? Map, DeepPartial> : T extends ReadonlyMap ? ReadonlyMap, DeepPartial> : T extends Set ? Set> : T extends ReadonlySet ? ReadonlySet> : T extends readonly unknown[] ? { [K in keyof T]: DeepPartial } : T extends object ? { [K in keyof T]?: DeepPartial } : T; +//#endregion +export { DeepPartial }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/DeepPartial.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/DeepPartial.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9e1140e9a83e068882bfe66983e704738bccc5c3 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/DeepPartial.d.ts @@ -0,0 +1,21 @@ +//#region src/types/DeepPartial.d.ts +/** + * Makes all properties of `T` optional recursively, unlike the built-in + * `Partial` which only affects the first level. + * + * Recurses into plain objects, arrays/tuples (elements do not become sparse), + * and `Map`/`Set` contents. Functions, `Date`, and `RegExp` pass through + * unchanged. + * + * @template T - The type to make deeply optional. + * + * @example + * type Config = { server: { host: string; port: number }; debug: boolean }; + * type ConfigPatch = DeepPartial; + * // => { server?: { host?: string; port?: number }; debug?: boolean } + * + * const patch: ConfigPatch = { server: { port: 8080 } }; // ok, host omitted + */ +type DeepPartial = T extends ((...args: any[]) => unknown) | Date | RegExp ? T : T extends Map ? Map, DeepPartial> : T extends ReadonlyMap ? ReadonlyMap, DeepPartial> : T extends Set ? Set> : T extends ReadonlySet ? ReadonlySet> : T extends readonly unknown[] ? { [K in keyof T]: DeepPartial } : T extends object ? { [K in keyof T]?: DeepPartial } : T; +//#endregion +export { DeepPartial }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/DeepReadonly.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/DeepReadonly.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..9c3a4ce3c974bd4a8b0da6f04029e1d0b29bb105 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/DeepReadonly.d.mts @@ -0,0 +1,22 @@ +//#region src/types/DeepReadonly.d.ts +/** + * Makes all properties of `T` readonly recursively, unlike the built-in + * `Readonly` which only affects the first level. + * + * Arrays and tuples become readonly, and `Map`/`Set` become + * `ReadonlyMap`/`ReadonlySet`. Functions, `Date`, and `RegExp` pass through + * unchanged. + * + * @template T - The type to make deeply readonly. + * + * @example + * type State = { user: { name: string; tags: string[] } }; + * type FrozenState = DeepReadonly; + * // => { readonly user: { readonly name: string; readonly tags: readonly string[] } } + * + * declare const state: FrozenState; + * state.user.name = 'x'; // error: name is readonly + */ +type DeepReadonly = T extends ((...args: any[]) => unknown) | Date | RegExp ? T : T extends ReadonlyMap ? ReadonlyMap, DeepReadonly> : T extends ReadonlySet ? ReadonlySet> : T extends object ? { readonly [K in keyof T]: DeepReadonly } : T; +//#endregion +export { DeepReadonly }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/DeepReadonly.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/DeepReadonly.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9c3a4ce3c974bd4a8b0da6f04029e1d0b29bb105 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/DeepReadonly.d.ts @@ -0,0 +1,22 @@ +//#region src/types/DeepReadonly.d.ts +/** + * Makes all properties of `T` readonly recursively, unlike the built-in + * `Readonly` which only affects the first level. + * + * Arrays and tuples become readonly, and `Map`/`Set` become + * `ReadonlyMap`/`ReadonlySet`. Functions, `Date`, and `RegExp` pass through + * unchanged. + * + * @template T - The type to make deeply readonly. + * + * @example + * type State = { user: { name: string; tags: string[] } }; + * type FrozenState = DeepReadonly; + * // => { readonly user: { readonly name: string; readonly tags: readonly string[] } } + * + * declare const state: FrozenState; + * state.user.name = 'x'; // error: name is readonly + */ +type DeepReadonly = T extends ((...args: any[]) => unknown) | Date | RegExp ? T : T extends ReadonlyMap ? ReadonlyMap, DeepReadonly> : T extends ReadonlySet ? ReadonlySet> : T extends object ? { readonly [K in keyof T]: DeepReadonly } : T; +//#endregion +export { DeepReadonly }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/EmptyObject.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/EmptyObject.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..7198677c38c42a598d6a5a62ab0e8565d1841fa8 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/EmptyObject.d.mts @@ -0,0 +1,21 @@ +//#region src/types/EmptyObject.d.ts +/** + * An object with no properties. + * + * Pairs with the `isEmptyObject` guard. Assigning an object that has any property + * fails, because every value would have to be `never`. + * + * @example + * const a: EmptyObject = {}; // ok + * const b: EmptyObject = { a: 1 }; // error + * + * @example + * // Useful for a step that carries no data. + * interface StepContext { + * intro: EmptyObject; + * form: { amount: number }; + * } + */ +type EmptyObject = Record; +//#endregion +export { EmptyObject }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/EmptyObject.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/EmptyObject.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7198677c38c42a598d6a5a62ab0e8565d1841fa8 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/EmptyObject.d.ts @@ -0,0 +1,21 @@ +//#region src/types/EmptyObject.d.ts +/** + * An object with no properties. + * + * Pairs with the `isEmptyObject` guard. Assigning an object that has any property + * fails, because every value would have to be `never`. + * + * @example + * const a: EmptyObject = {}; // ok + * const b: EmptyObject = { a: 1 }; // error + * + * @example + * // Useful for a step that carries no data. + * interface StepContext { + * intro: EmptyObject; + * form: { amount: number }; + * } + */ +type EmptyObject = Record; +//#endregion +export { EmptyObject }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/IsEqual.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/IsEqual.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..9991dcbdee333101a499844ad3af3263f8ad1080 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/IsEqual.d.mts @@ -0,0 +1,18 @@ +//#region src/types/IsEqual.d.ts +/** + * Resolves to `true` when `A` and `B` are exactly the same type, `false` otherwise. + * + * Unlike a plain conditional type, this tells `any` apart from every other type, + * which makes it useful for catching an accidental `any` in type-level tests. + * + * @template A - The first type to compare. + * @template B - The second type to compare. + * + * @example + * type A = IsEqual<{ a: string }, { a: string }>; // true + * type B = IsEqual; // false + * type C = IsEqual; // false + */ +type IsEqual = (() => G extends A ? 1 : 2) extends (() => G extends B ? 1 : 2) ? true : false; +//#endregion +export { IsEqual }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/IsEqual.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/IsEqual.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9991dcbdee333101a499844ad3af3263f8ad1080 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/IsEqual.d.ts @@ -0,0 +1,18 @@ +//#region src/types/IsEqual.d.ts +/** + * Resolves to `true` when `A` and `B` are exactly the same type, `false` otherwise. + * + * Unlike a plain conditional type, this tells `any` apart from every other type, + * which makes it useful for catching an accidental `any` in type-level tests. + * + * @template A - The first type to compare. + * @template B - The second type to compare. + * + * @example + * type A = IsEqual<{ a: string }, { a: string }>; // true + * type B = IsEqual; // false + * type C = IsEqual; // false + */ +type IsEqual = (() => G extends A ? 1 : 2) extends (() => G extends B ? 1 : 2) ? true : false; +//#endregion +export { IsEqual }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/JSONValue.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/JSONValue.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..63ef5b2914f9b89cc046ae3794382cae56ce746c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/JSONValue.d.mts @@ -0,0 +1,24 @@ +//#region src/types/JSONValue.d.ts +/** + * Any value that `JSON.parse` can produce. + * + * Functions, `Date`, `undefined`, and class instances are excluded, because they + * do not survive a JSON round trip. + * + * @example + * declare function parse(text: string): JSONValue; + * + * const value = parse('{"a":[1,null]}'); + * if (typeof value === 'object' && value !== null && !Array.isArray(value)) { + * const a = value.a; // JSONValue + * } + * + * @example + * // Use `Record` when you want to accept a JSON object specifically. + * declare function send(body: Record): void; + */ +type JSONValue = string | number | boolean | null | JSONValue[] | { + [key: string]: JSONValue; +}; +//#endregion +export { JSONValue }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/JSONValue.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/JSONValue.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..63ef5b2914f9b89cc046ae3794382cae56ce746c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/JSONValue.d.ts @@ -0,0 +1,24 @@ +//#region src/types/JSONValue.d.ts +/** + * Any value that `JSON.parse` can produce. + * + * Functions, `Date`, `undefined`, and class instances are excluded, because they + * do not survive a JSON round trip. + * + * @example + * declare function parse(text: string): JSONValue; + * + * const value = parse('{"a":[1,null]}'); + * if (typeof value === 'object' && value !== null && !Array.isArray(value)) { + * const a = value.a; // JSONValue + * } + * + * @example + * // Use `Record` when you want to accept a JSON object specifically. + * declare function send(body: Record): void; + */ +type JSONValue = string | number | boolean | null | JSONValue[] | { + [key: string]: JSONValue; +}; +//#endregion +export { JSONValue }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/Merge.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/Merge.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..d003c600cfc82d30add7990e5882a38367140ba3 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/Merge.d.mts @@ -0,0 +1,37 @@ +import { Simplify } from "./Simplify.mjs"; + +//#region src/types/Merge.d.ts +/** + * The result of deeply merging the source type `S` into the target type `T`, + * matching what `merge(target, source)` returns at runtime. + * + * Keys present on only one side are kept as-is. When both sides have a plain + * object at the same key, the merge recurses; tuples merge index by index, and + * other arrays merge into an array of both element types. If the source value + * can be `undefined`, the target type is kept because `merge` skips + * `undefined` source values. Values that are not plain objects or arrays + * (functions, `Date`, `RegExp`, `Map`, `Set`, etc.) are not merged into; + * the source value replaces the target value. When an array meets a plain + * object, `merge` keeps the target and assigns the source's properties onto + * it, so both property sets are kept (`T & S`). + * + * @template T - Type of the target object. + * @template S - Type of the source object. + * + * @example + * type Target = { a: number; b: { x: number; y: number } }; + * type Source = { b: { y: string; z: boolean }; c: string }; + * type Result = Merge; + * // => { a: number; b: { x: number; y: string; z: boolean }; c: string } + */ +type Merge = undefined extends S ? T | MergeDefined> : MergeDefined; +/** + * Values `merge` does not merge into: everything that is not a plain object + * or an array. The source value replaces the target value instead. + */ +type NonMergeable = ((...args: any[]) => unknown) | Date | RegExp | Error | Promise | ReadonlyMap | ReadonlySet | WeakMap | WeakSet; +type MergeDefined = S extends readonly unknown[] ? (T extends readonly unknown[] ? MergeArrays : T extends NonMergeable ? S : T extends object ? T & S : S) : S extends NonMergeable ? S : S extends object ? (T extends readonly unknown[] ? T & S : T extends NonMergeable ? S : T extends object ? MergeRecords : S) : S; +type MergeArrays = T extends readonly [] ? S : S extends readonly [] ? T : T extends readonly [infer TH, ...infer TR] ? S extends readonly [infer SH, ...infer SR] ? [Merge, ...MergeArrays] : Array : Array; +type MergeRecords = Simplify & Omit & { [K in keyof T & keyof S]: Merge }>; +//#endregion +export { Merge }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/Merge.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/Merge.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1fd2180d66061bc6ae61fa8c74b814ef484f8093 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/Merge.d.ts @@ -0,0 +1,37 @@ +import { Simplify } from "./Simplify.js"; + +//#region src/types/Merge.d.ts +/** + * The result of deeply merging the source type `S` into the target type `T`, + * matching what `merge(target, source)` returns at runtime. + * + * Keys present on only one side are kept as-is. When both sides have a plain + * object at the same key, the merge recurses; tuples merge index by index, and + * other arrays merge into an array of both element types. If the source value + * can be `undefined`, the target type is kept because `merge` skips + * `undefined` source values. Values that are not plain objects or arrays + * (functions, `Date`, `RegExp`, `Map`, `Set`, etc.) are not merged into; + * the source value replaces the target value. When an array meets a plain + * object, `merge` keeps the target and assigns the source's properties onto + * it, so both property sets are kept (`T & S`). + * + * @template T - Type of the target object. + * @template S - Type of the source object. + * + * @example + * type Target = { a: number; b: { x: number; y: number } }; + * type Source = { b: { y: string; z: boolean }; c: string }; + * type Result = Merge; + * // => { a: number; b: { x: number; y: string; z: boolean }; c: string } + */ +type Merge = undefined extends S ? T | MergeDefined> : MergeDefined; +/** + * Values `merge` does not merge into: everything that is not a plain object + * or an array. The source value replaces the target value instead. + */ +type NonMergeable = ((...args: any[]) => unknown) | Date | RegExp | Error | Promise | ReadonlyMap | ReadonlySet | WeakMap | WeakSet; +type MergeDefined = S extends readonly unknown[] ? (T extends readonly unknown[] ? MergeArrays : T extends NonMergeable ? S : T extends object ? T & S : S) : S extends NonMergeable ? S : S extends object ? (T extends readonly unknown[] ? T & S : T extends NonMergeable ? S : T extends object ? MergeRecords : S) : S; +type MergeArrays = T extends readonly [] ? S : S extends readonly [] ? T : T extends readonly [infer TH, ...infer TR] ? S extends readonly [infer SH, ...infer SR] ? [Merge, ...MergeArrays] : Array : Array; +type MergeRecords = Simplify & Omit & { [K in keyof T & keyof S]: Merge }>; +//#endregion +export { Merge }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/NonEmptyArray.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/NonEmptyArray.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..9dc90eca144de122e863c7c702db58d16d86019e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/NonEmptyArray.d.mts @@ -0,0 +1,14 @@ +//#region src/types/NonEmptyArray.d.ts +/** + * An array guaranteed to have at least one element. + * The first element resolves to `T` instead of `T | undefined`. + * + * @template T - The type of the elements. + * + * @example + * const a: NonEmptyArray = [1, 2, 3]; // ok + * const b: NonEmptyArray = []; // error: empty array not allowed + */ +type NonEmptyArray = [T, ...T[]]; +//#endregion +export { NonEmptyArray }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/NonEmptyArray.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/NonEmptyArray.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9dc90eca144de122e863c7c702db58d16d86019e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/NonEmptyArray.d.ts @@ -0,0 +1,14 @@ +//#region src/types/NonEmptyArray.d.ts +/** + * An array guaranteed to have at least one element. + * The first element resolves to `T` instead of `T | undefined`. + * + * @template T - The type of the elements. + * + * @example + * const a: NonEmptyArray = [1, 2, 3]; // ok + * const b: NonEmptyArray = []; // error: empty array not allowed + */ +type NonEmptyArray = [T, ...T[]]; +//#endregion +export { NonEmptyArray }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ObjectKeys.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ObjectKeys.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..a4438225665eb109c7dc299eabe928a5ccafe62f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ObjectKeys.d.mts @@ -0,0 +1,19 @@ +//#region src/types/ObjectKeys.d.ts +/** + * Creates a union of the keys of `T` as they are returned by `Object.keys`: + * numeric keys are converted to strings and symbol keys are excluded. The key-side + * counterpart to `ValueOf`. + * + * @template T - The object type to read keys from. + * + * @example + * type Keys = ObjectKeys<{ a: number; 1: string }>; + * // => 'a' | '1' + * + * const obj = { a: 1, b: 2 }; + * const keys = Object.keys(obj) as Array>; + * // => Array<'a' | 'b'> + */ +type ObjectKeys = `${Exclude}`; +//#endregion +export { ObjectKeys }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ObjectKeys.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ObjectKeys.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a4438225665eb109c7dc299eabe928a5ccafe62f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ObjectKeys.d.ts @@ -0,0 +1,19 @@ +//#region src/types/ObjectKeys.d.ts +/** + * Creates a union of the keys of `T` as they are returned by `Object.keys`: + * numeric keys are converted to strings and symbol keys are excluded. The key-side + * counterpart to `ValueOf`. + * + * @template T - The object type to read keys from. + * + * @example + * type Keys = ObjectKeys<{ a: number; 1: string }>; + * // => 'a' | '1' + * + * const obj = { a: 1, b: 2 }; + * const keys = Object.keys(obj) as Array>; + * // => Array<'a' | 'b'> + */ +type ObjectKeys = `${Exclude}`; +//#endregion +export { ObjectKeys }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/Primitive.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/Primitive.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..c7352690cf0df097548ad38bd9d519dcca646a5d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/Primitive.d.mts @@ -0,0 +1,14 @@ +//#region src/types/Primitive.d.ts +/** + * Every primitive value in JavaScript. Anything that is not a primitive is an object. + * + * Writing this union by hand usually misses `bigint` or `symbol`. + * + * @example + * function isPrimitive(value: unknown): value is Primitive { + * return value === null || (typeof value !== 'object' && typeof value !== 'function'); + * } + */ +type Primitive = string | number | bigint | boolean | symbol | null | undefined; +//#endregion +export { Primitive }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/Primitive.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/Primitive.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c7352690cf0df097548ad38bd9d519dcca646a5d --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/Primitive.d.ts @@ -0,0 +1,14 @@ +//#region src/types/Primitive.d.ts +/** + * Every primitive value in JavaScript. Anything that is not a primitive is an object. + * + * Writing this union by hand usually misses `bigint` or `symbol`. + * + * @example + * function isPrimitive(value: unknown): value is Primitive { + * return value === null || (typeof value !== 'object' && typeof value !== 'function'); + * } + */ +type Primitive = string | number | bigint | boolean | symbol | null | undefined; +//#endregion +export { Primitive }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/SetOptional.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/SetOptional.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..8fad641bc5b13699f72493cfe4bb0c81e545eee7 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/SetOptional.d.mts @@ -0,0 +1,20 @@ +import { Simplify } from "./Simplify.mjs"; + +//#region src/types/SetOptional.d.ts +/** + * Makes the given keys `K` of `T` optional, leaving the rest unchanged. + * Like the built-in `Partial`, but scoped to specific keys. + * + * Distributes over unions, so a union stays a union. + * + * @template T - The object type to transform. + * @template K - The keys to make optional. + * + * @example + * type User = { id: number; name: string; email: string }; + * type UserDraft = SetOptional; + * // => { id: number; name: string; email?: string } + */ +type SetOptional = T extends unknown ? Simplify & Partial>> : never; +//#endregion +export { SetOptional }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/SetOptional.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/SetOptional.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b2d2d879db87f5655699eb782e023bab0222386f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/SetOptional.d.ts @@ -0,0 +1,20 @@ +import { Simplify } from "./Simplify.js"; + +//#region src/types/SetOptional.d.ts +/** + * Makes the given keys `K` of `T` optional, leaving the rest unchanged. + * Like the built-in `Partial`, but scoped to specific keys. + * + * Distributes over unions, so a union stays a union. + * + * @template T - The object type to transform. + * @template K - The keys to make optional. + * + * @example + * type User = { id: number; name: string; email: string }; + * type UserDraft = SetOptional; + * // => { id: number; name: string; email?: string } + */ +type SetOptional = T extends unknown ? Simplify & Partial>> : never; +//#endregion +export { SetOptional }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/SetRequired.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/SetRequired.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..1416bf21a5088a030523808643358f78953b1374 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/SetRequired.d.mts @@ -0,0 +1,20 @@ +import { Simplify } from "./Simplify.mjs"; + +//#region src/types/SetRequired.d.ts +/** + * Makes the given keys `K` of `T` required, leaving the rest unchanged. + * Like the built-in `Required`, but scoped to specific keys. + * + * Distributes over unions, so a union stays a union. + * + * @template T - The object type to transform. + * @template K - The keys to make required. + * + * @example + * type User = { id: number; name: string; avatar?: string }; + * type ProfileUser = SetRequired; + * // => { id: number; name: string; avatar: string } + */ +type SetRequired = T extends unknown ? Simplify>> : never; +//#endregion +export { SetRequired }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/SetRequired.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/SetRequired.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..2ffc584af65e8017a43e488228248b32d781531a --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/SetRequired.d.ts @@ -0,0 +1,20 @@ +import { Simplify } from "./Simplify.js"; + +//#region src/types/SetRequired.d.ts +/** + * Makes the given keys `K` of `T` required, leaving the rest unchanged. + * Like the built-in `Required`, but scoped to specific keys. + * + * Distributes over unions, so a union stays a union. + * + * @template T - The object type to transform. + * @template K - The keys to make required. + * + * @example + * type User = { id: number; name: string; avatar?: string }; + * type ProfileUser = SetRequired; + * // => { id: number; name: string; avatar: string } + */ +type SetRequired = T extends unknown ? Simplify>> : never; +//#endregion +export { SetRequired }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/Simplify.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/Simplify.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..2efb14e699a9e306a96169fb2f6cb0c13af9fc02 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/Simplify.d.mts @@ -0,0 +1,18 @@ +//#region src/types/Simplify.d.ts +/** + * Flattens an intersection or mapped type into a single, readable object type. + * + * The result is equivalent for plain object types, but editors show the + * resolved shape (`{ a: 1; b: 2 }`) instead of `A & B`. + * + * @template T - The type to flatten. + * + * @example + * type A = { name: string }; + * type B = { age: number }; + * type User = Simplify; + * // hover => { name: string; age: number } (instead of A & B) + */ +type Simplify = { [K in keyof T]: T[K] } & {}; +//#endregion +export { Simplify }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/Simplify.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/Simplify.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..2efb14e699a9e306a96169fb2f6cb0c13af9fc02 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/Simplify.d.ts @@ -0,0 +1,18 @@ +//#region src/types/Simplify.d.ts +/** + * Flattens an intersection or mapped type into a single, readable object type. + * + * The result is equivalent for plain object types, but editors show the + * resolved shape (`{ a: 1; b: 2 }`) instead of `A & B`. + * + * @template T - The type to flatten. + * + * @example + * type A = { name: string }; + * type B = { age: number }; + * type User = Simplify; + * // hover => { name: string; age: number } (instead of A & B) + */ +type Simplify = { [K in keyof T]: T[K] } & {}; +//#endregion +export { Simplify }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToCamelCaseKeys.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToCamelCaseKeys.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..68642aef27643d9b9258304023e7793b6c82021c --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToCamelCaseKeys.d.mts @@ -0,0 +1,24 @@ +import { NonPlainObject } from "../_internal/NonPlainObject.mjs"; + +//#region src/types/ToCamelCaseKeys.d.ts +type SnakeToCamel = S extends `${infer H}_${infer T}` ? `${Lowercase}${Capitalize>}` : Lowercase; +type PascalToCamel = S extends `${infer F}${infer R}` ? `${Lowercase}${R}` : S; +/** If it's snake_case, apply the snake_case rule; for uppercase keys, lowercase the entire string; otherwise, just lowercase the first letter (including PascalCase → camelCase). */ +type AnyToCamel = S extends `${string}_${string}` ? SnakeToCamel : S extends Uppercase ? Lowercase : PascalToCamel; +/** + * Converts the keys of `T` to camelCase recursively. + * + * This is the return type of the `toCamelCaseKeys` function. Recurses into + * plain objects and arrays; built-in objects like `Date`, `Map`, and functions + * pass through unchanged. + * + * @template T - The type whose keys are converted. + * + * @example + * type Response = { user_id: number; first_name: string }; + * type Converted = ToCamelCaseKeys; + * // => { userId: number; firstName: string } + */ +type ToCamelCaseKeys = T extends NonPlainObject ? T : T extends any[] ? Array> : T extends Record ? { [K in keyof T as AnyToCamel>]: ToCamelCaseKeys } : T; +//#endregion +export { ToCamelCaseKeys }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToCamelCaseKeys.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToCamelCaseKeys.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1da4bdd583182c25ec59afb223c159b65fb45683 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToCamelCaseKeys.d.ts @@ -0,0 +1,24 @@ +import { NonPlainObject } from "../_internal/NonPlainObject.js"; + +//#region src/types/ToCamelCaseKeys.d.ts +type SnakeToCamel = S extends `${infer H}_${infer T}` ? `${Lowercase}${Capitalize>}` : Lowercase; +type PascalToCamel = S extends `${infer F}${infer R}` ? `${Lowercase}${R}` : S; +/** If it's snake_case, apply the snake_case rule; for uppercase keys, lowercase the entire string; otherwise, just lowercase the first letter (including PascalCase → camelCase). */ +type AnyToCamel = S extends `${string}_${string}` ? SnakeToCamel : S extends Uppercase ? Lowercase : PascalToCamel; +/** + * Converts the keys of `T` to camelCase recursively. + * + * This is the return type of the `toCamelCaseKeys` function. Recurses into + * plain objects and arrays; built-in objects like `Date`, `Map`, and functions + * pass through unchanged. + * + * @template T - The type whose keys are converted. + * + * @example + * type Response = { user_id: number; first_name: string }; + * type Converted = ToCamelCaseKeys; + * // => { userId: number; firstName: string } + */ +type ToCamelCaseKeys = T extends NonPlainObject ? T : T extends any[] ? Array> : T extends Record ? { [K in keyof T as AnyToCamel>]: ToCamelCaseKeys } : T; +//#endregion +export { ToCamelCaseKeys }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToConstantCaseKeys.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToConstantCaseKeys.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..b97241e0f507cce377942382bacb26273384b31f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToConstantCaseKeys.d.mts @@ -0,0 +1,21 @@ +import { NonPlainObject } from "../_internal/NonPlainObject.mjs"; + +//#region src/types/ToConstantCaseKeys.d.ts +type ConstantCase = S extends Lowercase ? Uppercase : S extends `${infer P1}${infer P2}` ? P2 extends Uncapitalize ? `${Uppercase}${ConstantCase}` : `${Uppercase}_${ConstantCase>}` : Uppercase; +/** + * Converts the keys of `T` to CONSTANT_CASE recursively. + * + * This is the return type of the `toConstantCaseKeys` function. Recurses into + * plain objects and arrays; built-in objects like `Date`, `Map`, and functions + * pass through unchanged. + * + * @template T - The type whose keys are converted. + * + * @example + * type Response = { userId: number; firstName: string }; + * type Converted = ToConstantCaseKeys; + * // => { USER_ID: number; FIRST_NAME: string } + */ +type ToConstantCaseKeys = T extends NonPlainObject ? T : T extends any[] ? Array> : T extends Record ? { [K in keyof T as ConstantCase]: ToConstantCaseKeys } : T; +//#endregion +export { ToConstantCaseKeys }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToConstantCaseKeys.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToConstantCaseKeys.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..482665937211819c026e1e4ef1897deeca5354a3 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToConstantCaseKeys.d.ts @@ -0,0 +1,21 @@ +import { NonPlainObject } from "../_internal/NonPlainObject.js"; + +//#region src/types/ToConstantCaseKeys.d.ts +type ConstantCase = S extends Lowercase ? Uppercase : S extends `${infer P1}${infer P2}` ? P2 extends Uncapitalize ? `${Uppercase}${ConstantCase}` : `${Uppercase}_${ConstantCase>}` : Uppercase; +/** + * Converts the keys of `T` to CONSTANT_CASE recursively. + * + * This is the return type of the `toConstantCaseKeys` function. Recurses into + * plain objects and arrays; built-in objects like `Date`, `Map`, and functions + * pass through unchanged. + * + * @template T - The type whose keys are converted. + * + * @example + * type Response = { userId: number; firstName: string }; + * type Converted = ToConstantCaseKeys; + * // => { USER_ID: number; FIRST_NAME: string } + */ +type ToConstantCaseKeys = T extends NonPlainObject ? T : T extends any[] ? Array> : T extends Record ? { [K in keyof T as ConstantCase]: ToConstantCaseKeys } : T; +//#endregion +export { ToConstantCaseKeys }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToKebabCaseKeys.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToKebabCaseKeys.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..e5abd5a30f2ee7c903066af8efd2253c00be76a8 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToKebabCaseKeys.d.mts @@ -0,0 +1,23 @@ +import { NonPlainObject } from "../_internal/NonPlainObject.mjs"; + +//#region src/types/ToKebabCaseKeys.d.ts +type SnakeToKebab = S extends `${infer P1}_${infer P2}` ? Lowercase<`${P1}-${SnakeToKebab}`> : Lowercase; +type CamelToKebab = S extends `${infer P1}${infer P2}` ? P2 extends Uncapitalize ? `${Lowercase}${CamelToKebab}` : `${Lowercase}-${CamelToKebab>}` : S; +type KebabCase = S extends `${string}_${string}` ? SnakeToKebab : S extends Uppercase ? Lowercase : CamelToKebab; +/** + * Converts the keys of `T` to kebab-case recursively. + * + * This is the return type of the `toKebabCaseKeys` function. Recurses into + * plain objects and arrays; built-in objects like `Date`, `Map`, and functions + * pass through unchanged. + * + * @template T - The type whose keys are converted. + * + * @example + * type Response = { userId: number; firstName: string }; + * type Converted = ToKebabCaseKeys; + * // => { 'user-id': number; 'first-name': string } + */ +type ToKebabCaseKeys = T extends NonPlainObject ? T : T extends any[] ? Array> : T extends Record ? { [K in keyof T as KebabCase]: ToKebabCaseKeys } : T; +//#endregion +export { ToKebabCaseKeys }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToKebabCaseKeys.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToKebabCaseKeys.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..92333ccafd9d23e6ffabc9209f0e4df8cb525d28 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToKebabCaseKeys.d.ts @@ -0,0 +1,23 @@ +import { NonPlainObject } from "../_internal/NonPlainObject.js"; + +//#region src/types/ToKebabCaseKeys.d.ts +type SnakeToKebab = S extends `${infer P1}_${infer P2}` ? Lowercase<`${P1}-${SnakeToKebab}`> : Lowercase; +type CamelToKebab = S extends `${infer P1}${infer P2}` ? P2 extends Uncapitalize ? `${Lowercase}${CamelToKebab}` : `${Lowercase}-${CamelToKebab>}` : S; +type KebabCase = S extends `${string}_${string}` ? SnakeToKebab : S extends Uppercase ? Lowercase : CamelToKebab; +/** + * Converts the keys of `T` to kebab-case recursively. + * + * This is the return type of the `toKebabCaseKeys` function. Recurses into + * plain objects and arrays; built-in objects like `Date`, `Map`, and functions + * pass through unchanged. + * + * @template T - The type whose keys are converted. + * + * @example + * type Response = { userId: number; firstName: string }; + * type Converted = ToKebabCaseKeys; + * // => { 'user-id': number; 'first-name': string } + */ +type ToKebabCaseKeys = T extends NonPlainObject ? T : T extends any[] ? Array> : T extends Record ? { [K in keyof T as KebabCase]: ToKebabCaseKeys } : T; +//#endregion +export { ToKebabCaseKeys }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToPascalCaseKeys.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToPascalCaseKeys.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..7d78525ceaab4479c8285fcfdc1f4cec3e890f61 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToPascalCaseKeys.d.mts @@ -0,0 +1,24 @@ +import { NonPlainObject } from "../_internal/NonPlainObject.mjs"; + +//#region src/types/ToPascalCaseKeys.d.ts +type SnakeToPascal = S extends `${infer H}_${infer T}` ? `${Capitalize>}${Capitalize>}` : Capitalize>; +type CamelToPascal = S extends `${infer F}${infer R}` ? `${Uppercase}${R}` : S; +/** If it's snake_case, apply the snake_case rule; for uppercase keys, lowercase and capitalize the entire string; otherwise, just uppercase the first letter (including camelCase → PascalCase). */ +type AnyToPascal = S extends `${string}_${string}` ? SnakeToPascal : S extends Uppercase ? Capitalize> : CamelToPascal; +/** + * Converts the keys of `T` to PascalCase recursively. + * + * This is the return type of the `toPascalCaseKeys` function. Recurses into + * plain objects and arrays; built-in objects like `Date`, `Map`, and functions + * pass through unchanged. + * + * @template T - The type whose keys are converted. + * + * @example + * type Response = { userId: number; firstName: string }; + * type Converted = ToPascalCaseKeys; + * // => { UserId: number; FirstName: string } + */ +type ToPascalCaseKeys = T extends NonPlainObject ? T : T extends any[] ? Array> : T extends Record ? { [K in keyof T as AnyToPascal>]: ToPascalCaseKeys } : T; +//#endregion +export { ToPascalCaseKeys }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToPascalCaseKeys.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToPascalCaseKeys.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..5858c81d9bd7545f3f79c1f722c4276a3c130db7 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToPascalCaseKeys.d.ts @@ -0,0 +1,24 @@ +import { NonPlainObject } from "../_internal/NonPlainObject.js"; + +//#region src/types/ToPascalCaseKeys.d.ts +type SnakeToPascal = S extends `${infer H}_${infer T}` ? `${Capitalize>}${Capitalize>}` : Capitalize>; +type CamelToPascal = S extends `${infer F}${infer R}` ? `${Uppercase}${R}` : S; +/** If it's snake_case, apply the snake_case rule; for uppercase keys, lowercase and capitalize the entire string; otherwise, just uppercase the first letter (including camelCase → PascalCase). */ +type AnyToPascal = S extends `${string}_${string}` ? SnakeToPascal : S extends Uppercase ? Capitalize> : CamelToPascal; +/** + * Converts the keys of `T` to PascalCase recursively. + * + * This is the return type of the `toPascalCaseKeys` function. Recurses into + * plain objects and arrays; built-in objects like `Date`, `Map`, and functions + * pass through unchanged. + * + * @template T - The type whose keys are converted. + * + * @example + * type Response = { userId: number; firstName: string }; + * type Converted = ToPascalCaseKeys; + * // => { UserId: number; FirstName: string } + */ +type ToPascalCaseKeys = T extends NonPlainObject ? T : T extends any[] ? Array> : T extends Record ? { [K in keyof T as AnyToPascal>]: ToPascalCaseKeys } : T; +//#endregion +export { ToPascalCaseKeys }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToSnakeCaseKeys.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToSnakeCaseKeys.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..faac91b820eb182904526545252b4fbdb25b940e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToSnakeCaseKeys.d.mts @@ -0,0 +1,21 @@ +import { NonPlainObject } from "../_internal/NonPlainObject.mjs"; + +//#region src/types/ToSnakeCaseKeys.d.ts +type SnakeCase = S extends Uppercase ? Lowercase : S extends `${infer P1}${infer P2}` ? P2 extends Uncapitalize ? `${Lowercase}${SnakeCase}` : `${Lowercase}_${SnakeCase>}` : Lowercase; +/** + * Converts the keys of `T` to snake_case recursively. + * + * This is the return type of the `toSnakeCaseKeys` function. Recurses into + * plain objects and arrays; built-in objects like `Date`, `Map`, and functions + * pass through unchanged. + * + * @template T - The type whose keys are converted. + * + * @example + * type Request = { userId: number; firstName: string }; + * type Converted = ToSnakeCaseKeys; + * // => { user_id: number; first_name: string } + */ +type ToSnakeCaseKeys = T extends NonPlainObject ? T : T extends any[] ? Array> : T extends Record ? { [K in keyof T as SnakeCase]: ToSnakeCaseKeys } : T; +//#endregion +export { ToSnakeCaseKeys }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToSnakeCaseKeys.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToSnakeCaseKeys.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..85670691c9ee2e44bb095c0f247a48d2707aa78f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ToSnakeCaseKeys.d.ts @@ -0,0 +1,21 @@ +import { NonPlainObject } from "../_internal/NonPlainObject.js"; + +//#region src/types/ToSnakeCaseKeys.d.ts +type SnakeCase = S extends Uppercase ? Lowercase : S extends `${infer P1}${infer P2}` ? P2 extends Uncapitalize ? `${Lowercase}${SnakeCase}` : `${Lowercase}_${SnakeCase>}` : Lowercase; +/** + * Converts the keys of `T` to snake_case recursively. + * + * This is the return type of the `toSnakeCaseKeys` function. Recurses into + * plain objects and arrays; built-in objects like `Date`, `Map`, and functions + * pass through unchanged. + * + * @template T - The type whose keys are converted. + * + * @example + * type Request = { userId: number; firstName: string }; + * type Converted = ToSnakeCaseKeys; + * // => { user_id: number; first_name: string } + */ +type ToSnakeCaseKeys = T extends NonPlainObject ? T : T extends any[] ? Array> : T extends Record ? { [K in keyof T as SnakeCase]: ToSnakeCaseKeys } : T; +//#endregion +export { ToSnakeCaseKeys }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/UnknownRecord.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/UnknownRecord.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..c7994d167b4116ec234ea9342093fca01d748712 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/UnknownRecord.d.mts @@ -0,0 +1,24 @@ +//#region src/types/UnknownRecord.d.ts +/** + * An object with unknown keys and unknown values. + * + * Use it instead of `{}`, which accepts every non-nullish value including numbers + * and strings. Values are `unknown`, so reading one forces a check first. + * + * Only types with an index signature are assignable. An `interface` declares its + * keys one by one and is rejected, so accept `object` when the caller may pass + * one, or spread it at the call site. + * + * @example + * function log(data: UnknownRecord) { + * if (typeof data.id === 'string') { + * console.log(data.id); + * } + * } + * + * log({ id: '1' }); // ok + * log(42); // error, while `{}` would have allowed it + */ +type UnknownRecord = Record; +//#endregion +export { UnknownRecord }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/UnknownRecord.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/UnknownRecord.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c7994d167b4116ec234ea9342093fca01d748712 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/UnknownRecord.d.ts @@ -0,0 +1,24 @@ +//#region src/types/UnknownRecord.d.ts +/** + * An object with unknown keys and unknown values. + * + * Use it instead of `{}`, which accepts every non-nullish value including numbers + * and strings. Values are `unknown`, so reading one forces a check first. + * + * Only types with an index signature are assignable. An `interface` declares its + * keys one by one and is rejected, so accept `object` when the caller may pass + * one, or spread it at the call site. + * + * @example + * function log(data: UnknownRecord) { + * if (typeof data.id === 'string') { + * console.log(data.id); + * } + * } + * + * log({ id: '1' }); // ok + * log(42); // error, while `{}` would have allowed it + */ +type UnknownRecord = Record; +//#endregion +export { UnknownRecord }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ValueOf.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ValueOf.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..2fee2abce848ae4c79346dbb01152bf91ffb0630 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ValueOf.d.mts @@ -0,0 +1,14 @@ +//#region src/types/ValueOf.d.ts +/** + * Creates a union of all value types in `T`. The value-side counterpart to `keyof`. + * + * @template T - The object type to read values from. + * + * @example + * const STATUS = { IDLE: 'idle', ERROR: 'error' } as const; + * type Status = ValueOf; + * // => 'idle' | 'error' + */ +type ValueOf = T[keyof T]; +//#endregion +export { ValueOf }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ValueOf.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ValueOf.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..2fee2abce848ae4c79346dbb01152bf91ffb0630 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/ValueOf.d.ts @@ -0,0 +1,14 @@ +//#region src/types/ValueOf.d.ts +/** + * Creates a union of all value types in `T`. The value-side counterpart to `keyof`. + * + * @template T - The object type to read values from. + * + * @example + * const STATUS = { IDLE: 'idle', ERROR: 'error' } as const; + * type Status = ValueOf; + * // => 'idle' | 'error' + */ +type ValueOf = T[keyof T]; +//#endregion +export { ValueOf }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/Writable.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/Writable.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..ba9284f4c041252985b1ac2e9700be5565f2e1d0 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/Writable.d.mts @@ -0,0 +1,15 @@ +//#region src/types/Writable.d.ts +/** + * Removes the `readonly` modifier from all properties of `T`. + * The inverse of the built-in `Readonly`. + * + * @template T - The object type to make writable. + * + * @example + * type Config = { readonly host: string; readonly port: number }; + * type MutableConfig = Writable; + * // => { host: string; port: number } + */ +type Writable = { -readonly [K in keyof T]: T[K] }; +//#endregion +export { Writable }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/Writable.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/Writable.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ba9284f4c041252985b1ac2e9700be5565f2e1d0 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/Writable.d.ts @@ -0,0 +1,15 @@ +//#region src/types/Writable.d.ts +/** + * Removes the `readonly` modifier from all properties of `T`. + * The inverse of the built-in `Readonly`. + * + * @template T - The object type to make writable. + * + * @example + * type Config = { readonly host: string; readonly port: number }; + * type MutableConfig = Writable; + * // => { host: string; port: number } + */ +type Writable = { -readonly [K in keyof T]: T[K] }; +//#endregion +export { Writable }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/index.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..9ddce0e456b5bf37b99ba2d1e7978cabfcfd8e57 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/index.d.mts @@ -0,0 +1,21 @@ +import { Simplify } from "./Simplify.mjs"; +import { Merge } from "./Merge.mjs"; +import { ObjectKeys } from "./ObjectKeys.mjs"; +import { ToCamelCaseKeys } from "./ToCamelCaseKeys.mjs"; +import { ToConstantCaseKeys } from "./ToConstantCaseKeys.mjs"; +import { ToKebabCaseKeys } from "./ToKebabCaseKeys.mjs"; +import { ToPascalCaseKeys } from "./ToPascalCaseKeys.mjs"; +import { ToSnakeCaseKeys } from "./ToSnakeCaseKeys.mjs"; +import { DeepPartial } from "./DeepPartial.mjs"; +import { DeepReadonly } from "./DeepReadonly.mjs"; +import { EmptyObject } from "./EmptyObject.mjs"; +import { IsEqual } from "./IsEqual.mjs"; +import { JSONValue } from "./JSONValue.mjs"; +import { NonEmptyArray } from "./NonEmptyArray.mjs"; +import { Primitive } from "./Primitive.mjs"; +import { SetOptional } from "./SetOptional.mjs"; +import { SetRequired } from "./SetRequired.mjs"; +import { UnknownRecord } from "./UnknownRecord.mjs"; +import { ValueOf } from "./ValueOf.mjs"; +import { Writable } from "./Writable.mjs"; +export { type DeepPartial, type DeepReadonly, type EmptyObject, type IsEqual, type JSONValue, type Merge, type NonEmptyArray, type ObjectKeys, type Primitive, type SetOptional, type SetRequired, type Simplify, type ToCamelCaseKeys, type ToConstantCaseKeys, type ToKebabCaseKeys, type ToPascalCaseKeys, type ToSnakeCaseKeys, type UnknownRecord, type ValueOf, type Writable }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/index.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..fbe7f03a0d0e1dfb90b1e8317dd0106648b564e8 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/types/index.d.ts @@ -0,0 +1,21 @@ +import { Simplify } from "./Simplify.js"; +import { Merge } from "./Merge.js"; +import { ObjectKeys } from "./ObjectKeys.js"; +import { ToCamelCaseKeys } from "./ToCamelCaseKeys.js"; +import { ToConstantCaseKeys } from "./ToConstantCaseKeys.js"; +import { ToKebabCaseKeys } from "./ToKebabCaseKeys.js"; +import { ToPascalCaseKeys } from "./ToPascalCaseKeys.js"; +import { ToSnakeCaseKeys } from "./ToSnakeCaseKeys.js"; +import { DeepPartial } from "./DeepPartial.js"; +import { DeepReadonly } from "./DeepReadonly.js"; +import { EmptyObject } from "./EmptyObject.js"; +import { IsEqual } from "./IsEqual.js"; +import { JSONValue } from "./JSONValue.js"; +import { NonEmptyArray } from "./NonEmptyArray.js"; +import { Primitive } from "./Primitive.js"; +import { SetOptional } from "./SetOptional.js"; +import { SetRequired } from "./SetRequired.js"; +import { UnknownRecord } from "./UnknownRecord.js"; +import { ValueOf } from "./ValueOf.js"; +import { Writable } from "./Writable.js"; +export { type DeepPartial, type DeepReadonly, type EmptyObject, type IsEqual, type JSONValue, type Merge, type NonEmptyArray, type ObjectKeys, type Primitive, type SetOptional, type SetRequired, type Simplify, type ToCamelCaseKeys, type ToConstantCaseKeys, type ToKebabCaseKeys, type ToPascalCaseKeys, type ToSnakeCaseKeys, type UnknownRecord, type ValueOf, type Writable }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/attempt.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/attempt.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..044159fc909beea5c14d481e310535aa32d5381b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/attempt.d.mts @@ -0,0 +1,43 @@ +//#region src/util/attempt.d.ts +/** + * Attempt to execute a function and return the result or error. + * Returns a tuple where: + * - On success: [null, Result] - First element is null, second is the result + * - On error: [Error, null] - First element is the caught error, second is null + * + * @template {unknown} T - The type of the result of the function. + * @template {unknown} E - The type of the error that can be thrown by the function. + * @param func - The function to execute. + * @returns A tuple containing either [null, result] or [error, null]. + * + * @example + * // Successful execution + * const [error, result] = attempt(() => 42); + * // [null, 42] + * + * // Failed execution + * const [error, result] = attempt(() => { + * throw new Error('Something went wrong'); + * }); + * // [Error, null] + * + * // With type parameter + * const [error, names] = attempt(() => ['Alice', 'Bob']); + * // [null, ['Alice', 'Bob']] + * + * @note + * Important: This function is not suitable for async functions (functions that return a `Promise`). + * When passing an async function, it will return `[null, Promise]`, but won't catch any + * errors if the Promise is rejected later. + * + * For handling async functions, use the `attemptAsync` function instead: + * ``` + * const [error, data] = await attemptAsync(async () => { + * const response = await fetch('https://api.example.com/data'); + * return response.json(); + * }); + * ``` + */ +declare function attempt(func: () => T): [null, T] | [E, null]; +//#endregion +export { attempt }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/attempt.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/attempt.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..044159fc909beea5c14d481e310535aa32d5381b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/attempt.d.ts @@ -0,0 +1,43 @@ +//#region src/util/attempt.d.ts +/** + * Attempt to execute a function and return the result or error. + * Returns a tuple where: + * - On success: [null, Result] - First element is null, second is the result + * - On error: [Error, null] - First element is the caught error, second is null + * + * @template {unknown} T - The type of the result of the function. + * @template {unknown} E - The type of the error that can be thrown by the function. + * @param func - The function to execute. + * @returns A tuple containing either [null, result] or [error, null]. + * + * @example + * // Successful execution + * const [error, result] = attempt(() => 42); + * // [null, 42] + * + * // Failed execution + * const [error, result] = attempt(() => { + * throw new Error('Something went wrong'); + * }); + * // [Error, null] + * + * // With type parameter + * const [error, names] = attempt(() => ['Alice', 'Bob']); + * // [null, ['Alice', 'Bob']] + * + * @note + * Important: This function is not suitable for async functions (functions that return a `Promise`). + * When passing an async function, it will return `[null, Promise]`, but won't catch any + * errors if the Promise is rejected later. + * + * For handling async functions, use the `attemptAsync` function instead: + * ``` + * const [error, data] = await attemptAsync(async () => { + * const response = await fetch('https://api.example.com/data'); + * return response.json(); + * }); + * ``` + */ +declare function attempt(func: () => T): [null, T] | [E, null]; +//#endregion +export { attempt }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/attempt.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/attempt.js new file mode 100644 index 0000000000000000000000000000000000000000..8f4baf783824ae08bb9c3842bd345d479eca1f3b --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/attempt.js @@ -0,0 +1,49 @@ +//#region src/util/attempt.ts +/** +* Attempt to execute a function and return the result or error. +* Returns a tuple where: +* - On success: [null, Result] - First element is null, second is the result +* - On error: [Error, null] - First element is the caught error, second is null +* +* @template {unknown} T - The type of the result of the function. +* @template {unknown} E - The type of the error that can be thrown by the function. +* @param func - The function to execute. +* @returns A tuple containing either [null, result] or [error, null]. +* +* @example +* // Successful execution +* const [error, result] = attempt(() => 42); +* // [null, 42] +* +* // Failed execution +* const [error, result] = attempt(() => { +* throw new Error('Something went wrong'); +* }); +* // [Error, null] +* +* // With type parameter +* const [error, names] = attempt(() => ['Alice', 'Bob']); +* // [null, ['Alice', 'Bob']] +* +* @note +* Important: This function is not suitable for async functions (functions that return a `Promise`). +* When passing an async function, it will return `[null, Promise]`, but won't catch any +* errors if the Promise is rejected later. +* +* For handling async functions, use the `attemptAsync` function instead: +* ``` +* const [error, data] = await attemptAsync(async () => { +* const response = await fetch('https://api.example.com/data'); +* return response.json(); +* }); +* ``` +*/ +function attempt(func) { + try { + return [null, func()]; + } catch (error) { + return [error, null]; + } +} +//#endregion +exports.attempt = attempt; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/attempt.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/attempt.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d4a84bbf41d6057d81312c9b5b107e1b68115a07 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/attempt.mjs @@ -0,0 +1,49 @@ +//#region src/util/attempt.ts +/** +* Attempt to execute a function and return the result or error. +* Returns a tuple where: +* - On success: [null, Result] - First element is null, second is the result +* - On error: [Error, null] - First element is the caught error, second is null +* +* @template {unknown} T - The type of the result of the function. +* @template {unknown} E - The type of the error that can be thrown by the function. +* @param func - The function to execute. +* @returns A tuple containing either [null, result] or [error, null]. +* +* @example +* // Successful execution +* const [error, result] = attempt(() => 42); +* // [null, 42] +* +* // Failed execution +* const [error, result] = attempt(() => { +* throw new Error('Something went wrong'); +* }); +* // [Error, null] +* +* // With type parameter +* const [error, names] = attempt(() => ['Alice', 'Bob']); +* // [null, ['Alice', 'Bob']] +* +* @note +* Important: This function is not suitable for async functions (functions that return a `Promise`). +* When passing an async function, it will return `[null, Promise]`, but won't catch any +* errors if the Promise is rejected later. +* +* For handling async functions, use the `attemptAsync` function instead: +* ``` +* const [error, data] = await attemptAsync(async () => { +* const response = await fetch('https://api.example.com/data'); +* return response.json(); +* }); +* ``` +*/ +function attempt(func) { + try { + return [null, func()]; + } catch (error) { + return [error, null]; + } +} +//#endregion +export { attempt }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/attemptAsync.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/attemptAsync.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..d2533215a0fe96e36070f177112dd25c5003e6c3 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/attemptAsync.d.mts @@ -0,0 +1,36 @@ +//#region src/util/attemptAsync.d.ts +/** + * Attempt to execute an async function and return the result or error. + * Returns a Promise that resolves to a tuple where: + * - On success: [null, Result] - First element is null, second is the result + * - On error: [Error, null] - First element is the caught error, second is null + * + * @template {unknown} T - The type of the result of the async function. + * @template {unknown} E - The type of the error that can be thrown by the async function. + * @param func - The async function to execute. + * @returns A Promise that resolves to a tuple containing either [null, result] or [error, null]. + * + * @example + * // Successful execution + * const [error, data] = await attemptAsync(async () => { + * const response = await fetch('https://api.example.com/data'); + * return response.json(); + * }); + * // If successful: [null, { ... data ... }] + * + * // Failed execution + * const [error, data] = await attemptAsync(async () => { + * throw new Error('Network error'); + * }); + * // [Error, null] + * + * // With type parameter + * const [error, users] = await attemptAsync(async () => { + * const response = await fetch('https://api.example.com/users'); + * return response.json(); + * }); + * // users is typed as User[] + */ +declare function attemptAsync(func: () => Promise): Promise<[null, T] | [E, null]>; +//#endregion +export { attemptAsync }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/attemptAsync.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/attemptAsync.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d2533215a0fe96e36070f177112dd25c5003e6c3 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/attemptAsync.d.ts @@ -0,0 +1,36 @@ +//#region src/util/attemptAsync.d.ts +/** + * Attempt to execute an async function and return the result or error. + * Returns a Promise that resolves to a tuple where: + * - On success: [null, Result] - First element is null, second is the result + * - On error: [Error, null] - First element is the caught error, second is null + * + * @template {unknown} T - The type of the result of the async function. + * @template {unknown} E - The type of the error that can be thrown by the async function. + * @param func - The async function to execute. + * @returns A Promise that resolves to a tuple containing either [null, result] or [error, null]. + * + * @example + * // Successful execution + * const [error, data] = await attemptAsync(async () => { + * const response = await fetch('https://api.example.com/data'); + * return response.json(); + * }); + * // If successful: [null, { ... data ... }] + * + * // Failed execution + * const [error, data] = await attemptAsync(async () => { + * throw new Error('Network error'); + * }); + * // [Error, null] + * + * // With type parameter + * const [error, users] = await attemptAsync(async () => { + * const response = await fetch('https://api.example.com/users'); + * return response.json(); + * }); + * // users is typed as User[] + */ +declare function attemptAsync(func: () => Promise): Promise<[null, T] | [E, null]>; +//#endregion +export { attemptAsync }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/attemptAsync.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/attemptAsync.js new file mode 100644 index 0000000000000000000000000000000000000000..7b9cff0a3b439a1de9935941bc89696f8b40ad1f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/attemptAsync.js @@ -0,0 +1,42 @@ +//#region src/util/attemptAsync.ts +/** +* Attempt to execute an async function and return the result or error. +* Returns a Promise that resolves to a tuple where: +* - On success: [null, Result] - First element is null, second is the result +* - On error: [Error, null] - First element is the caught error, second is null +* +* @template {unknown} T - The type of the result of the async function. +* @template {unknown} E - The type of the error that can be thrown by the async function. +* @param func - The async function to execute. +* @returns A Promise that resolves to a tuple containing either [null, result] or [error, null]. +* +* @example +* // Successful execution +* const [error, data] = await attemptAsync(async () => { +* const response = await fetch('https://api.example.com/data'); +* return response.json(); +* }); +* // If successful: [null, { ... data ... }] +* +* // Failed execution +* const [error, data] = await attemptAsync(async () => { +* throw new Error('Network error'); +* }); +* // [Error, null] +* +* // With type parameter +* const [error, users] = await attemptAsync(async () => { +* const response = await fetch('https://api.example.com/users'); +* return response.json(); +* }); +* // users is typed as User[] +*/ +async function attemptAsync(func) { + try { + return [null, await func()]; + } catch (error) { + return [error, null]; + } +} +//#endregion +exports.attemptAsync = attemptAsync; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/attemptAsync.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/attemptAsync.mjs new file mode 100644 index 0000000000000000000000000000000000000000..4368cc45a8628fd5cac538c8be7894bfdf4ae099 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/attemptAsync.mjs @@ -0,0 +1,42 @@ +//#region src/util/attemptAsync.ts +/** +* Attempt to execute an async function and return the result or error. +* Returns a Promise that resolves to a tuple where: +* - On success: [null, Result] - First element is null, second is the result +* - On error: [Error, null] - First element is the caught error, second is null +* +* @template {unknown} T - The type of the result of the async function. +* @template {unknown} E - The type of the error that can be thrown by the async function. +* @param func - The async function to execute. +* @returns A Promise that resolves to a tuple containing either [null, result] or [error, null]. +* +* @example +* // Successful execution +* const [error, data] = await attemptAsync(async () => { +* const response = await fetch('https://api.example.com/data'); +* return response.json(); +* }); +* // If successful: [null, { ... data ... }] +* +* // Failed execution +* const [error, data] = await attemptAsync(async () => { +* throw new Error('Network error'); +* }); +* // [Error, null] +* +* // With type parameter +* const [error, users] = await attemptAsync(async () => { +* const response = await fetch('https://api.example.com/users'); +* return response.json(); +* }); +* // users is typed as User[] +*/ +async function attemptAsync(func) { + try { + return [null, await func()]; + } catch (error) { + return [error, null]; + } +} +//#endregion +export { attemptAsync }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/defer.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/defer.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..6ad15c584247b606c00c2eec8cb16521b41676df --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/defer.d.mts @@ -0,0 +1,27 @@ +//#region src/util/defer.d.ts +/** + * Creates a `Disposable` object that runs the given callback when it is disposed. + * + * Use it with `using` declarations from + * [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) + * to ensure cleanup code runs when the enclosing scope exits, even if an error is thrown. + * + * For asynchronous cleanup, use {@link deferAsync} with `await using` instead. + * + * @param callback - The cleanup function to run on dispose. + * @returns A `Disposable` object that invokes `callback` when disposed. + * + * @example + * const logs: string[] = []; + * + * function run() { + * using cleanup = defer(() => logs.push('cleanup')); + * logs.push('body'); + * } + * + * run(); + * console.log(logs); // ['body', 'cleanup'] + */ +declare function defer(callback: () => void): Disposable; +//#endregion +export { defer }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/defer.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/defer.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6ad15c584247b606c00c2eec8cb16521b41676df --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/defer.d.ts @@ -0,0 +1,27 @@ +//#region src/util/defer.d.ts +/** + * Creates a `Disposable` object that runs the given callback when it is disposed. + * + * Use it with `using` declarations from + * [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) + * to ensure cleanup code runs when the enclosing scope exits, even if an error is thrown. + * + * For asynchronous cleanup, use {@link deferAsync} with `await using` instead. + * + * @param callback - The cleanup function to run on dispose. + * @returns A `Disposable` object that invokes `callback` when disposed. + * + * @example + * const logs: string[] = []; + * + * function run() { + * using cleanup = defer(() => logs.push('cleanup')); + * logs.push('body'); + * } + * + * run(); + * console.log(logs); // ['body', 'cleanup'] + */ +declare function defer(callback: () => void): Disposable; +//#endregion +export { defer }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/defer.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/defer.js new file mode 100644 index 0000000000000000000000000000000000000000..ee26280edc01b260e67ed3660dbc454df2cd2aa2 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/defer.js @@ -0,0 +1,31 @@ +//#region src/util/defer.ts +/** +* Creates a `Disposable` object that runs the given callback when it is disposed. +* +* Use it with `using` declarations from +* [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) +* to ensure cleanup code runs when the enclosing scope exits, even if an error is thrown. +* +* For asynchronous cleanup, use {@link deferAsync} with `await using` instead. +* +* @param callback - The cleanup function to run on dispose. +* @returns A `Disposable` object that invokes `callback` when disposed. +* +* @example +* const logs: string[] = []; +* +* function run() { +* using cleanup = defer(() => logs.push('cleanup')); +* logs.push('body'); +* } +* +* run(); +* console.log(logs); // ['body', 'cleanup'] +*/ +function defer(callback) { + return { [Symbol.dispose]: () => { + callback(); + } }; +} +//#endregion +exports.defer = defer; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/defer.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/defer.mjs new file mode 100644 index 0000000000000000000000000000000000000000..677ba0dbaa71f0164d479c25991b7b698c4d90e8 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/defer.mjs @@ -0,0 +1,31 @@ +//#region src/util/defer.ts +/** +* Creates a `Disposable` object that runs the given callback when it is disposed. +* +* Use it with `using` declarations from +* [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) +* to ensure cleanup code runs when the enclosing scope exits, even if an error is thrown. +* +* For asynchronous cleanup, use {@link deferAsync} with `await using` instead. +* +* @param callback - The cleanup function to run on dispose. +* @returns A `Disposable` object that invokes `callback` when disposed. +* +* @example +* const logs: string[] = []; +* +* function run() { +* using cleanup = defer(() => logs.push('cleanup')); +* logs.push('body'); +* } +* +* run(); +* console.log(logs); // ['body', 'cleanup'] +*/ +function defer(callback) { + return { [Symbol.dispose]: () => { + callback(); + } }; +} +//#endregion +export { defer }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/deferAsync.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/deferAsync.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..20b0c6f15b75ac579ca25480c6f8e492c907d084 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/deferAsync.d.mts @@ -0,0 +1,30 @@ +//#region src/util/deferAsync.d.ts +/** + * Creates an `AsyncDisposable` object that runs the given callback when it is disposed. + * + * Use it with `await using` declarations from + * [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) + * to ensure asynchronous cleanup code runs and is awaited when the enclosing scope exits, + * even if an error is thrown. + * + * For synchronous cleanup, use {@link defer} with `using` instead. + * + * @param callback - The cleanup function to run on dispose. Its result is awaited. + * @returns An `AsyncDisposable` object that invokes and awaits `callback` when disposed. + * + * @example + * const connection = await connect(); + * + * async function run() { + * await using cleanup = deferAsync(async () => { + * await connection.close(); + * }); + * + * await connection.query('SELECT 1'); + * } + * + * await run(); // The connection is closed after `run` finishes. + */ +declare function deferAsync(callback: () => void | PromiseLike): AsyncDisposable; +//#endregion +export { deferAsync }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/deferAsync.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/deferAsync.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..20b0c6f15b75ac579ca25480c6f8e492c907d084 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/deferAsync.d.ts @@ -0,0 +1,30 @@ +//#region src/util/deferAsync.d.ts +/** + * Creates an `AsyncDisposable` object that runs the given callback when it is disposed. + * + * Use it with `await using` declarations from + * [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) + * to ensure asynchronous cleanup code runs and is awaited when the enclosing scope exits, + * even if an error is thrown. + * + * For synchronous cleanup, use {@link defer} with `using` instead. + * + * @param callback - The cleanup function to run on dispose. Its result is awaited. + * @returns An `AsyncDisposable` object that invokes and awaits `callback` when disposed. + * + * @example + * const connection = await connect(); + * + * async function run() { + * await using cleanup = deferAsync(async () => { + * await connection.close(); + * }); + * + * await connection.query('SELECT 1'); + * } + * + * await run(); // The connection is closed after `run` finishes. + */ +declare function deferAsync(callback: () => void | PromiseLike): AsyncDisposable; +//#endregion +export { deferAsync }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/deferAsync.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/deferAsync.js new file mode 100644 index 0000000000000000000000000000000000000000..66b0d778a1e3e0d4b0410c61a60b9016cf36d46e --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/deferAsync.js @@ -0,0 +1,34 @@ +//#region src/util/deferAsync.ts +/** +* Creates an `AsyncDisposable` object that runs the given callback when it is disposed. +* +* Use it with `await using` declarations from +* [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) +* to ensure asynchronous cleanup code runs and is awaited when the enclosing scope exits, +* even if an error is thrown. +* +* For synchronous cleanup, use {@link defer} with `using` instead. +* +* @param callback - The cleanup function to run on dispose. Its result is awaited. +* @returns An `AsyncDisposable` object that invokes and awaits `callback` when disposed. +* +* @example +* const connection = await connect(); +* +* async function run() { +* await using cleanup = deferAsync(async () => { +* await connection.close(); +* }); +* +* await connection.query('SELECT 1'); +* } +* +* await run(); // The connection is closed after `run` finishes. +*/ +function deferAsync(callback) { + return { [Symbol.asyncDispose]: async () => { + await callback(); + } }; +} +//#endregion +exports.deferAsync = deferAsync; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/deferAsync.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/deferAsync.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e241eea62918cb117148f514a9b7cf340562d64f --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/deferAsync.mjs @@ -0,0 +1,34 @@ +//#region src/util/deferAsync.ts +/** +* Creates an `AsyncDisposable` object that runs the given callback when it is disposed. +* +* Use it with `await using` declarations from +* [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) +* to ensure asynchronous cleanup code runs and is awaited when the enclosing scope exits, +* even if an error is thrown. +* +* For synchronous cleanup, use {@link defer} with `using` instead. +* +* @param callback - The cleanup function to run on dispose. Its result is awaited. +* @returns An `AsyncDisposable` object that invokes and awaits `callback` when disposed. +* +* @example +* const connection = await connect(); +* +* async function run() { +* await using cleanup = deferAsync(async () => { +* await connection.close(); +* }); +* +* await connection.query('SELECT 1'); +* } +* +* await run(); // The connection is closed after `run` finishes. +*/ +function deferAsync(callback) { + return { [Symbol.asyncDispose]: async () => { + await callback(); + } }; +} +//#endregion +export { deferAsync }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/index.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..51c6a133738d553eca6c1d29d2c62befa5bcfabd --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/index.d.mts @@ -0,0 +1,6 @@ +import { attempt } from "./attempt.mjs"; +import { attemptAsync } from "./attemptAsync.mjs"; +import { defer } from "./defer.mjs"; +import { deferAsync } from "./deferAsync.mjs"; +import { invariant } from "./invariant.mjs"; +export { invariant as assert, attempt, attemptAsync, defer, deferAsync, invariant }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/index.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..26a14fa1d2f232250ce55f01ec30558adaa822d4 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/index.d.ts @@ -0,0 +1,6 @@ +import { attempt } from "./attempt.js"; +import { attemptAsync } from "./attemptAsync.js"; +import { defer } from "./defer.js"; +import { deferAsync } from "./deferAsync.js"; +import { invariant } from "./invariant.js"; +export { invariant as assert, attempt, attemptAsync, defer, deferAsync, invariant }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/index.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/index.js new file mode 100644 index 0000000000000000000000000000000000000000..522e399b667639c22af62ddc9977d2b356e586f7 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/index.js @@ -0,0 +1,12 @@ +Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); +const require_attempt = require("./attempt.js"); +const require_attemptAsync = require("./attemptAsync.js"); +const require_defer = require("./defer.js"); +const require_deferAsync = require("./deferAsync.js"); +const require_invariant = require("./invariant.js"); +exports.assert = require_invariant.invariant; +exports.attempt = require_attempt.attempt; +exports.attemptAsync = require_attemptAsync.attemptAsync; +exports.defer = require_defer.defer; +exports.deferAsync = require_deferAsync.deferAsync; +exports.invariant = require_invariant.invariant; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/index.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b8a7581b044e983dcd97c1ad7b3d8876e2020da3 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/index.mjs @@ -0,0 +1,6 @@ +import { attempt } from "./attempt.mjs"; +import { attemptAsync } from "./attemptAsync.mjs"; +import { defer } from "./defer.mjs"; +import { deferAsync } from "./deferAsync.mjs"; +import { invariant } from "./invariant.mjs"; +export { invariant as assert, attempt, attemptAsync, defer, deferAsync, invariant }; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/invariant.d.mts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/invariant.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..57235de2a874878a46f71b34033364f2f2c25ad1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/invariant.d.mts @@ -0,0 +1,41 @@ +//#region src/util/invariant.d.ts +/** + * Asserts that a given condition is true. If the condition is false, an error is thrown with the provided message. + * + * @param condition - The condition to evaluate. + * @param message - The error message to throw if the condition is false. + * @returns Returns void if the condition is true. + * @throws {Error} Throws an error if the condition is false. + * + * @example + * // This call will succeed without any errors + * invariant(true, 'This should not throw'); + * + * // This call will fail and throw an error with the message 'This should throw' + * invariant(false, 'This should throw'); + */ +declare function invariant(condition: unknown, message: string): asserts condition; +/** + * Asserts that a given condition is true. If the condition is false, an error is thrown with the provided error. + * + * @param condition - The condition to evaluate. + * @param error - The error to throw if the condition is false. + * @returns Returns void if the condition is true. + * @throws {Error} Throws an error if the condition is false. + * + * @example + * // This call will succeed without any errors + * invariant(true, new Error('This should not throw')); + * + * class CustomError extends Error { + * constructor(message: string) { + * super(message); + * } + * } + * + * // This call will fail and throw an error with the message 'This should throw' + * invariant(false, new CustomError('This should throw')); + */ +declare function invariant(condition: unknown, error: Error): asserts condition; +//#endregion +export { invariant }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/invariant.d.ts b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/invariant.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..57235de2a874878a46f71b34033364f2f2c25ad1 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/invariant.d.ts @@ -0,0 +1,41 @@ +//#region src/util/invariant.d.ts +/** + * Asserts that a given condition is true. If the condition is false, an error is thrown with the provided message. + * + * @param condition - The condition to evaluate. + * @param message - The error message to throw if the condition is false. + * @returns Returns void if the condition is true. + * @throws {Error} Throws an error if the condition is false. + * + * @example + * // This call will succeed without any errors + * invariant(true, 'This should not throw'); + * + * // This call will fail and throw an error with the message 'This should throw' + * invariant(false, 'This should throw'); + */ +declare function invariant(condition: unknown, message: string): asserts condition; +/** + * Asserts that a given condition is true. If the condition is false, an error is thrown with the provided error. + * + * @param condition - The condition to evaluate. + * @param error - The error to throw if the condition is false. + * @returns Returns void if the condition is true. + * @throws {Error} Throws an error if the condition is false. + * + * @example + * // This call will succeed without any errors + * invariant(true, new Error('This should not throw')); + * + * class CustomError extends Error { + * constructor(message: string) { + * super(message); + * } + * } + * + * // This call will fail and throw an error with the message 'This should throw' + * invariant(false, new CustomError('This should throw')); + */ +declare function invariant(condition: unknown, error: Error): asserts condition; +//#endregion +export { invariant }; \ No newline at end of file diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/invariant.js b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/invariant.js new file mode 100644 index 0000000000000000000000000000000000000000..d816506b8701324d49796b93334ab10f592ee7f6 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/invariant.js @@ -0,0 +1,32 @@ +//#region src/util/invariant.ts +/** +* Asserts that a given condition is true. If the condition is false, an error is thrown with the provided message. +* +* @param condition - The condition to evaluate. +* @param [message] - The error message to throw if the condition is false. +* @returns Returns void if the condition is true. +* @throws {Error} Throws an error if the condition is false. +* +* @example +* // This call will succeed without any errors +* invariant(true, 'This should not throw'); +* +* // This call will fail and throw an error with the message 'This should throw' +* invariant(false, 'This should throw'); +* +* // Example of using invariant with a condition +* invariant(condition, 'Expected condition is false'); +* +* // Ensure that the value is neither null nor undefined +* invariant(value !== null && value !== undefined, 'Value should not be null or undefined'); +* +* // Example of using invariant to check if a number is positive +* invariant(number > 0, 'Number must be positive'); +*/ +function invariant(condition, message) { + if (condition) return; + if (typeof message === "string") throw new Error(message); + throw message; +} +//#endregion +exports.invariant = invariant; diff --git a/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/invariant.mjs b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/invariant.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c0769f7ad507701913c54dd0393a2933d39825a3 --- /dev/null +++ b/astra_scene_test/X_03/node_modules/es-toolkit/dist/util/invariant.mjs @@ -0,0 +1,32 @@ +//#region src/util/invariant.ts +/** +* Asserts that a given condition is true. If the condition is false, an error is thrown with the provided message. +* +* @param condition - The condition to evaluate. +* @param [message] - The error message to throw if the condition is false. +* @returns Returns void if the condition is true. +* @throws {Error} Throws an error if the condition is false. +* +* @example +* // This call will succeed without any errors +* invariant(true, 'This should not throw'); +* +* // This call will fail and throw an error with the message 'This should throw' +* invariant(false, 'This should throw'); +* +* // Example of using invariant with a condition +* invariant(condition, 'Expected condition is false'); +* +* // Ensure that the value is neither null nor undefined +* invariant(value !== null && value !== undefined, 'Value should not be null or undefined'); +* +* // Example of using invariant to check if a number is positive +* invariant(number > 0, 'Number must be positive'); +*/ +function invariant(condition, message) { + if (condition) return; + if (typeof message === "string") throw new Error(message); + throw message; +} +//#endregion +export { invariant };