@prisma/orm-family-sql 8.0.0-rc.4-dev.12 → 8.0.0-rc.4-dev.13

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/README.md CHANGED
@@ -12,7 +12,7 @@ Applications receive it as an exact-pinned dependency of a SQL facade (`@prisma/
12
12
  | `/schema-ir` | SQL schema intermediate representation |
13
13
  | `/contract-psl`, `/contract-ts` | PSL and TypeScript contract authoring for SQL |
14
14
  | `/contract-emitter` | SQL contract emission |
15
- | `/relational-core`, `/lane-query-builder`, `/builder` | query lanes, relational AST, SQL builder |
15
+ | `/relational-core`, `/builder` | query lanes, relational AST, SQL builder |
16
16
  | `/runtime` | SQL runtime |
17
17
  | `/orm-client` | the fluent, type-safe ORM client over SQL model collections |
18
18
  | `/family` | the family pack: control, migration, diff, IR, verification |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/orm-family-sql",
3
- "version": "8.0.0-rc.4-dev.12",
3
+ "version": "8.0.0-rc.4-dev.13",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -9,8 +9,8 @@
9
9
  "dist"
10
10
  ],
11
11
  "dependencies": {
12
- "@prisma/orm-framework": "8.0.0-rc.4-dev.12",
13
- "@prisma/orm-toolchain": "8.0.0-rc.4-dev.12",
12
+ "@prisma/orm-framework": "8.0.0-rc.4-dev.13",
13
+ "@prisma/orm-toolchain": "8.0.0-rc.4-dev.13",
14
14
  "@standard-schema/spec": "^1.1.0",
15
15
  "arktype": "^2.2.2",
16
16
  "pathe": "^2.0.3",
@@ -18,21 +18,20 @@
18
18
  "ts-toolbelt": "^9.6.0"
19
19
  },
20
20
  "devDependencies": {
21
- "@internal/family-sql": "8.0.0-rc.4-dev.12",
22
- "@internal/sql-builder": "8.0.0-rc.4-dev.12",
23
- "@internal/sql-contract": "8.0.0-rc.4-dev.12",
24
- "@internal/sql-contract-emitter": "8.0.0-rc.4-dev.12",
25
- "@internal/sql-contract-psl": "8.0.0-rc.4-dev.12",
26
- "@internal/sql-contract-ts": "8.0.0-rc.4-dev.12",
27
- "@internal/sql-errors": "8.0.0-rc.4-dev.12",
28
- "@internal/sql-lane-query-builder": "8.0.0-rc.4-dev.12",
29
- "@internal/sql-operations": "8.0.0-rc.4-dev.12",
30
- "@internal/sql-orm-client": "8.0.0-rc.4-dev.12",
31
- "@internal/sql-relational-core": "8.0.0-rc.4-dev.12",
32
- "@internal/sql-runtime": "8.0.0-rc.4-dev.12",
33
- "@internal/sql-schema-ir": "8.0.0-rc.4-dev.12",
34
- "@repo/tsconfig": "8.0.0-rc.4-dev.12",
35
- "@repo/tsdown": "8.0.0-rc.4-dev.12",
21
+ "@internal/family-sql": "8.0.0-rc.4-dev.13",
22
+ "@internal/sql-builder": "8.0.0-rc.4-dev.13",
23
+ "@internal/sql-contract": "8.0.0-rc.4-dev.13",
24
+ "@internal/sql-contract-emitter": "8.0.0-rc.4-dev.13",
25
+ "@internal/sql-contract-psl": "8.0.0-rc.4-dev.13",
26
+ "@internal/sql-contract-ts": "8.0.0-rc.4-dev.13",
27
+ "@internal/sql-errors": "8.0.0-rc.4-dev.13",
28
+ "@internal/sql-operations": "8.0.0-rc.4-dev.13",
29
+ "@internal/sql-orm-client": "8.0.0-rc.4-dev.13",
30
+ "@internal/sql-relational-core": "8.0.0-rc.4-dev.13",
31
+ "@internal/sql-runtime": "8.0.0-rc.4-dev.13",
32
+ "@internal/sql-schema-ir": "8.0.0-rc.4-dev.13",
33
+ "@repo/tsconfig": "8.0.0-rc.4-dev.13",
34
+ "@repo/tsdown": "8.0.0-rc.4-dev.13",
36
35
  "tsdown": "0.22.14",
37
36
  "typescript": "5.9.3"
38
37
  },
@@ -82,7 +81,6 @@
82
81
  "./family/psl-infer": "./dist/family__psl-infer.mjs",
83
82
  "./family/runtime": "./dist/family__runtime.mjs",
84
83
  "./family/verify": "./dist/family__verify.mjs",
85
- "./lane-query-builder": "./dist/lane-query-builder.mjs",
86
84
  "./operations": "./dist/operations.mjs",
87
85
  "./orm-client": "./dist/orm-client.mjs",
88
86
  "./relational-core": "./dist/relational-core.mjs",
@@ -1,236 +0,0 @@
1
- import { r as StorageTable } from "./storage-table-DSeWszOL-CI-cItEK.mjs";
2
- import { c as SqlStorage } from "./sql-storage-8LqxeLAY-DH4DdUXx.mjs";
3
- import { h as ExtractStorageColumnTypes } from "./types-BDUG29Df-LE85dIXP.mjs";
4
- import { n as StorageColumnTypeAcrossNamespaces } from "./types-UcHa2cTe.mjs";
5
- import { Brand, Contract, StorageHashBase } from "@prisma/orm-framework/contract/types";
6
- import "@standard-schema/spec";
7
- //#region ../../../2-sql/4-lanes/query-builder/dist/index.d.mts
8
- //#region src/type-errors.d.ts
9
- /**
10
- * An error message type, prefixed with `[error]`.
11
- *
12
- * @template TMessage The error message.
13
- */
14
- type ErrorMessage = `[error] ${string}`;
15
- /**
16
- * An error type indicating that the previous function call had bad input.
17
- * To be used as a return type.
18
- *
19
- * @template TMessage The error message.
20
- */
21
- type PreviousFunctionReceivedBadInputError<TMessage extends ErrorMessage> = Brand<TMessage>;
22
- //#endregion
23
- //#region src/column-reference.d.ts
24
- /**
25
- * An object representing a reference to a column in a table in the database.
26
- *
27
- * @template TColumnName The name of the column.
28
- * @template TTableName The name of the table this column belongs to.
29
- * @template THash The contract storage hash belonging to the database this column is in.
30
- */
31
- type ColumnReference<TColumnName extends string = string, TTableName extends string = string, THash extends StorageHashBase<string> = StorageHashBase<string>> = {
32
- readonly '~name': TColumnName;
33
- readonly '~table': TTableName;
34
- } & Brand<'[info] this column reference belongs to the following table reference:', `${TTableName}@${THash}`>;
35
- /**
36
- * An error type indicating that the provided column reference is out of the contract's scope.
37
- * To be used in reference creators, e.g. `createRef()`.
38
- *
39
- * @template TMessage The error message.
40
- */
41
- type ColumnReferenceOutOfContractError<TMessage extends ErrorMessage> = Brand<TMessage>;
42
- /**
43
- * A type representing a reference to all columns in the current query context.
44
- */
45
- type Asterisk = {
46
- readonly '~name': '*';
47
- readonly '~table': null;
48
- } & Brand<'[info] referencing all columns in the current query context'>;
49
- /**
50
- * A type representing a reference to all columns in a specific table.
51
- *
52
- * @template TTableName The name of the table whose columns are being referenced.
53
- * @template THash The contract storage hash belonging to the database this column is in.
54
- */
55
- type TableAsterisk<TTableName extends string = string, THash extends StorageHashBase<string> = StorageHashBase<string>> = {
56
- readonly '~name': '*';
57
- readonly '~table': TTableName;
58
- } & Brand<'[info] referencing all columns that belong to the following table reference:', `${TTableName}@${THash}`>;
59
- //#endregion
60
- //#region ../sql-builder/dist/db-C_ktwEsR.d.mts
61
- //#endregion
62
- //#region src/types/db.d.ts
63
- type CapabilitiesBase = Record<string, Record<string, boolean>>;
64
- type NamespaceEntries = Readonly<Record<string, Readonly<Record<string, unknown>>>>;
65
- type NamespaceDomain = Readonly<Record<string, {
66
- readonly models: Readonly<Record<string, unknown>>;
67
- }>>;
68
- type TableProxyContract = {
69
- readonly domain: {
70
- readonly namespaces: NamespaceDomain;
71
- };
72
- readonly storage: {
73
- readonly namespaces: Readonly<Record<string, {
74
- readonly entries: NamespaceEntries;
75
- }>>;
76
- };
77
- readonly capabilities: CapabilitiesBase;
78
- };
79
- type TablesInNamespace<NS extends {
80
- readonly entries: NamespaceEntries;
81
- }> = NS['entries']['table'] extends Readonly<Record<string, StorageTable>> ? NS['entries']['table'] : Readonly<Record<string, StorageTable>>;
82
- type UnboundTables$1<C extends TableProxyContract> = { readonly [Name in TableNamesAcrossNamespaces<C>]: TableInAnyNamespace<C, Name>; };
83
- type TableNamesAcrossNamespaces<C extends TableProxyContract> = { [NSId in keyof C['storage']['namespaces']]: keyof TablesInNamespace<C['storage']['namespaces'][NSId]> & string; }[keyof C['storage']['namespaces']];
84
- type TableInAnyNamespace<C extends TableProxyContract, Name extends string> = { [NSId in keyof C['storage']['namespaces']]: Name extends keyof TablesInNamespace<C['storage']['namespaces'][NSId]> ? TablesInNamespace<C['storage']['namespaces'][NSId]>[Name] : never; }[keyof C['storage']['namespaces']];
85
- //#endregion
86
- //#region src/type-atoms.d.ts
87
- /**
88
- * A utility type to drain outer generics from a type. A compiler micro-optimization.
89
- *
90
- * @template TThing The type to drain.
91
- */
92
- type DrainOuterGeneric<TThing> = [TThing] extends [unknown] ? TThing : never;
93
- /**
94
- * A utility type to ensure that exactly one property of an object type is present.
95
- *
96
- * @template TObject The object type to check.
97
- */
98
- type ExactlyOneProperty<TObject extends object> = { [K in keyof TObject]-?: IsNever<Exclude<keyof TObject, K>>; }[keyof TObject];
99
- /**
100
- * A utility type to merge two objects.
101
- *
102
- * @template TObject0 The first object.
103
- * @template TObject1 The second object.
104
- */
105
- type MergeObjects<TObject0 extends object, TObject1 extends object> = DrainOuterGeneric<IsNever<TObject0> extends true ? TObject1 : { readonly [K in keyof TObject0 | keyof TObject1]: K extends keyof TObject1 ? TObject1[K] : K extends keyof TObject0 ? TObject0[K] : never; }>;
106
- /**
107
- * A utility type to determine if a type is `never`.
108
- *
109
- * @template TThing The type to check.
110
- */
111
- type IsNever<TThing> = [TThing] extends [never] ? true : false;
112
- /**
113
- * A utility type to simplify an object type for better readability.
114
- *
115
- * @template TObject The object type to simplify.
116
- */
117
- type Simplify<TObject extends object> = DrainOuterGeneric<{ [K in keyof TObject]: TObject[K]; } & {}>;
118
- //#endregion
119
- //#region src/selection.d.ts
120
- type UnboundTables<TContract extends Contract<SqlStorage>> = UnboundTables$1<TContract & TableProxyContract>;
121
- type ExtractOutputType<TContract extends Contract<SqlStorage>, TTableName extends keyof UnboundTables<TContract> & string, TColumnName extends keyof UnboundTables<TContract>[TTableName]['columns'] & string> = StorageColumnTypeAcrossNamespaces<ExtractStorageColumnTypes<TContract>, TTableName, TColumnName>;
122
- /**
123
- * A type representing a selection of columns in a SQL `select` query in the
124
- * most generic form.
125
- */
126
- type Selection = Record<string, SelectionValue<unknown, unknown>>;
127
- /**
128
- * A type representing the value of a selected column in a SQL `select` query.
129
- *
130
- * @template TOutput The output type of the selected column.
131
- * @template TDatatype The database-side datatype of the selected column.
132
- */
133
- interface SelectionValue<TOutput, TDatatype extends string | unknown = unknown> {
134
- readonly '~datatype': TDatatype;
135
- readonly '~output': TOutput;
136
- }
137
- /**
138
- * A utility type to convert a table's columns into a {@link Selection}.
139
- *
140
- * @template TContract The contract that describes the database.
141
- * @template TTableName The name of the table whose columns will be included in the selection.
142
- */
143
- type TableToSelection<TContract extends Contract<SqlStorage>, TTableName extends keyof UnboundTables<TContract> & string> = DrainOuterGeneric<{ readonly [ColumnName in keyof UnboundTables<TContract>[TTableName]['columns'] & string]: SelectionValue<ExtractOutputType<TContract, TTableName, ColumnName>, UnboundTables<TContract>[TTableName]['columns'][ColumnName]['nativeType']>; }>;
144
- //#endregion
145
- //#region src/table-reference.d.ts
146
- /**
147
- * An object representing a reference to a table in the database.
148
- *
149
- * @template TName The name of the table. `string` is all tables, a union of string literals is a set of specific tables, a single string literal is a specific table.
150
- * @template THash The contract storage hash belonging to the database this table is in.
151
- */
152
- type TableReference<TName extends string = string, THash extends StorageHashBase<string> = StorageHashBase<string>> = {
153
- readonly '~name': TName;
154
- } & Brand<'[info] this table reference belongs to the contract with the following storage hash:', THash>;
155
- /**
156
- * An error type indicating that the provided table reference is out of the contract's scope.
157
- * To be used in reference creators, e.g. `createRef()`.
158
- *
159
- * @template TMessage The error message.
160
- */
161
- type TableReferenceOutOfContractError<TMessage extends ErrorMessage> = Brand<TMessage>;
162
- /**
163
- * An error type indicating that the provided table reference is too wide.
164
- * To be used as a `never` alternative in conditional types.
165
- *
166
- * @template TMessage The error message.
167
- */
168
- type TableReferenceTooWideError<TMessage extends ErrorMessage> = Brand<TMessage>;
169
- //#endregion
170
- //#region src/ref.d.ts
171
- /**
172
- * A fluent API representing references to tables and columns in a SQL contract.
173
- *
174
- * @template TContract The contract that describes the database.
175
- */
176
- type Ref<TContract extends Contract<SqlStorage>> = { readonly [TableName in keyof UnboundTables<TContract> & string]: TableReference<TableName, TContract['storage']['storageHash']> & { readonly [ColumnName in Exclude<keyof UnboundTables<TContract>[TableName]['columns'], keyof TableReference> & string]: ColumnReference<ColumnName, TableName, TContract['storage']['storageHash']>; } & {
177
- readonly ['*']: TableAsterisk<TableName, TContract['storage']['storageHash']>;
178
- } & Record<PropertyKey, ColumnReferenceOutOfContractError<`[error] reference to a non-existing column in the '${TableName}' table`>>; } & {
179
- readonly ['*']: Asterisk;
180
- } & Record<PropertyKey, TableReferenceOutOfContractError<`[error] reference to a non-existing table in the contract`>>;
181
- /**
182
- * Creates a reference object for the given SQL contract.
183
- *
184
- * @template TContract The contract that describes the database.
185
- */
186
- declare function createRef<TContract extends Contract<SqlStorage>>(_contract: TContract): Ref<TContract>;
187
- //#endregion
188
- //#region src/select-builder.d.ts
189
- /**
190
- * A builder for SQL `select` queries.
191
- *
192
- * @template TContract The contract that describes the database.
193
- * @template TTables The tables involved in the current `select` query.
194
- * @template TSelection The current selection of the `select` query.
195
- */
196
- declare class SelectBuilder<TContract extends Contract<SqlStorage>, TTables extends UnboundTables<Contract<SqlStorage>>, TSelection extends Selection = never> {
197
- #private;
198
- constructor(contract: TContract);
199
- select(asterisk: Asterisk): ExactlyOneProperty<TTables> extends true ? SelectBuilder<TContract, TTables, MergeObjects<TSelection, TableToSelection<TContract, keyof TTables & string>>> : PreviousFunctionReceivedBadInputError<'[error] selecting all columns via `*` results in ambiguity when multiple tables are involved in the query'>;
200
- select<TTableName extends keyof TTables & string>(asterisk: TableAsterisk<TTableName, TContract['storage']['storageHash']>): SelectBuilder<TContract, TTables, MergeObjects<TSelection, TableToSelection<TContract, TTableName>>>;
201
- select(arg: never): PreviousFunctionReceivedBadInputError<'[error] invalid input in previous `select()` call'>;
202
- build(): IsNever<TSelection> extends true ? never : Simplify<TSelection>;
203
- }
204
- //#endregion
205
- //#region src/root.d.ts
206
- /**
207
- * The root of all builder.
208
- *
209
- * @template TContract The contract that describes the database.
210
- */
211
- declare class Root<TContract extends Contract<SqlStorage>> {
212
- #private;
213
- constructor(contract: TContract);
214
- /**
215
- * SQL's `from` clause, where all `select` queries actually start from.
216
- *
217
- * @param table The table to select from.
218
- */
219
- from(table: TableReference<never>): PreviousFunctionReceivedBadInputError<'[error] invalid table reference in previous `root.from()` call will probably cause runtime errors'>;
220
- /**
221
- * @template TName The name of the table to select from.
222
- */
223
- from<TName extends string>(table: string extends TName ? TableReferenceTooWideError<'[error] `root.from()` call received a table reference without a specific table name'> : TableReference<TName, TContract['storage']['storageHash']>): TName extends string ? SelectBuilder<TContract, Pick<UnboundTables<TContract>, TName>> : PreviousFunctionReceivedBadInputError<'[error] invalid table reference in previous `root.from()` call will probably cause runtime errors'>;
224
- from(table: TableReferenceTooWideError<'[error] `root.from()` call received a table reference without a specific table name'>): PreviousFunctionReceivedBadInputError<'[error] invalid table reference in previous `root.from()` call will probably cause runtime errors'>;
225
- }
226
- /**
227
- * Creates a new `Root` instance.
228
- */
229
- declare function createRoot(contract: never): PreviousFunctionReceivedBadInputError<'[error] root creation will likely fail at runtime given the passed contract is not valid or verified'>;
230
- /**
231
- * @template TContract The contract that describes the database.
232
- */
233
- declare function createRoot<TContract extends Contract<SqlStorage>>(contract: TContract): Root<TContract>;
234
- //#endregion
235
- export { type Asterisk, type ColumnReference, type ColumnReferenceOutOfContractError, type DrainOuterGeneric, type ErrorMessage, type ExactlyOneProperty, type ExtractOutputType, type IsNever, type MergeObjects, type PreviousFunctionReceivedBadInputError, type Ref, type Root, type SelectBuilder, type Selection, type SelectionValue, type Simplify, type TableAsterisk, type TableReference, type TableReferenceOutOfContractError, type TableReferenceTooWideError, type TableToSelection, createRef, createRoot };
236
- //# sourceMappingURL=lane-query-builder.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lane-query-builder.d.mts","names":[],"sources":["../../../../2-sql/4-lanes/query-builder/dist/index.d.mts"],"mappings":";;;;;;;;;;;;;KASK;;;;;;;KAOA,sCAAsC,iBAAiB,gBAAgB,MAAM;;;;;;;;;;KAU7E,gBAAgB,qCAAqC,oCAAoC,cAAc,0B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;iBAKjH,WAAW,kBAAkB;;;;iBAI7B,WAAW,kBAAkB,SAAS,aAAa,UAAU,YAAY,KAAK"}
@@ -1,67 +0,0 @@
1
- //#region ../../../2-sql/4-lanes/query-builder/dist/index.mjs
2
- /**
3
- * Creates a reference object for the given SQL contract.
4
- *
5
- * @template TContract The contract that describes the database.
6
- */
7
- function createRef(_contract) {
8
- return new Proxy({}, { get(_target, tableName) {
9
- if (tableName === "*") return Object.freeze({
10
- "~name": tableName,
11
- "~table": null
12
- });
13
- return new Proxy({}, { get(_target, columnName) {
14
- if (columnName === "~name") return tableName;
15
- return Object.freeze({
16
- "~name": columnName,
17
- "~table": tableName
18
- });
19
- } });
20
- } });
21
- }
22
- /**
23
- * A builder for SQL `select` queries.
24
- *
25
- * @template TContract The contract that describes the database.
26
- * @template TTables The tables involved in the current `select` query.
27
- * @template TSelection The current selection of the `select` query.
28
- */
29
- var SelectBuilder = class {
30
- #contract;
31
- constructor(contract) {
32
- this.#contract = contract;
33
- }
34
- select(..._args) {
35
- return this;
36
- }
37
- build() {
38
- return {};
39
- }
40
- };
41
- /**
42
- * The root of all builder.
43
- *
44
- * @template TContract The contract that describes the database.
45
- */
46
- var Root = class {
47
- #contract;
48
- constructor(contract) {
49
- this.#contract = contract;
50
- }
51
- /**
52
- * @internal
53
- */
54
- from(_table) {
55
- return new SelectBuilder(this.#contract);
56
- }
57
- };
58
- /**
59
- * @internal
60
- */
61
- function createRoot(contract) {
62
- return new Root(contract);
63
- }
64
- //#endregion
65
- export { createRef, createRoot };
66
-
67
- //# sourceMappingURL=lane-query-builder.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lane-query-builder.mjs","names":["#contract"],"sources":["../../../../2-sql/4-lanes/query-builder/dist/index.mjs"],"sourcesContent":["//#region src/ref.ts\n/**\n* Creates a reference object for the given SQL contract.\n*\n* @template TContract The contract that describes the database.\n*/\nfunction createRef(_contract) {\n\treturn new Proxy({}, { get(_target, tableName) {\n\t\tif (tableName === \"*\") return Object.freeze({\n\t\t\t\"~name\": tableName,\n\t\t\t\"~table\": null\n\t\t});\n\t\treturn new Proxy({}, { get(_target, columnName) {\n\t\t\tif (columnName === \"~name\") return tableName;\n\t\t\treturn Object.freeze({\n\t\t\t\t\"~name\": columnName,\n\t\t\t\t\"~table\": tableName\n\t\t\t});\n\t\t} });\n\t} });\n}\n//#endregion\n//#region src/select-builder.ts\n/**\n* A builder for SQL `select` queries.\n*\n* @template TContract The contract that describes the database.\n* @template TTables The tables involved in the current `select` query.\n* @template TSelection The current selection of the `select` query.\n*/\nvar SelectBuilder = class {\n\t#contract;\n\tconstructor(contract) {\n\t\tthis.#contract = contract;\n\t}\n\tselect(..._args) {\n\t\treturn this;\n\t}\n\tbuild() {\n\t\treturn {};\n\t}\n};\n//#endregion\n//#region src/root.ts\n/**\n* The root of all builder.\n*\n* @template TContract The contract that describes the database.\n*/\nvar Root = class {\n\t#contract;\n\tconstructor(contract) {\n\t\tthis.#contract = contract;\n\t}\n\t/**\n\t* @internal\n\t*/\n\tfrom(_table) {\n\t\treturn new SelectBuilder(this.#contract);\n\t}\n};\n/**\n* @internal\n*/\nfunction createRoot(contract) {\n\treturn new Root(contract);\n}\n//#endregion\nexport { createRef, createRoot };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;AAMA,SAAS,UAAU,WAAW;CAC7B,OAAO,IAAI,MAAM,CAAC,GAAG,EAAE,IAAI,SAAS,WAAW;EAC9C,IAAI,cAAc,KAAK,OAAO,OAAO,OAAO;GAC3C,SAAS;GACT,UAAU;EACX,CAAC;EACD,OAAO,IAAI,MAAM,CAAC,GAAG,EAAE,IAAI,SAAS,YAAY;GAC/C,IAAI,eAAe,SAAS,OAAO;GACnC,OAAO,OAAO,OAAO;IACpB,SAAS;IACT,UAAU;GACX,CAAC;EACF,EAAE,CAAC;CACJ,EAAE,CAAC;AACJ;;;;;;;;AAUA,IAAI,gBAAgB,MAAM;CACzB;CACA,YAAY,UAAU;EACrB,KAAKA,YAAY;CAClB;CACA,OAAO,GAAG,OAAO;EAChB,OAAO;CACR;CACA,QAAQ;EACP,OAAO,CAAC;CACT;AACD;;;;;;AAQA,IAAI,OAAO,MAAM;CAChB;CACA,YAAY,UAAU;EACrB,KAAKA,YAAY;CAClB;;;;CAIA,KAAK,QAAQ;EACZ,OAAO,IAAI,cAAc,KAAKA,SAAS;CACxC;AACD;;;;AAIA,SAAS,WAAW,UAAU;CAC7B,OAAO,IAAI,KAAK,QAAQ;AACzB"}