@ifc-lite/mcp 0.7.2 → 0.9.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.
Files changed (42) hide show
  1. package/dist/cli.js +3 -1
  2. package/dist/cli.js.map +1 -1
  3. package/dist/context.d.ts +13 -0
  4. package/dist/context.d.ts.map +1 -1
  5. package/dist/context.js.map +1 -1
  6. package/dist/index.d.ts +1 -1
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +1 -0
  9. package/dist/index.js.map +1 -1
  10. package/dist/server.d.ts +7 -0
  11. package/dist/server.d.ts.map +1 -1
  12. package/dist/server.js +21 -4
  13. package/dist/server.js.map +1 -1
  14. package/dist/tools/index.d.ts +3 -0
  15. package/dist/tools/index.d.ts.map +1 -1
  16. package/dist/tools/index.js +6 -0
  17. package/dist/tools/index.js.map +1 -1
  18. package/dist/tools/layer-access.d.ts +18 -0
  19. package/dist/tools/layer-access.d.ts.map +1 -0
  20. package/dist/tools/layer-access.js +91 -0
  21. package/dist/tools/layer-access.js.map +1 -0
  22. package/dist/tools/layer-ops.d.ts +52 -0
  23. package/dist/tools/layer-ops.d.ts.map +1 -0
  24. package/dist/tools/layer-ops.js +130 -0
  25. package/dist/tools/layer-ops.js.map +1 -0
  26. package/dist/tools/layer-review.d.ts +3 -0
  27. package/dist/tools/layer-review.d.ts.map +1 -0
  28. package/dist/tools/layer-review.js +400 -0
  29. package/dist/tools/layer-review.js.map +1 -0
  30. package/dist/tools/layer-store.d.ts +112 -0
  31. package/dist/tools/layer-store.d.ts.map +1 -0
  32. package/dist/tools/layer-store.js +271 -0
  33. package/dist/tools/layer-store.js.map +1 -0
  34. package/dist/tools/layer.d.ts +19 -0
  35. package/dist/tools/layer.d.ts.map +1 -0
  36. package/dist/tools/layer.js +257 -0
  37. package/dist/tools/layer.js.map +1 -0
  38. package/dist/transport/http.d.ts +11 -1
  39. package/dist/transport/http.d.ts.map +1 -1
  40. package/dist/transport/http.js +38 -3
  41. package/dist/transport/http.js.map +1 -1
  42. package/package.json +14 -9
