polfan-server-js-client 0.1.99922 → 0.1.99923
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/.gitmodules +3 -3
- package/.idea/deployment.xml +1 -8
- package/.idea/workspace.xml +142 -0
- package/build/index.js +149 -8
- package/build/index.js.map +1 -1
- package/build/types/AbstractChatClient.d.ts +114 -108
- package/build/types/AbstractRestClient.d.ts +21 -21
- package/build/types/AuthClient.d.ts +16 -16
- package/build/types/EventTarget.d.ts +18 -18
- package/build/types/FilesClient.d.ts +15 -15
- package/build/types/IndexedObjectCollection.d.ts +56 -56
- package/build/types/Permissions.d.ts +69 -69
- package/build/types/WebApiChatClient.d.ts +30 -30
- package/build/types/WebSocketChatClient.d.ts +38 -38
- package/build/types/index.d.ts +9 -9
- package/build/types/state-tracker/AsyncUtils.d.ts +15 -15
- package/build/types/state-tracker/ChatStateTracker.d.ts +31 -26
- package/build/types/state-tracker/EmoticonsManager.d.ts +15 -0
- package/build/types/state-tracker/MessagesManager.d.ts +55 -55
- package/build/types/state-tracker/PermissionsManager.d.ts +42 -42
- package/build/types/state-tracker/RoomMessagesHistory.d.ts +17 -17
- package/build/types/state-tracker/RoomsManager.d.ts +53 -53
- package/build/types/state-tracker/SpacesManager.d.ts +52 -52
- package/build/types/state-tracker/TopicHistoryWindow.d.ts +75 -75
- package/build/types/state-tracker/functions.d.ts +2 -2
- package/build/types/types/src/index.d.ts +102 -95
- package/build/types/types/src/schemes/ChatLocation.d.ts +5 -5
- package/build/types/types/src/schemes/Emoticon.d.ts +8 -0
- package/build/types/types/src/schemes/Envelope.d.ts +5 -5
- package/build/types/types/src/schemes/FollowedTopic.d.ts +6 -6
- package/build/types/types/src/schemes/Message.d.ts +13 -13
- package/build/types/types/src/schemes/PermissionOverwritesValue.d.ts +4 -4
- package/build/types/types/src/schemes/Role.d.ts +6 -6
- package/build/types/types/src/schemes/Room.d.ts +16 -16
- package/build/types/types/src/schemes/RoomMember.d.ts +7 -7
- package/build/types/types/src/schemes/RoomSummary.d.ts +5 -5
- package/build/types/types/src/schemes/Space.d.ts +13 -13
- package/build/types/types/src/schemes/SpaceMember.d.ts +5 -5
- package/build/types/types/src/schemes/SpaceSummary.d.ts +7 -7
- package/build/types/types/src/schemes/Topic.d.ts +8 -8
- package/build/types/types/src/schemes/User.d.ts +8 -8
- package/build/types/types/src/schemes/UserState.d.ts +6 -6
- package/build/types/types/src/schemes/commands/Ack.d.ts +5 -5
- package/build/types/types/src/schemes/commands/AssignRole.d.ts +6 -6
- package/build/types/types/src/schemes/commands/CreateEmoticon.d.ts +5 -0
- package/build/types/types/src/schemes/commands/CreateMessage.d.ts +6 -6
- package/build/types/types/src/schemes/commands/CreateOwner.d.ts +5 -5
- package/build/types/types/src/schemes/commands/CreateRole.d.ts +5 -5
- package/build/types/types/src/schemes/commands/CreateRoom.d.ts +8 -8
- package/build/types/types/src/schemes/commands/CreateSpace.d.ts +3 -3
- package/build/types/types/src/schemes/commands/CreateTopic.d.ts +8 -8
- package/build/types/types/src/schemes/commands/DeassignRole.d.ts +6 -6
- package/build/types/types/src/schemes/commands/DeleteEmoticon.d.ts +3 -0
- package/build/types/types/src/schemes/commands/DeleteOwner.d.ts +5 -5
- package/build/types/types/src/schemes/commands/DeleteRole.d.ts +4 -4
- package/build/types/types/src/schemes/commands/DeleteRoom.d.ts +3 -3
- package/build/types/types/src/schemes/commands/DeleteSpace.d.ts +3 -3
- package/build/types/types/src/schemes/commands/DeleteTopic.d.ts +4 -4
- package/build/types/types/src/schemes/commands/FollowTopic.d.ts +4 -4
- package/build/types/types/src/schemes/commands/GetComputedPermissions.d.ts +4 -4
- package/build/types/types/src/schemes/commands/GetDiscoverableSpaces.d.ts +2 -2
- package/build/types/types/src/schemes/commands/GetEmoticons.d.ts +3 -0
- package/build/types/types/src/schemes/commands/GetFollowedTopics.d.ts +4 -4
- package/build/types/types/src/schemes/commands/GetMessages.d.ts +6 -6
- package/build/types/types/src/schemes/commands/GetOwners.d.ts +4 -4
- package/build/types/types/src/schemes/commands/GetPermissionOverwriteTargets.d.ts +4 -4
- package/build/types/types/src/schemes/commands/GetPermissionOverwrites.d.ts +6 -6
- package/build/types/types/src/schemes/commands/GetRoomMembers.d.ts +3 -3
- package/build/types/types/src/schemes/commands/GetSession.d.ts +2 -2
- package/build/types/types/src/schemes/commands/GetSpaceMembers.d.ts +3 -3
- package/build/types/types/src/schemes/commands/GetSpaceRooms.d.ts +3 -3
- package/build/types/types/src/schemes/commands/GetTopics.d.ts +4 -4
- package/build/types/types/src/schemes/commands/JoinRoom.d.ts +3 -3
- package/build/types/types/src/schemes/commands/JoinSpace.d.ts +3 -3
- package/build/types/types/src/schemes/commands/LeaveRoom.d.ts +3 -3
- package/build/types/types/src/schemes/commands/LeaveSpace.d.ts +3 -3
- package/build/types/types/src/schemes/commands/SetPermissionOverwrites.d.ts +8 -8
- package/build/types/types/src/schemes/commands/UnfollowTopic.d.ts +4 -4
- package/build/types/types/src/schemes/commands/UpdateRole.d.ts +7 -7
- package/build/types/types/src/schemes/commands/UpdateRoom.d.ts +6 -6
- package/build/types/types/src/schemes/commands/UpdateSpace.d.ts +11 -9
- package/build/types/types/src/schemes/commands/UpdateTopic.d.ts +5 -5
- package/build/types/types/src/schemes/events/Bye.d.ts +3 -3
- package/build/types/types/src/schemes/events/ComputedPermissions.d.ts +5 -5
- package/build/types/types/src/schemes/events/DiscoverableSpaces.d.ts +4 -4
- package/build/types/types/src/schemes/events/EmoticonDeleted.d.ts +4 -0
- package/build/types/types/src/schemes/events/Emoticons.d.ts +6 -0
- package/build/types/types/src/schemes/events/Error.d.ts +4 -4
- package/build/types/types/src/schemes/events/FollowedTopicUpdated.d.ts +4 -4
- package/build/types/types/src/schemes/events/FollowedTopics.d.ts +6 -6
- package/build/types/types/src/schemes/events/Messages.d.ts +6 -6
- package/build/types/types/src/schemes/events/NewEmoticon.d.ts +4 -0
- package/build/types/types/src/schemes/events/NewMessage.d.ts +4 -4
- package/build/types/types/src/schemes/events/NewRole.d.ts +5 -5
- package/build/types/types/src/schemes/events/NewRoom.d.ts +5 -5
- package/build/types/types/src/schemes/events/NewTopic.d.ts +5 -5
- package/build/types/types/src/schemes/events/Ok.d.ts +2 -2
- package/build/types/types/src/schemes/events/Owners.d.ts +8 -8
- package/build/types/types/src/schemes/events/PermissionOverwriteTargets.d.ts +10 -10
- package/build/types/types/src/schemes/events/PermissionOverwrites.d.ts +8 -8
- package/build/types/types/src/schemes/events/PermissionOverwritesUpdated.d.ts +8 -8
- package/build/types/types/src/schemes/events/RoleDeleted.d.ts +4 -4
- package/build/types/types/src/schemes/events/RoleUpdated.d.ts +5 -5
- package/build/types/types/src/schemes/events/RoomDeleted.d.ts +3 -3
- package/build/types/types/src/schemes/events/RoomJoined.d.ts +4 -4
- package/build/types/types/src/schemes/events/RoomLeft.d.ts +3 -3
- package/build/types/types/src/schemes/events/RoomMemberJoined.d.ts +5 -5
- package/build/types/types/src/schemes/events/RoomMemberLeft.d.ts +4 -4
- package/build/types/types/src/schemes/events/RoomMemberUpdated.d.ts +6 -6
- package/build/types/types/src/schemes/events/RoomMembers.d.ts +5 -5
- package/build/types/types/src/schemes/events/RoomUpdated.d.ts +4 -4
- package/build/types/types/src/schemes/events/Session.d.ts +7 -7
- package/build/types/types/src/schemes/events/SpaceDeleted.d.ts +3 -3
- package/build/types/types/src/schemes/events/SpaceJoined.d.ts +4 -4
- package/build/types/types/src/schemes/events/SpaceLeft.d.ts +3 -3
- package/build/types/types/src/schemes/events/SpaceMemberJoined.d.ts +5 -5
- package/build/types/types/src/schemes/events/SpaceMemberLeft.d.ts +4 -4
- package/build/types/types/src/schemes/events/SpaceMemberUpdated.d.ts +6 -6
- package/build/types/types/src/schemes/events/SpaceMembers.d.ts +5 -5
- package/build/types/types/src/schemes/events/SpaceRooms.d.ts +5 -5
- package/build/types/types/src/schemes/events/SpaceUpdated.d.ts +4 -4
- package/build/types/types/src/schemes/events/TopicDeleted.d.ts +4 -4
- package/build/types/types/src/schemes/events/TopicFollowed.d.ts +4 -4
- package/build/types/types/src/schemes/events/TopicUnfollowed.d.ts +4 -4
- package/build/types/types/src/schemes/events/TopicUpdated.d.ts +6 -6
- package/build/types/types/src/schemes/events/Topics.d.ts +6 -6
- package/build/types/types/src/schemes/events/UserUpdated.d.ts +4 -4
- package/jest.config.ts +199 -199
- package/package.json +1 -1
- package/src/AbstractChatClient.ts +17 -2
- package/src/AuthClient.ts +45 -45
- package/src/EventTarget.ts +48 -48
- package/src/IndexedObjectCollection.ts +225 -225
- package/src/WebApiChatClient.ts +94 -94
- package/src/WebSocketChatClient.ts +131 -131
- package/src/index.ts +22 -22
- package/src/state-tracker/ChatStateTracker.ts +46 -41
- package/src/state-tracker/EmoticonsManager.ts +67 -0
- package/src/state-tracker/RoomMessagesHistory.ts +73 -73
- package/src/types/src/index.ts +14 -0
- package/src/types/src/schemes/Emoticon.ts +9 -0
- package/src/types/src/schemes/commands/CreateEmoticon.ts +5 -0
- package/src/types/src/schemes/commands/DeleteEmoticon.ts +3 -0
- package/src/types/src/schemes/commands/GetEmoticons.ts +3 -0
- package/src/types/src/schemes/commands/UpdateSpace.ts +3 -0
- package/src/types/src/schemes/events/EmoticonDeleted.ts +4 -0
- package/src/types/src/schemes/events/Emoticons.ts +7 -0
- package/src/types/src/schemes/events/NewEmoticon.ts +5 -0
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/php.xml +0 -18
- package/.idea/polfan-server-js-client.iml +0 -10
package/.gitmodules
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
[submodule "src/types"]
|
|
2
|
-
path = src/types
|
|
3
|
-
url = https://github.com/szado/pserv-ts-types
|
|
1
|
+
[submodule "src/types"]
|
|
2
|
+
path = src/types
|
|
3
|
+
url = https://github.com/szado/pserv-ts-types
|
package/.idea/deployment.xml
CHANGED
|
@@ -2,14 +2,7 @@
|
|
|
2
2
|
<project version="4">
|
|
3
3
|
<component name="PublishConfigData" remoteFilesAllowedToDisappearOnAutoupload="false">
|
|
4
4
|
<serverData>
|
|
5
|
-
<paths name="
|
|
6
|
-
<serverdata>
|
|
7
|
-
<mappings>
|
|
8
|
-
<mapping local="$PROJECT_DIR$" web="/" />
|
|
9
|
-
</mappings>
|
|
10
|
-
</serverdata>
|
|
11
|
-
</paths>
|
|
12
|
-
<paths name="sklep.local">
|
|
5
|
+
<paths name="Local or mounted folder">
|
|
13
6
|
<serverdata>
|
|
14
7
|
<mappings>
|
|
15
8
|
<mapping local="$PROJECT_DIR$" web="/" />
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="AutoImportSettings">
|
|
4
|
+
<option name="autoReloadType" value="SELECTIVE" />
|
|
5
|
+
</component>
|
|
6
|
+
<component name="ChangeListManager">
|
|
7
|
+
<list default="true" id="831dae43-0da1-47fd-a5f7-33dd5eec2992" name="Changes" comment="Emoticons support" />
|
|
8
|
+
<option name="SHOW_DIALOG" value="false" />
|
|
9
|
+
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
10
|
+
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
11
|
+
<option name="LAST_RESOLUTION" value="IGNORE" />
|
|
12
|
+
</component>
|
|
13
|
+
<component name="ComposerSettings">
|
|
14
|
+
<execution />
|
|
15
|
+
</component>
|
|
16
|
+
<component name="Git.Settings">
|
|
17
|
+
<option name="RECENT_BRANCH_BY_REPOSITORY">
|
|
18
|
+
<map>
|
|
19
|
+
<entry key="$PROJECT_DIR$/src/types" value="562c7beff95ea1eaf5c236df978f50a614a146af" />
|
|
20
|
+
</map>
|
|
21
|
+
</option>
|
|
22
|
+
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
|
23
|
+
<option name="ROOT_SYNC" value="DONT_SYNC" />
|
|
24
|
+
</component>
|
|
25
|
+
<component name="ProjectColorInfo"><![CDATA[{
|
|
26
|
+
"associatedIndex": 5
|
|
27
|
+
}]]></component>
|
|
28
|
+
<component name="ProjectId" id="2sDo2WKPRcvk6nDGnMA2OIWpAcR" />
|
|
29
|
+
<component name="ProjectViewState">
|
|
30
|
+
<option name="hideEmptyMiddlePackages" value="true" />
|
|
31
|
+
<option name="showLibraryContents" value="true" />
|
|
32
|
+
</component>
|
|
33
|
+
<component name="PropertiesComponent"><![CDATA[{
|
|
34
|
+
"keyToString": {
|
|
35
|
+
"RunOnceActivity.ShowReadmeOnStart": "true",
|
|
36
|
+
"RunOnceActivity.git.unshallow": "true",
|
|
37
|
+
"git-widget-placeholder": "master",
|
|
38
|
+
"ignore.virus.scanning.warn.message": "true",
|
|
39
|
+
"last_opened_file_path": "//wsl.localhost/Debian/home/jarek/polfan-js-client-library",
|
|
40
|
+
"node.js.detected.package.eslint": "true",
|
|
41
|
+
"node.js.detected.package.tslint": "true",
|
|
42
|
+
"node.js.selected.package.eslint": "(autodetect)",
|
|
43
|
+
"node.js.selected.package.tslint": "(autodetect)",
|
|
44
|
+
"nodejs_package_manager_path": "npm",
|
|
45
|
+
"ts.external.directory.path": "\\\\wsl.localhost\\Debian\\home\\jarek\\polfan-js-client-library\\node_modules\\typescript\\lib",
|
|
46
|
+
"vue.rearranger.settings.migration": "true"
|
|
47
|
+
}
|
|
48
|
+
}]]></component>
|
|
49
|
+
<component name="SharedIndexes">
|
|
50
|
+
<attachedChunks>
|
|
51
|
+
<set>
|
|
52
|
+
<option value="bundled-js-predefined-d6986cc7102b-deb605915726-JavaScript-PS-243.22562.233" />
|
|
53
|
+
<option value="bundled-php-predefined-a98d8de5180a-7980c7aaca61-com.jetbrains.php.sharedIndexes-PS-243.22562.233" />
|
|
54
|
+
</set>
|
|
55
|
+
</attachedChunks>
|
|
56
|
+
</component>
|
|
57
|
+
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
|
58
|
+
<component name="TaskManager">
|
|
59
|
+
<task active="true" id="Default" summary="Default task">
|
|
60
|
+
<changelist id="831dae43-0da1-47fd-a5f7-33dd5eec2992" name="Changes" comment="" />
|
|
61
|
+
<created>1737999300590</created>
|
|
62
|
+
<option name="number" value="Default" />
|
|
63
|
+
<option name="presentableId" value="Default" />
|
|
64
|
+
<updated>1737999300590</updated>
|
|
65
|
+
<workItem from="1737999301306" duration="4896000" />
|
|
66
|
+
</task>
|
|
67
|
+
<task id="LOCAL-00001" summary="Emoticons objects">
|
|
68
|
+
<option name="closed" value="true" />
|
|
69
|
+
<created>1738000298032</created>
|
|
70
|
+
<option name="number" value="00001" />
|
|
71
|
+
<option name="presentableId" value="LOCAL-00001" />
|
|
72
|
+
<option name="project" value="LOCAL" />
|
|
73
|
+
<updated>1738000298032</updated>
|
|
74
|
+
</task>
|
|
75
|
+
<task id="LOCAL-00002" summary="Emoticons objects">
|
|
76
|
+
<option name="closed" value="true" />
|
|
77
|
+
<created>1738000310264</created>
|
|
78
|
+
<option name="number" value="00002" />
|
|
79
|
+
<option name="presentableId" value="LOCAL-00002" />
|
|
80
|
+
<option name="project" value="LOCAL" />
|
|
81
|
+
<updated>1738000310264</updated>
|
|
82
|
+
</task>
|
|
83
|
+
<task id="LOCAL-00003" summary="Emoticons support">
|
|
84
|
+
<option name="closed" value="true" />
|
|
85
|
+
<created>1738002489324</created>
|
|
86
|
+
<option name="number" value="00003" />
|
|
87
|
+
<option name="presentableId" value="LOCAL-00003" />
|
|
88
|
+
<option name="project" value="LOCAL" />
|
|
89
|
+
<updated>1738002489324</updated>
|
|
90
|
+
</task>
|
|
91
|
+
<task id="LOCAL-00004" summary="Emoticons support">
|
|
92
|
+
<option name="closed" value="true" />
|
|
93
|
+
<created>1738002764971</created>
|
|
94
|
+
<option name="number" value="00004" />
|
|
95
|
+
<option name="presentableId" value="LOCAL-00004" />
|
|
96
|
+
<option name="project" value="LOCAL" />
|
|
97
|
+
<updated>1738002764971</updated>
|
|
98
|
+
</task>
|
|
99
|
+
<task id="LOCAL-00005" summary="Emoticons support">
|
|
100
|
+
<option name="closed" value="true" />
|
|
101
|
+
<created>1738002769540</created>
|
|
102
|
+
<option name="number" value="00005" />
|
|
103
|
+
<option name="presentableId" value="LOCAL-00005" />
|
|
104
|
+
<option name="project" value="LOCAL" />
|
|
105
|
+
<updated>1738002769540</updated>
|
|
106
|
+
</task>
|
|
107
|
+
<task id="LOCAL-00006" summary="Emoticons support">
|
|
108
|
+
<option name="closed" value="true" />
|
|
109
|
+
<created>1738002772620</created>
|
|
110
|
+
<option name="number" value="00006" />
|
|
111
|
+
<option name="presentableId" value="LOCAL-00006" />
|
|
112
|
+
<option name="project" value="LOCAL" />
|
|
113
|
+
<updated>1738002772620</updated>
|
|
114
|
+
</task>
|
|
115
|
+
<task id="LOCAL-00007" summary="Emoticons support">
|
|
116
|
+
<option name="closed" value="true" />
|
|
117
|
+
<created>1738002786100</created>
|
|
118
|
+
<option name="number" value="00007" />
|
|
119
|
+
<option name="presentableId" value="LOCAL-00007" />
|
|
120
|
+
<option name="project" value="LOCAL" />
|
|
121
|
+
<updated>1738002786100</updated>
|
|
122
|
+
</task>
|
|
123
|
+
<task id="LOCAL-00008" summary="Emoticons support">
|
|
124
|
+
<option name="closed" value="true" />
|
|
125
|
+
<created>1738002805203</created>
|
|
126
|
+
<option name="number" value="00008" />
|
|
127
|
+
<option name="presentableId" value="LOCAL-00008" />
|
|
128
|
+
<option name="project" value="LOCAL" />
|
|
129
|
+
<updated>1738002805203</updated>
|
|
130
|
+
</task>
|
|
131
|
+
<option name="localTasksCounter" value="9" />
|
|
132
|
+
<servers />
|
|
133
|
+
</component>
|
|
134
|
+
<component name="TypeScriptGeneratedFilesManager">
|
|
135
|
+
<option name="version" value="3" />
|
|
136
|
+
</component>
|
|
137
|
+
<component name="VcsManagerConfiguration">
|
|
138
|
+
<MESSAGE value="Emoticons objects" />
|
|
139
|
+
<MESSAGE value="Emoticons support" />
|
|
140
|
+
<option name="LAST_COMMIT_MESSAGE" value="Emoticons support" />
|
|
141
|
+
</component>
|
|
142
|
+
</project>
|
package/build/index.js
CHANGED
|
@@ -1271,8 +1271,8 @@ var RoomMessagesHistory = /*#__PURE__*/function () {
|
|
|
1271
1271
|
}
|
|
1272
1272
|
}
|
|
1273
1273
|
|
|
1274
|
-
/**
|
|
1275
|
-
* Returns a history window object for the given topic ID, allowing you to view message history.
|
|
1274
|
+
/**
|
|
1275
|
+
* Returns a history window object for the given topic ID, allowing you to view message history.
|
|
1276
1276
|
*/
|
|
1277
1277
|
RoomMessagesHistory_createClass(RoomMessagesHistory, [{
|
|
1278
1278
|
key: "getMessagesWindow",
|
|
@@ -3656,6 +3656,141 @@ var PermissionsManager = /*#__PURE__*/function (_EventTarget) {
|
|
|
3656
3656
|
}]);
|
|
3657
3657
|
return PermissionsManager;
|
|
3658
3658
|
}(EventTarget);
|
|
3659
|
+
;// CONCATENATED MODULE: ./src/state-tracker/EmoticonsManager.ts
|
|
3660
|
+
function EmoticonsManager_typeof(obj) { "@babel/helpers - typeof"; return EmoticonsManager_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, EmoticonsManager_typeof(obj); }
|
|
3661
|
+
function EmoticonsManager_toConsumableArray(arr) { return EmoticonsManager_arrayWithoutHoles(arr) || EmoticonsManager_iterableToArray(arr) || EmoticonsManager_unsupportedIterableToArray(arr) || EmoticonsManager_nonIterableSpread(); }
|
|
3662
|
+
function EmoticonsManager_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3663
|
+
function EmoticonsManager_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return EmoticonsManager_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return EmoticonsManager_arrayLikeToArray(o, minLen); }
|
|
3664
|
+
function EmoticonsManager_iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
3665
|
+
function EmoticonsManager_arrayWithoutHoles(arr) { if (Array.isArray(arr)) return EmoticonsManager_arrayLikeToArray(arr); }
|
|
3666
|
+
function EmoticonsManager_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
3667
|
+
function EmoticonsManager_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ EmoticonsManager_regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == EmoticonsManager_typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3668
|
+
function EmoticonsManager_asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
3669
|
+
function EmoticonsManager_asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { EmoticonsManager_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { EmoticonsManager_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
3670
|
+
function EmoticonsManager_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3671
|
+
function EmoticonsManager_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, EmoticonsManager_toPropertyKey(descriptor.key), descriptor); } }
|
|
3672
|
+
function EmoticonsManager_createClass(Constructor, protoProps, staticProps) { if (protoProps) EmoticonsManager_defineProperties(Constructor.prototype, protoProps); if (staticProps) EmoticonsManager_defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
3673
|
+
function EmoticonsManager_defineProperty(obj, key, value) { key = EmoticonsManager_toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3674
|
+
function EmoticonsManager_toPropertyKey(arg) { var key = EmoticonsManager_toPrimitive(arg, "string"); return EmoticonsManager_typeof(key) === "symbol" ? key : String(key); }
|
|
3675
|
+
function EmoticonsManager_toPrimitive(input, hint) { if (EmoticonsManager_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (EmoticonsManager_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
3676
|
+
|
|
3677
|
+
|
|
3678
|
+
var GLOBAL_KEY = 'global';
|
|
3679
|
+
var EmoticonsManager = /*#__PURE__*/function () {
|
|
3680
|
+
function EmoticonsManager(tracker) {
|
|
3681
|
+
var _this = this;
|
|
3682
|
+
EmoticonsManager_classCallCheck(this, EmoticonsManager);
|
|
3683
|
+
this.tracker = tracker;
|
|
3684
|
+
EmoticonsManager_defineProperty(this, "list", new IndexedCollection());
|
|
3685
|
+
EmoticonsManager_defineProperty(this, "emoticonsPromises", new PromiseRegistry());
|
|
3686
|
+
this.tracker.client.on('Emoticons', function (ev) {
|
|
3687
|
+
return _this.handleEmoticons(ev);
|
|
3688
|
+
});
|
|
3689
|
+
this.tracker.client.on('NewEmoticon', function (ev) {
|
|
3690
|
+
return _this.handleNewEmoticon(ev);
|
|
3691
|
+
});
|
|
3692
|
+
this.tracker.client.on('EmoticonDeleted', function (ev) {
|
|
3693
|
+
return _this.handleEmoticonDeleted(ev);
|
|
3694
|
+
});
|
|
3695
|
+
this.tracker.client.on('SpaceDeleted', function (ev) {
|
|
3696
|
+
return _this.handleSpaceDeleted(ev);
|
|
3697
|
+
});
|
|
3698
|
+
this.tracker.client.on('Session', function () {
|
|
3699
|
+
return _this.handleSession();
|
|
3700
|
+
});
|
|
3701
|
+
}
|
|
3702
|
+
EmoticonsManager_createClass(EmoticonsManager, [{
|
|
3703
|
+
key: "get",
|
|
3704
|
+
value: function () {
|
|
3705
|
+
var _get = EmoticonsManager_asyncToGenerator( /*#__PURE__*/EmoticonsManager_regeneratorRuntime().mark(function _callee2(spaceId) {
|
|
3706
|
+
var _this2 = this;
|
|
3707
|
+
return EmoticonsManager_regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
3708
|
+
while (1) {
|
|
3709
|
+
switch (_context2.prev = _context2.next) {
|
|
3710
|
+
case 0:
|
|
3711
|
+
if (this.emoticonsPromises.notExist(spaceId)) {
|
|
3712
|
+
this.emoticonsPromises.registerByFunction( /*#__PURE__*/EmoticonsManager_asyncToGenerator( /*#__PURE__*/EmoticonsManager_regeneratorRuntime().mark(function _callee() {
|
|
3713
|
+
var result;
|
|
3714
|
+
return EmoticonsManager_regeneratorRuntime().wrap(function _callee$(_context) {
|
|
3715
|
+
while (1) {
|
|
3716
|
+
switch (_context.prev = _context.next) {
|
|
3717
|
+
case 0:
|
|
3718
|
+
_context.next = 2;
|
|
3719
|
+
return _this2.tracker.client.send('GetEmoticons', {
|
|
3720
|
+
spaceId: spaceId
|
|
3721
|
+
});
|
|
3722
|
+
case 2:
|
|
3723
|
+
result = _context.sent;
|
|
3724
|
+
if (!result.error) {
|
|
3725
|
+
_context.next = 5;
|
|
3726
|
+
break;
|
|
3727
|
+
}
|
|
3728
|
+
throw result.error;
|
|
3729
|
+
case 5:
|
|
3730
|
+
_this2.handleEmoticons(result.data);
|
|
3731
|
+
case 6:
|
|
3732
|
+
case "end":
|
|
3733
|
+
return _context.stop();
|
|
3734
|
+
}
|
|
3735
|
+
}
|
|
3736
|
+
}, _callee);
|
|
3737
|
+
})), spaceId !== null && spaceId !== void 0 ? spaceId : GLOBAL_KEY);
|
|
3738
|
+
}
|
|
3739
|
+
_context2.next = 3;
|
|
3740
|
+
return this.emoticonsPromises.get(spaceId);
|
|
3741
|
+
case 3:
|
|
3742
|
+
return _context2.abrupt("return", this.list.get(spaceId));
|
|
3743
|
+
case 4:
|
|
3744
|
+
case "end":
|
|
3745
|
+
return _context2.stop();
|
|
3746
|
+
}
|
|
3747
|
+
}
|
|
3748
|
+
}, _callee2, this);
|
|
3749
|
+
}));
|
|
3750
|
+
function get(_x) {
|
|
3751
|
+
return _get.apply(this, arguments);
|
|
3752
|
+
}
|
|
3753
|
+
return get;
|
|
3754
|
+
}()
|
|
3755
|
+
}, {
|
|
3756
|
+
key: "handleEmoticons",
|
|
3757
|
+
value: function handleEmoticons(event) {
|
|
3758
|
+
var _event$location$space;
|
|
3759
|
+
var spaceId = (_event$location$space = event.location.spaceId) !== null && _event$location$space !== void 0 ? _event$location$space : GLOBAL_KEY;
|
|
3760
|
+
if (!this.list.has(spaceId)) {
|
|
3761
|
+
this.list.set([spaceId, new ObservableIndexedObjectCollection('id')]);
|
|
3762
|
+
}
|
|
3763
|
+
var collection = this.list.get(spaceId);
|
|
3764
|
+
collection.set.apply(collection, EmoticonsManager_toConsumableArray(event.emoticons));
|
|
3765
|
+
}
|
|
3766
|
+
}, {
|
|
3767
|
+
key: "handleNewEmoticon",
|
|
3768
|
+
value: function handleNewEmoticon(ev) {
|
|
3769
|
+
var _ev$emoticon$spaceId;
|
|
3770
|
+
var collection = this.list.get((_ev$emoticon$spaceId = ev.emoticon.spaceId) !== null && _ev$emoticon$spaceId !== void 0 ? _ev$emoticon$spaceId : GLOBAL_KEY);
|
|
3771
|
+
collection === null || collection === void 0 ? void 0 : collection.set(ev.emoticon);
|
|
3772
|
+
}
|
|
3773
|
+
}, {
|
|
3774
|
+
key: "handleEmoticonDeleted",
|
|
3775
|
+
value: function handleEmoticonDeleted(ev) {
|
|
3776
|
+
var _ev$spaceId;
|
|
3777
|
+
var collection = this.list.get((_ev$spaceId = ev.spaceId) !== null && _ev$spaceId !== void 0 ? _ev$spaceId : GLOBAL_KEY);
|
|
3778
|
+
collection === null || collection === void 0 ? void 0 : collection["delete"](ev.emoticonId);
|
|
3779
|
+
}
|
|
3780
|
+
}, {
|
|
3781
|
+
key: "handleSpaceDeleted",
|
|
3782
|
+
value: function handleSpaceDeleted(event) {
|
|
3783
|
+
this.list["delete"](event.id);
|
|
3784
|
+
}
|
|
3785
|
+
}, {
|
|
3786
|
+
key: "handleSession",
|
|
3787
|
+
value: function handleSession() {
|
|
3788
|
+
this.list.deleteAll();
|
|
3789
|
+
this.emoticonsPromises.forgetAll();
|
|
3790
|
+
}
|
|
3791
|
+
}]);
|
|
3792
|
+
return EmoticonsManager;
|
|
3793
|
+
}();
|
|
3659
3794
|
;// CONCATENATED MODULE: ./src/state-tracker/ChatStateTracker.ts
|
|
3660
3795
|
function ChatStateTracker_typeof(obj) { "@babel/helpers - typeof"; return ChatStateTracker_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, ChatStateTracker_typeof(obj); }
|
|
3661
3796
|
function ChatStateTracker_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ ChatStateTracker_regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == ChatStateTracker_typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
@@ -3671,17 +3806,22 @@ function ChatStateTracker_toPrimitive(input, hint) { if (ChatStateTracker_typeof
|
|
|
3671
3806
|
|
|
3672
3807
|
|
|
3673
3808
|
|
|
3809
|
+
|
|
3674
3810
|
var ChatStateTracker = /*#__PURE__*/function () {
|
|
3675
|
-
/**
|
|
3676
|
-
* State of your permissions.
|
|
3811
|
+
/**
|
|
3812
|
+
* State of your permissions.
|
|
3677
3813
|
*/
|
|
3678
3814
|
|
|
3679
|
-
/**
|
|
3680
|
-
* State of the rooms you are in.
|
|
3815
|
+
/**
|
|
3816
|
+
* State of the rooms you are in.
|
|
3681
3817
|
*/
|
|
3682
3818
|
|
|
3683
|
-
/**
|
|
3684
|
-
* State of the spaces you are in.
|
|
3819
|
+
/**
|
|
3820
|
+
* State of the spaces you are in.
|
|
3821
|
+
*/
|
|
3822
|
+
|
|
3823
|
+
/**
|
|
3824
|
+
* State of the emoticons (global and space-related).
|
|
3685
3825
|
*/
|
|
3686
3826
|
|
|
3687
3827
|
function ChatStateTracker(client) {
|
|
@@ -3691,6 +3831,7 @@ var ChatStateTracker = /*#__PURE__*/function () {
|
|
|
3691
3831
|
ChatStateTracker_defineProperty(this, "permissions", new PermissionsManager(this));
|
|
3692
3832
|
ChatStateTracker_defineProperty(this, "rooms", new RoomsManager(this));
|
|
3693
3833
|
ChatStateTracker_defineProperty(this, "spaces", new SpacesManager(this));
|
|
3834
|
+
ChatStateTracker_defineProperty(this, "emoticons", new EmoticonsManager(this));
|
|
3694
3835
|
ChatStateTracker_defineProperty(this, "_me", null);
|
|
3695
3836
|
ChatStateTracker_defineProperty(this, "deferredSession", new DeferredTask());
|
|
3696
3837
|
this.client.on('Session', function (ev) {
|