@agentshouse/mdruntime 0.1.0-c0bed82db8d73 → 0.1.0-c0c0511ef12ee
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 +3 -2
- package/dist/acceptance.d.ts +6 -0
- package/dist/acceptance.d.ts.map +1 -0
- package/dist/acceptance.js +385 -0
- package/dist/actions.d.ts +20 -0
- package/dist/actions.d.ts.map +1 -0
- package/dist/actions.js +251 -0
- package/dist/adapter.d.ts +107 -71
- package/dist/adapter.d.ts.map +1 -1
- package/dist/attached-model.d.ts +4 -10
- package/dist/attached-model.d.ts.map +1 -1
- package/dist/attached-model.js +35 -46
- package/dist/bootstrap.d.ts +16 -15
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +274 -131
- package/dist/cell.d.ts +6 -0
- package/dist/cell.d.ts.map +1 -0
- package/dist/cell.js +9 -0
- package/dist/chain.d.ts +2 -1
- package/dist/chain.d.ts.map +1 -1
- package/dist/change.d.ts +1 -0
- package/dist/change.d.ts.map +1 -1
- package/dist/change.js +4 -2
- package/dist/chat-types.d.ts +5 -0
- package/dist/chat-types.d.ts.map +1 -0
- package/dist/chat-types.js +13 -0
- package/dist/client.d.ts +25 -10
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +56 -7
- package/dist/collection.d.ts +7 -4
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +24 -19
- package/dist/compile.d.ts +6 -6
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +287 -297
- package/dist/connection.d.ts +6 -141
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +103 -5016
- package/dist/context.d.ts +2 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +7 -0
- package/dist/conversation-live.d.ts +136 -0
- package/dist/conversation-live.d.ts.map +1 -0
- package/dist/conversation-live.js +248 -0
- package/dist/conversation-row.d.ts +33 -0
- package/dist/conversation-row.d.ts.map +1 -0
- package/dist/conversation-row.js +53 -0
- package/dist/conversation.d.ts +41 -45
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +870 -786
- package/dist/discovery.d.ts +10 -0
- package/dist/discovery.d.ts.map +1 -0
- package/dist/discovery.js +175 -0
- package/dist/durability.d.ts +15 -1
- package/dist/durability.d.ts.map +1 -1
- package/dist/entry.d.ts +3 -2
- package/dist/entry.d.ts.map +1 -1
- package/dist/entry.js +18 -8
- package/dist/figures.d.ts +49 -0
- package/dist/figures.d.ts.map +1 -0
- package/dist/figures.js +197 -0
- package/dist/file.d.ts +2 -11
- package/dist/file.d.ts.map +1 -1
- package/dist/file.js +6 -4
- package/dist/holdings.d.ts +29 -0
- package/dist/holdings.d.ts.map +1 -0
- package/dist/holdings.js +95 -0
- package/dist/host.d.ts +4 -7
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +33 -33
- package/dist/identity.d.ts +0 -1
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +0 -3
- package/dist/index.d.ts +27 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -1
- package/dist/install.d.ts +56 -0
- package/dist/install.d.ts.map +1 -0
- package/dist/install.js +554 -0
- package/dist/job.d.ts +33 -0
- package/dist/job.d.ts.map +1 -0
- package/dist/job.js +54 -0
- package/dist/lifecycle.d.ts +7 -0
- package/dist/lifecycle.d.ts.map +1 -0
- package/dist/lifecycle.js +268 -0
- package/dist/listing.d.ts +53 -0
- package/dist/listing.d.ts.map +1 -0
- package/dist/listing.js +176 -0
- package/dist/live.d.ts +5 -4
- package/dist/live.d.ts.map +1 -1
- package/dist/live.js +61 -21
- package/dist/locks.d.ts +9 -0
- package/dist/locks.d.ts.map +1 -0
- package/dist/locks.js +61 -0
- package/dist/log.d.ts +1 -0
- package/dist/log.d.ts.map +1 -1
- package/dist/lost.d.ts +5 -0
- package/dist/lost.d.ts.map +1 -0
- package/dist/lost.js +61 -0
- package/dist/media.d.ts +8 -0
- package/dist/media.d.ts.map +1 -0
- package/dist/media.js +218 -0
- package/dist/memory.d.ts +13 -6
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +219 -91
- package/dist/messages.d.ts +27 -3
- package/dist/messages.d.ts.map +1 -1
- package/dist/messages.js +103 -31
- package/dist/model.d.ts +8 -10
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +6 -18
- package/dist/models.d.ts +14 -0
- package/dist/models.d.ts.map +1 -0
- package/dist/models.js +195 -0
- package/dist/observation.d.ts +3 -2
- package/dist/observation.d.ts.map +1 -1
- package/dist/observation.js +15 -15
- package/dist/opened.js +3 -3
- package/dist/opening.d.ts +4 -0
- package/dist/opening.d.ts.map +1 -0
- package/dist/opening.js +57 -0
- package/dist/outcome.d.ts +17 -6
- package/dist/outcome.d.ts.map +1 -1
- package/dist/outcome.js +19 -2
- package/dist/overlay.d.ts +1 -0
- package/dist/overlay.d.ts.map +1 -1
- package/dist/overlay.js +11 -0
- package/dist/parts.d.ts +60 -0
- package/dist/parts.d.ts.map +1 -0
- package/dist/parts.js +126 -0
- package/dist/paths.d.ts +2 -0
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +26 -0
- package/dist/preparation.d.ts +20 -0
- package/dist/preparation.d.ts.map +1 -0
- package/dist/preparation.js +226 -0
- package/dist/queries.d.ts +16 -0
- package/dist/queries.d.ts.map +1 -0
- package/dist/queries.js +272 -0
- package/dist/query.d.ts +18 -208
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +3 -505
- package/dist/questions.d.ts +34 -0
- package/dist/questions.d.ts.map +1 -0
- package/dist/questions.js +122 -0
- package/dist/reach.d.ts +20 -11
- package/dist/reach.d.ts.map +1 -1
- package/dist/reach.js +206 -126
- package/dist/react.d.ts +10 -2
- package/dist/react.d.ts.map +1 -1
- package/dist/read.d.ts +7 -0
- package/dist/read.d.ts.map +1 -0
- package/dist/read.js +17 -0
- package/dist/readiness.d.ts +3 -18
- package/dist/readiness.d.ts.map +1 -1
- package/dist/readiness.js +4 -10
- package/dist/reads.d.ts +36 -10
- package/dist/reads.d.ts.map +1 -1
- package/dist/reads.js +157 -86
- package/dist/recovery.d.ts +1 -0
- package/dist/recovery.d.ts.map +1 -1
- package/dist/recovery.js +35 -1
- package/dist/refresh.d.ts +7 -5
- package/dist/refresh.d.ts.map +1 -1
- package/dist/refresh.js +34 -10
- package/dist/refusal.d.ts +5 -0
- package/dist/refusal.d.ts.map +1 -0
- package/dist/refusal.js +55 -0
- package/dist/replica.d.ts +11 -12
- package/dist/replica.d.ts.map +1 -1
- package/dist/replica.js +56 -23
- package/dist/room-draft.d.ts +21 -7
- package/dist/room-draft.d.ts.map +1 -1
- package/dist/room-draft.js +101 -54
- package/dist/room-drafts.d.ts +24 -0
- package/dist/room-drafts.d.ts.map +1 -0
- package/dist/room-drafts.js +217 -0
- package/dist/rows.d.ts +18 -16
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +45 -153
- package/dist/runtime.d.ts +43 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +1 -0
- package/dist/save.d.ts +7 -1
- package/dist/save.d.ts.map +1 -1
- package/dist/save.js +31 -24
- package/dist/saves.d.ts +70 -0
- package/dist/saves.d.ts.map +1 -0
- package/dist/saves.js +1005 -0
- package/dist/search.d.ts +12 -63
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +9 -52
- package/dist/seed.d.ts +11 -2
- package/dist/seed.d.ts.map +1 -1
- package/dist/seed.js +71 -1
- package/dist/shared.d.ts +1 -7
- package/dist/shared.d.ts.map +1 -1
- package/dist/shared.js +13 -105
- package/dist/shown.d.ts +31 -0
- package/dist/shown.d.ts.map +1 -0
- package/dist/shown.js +292 -0
- package/dist/socket/admission.d.ts +7 -0
- package/dist/socket/admission.d.ts.map +1 -0
- package/dist/socket/admission.js +39 -0
- package/dist/socket/answers.d.ts +6 -0
- package/dist/socket/answers.d.ts.map +1 -0
- package/dist/socket/answers.js +20 -0
- package/dist/socket/lanes.d.ts +20 -0
- package/dist/socket/lanes.d.ts.map +1 -0
- package/dist/socket/lanes.js +77 -0
- package/dist/socket/reads.d.ts +10 -0
- package/dist/socket/reads.d.ts.map +1 -0
- package/dist/socket/reads.js +31 -0
- package/dist/socket/rooms.d.ts +44 -0
- package/dist/socket/rooms.d.ts.map +1 -0
- package/dist/socket/rooms.js +90 -0
- package/dist/socket/session.d.ts +38 -0
- package/dist/socket/session.d.ts.map +1 -0
- package/dist/socket/session.js +23 -0
- package/dist/socket.d.ts +70 -0
- package/dist/socket.d.ts.map +1 -0
- package/dist/socket.js +175 -0
- package/dist/source.d.ts +61 -0
- package/dist/source.d.ts.map +1 -0
- package/dist/source.js +82 -0
- package/dist/status.d.ts +4 -5
- package/dist/status.d.ts.map +1 -1
- package/dist/status.js +3 -7
- package/dist/store/fences.d.ts +16 -0
- package/dist/store/fences.d.ts.map +1 -0
- package/dist/store/fences.js +26 -0
- package/dist/store/installs.d.ts +30 -0
- package/dist/store/installs.d.ts.map +1 -0
- package/dist/store/installs.js +34 -0
- package/dist/store/readiness.d.ts +10 -0
- package/dist/store/readiness.d.ts.map +1 -0
- package/dist/store/readiness.js +52 -0
- package/dist/store/records.d.ts +212 -0
- package/dist/store/records.d.ts.map +1 -0
- package/dist/store/records.js +431 -0
- package/dist/store/room-held.d.ts +8 -0
- package/dist/store/room-held.d.ts.map +1 -0
- package/dist/store/room-held.js +17 -0
- package/dist/store/space.d.ts +11 -0
- package/dist/store/space.d.ts.map +1 -0
- package/dist/store/space.js +41 -0
- package/dist/store/watchers.d.ts +17 -0
- package/dist/store/watchers.d.ts.map +1 -0
- package/dist/store/watchers.js +56 -0
- package/dist/store/writes.d.ts +24 -0
- package/dist/store/writes.d.ts.map +1 -0
- package/dist/store/writes.js +125 -0
- package/dist/store.d.ts +105 -158
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +143 -401
- package/dist/stored.d.ts +66 -55
- package/dist/stored.d.ts.map +1 -1
- package/dist/stored.js +355 -273
- package/dist/surface.d.ts +88 -0
- package/dist/surface.d.ts.map +1 -0
- package/dist/surface.js +223 -0
- package/dist/sync.d.ts +19 -0
- package/dist/sync.d.ts.map +1 -0
- package/dist/sync.js +532 -0
- package/dist/tables.d.ts +131 -69
- package/dist/tables.d.ts.map +1 -1
- package/dist/tables.js +221 -105
- package/dist/tallies.d.ts +18 -0
- package/dist/tallies.d.ts.map +1 -0
- package/dist/tallies.js +129 -0
- package/dist/transfer.d.ts +0 -5
- package/dist/transfer.d.ts.map +1 -1
- package/dist/validation.d.ts +3 -4
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +42 -100
- package/dist/windows.d.ts +1 -12
- package/dist/windows.d.ts.map +1 -1
- package/dist/windows.js +2 -75
- package/dist/wire.d.ts +25 -9
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +9 -2
- package/package.json +2 -3
- package/AGENTS.md +0 -312
- package/dist/fence.d.ts +0 -6
- package/dist/fence.d.ts.map +0 -1
- package/dist/fence.js +0 -10
- package/dist/fulltext.d.ts +0 -27
- package/dist/fulltext.d.ts.map +0 -1
- package/dist/fulltext.js +0 -368
- package/dist/words.d.ts +0 -19
- package/dist/words.d.ts.map +0 -1
- package/dist/words.js +0 -150
package/dist/refresh.js
CHANGED
|
@@ -45,9 +45,11 @@ function* entering(page, roomVersion, listed, prior) {
|
|
|
45
45
|
entries.push({
|
|
46
46
|
path,
|
|
47
47
|
content: page.documents[path],
|
|
48
|
+
facts: page.facts[path] ?? null,
|
|
48
49
|
binary: null,
|
|
49
50
|
revision: page.revisions[path] ?? prior.get(path)?.revision ?? null,
|
|
50
51
|
fileId: page.fileIds?.[path] ?? null,
|
|
52
|
+
created: page.created?.[path] ?? null,
|
|
51
53
|
change: page.changes[path] ?? null,
|
|
52
54
|
written: roomVersion,
|
|
53
55
|
});
|
|
@@ -57,9 +59,11 @@ function* entering(page, roomVersion, listed, prior) {
|
|
|
57
59
|
entries.push({
|
|
58
60
|
path,
|
|
59
61
|
content: null,
|
|
62
|
+
facts: null,
|
|
60
63
|
binary: { state: 'accepted', ...page.binaryFiles[path] },
|
|
61
64
|
revision: page.revisions[path] ?? prior.get(path)?.revision ?? null,
|
|
62
65
|
fileId: page.fileIds?.[path] ?? null,
|
|
66
|
+
created: page.created?.[path] ?? null,
|
|
63
67
|
change: page.changes[path] ?? null,
|
|
64
68
|
written: null,
|
|
65
69
|
});
|
|
@@ -74,6 +78,7 @@ function* entering(page, roomVersion, listed, prior) {
|
|
|
74
78
|
...kept,
|
|
75
79
|
revision: page.revisions[path] ?? held.revision,
|
|
76
80
|
fileId: page.fileIds?.[path] ?? held.fileId,
|
|
81
|
+
created: page.created?.[path] ?? held.created,
|
|
77
82
|
change: page.changes[path] ?? held.change,
|
|
78
83
|
});
|
|
79
84
|
}
|
|
@@ -85,7 +90,30 @@ export async function pageEntries(page, removals, roomVersion, prior) {
|
|
|
85
90
|
const held = listed.asked.length === 0 ? new Map() : await prior(listed.asked);
|
|
86
91
|
return stepped(entering(page, roomVersion, listed, held));
|
|
87
92
|
}
|
|
88
|
-
|
|
93
|
+
function without(named, kept) {
|
|
94
|
+
return Object.fromEntries(Object.entries(named).filter(([path]) => !kept.has(path)));
|
|
95
|
+
}
|
|
96
|
+
function unwritten(page, kept) {
|
|
97
|
+
if (kept.size === 0)
|
|
98
|
+
return page;
|
|
99
|
+
return {
|
|
100
|
+
...page,
|
|
101
|
+
documents: without(page.documents, kept),
|
|
102
|
+
facts: without(page.facts, kept),
|
|
103
|
+
revisions: without(page.revisions, kept),
|
|
104
|
+
...(page.fileIds === undefined ? {} : { fileIds: without(page.fileIds, kept) }),
|
|
105
|
+
...(page.created === undefined ? {} : { created: without(page.created, kept) }),
|
|
106
|
+
changes: without(page.changes, kept),
|
|
107
|
+
binaryFiles: without(page.binaryFiles, kept),
|
|
108
|
+
removals: page.removals.filter((path) => !kept.has(path)),
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
async function pageOf(answered, roomVersion, staging) {
|
|
112
|
+
const page = unwritten(answered, await staging.later([
|
|
113
|
+
...Object.keys(answered.documents),
|
|
114
|
+
...Object.keys(answered.binaryFiles),
|
|
115
|
+
...answered.removals,
|
|
116
|
+
], roomVersion));
|
|
89
117
|
return {
|
|
90
118
|
entries: await pageEntries(page, page.removals, roomVersion, (paths) => staging.prior(paths)),
|
|
91
119
|
removals: page.removals,
|
|
@@ -93,13 +121,13 @@ async function pageOf(page, roomVersion, staging) {
|
|
|
93
121
|
folderRemovals: page.folderRemovals ?? [],
|
|
94
122
|
};
|
|
95
123
|
}
|
|
96
|
-
export async function advancement(
|
|
124
|
+
export async function advancement(refresh, authorization, held, remodel, continuing, staging) {
|
|
97
125
|
const locator = held.locator;
|
|
98
126
|
const fromRoomVersion = held.roomVersion;
|
|
99
|
-
|
|
127
|
+
staging.turn();
|
|
100
128
|
if (!continuing())
|
|
101
129
|
return unconfirmed;
|
|
102
|
-
const first = await
|
|
130
|
+
const first = await refresh(authorization, {
|
|
103
131
|
locator,
|
|
104
132
|
selection: held.replica.selection,
|
|
105
133
|
fromRoomVersion,
|
|
@@ -107,10 +135,7 @@ export async function advancement(adapter, authorization, held, remodel, continu
|
|
|
107
135
|
if (first.kind !== 'net-advancement')
|
|
108
136
|
return first;
|
|
109
137
|
const roomVersion = first.roomVersion;
|
|
110
|
-
const models = remodel(first.models, {
|
|
111
|
-
collection: held.model,
|
|
112
|
-
selection: held.selectionModel,
|
|
113
|
-
});
|
|
138
|
+
const models = remodel(first.models, { collection: held.model });
|
|
114
139
|
const changed = new Set();
|
|
115
140
|
const staged = async (page) => {
|
|
116
141
|
const read = await pageOf(page, roomVersion, staging);
|
|
@@ -127,7 +152,7 @@ export async function advancement(adapter, authorization, held, remodel, continu
|
|
|
127
152
|
await staging.turn();
|
|
128
153
|
if (!continuing())
|
|
129
154
|
return unconfirmed;
|
|
130
|
-
const page = await
|
|
155
|
+
const page = await refresh(authorization, {
|
|
131
156
|
locator,
|
|
132
157
|
selection: held.replica.selection,
|
|
133
158
|
fromRoomVersion,
|
|
@@ -148,7 +173,6 @@ export async function advancement(adapter, authorization, held, remodel, continu
|
|
|
148
173
|
record: {
|
|
149
174
|
...held,
|
|
150
175
|
model: models.collection,
|
|
151
|
-
selectionModel: models.selection,
|
|
152
176
|
roomVersion,
|
|
153
177
|
},
|
|
154
178
|
changed,
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ProviderRefusal } from './adapter.js';
|
|
2
|
+
import type { Runtime } from './runtime.js';
|
|
3
|
+
import type { RefusalReason } from './socket.js';
|
|
4
|
+
export declare function refuse(runtime: Runtime, reason: RefusalReason, provider?: ProviderRefusal | null): Promise<void>;
|
|
5
|
+
//# sourceMappingURL=refusal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refusal.d.ts","sourceRoot":"","sources":["../src/refusal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAOpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjD,wBAAsB,MAAM,CAC1B,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,aAAa,EACrB,QAAQ,GAAE,eAAe,GAAG,IAAW,iBAkDxC"}
|
package/dist/refusal.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { changeSet, mergeChangeSets } from './change-set.js';
|
|
2
|
+
import { composedOf } from './collection.js';
|
|
3
|
+
import { listedLocators } from './listing.js';
|
|
4
|
+
import { prepare } from './preparation.js';
|
|
5
|
+
import { storedRecord } from './replica.js';
|
|
6
|
+
import { emitRefusal } from './shown.js';
|
|
7
|
+
export async function refuse(runtime, reason, provider = null) {
|
|
8
|
+
const { store, socket, journal } = runtime;
|
|
9
|
+
socket.session.set({ paused: true });
|
|
10
|
+
socket.abortReads();
|
|
11
|
+
try {
|
|
12
|
+
if (reason === 'revoked-authorization') {
|
|
13
|
+
await store.exclusive(async () => {
|
|
14
|
+
const revoked = { status: 'unavailable', reason: 'revoked' };
|
|
15
|
+
let held = new Map();
|
|
16
|
+
try {
|
|
17
|
+
const local = await store.open();
|
|
18
|
+
held = await store.rooms();
|
|
19
|
+
await local.commit({
|
|
20
|
+
rooms: [...held.values()].map(({ record: kept }) => {
|
|
21
|
+
const record = { ...kept, model: revoked };
|
|
22
|
+
return {
|
|
23
|
+
locator: record.locator,
|
|
24
|
+
key: record.key,
|
|
25
|
+
record: storedRecord(record),
|
|
26
|
+
composed: composedOf(store.composed(record)),
|
|
27
|
+
};
|
|
28
|
+
}),
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
journal.record('model revocation persistence failed');
|
|
33
|
+
}
|
|
34
|
+
const listedNow = listedLocators(runtime, held);
|
|
35
|
+
for (const locator of listedNow) {
|
|
36
|
+
if (!held.has(locator))
|
|
37
|
+
socket.rooms.stand(locator, { unheldModel: revoked });
|
|
38
|
+
}
|
|
39
|
+
store.changed(mergeChangeSets(listedNow.map((locator) => changeSet(locator, { documents: null, room: true }))));
|
|
40
|
+
prepare(runtime);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
finally {
|
|
45
|
+
socket.session.set({
|
|
46
|
+
refusal: {
|
|
47
|
+
code: reason,
|
|
48
|
+
reauthorizationOffered: reason === 'revoked-authorization',
|
|
49
|
+
refusal: provider,
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
journal.record(`connection refused ${reason}`);
|
|
53
|
+
emitRefusal(runtime);
|
|
54
|
+
}
|
|
55
|
+
}
|
package/dist/replica.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type TypedPath } from '@agentshouse/mdmodel';
|
|
2
|
+
import type { BootstrapInventory, SavedFacts, MutationResult, OperationScopes, ReplicaAdmission, TypedSelection } from './adapter.js';
|
|
2
3
|
import { type ChangeBatch, type Precondition } from './change.js';
|
|
3
4
|
import { type Collection, type Composition } from './collection.js';
|
|
4
|
-
import type
|
|
5
|
+
import { type ModelState } from './model.js';
|
|
5
6
|
import { type Layer } from './overlay.js';
|
|
6
7
|
import type { HeldEntry, OverlayEntry, StoredEntry } from './tables.js';
|
|
7
8
|
export type ReplicaRecord = {
|
|
@@ -12,35 +13,33 @@ export type ReplicaRecord = {
|
|
|
12
13
|
readonly replica: ReplicaAdmission;
|
|
13
14
|
readonly model: ModelState;
|
|
14
15
|
readonly typedSelection: TypedSelection | null;
|
|
15
|
-
readonly selectionModel: ModelState;
|
|
16
16
|
readonly providerOwnedPaths: readonly string[];
|
|
17
|
+
readonly authoredPaths?: readonly string[];
|
|
17
18
|
readonly roomVersion: string;
|
|
18
19
|
readonly transfer: string;
|
|
19
|
-
readonly inventory: BootstrapInventory
|
|
20
|
+
readonly inventory: BootstrapInventory;
|
|
20
21
|
readonly key: number;
|
|
21
22
|
};
|
|
22
23
|
export type HeldReplica = {
|
|
23
24
|
readonly record: ReplicaRecord;
|
|
24
25
|
readonly queue: readonly ChangeBatch[];
|
|
25
26
|
readonly overlaid: ReadonlySet<string>;
|
|
26
|
-
readonly count: number;
|
|
27
|
-
readonly confirmed: number;
|
|
28
|
-
readonly indexed: boolean;
|
|
29
27
|
};
|
|
30
28
|
export type VisibleLayer = Layer & {
|
|
31
29
|
readonly collection: Collection;
|
|
32
30
|
};
|
|
33
31
|
export type Slice = Layer & {
|
|
34
32
|
readonly written: Readonly<Record<string, string>>;
|
|
33
|
+
readonly facts: Readonly<Record<string, SavedFacts>>;
|
|
35
34
|
readonly held: ReadonlySet<string>;
|
|
36
35
|
};
|
|
37
|
-
export declare function compositionOf(record: Pick<ReplicaRecord, 'model' | 'typedSelection'
|
|
38
|
-
export declare function sameMembership(record: Pick<ReplicaRecord, 'typedSelection'>, other: Pick<ReplicaRecord, 'typedSelection'>): boolean;
|
|
36
|
+
export declare function compositionOf(record: Pick<ReplicaRecord, 'model' | 'typedSelection'>, builtIn: ModelState, typedPaths: readonly TypedPath[]): Composition;
|
|
39
37
|
export declare function storedRecord(record: ReplicaRecord): string;
|
|
40
38
|
export declare function slicing(entries: readonly HeldEntry[], paths: Iterable<string>): Generator<number, Slice, void>;
|
|
39
|
+
export type LayerEntry = Omit<StoredEntry, 'facts'>;
|
|
41
40
|
export declare function entryAt(layer: Layer & {
|
|
42
41
|
readonly written?: Readonly<Record<string, string>>;
|
|
43
|
-
}, path: string):
|
|
42
|
+
}, path: string): LayerEntry | null;
|
|
44
43
|
export declare function slicingWith(slice: Slice, set: readonly StoredEntry[], removed: readonly string[]): Generator<number, Slice, void>;
|
|
45
44
|
export declare function touchedBy(queue: readonly ChangeBatch[]): Set<string>;
|
|
46
45
|
export declare function movedBy(queue: readonly ChangeBatch[], locator: string): Set<string>;
|
|
@@ -49,7 +48,7 @@ export type Replayed = {
|
|
|
49
48
|
readonly touched: ReadonlySet<string>;
|
|
50
49
|
};
|
|
51
50
|
export declare function replaying(confirmed: Slice, queue: readonly ChangeBatch[], locator: string, composition: Composition): Generator<number, Replayed, void>;
|
|
52
|
-
export declare function overlayOf(visible:
|
|
51
|
+
export declare function overlayOf(visible: VisibleLayer, touched: Iterable<string>): Generator<number, OverlayEntry[], void>;
|
|
53
52
|
export declare function holds(layer: Layer, preconditions: readonly Precondition[]): boolean;
|
|
54
53
|
export declare function landed(batch: ChangeBatch, confirmed: Layer, current?: Readonly<Record<string, string>>): boolean;
|
|
55
54
|
export type Standing = {
|
|
@@ -65,6 +64,6 @@ export type Returned = {
|
|
|
65
64
|
readonly removed: readonly string[];
|
|
66
65
|
};
|
|
67
66
|
export declare function returnedPaths(submitted: ChangeBatch, accepted: Accepted): Set<string>;
|
|
68
|
-
export declare function returning(confirmed: Slice, submitted: ChangeBatch, accepted: Accepted, writtenAt: string): Generator<number, Returned, void>;
|
|
67
|
+
export declare function returning(confirmed: Slice, submitted: ChangeBatch, accepted: Accepted, writtenAt: string, composition: Composition): Generator<number, Returned, void>;
|
|
69
68
|
export {};
|
|
70
69
|
//# sourceMappingURL=replica.d.ts.map
|
package/dist/replica.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replica.d.ts","sourceRoot":"","sources":["../src/replica.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"replica.d.ts","sourceRoot":"","sources":["../src/replica.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACxF,OAAO,KAAK,EACV,kBAAkB,EAClB,UAAU,EAEV,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,cAAc,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAmC,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AACnG,OAAO,EAAgB,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAiD,KAAK,KAAK,EAAE,MAAM,cAAc,CAAC;AAIzF,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAGxE,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAC;IACrC,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC;IACnC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,cAAc,EAAE,cAAc,GAAG,IAAI,CAAC;IAC/C,QAAQ,CAAC,kBAAkB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/C,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C,QAA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';
|
|
2
2
|
import { immutable, landing } from './change.js';
|
|
3
3
|
import { collectionOf } from './collection.js';
|
|
4
|
+
import { storedModel } from './model.js';
|
|
4
5
|
import { acceptedBinaries, overlaying } from './overlay.js';
|
|
6
|
+
import { writtenFacts } from './rows.js';
|
|
5
7
|
import { effectiveIn, rewriting } from './save.js';
|
|
8
|
+
import { guarding } from './shared.js';
|
|
6
9
|
import { ROW_WEIGHT } from './turn.js';
|
|
7
|
-
export function compositionOf(record) {
|
|
10
|
+
export function compositionOf(record, builtIn, typedPaths) {
|
|
8
11
|
return {
|
|
9
12
|
model: record.model,
|
|
10
13
|
selection: record.typedSelection === null
|
|
11
14
|
? null
|
|
12
|
-
: { roots: record.typedSelection.roots, model:
|
|
15
|
+
: { roots: record.typedSelection.roots, model: builtIn },
|
|
16
|
+
typedPaths,
|
|
13
17
|
};
|
|
14
18
|
}
|
|
15
|
-
export function sameMembership(record, other) {
|
|
16
|
-
return (JSON.stringify(record.typedSelection?.roots ?? null) ===
|
|
17
|
-
JSON.stringify(other.typedSelection?.roots ?? null));
|
|
18
|
-
}
|
|
19
19
|
export function storedRecord(record) {
|
|
20
20
|
const { key: _key, ...stored } = record;
|
|
21
|
-
return JSON.stringify(stored);
|
|
21
|
+
return JSON.stringify({ ...stored, model: storedModel(stored.model) });
|
|
22
22
|
}
|
|
23
23
|
const PROBES = new Set([
|
|
24
24
|
'then',
|
|
@@ -38,7 +38,7 @@ function strict(values, held) {
|
|
|
38
38
|
throw new UnreadPath(property);
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
|
-
return
|
|
41
|
+
return guarding(values, {
|
|
42
42
|
get(target, property, receiver) {
|
|
43
43
|
guard(property);
|
|
44
44
|
return Reflect.get(target, property, receiver);
|
|
@@ -61,9 +61,13 @@ export function* slicing(entries, paths) {
|
|
|
61
61
|
const binaries = {};
|
|
62
62
|
const revisions = {};
|
|
63
63
|
const fileIds = {};
|
|
64
|
+
const created = {};
|
|
64
65
|
const changes = {};
|
|
65
66
|
const written = {};
|
|
67
|
+
const facts = {};
|
|
66
68
|
for (const entry of entries) {
|
|
69
|
+
if (entry.facts !== null)
|
|
70
|
+
facts[entry.path] = entry.facts;
|
|
67
71
|
if (entry.binary !== null)
|
|
68
72
|
binaries[entry.path] = entry.binary;
|
|
69
73
|
else if (entry.content !== null)
|
|
@@ -72,6 +76,8 @@ export function* slicing(entries, paths) {
|
|
|
72
76
|
revisions[entry.path] = entry.revision;
|
|
73
77
|
if (entry.fileId !== null)
|
|
74
78
|
fileIds[entry.path] = entry.fileId;
|
|
79
|
+
if (entry.created !== null)
|
|
80
|
+
created[entry.path] = entry.created;
|
|
75
81
|
if (entry.change !== null)
|
|
76
82
|
changes[entry.path] = entry.change;
|
|
77
83
|
if (entry.written !== null)
|
|
@@ -83,8 +89,10 @@ export function* slicing(entries, paths) {
|
|
|
83
89
|
binaries: strict(binaries, held),
|
|
84
90
|
revisions: strict(revisions, held),
|
|
85
91
|
fileIds: strict(fileIds, held),
|
|
92
|
+
created: strict(created, held),
|
|
86
93
|
changes: strict(changes, held),
|
|
87
94
|
written: strict(written, held),
|
|
95
|
+
facts: strict(facts, held),
|
|
88
96
|
held,
|
|
89
97
|
};
|
|
90
98
|
}
|
|
@@ -99,6 +107,7 @@ export function entryAt(layer, path) {
|
|
|
99
107
|
binary: binary ?? null,
|
|
100
108
|
revision: layer.revisions[path] ?? null,
|
|
101
109
|
fileId: layer.fileIds[path] ?? null,
|
|
110
|
+
created: layer.created[path] ?? null,
|
|
102
111
|
change: layer.changes[path] ?? null,
|
|
103
112
|
written: layer.written?.[path] ?? null,
|
|
104
113
|
};
|
|
@@ -107,8 +116,9 @@ export function* slicingWith(slice, set, removed) {
|
|
|
107
116
|
const entries = new Map();
|
|
108
117
|
for (const path of slice.held) {
|
|
109
118
|
const entry = entryAt(slice, path);
|
|
110
|
-
if (entry !== null)
|
|
111
|
-
entries.set(path, { ...entry, type: null });
|
|
119
|
+
if (entry !== null) {
|
|
120
|
+
entries.set(path, { ...entry, type: null, facts: slice.facts[path] ?? null });
|
|
121
|
+
}
|
|
112
122
|
yield ROW_WEIGHT;
|
|
113
123
|
}
|
|
114
124
|
for (const path of removed)
|
|
@@ -172,8 +182,9 @@ export function* replaying(confirmed, queue, locator, composition) {
|
|
|
172
182
|
export function* overlayOf(visible, touched) {
|
|
173
183
|
const rows = [];
|
|
174
184
|
for (const path of touched) {
|
|
175
|
-
yield ROW_WEIGHT;
|
|
176
185
|
const entry = entryAt(visible, path);
|
|
186
|
+
yield ROW_WEIGHT + (entry?.content?.length ?? 0);
|
|
187
|
+
const text = entry?.binary === null ? entry.content : null;
|
|
177
188
|
rows.push(entry === null
|
|
178
189
|
? {
|
|
179
190
|
path,
|
|
@@ -182,10 +193,17 @@ export function* overlayOf(visible, touched) {
|
|
|
182
193
|
binary: null,
|
|
183
194
|
revision: null,
|
|
184
195
|
fileId: null,
|
|
196
|
+
created: null,
|
|
185
197
|
change: null,
|
|
186
198
|
written: null,
|
|
199
|
+
facts: null,
|
|
187
200
|
}
|
|
188
|
-
: {
|
|
201
|
+
: {
|
|
202
|
+
...entry,
|
|
203
|
+
written: null,
|
|
204
|
+
present: true,
|
|
205
|
+
facts: text === null ? null : writtenFacts(path, text, visible.collection.composition),
|
|
206
|
+
});
|
|
189
207
|
}
|
|
190
208
|
return rows;
|
|
191
209
|
}
|
|
@@ -257,7 +275,7 @@ function effects(change) {
|
|
|
257
275
|
{ kind: 'present', path: change.to },
|
|
258
276
|
];
|
|
259
277
|
}
|
|
260
|
-
if (change.kind === '
|
|
278
|
+
if (change.kind === 'arrival')
|
|
261
279
|
return [{ kind: 'present', path }];
|
|
262
280
|
return [{ kind: 'absent', path }];
|
|
263
281
|
}
|
|
@@ -350,17 +368,20 @@ export function returnedPaths(submitted, accepted) {
|
|
|
350
368
|
}
|
|
351
369
|
return paths;
|
|
352
370
|
}
|
|
353
|
-
export function* returning(confirmed, submitted, accepted, writtenAt) {
|
|
371
|
+
export function* returning(confirmed, submitted, accepted, writtenAt, composition) {
|
|
354
372
|
const documents = new Map();
|
|
355
373
|
const binaries = new Map();
|
|
356
374
|
const revisions = new Map();
|
|
357
375
|
const fileIds = new Map();
|
|
376
|
+
const created = new Map();
|
|
358
377
|
const changes = new Map();
|
|
359
378
|
const written = new Map();
|
|
379
|
+
const facts = new Map();
|
|
360
380
|
const read = (changed, held, path) => (changed.has(path) ? changed.get(path) : held[path]);
|
|
361
381
|
for (const [path, content] of Object.entries(accepted.documents)) {
|
|
362
|
-
yield ROW_WEIGHT;
|
|
382
|
+
yield ROW_WEIGHT + content.length;
|
|
363
383
|
documents.set(path, content);
|
|
384
|
+
facts.set(path, writtenFacts(path, content, composition));
|
|
364
385
|
fileIds.set(path, undefined);
|
|
365
386
|
written.set(path, writtenAt);
|
|
366
387
|
}
|
|
@@ -383,48 +404,60 @@ export function* returning(confirmed, submitted, accepted, writtenAt) {
|
|
|
383
404
|
written.set(path, undefined);
|
|
384
405
|
}
|
|
385
406
|
for (const change of submitted.changes) {
|
|
386
|
-
if (change.kind === 'arrival'
|
|
387
|
-
if (accepted.revisions[change.path]
|
|
407
|
+
if (change.kind === 'arrival') {
|
|
408
|
+
if (accepted.revisions[change.path] === undefined)
|
|
409
|
+
continue;
|
|
410
|
+
created.set(change.path, change.created);
|
|
411
|
+
if ('binary' in change)
|
|
388
412
|
binaries.set(change.path, { state: 'accepted', ...change.binary });
|
|
389
|
-
}
|
|
390
413
|
continue;
|
|
391
414
|
}
|
|
392
|
-
if (change.kind !== 'move')
|
|
415
|
+
if (change.kind !== 'move' || accepted.revisions[change.to] === undefined)
|
|
393
416
|
continue;
|
|
417
|
+
created.set(change.to, read(created, confirmed.created, change.path));
|
|
418
|
+
created.set(change.path, undefined);
|
|
394
419
|
const moved = read(binaries, confirmed.binaries, change.path);
|
|
395
|
-
if (moved === undefined
|
|
420
|
+
if (moved === undefined)
|
|
396
421
|
continue;
|
|
397
422
|
binaries.set(change.to, moved);
|
|
398
423
|
binaries.set(change.path, undefined);
|
|
399
424
|
}
|
|
400
425
|
for (const [path, binary] of acceptedBinaries(accepted.binaryFiles ?? {}))
|
|
401
426
|
binaries.set(path, binary);
|
|
402
|
-
for (const path of accepted.removals)
|
|
427
|
+
for (const path of accepted.removals) {
|
|
403
428
|
binaries.set(path, undefined);
|
|
429
|
+
created.set(path, undefined);
|
|
430
|
+
}
|
|
404
431
|
const paths = new Set([
|
|
405
432
|
...documents.keys(),
|
|
406
433
|
...binaries.keys(),
|
|
407
434
|
...revisions.keys(),
|
|
408
435
|
...fileIds.keys(),
|
|
436
|
+
...created.keys(),
|
|
409
437
|
...changes.keys(),
|
|
410
438
|
...written.keys(),
|
|
411
439
|
]);
|
|
412
440
|
const set = [];
|
|
413
441
|
const removed = [];
|
|
414
442
|
for (const path of paths) {
|
|
415
|
-
yield ROW_WEIGHT;
|
|
416
443
|
const content = read(documents, confirmed.documents, path);
|
|
417
444
|
const binary = read(binaries, confirmed.binaries, path);
|
|
445
|
+
yield ROW_WEIGHT;
|
|
418
446
|
if (content === undefined && binary === undefined) {
|
|
419
447
|
removed.push(path);
|
|
420
448
|
continue;
|
|
421
449
|
}
|
|
450
|
+
const text = binary === undefined ? (content ?? null) : null;
|
|
451
|
+
const fresh = confirmed.documents[path] === undefined && confirmed.binaries[path] === undefined;
|
|
422
452
|
set.push({
|
|
423
453
|
path,
|
|
424
|
-
content:
|
|
454
|
+
content: text,
|
|
455
|
+
facts: text === null ? null : (read(facts, confirmed.facts, path) ?? null),
|
|
425
456
|
binary: binary ?? null,
|
|
426
457
|
revision: read(revisions, confirmed.revisions, path) ?? null,
|
|
427
458
|
fileId: read(fileIds, confirmed.fileIds, path) ?? null,
|
|
459
|
+
created: read(created, confirmed.created, path) ??
|
|
460
|
+
(fresh ? (read(changes, confirmed.changes, path)?.time ?? null) : null),
|
|
428
461
|
change: read(changes, confirmed.changes, path) ?? null,
|
|
429
462
|
written: read(written, confirmed.written, path) ?? null,
|
|
430
463
|
});
|
package/dist/room-draft.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export type RoomDraftParts = {
|
|
|
40
40
|
};
|
|
41
41
|
readonly file?: {
|
|
42
42
|
readonly blob: Blob;
|
|
43
|
+
readonly base?: string | null;
|
|
43
44
|
};
|
|
44
45
|
};
|
|
45
46
|
export type HeldFile = {
|
|
@@ -89,9 +90,9 @@ type ChangedUnderneath = {
|
|
|
89
90
|
readonly file?: string | null;
|
|
90
91
|
};
|
|
91
92
|
export type ReturnReason = ProviderRefusal & {
|
|
92
|
-
readonly kind: Open<'conflicted' | 'rejected' | '
|
|
93
|
+
readonly kind: Open<'conflicted' | 'rejected' | 'withdrawn'>;
|
|
93
94
|
};
|
|
94
|
-
export declare function returnedBy(
|
|
95
|
+
export declare function returnedBy(): ReturnReason;
|
|
95
96
|
export type RoomDraft = {
|
|
96
97
|
readonly room: string;
|
|
97
98
|
readonly path: string;
|
|
@@ -105,14 +106,12 @@ export type RoomDraftWrite = {
|
|
|
105
106
|
readonly roomDraft: RoomDraft | null;
|
|
106
107
|
} | {
|
|
107
108
|
readonly outcome: 'stale';
|
|
108
|
-
readonly code: string;
|
|
109
|
-
readonly retryable: boolean;
|
|
110
109
|
readonly current: RoomDraft | null;
|
|
111
110
|
};
|
|
112
111
|
export declare function staleWrite(current: RoomDraft | null): RoomDraftWrite;
|
|
113
112
|
export type ChangedPart = {
|
|
114
113
|
readonly path: string;
|
|
115
|
-
readonly part: Open<'field' | 'section' | 'preamble' | 'markdown' | '
|
|
114
|
+
readonly part: Open<'field' | 'section' | 'preamble' | 'markdown' | 'move' | 'removal' | 'file'>;
|
|
116
115
|
readonly name?: string;
|
|
117
116
|
};
|
|
118
117
|
export type RoomDraftRecord = {
|
|
@@ -126,13 +125,14 @@ export type SavedDraft = {
|
|
|
126
125
|
readonly path: string;
|
|
127
126
|
readonly parts: HeldParts;
|
|
128
127
|
};
|
|
129
|
-
export declare function readParts(value: unknown): RoomDraftParts;
|
|
128
|
+
export declare function readParts(value: unknown, path: string): RoomDraftParts;
|
|
130
129
|
export declare function gatheredParts(earlier: unknown, later: unknown): unknown;
|
|
131
130
|
export declare function held(current: HeldParts | undefined, parts: RoomDraftParts, file?: HeldFile): HeldParts;
|
|
132
131
|
export declare function underneath(parts: HeldParts, path: string, visible: VisibleLayer | undefined): ChangedUnderneath;
|
|
133
132
|
export declare function heldFile(blob: Blob, base: string | null): Promise<HeldFile>;
|
|
134
133
|
export declare function binaryBase(visible: VisibleLayer | undefined, path: string): string | null;
|
|
135
|
-
export declare function changedParts(path: string,
|
|
134
|
+
export declare function changedParts(path: string, parts: HeldParts, visible: VisibleLayer | undefined): readonly ChangedPart[];
|
|
135
|
+
export declare function lineEnded(text: string): string;
|
|
136
136
|
export type TextParts = {
|
|
137
137
|
readonly fields?: Readonly<Record<string, {
|
|
138
138
|
readonly value: unknown;
|
|
@@ -149,6 +149,20 @@ export declare function returnedInto(existing: HeldParts | undefined, returned:
|
|
|
149
149
|
export declare function moveTarget(move: {
|
|
150
150
|
readonly to: string;
|
|
151
151
|
}): string;
|
|
152
|
+
export declare function readSavedParts(named: readonly {
|
|
153
|
+
readonly path: string;
|
|
154
|
+
readonly parts: unknown;
|
|
155
|
+
}[]): readonly {
|
|
156
|
+
readonly path: string;
|
|
157
|
+
readonly parts: RoomDraftParts;
|
|
158
|
+
}[];
|
|
159
|
+
export declare function partsChanges(named: readonly {
|
|
160
|
+
readonly path: string;
|
|
161
|
+
readonly parts: unknown;
|
|
162
|
+
}[]): {
|
|
163
|
+
readonly changes: readonly Change[];
|
|
164
|
+
readonly preconditions: readonly Precondition[];
|
|
165
|
+
};
|
|
152
166
|
export declare function changesOf(path: string, parts: HeldParts): {
|
|
153
167
|
changes: readonly Change[];
|
|
154
168
|
bases: readonly Precondition[];
|
package/dist/room-draft.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"room-draft.d.ts","sourceRoot":"","sources":["../src/room-draft.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAA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