@@ -0,0 +1,112 @@
1
+ import * as Y from 'yjs';
2
+ import type { ScopeClaim } from '@ifc-lite/extensions';
3
+ import type { IfcxFile, ProvenanceBase } from '@ifc-lite/ifcx';
4
+ export interface DraftLayer {
5
+ id: string;
6
+ doc: Y.Doc;
7
+ /** `Y.encodeStateAsUpdate(doc)` at creation — what `publishLayer` diffs against. */
8
+ baseline: Uint8Array;
9
+ base: ProvenanceBase | null;
10
+ /** Resolved base stack (weakest first) for merge previews; may be []. */
11
+ baseFiles: IfcxFile[];
12
+ intent: string;
13
+ claims: ScopeClaim[];
14
+ rawClaims: string[];
15
+ session: string;
16
+ /** Creating principal; undefined = unauthenticated/local → accessible to anyone in the workspace. */
17
+ owner?: string;
18
+ createdAt: string;
19
+ }
20
+ export interface ReviewDecision {
21
+ entity: string;
22
+ componentKey?: string;
23
+ decision: 'accept' | 'reject';
24
+ comment?: string;
25
+ }
26
+ export type ReviewStatus = 'open' | 'changes-requested' | 'approved';
27
+ /**
28
+ * A review comment as a BCF-shaped topic bound to (review, entity,
29
+ * componentKey?) per 08-review.md §8.6 — same shape the registry stores,
30
+ * so agents read one structure in both places.
31
+ */
32
+ export interface ReviewTopic {
33
+ guid: string;
34
+ title: string;
35
+ description?: string;
36
+ entity: string;
37
+ componentKey?: string;
38
+ author?: string;
39
+ createdAt: string;
40
+ }
41
+ export interface LayerReview {
42
+ id: string;
43
+ layerId: string;
44
+ into: string;
45
+ reviewers: string[];
46
+ status: ReviewStatus;
47
+ feedback: ReviewDecision[];
48
+ /** BCF-shaped review comments (8.6); empty until someone comments. */
49
+ topics: ReviewTopic[];
50
+ /** Follow-up draft ids opened via `respond_to_review`. */
51
+ responses: string[];
52
+ /** Requesting principal; undefined = unauthenticated/local → accessible to anyone in the workspace. */
53
+ owner?: string;
54
+ }
55
+ export interface LayerWorkspace {
56
+ drafts: Map<string, DraftLayer>;
57
+ layers: Map<string, IfcxFile>;
58
+ refs: Map<string, string[]>;
59
+ reviews: Map<string, LayerReview>;
60
+ }
61
+ export declare function createLayerWorkspace(): LayerWorkspace;
62
+ export declare function getLayerWorkspace(sessionId?: string): LayerWorkspace;
63
+ /**
64
+ * Drop a session's draft space when the transport session ends. Layers,
65
+ * refs, and reviews deliberately survive — they are the published shared
66
+ * record other sessions keep building on.
67
+ */
68
+ export declare function disposeLayerWorkspace(sessionId: string): void;
69
+ /** Test hook: drop all draft spaces and shared state; return a fresh local workspace. */
70
+ export declare function resetLayerWorkspace(): LayerWorkspace;
71
+ /** Files for a ref, erroring on dangling layer ids (corrupt workspace). */
72
+ export declare function refLayerFiles(ws: LayerWorkspace, name: string): IfcxFile[];
73
+ export interface ResolvedBase {
74
+ base: ProvenanceBase | null;
75
+ files: IfcxFile[];
76
+ }
77
+ /** Resolve a base spec (ref name or layer id; absent → no base). */
78
+ export declare function resolveBase(ws: LayerWorkspace, ref?: string): ResolvedBase;
79
+ /**
80
+ * Resolve a manifest base against a ref's layer ids: a stack base matches
81
+ * a prefix stack hash, a layer base matches a prefix end (or a stored
82
+ * stray layer). Best effort — unknown bases resolve to [].
83
+ */
84
+ export declare function resolveAncestorFiles(ws: LayerWorkspace, base: ProvenanceBase | null, refIds: readonly string[]): IfcxFile[];
85
+ /**
86
+ * Resolve a manifest base by searching every ref's layer list — used when
87
+ * a tool gets a published layer without an explicit `into` ref, where an
88
+ * empty ref list could never reconstruct a stack-hash base.
89
+ */
90
+ export declare function resolveAncestorFilesAnyRef(ws: LayerWorkspace, base: ProvenanceBase | null): IfcxFile[];
91
+ /** Read the IfcClass code off the well-known class attribute, if present. */
92
+ export declare function ifcClassOfAttributes(attributes: Record<string, unknown> | undefined): string | undefined;
93
+ /**
94
+ * Fold an ordered layer stack (weakest first) into a draft Y.Doc.
95
+ *
96
+ * Unlike `seedFromIfcx` (whose `createEntity` is a no-op on existing
97
+ * paths), this applies later layers' opinions on top: nulls remove,
98
+ * tombstones delete, values overwrite.
99
+ */
100
+ export declare function seedDraftDoc(doc: Y.Doc, files: readonly IfcxFile[]): void;
101
+ export interface CreateDraftInit {
102
+ base: ProvenanceBase | null;
103
+ baseFiles: IfcxFile[];
104
+ intent: string;
105
+ claims: ScopeClaim[];
106
+ rawClaims: string[];
107
+ session?: string;
108
+ owner?: string;
109
+ }
110
+ /** Build, seed, baseline, and register a new draft. */
111
+ export declare function createDraft(ws: LayerWorkspace, init: CreateDraftInit): DraftLayer;
112
+ //# sourceMappingURL=layer-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layer-store.d.ts","sourceRoot":"","sources":["../../src/tools/layer-store.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAazB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAG/D,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC;IACX,oFAAoF;IACpF,QAAQ,EAAE,UAAU,CAAC;IACrB,IAAI,EAAE,cAAc,GAAG,IAAI,CAAC;IAC5B,yEAAyE;IACzE,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,qGAAqG;IACrG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,YAAY,GAAG,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AAG,UAAU,CAkBjF"}
@@ -0,0 +1,271 @@
1
+ /* This Source Code Form is subject to the terms of the Mozilla Public
2
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
+ /**
5
+ * In-memory draft / layer / review workspace backing the agent draft-layer
6
+ * tool family (docs/architecture/layer-prs/06-agents.md).
7
+ *
8
+ * Drafts are keyed by transport session id (#1030) and disposed with the
9
+ * session; published layers, refs, and reviews are process-shared so
10
+ * other principals' sessions can build on and review them. Tests call
11
+ * `resetLayerWorkspace()` for isolation. A draft is a CRDT session (Y.Doc
12
+ * seeded with the resolved base stack) plus the baseline snapshot
13
+ * `publishLayer` diffs against.
14
+ */
15
+ import { randomUUID } from 'node:crypto';
16
+ import * as Y from 'yjs';
17
+ import { createCollabDoc, createEntity, deleteAttribute, deleteEntity, hasEntity, removeChild, removeInherit, setAttribute, setChild, setInherit, } from '@ifc-lite/collab';
18
+ import { IFCLITE_ATTR, ATTR, computeStackHash } from '@ifc-lite/ifcx';
19
+ import { ToolErrorCode, ToolExecutionError } from '../errors.js';
20
+ export function createLayerWorkspace() {
21
+ return {
22
+ drafts: new Map(),
23
+ layers: new Map(),
24
+ refs: new Map([['main', []]]),
25
+ reviews: new Map(),
26
+ };
27
+ }
28
+ // Storage model (#1030). Drafts are private CRDT sessions, so they are
29
+ // the per-transport-session state: keyed by session id, disposed with the
30
+ // session. Published layers, refs, and reviews are the collaboration
31
+ // surface — content-addressed immutable layers, shared branch heads, and
32
+ // reviews that *other* principals must be able to act on from their own
33
+ // HTTP sessions (each principal necessarily holds a different session,
34
+ // since the transport rejects scope mismatches) — so they live in one
35
+ // process-wide store, gated by the visibility checks below. stdio /
36
+ // in-process transports carry no session id and use the local draft
37
+ // space — registry-less local mode (10-registry.md); durable,
38
+ // registry-backed persistence stays future work.
39
+ const shared = {
40
+ layers: new Map(),
41
+ refs: new Map([['main', []]]),
42
+ reviews: new Map(),
43
+ };
44
+ const draftSpaces = new Map();
45
+ /** Draft-space key for transports without a session id (stdio, in-process, tests). */
46
+ const LOCAL_WORKSPACE_KEY = 'local';
47
+ export function getLayerWorkspace(sessionId) {
48
+ const key = sessionId ?? LOCAL_WORKSPACE_KEY;
49
+ let drafts = draftSpaces.get(key);
50
+ if (!drafts) {
51
+ drafts = new Map();
52
+ draftSpaces.set(key, drafts);
53
+ }
54
+ return { drafts, layers: shared.layers, refs: shared.refs, reviews: shared.reviews };
55
+ }
56
+ /** Drafts hold live Y.Docs — destroy them or the CRDT state lingers. */
57
+ function destroyDrafts(drafts) {
58
+ for (const draft of drafts.values())
59
+ draft.doc.destroy();
60
+ }
61
+ /**
62
+ * Drop a session's draft space when the transport session ends. Layers,
63
+ * refs, and reviews deliberately survive — they are the published shared
64
+ * record other sessions keep building on.
65
+ */
66
+ export function disposeLayerWorkspace(sessionId) {
67
+ const drafts = draftSpaces.get(sessionId);
68
+ if (!drafts)
69
+ return;
70
+ destroyDrafts(drafts);
71
+ draftSpaces.delete(sessionId);
72
+ }
73
+ /** Test hook: drop all draft spaces and shared state; return a fresh local workspace. */
74
+ export function resetLayerWorkspace() {
75
+ for (const drafts of draftSpaces.values())
76
+ destroyDrafts(drafts);
77
+ draftSpaces.clear();
78
+ shared.layers.clear();
79
+ shared.reviews.clear();
80
+ shared.refs.clear();
81
+ shared.refs.set('main', []);
82
+ return getLayerWorkspace();
83
+ }
84
+ /** Files for a ref, erroring on dangling layer ids (corrupt workspace). */
85
+ export function refLayerFiles(ws, name) {
86
+ const ids = ws.refs.get(name);
87
+ if (!ids) {
88
+ throw new ToolExecutionError({
89
+ code: ToolErrorCode.ENTITY_NOT_FOUND,
90
+ message: `Unknown ref '${name}'.`,
91
+ details: { refs: Array.from(ws.refs.keys()) },
92
+ });
93
+ }
94
+ return ids.map((id) => {
95
+ const file = ws.layers.get(id);
96
+ if (!file) {
97
+ throw new ToolExecutionError({
98
+ code: ToolErrorCode.INTERNAL_ERROR,
99
+ message: `Ref '${name}' points at unknown layer ${id}.`,
100
+ });
101
+ }
102
+ return file;
103
+ });
104
+ }
105
+ /** Resolve a base spec (ref name or layer id; absent → no base). */
106
+ export function resolveBase(ws, ref) {
107
+ if (ref === undefined)
108
+ return { base: null, files: [] };
109
+ if (ws.refs.has(ref)) {
110
+ const ids = ws.refs.get(ref) ?? [];
111
+ const files = refLayerFiles(ws, ref);
112
+ return {
113
+ base: ids.length > 0 ? { kind: 'stack', id: computeStackHash(ids) } : null,
114
+ files,
115
+ };
116
+ }
117
+ const layer = ws.layers.get(ref);
118
+ if (layer) {
119
+ // Seed from the full ancestor stack when the layer sits inside a ref
120
+ // history — a lone delta would lose all earlier state and put drafts
121
+ // on the wrong baseline for previews and merge planning.
122
+ const base = { kind: 'layer', id: ref };
123
+ const files = resolveAncestorFilesAnyRef(ws, base);
124
+ return { base, files: files.length > 0 ? files : [layer] };
125
+ }
126
+ throw new ToolExecutionError({
127
+ code: ToolErrorCode.ENTITY_NOT_FOUND,
128
+ message: `Unknown base '${ref}' — not a ref name or published layer id.`,
129
+ details: { refs: Array.from(ws.refs.keys()) },
130
+ });
131
+ }
132
+ /**
133
+ * Resolve a manifest base against a ref's layer ids: a stack base matches
134
+ * a prefix stack hash, a layer base matches a prefix end (or a stored
135
+ * stray layer). Best effort — unknown bases resolve to [].
136
+ */
137
+ export function resolveAncestorFiles(ws, base, refIds) {
138
+ if (!base)
139
+ return [];
140
+ if (base.kind === 'stack') {
141
+ for (let i = 0; i <= refIds.length; i += 1) {
142
+ if (computeStackHash(refIds.slice(0, i)) === base.id) {
143
+ return refIds.slice(0, i).map((id) => ws.layers.get(id)).filter((f) => f !== undefined);
144
+ }
145
+ }
146
+ return [];
147
+ }
148
+ const idx = refIds.indexOf(base.id);
149
+ if (idx !== -1) {
150
+ return refIds.slice(0, idx + 1).map((id) => ws.layers.get(id)).filter((f) => f !== undefined);
151
+ }
152
+ const single = ws.layers.get(base.id);
153
+ return single ? [single] : [];
154
+ }
155
+ /**
156
+ * Resolve a manifest base by searching every ref's layer list — used when
157
+ * a tool gets a published layer without an explicit `into` ref, where an
158
+ * empty ref list could never reconstruct a stack-hash base.
159
+ */
160
+ export function resolveAncestorFilesAnyRef(ws, base) {
161
+ if (!base)
162
+ return [];
163
+ for (const refIds of ws.refs.values()) {
164
+ const files = resolveAncestorFiles(ws, base, refIds);
165
+ if (files.length > 0)
166
+ return files;
167
+ }
168
+ // Fall back to the lone-layer case resolveAncestorFiles also covers.
169
+ return resolveAncestorFiles(ws, base, []);
170
+ }
171
+ /** Read the IfcClass code off the well-known class attribute, if present. */
172
+ export function ifcClassOfAttributes(attributes) {
173
+ const cls = attributes?.[ATTR.CLASS];
174
+ if (cls && typeof cls === 'object' && 'code' in cls) {
175
+ const code = cls.code;
176
+ if (typeof code === 'string')
177
+ return code;
178
+ }
179
+ return undefined;
180
+ }
181
+ /**
182
+ * Fold an ordered layer stack (weakest first) into a draft Y.Doc.
183
+ *
184
+ * Unlike `seedFromIfcx` (whose `createEntity` is a no-op on existing
185
+ * paths), this applies later layers' opinions on top: nulls remove,
186
+ * tombstones delete, values overwrite.
187
+ */
188
+ export function seedDraftDoc(doc, files) {
189
+ doc.transact(() => {
190
+ // Composition resolves `ifclite::deleted` like any other attribute —
191
+ // the strongest (latest) opinion wins after ALL layers merge — so
192
+ // deletion cannot run per-layer: base → delete → resurrect must seed
193
+ // the entity with its base state, exactly as composition reveals it.
194
+ const tombstoned = new Map();
195
+ for (const file of files) {
196
+ for (const node of file.data) {
197
+ const opinion = node.attributes?.[IFCLITE_ATTR.DELETED];
198
+ if (typeof opinion === 'boolean')
199
+ tombstoned.set(node.path, opinion);
200
+ applyNode(doc, file, node);
201
+ }
202
+ }
203
+ for (const [path, deleted] of tombstoned) {
204
+ if (deleted)
205
+ deleteEntity(doc, path);
206
+ }
207
+ });
208
+ }
209
+ function applyNode(doc, file, node) {
210
+ if (!hasEntity(doc, node.path)) {
211
+ const ifcClass = ifcClassOfAttributes(node.attributes);
212
+ const inherits = {};
213
+ for (const [role, target] of Object.entries(node.inherits ?? {})) {
214
+ if (typeof target === 'string')
215
+ inherits[role] = target;
216
+ }
217
+ createEntity(doc, node.path, {
218
+ ifcClass,
219
+ inherits,
220
+ meta: {
221
+ ifcClass,
222
+ createdAt: file.header.timestamp,
223
+ createdBy: file.header.author,
224
+ },
225
+ });
226
+ }
227
+ for (const [key, value] of Object.entries(node.attributes ?? {})) {
228
+ if (key === IFCLITE_ATTR.DELETED)
229
+ continue;
230
+ if (value === null)
231
+ deleteAttribute(doc, node.path, key);
232
+ else
233
+ setAttribute(doc, node.path, key, value);
234
+ }
235
+ for (const [role, child] of Object.entries(node.children ?? {})) {
236
+ if (child === null)
237
+ removeChild(doc, node.path, role);
238
+ else
239
+ setChild(doc, node.path, role, child);
240
+ }
241
+ // Inherits deltas must replay on existing entities too — `createEntity`
242
+ // only applies them on first creation, but later base layers may add,
243
+ // retarget, or null out inheritance opinions.
244
+ for (const [role, target] of Object.entries(node.inherits ?? {})) {
245
+ if (target === null)
246
+ removeInherit(doc, node.path, role);
247
+ else if (typeof target === 'string')
248
+ setInherit(doc, node.path, role, target);
249
+ }
250
+ }
251
+ /** Build, seed, baseline, and register a new draft. */
252
+ export function createDraft(ws, init) {
253
+ const doc = createCollabDoc({ gc: false });
254
+ seedDraftDoc(doc, init.baseFiles);
255
+ const draft = {
256
+ id: randomUUID(),
257
+ doc,
258
+ baseline: Y.encodeStateAsUpdate(doc),
259
+ base: init.base,
260
+ baseFiles: init.baseFiles,
261
+ intent: init.intent,
262
+ claims: init.claims,
263
+ rawClaims: init.rawClaims,
264
+ session: init.session ?? randomUUID(),
265
+ owner: init.owner,
266
+ createdAt: new Date().toISOString(),
267
+ };
268
+ ws.drafts.set(draft.id, draft);
269
+ return draft;
270
+ }
271
+ //# sourceMappingURL=layer-store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layer-store.js","sourceRoot":"","sources":["../../src/tools/layer-store.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D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E;QACrC,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACpC,CAAC;IACF,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;IAC/B,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Agent draft-layer lifecycle tools (spec 06-agents.md §6.2/§6.3):
3
+ *
4
+ * create_draft_layer → n × draft_apply_ops → publish_layer
5
+ *
6
+ * Every mutation lands in a draft (a CRDT session bound to a base);
7
+ * publishing freezes it into an immutable, content-addressed,
8
+ * provenance-stamped layer. Scope claims are enforced twice: per op at
9
+ * write time (before the Y.Doc is touched) and re-verified against the
10
+ * frozen layer at publish time (`scope_verified` + `mismatches`).
11
+ */
12
+ import { publishLayer } from '@ifc-lite/collab';
13
+ import type { Tool } from './types.js';
14
+ import type { ToolContext } from '../context.js';
15
+ import type { DraftLayer } from './layer-store.js';
16
+ /** Freeze a draft via `publishLayer` without registering the result (previews). */
17
+ export declare function publishDraftFile(draft: DraftLayer, ctx: ToolContext): ReturnType<typeof publishLayer>;
18
+ export declare const draftLayerTools: Tool[];
19
+ //# sourceMappingURL=layer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layer.d.ts","sourceRoot":"","sources":["../../src/tools/layer.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AAEH,OAAO,EAML,YAAY,EAEb,MAAM,kBAAkB,CAAC;AAI1B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AASjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAiNnD,mFAAmF;AACnF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,WAAW,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAarG;AAyCD,eAAO,MAAM,eAAe,EAAE,IAAI,EAAwD,CAAC"}