imio-sdk-lite 0.1.1

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 (75) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +1 -0
  3. package/dist/index.html +1 -0
  4. package/dist/main.d.ts +39 -0
  5. package/dist/main.d.ts.map +1 -0
  6. package/dist/main.js +3 -0
  7. package/dist/main.js.LICENSE.txt +8 -0
  8. package/dist/main.js.map +1 -0
  9. package/dist/src/Base.d.ts +47 -0
  10. package/dist/src/Base.d.ts.map +1 -0
  11. package/dist/src/Client.d.ts +83 -0
  12. package/dist/src/Client.d.ts.map +1 -0
  13. package/dist/src/Option.d.ts +22 -0
  14. package/dist/src/Option.d.ts.map +1 -0
  15. package/dist/src/entity/AccountUser.d.ts +15 -0
  16. package/dist/src/entity/AccountUser.d.ts.map +1 -0
  17. package/dist/src/entity/Contact.d.ts +26 -0
  18. package/dist/src/entity/Contact.d.ts.map +1 -0
  19. package/dist/src/entity/Group.d.ts +29 -0
  20. package/dist/src/entity/Group.d.ts.map +1 -0
  21. package/dist/src/entity/HostNode.d.ts +10 -0
  22. package/dist/src/entity/HostNode.d.ts.map +1 -0
  23. package/dist/src/entity/Member.d.ts +13 -0
  24. package/dist/src/entity/Member.d.ts.map +1 -0
  25. package/dist/src/entity/Message.d.ts +44 -0
  26. package/dist/src/entity/Message.d.ts.map +1 -0
  27. package/dist/src/entity/MessageSender.d.ts +79 -0
  28. package/dist/src/entity/MessageSender.d.ts.map +1 -0
  29. package/dist/src/entity/Status.d.ts +11 -0
  30. package/dist/src/entity/Status.d.ts.map +1 -0
  31. package/dist/src/listener/ClientListener.d.ts +42 -0
  32. package/dist/src/listener/ClientListener.d.ts.map +1 -0
  33. package/dist/src/listener/ContactListener.d.ts +10 -0
  34. package/dist/src/listener/ContactListener.d.ts.map +1 -0
  35. package/dist/src/listener/GroupListener.d.ts +10 -0
  36. package/dist/src/listener/GroupListener.d.ts.map +1 -0
  37. package/dist/src/listener/MessageListener.d.ts +23 -0
  38. package/dist/src/listener/MessageListener.d.ts.map +1 -0
  39. package/dist/src/manager/BaseManager.d.ts +9 -0
  40. package/dist/src/manager/BaseManager.d.ts.map +1 -0
  41. package/dist/src/manager/ChatManager.d.ts +46 -0
  42. package/dist/src/manager/ChatManager.d.ts.map +1 -0
  43. package/dist/src/manager/ContactManager.d.ts +72 -0
  44. package/dist/src/manager/ContactManager.d.ts.map +1 -0
  45. package/dist/src/manager/GroupManager.d.ts +166 -0
  46. package/dist/src/manager/GroupManager.d.ts.map +1 -0
  47. package/dist/src/manager/RoomManager.d.ts +9 -0
  48. package/dist/src/manager/RoomManager.d.ts.map +1 -0
  49. package/dist/src/manager/UserInfoManager.d.ts +39 -0
  50. package/dist/src/manager/UserInfoManager.d.ts.map +1 -0
  51. package/dist/src/protocol/Connect.d.ts +123 -0
  52. package/dist/src/protocol/Connect.d.ts.map +1 -0
  53. package/dist/src/protocol/ContactStatus.d.ts +95 -0
  54. package/dist/src/protocol/ContactStatus.d.ts.map +1 -0
  55. package/dist/src/protocol/Contacts.d.ts +205 -0
  56. package/dist/src/protocol/Contacts.d.ts.map +1 -0
  57. package/dist/src/protocol/Gateway.d.ts +108 -0
  58. package/dist/src/protocol/Gateway.d.ts.map +1 -0
  59. package/dist/src/protocol/Message.d.ts +237 -0
  60. package/dist/src/protocol/Message.d.ts.map +1 -0
  61. package/dist/src/protocol/MessageRemind.d.ts +115 -0
  62. package/dist/src/protocol/MessageRemind.d.ts.map +1 -0
  63. package/dist/src/protocol/MessageSign.d.ts +192 -0
  64. package/dist/src/protocol/MessageSign.d.ts.map +1 -0
  65. package/dist/src/protocol/Meta.d.ts +138 -0
  66. package/dist/src/protocol/Meta.d.ts.map +1 -0
  67. package/dist/src/protocol/Rooms.d.ts +226 -0
  68. package/dist/src/protocol/Rooms.d.ts.map +1 -0
  69. package/dist/src/protocol/UserStatus.d.ts +120 -0
  70. package/dist/src/protocol/UserStatus.d.ts.map +1 -0
  71. package/dist/src/protocol/Users.d.ts +120 -0
  72. package/dist/src/protocol/Users.d.ts.map +1 -0
  73. package/dist/src/protocol/google/protobuf/any.d.ts +1 -0
  74. package/dist/src/protocol/google/protobuf/any.d.ts.map +1 -0
  75. package/package.json +49 -0
