@tslite/checker 1.3.0 → 1.5.0
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/dist/chunk-FY7J7P5X.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +104 -11
- package/dist/index.d.ts +104 -11
- package/dist/index.js +1 -1
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.d.cts +117 -7
- package/dist/types/index.d.ts +117 -7
- package/dist/types/index.js +1 -1
- package/package.json +6 -6
- package/dist/chunk-J5CVPE4U.js +0 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -3,6 +3,13 @@ interface Prop {
|
|
|
3
3
|
readonly type: Schema;
|
|
4
4
|
/** `true` quando a propriedade pode estar ausente (`{ x?: T }`). */
|
|
5
5
|
readonly optional?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* `true` quando a propriedade não aceita escrita (`{ readonly x: T }`). Só a ESCRITA o
|
|
8
|
+
* lê — o checker acusa o TS2540/TS2704 —; a relação o ignora, como a atribuibilidade do
|
|
9
|
+
* tsc (`{ readonly a: T } ≤ { a: T }` e o inverso). Atravessa a instanciação e o
|
|
10
|
+
* widening; some no spread e no rest, que criam props graváveis. TC62.
|
|
11
|
+
*/
|
|
12
|
+
readonly readonly?: boolean;
|
|
6
13
|
}
|
|
7
14
|
/**
|
|
8
15
|
* Assinatura de índice de um objeto — `{ [k: string]: V }` (a forma de `Record<K, V>`).
|
|
@@ -12,6 +19,9 @@ interface Prop {
|
|
|
12
19
|
interface IndexSig {
|
|
13
20
|
readonly key: "string" | "number";
|
|
14
21
|
readonly value: Schema;
|
|
22
|
+
/** `readonly [k: string]: V` — o índice não aceita escrita (o TS2542 no checker); a
|
|
23
|
+
* relação o ignora, como a da prop. TC62. */
|
|
24
|
+
readonly readonly?: boolean;
|
|
15
25
|
}
|
|
16
26
|
/**
|
|
17
27
|
* Flag de um elemento de tupla, na forma da 3.9 (DECISIONS D49 da raiz):
|
|
@@ -186,7 +196,31 @@ type Schema = {
|
|
|
186
196
|
readonly key: string;
|
|
187
197
|
readonly over: Schema;
|
|
188
198
|
readonly body: Schema;
|
|
199
|
+
/**
|
|
200
|
+
* Os modificadores — as flags do `MappedTypeModifiers` do tsc (`getMappedTypeModifiers`,
|
|
201
|
+
* `checker.ts:10063`). `optional` e `readonly` ACRESCENTAM (`?`/`+?`,
|
|
202
|
+
* `readonly`/`+readonly`); `excludeOptional` e `excludeReadonly` TIRAM (`-?`,
|
|
203
|
+
* `-readonly`). Sem nenhum, cada prop herda o modificador da prop de origem (o
|
|
204
|
+
* `modifiersType`). TC63.
|
|
205
|
+
*/
|
|
189
206
|
readonly optional?: boolean;
|
|
207
|
+
readonly readonly?: boolean;
|
|
208
|
+
readonly excludeOptional?: boolean;
|
|
209
|
+
readonly excludeReadonly?: boolean;
|
|
210
|
+
/**
|
|
211
|
+
* O `modifiersType` de um mapped NÃO homomórfico: o `T` de onde as props herdam `?` e
|
|
212
|
+
* `readonly`. Num `[P in K]` com `K extends keyof T` (o `Pick`), é o `T` — o
|
|
213
|
+
* `getModifiersTypeFromMappedType` (`checker.ts:10042`). O `substitute` o grava ao
|
|
214
|
+
* instanciar o `K`, enquanto a constraint dele ainda diz qual era o `T`. TC63.
|
|
215
|
+
*/
|
|
216
|
+
readonly modifiers?: Schema;
|
|
217
|
+
/**
|
|
218
|
+
* O `over` foi declarado `keyof T` com `T` um TYPE PARAM — o
|
|
219
|
+
* `getHomomorphicTypeVariable` do tsc. Instanciado o `T`, o mapped segue a regra do
|
|
220
|
+
* `instantiateMappedType` (`checker.ts:14175`): distribui sobre união, array vira
|
|
221
|
+
* array, tupla vira tupla, primitivo fica ele mesmo. TC63.
|
|
222
|
+
*/
|
|
223
|
+
readonly typeVariable?: boolean;
|
|
190
224
|
} | {
|
|
191
225
|
readonly t: "conditional";
|
|
192
226
|
readonly check: Schema;
|
|
@@ -194,6 +228,7 @@ type Schema = {
|
|
|
194
228
|
readonly then: Schema;
|
|
195
229
|
readonly else: Schema;
|
|
196
230
|
readonly infer?: readonly VarSchema[];
|
|
231
|
+
readonly distributive?: true;
|
|
197
232
|
} | {
|
|
198
233
|
readonly t: "intersection";
|
|
199
234
|
readonly of: readonly Schema[];
|
|
@@ -261,6 +296,8 @@ type IndexSchema = Extract<Schema, {
|
|
|
261
296
|
type MappedSchema = Extract<Schema, {
|
|
262
297
|
t: "mapped";
|
|
263
298
|
}>;
|
|
299
|
+
/** Os modificadores escritos de um mapped (ver o `MappedSchema`). */
|
|
300
|
+
type MappedModifiers = Pick<MappedSchema, "optional" | "readonly" | "excludeOptional" | "excludeReadonly">;
|
|
264
301
|
type ConditionalSchema = Extract<Schema, {
|
|
265
302
|
t: "conditional";
|
|
266
303
|
}>;
|
|
@@ -338,7 +375,9 @@ declare const s: {
|
|
|
338
375
|
/** `T[K]` — acesso indexado. Resolve quando `T` é objeto/array e `K` é literal/união. */
|
|
339
376
|
readonly index: (obj: Schema, key: Schema) => Schema;
|
|
340
377
|
/** `{ [key in over]?: body }` — mapped type. Resolve quando `over` dá chaves literais. */
|
|
341
|
-
|
|
378
|
+
/** `{ [key in over]: body }`, com os modificadores escritos (`{ optional: true }` é o
|
|
379
|
+
* `?`, `{ excludeOptional: true }` o `-?`…). Só a flag ligada entra no nó. */
|
|
380
|
+
readonly mapped: (key: string, over: Schema, body: Schema, modifiers?: MappedModifiers) => Schema;
|
|
342
381
|
/** `check extends ext ? then : els` — conditional. `infer` = as declarações dos
|
|
343
382
|
* `infer U` introduzidos no `ext` (as posições são `var(U)`); resolve via `unify`
|
|
344
383
|
* (ver `resolveConditional`). Sem `infer` → conditional simples (discriminante concreto).
|
|
@@ -410,6 +449,31 @@ declare const s: {
|
|
|
410
449
|
};
|
|
411
450
|
/** Resolve um `keyof`/`index` um nível quando possível; senão, devolve `t` como está. */
|
|
412
451
|
declare function resolveTypeOp(t: Schema): Schema;
|
|
452
|
+
/**
|
|
453
|
+
* O tipo **lido** de algo opcional: `T | undefined`, achatando um nível (sem
|
|
454
|
+
* `normalizeUnion`, que mora no subtype).
|
|
455
|
+
*
|
|
456
|
+
* É o `addOptionality` do tsc (`checker.ts:7514` na tag): sob `strictNullChecks`, o
|
|
457
|
+
* tipo declarado de uma propriedade, de um elemento de tupla ou de um parâmetro
|
|
458
|
+
* **opcional** já inclui `undefined`, e é esse tipo que a relação compara. Aqui o
|
|
459
|
+
* `Schema` guarda a opcionalidade como flag (`optional`, e o `ElementFlag` da tupla),
|
|
460
|
+
* então quem compara precisa pedir o tipo lido — num lugar só, por isto.
|
|
461
|
+
*/
|
|
462
|
+
declare function withUndefined(t: Schema): Schema;
|
|
463
|
+
/** Uma assinatura, na forma que a leitura por POSIÇÃO precisa (a de `fn` ou a de uma
|
|
464
|
+
* entrada de `overload`). */
|
|
465
|
+
type PositionalSignature = {
|
|
466
|
+
readonly params: readonly Param[];
|
|
467
|
+
};
|
|
468
|
+
/**
|
|
469
|
+
* Os argumentos de uma assinatura a partir da posição `pos`, como TUPLA — o
|
|
470
|
+
* `getRestTypeAtPosition` do tsc (`checker.ts:26961`). É o que `Parameters<F>` devolve
|
|
471
|
+
* (`pos` 0) e o que o rest de um padrão de `infer` recebe no `applyToParameterTypes`
|
|
472
|
+
* (`(...args: infer P) => any`). Um rest que começa exatamente em `pos` responde por si
|
|
473
|
+
* (`(...args: T) => any` dá o `T`); as posições até o `getMinArgumentCount` são
|
|
474
|
+
* obrigatórias, e as seguintes, opcionais.
|
|
475
|
+
*/
|
|
476
|
+
declare function restTypeAtPosition(sig: PositionalSignature, pos: number): Schema;
|
|
413
477
|
/**
|
|
414
478
|
* O acesso indexado cuja chave **não existe** no objeto — o que o tsc reporta como
|
|
415
479
|
* TS2339 e resolve para o `errorType` (`getIndexedAccessType`:
|
|
@@ -448,6 +512,12 @@ declare const isMissingType: (t: Schema) => boolean;
|
|
|
448
512
|
declare const isObjectOrArrayLiteral: (t: Schema) => boolean;
|
|
449
513
|
/** O mesmo tipo marcado como vindo de um literal escrito (ver {@link isObjectOrArrayLiteral}). */
|
|
450
514
|
declare const asLiteralOrigin: (t: Schema) => Schema;
|
|
515
|
+
/**
|
|
516
|
+
* A propriedade DECLARADA com esta chave, ou `undefined`. A forma de um dado são só as
|
|
517
|
+
* props declaradas, e nenhum nome de chave é especial: `props["toString"]` num objeto
|
|
518
|
+
* comum devolveria o que o protótipo do JS tem, e aqui a chave ausente é ausente
|
|
519
|
+
* (→ `no-such-member`). É o `getOwn` do dicionário (`./dict`) especializado em `Prop`.
|
|
520
|
+
*/
|
|
451
521
|
declare const ownProp: (props: Readonly<Record<string, Prop>>, key: string) => Prop | undefined;
|
|
452
522
|
/**
|
|
453
523
|
* Separa `undefined` de um tipo: devolve o tipo **sem** `undefined` e se ele estava
|
|
@@ -477,10 +547,17 @@ declare const isVariadicTuple: (t: TupleSchema) => boolean;
|
|
|
477
547
|
declare const restIndex: (t: TupleSchema) => number;
|
|
478
548
|
|
|
479
549
|
type IncompatibilityKind = "missing" | "type";
|
|
550
|
+
/**
|
|
551
|
+
* Um passo do caminho até um ponto: `number` é a POSIÇÃO numa tupla ou num array, `string`
|
|
552
|
+
* é uma CHAVE — de propriedade ou de index signature. Segmentos, e não texto, para que uma
|
|
553
|
+
* chave com `.` (`"hp.max"`), a chave `"2"` e a chave vazia não se confundam com dois
|
|
554
|
+
* níveis, com a posição 2 e com a raiz. É a forma do `path` do zod e do Standard Schema.
|
|
555
|
+
*/
|
|
556
|
+
type PathSegment = string | number;
|
|
480
557
|
/** Um ponto de incompatibilidade entre `actual` e `expected`. */
|
|
481
558
|
interface Incompatibility {
|
|
482
|
-
/** Caminho até o ponto: `[]` = raiz, `["count"]`, `["user","name"]`. */
|
|
483
|
-
readonly path: readonly
|
|
559
|
+
/** Caminho até o ponto: `[]` = raiz, `["count"]`, `["user", "name"]`, `["items", 3]`. */
|
|
560
|
+
readonly path: readonly PathSegment[];
|
|
484
561
|
/** O tipo esperado naquele ponto. */
|
|
485
562
|
readonly expected: Schema;
|
|
486
563
|
/** O tipo que veio — ausente quando `kind === "missing"` (a prop não existe). */
|
|
@@ -650,9 +727,10 @@ declare function freeVars(schema: Schema): ReadonlySet<string>;
|
|
|
650
727
|
/**
|
|
651
728
|
* O curinga "sem inferência" — o `silentNeverType` do tsc: um `never` que ocupa, no
|
|
652
729
|
* contextual que uma chamada passa a uma chamada genérica aninhada, o lugar de um type
|
|
653
|
-
* param dela que ainda não tem candidato (o `getInferredType` com `NoDefault`)
|
|
654
|
-
*
|
|
655
|
-
*
|
|
730
|
+
* param dela que ainda não tem candidato (o `getInferredType` com `NoDefault`); e o tipo de
|
|
731
|
+
* uma arrow sensível ao contexto na primeira rodada de uma chamada, o `anyFunctionType`
|
|
732
|
+
* de lá (checker D81). Nada se infere dele. É comparado por IDENTIDADE, como lá, e não é
|
|
733
|
+
* dado persistível: vive só durante a inferência de uma chamada.
|
|
656
734
|
*/
|
|
657
735
|
declare const silentNever: Schema;
|
|
658
736
|
/**
|
|
@@ -955,5 +1033,37 @@ interface Discovery {
|
|
|
955
1033
|
* devolve o próprio tipo e suas completions.
|
|
956
1034
|
*/
|
|
957
1035
|
declare function discover(schema: Schema, path: readonly string[], schemes?: Schemes): Discovery | null;
|
|
1036
|
+
/**
|
|
1037
|
+
* A chave de uma ESCRITA num membro. `name` é uma chave conhecida — `element: false` no
|
|
1038
|
+
* ponto (`o.a`), que só alcança o índice de string, e `true` no colchete (`o["a"]`,
|
|
1039
|
+
* `o[0]`), em que um nome numérico consulta o índice `number` antes. `base` é uma chave
|
|
1040
|
+
* não literal (`o[k]` com `k: string`).
|
|
1041
|
+
*/
|
|
1042
|
+
type WriteKey = {
|
|
1043
|
+
readonly name: string;
|
|
1044
|
+
readonly element: boolean;
|
|
1045
|
+
} | {
|
|
1046
|
+
readonly base: "string" | "number";
|
|
1047
|
+
};
|
|
1048
|
+
/**
|
|
1049
|
+
* Por onde uma escrita num membro passa, quando ela é RECUSADA pelo `readonly`:
|
|
1050
|
+
*
|
|
1051
|
+
* - `"property"` — o membro é uma propriedade readonly: o TS2540 do tsc (e o TS2704 no
|
|
1052
|
+
* `delete`), que acusa o nome/argumento e faz do acesso o tipo-erro;
|
|
1053
|
+
* - `"index"` — o membro é alcançado por uma index signature readonly (ou pelo índice de
|
|
1054
|
+
* um `readonly T[]`): o TS2542, que acusa o acesso inteiro e segue com o tipo do índice.
|
|
1055
|
+
*
|
|
1056
|
+
* `null` quando a escrita não é recusada por aqui: o membro é gravável, não existe (o
|
|
1057
|
+
* erro é da leitura), ou o tipo não tem membros navegáveis (`any`, genérico sem bound).
|
|
1058
|
+
*
|
|
1059
|
+
* A régua é a do tsc 3.9.10, lida no fonte da tag. A prop de uma UNIÃO ou INTERSEÇÃO é
|
|
1060
|
+
* readonly se ALGUM constituinte a torna readonly — inclusive, na união, um membro que a
|
|
1061
|
+
* responde por um índice readonly (`createUnionOrIntersectionProperty`,
|
|
1062
|
+
* `checker.ts:10560`, `:10572`). Sem prop, vale o índice: o de uma união é readonly se
|
|
1063
|
+
* algum for (`getUnionIndexInfo`, `:9685`), o de uma interseção só se todos os que o têm
|
|
1064
|
+
* forem (`intersectIndexInfos`, `:9715`). A posição fixa de uma tupla é PROP (`"0"`,
|
|
1065
|
+
* `createTupleTypeOfArity`, `:12162`); a que cai no rest, índice. TC62.
|
|
1066
|
+
*/
|
|
1067
|
+
declare function readonlyMember(schema: Schema, key: WriteKey, schemes?: Schemes): "property" | "index" | null;
|
|
958
1068
|
|
|
959
|
-
export { type AnySchema, type ApplySchema, type ArraySchema, type Bindings, type Completion, DEFAULT_TYPE_LIMITS, type Discovery, type ElementFlag, type FnSchema$1 as FnSchema, type GuardSig, INSTANTIATION_COUNT_LIMIT, INSTANTIATION_DEPTH_LIMIT, type Incompatibility, type IncompatibilityKind, type IndexSchema, type Instantiation, InstantiationLimitError, type KeyofSchema, type LiteralSchema, type MappedSchema, type ObjectSchema, type OverloadSchema, type Param, type Prop, type ScalarSchema, type Schema, type Schemes, TYPE_EVAL_DEPTH_LIMIT, type TupleSchema, TypeEvalLimitError, type TypeEvalLimits, type TypeForm, type TypePosition, type TypeScheme, type UnionSchema, UnionTooComplexError, type UnknownSchema, type VarCandidates, type VarSchema, apparentType, asLiteralOrigin, baseLiteralType, bindTypeParams, comparable, configureTypeLimits, contravariantInference, covariantInference, discover, equals, erasedSignature, expand1, flagAt, format, formatTypeArgs, formatTypeDiff, freeVars, groundVars, inferFromCandidates, inferredTypes, instantiate, instantiateInContextOf, instantiateLoose, isMissingType, isNumericLiteralName, isObjectOrArrayLiteral, isScheme, isSerializable, isVariadicTuple, join, joinAll, missingType, normalizeUnion, ownProp, renameTypeParams, resetInstantiationCount, resetTypeLimits, resolveConditional, resolveOp, resolveTypeOp, restIndex, s, sampleValue, silentNever, substitute, subtype, typeAtPosition, typeDiff, typeFeatures, typeLimits, typeNeedsParens, typeParamArity, unify, widen, widenInferred, widenLiteral, widenOrigin, widenType, withoutUndefined };
|
|
1069
|
+
export { type AnySchema, type ApplySchema, type ArraySchema, type Bindings, type Completion, DEFAULT_TYPE_LIMITS, type Discovery, type ElementFlag, type FnSchema$1 as FnSchema, type GuardSig, INSTANTIATION_COUNT_LIMIT, INSTANTIATION_DEPTH_LIMIT, type Incompatibility, type IncompatibilityKind, type IndexSchema, type Instantiation, InstantiationLimitError, type KeyofSchema, type LiteralSchema, type MappedSchema, type ObjectSchema, type OverloadSchema, type Param, type PathSegment, type Prop, type ScalarSchema, type Schema, type Schemes, TYPE_EVAL_DEPTH_LIMIT, type TupleSchema, TypeEvalLimitError, type TypeEvalLimits, type TypeForm, type TypePosition, type TypeScheme, type UnionSchema, UnionTooComplexError, type UnknownSchema, type VarCandidates, type VarSchema, type WriteKey, apparentType, asLiteralOrigin, baseLiteralType, bindTypeParams, comparable, configureTypeLimits, contravariantInference, covariantInference, discover, equals, erasedSignature, expand1, flagAt, format, formatTypeArgs, formatTypeDiff, freeVars, groundVars, inferFromCandidates, inferredTypes, instantiate, instantiateInContextOf, instantiateLoose, isMissingType, isNumericLiteralName, isObjectOrArrayLiteral, isScheme, isSerializable, isVariadicTuple, join, joinAll, missingType, normalizeUnion, ownProp, readonlyMember, renameTypeParams, resetInstantiationCount, resetTypeLimits, resolveConditional, resolveOp, resolveTypeOp, restIndex, restTypeAtPosition, s, sampleValue, silentNever, substitute, subtype, typeAtPosition, typeDiff, typeFeatures, typeLimits, typeNeedsParens, typeParamArity, unify, widen, widenInferred, widenLiteral, widenOrigin, widenType, withUndefined, withoutUndefined };
|
package/dist/types/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{d as DEFAULT_TYPE_LIMITS,c as INSTANTIATION_COUNT_LIMIT,b as INSTANTIATION_DEPTH_LIMIT,i as InstantiationLimitError,a as TYPE_EVAL_DEPTH_LIMIT,h as TypeEvalLimitError,k as UnionTooComplexError,
|
|
1
|
+
export{d as DEFAULT_TYPE_LIMITS,c as INSTANTIATION_COUNT_LIMIT,b as INSTANTIATION_DEPTH_LIMIT,i as InstantiationLimitError,a as TYPE_EVAL_DEPTH_LIMIT,h as TypeEvalLimitError,k as UnionTooComplexError,J as apparentType,v as asLiteralOrigin,N as baseLiteralType,G as bindTypeParams,ca as comparable,e as configureTypeLimits,T as contravariantInference,S as covariantInference,qa as discover,da as equals,V as erasedSignature,I as expand1,z as flagAt,ma as format,na as formatTypeArgs,oa as formatTypeDiff,E as freeVars,$ as groundVars,U as inferFromCandidates,W as inferredTypes,Z as instantiate,X as instantiateInContextOf,_ as instantiateLoose,t as isMissingType,y as isNumericLiteralName,u as isObjectOrArrayLiteral,H as isScheme,pa as isSerializable,A as isVariadicTuple,ia as join,ja as joinAll,s as missingType,ga as normalizeUnion,w as ownProp,ra as readonlyMember,D as renameTypeParams,j as resetInstantiationCount,f as resetTypeLimits,ea as resolveConditional,K as resolveOp,p as resolveTypeOp,B as restIndex,r as restTypeAtPosition,o as s,ka as sampleValue,R as silentNever,C as substitute,ba as subtype,fa as typeAtPosition,aa as typeDiff,ha as typeFeatures,g as typeLimits,la as typeNeedsParens,F as typeParamArity,Y as unify,L as widen,P as widenInferred,M as widenLiteral,Q as widenOrigin,O as widenType,q as withUndefined,x as withoutUndefined}from'../chunk-FY7J7P5X.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tslite/checker",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "TSLite type system — a structural type checker over the AST (the 'TypeScript of TSLite')",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -44,15 +44,15 @@
|
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@tslite/
|
|
48
|
-
"@tslite/
|
|
49
|
-
"@tslite/
|
|
50
|
-
"@tslite/
|
|
47
|
+
"@tslite/ast": "1.2.0",
|
|
48
|
+
"@tslite/json": "1.0.3",
|
|
49
|
+
"@tslite/language-service": "1.1.0",
|
|
50
|
+
"@tslite/capability": "1.2.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"typescript": "^5.9.3",
|
|
54
54
|
"typescript-3.9": "npm:typescript@3.9.10",
|
|
55
|
-
"@tslite/parser": "1.
|
|
55
|
+
"@tslite/parser": "1.6.0"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"build": "tsup",
|
package/dist/chunk-J5CVPE4U.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var Gn=100,Jn=50,Zn=5e6,me={maxTypeDepth:100,maxInstantiationDepth:50,maxInstantiationCount:5e6,maxUnionMembers:1e3,maxOverloadSignatures:200},V=me;function Xn(e){V={...me,...e};}function et(){V=me;}function L(){return V}var K=class extends Error{constructor(n=V.maxTypeDepth){super(`excessive stack depth comparing types (limit ${n}) \u2014 the comparison is excessively deep or possibly infinite`),this.name="TypeEvalLimitError";}},de=class extends Error{constructor(t,r=t==="depth"?V.maxInstantiationDepth:V.maxInstantiationCount){super(`type instantiation is excessively deep and possibly infinite (${t} limit ${r})`);this.kind=t;this.name="InstantiationLimitError";}};function nt(){Ee=0;}var Ee=0;function nn(){if(Ee>=V.maxInstantiationCount)throw new de("count");Ee++;}var Q=class extends Error{constructor(n,t=V.maxUnionMembers){super(`union type is too complex to represent (${n} members exceeds limit ${t})`),this.name="UnionTooComplexError";}};var Re=()=>({active:new Set,byScope:new Map});function ge(e,n,t){let r=new Map(e);for(let o of n)r.set(o.name,t(o));return r}function We(e,n,t){let r=ge(n,e,()=>{}),o=false,a=e.map(i=>{let u=i.bound&&R(i.bound,r,t),l=i.default&&R(i.default,r,t);return u===i.bound&&l===i.default?i:(o=true,{...i,...u?{bound:u}:{},...l?{default:l}:{}})});return o?a:e}function $e(e,n,t){let r=e.typeParams?.length?We(e.typeParams,n,t):void 0,o=r?ge(n,r,l=>l.bound):n,a=ae(e.params,l=>{let c=R(l.type,o,t);return c===l.type?l:{...l,type:c}}),i=R(e.returns,o,t),u=e.guard&&R(e.guard.type,o,t);return a===e.params&&i===e.returns&&u===e.guard?.type&&r===e.typeParams?e:{...e,params:a,returns:i,...e.guard&&u?{guard:{...e.guard,type:u}}:{},...r?{typeParams:r}:{}}}function ae(e,n){let t=false,r=e.map(o=>{let a=n(o);return a!==o&&(t=true),a});return t?r:e}function R(e,n,t){if(n.size===0)return e;let r=t.byScope.get(n);r||t.byScope.set(n,r=new Map);let o=r.get(e);if(o)return o;if(t.active.has(e))return e;t.active.add(e);let a=ln(e,n,t);return t.active.delete(e),r.set(e,a),a}function ln(e,n,t){let r=o=>R(o,n,t);switch(e.t){case "var":{if(!n.has(e.name))return e;let o=n.get(e.name);return o===e.bound&&e.default===void 0?e:o?{t:"var",name:e.name,bound:o}:{t:"var",name:e.name}}case "array":{let o=r(e.items);return o===e.items?e:{...e,items:o}}case "tuple":{let o=ae(e.elements,r);return o===e.elements?e:{...e,elements:o}}case "union":case "intersection":{let o=ae(e.of,r);return o===e.of?e:{...e,of:o}}case "object":{let o=false,a={};for(let l of Object.keys(e.props)){let c=e.props[l],S=r(c.type);S!==c.type&&(o=true),Object.defineProperty(a,l,{value:S===c.type?c:{...c,type:S},enumerable:true,writable:true,configurable:true});}let i=e.index&&r(e.index.value),u=!!e.index&&i!==e.index.value;return !o&&!u?e:{...e,props:o?a:e.props,...e.index&&i&&u?{index:{...e.index,value:i}}:{}}}case "fn":return $e(e,n,t);case "overload":{let o=ae(e.signatures,a=>$e(a,n,t));return o===e.signatures?e:{...e,signatures:o}}case "keyof":{let o=r(e.of);return o===e.of?e:{...e,of:o}}case "index":{let o=r(e.obj),a=r(e.key);return o===e.obj&&a===e.key?e:{...e,obj:o,key:a}}case "mapped":{let o=r(e.over),a=new Map(n);a.set(e.key,void 0);let i=R(e.body,a,t);return o===e.over&&i===e.body?e:{...e,over:o,body:i}}case "conditional":{let o=e.infer?.length?We(e.infer,n,t):void 0,a=o?ge(n,o,S=>S.bound):n,i=r(e.check),u=R(e.extends,a,t),l=R(e.then,a,t),c=R(e.else,a,t);return i===e.check&&u===e.extends&&l===e.then&&c===e.else&&o===e.infer?e:{...e,check:i,extends:u,then:l,else:c,...o?{infer:o}:{}}}case "returnType":case "parameters":{let o=r(e.fn);return o===e.fn?e:{...e,fn:o}}case "apply":{let o=ae(e.args,r);return o===e.args?e:{...e,args:o}}default:return e}}function tn(e){return e.typeParams?.length?$e(e,new Map,Re()):e}function tt(e){return e.infer?.length?ln(e,new Map,Re()):e}function rt(e){if(!e.params.length)return e;let n=Re(),t=We(e.params,new Map,n),r=R(e.body,ge(new Map,t,o=>o.bound),n);return t===e.params&&r===e.body?e:{params:t,body:r}}var B=e=>Object.freeze(e),s={any:B({t:"any"}),unknown:B({t:"unknown"}),string:B({t:"string"}),number:B({t:"number"}),boolean:B({t:"boolean"}),null:B({t:"null"}),undefined:B({t:"undefined"}),void:B({t:"void"}),nonPrimitive:B({t:"nonPrimitive"}),literal:e=>({t:"literal",value:e}),object:(e,n)=>({t:"object",props:e,...n?{index:n}:{}}),record:(e,n="string")=>({t:"object",props:{},index:{key:n,value:e}}),array:(e,n)=>({t:"array",items:e,...n?{readonly:true}:{}}),tuple:(e,n,t)=>({t:"tuple",elements:n?e.map((r,o)=>n[o]==="optional"?_(r):r):e,...n&&n.some(r=>r!=="req")?{flags:n}:{},...t?{readonly:true}:{}}),fn:(e,n,t)=>tn({t:"fn",params:e,returns:n,...t?.length?{typeParams:t}:{}}),guard:(e,n,t=0)=>({t:"fn",params:e,returns:{t:"boolean"},guard:{param:t,type:n}}),overload:e=>({t:"overload",signatures:e.map(tn)}),keyof:e=>({t:"keyof",of:e}),index:(e,n)=>({t:"index",obj:e,key:n}),mapped:(e,n,t,r=false)=>({t:"mapped",key:e,over:n,body:t,optional:r}),conditional:(e,n,t,r,o)=>tt({t:"conditional",check:e,extends:n,then:t,else:r,...o&&o.length?{infer:o}:{}}),scheme:(e,n)=>rt({params:e,body:n}),intersection:e=>O({of:e}),and:(e,n)=>O({of:[e,n]}),returnType:e=>({t:"returnType",fn:e}),parameters:e=>({t:"parameters",fn:e}),var:(e,n)=>({t:"var",name:e,...n?{bound:n}:{}}),typeParam:(e,n={})=>({t:"var",name:e,...n.bound?{bound:n.bound}:{},...n.default?{default:n.default}:{}}),typeQuery:e=>({t:"typeQuery",path:e}),apply:(e,n=[])=>({t:"apply",name:e,args:n}),promise:e=>({t:"apply",name:"Promise",args:[e]}),union:e=>{let n=[],t=o=>{o.t==="union"?o.of.forEach(t):n.push(o);};if(e.forEach(t),n.some(o=>o.t==="any"))return {t:"any"};if(n.some(o=>o.t==="unknown"))return {t:"unknown"};let r=at(n);return r.length===1?r[0]:{t:"union",of:r}}};function ot(e){switch(e.t){case "string":case "number":case "boolean":case "null":case "undefined":case "void":return e.t;case "literal":return `#${typeof e.value}:${String(e.value)}`;default:return null}}function at(e){let n=[],t=new Map;for(let u of e){let l=ot(u);if(l===null){n.includes(u)||n.push(u);continue}let c=t.get(l);c===void 0?(t.set(l,n.length),n.push(u)):u.t==="literal"&&!u.fresh&&(n[c]=u);}let r=u=>u.t==="literal"&&t.has(typeof u.value),o=!t.has("boolean")&&t.has("#boolean:true")&&t.has("#boolean:false"),a=false,i=[];for(let u of n)if(!r(u)){if(o&&u.t==="literal"&&typeof u.value=="boolean"){a||i.push({t:"boolean"}),a=true;continue}i.push(u);}return i}function g(e){return e.t==="keyof"?Le(e.of)??e:e.t==="index"?he(e.obj,e.key)??e:e.t==="returnType"?it(e.fn)??e:e.t==="parameters"?ut(e.fn)??e:e}var ye={t:"union",of:[]},Me=e=>e.t==="union"&&e.of.length===0;function it(e){return e.t==="fn"?e.returns:e.t==="overload"&&e.signatures.length>0?e.signatures[e.signatures.length-1].returns:null}function _(e){if(e.t==="undefined"||e.t==="any"||e.t==="unknown")return e;let n=e.t==="union"?e.of:[e];return n.some(t=>t.t==="undefined")?e:s.union([...n,{t:"undefined"}])}function ut(e){let n=e.t==="fn"?e:e.t==="overload"&&e.signatures.length>0?e.signatures[e.signatures.length-1]:null;if(!n)return null;let t=[],r=[];for(let o of n.params)o.variadic?(t.push(o.type.t==="array"?o.type.items:o.type),r.push("rest")):o.optional?(t.push(_(o.type)),r.push("optional")):(t.push(o.type),r.push("req"));return s.tuple(t,r)}var Ce=e=>e.t==="literal"?typeof e.value:e.t==="string"||e.t==="number"||e.t==="boolean"?e.t:null;function rn(e,n){return e.t==="literal"&&n.t==="literal"?e.value===n.value:e.t==="literal"&&(n.t==="string"||n.t==="number"||n.t==="boolean")?typeof e.value===n.t:e.t===n.t&&(e.t==="string"||e.t==="number"||e.t==="boolean")}function on(e){return e.t==="null"||e.t==="undefined"?e.t:e.t==="nonPrimitive"?"nonPrimitive":Ce(e)?"scalar":e.t==="object"||e.t==="array"||e.t==="tuple"||e.t==="fn"||e.t==="overload"?"object":null}var an=e=>e.t==="object"&&!e.index&&Object.keys(e.props).length===0;function O(e){let n=[],t=i=>{let u=g(i);u.t==="intersection"?u.of.forEach(t):n.push(u);};if(e.of.forEach(t),n.some(i=>i.t==="any"))return s.any;if(n.some(Me))return ye;let r=i=>n.some(u=>on(u)===i);if(r("null")&&(r("undefined")||r("scalar")||r("object")||r("nonPrimitive"))||r("undefined")&&(r("scalar")||r("object")||r("nonPrimitive"))||r("nonPrimitive")&&r("scalar"))return ye;if(n.some(i=>on(i)==="object"&&!an(i)))for(let i=n.length-1;i>=0;i--)an(n[i])&&n.splice(i,1);let o=n.findIndex(i=>i.t==="union");if(o>=0){let i=n.reduce((u,l)=>u*(l.t==="union"?l.of.length:1),1);if(i>L().maxUnionMembers)throw new Q(i);return s.union(n[o].of.map(u=>O({of:n.map((l,c)=>c===o?u:l)})))}let a=[];for(let i of n){if(i.t==="any")return s.any;if(Me(i))return ye;if(i.t!=="unknown"){if(Ce(i)){let u=false;for(let l=a.length-1;l>=0;l--){let c=a[l];if(Ce(c)){if(rn(c,i)){u=true;break}if(rn(i,c))a.splice(l,1);else return ye}}if(u)continue}else if(a.some(u=>u===i))continue;a.push(i);}}return a.length===0?s.unknown:a.length===1?a[0]:{t:"intersection",of:a}}function Le(e){if(e.t==="union"&&e.of.length>0){let t=e.of.map(Le);return t.some(r=>r===null)?null:lt(t)}if(e.t==="intersection"){let t=e.of.map(Le);return t.some(r=>r===null)?null:s.union(t)}if(e.t==="unknown")return {t:"union",of:[]};if(e.t==="any"||e.t==="union"&&e.of.length===0)return {t:"union",of:[s.string,s.number]};if(e.t==="nonPrimitive")return {t:"union",of:[]};if(e.t==="array"||e.t==="tuple")return s.number;if(e.t==="fn"||e.t==="overload")return {t:"union",of:[]};if(e.t!=="object")return null;if(e.index?.key==="string")return s.union([s.string,s.number]);let n=Object.keys(e.props).map(t=>s.literal(t));return e.index?.key==="number"?s.union([s.number,...n]):n.length===0?{t:"union",of:[]}:s.union(n)}function lt(e){let n=a=>a.t==="literal"&&typeof a.value=="string"?[a.value]:a.t==="union"?a.of.flatMap(n):[],t=e.filter(a=>a.t!=="string"&&a.t!=="number").map(n);if(t.length===0)return e[0];let r=t[0].filter(a=>t.every(i=>i.includes(a))),o=[...new Set(r)].map(a=>s.literal(a));return o.length===0?{t:"union",of:[]}:s.union(o)}var H=Object.freeze({t:"unknown"}),Se=e=>e===H,un=e=>e.t==="var"||e.t==="apply"||e.t==="mapped"||e.t==="conditional"||e.t==="keyof"||e.t==="index"||e.t==="returnType"||e.t==="parameters"||e.t==="typeQuery";function he(e,n){if(e=g(e),n=g(n),n.t==="union"){let t=[],r=false;for(let o of n.of){let a=he(e,o);if(a===null)return null;Se(a)?r=true:t.push(a);}return r?H:s.union(t)}if(un(n))return null;if(e.t==="any"||Me(e))return e;if(e.t==="intersection"){let t=[];for(let r of e.of){let o=he(g(r),n);if(o===null)return null;Se(o)||t.push(o);}return t.length===0?H:t.length===1?t[0]:O({of:t})}if(e.t==="union"){let t=[];for(let r of e.of){let o=g(r);if(o.t==="any")return o;let a=he(o,n);if(a===null)return null;if(Se(a))return H;t.push(a);}return s.union(t)}if(e.t==="object"){if(n.t==="literal"&&(typeof n.value=="string"||typeof n.value=="number")){let t=W(e.props,String(n.value));return t?t.optional?_(t.type):t.type:typeof n.value=="number"&&e.index?.key==="number"||e.index?.key==="string"?e.index.value:H}if(n.t==="string"||n.t==="number"){let r=n.t==="number"&&e.index?.key==="number"||false||e.index?.key==="string"?e.index:void 0;if(r)return r.value}}if(e.t==="tuple"){let t=e.flags?.findIndex(o=>o==="rest")??-1,r=t>=0?t:e.elements.length;if(n.t==="literal"&&typeof n.value=="number")return n.value<r?e.elements[n.value]:t>=0?e.elements[t]:s.undefined;if(n.t==="number")return e.elements.length?s.union([...e.elements]):s.undefined}return e.t==="array"&&(n.t==="number"||n.t==="literal"&&typeof n.value=="number")?e.items:un(e)?null:H}var xe=e=>(e.t==="object"||e.t==="array"||e.t==="tuple")&&!!e.fromLiteral,ct=e=>e.t==="object"||e.t==="array"||e.t==="tuple"?e.fromLiteral?e:{...e,fromLiteral:true}:e,st=Object.prototype.hasOwnProperty,W=(e,n)=>st.call(e,n)?e[n]:void 0;function U(e){if(e.t==="undefined")return {type:{t:"union",of:[]},hadUndefined:true};if(e.t==="union"&&e.of.some(n=>n.t==="undefined")){let n=e.of.filter(t=>t.t!=="undefined");return {type:s.union(n),hadUndefined:true}}return {type:e,hadUndefined:false}}var Fe=e=>(+e).toString()===e;var cn=(e,n)=>e.flags?.[n]??"req",Y=(e,n)=>cn(e,n)==="optional"?_(e.elements[n]):e.elements[n],Ne=e=>e.elements.map((n,t)=>Y(e,t)),sn=e=>e.flags?.[e.elements.length-1]==="rest",X=e=>sn(e)?e.elements.length-1:-1,ie=e=>{if(!e.flags)return e.elements.length;let n=e.flags.findIndex(t=>t!=="req");return n<0?e.elements.length:n};function pn(e,n,t,r=false){let o=X(e),a=X(n);if(!r&&ie(e)<ie(n))return false;if(a<0){if(o>=0)return false;let c=ie(n);return e.elements.length<c||e.elements.length>n.elements.length?false:e.elements.every((S,h)=>t(Y(e,h),Y(n,h)))}let i=n.elements[a],u=c=>c<a?Y(n,c):i;if(o<0)return e.elements.length<ie(n)?false:e.elements.every((c,S)=>t(Y(e,S),u(S)));if(o===0&&a!==0||o<ie(n))return false;let l=e.elements[o];for(let c=0;c<o;c++)if(!t(Y(e,c),u(c)))return false;for(let c=o;c<a;c++)if(!t(l,Y(n,c)))return false;return t(l,i)}function m(e,n,t=new WeakSet){return nn(),pt(e,n,t)}function pt(e,n,t){if(e.t!=="keyof"&&e.t!=="index"&&e.t!=="mapped"&&e.t!=="intersection"&&e.t!=="returnType"&&e.t!=="parameters"&&!dt(E(e),n))return e;switch(e.t){case "var":{let r=n[e.name];return r||Be(e,n,t)}case "array":return {...e,items:m(e.items,n,t)};case "tuple":{let r=e.elements.map(o=>m(o,n,t));return {...e,elements:r}}case "union":return s.union(e.of.map(r=>m(r,n,t)));case "object":{if(t.has(e))return e;t.add(e);let r={};for(let a in e.props){let i=e.props[a];r[a]={type:m(i.type,n,t),optional:i.optional};}let o=e.index?{key:e.index.key,value:m(e.index.value,n,t)}:void 0;return t.delete(e),o?{t:"object",props:r,index:o}:{t:"object",props:r}}case "fn":{if(t.has(e))return e;t.add(e);let r=Ae(e,n,t);return t.delete(e),r}case "overload":return {t:"overload",signatures:e.signatures.map(r=>Ae(r,n,t))};case "apply":return {t:"apply",name:e.name,args:e.args.map(r=>m(r,n,t))};case "keyof":return g({t:"keyof",of:m(e.of,n,t)});case "index":return g({t:"index",obj:m(e.obj,n,t),key:m(e.key,n,t)});case "mapped":{let r=Ve([s.typeParam(e.key)],n,E(e),t),o={t:"mapped",key:r.decls[0].name,over:m(e.over,n,t),body:m(e.body,r.inner,t),optional:e.optional};return ee(o)??o}case "conditional":{if(e.check.t==="var"){let o=e.check.name,a=n[o],i=a?g(a):void 0,u=i?.t==="union"?i.of:i?.t==="boolean"?[s.literal(true),s.literal(false)]:null;if(u)return {t:"union",of:u.map(l=>m(e,{...n,[o]:l},t))}}let r=e.infer?.length?Ve(e.infer,n,E(e),t):{inner:n,decls:void 0};return {t:"conditional",check:m(e.check,n,t),extends:m(e.extends,r.inner,t),then:m(e.then,r.inner,t),else:m(e.else,r.inner,t),...r.decls?{infer:r.decls}:{}}}case "intersection":return O({of:e.of.map(r=>m(r,n,t))});case "returnType":return g({t:"returnType",fn:m(e.fn,n,t)});case "parameters":return g({t:"parameters",fn:m(e.fn,n,t)});default:return e}}function Be(e,n,t,r=e.name){return !e.bound&&!e.default&&r===e.name?e:{...e,name:r,...e.bound?{bound:m(e.bound,n,t)}:{},...e.default?{default:m(e.default,n,t)}:{}}}function Ae(e,n,t,r){let o=e.typeParams?.length?Ve(e.typeParams,n,E(e),t,r):{inner:n,decls:void 0},a=o.inner;return {...e,params:e.params.map(i=>({...i,type:m(i.type,a,t)})),returns:m(e.returns,a,t),...e.guard?{guard:{...e.guard,type:m(e.guard.type,a,t)}}:{},...o.decls?{typeParams:o.decls}:{}}}function Ue(e,n){return e.typeParams?.some(t=>n.has(t.name))?Ae(e,{},new WeakSet,n):e}function Ve(e,n,t,r,o=new Set){let a=new Set(e.map(d=>d.name)),i={},u=new Set;for(let d in n)if(!a.has(d)&&(i[d]=n[d],t.has(d)))for(let y of E(n[d]))u.add(y);let l=e.filter(d=>u.has(d.name)||o.has(d.name));if(l.length===0)return {inner:i,decls:e.map(d=>Be(d,i,r))};let c=new Set([...a,...t,...u,...o]),S=new Map;for(let d of l){let y=1;for(;c.has(`${d.name}_${y}`);)y++;let w=`${d.name}_${y}`;c.add(w),S.set(d.name,w);}let h={};for(let[d,y]of S)h[d]={t:"var",name:y};let p={...i};for(let d of l){let y=S.get(d.name);p[d.name]={t:"var",name:y,...d.bound?{bound:m(d.bound,{...i,...h},r)}:{}};}return {inner:p,decls:e.map(d=>Be(d,p,r,S.get(d.name)??d.name))}}var ft=new Set,fn=new WeakMap;function E(e){let n=fn.get(e);if(n)return n;let t=new Set;x(e,t,new WeakSet);let r=t.size===0?ft:t;return fn.set(e,r),r}function _e(e,n,t){let r=new Set;t(r);for(let o of r)e.includes(o)||n.add(o);}function dn(e,n,t){let r=e.typeParams??[];_e(r.map(o=>o.name),n,o=>{for(let a of r)x(a,o,t);for(let a of e.params)x(a.type,o,t);x(e.returns,o,t),e.guard&&x(e.guard.type,o,t);});}function x(e,n,t){switch(e.t){case "var":n.add(e.name),e.bound&&x(e.bound,n,t),e.default&&x(e.default,n,t);return;case "array":x(e.items,n,t);return;case "tuple":for(let r of e.elements)x(r,n,t);return;case "union":for(let r of e.of)x(r,n,t);return;case "object":if(t.has(e))return;t.add(e);for(let r in e.props)x(e.props[r].type,n,t);e.index&&x(e.index.value,n,t);return;case "fn":if(t.has(e))return;t.add(e),dn(e,n,t);return;case "overload":for(let r of e.signatures)dn(r,n,t);return;case "apply":for(let r of e.args)x(r,n,t);return;case "keyof":x(e.of,n,t);return;case "index":x(e.obj,n,t),x(e.key,n,t);return;case "mapped":x(e.over,n,t),_e([e.key],n,r=>x(e.body,r,t));return;case "conditional":{x(e.check,n,t);let r=e.infer??[];_e(r.map(o=>o.name),n,o=>{for(let a of r)x(a,o,t);x(e.extends,o,t),x(e.then,o,t),x(e.else,o,t);});return}case "intersection":for(let r of e.of)x(r,n,t);return;case "returnType":case "parameters":x(e.fn,n,t);return;default:return}}function dt(e,n){if(e.size===0)return false;for(let t of e)if(t in n)return true;return false}function De(e){let n=[];for(let a of e){let i=g(a);if(i.t!=="object")return null;n.push(i);}let t=new Set;for(let a of n)for(let i in a.props)t.add(i);let r={};for(let a of t){let i=[],u=true;for(let l of n){let c=l.props[a];c&&(i.push(c.type),c.optional||(u=false));}r[a]={type:O({of:i}),optional:u};}let o;for(let a of n)a.index&&(o=o?{key:o.key,value:O({of:[o.value,a.index.value]})}:a.index);return o?{t:"object",props:r,index:o}:{t:"object",props:r}}function ee(e,n=g){if(e.over.t==="keyof"){let a=n(e.over.of),i=a.t==="intersection"?De(a.of)??a:a;if(i.t==="object"){let u={};for(let c of Object.keys(i.props)){let S=e.optional||i.props[c].optional;u[c]={type:m(e.body,{[e.key]:s.literal(c)}),...S?{optional:true}:{}};}let l=i.index?.key;return l===void 0?{t:"object",props:u}:{t:"object",props:u,index:{key:l,value:m(e.body,{[e.key]:l==="number"?s.number:s.string})}}}}let t=g(e.over);if(t.t==="string"||t.t==="number")return {t:"object",props:{},index:{key:t.t,value:m(e.body,{[e.key]:t})}};let r=mt(t);if(r===null)return null;let o={};for(let a of r)o[a]={type:m(e.body,{[e.key]:s.literal(a)}),optional:e.optional};return {t:"object",props:o}}function mt(e){if(e.t==="literal"&&typeof e.value=="string")return [e.value];if(e.t==="union"){let n=[];for(let t of e.of)if(t.t==="literal"&&typeof t.value=="string")n.push(t.value);else return null;return n}return null}function mn(e){let n=e.length;for(;n>0&&e[n-1].default;)n--;return {min:n,max:e.length}}var yn=(e,n)=>{let{min:t,max:r}=mn(e);return n>=t&&n<=r};function Sn(e,n){let t={};return e.forEach((r,o)=>{o<n.length?t[r.name]=n[o]:r.default&&(t[r.name]=m(r.default,t));}),t}function $(e,n){if(e.t!=="apply")return false;let t=n[e.name];return t!==void 0&&yn(t.params,e.args.length)}function M(e,n){if(e.t!=="apply")return e;let t=n[e.name];return !t||!yn(t.params,e.args.length)?e:m(t.body,Sn(t.params,e.args))}function I(e){switch(e.t){case "literal":return `#${typeof e.value}:${String(e.value)}`;case "object":{let n=Object.keys(e.props).sort().map(r=>`${r}${e.props[r].optional?"?":""}:${I(e.props[r].type)}`).join(","),t=e.index?`,[${e.index.key}]:${I(e.index.value)}`:"";return `{${n}${t}}`}case "array":return `[${I(e.items)}]`;case "tuple":return `#tuple(${e.elements.map(I).join(",")})`;case "union":return `(${e.of.map(I).sort().join("|")})`;case "fn":return `${e.typeParams?.length?`<${e.typeParams.map(t=>t.name).join(",")}>`:""}(${e.params.map(t=>I(t.type)).join(",")})=>${e.guard?`is${e.guard.param}:${I(e.guard.type)}`:I(e.returns)}`;case "var":return `v:${e.name}`;case "apply":return `${e.name}<${e.args.map(I).join(",")}>`;case "intersection":return `&(${e.of.map(I).sort().join("&")})`;case "returnType":return `RT<${I(e.fn)}>`;default:return e.t}}var hn=()=>L().maxInstantiationDepth;function P(e,n={},t=0){if(t>hn())return e;if(e.t==="var")return e.bound?P(e.bound,n,t+1):e;if($(e,n))return P(M(e,n),n,t+1);if(e.t==="mapped"){let r=ee(e,o=>P(o,n,t+1));if(r)return P(r,n,t+1)}if(e.t==="intersection")return O(e);if(e.t==="union"){let r=e.of.flatMap(a=>{let i=P(a,n,t+1);return i.t==="union"?i.of:[i]});return r.length===e.of.length&&r.every((a,i)=>a===e.of[i])?e:{t:"union",of:r}}return e}function ne(e,n,t=0){if(t>hn())return e;let r=D(e,n);if(r!==e)return ne(r,n,t+1);let o=P(e,n,t);return o===e?e:ne(o,n,t+1)}function D(e,n={}){let t=g(e);if(t!==e)return t;switch(e.t){case "keyof":{let r=ne(e.of,n);return r===e.of?e:g({...e,of:r})}case "index":{let r=ne(e.obj,n),o=ne(e.key,n);return r===e.obj&&o===e.key?e:g({...e,obj:r,key:o})}case "returnType":{let r=ne(e.fn,n);return r===e.fn?e:g({...e,fn:r})}default:return e}}var ve=e=>typeof e=="string"?s.string:typeof e=="number"?s.number:s.boolean;function ze(e){return e.t==="literal"&&e.fresh?ve(e.value):e}function vn(e){if(e.t==="literal")return e.fresh?ve(e.value):e;if(e.t==="union"){let n=e.of.map(vn);return n.some((t,r)=>t!==e.of[r])?v(n):e}return e}function bn(e){if(e.t==="literal")return ve(e.value);if(e.t==="union"){let n=e.of.map(bn);return n.some((t,r)=>t!==e.of[r])?v(n):e}return e}function yt(e){return C(e,new WeakSet)}function St(e){switch(e.t){case "array":return {t:"array",items:C(e.items,new WeakSet),...e.readonly?{readonly:true}:{},...e.fromLiteral?{fromLiteral:true}:{}};case "tuple":return {t:"tuple",elements:e.elements.map(n=>C(n,new WeakSet)),...e.flags?{flags:e.flags}:{},...e.readonly?{readonly:true}:{},...e.fromLiteral?{fromLiteral:true}:{}};case "object":return kn(e,new WeakSet);case "fn":case "overload":return C(e,new WeakSet);default:return e}}function C(e,n){if(e.t==="literal")return e.fresh?ve(e.value):e;if(n.has(e))return e;switch(e.t){case "array":return n.add(e),{t:"array",items:C(e.items,n),...e.readonly?{readonly:true}:{},...e.fromLiteral?{fromLiteral:true}:{}};case "tuple":return n.add(e),{t:"tuple",elements:e.elements.map(t=>C(t,n)),...e.flags?{flags:e.flags}:{},...e.readonly?{readonly:true}:{},...e.fromLiteral?{fromLiteral:true}:{}};case "object":return n.add(e),kn(e,n);case "apply":return n.add(e),{t:"apply",name:e.name,args:e.args.map(t=>C(t,n))};case "fn":return n.add(e),{...e,params:e.params.map(t=>({...t,type:C(t.type,n)})),returns:C(e.returns,n),...e.guard?{guard:{param:e.guard.param,type:C(e.guard.type,n)}}:{}};case "overload":return n.add(e),{t:"overload",signatures:e.signatures.map(t=>C(t,n))};default:return e}}function kn(e,n){let t={};for(let i in e.props)t[i]={type:C(e.props[i].type,n),optional:e.props[i].optional};let r=e.index?{key:e.index.key,value:C(e.index.value,n)}:void 0,o=e.fromLiteral?{fromLiteral:true}:{},a=e.hasSpread?{hasSpread:true}:{};return r?{t:"object",props:t,index:r,...o,...a}:{t:"object",props:t,...o,...a}}function Tn(e){if(!e.siblings){let n=[];for(let t of Tn(e.parent)){if(t.t!=="object"||!t.fromLiteral)continue;let r=W(t.props,e.propertyName);r&&(r.type.t==="union"?n.push(...r.type.of):n.push(r.type));}e.siblings=n;}return e.siblings}function ht(e){if(!e.propNames){let n=new Set;for(let t of Tn(e))if(t.t==="object"&&t.fromLiteral&&!t.hasSpread)for(let r in t.props)n.add(r);e.propNames=[...n];}return e.propNames}var gt=e=>e.t==="object"&&!e.index&&Object.keys(e.props).length===0;function xt(e,n,t){let r={};for(let a in e.props){let i=e.props[a],u=G(i.type,n&&{parent:n,propertyName:a},t);r[a]=u===i.type?i:{...i,type:u};}if(n)for(let a of ht(n))W(r,a)||(r[a]={type:s.undefined,optional:true});let o=e.index?{key:e.index.key,value:G(e.index.value,void 0,t)}:void 0;return o?{t:"object",props:r,index:o}:{t:"object",props:r}}var gn=new WeakMap;function te(e,n){let t=gn.get(e);if(t!==void 0)return t;if(n.has(e))return false;n.add(e);let r=false;switch(e.t){case "object":r=!!e.fromLiteral||Object.values(e.props).some(o=>te(o.type,n))||!!e.index&&te(e.index.value,n);break;case "array":r=!!e.fromLiteral||te(e.items,n);break;case "tuple":r=!!e.fromLiteral||e.elements.some(o=>te(o,n));break;case "union":case "intersection":r=e.of.some(o=>te(o,n));break}return n.delete(e),gn.set(e,r),r}var xn=new WeakMap;function G(e,n,t){if(!te(e,new WeakSet))return e;if(!n){let o=xn.get(e);if(o)return o}if(t.has(e))return e;t.add(e);let r=vt(e,n,t);return t.delete(e),n||xn.set(e,r),r}function vt(e,n,t){switch(e.t){case "object":return e.fromLiteral?xt(e,n,t):e;case "union":{let r=n??{siblings:e.of},o=e.of.map(a=>a.t==="null"||a.t==="undefined"?a:G(a,r,t));return o.some(gt)?v(o):o.every((a,i)=>a===e.of[i])?e:s.union(o)}case "intersection":{let r=false,o=e.of.map(a=>{let i=G(a,void 0,t);return i!==a&&(r=true),i});return r?s.intersection(o):e}case "array":{let r=G(e.items,void 0,t);return r===e.items&&!e.fromLiteral?e:{t:"array",items:r,...e.readonly?{readonly:true}:{}}}case "tuple":{let r=false,o=e.elements.map(a=>{let i=G(a,void 0,t);return i!==a&&(r=true),i});return !r&&!e.fromLiteral?e:{t:"tuple",elements:o,...e.flags?{flags:e.flags}:{},...e.readonly?{readonly:true}:{}}}default:return e}}function be(e){return G(e,void 0,new WeakSet)}var qe=Object.freeze({t:"union",of:Object.freeze([])});function ue(e){if(e===qe)return true;switch(e.t){case "array":return ue(e.items);case "tuple":return e.elements.some(ue);case "union":case "intersection":return e.of.some(ue);case "apply":return e.args.some(ue);default:return false}}var wn=e=>e.t==="literal"?typeof e.value:e.t==="string"||e.t==="number"||e.t==="boolean"?e.t:null;function bt(e,n){if(k(n,e))return e;if(k(e,n))return n;let t=wn(e),r=wn(n);return !t||!r||t===r?v([e,n]):null}var re,z=false;function kt(e){z=!z;try{return e()}finally{z=!z;}}function In(e){let n=re,t=z,r=new Map;re=r,z=false;try{return {result:e(),candidates:r}}finally{re=n,z=t;}}var jn=(e,n)=>{if(!re)return;let t=re.get(e);t||(t={co:[],contra:[]},re.set(e,t)),(z?t.contra:t.co).push(n);};function Tt(e){if(e.length<=1)return [...e];let n=e.filter(xe);return n.length?[...e.filter(t=>!xe(t)),v(n)]:[...e]}function wt(e){let n;for(let t of e){if(t.t!=="literal")return false;let r=typeof t.value;if(n===void 0)n=r;else if(r!==n)return false}return true}function jt(e,n){if(e.length)return wt(e)?v([...e]):e.reduce((t,r)=>k(t,r,n)?r:t)}function Pn(e,n={}){let t=Tt(e),r=t.filter(i=>i.t==="null"||i.t==="undefined"),o=t.filter(i=>i.t!=="null"&&i.t!=="undefined");if(!o.length)return be(v(t));let a=jt(o,n);if(a!==void 0)return be(r.length?v([a,...r]):a)}function On(e,n={}){if(e.length)return e.reduce((t,r)=>k(r,t,n)?r:t)}function En(e,n={}){let t=e.co.length?Pn(e.co,n):void 0;if(!e.contra.length)return t;let r=On(e.contra,n);if(r===void 0)return t;let o=t!==void 0&&t.t==="union"&&t.of.length===0;return t!==void 0&&!o&&k(t,r,n)?t:r}function Ke(e,n){let{typeParams:t,...r}=e;return {...r,params:e.params.map(o=>({...o,type:m(o.type,n)})),returns:m(e.returns,n),...e.guard?{guard:{...e.guard,type:m(e.guard.type,n)}}:{}}}function oe(e){return e.typeParams?.length?Ke(e,Object.fromEntries(e.typeParams.map(n=>[n.name,s.any]))):e}function $n(e){let n=e.typeParams;if(!n?.length)return e;let t=Object.fromEntries(n.map(a=>[a.name,a.bound??s.unknown])),r=n.map(a=>t[a.name]);for(let a=0;a<n.length-1;a++)r=r.map(i=>m(i,t));let o=Object.fromEntries(n.map(a=>[a.name,s.any]));return r=r.map(a=>m(a,o)),Ke(e,Object.fromEntries(n.map((a,i)=>[a.name,r[i]])))}function Mn(e,n,t={}){if(!e.some(o=>!n[o.name]||o.bound))return n;let r={...n};for(let o of e){let a=r[o.name]??(o.default?m(o.default,r):s.unknown);if(o.bound){let i=m(o.bound,r);k(a,i,t)||(a=i);}r[o.name]=a;}return r}function Qe(e,n,t={}){let r=e.typeParams??[],o=new Set(r.map(S=>S.name)),a=S=>Object.fromEntries(Object.entries(S??{}).filter(([h])=>o.has(h))),i={},u=Math.max(e.params.length,n.params.length);for(let S=0;S<u;S++){let h=le(e,S),p=le(n,S);h&&p&&(i=b(h,p,i)??i);}let c={...a(e.guard&&n.guard&&e.guard.param===n.guard.param?b(e.guard.type,n.guard.type,{}):b(e.returns,n.returns,{}))};return Object.assign(c,a(i)),Ke(e,Mn(r,c,t))}function b(e,n,t={}){if(n===qe)return t;if(e.t==="var"){if(ue(n))return t;let r=t[e.name];if(!r)return jn(e.name,n),{...t,[e.name]:n};if(n.t==="any"||n.t==="unknown")return t;jn(e.name,n);let o=bt(r,n);return o?{...t,[e.name]:o}:t}if(n.t==="any"||n.t==="unknown")return t;switch(e.t){case "array":return n.t==="array"?b(e.items,n.items,t):null;case "tuple":{let r=e,o=X(r);if(o<0){if(n.t!=="tuple"||n.elements.length!==r.elements.length)return null;let u=t;for(let l=0;l<r.elements.length;l++)u=b(r.elements[l],n.elements[l],u)??u;return u}let a=t,i=(u,l)=>{a=b(u,l,a)??a;};if(n.t==="tuple"){if(n.elements.length<o)return null;for(let l=0;l<o;l++)i(r.elements[l],n.elements[l]);let u=n.elements.slice(o);return a=b(r.elements[o],u.length?v(u):s.unknown,a)??a,a}if(n.t==="array"){for(let u=0;u<o;u++)i(r.elements[u],n.items);return a=b(r.elements[o],n.items,a)??a,a}return null}case "object":{if(n.t!=="object")return null;let r=t;for(let o in e.props){let a=e.props[o],i=n.props[o];if(!i){if(a.optional)continue;return null}r=b(a.type,i.type,r)??r;}return r}case "fn":{if(n.t!=="fn")return null;let r=oe(e),o=$n(n),a=b(r.returns,o.returns,t)??t,i=Math.min(r.params.length,o.params.length);for(let u=0;u<i;u++)a=kt(()=>b(r.params[u].type,o.params[u].type,a))??a;return r.guard&&o.guard&&(a=b(r.guard.type,o.guard.type,a)??a),a}case "union":{if(!e.of.some(l=>E(l).size>0))return k(n,e)?t:null;let r=e.of.filter(l=>l.t==="var"),o=n.t==="union"?n.of:[n],a=o.map(()=>false),i=t;for(let l of e.of)if(l.t!=="var")for(let c=0;c<o.length;c++){let S=b(l,o[c],i);S!==null&&(i=S,a[c]=true);}if(r.length!==1)return i;let u=o.filter((l,c)=>!a[c]);return u.length?b(r[0],v(u),i)??i:i}case "apply":{if(n.t!=="apply"||n.name!==e.name||n.args.length!==e.args.length)return null;let r=t;for(let o=0;o<e.args.length;o++)r=b(e.args[o],n.args[o],r)??r;return r}default:return k(n,e)?t:null}}var Cn="@rev",He=e=>e.t==="mapped"&&e.over.t==="keyof"&&e.over.of.t==="var";function N(e,n,t){if(e.t==="index"&&e.obj.t==="var"&&e.obj.name===n&&e.key.t==="var"&&e.key.name===t)return s.var(Cn);switch(e.t){case "array":return {t:"array",items:N(e.items,n,t)};case "tuple":return {t:"tuple",elements:e.elements.map(r=>N(r,n,t)),...e.flags?{flags:e.flags}:{}};case "union":return s.union(e.of.map(r=>N(r,n,t)));case "fn":return {...e,params:e.params.map(r=>({...r,type:N(r.type,n,t)})),returns:N(e.returns,n,t)};case "apply":return {t:"apply",name:e.name,args:e.args.map(r=>N(r,n,t))};case "returnType":return {t:"returnType",fn:N(e.fn,n,t)};case "object":{let r={};for(let o in e.props)r[o]={type:N(e.props[o].type,n,t),optional:e.props[o].optional};return e.index?{t:"object",props:r,index:{key:e.index.key,value:N(e.index.value,n,t)}}:{t:"object",props:r}}default:return e}}function It(e,n,t){if(e.over.t!=="keyof"||e.over.of.t!=="var")return null;let r=e.over.of.name;if(t[r])return null;let o={};for(let a in n.props){let i=N(e.body,r,e.key),u=b(i,n.props[a].type,{})?.[Cn];o[a]={type:u?ze(u):s.unknown,optional:n.props[a].optional};}return {...t,[r]:{t:"object",props:o}}}function Ln(e,n,t){let r=t;for(let o=0;o<e.length&&o<n.length;o++){let a=e[o].type,i=n[o];if(He(a)&&i.t==="object"){let u=It(a,i,r);u&&(r=u);}}return r}function Pt(e,n,t={}){let{result:r,candidates:o}=In(()=>{let i={};for(let u=0;u<e.params.length;u++){let l=e.params[u];if(l.variadic){for(let c=u;c<n.length;c++)if(i=b(l.type,n[c],i),i===null)return null;break}if(u>=n.length){if(l.optional)continue;return null}if(!He(l.type)&&(i=b(l.type,n[u],i),i===null))return null}return Ln(e.params,n,i)});if(r===null)return null;let a=Rn(r,o,t);return {returns:m(e.returns,a),bindings:a}}function Rn(e,n,t){let r;for(let[o,a]of n){if(a.co.length<2&&!a.contra.length)continue;let i=En(a,t);i===void 0||i===e[o]||(r??(r={...e}),r[o]=i);}return r??e}function Ot(e,n,t={}){let{result:r,candidates:o}=In(()=>{let i={};for(let u=0;u<e.params.length&&u<n.length;u++){let l=e.params[u];if(He(l.type))continue;let c=b(l.type,n[u],i);c!==null&&(i=c);}return Ln(e.params,n,i)}),a=Rn(r,o,t);return {returns:m(e.returns,a),bindings:a}}var Et=e=>e.t==="array"?e.items:e.t==="tuple"?s.union([...e.elements]):void 0;function F(e,n,t,r,o){if(e.t==="var"&&t.has(e.name)){let a=o.get(e.name);a||o.set(e.name,a={co:[],contra:[]}),(r?a.contra:a.co).push(n);return}if(!(n.t==="any"||n.t==="unknown"))switch(e.t){case "array":{let a=Et(n);a&&F(e.items,a,t,r,o);return}case "tuple":{let a=e,i=X(a);if(i<0){n.t==="tuple"&&n.elements.length===a.elements.length&&a.elements.forEach((l,c)=>F(l,n.elements[c],t,r,o));return}let u=a.elements[i];if(n.t==="tuple"){let l=n;if(l.elements.length<i)return;for(let c=0;c<l.elements.length;c++)F(c<i?a.elements[c]:u,l.elements[c],t,r,o);}else if(n.t==="array"){for(let l=0;l<i;l++)F(a.elements[l],n.items,t,r,o);F(u,n.items,t,r,o);}return}case "fn":if(n.t==="fn"){let a=oe(e),i=$n(n);a.params.forEach((u,l)=>{let c=i.params[l];c&&F(u.type,c.type,t,!r,o);}),F(a.returns,i.returns,t,r,o);}return;case "object":if(n.t==="object")for(let a in e.props)n.props[a]&&F(e.props[a].type,n.props[a].type,t,r,o);return;case "apply":n.t==="apply"&&n.name===e.name&&n.args.length===e.args.length&&e.args.forEach((a,i)=>F(a,n.args[i],t,r,o));return;default:return}}function $t(e,n){if(e.length===1)return e[0];let r=e.flatMap(o=>o.t==="union"?[...o.of]:[o]).filter(o=>e.every(a=>k(o,a,n)));return v(r)}var Mt=e=>e.t==="union"&&e.of.length===0;function Wn(e,n){let t={};for(let[r,{co:o,contra:a}]of e){let i=o.length?v(o):void 0,u=a.length?$t(a,n):void 0,l=i??u;i&&u&&(l=!Mt(i)&&i.t!=="any"&&k(i,u,n)?i:u),l&&(t[r]=l);}return t}function Fn(e,n={}){let t=new Map,r=(e.infer??[]).map(a=>a.name);F(e.extends,e.check,new Set(r),false,t);let o={...Wn(t,n)};for(let a of r)a in o||(o[a]=s.unknown);return o}function Ct(e,n={},t=0){if(!e.infer?.length||E(e.check).size>0)return null;let r=new Map;F(e.extends,e.check,new Set(e.infer.map(u=>u.name)),false,r);let o=Wn(r,n),a=new WeakSet,i=ke(m(e.extends,o),n,a,t);return k(e.check,i,n)?ke(m(e.then,o),n,a,t):ke(m(e.else,o),n,a,t)}function ke(e,n={},t=new WeakSet,r=0,o=new Set){let a=r,i=L().maxTypeDepth,u=new Set,l=(p,d)=>d?.length?new Set([...p,...d.map(y=>y.name)]):p,c=(p,d)=>({...p,...p.bound?{bound:h(p.bound,d)}:{},...p.default?{default:h(p.default,d)}:{}}),S=(p,d)=>{let y=l(d,p.typeParams);return {...p,params:p.params.map(w=>({...w,type:h(w.type,y)})),returns:h(p.returns,y),...p.guard?{guard:{...p.guard,type:h(p.guard.type,y)}}:{},...p.typeParams?{typeParams:p.typeParams.map(w=>c(w,y))}:{}}},h=(p,d=u)=>{switch(p.t){case "var":return d.has(p.name)?c(p,d):s.unknown;case "array":return {...p,items:h(p.items,d)};case "tuple":return {...p,elements:p.elements.map(y=>h(y,d))};case "union":return s.union(p.of.map(y=>h(y,d)));case "object":{if(t.has(p))return p;t.add(p);let y={};for(let fe in p.props){let en=p.props[fe];y[fe]={type:h(en.type,d),optional:en.optional};}let w=p.index?{key:p.index.key,value:h(p.index.value,d)}:void 0;return t.delete(p),w?{t:"object",props:y,index:w}:{t:"object",props:y}}case "fn":{if(t.has(p))return p;t.add(p);let y=S(p,d);return t.delete(p),y}case "overload":return {t:"overload",signatures:p.signatures.map(y=>S(y,d))};case "apply":{if($(p,n)){let y=M(p,n);if(y.t==="conditional"){if(a>=i)throw new K;a++;try{let w=h(y,d);if(w.t!=="conditional")return w}finally{a--;}}}return {t:"apply",name:p.name,args:p.args.map(y=>h(y,d))}}case "conditional":{let y=p.infer?.length?Ct(p,n,a):q(p,n);if(y)return h(y,d);let w=l(d,p.infer);return {t:"conditional",check:h(p.check,d),extends:h(p.extends,w),then:h(p.then,w),else:h(p.else,w),...p.infer?{infer:p.infer.map(fe=>c(fe,w))}:{}}}case "intersection":return O({of:p.of.map(y=>h(y,d))});case "returnType":return g({t:"returnType",fn:h(p.fn,d)});default:return p}};return h(e,o)}var Lt=s.object({}),Ge=(e,n,t="assignable")=>({seen:new WeakMap,exp:new Set,schemes:e,relation:t,assumed:0,explain:n,sourceStack:[],targetStack:[]}),Ye=0;function j(e,n,t){return e.explain?.out.push({path:[...e.explain.path],actual:n,expected:t,kind:"type"}),false}function Je(e,n,t=0){if(t>L().maxInstantiationDepth)return e;if($(e,n)){let r=M(e,n);if(r.t!=="conditional")return e;let o=q(r,n);return o?Je(o,n,t+1):e}if(e.t==="conditional"){let r=q(e,n);return r?Je(r,n,t+1):e}return e}function Rt(e,n,t={}){let r=[];return !f(e,n,Ge(t,{path:[],out:r}))&&r.length===0&&r.push({path:[],actual:e,expected:n,kind:"type"}),r}var Wt=new WeakMap,Ft=new WeakMap;function Dn(e,n,t,r,o){if(e===n)return true;if(Object.keys(t).length>0)return f(e,n,Ge(t,void 0,r));let a=o.get(e)?.get(n);if(a!==void 0)return a;let i=f(e,n,Ge(t,void 0,r)),u=o.get(e);return u||o.set(e,u=new WeakMap),u.set(n,i),i}function k(e,n,t={}){return Dn(e,n,t,"assignable",Wt)}function Nt(e,n,t={}){return Dn(e,n,t,"comparable",Ft)}function Bt(e,n,t={}){return k(e,n,t)&&k(n,e,t)}function q(e,n){if(e.infer?.length){if(E(e.check).size>0)return null;let t=Je(e.check,n),r=Fn({...e,check:t},n),o=m(e.extends,r);return k(t,o,n)?m(e.then,r):m(e.else,r)}return E(e.check).size>0||E(e.extends).size>0?null:k(e.check,e.extends,n)?e.then:e.else}function ce(e,n,t=0){if(t>L().maxInstantiationDepth)return e;let r=D(e,n.schemes);if(r!==e)return ce(r,n,t+1);if(e.t==="conditional"){let o=q(e,n.schemes);if(o)return ce(o,n,t+1)}return $(e,n.schemes)?ce(M(e,n.schemes),n,t+1):e.t==="union"?v(e.of.map(o=>ce(o,n,t+1))):e}var Nn=(e,n)=>ee(e,t=>P(t,n.schemes))??ee({...e,over:ce(e.over,n)});function we(e,n,t,r){if(!t.explain)return f(e,n,t);t.explain.path.push(r);try{return f(e,n,t)}finally{t.explain.path.pop();}}function f(e,n,t){if(Ye>=L().maxTypeDepth)throw new K;Ye++;try{if(e.t==="any"||n.t==="any"||n.t==="unknown")return !0;if(e.t==="unknown")return t.relation==="comparable"?!0:j(t,e,n);let r=D(e,t.schemes);if(r!==e)return f(r,n,t);let o=D(n,t.schemes);if(o!==n)return f(e,o,t);if(e.t==="mapped"){let i=Nn(e,t);if(i)return f(i,n,t)}if(n.t==="mapped"){let i=Nn(n,t);if(i)return f(e,i,t)}if(e.t==="conditional"){let i=q(e,t.schemes);if(i)return f(i,n,t)}if(n.t==="conditional"){let i=q(n,t.schemes);if(i)return f(e,i,t)}if(t.relation==="comparable"&&Ut(n,e))return !0;if(n.t==="intersection")return n.of.every(i=>f(e,i,t));if(e.t==="intersection"&&n.t!=="union"){if(Vt(e.of,n,t))return !0;if(n.t==="object"){let i=De(e.of);if(i)return f(i,n,t)}return !1}if(!(e.t==="apply"&&n.t==="apply"&&e.name===n.name&&e.args.length===n.args.length)&&($(e,t.schemes)||$(n,t.schemes))){let i=`${I(e)}\u2264${I(n)}`;if(t.exp.has(i))return !0;if(An(e,t.sourceStack)&&An(n,t.targetStack))return t.assumed++,!0;t.exp.add(i),t.sourceStack.push(e),t.targetStack.push(n);let u=f(M(e,t.schemes),M(n,t.schemes),t);return t.sourceStack.pop(),t.targetStack.pop(),t.exp.delete(i),u}return At(e,n,t)}finally{Ye--;}}var Bn=5;function An(e,n){if(n.length<Bn||e.t!=="apply")return false;let t=0;for(let r of n)if(r.t==="apply"&&r.name===e.name&&++t>=Bn)return true;return false}function At(e,n,t){let r=t.seen.get(e);if(r?.has(n))return t.assumed++,true;r||(r=new WeakSet,t.seen.set(e,r)),r.add(n);let o=t.assumed,a=_t(e,n,t);return (!a||t.assumed!==o)&&r.delete(n),a}function Vt(e,n,t){let r=t.intersectionSource,o=t.explain;t.intersectionSource=true,t.explain=void 0;try{return e.some(a=>f(a,n,t))}finally{t.intersectionSource=r,t.explain=o;}}function _t(e,n,t){if(e.t==="union")return t.relation==="comparable"?e.of.length===0||e.of.some(r=>f(r,n,t)):e.of.every(r=>f(r,n,t));if(e.t==="boolean"&&n.t==="union")return t.relation==="comparable"?f(s.literal(true),n,t)||f(s.literal(false),n,t):f(s.literal(true),n,t)&&f(s.literal(false),n,t);if(n.t==="union")return Dt(e,n,t);if(e.t==="var"&&!(n.t==="var"&&n.name===e.name))return e.bound?f(e.bound,n,t):j(t,e,n);if(e.t==="nonPrimitive"&&n.t!=="nonPrimitive")return n.t==="object"&&n.index?j(t,e,n):f(Lt,n,t);if(_n(e)&&_n(n))return Ht(e,n,t);if(n.t==="overload")return n.signatures.every(r=>f(e,r,t));switch(n.t){case "literal":return e.t==="literal"&&e.value===n.value?true:j(t,e,n);case "string":case "number":case "boolean":case "null":case "undefined":return e.t===n.t||e.t==="literal"&&zn(e.value)===n.t?true:j(t,e,n);case "void":return e.t==="void"||e.t==="undefined"?true:j(t,e,n);case "nonPrimitive":return e.t==="object"||e.t==="array"||e.t==="tuple"||e.t==="fn"||e.t==="overload"||e.t==="apply"||e.t==="nonPrimitive"?true:j(t,e,n);case "array":return e.t==="array"?e.readonly&&!n.readonly?j(t,e,n):f(e.items,n.items,t):e.t==="tuple"?e.readonly&&!n.readonly?j(t,e,n):Ne(e).every((r,o)=>we(r,n.items,t,String(o))):j(t,e,n);case "tuple":{if(e.t!=="tuple"||e.readonly&&!n.readonly)return j(t,e,n);if(!e.flags&&!n.flags){if(e.elements.length!==n.elements.length)return j(t,e,n);for(let r=0;r<e.elements.length;r++)if(!we(e.elements[r],n.elements[r],t,String(r)))return false;return true}return pn(e,n,(r,o)=>f(r,o,t),t.relation==="comparable")}case "object":if(e.t==="object")return qt(e,n,t);if(Object.keys(n.props).length===0&&!n.index)return e.t!=="null"&&e.t!=="undefined"&&e.t!=="void"?true:j(t,e,n);if((e.t==="array"||e.t==="tuple")&&n.index){let r=e.t==="array"?[e.items]:Ne(e);return n.index.key==="number"&&Object.values(n.props).every(o=>o.optional)&&r.every(o=>f(o,n.index.value,t))?true:j(t,e,n)}return j(t,e,n);case "fn":return e.t==="fn"?Te(e,n,t):j(t,e,n);case "var":return e.t==="var"&&e.name===n.name;case "typeQuery":return e.t==="typeQuery"&&e.path.length===n.path.length&&e.path.every((r,o)=>r===n.path[o]);case "keyof":return e.t==="keyof"&&f(e.of,n.of,t)&&f(n.of,e.of,t);case "index":return e.t==="index"&&f(e.obj,n.obj,t)&&f(n.obj,e.obj,t)&&f(e.key,n.key,t)&&f(n.key,e.key,t);case "mapped":return e.t==="mapped"&&e.key===n.key&&!!e.optional==!!n.optional&&f(e.over,n.over,t)&&f(n.over,e.over,t)&&f(e.body,n.body,t)&&f(n.body,e.body,t);case "conditional":return e.t==="conditional"&&f(e.check,n.check,t)&&f(n.check,e.check,t)&&f(e.extends,n.extends,t)&&f(n.extends,e.extends,t)&&f(e.then,n.then,t)&&f(e.else,n.else,t);case "apply":return e.t==="apply"&&e.name===n.name&&e.args.length===n.args.length&&e.args.every((r,o)=>f(r,n.args[o],t));case "returnType":return e.t==="returnType"&&f(e.fn,n.fn,t)&&f(n.fn,e.fn,t);case "parameters":return e.t==="parameters"&&f(e.fn,n.fn,t)&&f(n.fn,e.fn,t)}}var zn=e=>typeof e;function Ut(e,n){switch(n.t){case "string":case "number":case "boolean":case "null":case "undefined":return e.t===n.t||e.t==="literal"&&zn(e.value)===n.t;case "literal":return e.t==="literal"&&e.value===n.value;case "void":return e.t==="void"||e.t==="undefined";default:return false}}function Dt(e,n,t){let r=t.explain;if(!r)return n.of.some(i=>f(e,i,t));t.explain=void 0;let o;try{o=n.of.some(i=>f(e,i,t));}finally{t.explain=r;}if(o)return true;let a=zt(e,n,t);return a?f(e,a,t):j(t,e,n)}function zt(e,n,t){if(e.t!=="object")return null;let r=n.of.map(o=>P(o,t.schemes));for(let o in e.props){let a=e.props[o].type;if(a.t!=="literal")continue;let i=t.explain;t.explain=void 0;let u;try{u=n.of.filter((l,c)=>{let S=r[c];if(S.t!=="object")return !1;let h=W(S.props,o);return !!h&&f(a,h.type,t)});}finally{t.explain=i;}if(u.length===1)return u[0]}return null}function qt(e,n,t){let r=false;for(let o in n.props)if(!(n.props[o].optional||W(e.props,o))){if(!t.explain)return false;t.explain.out.push({path:[...t.explain.path,o],expected:n.props[o].type,kind:"missing"}),r=true;}if(r)return false;for(let o in n.props){let a=n.props[o],i=W(e.props,o);if(!i)continue;if(i.optional&&!a.optional&&t.relation==="assignable")return false;let u=a.optional?U(i.type).type:i.optional?v([i.type,s.undefined]):i.type;if(!we(u,a.type,t,o))return false}return !(n.index&&!Kt(e,n.index,t))}function Kt(e,n,t){if(t.intersectionSource){if(!e.index)return false}else {let r=n.key==="number";for(let o in e.props){if(r&&!Fe(o))continue;let a=e.props[o],i=a.optional?_(a.type):a.type;if(!we(i,n.value,t,o))return false}}return !e.index||f(e.index.value,n.value,t)}var qn=e=>{let n=e.params[e.params.length-1];return n?.variadic?n:void 0},Qt=e=>{let n=e.params.findIndex(t=>t.optional||t.variadic);return n<0?e.params.length:n};function le(e,n){let t=qn(e),r=t?e.params.length-1:e.params.length;if(n<r)return e.params[n].type;if(!t)return;let o=t.type;if(o.t==="array")return o.items;if(o.t==="tuple"&&!o.flags)return o.elements[n-r]}var Vn=(e,n)=>{let t=le(e,n);return t===void 0?t:e.params[n]?.optional?_(t):t},_n=e=>e.t==="fn"||e.t==="overload";function Ht(e,n,t){let r=e.t==="overload"?e.signatures:[e],o=n.t==="overload"?n.signatures:[n];return r.length===1&&o.length===1?Un(r[0],o[0],t,t.relation==="comparable"):o.every(a=>r.some(i=>Un(i,a,t,true)))}function Un(e,n,t,r){if(r)return Te(oe(e),oe(n),t);let o=Ue(n,E(e));return e.typeParams?.length?Te(Qe(e,o,t.schemes),o,t):Te(e,o,t)}function Te(e,n,t){if(n.returns.t!=="void"&&n.returns.t!=="any"&&!f(e.returns,n.returns,t)||!qn(n)&&Qt(e)>n.params.length)return false;let r=Math.max(e.params.length,n.params.length);for(let o=0;o<r;o++){let a=Vn(e,o),i=Vn(n,o);if(a&&i&&!f(i,a,t))return false}return !(n.guard&&(!e.guard||e.guard.param!==n.guard.param||!f(e.guard.type,n.guard.type,t)))}var Yt=e=>e.t==="object"&&!e.index&&Object.values(e.props).every(n=>n.optional);function v(e){let n=[];for(let o of e)o.t==="union"?n.push(...o.of):n.push(o);let t=L().maxUnionMembers;if(n.length>t)throw new Q(n.length,t);if(n.some(o=>o.t==="any"))return s.any;let r=[...n];for(let o=r.length-1;o>=0;o--){let a=r[o];r.some((u,l)=>l!==o&&!Yt(u)&&k(a,u)&&(l<o||!k(u,a)))&&r.splice(o,1);}if(r.some(o=>o.t==="literal"&&o.value===true)&&r.some(o=>o.t==="literal"&&o.value===false)){let o=r.filter(a=>!(a.t==="boolean"||a.t==="literal"&&typeof a.value=="boolean"));o.push(s.boolean),r.length=0,r.push(...o);}return r.length===1?r[0]:{t:"union",of:r}}function Gt(e,n){let t=new Set,r=new WeakSet,o=a=>{if(!r.has(a))switch(r.add(a),a.t){case "keyof":t.add("keyof"),o(a.of);break;case "index":t.add("indexed"),o(a.obj),o(a.key);break;case "mapped":t.add("mapped"),o(a.over),o(a.body);break;case "conditional":t.add("conditional"),a.infer?.length&&t.add("infer"),a.infer?.forEach(o),o(a.check),o(a.extends),o(a.then),o(a.else);break;case "returnType":t.add("returnType"),o(a.fn);break;case "parameters":t.add("parameters"),o(a.fn);break;case "tuple":t.add("tuple"),a.elements.forEach(o);break;case "intersection":t.add("intersection"),a.of.forEach(o);break;case "overload":t.add("overload");for(let i of a.signatures){i.typeParams?.forEach(o);for(let u of i.params)o(u.type);o(i.returns),i.guard&&o(i.guard.type);}break;case "object":for(let i in a.props)o(a.props[i].type);a.index&&o(a.index.value);break;case "array":o(a.items);break;case "union":a.of.forEach(o);break;case "fn":a.typeParams?.forEach(o);for(let i of a.params)o(i.type);o(a.returns),a.guard&&o(a.guard.type);break;case "var":a.bound&&o(a.bound),a.default&&o(a.default);break;case "apply":n&&a.name===n&&t.add("recursion"),a.args.forEach(o);break}};return o(e),t}var Jt=s.union([]);function Kn(e,n){return je(e,n,new WeakMap)}function Zt(e){return e.reduce(Kn,Jt)}function je(e,n,t){if(e.t==="any"||n.t==="any")return s.any;if(e===n)return e;let r=t.get(e)?.get(n);if(r)return r;if(e.t==="object"&&n.t==="object")return Xt(e,n,t);if(e.t==="array"&&n.t==="array"){let o={t:"array",items:s.unknown};return Qn(t,e,n,o),o.items=je(e.items,n.items,t),o}return v([e,n])}function Xt(e,n,t){let r={t:"object",props:{}};Qn(t,e,n,r);for(let o in e.props){let a=e.props[o],i=n.props[o];if(i){let u=je(a.type,i.type,t);r.props[o]=a.optional||i.optional?{type:u,optional:true}:{type:u};}else r.props[o]={type:a.type,optional:true};}for(let o in n.props)o in e.props||(r.props[o]={type:n.props[o].type,optional:true});return e.index&&n.index&&e.index.key===n.index.key&&(r.index={key:e.index.key,value:je(e.index.value,n.index.value,t)}),r}function Qn(e,n,t,r){let o=e.get(n);o||(o=new WeakMap,e.set(n,o)),o.set(t,r);}var er=4;function nr(e,n={}){return se(e,n,0)}function se(e,n,t){let r=P(D(e,n),n);switch(r.t){case "string":return "";case "number":return 0;case "boolean":return false;case "null":return null;case "literal":return r.value;case "array":return [];case "tuple":{let o=[];for(let a=0;a<r.elements.length&&(r.flags?.[a]??"req")==="req";a++)o.push(se(r.elements[a],n,t));return o}case "object":{if(t>=er)return {};let o={};for(let a of Object.keys(r.props)){let i=r.props[a];i.optional||(o[a]=se(i.type,n,t+1));}return o}case "nonPrimitive":return {};case "union":{if(r.of.some(a=>a.t==="null"))return null;let o=r.of.find(a=>a.t!=="undefined");return o===void 0?null:se(o,n,t)}case "intersection":{let o=r.of.map(a=>se(a,n,t));return o.every(tr)?Object.assign({},...o):null}default:return null}}var tr=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);var rr=e=>/^[A-Za-z_$][A-Za-z0-9_$]*$/.test(e),or={check:new Set(["function","conditional"]),extends:new Set(["conditional"]),union:new Set(["function","conditional","union","intersection"]),intersection:new Set(["function","conditional","union","intersection"]),operand:new Set(["function","conditional","union","intersection"]),postfix:new Set(["function","conditional","union","intersection","operator","query"])},Hn=(e,n)=>or[e].has(n);function Oe(e,n=new WeakSet){return T(e,{seen:n,infer:new Map})}function ar(e){return Ie(e,{seen:new WeakSet,infer:new Map})}function Xe(e,n){switch(e.t){case "fn":return "function";case "overload":return e.signatures.length===1?"function":"primary";case "conditional":return "conditional";case "union":return e.of.length===0?"primary":e.of.length===1?Xe(e.of[0],n):"union";case "intersection":return e.of.length===1?Xe(e.of[0],n):"intersection";case "keyof":return "operator";case "array":case "tuple":return e.readonly?"operator":"primary";case "typeQuery":return "query";case "var":{let t=n.infer.get(e.name);return t?t.bound?"conditional":"operator":"primary"}default:return "primary"}}function A(e,n,t){let r=T(n,t);return Hn(e,Xe(n,t))?`(${r})`:r}function Ie(e,n){return e.map((t,r)=>{let o=T(t,n);return r===0&&ir(t)?`(${o})`:o}).join(", ")}var ir=e=>e.t==="fn"&&!!e.typeParams?.length||e.t==="overload"&&e.signatures.length===1&&!!e.signatures[0].typeParams?.length;function ur(e,n){return e?.length?`<${e.map(t=>lr(t,n)).join(", ")}>`:""}function lr(e,n){let t=e.bound?` extends ${T(e.bound,n)}`:"",r=e.default?` = ${T(e.default,n)}`:"";return `${e.name}${t}${r}`}function Pe(e,n){if(!n.some(r=>e.infer.has(r)))return e;let t=new Map(e.infer);for(let r of n)t.delete(r);return {...e,infer:t}}function Ze(e,n,t){let r=Pe(t,(e.typeParams??[]).map(u=>u.name)),o=e.params.map(u=>{let l=u.variadic?"...":"",c=u.optional&&!u.variadic?"?":"";return `${l}${u.name}${c}: ${T(u.type,r)}`}).join(", "),a=e.guard?`${e.params[e.guard.param]?.name??`arg${e.guard.param}`} is ${T(e.guard.type,r)}`:T(e.returns,r),i=ur(e.typeParams,r);return n==="=>"?`${i}(${o}) => ${a}`:`${i}(${o}): ${a}`}function T(e,n){let{seen:t}=n;switch(e.t){case "any":case "unknown":case "string":case "number":case "boolean":case "null":case "undefined":case "void":return e.t;case "nonPrimitive":return "object";case "var":{let r=n.infer.get(e.name);return r?r.bound?`infer ${e.name} extends ${T(r.bound,Pe(n,[e.name]))}`:`infer ${e.name}`:e.name}case "typeQuery":return `typeof ${e.path.join(".")}`;case "literal":return typeof e.value=="string"?JSON.stringify(e.value):String(e.value);case "array":{let r=`${A("postfix",e.items,n)}[]`;return e.readonly?`readonly ${r}`:r}case "tuple":{let o=`[${e.elements.map((a,i)=>{let u=e.flags?.[i]??"req";return u==="rest"?`...${A("postfix",a,n)}[]`:u==="optional"?`${A("postfix",a,n)}?`:T(a,n)}).join(", ")}]`;return e.readonly?`readonly ${o}`:o}case "union":{if(e.of.length===0)return "never";if(e.of.length===1)return T(e.of[0],n);if(t.has(e))return "\u2026";t.add(e);let r=e.of.map(o=>A("union",o,n)).join(" | ");return t.delete(e),r}case "intersection":{if(e.of.length===1)return T(e.of[0],n);if(t.has(e))return "\u2026";t.add(e);let r=e.of.map(o=>A("intersection",o,n)).join(" & ");return t.delete(e),r}case "object":{if(t.has(e))return "\u2026";t.add(e);let r=Object.entries(e.props).map(([o,a])=>`${rr(o)?o:JSON.stringify(o)}${a.optional?"?":""}: ${T(a.type,n)}`);return e.index&&r.push(`[k: ${e.index.key}]: ${T(e.index.value,n)}`),t.delete(e),r.length===0?"{}":`{ ${r.join("; ")} }`}case "fn":{if(t.has(e))return "\u2026";t.add(e);let r=Ze(e,"=>",n);return t.delete(e),r}case "overload":{if(e.signatures.length===1)return Ze(e.signatures[0],"=>",n);if(t.has(e))return "\u2026";t.add(e);let r=e.signatures.map(o=>Ze(o,":",n));return t.delete(e),`{ ${r.join("; ")} }`}case "apply":{if(e.args.length===0)return e.name;if(t.has(e))return "\u2026";t.add(e);let r=`${e.name}<${Ie(e.args,n)}>`;return t.delete(e),r}case "keyof":return `keyof ${A("operand",e.of,n)}`;case "index":return `${A("postfix",e.obj,n)}[${T(e.key,n)}]`;case "mapped":{if(t.has(e))return "\u2026";t.add(e);let r=e.optional?"?":"",o=Pe(n,[e.key]),a=`{ [${e.key} in ${T(e.over,n)}]${r}: ${T(e.body,o)} }`;return t.delete(e),a}case "conditional":{if(t.has(e))return "\u2026";t.add(e);let r=e.infer??[],o=r.length?{...n,infer:new Map([...n.infer,...r.map(u=>[u.name,u])])}:n,a=Pe(n,r.map(u=>u.name)),i=`${A("check",e.check,n)} extends ${A("extends",e.extends,o)} ? ${T(e.then,a)} : ${T(e.else,a)}`;return t.delete(e),i}case "returnType":return `ReturnType<${Ie([e.fn],n)}>`;case "parameters":return `Parameters<${Ie([e.fn],n)}>`}}function Yn(e){if(e.length===0)return "value";let n=e[e.length-1];if(/^\d+$/.test(n)){let t=e.slice(0,-1);return t.length?`property '${t.join(".")}' at position ${n}`:`position ${n}`}return `property '${e.join(".")}'`}function cr(e){let n=e.filter(t=>t.kind==="missing");if(n.length&&n.length===e.length){let t=n.map(r=>`'${r.path.join(".")}'`).join(", ");return n.length===1?`property ${t} is missing`:`properties ${t} are missing`}return e.map(t=>t.actual===void 0?`${Yn(t.path)} is missing`:`${Yn(t.path)}: expected '${Oe(t.expected)}', got '${Oe(t.actual)}'`).join("; ")}function J(e,n=new WeakSet){switch(e.t){case "string":case "number":case "boolean":case "null":case "literal":return true;case "array":return n.has(e)?true:(n.add(e),J(U(e.items).type,n));case "tuple":return n.has(e)?true:(n.add(e),e.elements.every(t=>J(U(t).type,n)));case "object":{if(n.has(e))return true;n.add(e);let t=Object.values(e.props).every(o=>J(U(o.type).type,n)),r=!e.index||J(U(e.index.value).type,n);return t&&r}case "union":return n.has(e)?true:(n.add(e),e.of.every(t=>J(t,n)));case "intersection":return n.has(e)?true:(n.add(e),e.of.every(t=>J(t,n)));case "undefined":case "void":case "fn":case "overload":case "keyof":case "index":case "mapped":case "conditional":case "returnType":case "parameters":case "var":case "typeQuery":case "apply":case "any":case "unknown":case "nonPrimitive":return false}}function sr(e,n,t={}){let r=e;for(let o of n){let a=Z(r,o,t);if(a===null)return null;r=a;}return {type:r,completions:pe(r,t)}}var pr=e=>e==="[]"||/^\d+$/.test(e);function Z(e,n,t,r=new Set){if(e.t==="var")return e.bound?Z(P(e,t),n,t,r):null;if(e.t==="mapped"){let a=P(e,t);return a===e?null:Z(a,n,t,r)}if($(e,t)){let a=I(e);if(r.has(a))return null;r.add(a);let i=Z(M(e,t),n,t,r);return r.delete(a),i}let o=g(e);if(o!==e)return Z(o,n,t,r);switch(e.t){case "any":return e;case "object":{let a=W(e.props,n);return a?a.optional?v([a.type,{t:"undefined"}]):a.type:e.index?.key==="string"?e.index.value:null}case "array":return pr(n)?e.items:null;case "tuple":{let a=e.flags?.findIndex(l=>l!=="req")??-1,i=Number(n);if(!(Number.isInteger(i)&&i>=0))return null;if(a<0)return i<e.elements.length?e.elements[i]:null;if(i<a)return e.elements[i];let u=e.elements.slice(a);return u.length?v(u):null}case "union":{let a=[];for(let i of e.of){let u=Z(i,n,t,r);if(u===null)return null;a.push(u);}return a.length?v(a):null}case "intersection":{let a=e.of.map(i=>Z(i,n,t,r)).filter(i=>i!==null);return a.length?O({of:a}):null}default:return null}}function pe(e,n,t=new WeakSet,r=new Set){if(e.t==="var")return e.bound?pe(P(e,n),n,t,r):[];if($(e,n)){let a=I(e);if(r.has(a))return [];r.add(a);let i=pe(M(e,n),n,t,r);return r.delete(a),i}let o=g(e);if(o!==e)return pe(o,n,t,r);switch(e.t){case "object":return Object.entries(e.props).map(([a,i])=>({key:a,type:i.type,optional:!!i.optional}));case "array":return [{key:"[]",type:e.items,optional:false}];case "tuple":return e.elements.map((a,i)=>({key:String(i),type:a,optional:false}));case "union":case "intersection":{if(t.has(e))return [];t.add(e);let a=[],i=new Set;for(let u of e.of)for(let l of pe(u,n,t,r))i.has(l.key)||(i.add(l.key),a.push(l));return t.delete(e),a}default:return []}}export{q as $,mn as A,Sn as B,$ as C,M as D,P as E,D as F,ze as G,vn as H,bn as I,yt as J,St as K,be as L,qe as M,Pn as N,On as O,En as P,oe as Q,Mn as R,Qe as S,b as T,Pt as U,Ot as V,ke as W,Rt as X,k as Y,Nt as Z,Bt as _,Gn as a,le as aa,Jn as b,v as ba,Zn as c,Gt as ca,me as d,Kn as da,Xn as e,Zt as ea,et as f,nr as fa,L as g,Hn as ga,K as h,Oe as ha,de as i,ar as ia,nt as j,cr as ja,Q as k,J as ka,s as l,sr as la,g as m,H as n,Se as o,xe as p,ct as q,W as r,U as s,Fe as t,cn as u,sn as v,X as w,m as x,Ue as y,E as z};
|