@m1212e/rumble 0.16.12 → 0.16.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/out/index.d.cts CHANGED
@@ -1,19 +1,21 @@
1
+ /// <reference types="urlpattern-polyfill" />
1
2
  import { GraphQLError } from "graphql";
2
3
  import { MySqlDatabase } from "drizzle-orm/mysql-core";
3
4
  import * as drizzle_orm_pg_core0 from "drizzle-orm/pg-core";
4
- import { PgDatabase } from "drizzle-orm/pg-core";
5
+ import { PgAsyncDatabase } from "drizzle-orm/pg-core";
5
6
  import { BaseSQLiteDatabase } from "drizzle-orm/sqlite-core";
6
7
  import * as drizzle_orm0 from "drizzle-orm";
7
8
  import * as graphql_yoga0 from "graphql-yoga";
8
9
  import { YogaServerOptions, createPubSub } from "graphql-yoga";
9
- import * as fets0 from "fets";
10
+ import { IncomingMessage, RequestListener, ServerResponse } from "node:http";
11
+ import { Http2ServerRequest, Http2ServerResponse } from "node:http2";
12
+ import { Socket } from "node:net";
10
13
  import * as _pothos_plugin_drizzle0 from "@pothos/plugin-drizzle";
11
14
  import * as _pothos_core0 from "@pothos/core";
12
15
  import SchemaBuilder from "@pothos/core";
13
16
  import { useSofa } from "sofa-api";
14
17
 
15
18
  //#region lib/helpers/asserts.d.ts
16
-
17
19
  /**
18
20
  *
19
21
  * Helper function to map a drizzle findFirst query result,
@@ -44,7 +46,7 @@ import { useSofa } from "sofa-api";
44
46
  });
45
47
  * ```
46
48
  */
47
- declare const assertFindFirstExists: <T$1>(value: T$1 | undefined) => T$1;
49
+ declare const assertFindFirstExists: <T>(value: T | undefined) => T;
48
50
  /**
49
51
  *
50
52
  * Helper function to map a drizzle findFirst query result,
@@ -84,7 +86,7 @@ declare const assertFindFirstExists: <T$1>(value: T$1 | undefined) => T$1;
84
86
  });
85
87
  * ```
86
88
  */
87
- declare const assertFirstEntryExists: <T$1>(value: T$1[]) => T$1;
89
+ declare const assertFirstEntryExists: <T>(value: T[]) => T;
88
90
  //#endregion
89
91
  //#region lib/helpers/mapNullFieldsToUndefined.d.ts
90
92
  /**
@@ -145,10 +147,10 @@ declare const assertFirstEntryExists: <T$1>(value: T$1[]) => T$1;
145
147
  *
146
148
  * ```
147
149
  */
148
- declare function mapNullFieldsToUndefined<T$1 extends object>(obj: T$1): { [K in keyof T$1]: T$1[K] extends null ? undefined : Exclude<T$1[K], null> };
150
+ declare function mapNullFieldsToUndefined<T extends object>(obj: T): { [K in keyof T]: T[K] extends null ? undefined : Exclude<T[K], null> };
149
151
  //#endregion
150
152
  //#region lib/types/drizzleInstanceType.d.ts
151
- type DrizzleInstance = PgDatabase<any, any, any, any> | BaseSQLiteDatabase<any, any, any, any> | MySqlDatabase<any, any, any, any>;
153
+ type DrizzleInstance = PgAsyncDatabase<any, any, any, any> | BaseSQLiteDatabase<any, any, any, any> | MySqlDatabase<any, any, any, any>;
152
154
  /**
153
155
  * Type representing the query function of a Drizzle instance.
154
156
  */
@@ -163,10 +165,10 @@ type DrizzleQueryFunctionInput<DB extends DrizzleInstance, QueryField extends ke
163
165
  type DrizzleTableValueType<DB extends DrizzleInstance, QueryField extends keyof DrizzleQueryFunction<DB>> = NonNullable<Awaited<ReturnType<DrizzleQueryFunction<DB>[QueryField]["findFirst"]>>>;
164
166
  //#endregion
165
167
  //#region lib/runtimeFiltersPlugin/filterTypes.d.ts
166
- type Filter<Context, T$1> = (p: {
168
+ type Filter<Context, T> = (p: {
167
169
  context: Context;
168
- entities: T$1[];
169
- }) => T$1[] | Promise<T$1[]>;
170
+ entities: T[];
171
+ }) => T[] | Promise<T[]>;
170
172
  //#endregion
171
173
  //#region lib/args/whereArgsImplementer.d.ts
172
174
  type NumberWhereInputArgument = {
@@ -236,60 +238,4047 @@ type DateWhereInputArgument = {
236
238
  NOT?: DateWhereInputArgument;
237
239
  };
238
240
  //#endregion
239
- //#region lib/types/rumbleInput.d.ts
240
- type CustomRumblePothosConfig = Omit<ConstructorParameters<typeof SchemaBuilder>[0], "smartSubscriptions" | "drizzle">;
241
- type RumbleInput<UserContext extends Record<string, any>, DB extends DrizzleInstance, RequestEvent extends Record<string, any>, Action extends string, PothosConfig extends CustomRumblePothosConfig> = {
241
+ //#region node_modules/hotscript/dist/internals/helpers.d.ts
242
+ type Equal$1<a, b> = (<T>() => T extends a ? 1 : 2) extends (<T>() => T extends b ? 1 : 2) ? true : false;
243
+ /**
244
+ * HACK:
245
+ * Special function for never because `Equal<T, never>` doesn't
246
+ * work when called deep in the call stack (for a reason I don't understand
247
+ * probably a TS bug).
248
+ */
249
+ type IsNever$1<T> = [T] extends [never] ? true : false;
250
+ type Not$2<a extends boolean> = a extends true ? false : true;
251
+ /**
252
+ * trick to combine multiple unions of objects into a single object
253
+ * only works with objects not primitives
254
+ * @param union - Union of objects
255
+ * @returns Intersection of objects
256
+ */
257
+ type UnionToIntersection<union> = (union extends any ? (k: union) => void : never) extends ((k: infer intersection) => void) ? intersection : never;
258
+ type Prettify$1<T> = { [K in keyof T]: T[K] } | never;
259
+ declare namespace Iterator$1 {
260
+ type Get<it extends readonly any[]> = it["length"];
261
+ type Iterator<n extends number, it extends any[] = []> = it["length"] extends n ? it : Iterator$1<n, [any, ...it]>;
262
+ type Next<it extends any[]> = [any, ...it];
263
+ type Prev<it extends any[]> = it extends readonly [any, ...infer tail] ? tail : [];
264
+ }
265
+ type UppercaseLetter = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z";
266
+ type KebabToCamel<str> = str extends `${infer first}-${infer rest}` ? `${first}${KebabToCamel<Capitalize<rest>>}` : str;
267
+ type SnakeToCamel<str> = str extends `${infer first}_${infer rest}` ? `${first}${SnakeToCamel<Capitalize<rest>>}` : str;
268
+ /**
269
+ * Converts string casing from snake_case or kebab-case to camelCase.
270
+ */
271
+ type CamelCase<str> = KebabToCamel<SnakeToCamel<str>>;
272
+ /**
273
+ * Converts string casing from camelCase or kebab-case to snake_case.
274
+ */
275
+ type SnakeCase<str, output extends string = ""> = str extends `${infer first}${infer rest}` ? first extends UppercaseLetter ? output extends "" ? SnakeCase<rest, Lowercase<first>> : SnakeCase<rest, `${output}_${Lowercase<first>}`> : first extends "-" ? SnakeCase<rest, `${output}_`> : SnakeCase<rest, `${output}${first}`> : output extends "" ? str : output;
276
+ /**
277
+ * Converts string casing from camelCase or snake_case to kebab-case.
278
+ */
279
+ type KebabCase<str, output extends string = ""> = str extends `${infer first}${infer rest}` ? first extends UppercaseLetter ? output extends "" ? KebabCase<rest, Lowercase<first>> : KebabCase<rest, `${output}-${Lowercase<first>}`> : first extends "_" ? KebabCase<rest, `${output}-`> : KebabCase<rest, `${output}${first}`> : output extends "" ? str : output;
280
+ type IsTuple<a extends readonly any[]> = a extends readonly [] | readonly [any, ...any] | readonly [...any, any] ? true : false;
281
+ type IsArrayStrict<a> = a extends readonly any[] ? Not$2<IsTuple<a>> : false;
282
+ /**
283
+ * get last element of union
284
+ * @param Union - Union of any types
285
+ * @returns Last element of union
286
+ */
287
+ type GetUnionLast<Union> = UnionToIntersection<Union extends any ? () => Union : never> extends (() => infer Last) ? Last : never;
288
+ /**
289
+ * Convert union to tuple
290
+ * @param Union - Union of any types, can be union of complex, composed or primitive types
291
+ * @returns Tuple of each elements in the union
292
+ */
293
+ type UnionToTuple<Union, Tuple extends unknown[] = []> = [Union] extends [never] ? Tuple : UnionToTuple<Exclude<Union, GetUnionLast<Union>>, [GetUnionLast<Union>, ...Tuple]>;
294
+ /**
295
+ * Split string into a tuple, using a simple string literal separator
296
+ * @description - This is a simple implementation of split, it does not support multiple separators
297
+ * A more complete implementation is built on top of this one
298
+ * @param Str - String to split
299
+ * @param Sep - Separator, must be a string literal not a union of string literals
300
+ * @returns Tuple of strings
301
+ */
302
+ type Split$2<Str, Sep extends string, Acc extends string[] = []> = Str extends "" ? Acc : Str extends `${infer T}${Sep}${infer U}` ? Split$2<U, Sep, [...Acc, T]> : [...Acc, Str];
303
+ type Stringifiable = string | number | boolean | bigint | null | undefined;
304
+ type Primitive$1 = string | number | boolean | bigint | null | undefined | symbol;
305
+ type Head<xs> = xs extends [infer first, ...any] ? first : never;
306
+ //#endregion
307
+ //#region node_modules/hotscript/dist/internals/core/impl/MergeArgs.d.ts
308
+ type ExcludePlaceholders<xs, output extends any[] = []> = xs extends [infer first, ...infer rest] ? Equal$1<first, _> extends true ? ExcludePlaceholders<rest, output> : ExcludePlaceholders<rest, [...output, first]> : output;
309
+ type MergeArgsRec<pipedArgs extends any[], partialArgs extends any[], output extends any[] = []> = partialArgs extends [infer partialFirst, ...infer partialRest] ? IsNever$1<partialFirst> extends true ? MergeArgsRec<pipedArgs, partialRest, [...output, partialFirst]> : [partialFirst] extends [_] ? pipedArgs extends [infer pipedFirst, ...infer pipedRest] ? MergeArgsRec<pipedRest, partialRest, [...output, pipedFirst]> : [...output, ...ExcludePlaceholders<partialRest>] : MergeArgsRec<pipedArgs, partialRest, [...output, partialFirst]> : [...output, ...pipedArgs];
310
+ type EmptyIntoPlaceholder<x> = IsNever$1<x> extends true ? never : [x] extends [unset] ? _ : x;
311
+ type MapEmptyIntoPlaceholder<xs, output extends any[] = []> = xs extends [infer first, ...infer rest] ? MapEmptyIntoPlaceholder<rest, [...output, EmptyIntoPlaceholder<first>]> : output;
312
+ type MergeArgs<pipedArgs extends any[], partialArgs extends any[]> = MergeArgsRec<pipedArgs, MapEmptyIntoPlaceholder<partialArgs>>;
313
+ //#endregion
314
+ //#region node_modules/hotscript/dist/internals/core/Core.d.ts
315
+ declare const rawArgs: unique symbol;
316
+ type rawArgs = typeof rawArgs;
317
+ /**
318
+ * Base interface for all functions.
319
+ *
320
+ * @description You need to extend this interface to create a function
321
+ * that can be composed with other HOTScript functions.
322
+ * Usually you will just convert some utility type you already have
323
+ * by wrapping it inside a HOTScript function.
324
+ *
325
+ * Use `this['args']`, `this['arg0']`, `this['arg1']` etc to access
326
+ * function arguments.
327
+ *
328
+ * The `return` property is the value returned by your function.
329
+ *
330
+ * @example
331
+ * ```ts
332
+ * export interface CustomOmitFn extends Fn {
333
+ * return: Omit<this['arg0'], this['arg1']>
334
+ * }
335
+ *
336
+ * type T = Call<CustomOmitFn, { a, b, c }, 'a'> // { b, c }
337
+ * ```
338
+ */
339
+ interface Fn {
340
+ [rawArgs]: unknown;
341
+ args: this[rawArgs] extends infer args extends unknown[] ? args : never;
342
+ arg0: this[rawArgs] extends [infer arg, ...any] ? arg : never;
343
+ arg1: this[rawArgs] extends [any, infer arg, ...any] ? arg : never;
344
+ arg2: this[rawArgs] extends [any, any, infer arg, ...any] ? arg : never;
345
+ arg3: this[rawArgs] extends [any, any, any, infer arg, ...any] ? arg : never;
346
+ return: unknown;
347
+ }
348
+ declare const unset: unique symbol;
349
+ declare const _: unique symbol;
350
+ /**
351
+ * A placeholder type that can be used to indicate that a parameter is not set.
352
+ */
353
+ type unset = typeof unset;
354
+ /**
355
+ * A placeholder type that can be used to indicate that a parameter is to partially applied.
356
+ */
357
+ type _ = typeof _;
358
+ interface args$1<Constraint extends unknown[] = unknown[]> extends Fn {
359
+ return: this["args"] extends infer args extends Constraint ? args : never;
360
+ }
361
+ /**
362
+ * Call a HOTScript function with the given arguments.
363
+ *
364
+ * @param fn - The function to call.
365
+ * @param args - The arguments to pass to the function.
366
+ * @returns The result of the function.
367
+ *
368
+ * @example
369
+ * ```ts
370
+ * type T0 = Apply<Numbers.Add, [1, 2]>; // 3
371
+ * ```
372
+ */
373
+ type Apply<fn extends Fn, args extends unknown[]> = (fn & {
374
+ [rawArgs]: args;
375
+ })["return"];
376
+ /**
377
+ * Calls a HOTScript function.
378
+ *
379
+ * @param fn - The function to call.
380
+ * @param ...args - optional arguments
381
+ *
382
+ * @example
383
+ * ```ts
384
+ * type T0 = Call<Numbers.Add<1, 2>>; // 3
385
+ * type T1 = Call<Numbers.Add<1>, 2>; // 3
386
+ * type T2 = Call<Numbers.Add, 1, 2>; // 3
387
+ * type T3 = Call<
388
+ * Tuples.Map<Strings.Split<".">, ["a.b", "b.c"]>
389
+ * >; // [["a", "b"], ["b", "c"]]
390
+ * ```
391
+ */
392
+ type Call<fn extends Fn, arg0 = _, arg1 = _, arg2 = _, arg3 = _> = (fn & {
393
+ [rawArgs]: ExcludePlaceholders<[arg0, arg1, arg2, arg3]>;
394
+ })["return"];
395
+ /**
396
+ * Pipe a value through a list of functions.
397
+ * @description This is the same as the pipe operator in other languages.
398
+ * Calls the first function with the initial value, then passes the result to the second function, and so on.
399
+ *
400
+ * @param acc - The initial value to pass to the first function.
401
+ * @param xs - The list of functions to pipe the value through.
402
+ * @returns The result of the last function.
403
+ *
404
+ * @example
405
+ * ```ts
406
+ * type T0 = Pipe<1, [Numbers.Add<1>, Numbers.Negate]>; // -2
407
+ * ```
408
+ */
409
+ type Pipe<acc, xs extends Fn[]> = xs extends [infer first extends Fn, ...infer rest extends Fn[]] ? Pipe<Call<first, acc>, rest> : acc;
410
+ /**
411
+ * Composes a list of functions into a single function that passes the result of each function to the next.
412
+ * Executes the functions from left to right.
413
+ *
414
+ * @param fns - The list of functions to compose.
415
+ * @returns The composed function.
416
+ *
417
+ * @example
418
+ * ```ts
419
+ * type T0 = Call<ComposeLeft< [S.Split<'.'>,T.Join<'-'> ]>, 'a.b.c'>; // 'a-b-c'
420
+ * ```
421
+ */
422
+ interface ComposeLeft<fns extends Fn[]> extends Fn {
423
+ return: ComposeLeftImpl<fns, this["args"]>;
424
+ }
425
+ type ComposeLeftImpl<fns extends Fn[], args extends any[]> = fns extends [infer first extends Fn, ...infer rest extends Fn[]] ? ComposeLeftImpl<rest, [Apply<first, args>]> : Head<args>;
426
+ /**
427
+ * `PartialApply` Pre applies some arguments to a function.
428
+ * it takes a `Fn`, and a list of pre applied arguments,
429
+ * and returns a new function taking the rest of these arguments.
430
+ *
431
+ * Most functions in HOTScript are already partially applicable (curried).
432
+ *
433
+ * @param fn - The function to partially apply.
434
+ * @param partialArgs - The arguments to partially apply.
435
+ * @returns The partially applied function.
436
+ *
437
+ * @example
438
+ * ```ts
439
+ * interface Append extends Fn {
440
+ * return: [...this['arg1'], this['arg0']]
441
+ * }
442
+ *
443
+ * type Append1 = PartialApply<Append, [1]>
444
+ * type T0 = Call<Append1, [0]>; // [0, 1]
445
+ *
446
+ * type AppendTo123 = PartialApply<Append, [_, [1, 2, 3]]>
447
+ * type T1 = Call<AppendTo123, 4>; // [1, 2, 3, 4]
448
+ */
449
+ interface PartialApply<fn extends Fn, partialArgs extends unknown[]> extends Fn {
450
+ return: MergeArgs<this["args"], partialArgs> extends infer args extends unknown[] ? Apply<fn, args$1> : never;
451
+ }
452
+ //#endregion
453
+ //#region node_modules/hotscript/dist/internals/numbers/impl/absolute.d.ts
454
+ type Abs<T extends number | bigint> = `${T}` extends `-${infer U extends number | bigint}` ? U : T;
455
+ //#endregion
456
+ //#region node_modules/hotscript/dist/internals/numbers/impl/utils.d.ts
457
+ type ToNumber<T extends string> = T extends `${infer N extends number | bigint}` ? N : never;
458
+ type ToString<T extends number | bigint> = `${T}`;
459
+ type Digits = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
460
+ type Digit = Digits[number];
461
+ type DigitNumber = {
462
+ sign: "-" | "";
463
+ num: Digit[];
464
+ };
465
+ type MakeDigitNumber<S extends "-" | "", N extends Digit[]> = {
466
+ sign: S;
467
+ num: N;
468
+ };
469
+ type ToDigits<T extends string, Acc extends Digit[] = []> = T extends `${infer N extends Digit}${infer R}` ? ToDigits<R, [...Acc, N]> : Acc;
470
+ type ToDigitNumber<T extends string> = T extends `-${infer R}` ? {
471
+ sign: "-";
472
+ num: ToDigits<R>;
473
+ } : {
474
+ sign: "";
475
+ num: ToDigits<T>;
476
+ };
477
+ type FromDigits<T, Acc extends string = ""> = T extends [infer N extends Digit, ...infer R] ? FromDigits<R, `${Acc}${N}`> : Acc;
478
+ type Sign<T extends DigitNumber> = T["sign"];
479
+ type InvertSign<T extends DigitNumber> = Sign<T> extends "-" ? "" : "-";
480
+ type MulSign<S1 extends "-" | "", S2 extends "-" | ""> = S1 extends "-" ? S2 extends "-" ? "" : "-" : S2 extends "-" ? "-" : "";
481
+ type Num<T extends DigitNumber> = T["num"];
482
+ type FromDigitNumber<T extends DigitNumber> = `${Sign<T>}${FromDigits<Num<T>>}`;
483
+ type TrimZeros<T extends Digit[]> = T extends [0] ? [0] : T extends [0, ...infer R extends Digit[]] ? TrimZeros<R> : T;
484
+ type Normalize<T extends DigitNumber, Trim extends Digit[] = TrimZeros<Num<T>>> = Trim extends [0] ? MakeDigitNumber<"", Trim> : MakeDigitNumber<Sign<T>, Trim>;
485
+ //#endregion
486
+ //#region node_modules/hotscript/dist/internals/numbers/impl/digits/addition.d.ts
487
+ type AddDigitTable = [[[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9, 0], [2, 3, 4, 5, 6, 7, 8, 9, 0, 1], [3, 4, 5, 6, 7, 8, 9, 0, 1, 2], [4, 5, 6, 7, 8, 9, 0, 1, 2, 3], [5, 6, 7, 8, 9, 0, 1, 2, 3, 4], [6, 7, 8, 9, 0, 1, 2, 3, 4, 5], [7, 8, 9, 0, 1, 2, 3, 4, 5, 6], [8, 9, 0, 1, 2, 3, 4, 5, 6, 7], [9, 0, 1, 2, 3, 4, 5, 6, 7, 8]], [[1, 2, 3, 4, 5, 6, 7, 8, 9, 0], [2, 3, 4, 5, 6, 7, 8, 9, 0, 1], [3, 4, 5, 6, 7, 8, 9, 0, 1, 2], [4, 5, 6, 7, 8, 9, 0, 1, 2, 3], [5, 6, 7, 8, 9, 0, 1, 2, 3, 4], [6, 7, 8, 9, 0, 1, 2, 3, 4, 5], [7, 8, 9, 0, 1, 2, 3, 4, 5, 6], [8, 9, 0, 1, 2, 3, 4, 5, 6, 7], [9, 0, 1, 2, 3, 4, 5, 6, 7, 8], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]]];
488
+ type AddDigitCarryTable = [[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1]], [[0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]];
489
+ type AddDigit<T extends Digit, U extends Digit, Carry extends 0 | 1 = 0> = AddDigitTable[Carry][T][U];
490
+ type AddCarryDigit<T extends Digit, U extends Digit, Carry extends 0 | 1 = 0> = AddDigitCarryTable[Carry][T][U];
491
+ type AddDigits<T extends Digit[], U extends Digit[], Carry extends 0 | 1 = 0, Acc extends Digit[] = []> = T extends [...infer R extends Digit[], infer N extends Digit] ? U extends [...infer S extends Digit[], infer M extends Digit] ? AddDigits<R, S, AddCarryDigit<N, M, Carry>, [AddDigit<N, M, Carry>, ...Acc]> : AddDigits<R, [], AddCarryDigit<N, 0, Carry>, [AddDigit<N, 0, Carry>, ...Acc]> : U extends [...infer S extends Digit[], infer M extends Digit] ? AddDigits<[], S, AddCarryDigit<0, M, Carry>, [AddDigit<0, M, Carry>, ...Acc]> : Carry extends 1 ? [1, ...Acc] : Acc;
492
+ //#endregion
493
+ //#region node_modules/hotscript/dist/internals/numbers/impl/compare.d.ts
494
+ type CompareLength<T extends any[], U extends any[]> = T["length"] extends U["length"] ? 1 : 0;
495
+ type DigitCompareTable = [[0, -1, -1, -1, -1, -1, -1, -1, -1, -1], [1, 0, -1, -1, -1, -1, -1, -1, -1, -1], [1, 1, 0, -1, -1, -1, -1, -1, -1, -1], [1, 1, 1, 0, -1, -1, -1, -1, -1, -1], [1, 1, 1, 1, 0, -1, -1, -1, -1, -1], [1, 1, 1, 1, 1, 0, -1, -1, -1, -1], [1, 1, 1, 1, 1, 1, 0, -1, -1, -1], [1, 1, 1, 1, 1, 1, 1, 0, -1, -1], [1, 1, 1, 1, 1, 1, 1, 1, 0, -1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 0]];
496
+ type DigitCompare<D1 extends Digit, D2 extends Digit> = DigitCompareTable[D1][D2];
497
+ type CompareDigitsWithEqualLength<T extends Digit[], U extends Digit[]> = [T, U] extends [[infer N1 extends Digit, ...infer R1 extends Digit[]], [infer N2 extends Digit, ...infer R2 extends Digit[]]] ? DigitCompare<N1, N2> extends 0 ? CompareDigitsWithEqualLength<R1, R2> : DigitCompare<N1, N2> : 0;
498
+ type CompareDigits<T extends Digit[], U extends Digit[]> = CompareLength<T, U> extends 1 ? CompareDigitsWithEqualLength<T, U> : keyof U extends keyof T ? 1 : -1;
499
+ type CompareDigitNumbers<T extends DigitNumber, U extends DigitNumber> = Sign<T> extends Sign<U> ? Sign<T> extends "" ? CompareDigits<Num<T>, Num<U>> : CompareDigits<Num<U>, Num<T>> : Sign<T> extends "-" ? -1 : 1;
500
+ /**
501
+ * Compare two numbers
502
+ * @param T - First number
503
+ * @param U - Second number
504
+ * @returns 0 if T = U, 1 if T > U, -1 if T < U
505
+ */
506
+ type Compare$1<T extends number | bigint, U extends number | bigint> = Equal$1<T, U> extends true ? 0 : CompareDigitNumbers<ToDigitNumber<ToString<T>>, ToDigitNumber<ToString<U>>>;
507
+ type LessThan$1<T extends number | bigint, U extends number | bigint> = Compare$1<T, U> extends -1 ? true : false;
508
+ type GreaterThan$1<T extends number | bigint, U extends number | bigint> = Compare$1<T, U> extends 1 ? true : false;
509
+ type Equal<T extends number | bigint, U extends number | bigint> = Equal$1<T, U>;
510
+ type NotEqual<T extends number | bigint, U extends number | bigint> = Equal$1<T, U> extends true ? false : true;
511
+ type LessThanOrEqual$1<T extends number | bigint, U extends number | bigint> = Compare$1<T, U> extends -1 | 0 ? true : false;
512
+ type GreaterThanOrEqual$1<T extends number | bigint, U extends number | bigint> = Compare$1<T, U> extends 1 | 0 ? true : false;
513
+ type Max<T extends number | bigint, U extends number | bigint> = Compare$1<T, U> extends 1 | 0 ? T : U;
514
+ type Min<T extends number | bigint, U extends number | bigint> = Compare$1<T, U> extends 1 | 0 ? U : T;
515
+ //#endregion
516
+ //#region node_modules/hotscript/dist/internals/numbers/impl/digits/substraction.d.ts
517
+ type SubDigitTable = [[[0, 9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 0, 9, 8, 7, 6, 5, 4, 3, 2], [2, 1, 0, 9, 8, 7, 6, 5, 4, 3], [3, 2, 1, 0, 9, 8, 7, 6, 5, 4], [4, 3, 2, 1, 0, 9, 8, 7, 6, 5], [5, 4, 3, 2, 1, 0, 9, 8, 7, 6], [6, 5, 4, 3, 2, 1, 0, 9, 8, 7], [7, 6, 5, 4, 3, 2, 1, 0, 9, 8], [8, 7, 6, 5, 4, 3, 2, 1, 0, 9], [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]], [[9, 8, 7, 6, 5, 4, 3, 2, 1, 0], [0, 9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 0, 9, 8, 7, 6, 5, 4, 3, 2], [2, 1, 0, 9, 8, 7, 6, 5, 4, 3], [3, 2, 1, 0, 9, 8, 7, 6, 5, 4], [4, 3, 2, 1, 0, 9, 8, 7, 6, 5], [5, 4, 3, 2, 1, 0, 9, 8, 7, 6], [6, 5, 4, 3, 2, 1, 0, 9, 8, 7], [7, 6, 5, 4, 3, 2, 1, 0, 9, 8], [8, 7, 6, 5, 4, 3, 2, 1, 0, 9]]];
518
+ type SubDigitCarryTable = [[[0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1]]];
519
+ type SubDigit<T extends Digit, U extends Digit, Carry extends 0 | 1 = 0> = SubDigitTable[Carry][T][U];
520
+ type SubCarryDigit<T extends Digit, U extends Digit, Carry extends 0 | 1 = 0> = SubDigitCarryTable[Carry][T][U];
521
+ type SubDigits<T extends Digit[], U extends Digit[], Carry extends 0 | 1 = 0, Acc extends Digit[] = []> = T extends [...infer R extends Digit[], infer N extends Digit] ? U extends [...infer S extends Digit[], infer M extends Digit] ? SubDigits<R, S, SubCarryDigit<N, M, Carry>, [SubDigit<N, M, Carry>, ...Acc]> : SubDigits<R, [], SubCarryDigit<N, 0, Carry>, [SubDigit<N, 0, Carry>, ...Acc]> : U extends [...infer S extends Digit[], infer M extends Digit] ? SubDigits<[], S, SubCarryDigit<0, M, Carry>, [SubDigit<0, M, Carry>, ...Acc]> : Carry extends 1 ? [...Acc, 9] : Acc;
522
+ //#endregion
523
+ //#region node_modules/hotscript/dist/internals/numbers/impl/addition.d.ts
524
+ type AddDigitNumbers<T extends DigitNumber, U extends DigitNumber> = Sign<T> extends Sign<U> ? MakeDigitNumber<Sign<T>, AddDigits<Num<T>, Num<U>>> : CompareDigits<Num<T>, Num<U>> extends 1 ? MakeDigitNumber<Sign<T>, SubDigits<Num<T>, Num<U>>> : MakeDigitNumber<InvertSign<T>, SubDigits<Num<U>, Num<T>>>;
525
+ type Add<T extends number | bigint, U extends number | bigint> = ToNumber<FromDigitNumber<Normalize<AddDigitNumbers<ToDigitNumber<ToString<T>>, ToDigitNumber<ToString<U>>>>>>;
526
+ //#endregion
527
+ //#region node_modules/hotscript/dist/internals/numbers/impl/substraction.d.ts
528
+ type SubDigitNumbers<T extends DigitNumber, U extends DigitNumber> = Sign<T> extends Sign<U> ? CompareDigits<Num<T>, Num<U>> extends 1 ? MakeDigitNumber<Sign<T>, SubDigits<Num<T>, Num<U>>> : MakeDigitNumber<InvertSign<T>, SubDigits<Num<U>, Num<T>>> : MakeDigitNumber<Sign<T>, AddDigits<Num<T>, Num<U>>>;
529
+ type Sub<T extends number | bigint, U extends number | bigint> = ToNumber<FromDigitNumber<Normalize<SubDigitNumbers<ToDigitNumber<ToString<T>>, ToDigitNumber<ToString<U>>>>>>;
530
+ //#endregion
531
+ //#region node_modules/hotscript/dist/internals/numbers/impl/negate.d.ts
532
+ type Negate<T extends number | bigint> = `${T}` extends `-${infer U extends number | bigint}` ? U : `-${T}` extends `${infer U extends number | bigint}` ? U : never;
533
+ //#endregion
534
+ //#region node_modules/hotscript/dist/internals/numbers/impl/digits/multiply.d.ts
535
+ type MulX2<T extends Digit[]> = AddDigits<T, T>;
536
+ type MulX3<T extends Digit[]> = AddDigits<T, MulX2<T>>;
537
+ type MulX4<T extends Digit[]> = MulX2<MulX2<T>>;
538
+ type MulX5<T extends Digit[]> = AddDigits<T, MulX4<T>>;
539
+ type MulX6<T extends Digit[]> = MulX2<MulX3<T>>;
540
+ type MulX7<T extends Digit[]> = SubDigits<MulX10<T>, MulX3<T>>;
541
+ type MulX8<T extends Digit[]> = SubDigits<MulX10<T>, MulX2<T>>;
542
+ type MulX9<T extends Digit[]> = SubDigits<MulX10<T>, T>;
543
+ type MulX10<T extends Digit[]> = [...T, 0];
544
+ type MulByDigit<T extends Digit[], U extends Digit> = U extends 0 ? [0] : U extends 1 ? T : U extends 2 ? MulX2<T> : U extends 3 ? MulX3<T> : U extends 4 ? MulX4<T> : U extends 5 ? MulX5<T> : U extends 6 ? MulX6<T> : U extends 7 ? MulX7<T> : U extends 8 ? MulX8<T> : MulX9<T>;
545
+ type MulDigits<T extends Digit[], U extends Digit[], Acc extends Digit[] = []> = U extends [infer N extends Digit, ...infer R extends Digit[]] ? MulDigits<T, R, AddDigits<MulByDigit<T, N>, MulX10<Acc>>> : Acc;
546
+ //#endregion
547
+ //#region node_modules/hotscript/dist/internals/numbers/impl/multiply.d.ts
548
+ type MulDigitNumbers<T extends DigitNumber, U extends DigitNumber> = MakeDigitNumber<MulSign<Sign<T>, Sign<U>>, MulDigits<Num<T>, Num<U>>>;
549
+ type Mul<T extends number | bigint, U extends number | bigint> = ToNumber<FromDigitNumber<Normalize<MulDigitNumbers<ToDigitNumber<ToString<T>>, ToDigitNumber<ToString<U>>>>>>;
550
+ //#endregion
551
+ //#region node_modules/hotscript/dist/internals/numbers/impl/digits/division.d.ts
552
+ type Rest$1<T extends Digit[]> = T extends [Digit, ...infer R extends Digit[]] ? R : never;
553
+ type TruncateWith<T extends Digit[], U extends Digit[], Acc extends Digit[] = []> = U extends [] ? [T, Acc] : T extends [infer D extends Digit, ...infer DR extends Digit[]] ? TruncateWith<DR, Rest$1<U>, [...Acc, D]> : [T, Acc];
554
+ type DivModByDigit<D extends Digit[], M extends Digit[], Mul extends Digit[] = [0], IterTable extends Digit[] = Digits, NextMul extends Digit[] = AddDigits<M, Mul>, Comp = CompareDigits<D, NextMul>> = IterTable extends [infer Iteration extends Digit, ...infer Next extends Digit[]] ? Comp extends 0 ? {
555
+ Quotient: Next[0];
556
+ Remainder: [0];
557
+ } : Comp extends 1 ? DivModByDigit<D, M, NextMul, Next> : {
558
+ Quotient: Iteration;
559
+ Remainder: SubDigits<D, Mul>;
560
+ } : never;
561
+ /**
562
+ * compute the long division of a number by a divisor
563
+ * @param A the Numerator Cut after M digits
564
+ * @param D the Numerator Cut with M first digits
565
+ * @param M the Divisor
566
+ * @param Q the Quotient
567
+ * @see https://en.wikipedia.org/wiki/Long_division#Algorithm_for_arbitrary_base
568
+ */
569
+ type _DivModDigits<A extends Digit[], D extends Digit[], M extends Digit[], Q extends Digit[] = []> = DivModByDigit<D, M> extends {
570
+ Quotient: infer B extends Digit;
571
+ Remainder: infer R extends Digit[];
572
+ } ? A extends [infer A1 extends Digit, ...infer AR extends Digit[]] ? _DivModDigits<AR, TrimZeros<[...R, A1]>, M, [...Q, B]> : {
573
+ Quotient: [...Q, B];
574
+ Remainder: R;
575
+ } : never;
576
+ type DivDigits<N extends Digit[], M extends Digit[]> = TruncateWith<N, M> extends [infer A extends Digit[], infer D extends Digit[]] ? _DivModDigits<A, D, M>["Quotient"] : never;
577
+ type ModDigits<N extends Digit[], M extends Digit[]> = TruncateWith<N, M> extends [infer A extends Digit[], infer D extends Digit[]] ? _DivModDigits<A, D, M>["Remainder"] : never;
578
+ type DivModDigits<N extends Digit[], M extends Digit[]> = TruncateWith<N, M> extends [infer A extends Digit[], infer D extends Digit[]] ? _DivModDigits<A, D, M> : never;
579
+ //#endregion
580
+ //#region node_modules/hotscript/dist/internals/numbers/impl/division.d.ts
581
+ type DivDigitNumbers<T extends DigitNumber, U extends DigitNumber> = MakeDigitNumber<MulSign<Sign<T>, Sign<U>>, DivDigits<Num<T>, Num<U>>>;
582
+ type Div<T extends number | bigint, U extends number | bigint> = ToNumber<FromDigitNumber<Normalize<DivDigitNumbers<ToDigitNumber<ToString<T>>, ToDigitNumber<ToString<U>>>>>>;
583
+ type ModDigitNumbers<T extends DigitNumber, U extends DigitNumber> = MakeDigitNumber<Sign<T>, ModDigits<Num<T>, Num<U>>>;
584
+ type Mod<T extends number | bigint, U extends number | bigint> = ToNumber<FromDigitNumber<Normalize<ModDigitNumbers<ToDigitNumber<ToString<T>>, ToDigitNumber<ToString<U>>>>>>;
585
+ type DivModDigitNumbers<T extends DigitNumber, U extends DigitNumber, DivMod extends {
586
+ Quotient: Digit[];
587
+ Remainder: Digit[];
588
+ } = DivModDigits<Num<T>, Num<U>>> = {
589
+ Quotient: MakeDigitNumber<MulSign<Sign<T>, Sign<U>>, DivMod["Quotient"]>;
590
+ Remainder: MakeDigitNumber<Sign<T>, DivMod["Remainder"]>;
591
+ };
592
+ type DivMod<T extends number | bigint, U extends number | bigint, DivModNumbers extends {
593
+ Quotient: DigitNumber;
594
+ Remainder: DigitNumber;
595
+ } = DivModDigitNumbers<ToDigitNumber<ToString<T>>, ToDigitNumber<ToString<U>>>> = {
596
+ Quotient: ToNumber<FromDigitNumber<Normalize<DivModNumbers["Quotient"]>>>;
597
+ Remainder: ToNumber<FromDigitNumber<Normalize<DivModNumbers["Remainder"]>>>;
598
+ };
599
+ //#endregion
600
+ //#region node_modules/hotscript/dist/internals/numbers/impl/digits/power.d.ts
601
+ type PowerDigits<T extends Digit[], U extends Digit[], Acc extends Digit[] = [1]> = U extends [0] ? [1] : U extends [1] ? MulDigits<T, Acc> : U extends [infer UN extends Digit, ...infer UR extends Digit[]] ? _DivModDigits<UR, [UN], [2]> extends {
602
+ Quotient: infer Q extends Digit[];
603
+ Remainder: infer R extends Digit[];
604
+ } ? TrimZeros<R> extends [0] ? PowerDigits<MulDigits<T, T>, TrimZeros<Q>, Acc> : PowerDigits<MulDigits<T, T>, TrimZeros<Q>, MulDigits<T, Acc>> : never : Acc;
605
+ //#endregion
606
+ //#region node_modules/hotscript/dist/internals/numbers/impl/power.d.ts
607
+ type PowerSign<S extends "" | "-", U extends DigitNumber> = S extends "-" ? Num<U> extends [...Digit[], 0 | 2 | 4 | 6 | 8] ? "" : "-" : "";
608
+ type PowerDigitNumbers<T extends DigitNumber, U extends DigitNumber> = Sign<U> extends "-" ? MakeDigitNumber<Sign<T>, [0]> : MakeDigitNumber<PowerSign<Sign<T>, U>, PowerDigits<Num<T>, Num<U>>>;
609
+ type Power<T extends number | bigint, U extends number | bigint> = ToNumber<FromDigitNumber<Normalize<PowerDigitNumbers<ToDigitNumber<ToString<T>>, ToDigitNumber<ToString<U>>>>>>;
610
+ //#endregion
611
+ //#region node_modules/hotscript/dist/internals/numbers/Numbers.d.ts
612
+ declare namespace Numbers {
242
613
  /**
243
- * Your drizzle database instance
614
+ * Add two numbers together
615
+ * @description the two numbers can be of different types (bigint or number) and handle really large numbers
616
+ * @param n1 - the first number
617
+ * @param n2 - the second number
618
+ * @returns the sum of the two numbers
619
+ * @example
620
+ * ```ts
621
+ * type T0 = Call<Numbers.Add<1, 2>>; // 3
622
+ * type T1 = Call<Numbers.Add<999999999999999999999999999n, 2>>; // 1000000000000000000000000001n
623
+ * ```
244
624
  */
245
- db: DB;
625
+ export type Add<n1 extends number | bigint | _ | unset = unset, n2 extends number | bigint | _ | unset = unset> = PartialApply<AddFn, [n1, n2]>;
626
+ interface AddFn extends Fn {
627
+ return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? Add<a, b> : never;
628
+ }
246
629
  /**
247
- * A function for providing context for each request based on the incoming HTTP Request.
248
- * The type of the parameter equals the HTTPRequest type of your chosen server.
630
+ * Subtract two numbers
631
+ * @description the two numbers can be of different types (bigint or number) and handle really large numbers
632
+ * @param n1 - the first number
633
+ * @param n2 - the second number to subtract from the first
634
+ * @returns the difference of the two numbers
635
+ * @example
636
+ * ```ts
637
+ * type T0 = Call<Numbers.Sub<1, 2>>; // -1
638
+ * type T1 = Call<Numbers.Sub<1000000000000000000000000001n, 2>>; // 999999999999999999999999999n
639
+ * ```
249
640
  */
250
- context?: ((event: RequestEvent) => Promise<UserContext> | UserContext) | undefined;
641
+ export type Sub<n1 extends number | bigint | _ | unset = unset, n2 extends number | bigint | _ | unset = unset> = PartialApply<SubFn, n2 extends unset ? [unset, n1] : [n1, n2]>;
642
+ interface SubFn extends Fn {
643
+ return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? Sub<a, b> : never;
644
+ }
251
645
  /**
252
- * If you only want to disable query, mutation or subscription default objects, you can do so here
646
+ * Multiply two numbers together
647
+ * @description the two numbers can be of different types (bigint or number) and handle really large numbers
648
+ * @param n1 - the first number
649
+ * @param n2 - the second number
650
+ * @returns the product of the two numbers
651
+ * @example
652
+ * ```ts
653
+ * type T0 = Call<Numbers.Mul<99, 3>>; // 297
654
+ * type T1 = Call<Numbers.Mul<999999999999999999999999999n, 2>>; // 1999999999999999999999999998n
655
+ * ```
253
656
  */
254
- disableDefaultObjects?: {
255
- mutation?: boolean;
256
- subscription?: boolean;
257
- query?: boolean;
258
- };
657
+ export type Mul<n1 extends number | bigint | _ | unset = unset, n2 extends number | bigint | _ | unset = unset> = PartialApply<MulFn, [n1, n2]>;
658
+ interface MulFn extends Fn {
659
+ return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? Mul<a, b> : never;
660
+ }
259
661
  /**
260
- * The actions that are available
662
+ * Divide two numbers
663
+ * @description the two numbers can be of different types (bigint or number) and handle really large numbers
664
+ * @param n1 - the first number
665
+ * @param n2 - the second number to divide the first by
666
+ * @returns the quotient of the two numbers
667
+ * @example
668
+ * ```ts
669
+ * type T0 = Call<Numbers.Div<99, 3>>; // 33
670
+ * type T1 = Call<Numbers.Div<999999999999999999999999999n, 4>>; // 249999999999999999999999999n
671
+ * ```
261
672
  */
262
- actions?: Action[];
673
+ export type Div<n1 extends number | bigint | _ | unset = unset, n2 extends number | bigint | _ | unset = unset> = PartialApply<DivFn, n2 extends unset ? [unset, n1] : [n1, n2]>;
674
+ interface DivFn extends Fn {
675
+ return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? Div<a, b> : never;
676
+ }
263
677
  /**
264
- * Customization for subscriptions. See https://the-guild.dev/graphql/yoga-server/docs/features/subscriptions#distributed-pubsub-for-production
678
+ * Modulo of two numbers
679
+ * @description the two numbers can be of different types (bigint or number) and handle really large numbers
680
+ * @param n1 - the first number
681
+ * @param n2 - the second number to divide the first by
682
+ * @returns the remainder of the two numbers
683
+ * @example
684
+ * ```ts
685
+ * type T0 = Call<Numbers.Mod<100, 3>>; // 1
686
+ * type T1 = Call<Numbers.Mod<999999999999999999999999999n, 4>>; // 3n
687
+ * ```
265
688
  */
266
- subscriptions?: Parameters<typeof createPubSub>;
689
+ export type Mod<n1 extends number | bigint | _ | unset = unset, n2 extends number | bigint | _ | unset = unset> = PartialApply<ModFn, n2 extends unset ? [unset, n1] : [n1, n2]>;
690
+ interface ModFn extends Fn {
691
+ return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? Mod<a, b> : never;
692
+ }
267
693
  /**
268
- * Options passed along to the pothos schema builder.
694
+ * Negate a number
695
+ * @description the number can be of different types (bigint or number) and handle really large numbers
696
+ * @param n - the number to negate
697
+ * @returns the negated number
698
+ * @example
699
+ * ```ts
700
+ * type T0 = Call<Numbers.Negate<1>>; // -1
701
+ * type T1 = Call<Numbers.Negate<999999999999999999999999999n>>; // -999999999999999999999999999n
702
+ * ```
269
703
  */
270
- pothosConfig?: PothosConfig;
704
+ export type Negate<n extends number | bigint | _ | unset = unset> = PartialApply<NegateFn, [n]>;
705
+ interface NegateFn extends Fn {
706
+ return: this["args"] extends [infer a extends number | bigint, ...any] ? Negate<a> : never;
707
+ }
271
708
  /**
272
- * Limits the returned amount when querying lists. Set to null to disable.
273
- * @default 100
709
+ * Absolute value of a number
710
+ * @description the number can be of different types (bigint or number) and handle really large numbers
711
+ * @param n - the number to get the absolute value of
712
+ * @returns the absolute value of the number
713
+ * @example
714
+ * ```ts
715
+ * type T0 = Call<Numbers.Abs<-1>>; // 1
716
+ * type T1 = Call<Numbers.Abs<999999999999999999999999999n>>; // 999999999999999999999999999n
717
+ * ```
274
718
  */
275
- defaultLimit?: number | undefined | null;
719
+ export type Abs<n extends number | bigint | _ | unset = unset> = PartialApply<AbsFn, [n]>;
720
+ export interface AbsFn extends Fn {
721
+ return: this["args"] extends [infer a extends number | bigint, ...any] ? Abs<a> : never;
722
+ }
276
723
  /**
277
- * rumble supports fuzzy search for the query helpers. This enables the users of your API to search for entities via fuzzy search inputs.
278
- * This currently only is supported by postgres databases and will fail if enabled on other dialects.
724
+ * Returns the max between 2 numbers.
725
+ * @param n1 - first number or bigint
726
+ * @param n2 - second number or bigint
727
+ * @returns the maximum values between the two
728
+ * @example
729
+ * ```ts
730
+ * type T0 = Call<Numbers.Max<1, 2>>; // 2
731
+ * ```
732
+ */
733
+ export type Max<n1 extends number | bigint | _ | unset = unset, n2 extends number | bigint | _ | unset = unset> = PartialApply<MaxFn, [n1, n2]>;
734
+ export interface MaxFn extends Fn {
735
+ return: Max<Extract<this["arg0"], number | bigint>, Extract<this["arg1"], number | bigint>>;
736
+ }
737
+ /**
738
+ * Returns the min between 2 numbers.
739
+ * @param n1 - first number or bigint
740
+ * @param n2 - second number or bigint
741
+ * @returns the minimum values between the two
742
+ * @example
743
+ * ```ts
744
+ * type T0 = Call<Numbers.Min<1, 2>>; // 1
745
+ * ```
746
+ */
747
+ export type Min<n1 extends number | bigint | _ | unset = unset, n2 extends number | bigint | _ | unset = unset> = PartialApply<MinFn, [n1, n2]>;
748
+ export interface MinFn extends Fn {
749
+ return: Min<Extract<this["arg0"], number | bigint>, Extract<this["arg1"], number | bigint>>;
750
+ }
751
+ /**
752
+ * Power of a number
753
+ * @description the number can be of different types (bigint or number) and handle really large numbers
754
+ * @param n1 - the base number
755
+ * @param n2 - the exponent
756
+ * @returns the power of the two numbers
757
+ * @example
758
+ * ```ts
759
+ * type T0 = Call<Numbers.Power<2, 128>>; // 340282366920938463463374607431768211456
760
+ * ```
761
+ */
762
+ export type Power<n1 extends number | bigint | _ | unset = unset, n2 extends number | bigint | _ | unset = unset> = PartialApply<PowerFn, n2 extends unset ? [unset, n1] : [n1, n2]>;
763
+ interface PowerFn extends Fn {
764
+ return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? Power<a, b> : never;
765
+ }
766
+ /**
767
+ * Compare two numbers
768
+ * @description the two numbers can be of different types (bigint or number) and handle really large numbers
769
+ * @param n1 - the first number
770
+ * @param n2 - the second number to compare the first to
771
+ * @returns -1 if n1 < n2, 0 if n1 === n2, 1 if n1 > n2
772
+ * @example
773
+ * ```ts
774
+ * type T0 = Call<Numbers.Compare<1, 2>>; // -1
775
+ * type T1 = Call<Numbers.Compare<999999999999999999999999999n, 4>>; // 1
776
+ * type T2 = Call<Numbers.Compare<999999999999999999999999999n, 999999999999999999999999999n>>; // 0
777
+ * ```
778
+ */
779
+ export type Compare<n1 extends number | bigint | _ | unset = unset, n2 extends number | bigint | _ | unset = unset> = PartialApply<CompareFn, n2 extends unset ? [unset, n1] : [n1, n2]>;
780
+ interface CompareFn extends Fn {
781
+ return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? Compare$1<a, b> : never;
782
+ }
783
+ /**
784
+ * Check if two numbers are equal
785
+ * @description the two numbers can be of different types (bigint or number) and handle really large numbers
786
+ * @param n1 - the first number
787
+ * @param n2 - the second number to compare the first to
788
+ * @returns true if n1 === n2, false otherwise
789
+ * @example
790
+ * ```ts
791
+ * type T0 = Call<Numbers.Equal<1, 2>>; // false
792
+ * type T1 = Call<Numbers.Equal<2, 2>>; // true
793
+ * ```
794
+ */
795
+ export type Equal<n1 extends number | bigint | _ | unset = unset, n2 extends number | bigint | _ | unset = unset> = PartialApply<EqualFn, n2 extends unset ? [unset, n1] : [n1, n2]>;
796
+ interface EqualFn extends Fn {
797
+ return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? Equal<a, b> : never;
798
+ }
799
+ /**
800
+ * Check if two numbers are not equal
801
+ * @description the two numbers can be of different types (bigint or number) and handle really large numbers
802
+ * @param n1 - the first number
803
+ * @param n2 - the second number to compare the first to
804
+ * @returns true if n1 !== n2, false otherwise
805
+ * @example
806
+ * ```ts
807
+ * type T0 = Call<Numbers.NotEqual<1, 2>>; // true
808
+ * type T1 = Call<Numbers.NotEqual<2, 2>>; // false
809
+ * ```
810
+ */
811
+ export type NotEqual<n1 extends number | bigint | _ | unset = unset, n2 extends number | bigint | _ | unset = unset> = PartialApply<NotEqualFn, n2 extends unset ? [unset, n1] : [n1, n2]>;
812
+ interface NotEqualFn extends Fn {
813
+ return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? NotEqual<a, b> : never;
814
+ }
815
+ /**
816
+ * Check if a number is less than another
817
+ * @description the two numbers can be of different types (bigint or number) and handle really large numbers
818
+ * @param n1 - the first number
819
+ * @param n2 - the second number to compare the first to
820
+ * @returns true if n1 < n2, false otherwise
821
+ * @example
822
+ * ```ts
823
+ * type T0 = Call<Numbers.LessThan<1, 2>>; // true
824
+ * type T1 = Call<Numbers.LessThan<2, 2>>; // false
825
+ * type T2 = Call<Numbers.LessThan<3, 2>>; // false
826
+ * ```
827
+ */
828
+ export type LessThan<n1 extends number | bigint | _ | unset = unset, n2 extends number | bigint | _ | unset = unset> = PartialApply<LessThanFn, n2 extends unset ? [unset, n1] : [n1, n2]>;
829
+ interface LessThanFn extends Fn {
830
+ return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? LessThan$1<a, b> : never;
831
+ }
832
+ /**
833
+ * Check if a number is less than or equal to another
834
+ * @description the two numbers can be of different types (bigint or number) and handle really large numbers
835
+ * @param n1 - the first number
836
+ * @param n2 - the second number to compare the first to
837
+ * @returns true if n1 <= n2, false otherwise
838
+ * @example
839
+ * ```ts
840
+ * type T0 = Call<Numbers.LessThanOrEqual<1, 2>>; // true
841
+ * type T1 = Call<Numbers.LessThanOrEqual<2, 2>>; // true
842
+ * type T2 = Call<Numbers.LessThanOrEqual<3, 2>>; // false
843
+ * ```
844
+ */
845
+ export type LessThanOrEqual<n1 extends number | bigint | _ | unset = unset, n2 extends number | bigint | _ | unset = unset> = PartialApply<LessThanOrEqualFn, n2 extends unset ? [unset, n1] : [n1, n2]>;
846
+ interface LessThanOrEqualFn extends Fn {
847
+ return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? LessThanOrEqual$1<a, b> : never;
848
+ }
849
+ /**
850
+ * Check if a number is greater than another
851
+ * @description the two numbers can be of different types (bigint or number) and handle really large numbers
852
+ * @param n1 - the first number
853
+ * @param n2 - the second number to compare the first to
854
+ * @returns true if n1 > n2, false otherwise
855
+ * @example
856
+ * ```ts
857
+ * type T0 = Call<Numbers.GreaterThan<1, 2>>; // false
858
+ * type T1 = Call<Numbers.GreaterThan<2, 2>>; // false
859
+ * type T2 = Call<Numbers.GreaterThan<3, 2>>; // true
860
+ * ```
861
+ */
862
+ export type GreaterThan<n1 extends number | bigint | _ | unset = unset, n2 extends number | bigint | _ | unset = unset> = PartialApply<GreaterThanFn, n2 extends unset ? [unset, n1] : [n1, n2]>;
863
+ interface GreaterThanFn extends Fn {
864
+ return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? GreaterThan$1<a, b> : never;
865
+ }
866
+ /**
867
+ * Check if a number is greater than or equal to another
868
+ * @description the two numbers can be of different types (bigint or number) and handle really large numbers
869
+ * @param n1 - the first number
870
+ * @param n2 - the second number to compare the first to
871
+ * @returns true if n1 >= n2, false otherwise
872
+ * @example
873
+ * ```ts
874
+ * type T0 = Call<Numbers.GreaterThanOrEqual<1, 2>>; // false
875
+ * type T1 = Call<Numbers.GreaterThanOrEqual<2, 2>>; // true
876
+ * type T2 = Call<Numbers.GreaterThanOrEqual<3, 2>>; // true
877
+ * ```
878
+ */
879
+ export type GreaterThanOrEqual<n1 extends number | bigint | _ | unset = unset, n2 extends number | bigint | _ | unset = unset> = PartialApply<GreaterThanOrEqualFn, n2 extends unset ? [unset, n1] : [n1, n2]>;
880
+ interface GreaterThanOrEqualFn extends Fn {
881
+ return: this["args"] extends [infer a extends number | bigint, infer b extends number | bigint, ...any] ? GreaterThanOrEqual$1<a, b> : never;
882
+ }
883
+ export {};
884
+ }
885
+ //#endregion
886
+ //#region node_modules/hotscript/dist/internals/std/Std.d.ts
887
+ declare namespace Std {
888
+ type _Pick<a, k extends keyof a> = Pick<a, k>;
889
+ type _Omit<a, k extends PropertyKey> = Omit<a, k>;
890
+ type _Extract<a, b> = Extract<a, b>;
891
+ type _Exclude<a, b> = Exclude<a, b>;
892
+ type _Uppercase<a extends string> = Uppercase<a>;
893
+ type _Lowercase<a extends string> = Lowercase<a>;
894
+ type _Capitalize<a extends string> = Capitalize<a>;
895
+ type _Uncapitalize<a extends string> = Uncapitalize<a>;
896
+ type _Record<k extends PropertyKey, v> = Record<k, v>;
897
+ type _Readonly<a> = Readonly<a>;
898
+ type _Required<a> = Required<a>;
899
+ type _Partial<a> = Partial<a>;
900
+ type _NonNullable<a> = NonNullable<a>;
901
+ }
902
+ //#endregion
903
+ //#region node_modules/hotscript/dist/internals/tuples/Tuples.d.ts
904
+ declare namespace Tuples {
905
+ type HeadImpl<xs> = xs extends readonly [infer head, ...any] ? head : never;
906
+ /**
907
+ * Get an element from a tuple at a given index.
908
+ * @param args[0] - The index of the element to get.
909
+ * @param args[1] - The tuple to get the element from.
910
+ * @param index - The index of the element to get.
911
+ * @param tuple - The tuple to get the element from.
912
+ * @returns The element at the specified index.
913
+ * @example
914
+ * ```ts
915
+ * type T0 = Call<Tuples.At, 1, ["a", "b", "c"]>; // "b"
916
+ * type T1 = Call<Tuples.At<1, ["a", "b", "c"]>>; // "b"
917
+ * type T2 = Call<Tuples.At<1>, ["a", "b", "c"]>; // "b"
918
+ * ```
919
+ */
920
+ export type At<index extends number | _ | unset = unset, tuple = unset> = PartialApply<AtFn, [index, tuple]>;
921
+ interface AtFn extends Fn {
922
+ return: Extract<this["arg1"], readonly any[]>[Extract<this["arg0"], number>];
923
+ }
924
+ type IsEmptyImpl<tuple extends unknown[]> = [] extends tuple ? true : false;
925
+ interface IsEmptyFn extends Fn {
926
+ return: IsEmptyImpl<Extract<this["arg0"], unknown[]>>;
927
+ }
928
+ /**
929
+ * Check if a tuple is empty.
930
+ * @param args[0] - The tuple to check.
931
+ * @param tuple - The tuple to check.
932
+ * @returns `true` if the tuple is empty, `false` otherwise.
933
+ * @example
934
+ * ```ts
935
+ * type T0 = Call<Tuples.IsEmpty, []>; // true
936
+ * type T1 = Call<Tuples.IsEmpty, [1, 2, 3]>; // false
937
+ * type T2 = Call<Tuples.IsEmpty<[]>>; // true
938
+ * ```
939
+ */
940
+ export type IsEmpty<tuple = unset> = PartialApply<IsEmptyFn, [tuple]>;
941
+ interface ToUnionFn extends Fn {
942
+ return: this["arg0"][number];
943
+ }
944
+ /**
945
+ * Convert a tuple to a union of its elements.
946
+ * @param tuple - The tuple to convert.
947
+ * @returns A union of the tuple's elements.
948
+ * @example
949
+ * ```ts
950
+ * type T0 = Call<Tuples.ToUnion, [1, 2, 3]>; // 1 | 2 | 3
951
+ * type T1 = Call<Tuples.ToUnion<[1, 2, 3]>>; // 1 | 2 | 3
952
+ * ```
953
+ */
954
+ export type ToUnion<tuple extends readonly any[] | _ | unset = unset> = PartialApply<ToUnionFn, [tuple]>;
955
+ /**
956
+ * `Unions.ToIntersection` turns a tuple into an intersection type.
957
+ * @param tuple - any tuple.
958
+ * @returns an intersection of all member of the tuple
959
+ * @example
960
+ * ```ts
961
+ * type T0 = Call<Unions.ToIntersection, [{a: string}, {b: number}]>; // {a: string} & {b: number}
962
+ * ```
963
+ */
964
+ export type ToIntersection<tuple = unset> = PartialApply<ToIntersectionFn, [tuple]>;
965
+ interface ToIntersectionFn extends Fn {
966
+ return: this["args"] extends [infer tuples extends readonly any[], ...any] ? Call<Tuples.Reduce<IntersectFn, unknown, tuples>> : never;
967
+ }
968
+ interface IntersectFn extends Fn {
969
+ return: this["arg0"] & this["arg1"];
970
+ }
971
+ /**
972
+ * Returns the first element of a tuple.
973
+ * @params args[0] - A tuple.
974
+ * @return The first element of a tuple.
975
+ * @example
976
+ * ```ts
977
+ * type T0 = Call<T.Head,[1, 2, 3]>; // 1
978
+ * type T1 = Call<T.Head,[]>; // never
979
+ * type T2 = Call<T.Head,[1]>; // 1
980
+ * ```
981
+ */
982
+ export type Head<tuple extends readonly any[] | unset = unset> = PartialApply<HeadFn, [tuple]>;
983
+ interface HeadFn extends Fn {
984
+ return: HeadImpl<this["arg0"]>;
985
+ }
986
+ type TailImpl<xs> = xs extends readonly [any, ...infer tail] ? tail : [];
987
+ /**
988
+ * Returns a tuple with all elements except the first.
989
+ * @params args[0] - A tuple.
990
+ * @return A tuple with all elements except the first.
991
+ * @example
992
+ * ```ts
993
+ * type T0 = Call<T.Tail,[1, 2, 3]>; // [2, 3]
994
+ * type T1 = Call<T.Tail,[]>; // []
995
+ * type T2 = Call<T.Tail,[1]>; // []
996
+ * ```
997
+ */
998
+ export type Tail<tuple extends readonly any[] | unset = unset> = PartialApply<TailFn, [tuple]>;
999
+ export interface TailFn extends Fn {
1000
+ return: TailImpl<this["arg0"]>;
1001
+ }
1002
+ type LastImpl<xs> = xs extends readonly [...any, infer last] ? last : never;
1003
+ /**
1004
+ * Returns the last element of a tuple.
1005
+ * @params args[0] - A tuple.
1006
+ * @return The last element of a tuple.
1007
+ * @example
1008
+ * ```ts
1009
+ * type T0 = Call<T.Last,[1, 2, 3]>; // 3
1010
+ * type T1 = Call<T.Last,[]>; // never
1011
+ * type T2 = Call<T.Last,[1]>; // 1
1012
+ * ```
1013
+ */
1014
+ export type Last<tuple extends readonly any[] | unset = unset> = PartialApply<LastFn, [tuple]>;
1015
+ export interface LastFn extends Fn {
1016
+ return: LastImpl<this["arg0"]>;
1017
+ }
1018
+ /**
1019
+ * Apply a function to each element of a tuple and return a new tuple with the results.
1020
+ * @params args[0] - A tuple of elements to be transformed.
1021
+ * @param fn - A function that takes an element of the tuple and transforms it.
1022
+ * @returns A tuple with the results of applying the function to each element of the input tuple.
1023
+ * @example
1024
+ * ```ts
1025
+ * type T0 = Call<T.Map<S.ToString>,[1,2,3]>; // ["1","2","3"]
1026
+ * type T1 = Call<T.Map<S.ToString>,[]>; // []
1027
+ * ```
1028
+ */
1029
+ export type Map<fn extends Fn | unset | _ = unset, tuple extends readonly any[] | unset = unset> = PartialApply<MapFn, [fn, tuple]>;
1030
+ interface MapFn extends Fn {
1031
+ return: this["args"] extends [infer fn extends Fn, infer tuple extends unknown[]] ? { [key in keyof tuple]: Call<fn, tuple[key]> } : never;
1032
+ }
1033
+ interface FlatMapReducer<fn extends Fn> extends Fn {
1034
+ return: this["args"] extends [infer acc extends any[], infer item] ? [...acc, ...Extract<Call<fn, item>, readonly any[]>] : never;
1035
+ }
1036
+ /**
1037
+ * Apply a function to each element of a tuple and return a new tuple with the results flattened by one level.
1038
+ * @params args[0] - A tuple of elements to be transformed.
1039
+ * @param fn - A function that takes an element of the tuple and transforms it.
1040
+ * @returns A tuple with the results of applying the function to each element of the input tuple flattened by one level.
1041
+ * @example
1042
+ * ```ts
1043
+ * type T0 = Call<T.FlatMap<S.ToTuple>,["hello","world"]>; // ["h","e","l","l","o","w","o","r","l","d"]
1044
+ * type T1 = Call<T.FlatMap<S.ToTuple>,[]>; // []
1045
+ * ```
1046
+ */
1047
+ export type FlatMap<fn extends Fn, tuple extends readonly any[] | unset = unset> = PartialApply<FlatMapFn, [fn, tuple]>;
1048
+ interface FlatMapFn extends Fn {
1049
+ return: ReduceImpl<FlatMapReducer<Extract<this["arg0"], Fn>>, [], this["arg1"]>;
1050
+ }
1051
+ type ReduceImpl<fn extends Fn, acc, xs> = xs extends [infer first, ...infer rest] ? ReduceImpl<fn, Call<fn, acc, first>, rest> : xs extends readonly [infer first, ...infer rest] ? ReduceImpl<fn, Call<fn, acc, first>, rest> : acc;
1052
+ /**
1053
+ * Apply a reducer function to each element of a tuple starting from the first and return the accumulated result.
1054
+ * @params args[0] - A tuple of elements to be transformed.
1055
+ * @params fn - A reducer function that takes the accumulated result and the current element and returns a new accumulated result.
1056
+ * @params init - The initial value of the accumulated result.
1057
+ * @returns The accumulated result.
1058
+ * @example
1059
+ * ```ts
1060
+ * type T0 = Call<T.Reduce<N.Add,0>,[1,2,3]>; // 6
1061
+ * type T1 = Call<T.Reduce<N.Add,0>,[]>; // 0
1062
+ * ```
1063
+ */
1064
+ export type Reduce<fn extends Fn, init = unset, tuple extends readonly any[] | unset = unset> = PartialApply<ReduceFn, [fn, init, tuple]>;
1065
+ interface ReduceFn extends Fn {
1066
+ return: ReduceImpl<Extract<this["arg0"], Fn>, this["arg1"], this["arg2"]>;
1067
+ }
1068
+ type ReverseImpl<tuple> = any[] extends tuple ? tuple : ReverseRecImpl<tuple, []>;
1069
+ type ReverseRecImpl<tuple, acc extends unknown[]> = tuple extends [infer first, ...infer rest] ? ReverseRecImpl<rest, [first, ...acc]> : acc;
1070
+ /**
1071
+ * Reverse a tuple.
1072
+ * @params args[0] - A tuple.
1073
+ * @return Reversed tuple.
1074
+ * @example
1075
+ * ```ts
1076
+ * type T0 = Call<T.Reverse,[1,2,3]>; // [3,2,1]
1077
+ * ```
1078
+ */
1079
+ export type Reverse<tuple extends readonly unknown[] | unset = unset> = PartialApply<ReverseFn, [tuple]>;
1080
+ interface ReverseFn extends Fn {
1081
+ return: ReverseImpl<this["arg0"]>;
1082
+ }
1083
+ type ReduceRightImpl<xs, acc, fn extends Fn> = xs extends [...infer rest, infer last] ? ReduceRightImpl<rest, Call<fn, acc, last>, fn> : acc;
1084
+ /**
1085
+ * Apply a reducer function to each element of a tuple starting from the last and return the accumulated result.
1086
+ * @params args[0] - A tuple of elements to be transformed.
1087
+ * @params fn - A reducer function that takes the accumulated result and the current element and returns a new accumulated result.
1088
+ * @params init - The initial value of the accumulated result.
1089
+ * @returns The accumulated result.
1090
+ * @example
1091
+ * ```ts
1092
+ * type T0 = Call<T.ReduceRight<N.Add,0>,[1,2,3]>; // 6
1093
+ * type T1 = Call<T.ReduceRight<N.Add,0>,[]>; // 0
1094
+ * ```
1095
+ */
1096
+ export type ReduceRight<fn extends Fn, init = unset, tuple extends readonly any[] | unset = unset> = PartialApply<ReduceRightFn, [fn, init, tuple]>;
1097
+ interface ReduceRightFn extends Fn {
1098
+ return: ReduceRightImpl<this["arg2"], this["arg1"], Extract<this["arg0"], Fn>>;
1099
+ }
1100
+ interface FilterReducer<fn extends Fn> extends Fn {
1101
+ return: this["args"] extends [infer acc extends any[], infer item] ? Call<fn, item> extends true ? [...acc, item] : acc : never;
1102
+ }
1103
+ /**
1104
+ * Apply a predicate function to each element of a tuple and return a new tuple with the elements that satisfy the predicate.
1105
+ * @params args[0] - A tuple of elements to be filtered.
1106
+ * @param fn - A predicate function that takes an element of the tuple and returns a boolean.
1107
+ * @returns A tuple with the elements that satisfy the predicate.
1108
+ * @example
1109
+ * ```ts
1110
+ * type T0 = Call<T.Filter<B.Extends<string>>,[1,2,"3"]>; // ["3"]
1111
+ * type T1 = Call<T.Filter<B.Extends<string>>,[]>; // []
1112
+ * ```
1113
+ */
1114
+ export type Filter<fn extends Fn, tuple extends readonly any[] | unset = unset> = PartialApply<FilterFn, [fn, tuple]>;
1115
+ export interface FilterFn extends Fn {
1116
+ return: ReduceImpl<FilterReducer<Extract<this["arg0"], Fn>>, [], this["arg1"]>;
1117
+ }
1118
+ type FindImpl<xs, fn extends Fn, index extends any[] = []> = xs extends [infer first, ...infer rest] ? Call<fn, first, index["length"]> extends true ? first : FindImpl<rest, fn, [...index, any]> : never;
1119
+ /**
1120
+ * Apply a predicate function to each element of a tuple and return the first element that satisfies the predicate.
1121
+ * @params args[0] - A tuple of elements to be filtered.
1122
+ * @param fn - A predicate function that takes an element of the tuple and returns a boolean.
1123
+ * @returns The first element that satisfies the predicate.
1124
+ * @example
1125
+ * ```ts
1126
+ * type T0 = Call<T.Find<B.Extends<string>>,[1,2,"3",4,"5"]>; // "3"
1127
+ * type T1 = Call<T.Find<B.Extends<string>>,[1,2]>; // never
1128
+ * ```
1129
+ */
1130
+ export type Find<fn extends Fn, tuple extends readonly any[] | unset = unset> = PartialApply<FindFn, [fn, tuple]>;
1131
+ export interface FindFn extends Fn {
1132
+ return: FindImpl<this["arg1"], Extract<this["arg0"], Fn>>;
1133
+ }
1134
+ /**
1135
+ * Sum the elements of a tuple of numbers.
1136
+ * @params args[0] - A tuple of numbers.
1137
+ * @returns The sum of the elements of the tuple.
1138
+ * @example
1139
+ * ```ts
1140
+ * type T0 = Call<T.Sum,[1,2,3]>; // 6
1141
+ * type T1 = Call<T.Sum,[]>; // 0
1142
+ * ```
1143
+ */
1144
+ export type Sum<tuple extends readonly any[] | unset = unset> = PartialApply<SumFn, [tuple]>;
1145
+ interface SumFn extends Fn {
1146
+ return: ReduceImpl<Numbers.Add, 0, this["arg0"]>;
1147
+ }
1148
+ type DropImpl<xs extends readonly any[], n extends any[]> = Iterator$1.Get<n> extends 0 ? xs : xs extends readonly [any, ...infer tail] ? DropImpl<tail, Iterator$1.Prev<n>> : [];
1149
+ /**
1150
+ * Drop the first n elements of a tuple.
1151
+ * @params args[0] - A tuple of elements.
1152
+ * @params n - The number of elements to drop.
1153
+ * @returns A tuple with the first n elements dropped.
1154
+ * @example
1155
+ * ```ts
1156
+ * type T0 = Call<T.Drop<2>,[1,2,3,4]>; // [3,4]
1157
+ * type T1 = Call<T.Drop<2>,[1,2]>; // []
1158
+ * type T2 = Call<T.Drop<2>,[]>; // []
1159
+ * ```
1160
+ */
1161
+ export type Drop<n extends number | unset | _ = unset, tuple = unset> = PartialApply<DropFn, [n, tuple]>;
1162
+ export interface DropFn extends Fn {
1163
+ return: this["args"] extends [infer N extends number, infer T extends readonly any[]] ? DropImpl<T, Iterator$1.Iterator<Numbers>> : never;
1164
+ }
1165
+ type TakeImpl<xs extends readonly any[], it extends any[], output extends any[] = []> = Iterator$1.Get<it> extends 0 ? output : xs extends readonly [infer head, ...infer tail] ? TakeImpl<tail, Iterator$1.Prev<it>, [...output, head]> : output;
1166
+ /**
1167
+ * Take the first n elements of a tuple.
1168
+ * @params args[0] - A tuple of elements.
1169
+ * @params n - The number of elements to take.
1170
+ * @returns A tuple with the first n elements.
1171
+ * @example
1172
+ * ```ts
1173
+ * type T0 = Call<T.Take<2>,[1,2,3,4]>; // [1,2]
1174
+ * type T1 = Call<T.Take<2>,[1,2]>; // [1,2]
1175
+ * type T2 = Call<T.Take<2>,[]>; // []
1176
+ * ```
1177
+ */
1178
+ export type Take<n extends number | unset | _ = unset, tuple = unset> = PartialApply<TakeFn, [n, tuple]>;
1179
+ interface TakeFn extends Fn {
1180
+ return: this["args"] extends [infer N extends number, infer T extends readonly any[]] ? TakeImpl<T, Iterator$1.Iterator<Numbers>> : never;
1181
+ }
1182
+ type TakeWhileImpl<xs extends readonly any[], fn extends Fn, index extends any[] = [], output extends any[] = []> = xs extends readonly [infer head, ...infer tail] ? Call<fn, head, index["length"]> extends true ? TakeWhileImpl<tail, fn, [...index, any], [...output, head]> : output : output;
1183
+ /**
1184
+ * Take the first elements of a tuple that satisfy a predicate function.
1185
+ * @params args[0] - A tuple of elements.
1186
+ * @param fn - A predicate function that takes an element of the tuple and returns a boolean.
1187
+ * @returns A tuple with the first elements that satisfy the predicate.
1188
+ * @example
1189
+ * ```ts
1190
+ * type T0 = Call<T.TakeWhile<B.Extends<number>>,[1,2,"3",4,"5"]>; // [1,2]
1191
+ * type T1 = Call<T.TakeWhile<B.Extends<number>>,["1", 2]>; // []
1192
+ * ```
1193
+ */
1194
+ export type TakeWhile<fn extends Fn, tuple = unset> = PartialApply<TakeWhileFn, [fn, tuple]>;
1195
+ export interface TakeWhileFn extends Fn {
1196
+ return: TakeWhileImpl<Extract<this["arg1"], readonly any[]>, Extract<this["arg0"], Fn>>;
1197
+ }
1198
+ /**
1199
+ * Check if a tuple staisfies a predicate function for at least one element.
1200
+ * @params args[0] - A tuple of elements.
1201
+ * @param fn - A predicate function that takes an element of the tuple and returns a boolean.
1202
+ * @returns A boolean indicating whether the predicate is satisfied by at least one element.
1203
+ * @example
1204
+ * ```ts
1205
+ * type T0 = Call<T.Some<B.Extends<number>>,[1,2,"3",4,"5"]>; // true
1206
+ * type T1 = Call<T.Some<B.Extends<number>>,["1", "2"]>; // false
1207
+ * ```
1208
+ */
1209
+ export type Some<fn extends Fn, tuple = unset> = PartialApply<SomeFn, [fn, tuple]>;
1210
+ export interface SomeFn extends Fn {
1211
+ return: true extends Call<Tuples.Map<Extract<this["arg0"], Fn>>, this["arg1"]>[number] ? true : false;
1212
+ }
1213
+ /**
1214
+ * Check if a tuple staisfies a predicate function for all elements.
1215
+ * @params args[0] - A tuple of elements.
1216
+ * @param fn - A predicate function that takes an element of the tuple and returns a boolean.
1217
+ * @returns A boolean indicating whether the predicate is satisfied by all elements.
1218
+ * @example
1219
+ * ```ts
1220
+ * type T0 = Call<T.Every<B.Extends<number>>,[1,2,"3",4,"5"]>; // false
1221
+ * type T1 = Call<T.Every<B.Extends<number>>,["1", "2"]>; // false
1222
+ * type T2 = Call<T.Every<B.Extends<number>>,[1, 2]>; // true
1223
+ * ```
1224
+ */
1225
+ export type Every<fn extends Fn, tuple = unset> = PartialApply<EveryFn, [fn, tuple]>;
1226
+ export interface EveryFn extends Fn {
1227
+ return: false extends Call<Tuples.Map<Extract<this["arg0"], Fn>>, this["arg1"]>[number] ? false : true;
1228
+ }
1229
+ type SortImpl<xs extends any[], predicateFn extends Fn> = xs extends [infer head, ...infer tail] ? Call<Tuples.Partition<PartialApply<predicateFn, [_, head]>, tail>> extends [infer left extends any[], infer right extends any[]] ? [...SortImpl<left, predicateFn>, head, ...SortImpl<right, predicateFn>] : never : [];
1230
+ /**
1231
+ * Sort a tuple.
1232
+ * @param args[0] - The tuple to sort.
1233
+ * @param predicateFn - The predicate function to use for sorting. should compare 2 items and return a boolean.
1234
+ * @returns The sorted tuple.
1235
+ * @example
1236
+ * ```ts
1237
+ * type T0 = Call<Tuples.Sort,[3,2,1]>; // [1,2,3]
1238
+ * type T1 = Call<Tuples.Sort<Strings.LessThan>,["b","c","a"]>; // ["a","b","c"]
1239
+ * ```
1240
+ */
1241
+ export interface Sort<predicateFn extends Fn = Numbers.LessThanOrEqual> extends Fn {
1242
+ return: this["args"] extends [infer xs extends any[]] ? SortImpl<xs, predicateFn> : never;
1243
+ }
1244
+ interface JoinReducer<sep extends string> extends Fn {
1245
+ return: this["args"] extends [infer acc extends Stringifiable, infer item extends Stringifiable] ? `${acc extends "" ? "" : `${acc}${sep}`}${item}` : never;
1246
+ }
1247
+ /**
1248
+ * Join a tuple into a single string.
1249
+ * @param args[0] - The tuple to join.
1250
+ * @param sep - The separator to join the strings with.
1251
+ * @returns The joined string.
1252
+ * @example
1253
+ * ```ts
1254
+ * type T0 = Call<Tuples.Join<",">,["a","b","c"]>; // "a,b,c"
1255
+ * type T1 = Call<Tuples.Join,",",["a","b","c"]>; // "a,b,c"
1256
+ * type T2 = Call<Tuples.Join<",",["a","b","c"]>>; // "a,b,c"
1257
+ * ```
1258
+ */
1259
+ export type Join<Sep extends string | _ | unset = unset, Tuple = unset> = PartialApply<JoinFn, [Sep, Tuple]>;
1260
+ interface JoinFn extends Fn {
1261
+ return: this["args"] extends [infer Sep extends string, infer Tuple] ? ReduceImpl<JoinReducer<Sep>, "", Tuple> : never;
1262
+ }
1263
+ /**
1264
+ * Adds a new element to the start of a tuple
1265
+ * @param args[0] - The tuple to update.
1266
+ * @param element - The element to add to our tuple
1267
+ * @returns The updated tuple.
1268
+ * @example
1269
+ * ```ts
1270
+ * type T0 = Call<Tuples.Prepend<"new">, ["a", "b", "c"]>; // ["new", "a", "b", "c"]
1271
+ * ```
1272
+ */
1273
+ export type Prepend<element = unset, tuple = unset> = PartialApply<PrependFn, [element, tuple]>;
1274
+ interface PrependFn extends Fn {
1275
+ return: this["args"] extends [infer element, infer tuple extends any[]] ? [element, ...tuple] : never;
1276
+ }
1277
+ /**
1278
+ * Adds a new element to the end of a tuple
1279
+ * @param args[0] - The tuple to update.
1280
+ * @param element - The element to add to our tuple
1281
+ * @returns The updated tuple.
1282
+ * @example
1283
+ * ```ts
1284
+ * type T0 = Call<Tuples.Append<"new">, ["a", "b", "c"]>; // ["a", "b", "c", "new"]
1285
+ * ```
1286
+ */
1287
+ export type Append<element = unset, tuple = unset> = PartialApply<AppendFn, [element, tuple]>;
1288
+ interface AppendFn extends Fn {
1289
+ return: this["args"] extends [infer element, infer tuple extends any[]] ? [...tuple, element] : never;
1290
+ }
1291
+ /**
1292
+ * Concatenate two tuples together
1293
+ * @param tuple1 - A list of types
1294
+ * @param tuple2 - Another list of types
1295
+ * @returns [...tuple1, ...tuple2]
1296
+ * @example
1297
+ * ```ts
1298
+ * type T0 = Call<Tuples.Concat, [1], [2, 3]>; // [1, 2, 3]
1299
+ * ```
1300
+ */
1301
+ export type Concat<tuple1 = unset, tuple2 = unset> = PartialApply<ConcatFn, [tuple1, tuple2]>;
1302
+ interface ConcatFn extends Fn {
1303
+ return: this["args"] extends [infer t1 extends readonly any[], infer t2 extends readonly any[], ...any] ? [...t1, ...t2] : never;
1304
+ }
1305
+ /**
1306
+ * Splits a tuple into two groups based on a predicate:
1307
+ * - The first group contains elements predicate returns true for.
1308
+ * - The second group contains elements predicate returns false for.
279
1309
  *
280
- * Please note that this will install the pg_trgm extension on startup if your database does not have it already installed.
281
- * https://www.postgresql.org/docs/current/pgtrgm.html
1310
+ * @param predicate - The tuple to update.
1311
+ * @param element - The element to add to our tuple
1312
+ * @returns - a tuple containing two tuples: one for each groupe
1313
+ * @example
1314
+ * ```ts
1315
+ * type T0 = Call<T.Partition<B.Extends<number>>, [1, "a", 2, "b", 3, "c"]>;
1316
+ * // ^? [[1, 2, 3], ["a", "b", "c"]]
1317
+ * ```
282
1318
  */
283
- search?: {
284
- /**
285
- * Whether search is enabled
286
- */
287
- enabled?: boolean;
288
- /**
289
- * The cuttoff factor to reduce the amount of returned results.
290
- * Defaults to 0.3. Lower values will return more results.
291
- */
292
- threshold?: number;
1319
+ export type Partition<fn extends Fn, tuple = unset> = PartialApply<PartitionFn, [fn, tuple]>;
1320
+ type PartitionImpl<fn extends Fn, tuple extends any[], left extends any[] = [], right extends any[] = []> = tuple extends [infer first, ...infer rest] ? Call<fn, first> extends true ? PartitionImpl<fn, rest, [...left, first], right> : PartitionImpl<fn, rest, left, [...right, first]> : [left, right];
1321
+ interface PartitionFn extends Fn {
1322
+ return: PartitionImpl<Extract<this["arg0"], Fn>, Extract<this["arg1"], any[]>>;
1323
+ }
1324
+ /**
1325
+ * SplitAt takes an index and a tuple, splits the tuple
1326
+ * at the provided index and returns the list of elements
1327
+ * before this index and the list of elements after this
1328
+ * index as a [before[], after[]] tuple.
1329
+ *
1330
+ * @param index - the index at which to split the list
1331
+ * @param tuple - The list to split
1332
+ * @returns A [before[], after[]] tuple.
1333
+ * @example
1334
+ * ```ts
1335
+ * type T0 = Call<Tuples.SplitAt<2>, [1, 2, 3, 4]>; // [[1, 2], [3, 4]]
1336
+ * type T1 = Call<Tuples.SplitAt<2>, [1]>; // [[1], []]
1337
+ * ```
1338
+ */
1339
+ export type SplitAt<index extends number | unset | _ = unset, tuple extends unknown[] | unset | _ = unset> = PartialApply<SplitAtFn, [index, tuple]>;
1340
+ export interface SplitAtFn extends Fn {
1341
+ return: this["args"] extends [infer index extends number, infer tuple extends any[], ...any] ? [TakeImpl<tuple, Iterator$1.Iterator<index>>, DropImpl<tuple, Iterator$1.Iterator<index>>] : never;
1342
+ }
1343
+ interface ZipWithMapper<fn extends Fn, arrs extends unknown[][]> extends Fn {
1344
+ return: this["args"] extends [infer Index extends number, ...any] ? Apply<fn, Call<Tuples.Map<Tuples.At<Index>, arrs>>> : never;
1345
+ }
1346
+ interface ZipWithFn<fn extends Fn> extends Fn {
1347
+ return: this["args"] extends infer arrays extends unknown[][] ? Pipe<arrays, [Tuples.Map<Objects.Get<"length">>, Tuples.Min, Numbers.Abs, Numbers.Sub<_, 1>, Tuples.Range<0, _>, Tuples.Map<ZipWithMapper<fn, arrays>>]> : never;
1348
+ }
1349
+ /**
1350
+ * Zip two tuples together.
1351
+ * @param args[0] - The first tuple to zip.
1352
+ * @param args[1] - The second tuple to zip.
1353
+ * @param arr1 - The first tuple to zip.
1354
+ * @param arr2 - The second tuple to zip.
1355
+ * @returns The zipped tuple.
1356
+ * @example
1357
+ * ```ts
1358
+ * type T0 = Call<Tuples.Zip, [1, 2, 3], [10, 2, 5]>; // [[1, 10], [2, 2], [3, 5]]
1359
+ * type T1 = Call<Tuples.Zip<[1, 2, 3], [10, 2, 5]>>; // [[1, 10], [2, 2], [3, 5]]
1360
+ * ```
1361
+ */
1362
+ export type Zip<arr0 extends unknown[] | _ | unset = unset, arr1 extends unknown[] | _ | unset = unset, arr2 extends unknown[] | _ | unset = unset, arr3 extends unknown[] | _ | unset = unset, arr4 extends unknown[] | _ | unset = unset, arr5 extends unknown[] | _ | unset = unset, arr6 extends unknown[] | _ | unset = unset, arr7 extends unknown[] | _ | unset = unset, arr8 extends unknown[] | _ | unset = unset, arr9 extends unknown[] | _ | unset = unset> = PartialApply<ZipWithFn<args$1>, [arr0, arr1, arr2, arr3, arr4, arr5, arr6, arr7, arr8, arr9]>;
1363
+ /**
1364
+ * Zip two tuples together using a function.
1365
+ * @description The function should take a 2 elements and return a value.
1366
+ * Using the identity function will return a 2-tuple and have the same effect as `Zip`.
1367
+ * @param args[0] - The first tuple to zip.
1368
+ * @param args[1] - The second tuple to zip.
1369
+ * @param fn - The function to use to zip the tuples.
1370
+ * @param arr1 - The first tuple to zip.
1371
+ * @param arr2 - The second tuple to zip.
1372
+ * @returns The zipped tuple.
1373
+ * @example
1374
+ * ```ts
1375
+ * type T0 = Call<Tuples.ZipWith<args>, [1, 2, 3], [10, 2, 5]>; // [[1, 10], [2, 2], [3, 5]]
1376
+ * type T1 = Call<Tuples.ZipWith<args, [1, 2, 3], [10, 2, 5]>>; // [[1, 10], [2, 2], [3, 5]]
1377
+ * type T3 = Call<Tuples.ZipWith<N.Add>, [1, 2, 3], [10, 2, 5]>; // [11, 4, 8]
1378
+ * ```
1379
+ */
1380
+ export type ZipWith<fn extends Fn, arr0 extends unknown[] | _ | unset = unset, arr1 extends unknown[] | _ | unset = unset, arr2 extends unknown[] | _ | unset = unset, arr3 extends unknown[] | _ | unset = unset, arr4 extends unknown[] | _ | unset = unset, arr5 extends unknown[] | _ | unset = unset, arr6 extends unknown[] | _ | unset = unset, arr7 extends unknown[] | _ | unset = unset, arr8 extends unknown[] | _ | unset = unset, arr9 extends unknown[] | _ | unset = unset> = PartialApply<ZipWithFn<fn>, [arr0, arr1, arr2, arr3, arr4, arr5, arr6, arr7, arr8, arr9]>;
1381
+ /**
1382
+ * Group values in a tuple into an object, using a predicate
1383
+ * to compute the key of each group.
1384
+ * @param fn - function applied to all values in the tuple to get a key.
1385
+ * @param tuple - A list of element
1386
+ * @returns an object containing a list of element for each key.
1387
+ * @example
1388
+ * ```ts
1389
+ * interface IsNumber extends Fn {
1390
+ * return: this["arg0"] extends number ? true : false;
1391
+ * }
1392
+ *
1393
+ * type T0 = Call<Tuples.GroupBy<IsNumber>, [1, "str", 2]>;
1394
+ * // ^? { true: [1, 2], false: ["str"] }
1395
+ * type T2 = Call<Tuples.GroupBy<Strings.StartsWith<"a">>, ["alice", "bob", "carl"]>;
1396
+ * // ^? { true: ["alice"], false: ["bob", "carl"] }
1397
+ * ```
1398
+ */
1399
+ export interface GroupBy<fn extends Fn> extends Fn {
1400
+ return: GroupByImpl<this["arg0"], fn>;
1401
+ }
1402
+ type GroupByImplRec<xs, fn extends Fn, acc = {}> = xs extends [infer first, ...infer rest] ? Call<fn, first> extends infer key extends PropertyKey ? GroupByImplRec<rest, fn, Std._Omit<acc, key> & { [K in key]: [...(key extends keyof acc ? Extract<acc[key], readonly any[]> : []), first] }> : never : acc;
1403
+ export type GroupByImpl<xs, fn extends Fn> = Prettify$1<GroupByImplRec<xs, fn>>;
1404
+ /**
1405
+ * Range takes a `start` and an `end` integer and produces
1406
+ * a tuple containing integer ranging from `start` to `end`
1407
+ * @param start - the start of the range (included)
1408
+ * @param end - the end of the range (included)
1409
+ * @returns a tuple of integers
1410
+ * @example
1411
+ * ```ts
1412
+ * type T0 = Call<Tuples.Range<3>, 7>; // [3, 4, 5, 6, 7]
1413
+ * type T1 = Call<Tuples.Range<_, 10>, 5>; // [5, 6, 7, 8, 9, 10]
1414
+ * type T3 = Call<Tuples.Range< -2, 2>, 5>; // [-2, 1, 0, 1, 2]
1415
+ * type T4 = Call<Tuples.Range< -5, -2>, 5>; // [-5, -4, -3, -2]
1416
+ * ```
1417
+ */
1418
+ export type Range<start extends number | _ | unset = unset, end extends number | _ | unset = unset> = PartialApply<RangeFn, [start, end]>;
1419
+ interface RangeFn extends Fn {
1420
+ return: this["args"] extends [infer start extends number, infer end extends number] ? Call<Numbers.LessThanOrEqual, start, end> extends true ? Pipe<start, [Numbers.Sub<end, _>, Numbers.Add<1>, Numbers.Abs]> extends infer length extends number ? RangeImpl<start, length> : never : never : never;
1421
+ }
1422
+ type RangeImpl<start extends number, length extends number, output extends any[] = []> = output["length"] extends length ? output : RangeImpl<start, length, [...output, Call<Numbers.Add<start, output["length"]>>]>;
1423
+ /**
1424
+ * Returns the length of a tuple
1425
+ * @param tuple - any tuple
1426
+ * @returns a number
1427
+ * @example
1428
+ * ```ts
1429
+ * type T0 = Call<Tuples.Length, [1, 2, 3]>; // 3
1430
+ * type T1 = Call<Tuples.Length, []>; 0
1431
+ * type T2 = Call<Tuples.Length, ['a']>; 1
1432
+ * ```
1433
+ */
1434
+ export type Length<tuple extends readonly any[] | _ | unset = unset> = PartialApply<LengthFn, [tuple]>;
1435
+ interface LengthFn extends Fn {
1436
+ return: this["args"] extends [infer tuple extends readonly any[], ...any] ? tuple["length"] : never;
1437
+ }
1438
+ /**
1439
+ * Takes a tuple of numbers and returns the smallest one
1440
+ * @param tuple - a tuple of numbers
1441
+ * @returns a number
1442
+ * @example
1443
+ * ```ts
1444
+ * type T0 = Call<Tuples.Min, [1, 2, 3]>; // 1
1445
+ * type T1 = Call<Tuples.Min, [-1, -2, -3]>; // -3
1446
+ * type T2 = Call<Tuples.Min, []>; never
1447
+ * ```
1448
+ */
1449
+ export type Min<tuple extends readonly any[] | _ | unset = unset> = PartialApply<MinFn, [tuple]>;
1450
+ interface MinFn extends Fn {
1451
+ return: this["args"] extends [infer tuple extends readonly (number | bigint)[], ...any] ? MinImpl<tuple> : never;
1452
+ }
1453
+ type MinImpl<xs, min extends number | bigint = never> = xs extends [infer first extends number | bigint, ...infer rest] ? MinImpl<rest, [min] extends [never] ? first : Min<first, min>> : min;
1454
+ /**
1455
+ * Takes a tuple of numbers and returns the smallest one
1456
+ * @param tuple - a tuple of numbers
1457
+ * @returns a number
1458
+ * @example
1459
+ * ```ts
1460
+ * type T0 = Call<Tuples.Max, [1, 2, 3]>; // 3
1461
+ * type T1 = Call<Tuples.Max, [-1, -2, -3]>; // -1
1462
+ * type T2 = Call<Tuples.Max, []>; never
1463
+ * ```
1464
+ */
1465
+ export type Max<tuple extends readonly any[] | _ | unset = unset> = PartialApply<MaxFn, [tuple]>;
1466
+ interface MaxFn extends Fn {
1467
+ return: this["args"] extends [infer tuple extends readonly (number | bigint)[], ...any] ? MaxImpl<tuple> : never;
1468
+ }
1469
+ type MaxImpl<xs, min extends number | bigint = never> = xs extends [infer first extends number | bigint, ...infer rest] ? MaxImpl<rest, [min] extends [never] ? first : Max<first, min>> : min;
1470
+ export {};
1471
+ }
1472
+ //#endregion
1473
+ //#region node_modules/hotscript/dist/internals/strings/impl/split.d.ts
1474
+ type ConcatSplits<Parts extends string[], Seps extends string[], Acc extends string[] = []> = Parts extends [infer First extends string, ...infer Rest extends string[]] ? ConcatSplits<Rest, Seps, [...Acc, ...SplitManySep<First, Seps>]> : Acc;
1475
+ type SplitManySep<Str extends string, Sep extends string[], Acc extends string[] = []> = Sep extends [infer FirstSep extends string, ...infer RestSep extends string[]] ? ConcatSplits<Split$2<Str, FirstSep>, RestSep> : [Str, ...Acc];
1476
+ /**
1477
+ * Split a string into a tuple.
1478
+ * @param Str - The string to split.
1479
+ * @param Sep - The separator to split on, can be a union of strings of more than one character.
1480
+ * @returns The tuple of each split. if sep is an empty string, returns a tuple of each character.
1481
+ */
1482
+ type Split$1<Str, Sep extends string, Seps = UnionToTuple<Sep>> = Seps extends string[] ? Str extends string ? SplitManySep<Str, Seps> : [] : [];
1483
+ /**
1484
+ * Split a string into a tuple with each character.
1485
+ * @param Str - The string to split.
1486
+ * @returns The tuple of each character.
1487
+ */
1488
+ type StringToTuple<Str, Acc extends string[] = []> = Str extends string ? Str extends `${infer First}${infer Rest}` ? StringToTuple<Rest, [...Acc, First]> : Acc : [];
1489
+ //#endregion
1490
+ //#region node_modules/hotscript/dist/internals/strings/impl/trim.d.ts
1491
+ /**
1492
+ * Trim the left side of a string.
1493
+ * @param Str - The string to trim.
1494
+ * @param Sep - The separator to trim.
1495
+ * @returns The trimmed string.
1496
+ */
1497
+ type TrimLeft<Str, Sep extends string> = Str extends `${Sep}${infer Rest}` ? TrimLeft<Rest, Sep> : Str;
1498
+ /**
1499
+ * Trim the right side of a string.
1500
+ * @param Str - The string to trim.
1501
+ * @param Sep - The separator to trim.
1502
+ * @returns The trimmed string.
1503
+ */
1504
+ type TrimRight<Str, Sep extends string> = Str extends `${infer Rest}${Sep}` ? TrimRight<Rest, Sep> : Str;
1505
+ /**
1506
+ * Trim a string.
1507
+ * @param Str - The string to trim.
1508
+ * @param Sep - The separator to trim.
1509
+ * @returns The trimmed string.
1510
+ */
1511
+ type Trim<Str, Sep extends string> = TrimLeft<TrimRight<Str, Sep>, Sep>;
1512
+ //#endregion
1513
+ //#region node_modules/hotscript/dist/internals/strings/impl/replace.d.ts
1514
+ type Replace<Str, From extends string, To extends string> = Str extends string ? Str extends `${infer Before}${From}${infer After}` ? Replace<`${Before}${To}${After}`, From, To> : Str : Str;
1515
+ interface ReplaceReducer<To extends string> extends Fn {
1516
+ return: this["args"] extends [infer Str extends string, infer From extends string, ...any] ? Replace<Str, From, To> : never;
1517
+ }
1518
+ //#endregion
1519
+ //#region node_modules/hotscript/dist/internals/strings/impl/repeat.d.ts
1520
+ type RepeatX2<T extends string> = `${T}${T}`;
1521
+ type Repeat<T extends string, N extends number, Acc extends string = "", Calc extends {
1522
+ Quotient: number;
1523
+ Remainder: number;
1524
+ } = DivMod<N, 2>> = N extends 0 ? Acc : N extends 1 ? `${Acc}${T}` : Calc["Remainder"] extends 0 ? Repeat<RepeatX2<T>, Calc["Quotient"], Acc> : Repeat<T, Sub<N, 1>, `${Acc}${T}`>;
1525
+ //#endregion
1526
+ //#region node_modules/hotscript/dist/internals/strings/impl/compare.d.ts
1527
+ type ascii = {
1528
+ " ": 32;
1529
+ "!": 33;
1530
+ '"': 34;
1531
+ "#": 35;
1532
+ $: 36;
1533
+ "%": 37;
1534
+ "&": 38;
1535
+ "'": 39;
1536
+ "(": 40;
1537
+ ")": 41;
1538
+ "*": 42;
1539
+ "+": 43;
1540
+ ",": 44;
1541
+ "-": 45;
1542
+ ".": 46;
1543
+ "/": 47;
1544
+ "0": 48;
1545
+ "1": 49;
1546
+ "2": 50;
1547
+ "3": 51;
1548
+ "4": 52;
1549
+ "5": 53;
1550
+ "6": 54;
1551
+ "7": 55;
1552
+ "8": 56;
1553
+ "9": 57;
1554
+ ":": 58;
1555
+ ";": 59;
1556
+ "<": 60;
1557
+ "=": 61;
1558
+ ">": 62;
1559
+ "?": 63;
1560
+ "@": 64;
1561
+ A: 65;
1562
+ B: 66;
1563
+ C: 67;
1564
+ D: 68;
1565
+ E: 69;
1566
+ F: 70;
1567
+ G: 71;
1568
+ H: 72;
1569
+ I: 73;
1570
+ J: 74;
1571
+ K: 75;
1572
+ L: 76;
1573
+ M: 77;
1574
+ N: 78;
1575
+ O: 79;
1576
+ P: 80;
1577
+ Q: 81;
1578
+ R: 82;
1579
+ S: 83;
1580
+ T: 84;
1581
+ U: 85;
1582
+ V: 86;
1583
+ W: 87;
1584
+ X: 88;
1585
+ Y: 89;
1586
+ Z: 90;
1587
+ "[": 91;
1588
+ "\\": 92;
1589
+ "]": 93;
1590
+ "^": 94;
1591
+ _: 95;
1592
+ "`": 96;
1593
+ a: 97;
1594
+ b: 98;
1595
+ c: 99;
1596
+ d: 100;
1597
+ e: 101;
1598
+ f: 102;
1599
+ g: 103;
1600
+ h: 104;
1601
+ i: 105;
1602
+ j: 106;
1603
+ k: 107;
1604
+ l: 108;
1605
+ m: 109;
1606
+ n: 110;
1607
+ o: 111;
1608
+ p: 112;
1609
+ q: 113;
1610
+ r: 114;
1611
+ s: 115;
1612
+ t: 116;
1613
+ u: 117;
1614
+ v: 118;
1615
+ w: 119;
1616
+ x: 120;
1617
+ y: 121;
1618
+ z: 122;
1619
+ "{": 123;
1620
+ "|": 124;
1621
+ "}": 125;
1622
+ "~": 126;
1623
+ é: 130;
1624
+ â: 131;
1625
+ ä: 132;
1626
+ à: 133;
1627
+ å: 134;
1628
+ ç: 135;
1629
+ ê: 136;
1630
+ ë: 137;
1631
+ è: 138;
1632
+ ï: 139;
1633
+ î: 140;
1634
+ ì: 141;
1635
+ Ä: 142;
1636
+ Å: 143;
1637
+ É: 144;
1638
+ æ: 145;
1639
+ Æ: 146;
1640
+ ô: 147;
1641
+ ö: 148;
1642
+ ò: 149;
1643
+ û: 150;
1644
+ ù: 151;
1645
+ ÿ: 152;
1646
+ Ö: 153;
1647
+ Ü: 154;
1648
+ ø: 155;
1649
+ "£": 156;
1650
+ Ø: 157;
1651
+ "×": 158;
1652
+ ƒ: 159;
1653
+ á: 160;
1654
+ í: 161;
1655
+ ó: 162;
1656
+ ú: 163;
1657
+ ñ: 164;
1658
+ Ñ: 165;
1659
+ ª: 166;
1660
+ º: 167;
1661
+ "¿": 168;
1662
+ "®": 169;
1663
+ "½": 171;
1664
+ "¼": 172;
1665
+ "¡": 173;
1666
+ "«": 174;
1667
+ "»": 175;
1668
+ "░": 176;
1669
+ "▒": 177;
1670
+ "▓": 178;
1671
+ "│": 179;
1672
+ "┤": 180;
1673
+ Á: 181;
1674
+ Â: 182;
1675
+ À: 183;
1676
+ "©": 184;
1677
+ "╣": 185;
1678
+ "║": 186;
1679
+ "╗": 187;
1680
+ "╝": 188;
1681
+ "¢": 189;
1682
+ "¥": 190;
1683
+ "┐": 191;
1684
+ "└": 192;
1685
+ "┴": 193;
1686
+ "┬": 194;
1687
+ "├": 195;
1688
+ "─": 196;
1689
+ "┼": 197;
1690
+ ã: 198;
1691
+ Ã: 199;
1692
+ "╚": 200;
1693
+ "╔": 201;
1694
+ "╩": 202;
1695
+ "╦": 203;
1696
+ "╠": 204;
1697
+ "═": 205;
1698
+ "╬": 206;
1699
+ "¤": 207;
1700
+ ð: 208;
1701
+ Ð: 209;
1702
+ Ê: 210;
1703
+ Ë: 211;
1704
+ È: 212;
1705
+ ı: 213;
1706
+ Í: 214;
1707
+ Î: 215;
1708
+ Ï: 216;
1709
+ "┘": 217;
1710
+ "┌": 218;
1711
+ "█": 219;
1712
+ "▄": 220;
1713
+ "¦": 221;
1714
+ Ì: 222;
1715
+ "▀": 223;
1716
+ Ó: 224;
1717
+ ß: 225;
1718
+ Ô: 226;
1719
+ Ò: 227;
1720
+ õ: 228;
1721
+ Õ: 229;
1722
+ µ: 230;
1723
+ þ: 231;
1724
+ Þ: 232;
1725
+ Ú: 233;
1726
+ Û: 234;
1727
+ Ù: 235;
1728
+ ý: 236;
1729
+ Ý: 237;
1730
+ "¯": 238;
1731
+ "´": 239;
1732
+ "¬": 240;
1733
+ "±": 241;
1734
+ "‗": 242;
1735
+ "¾": 243;
1736
+ "¶": 244;
1737
+ "§": 245;
1738
+ "÷": 246;
1739
+ "¸": 247;
1740
+ "°": 248;
1741
+ "¨": 249;
1742
+ "•": 250;
1743
+ "¹": 251;
1744
+ "³": 252;
1745
+ "²": 253;
1746
+ "■": 254;
1747
+ };
1748
+ type CharacterCompare<Char1 extends string, Char2 extends string> = Char1 extends Char2 ? 0 : Char1 extends keyof ascii ? Char2 extends keyof ascii ? Call<Numbers.Compare, ascii[Char1], ascii[Char2]> : 1 : -1;
1749
+ type CharactersCompare<T extends string[], U extends string[]> = T extends [infer N1 extends string, ...infer R1 extends string[]] ? U extends [infer N2 extends string, ...infer R2 extends string[]] ? CharacterCompare<N1, N2> extends 0 ? CharactersCompare<R1, R2> : CharacterCompare<N1, N2> : 1 : U extends [string, ...string[]] ? -1 : 0;
1750
+ type Compare<T extends string, U extends string> = Equal$1<T, U> extends true ? 0 : CharactersCompare<StringToTuple<T>, StringToTuple<U>>;
1751
+ type LessThan<T extends string, U extends string> = Compare<T, U> extends -1 ? true : false;
1752
+ type LessThanOrEqual<T extends string, U extends string> = Compare<T, U> extends 1 ? false : true;
1753
+ type GreaterThan<T extends string, U extends string> = Compare<T, U> extends 1 ? true : false;
1754
+ type GreaterThanOrEqual<T extends string, U extends string> = Compare<T, U> extends -1 ? false : true;
1755
+ //#endregion
1756
+ //#region node_modules/hotscript/dist/internals/strings/impl/utils.d.ts
1757
+ declare namespace StringIterator {
1758
+ type Iter = [string, number | bigint];
1759
+ /**
1760
+ * Iterator over the string is a linked list of [string, number] pairs
1761
+ * where the string is the pattern to match any character in the string 'N' times
1762
+ * and the number is the value 'N' of the pattern
1763
+ * the linked list allows to easily add iterate and reverse iterate
1764
+ */
1765
+ export type Iterator = [Iter, ...Iter[]];
1766
+ /**
1767
+ * The initial iterator is a list of one element
1768
+ *
1769
+ * @description we need to prefix the pattern with '$'
1770
+ *
1771
+ * to avoid typescript to merge multiple patterns into one
1772
+ */
1773
+ export type Init = [[`$${string}`, 1]];
1774
+ /**
1775
+ * The string is the pattern to match any character in the string 'N' times
1776
+ *
1777
+ * @param It - the iterator to get the string from
1778
+ * @returns the string
1779
+ */
1780
+ export type String<It extends Iterator> = It[0][0];
1781
+ /**
1782
+ * The value is the number 'N' of the pattern
1783
+ *
1784
+ * @param It - the iterator to get the value from
1785
+ * @returns the value
1786
+ */
1787
+ export type Value<It extends Iterator> = It[0][1];
1788
+ /**
1789
+ * The size is the number of elements in the linked list
1790
+ *
1791
+ * @param It - the iterator to get the size from
1792
+ * @returns the size
1793
+ */
1794
+ export type Size<It extends Iterator> = It["length"];
1795
+ /**
1796
+ * Get the next iterator
1797
+ *
1798
+ * @param It - the iterator to get the next iterator from
1799
+ * @returns the next iterator
1800
+ */
1801
+ export type Next<It extends Iterator> = [[`${String<It>}${string}`, Add<Value<It>, 1>], ...It];
1802
+ /**
1803
+ * Get the previous iterator
1804
+ * @param It - the iterator to get the previous iterator from
1805
+ * @returns the previous iterator
1806
+ */
1807
+ export type Prev<It extends Iterator> = It extends [unknown, ...infer Rest extends Iterator] ? Rest : undefined;
1808
+ /**
1809
+ * Double the iterator to match any character in the string '2N' times
1810
+ * This allows the algorithm to be O(log(N)) instead of O(N)
1811
+ *
1812
+ * @description we need to prefix the pattern with '$' and suffix it with '_'
1813
+ * to avoid typescript to merge multiple patterns into one
1814
+ *
1815
+ * @param It - the iterator to double
1816
+ * @returns the doubled iterator
1817
+ */
1818
+ export type Double<It extends Iterator> = `${String<It>}_` extends `$${infer pattern}` ? `${String<It>}${pattern}` extends `${infer double}_` ? [[double, Mul<Value<It>, 2>], ...It] : never : never;
1819
+ /**
1820
+ * Cut the string at the iterator
1821
+ *
1822
+ * @param T - the string to cut
1823
+ * @param It - the iterator to cut at
1824
+ * @returns the rest of the string
1825
+ */
1826
+ export type CutAt<T extends string, It extends Iterator> = `$${T}` extends `${String<It>}${infer $Rest}` ? $Rest : undefined;
1827
+ export {};
1828
+ }
1829
+ //#endregion
1830
+ //#region node_modules/hotscript/dist/internals/strings/impl/length.d.ts
1831
+ type LengthUp<Str extends string, Length extends number | bigint = 0, It extends StringIterator.Iterator = StringIterator.Init> = StringIterator.Double<It> extends infer $DoubleIt extends StringIterator.Iterator ? StringIterator.CutAt<Str, $DoubleIt> extends `${infer $Rest}` ? StringIterator.Size<It> extends 12 ? LengthDown<$Rest, Add<Length, StringIterator.Value<$DoubleIt>>, $DoubleIt> : LengthUp<$Rest, Add<Length, StringIterator.Value<$DoubleIt>>, $DoubleIt> : StringIterator.CutAt<Str, It> extends `${infer $Rest}` ? LengthUp<$Rest, Add<Length, StringIterator.Value<It>>, It> : LengthDown<Str, Length, StringIterator.Prev<It>> : never;
1832
+ type LengthDown<Str extends string, Length extends number | bigint, It> = It extends StringIterator.Iterator ? StringIterator.CutAt<Str, It> extends `${infer $Rest}` ? LengthDown<$Rest, Add<Length, StringIterator.Value<It>>, It> : LengthDown<Str, Length, StringIterator.Prev<It>> : Length;
1833
+ type Length<T extends string> = T extends "" ? 0 : LengthUp<T>;
1834
+ //#endregion
1835
+ //#region node_modules/hotscript/dist/internals/strings/Strings.d.ts
1836
+ declare namespace Strings {
1837
+ export type Stringifiable = string | number | boolean | bigint | null | undefined;
1838
+ /**
1839
+ * Get the length of a string.
1840
+ * @param args[0] - The string to get the length of.
1841
+ * @returns The length of the string.
1842
+ * @warning - 🔥 does not work with emojis since they are multiple characters 🔥
1843
+ * @example
1844
+ * ```ts
1845
+ * type T0 = Call<Strings.Length,"abc">; // 3
1846
+ * ```
1847
+ */
1848
+ export type Length<Str = unset> = PartialApply<LengthFn, [Str]>;
1849
+ /**
1850
+ * Get the length of a string.
1851
+ * @param args[0] - The string to get the length of.
1852
+ * @returns The length of the string.
1853
+ * @warning - 🔥 does not work with emojis since they are multiple characters 🔥
1854
+ * @example
1855
+ * ```ts
1856
+ * type T0 = Call<Strings.Length,"abc">; // 3
1857
+ * ```
1858
+ */
1859
+ export interface LengthFn extends Fn {
1860
+ return: this["arg0"] extends string ? Length<this["arg0"]> : never;
1861
+ }
1862
+ /**
1863
+ * Trim the left side of a string.
1864
+ * @param args[0] - The string to trim.
1865
+ * @param Sep - The separator to trim.
1866
+ * @returns The trimmed string.
1867
+ * @example
1868
+ * ```ts
1869
+ * type T0 = Call<Strings.TrimLeft," abc">; // "abc"
1870
+ * ```
1871
+ */
1872
+ export type TrimLeft<Sep extends string | _ = " ", Str = unset> = PartialApply<TrimLeftFn, [Sep, Str]>;
1873
+ interface TrimLeftFn extends Fn {
1874
+ return: this["args"] extends [infer Sep extends string, infer Str extends string, ...any] ? TrimLeft<Str, Sep> : never;
1875
+ }
1876
+ /**
1877
+ * Trim the right side of a string.
1878
+ * @param args[0] - The string to trim.
1879
+ * @param Sep - The separator to trim.
1880
+ * @returns The trimmed string.
1881
+ * @example
1882
+ * ```ts
1883
+ * type T0 = Call<Strings.TrimRight,"abc ">; // "abc"
1884
+ * ```
1885
+ */
1886
+ export type TrimRight<Sep extends string | _ = " ", Str = unset> = PartialApply<TrimRightFn, [Sep, Str]>;
1887
+ interface TrimRightFn extends Fn {
1888
+ return: this["args"] extends [infer Sep extends string, infer Str extends string, ...any] ? TrimRight<Str, Sep> : never;
1889
+ }
1890
+ /**
1891
+ * Trim a string.
1892
+ * @param args[0] - The string to trim.
1893
+ * @param Sep - The separator to trim.
1894
+ * @returns The trimmed string.
1895
+ * @example
1896
+ * ```ts
1897
+ * type T0 = Call<Strings.Trim," abc ">; // "abc"
1898
+ * ```
1899
+ */
1900
+ export type Trim<Sep extends string | _ = " ", Str = unset> = PartialApply<TrimFn, [Sep, Str]>;
1901
+ interface TrimFn extends Fn {
1902
+ return: this["args"] extends [infer Sep extends string, infer Str extends string, ...any] ? Trim<Str, Sep> : never;
1903
+ }
1904
+ /**
1905
+ * Replace all instances of a substring in a string.
1906
+ * @param args[0] - The string to replace.
1907
+ * @param from - The substring to replace.
1908
+ * @param to - The substring to replace with.
1909
+ * @returns The replaced string.
1910
+ * @example
1911
+ * ```ts
1912
+ * type T0 = Call<Strings.Replace<".","/">,"a.b.c.d">; // "a/b/c/d"
1913
+ */
1914
+ export type Replace<from extends string | unset | _ = unset, to extends string | unset | _ = unset, str = unset> = PartialApply<ReplaceFn, [from, to, str]>;
1915
+ interface ReplaceFn extends Fn {
1916
+ return: this["args"] extends [infer From extends string, infer To extends string, infer Str, ...any] ? Call<Tuples.Reduce<ReplaceReducer<To>, Str>, UnionToTuple<From>> : never;
1917
+ }
1918
+ /**
1919
+ * Cut a slice of a string out from a start index to an end index.
1920
+ * @param args[0] - The string to slice.
1921
+ * @param start - The start index.
1922
+ * @param end - The end index.
1923
+ * @returns The sliced string.
1924
+ * @warning - 🔥 does not work with emojis since they are multiple characters 🔥
1925
+ * @example
1926
+ * ```ts
1927
+ * type T0 = Call<Strings.Slice<1,9>,"1234567890">; // "23456789"
1928
+ */
1929
+ export type Slice<start extends number | unset | _ = unset, end extends number | unset | _ = unset> = ComposeLeft<[Strings.Split<"">, Tuples.Take<end>, Tuples.Drop<start>, Tuples.Join<"">]>;
1930
+ /**
1931
+ * Split a string into a tuple of strings.
1932
+ * @param args[0] - The string to split.
1933
+ * @param sep - The separator to split the string with.
1934
+ * @returns The split string.
1935
+ * @warning - 🔥 using an empty sep with emojis in the string will destroy the emoji 🔥
1936
+ * @example
1937
+ * ```ts
1938
+ * type T0 = Call<Strings.Split<",">,"a,b,c">; // ["a","b","c"]
1939
+ * ```
1940
+ */
1941
+ export type Split<Sep extends string | unset | _ = unset, Str extends string | unset | _ = unset> = PartialApply<SplitFn, [Sep, Str]>;
1942
+ export interface SplitFn extends Fn {
1943
+ return: this["args"] extends [infer Sep extends string, infer Str, ...any] ? Split$1<Str, Sep> : never;
1944
+ }
1945
+ /**
1946
+ * Repeat a string a number of times.
1947
+ * @param args[0] - The string to repeat.
1948
+ * @param times - The number of times to repeat the string.
1949
+ * @returns The repeated string.
1950
+ * @example
1951
+ * ```ts
1952
+ * type T0 = Call<Strings.Repeat<3>,"Hello! ">; // "Hello! Hello! Hello! "
1953
+ * ```
1954
+ */
1955
+ export type Repeat<Times extends number | _ | unset = unset, Str extends string | _ | unset = unset> = PartialApply<RepeatFn, [Times, Str]>;
1956
+ interface RepeatFn extends Fn {
1957
+ return: this["args"] extends [infer Times extends number, infer Str extends string] ? Repeat<Str, Times> : never;
1958
+ }
1959
+ /**
1960
+ * Check if a string starts with a substring.
1961
+ * @param args[0] - The string to check.
1962
+ * @param str - The substring to check for.
1963
+ * @returns Whether the string starts with the substring.
1964
+ * @example
1965
+ * ```ts
1966
+ * type T0 = Call<Strings.StartsWith<"abc">,"abcdef">; // true
1967
+ * type T1 = Call<Strings.StartsWith<"abc">,"defabc">; // false
1968
+ * ```
1969
+ */
1970
+ export type StartsWith<Start extends string | _ | unset = unset, Str extends string | _ | unset = unset> = PartialApply<StartsWithFn, [Start, Str]>;
1971
+ interface StartsWithFn extends Fn {
1972
+ return: this["args"] extends [infer Start extends string, infer Str] ? Str extends `${Start}${string}` ? true : false : never;
1973
+ }
1974
+ /**
1975
+ * Check if a string ends with a substring.
1976
+ * @param args[0] - The string to check.
1977
+ * @param str - The substring to check for.
1978
+ * @returns Whether the string ends with the substring.
1979
+ * @example
1980
+ * ```ts
1981
+ * type T0 = Call<Strings.EndsWith<"abc">,"abcdef">; // false
1982
+ * type T1 = Call<Strings.EndsWith<"abc">,"defabc">; // true
1983
+ * ```
1984
+ */
1985
+ export type EndsWith<End extends string | _ | unset = unset, Str extends string | _ | unset = unset> = PartialApply<EndsWithFn, [End, Str]>;
1986
+ interface EndsWithFn extends Fn {
1987
+ return: this["args"] extends [infer End extends string, infer Str] ? Str extends `${string}${End}` ? true : false : never;
1988
+ }
1989
+ /**
1990
+ * Split a string into a tuple of each character.
1991
+ * @param args[0] - The string to split.
1992
+ * @returns The splited string.
1993
+ * @warning - 🔥 does not work with emojis since they are multiple characters 🔥
1994
+ * @example
1995
+ * ```ts
1996
+ * type T0 = Call<Strings.ToTuple,"abc">; // ["a","b","c"]
1997
+ * ```
1998
+ */
1999
+ export interface ToTuple extends Fn {
2000
+ return: StringToTuple<this["arg0"]>;
2001
+ }
2002
+ /**
2003
+ * Convert a string to a number or bigint.
2004
+ * @param args[0] - The string to convert.
2005
+ * @returns The converted number or bigint.
2006
+ * @example
2007
+ * ```ts
2008
+ * type T0 = Call<Strings.ToNumber,"123">; // 123
2009
+ * type T1 = Call<Strings.ToNumber,"12367543547677078675456656790">; // 12367543547677078675456656790n
2010
+ * ```
2011
+ */
2012
+ export interface ToNumber extends Fn {
2013
+ return: this["arg0"] extends `${infer n extends number | bigint}` ? n : never;
2014
+ }
2015
+ /**
2016
+ * Convert a stringifiable literal to a string.
2017
+ * @param args[0] - The stringifiable literal to convert.
2018
+ * @returns The converted string.
2019
+ * @example
2020
+ * ```ts
2021
+ * type T0 = Call<Strings.ToString,123>; // "123"
2022
+ * type T1 = Call<Strings.ToString,true>; // "true"
2023
+ * type T2 = Call<Strings.ToString,null>; // "null"
2024
+ * ```
2025
+ */
2026
+ export interface ToString extends Fn {
2027
+ return: `${Extract<this["arg0"], Strings.Stringifiable>}`;
2028
+ }
2029
+ /**
2030
+ * Prepend a string to another string.
2031
+ * @param args[0] - The string to be prepended to.
2032
+ * @param str - The string to prepend.
2033
+ * @returns The prepended string.
2034
+ * @example
2035
+ * ```ts
2036
+ * type T0 = Call<Strings.Prepend<"abc">,"def">; // "abcdef"
2037
+ * ```
2038
+ */
2039
+ export type Prepend<Start extends string | _ | unset = unset, Str extends string | _ | unset = unset> = PartialApply<PrependFn, [Start, Str]>;
2040
+ interface PrependFn extends Fn {
2041
+ return: `${Extract<this["arg0"], Strings.Stringifiable>}${Extract<this["arg1"], Strings.Stringifiable>}`;
2042
+ }
2043
+ /**
2044
+ * Append a string to another string.
2045
+ * @param args[0] - The string to be appended to.
2046
+ * @param str - The string to append.
2047
+ * @returns The appended string.
2048
+ * @example
2049
+ * ```ts
2050
+ * type T0 = Call<Strings.Append<"abc">,"def">; // "defabc"
2051
+ * ```
2052
+ */
2053
+ export type Append<End extends string | _ | unset = unset, Str extends string | _ | unset = unset> = PartialApply<AppendFn, [End, Str]>;
2054
+ interface AppendFn extends Fn {
2055
+ return: `${Extract<this["arg1"], Strings.Stringifiable>}${Extract<this["arg0"], Strings.Stringifiable>}`;
2056
+ }
2057
+ /**
2058
+ * Transform a string to uppercase.
2059
+ * @param args[0] - The string to transform.
2060
+ * @returns The transformed string.
2061
+ * @example
2062
+ * ```ts
2063
+ * type T0 = Call<Strings.Uppercase,"abc">; // "ABC"
2064
+ * ```
2065
+ */
2066
+ export interface Uppercase extends Fn {
2067
+ return: Std._Uppercase<Extract<this["arg0"], string>>;
2068
+ }
2069
+ /**
2070
+ * Transform a string to lowercase.
2071
+ * @param args[0] - The string to transform.
2072
+ * @returns The transformed string.
2073
+ * @example
2074
+ * ```ts
2075
+ * type T0 = Call<Strings.Lowercase,"ABC">; // "abc"
2076
+ * ```
2077
+ */
2078
+ export interface Lowercase extends Fn {
2079
+ return: Std._Lowercase<Extract<this["arg0"], string>>;
2080
+ }
2081
+ /**
2082
+ * Capitalize a string.
2083
+ * @param args[0] - The string to capitalize.
2084
+ * @returns The capitalized string.
2085
+ * @example
2086
+ * ```ts
2087
+ * type T0 = Call<Strings.Capitalize,"abc">; // "Abc"
2088
+ * ```
2089
+ */
2090
+ export interface Capitalize extends Fn {
2091
+ return: Std._Capitalize<Extract<this["arg0"], string>>;
2092
+ }
2093
+ /**
2094
+ * Uncapitalize a string.
2095
+ * @param args[0] - The string to uncapitalize.
2096
+ * @returns The uncapitalized string.
2097
+ * @example
2098
+ * ```ts
2099
+ * type T0 = Call<Strings.Uncapitalize,"AddTop">; // "addTop"
2100
+ * ```
2101
+ */
2102
+ export interface Uncapitalize extends Fn {
2103
+ return: Std._Uncapitalize<Extract<this["arg0"], string>>;
2104
+ }
2105
+ /**
2106
+ * Convert a string to snake case.
2107
+ * @param args[0] - The string to convert.
2108
+ * @returns The converted string.
2109
+ * @example
2110
+ * ```ts
2111
+ * type T0 = Call<Strings.SnakeCase,"AddTop">; // "add_top"
2112
+ * ```
2113
+ */
2114
+ export interface SnakeCase extends Fn {
2115
+ return: SnakeCase<this["arg0"]>;
2116
+ }
2117
+ /**
2118
+ * Convert a string to camel case.
2119
+ * @param args[0] - The string to convert.
2120
+ * @returns The converted string.
2121
+ * @example
2122
+ * ```ts
2123
+ * type T0 = Call<Strings.CamelCase,"add_top">; // "addTop"
2124
+ * ```
2125
+ */
2126
+ export interface CamelCase extends Fn {
2127
+ return: CamelCase<this["arg0"]>;
2128
+ }
2129
+ /**
2130
+ * Convert a string to kebab case.
2131
+ * @param args[0] - The string to convert.
2132
+ * @returns The converted string.
2133
+ * @example
2134
+ * ```ts
2135
+ * type T0 = Call<Strings.KebabCase,"add_top">; // "add-top"
2136
+ * type T1 = Call<Strings.KebabCase,"AddTop">; // "add-top"
2137
+ * type T2 = Call<Strings.KebabCase,"addTop">; // "add-top"
2138
+ * ```
2139
+ */
2140
+ export interface KebabCase extends Fn {
2141
+ return: KebabCase<this["arg0"]>;
2142
+ }
2143
+ /**
2144
+ * Compare two strings. (only works with ascii extended characters)
2145
+ * @param args[0] - The first string to compare.
2146
+ * @param args[1] - The second string to compare.
2147
+ * @n1 - The first string to compare or _.
2148
+ * @n2 - The second string to compare or _.
2149
+ * @returns The result of the comparison.
2150
+ * @example
2151
+ * ```ts
2152
+ * type T0 = Call<Strings.Compare,"abc","def">; // -1
2153
+ * type T1 = Call<Strings.Compare,"def","abc">; // 1
2154
+ * type T2 = Call<Strings.Compare,"abc","abc">; // 0
2155
+ * ```
2156
+ */
2157
+ export type Compare<n1 extends string | _ | unset = unset, n2 extends string | _ | unset = unset> = PartialApply<CompareFn, n2 extends unset ? [unset, n1] : [n1, n2]>;
2158
+ interface CompareFn extends Fn {
2159
+ return: this["args"] extends [infer a extends string, infer b extends string, ...any] ? Compare<a, b> : never;
2160
+ }
2161
+ /**
2162
+ * Check if a string is lexically less than another string. (only works with ascii extended characters)
2163
+ * @param args[0] - The first string to compare.
2164
+ * @param args[1] - The second string to compare.
2165
+ * @n1 - The first string to compare or _.
2166
+ * @n2 - The second string to compare or _.
2167
+ * @returns True if the first string is lexically less than the second string, false otherwise.
2168
+ * @example
2169
+ * ```ts
2170
+ * type T0 = Call<Strings.LessThan,"abc","def">; // true
2171
+ * type T1 = Call<Strings.LessThan,"def","abc">; // false
2172
+ * type T2 = Call<Strings.LessThan,"abc","abc">; // false
2173
+ * ```
2174
+ */
2175
+ export type LessThan<n1 extends string | _ | unset = unset, n2 extends string | _ | unset = unset> = PartialApply<LessThanFn, n2 extends unset ? [unset, n1] : [n1, n2]>;
2176
+ interface LessThanFn extends Fn {
2177
+ return: this["args"] extends [infer a extends string, infer b extends string, ...any] ? LessThan<a, b> : never;
2178
+ }
2179
+ /**
2180
+ * Check if a string is lexically less than or equal to another string. (only works with ascii extended characters)
2181
+ * @param args[0] - The first string to compare.
2182
+ * @param args[1] - The second string to compare.
2183
+ * @n1 - The first string to compare or _.
2184
+ * @n2 - The second string to compare or _.
2185
+ * @returns True if the first string is lexically less than or equal to the second string, false otherwise.
2186
+ * @example
2187
+ * ```ts
2188
+ * type T0 = Call<Strings.LessThanOrEqual,"abc","def">; // true
2189
+ * type T1 = Call<Strings.LessThanOrEqual,"def","abc">; // false
2190
+ * type T2 = Call<Strings.LessThanOrEqual,"abc","abc">; // true
2191
+ */
2192
+ export type LessThanOrEqual<n1 extends string | _ | unset = unset, n2 extends string | _ | unset = unset> = PartialApply<LessThanOrEqualFn, n2 extends unset ? [unset, n1] : [n1, n2]>;
2193
+ interface LessThanOrEqualFn extends Fn {
2194
+ return: this["args"] extends [infer a extends string, infer b extends string, ...any] ? LessThanOrEqual<a, b> : never;
2195
+ }
2196
+ /**
2197
+ * Check if a string is lexically greater than another string. (only works with ascii extended characters)
2198
+ * @param args[0] - The first string to compare.
2199
+ * @param args[1] - The second string to compare.
2200
+ * @n1 - The first string to compare or _.
2201
+ * @n2 - The second string to compare or _.
2202
+ * @returns True if the first string is lexically greater than the second string, false otherwise.
2203
+ * @example
2204
+ * ```ts
2205
+ * type T0 = Call<Strings.GreaterThan,"abc","def">; // false
2206
+ * type T1 = Call<Strings.GreaterThan,"def","abc">; // true
2207
+ * type T2 = Call<Strings.GreaterThan,"abc","abc">; // false
2208
+ * ```
2209
+ */
2210
+ export type GreaterThan<n1 extends string | _ | unset = unset, n2 extends string | _ | unset = unset> = PartialApply<GreaterThanFn, n2 extends unset ? [unset, n1] : [n1, n2]>;
2211
+ interface GreaterThanFn extends Fn {
2212
+ return: this["args"] extends [infer a extends string, infer b extends string, ...any] ? GreaterThan<a, b> : never;
2213
+ }
2214
+ /**
2215
+ * Check if a string is lexically greater than or equal to another string. (only works with ascii extended characters)
2216
+ * @param args[0] - The first string to compare.
2217
+ * @param args[1] - The second string to compare.
2218
+ * @n1 - The first string to compare or _.
2219
+ * @n2 - The second string to compare or _.
2220
+ * @returns True if the first string is lexically greater than or equal to the second string, false otherwise.
2221
+ * @example
2222
+ * ```ts
2223
+ * type T0 = Call<Strings.GreaterThanOrEqual,"abc","def">; // false
2224
+ * type T1 = Call<Strings.GreaterThanOrEqual,"def","abc">; // true
2225
+ * type T2 = Call<Strings.GreaterThanOrEqual,"abc","abc">; // true
2226
+ * ```
2227
+ */
2228
+ export type GreaterThanOrEqual<n1 extends string | _ | unset = unset, n2 extends string | _ | unset = unset> = PartialApply<GreaterThanOrEqualFn, n2 extends unset ? [unset, n1] : [n1, n2]>;
2229
+ interface GreaterThanOrEqualFn extends Fn {
2230
+ return: this["args"] extends [infer a extends string, infer b extends string, ...any] ? GreaterThanOrEqual<a, b> : never;
2231
+ }
2232
+ export {};
2233
+ }
2234
+ //#endregion
2235
+ //#region node_modules/hotscript/dist/internals/objects/impl/objects.d.ts
2236
+ type Keys<src> = src extends readonly unknown[] ? { [key in keyof src]: key }[number] extends infer res ? res extends string ? Call<Strings.ToNumber, res> & keyof src : res & keyof src : never : keyof src;
2237
+ type Values<src> = Keys<src> extends infer keys extends keyof src ? src[keys] : never;
2238
+ type FromEntries<entries extends [PropertyKey, any]> = { [entry in entries as entry[0]]: entry[1] } | never;
2239
+ type Entries<T> = Keys<T> extends infer keys extends keyof T ? { [K in keys]: [K, T[K]] }[keys] : never;
2240
+ type Assign<xs extends readonly any[]> = Prettify$1<UnionToIntersection<xs[number]>>;
2241
+ type GetFromPath<Obj, path> = RecursiveGet<Obj, ParsePath<path>>;
2242
+ type ParsePath<path, output extends string[] = [], currentChunk extends string = ""> = path extends number ? [`${path}`] : path extends `${infer first}${infer rest}` ? first extends "." | "[" | "]" ? ParsePath<rest, [...output, ...(currentChunk extends "" ? [] : [currentChunk])], ""> : ParsePath<rest, output, `${currentChunk}${first}`> : [...output, ...(currentChunk extends "" ? [] : [currentChunk])];
2243
+ type RecursiveGet<Obj, pathList> = Obj extends any ? pathList extends [infer first, ...infer rest] ? first extends keyof Obj ? RecursiveGet<Obj[first], rest> : [first, Obj] extends [`${number}` | "number", readonly any[]] ? RecursiveGet<Extract<Obj, any[]>[number], rest> : undefined : Obj : never;
2244
+ type TransformObjectDeep<fn extends Fn, type> = type extends Function | Date ? type : type extends Map<infer keys, infer values> ? Map<TransformObjectDeep<fn, keys>, TransformObjectDeep<fn, values>> : type extends ReadonlyMap<infer keys, infer values> ? ReadonlyMap<TransformObjectDeep<fn, keys>, TransformObjectDeep<fn, values>> : type extends WeakMap<infer keys, infer values> ? WeakMap<Extract<TransformObjectDeep<fn, keys>, object>, TransformObjectDeep<fn, values>> : type extends Set<infer values> ? Set<TransformObjectDeep<fn, values>> : type extends ReadonlySet<infer values> ? ReadonlySet<TransformObjectDeep<fn, values>> : type extends WeakSet<infer values> ? WeakSet<Extract<TransformObjectDeep<fn, values>, object>> : type extends Array<infer values> ? IsTuple<type> extends true ? Call<fn, { [Key in keyof type]: TransformObjectDeep<fn, type[Key]> }> : Array<TransformObjectDeep<fn, values> | undefined> : type extends Promise<infer value> ? Promise<TransformObjectDeep<fn, value>> : type extends object ? Call<fn, { [Key in keyof type]: TransformObjectDeep<fn, type[Key]> }> : Equal$1<type, unknown> extends true ? unknown : Partial<type>;
2245
+ type Update<obj, path, fnOrValue> = RecursiveUpdate<obj, ParsePath<path>, fnOrValue>;
2246
+ type RecursiveUpdate<obj, pathList, fnOrValue> = obj extends any ? pathList extends [infer first, ...infer rest] ? first extends keyof obj ? { [K in keyof obj]: Equal$1<first, K> extends true ? RecursiveUpdate<obj[K], rest, fnOrValue> : obj[K] } : [first, obj] extends ["number", readonly any[]] ? RecursiveUpdate<Extract<obj, any[]>[number], rest, fnOrValue>[] : Assign<[obj, { [K in Extract<first, PropertyKey>]: RecursiveUpdate<{}, rest, fnOrValue> }]> : fnOrValue extends Fn ? Call<Extract<fnOrValue, Fn>, obj> : fnOrValue : never;
2247
+ type Create<pattern, args extends unknown[]> = pattern extends infer p extends Fn ? Apply<p, args> : pattern extends Primitive$1 ? pattern : pattern extends readonly [any, ...any] ? { [key in keyof pattern]: Create<pattern[key], args> } : pattern extends readonly (infer V)[] ? Create<V, args>[] : pattern extends object ? { [key in keyof pattern]: Create<pattern[key], args> } : pattern;
2248
+ type JoinPath<A extends string, B extends string, Sep extends string = ""> = [A] extends [never] ? B : [B] extends [never] ? A : `${A}${Sep}${B}`;
2249
+ type AllPaths<T, ParentPath extends string = never> = T extends Primitive$1 ? ParentPath : unknown extends T ? JoinPath<ParentPath, string, "."> : T extends readonly any[] ? Keys<T> extends infer key extends string | number ? JoinPath<ParentPath, `[${key}]`> | AllPaths<T[number], JoinPath<ParentPath, `[${key}]`>> : never : keyof T extends infer key extends keyof T & string ? key extends any ? JoinPath<ParentPath, key, "."> | AllPaths<T[key], JoinPath<ParentPath, key, ".">> : never : ParentPath;
2250
+ //#endregion
2251
+ //#region node_modules/hotscript/dist/internals/objects/Objects.d.ts
2252
+ declare namespace Objects {
2253
+ /**
2254
+ * Create an object from a union of `[key, value]` entries.
2255
+ * @param entries - union of entries to convert to an object
2256
+ * @returns an object
2257
+ * @example
2258
+ * ```ts
2259
+ * type T0 = Call<Objects.FromEntries, ["a", 1] | ["b", true]>; // { a: 1; b: true }
2260
+ * ```
2261
+ */
2262
+ export interface FromEntries extends Fn {
2263
+ return: FromEntries<Extract<this["arg0"], [PropertyKey, any]>>;
2264
+ }
2265
+ /**
2266
+ * Turn an object into a union of entries
2267
+ * @param obj - The object to transform to entries
2268
+ * @returns a union of `[key, value]` entry tuples.
2269
+ * @example
2270
+ * ```ts
2271
+ * type T0 = Call<Objects.Entries, { a: 1; b: true }>; // ["a", 1] | ["b", true]
2272
+ * ```
2273
+ */
2274
+ export interface Entries extends Fn {
2275
+ return: Entries<this["arg0"]>;
2276
+ }
2277
+ type MapValuesImpl<T, fn extends Fn> = { [K in keyof T]: Call<fn, T[K], K> };
2278
+ /**
2279
+ * Map over values in an object type.
2280
+ * @param fn - The function to run on every object value
2281
+ * @param obj - The object to transform
2282
+ * @returns a new object with updated values
2283
+ * @example
2284
+ * ```ts
2285
+ * type T0 = Call<
2286
+ * Objects.MapValues<Strings.ToNumber>,
2287
+ * { a: "1"; b: "2" }
2288
+ * >; // { a: 1, b: 2 }
2289
+ * ```
2290
+ */
2291
+ export interface MapValues<fn extends Fn> extends Fn {
2292
+ return: MapValuesImpl<this["arg0"], fn>;
2293
+ }
2294
+ type MapKeysImpl<T, fn extends Fn> = { [K in keyof T as Extract<Call<fn, K>, PropertyKey>]: T[K] };
2295
+ /**
2296
+ * Map over keys in an object type.
2297
+ * @param fn - The function to run on every object key
2298
+ * @param obj - The object to transform
2299
+ * @returns a new object with updated keys
2300
+ * @example
2301
+ * ```ts
2302
+ * type T0 = Call<
2303
+ * Objects.MapKeys<Strings.Uppercase>,
2304
+ * { a: 1; b: 2 }
2305
+ * >; // { A: 1, B: 2 }
2306
+ * ```
2307
+ */
2308
+ export interface MapKeys<fn extends Fn> extends Fn {
2309
+ return: MapKeysImpl<this["arg0"], fn>;
2310
+ }
2311
+ /**
2312
+ * Turn object keys into kebab-case
2313
+ * @param obj - The object to transform
2314
+ * @returns a new object with updated keys
2315
+ * @example
2316
+ * ```ts
2317
+ * type T0 = Call<
2318
+ * Objects.KebabCase,
2319
+ * { userName: "Bob" }
2320
+ * >; // { "user-name": "Bob" }
2321
+ * ```
2322
+ */
2323
+ export interface KebabCase extends Fn {
2324
+ return: Call<MapKeys<Strings.KebabCase>, this["arg0"]>;
2325
+ }
2326
+ /**
2327
+ * Turn object keys into snake_case
2328
+ * @param obj - The object to transform
2329
+ * @returns a new object with updated keys
2330
+ * @example
2331
+ * ```ts
2332
+ * type T0 = Call<
2333
+ * Objects.SnakeCase,
2334
+ * { userName: "Bob" }
2335
+ * >; // { user_name: "Bob" }
2336
+ * ```
2337
+ */
2338
+ export interface SnakeCase extends Fn {
2339
+ return: Call<MapKeys<Strings.SnakeCase>, this["arg0"]>;
2340
+ }
2341
+ /**
2342
+ * Turn object keys into camelCase
2343
+ * @param obj - The object to transform
2344
+ * @returns a new object with updated keys
2345
+ * @example
2346
+ * ```ts
2347
+ * type T0 = Call<
2348
+ * Objects.CamelCase,
2349
+ * { user_name: "Bob" }
2350
+ * >; // { userName: "Bob" }
2351
+ * ```
2352
+ */
2353
+ export interface CamelCase extends Fn {
2354
+ return: Call<MapKeys<Strings.CamelCase>, this["arg0"]>;
2355
+ }
2356
+ type MapKeysDeepImpl<T, fn extends Fn> = IsArrayStrict<T> extends true ? MapKeysDeepImpl<Extract<T, readonly any[]>[number], fn>[] : T extends object ? { [K in keyof T as Extract<Call<fn, K>, PropertyKey>]: Prettify$1<MapKeysDeepImpl<T[K], fn>> } : T;
2357
+ /**
2358
+ * Recursively transform all keys in a structure of object types
2359
+ * @param fn - The function to apply to every key
2360
+ * @param obj - The object to transform
2361
+ * @returns a new object with updated keys
2362
+ * @example
2363
+ * ```ts
2364
+ * type T0 = Call<
2365
+ * Objects.MapKeysDeep<Strings.Prepend<'_'>>,
2366
+ * { a: { b: { c: string } } }
2367
+ * >; // { _a: { _b: { _c: string } } }
2368
+ * ```
2369
+ */
2370
+ export interface MapKeysDeep<fn extends Fn> extends Fn {
2371
+ return: MapKeysDeepImpl<this["arg0"], fn>;
2372
+ }
2373
+ /**
2374
+ * Recursively transform all keys of a deeply nested object
2375
+ * to kebab-case.
2376
+ * @param obj - The object to transform
2377
+ * @returns a new object with updated keys
2378
+ * @example
2379
+ * ```ts
2380
+ * type T0 = Call<
2381
+ * Objects.KebabCaseDeep,
2382
+ * { currentUser: { firstName: string } }
2383
+ * >; // { "current-user": { "first-name": string } }
2384
+ * ```
2385
+ */
2386
+ export interface KebabCaseDeep extends Fn {
2387
+ return: Call<MapKeysDeep<Strings.KebabCase>, this["arg0"]>;
2388
+ }
2389
+ /**
2390
+ * Recursively transform all keys of a deeply nested object
2391
+ * to snake_case.
2392
+ * @param obj - The object to transform
2393
+ * @returns a new object with updated keys
2394
+ * @example
2395
+ * ```ts
2396
+ * type T0 = Call<
2397
+ * Objects.SnakeCaseDeep,
2398
+ * { currentUser: { firstName: string } }
2399
+ * >; // { current_user: { first_name: string } }
2400
+ * ```
2401
+ */
2402
+ export interface SnakeCaseDeep extends Fn {
2403
+ return: Call<MapKeysDeep<Strings.SnakeCase>, this["arg0"]>;
2404
+ }
2405
+ /**
2406
+ * Recursively transform all keys of a deeply nested object
2407
+ * to camelCase.
2408
+ * @param obj - The object to transform
2409
+ * @returns a new object with updated keys
2410
+ * @example
2411
+ * ```ts
2412
+ * type T0 = Call<
2413
+ * Objects.CamelCaseDeep,
2414
+ * { current_user: { first_name: string } }
2415
+ * >; // { currentUser: { firstName: string } }
2416
+ * ```
2417
+ */
2418
+ export interface CamelCaseDeep extends Fn {
2419
+ return: Call<MapKeysDeep<Strings.CamelCase>, this["arg0"]>;
2420
+ }
2421
+ /**
2422
+ * Only keep keys of an object if they are
2423
+ * assignable to some type.
2424
+ * @param key - The type remaining keys should be assignable to
2425
+ * @param obj - The object to filter
2426
+ * @returns a filtered object
2427
+ * @example
2428
+ * ```ts
2429
+ * type T0 = Call<
2430
+ * Objects.Pick<"a" | "b">,
2431
+ * { a: 1, b: 1, c: 1 }
2432
+ * >; // { a: 1, b: 1 }
2433
+ * ```
2434
+ */
2435
+ export type Pick<key = unset, obj = unset> = PartialApply<PickFn, [key, obj]>;
2436
+ interface PickFn extends Fn {
2437
+ return: PickImpl<this["arg1"], this["arg0"]>;
2438
+ }
2439
+ type PickImpl<obj, keys> = { [key in Extract<keyof obj, keys>]: obj[key] };
2440
+ /**
2441
+ * Only keep keys of an object if they aren't
2442
+ * assignable to some type.
2443
+ * @param key - The type remaining keys should _not_ be assignable to
2444
+ * @param obj - The object to filter
2445
+ * @returns a filtered object
2446
+ * @example
2447
+ * ```ts
2448
+ * type T0 = Call<
2449
+ * Objects.Pick<"a" | "b">,
2450
+ * { a: 1, b: 1, c: 1 }
2451
+ * >; // { c: 1 }
2452
+ * ```
2453
+ */
2454
+ export type Omit<key = unset, obj = unset> = PartialApply<OmitFn, [key, obj]>;
2455
+ interface OmitFn extends Fn {
2456
+ return: OmitImpl<this["arg1"], this["arg0"]>;
2457
+ }
2458
+ type OmitImpl<obj, keys> = { [key in Exclude<keyof obj, keys>]: obj[key] };
2459
+ /**
2460
+ * Only keep keys of an object if the predicate function
2461
+ * returns true
2462
+ * @param fn - The predicate function, taking (value, key) as arguments
2463
+ * @param obj - The object to filter
2464
+ * @returns a filtered object
2465
+ * @example
2466
+ * ```ts
2467
+ * type T0 = Call<
2468
+ * Objects.PickBy<Strings.StartsWith<"a">>,
2469
+ * { a: "ab", b: "ac", c: "bc" }
2470
+ * >; // { a: "ab", b: "ac" }
2471
+ * ```
2472
+ */
2473
+ export interface PickBy<fn extends Fn> extends Fn {
2474
+ return: PickByImpl<this["arg0"], fn>;
2475
+ }
2476
+ type PickByImpl<T, fn extends Fn> = FromEntries<PickEntriesImpl<Entries<T>, fn>>;
2477
+ type PickEntriesImpl<entries extends [PropertyKey, any], fn extends Fn> = entries extends any ? Call<fn, entries[1], entries[0]> extends true ? entries : never : never;
2478
+ /**
2479
+ * Only keep keys of an object if the predicate function
2480
+ * returns false
2481
+ * @param fn - The predicate function, taking (value, key) as arguments
2482
+ * @param obj - The object to filter
2483
+ * @returns a filtered object
2484
+ * @example
2485
+ * ```ts
2486
+ * type T0 = Call<
2487
+ * Objects.PickBy<Strings.StartsWith<"a">>,
2488
+ * { a: "ab", b: "ac", c: "bc" }
2489
+ * >; // { c: "bc" }
2490
+ * ```
2491
+ */
2492
+ export interface OmitBy<fn extends Fn> extends Fn {
2493
+ return: OmitByImpl<this["arg0"], fn>;
2494
+ }
2495
+ type OmitByImpl<T, fn extends Fn> = FromEntries<OmitEntriesImpl<Entries<T>, fn>>;
2496
+ type OmitEntriesImpl<entries extends [PropertyKey, any], fn extends Fn> = entries extends any ? Call<fn, entries[1], entries[0]> extends true ? never : entries : never;
2497
+ /**
2498
+ * Merge several objects together
2499
+ * @param {...objects} - Objects to merge
2500
+ * @returns a merged object
2501
+ * @example
2502
+ * ```ts
2503
+ * type T0 = Call<Objects.Assign<{ a: string }>, { b: number }>; // { a: string, b: number }
2504
+ * type T1 = Call<Objects.Assign<{ a: string }, { b: number }>>; // { a: string, b: number }
2505
+ * type T2 = Call<Objects.Assign<{ a: 1 }, { b: 1 }, { c: 1 }>>; // { a: 1, b: 1, c: 1 }
2506
+ * ```
2507
+ */
2508
+ export type Assign<arg1 = unset, arg2 = unset, arg3 = unset, arg4 = unset, arg5 = unset> = PartialApply<AssignFn, [arg1, arg2, arg3, arg4, arg5]>;
2509
+ interface AssignFn extends Fn {
2510
+ return: Assign<this["args"]>;
2511
+ }
2512
+ /**
2513
+ * Make all properties of an object readonly
2514
+ * @description This function is used to make properties of an object readonly
2515
+ * @param value - The object to make properties readonly
2516
+ * @returns The object with its properties made readonly
2517
+ * @example
2518
+ * ```ts
2519
+ * type T0 = Call<Objects.Readonly, { a: 1; b: true }>; // { readonly a:1; readonly b: true}
2520
+ * type T1 = Call<Objects.Readonly<{ a: 1; b: true }>>; // { readonly a:1; readonly b: true}
2521
+ * ```
2522
+ */
2523
+ export type Readonly<value = unset> = PartialApply<ReadonlyFn, [value]>;
2524
+ interface ReadonlyFn extends Fn {
2525
+ return: this["args"] extends [infer value] ? Std._Readonly<value> : never;
2526
+ }
2527
+ /**
2528
+ * Make all properties of an object required
2529
+ * @description This function is used to make properties of an object required
2530
+ * @param value - The object to make properties required
2531
+ * @returns The object with its properties made required
2532
+ * @example
2533
+ * ```ts
2534
+ * type T0 = Call<Objects.Required, { a?: 1; b?: true }>; // { a:1; b: true}
2535
+ * type T1 = Call<Objects.Required<{ a?: 1; b?: true }>>; // { a:1; b: true}
2536
+ * ```
2537
+ */
2538
+ export type Required<value = unset> = PartialApply<RequiredFn, [value]>;
2539
+ interface RequiredFn extends Fn {
2540
+ return: this["args"] extends [infer value] ? Std._Required<value> : never;
2541
+ }
2542
+ /**
2543
+ * Make all properties of an object optional
2544
+ * @description This function is used to make properties of an object optional
2545
+ * @param value - The object to make properties optional
2546
+ * @returns The object with its properties made optional
2547
+ * @example
2548
+ * ```ts
2549
+ * type T0 = Call<Objects.Partial, { a: 1; b: true }>; // { a?:1; b?: true}
2550
+ * type T1 = Call<Objects.Partial<{ a: 1; b: true }>>; // { a?:1; b?: true}
2551
+ * ```
2552
+ */
2553
+ export type Partial<value = unset> = PartialApply<PartialFn, [value]>;
2554
+ interface PartialFn extends Fn {
2555
+ return: this["args"] extends [infer value] ? Std._Partial<value> : never;
2556
+ }
2557
+ /**
2558
+ * Make all properties of an object mutable
2559
+ * @param value - The object to make properties mutable
2560
+ * @returns The object with its properties made mutable
2561
+ * @example
2562
+ * ```ts
2563
+ * type T0 = Call<Objects.Mutable, { readonly a: 1; readonly b: true }>; // { a:1; b: true }
2564
+ * ```
2565
+ */
2566
+ export type Mutable<obj = unset> = PartialApply<MutableFn, [obj]>;
2567
+ interface MutableFn extends Fn {
2568
+ return: this["args"] extends [infer obj, ...any] ? { -readonly [key in keyof obj]: obj[key] } : never;
2569
+ }
2570
+ /**
2571
+ * Makes all levels of an object optional
2572
+ * @description This function is used to make all levels of an object optional
2573
+ * @param obj - The object to make levels optional
2574
+ * @returns The object with its levels made optional
2575
+ *
2576
+ * @example
2577
+ * ```ts
2578
+ * type T0 = Call<Objects.PartialDeep, { a: 1; b: true }>;
2579
+ * // ^? { a?:1; b?: true}
2580
+ * type T1 = Call<Objects.PartialDeep, { a: 1; b: { c: true } }>;
2581
+ * // ^? { a?:1; b?: { c?: true } }
2582
+ * type T2 = Call<Objects.PartialDeep, { a: 1; b: { c: true, d: { e: false } } }>;
2583
+ * // ^? { a?:1; b?: { c?: true, d?: { e?: false } } }
2584
+ */
2585
+ export type PartialDeep<obj = unset> = PartialApply<PartialDeepFn, [obj]>;
2586
+ interface PartialDeepFn extends Fn {
2587
+ return: this["args"] extends [infer obj] ? TransformObjectDeep<PartialFn, obj> : never;
2588
+ }
2589
+ /**
2590
+ * Makes all levels of an object required
2591
+ * @description This function is used to make all levels of an object required
2592
+ * @param obj - The object to make levels required
2593
+ * @returns The object with its levels made required
2594
+ *
2595
+ * @example
2596
+ * ```ts
2597
+ * type T0 = Call<Objects.RequiredDeep, { a?:1; b?: true }>;
2598
+ * // ^? { a: 1; b: true }
2599
+ * type T1 = Call<Objects.RequiredDeep, { a?:1; b?: { c?: true } }>;
2600
+ * // ^? { a: 1; b: { c: true } }
2601
+ * type T2 = Call<Objects.RequiredDeep, { a?:1; b?: { c?: true, d?: { e?: false } } }>;
2602
+ * // ^? { a: 1; b: { c: true, d: { e: false } } }
2603
+ */
2604
+ export type RequiredDeep<obj = unset> = PartialApply<RequiredDeepFn, [obj]>;
2605
+ interface RequiredDeepFn extends Fn {
2606
+ return: this["args"] extends [infer obj] ? TransformObjectDeep<RequiredFn, obj> : never;
2607
+ }
2608
+ /**
2609
+ * Makes all levels of an object readonly
2610
+ * @description This function is used to make all levels of an object readonly
2611
+ * @param obj - The object to make levels readonly
2612
+ * @returns The object with its levels made readonly
2613
+ *
2614
+ * @example
2615
+ * ```ts
2616
+ * type T0 = Call<Objects.ReadonlyDeep, { a:1; b: true }>;
2617
+ * // ^? { readonly a: 1; readonly b: true }
2618
+ * type T1 = Call<Objects.ReadonlyDeep, { a:1; b: { c: true } }>;
2619
+ * // ^? { readonly a: 1; readonly b: { readonly c: true } }
2620
+ * type T2 = Call<Objects.ReadonlyDeep, { a:1; b: { c: true, d: { e: false } } }>;
2621
+ * // ^? { readonly a: 1; readonly b: { readonly c: true, d: { readonly e: false } } }
2622
+ */
2623
+ export type ReadonlyDeep<obj = unset> = PartialApply<ReadonlyDeepFn, [obj]>;
2624
+ interface ReadonlyDeepFn extends Fn {
2625
+ return: this["args"] extends [infer obj] ? TransformObjectDeep<ReadonlyFn, obj> : never;
2626
+ }
2627
+ /**
2628
+ * Makes all levels of an object mutable
2629
+ * @description This function is used to make all levels of an object mutable
2630
+ * @param obj - The object to make levels mutable
2631
+ * @returns The object with its levels made mutable
2632
+ *
2633
+ * @example
2634
+ * ```ts
2635
+ * type T0 = Call<Objects.MutableDeep, { readonly a: 1; readonly b: true }>;
2636
+ * // ^? { a:1; b: true }
2637
+ * type T1 = Call<Objects.MutableDeep, { readonly a: 1; readonly b: { readonly c: true } }>;
2638
+ * // ^? { a:1; b: { c: true } }
2639
+ * type T2 = Call<Objects.MutableDeep, { readonly a: 1; readonly b: { readonly c: true, d: { readonly e: false } } }>;
2640
+ * // ^? { a:1; b: { c: true, d: { e: false } } }
2641
+ */
2642
+ export type MutableDeep<obj = unset> = PartialApply<MutableDeepFn, [obj]>;
2643
+ interface MutableDeepFn extends Fn {
2644
+ return: this["args"] extends [infer obj] ? TransformObjectDeep<MutableFn, obj> : never;
2645
+ }
2646
+ /**
2647
+ * Get a value within an object or a tuple type.
2648
+ * @description This function takes an object, a path to one of its properties,
2649
+ * and returns the property under that path.
2650
+ * @param path - the path to the property to get.
2651
+ * @param obj - the object to read from.
2652
+ * @returns The value under that path
2653
+ *
2654
+ * @example
2655
+ * ```ts
2656
+ * type T0 = Call<O.Get<'a'>, { a: 1, b: 1 }>; // 1
2657
+ * type T1 = Call<O.Get<'a[0]'>, { a: [1, 2, 3] }>; // 1
2658
+ * type T2 = Call<O.Get<'a.b'>, { a: { b: 1 }, c: '' }>; // 1
2659
+ * ```
2660
+ */
2661
+ export type Get<path extends string | number | _ | unset = unset, obj = unset> = PartialApply<GetFn, [path, obj]>;
2662
+ export interface GetFn extends Fn {
2663
+ return: this["args"] extends [infer path extends string | number, infer obj, ...any] ? GetFromPath<obj, path> : never;
2664
+ }
2665
+ /**
2666
+ * Updates an object or a tuple type.
2667
+ * @description This function takes an object, a path to one of its properties,
2668
+ * a new value or a function to apply to this property, and returns a new version
2669
+ * of this object with this property updated.
2670
+ * @param path - the path to the property to update
2671
+ * @param valueOrFn - a value to set, or a function to apply on the target property
2672
+ * @param obj - the object to update.
2673
+ * @returns The updated object.
2674
+ *
2675
+ * @example
2676
+ * ```ts
2677
+ * type T0 = Call<O.Update<'a', Numbers.Add<1>>, { a: 1, b: 1 }>; // { a: 2, b: 1 }
2678
+ * type T1 = Call<O.Update<'a[0]', 4>, { a: [1, 2, 3] }>; // { a: [4, 2, 3] }
2679
+ * type T2 = Call<O.Update<'a.b', Numbers.Add<1>>, { a: { b: 1 }, c: '' }>; // { a: { b: 2 }, c: '' }
2680
+ * type T3 = Call<O.Update<'a.b', "Hello">, { a: { b: 1 } }>; // { a: { b: "Hello" } }
2681
+ * ```
2682
+ */
2683
+ export type Update<path extends string | number | _ | unset = unset, fnOrValue = unset, obj = unset> = PartialApply<UpdateFn, [path, fnOrValue, obj]>;
2684
+ export interface UpdateFn extends Fn {
2685
+ return: this["args"] extends [infer path extends string | number, infer fnOrValue, infer obj, ...any] ? Update<obj, path, fnOrValue> : never;
2686
+ }
2687
+ /**
2688
+ * Create an object from parameters
2689
+ * @description This function is used to make an object from parameters
2690
+ * And allows to place the parameters in any object property
2691
+ * @param args - The parameters to make the object from
2692
+ * @returns The object made from the parameters
2693
+ *
2694
+ * @example
2695
+ * ```ts
2696
+ * type T0 = Apply<O.Create<{ a: arg0, b: arg1 }>, [1, 2]>; // { a: 1, b: 2 }
2697
+ * ```
2698
+ */
2699
+ interface CreateFn extends Fn {
2700
+ return: this["args"] extends [infer pattern, ...infer args] ? Create<pattern, args> : never;
2701
+ }
2702
+ export type Create<pattern = unset, arg0 = unset, arg1 = unset, arg2 = unset, arg3 = unset> = PartialApply<CreateFn, [pattern, arg0, arg1, arg2, arg3]>;
2703
+ interface RecordFn extends Fn {
2704
+ return: this["args"] extends [infer union extends string, infer value] ? Std._Record<union, value> : never;
2705
+ }
2706
+ /**
2707
+ * Create a record from a union of strings and a value type
2708
+ * @description This function is used to create a record from a union of strings
2709
+ * @param union - The union of strings to create the record from
2710
+ * @param value - The value to assign to each property
2711
+ * @returns The record created from the union of strings
2712
+ *
2713
+ * @example
2714
+ * ```ts
2715
+ * type T0 = Call<O.Record<'a' | 'b' | 'c'>, 1>; // { a: 1, b: 1, c: 1 }
2716
+ * ```
2717
+ */
2718
+ export type Record<union extends string | _ | unset = unset, value = unset> = PartialApply<RecordFn, [union, value]>;
2719
+ /**
2720
+ * Smarter version of keyof that also works with tuples
2721
+ * @params args[0] - The type to extract keys from
2722
+ * @returns An union of all the types's keys
2723
+ * @example
2724
+ * ```ts
2725
+ * type T0 = Call<O.Keys, ['a', 'b', 'c']>; // 0 | 1 | 2
2726
+ * ```
2727
+ */
2728
+ export interface Keys extends Fn {
2729
+ return: Keys<this["arg0"]>;
2730
+ }
2731
+ /**
2732
+ * Smarter version of Values that also works with tuples
2733
+ * @params args[0] - The type to extract values from
2734
+ * @returns An union of all the types's values
2735
+ * @example
2736
+ * ```ts
2737
+ * type T0 = Call<O.Values, ['a', 'b', 'c']>; // 'a' | 'b' | 'c'
2738
+ * ```
2739
+ */
2740
+ export interface Values extends Fn {
2741
+ return: Values<this["arg0"]>;
2742
+ }
2743
+ /**
2744
+ * Create a union of all deep paths the object has
2745
+ * @description This function is used to create a union from an object with keys
2746
+ * @param obj - The object from which the union will be generated
2747
+ * @returns An union with all the possible deep paths
2748
+ *
2749
+ * @example
2750
+ * ```ts
2751
+ * type T0 = Call<O.AllPaths, { a: { b: number } }>; // 'a' | 'a.b'
2752
+ * ```
2753
+ */
2754
+ export interface AllPaths extends Fn {
2755
+ return: AllPaths<this["arg0"]>;
2756
+ }
2757
+ export {};
2758
+ }
2759
+ //#endregion
2760
+ //#region node_modules/ts-algebra/lib/utils/and.d.ts
2761
+ declare type And$1<BOOL_A, BOOL_B> = BOOL_A extends true ? BOOL_B extends true ? true : false : false;
2762
+ //#endregion
2763
+ //#region node_modules/ts-algebra/lib/utils/extends.d.ts
2764
+ declare type DoesExtend$1<TYPE_A, TYPE_B> = [TYPE_A] extends [TYPE_B] ? true : false;
2765
+ declare type ArrayKeys = keyof [];
2766
+ declare type IsObject<TYPE> = TYPE extends object ? ArrayKeys extends Extract<keyof TYPE, ArrayKeys> ? false : true : false;
2767
+ declare type IsArray<TYPE> = TYPE extends object ? ArrayKeys extends Extract<keyof TYPE, ArrayKeys> ? true : false : false;
2768
+ //#endregion
2769
+ //#region node_modules/ts-algebra/lib/utils/if.d.ts
2770
+ declare type If<CONDITION extends boolean, THEN, ELSE = never> = CONDITION extends true ? THEN : ELSE;
2771
+ //#endregion
2772
+ //#region node_modules/ts-algebra/lib/utils/intersectUnion.d.ts
2773
+ declare type IntersectUnion$1<UNION> = (UNION extends unknown ? (arg: UNION) => void : never) extends ((arg: infer INTERSECTION) => void) ? INTERSECTION : never;
2774
+ //#endregion
2775
+ //#region node_modules/ts-algebra/lib/utils/isNever.d.ts
2776
+ declare type IsNever<TYPE> = [TYPE] extends [never] ? true : false;
2777
+ //#endregion
2778
+ //#region node_modules/ts-algebra/lib/utils/merge.d.ts
2779
+ declare type DeepMergeUnsafe<TYPE_A, TYPE_B> = IsObject<TYPE_A> extends true ? IsObject<TYPE_B> extends true ? { [KEY in keyof (TYPE_A & TYPE_B)]: KEY extends keyof TYPE_B ? KEY extends keyof TYPE_A ? DeepMergeUnsafe<TYPE_A[KEY], TYPE_B[KEY]> : TYPE_B[KEY] : KEY extends keyof TYPE_A ? TYPE_A[KEY] : never } : TYPE_B : IsArray<TYPE_A> extends true ? IsArray<TYPE_B> extends true ? TYPE_B extends unknown[] ? [...(TYPE_A extends unknown[] ? TYPE_A : never), TYPE_B] : never : TYPE_B : TYPE_B;
2780
+ //#endregion
2781
+ //#region node_modules/ts-algebra/lib/utils/not.d.ts
2782
+ declare type Not$1<BOOL extends boolean> = BOOL extends false ? true : BOOL extends true ? false : never;
2783
+ //#endregion
2784
+ //#region node_modules/ts-algebra/lib/utils/or.d.ts
2785
+ declare type Or<BOOL_A extends boolean, BOOL_B extends boolean> = BOOL_A extends true ? true : BOOL_B extends true ? true : false;
2786
+ //#endregion
2787
+ //#region node_modules/ts-algebra/lib/utils/prettify.d.ts
2788
+ declare type Prettify<TYPE> = IsObject<TYPE> extends true ? { [KEY in keyof TYPE]: KEY extends keyof TYPE ? TYPE[KEY] : never } : TYPE;
2789
+ //#endregion
2790
+ //#region node_modules/ts-algebra/lib/utils/tail.d.ts
2791
+ declare type Tail$1<ARRAY extends unknown[]> = ARRAY extends readonly [] ? ARRAY : ARRAY extends readonly [unknown?, ...infer TAIL] ? TAIL : ARRAY;
2792
+ //#endregion
2793
+ //#region node_modules/ts-algebra/lib/utils/unionLast.d.ts
2794
+ declare type UnionLast<UNION> = IntersectUnion$1<UNION extends unknown ? (x: UNION) => void : never> extends ((x: infer LAST) => void) ? LAST : never;
2795
+ //#endregion
2796
+ //#region node_modules/ts-algebra/lib/utils/unionPop.d.ts
2797
+ declare type UnionPop<UNION> = Exclude<UNION, UnionLast<UNION>>;
2798
+ //#endregion
2799
+ //#region node_modules/ts-algebra/lib/meta-types/never.d.ts
2800
+ declare type NeverTypeId = "never";
2801
+ declare type Never = {
2802
+ type: NeverTypeId;
2803
+ };
2804
+ declare type NeverType = Never;
2805
+ declare type ResolveNever = never;
2806
+ //#endregion
2807
+ //#region node_modules/ts-algebra/lib/meta-types/utils.d.ts
2808
+ declare type IsSerialized<SERIALIZABLE_META_TYPE extends SerializableType> = SERIALIZABLE_META_TYPE["isSerialized"];
2809
+ declare type Deserialized<SERIALIZABLE_META_TYPE extends SerializableType> = SERIALIZABLE_META_TYPE["deserialized"];
2810
+ //#endregion
2811
+ //#region node_modules/ts-algebra/lib/meta-types/const.d.ts
2812
+ declare type ConstTypeId = "const";
2813
+ declare type Const<VALUE, IS_SERIALIZED extends boolean = false, DESERIALIZED = never> = If<IsNever<VALUE>, Never, {
2814
+ type: ConstTypeId;
2815
+ value: VALUE;
2816
+ isSerialized: IS_SERIALIZED;
2817
+ deserialized: DESERIALIZED;
2818
+ }>;
2819
+ declare type ConstType = {
2820
+ type: ConstTypeId;
2821
+ value: unknown;
2822
+ isSerialized: boolean;
2823
+ deserialized: unknown;
2824
+ };
2825
+ declare type ConstValue<META_CONST extends ConstType> = META_CONST["value"];
2826
+ declare type ResolveConst<META_CONST extends ConstType, OPTIONS extends ResolveOptions> = If<And$1<OPTIONS["deserialize"], IsSerialized<META_CONST>>, Deserialized<META_CONST>, ConstValue<META_CONST>>;
2827
+ //#endregion
2828
+ //#region node_modules/ts-algebra/lib/meta-types/enum.d.ts
2829
+ declare type EnumTypeId = "enum";
2830
+ declare type Enum<VALUES, IS_SERIALIZED extends boolean = false, DESERIALIZED = never> = If<IsNever<VALUES>, Never, {
2831
+ type: EnumTypeId;
2832
+ values: VALUES;
2833
+ isSerialized: IS_SERIALIZED;
2834
+ deserialized: DESERIALIZED;
2835
+ }>;
2836
+ declare type EnumType = {
2837
+ type: EnumTypeId;
2838
+ values: unknown;
2839
+ isSerialized: boolean;
2840
+ deserialized: unknown;
2841
+ };
2842
+ declare type EnumValues<META_ENUM extends EnumType> = META_ENUM["values"];
2843
+ declare type ResolveEnum<META_ENUM extends EnumType, OPTIONS extends ResolveOptions> = If<And$1<OPTIONS["deserialize"], IsSerialized<META_ENUM>>, Deserialized<META_ENUM>, EnumValues<META_ENUM>>;
2844
+ //#endregion
2845
+ //#region node_modules/ts-algebra/lib/meta-types/object.d.ts
2846
+ declare type ObjectTypeId = "object";
2847
+ declare type _Object<VALUES extends Record<string, Type> = {}, REQUIRED_KEYS extends string = never, OPEN_PROPS extends Type = Never, CLOSE_ON_RESOLVE extends boolean = false, IS_SERIALIZED extends boolean = false, DESERIALIZED = never> = _$Object<VALUES, REQUIRED_KEYS, OPEN_PROPS, CLOSE_ON_RESOLVE, IS_SERIALIZED, DESERIALIZED>;
2848
+ declare type _$Object<VALUES = {}, REQUIRED_KEYS = never, OPEN_PROPS = Never, CLOSE_ON_RESOLVE = false, IS_SERIALIZED = false, DESERIALIZED = never> = DoesExtend$1<true, { [KEY in Extract<REQUIRED_KEYS, string>]: KEY extends keyof VALUES ? DoesExtend$1<VALUES[KEY], NeverType> : DoesExtend$1<OPEN_PROPS, NeverType> }[Extract<REQUIRED_KEYS, string>]> extends true ? Never : {
2849
+ type: ObjectTypeId;
2850
+ values: VALUES;
2851
+ required: REQUIRED_KEYS;
2852
+ isOpen: Not$1<DoesExtend$1<OPEN_PROPS, NeverType>>;
2853
+ openProps: OPEN_PROPS;
2854
+ closeOnResolve: CLOSE_ON_RESOLVE;
2855
+ isSerialized: IS_SERIALIZED;
2856
+ deserialized: DESERIALIZED;
2857
+ };
2858
+ declare type ObjectType = {
2859
+ type: ObjectTypeId;
2860
+ values: Record<string, Type>;
2861
+ required: string;
2862
+ isOpen: boolean;
2863
+ openProps: Type;
2864
+ closeOnResolve: boolean;
2865
+ isSerialized: boolean;
2866
+ deserialized: unknown;
2867
+ };
2868
+ declare type ObjectValues<META_OBJECT extends ObjectType> = META_OBJECT["values"];
2869
+ declare type ObjectValue<META_OBJECT extends ObjectType, KEY extends string> = KEY extends keyof ObjectValues<META_OBJECT> ? ObjectValues<META_OBJECT>[KEY] : IsObjectOpen<META_OBJECT> extends true ? ObjectOpenProps<META_OBJECT> : Never;
2870
+ declare type ObjectRequiredKeys<META_OBJECT extends ObjectType> = META_OBJECT["required"];
2871
+ declare type IsObjectOpen<META_OBJECT extends ObjectType> = META_OBJECT["isOpen"];
2872
+ declare type ObjectOpenProps<META_OBJECT extends ObjectType> = META_OBJECT["openProps"];
2873
+ declare type IsObjectClosedOnResolve<META_OBJECT extends ObjectType> = META_OBJECT["closeOnResolve"];
2874
+ declare type IsObjectEmpty<META_OBJECT extends ObjectType> = IsNever<keyof ObjectValues<META_OBJECT>>;
2875
+ declare type ResolveObject<META_OBJECT extends ObjectType, OPTIONS extends ResolveOptions> = If<And$1<OPTIONS["deserialize"], IsSerialized<META_OBJECT>>, Deserialized<META_OBJECT>, DeepMergeUnsafe<If<And$1<IsObjectOpen<META_OBJECT>, Not$1<IsObjectClosedOnResolve<META_OBJECT>>>, If<IsObjectEmpty<META_OBJECT>, {
2876
+ [KEY: string]: Resolve<ObjectOpenProps<META_OBJECT>, OPTIONS>;
2877
+ }, {
2878
+ [KEY: string]: Resolve<Any, OPTIONS>;
2879
+ }>, {}>, DeepMergeUnsafe<{ [KEY in Exclude<keyof ObjectValues<META_OBJECT>, ObjectRequiredKeys<META_OBJECT>>]?: Resolve<ObjectValues<META_OBJECT>[KEY], OPTIONS> }, { [KEY in ObjectRequiredKeys<META_OBJECT>]: KEY extends keyof ObjectValues<META_OBJECT> ? Resolve<ObjectValues<META_OBJECT>[KEY], OPTIONS> : Resolve<Any, OPTIONS> }>>>;
2880
+ //#endregion
2881
+ //#region node_modules/ts-algebra/lib/meta-types/primitive.d.ts
2882
+ declare type PrimitiveTypeId = "primitive";
2883
+ declare type Primitive<VALUE extends null | boolean | number | string, IS_SERIALIZED extends boolean = false, DESERIALIZED = never> = $Primitive<VALUE, IS_SERIALIZED, DESERIALIZED>;
2884
+ declare type $Primitive<VALUE, IS_SERIALIZED = false, DESERIALIZED = never> = If<IsNever<VALUE>, Never, {
2885
+ type: PrimitiveTypeId;
2886
+ value: VALUE;
2887
+ isSerialized: IS_SERIALIZED;
2888
+ deserialized: DESERIALIZED;
2889
+ }>;
2890
+ declare type PrimitiveType = {
2891
+ type: PrimitiveTypeId;
2892
+ value: null | boolean | number | string;
2893
+ isSerialized: boolean;
2894
+ deserialized: unknown;
2895
+ };
2896
+ declare type PrimitiveValue<META_PRIMITIVE extends PrimitiveType> = META_PRIMITIVE["value"];
2897
+ declare type ResolvePrimitive<META_PRIMITIVE extends PrimitiveType, OPTIONS extends ResolveOptions> = If<And$1<OPTIONS["deserialize"], IsSerialized<META_PRIMITIVE>>, Deserialized<META_PRIMITIVE>, PrimitiveValue<META_PRIMITIVE>>;
2898
+ //#endregion
2899
+ //#region node_modules/ts-algebra/lib/meta-types/tuple.d.ts
2900
+ declare type TupleTypeId = "tuple";
2901
+ declare type Tuple<VALUES extends Type[], OPEN_PROPS extends Type = Never, IS_SERIALIZED extends boolean = false, DESERIALIZED = never> = $Tuple<VALUES, OPEN_PROPS, IS_SERIALIZED, DESERIALIZED>;
2902
+ declare type $Tuple<VALUES, OPEN_PROPS = Never, IS_SERIALIZED = false, DESERIALIZED = never> = IsAnyValueNever<VALUES> extends true ? Never : {
2903
+ type: TupleTypeId;
2904
+ values: VALUES;
2905
+ isOpen: Not$1<DoesExtend$1<OPEN_PROPS, NeverType>>;
2906
+ openProps: OPEN_PROPS;
2907
+ isSerialized: IS_SERIALIZED;
2908
+ deserialized: DESERIALIZED;
2909
+ };
2910
+ declare type IsAnyValueNever<TUPLE> = TUPLE extends [infer TUPLE_HEAD, ...infer TUPLE_TAIL] ? TUPLE_HEAD extends NeverType ? true : IsAnyValueNever<TUPLE_TAIL> : false;
2911
+ declare type TupleType = {
2912
+ type: TupleTypeId;
2913
+ values: Type[];
2914
+ isOpen: boolean;
2915
+ openProps: Type;
2916
+ isSerialized: boolean;
2917
+ deserialized: unknown;
2918
+ };
2919
+ declare type TupleValues<META_TUPLE extends TupleType> = META_TUPLE["values"];
2920
+ declare type IsTupleOpen<META_TUPLE extends TupleType> = META_TUPLE["isOpen"];
2921
+ declare type TupleOpenProps<META_TUPLE extends TupleType> = META_TUPLE["openProps"];
2922
+ declare type ResolveTuple<META_TUPLE extends TupleType, OPTIONS extends ResolveOptions> = If<And$1<OPTIONS["deserialize"], IsSerialized<META_TUPLE>>, Deserialized<META_TUPLE>, If<IsTupleOpen<META_TUPLE>, [...RecurseOnTuple<TupleValues<META_TUPLE>, OPTIONS>, ...Resolve<TupleOpenProps<META_TUPLE>, OPTIONS>[]], RecurseOnTuple<TupleValues<META_TUPLE>, OPTIONS>>>;
2923
+ declare type RecurseOnTuple<VALUES extends Type[], OPTIONS extends ResolveOptions, RESULT extends unknown[] = []> = VALUES extends [infer VALUES_HEAD, ...infer VALUES_TAIL] ? VALUES_HEAD extends Type ? VALUES_TAIL extends Type[] ? RecurseOnTuple<VALUES_TAIL, OPTIONS, [...RESULT, Resolve<VALUES_HEAD, OPTIONS>]> : never : never : RESULT;
2924
+ //#endregion
2925
+ //#region node_modules/ts-algebra/lib/meta-types/union.d.ts
2926
+ declare type UnionTypeId = "union";
2927
+ declare type Union<VALUES extends Type> = $Union<VALUES>;
2928
+ declare type $Union<VALUES> = If<IsNever<VALUES>, Never, DoesExtend$1<VALUES, NeverType> extends true ? Never : {
2929
+ type: UnionTypeId;
2930
+ values: VALUES;
2931
+ }>;
2932
+ declare type UnionType = {
2933
+ type: UnionTypeId;
2934
+ values: Type;
2935
+ };
2936
+ declare type UnionValues<META_UNION extends UnionType> = META_UNION["values"];
2937
+ declare type ResolveUnion<META_UNION extends UnionType, OPTIONS extends ResolveOptions> = RecurseOnUnion<UnionValues<META_UNION>, OPTIONS>;
2938
+ declare type RecurseOnUnion<VALUES extends Type, OPTIONS extends ResolveOptions> = VALUES extends infer META_TYPE ? $Resolve<META_TYPE, OPTIONS> : never;
2939
+ //#endregion
2940
+ //#region node_modules/ts-algebra/lib/meta-types/type.d.ts
2941
+ declare type Type = NeverType | AnyType | ConstType | EnumType | PrimitiveType | ArrayType | TupleType | ObjectType | UnionType;
2942
+ declare type SerializableType = Type extends infer META_TYPE ? META_TYPE extends {
2943
+ isSerialized: boolean;
2944
+ deserialized: unknown;
2945
+ } ? META_TYPE : never : never;
2946
+ //#endregion
2947
+ //#region node_modules/ts-algebra/lib/meta-types/array.d.ts
2948
+ declare type ArrayTypeId = "array";
2949
+ declare type _Array<VALUES extends Type = Any, IS_SERIALIZED extends boolean = false, DESERIALIZED = never> = _$Array<VALUES, IS_SERIALIZED, DESERIALIZED>;
2950
+ declare type _$Array<VALUES = Any, IS_SERIALIZED = false, DESERIALIZED = never> = {
2951
+ type: ArrayTypeId;
2952
+ values: VALUES;
2953
+ isSerialized: IS_SERIALIZED;
2954
+ deserialized: DESERIALIZED;
2955
+ };
2956
+ declare type ArrayType = {
2957
+ type: ArrayTypeId;
2958
+ values: Type;
2959
+ isSerialized: boolean;
2960
+ deserialized: unknown;
2961
+ };
2962
+ declare type ArrayValues<META_ARRAY extends ArrayType> = META_ARRAY["values"];
2963
+ declare type ResolveArray<META_ARRAY extends ArrayType, OPTIONS extends ResolveOptions> = If<And$1<OPTIONS["deserialize"], IsSerialized<META_ARRAY>>, Deserialized<META_ARRAY>, ArrayValues<META_ARRAY> extends NeverType ? [] : Prettify<Resolve<ArrayValues<META_ARRAY>, OPTIONS>[]>>;
2964
+ //#endregion
2965
+ //#region node_modules/ts-algebra/lib/meta-types/resolve.d.ts
2966
+ declare type ResolveOptions = {
2967
+ deserialize: boolean;
2968
+ };
2969
+ declare type ResolveDefaultOptions = {
2970
+ deserialize: true;
2971
+ };
2972
+ declare type Resolve<META_TYPE extends Type, OPTIONS extends ResolveOptions = ResolveDefaultOptions> = $Resolve<META_TYPE, OPTIONS>;
2973
+ declare type $Resolve<META_TYPE, OPTIONS extends ResolveOptions = ResolveDefaultOptions> = META_TYPE extends AnyType ? ResolveAny<META_TYPE, OPTIONS> : META_TYPE extends NeverType ? ResolveNever : META_TYPE extends ConstType ? ResolveConst<META_TYPE, OPTIONS> : META_TYPE extends EnumType ? ResolveEnum<META_TYPE, OPTIONS> : META_TYPE extends PrimitiveType ? ResolvePrimitive<META_TYPE, OPTIONS> : META_TYPE extends ArrayType ? ResolveArray<META_TYPE, OPTIONS> : META_TYPE extends TupleType ? ResolveTuple<META_TYPE, OPTIONS> : META_TYPE extends ObjectType ? ResolveObject<META_TYPE, OPTIONS> : META_TYPE extends UnionType ? ResolveUnion<META_TYPE, OPTIONS> : never;
2974
+ //#endregion
2975
+ //#region node_modules/ts-algebra/lib/meta-types/any.d.ts
2976
+ declare type AnyTypeId = "any";
2977
+ declare type Any<IS_SERIALIZED extends boolean = false, DESERIALIZED = never> = {
2978
+ type: AnyTypeId;
2979
+ isSerialized: IS_SERIALIZED;
2980
+ deserialized: DESERIALIZED;
2981
+ };
2982
+ declare type AnyType = {
2983
+ type: AnyTypeId;
2984
+ isSerialized: boolean;
2985
+ deserialized: unknown;
2986
+ };
2987
+ declare type ResolveAny<META_ANY extends AnyType, OPTIONS extends ResolveOptions> = If<And$1<OPTIONS["deserialize"], IsSerialized<META_ANY>>, Deserialized<META_ANY>, unknown>;
2988
+ //#endregion
2989
+ //#region node_modules/ts-algebra/lib/meta-types/intersection/union.d.ts
2990
+ declare type IntersectUnion<META_UNION extends UnionType, META_TYPE> = META_TYPE extends Type ? META_TYPE extends NeverType ? META_TYPE : META_TYPE extends AnyType ? META_UNION : META_TYPE extends ConstType ? DistributeIntersection<META_UNION, META_TYPE> : META_TYPE extends EnumType ? DistributeIntersection<META_UNION, META_TYPE> : META_TYPE extends PrimitiveType ? DistributeIntersection<META_UNION, META_TYPE> : META_TYPE extends ArrayType ? DistributeIntersection<META_UNION, META_TYPE> : META_TYPE extends TupleType ? DistributeIntersection<META_UNION, META_TYPE> : META_TYPE extends ObjectType ? DistributeIntersection<META_UNION, META_TYPE> : META_TYPE extends UnionType ? DistributeIntersection<META_UNION, META_TYPE> : Never : Never;
2991
+ declare type DistributeIntersection<META_UNION extends UnionType, META_TYPE> = $Union<UnionValues<META_UNION> extends infer UNION_VALUE ? $Intersect<UNION_VALUE, META_TYPE> : never>;
2992
+ //#endregion
2993
+ //#region node_modules/ts-algebra/lib/meta-types/intersection/utils.d.ts
2994
+ declare type IntersectIsSerialized<SERIALIZABLE_META_TYPE_A extends SerializableType, SERIALIZABLE_META_TYPE_B extends SerializableType> = Or<IsSerialized<SERIALIZABLE_META_TYPE_A>, IsSerialized<SERIALIZABLE_META_TYPE_B>>;
2995
+ declare type IntersectDeserialized<SERIALIZABLE_META_TYPE_A extends SerializableType, SERIALIZABLE_META_TYPE_B extends SerializableType> = If<IsSerialized<SERIALIZABLE_META_TYPE_A>, If<IsSerialized<SERIALIZABLE_META_TYPE_B>, Deserialized<SERIALIZABLE_META_TYPE_A> & Deserialized<SERIALIZABLE_META_TYPE_B>, Deserialized<SERIALIZABLE_META_TYPE_A>>, If<IsSerialized<SERIALIZABLE_META_TYPE_B>, Deserialized<SERIALIZABLE_META_TYPE_B>>>;
2996
+ //#endregion
2997
+ //#region node_modules/ts-algebra/lib/meta-types/intersection/const.d.ts
2998
+ declare type IntersectConstSerializationParams<META_CONST extends ConstType, SERIALIZABLE_META_TYPE extends SerializableType> = Const<ConstValue<META_CONST>, IntersectIsSerialized<META_CONST, SERIALIZABLE_META_TYPE>, IntersectDeserialized<META_CONST, SERIALIZABLE_META_TYPE>>;
2999
+ declare type IntersectConst<META_CONST extends ConstType, META_TYPE> = META_TYPE extends Type ? META_TYPE extends NeverType ? META_TYPE : META_TYPE extends AnyType ? IntersectConstSerializationParams<META_CONST, META_TYPE> : META_TYPE extends ConstType ? CheckExtendsResolved<META_CONST, META_TYPE> : META_TYPE extends EnumType ? IntersectConstToEnum<META_CONST, META_TYPE> : META_TYPE extends PrimitiveType ? IntersectConstToPrimitive<META_CONST, META_TYPE> : META_TYPE extends ArrayType ? IntersectConstToArray<META_CONST, META_TYPE> : META_TYPE extends TupleType ? IntersectConstToTuple<META_CONST, META_TYPE> : META_TYPE extends ObjectType ? IntersectConstToObject<META_CONST, META_TYPE> : META_TYPE extends UnionType ? DistributeIntersection<META_TYPE, META_CONST> : Never : Never;
3000
+ declare type CheckExtendsResolved<META_CONST extends ConstType, SERIALIZABLE_META_TYPE extends SerializableType> = ConstValue<META_CONST> extends Resolve<SERIALIZABLE_META_TYPE, {
3001
+ deserialize: false;
3002
+ }> ? IntersectConstSerializationParams<META_CONST, SERIALIZABLE_META_TYPE> : Never;
3003
+ declare type IntersectConstToEnum<META_CONST extends ConstType, META_ENUM extends EnumType> = CheckExtendsResolved<META_CONST, META_ENUM>;
3004
+ declare type IntersectConstToPrimitive<META_CONST extends ConstType, META_PRIMITIVE extends PrimitiveType> = CheckExtendsResolved<META_CONST, META_PRIMITIVE>;
3005
+ declare type IntersectConstToArray<META_CONST extends ConstType, META_ARRAY extends ArrayType> = CheckExtendsResolved<META_CONST, META_ARRAY>;
3006
+ declare type IntersectConstToTuple<META_CONST extends ConstType, META_TUPLE extends TupleType> = CheckExtendsResolved<META_CONST, META_TUPLE>;
3007
+ declare type IntersectConstToObject<META_CONST extends ConstType, META_OBJECT extends ObjectType> = If<IsObject<ConstValue<META_CONST>>, IntersectObjectConstToObject<META_CONST, META_OBJECT>, Never>;
3008
+ declare type IntersectObjectConstToObject<META_CONST extends ConstType, META_OBJECT extends ObjectType, INTERSECTED_META_OBJECT = IntersectConstValuesToObjectValues<ConstValue<META_CONST>, META_OBJECT>> = If<IsNever<NeverKeys<INTERSECTED_META_OBJECT>>, IntersectConstSerializationParams<META_CONST, META_OBJECT>, Never>;
3009
+ declare type IntersectConstValuesToObjectValues<CONST_VALUE, META_OBJECT extends ObjectType> = { [KEY in Extract<keyof CONST_VALUE | ObjectRequiredKeys<META_OBJECT>, string>]: KEY extends keyof CONST_VALUE ? Intersect<Const<CONST_VALUE[KEY]>, ObjectValue<META_OBJECT, KEY>> : Never };
3010
+ declare type NeverKeys<META_OBJECT> = { [KEY in keyof META_OBJECT]: META_OBJECT[KEY] extends Never ? KEY : never }[keyof META_OBJECT];
3011
+ //#endregion
3012
+ //#region node_modules/ts-algebra/lib/meta-types/intersection/enum.d.ts
3013
+ declare type IntersectEnumSerializationParams<META_ENUM_VALUES, META_ENUM extends EnumType, SERIALIZABLE_META_TYPE extends SerializableType> = Enum<META_ENUM_VALUES, IntersectIsSerialized<META_ENUM, SERIALIZABLE_META_TYPE>, IntersectDeserialized<META_ENUM, SERIALIZABLE_META_TYPE>>;
3014
+ declare type IntersectEnum<META_ENUM extends EnumType, META_TYPE> = META_TYPE extends Type ? META_TYPE extends NeverType ? META_TYPE : META_TYPE extends AnyType ? IntersectEnumSerializationParams<EnumValues<META_ENUM>, META_ENUM, META_TYPE> : META_TYPE extends ConstType ? IntersectConstToEnum<META_TYPE, META_ENUM> : META_TYPE extends EnumType ? FilterEnum<META_ENUM, META_TYPE> : META_TYPE extends PrimitiveType ? IntersectEnumToPrimitive<META_ENUM, META_TYPE> : META_TYPE extends ArrayType ? FilterEnum<META_ENUM, META_TYPE> : META_TYPE extends TupleType ? FilterEnum<META_ENUM, META_TYPE> : META_TYPE extends ObjectType ? FilterEnum<META_ENUM, META_TYPE> : META_TYPE extends UnionType ? DistributeIntersection<META_TYPE, META_ENUM> : Never : Never;
3015
+ declare type FilterEnum<META_ENUM extends EnumType, SERIALIZABLE_META_TYPE extends SerializableType> = IntersectEnumSerializationParams<FilterEnumValues<EnumValues<META_ENUM>, SERIALIZABLE_META_TYPE>, META_ENUM, SERIALIZABLE_META_TYPE>;
3016
+ declare type FilterEnumValues<ENUM_VALUES, SERIALIZABLE_META_TYPE> = ENUM_VALUES extends infer ENUM_VALUE ? $Intersect<Const<ENUM_VALUE>, SERIALIZABLE_META_TYPE> extends Never ? never : ENUM_VALUE : never;
3017
+ declare type IntersectEnumToPrimitive<META_ENUM extends EnumType, META_PRIMITIVE extends PrimitiveType> = FilterEnum<META_ENUM, META_PRIMITIVE>;
3018
+ declare type IntersectEnumToArray<META_ENUM extends EnumType, META_ARRAY extends ArrayType> = FilterEnum<META_ENUM, META_ARRAY>;
3019
+ declare type IntersectEnumToTuple<META_ENUM extends EnumType, META_TUPLE extends TupleType> = FilterEnum<META_ENUM, META_TUPLE>;
3020
+ declare type IntersectEnumToObject<META_ENUM extends EnumType, META_OBJECT extends ObjectType> = FilterEnum<META_ENUM, META_OBJECT>;
3021
+ //#endregion
3022
+ //#region node_modules/ts-algebra/lib/meta-types/intersection/tuple.d.ts
3023
+ declare type IntersectTupleSerializationParams<VALUES extends Type[], OPEN_PROPS extends Type, META_TUPLE extends TupleType, SERIALIZABLE_META_TYPE extends SerializableType> = $MergeTuplePropsToSerializable<VALUES, OPEN_PROPS, META_TUPLE, SERIALIZABLE_META_TYPE>;
3024
+ declare type $MergeTuplePropsToSerializable<VALUES, OPEN_PROPS, META_TUPLE extends TupleType, SERIALIZABLE_META_TYPE extends SerializableType> = $Tuple<VALUES, OPEN_PROPS, IntersectIsSerialized<META_TUPLE, SERIALIZABLE_META_TYPE>, IntersectDeserialized<META_TUPLE, SERIALIZABLE_META_TYPE>>;
3025
+ declare type IntersectTuple<META_TUPLE extends TupleType, META_TYPE> = META_TYPE extends NeverType ? META_TYPE : META_TYPE extends AnyType ? IntersectTupleSerializationParams<TupleValues<META_TUPLE>, TupleOpenProps<META_TUPLE>, META_TUPLE, META_TYPE> : META_TYPE extends ConstType ? IntersectConstToTuple<META_TYPE, META_TUPLE> : META_TYPE extends EnumType ? IntersectEnumToTuple<META_TYPE, META_TUPLE> : META_TYPE extends PrimitiveType ? Never : META_TYPE extends ArrayType ? IntersectTupleToArray<META_TUPLE, META_TYPE> : META_TYPE extends TupleType ? IntersectTuples<META_TUPLE, META_TYPE> : META_TYPE extends ObjectType ? Never : META_TYPE extends UnionType ? DistributeIntersection<META_TYPE, META_TUPLE> : Never;
3026
+ declare type IntersectTupleToArray<META_TUPLE extends TupleType, META_ARRAY extends ArrayType, INTERSECTED_VALUES extends unknown[] = IntersectTupleToArrayValues<TupleValues<META_TUPLE>, ArrayValues<META_ARRAY>>, INTERSECTED_OPEN_PROPS = $Intersect<TupleOpenProps<META_TUPLE>, ArrayValues<META_ARRAY>>> = $MergeTuplePropsToSerializable<INTERSECTED_VALUES, INTERSECTED_OPEN_PROPS, META_TUPLE, META_ARRAY>;
3027
+ declare type IntersectTupleToArrayValues<TUPLE_VALUES extends Type[], ARRAY_VALUES extends Type, RESULT extends unknown[] = []> = TUPLE_VALUES extends [infer TUPLE_VALUES_HEAD, ...infer TUPLE_VALUES_TAIL] ? TUPLE_VALUES_HEAD extends Type ? TUPLE_VALUES_TAIL extends Type[] ? IntersectTupleToArrayValues<TUPLE_VALUES_TAIL, ARRAY_VALUES, [...RESULT, Intersect<TUPLE_VALUES_HEAD, ARRAY_VALUES>]> : never : never : RESULT;
3028
+ declare type IntersectTuples<META_TUPLE_A extends TupleType, META_TUPLE_B extends TupleType, INTERSECTED_VALUES extends unknown[] = IntersectTupleValues<TupleValues<META_TUPLE_A>, TupleValues<META_TUPLE_B>, IsTupleOpen<META_TUPLE_A>, IsTupleOpen<META_TUPLE_B>, TupleOpenProps<META_TUPLE_A>, TupleOpenProps<META_TUPLE_B>>, INTERSECTED_OPEN_PROPS = $Intersect<TupleOpenProps<META_TUPLE_A>, TupleOpenProps<META_TUPLE_B>>> = $MergeTuplePropsToSerializable<INTERSECTED_VALUES, INTERSECTED_OPEN_PROPS, META_TUPLE_A, META_TUPLE_B>;
3029
+ declare type IntersectTupleValues<TUPLE_A_VALUES extends Type[], TUPLE_B_VALUES extends Type[], TUPLE_A_IS_OPEN extends boolean, TUPLE_B_IS_OPEN extends boolean, TUPLE_A_OPEN_PROPS extends Type, TUPLE_B_OPEN_PROPS extends Type, RESULT extends unknown[] = []> = TUPLE_A_VALUES extends [infer TUPLE_A_VALUES_HEAD, ...infer TUPLE_A_VALUES_TAIL] ? TUPLE_A_VALUES_HEAD extends Type ? TUPLE_A_VALUES_TAIL extends Type[] ? TUPLE_B_VALUES extends [infer TUPLE_B_VALUES_HEAD, ...infer TUPLE_B_VALUES_TAIL] ? TUPLE_B_VALUES_HEAD extends Type ? TUPLE_B_VALUES_TAIL extends Type[] ? IntersectTupleValues<TUPLE_A_VALUES_TAIL, TUPLE_B_VALUES_TAIL, TUPLE_A_IS_OPEN, TUPLE_B_IS_OPEN, TUPLE_A_OPEN_PROPS, TUPLE_B_OPEN_PROPS, [...RESULT, Intersect<TUPLE_A_VALUES_HEAD, TUPLE_B_VALUES_HEAD>]> : never : never : IntersectTupleValues<TUPLE_A_VALUES_TAIL, TUPLE_B_VALUES, TUPLE_A_IS_OPEN, TUPLE_B_IS_OPEN, TUPLE_A_OPEN_PROPS, TUPLE_B_OPEN_PROPS, [...RESULT, TUPLE_B_IS_OPEN extends true ? Intersect<TUPLE_A_VALUES_HEAD, TUPLE_B_OPEN_PROPS> : Never]> : never : never : TUPLE_B_VALUES extends [infer TUPLE_B_VALUES_HEAD, ...infer TUPLE_B_VALUES_TAIL] ? TUPLE_B_VALUES_HEAD extends Type ? TUPLE_B_VALUES_TAIL extends Type[] ? IntersectTupleValues<TUPLE_A_VALUES, TUPLE_B_VALUES_TAIL, TUPLE_A_IS_OPEN, TUPLE_B_IS_OPEN, TUPLE_A_OPEN_PROPS, TUPLE_B_OPEN_PROPS, [...RESULT, TUPLE_A_IS_OPEN extends true ? Intersect<TUPLE_B_VALUES_HEAD, TUPLE_A_OPEN_PROPS> : Never]> : never : never : RESULT;
3030
+ //#endregion
3031
+ //#region node_modules/ts-algebra/lib/meta-types/intersection/array.d.ts
3032
+ declare type IntersectArraySerializationParams<VALUES extends Type, META_ARRAY extends ArrayType, SERIALIZABLE_META_TYPE extends SerializableType> = $MergeArrayValuesToSerializable<VALUES, META_ARRAY, SERIALIZABLE_META_TYPE>;
3033
+ declare type $MergeArrayValuesToSerializable<VALUES, META_ARRAY extends ArrayType, SERIALIZABLE_META_TYPE extends SerializableType> = _$Array<VALUES, IntersectIsSerialized<META_ARRAY, SERIALIZABLE_META_TYPE>, IntersectDeserialized<META_ARRAY, SERIALIZABLE_META_TYPE>>;
3034
+ declare type IntersectArray<META_ARRAY extends ArrayType, META_TYPE> = META_TYPE extends Type ? META_TYPE extends NeverType ? META_TYPE : META_TYPE extends AnyType ? IntersectArraySerializationParams<ArrayValues<META_ARRAY>, META_ARRAY, META_TYPE> : META_TYPE extends ConstType ? IntersectConstToArray<META_TYPE, META_ARRAY> : META_TYPE extends EnumType ? IntersectEnumToArray<META_TYPE, META_ARRAY> : META_TYPE extends PrimitiveType ? Never : META_TYPE extends ArrayType ? IntersectArrays<META_ARRAY, META_TYPE> : META_TYPE extends TupleType ? IntersectTupleToArray<META_TYPE, META_ARRAY> : META_TYPE extends ObjectType ? Never : META_TYPE extends UnionType ? DistributeIntersection<META_TYPE, META_ARRAY> : Never : Never;
3035
+ declare type IntersectArrays<META_ARRAY_A extends ArrayType, META_ARRAY_B extends ArrayType> = $MergeArrayValuesToSerializable<Intersect<ArrayValues<META_ARRAY_A>, ArrayValues<META_ARRAY_B>>, META_ARRAY_A, META_ARRAY_B>;
3036
+ //#endregion
3037
+ //#region node_modules/ts-algebra/lib/meta-types/intersection/object.d.ts
3038
+ declare type IntersectObjectSerializationParams<VALUES extends Record<string, Type>, REQUIRED_KEYS extends string, OPEN_PROPS extends Type, CLOSE_ON_RESOLVE extends boolean, META_OBJECT extends ObjectType, SERIALIZABLE_META_TYPE extends SerializableType> = $MergeObjectPropsToSerializable<VALUES, REQUIRED_KEYS, OPEN_PROPS, CLOSE_ON_RESOLVE, META_OBJECT, SERIALIZABLE_META_TYPE>;
3039
+ declare type $MergeObjectPropsToSerializable<VALUES, REQUIRED_KEYS, OPEN_PROPS, CLOSE_ON_RESOLVE, META_OBJECT extends ObjectType, SERIALIZABLE_META_TYPE extends SerializableType> = _$Object<VALUES, REQUIRED_KEYS, OPEN_PROPS, CLOSE_ON_RESOLVE, IntersectIsSerialized<META_OBJECT, SERIALIZABLE_META_TYPE>, IntersectDeserialized<META_OBJECT, SERIALIZABLE_META_TYPE>>;
3040
+ declare type IntersectObject<META_OBJECT extends ObjectType, META_TYPE> = META_TYPE extends Type ? META_TYPE extends NeverType ? META_TYPE : META_TYPE extends AnyType ? IntersectObjectSerializationParams<ObjectValues<META_OBJECT>, ObjectRequiredKeys<META_OBJECT>, ObjectOpenProps<META_OBJECT>, IsObjectClosedOnResolve<META_OBJECT>, META_OBJECT, META_TYPE> : META_TYPE extends ConstType ? IntersectConstToObject<META_TYPE, META_OBJECT> : META_TYPE extends EnumType ? IntersectEnumToObject<META_TYPE, META_OBJECT> : META_TYPE extends PrimitiveType ? Never : META_TYPE extends ArrayType ? Never : META_TYPE extends TupleType ? Never : META_TYPE extends ObjectType ? IntersectObjects<META_OBJECT, META_TYPE> : META_TYPE extends UnionType ? DistributeIntersection<META_TYPE, META_OBJECT> : Never : Never;
3041
+ declare type IntersectObjects<META_OBJECT_A extends ObjectType, META_OBJECT_B extends ObjectType, INTERSECTED_VALUES extends Record<string, unknown> = IntersectObjectsValues<META_OBJECT_A, META_OBJECT_B>, INTERSECTED_OPEN_PROPS = Intersect<ObjectOpenProps<META_OBJECT_A>, ObjectOpenProps<META_OBJECT_B>>, INTERSECTED_CLOSE_ON_RESOLVE = Or<IsObjectClosedOnResolve<META_OBJECT_A>, IsObjectClosedOnResolve<META_OBJECT_B>>> = $MergeObjectPropsToSerializable<{ [KEY in keyof INTERSECTED_VALUES]: INTERSECTED_VALUES[KEY] }, ObjectRequiredKeys<META_OBJECT_A> | ObjectRequiredKeys<META_OBJECT_B>, INTERSECTED_OPEN_PROPS, INTERSECTED_CLOSE_ON_RESOLVE, META_OBJECT_A, META_OBJECT_B>;
3042
+ declare type IntersectObjectsValues<META_OBJECT_A extends ObjectType, META_OBJECT_B extends ObjectType> = { [KEY in Extract<keyof ObjectValues<META_OBJECT_A> | keyof ObjectValues<META_OBJECT_B>, string>]: $Intersect<ObjectValue<META_OBJECT_A, KEY>, ObjectValue<META_OBJECT_B, KEY>> };
3043
+ //#endregion
3044
+ //#region node_modules/ts-algebra/lib/meta-types/intersection/primitive.d.ts
3045
+ declare type IntersectPrimitiveSerializationParams<META_PRIMITIVE extends PrimitiveType, SERIALIZABLE_META_TYPE extends SerializableType> = Primitive<PrimitiveValue<META_PRIMITIVE>, IntersectIsSerialized<META_PRIMITIVE, SERIALIZABLE_META_TYPE>, IntersectDeserialized<META_PRIMITIVE, SERIALIZABLE_META_TYPE>>;
3046
+ declare type IntersectPrimitive<META_PRIMITIVE extends PrimitiveType, META_TYPE> = META_TYPE extends Type ? META_TYPE extends NeverType ? META_TYPE : META_TYPE extends AnyType ? IntersectPrimitiveSerializationParams<META_PRIMITIVE, META_TYPE> : META_TYPE extends ConstType ? IntersectConstToPrimitive<META_TYPE, META_PRIMITIVE> : META_TYPE extends EnumType ? IntersectEnumToPrimitive<META_TYPE, META_PRIMITIVE> : META_TYPE extends PrimitiveType ? If<And$1<DoesExtend$1<PrimitiveValue<META_PRIMITIVE>, PrimitiveValue<META_TYPE>>, DoesExtend$1<PrimitiveValue<META_TYPE>, PrimitiveValue<META_PRIMITIVE>>>, IntersectPrimitiveSerializationParams<META_PRIMITIVE, META_TYPE>, Never> : META_TYPE extends ArrayType ? Never : META_TYPE extends TupleType ? Never : META_TYPE extends ObjectType ? Never : META_TYPE extends UnionType ? DistributeIntersection<META_TYPE, META_PRIMITIVE> : Never : Never;
3047
+ //#endregion
3048
+ //#region node_modules/ts-algebra/lib/meta-types/intersection/any.d.ts
3049
+ declare type IntersectAny<META_ANY extends AnyType, META_TYPE> = META_TYPE extends Type ? META_TYPE extends NeverType ? META_TYPE : META_TYPE extends AnyType ? Any<IntersectIsSerialized<META_ANY, META_TYPE>, IntersectDeserialized<META_ANY, META_TYPE>> : META_TYPE extends ConstType ? IntersectConstSerializationParams<META_TYPE, META_ANY> : META_TYPE extends EnumType ? IntersectEnumSerializationParams<EnumValues<META_TYPE>, META_TYPE, META_ANY> : META_TYPE extends PrimitiveType ? IntersectPrimitiveSerializationParams<META_TYPE, META_ANY> : META_TYPE extends ArrayType ? IntersectArraySerializationParams<ArrayValues<META_TYPE>, META_TYPE, META_ANY> : META_TYPE extends TupleType ? IntersectTupleSerializationParams<TupleValues<META_TYPE>, TupleOpenProps<META_TYPE>, META_TYPE, META_ANY> : META_TYPE extends ObjectType ? IntersectObjectSerializationParams<ObjectValues<META_TYPE>, ObjectRequiredKeys<META_TYPE>, ObjectOpenProps<META_TYPE>, IsObjectClosedOnResolve<META_TYPE>, META_TYPE, META_ANY> : META_TYPE extends UnionType ? DistributeIntersection<META_TYPE, META_ANY> : Never : Never;
3050
+ //#endregion
3051
+ //#region node_modules/ts-algebra/lib/meta-types/intersection/index.d.ts
3052
+ declare type Intersect<META_TYPE_A extends Type, META_TYPE_B extends Type> = $Intersect<META_TYPE_A, META_TYPE_B>;
3053
+ declare type $Intersect<META_TYPE_A, META_TYPE_B> = META_TYPE_A extends NeverType ? META_TYPE_A : META_TYPE_A extends AnyType ? IntersectAny<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends ConstType ? IntersectConst<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends EnumType ? IntersectEnum<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends PrimitiveType ? IntersectPrimitive<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends ArrayType ? IntersectArray<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends TupleType ? IntersectTuple<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends ObjectType ? IntersectObject<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends UnionType ? IntersectUnion<META_TYPE_A, META_TYPE_B> : Never;
3054
+ //#endregion
3055
+ //#region node_modules/ts-algebra/lib/meta-types/exclusion/union.d.ts
3056
+ declare type ExcludeFromUnion<META_UNION extends UnionType, META_TYPE> = $Union<UnionValues<META_UNION> extends infer META_UNION_VALUE ? _$Exclude<META_UNION_VALUE, META_TYPE> : never>;
3057
+ declare type ExcludeUnion<META_TYPE, META_UNION extends UnionType> = If<IsNever<UnionValues<META_UNION>>, META_TYPE, RecurseOnUnionValues<META_TYPE, UnionLast<UnionValues<META_UNION>>, META_UNION>>;
3058
+ declare type RecurseOnUnionValues<META_TYPE, META_UNION_VALUE, META_UNION extends UnionType> = $Intersect<_$Exclude<META_TYPE, META_UNION_VALUE>, _$Exclude<META_TYPE, $Union<Exclude<UnionValues<META_UNION>, META_UNION_VALUE>>>>;
3059
+ //#endregion
3060
+ //#region node_modules/ts-algebra/lib/meta-types/exclusion/any.d.ts
3061
+ declare type ExcludeFromAny<META_ANY extends AnyType, META_TYPE> = META_TYPE extends Type ? META_TYPE extends NeverType ? META_ANY : META_TYPE extends AnyType ? Never : META_TYPE extends ConstType ? META_ANY : META_TYPE extends EnumType ? META_ANY : META_TYPE extends PrimitiveType ? META_ANY : META_TYPE extends ArrayType ? META_ANY : META_TYPE extends TupleType ? META_ANY : META_TYPE extends ObjectType ? META_ANY : META_TYPE extends UnionType ? ExcludeUnion<META_ANY, META_TYPE> : Never : Never;
3062
+ //#endregion
3063
+ //#region node_modules/ts-algebra/lib/meta-types/exclusion/array.d.ts
3064
+ declare type ExcludeFromArray<META_ARRAY extends ArrayType, META_TYPE> = META_TYPE extends Type ? META_TYPE extends NeverType ? META_ARRAY : META_TYPE extends AnyType ? Never : META_TYPE extends ConstType ? META_ARRAY : META_TYPE extends EnumType ? META_ARRAY : META_TYPE extends PrimitiveType ? META_ARRAY : META_TYPE extends ArrayType ? ExcludeArrays<META_ARRAY, META_TYPE> : META_TYPE extends TupleType ? And$1<DoesExtend$1<TupleValues<META_TYPE>, []>, IsTupleOpen<META_TYPE>> extends true ? ExcludeArrays<META_ARRAY, _Array<TupleOpenProps<META_TYPE>>> : META_ARRAY : META_TYPE extends ObjectType ? META_ARRAY : META_TYPE extends UnionType ? ExcludeUnion<META_ARRAY, META_TYPE> : Never : Never;
3065
+ declare type ExcludeArrays<META_ARRAY_A extends ArrayType, META_ARRAY_B extends ArrayType> = _Exclude<ArrayValues<META_ARRAY_A>, ArrayValues<META_ARRAY_B>> extends NeverType ? NeverType : META_ARRAY_A;
3066
+ //#endregion
3067
+ //#region node_modules/ts-algebra/lib/meta-types/exclusion/const.d.ts
3068
+ declare type ExcludeFromConst<META_CONST extends ConstType, META_TYPE> = META_TYPE extends Type ? META_TYPE extends NeverType ? META_CONST : META_TYPE extends AnyType ? Never : META_TYPE extends ConstType ? CheckNotExtendsResolved<META_CONST, META_TYPE> : META_TYPE extends EnumType ? CheckNotExtendsResolved<META_CONST, META_TYPE> : META_TYPE extends PrimitiveType ? CheckNotExtendsResolved<META_CONST, META_TYPE> : META_TYPE extends ArrayType ? CheckNotExtendsResolved<META_CONST, META_TYPE> : META_TYPE extends TupleType ? CheckNotExtendsResolved<META_CONST, META_TYPE> : META_TYPE extends ObjectType ? ExcludeObject<META_CONST, META_TYPE> : META_TYPE extends UnionType ? ExcludeUnion<META_CONST, META_TYPE> : Never : Never;
3069
+ declare type CheckNotExtendsResolved<META_CONST extends ConstType, META_TYPE extends Type> = ConstValue<META_CONST> extends Resolve<META_TYPE, {
3070
+ deserialize: false;
3071
+ }> ? Never : META_CONST;
3072
+ declare type ExcludeObject<META_CONST extends ConstType, META_OBJECT extends ObjectType> = If<IsObject<ConstValue<META_CONST>>, ObjectRequiredKeys<META_OBJECT> extends keyof ConstValue<META_CONST> ? ExcludeObjectFromConst<META_CONST, META_OBJECT> : META_CONST, META_CONST>;
3073
+ declare type ExcludeObjectFromConst<META_CONST extends ConstType, META_OBJECT extends ObjectType, EXCLUDED_CONST_VALUES = ExcludeConstValues<ConstValue<META_CONST>, META_OBJECT>> = If<IsNever<RepresentableKeys$1<EXCLUDED_CONST_VALUES>>, Never, META_CONST>;
3074
+ declare type ExcludeConstValues<VALUE, META_OBJECT extends ObjectType> = { [KEY in keyof VALUE]: KEY extends keyof ObjectValues<META_OBJECT> ? _Exclude<Const<VALUE[KEY]>, ObjectValues<META_OBJECT>[KEY]> : IsObjectOpen<META_OBJECT> extends true ? _Exclude<Const<VALUE[KEY]>, ObjectOpenProps<META_OBJECT>> : Const<VALUE[KEY]> };
3075
+ declare type RepresentableKeys$1<VALUES> = { [KEY in keyof VALUES]: VALUES[KEY] extends Never ? never : KEY }[keyof VALUES];
3076
+ //#endregion
3077
+ //#region node_modules/ts-algebra/lib/meta-types/exclusion/enum.d.ts
3078
+ declare type ExcludeFromEnum<META_ENUM extends EnumType, META_TYPE> = META_TYPE extends Type ? META_TYPE extends NeverType ? META_ENUM : META_TYPE extends AnyType ? Never : META_TYPE extends ConstType ? FilterEnumExcluded<META_ENUM, META_TYPE> : META_TYPE extends EnumType ? FilterEnumExcluded<META_ENUM, META_TYPE> : META_TYPE extends PrimitiveType ? FilterEnumExcluded<META_ENUM, META_TYPE> : META_TYPE extends ArrayType ? FilterEnumExcluded<META_ENUM, META_TYPE> : META_TYPE extends TupleType ? FilterEnumExcluded<META_ENUM, META_TYPE> : META_TYPE extends ObjectType ? FilterEnumExcluded<META_ENUM, META_TYPE> : META_TYPE extends UnionType ? ExcludeUnion<META_ENUM, META_TYPE> : Never : Never;
3079
+ declare type FilterEnumExcluded<META_ENUM extends EnumType, META_TYPE extends Type> = Enum<FilterEnumExcludedValues<EnumValues<META_ENUM>, META_TYPE>>;
3080
+ declare type FilterEnumExcludedValues<ENUM_VALUES, META_TYPE extends Type> = ENUM_VALUES extends infer ENUM_VALUE ? _Exclude<Const<ENUM_VALUE>, META_TYPE> extends NeverType ? never : ENUM_VALUE : never;
3081
+ declare type ExcludeEnum<META_TYPE extends Type, ENUM_TYPE extends EnumType, ENUM_VALUES = EnumValues<ENUM_TYPE>> = ExcludeEnumValue<META_TYPE, UnionLast<ENUM_VALUES>, ENUM_VALUES>;
3082
+ declare type ExcludeEnumValue<META_TYPE extends Type, LAST_ENUM_VALUE, ENUM_VALUES> = $Intersect<_Exclude<META_TYPE, Const<LAST_ENUM_VALUE>>, _Exclude<META_TYPE, Enum<Exclude<ENUM_VALUES, LAST_ENUM_VALUE>>>>;
3083
+ //#endregion
3084
+ //#region node_modules/ts-algebra/lib/meta-types/exclusion/utils.d.ts
3085
+ declare type ValueExclusionResult<VALUE_A extends Type, IS_ALLOWED_IN_A extends boolean, IS_REQUIRED_IN_A extends boolean, VALUE_B extends Type, IS_ALLOWED_IN_B extends boolean, IS_REQUIRED_IN_B extends boolean> = {
3086
+ sourceValue: VALUE_A;
3087
+ isAllowedInSource: IS_ALLOWED_IN_A;
3088
+ isRequiredInSource: IS_REQUIRED_IN_A;
3089
+ isAllowedInExcluded: IS_ALLOWED_IN_B;
3090
+ isRequiredInExcluded: IS_REQUIRED_IN_B;
3091
+ exclusionResult: _$Exclude<VALUE_A, VALUE_B>;
3092
+ };
3093
+ declare type ValueExclusionResultType = {
3094
+ sourceValue: Type;
3095
+ isAllowedInSource: boolean;
3096
+ isRequiredInSource: boolean;
3097
+ isAllowedInExcluded: boolean;
3098
+ isRequiredInExcluded: boolean;
3099
+ exclusionResult: any;
3100
+ };
3101
+ declare type SourceValue<VALUE_EXCLUSION_RESULT extends ValueExclusionResultType> = VALUE_EXCLUSION_RESULT["sourceValue"];
3102
+ declare type IsAllowedInSource<VALUE_EXCLUSION_RESULT extends ValueExclusionResultType> = VALUE_EXCLUSION_RESULT["isAllowedInSource"];
3103
+ declare type IsRequiredInSource<VALUE_EXCLUSION_RESULT extends ValueExclusionResultType> = VALUE_EXCLUSION_RESULT["isRequiredInSource"];
3104
+ declare type ExclusionResult<VALUE_EXCLUSION_RESULT extends ValueExclusionResultType> = VALUE_EXCLUSION_RESULT["exclusionResult"];
3105
+ declare type IsAllowedInExcluded<VALUE_EXCLUSION_RESULT extends ValueExclusionResultType> = VALUE_EXCLUSION_RESULT["isAllowedInExcluded"];
3106
+ declare type IsRequiredInExcluded<VALUE_EXCLUSION_RESULT extends ValueExclusionResultType> = VALUE_EXCLUSION_RESULT["isRequiredInExcluded"];
3107
+ declare type IsOutsideOfSourceScope<VALUE_EXCLUSION_RESULT extends ValueExclusionResultType> = And$1<Not$1<IsAllowedInSource<VALUE_EXCLUSION_RESULT>>, IsRequiredInExcluded<VALUE_EXCLUSION_RESULT>>;
3108
+ declare type IsOutsideOfExcludedScope<VALUE_EXCLUSION_RESULT extends ValueExclusionResultType> = And$1<IsRequiredInSource<VALUE_EXCLUSION_RESULT>, Not$1<IsAllowedInExcluded<VALUE_EXCLUSION_RESULT>>>;
3109
+ declare type IsOmittable<VALUE_EXCLUSION_RESULT extends ValueExclusionResultType> = And$1<Not$1<IsRequiredInSource<VALUE_EXCLUSION_RESULT>>, IsRequiredInExcluded<VALUE_EXCLUSION_RESULT>>;
3110
+ declare type PropagateExclusion<VALUE_EXCLUSION_RESULT extends ValueExclusionResultType> = ExclusionResult<VALUE_EXCLUSION_RESULT> extends NeverType ? SourceValue<VALUE_EXCLUSION_RESULT> : ExclusionResult<VALUE_EXCLUSION_RESULT>;
3111
+ //#endregion
3112
+ //#region node_modules/ts-algebra/lib/meta-types/exclusion/object.d.ts
3113
+ declare type ExcludeFromObject<META_OBJECT extends ObjectType, META_TYPE> = META_TYPE extends Type ? META_TYPE extends NeverType ? META_OBJECT : META_TYPE extends AnyType ? Never : META_TYPE extends ConstType ? ExcludeConstFromObject<META_OBJECT, META_TYPE> : META_TYPE extends EnumType ? ExcludeEnum<META_OBJECT, META_TYPE> : META_TYPE extends PrimitiveType ? META_OBJECT : META_TYPE extends ArrayType ? META_OBJECT : META_TYPE extends TupleType ? META_OBJECT : META_TYPE extends ObjectType ? ExcludeObjects<META_OBJECT, META_TYPE> : META_TYPE extends UnionType ? ExcludeUnion<META_OBJECT, META_TYPE> : Never : Never;
3114
+ declare type ExcludeObjects<META_OBJECT_A extends ObjectType, META_OBJECT_B extends ObjectType, VALUE_EXCLUSION_RESULTS extends Record<string, ValueExclusionResultType> = ExcludeObjectValues<META_OBJECT_A, META_OBJECT_B>, REPRESENTABLE_KEYS extends string = RepresentableKeys<VALUE_EXCLUSION_RESULTS>, OPEN_PROPS_EXCLUSION = _Exclude<ObjectOpenProps<META_OBJECT_A>, ObjectOpenProps<META_OBJECT_B>>> = DoesObjectSizesMatch<META_OBJECT_A, META_OBJECT_B, VALUE_EXCLUSION_RESULTS> extends true ? {
3115
+ moreThanTwo: META_OBJECT_A;
3116
+ onlyOne: PropagateExclusions$1<META_OBJECT_A, VALUE_EXCLUSION_RESULTS>;
3117
+ none: OmitOmittableKeys<META_OBJECT_A, VALUE_EXCLUSION_RESULTS>;
3118
+ }[And$1<IsObjectOpen<META_OBJECT_A>, Not$1<DoesExtend$1<OPEN_PROPS_EXCLUSION, NeverType>>> extends true ? "moreThanTwo" : GetUnionLength<REPRESENTABLE_KEYS>] : META_OBJECT_A;
3119
+ declare type ExcludeObjectValues<META_OBJECT_A extends ObjectType, META_OBJECT_B extends ObjectType> = { [KEY in Extract<keyof ObjectValues<META_OBJECT_A> | keyof ObjectValues<META_OBJECT_B> | ObjectRequiredKeys<META_OBJECT_A> | ObjectRequiredKeys<META_OBJECT_B>, string>]: ValueExclusionResult<ObjectValue<META_OBJECT_A, KEY>, IsAllowedIn<META_OBJECT_A, KEY>, IsRequiredIn<META_OBJECT_A, KEY>, ObjectValue<META_OBJECT_B, KEY>, IsAllowedIn<META_OBJECT_B, KEY>, IsRequiredIn<META_OBJECT_B, KEY>> };
3120
+ declare type GetUnionLength<UNION> = If<IsNever<UNION>, "none", If<IsNever<UnionPop<UNION>>, "onlyOne", "moreThanTwo">>;
3121
+ declare type IsAllowedIn<META_OBJECT extends ObjectType, KEY extends string> = Or<DoesExtend$1<KEY, keyof ObjectValues<META_OBJECT>>, IsObjectOpen<META_OBJECT>>;
3122
+ declare type IsRequiredIn<META_OBJECT extends ObjectType, KEY extends string> = DoesExtend$1<KEY, ObjectRequiredKeys<META_OBJECT>>;
3123
+ declare type DoesObjectSizesMatch<META_OBJECT_A extends ObjectType, META_OBJECT_B extends ObjectType, VALUE_EXCLUSION_RESULTS extends Record<string, ValueExclusionResultType>> = If<And$1<IsObjectOpen<META_OBJECT_A>, Not$1<IsObjectOpen<META_OBJECT_B>>>, false, And$1<IsExcludedSmallEnough$1<VALUE_EXCLUSION_RESULTS>, IsExcludedBigEnough$1<VALUE_EXCLUSION_RESULTS>>>;
3124
+ declare type IsExcludedSmallEnough$1<VALUE_EXCLUSION_RESULTS extends Record<string, ValueExclusionResultType>> = Not$1<DoesExtend$1<true, { [KEY in keyof VALUE_EXCLUSION_RESULTS]: IsOutsideOfSourceScope<VALUE_EXCLUSION_RESULTS[KEY]> }[keyof VALUE_EXCLUSION_RESULTS]>>;
3125
+ declare type IsExcludedBigEnough$1<VALUE_EXCLUSION_RESULTS extends Record<string, ValueExclusionResultType>> = Not$1<DoesExtend$1<true, { [KEY in keyof VALUE_EXCLUSION_RESULTS]: IsOutsideOfExcludedScope<VALUE_EXCLUSION_RESULTS[KEY]> }[keyof VALUE_EXCLUSION_RESULTS]>>;
3126
+ declare type RepresentableKeys<VALUE_EXCLUSION_RESULTS extends Record<string, ValueExclusionResultType>> = { [KEY in Extract<keyof VALUE_EXCLUSION_RESULTS, string>]: ExclusionResult<VALUE_EXCLUSION_RESULTS[KEY]> extends NeverType ? never : KEY }[Extract<keyof VALUE_EXCLUSION_RESULTS, string>];
3127
+ declare type PropagateExclusions$1<META_OBJECT extends ObjectType, VALUE_EXCLUSION_RESULTS extends Record<string, ValueExclusionResultType>> = _Object<{ [KEY in keyof VALUE_EXCLUSION_RESULTS]: PropagateExclusion<VALUE_EXCLUSION_RESULTS[KEY]> }, ObjectRequiredKeys<META_OBJECT>, ObjectOpenProps<META_OBJECT>, IsObjectClosedOnResolve<META_OBJECT>, IsSerialized<META_OBJECT>, Deserialized<META_OBJECT>>;
3128
+ declare type OmitOmittableKeys<META_OBJECT extends ObjectType, VALUE_EXCLUSION_RESULTS extends Record<string, ValueExclusionResultType>, OMITTABLE_KEYS extends string = OmittableKeys<VALUE_EXCLUSION_RESULTS>, OMITTABLE_KEYS_COUNT extends string = GetUnionLength<OMITTABLE_KEYS>> = OMITTABLE_KEYS_COUNT extends "moreThanTwo" ? META_OBJECT : OMITTABLE_KEYS_COUNT extends "onlyOne" ? _Object<{ [KEY in keyof VALUE_EXCLUSION_RESULTS]: KEY extends OMITTABLE_KEYS ? Never : SourceValue<VALUE_EXCLUSION_RESULTS[KEY]> }, ObjectRequiredKeys<META_OBJECT>, ObjectOpenProps<META_OBJECT>, IsObjectClosedOnResolve<META_OBJECT>, IsSerialized<META_OBJECT>, Deserialized<META_OBJECT>> : Never;
3129
+ declare type OmittableKeys<VALUE_EXCLUSION_RESULTS extends Record<string, ValueExclusionResultType>> = { [KEY in Extract<keyof VALUE_EXCLUSION_RESULTS, string>]: IsOmittable<VALUE_EXCLUSION_RESULTS[KEY]> extends true ? KEY : never }[Extract<keyof VALUE_EXCLUSION_RESULTS, string>];
3130
+ declare type ExcludeConstFromObject<META_OBJECT extends ObjectType, META_CONST extends ConstType, CONST_VALUE = ConstValue<META_CONST>> = If<IsObject<CONST_VALUE>, _$Exclude<META_OBJECT, _Object<{ [KEY in Extract<keyof CONST_VALUE, string>]: Const<CONST_VALUE[KEY]> }, Extract<keyof CONST_VALUE, string>, Never, IsObjectClosedOnResolve<META_OBJECT>, IsSerialized<META_CONST>, Deserialized<META_CONST>>>, META_OBJECT>;
3131
+ //#endregion
3132
+ //#region node_modules/ts-algebra/lib/meta-types/exclusion/primitive.d.ts
3133
+ declare type ExcludeFromPrimitive<META_PRIMITIVE extends PrimitiveType, META_TYPE> = META_TYPE extends Type ? META_TYPE extends NeverType ? META_PRIMITIVE : META_TYPE extends AnyType ? Never : META_TYPE extends ConstType ? META_PRIMITIVE : META_TYPE extends EnumType ? META_PRIMITIVE : META_TYPE extends PrimitiveType ? PrimitiveValue<META_PRIMITIVE> extends PrimitiveValue<META_TYPE> ? Never : META_PRIMITIVE : META_TYPE extends ArrayType ? META_PRIMITIVE : META_TYPE extends TupleType ? META_PRIMITIVE : META_TYPE extends ObjectType ? META_PRIMITIVE : META_TYPE extends UnionType ? ExcludeUnion<META_PRIMITIVE, META_TYPE> : Never : Never;
3134
+ //#endregion
3135
+ //#region node_modules/ts-algebra/lib/meta-types/exclusion/tuple.d.ts
3136
+ declare type ExcludeFromTuple<META_TUPLE extends TupleType, META_TYPE> = META_TYPE extends Type ? META_TYPE extends NeverType ? META_TUPLE : META_TYPE extends AnyType ? Never : META_TYPE extends ConstType ? ExcludeConst<META_TUPLE, META_TYPE> : META_TYPE extends EnumType ? ExcludeEnum<META_TUPLE, META_TYPE> : META_TYPE extends PrimitiveType ? META_TUPLE : META_TYPE extends ArrayType ? ExcludeArray<META_TUPLE, META_TYPE> : META_TYPE extends TupleType ? ExcludeTuples<META_TUPLE, META_TYPE> : META_TYPE extends ObjectType ? META_TUPLE : META_TYPE extends UnionType ? ExcludeUnion<META_TUPLE, META_TYPE> : Never : Never;
3137
+ declare type ExcludeArray<META_TUPLE extends TupleType, META_ARRAY extends ArrayType> = ExcludeTuples<META_TUPLE, Tuple<[], ArrayValues<META_ARRAY>, IsSerialized<META_ARRAY>, Deserialized<META_ARRAY>>>;
3138
+ declare type ExcludeTuples<META_TUPLE_A extends TupleType, META_TUPLE_B extends TupleType, VALUE_EXCLUSION_RESULTS extends ValueExclusionResultType[] = ExcludeTupleValues<TupleValues<META_TUPLE_A>, TupleValues<META_TUPLE_B>, IsTupleOpen<META_TUPLE_A>, IsTupleOpen<META_TUPLE_B>, TupleOpenProps<META_TUPLE_A>, TupleOpenProps<META_TUPLE_B>>, REPRESENTABLE_VALUE_EXCLUSION_RESULTS extends ValueExclusionResultType[] = RepresentableExcludedValues<VALUE_EXCLUSION_RESULTS>, EXCLUDED_OPEN_PROPS = _Exclude<TupleOpenProps<META_TUPLE_A>, TupleOpenProps<META_TUPLE_B>>, IS_OPEN_PROPS_EXCLUSION_REPRESENTABLE = Not$1<DoesExtend$1<EXCLUDED_OPEN_PROPS, NeverType>>> = If<DoesTupleSizesMatch<META_TUPLE_A, META_TUPLE_B, VALUE_EXCLUSION_RESULTS>, {
3139
+ moreThanTwo: META_TUPLE_A;
3140
+ onlyOne: $Tuple<PropagateExclusions<VALUE_EXCLUSION_RESULTS>, TupleOpenProps<META_TUPLE_A>, IsSerialized<META_TUPLE_A>, Deserialized<META_TUPLE_A>>;
3141
+ none: OmitOmittableExcludedItems<META_TUPLE_A, VALUE_EXCLUSION_RESULTS>;
3142
+ }[And$1<IsTupleOpen<META_TUPLE_A>, IS_OPEN_PROPS_EXCLUSION_REPRESENTABLE> extends true ? "moreThanTwo" : GetTupleLength<REPRESENTABLE_VALUE_EXCLUSION_RESULTS>], META_TUPLE_A>;
3143
+ declare type ExcludeTupleValues<META_TUPLE_A_VALUES extends Type[], META_TUPLE_B_VALUES extends Type[], IS_META_TUPLE_A_OPEN extends boolean, IS_META_TUPLE_B_OPEN extends boolean, META_TUPLE_A_OPEN_PROPS extends Type, META_TUPLE_B_OPEN_PROPS extends Type, VALUE_EXCLUSION_RESULTS extends ValueExclusionResultType[] = []> = META_TUPLE_A_VALUES extends [infer META_TUPLE_A_VALUES_HEAD, ...infer META_TUPLE_A_VALUES_TAIL] ? META_TUPLE_A_VALUES_HEAD extends Type ? META_TUPLE_A_VALUES_TAIL extends Type[] ? META_TUPLE_B_VALUES extends [infer META_TUPLE_B_VALUES_HEAD, ...infer META_TUPLE_B_VALUES_TAIL] ? META_TUPLE_B_VALUES_HEAD extends Type ? META_TUPLE_B_VALUES_TAIL extends Type[] ? ExcludeTupleValues<META_TUPLE_A_VALUES_TAIL, META_TUPLE_B_VALUES_TAIL, IS_META_TUPLE_A_OPEN, IS_META_TUPLE_B_OPEN, META_TUPLE_A_OPEN_PROPS, META_TUPLE_B_OPEN_PROPS, [...VALUE_EXCLUSION_RESULTS, ValueExclusionResult<META_TUPLE_A_VALUES_HEAD, true, true, META_TUPLE_B_VALUES_HEAD, true, true>]> : never : never : ExcludeTupleValues<META_TUPLE_A_VALUES_TAIL, [], IS_META_TUPLE_A_OPEN, IS_META_TUPLE_B_OPEN, META_TUPLE_A_OPEN_PROPS, META_TUPLE_B_OPEN_PROPS, [...VALUE_EXCLUSION_RESULTS, ValueExclusionResult<META_TUPLE_A_VALUES_HEAD, true, true, META_TUPLE_B_OPEN_PROPS, IS_META_TUPLE_B_OPEN, false>]> : never : never : META_TUPLE_B_VALUES extends [infer META_TUPLE_B_VALUES_HEAD, ...infer META_TUPLE_B_VALUES_TAIL] ? META_TUPLE_B_VALUES_HEAD extends Type ? META_TUPLE_B_VALUES_TAIL extends Type[] ? ExcludeTupleValues<[], META_TUPLE_B_VALUES_TAIL, IS_META_TUPLE_A_OPEN, IS_META_TUPLE_B_OPEN, META_TUPLE_A_OPEN_PROPS, META_TUPLE_B_OPEN_PROPS, [...VALUE_EXCLUSION_RESULTS, ValueExclusionResult<META_TUPLE_A_OPEN_PROPS, IS_META_TUPLE_A_OPEN, false, META_TUPLE_B_VALUES_HEAD, true, true>]> : never : never : VALUE_EXCLUSION_RESULTS;
3144
+ declare type GetTupleLength<ANY_TUPLE extends unknown[], TAIL extends unknown[] = Tail$1<ANY_TUPLE>> = If<DoesExtend$1<ANY_TUPLE, []>, "none", If<DoesExtend$1<TAIL, []>, "onlyOne", "moreThanTwo">>;
3145
+ declare type DoesTupleSizesMatch<META_TUPLE_A extends TupleType, META_TUPLE_B extends TupleType, VALUE_EXCLUSION_RESULTS extends ValueExclusionResultType[]> = If<And$1<IsTupleOpen<META_TUPLE_A>, Not$1<IsTupleOpen<META_TUPLE_B>>>, false, And$1<IsExcludedSmallEnough<VALUE_EXCLUSION_RESULTS>, IsExcludedBigEnough<VALUE_EXCLUSION_RESULTS>>>;
3146
+ declare type IsExcludedSmallEnough<VALUE_EXCLUSION_RESULTS extends ValueExclusionResultType[]> = VALUE_EXCLUSION_RESULTS extends [infer VALUE_EXCLUSION_RESULTS_HEAD, ...infer VALUE_EXCLUSION_RESULTS_TAIL] ? VALUE_EXCLUSION_RESULTS_HEAD extends ValueExclusionResultType ? VALUE_EXCLUSION_RESULTS_TAIL extends ValueExclusionResultType[] ? If<IsOutsideOfSourceScope<VALUE_EXCLUSION_RESULTS_HEAD>, false, IsExcludedSmallEnough<VALUE_EXCLUSION_RESULTS_TAIL>> : never : never : true;
3147
+ declare type IsExcludedBigEnough<VALUE_EXCLUSION_RESULTS extends ValueExclusionResultType[]> = VALUE_EXCLUSION_RESULTS extends [infer VALUE_EXCLUSION_RESULTS_HEAD, ...infer VALUE_EXCLUSION_RESULTS_TAIL] ? VALUE_EXCLUSION_RESULTS_HEAD extends ValueExclusionResultType ? VALUE_EXCLUSION_RESULTS_TAIL extends ValueExclusionResultType[] ? If<IsOutsideOfExcludedScope<VALUE_EXCLUSION_RESULTS_HEAD>, false, IsExcludedBigEnough<VALUE_EXCLUSION_RESULTS_TAIL>> : never : never : true;
3148
+ declare type RepresentableExcludedValues<VALUE_EXCLUSION_RESULTS extends ValueExclusionResultType[], REPRESENTABLE_VALUE_EXCLUSION_RESULTS extends ValueExclusionResultType[] = []> = VALUE_EXCLUSION_RESULTS extends [infer VALUE_EXCLUSION_RESULTS_HEAD, ...infer VALUE_EXCLUSION_RESULTS_TAIL] ? VALUE_EXCLUSION_RESULTS_HEAD extends ValueExclusionResultType ? VALUE_EXCLUSION_RESULTS_TAIL extends ValueExclusionResultType[] ? ExclusionResult<VALUE_EXCLUSION_RESULTS_HEAD> extends NeverType ? RepresentableExcludedValues<VALUE_EXCLUSION_RESULTS_TAIL, REPRESENTABLE_VALUE_EXCLUSION_RESULTS> : RepresentableExcludedValues<VALUE_EXCLUSION_RESULTS_TAIL, [...REPRESENTABLE_VALUE_EXCLUSION_RESULTS, VALUE_EXCLUSION_RESULTS_HEAD]> : never : never : REPRESENTABLE_VALUE_EXCLUSION_RESULTS;
3149
+ declare type PropagateExclusions<VALUE_EXCLUSION_RESULTS extends ValueExclusionResultType[], RESULT extends unknown[] = []> = VALUE_EXCLUSION_RESULTS extends [infer VALUE_EXCLUSION_RESULTS_HEAD, ...infer VALUE_EXCLUSION_RESULTS_TAIL] ? VALUE_EXCLUSION_RESULTS_HEAD extends ValueExclusionResultType ? VALUE_EXCLUSION_RESULTS_TAIL extends ValueExclusionResultType[] ? PropagateExclusions<VALUE_EXCLUSION_RESULTS_TAIL, [...RESULT, PropagateExclusion<VALUE_EXCLUSION_RESULTS_HEAD>]> : never : never : RESULT;
3150
+ declare type OmitOmittableExcludedItems<META_TUPLE extends TupleType, ITEM_EXCLUSION_RESULTS extends ValueExclusionResultType[], OMITTABLE_ITEM_EXCLUSION_RESULTS extends ValueExclusionResultType[] = OmittableExcludedItems<ITEM_EXCLUSION_RESULTS>, OMITTABLE_ITEMS_COUNT extends string = GetTupleLength<OMITTABLE_ITEM_EXCLUSION_RESULTS>> = OMITTABLE_ITEMS_COUNT extends "moreThanTwo" ? META_TUPLE : OMITTABLE_ITEMS_COUNT extends "onlyOne" ? $Tuple<RequiredExcludedItems<ITEM_EXCLUSION_RESULTS>, Never, IsSerialized<META_TUPLE>, Deserialized<META_TUPLE>> : Never;
3151
+ declare type OmittableExcludedItems<ITEM_EXCLUSION_RESULTS extends ValueExclusionResultType[], RESULT extends ValueExclusionResultType[] = []> = ITEM_EXCLUSION_RESULTS extends [infer VALUE_EXCLUSION_RESULTS_HEAD, ...infer VALUE_EXCLUSION_RESULTS_TAIL] ? VALUE_EXCLUSION_RESULTS_HEAD extends ValueExclusionResultType ? VALUE_EXCLUSION_RESULTS_TAIL extends ValueExclusionResultType[] ? If<IsOmittable<VALUE_EXCLUSION_RESULTS_HEAD>, OmittableExcludedItems<VALUE_EXCLUSION_RESULTS_TAIL, [...RESULT, VALUE_EXCLUSION_RESULTS_HEAD]>, OmittableExcludedItems<VALUE_EXCLUSION_RESULTS_TAIL, RESULT>> : never : never : RESULT;
3152
+ declare type RequiredExcludedItems<ITEM_EXCLUSION_RESULTS extends ValueExclusionResultType[], RESULT extends Type[] = []> = ITEM_EXCLUSION_RESULTS extends [infer VALUE_EXCLUSION_RESULTS_HEAD, ...infer VALUE_EXCLUSION_RESULTS_TAIL] ? VALUE_EXCLUSION_RESULTS_HEAD extends ValueExclusionResultType ? VALUE_EXCLUSION_RESULTS_TAIL extends ValueExclusionResultType[] ? IsOmittable<VALUE_EXCLUSION_RESULTS_HEAD> extends true ? RESULT : RequiredExcludedItems<VALUE_EXCLUSION_RESULTS_TAIL, [...RESULT, SourceValue<VALUE_EXCLUSION_RESULTS_HEAD>]> : never : never : RESULT;
3153
+ declare type ExcludeConst<META_TUPLE extends TupleType, META_CONST extends ConstType, META_CONST_VALUE = ConstValue<META_CONST>> = META_CONST_VALUE extends unknown[] ? _Exclude<META_TUPLE, $Tuple<ExtractConstValues<META_CONST_VALUE>, Never, IsSerialized<META_CONST>, Deserialized<META_CONST>>> : META_TUPLE;
3154
+ declare type ExtractConstValues<CONST_VALUES extends unknown[], RESULT extends unknown[] = []> = CONST_VALUES extends [infer CONST_VALUES_HEAD, ...infer CONST_VALUES_TAIL] ? ExtractConstValues<CONST_VALUES_TAIL, [...RESULT, Const<CONST_VALUES_HEAD>]> : RESULT;
3155
+ //#endregion
3156
+ //#region node_modules/ts-algebra/lib/meta-types/exclusion/index.d.ts
3157
+ declare type _Exclude<META_TYPE_A extends Type, META_TYPE_B extends Type> = _$Exclude<META_TYPE_A, META_TYPE_B>;
3158
+ declare type _$Exclude<META_TYPE_A, META_TYPE_B> = META_TYPE_A extends NeverType ? META_TYPE_A : META_TYPE_A extends AnyType ? ExcludeFromAny<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends ConstType ? ExcludeFromConst<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends EnumType ? ExcludeFromEnum<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends PrimitiveType ? ExcludeFromPrimitive<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends ArrayType ? ExcludeFromArray<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends TupleType ? ExcludeFromTuple<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends ObjectType ? ExcludeFromObject<META_TYPE_A, META_TYPE_B> : META_TYPE_A extends UnionType ? ExcludeFromUnion<META_TYPE_A, META_TYPE_B> : Never;
3159
+ //#endregion
3160
+ //#region node_modules/json-schema-to-ts/lib/types/definitions/deserializationPattern.d.ts
3161
+ type DeserializationPattern = Readonly<{
3162
+ pattern: unknown;
3163
+ output: unknown;
3164
+ }>;
3165
+ //#endregion
3166
+ //#region node_modules/json-schema-to-ts/lib/types/definitions/jsonSchema.d.ts
3167
+ declare const $JSONSchema: unique symbol;
3168
+ type $JSONSchema = typeof $JSONSchema;
3169
+ type JSONSchemaType = "string" | "number" | "integer" | "boolean" | "object" | "array" | "null";
3170
+ type JSONSchema$1 = boolean | Readonly<{
3171
+ [$JSONSchema]?: $JSONSchema;
3172
+ $id?: string | undefined;
3173
+ $ref?: string | undefined;
3174
+ $schema?: string | undefined;
3175
+ $comment?: string | undefined;
3176
+ type?: JSONSchemaType | readonly JSONSchemaType[];
3177
+ const?: unknown;
3178
+ enum?: unknown;
3179
+ multipleOf?: number | undefined;
3180
+ maximum?: number | undefined;
3181
+ exclusiveMaximum?: number | undefined;
3182
+ minimum?: number | undefined;
3183
+ exclusiveMinimum?: number | undefined;
3184
+ maxLength?: number | undefined;
3185
+ minLength?: number | undefined;
3186
+ pattern?: string | undefined;
3187
+ items?: JSONSchema$1 | readonly JSONSchema$1[];
3188
+ additionalItems?: JSONSchema$1;
3189
+ contains?: JSONSchema$1;
3190
+ maxItems?: number | undefined;
3191
+ minItems?: number | undefined;
3192
+ uniqueItems?: boolean | undefined;
3193
+ maxProperties?: number | undefined;
3194
+ minProperties?: number | undefined;
3195
+ required?: readonly string[];
3196
+ properties?: Readonly<Record<string, JSONSchema$1>>;
3197
+ patternProperties?: Readonly<Record<string, JSONSchema$1>>;
3198
+ additionalProperties?: JSONSchema$1;
3199
+ unevaluatedProperties?: JSONSchema$1;
3200
+ dependencies?: Readonly<Record<string, JSONSchema$1 | readonly string[]>>;
3201
+ propertyNames?: JSONSchema$1;
3202
+ if?: JSONSchema$1;
3203
+ then?: JSONSchema$1;
3204
+ else?: JSONSchema$1;
3205
+ allOf?: readonly JSONSchema$1[];
3206
+ anyOf?: readonly JSONSchema$1[];
3207
+ oneOf?: readonly JSONSchema$1[];
3208
+ not?: JSONSchema$1;
3209
+ format?: string | undefined;
3210
+ contentMediaType?: string | undefined;
3211
+ contentEncoding?: string | undefined;
3212
+ definitions?: Readonly<Record<string, JSONSchema$1>>;
3213
+ title?: string | undefined;
3214
+ description?: string | undefined;
3215
+ default?: unknown;
3216
+ readOnly?: boolean | undefined;
3217
+ writeOnly?: boolean | undefined;
3218
+ examples?: readonly unknown[];
3219
+ nullable?: boolean;
3220
+ }>;
3221
+ type JSONSchemaReference = JSONSchema$1 & Readonly<{
3222
+ $id: string;
3223
+ }>;
3224
+ //#endregion
3225
+ //#region node_modules/json-schema-to-ts/lib/types/definitions/fromSchemaOptions.d.ts
3226
+ type FromSchemaOptions = {
3227
+ parseNotKeyword?: boolean;
3228
+ parseIfThenElseKeywords?: boolean;
3229
+ keepDefaultedPropertiesOptional?: boolean;
3230
+ references?: JSONSchemaReference[] | false;
3231
+ deserialize?: DeserializationPattern[] | false;
3232
+ };
3233
+ type FromSchemaDefaultOptions = {
3234
+ parseNotKeyword: false;
3235
+ parseIfThenElseKeywords: false;
3236
+ keepDefaultedPropertiesOptional: false;
3237
+ references: false;
3238
+ deserialize: false;
3239
+ };
3240
+ //#endregion
3241
+ //#region node_modules/json-schema-to-ts/lib/types/parse-options.d.ts
3242
+ type IndexReferencesById<SCHEMA_REFERENCES extends readonly JSONSchemaReference[]> = { [REF_SCHEMA in SCHEMA_REFERENCES[number] as REF_SCHEMA["$id"]]: REF_SCHEMA };
3243
+ type ParseOptions<ROOT_SCHEMA extends JSONSchema$1, OPTIONS extends FromSchemaOptions> = {
3244
+ parseNotKeyword: OPTIONS["parseNotKeyword"] extends boolean ? OPTIONS["parseNotKeyword"] : FromSchemaDefaultOptions["parseNotKeyword"];
3245
+ parseIfThenElseKeywords: OPTIONS["parseIfThenElseKeywords"] extends boolean ? OPTIONS["parseIfThenElseKeywords"] : FromSchemaDefaultOptions["parseIfThenElseKeywords"];
3246
+ keepDefaultedPropertiesOptional: OPTIONS["keepDefaultedPropertiesOptional"] extends boolean ? OPTIONS["keepDefaultedPropertiesOptional"] : FromSchemaDefaultOptions["keepDefaultedPropertiesOptional"];
3247
+ rootSchema: ROOT_SCHEMA;
3248
+ references: OPTIONS["references"] extends JSONSchemaReference[] ? IndexReferencesById<OPTIONS["references"]> : {};
3249
+ deserialize: OPTIONS["deserialize"] extends DeserializationPattern[] | false ? OPTIONS["deserialize"] : FromSchemaDefaultOptions["deserialize"];
3250
+ };
3251
+ //#endregion
3252
+ //#region node_modules/json-schema-to-ts/lib/types/type-utils/and.d.ts
3253
+ type And<CONDITION_A, CONDITION_B> = CONDITION_A extends true ? CONDITION_B extends true ? true : false : false;
3254
+ //#endregion
3255
+ //#region node_modules/json-schema-to-ts/lib/types/type-utils/extends.d.ts
3256
+ type DoesExtend<TYPE_A, TYPE_B> = [TYPE_A] extends [TYPE_B] ? true : false;
3257
+ //#endregion
3258
+ //#region node_modules/json-schema-to-ts/lib/types/type-utils/get.d.ts
3259
+ type DeepGet<OBJECT, PATH extends string[], DEFAULT = undefined> = PATH extends [infer PATH_HEAD, ...infer PATH_TAIL] ? PATH_HEAD extends string ? PATH_TAIL extends string[] ? PATH_HEAD extends keyof OBJECT ? DeepGet<OBJECT[PATH_HEAD], PATH_TAIL, DEFAULT> : DEFAULT : never : never : OBJECT;
3260
+ //#endregion
3261
+ //#region node_modules/json-schema-to-ts/lib/types/type-utils/join.d.ts
3262
+ type Join<STRINGS extends string[], SEPARATOR extends string = ","> = STRINGS extends [] ? "" : STRINGS extends [string] ? `${STRINGS[0]}` : STRINGS extends [string, ...infer STRINGS_TAIL] ? STRINGS_TAIL extends string[] ? `${STRINGS[0]}${SEPARATOR}${Join<STRINGS_TAIL, SEPARATOR>}` : never : string;
3263
+ //#endregion
3264
+ //#region node_modules/json-schema-to-ts/lib/types/type-utils/not.d.ts
3265
+ type Not<BOOL> = BOOL extends false ? true : BOOL extends true ? false : never;
3266
+ //#endregion
3267
+ //#region node_modules/json-schema-to-ts/lib/types/type-utils/pop.d.ts
3268
+ type Pop<ARRAY extends unknown[]> = ARRAY extends readonly [...infer ARRAY_BODY, unknown] | readonly [...infer ARRAY_BODY, unknown?] ? ARRAY_BODY : ARRAY;
3269
+ //#endregion
3270
+ //#region node_modules/json-schema-to-ts/lib/types/type-utils/split.d.ts
3271
+ type RecursiveSplit<STRING extends string, SEPARATOR extends string = ""> = STRING extends `${infer BEFORE}${SEPARATOR}${infer AFTER}` ? [BEFORE, ...RecursiveSplit<AFTER, SEPARATOR>] : [STRING];
3272
+ type Split<STRING extends string, SEPARATOR extends string = "", RESULT extends string[] = RecursiveSplit<STRING, SEPARATOR>> = SEPARATOR extends "" ? Pop<RESULT> : RESULT;
3273
+ //#endregion
3274
+ //#region node_modules/json-schema-to-ts/lib/types/type-utils/tail.d.ts
3275
+ type Tail<ARRAY extends unknown[]> = ARRAY extends readonly [] ? ARRAY : ARRAY extends readonly [unknown?, ...infer ARRAY_TAIL] ? ARRAY_TAIL : ARRAY;
3276
+ //#endregion
3277
+ //#region node_modules/json-schema-to-ts/lib/types/type-utils/writable.d.ts
3278
+ type Writable<TYPE> = TYPE extends ((...args: unknown[]) => unknown) | Date | RegExp ? TYPE : TYPE extends ReadonlyMap<infer KEYS, infer VALUES> ? Map<Writable<KEYS>, Writable<VALUES>> : TYPE extends ReadonlySet<infer VALUES> ? Set<Writable<VALUES>> : TYPE extends ReadonlyArray<unknown> ? `${bigint}` extends `${keyof TYPE & any}` ? { -readonly [KEY in keyof TYPE]: Writable<TYPE[KEY]> } : Writable<TYPE[number]>[] : TYPE extends object ? { -readonly [KEY in keyof TYPE]: Writable<TYPE[KEY]> } : TYPE;
3279
+ //#endregion
3280
+ //#region node_modules/json-schema-to-ts/lib/types/parse-schema/utils.d.ts
3281
+ type RemoveInvalidAdditionalItems<SCHEMA extends JSONSchema$1> = SCHEMA extends Readonly<{
3282
+ items: JSONSchema$1 | readonly JSONSchema$1[];
3283
+ }> ? SCHEMA extends Readonly<{
3284
+ additionalItems: JSONSchema$1;
3285
+ }> ? SCHEMA : SCHEMA & Readonly<{
3286
+ additionalItems: true;
3287
+ }> : SCHEMA extends boolean ? SCHEMA : Omit<SCHEMA, "additionalItems">;
3288
+ type RemoveInvalidAdditionalProperties<SCHEMA extends JSONSchema$1> = SCHEMA extends Readonly<{
3289
+ additionalProperties: JSONSchema$1;
3290
+ }> ? SCHEMA extends Readonly<{
3291
+ properties: Readonly<Record<string, JSONSchema$1>>;
3292
+ }> ? SCHEMA : SCHEMA & Readonly<{
3293
+ properties: {};
3294
+ }> : SCHEMA extends boolean ? SCHEMA : Omit<SCHEMA, "additionalProperties">;
3295
+ type MergeSubSchema<PARENT_SCHEMA extends JSONSchema$1, SUB_SCHEMA extends JSONSchema$1, CLEANED_SUB_SCHEMA extends JSONSchema$1 = RemoveInvalidAdditionalProperties<RemoveInvalidAdditionalItems<SUB_SCHEMA>>> = Omit<PARENT_SCHEMA, keyof CLEANED_SUB_SCHEMA | "additionalProperties" | "patternProperties" | "unevaluatedProperties" | "required" | "additionalItems"> & CLEANED_SUB_SCHEMA;
3296
+ //#endregion
3297
+ //#region node_modules/json-schema-to-ts/lib/types/parse-schema/allOf.d.ts
3298
+ type AllOfSchema = JSONSchema$1 & Readonly<{
3299
+ allOf: readonly JSONSchema$1[];
3300
+ }>;
3301
+ type ParseAllOfSchema<ALL_OF_SCHEMA extends AllOfSchema, OPTIONS extends ParseSchemaOptions> = RecurseOnAllOfSchema<ALL_OF_SCHEMA["allOf"], ALL_OF_SCHEMA, OPTIONS, ParseSchema<Omit<ALL_OF_SCHEMA, "allOf">, OPTIONS>>;
3302
+ type RecurseOnAllOfSchema<SUB_SCHEMAS extends readonly JSONSchema$1[], ROOT_ALL_OF_SCHEMA extends AllOfSchema, OPTIONS extends ParseSchemaOptions, PARSED_ROOT_ALL_OF_SCHEMA> = SUB_SCHEMAS extends readonly [infer SUB_SCHEMAS_HEAD, ...infer SUB_SCHEMAS_TAIL] ? SUB_SCHEMAS_HEAD extends JSONSchema$1 ? SUB_SCHEMAS_TAIL extends readonly JSONSchema$1[] ? RecurseOnAllOfSchema<SUB_SCHEMAS_TAIL, ROOT_ALL_OF_SCHEMA, OPTIONS, $Intersect<ParseSchema<MergeSubSchema<Omit<ROOT_ALL_OF_SCHEMA, "allOf">, SUB_SCHEMAS_HEAD>, OPTIONS>, PARSED_ROOT_ALL_OF_SCHEMA>> : never : never : PARSED_ROOT_ALL_OF_SCHEMA;
3303
+ //#endregion
3304
+ //#region node_modules/json-schema-to-ts/lib/types/parse-schema/anyOf.d.ts
3305
+ type AnyOfSchema = JSONSchema$1 & Readonly<{
3306
+ anyOf: readonly JSONSchema$1[];
3307
+ }>;
3308
+ type ParseAnyOfSchema<ANY_OF_SCHEMA extends AnyOfSchema, OPTIONS extends ParseSchemaOptions> = $Union<RecurseOnAnyOfSchema<ANY_OF_SCHEMA["anyOf"], ANY_OF_SCHEMA, OPTIONS>>;
3309
+ type RecurseOnAnyOfSchema<SUB_SCHEMAS extends readonly JSONSchema$1[], ROOT_ANY_OF_SCHEMA extends AnyOfSchema, OPTIONS extends ParseSchemaOptions, RESULT = never> = SUB_SCHEMAS extends readonly [infer SUB_SCHEMAS_HEAD, ...infer SUB_SCHEMAS_TAIL] ? SUB_SCHEMAS_HEAD extends JSONSchema$1 ? SUB_SCHEMAS_TAIL extends readonly JSONSchema$1[] ? RecurseOnAnyOfSchema<SUB_SCHEMAS_TAIL, ROOT_ANY_OF_SCHEMA, OPTIONS, RESULT | $Intersect<ParseSchema<Omit<ROOT_ANY_OF_SCHEMA, "anyOf">, OPTIONS>, ParseSchema<MergeSubSchema<Omit<ROOT_ANY_OF_SCHEMA, "anyOf">, SUB_SCHEMAS_HEAD>, OPTIONS>>> : never : never : RESULT;
3310
+ //#endregion
3311
+ //#region node_modules/json-schema-to-ts/lib/types/parse-schema/const.d.ts
3312
+ type ConstSchema = JSONSchema$1 & Readonly<{
3313
+ const: unknown;
3314
+ }>;
3315
+ type ParseConstSchema<CONST_SCHEMA extends ConstSchema, OPTIONS extends ParseSchemaOptions> = $Intersect<ParseConst<CONST_SCHEMA>, ParseSchema<Omit<CONST_SCHEMA, "const">, OPTIONS>>;
3316
+ type ParseConst<CONST_SCHEMA extends ConstSchema> = Const<Writable<CONST_SCHEMA["const"]>>;
3317
+ //#endregion
3318
+ //#region node_modules/json-schema-to-ts/lib/types/parse-schema/deserialize.d.ts
3319
+ type DeserializeSchema<SCHEMA extends JSONSchema$1, OPTIONS extends Omit<ParseSchemaOptions, "deserialize"> & {
3320
+ deserialize: DeserializationPattern[];
3321
+ }> = RecurseOnDeserializationPatterns<SCHEMA, OPTIONS["deserialize"]>;
3322
+ type RecurseOnDeserializationPatterns<SCHEMA extends JSONSchema$1, DESERIALIZATION_PATTERNS extends DeserializationPattern[], RESULT = Any> = DESERIALIZATION_PATTERNS extends [infer DESERIALIZATION_PATTERNS_HEAD, ...infer DESERIALIZATION_PATTERNS_TAIL] ? DESERIALIZATION_PATTERNS_HEAD extends DeserializationPattern ? DESERIALIZATION_PATTERNS_TAIL extends DeserializationPattern[] ? RecurseOnDeserializationPatterns<SCHEMA, DESERIALIZATION_PATTERNS_TAIL, SCHEMA extends DESERIALIZATION_PATTERNS_HEAD["pattern"] ? $Intersect<Any<true, DESERIALIZATION_PATTERNS_HEAD["output"]>, RESULT> : RESULT> : never : never : RESULT;
3323
+ //#endregion
3324
+ //#region node_modules/json-schema-to-ts/lib/types/parse-schema/enum.d.ts
3325
+ type EnumSchema = JSONSchema$1 & Readonly<{
3326
+ enum: readonly unknown[];
3327
+ }>;
3328
+ type ParseEnumSchema<ENUM_SCHEMA extends EnumSchema, OPTIONS extends ParseSchemaOptions> = $Intersect<ParseEnum<ENUM_SCHEMA>, ParseSchema<Omit<ENUM_SCHEMA, "enum">, OPTIONS>>;
3329
+ type ParseEnum<ENUM_SCHEMA extends EnumSchema> = Enum<Writable<ENUM_SCHEMA["enum"][number]>>;
3330
+ //#endregion
3331
+ //#region node_modules/json-schema-to-ts/lib/types/parse-schema/ifThenElse.d.ts
3332
+ type IfThenElseSchema = JSONSchema$1 & {
3333
+ if: JSONSchema$1;
3334
+ then?: JSONSchema$1;
3335
+ else?: JSONSchema$1;
3336
+ };
3337
+ type ParseIfThenElseSchema<IF_THEN_ELSE_SCHEMA extends IfThenElseSchema, OPTIONS extends ParseSchemaOptions, REST_SCHEMA extends JSONSchema$1 = Omit<IF_THEN_ELSE_SCHEMA, "if" | "then" | "else">, IF_SCHEMA extends JSONSchema$1 = MergeSubSchema<REST_SCHEMA, IF_THEN_ELSE_SCHEMA["if"]>, PARSED_THEN_SCHEMA = (IF_THEN_ELSE_SCHEMA extends {
3338
+ then: JSONSchema$1;
3339
+ } ? $Intersect<ParseSchema<IF_SCHEMA, OPTIONS>, ParseSchema<MergeSubSchema<REST_SCHEMA, IF_THEN_ELSE_SCHEMA["then"]>, OPTIONS>> : ParseSchema<IF_SCHEMA, OPTIONS>), PARSED_ELSE_SCHEMA = (IF_THEN_ELSE_SCHEMA extends {
3340
+ else: JSONSchema$1;
3341
+ } ? $Intersect<_$Exclude<ParseSchema<REST_SCHEMA, OPTIONS>, ParseSchema<IF_SCHEMA, OPTIONS>>, ParseSchema<MergeSubSchema<REST_SCHEMA, IF_THEN_ELSE_SCHEMA["else"]>, OPTIONS>> : _$Exclude<ParseSchema<REST_SCHEMA, OPTIONS>, ParseSchema<IF_SCHEMA, OPTIONS>>)> = $Intersect<$Union<PARSED_THEN_SCHEMA | PARSED_ELSE_SCHEMA>, ParseSchema<REST_SCHEMA, OPTIONS>>;
3342
+ //#endregion
3343
+ //#region node_modules/json-schema-to-ts/lib/types/parse-schema/multipleTypes.d.ts
3344
+ type MultipleTypesSchema = JSONSchema$1 & Readonly<{
3345
+ type: readonly JSONSchemaType[];
3346
+ }>;
3347
+ type ParseMultipleTypesSchema<MULTI_TYPE_SCHEMA extends MultipleTypesSchema, OPTIONS extends ParseSchemaOptions> = $Union<RecurseOnMixedSchema<MULTI_TYPE_SCHEMA["type"], MULTI_TYPE_SCHEMA, OPTIONS>>;
3348
+ type RecurseOnMixedSchema<TYPES extends readonly JSONSchemaType[], ROOT_MULTI_TYPE_SCHEMA extends MultipleTypesSchema, OPTIONS extends ParseSchemaOptions, RESULT = never> = TYPES extends readonly [infer TYPES_HEAD, ...infer TYPES_TAIL] ? TYPES_HEAD extends JSONSchemaType ? TYPES_TAIL extends readonly JSONSchemaType[] ? RecurseOnMixedSchema<TYPES_TAIL, ROOT_MULTI_TYPE_SCHEMA, OPTIONS, RESULT | ParseSchema<Omit<ROOT_MULTI_TYPE_SCHEMA, "type"> & {
3349
+ type: TYPES_HEAD;
3350
+ }, OPTIONS>> : never : never : RESULT;
3351
+ //#endregion
3352
+ //#region node_modules/json-schema-to-ts/lib/types/parse-schema/not.d.ts
3353
+ type NotSchema = JSONSchema$1 & Readonly<{
3354
+ not: JSONSchema$1;
3355
+ }>;
3356
+ type AllTypes = Union<Primitive<null> | Primitive<boolean> | Primitive<number> | Primitive<string> | _Array | _Object<{}, never, Any>>;
3357
+ type ParseNotSchema<NOT_SCHEMA extends NotSchema, OPTIONS extends ParseSchemaOptions, PARSED_REST_SCHEMA = ParseSchema<Omit<NOT_SCHEMA, "not">, OPTIONS>, EXCLUSION = _$Exclude<PARSED_REST_SCHEMA extends AnyType ? $Intersect<AllTypes, PARSED_REST_SCHEMA> : PARSED_REST_SCHEMA, ParseSchema<MergeSubSchema<Omit<NOT_SCHEMA, "not">, NOT_SCHEMA["not"]>, OPTIONS>>> = EXCLUSION extends Never ? PARSED_REST_SCHEMA : EXCLUSION;
3358
+ //#endregion
3359
+ //#region node_modules/json-schema-to-ts/lib/types/parse-schema/nullable.d.ts
3360
+ type NullableSchema = JSONSchema$1 & Readonly<{
3361
+ nullable: boolean;
3362
+ }>;
3363
+ type ParseNullableSchema<NULLABLE_SCHEMA extends NullableSchema, OPTIONS extends ParseSchemaOptions, PARSED_REST_SCHEMA = ParseSchema<Omit<NULLABLE_SCHEMA, "nullable">, OPTIONS>> = NULLABLE_SCHEMA extends Readonly<{
3364
+ nullable: true;
3365
+ }> ? $Union<Primitive<null> | PARSED_REST_SCHEMA> : PARSED_REST_SCHEMA;
3366
+ //#endregion
3367
+ //#region node_modules/json-schema-to-ts/lib/types/parse-schema/oneOf.d.ts
3368
+ type OneOfSchema = JSONSchema$1 & Readonly<{
3369
+ oneOf: readonly JSONSchema$1[];
3370
+ }>;
3371
+ type ParseOneOfSchema<ONE_OF_SCHEMA extends OneOfSchema, OPTIONS extends ParseSchemaOptions> = $Union<RecurseOnOneOfSchema<ONE_OF_SCHEMA["oneOf"], ONE_OF_SCHEMA, OPTIONS>>;
3372
+ type RecurseOnOneOfSchema<SUB_SCHEMAS extends readonly JSONSchema$1[], ROOT_ONE_OF_SCHEMA extends OneOfSchema, OPTIONS extends ParseSchemaOptions, RESULT = never> = SUB_SCHEMAS extends readonly [infer SUB_SCHEMAS_HEAD, ...infer SUB_SCHEMAS_TAIL] ? SUB_SCHEMAS_HEAD extends JSONSchema$1 ? SUB_SCHEMAS_TAIL extends readonly JSONSchema$1[] ? RecurseOnOneOfSchema<SUB_SCHEMAS_TAIL, ROOT_ONE_OF_SCHEMA, OPTIONS, RESULT | $Intersect<ParseSchema<Omit<ROOT_ONE_OF_SCHEMA, "oneOf">, OPTIONS>, ParseSchema<MergeSubSchema<Omit<ROOT_ONE_OF_SCHEMA, "oneOf">, SUB_SCHEMAS_HEAD>, OPTIONS>>> : never : never : RESULT;
3373
+ //#endregion
3374
+ //#region node_modules/json-schema-to-ts/lib/types/parse-schema/references/utils.d.ts
3375
+ type ParseReference<SCHEMA extends JSONSchema$1, OPTIONS extends ParseSchemaOptions, REFERENCE_SOURCE extends JSONSchema$1, PATH_IN_SOURCE extends string | undefined, MATCHING_REFERENCE extends JSONSchema$1 = (PATH_IN_SOURCE extends string ? DeepGet<REFERENCE_SOURCE, Tail<Split<PATH_IN_SOURCE, "/">>, false> : REFERENCE_SOURCE)> = $Intersect<ParseSchema<MATCHING_REFERENCE, OPTIONS>, ParseSchema<MergeSubSchema<MATCHING_REFERENCE, SCHEMA>, OPTIONS>>;
3376
+ //#endregion
3377
+ //#region node_modules/json-schema-to-ts/lib/types/parse-schema/references/external.d.ts
3378
+ type ParseExternalReferenceSchema<REF_SCHEMA extends ReferencingSchema, OPTIONS extends ParseSchemaOptions, EXTERNAL_REFERENCE_ID extends string, SUB_PATH extends string | undefined> = OPTIONS["references"] extends { [KEY in EXTERNAL_REFERENCE_ID]: JSONSchema$1 } ? ParseReference<Omit<REF_SCHEMA, "$ref">, OPTIONS, OPTIONS["references"][EXTERNAL_REFERENCE_ID], SUB_PATH> : OPTIONS extends {
3379
+ rootSchema: IdSchema;
3380
+ } ? ParseExternalReferenceWithoutDirectorySchema<Omit<REF_SCHEMA, "$ref">, OPTIONS, EXTERNAL_REFERENCE_ID, SUB_PATH> : Never;
3381
+ type ParseDirectory<REFERENCE extends string> = Join<Pop<Split<REFERENCE, "/">>, "/">;
3382
+ type IdSchema = JSONSchema$1 & {
3383
+ $id: string;
3384
+ };
3385
+ type ParseExternalReferenceWithoutDirectorySchema<SUB_SCHEMA extends JSONSchema$1, OPTIONS extends ParseSchemaOptions & {
3386
+ rootSchema: IdSchema;
3387
+ }, EXTERNAL_REFERENCE_ID extends string, SUB_PATH extends string | undefined, DIRECTORY extends string = ParseDirectory<OPTIONS["rootSchema"]["$id"]>, COMPLETE_REFERENCE extends string = Join<[DIRECTORY, EXTERNAL_REFERENCE_ID], "/">> = COMPLETE_REFERENCE extends keyof OPTIONS["references"] ? ParseReference<SUB_SCHEMA, OPTIONS, OPTIONS["references"][COMPLETE_REFERENCE], SUB_PATH> : Never;
3388
+ //#endregion
3389
+ //#region node_modules/json-schema-to-ts/lib/types/parse-schema/references/internal.d.ts
3390
+ type ParseInternalReferenceSchema<REFERENCING_SCHEMA extends ReferencingSchema, OPTIONS extends ParseSchemaOptions, PATH extends string> = ParseReference<Omit<REFERENCING_SCHEMA, "$ref">, OPTIONS, OPTIONS["rootSchema"], PATH>;
3391
+ //#endregion
3392
+ //#region node_modules/json-schema-to-ts/lib/types/parse-schema/references/index.d.ts
3393
+ type ReferencingSchema = JSONSchema$1 & {
3394
+ $ref: string;
3395
+ };
3396
+ type ParseReferenceSchema<REFERENCING_SCHEMA extends ReferencingSchema, OPTIONS extends ParseSchemaOptions, REFERENCE_ID_AND_PATH extends string[] = Split<REFERENCING_SCHEMA["$ref"], "#">> = REFERENCE_ID_AND_PATH[0] extends "" ? ParseInternalReferenceSchema<REFERENCING_SCHEMA, OPTIONS, REFERENCE_ID_AND_PATH[1]> : ParseExternalReferenceSchema<REFERENCING_SCHEMA, OPTIONS, REFERENCE_ID_AND_PATH[0], REFERENCE_ID_AND_PATH[1]>;
3397
+ //#endregion
3398
+ //#region node_modules/json-schema-to-ts/lib/types/parse-schema/array.d.ts
3399
+ type ArrayOrTupleSchema = JSONSchema$1 & Readonly<{
3400
+ type: "array";
3401
+ }>;
3402
+ type ArraySchema = Omit<JSONSchema$1, "items"> & Readonly<{
3403
+ type: "array";
3404
+ items: JSONSchema$1;
3405
+ }>;
3406
+ type TupleSchema = JSONSchema$1 & Readonly<{
3407
+ type: "array";
3408
+ items: readonly JSONSchema$1[];
3409
+ }>;
3410
+ type ParseArrayOrTupleSchema<ARRAY_OR_TUPLE_SCHEMA extends ArrayOrTupleSchema, OPTIONS extends ParseSchemaOptions> = ARRAY_OR_TUPLE_SCHEMA extends ArraySchema ? _$Array<ParseSchema<ARRAY_OR_TUPLE_SCHEMA["items"], OPTIONS>> : ARRAY_OR_TUPLE_SCHEMA extends TupleSchema ? $Union<ApplyMinMaxAndAdditionalItems<ParseTupleItems<ARRAY_OR_TUPLE_SCHEMA["items"], OPTIONS>, ARRAY_OR_TUPLE_SCHEMA, OPTIONS>> : _$Array;
3411
+ type ParseTupleItems<ITEM_SCHEMAS extends readonly JSONSchema$1[], OPTIONS extends ParseSchemaOptions> = ITEM_SCHEMAS extends readonly [infer ITEM_SCHEMAS_HEAD, ...infer ITEM_SCHEMAS_TAIL] ? ITEM_SCHEMAS_HEAD extends JSONSchema$1 ? ITEM_SCHEMAS_TAIL extends readonly JSONSchema$1[] ? [ParseSchema<ITEM_SCHEMAS_HEAD, OPTIONS>, ...ParseTupleItems<ITEM_SCHEMAS_TAIL, OPTIONS>] : never : never : [];
3412
+ type ApplyMinMaxAndAdditionalItems<PARSED_ITEM_SCHEMAS extends any[], ROOT_SCHEMA extends ArrayOrTupleSchema, OPTIONS extends ParseSchemaOptions> = ApplyAdditionalItems<ApplyMinMax<PARSED_ITEM_SCHEMAS, ROOT_SCHEMA extends Readonly<{
3413
+ minItems: number;
3414
+ }> ? ROOT_SCHEMA["minItems"] : 0, ROOT_SCHEMA extends Readonly<{
3415
+ maxItems: number;
3416
+ }> ? ROOT_SCHEMA["maxItems"] : undefined>, ROOT_SCHEMA extends Readonly<{
3417
+ additionalItems: JSONSchema$1;
3418
+ }> ? ROOT_SCHEMA["additionalItems"] : true, OPTIONS>;
3419
+ type ApplyMinMax<RECURSED_PARSED_ITEM_SCHEMAS extends any[], MIN extends number, MAX extends number | undefined, RESULT = never, HAS_ENCOUNTERED_MIN extends boolean = false, HAS_ENCOUNTERED_MAX extends boolean = false, INITIAL_PARSED_ITEM_SCHEMAS extends any[] = RECURSED_PARSED_ITEM_SCHEMAS> = And<Not<DoesExtend<MIN, RECURSED_PARSED_ITEM_SCHEMAS["length"]>>, DoesExtend<RECURSED_PARSED_ITEM_SCHEMAS, [any, ...any[]]>> extends true ? RECURSED_PARSED_ITEM_SCHEMAS extends [...infer RECURSED_PARSED_ITEM_SCHEMAS_BODY, unknown] ? ApplyMinMax<RECURSED_PARSED_ITEM_SCHEMAS_BODY, MIN, MAX, RECURSED_PARSED_ITEM_SCHEMAS["length"] extends MAX ? $Tuple<RECURSED_PARSED_ITEM_SCHEMAS> : RESULT | $Tuple<RECURSED_PARSED_ITEM_SCHEMAS>, HAS_ENCOUNTERED_MIN extends true ? true : DoesExtend<MIN, RECURSED_PARSED_ITEM_SCHEMAS["length"]>, HAS_ENCOUNTERED_MAX extends true ? true : DoesExtend<MAX, RECURSED_PARSED_ITEM_SCHEMAS["length"]>, INITIAL_PARSED_ITEM_SCHEMAS> : never : {
3420
+ result: MAX extends undefined ? RESULT | $Tuple<RECURSED_PARSED_ITEM_SCHEMAS> : HAS_ENCOUNTERED_MAX extends true ? RESULT | $Tuple<RECURSED_PARSED_ITEM_SCHEMAS> : MAX extends RECURSED_PARSED_ITEM_SCHEMAS["length"] ? $Tuple<RECURSED_PARSED_ITEM_SCHEMAS> : IsLongerThan<Tail<RECURSED_PARSED_ITEM_SCHEMAS>, MAX> extends true ? never : RESULT | $Tuple<RECURSED_PARSED_ITEM_SCHEMAS>;
3421
+ hasEncounteredMin: DoesExtend<MIN, RECURSED_PARSED_ITEM_SCHEMAS["length"]>;
3422
+ hasEncounteredMax: HAS_ENCOUNTERED_MAX extends true ? true : MAX extends RECURSED_PARSED_ITEM_SCHEMAS["length"] ? true : IsLongerThan<Tail<RECURSED_PARSED_ITEM_SCHEMAS>, MAX>;
3423
+ completeTuple: INITIAL_PARSED_ITEM_SCHEMAS;
3424
+ };
3425
+ type IsLongerThan<TUPLE extends any[], LENGTH extends number | undefined, RESULT extends boolean = false> = LENGTH extends undefined ? false : TUPLE["length"] extends LENGTH ? true : TUPLE extends [any, ...infer TUPLE_TAIL] ? IsLongerThan<TUPLE_TAIL, LENGTH> : RESULT;
3426
+ type ApplyAdditionalItems<APPLY_MIN_MAX_RESULT extends {
3427
+ result: any;
3428
+ hasEncounteredMin: boolean;
3429
+ hasEncounteredMax: boolean;
3430
+ completeTuple: any[];
3431
+ }, ADDITIONAL_ITEMS_SCHEMA extends JSONSchema$1, OPTIONS extends ParseSchemaOptions> = APPLY_MIN_MAX_RESULT extends {
3432
+ hasEncounteredMax: true;
3433
+ } ? APPLY_MIN_MAX_RESULT extends {
3434
+ hasEncounteredMin: true;
3435
+ } ? APPLY_MIN_MAX_RESULT["result"] : Never : ADDITIONAL_ITEMS_SCHEMA extends false ? APPLY_MIN_MAX_RESULT extends {
3436
+ hasEncounteredMin: true;
3437
+ } ? APPLY_MIN_MAX_RESULT["result"] : Never : ADDITIONAL_ITEMS_SCHEMA extends true ? APPLY_MIN_MAX_RESULT extends {
3438
+ hasEncounteredMin: true;
3439
+ } ? APPLY_MIN_MAX_RESULT["result"] | $Tuple<APPLY_MIN_MAX_RESULT["completeTuple"], Any> : $Tuple<APPLY_MIN_MAX_RESULT["completeTuple"], Any> : APPLY_MIN_MAX_RESULT extends {
3440
+ hasEncounteredMin: true;
3441
+ } ? APPLY_MIN_MAX_RESULT["result"] | $Tuple<APPLY_MIN_MAX_RESULT["completeTuple"], ParseSchema<ADDITIONAL_ITEMS_SCHEMA, OPTIONS>> : $Tuple<APPLY_MIN_MAX_RESULT["completeTuple"], ParseSchema<ADDITIONAL_ITEMS_SCHEMA, OPTIONS>>;
3442
+ //#endregion
3443
+ //#region node_modules/json-schema-to-ts/lib/types/parse-schema/object.d.ts
3444
+ type ObjectSchema$1 = JSONSchema$1 & Readonly<{
3445
+ type: "object";
3446
+ }>;
3447
+ type ParseObjectSchema<OBJECT_SCHEMA extends ObjectSchema$1, OPTIONS extends ParseSchemaOptions> = OBJECT_SCHEMA extends Readonly<{
3448
+ properties: Readonly<Record<string, JSONSchema$1>>;
3449
+ }> ? _$Object<{ [KEY in keyof OBJECT_SCHEMA["properties"]]: ParseSchema<OBJECT_SCHEMA["properties"][KEY], OPTIONS> }, GetRequired<OBJECT_SCHEMA, OPTIONS>, GetOpenProps<OBJECT_SCHEMA, OPTIONS>, GetClosedOnResolve<OBJECT_SCHEMA>> : _$Object<{}, GetRequired<OBJECT_SCHEMA, OPTIONS>, GetOpenProps<OBJECT_SCHEMA, OPTIONS>, GetClosedOnResolve<OBJECT_SCHEMA>>;
3450
+ type GetRequired<OBJECT_SCHEMA extends ObjectSchema$1, OPTIONS extends ParseSchemaOptions> = (OBJECT_SCHEMA extends Readonly<{
3451
+ required: ReadonlyArray<string>;
3452
+ }> ? OBJECT_SCHEMA["required"][number] : never) | (OPTIONS["keepDefaultedPropertiesOptional"] extends true ? never : OBJECT_SCHEMA extends Readonly<{
3453
+ properties: Readonly<Record<string, JSONSchema$1>>;
3454
+ }> ? { [KEY in keyof OBJECT_SCHEMA["properties"] & string]: OBJECT_SCHEMA["properties"][KEY] extends Readonly<{
3455
+ default: unknown;
3456
+ }> ? KEY : never }[keyof OBJECT_SCHEMA["properties"] & string] : never);
3457
+ type GetOpenProps<OBJECT_SCHEMA extends ObjectSchema$1, OPTIONS extends ParseSchemaOptions> = OBJECT_SCHEMA extends Readonly<{
3458
+ additionalProperties: JSONSchema$1;
3459
+ }> ? OBJECT_SCHEMA extends Readonly<{
3460
+ patternProperties: Record<string, JSONSchema$1>;
3461
+ }> ? AdditionalAndPatternProps<OBJECT_SCHEMA["additionalProperties"], OBJECT_SCHEMA["patternProperties"], OPTIONS> : ParseSchema<OBJECT_SCHEMA["additionalProperties"], OPTIONS> : OBJECT_SCHEMA extends Readonly<{
3462
+ patternProperties: Record<string, JSONSchema$1>;
3463
+ }> ? PatternProps<OBJECT_SCHEMA["patternProperties"], OPTIONS> : Any;
3464
+ type GetClosedOnResolve<OBJECT_SCHEMA extends ObjectSchema$1> = OBJECT_SCHEMA extends Readonly<{
3465
+ unevaluatedProperties: false;
3466
+ }> ? true : false;
3467
+ type PatternProps<PATTERN_PROPERTY_SCHEMAS extends Readonly<Record<string, JSONSchema$1>>, OPTIONS extends ParseSchemaOptions> = $Union<{ [KEY in keyof PATTERN_PROPERTY_SCHEMAS]: ParseSchema<PATTERN_PROPERTY_SCHEMAS[KEY], OPTIONS> }[keyof PATTERN_PROPERTY_SCHEMAS]>;
3468
+ type AdditionalAndPatternProps<ADDITIONAL_PROPERTIES_SCHEMA extends JSONSchema$1, PATTERN_PROPERTY_SCHEMAS extends Readonly<Record<string, JSONSchema$1>>, OPTIONS extends ParseSchemaOptions> = ADDITIONAL_PROPERTIES_SCHEMA extends boolean ? PatternProps<PATTERN_PROPERTY_SCHEMAS, OPTIONS> : $Union<ParseSchema<ADDITIONAL_PROPERTIES_SCHEMA, OPTIONS> | { [KEY in keyof PATTERN_PROPERTY_SCHEMAS]: ParseSchema<PATTERN_PROPERTY_SCHEMAS[KEY], OPTIONS> }[keyof PATTERN_PROPERTY_SCHEMAS]>;
3469
+ //#endregion
3470
+ //#region node_modules/json-schema-to-ts/lib/types/parse-schema/singleType.d.ts
3471
+ type SingleTypeSchema = JSONSchema$1 & Readonly<{
3472
+ type: JSONSchemaType;
3473
+ }>;
3474
+ type ParseSingleTypeSchema<SINGLE_TYPE_SCHEMA extends SingleTypeSchema, OPTIONS extends ParseSchemaOptions> = SINGLE_TYPE_SCHEMA extends Readonly<{
3475
+ type: "null";
3476
+ }> ? Primitive<null> : SINGLE_TYPE_SCHEMA extends Readonly<{
3477
+ type: "boolean";
3478
+ }> ? Primitive<boolean> : SINGLE_TYPE_SCHEMA extends Readonly<{
3479
+ type: "integer";
3480
+ }> ? Primitive<number> : SINGLE_TYPE_SCHEMA extends Readonly<{
3481
+ type: "number";
3482
+ }> ? Primitive<number> : SINGLE_TYPE_SCHEMA extends Readonly<{
3483
+ type: "string";
3484
+ }> ? Primitive<string> : SINGLE_TYPE_SCHEMA extends ArrayOrTupleSchema ? ParseArrayOrTupleSchema<SINGLE_TYPE_SCHEMA, OPTIONS> : SINGLE_TYPE_SCHEMA extends ObjectSchema$1 ? ParseObjectSchema<SINGLE_TYPE_SCHEMA, OPTIONS> : Never;
3485
+ //#endregion
3486
+ //#region node_modules/json-schema-to-ts/lib/types/parse-schema/index.d.ts
3487
+ type ParseSchemaOptions = {
3488
+ parseNotKeyword: boolean;
3489
+ parseIfThenElseKeywords: boolean;
3490
+ keepDefaultedPropertiesOptional: boolean;
3491
+ rootSchema: JSONSchema$1;
3492
+ references: Record<string, JSONSchema$1>;
3493
+ deserialize: DeserializationPattern[] | false;
3494
+ };
3495
+ type ParseSchema<SCHEMA extends JSONSchema$1, OPTIONS extends ParseSchemaOptions, RESULT = (JSONSchema$1 extends SCHEMA ? Any : SCHEMA extends true | string ? Any : SCHEMA extends false ? Never : SCHEMA extends NullableSchema ? ParseNullableSchema<SCHEMA, OPTIONS> : SCHEMA extends ReferencingSchema ? ParseReferenceSchema<SCHEMA, OPTIONS> : And<DoesExtend<OPTIONS["parseIfThenElseKeywords"], true>, DoesExtend<SCHEMA, IfThenElseSchema>> extends true ? SCHEMA extends IfThenElseSchema ? ParseIfThenElseSchema<SCHEMA, OPTIONS> : never : And<DoesExtend<OPTIONS["parseNotKeyword"], true>, DoesExtend<SCHEMA, NotSchema>> extends true ? SCHEMA extends NotSchema ? ParseNotSchema<SCHEMA, OPTIONS> : never : SCHEMA extends AllOfSchema ? ParseAllOfSchema<SCHEMA, OPTIONS> : SCHEMA extends OneOfSchema ? ParseOneOfSchema<SCHEMA, OPTIONS> : SCHEMA extends AnyOfSchema ? ParseAnyOfSchema<SCHEMA, OPTIONS> : SCHEMA extends EnumSchema ? ParseEnumSchema<SCHEMA, OPTIONS> : SCHEMA extends ConstSchema ? ParseConstSchema<SCHEMA, OPTIONS> : SCHEMA extends MultipleTypesSchema ? ParseMultipleTypesSchema<SCHEMA, OPTIONS> : SCHEMA extends SingleTypeSchema ? ParseSingleTypeSchema<SCHEMA, OPTIONS> : Any)> = OPTIONS extends {
3496
+ deserialize: DeserializationPattern[];
3497
+ } ? $Intersect<DeserializeSchema<SCHEMA, OPTIONS>, RESULT> : RESULT;
3498
+ //#endregion
3499
+ //#region node_modules/json-schema-to-ts/lib/types/index.d.ts
3500
+ type FromSchema$1<SCHEMA extends JSONSchema$1, OPTIONS extends FromSchemaOptions = FromSchemaDefaultOptions> = $Resolve<ParseSchema<SCHEMA, ParseOptions<SCHEMA, OPTIONS>>>;
3501
+ //#endregion
3502
+ //#region node_modules/fets/node_modules/@whatwg-node/fetch/dist/index.d.ts
3503
+ /// <reference lib="dom" />
3504
+ /// <reference lib="dom.iterable" />
3505
+ declare type _URLPattern = typeof URLPattern;
3506
+ declare module '@whatwg-node/fetch' {
3507
+ export const fetch: typeof globalThis.fetch;
3508
+ export const Request: typeof globalThis.Request;
3509
+ export const Response: typeof globalThis.Response & {
3510
+ json(data: any, init?: ResponseInit): globalThis.Response;
3511
+ };
3512
+ export const Headers: typeof globalThis.Headers;
3513
+ export const FormData: typeof globalThis.FormData;
3514
+ export const ReadableStream: typeof globalThis.ReadableStream;
3515
+ export const WritableStream: typeof globalThis.WritableStream;
3516
+ export const TransformStream: typeof globalThis.TransformStream;
3517
+ export const CompressionStream: typeof globalThis.CompressionStream;
3518
+ export const DecompressionStream: typeof globalThis.DecompressionStream;
3519
+ export const TextDecoderStream: typeof globalThis.TextDecoderStream;
3520
+ export const TextEncoderStream: typeof globalThis.TextEncoderStream;
3521
+ export const Blob: typeof globalThis.Blob;
3522
+ export const File: typeof globalThis.File;
3523
+ export const crypto: typeof globalThis.crypto;
3524
+ export const btoa: typeof globalThis.btoa;
3525
+ export const TextDecoder: typeof globalThis.TextDecoder;
3526
+ export const TextEncoder: typeof globalThis.TextEncoder;
3527
+ export const URL: typeof globalThis.URL;
3528
+ export const URLSearchParams: typeof globalThis.URLSearchParams;
3529
+ export const URLPattern: _URLPattern;
3530
+ export interface FormDataLimits {
3531
+ /* Max field name size (in bytes). Default: 100. */
3532
+ fieldNameSize?: number;
3533
+ /* Max field value size (in bytes). Default: 1MB. */
3534
+ fieldSize?: number;
3535
+ /* Max number of fields. Default: Infinity. */
3536
+ fields?: number;
3537
+ /* For multipart forms, the max file size (in bytes). Default: Infinity. */
3538
+ fileSize?: number;
3539
+ /* For multipart forms, the max number of file fields. Default: Infinity. */
3540
+ files?: number;
3541
+ /* For multipart forms, the max number of parts (fields + files). Default: Infinity. */
3542
+ parts?: number;
3543
+ /* For multipart forms, the max number of header key-value pairs to parse. Default: 2000. */
3544
+ headerSize?: number;
3545
+ }
3546
+ export const createFetch: (opts?: {
3547
+ useNodeFetch?: boolean;
3548
+ formDataLimits?: FormDataLimits;
3549
+ skipPonyfill?: boolean;
3550
+ }) => {
3551
+ fetch: typeof fetch;
3552
+ Request: typeof Request;
3553
+ Response: typeof Response;
3554
+ Headers: typeof Headers;
3555
+ FormData: typeof FormData;
3556
+ ReadableStream: typeof ReadableStream;
3557
+ WritableStream: typeof WritableStream;
3558
+ TransformStream: typeof TransformStream;
3559
+ CompressionStream: typeof CompressionStream;
3560
+ DecompressionStream: typeof DecompressionStream;
3561
+ TextDecoderStream: typeof TextDecoderStream;
3562
+ TextEncoderStream: typeof TextEncoderStream;
3563
+ Blob: typeof Blob;
3564
+ File: typeof File;
3565
+ crypto: typeof crypto;
3566
+ btoa: typeof btoa;
3567
+ TextEncoder: typeof TextEncoder;
3568
+ TextDecoder: typeof TextDecoder;
3569
+ URLPattern: typeof URLPattern;
3570
+ URL: typeof URL;
3571
+ URLSearchParams: typeof URLSearchParams;
3572
+ };
3573
+ }
3574
+ //#endregion
3575
+ //#region node_modules/@whatwg-node/promise-helpers/typings/index.d.cts
3576
+ type MaybePromise<T> = Promise<T> | T;
3577
+ type MaybePromiseLike<T> = PromiseLike<T> | T;
3578
+ //#endregion
3579
+ //#region node_modules/fets/node_modules/@whatwg-node/server/typings/utils.d.cts
3580
+ interface NodeRequest {
3581
+ protocol?: string | undefined;
3582
+ hostname?: string | undefined;
3583
+ body?: any | undefined;
3584
+ url?: string | undefined;
3585
+ originalUrl?: string | undefined;
3586
+ method?: string | undefined;
3587
+ headers?: any | undefined;
3588
+ req?: IncomingMessage | Http2ServerRequest | undefined;
3589
+ raw?: IncomingMessage | Http2ServerRequest | undefined;
3590
+ socket?: Socket | undefined;
3591
+ query?: any | undefined;
3592
+ once?(event: string, listener: (...args: any[]) => void): void;
3593
+ aborted?: boolean | undefined;
3594
+ }
3595
+ type NodeResponse = ServerResponse | Http2ServerResponse;
3596
+ //#endregion
3597
+ //#region node_modules/fets/node_modules/@whatwg-node/server/typings/uwebsockets.d.cts
3598
+ interface UWSRequest {
3599
+ getMethod(): string;
3600
+ forEach(callback: (key: string, value: string) => void): void;
3601
+ getUrl(): string;
3602
+ getQuery(): string;
3603
+ getHeader(key: string): string | undefined;
3604
+ setYield(y: boolean): void;
3605
+ }
3606
+ interface UWSResponse {
3607
+ onData(callback: (chunk: ArrayBuffer, isLast: boolean) => void): void;
3608
+ onAborted(callback: () => void): void;
3609
+ writeStatus(status: string): void;
3610
+ writeHeader(key: string, value: string): void;
3611
+ end(body?: any): void;
3612
+ close(): void;
3613
+ write(body: any): boolean;
3614
+ cork(callback: () => void): void;
3615
+ }
3616
+ type UWSHandler = (res: UWSResponse, req: UWSRequest) => void | Promise<void>;
3617
+ //#endregion
3618
+ //#region node_modules/fets/node_modules/@whatwg-node/server/typings/types.d.cts
3619
+ interface FetchEvent extends Event {
3620
+ waitUntil(f: MaybePromise<void>): void;
3621
+ request: Request;
3622
+ respondWith(r: MaybePromiseLike<Response>): void;
3623
+ }
3624
+ interface ServerAdapterBaseObject<TServerContext, THandleRequest extends ServerAdapterRequestHandler<TServerContext> = ServerAdapterRequestHandler<TServerContext>> {
3625
+ /**
3626
+ * An async function that takes `Request` and the server context and returns a `Response`.
3627
+ * If you use `requestListener`, the server context is `{ req: IncomingMessage, res: ServerResponse }`.
3628
+ */
3629
+ handle: THandleRequest;
3630
+ }
3631
+ interface ServerAdapterObject<TServerContext> extends EventListenerObject, AsyncDisposable {
3632
+ /**
3633
+ * A basic request listener that takes a `Request` with the server context and returns a `Response`.
3634
+ */
3635
+ handleRequest: (request: Request, ctx: TServerContext & Partial<ServerAdapterInitialContext>) => MaybePromise<Response>;
3636
+ /**
3637
+ * WHATWG Fetch spec compliant `fetch` function that can be used for testing purposes.
3638
+ */
3639
+ fetch(request: Request, ctx: TServerContext): MaybePromise<Response>;
3640
+ fetch(request: Request, ...ctx: Partial<TServerContext>[]): MaybePromise<Response>;
3641
+ fetch(urlStr: string, ctx: TServerContext): MaybePromise<Response>;
3642
+ fetch(urlStr: string, ...ctx: Partial<TServerContext>[]): MaybePromise<Response>;
3643
+ fetch(urlStr: string, init: RequestInit, ctx: TServerContext): MaybePromise<Response>;
3644
+ fetch(urlStr: string, init: RequestInit, ...ctx: Partial<TServerContext>[]): MaybePromise<Response>;
3645
+ fetch(url: URL, ctx: TServerContext): MaybePromise<Response>;
3646
+ fetch(url: URL, ...ctx: Partial<TServerContext>[]): MaybePromise<Response>;
3647
+ fetch(url: URL, init: RequestInit, ctx: TServerContext): MaybePromise<Response>;
3648
+ fetch(url: URL, init: RequestInit, ...ctx: Partial<TServerContext>[]): MaybePromise<Response>;
3649
+ /**
3650
+ * This function takes Node's request object and returns a WHATWG Fetch spec compliant `Response` object.
3651
+ *
3652
+ * @deprecated Use `handleNodeRequestAndResponse` instead.
3653
+ **/
3654
+ handleNodeRequest(nodeRequest: NodeRequest, ...ctx: Partial<TServerContext & ServerAdapterInitialContext>[]): MaybePromise<Response>;
3655
+ /**
3656
+ * This function takes Node's request and response objects and returns a WHATWG Fetch spec compliant `Response` object.
3657
+ */
3658
+ handleNodeRequestAndResponse(nodeRequest: NodeRequest, nodeResponseOrContainer: {
3659
+ raw: NodeResponse;
3660
+ } | NodeResponse, ...ctx: Partial<TServerContext & ServerAdapterInitialContext>[]): MaybePromise<Response>;
3661
+ /**
3662
+ * A request listener function that can be used with any Node server variation.
3663
+ */
3664
+ requestListener: RequestListener;
3665
+ handleUWS: UWSHandler;
3666
+ handle(req: NodeRequest, res: NodeResponse, ...ctx: Partial<TServerContext & ServerAdapterInitialContext>[]): Promise<void>;
3667
+ handle(requestLike: RequestLike, ...ctx: Partial<TServerContext & ServerAdapterInitialContext>[]): MaybePromise<Response>;
3668
+ handle(request: Request, ...ctx: Partial<TServerContext & ServerAdapterInitialContext>[]): MaybePromise<Response>;
3669
+ handle(fetchEvent: FetchEvent & Partial<TServerContext & ServerAdapterInitialContext>, ...ctx: Partial<TServerContext>[]): void;
3670
+ handle(res: UWSResponse, req: UWSRequest, ...ctx: Partial<TServerContext & ServerAdapterInitialContext>[]): Promise<void>;
3671
+ handle(container: {
3672
+ request: Request;
3673
+ } & Partial<TServerContext & ServerAdapterInitialContext>, ...ctx: Partial<TServerContext & ServerAdapterInitialContext>[]): MaybePromise<Response>;
3674
+ disposableStack: AsyncDisposableStack;
3675
+ dispose(): Promise<void> | void;
3676
+ /**
3677
+ * Register a promise that should be waited in the background for before the server process is exited.
3678
+ *
3679
+ * This also avoids unhandled promise rejections, which would otherwise cause the process to exit on some environment like Node.
3680
+ * @param promise The promise to wait for
3681
+ * @returns
3682
+ */
3683
+ waitUntil: WaitUntilFn;
3684
+ }
3685
+ interface RequestLike {
3686
+ url: string;
3687
+ method: string;
3688
+ headers: HeadersLike;
3689
+ body?: AsyncIterable<Uint8Array> | null;
3690
+ }
3691
+ interface HeadersLike extends Iterable<[string, string]> {
3692
+ get(name: string): string | null | undefined;
3693
+ set(name: string, value: string): void;
3694
+ has(name: string): boolean;
3695
+ }
3696
+ type ServerAdapter<TServerContext, TBaseObject extends ServerAdapterBaseObject<TServerContext>> = TBaseObject & ServerAdapterObject<TServerContext>['handle'] & ServerAdapterObject<TServerContext>;
3697
+ type ServerAdapterRequestHandler<TServerContext> = (request: Request, ctx: TServerContext & ServerAdapterInitialContext) => MaybePromise<Response>;
3698
+ type WaitUntilFn = (promise: Promise<void> | void) => void;
3699
+ type ServerAdapterInitialContext = {
3700
+ /**
3701
+ * Register a promise that should be waited in the background for before the server process is exited.
3702
+ *
3703
+ * This also avoids unhandled promise rejections, which would otherwise cause the process to exit on some environment like Node.
3704
+ * @param promise The promise to wait for
3705
+ * @returns
3706
+ */
3707
+ waitUntil: WaitUntilFn;
3708
+ };
3709
+ //#endregion
3710
+ //#region node_modules/fets/typings/types.d.ts
3711
+ type StatusCodeMap$1<T> = { [TKey in StatusCode$1]?: T };
3712
+ //#endregion
3713
+ //#region node_modules/fets/typings/typed-fetch.d.ts
3714
+ type OkStatusCode$1 = 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226;
3715
+ type RedirectStatusCode$1 = 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308;
3716
+ type ClientErrorStatusCode$1 = 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451;
3717
+ type ServerErrorStatusCode$1 = 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511;
3718
+ type StatusCode$1 = OkStatusCode$1 | RedirectStatusCode$1 | ClientErrorStatusCode$1 | ServerErrorStatusCode$1;
3719
+ type TypedBody$1<TJSON, TFormData extends Record<string, FormDataEntryValue | undefined>, THeaders extends Record<string, string | undefined>> = Omit<Body, 'json' | 'formData' | 'headers'> & {
3720
+ /**
3721
+ * The `json()` method takes the stream and reads it to completion.
3722
+ * It returns a promise which resolves with the result of parsing the body text as JSON.
3723
+ *
3724
+ * Note that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.
3725
+ *
3726
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Response/json
3727
+ */
3728
+ json(): Promise<TJSON>;
3729
+ /**
3730
+ * The formData() method takes the stream and reads it to completion. It returns a promise that resolves with a `FormData` object.
3731
+ *
3732
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Response/formData
3733
+ */
3734
+ formData(): Promise<TypedFormData$1<TFormData>>;
3735
+ /**
3736
+ * The headers read-only property of the Response interface contains the Headers object associated with the response.
3737
+ *
3738
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Response/headers
3739
+ */
3740
+ headers: TypedHeaders$1<THeaders>;
3741
+ };
3742
+ type DefaultHTTPHeaders$1 = 'accept' | 'accept-language' | 'content-language' | 'content-type' | 'content-length';
3743
+ type Maybe$1 = undefined | null;
3744
+ type UndefinedToNull$1<T> = T extends undefined ? Exclude<T, undefined> | null : T;
3745
+ interface TypedHeaders$1<TMap extends Record<string, string | undefined>> {
3746
+ append<TName extends DefaultHTTPHeaders$1 | keyof TMap>(name: TName, value: TName extends keyof TMap ? TMap[TName] : string): void;
3747
+ delete<TName extends DefaultHTTPHeaders$1 | keyof TMap>(name: TName): void;
3748
+ get<TName extends DefaultHTTPHeaders$1 | keyof TMap>(name: TName): TName extends keyof TMap ? UndefinedToNull$1<TMap[TName]> : TName extends DefaultHTTPHeaders$1 ? string | null : never;
3749
+ has<TName extends DefaultHTTPHeaders$1 | keyof TMap>(name: TName): TName extends DefaultHTTPHeaders$1 ? boolean : TName extends keyof TMap ? TMap[TName] extends Maybe$1 ? boolean : true : never;
3750
+ set<TName extends DefaultHTTPHeaders$1 | keyof TMap>(name: TName, value: TName extends keyof TMap ? TMap[TName] : string): void;
3751
+ forEach(callbackfn: <TName extends keyof TMap>(value: TMap[TName], key: TName, parent: TypedHeaders$1<TMap>) => void, thisArg?: any): void;
3752
+ entries(): IterableIterator<[keyof TMap, TMap[keyof TMap]]>;
3753
+ keys(): IterableIterator<keyof TMap>;
3754
+ values(): IterableIterator<TMap[keyof TMap]>;
3755
+ [Symbol.iterator](): IterableIterator<[keyof TMap, TMap[keyof TMap]]>;
3756
+ getSetCookie(): string[];
3757
+ }
3758
+ type StatusTextMap$1 = {
3759
+ 100: 'Continue';
3760
+ 101: 'Switching Protocols';
3761
+ 102: 'Processing';
3762
+ 103: 'Early Hints';
3763
+ 200: 'OK';
3764
+ 201: 'Created';
3765
+ 202: 'Accepted';
3766
+ 203: 'Non-Authoritative Information';
3767
+ 204: 'No Content';
3768
+ 205: 'Reset Content';
3769
+ 206: 'Partial Content';
3770
+ 207: 'Multi-Status';
3771
+ 208: 'Already Reported';
3772
+ 226: 'IM Used';
3773
+ 300: 'Multiple Choices';
3774
+ 301: 'Moved Permanently';
3775
+ 302: 'Found';
3776
+ 303: 'See Other';
3777
+ 304: 'Not Modified';
3778
+ 305: 'Use Proxy';
3779
+ 307: 'Temporary Redirect';
3780
+ 308: 'Permanent Redirect';
3781
+ 400: 'Bad Request';
3782
+ 401: 'Unauthorized';
3783
+ 402: 'Payment Required';
3784
+ 403: 'Forbidden';
3785
+ 404: 'Not Found';
3786
+ 405: 'Method Not Allowed';
3787
+ 406: 'Not Acceptable';
3788
+ 407: 'Proxy Authentication Required';
3789
+ 408: 'Request Timeout';
3790
+ 409: 'Conflict';
3791
+ 410: 'Gone';
3792
+ 411: 'Length Required';
3793
+ 412: 'Precondition Failed';
3794
+ 413: 'Payload Too Large';
3795
+ 414: 'URI Too Long';
3796
+ 415: 'Unsupported Media Type';
3797
+ 416: 'Range Not Satisfiable';
3798
+ 417: 'Expectation Failed';
3799
+ 418: "I'm a Teapot";
3800
+ 421: 'Misdirected Request';
3801
+ 422: 'Unprocessable Entity';
3802
+ 423: 'Locked';
3803
+ 424: 'Failed Dependency';
3804
+ 425: 'Too Early';
3805
+ 426: 'Upgrade Required';
3806
+ 428: 'Precondition Required';
3807
+ 429: 'Too Many Requests';
3808
+ 431: 'Request Header Fields Too Large';
3809
+ 451: 'Unavailable For Legal Reasons';
3810
+ 500: 'Internal Server Error';
3811
+ 501: 'Not Implemented';
3812
+ 502: 'Bad Gateway';
3813
+ 503: 'Service Unavailable';
3814
+ 504: 'Gateway Timeout';
3815
+ 505: 'HTTP Version Not Supported';
3816
+ 506: 'Variant Also Negotiates';
3817
+ 507: 'Insufficient Storage';
3818
+ 508: 'Loop Detected';
3819
+ 509: 'Bandwidth Limit Exceeded';
3820
+ 510: 'Not Extended';
3821
+ 511: 'Network Authentication Required';
3822
+ };
3823
+ type TypedResponse$1<TJSON = unknown, THeaders extends Record<string, string> = Record<string, string>, TStatusCode extends StatusCode$1 = StatusCode$1> = Omit<Response, 'json' | 'status' | 'ok'> & Omit<TypedBody$1<TJSON, any, THeaders>, 'formData'> & {
3824
+ /**
3825
+ * The status read-only property of the Response interface contains the HTTP status codes of the response.
3826
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Response/status
3827
+ *
3828
+ * You can use `Response.ok` to check if the status is in the range 200-299.
3829
+ */
3830
+ status: TStatusCode;
3831
+ /**
3832
+ * The statusText read-only property of the Response interface contains the status message corresponding to the HTTP status code in Response.status.
3833
+ * For example, this would be OK for a status code 200, Continue for 100, Not Found for 404.
3834
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Response/statusText
3835
+ */
3836
+ statusText: TStatusCode extends keyof StatusTextMap$1 ? StatusTextMap$1[TStatusCode] : string;
3837
+ } & {
3838
+ /**
3839
+ * The ok read-only property of the Response interface contains a Boolean stating whether the response was successful (status in the range 200-299) or not.
3840
+ */
3841
+ ok: TStatusCode extends OkStatusCode$1 ? true : false;
3842
+ };
3843
+ type JSONofResponse<TResponse extends TypedResponse$1> = TResponse extends TypedResponse$1<infer TJSON> ? TJSON : never;
3844
+ interface TypedFormData$1<TMap extends Record<string, FormDataEntryValue | undefined> = Record<string, FormDataEntryValue | undefined>> {
3845
+ append<TName extends keyof TMap>(name: TName, value: TMap[TName] extends any[] ? TMap[TName][0] : TMap[TName], fileName?: string): void;
3846
+ delete(name: keyof TMap): void;
3847
+ get<TName extends keyof TMap>(name: TName): TMap[TName] extends any[] ? TMap[TName][0] : TMap[TName];
3848
+ getAll<TName extends keyof TMap>(name: TName): TMap[TName] extends any[] ? TMap[TName] : TMap[TName][];
3849
+ has<TName extends string>(name: TName): TName extends keyof TMap ? (TMap[TName] extends Maybe$1 ? boolean : true) : false;
3850
+ set<TName extends keyof TMap>(name: TName, value: TMap[TName] extends any[] ? TMap[TName][0] : TMap[TName], fileName?: string): void;
3851
+ forEach(callbackfn: <TName extends keyof TMap>(value: TMap[TName], key: TName, parent: this) => void, thisArg?: any): void;
3852
+ entries(): IterableIterator<[keyof TMap, TMap[keyof TMap]]>;
3853
+ keys(): IterableIterator<keyof TMap>;
3854
+ values(): IterableIterator<TMap[keyof TMap]>;
3855
+ [Symbol.iterator](): IterableIterator<[keyof TMap, TMap[keyof TMap]]>;
3856
+ }
3857
+ //#endregion
3858
+ //#region node_modules/fets/typings/client/clientResponse.d.cts
3859
+ type ClientTypedResponsePromise<TTypedResponse extends Response> = Promise<TTypedResponse> & {
3860
+ json(): Promise<TTypedResponse extends TypedResponse$1 ? JSONofResponse<TTypedResponse> : any>;
3861
+ };
3862
+ //#endregion
3863
+ //#region node_modules/fets/typings/typed-fetch.d.cts
3864
+ type OkStatusCode = 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226;
3865
+ type RedirectStatusCode = 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308;
3866
+ type ClientErrorStatusCode = 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451;
3867
+ type ServerErrorStatusCode = 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511;
3868
+ type StatusCode = OkStatusCode | RedirectStatusCode | ClientErrorStatusCode | ServerErrorStatusCode;
3869
+ type TypedBody<TJSON, TFormData extends Record<string, FormDataEntryValue | undefined>, THeaders extends Record<string, string | undefined>> = Omit<Body, 'json' | 'formData' | 'headers'> & {
3870
+ /**
3871
+ * The `json()` method takes the stream and reads it to completion.
3872
+ * It returns a promise which resolves with the result of parsing the body text as JSON.
3873
+ *
3874
+ * Note that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.
3875
+ *
3876
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Response/json
3877
+ */
3878
+ json(): Promise<TJSON>;
3879
+ /**
3880
+ * The formData() method takes the stream and reads it to completion. It returns a promise that resolves with a `FormData` object.
3881
+ *
3882
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Response/formData
3883
+ */
3884
+ formData(): Promise<TypedFormData<TFormData>>;
3885
+ /**
3886
+ * The headers read-only property of the Response interface contains the Headers object associated with the response.
3887
+ *
3888
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Response/headers
3889
+ */
3890
+ headers: TypedHeaders<THeaders>;
3891
+ };
3892
+ type DefaultHTTPHeaders = 'accept' | 'accept-language' | 'content-language' | 'content-type' | 'content-length';
3893
+ type Maybe = undefined | null;
3894
+ type UndefinedToNull<T> = T extends undefined ? Exclude<T, undefined> | null : T;
3895
+ interface TypedHeaders<TMap extends Record<string, string | undefined>> {
3896
+ append<TName extends DefaultHTTPHeaders | keyof TMap>(name: TName, value: TName extends keyof TMap ? TMap[TName] : string): void;
3897
+ delete<TName extends DefaultHTTPHeaders | keyof TMap>(name: TName): void;
3898
+ get<TName extends DefaultHTTPHeaders | keyof TMap>(name: TName): TName extends keyof TMap ? UndefinedToNull<TMap[TName]> : TName extends DefaultHTTPHeaders ? string | null : never;
3899
+ has<TName extends DefaultHTTPHeaders | keyof TMap>(name: TName): TName extends DefaultHTTPHeaders ? boolean : TName extends keyof TMap ? TMap[TName] extends Maybe ? boolean : true : never;
3900
+ set<TName extends DefaultHTTPHeaders | keyof TMap>(name: TName, value: TName extends keyof TMap ? TMap[TName] : string): void;
3901
+ forEach(callbackfn: <TName extends keyof TMap>(value: TMap[TName], key: TName, parent: TypedHeaders<TMap>) => void, thisArg?: any): void;
3902
+ entries(): IterableIterator<[keyof TMap, TMap[keyof TMap]]>;
3903
+ keys(): IterableIterator<keyof TMap>;
3904
+ values(): IterableIterator<TMap[keyof TMap]>;
3905
+ [Symbol.iterator](): IterableIterator<[keyof TMap, TMap[keyof TMap]]>;
3906
+ getSetCookie(): string[];
3907
+ }
3908
+ type StatusTextMap = {
3909
+ 100: 'Continue';
3910
+ 101: 'Switching Protocols';
3911
+ 102: 'Processing';
3912
+ 103: 'Early Hints';
3913
+ 200: 'OK';
3914
+ 201: 'Created';
3915
+ 202: 'Accepted';
3916
+ 203: 'Non-Authoritative Information';
3917
+ 204: 'No Content';
3918
+ 205: 'Reset Content';
3919
+ 206: 'Partial Content';
3920
+ 207: 'Multi-Status';
3921
+ 208: 'Already Reported';
3922
+ 226: 'IM Used';
3923
+ 300: 'Multiple Choices';
3924
+ 301: 'Moved Permanently';
3925
+ 302: 'Found';
3926
+ 303: 'See Other';
3927
+ 304: 'Not Modified';
3928
+ 305: 'Use Proxy';
3929
+ 307: 'Temporary Redirect';
3930
+ 308: 'Permanent Redirect';
3931
+ 400: 'Bad Request';
3932
+ 401: 'Unauthorized';
3933
+ 402: 'Payment Required';
3934
+ 403: 'Forbidden';
3935
+ 404: 'Not Found';
3936
+ 405: 'Method Not Allowed';
3937
+ 406: 'Not Acceptable';
3938
+ 407: 'Proxy Authentication Required';
3939
+ 408: 'Request Timeout';
3940
+ 409: 'Conflict';
3941
+ 410: 'Gone';
3942
+ 411: 'Length Required';
3943
+ 412: 'Precondition Failed';
3944
+ 413: 'Payload Too Large';
3945
+ 414: 'URI Too Long';
3946
+ 415: 'Unsupported Media Type';
3947
+ 416: 'Range Not Satisfiable';
3948
+ 417: 'Expectation Failed';
3949
+ 418: "I'm a Teapot";
3950
+ 421: 'Misdirected Request';
3951
+ 422: 'Unprocessable Entity';
3952
+ 423: 'Locked';
3953
+ 424: 'Failed Dependency';
3954
+ 425: 'Too Early';
3955
+ 426: 'Upgrade Required';
3956
+ 428: 'Precondition Required';
3957
+ 429: 'Too Many Requests';
3958
+ 431: 'Request Header Fields Too Large';
3959
+ 451: 'Unavailable For Legal Reasons';
3960
+ 500: 'Internal Server Error';
3961
+ 501: 'Not Implemented';
3962
+ 502: 'Bad Gateway';
3963
+ 503: 'Service Unavailable';
3964
+ 504: 'Gateway Timeout';
3965
+ 505: 'HTTP Version Not Supported';
3966
+ 506: 'Variant Also Negotiates';
3967
+ 507: 'Insufficient Storage';
3968
+ 508: 'Loop Detected';
3969
+ 509: 'Bandwidth Limit Exceeded';
3970
+ 510: 'Not Extended';
3971
+ 511: 'Network Authentication Required';
3972
+ };
3973
+ type TypedResponse<TJSON = unknown, THeaders extends Record<string, string> = Record<string, string>, TStatusCode extends StatusCode = StatusCode> = Omit<Response, 'json' | 'status' | 'ok'> & Omit<TypedBody<TJSON, any, THeaders>, 'formData'> & {
3974
+ /**
3975
+ * The status read-only property of the Response interface contains the HTTP status codes of the response.
3976
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Response/status
3977
+ *
3978
+ * You can use `Response.ok` to check if the status is in the range 200-299.
3979
+ */
3980
+ status: TStatusCode;
3981
+ /**
3982
+ * The statusText read-only property of the Response interface contains the status message corresponding to the HTTP status code in Response.status.
3983
+ * For example, this would be OK for a status code 200, Continue for 100, Not Found for 404.
3984
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Response/statusText
3985
+ */
3986
+ statusText: TStatusCode extends keyof StatusTextMap ? StatusTextMap[TStatusCode] : string;
3987
+ } & {
3988
+ /**
3989
+ * The ok read-only property of the Response interface contains a Boolean stating whether the response was successful (status in the range 200-299) or not.
3990
+ */
3991
+ ok: TStatusCode extends OkStatusCode ? true : false;
3992
+ };
3993
+ type TypedResponseWithJSONStatusMap<TResponseJSONStatusMap extends StatusCodeMap$1<any>> = { [TStatusCode in keyof TResponseJSONStatusMap]: TStatusCode extends StatusCode ? TypedResponse<TResponseJSONStatusMap[TStatusCode], Record<string, string>, TStatusCode> : never }[keyof TResponseJSONStatusMap];
3994
+ type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS' | 'CONNECT' | 'TRACE';
3995
+ type TypedRequest<TJSON = any, TFormData extends Record<string, FormDataEntryValue | undefined> = Record<string, FormDataEntryValue | undefined>, THeaders extends Record<string, string | undefined> = Record<string, string | undefined>, TMethod extends HTTPMethod = HTTPMethod, TQueryParams = any, TPathParams extends Record<string, any> = Record<string, any>> = Omit<Request, 'json' | 'method' | 'headers' | 'formData'> & TypedBody<TJSON, TFormData, THeaders> & {
3996
+ parsedUrl: URL;
3997
+ method: TMethod;
3998
+ params: TPathParams;
3999
+ query: TQueryParams;
4000
+ };
4001
+ interface TypedFormData<TMap extends Record<string, FormDataEntryValue | undefined> = Record<string, FormDataEntryValue | undefined>> {
4002
+ append<TName extends keyof TMap>(name: TName, value: TMap[TName] extends any[] ? TMap[TName][0] : TMap[TName], fileName?: string): void;
4003
+ delete(name: keyof TMap): void;
4004
+ get<TName extends keyof TMap>(name: TName): TMap[TName] extends any[] ? TMap[TName][0] : TMap[TName];
4005
+ getAll<TName extends keyof TMap>(name: TName): TMap[TName] extends any[] ? TMap[TName] : TMap[TName][];
4006
+ has<TName extends string>(name: TName): TName extends keyof TMap ? (TMap[TName] extends Maybe ? boolean : true) : false;
4007
+ set<TName extends keyof TMap>(name: TName, value: TMap[TName] extends any[] ? TMap[TName][0] : TMap[TName], fileName?: string): void;
4008
+ forEach(callbackfn: <TName extends keyof TMap>(value: TMap[TName], key: TName, parent: this) => void, thisArg?: any): void;
4009
+ entries(): IterableIterator<[keyof TMap, TMap[keyof TMap]]>;
4010
+ keys(): IterableIterator<keyof TMap>;
4011
+ values(): IterableIterator<TMap[keyof TMap]>;
4012
+ [Symbol.iterator](): IterableIterator<[keyof TMap, TMap[keyof TMap]]>;
4013
+ }
4014
+ //#endregion
4015
+ //#region node_modules/fets/typings/client/types.d.cts
4016
+ type ClientRequestInit = Omit<RequestInit, 'body' | 'method' | 'headers'>;
4017
+ //#endregion
4018
+ //#region node_modules/fets/typings/types.d.cts
4019
+ type Simplify<T> = { [KeyType in keyof T]: Simplify<T[KeyType]> } & {};
4020
+ type JSONSchema = Exclude<JSONSchema$1, boolean>;
4021
+ interface OpenAPIInfo {
4022
+ title?: string;
4023
+ description?: string;
4024
+ version?: string;
4025
+ license?: {
4026
+ name?: string;
4027
+ url?: string;
4028
+ };
4029
+ termsOfService?: string;
4030
+ contact?: {
4031
+ name?: string;
4032
+ url?: string;
4033
+ email?: string;
4034
+ };
4035
+ }
4036
+ type OpenAPIPathObject = Record<string, OpenAPIOperationObject> & {
4037
+ parameters?: OpenAPIParameterObject[];
4038
+ };
4039
+ interface OpenAPIParameterObject {
4040
+ name: string;
4041
+ in: 'path' | 'query' | 'header' | 'cookie';
4042
+ required?: boolean;
4043
+ schema?: any;
4044
+ }
4045
+ interface OpenAPIRequestBodyObject {
4046
+ content?: Record<string, OpenAPIMediaTypeObject>;
4047
+ }
4048
+ interface OpenAPIOperationObject {
4049
+ operationId?: string;
4050
+ description?: string;
4051
+ tags?: string[];
4052
+ parameters?: OpenAPIParameterObject[];
4053
+ requestBody?: OpenAPIRequestBodyObject;
4054
+ responses?: Record<string | number, OpenAPIResponseObject>;
4055
+ security?: any[];
4056
+ }
4057
+ interface OpenAPIResponseObject {
4058
+ description?: string;
4059
+ content?: Record<string, OpenAPIMediaTypeObject>;
4060
+ }
4061
+ interface OpenAPIMediaTypeObject {
4062
+ schema?: any;
4063
+ }
4064
+ type OpenAPIDocument = {
4065
+ openapi?: string;
4066
+ info?: OpenAPIInfo;
4067
+ servers?: {
4068
+ url: string;
4069
+ }[] | string[];
4070
+ paths?: Record<string, OpenAPIPathObject>;
4071
+ components?: unknown;
4072
+ };
4073
+ type RouterComponentsBase = {
4074
+ schemas?: Record<string, JSONSchema>;
4075
+ securitySchemes?: Record<string, SecurityScheme>;
4076
+ };
4077
+ type BasicAuthSecurityScheme = {
4078
+ type: 'http';
4079
+ scheme: 'basic';
4080
+ };
4081
+ type BearerAuthSecurityScheme = {
4082
+ type: 'http';
4083
+ scheme: 'bearer';
4084
+ };
4085
+ type ApiKeySecurityScheme = {
4086
+ type: 'apiKey';
4087
+ name: string;
4088
+ in: 'header' | 'query' | 'cookie';
4089
+ };
4090
+ type SecurityScheme = BasicAuthSecurityScheme | BearerAuthSecurityScheme | ApiKeySecurityScheme;
4091
+ type Circular<TJSONSchema extends JSONSchema> = TJSONSchema extends {
4092
+ properties: {
4093
+ [key: string]: JSONSchema;
4094
+ };
4095
+ } ? TJSONSchema extends PropertyValue<TJSONSchema, Property<TJSONSchema>> ? true : Circular<PropertyValue<TJSONSchema, Property<TJSONSchema>>> : false;
4096
+ type Property<TJSONSchema extends JSONSchema> = keyof TJSONSchema['properties'];
4097
+ type PropertyValue<TJSONSchema extends JSONSchema, TProperty extends keyof TJSONSchema['properties']> = TJSONSchema['properties'][TProperty];
4098
+ type FromSchema<T> = T extends {
4099
+ static: infer U;
4100
+ } ? U : T extends JSONSchema ? FromSchema$1<T, {
4101
+ deserialize: Circular<T> extends false ? [{
4102
+ pattern: {
4103
+ type: 'string';
4104
+ format: 'binary';
4105
+ };
4106
+ output: File;
4107
+ }, {
4108
+ pattern: {
4109
+ type: 'number';
4110
+ format: 'int64';
4111
+ };
4112
+ output: bigint | number;
4113
+ }, {
4114
+ pattern: {
4115
+ type: 'integer';
4116
+ format: 'int64';
4117
+ };
4118
+ output: bigint | number;
4119
+ }] : false;
4120
+ }> : never;
4121
+ type PromiseOrValue<T> = T | Promise<T>;
4122
+ type StatusCodeMap<T> = { [TKey in StatusCode]?: T };
4123
+ interface RouterBaseObject<TServerContext, TComponents extends RouterComponentsBase, TRouterSDK extends RouterSDK<string, TypedRequest, TypedResponse>> {
4124
+ openAPIDocument: OpenAPIDocument;
4125
+ handle: ServerAdapterRequestHandler<TServerContext>;
4126
+ route<const TRouteSchemas extends RouteSchemas, TMethod extends HTTPMethod, TPath extends string, TTypedRequest extends TypedRequestFromRouteSchemas<TComponents, TRouteSchemas, TMethod, TPath>, TTypedResponse extends TypedResponseFromRouteSchemas<TComponents, TRouteSchemas>>(opts: RouteWithSchemasOpts<TServerContext, TComponents, TRouteSchemas, TMethod, TPath, TTypedRequest, TTypedResponse>): Router<TServerContext, TComponents, TRouterSDK & RouterSDK<TPath, TTypedRequest, TTypedResponse>>;
4127
+ route<TMethod extends HTTPMethod, TPath extends string, TTypedRequest extends TypedRequest<any, Record<string, FormDataEntryValue | undefined>, Record<string, string | undefined>, TMethod, any, Record<ExtractPathParamsWithPattern<TPath>, string>>, TTypedResponse extends TypedResponse>(opts: RouteWithTypesOpts<TServerContext, TMethod, TPath, TTypedRequest, TTypedResponse>): Router<TServerContext, TComponents, TRouterSDK & RouterSDK<TPath, TTypedRequest, TTypedResponse>>;
4128
+ __client: TRouterSDK;
4129
+ __onRouterInitHooks: OnRouterInitHook<TServerContext>[];
4130
+ }
4131
+ type Router<TServerContext, TComponents extends RouterComponentsBase, TRouterSDK extends RouterSDK<string, TypedRequest, TypedResponse>> = ServerAdapter<TServerContext, RouterBaseObject<TServerContext, TComponents, TRouterSDK>>;
4132
+ type RouteHandler<TServerContext = {}, TTypedRequest extends TypedRequest = TypedRequest, TTypedResponse extends TypedResponse = TypedResponse> = (
4133
+ /**
4134
+ * The request object represents the incoming HTTP request.
4135
+ * This object implements [Request](https://developer.mozilla.org/en-US/docs/Web/API/Request) interface.
4136
+ */
4137
+
4138
+ request: TTypedRequest, context: TServerContext) => PromiseOrValue<TTypedResponse>;
4139
+ type OnRouterInitHook<TServerContext> = (router: Router<TServerContext, any, any>) => void;
4140
+ type ObjectSchemaWithPrimitiveProperties = JSONSchema & {
4141
+ type: 'object';
4142
+ properties: Record<string, {
4143
+ type: 'string' | 'number' | 'integer' | 'boolean' | 'null';
4144
+ }>;
4145
+ };
4146
+ type ObjectSchema = JSONSchema & {
4147
+ type: 'object';
4148
+ };
4149
+ type RouteSchemas = {
4150
+ request?: {
4151
+ headers?: ObjectSchemaWithPrimitiveProperties;
4152
+ params?: ObjectSchemaWithPrimitiveProperties;
4153
+ query?: ObjectSchema;
4154
+ json?: JSONSchema;
4155
+ formData?: ObjectSchema;
4156
+ };
4157
+ responses?: StatusCodeMap<JSONSchema>;
4158
+ };
4159
+ type RouterSDKOpts<TTypedRequest extends TypedRequest = TypedRequest, TMethod extends HTTPMethod = HTTPMethod> = TTypedRequest extends TypedRequest<infer TJSONBody, infer TFormData, infer THeaders, TMethod, infer TQueryParams, infer TPathParam> ? Simplify<(Partial<TJSONBody> extends TJSONBody ? {
4160
+ json?: TJSONBody;
4161
+ } : {
4162
+ json: TJSONBody;
4163
+ }) & (Partial<THeaders> extends THeaders ? {
4164
+ headers?: THeaders;
4165
+ } : {
4166
+ headers: THeaders;
4167
+ }) & (Partial<TQueryParams> extends TQueryParams ? {
4168
+ query?: TQueryParams;
4169
+ } : {
4170
+ query: TQueryParams;
4171
+ }) & (Partial<TPathParam> extends TPathParam ? {
4172
+ params?: TPathParam;
4173
+ } : {
4174
+ params: TPathParam;
4175
+ })> & (Partial<TFormData> extends TFormData ? {
4176
+ formData?: TFormData;
4177
+ } : {
4178
+ formData: TFormData;
4179
+ }) : never;
4180
+ type RouterSDK<TPath extends string = string, TTypedRequest extends TypedRequest = TypedRequest, TTypedResponse extends TypedResponse = TypedResponse> = { [TPathKey in TPath]: { [TMethod in Lowercase<TTypedRequest['method']>]: Partial<RouterSDKOpts<TTypedRequest, TTypedRequest['method']>> extends RouterSDKOpts<TTypedRequest, TTypedRequest['method']> ? (opts?: RouterSDKOpts<TTypedRequest, TTypedRequest['method']> & ClientRequestInit) => ClientTypedResponsePromise<Exclude<TTypedResponse, undefined>> : (opts: RouterSDKOpts<TTypedRequest, TTypedRequest['method']> & ClientRequestInit) => ClientTypedResponsePromise<Exclude<TTypedResponse, undefined>> } };
4181
+ type FromSchemaWithComponents<TComponents, TSchema extends JSONSchema> = TComponents extends {
4182
+ schemas: Record<string, JSONSchema>;
4183
+ } ? FromSchema<{
4184
+ components: TComponents;
4185
+ } & TSchema> : FromSchema<TSchema>;
4186
+ type TypedRequestFromRouteSchemas<TComponents extends RouterComponentsBase, TRouteSchemas extends RouteSchemas, TMethod extends HTTPMethod, TPath extends string> = TRouteSchemas extends {
4187
+ request: Required<RouteSchemas>['request'];
4188
+ } ? TypedRequest<TRouteSchemas['request'] extends {
4189
+ json: JSONSchema;
4190
+ } ? FromSchemaWithComponents<TComponents, TRouteSchemas['request']['json']> : {}, TRouteSchemas['request'] extends {
4191
+ formData: JSONSchema;
4192
+ } ? FromSchemaWithComponents<TComponents, TRouteSchemas['request']['formData']> extends Record<string, FormDataEntryValue | undefined> ? FromSchemaWithComponents<TComponents, TRouteSchemas['request']['formData']> : never : {}, TRouteSchemas['request'] extends {
4193
+ headers: JSONSchema;
4194
+ } ? FromSchemaWithComponents<TComponents, TRouteSchemas['request']['headers']> extends Record<string, string> ? FromSchemaWithComponents<TComponents, TRouteSchemas['request']['headers']> : never : {}, TMethod, TRouteSchemas['request'] extends {
4195
+ query: JSONSchema;
4196
+ } ? FromSchemaWithComponents<TComponents, TRouteSchemas['request']['query']> : {}, TRouteSchemas['request'] extends {
4197
+ params: JSONSchema;
4198
+ } ? FromSchemaWithComponents<TComponents, TRouteSchemas['request']['params']> extends Record<string, any> ? FromSchemaWithComponents<TComponents, TRouteSchemas['request']['params']> : never : Record<ExtractPathParamsWithPattern<TPath>, string>> : TypedRequest<any, Partial<Record<string, FormDataEntryValue>>, Partial<Record<string, string>>, TMethod, any, Record<ExtractPathParamsWithPattern<TPath>, string>>;
4199
+ type TypedResponseFromRouteSchemas<TComponents extends RouterComponentsBase, TRouteSchemas extends RouteSchemas> = TRouteSchemas extends {
4200
+ responses: StatusCodeMap<JSONSchema>;
4201
+ } ? TypedResponseWithJSONStatusMap<{ [TStatusCode in keyof TRouteSchemas['responses']]: TRouteSchemas['responses'][TStatusCode] extends JSONSchema ? FromSchemaWithComponents<TComponents, TRouteSchemas['responses'][TStatusCode]> : never }> : TypedResponse;
4202
+ type RouteWithSchemasOpts<TServerContext, TComponents extends RouterComponentsBase, TRouteSchemas extends RouteSchemas, TMethod extends HTTPMethod, TPath extends string, TTypedRequest extends TypedRequestFromRouteSchemas<TComponents, TRouteSchemas, TMethod, TPath>, TTypedResponse extends TypedResponseFromRouteSchemas<TComponents, TRouteSchemas>> = {
4203
+ schemas: TRouteSchemas;
4204
+ security?: SecuritySchemeRefsFromComponents<TComponents>[];
4205
+ } & RouteWithTypesOpts<TServerContext, TMethod, TPath, TTypedRequest, TTypedResponse>;
4206
+ type SecuritySchemeRefsFromComponents<TComponents extends RouterComponentsBase> = TComponents extends {
4207
+ securitySchemes: Record<string, SecurityScheme>;
4208
+ } ? Record<keyof TComponents['securitySchemes'], any> : never;
4209
+ type RouteWithTypesOpts<TServerContext, TMethod extends HTTPMethod, TPath extends string, TTypedRequest extends TypedRequest<any, Record<string, FormDataEntryValue | undefined>, Record<string, string | undefined>, TMethod, any, Record<ExtractPathParamsWithPattern<TPath>, string>>, TTypedResponse extends TypedResponse> = {
4210
+ operationId?: string;
4211
+ description?: string;
4212
+ method?: TMethod;
4213
+ tags?: string[];
4214
+ internal?: boolean;
4215
+ path: TPath;
4216
+ handler: RouteHandler<TServerContext, TTypedRequest, TTypedResponse>;
4217
+ };
4218
+ type ExtractPathParamsWithPattern<TPath extends string> = Pipe<TPath, [Strings.Split<'/'>, Tuples.Filter<Strings.StartsWith<':'>>, Tuples.Map<Strings.Trim<':'>>, Tuples.ToUnion]>;
4219
+ //#endregion
4220
+ //#region lib/types/rumbleInput.d.ts
4221
+ type CustomRumblePothosConfig = Omit<ConstructorParameters<typeof SchemaBuilder>[0], "smartSubscriptions" | "drizzle">;
4222
+ type RumbleInput<UserContext extends Record<string, any>, DB extends DrizzleInstance, RequestEvent extends Record<string, any>, Action extends string, PothosConfig extends CustomRumblePothosConfig> = {
4223
+ /**
4224
+ * Your drizzle database instance
4225
+ */
4226
+ db: DB;
4227
+ /**
4228
+ * A function for providing context for each request based on the incoming HTTP Request.
4229
+ * The type of the parameter equals the HTTPRequest type of your chosen server.
4230
+ */
4231
+ context?: ((event: RequestEvent) => Promise<UserContext> | UserContext) | undefined;
4232
+ /**
4233
+ * If you only want to disable query, mutation or subscription default objects, you can do so here
4234
+ */
4235
+ disableDefaultObjects?: {
4236
+ mutation?: boolean;
4237
+ subscription?: boolean;
4238
+ query?: boolean;
4239
+ };
4240
+ /**
4241
+ * The actions that are available
4242
+ */
4243
+ actions?: Action[];
4244
+ /**
4245
+ * Customization for subscriptions. See https://the-guild.dev/graphql/yoga-server/docs/features/subscriptions#distributed-pubsub-for-production
4246
+ */
4247
+ subscriptions?: Parameters<typeof createPubSub>;
4248
+ /**
4249
+ * Options passed along to the pothos schema builder.
4250
+ */
4251
+ pothosConfig?: PothosConfig;
4252
+ /**
4253
+ * Limits the returned amount when querying lists. Set to null to disable.
4254
+ * @default 100
4255
+ */
4256
+ defaultLimit?: number | undefined | null;
4257
+ /**
4258
+ * rumble supports fuzzy search for the query helpers. This enables the users of your API to search for entities via fuzzy search inputs.
4259
+ * This currently only is supported by postgres databases and will fail if enabled on other dialects.
4260
+ *
4261
+ * Please note that this will install the pg_trgm extension on startup if your database does not have it already installed.
4262
+ * https://www.postgresql.org/docs/current/pgtrgm.html
4263
+ */
4264
+ search?: {
4265
+ /**
4266
+ * Whether search is enabled
4267
+ */
4268
+ enabled?: boolean;
4269
+ /**
4270
+ * The cuttoff factor to reduce the amount of returned results.
4271
+ * Defaults to 0.3. Lower values will return more results.
4272
+ */
4273
+ threshold?: number;
4274
+ /**
4275
+ * Will perform a local
4276
+ * SET cpu_operator_cost = x;
4277
+ * for search queries. This can help to make the planner
4278
+ * use a potential index scan instead of a sequential scan.
4279
+ * This will not affect queries that are not using the search feature.
4280
+ */
4281
+ cpu_operator_cost?: number;
293
4282
  } | undefined;
294
4283
  };
295
4284
  //#endregion
@@ -440,7 +4429,7 @@ declare const rumble: <UserContext extends Record<string, any>, DB extends Drizz
440
4429
  ```
441
4430
  * https://the-guild.dev/graphql/sofa-api/docs#usage
442
4431
  */
443
- createSofa: (args: Omit<Parameters<typeof useSofa>[0], "schema" | "context">) => fets0.Router<any, {}, {
4432
+ createSofa: (args: Omit<Parameters<typeof useSofa>[0], "schema" | "context">) => Router<any, {}, {
444
4433
  [TKey: string]: never;
445
4434
  }>;
446
4435
  /**