Index: node_modules/es-toolkit/dist/promise/delay.d.mts
===================================================================
--- node_modules/es-toolkit/dist/promise/delay.d.mts	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
+++ node_modules/es-toolkit/dist/promise/delay.d.mts	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
@@ -0,0 +1,38 @@
+interface DelayOptions {
+    signal?: AbortSignal;
+}
+/**
+ * Delays the execution of code for a specified number of milliseconds.
+ *
+ * This function returns a Promise that resolves after the specified delay, allowing you to use it
+ * with async/await to pause execution.
+ *
+ * @param {number} ms - The number of milliseconds to delay.
+ * @param {DelayOptions} options - The options object.
+ * @param {AbortSignal} options.signal - An optional AbortSignal to cancel the delay.
+ * @returns {Promise<void>} A Promise that resolves after the specified delay.
+ *
+ * @example
+ * async function foo() {
+ *   console.log('Start');
+ *   await delay(1000); // Delays execution for 1 second
+ *   console.log('End');
+ * }
+ *
+ * foo();
+ *
+ * // With AbortSignal
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ *
+ * setTimeout(() => controller.abort(), 50); // Will cancel the delay after 50ms
+ * try {
+ *   await delay(100, { signal });
+ *  } catch (error) {
+ *   console.error(error); // Will log 'AbortError'
+ *  }
+ * }
+ */
+declare function delay(ms: number, { signal }?: DelayOptions): Promise<void>;
+
+export { delay };
Index: node_modules/es-toolkit/dist/promise/delay.d.ts
===================================================================
--- node_modules/es-toolkit/dist/promise/delay.d.ts	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
+++ node_modules/es-toolkit/dist/promise/delay.d.ts	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
@@ -0,0 +1,38 @@
+interface DelayOptions {
+    signal?: AbortSignal;
+}
+/**
+ * Delays the execution of code for a specified number of milliseconds.
+ *
+ * This function returns a Promise that resolves after the specified delay, allowing you to use it
+ * with async/await to pause execution.
+ *
+ * @param {number} ms - The number of milliseconds to delay.
+ * @param {DelayOptions} options - The options object.
+ * @param {AbortSignal} options.signal - An optional AbortSignal to cancel the delay.
+ * @returns {Promise<void>} A Promise that resolves after the specified delay.
+ *
+ * @example
+ * async function foo() {
+ *   console.log('Start');
+ *   await delay(1000); // Delays execution for 1 second
+ *   console.log('End');
+ * }
+ *
+ * foo();
+ *
+ * // With AbortSignal
+ * const controller = new AbortController();
+ * const { signal } = controller;
+ *
+ * setTimeout(() => controller.abort(), 50); // Will cancel the delay after 50ms
+ * try {
+ *   await delay(100, { signal });
+ *  } catch (error) {
+ *   console.error(error); // Will log 'AbortError'
+ *  }
+ * }
+ */
+declare function delay(ms: number, { signal }?: DelayOptions): Promise<void>;
+
+export { delay };
Index: node_modules/es-toolkit/dist/promise/delay.js
===================================================================
--- node_modules/es-toolkit/dist/promise/delay.js	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
+++ node_modules/es-toolkit/dist/promise/delay.js	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
@@ -0,0 +1,27 @@
+'use strict';
+
+Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
+
+const AbortError = require('../error/AbortError.js');
+
+function delay(ms, { signal } = {}) {
+    return new Promise((resolve, reject) => {
+        const abortError = () => {
+            reject(new AbortError.AbortError());
+        };
+        const abortHandler = () => {
+            clearTimeout(timeoutId);
+            abortError();
+        };
+        if (signal?.aborted) {
+            return abortError();
+        }
+        const timeoutId = setTimeout(() => {
+            signal?.removeEventListener('abort', abortHandler);
+            resolve();
+        }, ms);
+        signal?.addEventListener('abort', abortHandler, { once: true });
+    });
+}
+
+exports.delay = delay;
Index: node_modules/es-toolkit/dist/promise/delay.mjs
===================================================================
--- node_modules/es-toolkit/dist/promise/delay.mjs	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
+++ node_modules/es-toolkit/dist/promise/delay.mjs	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
@@ -0,0 +1,23 @@
+import { AbortError } from '../error/AbortError.mjs';
+
+function delay(ms, { signal } = {}) {
+    return new Promise((resolve, reject) => {
+        const abortError = () => {
+            reject(new AbortError());
+        };
+        const abortHandler = () => {
+            clearTimeout(timeoutId);
+            abortError();
+        };
+        if (signal?.aborted) {
+            return abortError();
+        }
+        const timeoutId = setTimeout(() => {
+            signal?.removeEventListener('abort', abortHandler);
+            resolve();
+        }, ms);
+        signal?.addEventListener('abort', abortHandler, { once: true });
+    });
+}
+
+export { delay };
Index: node_modules/es-toolkit/dist/promise/index.d.mts
===================================================================
--- node_modules/es-toolkit/dist/promise/index.d.mts	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
+++ node_modules/es-toolkit/dist/promise/index.d.mts	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
@@ -0,0 +1,5 @@
+export { delay } from './delay.mjs';
+export { Mutex } from './mutex.mjs';
+export { Semaphore } from './semaphore.mjs';
+export { timeout } from './timeout.mjs';
+export { withTimeout } from './withTimeout.mjs';
Index: node_modules/es-toolkit/dist/promise/index.d.ts
===================================================================
--- node_modules/es-toolkit/dist/promise/index.d.ts	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
+++ node_modules/es-toolkit/dist/promise/index.d.ts	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
@@ -0,0 +1,5 @@
+export { delay } from './delay.js';
+export { Mutex } from './mutex.js';
+export { Semaphore } from './semaphore.js';
+export { timeout } from './timeout.js';
+export { withTimeout } from './withTimeout.js';
Index: node_modules/es-toolkit/dist/promise/index.js
===================================================================
--- node_modules/es-toolkit/dist/promise/index.js	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
+++ node_modules/es-toolkit/dist/promise/index.js	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
@@ -0,0 +1,17 @@
+'use strict';
+
+Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
+
+const delay = require('./delay.js');
+const mutex = require('./mutex.js');
+const semaphore = require('./semaphore.js');
+const timeout = require('./timeout.js');
+const withTimeout = require('./withTimeout.js');
+
+
+
+exports.delay = delay.delay;
+exports.Mutex = mutex.Mutex;
+exports.Semaphore = semaphore.Semaphore;
+exports.timeout = timeout.timeout;
+exports.withTimeout = withTimeout.withTimeout;
Index: node_modules/es-toolkit/dist/promise/index.mjs
===================================================================
--- node_modules/es-toolkit/dist/promise/index.mjs	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
+++ node_modules/es-toolkit/dist/promise/index.mjs	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
@@ -0,0 +1,5 @@
+export { delay } from './delay.mjs';
+export { Mutex } from './mutex.mjs';
+export { Semaphore } from './semaphore.mjs';
+export { timeout } from './timeout.mjs';
+export { withTimeout } from './withTimeout.mjs';
Index: node_modules/es-toolkit/dist/promise/mutex.d.mts
===================================================================
--- node_modules/es-toolkit/dist/promise/mutex.d.mts	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
+++ node_modules/es-toolkit/dist/promise/mutex.d.mts	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
@@ -0,0 +1,64 @@
+/**
+ * A Mutex (mutual exclusion lock) for async functions.
+ * It allows only one async task to access a critical section at a time.
+ *
+ * @example
+ * const mutex = new Mutex();
+ *
+ * async function criticalSection() {
+ *   await mutex.acquire();
+ *   try {
+ *     // This code section cannot be executed simultaneously
+ *   } finally {
+ *     mutex.release();
+ *   }
+ * }
+ *
+ * criticalSection();
+ * criticalSection(); // This call will wait until the first call releases the mutex.
+ */
+declare class Mutex {
+    private semaphore;
+    /**
+     * Checks if the mutex is currently locked.
+     * @returns {boolean} True if the mutex is locked, false otherwise.
+     *
+     * @example
+     * const mutex = new Mutex();
+     * console.log(mutex.isLocked); // false
+     * await mutex.acquire();
+     * console.log(mutex.isLocked); // true
+     * mutex.release();
+     * console.log(mutex.isLocked); // false
+     */
+    get isLocked(): boolean;
+    /**
+     * Acquires the mutex, blocking if necessary until it is available.
+     * @returns {Promise<void>} A promise that resolves when the mutex is acquired.
+     *
+     * @example
+     * const mutex = new Mutex();
+     * await mutex.acquire();
+     * try {
+     *   // This code section cannot be executed simultaneously
+     * } finally {
+     *   mutex.release();
+     * }
+     */
+    acquire(): Promise<void>;
+    /**
+     * Releases the mutex, allowing another waiting task to proceed.
+     *
+     * @example
+     * const mutex = new Mutex();
+     * await mutex.acquire();
+     * try {
+     *   // This code section cannot be executed simultaneously
+     * } finally {
+     *   mutex.release(); // Allows another waiting task to proceed.
+     * }
+     */
+    release(): void;
+}
+
+export { Mutex };
Index: node_modules/es-toolkit/dist/promise/mutex.d.ts
===================================================================
--- node_modules/es-toolkit/dist/promise/mutex.d.ts	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
+++ node_modules/es-toolkit/dist/promise/mutex.d.ts	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
@@ -0,0 +1,64 @@
+/**
+ * A Mutex (mutual exclusion lock) for async functions.
+ * It allows only one async task to access a critical section at a time.
+ *
+ * @example
+ * const mutex = new Mutex();
+ *
+ * async function criticalSection() {
+ *   await mutex.acquire();
+ *   try {
+ *     // This code section cannot be executed simultaneously
+ *   } finally {
+ *     mutex.release();
+ *   }
+ * }
+ *
+ * criticalSection();
+ * criticalSection(); // This call will wait until the first call releases the mutex.
+ */
+declare class Mutex {
+    private semaphore;
+    /**
+     * Checks if the mutex is currently locked.
+     * @returns {boolean} True if the mutex is locked, false otherwise.
+     *
+     * @example
+     * const mutex = new Mutex();
+     * console.log(mutex.isLocked); // false
+     * await mutex.acquire();
+     * console.log(mutex.isLocked); // true
+     * mutex.release();
+     * console.log(mutex.isLocked); // false
+     */
+    get isLocked(): boolean;
+    /**
+     * Acquires the mutex, blocking if necessary until it is available.
+     * @returns {Promise<void>} A promise that resolves when the mutex is acquired.
+     *
+     * @example
+     * const mutex = new Mutex();
+     * await mutex.acquire();
+     * try {
+     *   // This code section cannot be executed simultaneously
+     * } finally {
+     *   mutex.release();
+     * }
+     */
+    acquire(): Promise<void>;
+    /**
+     * Releases the mutex, allowing another waiting task to proceed.
+     *
+     * @example
+     * const mutex = new Mutex();
+     * await mutex.acquire();
+     * try {
+     *   // This code section cannot be executed simultaneously
+     * } finally {
+     *   mutex.release(); // Allows another waiting task to proceed.
+     * }
+     */
+    release(): void;
+}
+
+export { Mutex };
Index: node_modules/es-toolkit/dist/promise/mutex.js
===================================================================
--- node_modules/es-toolkit/dist/promise/mutex.js	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
+++ node_modules/es-toolkit/dist/promise/mutex.js	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
@@ -0,0 +1,20 @@
+'use strict';
+
+Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
+
+const semaphore = require('./semaphore.js');
+
+class Mutex {
+    semaphore = new semaphore.Semaphore(1);
+    get isLocked() {
+        return this.semaphore.available === 0;
+    }
+    async acquire() {
+        return this.semaphore.acquire();
+    }
+    release() {
+        this.semaphore.release();
+    }
+}
+
+exports.Mutex = Mutex;
Index: node_modules/es-toolkit/dist/promise/mutex.mjs
===================================================================
--- node_modules/es-toolkit/dist/promise/mutex.mjs	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
+++ node_modules/es-toolkit/dist/promise/mutex.mjs	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
@@ -0,0 +1,16 @@
+import { Semaphore } from './semaphore.mjs';
+
+class Mutex {
+    semaphore = new Semaphore(1);
+    get isLocked() {
+        return this.semaphore.available === 0;
+    }
+    async acquire() {
+        return this.semaphore.acquire();
+    }
+    release() {
+        this.semaphore.release();
+    }
+}
+
+export { Mutex };
Index: node_modules/es-toolkit/dist/promise/semaphore.d.mts
===================================================================
--- node_modules/es-toolkit/dist/promise/semaphore.d.mts	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
+++ node_modules/es-toolkit/dist/promise/semaphore.d.mts	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
@@ -0,0 +1,81 @@
+/**
+ * A counting semaphore for async functions that manages available permits.
+ * Semaphores are mainly used to limit the number of concurrent async tasks.
+ *
+ * Each `acquire` operation takes a permit or waits until one is available.
+ * Each `release` operation adds a permit, potentially allowing a waiting task to proceed.
+ *
+ * The semaphore ensures fairness by maintaining a FIFO (First In, First Out) order for acquirers.
+ *
+ * @example
+ * const sema = new Semaphore(2);
+ *
+ * async function task() {
+ *   await sema.acquire();
+ *   try {
+ *     // This code can only be executed by two tasks at the same time
+ *   } finally {
+ *     sema.release();
+ *   }
+ * }
+ *
+ * task();
+ * task();
+ * task(); // This task will wait until one of the previous tasks releases the semaphore.
+ */
+declare class Semaphore {
+    /**
+     * The maximum number of concurrent operations allowed.
+     * @type {number}
+     */
+    capacity: number;
+    /**
+     * The number of available permits.
+     * @type {number}
+     */
+    available: number;
+    private deferredTasks;
+    /**
+     * Creates an instance of Semaphore.
+     * @param {number} capacity - The maximum number of concurrent operations allowed.
+     *
+     * @example
+     * const sema = new Semaphore(3); // Allows up to 3 concurrent operations.
+     */
+    constructor(capacity: number);
+    /**
+     * Acquires a semaphore, blocking if necessary until one is available.
+     * @returns {Promise<void>} A promise that resolves when the semaphore is acquired.
+     *
+     * @example
+     * const sema = new Semaphore(1);
+     *
+     * async function criticalSection() {
+     *   await sema.acquire();
+     *   try {
+     *     // This code section cannot be executed simultaneously
+     *   } finally {
+     *     sema.release();
+     *   }
+     * }
+     */
+    acquire(): Promise<void>;
+    /**
+     * Releases a semaphore, allowing one more operation to proceed.
+     *
+     * @example
+     * const sema = new Semaphore(1);
+     *
+     * async function task() {
+     *   await sema.acquire();
+     *   try {
+     *     // This code can only be executed by two tasks at the same time
+     *   } finally {
+     *     sema.release(); // Allows another waiting task to proceed.
+     *   }
+     * }
+     */
+    release(): void;
+}
+
+export { Semaphore };
Index: node_modules/es-toolkit/dist/promise/semaphore.d.ts
===================================================================
--- node_modules/es-toolkit/dist/promise/semaphore.d.ts	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
+++ node_modules/es-toolkit/dist/promise/semaphore.d.ts	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
@@ -0,0 +1,81 @@
+/**
+ * A counting semaphore for async functions that manages available permits.
+ * Semaphores are mainly used to limit the number of concurrent async tasks.
+ *
+ * Each `acquire` operation takes a permit or waits until one is available.
+ * Each `release` operation adds a permit, potentially allowing a waiting task to proceed.
+ *
+ * The semaphore ensures fairness by maintaining a FIFO (First In, First Out) order for acquirers.
+ *
+ * @example
+ * const sema = new Semaphore(2);
+ *
+ * async function task() {
+ *   await sema.acquire();
+ *   try {
+ *     // This code can only be executed by two tasks at the same time
+ *   } finally {
+ *     sema.release();
+ *   }
+ * }
+ *
+ * task();
+ * task();
+ * task(); // This task will wait until one of the previous tasks releases the semaphore.
+ */
+declare class Semaphore {
+    /**
+     * The maximum number of concurrent operations allowed.
+     * @type {number}
+     */
+    capacity: number;
+    /**
+     * The number of available permits.
+     * @type {number}
+     */
+    available: number;
+    private deferredTasks;
+    /**
+     * Creates an instance of Semaphore.
+     * @param {number} capacity - The maximum number of concurrent operations allowed.
+     *
+     * @example
+     * const sema = new Semaphore(3); // Allows up to 3 concurrent operations.
+     */
+    constructor(capacity: number);
+    /**
+     * Acquires a semaphore, blocking if necessary until one is available.
+     * @returns {Promise<void>} A promise that resolves when the semaphore is acquired.
+     *
+     * @example
+     * const sema = new Semaphore(1);
+     *
+     * async function criticalSection() {
+     *   await sema.acquire();
+     *   try {
+     *     // This code section cannot be executed simultaneously
+     *   } finally {
+     *     sema.release();
+     *   }
+     * }
+     */
+    acquire(): Promise<void>;
+    /**
+     * Releases a semaphore, allowing one more operation to proceed.
+     *
+     * @example
+     * const sema = new Semaphore(1);
+     *
+     * async function task() {
+     *   await sema.acquire();
+     *   try {
+     *     // This code can only be executed by two tasks at the same time
+     *   } finally {
+     *     sema.release(); // Allows another waiting task to proceed.
+     *   }
+     * }
+     */
+    release(): void;
+}
+
+export { Semaphore };
Index: node_modules/es-toolkit/dist/promise/semaphore.js
===================================================================
--- node_modules/es-toolkit/dist/promise/semaphore.js	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
+++ node_modules/es-toolkit/dist/promise/semaphore.js	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
@@ -0,0 +1,34 @@
+'use strict';
+
+Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
+
+class Semaphore {
+    capacity;
+    available;
+    deferredTasks = [];
+    constructor(capacity) {
+        this.capacity = capacity;
+        this.available = capacity;
+    }
+    async acquire() {
+        if (this.available > 0) {
+            this.available--;
+            return;
+        }
+        return new Promise(resolve => {
+            this.deferredTasks.push(resolve);
+        });
+    }
+    release() {
+        const deferredTask = this.deferredTasks.shift();
+        if (deferredTask != null) {
+            deferredTask();
+            return;
+        }
+        if (this.available < this.capacity) {
+            this.available++;
+        }
+    }
+}
+
+exports.Semaphore = Semaphore;
Index: node_modules/es-toolkit/dist/promise/semaphore.mjs
===================================================================
--- node_modules/es-toolkit/dist/promise/semaphore.mjs	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
+++ node_modules/es-toolkit/dist/promise/semaphore.mjs	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
@@ -0,0 +1,30 @@
+class Semaphore {
+    capacity;
+    available;
+    deferredTasks = [];
+    constructor(capacity) {
+        this.capacity = capacity;
+        this.available = capacity;
+    }
+    async acquire() {
+        if (this.available > 0) {
+            this.available--;
+            return;
+        }
+        return new Promise(resolve => {
+            this.deferredTasks.push(resolve);
+        });
+    }
+    release() {
+        const deferredTask = this.deferredTasks.shift();
+        if (deferredTask != null) {
+            deferredTask();
+            return;
+        }
+        if (this.available < this.capacity) {
+            this.available++;
+        }
+    }
+}
+
+export { Semaphore };
Index: node_modules/es-toolkit/dist/promise/timeout.d.mts
===================================================================
--- node_modules/es-toolkit/dist/promise/timeout.d.mts	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
+++ node_modules/es-toolkit/dist/promise/timeout.d.mts	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
@@ -0,0 +1,17 @@
+/**
+ * Returns a promise that rejects with a `TimeoutError` after a specified delay.
+ *
+ * @param {number} ms - The delay duration in milliseconds.
+ * @returns {Promise<never>} A promise that rejects with a `TimeoutError` after the specified delay.
+ * @throws {TimeoutError} Throws a `TimeoutError` after the specified delay.
+ *
+ * @example
+ * try {
+ *   await timeout(1000); // Timeout exception after 1 second
+ * } catch (error) {
+ *   console.error(error); // Will log 'The operation was timed out'
+ * }
+ */
+declare function timeout(ms: number): Promise<never>;
+
+export { timeout };
Index: node_modules/es-toolkit/dist/promise/timeout.d.ts
===================================================================
--- node_modules/es-toolkit/dist/promise/timeout.d.ts	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
+++ node_modules/es-toolkit/dist/promise/timeout.d.ts	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
@@ -0,0 +1,17 @@
+/**
+ * Returns a promise that rejects with a `TimeoutError` after a specified delay.
+ *
+ * @param {number} ms - The delay duration in milliseconds.
+ * @returns {Promise<never>} A promise that rejects with a `TimeoutError` after the specified delay.
+ * @throws {TimeoutError} Throws a `TimeoutError` after the specified delay.
+ *
+ * @example
+ * try {
+ *   await timeout(1000); // Timeout exception after 1 second
+ * } catch (error) {
+ *   console.error(error); // Will log 'The operation was timed out'
+ * }
+ */
+declare function timeout(ms: number): Promise<never>;
+
+export { timeout };
Index: node_modules/es-toolkit/dist/promise/timeout.js
===================================================================
--- node_modules/es-toolkit/dist/promise/timeout.js	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
+++ node_modules/es-toolkit/dist/promise/timeout.js	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
@@ -0,0 +1,13 @@
+'use strict';
+
+Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
+
+const delay = require('./delay.js');
+const TimeoutError = require('../error/TimeoutError.js');
+
+async function timeout(ms) {
+    await delay.delay(ms);
+    throw new TimeoutError.TimeoutError();
+}
+
+exports.timeout = timeout;
Index: node_modules/es-toolkit/dist/promise/timeout.mjs
===================================================================
--- node_modules/es-toolkit/dist/promise/timeout.mjs	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
+++ node_modules/es-toolkit/dist/promise/timeout.mjs	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
@@ -0,0 +1,9 @@
+import { delay } from './delay.mjs';
+import { TimeoutError } from '../error/TimeoutError.mjs';
+
+async function timeout(ms) {
+    await delay(ms);
+    throw new TimeoutError();
+}
+
+export { timeout };
Index: node_modules/es-toolkit/dist/promise/withTimeout.d.mts
===================================================================
--- node_modules/es-toolkit/dist/promise/withTimeout.d.mts	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
+++ node_modules/es-toolkit/dist/promise/withTimeout.d.mts	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
@@ -0,0 +1,28 @@
+/**
+ * Executes an async function and enforces a timeout.
+ *
+ * If the promise does not resolve within the specified time,
+ * the timeout will trigger and the returned promise will be rejected.
+ *
+ *
+ * @template T
+ * @param {() => Promise<T>} run - A function that returns a promise to be executed.
+ * @param {number} ms - The timeout duration in milliseconds.
+ * @returns {Promise<T>} A promise that resolves with the result of the `run` function or rejects if the timeout is reached.
+ *
+ * @example
+ * async function fetchData() {
+ *   const response = await fetch('https://example.com/data');
+ *   return response.json();
+ * }
+ *
+ * try {
+ *   const data = await withTimeout(fetchData, 1000);
+ *   console.log(data); // Logs the fetched data if `fetchData` is resolved within 1 second.
+ * } catch (error) {
+ *   console.error(error); // Will log 'TimeoutError' if `fetchData` is not resolved within 1 second.
+ * }
+ */
+declare function withTimeout<T>(run: () => Promise<T>, ms: number): Promise<T>;
+
+export { withTimeout };
Index: node_modules/es-toolkit/dist/promise/withTimeout.d.ts
===================================================================
--- node_modules/es-toolkit/dist/promise/withTimeout.d.ts	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
+++ node_modules/es-toolkit/dist/promise/withTimeout.d.ts	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
@@ -0,0 +1,28 @@
+/**
+ * Executes an async function and enforces a timeout.
+ *
+ * If the promise does not resolve within the specified time,
+ * the timeout will trigger and the returned promise will be rejected.
+ *
+ *
+ * @template T
+ * @param {() => Promise<T>} run - A function that returns a promise to be executed.
+ * @param {number} ms - The timeout duration in milliseconds.
+ * @returns {Promise<T>} A promise that resolves with the result of the `run` function or rejects if the timeout is reached.
+ *
+ * @example
+ * async function fetchData() {
+ *   const response = await fetch('https://example.com/data');
+ *   return response.json();
+ * }
+ *
+ * try {
+ *   const data = await withTimeout(fetchData, 1000);
+ *   console.log(data); // Logs the fetched data if `fetchData` is resolved within 1 second.
+ * } catch (error) {
+ *   console.error(error); // Will log 'TimeoutError' if `fetchData` is not resolved within 1 second.
+ * }
+ */
+declare function withTimeout<T>(run: () => Promise<T>, ms: number): Promise<T>;
+
+export { withTimeout };
Index: node_modules/es-toolkit/dist/promise/withTimeout.js
===================================================================
--- node_modules/es-toolkit/dist/promise/withTimeout.js	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
+++ node_modules/es-toolkit/dist/promise/withTimeout.js	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
@@ -0,0 +1,11 @@
+'use strict';
+
+Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
+
+const timeout = require('./timeout.js');
+
+async function withTimeout(run, ms) {
+    return Promise.race([run(), timeout.timeout(ms)]);
+}
+
+exports.withTimeout = withTimeout;
Index: node_modules/es-toolkit/dist/promise/withTimeout.mjs
===================================================================
--- node_modules/es-toolkit/dist/promise/withTimeout.mjs	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
+++ node_modules/es-toolkit/dist/promise/withTimeout.mjs	(revision a762898ecd37a452c782821d4c2c4955c6ed2521)
@@ -0,0 +1,7 @@
+import { timeout } from './timeout.mjs';
+
+async function withTimeout(run, ms) {
+    return Promise.race([run(), timeout(ms)]);
+}
+
+export { withTimeout };
