@zeeshan60/event-processor 1.0.15 → 1.0.17
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 +29 -22
- package/dist/ActivityEventHandler.d.ts +7 -4
- package/dist/ActivityEventHandler.d.ts.map +1 -1
- package/dist/ActivityEventHandler.js +24 -13
- package/dist/ActivityLogEvents.d.ts.map +1 -1
- package/dist/ActivityLogEvents.js +1 -0
- package/dist/BaseEventHandler.d.ts +12 -3
- package/dist/BaseEventHandler.d.ts.map +1 -1
- package/dist/BaseEventHandler.js +15 -0
- package/dist/EventProcessorSDK.d.ts +8 -0
- package/dist/EventProcessorSDK.d.ts.map +1 -1
- package/dist/EventProcessorSDK.js +20 -6
- package/dist/FriendEventHandler.d.ts +8 -3
- package/dist/FriendEventHandler.d.ts.map +1 -1
- package/dist/FriendEventHandler.js +65 -39
- package/dist/GroupEventHandler.d.ts +6 -3
- package/dist/GroupEventHandler.d.ts.map +1 -1
- package/dist/GroupEventHandler.js +254 -189
- package/dist/GroupTransactionEventHandler.d.ts +5 -8
- package/dist/GroupTransactionEventHandler.d.ts.map +1 -1
- package/dist/GroupTransactionEventHandler.js +26 -298
- package/dist/TransactionEventHandler.d.ts +5 -3
- package/dist/TransactionEventHandler.d.ts.map +1 -1
- package/dist/TransactionEventHandler.js +26 -13
- package/dist/TransactionEvents.d.ts +10 -9
- package/dist/TransactionEvents.d.ts.map +1 -1
- package/dist/TransactionEvents.js +10 -12
- package/dist/UserEventHandler.d.ts +5 -3
- package/dist/UserEventHandler.d.ts.map +1 -1
- package/dist/UserEventHandler.js +27 -14
- package/dist/__tests__/test-helpers/IMActivityLogEventStore.d.ts +1 -0
- package/dist/__tests__/test-helpers/IMActivityLogEventStore.d.ts.map +1 -1
- package/dist/__tests__/test-helpers/IMActivityLogEventStore.js +3 -0
- package/dist/__tests__/test-helpers/IMActivityLogModelStore.d.ts +2 -0
- package/dist/__tests__/test-helpers/IMActivityLogModelStore.d.ts.map +1 -1
- package/dist/__tests__/test-helpers/IMActivityLogModelStore.js +10 -0
- package/dist/__tests__/test-helpers/IMCurrencyStore.d.ts +9 -0
- package/dist/__tests__/test-helpers/IMCurrencyStore.d.ts.map +1 -0
- package/dist/__tests__/test-helpers/IMCurrencyStore.js +19 -0
- package/dist/__tests__/test-helpers/IMFriendModelStore.d.ts +1 -0
- package/dist/__tests__/test-helpers/IMFriendModelStore.d.ts.map +1 -1
- package/dist/__tests__/test-helpers/IMFriendModelStore.js +7 -0
- package/dist/__tests__/test-helpers/IMGroupModelStore.d.ts +1 -0
- package/dist/__tests__/test-helpers/IMGroupModelStore.d.ts.map +1 -1
- package/dist/__tests__/test-helpers/IMGroupModelStore.js +7 -0
- package/dist/__tests__/test-helpers/IMGroupTransactionEventStore.d.ts +2 -0
- package/dist/__tests__/test-helpers/IMGroupTransactionEventStore.d.ts.map +1 -1
- package/dist/__tests__/test-helpers/IMGroupTransactionEventStore.js +18 -0
- package/dist/__tests__/test-helpers/IMGroupTransactionModelStore.d.ts +1 -0
- package/dist/__tests__/test-helpers/IMGroupTransactionModelStore.d.ts.map +1 -1
- package/dist/__tests__/test-helpers/IMGroupTransactionModelStore.js +7 -0
- package/dist/__tests__/test-helpers/IMTransactionEventStore.d.ts +2 -0
- package/dist/__tests__/test-helpers/IMTransactionEventStore.d.ts.map +1 -1
- package/dist/__tests__/test-helpers/IMTransactionEventStore.js +6 -0
- package/dist/__tests__/test-helpers/IMTransactionModelStore.d.ts +3 -0
- package/dist/__tests__/test-helpers/IMTransactionModelStore.d.ts.map +1 -1
- package/dist/__tests__/test-helpers/IMTransactionModelStore.js +27 -0
- package/dist/__tests__/test-helpers/IMUserModelStore.d.ts +4 -0
- package/dist/__tests__/test-helpers/IMUserModelStore.d.ts.map +1 -1
- package/dist/__tests__/test-helpers/IMUserModelStore.js +17 -0
- package/dist/client/controllers/FriendController.d.ts +4 -0
- package/dist/client/controllers/FriendController.d.ts.map +1 -1
- package/dist/client/controllers/FriendController.js +81 -15
- package/dist/client/controllers/TransactionController.d.ts +13 -2
- package/dist/client/controllers/TransactionController.d.ts.map +1 -1
- package/dist/client/controllers/TransactionController.js +150 -16
- package/dist/client/handlers/UIEventHandler.d.ts +3 -0
- package/dist/client/handlers/UIEventHandler.d.ts.map +1 -1
- package/dist/client/handlers/UIEventHandler.js +36 -0
- package/dist/common/CurrencyRate.d.ts +7 -0
- package/dist/common/CurrencyRate.d.ts.map +1 -0
- package/dist/common/CurrencyRate.js +2 -0
- package/dist/common/Model.d.ts +1 -0
- package/dist/common/Model.d.ts.map +1 -1
- package/dist/contracts/friends/index.d.ts +2 -9
- package/dist/contracts/friends/index.d.ts.map +1 -1
- package/dist/contracts/groups/index.d.ts +1 -1
- package/dist/contracts/groups/index.d.ts.map +1 -1
- package/dist/contracts/transactions/index.d.ts +33 -23
- package/dist/contracts/transactions/index.d.ts.map +1 -1
- package/dist/contracts/transactions/index.js +14 -11
- package/dist/converters/ActivityLogConverters.d.ts.map +1 -1
- package/dist/converters/ActivityLogConverters.js +3 -1
- package/dist/events.d.ts +2 -0
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +7 -1
- package/dist/index.d.ts +3 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -5
- package/dist/store/CurrencyStore.d.ts +6 -0
- package/dist/store/CurrencyStore.d.ts.map +1 -0
- package/dist/store/CurrencyStore.js +6 -0
- package/dist/store/ModelStore.d.ts +1 -0
- package/dist/store/ModelStore.d.ts.map +1 -1
- package/dist/store/TransactionModelStore.d.ts +2 -0
- package/dist/store/TransactionModelStore.d.ts.map +1 -1
- package/dist/store/UserModelStore.d.ts +1 -0
- package/dist/store/UserModelStore.d.ts.map +1 -1
- package/dist/utils/BalanceUtil.d.ts +17 -0
- package/dist/utils/BalanceUtil.d.ts.map +1 -0
- package/dist/utils/BalanceUtil.js +105 -0
- package/dist/utils/splitTypeUtils.d.ts.map +1 -1
- package/dist/utils/splitTypeUtils.js +21 -21
- package/package.json +1 -1
- package/dist/client/handlers/UIFriendEventHandler.d.ts +0 -16
- package/dist/client/handlers/UIFriendEventHandler.d.ts.map +0 -1
- package/dist/client/handlers/UIFriendEventHandler.js +0 -27
- package/dist/client/handlers/UIGroupEventHandler.d.ts +0 -18
- package/dist/client/handlers/UIGroupEventHandler.d.ts.map +0 -1
- package/dist/client/handlers/UIGroupEventHandler.js +0 -28
- package/dist/client/handlers/UIGroupTransactionEventHandler.d.ts +0 -18
- package/dist/client/handlers/UIGroupTransactionEventHandler.d.ts.map +0 -1
- package/dist/client/handlers/UIGroupTransactionEventHandler.js +0 -28
- package/dist/client/handlers/UITransactionEventHandler.d.ts +0 -14
- package/dist/client/handlers/UITransactionEventHandler.d.ts.map +0 -1
- package/dist/client/handlers/UITransactionEventHandler.js +0 -26
- package/dist/client/handlers/UIUserEventHandler.d.ts +0 -12
- package/dist/client/handlers/UIUserEventHandler.d.ts.map +0 -1
- package/dist/client/handlers/UIUserEventHandler.js +0 -29
- package/dist/utils/userPathUtils.d.ts +0 -6
- package/dist/utils/userPathUtils.d.ts.map +0 -1
- package/dist/utils/userPathUtils.js +0 -16
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import { FriendEventStore, FriendModelStore, GroupCreated, GroupDeleted, GroupDescriptionChanged, GroupEvent, GroupEventStore, GroupMembersAdded, GroupMembersRemoved, GroupModel, GroupModelStore, GroupNameChanged, UserModelStore } from ".";
|
|
2
2
|
import { BaseEventHandler } from "./BaseEventHandler";
|
|
3
3
|
import { ActivityEventHandler } from "./ActivityEventHandler";
|
|
4
|
-
|
|
4
|
+
import { ModelChangeEmitter } from "./ModelChangeEmitter";
|
|
5
|
+
export declare class GroupEventHandler extends BaseEventHandler<GroupEvent> {
|
|
5
6
|
private modelStore;
|
|
6
7
|
private friendModelStore;
|
|
7
8
|
private userModelStore;
|
|
8
9
|
private groupEventStore;
|
|
9
10
|
private friendEventStore;
|
|
10
11
|
private activityEventHandler?;
|
|
11
|
-
constructor(modelStore: GroupModelStore, friendModelStore: FriendModelStore, userModelStore: UserModelStore, groupEventStore: GroupEventStore, friendEventStore: FriendEventStore, activityEventHandler?: ActivityEventHandler | undefined);
|
|
12
|
-
|
|
12
|
+
constructor(modelStore: GroupModelStore, friendModelStore: FriendModelStore, userModelStore: UserModelStore, groupEventStore: GroupEventStore, friendEventStore: FriendEventStore, isClient: boolean, modelChangeEmitter?: ModelChangeEmitter, activityEventHandler?: ActivityEventHandler | undefined);
|
|
13
|
+
getModelStore(): GroupModelStore;
|
|
13
14
|
handleClientEventFromRemoteListener(event: GroupEvent): Promise<void>;
|
|
15
|
+
handleClientEventsFromRemoteListenerBulk(events: GroupEvent[]): Promise<void>;
|
|
16
|
+
currentUserId?: string;
|
|
14
17
|
handleEvent(event: GroupEvent): Promise<GroupModel>;
|
|
15
18
|
private ensureBidirectionalFriendship;
|
|
16
19
|
handleGroupCreated(event: GroupCreated): Promise<GroupModel>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupEventHandler.d.ts","sourceRoot":"","sources":["../src/GroupEventHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,uBAAuB,EACvB,UAAU,EACV,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACV,eAAe,EACf,gBAAgB,EAEhB,cAAc,EACjB,MAAM,GAAG,CAAC;AACX,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"GroupEventHandler.d.ts","sourceRoot":"","sources":["../src/GroupEventHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,uBAAuB,EACvB,UAAU,EACV,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACV,eAAe,EACf,gBAAgB,EAEhB,cAAc,EACjB,MAAM,GAAG,CAAC;AACX,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,qBAAa,iBAAkB,SAAQ,gBAAgB,CAAC,UAAU,CAAC;IAE3D,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,gBAAgB;IACxB,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,eAAe;IACvB,OAAO,CAAC,gBAAgB;IAGxB,OAAO,CAAC,oBAAoB,CAAC;gBAPrB,UAAU,EAAE,eAAe,EAC3B,gBAAgB,EAAE,gBAAgB,EAClC,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EAChC,gBAAgB,EAAE,gBAAgB,EAC1C,QAAQ,EAAE,OAAO,EACjB,kBAAkB,CAAC,EAAE,kBAAkB,EAC/B,oBAAoB,CAAC,EAAE,oBAAoB,YAAA;IAKhD,aAAa,IAAI,eAAe;IAI1B,mCAAmC,CAC5C,KAAK,EAAE,UAAU,GAClB,OAAO,CAAC,IAAI,CAAC;IAWH,wCAAwC,CACjD,MAAM,EAAE,UAAU,EAAE,GACrB,OAAO,CAAC,IAAI,CAAC;IAqBhB,aAAa,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;YAgC3C,6BAA6B;IA2ErC,kBAAkB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC;IA+E5D,sBAAsB,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,UAAU,CAAC;IAyDpE,6BAA6B,CAC/B,KAAK,EAAE,uBAAuB,GAC/B,OAAO,CAAC,UAAU,CAAC;IAyDhB,uBAAuB,CACzB,KAAK,EAAE,iBAAiB,GACzB,OAAO,CAAC,UAAU,CAAC;IAsHhB,yBAAyB,CAC3B,KAAK,EAAE,mBAAmB,GAC3B,OAAO,CAAC,UAAU,CAAC;IAyFhB,kBAAkB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC;CAuDrE"}
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GroupEventHandler = void 0;
|
|
4
4
|
const _1 = require(".");
|
|
5
|
+
const BaseEventHandler_1 = require("./BaseEventHandler");
|
|
5
6
|
const uuid_1 = require("uuid");
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
class GroupEventHandler extends BaseEventHandler_1.BaseEventHandler {
|
|
8
|
+
constructor(modelStore, friendModelStore, userModelStore, groupEventStore, friendEventStore, isClient, modelChangeEmitter, activityEventHandler) {
|
|
9
|
+
super(isClient, modelChangeEmitter);
|
|
9
10
|
this.modelStore = modelStore;
|
|
10
11
|
this.friendModelStore = friendModelStore;
|
|
11
12
|
this.userModelStore = userModelStore;
|
|
@@ -13,25 +14,39 @@ class GroupEventHandler {
|
|
|
13
14
|
this.friendEventStore = friendEventStore;
|
|
14
15
|
this.activityEventHandler = activityEventHandler;
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
return (existingModel.streamId === updatedModel.streamId &&
|
|
21
|
-
existingModel.version === updatedModel.version);
|
|
17
|
+
getModelStore() {
|
|
18
|
+
return this.modelStore;
|
|
22
19
|
}
|
|
23
20
|
async handleClientEventFromRemoteListener(event) {
|
|
24
|
-
const existingModel = await this.modelStore.
|
|
21
|
+
const existingModel = await this.modelStore.getByStreamId(event.streamId);
|
|
25
22
|
const updatedModel = event.apply(existingModel);
|
|
26
23
|
if (!this.shouldSkipSave(existingModel, updatedModel)) {
|
|
27
24
|
await this.modelStore.save(updatedModel);
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
this.modelChangeEmitter?.emit("GroupModel", updatedModel);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
async handleClientEventsFromRemoteListenerBulk(events) {
|
|
29
|
+
const updatedModels = [];
|
|
30
|
+
for (const event of events) {
|
|
31
|
+
const existingModel = await this.modelStore.getByStreamId(event.streamId);
|
|
32
|
+
const updatedModel = event.apply(existingModel);
|
|
33
|
+
if (!this.shouldSkipSave(existingModel, updatedModel)) {
|
|
34
|
+
await this.modelStore.save(updatedModel);
|
|
35
|
+
updatedModels.push(updatedModel);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
if (this.modelChangeEmitter && updatedModels.length > 0) {
|
|
39
|
+
for (const model of updatedModels) {
|
|
40
|
+
this.modelChangeEmitter.emit("GroupModel", model);
|
|
30
41
|
}
|
|
31
42
|
}
|
|
32
43
|
}
|
|
33
44
|
async handleEvent(event) {
|
|
34
45
|
const eventType = event.constructor.name;
|
|
46
|
+
if (this.isClient) {
|
|
47
|
+
const user = await this.userModelStore.appUser();
|
|
48
|
+
this.currentUserId = user.userId;
|
|
49
|
+
}
|
|
35
50
|
switch (eventType) {
|
|
36
51
|
case "GroupCreated":
|
|
37
52
|
return await this.handleGroupCreated(event);
|
|
@@ -75,9 +90,7 @@ class GroupEventHandler {
|
|
|
75
90
|
});
|
|
76
91
|
await this.friendEventStore.addEvent(friendCreatedEvent);
|
|
77
92
|
const friendModel = friendCreatedEvent.apply(undefined);
|
|
78
|
-
|
|
79
|
-
await this.friendModelStore.save(friendModel);
|
|
80
|
-
}
|
|
93
|
+
await this.friendModelStore.save(friendModel);
|
|
81
94
|
}
|
|
82
95
|
const existingFriend2to1 = await this.friendModelStore.findByUserIdAndFriendIdAndDeletedIsFalse(userId2, userId1);
|
|
83
96
|
if (!existingFriend2to1) {
|
|
@@ -106,125 +119,131 @@ class GroupEventHandler {
|
|
|
106
119
|
async handleGroupCreated(event) {
|
|
107
120
|
const existingModel = await this.modelStore.getByStreamIdWhereDeletedIsFalse(event.streamId);
|
|
108
121
|
const updatedModel = event.apply(existingModel);
|
|
109
|
-
if (
|
|
110
|
-
|
|
111
|
-
if ((0, EventProcessorSDK_1.isSDKInitialized)()) {
|
|
112
|
-
EventProcessorSDK_1.EventProcessorSDK.getInstance().emitModelChange("GroupModel", updatedModel);
|
|
113
|
-
}
|
|
122
|
+
if (this.shouldSkipSave(existingModel, updatedModel)) {
|
|
123
|
+
return existingModel;
|
|
114
124
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
if (
|
|
120
|
-
|
|
121
|
-
continue;
|
|
125
|
+
await this.modelStore.save(updatedModel);
|
|
126
|
+
if (this.isClient) {
|
|
127
|
+
await this.groupEventStore.addEvent(event);
|
|
128
|
+
this.modelChangeEmitter?.emit("GroupModel", updatedModel);
|
|
129
|
+
if (this.activityEventHandler) {
|
|
130
|
+
await this.activityEventHandler.createActivityLog(event, undefined, updatedModel);
|
|
122
131
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
const allMemberIds = event.members ?? [];
|
|
135
|
+
const otherMembers = allMemberIds.filter((id) => id !== event.userId);
|
|
136
|
+
for (const memberId of otherMembers) {
|
|
137
|
+
const memberUser = await this.userModelStore.getByStreamIdWhereDeletedIsFalse(memberId);
|
|
138
|
+
if (!memberUser) {
|
|
139
|
+
console.log(`Member ${memberId} not found, skipping`);
|
|
140
|
+
continue;
|
|
126
141
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
142
|
+
for (const otherMemberId of allMemberIds) {
|
|
143
|
+
if (memberId !== otherMemberId) {
|
|
144
|
+
await this.ensureBidirectionalFriendship(memberId, otherMemberId, event.groupId);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
const perspectiveGroupStreamId = (0, uuid_1.v4)();
|
|
148
|
+
const perspectiveGroupCreated = new _1.GroupCreated({
|
|
149
|
+
eventId: (0, uuid_1.v4)(),
|
|
150
|
+
userId: memberId,
|
|
151
|
+
groupId: event.groupId,
|
|
152
|
+
name: event.name,
|
|
153
|
+
description: event.description,
|
|
154
|
+
members: event.members,
|
|
155
|
+
createdAt: new Date(),
|
|
156
|
+
createdBy: memberId,
|
|
157
|
+
streamId: perspectiveGroupStreamId,
|
|
158
|
+
version: 1,
|
|
159
|
+
systemGenerated: true,
|
|
160
|
+
});
|
|
161
|
+
await this.groupEventStore.addEvent(perspectiveGroupCreated);
|
|
162
|
+
const perspectiveModel = perspectiveGroupCreated.apply(undefined);
|
|
145
163
|
await this.modelStore.save(perspectiveModel);
|
|
146
|
-
if (
|
|
147
|
-
|
|
164
|
+
if (this.activityEventHandler) {
|
|
165
|
+
await this.activityEventHandler.createActivityLog(perspectiveGroupCreated, undefined, perspectiveModel);
|
|
148
166
|
}
|
|
149
167
|
}
|
|
150
168
|
}
|
|
151
|
-
if (this.activityEventHandler) {
|
|
152
|
-
await this.activityEventHandler.createActivityLog(event, existingModel, updatedModel);
|
|
153
|
-
}
|
|
154
169
|
return updatedModel;
|
|
155
170
|
}
|
|
156
171
|
async handleGroupNameChanged(event) {
|
|
157
172
|
const existingModel = await this.modelStore.getByStreamIdWhereDeletedIsFalse(event.streamId);
|
|
158
173
|
const updatedModel = event.apply(existingModel);
|
|
159
|
-
if (
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
174
|
+
if (this.shouldSkipSave(existingModel, updatedModel)) {
|
|
175
|
+
return existingModel;
|
|
176
|
+
}
|
|
177
|
+
await this.modelStore.save(updatedModel);
|
|
178
|
+
if (this.isClient) {
|
|
179
|
+
await this.groupEventStore.addEvent(event);
|
|
180
|
+
this.modelChangeEmitter?.emit("GroupModel", updatedModel);
|
|
181
|
+
if (this.activityEventHandler) {
|
|
182
|
+
await this.activityEventHandler.createActivityLog(event, existingModel, updatedModel);
|
|
163
183
|
}
|
|
164
184
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
185
|
+
else {
|
|
186
|
+
const allPerspectives = await this.modelStore.findAllByGroupIdAndDeletedIsFalse(updatedModel.groupId);
|
|
187
|
+
for (const perspective of allPerspectives) {
|
|
188
|
+
if (perspective.streamId !== event.streamId) {
|
|
189
|
+
const perspectiveEvent = new _1.GroupNameChanged({
|
|
190
|
+
eventId: (0, uuid_1.v4)(),
|
|
191
|
+
userId: perspective.userId,
|
|
192
|
+
name: event.name,
|
|
193
|
+
createdAt: new Date(),
|
|
194
|
+
createdBy: event.createdBy,
|
|
195
|
+
streamId: perspective.streamId,
|
|
196
|
+
version: perspective.version + 1,
|
|
197
|
+
systemGenerated: true,
|
|
198
|
+
});
|
|
199
|
+
const updatedPerspective = perspectiveEvent.apply(perspective);
|
|
200
|
+
await this.groupEventStore.addEvent(perspectiveEvent);
|
|
181
201
|
await this.modelStore.save(updatedPerspective);
|
|
182
|
-
if (
|
|
183
|
-
|
|
202
|
+
if (this.activityEventHandler) {
|
|
203
|
+
await this.activityEventHandler.createActivityLog(perspectiveEvent, perspective, updatedPerspective);
|
|
184
204
|
}
|
|
185
205
|
}
|
|
186
206
|
}
|
|
187
207
|
}
|
|
188
|
-
if (this.activityEventHandler) {
|
|
189
|
-
await this.activityEventHandler.createActivityLog(event, existingModel, updatedModel);
|
|
190
|
-
}
|
|
191
208
|
return updatedModel;
|
|
192
209
|
}
|
|
193
210
|
async handleGroupDescriptionChanged(event) {
|
|
194
211
|
const existingModel = await this.modelStore.getByStreamIdWhereDeletedIsFalse(event.streamId);
|
|
195
212
|
const updatedModel = event.apply(existingModel);
|
|
196
|
-
if (
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
213
|
+
if (this.shouldSkipSave(existingModel, updatedModel)) {
|
|
214
|
+
return existingModel;
|
|
215
|
+
}
|
|
216
|
+
await this.modelStore.save(updatedModel);
|
|
217
|
+
if (this.isClient) {
|
|
218
|
+
await this.groupEventStore.addEvent(event);
|
|
219
|
+
this.modelChangeEmitter?.emit("GroupModel", updatedModel);
|
|
220
|
+
if (this.activityEventHandler) {
|
|
221
|
+
await this.activityEventHandler.createActivityLog(event, existingModel, updatedModel);
|
|
200
222
|
}
|
|
201
223
|
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
224
|
+
else {
|
|
225
|
+
const allPerspectives = await this.modelStore.findAllByGroupIdAndDeletedIsFalse(updatedModel.groupId);
|
|
226
|
+
for (const perspective of allPerspectives) {
|
|
227
|
+
if (perspective.streamId !== event.streamId) {
|
|
228
|
+
const perspectiveEvent = new _1.GroupDescriptionChanged({
|
|
229
|
+
eventId: (0, uuid_1.v4)(),
|
|
230
|
+
userId: perspective.userId,
|
|
231
|
+
description: event.description,
|
|
232
|
+
createdAt: new Date(),
|
|
233
|
+
createdBy: event.createdBy,
|
|
234
|
+
streamId: perspective.streamId,
|
|
235
|
+
version: perspective.version + 1,
|
|
236
|
+
systemGenerated: true,
|
|
237
|
+
});
|
|
238
|
+
const updatedPerspective = perspectiveEvent.apply(perspective);
|
|
239
|
+
await this.groupEventStore.addEvent(perspectiveEvent);
|
|
218
240
|
await this.modelStore.save(updatedPerspective);
|
|
219
|
-
if (
|
|
220
|
-
|
|
241
|
+
if (this.activityEventHandler) {
|
|
242
|
+
await this.activityEventHandler.createActivityLog(perspectiveEvent, perspective, updatedPerspective);
|
|
221
243
|
}
|
|
222
244
|
}
|
|
223
245
|
}
|
|
224
246
|
}
|
|
225
|
-
if (this.activityEventHandler) {
|
|
226
|
-
await this.activityEventHandler.createActivityLog(event, existingModel, updatedModel);
|
|
227
|
-
}
|
|
228
247
|
return updatedModel;
|
|
229
248
|
}
|
|
230
249
|
async handleGroupMembersAdded(event) {
|
|
@@ -233,124 +252,170 @@ class GroupEventHandler {
|
|
|
233
252
|
throw new Error(`Group model not found for streamId ${event.streamId}`);
|
|
234
253
|
}
|
|
235
254
|
const updatedModel = event.apply(existingModel);
|
|
236
|
-
if (
|
|
237
|
-
|
|
238
|
-
if ((0, EventProcessorSDK_1.isSDKInitialized)()) {
|
|
239
|
-
EventProcessorSDK_1.EventProcessorSDK.getInstance().emitModelChange("GroupModel", updatedModel);
|
|
240
|
-
}
|
|
255
|
+
if (this.shouldSkipSave(existingModel, updatedModel)) {
|
|
256
|
+
return existingModel;
|
|
241
257
|
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
258
|
+
await this.modelStore.save(updatedModel);
|
|
259
|
+
if (this.isClient) {
|
|
260
|
+
await this.groupEventStore.addEvent(event);
|
|
261
|
+
this.modelChangeEmitter?.emit("GroupModel", updatedModel);
|
|
262
|
+
if (this.activityEventHandler) {
|
|
263
|
+
await this.activityEventHandler.createActivityLog(event, existingModel, updatedModel);
|
|
248
264
|
}
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
265
|
+
}
|
|
266
|
+
else {
|
|
267
|
+
const allMemberIds = updatedModel.members ?? [];
|
|
268
|
+
for (const memberId of event.members) {
|
|
269
|
+
const memberUser = await this.userModelStore.getByStreamIdWhereDeletedIsFalse(memberId);
|
|
270
|
+
if (!memberUser) {
|
|
271
|
+
console.log(`Member ${memberId} not found, skipping`);
|
|
272
|
+
continue;
|
|
252
273
|
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
userId: memberId,
|
|
258
|
-
groupId: existingModel.groupId,
|
|
259
|
-
name: existingModel.name,
|
|
260
|
-
description: existingModel.description,
|
|
261
|
-
members: updatedModel.members,
|
|
262
|
-
createdAt: new Date(),
|
|
263
|
-
createdBy: memberId,
|
|
264
|
-
streamId: perspectiveGroupStreamId,
|
|
265
|
-
version: 1,
|
|
266
|
-
systemGenerated: true,
|
|
267
|
-
});
|
|
268
|
-
await this.groupEventStore.addEvent(perspectiveGroupCreated);
|
|
269
|
-
const perspectiveModel = perspectiveGroupCreated.apply(undefined);
|
|
270
|
-
if (!this.shouldSkipSave(undefined, perspectiveModel)) {
|
|
271
|
-
await this.modelStore.save(perspectiveModel);
|
|
272
|
-
if ((0, EventProcessorSDK_1.isSDKInitialized)()) {
|
|
273
|
-
EventProcessorSDK_1.EventProcessorSDK.getInstance().emitModelChange("GroupModel", perspectiveModel);
|
|
274
|
+
for (const otherMemberId of allMemberIds) {
|
|
275
|
+
if (memberId !== otherMemberId) {
|
|
276
|
+
await this.ensureBidirectionalFriendship(memberId, otherMemberId, existingModel.groupId);
|
|
277
|
+
}
|
|
274
278
|
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
const allPerspectives = await this.modelStore.findAllByGroupIdAndDeletedIsFalse(updatedModel.groupId);
|
|
278
|
-
for (const perspective of allPerspectives) {
|
|
279
|
-
if (perspective.streamId !== event.streamId &&
|
|
280
|
-
!event.members.includes(perspective.userId)) {
|
|
281
|
-
const perspectiveEvent = new _1.GroupMembersAdded({
|
|
279
|
+
const perspectiveGroupStreamId = (0, uuid_1.v4)();
|
|
280
|
+
const perspectiveGroupCreated = new _1.GroupCreated({
|
|
282
281
|
eventId: (0, uuid_1.v4)(),
|
|
283
|
-
userId:
|
|
284
|
-
|
|
282
|
+
userId: memberId,
|
|
283
|
+
groupId: existingModel.groupId,
|
|
284
|
+
name: existingModel.name,
|
|
285
|
+
description: existingModel.description,
|
|
286
|
+
members: updatedModel.members,
|
|
285
287
|
createdAt: new Date(),
|
|
286
|
-
createdBy:
|
|
287
|
-
streamId:
|
|
288
|
-
version:
|
|
288
|
+
createdBy: memberId,
|
|
289
|
+
streamId: perspectiveGroupStreamId,
|
|
290
|
+
version: 1,
|
|
289
291
|
systemGenerated: true,
|
|
290
292
|
});
|
|
291
|
-
await this.groupEventStore.addEvent(
|
|
292
|
-
const
|
|
293
|
-
|
|
293
|
+
await this.groupEventStore.addEvent(perspectiveGroupCreated);
|
|
294
|
+
const perspectiveModel = perspectiveGroupCreated.apply(undefined);
|
|
295
|
+
await this.modelStore.save(perspectiveModel);
|
|
296
|
+
if (this.activityEventHandler) {
|
|
297
|
+
await this.activityEventHandler.createActivityLog(perspectiveGroupCreated, undefined, perspectiveModel);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
const allPerspectives = await this.modelStore.findAllByGroupIdAndDeletedIsFalse(updatedModel.groupId);
|
|
301
|
+
for (const perspective of allPerspectives) {
|
|
302
|
+
if (perspective.streamId !== event.streamId &&
|
|
303
|
+
!event.members.includes(perspective.userId)) {
|
|
304
|
+
const perspectiveEvent = new _1.GroupMembersAdded({
|
|
305
|
+
eventId: (0, uuid_1.v4)(),
|
|
306
|
+
userId: perspective.userId,
|
|
307
|
+
members: event.members,
|
|
308
|
+
createdAt: new Date(),
|
|
309
|
+
createdBy: event.createdBy,
|
|
310
|
+
streamId: perspective.streamId,
|
|
311
|
+
version: perspective.version + 1,
|
|
312
|
+
systemGenerated: true,
|
|
313
|
+
});
|
|
314
|
+
const updatedPerspective = perspectiveEvent.apply(perspective);
|
|
315
|
+
await this.groupEventStore.addEvent(perspectiveEvent);
|
|
294
316
|
await this.modelStore.save(updatedPerspective);
|
|
295
|
-
if (
|
|
296
|
-
|
|
317
|
+
if (this.activityEventHandler) {
|
|
318
|
+
await this.activityEventHandler.createActivityLog(perspectiveEvent, perspective, updatedPerspective);
|
|
297
319
|
}
|
|
298
320
|
}
|
|
299
321
|
}
|
|
300
322
|
}
|
|
301
|
-
if (this.activityEventHandler) {
|
|
302
|
-
await this.activityEventHandler.createActivityLog(event, existingModel, updatedModel);
|
|
303
|
-
}
|
|
304
323
|
return updatedModel;
|
|
305
324
|
}
|
|
306
325
|
async handleGroupMembersRemoved(event) {
|
|
307
326
|
const existingModel = await this.modelStore.getByStreamIdWhereDeletedIsFalse(event.streamId);
|
|
308
327
|
const updatedModel = event.apply(existingModel);
|
|
309
|
-
if (
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
328
|
+
if (this.shouldSkipSave(existingModel, updatedModel)) {
|
|
329
|
+
return existingModel;
|
|
330
|
+
}
|
|
331
|
+
await this.modelStore.save(updatedModel);
|
|
332
|
+
if (this.isClient) {
|
|
333
|
+
await this.groupEventStore.addEvent(event);
|
|
334
|
+
this.modelChangeEmitter?.emit("GroupModel", updatedModel);
|
|
335
|
+
if (this.activityEventHandler) {
|
|
336
|
+
await this.activityEventHandler.createActivityLog(event, existingModel, updatedModel);
|
|
313
337
|
}
|
|
314
338
|
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
339
|
+
else {
|
|
340
|
+
for (const removedMemberId of event.members) {
|
|
341
|
+
const removedMemberPerspective = await this.modelStore.findByUserIdAndGroupIdAndDeletedIsFalse(removedMemberId, updatedModel.groupId);
|
|
342
|
+
if (removedMemberPerspective) {
|
|
343
|
+
const deleteEvent = new _1.GroupDeleted({
|
|
344
|
+
eventId: (0, uuid_1.v4)(),
|
|
345
|
+
userId: removedMemberId,
|
|
346
|
+
createdAt: new Date(),
|
|
347
|
+
createdBy: event.createdBy,
|
|
348
|
+
streamId: removedMemberPerspective.streamId,
|
|
349
|
+
version: removedMemberPerspective.version + 1,
|
|
350
|
+
systemGenerated: true,
|
|
351
|
+
});
|
|
352
|
+
const deletedPerspective = deleteEvent.apply(removedMemberPerspective);
|
|
353
|
+
await this.groupEventStore.addEvent(deleteEvent);
|
|
354
|
+
await this.modelStore.save(deletedPerspective);
|
|
355
|
+
if (this.activityEventHandler) {
|
|
356
|
+
await this.activityEventHandler.createActivityLog(deleteEvent, removedMemberPerspective, deletedPerspective);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
const allPerspectives = await this.modelStore.findAllByGroupIdAndDeletedIsFalse(updatedModel.groupId);
|
|
361
|
+
for (const perspective of allPerspectives) {
|
|
362
|
+
if (perspective.streamId !== event.streamId) {
|
|
363
|
+
const perspectiveEvent = new _1.GroupMembersRemoved({
|
|
364
|
+
eventId: (0, uuid_1.v4)(),
|
|
365
|
+
userId: perspective.userId,
|
|
366
|
+
members: event.members,
|
|
367
|
+
createdAt: new Date(),
|
|
368
|
+
createdBy: event.createdBy,
|
|
369
|
+
streamId: perspective.streamId,
|
|
370
|
+
version: perspective.version + 1,
|
|
371
|
+
systemGenerated: true,
|
|
372
|
+
});
|
|
373
|
+
const updatedPerspective = perspectiveEvent.apply(perspective);
|
|
374
|
+
await this.groupEventStore.addEvent(perspectiveEvent);
|
|
331
375
|
await this.modelStore.save(updatedPerspective);
|
|
332
|
-
if (
|
|
333
|
-
|
|
376
|
+
if (this.activityEventHandler) {
|
|
377
|
+
await this.activityEventHandler.createActivityLog(perspectiveEvent, perspective, updatedPerspective);
|
|
334
378
|
}
|
|
335
379
|
}
|
|
336
380
|
}
|
|
337
381
|
}
|
|
338
|
-
if (this.activityEventHandler) {
|
|
339
|
-
await this.activityEventHandler.createActivityLog(event, existingModel, updatedModel);
|
|
340
|
-
}
|
|
341
382
|
return updatedModel;
|
|
342
383
|
}
|
|
343
384
|
async handleGroupDeleted(event) {
|
|
344
385
|
const existingModel = await this.modelStore.getByStreamIdWhereDeletedIsFalse(event.streamId);
|
|
345
386
|
const updatedModel = event.apply(existingModel);
|
|
346
|
-
if (
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
387
|
+
if (this.shouldSkipSave(existingModel, updatedModel)) {
|
|
388
|
+
return existingModel;
|
|
389
|
+
}
|
|
390
|
+
await this.modelStore.save(updatedModel);
|
|
391
|
+
if (this.isClient) {
|
|
392
|
+
await this.groupEventStore.addEvent(event);
|
|
393
|
+
this.modelChangeEmitter?.emit("GroupModel", updatedModel);
|
|
394
|
+
if (this.activityEventHandler) {
|
|
395
|
+
await this.activityEventHandler.createActivityLog(event, existingModel, updatedModel);
|
|
350
396
|
}
|
|
351
397
|
}
|
|
352
|
-
|
|
353
|
-
await this.
|
|
398
|
+
else {
|
|
399
|
+
const allPerspectives = await this.modelStore.findAllByGroupIdAndDeletedIsFalse(updatedModel.groupId);
|
|
400
|
+
for (const perspective of allPerspectives) {
|
|
401
|
+
if (perspective.streamId !== event.streamId) {
|
|
402
|
+
const perspectiveEvent = new _1.GroupDeleted({
|
|
403
|
+
eventId: (0, uuid_1.v4)(),
|
|
404
|
+
userId: perspective.userId,
|
|
405
|
+
createdAt: new Date(),
|
|
406
|
+
createdBy: event.createdBy,
|
|
407
|
+
streamId: perspective.streamId,
|
|
408
|
+
version: perspective.version + 1,
|
|
409
|
+
systemGenerated: true,
|
|
410
|
+
});
|
|
411
|
+
const updatedPerspective = perspectiveEvent.apply(perspective);
|
|
412
|
+
await this.groupEventStore.addEvent(perspectiveEvent);
|
|
413
|
+
await this.modelStore.save(updatedPerspective);
|
|
414
|
+
if (this.activityEventHandler) {
|
|
415
|
+
await this.activityEventHandler.createActivityLog(perspectiveEvent, perspective, updatedPerspective);
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
354
419
|
}
|
|
355
420
|
return updatedModel;
|
|
356
421
|
}
|
|
@@ -6,22 +6,19 @@ import { TransactionEventStore } from ".";
|
|
|
6
6
|
import { TransactionModelStore } from ".";
|
|
7
7
|
import { BaseEventHandler } from "./BaseEventHandler";
|
|
8
8
|
import { ActivityEventHandler } from "./ActivityEventHandler";
|
|
9
|
-
|
|
9
|
+
import { ModelChangeEmitter } from "./ModelChangeEmitter";
|
|
10
|
+
export declare class GroupTransactionEventHandler extends BaseEventHandler<GroupTransactionEvent> {
|
|
10
11
|
private modelStore;
|
|
11
12
|
private eventStore;
|
|
12
13
|
private groupModelStore;
|
|
13
14
|
private transactionEventStore;
|
|
14
15
|
private transactionModelStore;
|
|
15
16
|
private activityEventHandler?;
|
|
16
|
-
constructor(modelStore: GroupTransactionModelStore, eventStore: GroupTransactionEventStore, groupModelStore: GroupModelStore, transactionEventStore: TransactionEventStore, transactionModelStore: TransactionModelStore, activityEventHandler?: ActivityEventHandler | undefined);
|
|
17
|
-
|
|
17
|
+
constructor(modelStore: GroupTransactionModelStore, eventStore: GroupTransactionEventStore, groupModelStore: GroupModelStore, transactionEventStore: TransactionEventStore, transactionModelStore: TransactionModelStore, isClient: boolean, modelChangeEmitter?: ModelChangeEmitter, activityEventHandler?: ActivityEventHandler | undefined);
|
|
18
|
+
getModelStore(): GroupTransactionModelStore;
|
|
18
19
|
handleClientEventFromRemoteListener(event: GroupTransactionEvent): Promise<void>;
|
|
20
|
+
handleClientEventsFromRemoteListenerBulk(events: GroupTransactionEvent[]): Promise<void>;
|
|
19
21
|
handleEvent(event: GroupTransactionEvent): Promise<GroupTransactionModel>;
|
|
20
|
-
private calculateNetBalances;
|
|
21
|
-
private createFriendTransactions;
|
|
22
|
-
private updateFriendTransactions;
|
|
23
|
-
private calculateRequiredTransactions;
|
|
24
|
-
private updateExistingFriendTransactions;
|
|
25
22
|
handleGroupTransactionCreated(event: GroupTransactionCreated): Promise<GroupTransactionModel>;
|
|
26
23
|
handleGroupTransactionSplitDetailsChanged(event: GroupTransactionSplitDetailsChanged): Promise<GroupTransactionModel>;
|
|
27
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupTransactionEventHandler.d.ts","sourceRoot":"","sources":["../src/GroupTransactionEventHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,uBAAuB,EACvB,mCAAmC,EACnC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"GroupTransactionEventHandler.d.ts","sourceRoot":"","sources":["../src/GroupTransactionEventHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,uBAAuB,EACvB,mCAAmC,EACnC,qBAAqB,EACrB,qBAAqB,EAIxB,MAAM,GAAG,CAAC;AACX,OAAO,EAAE,0BAA0B,EAAE,MAAM,GAAG,CAAC;AAC/C,OAAO,EAAE,0BAA0B,EAAE,MAAM,GAAG,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,GAAG,CAAC;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,GAAG,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,GAAG,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,qBAAa,4BAA6B,SAAQ,gBAAgB,CAAC,qBAAqB,CAAC;IAEjF,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,eAAe;IACvB,OAAO,CAAC,qBAAqB;IAC7B,OAAO,CAAC,qBAAqB;IAG7B,OAAO,CAAC,oBAAoB,CAAC;gBAPrB,UAAU,EAAE,0BAA0B,EACtC,UAAU,EAAE,0BAA0B,EACtC,eAAe,EAAE,eAAe,EAChC,qBAAqB,EAAE,qBAAqB,EAC5C,qBAAqB,EAAE,qBAAqB,EACpD,QAAQ,EAAE,OAAO,EACjB,kBAAkB,CAAC,EAAE,kBAAkB,EAC/B,oBAAoB,CAAC,EAAE,oBAAoB,YAAA;IAKhD,aAAa,IAAI,0BAA0B;IAIrC,mCAAmC,CAC5C,KAAK,EAAE,qBAAqB,GAC7B,OAAO,CAAC,IAAI,CAAC;IAgBH,wCAAwC,CACjD,MAAM,EAAE,qBAAqB,EAAE,GAChC,OAAO,CAAC,IAAI,CAAC;IAuBV,WAAW,CACb,KAAK,EAAE,qBAAqB,GAC7B,OAAO,CAAC,qBAAqB,CAAC;IAsB3B,6BAA6B,CAC/B,KAAK,EAAE,uBAAuB,GAC/B,OAAO,CAAC,qBAAqB,CAAC;IA2B3B,yCAAyC,CAC3C,KAAK,EAAE,mCAAmC,GAC3C,OAAO,CAAC,qBAAqB,CAAC;CAgCpC"}
|