@@ -0,0 +1,47 @@
1
+ import { RSocket } from "rsocket-core";
2
+ import { IMIOMessage } from "./entity/Message";
3
+ import { IMIOAccountUser } from "./entity/AccountUser";
4
+ import { IMIOContact } from "./entity/Contact";
5
+ import { IMIOMember } from "./entity/Member";
6
+ import { IMIOHostNode } from "./entity/HostNode";
7
+ import { IMIODeviceStatus } from "./entity/Status";
8
+ import { IMIOGroup } from "./entity/Group";
9
+ import { AxiosInstance } from "axios";
10
+ import { onlyour as MetaPB } from "./protocol/Meta";
11
+ import { onlyour as ContactPB } from "./protocol/Contacts";
12
+ import { onlyour as RoomPB } from "./protocol/Rooms";
13
+ import { onlyour as MessagePB } from "./protocol/Message";
14
+ import { onlyour as GatewayPB } from "./protocol/Gateway";
15
+ import { onlyour as UserStatusPB } from "./protocol/UserStatus";
16
+ export declare class IMIOBase {
17
+ protected static _version: number;
18
+ token: string;
19
+ protected tokenAppId: number;
20
+ pageSize: number;
21
+ protected account: IMIOAccountUser | null;
22
+ protected deviceId: string;
23
+ protected deviceName: string;
24
+ protected deviceModel: string;
25
+ protected ip: string;
26
+ protected country: string;
27
+ protected city: string;
28
+ getTokenAppId(): number;
29
+ readonly meta: MetaPB.imio.Meta;
30
+ protected axios?: AxiosInstance;
31
+ socket?: RSocket | null;
32
+ readonly contactList: Array<IMIOContact>;
33
+ protected getIP1(): void;
34
+ protected getIP3(): void;
35
+ protected getIP2(): void;
36
+ protected getJwtPayload(token: string): any;
37
+ protected decodeMetadata(buffer: Buffer): Map<string, any>;
38
+ protected buildRoute(routeName: string): Buffer;
39
+ protected buildDeviceStatus(proto: UserStatusPB.imio.UserStatus): IMIODeviceStatus;
40
+ protected buildGateway(proto: GatewayPB.imio.Gateway): IMIOHostNode;
41
+ protected buildContact(proto: ContactPB.imio.Contacts): IMIOContact;
42
+ protected buildMember(proto: ContactPB.imio.Contacts): IMIOMember;
43
+ protected buildGroup(proto: RoomPB.imio.Rooms): IMIOGroup;
44
+ protected buildMessage(proto: MessagePB.imio.Message): IMIOMessage;
45
+ private subtype;
46
+ }
47
+ //# sourceMappingURL=Base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Base.d.ts","sourceRoot":"","sources":["../../src/Base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AASrC,OAAO,EAAC,WAAW,EAAoC,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAC,WAAW,EAAoB,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAC,YAAY,EAAC,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAC,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAC,SAAS,EAAgB,MAAM,gBAAgB,CAAC;AACxD,OAAc,EAAQ,aAAa,EAAC,MAAM,OAAO,CAAC;AAElD,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,uBAAuB,CAAC;AAG9D,qBAAa,QAAQ;IAEjB,SAAS,CAAC,MAAM,CAAC,QAAQ,SAAM;IAExB,KAAK,SAAM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AAU,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,GAAG,SAAS;IAiCzD,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,OAAO,GAAI,WAAW;IAyFnE,OAAO,CAAC,OAAO;CAqBlB"}
@@ -0,0 +1,83 @@
1
+ import { IMIOClientOption } from "./Option";
2
+ import { IMIOBase } from "./Base";
3
+ import { IMIOClientConnectStatus, IMIOClientListener } from "./listener/ClientListener";
4
+ import { IMIOMessageListener } from "./listener/MessageListener";
5
+ import { IMIOContactListener } from "./listener/ContactListener";
6
+ export declare class IMIOClient extends IMIOBase {
7
+ private static instance;
8
+ private constructor();
9
+ static getInstance(): IMIOClient;
10
+ whitOption(option: IMIOClientOption): IMIOClient;
11
+ private userAgent;
12
+ private hostAddress;
13
+ private readonly hostNodeList;
14
+ protected option?: IMIOClientOption;
15
+ clientListener?: IMIOClientListener;
16
+ connectStatus: IMIOClientConnectStatus;
17
+ private retryTimer;
18
+ private connectStatusTimer;
19
+ private retryConnectNum;
20
+ private unexpectedly;
21
+ readonly messageListener: Array<Partial<IMIOMessageListener>>;
22
+ readonly contactListener: Array<Partial<IMIOContactListener>>;
23
+ setToken(token: string): IMIOClient;
24
+ /**
25
+ * 连接是否关闭
26
+ * 关闭 true
27
+ * 未关闭 false
28
+ */
29
+ isClose(): boolean;
30
+ getDeviceKey(): string;
31
+ getUserInfo(): Object | null;
32
+ /**
33
+ * 会过滤引用相等的
34
+ * @param listener
35
+ */
36
+ addMessageListener(listener: Partial<IMIOMessageListener>): void;
37
+ removeMessageListener(listener: Partial<IMIOMessageListener>): void;
38
+ /**
39
+ * 会过滤引用相等的
40
+ * @param listener
41
+ */
42
+ addContactListener(listener: Partial<IMIOContactListener>): void;
43
+ removeContactListener(listener: Partial<IMIOContactListener>): void;
44
+ disconnect(): IMIOClient;
45
+ /**
46
+ * 创建连接
47
+ * 通过连接创建一个用户
48
+ *
49
+ * @param accountId 用户唯一ID
50
+ * @param token TOKEN
51
+ * @param nickname 昵称
52
+ * @param clientListener 客户端监听者
53
+ */
54
+ connect(accountId: number, token: string, nickname: string, clientListener?: IMIOClientListener): IMIOClient;
55
+ private callSocket;
56
+ ping(): void;
57
+ /**
58
+ * 连接建立失败事件
59
+ * @param eventMessage
60
+ * @private
61
+ */
62
+ private connectErrorEvent;
63
+ /**
64
+ * 创建重试连接
65
+ * @private
66
+ */
67
+ private retryConnTimer;
68
+ /**
69
+ * 地址决策
70
+ * @private
71
+ */
72
+ private hostAddressProvider;
73
+ private routerParse;
74
+ private handleGateway;
75
+ private handleToMany;
76
+ private handelPong;
77
+ private handleContact;
78
+ private handleContactStatus;
79
+ private handleContactChange;
80
+ private handleNotice;
81
+ private handleMessage;
82
+ }
83
+ //# sourceMappingURL=Client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Client.d.ts","sourceRoot":"","sources":["../../src/Client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,UAAU,CAAC;AAY1C,OAAO,EAAC,QAAQ,EAAC,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAC,uBAAuB,EAAE,kBAAkB,EAAC,MAAM,2BAA2B,CAAC;AACtF,OAAO,EAAC,mBAAmB,EAAC,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAC,mBAAmB,EAAC,MAAM,4BAA4B,CAAC;AAwB/D,qBAAa,UAAW,SAAQ,QAAQ;IAGpC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAa;IAEpC,OAAO;WAKO,WAAW,IAAI,UAAU;IAsBhC,UAAU,CAAC,MAAM,EAAE,gBAAgB,GAAG,UAAU;IAiDvD,OAAO,CAAC,SAAS,CAAM;IAEvB,OAAO,CAAC,WAAW,CAAM;IAEzB,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA2B;IAExD,SAAS,CAAC,MAAO,CAAC,EAAE,gBAAgB,CAAC;IAE9B,cAAe,CAAC,EAAE,kBAAkB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IAiBrB,OAAO,CAAC,mBAAmB;IAmC3B,OAAO,CAAC,mBAAmB;IAuB3B,OAAO,CAAC,YAAY;IAiBpB,OAAO,CAAC,aAAa;CAyBxB"}
@@ -0,0 +1,22 @@
1
+ export declare class IMIOClientOption {
2
+ private _appId;
3
+ private _issuer;
4
+ private _host;
5
+ private _hosts;
6
+ private _debug;
7
+ private constructor();
8
+ static newBuilder(): IMIOClientOption;
9
+ whitAppId(appId: string): IMIOClientOption;
10
+ whitIssuer(issuer: string): IMIOClientOption;
11
+ whitHost(host: string): IMIOClientOption;
12
+ whitHosts(hosts: Array<string>): IMIOClientOption;
13
+ whitDebug(debug: boolean): IMIOClientOption;
14
+ build(): this;
15
+ get appId(): string;
16
+ get issuer(): string;
17
+ get host(): string;
18
+ set host(value: string);
19
+ get hosts(): Array<string>;
20
+ get debug(): boolean;
21
+ }
22
+ //# sourceMappingURL=Option.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Option.d.ts","sourceRoot":"","sources":["../../src/Option.ts"],"names":[],"mappings":"AAEA,qBAAa,gBAAgB;IAEzB,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,KAAK,CAAc;IAC3B,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,MAAM,CAAkB;IAEhC,OAAO;WAIO,UAAU,IAAK,gBAAgB;IAItC,SAAS,CAAC,KAAK,EAAE,MAAM,GAAI,gBAAgB;IAI3C,UAAU,CAAC,MAAM,EAAE,MAAM,GAAI,gBAAgB;IAI7C,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAI,gBAAgB;IAMzC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,GAAI,gBAAgB;IAKlD,SAAS,CAAC,KAAK,EAAE,OAAO,GAAI,gBAAgB;IAK5C,KAAK;IAKZ,IAAI,KAAK,IAAI,MAAM,CAElB;IAED,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,IAAI,IAAI,IAAI,MAAM,CAEjB;IAGD,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,EAErB;IAED,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,CAAC,CAEzB;IAED,IAAI,KAAK,IAAI,OAAO,CAEnB;CAEJ"}
@@ -0,0 +1,15 @@
1
+ export declare class IMIOAccountUser {
2
+ accountId: string;
3
+ account: string;
4
+ nickname: string;
5
+ email: string;
6
+ phone: number;
7
+ avatar: string;
8
+ roomId: number;
9
+ apply: number;
10
+ muted: number;
11
+ need: number;
12
+ lurk: number;
13
+ status: string;
14
+ }
15
+ //# sourceMappingURL=AccountUser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccountUser.d.ts","sourceRoot":"","sources":["../../../src/entity/AccountUser.ts"],"names":[],"mappings":"AAEA,qBAAa,eAAe;IAExB,SAAS,EAAE,MAAM,CAAM;IAEvB,OAAO,EAAE,MAAM,CAAM;IAErB,QAAQ,EAAE,MAAM,CAAM;IAEtB,KAAK,EAAE,MAAM,CAAM;IAEnB,KAAK,EAAE,MAAM,CAAK;IAElB,MAAM,EAAE,MAAM,CAAM;IAEpB,MAAM,EAAE,MAAM,CAAK;IAEnB,KAAK,EAAE,MAAM,CAAK;IAElB,KAAK,EAAE,MAAM,CAAK;IAElB,IAAI,EAAE,MAAM,CAAK;IAEjB,IAAI,EAAE,MAAM,CAAK;IAEjB,MAAM,EAAE,MAAM,CAAM;CAGvB"}
@@ -0,0 +1,26 @@
1
+ export declare class IMIOContact {
2
+ contactId: number;
3
+ userId: string;
4
+ joinId: number;
5
+ nickname: string;
6
+ username: string;
7
+ avatar: string;
8
+ status: IMIOContactStatus;
9
+ isGroup: boolean;
10
+ joinTime: string;
11
+ isMuted: boolean;
12
+ noise: number;
13
+ }
14
+ export declare enum IMIOContactNotice {
15
+ normal = 1,// 正常提醒
16
+ not_notify = 2,// 不通知
17
+ reject = 0
18
+ }
19
+ export declare enum IMIOContactStatus {
20
+ done = "",
21
+ offline = "offline",
22
+ online = "online",
23
+ online_busy = "online-busy",
24
+ online_leave = "online-leave"
25
+ }
26
+ //# sourceMappingURL=Contact.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Contact.d.ts","sourceRoot":"","sources":["../../../src/entity/Contact.ts"],"names":[],"mappings":"AAAA,qBAAa,WAAW;IACpB,SAAS,EAAG,MAAM,CAAK;IACvB,MAAM,EAAG,MAAM,CAAM;IACrB,MAAM,EAAG,MAAM,CAAK;IACpB,QAAQ,EAAG,MAAM,CAAM;IACvB,QAAQ,EAAG,MAAM,CAAM;IACvB,MAAM,EAAG,MAAM,CAAM;IACrB,MAAM,EAAG,iBAAiB,CAA0B;IACpD,OAAO,EAAE,OAAO,CAAS;IACzB,QAAQ,EAAE,MAAM,CAAM;IACtB,OAAO,EAAE,OAAO,CAAS;IACzB,KAAK,EAAE,MAAM,CAAK;CACrB;AAED,oBAAY,iBAAiB;IACzB,MAAM,IAAI,CAAE,OAAO;IACnB,UAAU,IAAI,CAAE,MAAM;IACtB,MAAM,IAAI;CACb;AACD,oBAAY,iBAAiB;IACzB,IAAI,KAAK;IACT,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,WAAW,gBAAgB;IAC3B,YAAY,iBAAiB;CAChC"}
@@ -0,0 +1,29 @@
1
+ import { IMIOMember } from "./Member";
2
+ export declare class IMIOGroup {
3
+ groupId: number;
4
+ joinId: number;
5
+ userId: string;
6
+ groupName: string;
7
+ groupNumber: string;
8
+ avatar: string;
9
+ members?: Array<IMIOMember>;
10
+ depict: string;
11
+ isGroup: boolean;
12
+ isTalk: boolean;
13
+ isMute: boolean;
14
+ isApproval: boolean;
15
+ isInviteApply: boolean;
16
+ isInvite: boolean;
17
+ isRevoke: boolean;
18
+ maxMember: number;
19
+ ask: string;
20
+ remark: string;
21
+ type: IMIOGroupType;
22
+ isLive: boolean;
23
+ }
24
+ export declare enum IMIOGroupType {
25
+ public = 1,
26
+ protected = 2,
27
+ private = 3
28
+ }
29
+ //# sourceMappingURL=Group.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Group.d.ts","sourceRoot":"","sources":["../../../src/entity/Group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AAEpC,qBAAa,SAAS;IAClB,OAAO,EAAE,MAAM,CAAK;IACpB,MAAM,EAAE,MAAM,CAAK;IACnB,MAAM,EAAE,MAAM,CAAM;IACpB,SAAS,EAAE,MAAM,CAAM;IACvB,WAAW,EAAE,MAAM,CAAM;IACzB,MAAM,EAAE,MAAM,CAAM;IACpB,OAAQ,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAa;IACzC,MAAM,EAAE,MAAM,CAAM;IACpB,OAAO,EAAE,OAAO,CAAS;IACzB,MAAM,EAAE,OAAO,CAAS;IACxB,MAAM,EAAE,OAAO,CAAS;IACxB,UAAU,EAAE,OAAO,CAAQ;IAC3B,aAAa,EAAE,OAAO,CAAQ;IAC9B,QAAQ,EAAE,OAAO,CAAQ;IACzB,QAAQ,EAAE,OAAO,CAAQ;IACzB,SAAS,EAAE,MAAM,CAAM;IACvB,GAAG,EAAE,MAAM,CAAM;IACjB,MAAM,EAAE,MAAM,CAAM;IACpB,IAAI,EAAE,aAAa,CAA2B;IAC9C,MAAM,EAAE,OAAO,CAAS;CAC3B;AAED,oBAAY,aAAa;IACrB,MAAM,IAAI;IACV,SAAS,IAAI;IACb,OAAO,IAAI;CAEd"}
@@ -0,0 +1,10 @@
1
+ export declare class IMIOHostNode {
2
+ name: string;
3
+ region: string;
4
+ host: string;
5
+ port: string;
6
+ max: number;
7
+ type: boolean;
8
+ current: number;
9
+ }
10
+ //# sourceMappingURL=HostNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HostNode.d.ts","sourceRoot":"","sources":["../../../src/entity/HostNode.ts"],"names":[],"mappings":"AAEA,qBAAa,YAAY;IACrB,IAAI,EAAC,MAAM,CAAM;IACjB,MAAM,EAAC,MAAM,CAAM;IACnB,IAAI,EAAC,MAAM,CAAM;IACjB,IAAI,EAAC,MAAM,CAAM;IACjB,GAAG,EAAC,MAAM,CAAK;IACf,IAAI,EAAC,OAAO,CAAQ;IACpB,OAAO,EAAE,MAAM,CAAK;CACvB"}
@@ -0,0 +1,13 @@
1
+ export declare class IMIOMember {
2
+ memberId: number;
3
+ joinId: number;
4
+ userId: string;
5
+ nickname: string;
6
+ username: string;
7
+ avatar: string;
8
+ role: string;
9
+ status: string;
10
+ joinTime: string;
11
+ isMuted: boolean;
12
+ }
13
+ //# sourceMappingURL=Member.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Member.d.ts","sourceRoot":"","sources":["../../../src/entity/Member.ts"],"names":[],"mappings":"AAAA,qBAAa,UAAU;IACnB,QAAQ,EAAG,MAAM,CAAK;IACtB,MAAM,EAAG,MAAM,CAAK;IACpB,MAAM,EAAG,MAAM,CAAM;IACrB,QAAQ,EAAG,MAAM,CAAM;IACvB,QAAQ,EAAG,MAAM,CAAM;IACvB,MAAM,EAAG,MAAM,CAAM;IACrB,IAAI,EAAG,MAAM,CAAM;IACnB,MAAM,EAAG,MAAM,CAAM;IACrB,QAAQ,EAAE,MAAM,CAAM;IACtB,OAAO,EAAE,OAAO,CAAS;CAE5B"}
@@ -0,0 +1,44 @@
1
+ export declare class IMIOMessage {
2
+ messageId: string;
3
+ joinId: number;
4
+ fromId: string;
5
+ fromName: string;
6
+ destId: string;
7
+ destName: string;
8
+ cite: string;
9
+ type: string;
10
+ title: string;
11
+ subtitle: string;
12
+ text: string;
13
+ secret: string;
14
+ thumb: string;
15
+ host: string;
16
+ url: string;
17
+ lng: string;
18
+ lat: string;
19
+ size: number;
20
+ length: number;
21
+ label: IMIOMessageLabel | null;
22
+ tag: string;
23
+ sent: string;
24
+ revoke: boolean;
25
+ talk: IMIOMessageTalk;
26
+ citeData: IMIOMessage | null;
27
+ sentDate: Date | null;
28
+ hintList: Array<IMIOMessage> | null;
29
+ notifyList: Array<IMIOMessage> | null;
30
+ quietlyList: Array<IMIOMessage> | null;
31
+ }
32
+ export declare enum IMIOMessageLabel {
33
+ tip = "tip",// 提示消息
34
+ notice = "notice",// 通知消息
35
+ action = "action",// 审批消息
36
+ notify = "notify",// 抄送消息
37
+ quietly = "quietly"
38
+ }
39
+ export declare enum IMIOMessageTalk {
40
+ default = 1,// 联系人
41
+ group = 2,// 群组
42
+ team = 3
43
+ }
44
+ //# sourceMappingURL=Message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../src/entity/Message.ts"],"names":[],"mappings":"AACA,qBAAa,WAAW;IACpB,SAAS,EAAC,MAAM,CAAM;IACtB,MAAM,EAAG,MAAM,CAAK;IACpB,MAAM,EAAE,MAAM,CAAM;IACpB,QAAQ,EAAE,MAAM,CAAM;IACtB,MAAM,EAAE,MAAM,CAAM;IACpB,QAAQ,EAAE,MAAM,CAAM;IACtB,IAAI,EAAE,MAAM,CAAM;IAClB,IAAI,EAAE,MAAM,CAAM;IAClB,KAAK,EAAE,MAAM,CAAM;IACnB,QAAQ,EAAE,MAAM,CAAM;IACtB,IAAI,EAAE,MAAM,CAAM;IAClB,MAAM,EAAE,MAAM,CAAM;IACpB,KAAK,EAAE,MAAM,CAAM;IACnB,IAAI,EAAE,MAAM,CAAM;IAClB,GAAG,EAAE,MAAM,CAAM;IACjB,GAAG,EAAE,MAAM,CAAM;IACjB,GAAG,EAAE,MAAM,CAAM;IACjB,IAAI,EAAC,MAAM,CAAK;IAChB,MAAM,EAAE,MAAM,CAAK;IACnB,KAAK,EAAE,gBAAgB,GAAG,IAAI,CAAQ;IACtC,GAAG,EAAE,MAAM,CAAM;IACjB,IAAI,EAAE,MAAM,CAAM;IAClB,MAAM,EAAE,OAAO,CAAS;IACxB,IAAI,EAAC,eAAe,CAA2B;IAC/C,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAQ;IACpC,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAQ;IAE7B,QAAQ,EAAC,KAAK,CAAC,WAAW,CAAC,GAAG,IAAI,CAAQ;IAC1C,UAAU,EAAC,KAAK,CAAC,WAAW,CAAC,GAAG,IAAI,CAAO;IAC3C,WAAW,EAAC,KAAK,CAAC,WAAW,CAAC,GAAG,IAAI,CAAO;CAC/C;AAED,oBAAY,gBAAgB;IACxB,GAAG,QAAQ,CAAE,OAAO;IACpB,MAAM,WAAW,CAAE,OAAO;IAC1B,MAAM,WAAW,CAAE,OAAO;IAC1B,MAAM,WAAW,CAAE,OAAO;IAC1B,OAAO,YAAY;CACtB;AAED,oBAAY,eAAe;IACvB,OAAO,IAAI,CAAE,MAAM;IACnB,KAAK,IAAI,CAAE,KAAK;IAChB,IAAI,IAAI;CACX"}
@@ -0,0 +1,79 @@
1
+ export declare class IMIOMessageSender {
2
+ messageId: string;
3
+ joinId: number;
4
+ cite: string;
5
+ readonly type: string;
6
+ title: string;
7
+ subtitle: string;
8
+ text: string;
9
+ secret: string;
10
+ thumb: string;
11
+ host: string;
12
+ url: string;
13
+ lng: string;
14
+ lat: string;
15
+ size: number;
16
+ length: number;
17
+ hintList: Array<IMIOMessageSenderHint> | null;
18
+ notifyList: Array<IMIOMessageSenderHint> | null;
19
+ quietlyList: Array<IMIOMessageSenderHint> | null;
20
+ constructor(type: string);
21
+ static buildSimpleText(joinId: number, text: string): IMIOMessageSender;
22
+ static buildImage(joinId: number, host: string, url: string, secret?: string): IMIOMessageSender;
23
+ static buildFile(joinId: number, host: string, url: string, filename: string, secret?: string): IMIOMessageSender;
24
+ static buildVideo(joinId: number, host: string, url: string, size: number, secret?: string): IMIOMessageSender;
25
+ static buildAudio(joinId: number, host: string, url: string, length: number, secret?: string): IMIOMessageSender;
26
+ /**
27
+ * 引用消息 的MessageID
28
+ * @param messageId
29
+ */
30
+ withCite(messageId: string): IMIOMessageSender;
31
+ withTitle(title: string): IMIOMessageSender;
32
+ withSubtitle(subtitle: string): IMIOMessageSender;
33
+ /**
34
+ * 文件 图片 密码参数,get传参 以 ? 开始
35
+ * @param secret
36
+ */
37
+ withSecret(secret: string): IMIOMessageSender;
38
+ /**
39
+ * 文件 图片 缩略图 完全地址
40
+ * @param thumb
41
+ */
42
+ withThumb(thumb: string): IMIOMessageSender;
43
+ /**
44
+ * 文件 图片 主机地址
45
+ * @param host
46
+ */
47
+ withHost(host: string): IMIOMessageSender;
48
+ /**
49
+ * 文件 图片 路径地址
50
+ * @param url
51
+ */
52
+ withUrl(url: string): IMIOMessageSender;
53
+ /**
54
+ * 文件 图片 大小 M
55
+ * @param size
56
+ */
57
+ withSize(size: number): IMIOMessageSender;
58
+ /**
59
+ * 语音时长
60
+ * @param length
61
+ */
62
+ withLength(length: number): IMIOMessageSender;
63
+ }
64
+ export declare class IMIOMessageSenderHint {
65
+ targetId: string;
66
+ targetName: string;
67
+ avatar: string;
68
+ }
69
+ export declare enum IMIOMessageType {
70
+ TEXT = "txt",
71
+ IMG = "img",
72
+ AUDIO = "audio",
73
+ VIDEO = "video",
74
+ FILE = "file",
75
+ LOC = "loc",
76
+ WALLET = "wallet",
77
+ CUSTOM = "custom"
78
+ }
79
+ //# sourceMappingURL=MessageSender.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageSender.d.ts","sourceRoot":"","sources":["../../../src/entity/MessageSender.ts"],"names":[],"mappings":"AACA,qBAAa,iBAAiB;IAE1B,SAAS,EAAC,MAAM,CAAM;IACtB,MAAM,EAAG,MAAM,CAAK;IAGpB,IAAI,EAAE,MAAM,CAAM;IAClB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAM;IAC3B,KAAK,EAAE,MAAM,CAAM;IACnB,QAAQ,EAAE,MAAM,CAAM;IACtB,IAAI,EAAE,MAAM,CAAM;IAClB,MAAM,EAAE,MAAM,CAAM;IACpB,KAAK,EAAE,MAAM,CAAM;IACnB,IAAI,EAAE,MAAM,CAAM;IAClB,GAAG,EAAE,MAAM,CAAM;IACjB,GAAG,EAAE,MAA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K,EAAE,MAAM,GAAG,iBAAiB;IAQlD;;;OAGG;IACI,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB;IAWhD;;;OAGG;IACI,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB;IAQ9C;;;OAGG;IACI,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB;IAWhD;;;OAGG;IACI,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,iBAAiB;CAQvD;AAED,qBAAa,qBAAqB;IAC9B,QAAQ,EAAE,MAAM,CAAM;IACtB,UAAU,EAAE,MAAM,CAAM;IACxB,MAAM,EAAE,MAAM,CAAM;CACvB;AAED,oBAAY,eAAe;IACvB,IAAI,QAAQ;IACZ,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,KAAK,UAAU;IACf,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,MAAM,WAAW;CAEpB"}
@@ -0,0 +1,11 @@
1
+ export declare class IMIODeviceStatus {
2
+ deviceId: string;
3
+ deviceKey: string;
4
+ deviceTag: string;
5
+ userId: string;
6
+ joinId: number;
7
+ status: string;
8
+ region: string;
9
+ gateway: string;
10
+ }
11
+ //# sourceMappingURL=Status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Status.d.ts","sourceRoot":"","sources":["../../../src/entity/Status.ts"],"names":[],"mappings":"AAEA,qBAAa,gBAAgB;IACzB,QAAQ,EAAC,MAAM,CAAM;IACrB,SAAS,EAAC,MAAM,CAAM;IACtB,SAAS,EAAC,MAAM,CAAM;IACtB,MAAM,EAAC,MAAM,CAAM;IACnB,MAAM,EAAC,MAAM,CAAK;IAClB,MAAM,EAAE,MAAM,CAAM;IACpB,MAAM,EAAE,MAAM,CAAM;IACpB,OAAO,EAAE,MAAM,CAAM;CACxB"}
@@ -0,0 +1,42 @@
1
+ export interface IMIOClientListener {
2
+ /**
3
+ * 客户端已连接
4
+ */
5
+ onConnected(): void;
6
+ /**
7
+ * 连接中的状态
8
+ * @param status IMIOClientStatus
9
+ * @param retry 发起或重试次数,0 为链接发起
10
+ */
11
+ onConnectStatus(status: IMIOClientConnectStatus, retry: number): void;
12
+ /**
13
+ * token 过期事件
14
+ */
15
+ onTokenExpired(): void;
16
+ onDisconnected(): void;
17
+ }
18
+ export declare enum IMIOClientConnectStatus {
19
+ DONE = 0,// 初始状态
20
+ ERROR = -1,// 服务器错误 //
21
+ CONNECTING = 1,// 连接中
22
+ SUCCESS_PULL = 2,// 连接成功,数据拉取中
23
+ SUCCESS = 3,// 成功在线
24
+ RETRY_CONNECTING = 4,// 建立连接重试中
25
+ TOKEN_EXPIRED = 5
26
+ }
27
+ export declare enum IMIOClientStatus {
28
+ ERROR = 0,// 连接错误
29
+ CONNECT = 1,// 连接中
30
+ PULL = 2,// 数据拉取中
31
+ SUCCESS = 3,// 成功在线
32
+ OFFLINE = 4
33
+ }
34
+ export declare enum IMIOSystemMessage {
35
+ APPLY = 1,// 申请
36
+ APPLY_RESOLVE = 2,// 申请被处理
37
+ APPLY_AGREE = 3,// 申请已同意
38
+ APPLY_REJECT = 4,// 申请已拒绝
39
+ ROOM_EXIT = 5,// 群成员退出
40
+ ROOM_DISSOLVE = 6
41
+ }
42
+ //# sourceMappingURL=ClientListener.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClientListener.d.ts","sourceRoot":"","sources":["../../../src/listener/ClientListener.ts"],"names":[],"mappings":"AAEI,MAAM,WAAW,kBAAkB;IAC/B;;OAEG;IACH,WAAW,IAAI,IAAI,CAAA;IAEnB;;;;OAIG;IACH,eAAe,CAAC,MAAM,EAAC,uBAAuB,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IAEpE;;OAEG;IACH,cAAc,IAAI,IAAI,CAAA;IAGtB,cAAc,IAAI,IAAI,CAAA;CACzB;AAED,oBAAY,uBAAuB;IAC/B,IAAI,IAAI,CAAE,OAAO;IACjB,KAAK,KAAK,CAAE,WAAW;IACvB,UAAU,IAAI,CAAE,MAAM;IACtB,YAAY,IAAI,CAAE,aAAa;IAC/B,OAAO,IAAI,CAAE,QAAQ;IACrB,gBAAgB,IAAI,CAAE,UAAU;IAChC,aAAa,IAAI;CACpB;AAED,oBAAY,gBAAgB;IACxB,KAAK,IAAI,CAAE,OAAO;IAClB,OAAO,IAAI,CAAE,MAAM;IACnB,IAAI,IAAI,CAAE,QAAQ;IAClB,OAAO,IAAI,CAAE,QAAQ;IACrB,OAAO,IAAI;CACd;AAED,oBAAY,iBAAiB;IACzB,KAAK,IAAI,CAAE,KAAK;IAChB,aAAa,IAAI,CAAE,QAAQ;IAC3B,WAAW,IAAI,CAAE,QAAQ;IACzB,YAAY,IAAI,CAAE,SAAS;IAC3B,SAAS,IAAE,CAAE,QAAQ;IACrB,aAAa,IAAE;CAClB"}
@@ -0,0 +1,10 @@
1
+ import { IMIOContact } from "../entity/Contact";
2
+ export interface IMIOContactListener {
3
+ /**
4
+ * 联系人变化通知
5
+ * @param isDelete 是增加还是删除
6
+ * @param contact 联系人
7
+ */
8
+ onContactChange(isDelete: boolean, contact: IMIOContact): void;
9
+ }
10
+ //# sourceMappingURL=ContactListener.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContactListener.d.ts","sourceRoot":"","sources":["../../../src/listener/ContactListener.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAE9C,MAAM,WAAW,mBAAmB;IAEhC;;;;OAIG;IACH,eAAe,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,GAAE,IAAI,CAAC;CAEjE"}
@@ -0,0 +1,10 @@
1
+ import { IMIOContact } from "../entity/Contact";
2
+ export interface IMIOGroupListener {
3
+ /**
4
+ * 联系人变化通知
5
+ * @param isDelete 是增加还是删除
6
+ * @param contact 联系人
7
+ */
8
+ onContactChange(isDelete: boolean, contact: IMIOContact): void;
9
+ }
10
+ //# sourceMappingURL=GroupListener.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GroupListener.d.ts","sourceRoot":"","sources":["../../../src/listener/GroupListener.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAE9C,MAAM,WAAW,iBAAiB;IAE9B;;;;OAIG;IACH,eAAe,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,GAAE,IAAI,CAAC;CAEjE"}
@@ -0,0 +1,23 @@
1
+ import { IMIOMessage } from "../entity/Message";
2
+ export interface IMIOMessageListener {
3
+ /**
4
+ * 系统通知
5
+ * message.label 有2种类型
6
+ * IMIOMessageLabel.notice 和 IMIOMessageLabel.action
7
+ */
8
+ onNotice(message: IMIOMessage): void;
9
+ onMessage(message: IMIOMessage): void;
10
+ /**
11
+ * 消息撤销
12
+ * @param joinId joinId
13
+ * @param messageId 撤销的消息
14
+ */
15
+ onMessageRevoke(joinId: number, messageId: string): void;
16
+ /**
17
+ * 对方已读消息
18
+ * @param joinId joinId
19
+ * @param messageId 对方已读消息
20
+ */
21
+ onMessageRead(joinId: number, messageId: string): void;
22
+ }
23
+ //# sourceMappingURL=MessageListener.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageListener.d.ts","sourceRoot":"","sources":["../../../src/listener/MessageListener.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAG9C,MAAM,WAAW,mBAAmB;IAEhC;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAAA;IAGpC,SAAS,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAAA;IAErC;;;;OAIG;IACH,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IAExD;;;;OAIG;IACH,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;CAIzD"}
@@ -0,0 +1,9 @@
1
+ import { IMIOBase } from "../Base";
2
+ export declare class IMIOBaseManager extends IMIOBase {
3
+ /**
4
+ * socket建立后 请求不用携带token,
5
+ * 但是token过期后请求会错误,请求携带着token,及时建立连接时过期了也可以访问(token及时被交换的情况下)
6
+ */
7
+ buildRoute(routeName: string, token?: string): Buffer;
8
+ }
9
+ //# sourceMappingURL=BaseManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseManager.d.ts","sourceRoot":"","sources":["../../../src/manager/BaseManager.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAGjC,qBAAa,eAAiB,SAAQ,QAAQ;IAI1C;;;OAGG;IACI,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,GAAE,MAAW,GAAG,MAAM;CAcnE"}
@@ -0,0 +1,46 @@
1
+ import { IMIOClient } from "../Client";
2
+ import { IMIOBaseManager } from "./BaseManager";
3
+ import { IMIOMessageSender } from "../entity/MessageSender";
4
+ import { IMIOMessage } from "../entity/Message";
5
+ export declare class IMIOChatManager extends IMIOBaseManager {
6
+ private static instance;
7
+ imioClient: IMIOClient | null;
8
+ private constructor();
9
+ static getInstance(): IMIOChatManager;
10
+ setClient(client: IMIOClient): IMIOChatManager;
11
+ /**
12
+ * 非好友关系,私聊
13
+ * @param joinId 来源群聊的ID
14
+ * @param userId 聊天的对象
15
+ * @param sender
16
+ * @param sender.joinId 新创建joinId。 IMIOGroupManager.createDialogue 返回值
17
+ */
18
+ dialogue(joinId: number, userId: string, sender: IMIOMessageSender): Promise<any>;
19
+ oneToOne(sender: IMIOMessageSender): Promise<any>;
20
+ oneToMany(sender: IMIOMessageSender): Promise<any>;
21
+ /**
22
+ * 签收消息
23
+ * @param messageId
24
+ * @param joinId
25
+ */
26
+ signMessage(messageId: string, joinId: number): Promise<any>;
27
+ /**
28
+ * 已读消息
29
+ * @param messageId
30
+ * @param joinId
31
+ */
32
+ readMessage(messageId: string, joinId: number): Promise<any>;
33
+ /**
34
+ * 删除消息
35
+ * @param messageId
36
+ * @param joinId
37
+ */
38
+ deleteMessage(messageId: string, joinId: number): Promise<any>;
39
+ getMessageList(joinId: number, page?: number, pageSize?: number): Promise<Array<IMIOMessage>>;
40
+ private senderBuildMessage;
41
+ private buildMessageProto;
42
+ private messageType;
43
+ private onError;
44
+ private checkSocket;
45
+ }
46
+ //# sourceMappingURL=ChatManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatManager.d.ts","sourceRoot":"","sources":["../../../src/manager/ChatManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,WAAW,CAAC;AACrC,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAK9C,OAAO,EAAC,iBAAiB,EAAC,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAc9C,qBAAa,eAAgB,SAAQ,eAAe;IAEhD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAkB;IAElC,UAAU,EAAE,UAAU,GAAG,IAAI,CAAQ;IAE5C,OAAO;WAIO,WAAW,IAAI,eAAe;IAOrC,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,eAAe;IAOrD;;;;;;OAMG;IACI,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAC,MAAM,EAAC,MAAM,EAAE,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,GAAG,CAAC;IA2C/E,QAAQ,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,GAAG,CAAC;IAqDjD,SAAS,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,GAAG,CAAC;IAmDzD;;;;OAIG;IACI,WAAW,CAAC,SAAS,EAAC,MAAM,EAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IA2CjE;;;;OAIG;IACI,WAAW,CAAC,SAAS,EA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