├── .gitignore ├── pidgin-im-gs.png ├── schemas ├── gschemas.compiled └── org.gnome.shell.extensions.pidgin.gschema.xml ├── locale ├── de │ └── LC_MESSAGES │ │ ├── gnome-shell-extension-pidgin.mo │ │ └── gnome-shell-extension-pidgin.po ├── fr │ └── LC_MESSAGES │ │ ├── gnome-shell-extension-pidgin.mo │ │ └── gnome-shell-extension-pidgin.po └── uk │ └── LC_MESSAGES │ ├── gnome-shell-extension-pidgin.mo │ └── gnome-shell-extension-pidgin.po ├── Makefile ├── metadata.json ├── gnome-shell-extension-pidgin.pot ├── prefs.js ├── README.md ├── LICENSE ├── extension.js └── dbus.js /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | -------------------------------------------------------------------------------- /pidgin-im-gs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muffinmad/pidgin-im-gnome-shell-extension/HEAD/pidgin-im-gs.png -------------------------------------------------------------------------------- /schemas/gschemas.compiled: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muffinmad/pidgin-im-gnome-shell-extension/HEAD/schemas/gschemas.compiled -------------------------------------------------------------------------------- /locale/de/LC_MESSAGES/gnome-shell-extension-pidgin.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muffinmad/pidgin-im-gnome-shell-extension/HEAD/locale/de/LC_MESSAGES/gnome-shell-extension-pidgin.mo -------------------------------------------------------------------------------- /locale/fr/LC_MESSAGES/gnome-shell-extension-pidgin.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muffinmad/pidgin-im-gnome-shell-extension/HEAD/locale/fr/LC_MESSAGES/gnome-shell-extension-pidgin.mo -------------------------------------------------------------------------------- /locale/uk/LC_MESSAGES/gnome-shell-extension-pidgin.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muffinmad/pidgin-im-gnome-shell-extension/HEAD/locale/uk/LC_MESSAGES/gnome-shell-extension-pidgin.mo -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: build 2 | 3 | build: 4 | @mkdir -p build 5 | @rm build/pidgin@muffinmad.zip 6 | @zip build/pidgin@muffinmad.zip \ 7 | locale/de/LC_MESSAGES/gnome-shell-extension-pidgin.mo \ 8 | locale/fr/LC_MESSAGES/gnome-shell-extension-pidgin.mo \ 9 | locale/uk/LC_MESSAGES/gnome-shell-extension-pidgin.mo \ 10 | schemas/* LICENSE dbus.js extension.js metadata.json prefs.js 11 | -------------------------------------------------------------------------------- /metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "uuid": "pidgin@muffinmad", 3 | "name": "Pidgin IM integration", 4 | "description": "Integrate Pidgin IMs in the Gnome Shell message tray", 5 | "url": "https://github.com/muffinmad/pidgin-im-gnome-shell-extension", 6 | "gettext-domain": "gnome-shell-extension-pidgin", 7 | "settings-schema": "org.gnome.shell.extensions.pidgin", 8 | "shell-version": [ "45" ], 9 | "version": 47 10 | } 11 | -------------------------------------------------------------------------------- /gnome-shell-extension-pidgin.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: PACKAGE VERSION\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2015-06-19 12:44-0300\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=CHARSET\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #: prefs.js:32 21 | msgid "Message tray integration" 22 | msgstr "" 23 | 24 | #: prefs.js:48 25 | msgid "Buddies search provider" 26 | msgstr "" 27 | 28 | #: prefs.js:64 29 | msgid "Track only highlighted messages for chats" 30 | msgstr "" 31 | 32 | #: perfs.js:82 33 | msgid "Reopen notification banner on notification click" 34 | msgstr "" 35 | -------------------------------------------------------------------------------- /locale/de/LC_MESSAGES/gnome-shell-extension-pidgin.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: gnome-shell-extension-pidgin\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2015-06-19 12:44-0300\n" 11 | "PO-Revision-Date: 2015-06-19 12:45-0300\n" 12 | "Last-Translator: Jonatan Zeidler \n" 13 | "Language-Team: GERMAN \n" 14 | "Language: de\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "X-Generator: Poedit 1.7.5\n" 19 | "X-Poedit-SourceCharset: UTF-8\n" 20 | 21 | #: prefs.js:32 22 | msgid "Message tray integration" 23 | msgstr "Integration in den Benachrichtigungsbereich" 24 | 25 | #: prefs.js:48 26 | msgid "Buddies search provider" 27 | msgstr "Kontakte im Übersichtsmodus finden" 28 | 29 | #: prefs.js:64 30 | msgid "Track only highlighted messages for chats" 31 | msgstr "In Chats nur hervorgehobene Nachrichten verfolgen" 32 | -------------------------------------------------------------------------------- /locale/fr/LC_MESSAGES/gnome-shell-extension-pidgin.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: \n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2015-06-19 12:44-0300\n" 11 | "PO-Revision-Date: 2020-04-23 10:57+0200\n" 12 | "Last-Translator: \n" 13 | "Language-Team: \n" 14 | "Language: fr\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "X-Generator: Poedit 2.3\n" 19 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 20 | 21 | #: prefs.js:32 22 | msgid "Message tray integration" 23 | msgstr "Intégration des messages dans la barre des notifications" 24 | 25 | #: prefs.js:48 26 | msgid "Buddies search provider" 27 | msgstr "Connecteur avec la recherche des contacts (aperçu/icône)" 28 | 29 | #: prefs.js:64 30 | msgid "Track only highlighted messages for chats" 31 | msgstr "Suivre seulement les messages \"highlités\" pour les chats" 32 | 33 | #: perfs.js:82 34 | msgid "Reopen notification banner on notification click" 35 | msgstr "Réouvrir la bannière de notification au clic" 36 | -------------------------------------------------------------------------------- /schemas/org.gnome.shell.extensions.pidgin.gschema.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | true 6 | Message tray integration 7 | Integrate with the message tray 8 | 9 | 10 | true 11 | Enable search provider 12 | Whether to show buddies matching search terms in Overview 13 | 14 | 15 | true 16 | For chats track only highlighted messages 17 | Whether to create notifications for all chat messages or only highlighted messages 18 | 19 | 20 | false 21 | Reopen notification banner on notification click 22 | Wheneter to reopen notification banner on notification click or present pidgin conversation window 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /locale/uk/LC_MESSAGES/gnome-shell-extension-pidgin.po: -------------------------------------------------------------------------------- 1 | # Ukrainian translations for PACKAGE package 2 | # Переклад українською для пакету PACKAGE. 3 | # Copyright (C) 2022 THE PACKAGE'S COPYRIGHT HOLDER 4 | # This file is distributed under the same license as the PACKAGE package. 5 | # mad , 2022. 6 | # 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: PACKAGE VERSION\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2015-06-19 12:44-0300\n" 12 | "PO-Revision-Date: 2022-06-03 23:17+0300\n" 13 | "Last-Translator: mad \n" 14 | "Language-Team: \n" 15 | "Language: uk\n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" 20 | "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" 21 | 22 | #: prefs.js:32 23 | msgid "Message tray integration" 24 | msgstr "Інтегрувати з нотифікаціями" 25 | 26 | #: prefs.js:48 27 | msgid "Buddies search provider" 28 | msgstr "Відображати контакти при пошуку" 29 | 30 | #: prefs.js:64 31 | msgid "Track only highlighted messages for chats" 32 | msgstr "В чатах сповіщати тільки про згадки" 33 | 34 | #: perfs.js:82 35 | msgid "Reopen notification banner on notification click" 36 | msgstr "Клацання по сповіщеню знов відкриває банер" 37 | -------------------------------------------------------------------------------- /prefs.js: -------------------------------------------------------------------------------- 1 | import Gio from 'gi://Gio'; 2 | import Adw from 'gi://Adw'; 3 | import {ExtensionPreferences, gettext as _} from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; 4 | 5 | export default class PidginPreferences extends ExtensionPreferences { 6 | fillPreferencesWindow(window) { 7 | window._settings = this.getSettings(); 8 | 9 | const page = new Adw.PreferencesPage({ 10 | title: 'Pidgin IM Integration', 11 | icon_name: 'dialog-information-symbolic', 12 | }); 13 | window.add(page); 14 | const group = new Adw.PreferencesGroup(); 15 | page.add(group); 16 | 17 | let row = new Adw.SwitchRow({title: _('Message tray integration')}); 18 | group.add(row); 19 | window._settings.bind('enable-message-tray', row, 'active', Gio.SettingsBindFlags.DEFAULT); 20 | 21 | row = new Adw.SwitchRow({title: _('Buddies search provider')}); 22 | group.add(row); 23 | window._settings.bind('enable-search-provider', row, 'active', Gio.SettingsBindFlags.DEFAULT); 24 | 25 | row = new Adw.SwitchRow({title: _('Track only highlighted messages for chats')}); 26 | group.add(row); 27 | window._settings.bind('chat-highlight-only', row, 'active', Gio.SettingsBindFlags.DEFAULT); 28 | 29 | row = new Adw.SwitchRow({title: _('Reopen notification banner on notification click')}); 30 | group.add(row); 31 | window._settings.bind('reopen-banner', row, 'active', Gio.SettingsBindFlags.DEFAULT); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://stand-with-ukraine.pp.ua) 2 | 3 | # pidgin-im-gnome-shell-extension 4 | 5 | Make Pidgin IM conversations appear in the Gnome Shell message tray 6 | 7 | ## Features 8 | 9 | - Supports Chats and IMs for now (i.e. no file transfers or attentions) 10 | - User icons 11 | - User status as secondary icon 12 | - Sends typing state 13 | - Shows unread messages count 14 | - Tries to restore unread messages count after screen lock/unlock 15 | - Search provider for buddys from connected accounts (can be disabled from extension preferences) 16 | 17 | ## Issues 18 | 19 | - Messages appear unseen in Pidgin after expanding notification in message tray. Don't know how to set unseen state in Pidgin 20 | - No notifications on locked screen even if notification settings allow it. Because Gnome Shell disables all extensions on screen lock 21 | 22 | ## Supported Gnome Shell Versions 23 | 24 | Recent master version supports latest Gnome Shell version. Versions with for older Gnome Shell support can be found on extensions.gnome.org. 25 | 26 | ## Installation 27 | 28 | ### GNOME Shell Extensions 29 | 30 | https://extensions.gnome.org/extension/782/pidgin-im-integration/ 31 | 32 | ### Manual 33 | mkdir -p $HOME/.local/share/gnome-shell/extensions 34 | cd $HOME/.local/share/gnome-shell/extensions 35 | git clone git://github.com/muffinmad/pidgin-im-gnome-shell-extension.git pidgin@muffinmad 36 | Restart GNOME Shell and enable "Pidgin IM integration" extension 37 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {description} 294 | Copyright (C) {year} {fullname} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /extension.js: -------------------------------------------------------------------------------- 1 | /** 2 | This program is free software: you can redistribute it and/or modify 3 | it under the terms of the GNU General Public License as published by 4 | the Free Software Foundation, either version 2 of the License, or 5 | (at your option) any later version. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program. If not, see . 14 | **/ 15 | 16 | import Gio from 'gi://Gio'; 17 | import GLib from 'gi://GLib'; 18 | import St from 'gi://St'; 19 | import Clutter from 'gi://Clutter'; 20 | import GObject from 'gi://GObject'; 21 | 22 | import * as DBusIface from './dbus.js'; 23 | import * as Main from 'resource:///org/gnome/shell/ui/main.js'; 24 | import * as Params from 'resource:///org/gnome/shell/misc/params.js'; 25 | import * as History from 'resource:///org/gnome/shell/misc/history.js'; 26 | import * as Util from 'resource:///org/gnome/shell/misc/util.js'; 27 | import * as MessageTray from 'resource:///org/gnome/shell/ui/messageTray.js'; 28 | import * as MessageList from 'resource:///org/gnome/shell/ui/messageList.js'; 29 | import {Extension} from 'resource:///org/gnome/shell/extensions/extension.js'; 30 | 31 | const SCROLLBACK_IMMEDIATE_TIME = 3 * 60; 32 | const SCROLLBACK_RECENT_TIME = 15 * 60; 33 | const SCROLLBACK_RECENT_LENGTH = 20; 34 | const SCROLLBACK_IDLE_LENGTH = 5; 35 | 36 | const SCROLLBACK_HISTORY_LINES = 10; 37 | 38 | const COMPOSING_STOP_TIMEOUT = 5; 39 | 40 | const CHAT_EXPAND_LINES = 12; 41 | 42 | const NotificationDirection = {SENT: 'chat-sent', RECEIVED: 'chat-received'}; 43 | const MessageType = {NORMAL: 0, ACTION: 1}; 44 | const ChannelChatState = {ACTIVE: 2, PAUSED: 3, COMPOSING: 4}; 45 | 46 | function makeMessage(text, sender, timestamp, direction) { 47 | text = _fixText(text); 48 | 49 | let type = MessageType.NORMAL; 50 | if (text.substr(0, 4) == '/me ' && direction != NotificationDirection.SENT) { 51 | text = text.substr(4); 52 | type = MessageType.ACTION; 53 | } 54 | 55 | return { 56 | text: text, 57 | messageType: type, 58 | sender: sender, 59 | timestamp: timestamp, 60 | direction: direction 61 | }; 62 | } 63 | 64 | function _fixText(text) { 65 | // remove all tags 66 | let _text = text.toString(); 67 | _text = _text.replace(/
/gi, "\n"); 68 | _text = _text.replace(/<\/?[^>]+(>|$)/g, ""); 69 | _text = _text.replace(/</g, "<"); 70 | _text = _text.replace(/>/g, ">"); 71 | _text = _text.replace(/'/g, "'"); 72 | _text = _text.replace(/"/g, "\""); 73 | _text = _text.replace(/&/g, "&"); 74 | return _text; 75 | } 76 | 77 | const USER_OFFLINE = 0; 78 | const USER_IDLE = 1; 79 | const USER_AWAY = 2; 80 | const USER_INVISIBLE = 3; 81 | const USER_BUSY = 4; 82 | const USER_ONLINE = 5; 83 | 84 | function getStatusCode(s) { 85 | switch (s.toString()) { 86 | case "available": 87 | case "freeforchat": 88 | case "free4chat": 89 | case "custom": 90 | case "mobile": 91 | case "tune": 92 | case "mood": 93 | case "online": 94 | return USER_ONLINE; 95 | case "dnd": 96 | case "na": 97 | case "occupien": 98 | case "unavailable": 99 | return USER_BUSY; 100 | case "invisible": 101 | return USER_INVISIBLE; 102 | case "away": 103 | return USER_AWAY; 104 | case "extended_away": 105 | return USER_IDLE; 106 | default: 107 | return USER_OFFLINE; 108 | } 109 | } 110 | 111 | function getStatusIcon(s) { 112 | let iconName; 113 | switch (s) { 114 | case USER_ONLINE: 115 | iconName = 'user-available'; 116 | break; 117 | case USER_BUSY: 118 | iconName = 'user-busy'; 119 | break; 120 | case USER_INVISIBLE: 121 | iconName = 'user-invisible'; 122 | break; 123 | case USER_AWAY: 124 | iconName = 'user-away'; 125 | break; 126 | case USER_IDLE: 127 | iconName = 'user-idle'; 128 | break; 129 | default: 130 | iconName = 'user-offline'; 131 | } 132 | return new Gio.ThemedIcon({name: iconName}); 133 | } 134 | 135 | const ChatNotificationMessage = GObject.registerClass( 136 | class ChatNotificationMessage extends GObject.Object { 137 | _init(props = {}) { 138 | super._init(); 139 | this.set(props); 140 | } 141 | }); 142 | 143 | const ChatNotification = GObject.registerClass({ 144 | Signals: { 145 | 'message-removed': {param_types: [ChatNotificationMessage.$gtype]}, 146 | 'message-added': {param_types: [ChatNotificationMessage.$gtype]}, 147 | 'timestamp-changed': {param_types: [ChatNotificationMessage.$gtype]}, 148 | } 149 | }, class ChatNotification extends MessageTray.Notification { 150 | _init(source) { 151 | super._init(source, source.title, null, {secondaryGIcon: source.getSecondaryIcon()}); 152 | this.setUrgency(MessageTray.Urgency.HIGH); 153 | this.setResident(true); 154 | 155 | this.messages = []; 156 | this._timestampTimeoutId = 0; 157 | } 158 | 159 | destroy(reason) { 160 | if (this._timestampTimeoutId) { 161 | GLib.source_remove(this._timestampTimeoutId); 162 | } 163 | this._timestampTimeoutId = 0; 164 | super.destroy(reason); 165 | } 166 | 167 | appendMessage(message, noTimestamp) { 168 | let body = GLib.markup_escape_text(message.text, -1); 169 | let styles = [message.direction]; 170 | 171 | if (message.messageType === MessageType.ACTION) { 172 | let sender = GLib.markup_escape_text(message.sender, -1); 173 | body = `${sender} ${body}`; 174 | styles.push('chat-action'); 175 | } 176 | 177 | if (message.direction === NotificationDirection.RECEIVED) { 178 | this.update(this.source.title, body, { 179 | datetime: GLib.DateTime.new_from_unix_local(message.timestamp), 180 | bannerMarkup: true, 181 | }); 182 | } 183 | 184 | let group = message.direction === NotificationDirection.RECEIVED ? 'received' : 'sent'; 185 | this._append({ 186 | body, 187 | group, 188 | styles, 189 | timestamp: message.timestamp, 190 | noTimestamp 191 | }); 192 | } 193 | 194 | _filterMessages() { 195 | if (this.messages.length < 1) return; 196 | 197 | let lastMessageTime = this.messages[0].timestamp; 198 | let currentTime = Date.now() / 1000; 199 | let maxLength = lastMessageTime < currentTime - SCROLLBACK_RECENT_TIME 200 | ? SCROLLBACK_IDLE_LENGTH : SCROLLBACK_RECENT_LENGTH; 201 | let filteredHistory = this.messages.filter(item => item.realMessage); 202 | if (filteredHistory.length > maxLength) { 203 | let toKeep = filteredHistory[maxLength]; 204 | let expired = this.messages.splice(this.messages.indexOf(toKeep)); 205 | for (let i = 0; i < expired.length; i++) { 206 | this.emit('message-removed', expired[i]); 207 | } 208 | } 209 | } 210 | 211 | _append(props) { 212 | let currentTime = Date.now() / 1000; 213 | props = Params.parse(props, { 214 | body: null, 215 | group: null, 216 | styles: [], 217 | timestamp: currentTime, 218 | noTimestamp: false 219 | }); 220 | const {noTimestamp} = props; 221 | delete props.noTimestamp; 222 | 223 | if (this._timestampTimeoutId) GLib.source_remove(this._timestampTimeoutId); 224 | this._timestampTimeoutId = 0; 225 | 226 | let message = new ChatNotificationMessage({ 227 | relaMessage: props.group !== 'meta', 228 | showTimestamp: false, 229 | ...props, 230 | }); 231 | 232 | this.messages.unshift(message); 233 | this.emit('message-added', message); 234 | 235 | if (!noTimestamp) { 236 | let timestamp = props.timestamp; 237 | if (timestamp < currentTime - SCROLLBACK_IMMEDIATE_TIME) { 238 | this.appendTimestamp(); 239 | } else { 240 | this._timestampTimeoutId = GLib.timeout_add_seconds( 241 | GLib.PRIORITY_DEFAULT, 242 | SCROLLBACK_IMMEDIATE_TIME - (currentTime - timestamp), 243 | this.appendTimestamp.bind(this) 244 | ); 245 | GLib.Source.set_name_by_id(this._timestampTimeoutId, '[gnome-shell] this.appendTimestamp'); 246 | } 247 | } 248 | 249 | this._filterMessages(); 250 | } 251 | 252 | appendTimestamp() { 253 | this._timestampTimeoutId = 0; 254 | this.messages[0].showTimestamp = true; 255 | this.emit('timestamp-changed', this.messages[0]); 256 | this._filterMessages(); 257 | return GLib.SOURCE_REMOVE; 258 | } 259 | }); 260 | 261 | const ChatLineBox = GObject.registerClass( 262 | class ChatLineBox extends St.BoxLayout { 263 | vfunc_get_preferred_height(forWidth) { 264 | let [, natHeight] = super.vfunc_get_preferred_height(forWidth); 265 | return [natHeight, natHeight]; 266 | } 267 | }); 268 | 269 | const ChatNotificationBanner = GObject.registerClass( 270 | class ChatNotificationBanner extends MessageTray.NotificationBanner { 271 | _init(notification) { 272 | super._init(notification); 273 | this._responseEntry = new St.Entry({ 274 | style_class: 'chat-response', 275 | x_expand: true, 276 | can_focus: true 277 | }); 278 | let clutter_text = this._responseEntry.clutter_text; 279 | clutter_text.connect('activate', this._onEntryActivated.bind(this)); 280 | clutter_text.connect('text-changed', this._onEntryChanged.bind(this)); 281 | this.setActionArea(this._responseEntry); 282 | clutter_text.connect('key-focus-in', () => { this.focused = true; }); 283 | clutter_text.connect('key-focus-out', () => { 284 | this.focused = false; 285 | this.emit('unfocused'); 286 | }); 287 | 288 | this._scrollArea = new St.ScrollView({ 289 | style_class: 'chat-scrollview vfade', 290 | vscrollbar_policy: St.PolicyType.AUTOMATIC, 291 | hscrollbar_policy: St.PolicyType.NEVER, 292 | visible: this.expanded 293 | }); 294 | this._contentArea = new St.BoxLayout({ 295 | style_class: 'chat-body', 296 | vertical: true 297 | }); 298 | this._scrollArea.add_actor(this._contentArea); 299 | 300 | this.setExpandedBody(this._scrollArea); 301 | this.setExpandedLines(CHAT_EXPAND_LINES); 302 | 303 | this._lastGroup = null; 304 | 305 | this._oldMaxScrollValue = this._scrollArea.vscroll.adjustment.value; 306 | this._scrollArea.vscroll.adjustment.connect('changed', adjustment => { 307 | if (adjustment.value === this._oldMaxScrollValue) { 308 | this.scrollTo(St.Side.BOTTOM); 309 | } 310 | this._oldMaxScrollValue = Math.max( 311 | adjustment.lower, adjustment.upper - adjustment.page_size 312 | ); 313 | }); 314 | 315 | this._inputHistory = new History.HistoryManager({entry: clutter_text}); 316 | this._composingTimeoutId = 0; 317 | this._messageActors = new Map(); 318 | 319 | this.notification.connectObject( 320 | 'timestamp-changed', (n, message) => this._updateTimestamp(message), 321 | 'message-added', (n, message) => this._addMessage(message), 322 | 'message-removed', (n, message) => { 323 | let actor = this._messageActors.get(message); 324 | if (this._messageActors.delete(message)) { 325 | actor.destroy(); 326 | } 327 | }, 328 | this 329 | ); 330 | 331 | for (let i = this.notification.messages.length - 1; i >= 0; i--) { 332 | this._addMessage(this.notification.messages[i]); 333 | } 334 | } 335 | 336 | destroy() { 337 | if (this._composingTimeoutId) { 338 | GLib.source_remove(this._composingTimeoutId); 339 | this._composingStopTimeout(); 340 | } 341 | super.destroy(); 342 | } 343 | 344 | scrollTo(side) { 345 | let adjustment = this._scrollArea.vscroll.adjustment; 346 | if (side === St.Side.TOP) { 347 | adjustment.value = adjustment.lower; 348 | } else if (side === St.Side.BOTTOM) { 349 | adjustment.value = adjustment.upper; 350 | } 351 | } 352 | 353 | hide() { 354 | this.emit('done-displaying'); 355 | } 356 | 357 | _addMessage(message) { 358 | let body = new MessageList.URLHighlighter(message.body, true, true); 359 | let styles = message.styles; 360 | for (let i = 0; i < styles.length; i++) { 361 | body.add_style_class_name(styles[i]); 362 | } 363 | 364 | let group = message.group; 365 | if (group !== this._lastGroup) { 366 | this._lastGroup = group; 367 | body.add_style_class_name('chat-new-group'); 368 | } 369 | 370 | let lineBox = new ChatLineBox(); 371 | lineBox.add(body); 372 | this._contentArea.add_actor(lineBox); 373 | this._messageActors.set(message, lineBox); 374 | 375 | this._updateTimestamp(message); 376 | } 377 | 378 | _updateTimestamp(message) { 379 | let actor = this._messageActors.get(message); 380 | if (!actor) return; 381 | 382 | while (actor.get_n_children() > 1) { 383 | actor.get_child_at_index(1).destroy(); 384 | } 385 | if (message.showTimestamp) { 386 | let messageTime = message.timestamp; 387 | let messageDate = new Date(messageTime * 1000); 388 | let timeLabel = Util.createTimeLabel(messageDate); 389 | timeLabel.style_class = 'chat-meta-message'; 390 | timeLabel.x_expand = true; 391 | timeLabel.y_expand = true; 392 | timeLabel.x_align = Clutter.ActorAlign.END; 393 | timeLabel.y_align = Clutter.ActorAlign.END; 394 | actor.add_actor(timeLabel); 395 | } 396 | } 397 | 398 | _onEntryActivated() { 399 | let text = this._responseEntry.get_text(); 400 | if (text === '') return; 401 | 402 | this._inputHistory.addItem(text); 403 | 404 | this._responseEntry.set_text(''); 405 | this.notification.source.respond(text); 406 | } 407 | 408 | _composingStopTimeout() { 409 | this._composingTimeoutId = 0; 410 | this.notification.source.setChatState(ChannelChatState.PAUSED); 411 | return GLib.SOURCE_REMOVE; 412 | } 413 | 414 | _onEntryChanged() { 415 | let text = this._responseEntry.get_text(); 416 | 417 | if (this._composingTimeoutId > 0) { 418 | GLib.source_remove(this._composingTimeoutId); 419 | this._composingTimeoutId = 0; 420 | } 421 | 422 | if (text === '') { 423 | this.notification.source.setChatState(ChannelChatState.ACTIVE); 424 | } else { 425 | this.notification.source.setChatState(ChannelChatState.COMPOSING); 426 | this._composingTimeoutId = GLib.timeout_add_seconds( 427 | GLib.PRIORITY_DEFAULT, 428 | COMPOSING_STOP_TIMEOUT, 429 | this._composingStopTimeout.bind(this) 430 | ); 431 | GLib.Source.set_name_by_id( 432 | this._composingTimeoutId, '[gnome-shell] this._composingStopTimeout' 433 | ); 434 | } 435 | } 436 | }); 437 | 438 | const Source = GObject.registerClass( 439 | class Source extends MessageTray.Source { 440 | _init(client, account, author, conversation) { 441 | let proxy = client.proxy; 442 | super._init(_fixText(proxy.PurpleConversationGetTitleSync(conversation).toString())); 443 | this._status_id = 0; 444 | this._account = account; 445 | this._chatState = 0; 446 | this._client = client; 447 | this._author = author; 448 | this._conversation = conversation; 449 | this._conv_name = proxy.PurpleConversationGetNameSync(this._conversation).toString(); 450 | this._conv_gc = proxy.PurpleConversationGetGcSync(this._conversation); 451 | 452 | this.isChat = true; 453 | this._pendingMessages = []; 454 | 455 | this._notification = new ChatNotification(this); 456 | this._notification.connect('activated', this.open.bind(this)); 457 | this._notification.connect('updated', () => { 458 | if (this._banner && this._banner.expanded) this._markAllSeen(); 459 | }); 460 | 461 | Main.messageTray.add(this); 462 | this.pushNotification(this._notification); 463 | } 464 | 465 | _markAllSeen() { 466 | this._pendingMessages = []; 467 | this.countUpdated(); 468 | } 469 | 470 | _notificationExpanded() { 471 | this._markAllSeen(); 472 | } 473 | 474 | _createPolicy() { 475 | return new MessageTray.NotificationApplicationPolicy('pidgin'); 476 | } 477 | 478 | createBanner() { 479 | this._banner = new ChatNotificationBanner(this._notification); 480 | 481 | // We ack messages when the user expands the new notification 482 | let id = this._banner.connect('expanded', this._markAllSeen.bind(this)); 483 | this._banner.connect('destroy', () => { 484 | this._banner.disconnect(id); 485 | this._banner = null; 486 | }); 487 | 488 | return this._banner; 489 | } 490 | 491 | handleMessage(author, text, flag, timestamp) { 492 | let direction = null; 493 | if (flag & 1) { 494 | direction = NotificationDirection.SENT; 495 | } else if (flag & 2) { 496 | direction = NotificationDirection.RECEIVED; 497 | } else { 498 | return; 499 | } 500 | 501 | let _now = Date.now() / 1000; 502 | let _ts = timestamp == null ? _now : timestamp; 503 | let message = this._makeMessage(author, text, _ts, direction); 504 | this._notification.appendMessage(message, false); 505 | 506 | if (direction == NotificationDirection.RECEIVED) { 507 | let focus = this._client.proxy.PurpleConversationHasFocusSync(this._conversation); 508 | if ((!focus || focus == 0) && (_ts >= this._client.disable_timestamp && (this._client.disable_timestamp > 0 || timestamp == null))) { 509 | this._pendingMessages.push(message); 510 | this.countUpdated(); 511 | if (!this._isChat || flag == 34) { 512 | this.showNotification(); 513 | } 514 | } 515 | } else { 516 | this._markAllSeen(); 517 | } 518 | } 519 | 520 | setChatState(state) { 521 | if (this._chatState == state || this._client.proxy.PurplePrefsGetBoolSync('/purple/conversations/im/send_typing') != 1) { 522 | return; 523 | } 524 | this._chatState = state; 525 | let s = 0; 526 | switch (state) { 527 | case ChannelChatState.COMPOSING: 528 | s = 1; 529 | break; 530 | case ChannelChatState.PAUSED: 531 | s = 2; 532 | break; 533 | } 534 | this._client.proxy.ServSendTypingRemote(this._conv_gc, this._conv_name, s); 535 | } 536 | 537 | destroy() { 538 | if (this._banner) { 539 | this._banner.destroy(); 540 | } 541 | super.destroy(); 542 | } 543 | 544 | getIcon() { 545 | let file = this._icon_file; 546 | if (file) { 547 | return new Gio.FileIcon({ file: Gio.File.new_for_uri(file) }); 548 | } else { 549 | return new Gio.ThemedIcon({ name: 'avatar-default' }); 550 | } 551 | } 552 | 553 | getSecondaryIcon() { 554 | return getStatusIcon(this._status_id); 555 | } 556 | 557 | _openPurpleConversation() { 558 | this._client.proxy.PurpleConversationPresentRemote(this._conversation); 559 | } 560 | 561 | open(notification) { 562 | Main.overview.hide(); 563 | Main.panel.closeCalendar(); 564 | if (this._client._settings.get_boolean('reopen-banner') && !(this._banner && this._banner.expanded)) { 565 | this.showNotification(); 566 | } else { 567 | this._openPurpleConversation(); 568 | } 569 | } 570 | 571 | respond(text) { 572 | let proxy = this._client.proxy; 573 | // looks like pidgin has special behavior with ' #40 574 | let message = GLib.markup_escape_text(text, -1).replace(/'/g, "'"); 575 | if(this._isChat) 576 | proxy.PurpleConvChatSendRemote(this._conv_id, message); 577 | else 578 | proxy.PurpleConvImSendRemote(this._conv_id, message); 579 | } 580 | 581 | showNotification() { 582 | super.showNotification(this._notification); 583 | } 584 | 585 | get count() { 586 | return this._pendingMessages.length; 587 | } 588 | 589 | get unseenCount() { 590 | return this.count; 591 | } 592 | 593 | get countVisible() { 594 | return this.count > 0; 595 | } 596 | }); 597 | 598 | const ImSource = GObject.registerClass( 599 | class ImSource extends Source { 600 | _init(client, account, author, conversation) { 601 | super._init(client, account, author, conversation); 602 | this._isChat = false; 603 | let proxy = client.proxy; 604 | this._conv_id = proxy.PurpleConvImSync(conversation); 605 | this._buddy = proxy.PurpleFindBuddySync(account, author); 606 | this._buddy_alias = _fixText(proxy.PurpleBuddyGetAliasSync(this._buddy)); 607 | this._buddy_contact = proxy.PurpleBuddyGetContactSync(this._buddy); 608 | this._buddy_presence = proxy.PurpleBuddyGetPresenceSync(this._buddy); 609 | this._get_status_id(); 610 | 611 | let buddy_custom_icon = proxy.PurpleBlistNodeGetStringSync(this._buddy_contact, 'custom_buddy_icon'); 612 | if (buddy_custom_icon && buddy_custom_icon != 0) { 613 | this._icon_file = 'file://' + proxy.PurpleBuddyIconsGetCacheDirSync() + '/' + buddy_custom_icon; 614 | } else { 615 | let buddy_icon = proxy.PurpleConvImGetIconSync(this._conv_id); 616 | if (buddy_icon && buddy_icon != 0) { 617 | this._icon_file = 'file://' + proxy.PurpleBuddyIconGetFullPathSync(buddy_icon); 618 | } else { 619 | this._icon_file = false; 620 | } 621 | } 622 | 623 | this._buddyStatusChangeId = proxy.connectSignal('BuddyStatusChanged', this._onBuddyStatusChange.bind(this)); 624 | this._buddySignedOffId = proxy.connectSignal('BuddySignedOff', this._onBuddySignedOff.bind(this)); 625 | this._buddySignedOnId = proxy.connectSignal('BuddySignedOn', this._onBuddySignedOn.bind(this)); 626 | } 627 | 628 | destroy() { 629 | let proxy = this._client.proxy; 630 | if (this._buddyStatusChangeId > 0) { 631 | proxy.disconnectSignal(this._buddyStatusChangeId); 632 | this._buddyStatusChangeId = 0; 633 | } 634 | if (this._buddySignedOnId > 0) { 635 | proxy.disconnectSignal(this._buddySignedOnId); 636 | this._buddySignedOnId = 0; 637 | } 638 | if (this._buddySignedOffId > 0) { 639 | proxy.disconnectSignal(this._buddySignedOffId); 640 | this._buddySignedOffId = 0; 641 | } 642 | super.destroy(); 643 | } 644 | 645 | _get_status_id() { 646 | let proxy = this._client.proxy; 647 | let buddy_status = proxy.PurplePresenceGetActiveStatusSync(this._buddy_presence); 648 | this._status_id = getStatusCode(proxy.PurpleStatusGetIdSync(buddy_status)); 649 | } 650 | 651 | _makeMessage(author, text, _ts, direction) { 652 | return makeMessage(text, this._buddy_alias, _ts, direction); 653 | } 654 | 655 | _onBuddyStatusChange (emitter, something, params) { 656 | if (params[0] != this._buddy) { 657 | return; 658 | } 659 | let proxy = this._client.proxy; 660 | this._status_id = getStatusCode(proxy.PurpleStatusGetIdSync(params[2])); 661 | this._updateStatus(); 662 | } 663 | 664 | _onBuddySignedOff(emitter, something, params) { 665 | if (params.toString() != this._buddy.toString()){ 666 | return; 667 | } 668 | this._get_status_id(); 669 | this._updateStatus(); 670 | } 671 | 672 | _onBuddySignedOn(emitter, something, params) { 673 | if (params.toString() != this._buddy.toString()) { 674 | return; 675 | } 676 | this._get_status_id(); 677 | this._updateStatus(); 678 | } 679 | 680 | _updateStatus() { 681 | this._notification.update(this._notification.title, _fixText(this._notification.bannerBodyText), {secondaryGIcon: this.getSecondaryIcon()}); 682 | } 683 | }); 684 | 685 | const ChatSource = GObject.registerClass( 686 | class ChatSource extends Source { 687 | _init(client, account, author, conversation) { 688 | super._init(client, account, author, conversation); 689 | let proxy = client.proxy; 690 | this._isChat = true; 691 | this._cbNames = {}; 692 | this._conv_id = proxy.PurpleConvChatSync(conversation); 693 | this._status_id = USER_ONLINE; 694 | 695 | let chat_name = proxy.PurpleConversationGetNameSync(conversation); 696 | let chat_node = proxy.PurpleBlistFindChatSync(account, chat_name[0]); 697 | let icon = proxy.PurpleBlistNodeGetStringSync(chat_node, 'custom_buddy_icon'); 698 | if(icon && icon != 0) 699 | this._icon_file = 'file://' + proxy.PurpleBuddyIconsGetCacheDirSync() + '/' + icon; 700 | else 701 | this._icon_file = false; 702 | } 703 | 704 | _makeMessage(author, text, _ts, direction) { 705 | if(direction == NotificationDirection.RECEIVED && 706 | this._cbNames[author] == undefined){ 707 | let proxy = this._client.proxy; 708 | let buddy = proxy.PurpleFindBuddySync(this._account, author); 709 | if(buddy==0) 710 | this._cbNames[author] = author; 711 | else { 712 | let alias = proxy.PurpleBuddyGetAliasSync(buddy); 713 | this._cbNames[author] = alias; 714 | } 715 | } 716 | 717 | var author_nick = null; 718 | 719 | if (direction == NotificationDirection.SENT) { 720 | author_nick = "me"; 721 | } else if (direction == NotificationDirection.RECEIVED) { 722 | author_nick = this._cbNames[author]; 723 | } else 724 | author_nick = ""; 725 | 726 | return makeMessage('[' + author_nick + ']: ' + text, author, _ts, direction); 727 | } 728 | }); 729 | 730 | class PidginSearchProvider { 731 | 732 | constructor(client){ 733 | this._client = client; 734 | this._enabled = false; 735 | this._resultSet = []; 736 | } 737 | 738 | enable() { 739 | if (!this._enabled){ 740 | try { 741 | Main.overview._overview._controls._searchController._searchResults._registerProvider(this); 742 | } catch (e) { 743 | log(e); 744 | } 745 | this._enabled = true; 746 | } 747 | } 748 | 749 | disable() { 750 | if (this._enabled){ 751 | try { 752 | Main.overview._overview._controls._searchController._searchResults._unregisterProvider(this); 753 | this.display = null; 754 | } catch (e) { 755 | log(e); 756 | } 757 | this._enabled = false; 758 | } 759 | } 760 | 761 | get appInfo() { 762 | return null; 763 | } 764 | 765 | get canLaunchSearch() { 766 | return false; 767 | } 768 | 769 | get id() { 770 | return 'pidgin@muffinmad'; 771 | } 772 | 773 | _createIconForBuddy(buddy, status_code, iconSize) { 774 | let box = new St.Widget({layout_manager: new Clutter.BinLayout()}); 775 | let p = this._client.proxy; 776 | var icon_file = false; 777 | 778 | let buddy_custom_icon = p.PurpleBlistNodeGetStringSync(p.PurpleBuddyGetContactSync(buddy), 'custom_buddy_icon'); 779 | if (buddy_custom_icon && buddy_custom_icon != 0) { 780 | icon_file = p.PurpleBuddyIconsGetCacheDirSync() + '/' + buddy_custom_icon; 781 | } else { 782 | let icon = p.PurpleBuddyGetIconSync(buddy); 783 | if (icon && icon != 0) { 784 | icon_file = p.PurpleBuddyIconGetFullPathSync(icon); 785 | } 786 | } 787 | 788 | if (icon_file) { 789 | box.add_actor(new St.Icon({ 790 | gicon: new Gio.FileIcon({ 791 | file: Gio.File.new_for_uri('file://' + icon_file) 792 | }), 793 | icon_size: iconSize 794 | })); 795 | } else { 796 | box.add_actor(new St.Icon({ gicon: new Gio.ThemedIcon({ name: 'avatar-default' }), icon_size: iconSize})); 797 | } 798 | box.add_actor(new St.Icon({ 799 | gicon: getStatusIcon(status_code), 800 | x_align: Clutter.ActorAlign.END, 801 | y_align: Clutter.ActorAlign.END, 802 | x_expand: true, 803 | y_expand: true, 804 | icon_size: iconSize/4 805 | })); 806 | return box; 807 | } 808 | 809 | getResultMeta(result) { 810 | return { 811 | id: result.buddy, 812 | name: result.alias + "\nvia " + result.account_name, 813 | createIcon: (iconSize) => { 814 | return this._createIconForBuddy(result.buddy, result.status_code, iconSize); 815 | } 816 | }; 817 | } 818 | 819 | getResultMetas(results, cancellable = null) { 820 | return new Promise((resolve, reject) => { 821 | const resultMetas = []; 822 | for (let identifier of results) 823 | resultMetas.push(this.getResultMeta(this._resultSet[identifier])); 824 | resolve(resultMetas); 825 | }); 826 | } 827 | 828 | filterResults(results, maxResults) { 829 | let res = results.sort(function(b1, b2) { 830 | let result = b2.status_code - b1.status_code; 831 | if (result == 0) { 832 | return b1.alias.toLowerCase().localeCompare(b2.alias.toLowerCase()); 833 | } 834 | return result; 835 | }); 836 | 837 | return res.slice(0, maxResults); 838 | } 839 | 840 | _filterBuddys(buddys, terms) { 841 | return buddys.filter(function(b) { 842 | let s = b.alias.toLowerCase(); 843 | let a = b.account_name[0].toLowerCase(); 844 | let h = b.handle[0].toLowerCase(); 845 | for (let t in terms) { 846 | let term = terms[t].toLowerCase(); 847 | let prefix = term.charAt(0); 848 | if (prefix == "@") { 849 | if (a.indexOf(term.substr(1)) == -1) { 850 | return false; 851 | } 852 | } else if (prefix == "#") { 853 | if (h.indexOf(term.substr(1)) == -1) { 854 | return false; 855 | } 856 | } else { 857 | if (s.indexOf(term) == -1) { 858 | return false; 859 | } 860 | } 861 | } 862 | return true; 863 | }); 864 | } 865 | 866 | _getBuddys(accounts) { 867 | let p = this._client.proxy; 868 | let _accounts = accounts.toString().split(','); 869 | let buddys = []; 870 | for (let i in _accounts) { 871 | let acc = _accounts[i]; 872 | let acc_name = p.PurpleAccountGetNameForDisplaySync(acc); 873 | let b = p.PurpleFindBuddiesSync(acc, '').toString().split(','); 874 | for (let x in b) { 875 | let buddy = b[x]; 876 | buddys.push({ 877 | buddy: buddy, 878 | account_name: acc_name, 879 | handle: p.PurpleBuddyGetNameSync(buddy), 880 | alias: p.PurpleBuddyGetAliasSync(buddy).toString(), 881 | status_code: getStatusCode(p.PurpleStatusGetIdSync(p.PurplePresenceGetActiveStatusSync(p.PurpleBuddyGetPresenceSync(buddy)))), 882 | toString: function() { 883 | return buddy; 884 | } 885 | }); 886 | } 887 | } 888 | return buddys; 889 | } 890 | 891 | createResultObject(resultMeta) { 892 | return null; 893 | } 894 | 895 | searchBuddysByTerms(terms) { 896 | try { 897 | let accounts = this._client.proxy.PurpleAccountsGetAllActiveSync(); 898 | return this._filterBuddys(this._getBuddys(accounts), terms); 899 | } catch (e) { 900 | log(`PidginBaseSearchProvider::searchByTerms(${terms}): ${e}`); 901 | return []; 902 | } 903 | } 904 | 905 | activateResult(result, terms) { 906 | let p = this._client.proxy; 907 | let buddy = this._resultSet[result]; 908 | p.PurpleConversationPresentRemote(p.PurpleConversationNewSync( 909 | 1, 910 | p.PurpleBuddyGetAccountSync(buddy), 911 | p.PurpleBuddyGetNameSync(buddy).toString() 912 | )); 913 | } 914 | 915 | getInitialResultSet(terms, cancellable = null) { 916 | let provider = this; 917 | 918 | return new Promise((resolve, reject) => { 919 | try { 920 | this._resultSet = {}; 921 | for (let buddy of provider.searchBuddysByTerms(terms)) 922 | this._resultSet[buddy.buddy] = buddy; 923 | } catch (e) { 924 | log(e); 925 | } 926 | resolve(Object.keys(this._resultSet)); 927 | }); 928 | } 929 | 930 | getSubsearchResultSet(results, terms, cancellable = null) { 931 | return this._filterBuddys(Object.values(this._resultSet), terms); 932 | } 933 | 934 | filterResults(results, maxResults) { 935 | return results.slice(0, maxResults); 936 | } 937 | } 938 | 939 | const Pidgin = Gio.DBusProxy.makeProxyWrapper(DBusIface.PidginInterface); 940 | 941 | export default class PidginExtension extends Extension { 942 | enable() { 943 | this._sources = {}; 944 | this._pending_messages = {}; 945 | this._displayedImMsgId = 0; 946 | this._setAvailable = 0; 947 | this._setUnavailable = 0; 948 | this._disable_timestamp = 0; 949 | this._searchProvider = null; 950 | this._messageTrayIntegration = false; 951 | 952 | this._proxy = new Pidgin(Gio.DBus.session, 'im.pidgin.purple.PurpleService', '/im/pidgin/purple/PurpleObject'); 953 | this._settings = this.getSettings(); 954 | this._enableMessageTrayChangeId = 955 | this._settings.connect( 956 | 'changed::enable-message-tray', 957 | this._enableMessageTrayChanged.bind(this)); 958 | this._enableSearchProviderChangeId = 959 | this._settings.connect( 960 | 'changed::enable-search-provider', 961 | this._enableSearchProviderChanged.bind(this)); 962 | this._enableSearchProviderChanged(); 963 | this._enableMessageTrayChanged(); 964 | } 965 | 966 | disable() { 967 | this.disableMessageTrayIntegration(); 968 | this.disableSearchProvider(); 969 | 970 | if (this._enableSearchProviderChangeId > 0) { 971 | this._settings.disconnect(this._enableSearchProviderChangeId); 972 | } 973 | if (this._enableMessageTrayChangeId > 0) { 974 | this._settings.disconnect(this._enableMessageTrayChangeId); 975 | } 976 | this._proxy = null; 977 | this._settings = null; 978 | } 979 | 980 | _enableMessageTrayChanged() { 981 | if (this._settings.get_boolean('enable-message-tray')) { 982 | this.enableMessageTrayIntegration(); 983 | } else { 984 | this.disableMessageTrayIntegration(); 985 | } 986 | } 987 | 988 | _enableSearchProviderChanged() { 989 | if (this._settings.get_boolean('enable-search-provider')) { 990 | this.enableSearchProvider(); 991 | } else { 992 | this.disableSearchProvider(); 993 | } 994 | } 995 | 996 | enableMessageTrayIntegration() { 997 | if (this._messageTrayIntegration) { 998 | return; 999 | } 1000 | 1001 | this._displayedImMsgId = this._proxy.connectSignal('DisplayedImMsg', this._messageDisplayedIm.bind(this)); 1002 | this._displayedChatMsgId = this._proxy.connectSignal('DisplayedChatMsg', this._messageDisplayedChat.bind(this)); 1003 | this._deleteConversationId = this._proxy.connectSignal('DeletingConversation', this._onDeleteConversation.bind(this)); 1004 | this._conversationUpdatedId = this._proxy.connectSignal('ConversationUpdated', this._onConversationUpdated.bind(this)); 1005 | 1006 | // existing conversations 1007 | try { 1008 | let conversations = this._proxy.PurpleGetImsSync().toString().split(','); 1009 | for (let i in conversations) { 1010 | let conv = conversations[i]; 1011 | if (!conv || conv == null) continue; 1012 | let messages = this._proxy.PurpleConversationGetMessageHistorySync(conv).toString().split(','); 1013 | let history = []; 1014 | let account = this._proxy.PurpleConversationGetAccountSync(conv); 1015 | for (let x in messages) { 1016 | let mess = messages[x]; 1017 | if (!mess || mess == null) continue; 1018 | history.push({ 1019 | conv: conv, 1020 | account: account, 1021 | author: this._proxy.PurpleConversationMessageGetSenderSync(mess).toString(), 1022 | text: this._proxy.PurpleConversationMessageGetMessageSync(mess), 1023 | flag: this._proxy.PurpleConversationMessageGetFlagsSync(mess), 1024 | timestamp: this._proxy.PurpleConversationMessageGetTimestampSync(mess) 1025 | }); 1026 | } 1027 | if (history.length == 0) continue; 1028 | history = history.sort(function(m1, m2) { 1029 | return m1.timestamp - m2.timestamp; 1030 | }); 1031 | for (let x in history) { 1032 | let h = history[x]; 1033 | this._handleMessage(h.account, h.author, h.text, h.conv, h.flag, h.timestamp, false); 1034 | } 1035 | } 1036 | } catch (e) { 1037 | log(e); 1038 | } 1039 | this._messageTrayIntegration = true; 1040 | } 1041 | 1042 | enableSearchProvider() { 1043 | if (this._searchProvider == null) { 1044 | this._searchProvider = new PidginSearchProvider(this); 1045 | } 1046 | this._searchProvider.enable(); 1047 | } 1048 | 1049 | disableMessageTrayIntegration() { 1050 | if (! this._messageTrayIntegration) { 1051 | return; 1052 | } 1053 | 1054 | this._disable_timestamp = Date.now() / 1000; 1055 | if (this._displayedImMsgId > 0) { 1056 | this._proxy.disconnectSignal(this._displayedImMsgId); 1057 | this._displayedImMsgId = 0; 1058 | } 1059 | if (this._displayedChatMsgId > 0) { 1060 | this._proxy.disconnectSignal(this._displayedChatMsgId); 1061 | this._displayedChatMsgId = 0; 1062 | } 1063 | if (this._deleteConversationId > 0) { 1064 | this._proxy.disconnectSignal(this._deleteConversationId); 1065 | this._deleteConversationId = 0; 1066 | } 1067 | if (this._conversationUpdatedId > 0) { 1068 | this._proxy.disconnectSignal(this._conversationUpdatedId); 1069 | this._conversationUpdatedId = 0; 1070 | } 1071 | 1072 | for (let key in this._sources) { 1073 | if (this._sources.hasOwnProperty(key)) { 1074 | let src = this._sources[key]; 1075 | this._pending_messages[key] = src._pendingMessages; 1076 | src.destroy(); 1077 | } 1078 | } 1079 | this._messageTrayIntegration = false; 1080 | } 1081 | 1082 | disableSearchProvider() { 1083 | if (this._searchProvider != null) { 1084 | this._searchProvider.disable(); 1085 | } 1086 | } 1087 | 1088 | get disable_timestamp() { 1089 | return this._disable_timestamp; 1090 | } 1091 | 1092 | get proxy() { 1093 | return this._proxy; 1094 | } 1095 | 1096 | get searchProvider() { 1097 | return this._searchProvider; 1098 | } 1099 | 1100 | _onDeleteConversation(emitter, something, conversation) { 1101 | let source = this._sources[conversation]; 1102 | if (source) { 1103 | source.destroy(); 1104 | } 1105 | } 1106 | 1107 | _onConversationUpdated(emitter, something, params) { 1108 | if (params[1] != 4) return; 1109 | let source = this._sources[params[0]]; 1110 | if (!source) return; 1111 | let focus = this._proxy.PurpleConversationHasFocusSync(params[0]); 1112 | if (focus == 1) { 1113 | source._markAllSeen(); 1114 | } 1115 | } 1116 | 1117 | _handleMessage(account, author, message, conversation, flag, timestamp, isChat) { 1118 | if (flag & 0x200) flag |= 2; // treat error message as received message 1119 | if (flag & 3 == 0) return; // nor send or receive message 1120 | var source = this._sources[conversation]; 1121 | if (!source) { 1122 | if (isChat) { 1123 | if (this._settings.get_boolean('chat-highlight-only') && flag != 34) return; 1124 | source = new ChatSource(this, account, author, conversation); 1125 | } else { 1126 | source = new ImSource(this, account, author, conversation); 1127 | } 1128 | let pm = this._pending_messages[conversation]; 1129 | if (pm) { 1130 | source._pendingMessages = pm; 1131 | source.countUpdated(); 1132 | delete this._pending_messages[conversation]; 1133 | } 1134 | source.connect('destroy', () => { 1135 | delete this._sources[conversation]; 1136 | }); 1137 | this._sources[conversation] = source; 1138 | } 1139 | source.handleMessage(author, message, flag, timestamp); 1140 | } 1141 | 1142 | _messageDisplayed(details, isChat) { 1143 | var account = details[0]; 1144 | var author = details[1]; 1145 | var message = details[2]; 1146 | var conversation = details[3]; 1147 | var flag = details[4]; 1148 | 1149 | this._handleMessage(account, author, message, conversation, flag, null, isChat); 1150 | } 1151 | 1152 | _messageDisplayedIm(emitter, something, details){ 1153 | this._messageDisplayed(details, false); 1154 | } 1155 | 1156 | _messageDisplayedChat(emitter, something, details){ 1157 | this._messageDisplayed(details, true); 1158 | } 1159 | }; 1160 | -------------------------------------------------------------------------------- /dbus.js: -------------------------------------------------------------------------------- 1 | /** 2 | This program is free software: you can redistribute it and/or modify 3 | it under the terms of the GNU General Public License as published by 4 | the Free Software Foundation, either version 2 of the License, or 5 | (at your option) any later version. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program. If not, see . 14 | **/ 15 | 16 | export const PidginInterface = ` 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | 691 | 692 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 723 | 724 | 725 | 726 | 727 | 728 | 729 | 730 | 731 | 732 | 733 | 734 | 735 | 736 | 737 | 738 | 739 | 740 | 741 | 742 | 743 | 744 | 745 | 746 | 747 | 748 | 749 | 750 | 751 | 752 | 753 | 754 | 755 | 756 | 757 | 758 | 759 | 760 | 761 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | 769 | 770 | 771 | 772 | 773 | 774 | 775 | 776 | 777 | 778 | 779 | 780 | 781 | 782 | 783 | 784 | 785 | 786 | 787 | 788 | 789 | 790 | 791 | 792 | 793 | 794 | 795 | 796 | 797 | 798 | 799 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 832 | 833 | 834 | 835 | 836 | 837 | 838 | 839 | 840 | 841 | 842 | 843 | 844 | 845 | 846 | 847 | 848 | 849 | 850 | 851 | 852 | 853 | 854 | 855 | 856 | 857 | 858 | 859 | 860 | 861 | 862 | 863 | 864 | 865 | 866 | 867 | 868 | 869 | 870 | 871 | 872 | 873 | 874 | 875 | 876 | 877 | 878 | 879 | 880 | 881 | 882 | 883 | 884 | 885 | 886 | 887 | 888 | 889 | 890 | 891 | 892 | 893 | 894 | 895 | 896 | 897 | 898 | 899 | 900 | 901 | 902 | 903 | 904 | 905 | 906 | 907 | 908 | 909 | 910 | 911 | 912 | 913 | 914 | 915 | 916 | 917 | 918 | 919 | 920 | 921 | 922 | 923 | 924 | 925 | 926 | 927 | 928 | 929 | 930 | 931 | 932 | 933 | 934 | 935 | 936 | 937 | 938 | 939 | 940 | 941 | 942 | 943 | 944 | 945 | 946 | 947 | 948 | 949 | 950 | 951 | 952 | 953 | 954 | 955 | 956 | 957 | 958 | 959 | 960 | 961 | 962 | 963 | 964 | 965 | 966 | 967 | 968 | 969 | 970 | 971 | 972 | 973 | 974 | 975 | 976 | 977 | 978 | 979 | 980 | 981 | 982 | 983 | 984 | 985 | 986 | 987 | 988 | 989 | 990 | 991 | 992 | 993 | 994 | 995 | 996 | 997 | 998 | 999 | 1000 | 1001 | 1002 | 1003 | 1004 | 1005 | 1006 | 1007 | 1008 | 1009 | 1010 | 1011 | 1012 | 1013 | 1014 | 1015 | 1016 | 1017 | 1018 | 1019 | 1020 | 1021 | 1022 | 1023 | 1024 | 1025 | 1026 | 1027 | 1028 | 1029 | 1030 | 1031 | 1032 | 1033 | 1034 | 1035 | 1036 | 1037 | 1038 | 1039 | 1040 | 1041 | 1042 | 1043 | 1044 | 1045 | 1046 | 1047 | 1048 | 1049 | 1050 | 1051 | 1052 | 1053 | 1054 | 1055 | 1056 | 1057 | 1058 | 1059 | 1060 | 1061 | 1062 | 1063 | 1064 | 1065 | 1066 | 1067 | 1068 | 1069 | 1070 | 1071 | 1072 | 1073 | 1074 | 1075 | 1076 | 1077 | 1078 | 1079 | 1080 | 1081 | 1082 | 1083 | 1084 | 1085 | 1086 | 1087 | 1088 | 1089 | 1090 | 1091 | 1092 | 1093 | 1094 | 1095 | 1096 | 1097 | 1098 | 1099 | 1100 | 1101 | 1102 | 1103 | 1104 | 1105 | 1106 | 1107 | 1108 | 1109 | 1110 | 1111 | 1112 | 1113 | 1114 | 1115 | 1116 | 1117 | 1118 | 1119 | 1120 | 1121 | 1122 | 1123 | 1124 | 1125 | 1126 | 1127 | 1128 | 1129 | 1130 | 1131 | 1132 | 1133 | 1134 | 1135 | 1136 | 1137 | 1138 | 1139 | 1140 | 1141 | 1142 | 1143 | 1144 | 1145 | 1146 | 1147 | 1148 | 1149 | 1150 | 1151 | 1152 | 1153 | 1154 | 1155 | 1156 | 1157 | 1158 | 1159 | 1160 | 1161 | 1162 | 1163 | 1164 | 1165 | 1166 | 1167 | 1168 | 1169 | 1170 | 1171 | 1172 | 1173 | 1174 | 1175 | 1176 | 1177 | 1178 | 1179 | 1180 | 1181 | 1182 | 1183 | 1184 | 1185 | 1186 | 1187 | 1188 | 1189 | 1190 | 1191 | 1192 | 1193 | 1194 | 1195 | 1196 | 1197 | 1198 | 1199 | 1200 | 1201 | 1202 | 1203 | 1204 | 1205 | 1206 | 1207 | 1208 | 1209 | 1210 | 1211 | 1212 | 1213 | 1214 | 1215 | 1216 | 1217 | 1218 | 1219 | 1220 | 1221 | 1222 | 1223 | 1224 | 1225 | 1226 | 1227 | 1228 | 1229 | 1230 | 1231 | 1232 | 1233 | 1234 | 1235 | 1236 | 1237 | 1238 | 1239 | 1240 | 1241 | 1242 | 1243 | 1244 | 1245 | 1246 | 1247 | 1248 | 1249 | 1250 | 1251 | 1252 | 1253 | 1254 | 1255 | 1256 | 1257 | 1258 | 1259 | 1260 | 1261 | 1262 | 1263 | 1264 | 1265 | 1266 | 1267 | 1268 | 1269 | 1270 | 1271 | 1272 | 1273 | 1274 | 1275 | 1276 | 1277 | 1278 | 1279 | 1280 | 1281 | 1282 | 1283 | 1284 | 1285 | 1286 | 1287 | 1288 | 1289 | 1290 | 1291 | 1292 | 1293 | 1294 | 1295 | 1296 | 1297 | 1298 | 1299 | 1300 | 1301 | 1302 | 1303 | 1304 | 1305 | 1306 | 1307 | 1308 | 1309 | 1310 | 1311 | 1312 | 1313 | 1314 | 1315 | 1316 | 1317 | 1318 | 1319 | 1320 | 1321 | 1322 | 1323 | 1324 | 1325 | 1326 | 1327 | 1328 | 1329 | 1330 | 1331 | 1332 | 1333 | 1334 | 1335 | 1336 | 1337 | 1338 | 1339 | 1340 | 1341 | 1342 | 1343 | 1344 | 1345 | 1346 | 1347 | 1348 | 1349 | 1350 | 1351 | 1352 | 1353 | 1354 | 1355 | 1356 | 1357 | 1358 | 1359 | 1360 | 1361 | 1362 | 1363 | 1364 | 1365 | 1366 | 1367 | 1368 | 1369 | 1370 | 1371 | 1372 | 1373 | 1374 | 1375 | 1376 | 1377 | 1378 | 1379 | 1380 | 1381 | 1382 | 1383 | 1384 | 1385 | 1386 | 1387 | 1388 | 1389 | 1390 | 1391 | 1392 | 1393 | 1394 | 1395 | 1396 | 1397 | 1398 | 1399 | 1400 | 1401 | 1402 | 1403 | 1404 | 1405 | 1406 | 1407 | 1408 | 1409 | 1410 | 1411 | 1412 | 1413 | 1414 | 1415 | 1416 | 1417 | 1418 | 1419 | 1420 | 1421 | 1422 | 1423 | 1424 | 1425 | 1426 | 1427 | 1428 | 1429 | 1430 | 1431 | 1432 | 1433 | 1434 | 1435 | 1436 | 1437 | 1438 | 1439 | 1440 | 1441 | 1442 | 1443 | 1444 | 1445 | 1446 | 1447 | 1448 | 1449 | 1450 | 1451 | 1452 | 1453 | 1454 | 1455 | 1456 | 1457 | 1458 | 1459 | 1460 | 1461 | 1462 | 1463 | 1464 | 1465 | 1466 | 1467 | 1468 | 1469 | 1470 | 1471 | 1472 | 1473 | 1474 | 1475 | 1476 | 1477 | 1478 | 1479 | 1480 | 1481 | 1482 | 1483 | 1484 | 1485 | 1486 | 1487 | 1488 | 1489 | 1490 | 1491 | 1492 | 1493 | 1494 | 1495 | 1496 | 1497 | 1498 | 1499 | 1500 | 1501 | 1502 | 1503 | 1504 | 1505 | 1506 | 1507 | 1508 | 1509 | 1510 | 1511 | 1512 | 1513 | 1514 | 1515 | 1516 | 1517 | 1518 | 1519 | 1520 | 1521 | 1522 | 1523 | 1524 | 1525 | 1526 | 1527 | 1528 | 1529 | 1530 | 1531 | 1532 | 1533 | 1534 | 1535 | 1536 | 1537 | 1538 | 1539 | 1540 | 1541 | 1542 | 1543 | 1544 | 1545 | 1546 | 1547 | 1548 | 1549 | 1550 | 1551 | 1552 | 1553 | 1554 | 1555 | 1556 | 1557 | 1558 | 1559 | 1560 | 1561 | 1562 | 1563 | 1564 | 1565 | 1566 | 1567 | 1568 | 1569 | 1570 | 1571 | 1572 | 1573 | 1574 | 1575 | 1576 | 1577 | 1578 | 1579 | 1580 | 1581 | 1582 | 1583 | 1584 | 1585 | 1586 | 1587 | 1588 | 1589 | 1590 | 1591 | 1592 | 1593 | 1594 | 1595 | 1596 | 1597 | 1598 | 1599 | 1600 | 1601 | 1602 | 1603 | 1604 | 1605 | 1606 | 1607 | 1608 | 1609 | 1610 | 1611 | 1612 | 1613 | 1614 | 1615 | 1616 | 1617 | 1618 | 1619 | 1620 | 1621 | 1622 | 1623 | 1624 | 1625 | 1626 | 1627 | 1628 | 1629 | 1630 | 1631 | 1632 | 1633 | 1634 | 1635 | 1636 | 1637 | 1638 | 1639 | 1640 | 1641 | 1642 | 1643 | 1644 | 1645 | 1646 | 1647 | 1648 | 1649 | 1650 | 1651 | 1652 | 1653 | 1654 | 1655 | 1656 | 1657 | 1658 | 1659 | 1660 | 1661 | 1662 | 1663 | 1664 | 1665 | 1666 | 1667 | 1668 | 1669 | 1670 | 1671 | 1672 | 1673 | 1674 | 1675 | 1676 | 1677 | 1678 | 1679 | 1680 | 1681 | 1682 | 1683 | 1684 | 1685 | 1686 | 1687 | 1688 | 1689 | 1690 | 1691 | 1692 | 1693 | 1694 | 1695 | 1696 | 1697 | 1698 | 1699 | 1700 | 1701 | 1702 | 1703 | 1704 | 1705 | 1706 | 1707 | 1708 | 1709 | 1710 | 1711 | 1712 | 1713 | 1714 | 1715 | 1716 | 1717 | 1718 | 1719 | 1720 | 1721 | 1722 | 1723 | 1724 | 1725 | 1726 | 1727 | 1728 | 1729 | 1730 | 1731 | 1732 | 1733 | 1734 | 1735 | 1736 | 1737 | 1738 | 1739 | 1740 | 1741 | 1742 | 1743 | 1744 | 1745 | 1746 | 1747 | 1748 | 1749 | 1750 | 1751 | 1752 | 1753 | 1754 | 1755 | 1756 | 1757 | 1758 | 1759 | 1760 | 1761 | 1762 | 1763 | 1764 | 1765 | 1766 | 1767 | 1768 | 1769 | 1770 | 1771 | 1772 | 1773 | 1774 | 1775 | 1776 | 1777 | 1778 | 1779 | 1780 | 1781 | 1782 | 1783 | 1784 | 1785 | 1786 | 1787 | 1788 | 1789 | 1790 | 1791 | 1792 | 1793 | 1794 | 1795 | 1796 | 1797 | 1798 | 1799 | 1800 | 1801 | 1802 | 1803 | 1804 | 1805 | 1806 | 1807 | 1808 | 1809 | 1810 | 1811 | 1812 | 1813 | 1814 | 1815 | 1816 | 1817 | 1818 | 1819 | 1820 | 1821 | 1822 | 1823 | 1824 | 1825 | 1826 | 1827 | 1828 | 1829 | 1830 | 1831 | 1832 | 1833 | 1834 | 1835 | 1836 | 1837 | 1838 | 1839 | 1840 | 1841 | 1842 | 1843 | 1844 | 1845 | 1846 | 1847 | 1848 | 1849 | 1850 | 1851 | 1852 | 1853 | 1854 | 1855 | 1856 | 1857 | 1858 | 1859 | 1860 | 1861 | 1862 | 1863 | 1864 | 1865 | 1866 | 1867 | 1868 | 1869 | 1870 | 1871 | 1872 | 1873 | 1874 | 1875 | 1876 | 1877 | 1878 | 1879 | 1880 | 1881 | 1882 | 1883 | 1884 | 1885 | 1886 | 1887 | 1888 | 1889 | 1890 | 1891 | 1892 | 1893 | 1894 | 1895 | 1896 | 1897 | 1898 | 1899 | 1900 | 1901 | 1902 | 1903 | 1904 | 1905 | 1906 | 1907 | 1908 | 1909 | 1910 | 1911 | 1912 | 1913 | 1914 | 1915 | 1916 | 1917 | 1918 | 1919 | 1920 | 1921 | 1922 | 1923 | 1924 | 1925 | 1926 | 1927 | 1928 | 1929 | 1930 | 1931 | 1932 | 1933 | 1934 | 1935 | 1936 | 1937 | 1938 | 1939 | 1940 | 1941 | 1942 | 1943 | 1944 | 1945 | 1946 | 1947 | 1948 | 1949 | 1950 | 1951 | 1952 | 1953 | 1954 | 1955 | 1956 | 1957 | 1958 | 1959 | 1960 | 1961 | 1962 | 1963 | 1964 | 1965 | 1966 | 1967 | 1968 | 1969 | 1970 | 1971 | 1972 | 1973 | 1974 | 1975 | 1976 | 1977 | 1978 | 1979 | 1980 | 1981 | 1982 | 1983 | 1984 | 1985 | 1986 | 1987 | 1988 | 1989 | 1990 | 1991 | 1992 | 1993 | 1994 | 1995 | 1996 | 1997 | 1998 | 1999 | 2000 | 2001 | 2002 | 2003 | 2004 | 2005 | 2006 | 2007 | 2008 | 2009 | 2010 | 2011 | 2012 | 2013 | 2014 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | 2027 | 2028 | 2029 | 2030 | 2031 | 2032 | 2033 | 2034 | 2035 | 2036 | 2037 | 2038 | 2039 | 2040 | 2041 | 2042 | 2043 | 2044 | 2045 | 2046 | 2047 | 2048 | 2049 | 2050 | 2051 | 2052 | 2053 | 2054 | 2055 | 2056 | 2057 | 2058 | 2059 | 2060 | 2061 | 2062 | 2063 | 2064 | 2065 | 2066 | 2067 | 2068 | 2069 | 2070 | 2071 | 2072 | 2073 | 2074 | 2075 | 2076 | 2077 | 2078 | 2079 | 2080 | 2081 | 2082 | 2083 | 2084 | 2085 | 2086 | 2087 | 2088 | 2089 | 2090 | 2091 | 2092 | 2093 | 2094 | 2095 | 2096 | 2097 | 2098 | 2099 | 2100 | 2101 | 2102 | 2103 | 2104 | 2105 | 2106 | 2107 | 2108 | 2109 | 2110 | 2111 | 2112 | 2113 | 2114 | 2115 | 2116 | 2117 | 2118 | 2119 | 2120 | 2121 | 2122 | 2123 | 2124 | 2125 | 2126 | 2127 | 2128 | 2129 | 2130 | 2131 | 2132 | 2133 | 2134 | 2135 | 2136 | 2137 | 2138 | 2139 | 2140 | 2141 | 2142 | 2143 | 2144 | 2145 | 2146 | 2147 | 2148 | 2149 | 2150 | 2151 | 2152 | 2153 | 2154 | 2155 | 2156 | 2157 | 2158 | 2159 | 2160 | 2161 | 2162 | 2163 | 2164 | 2165 | 2166 | 2167 | 2168 | 2169 | 2170 | 2171 | 2172 | 2173 | 2174 | 2175 | 2176 | 2177 | 2178 | 2179 | 2180 | 2181 | 2182 | 2183 | 2184 | 2185 | 2186 | 2187 | 2188 | 2189 | 2190 | 2191 | 2192 | 2193 | 2194 | 2195 | 2196 | 2197 | 2198 | 2199 | 2200 | 2201 | 2202 | 2203 | 2204 | 2205 | 2206 | 2207 | 2208 | 2209 | 2210 | 2211 | 2212 | 2213 | 2214 | 2215 | 2216 | 2217 | 2218 | 2219 | 2220 | 2221 | 2222 | 2223 | 2224 | 2225 | 2226 | 2227 | 2228 | 2229 | 2230 | 2231 | 2232 | 2233 | 2234 | 2235 | 2236 | 2237 | 2238 | 2239 | 2240 | 2241 | 2242 | 2243 | 2244 | 2245 | 2246 | 2247 | 2248 | 2249 | 2250 | 2251 | 2252 | 2253 | 2254 | 2255 | 2256 | 2257 | 2258 | 2259 | 2260 | 2261 | 2262 | 2263 | 2264 | 2265 | 2266 | 2267 | 2268 | 2269 | 2270 | 2271 | 2272 | 2273 | 2274 | 2275 | 2276 | 2277 | 2278 | 2279 | 2280 | 2281 | 2282 | 2283 | 2284 | 2285 | 2286 | 2287 | 2288 | 2289 | 2290 | 2291 | 2292 | 2293 | 2294 | 2295 | 2296 | 2297 | 2298 | 2299 | 2300 | 2301 | 2302 | 2303 | 2304 | 2305 | 2306 | 2307 | 2308 | 2309 | 2310 | 2311 | 2312 | 2313 | 2314 | 2315 | 2316 | 2317 | 2318 | 2319 | 2320 | 2321 | 2322 | 2323 | 2324 | 2325 | 2326 | 2327 | 2328 | 2329 | 2330 | 2331 | 2332 | 2333 | 2334 | 2335 | 2336 | 2337 | 2338 | 2339 | 2340 | 2341 | 2342 | 2343 | 2344 | 2345 | 2346 | 2347 | 2348 | 2349 | 2350 | 2351 | 2352 | 2353 | 2354 | 2355 | 2356 | 2357 | 2358 | 2359 | 2360 | 2361 | 2362 | 2363 | 2364 | 2365 | 2366 | 2367 | 2368 | 2369 | 2370 | 2371 | 2372 | 2373 | 2374 | 2375 | 2376 | 2377 | 2378 | 2379 | 2380 | 2381 | 2382 | 2383 | 2384 | 2385 | 2386 | 2387 | 2388 | 2389 | 2390 | 2391 | 2392 | 2393 | 2394 | 2395 | 2396 | 2397 | 2398 | 2399 | 2400 | 2401 | 2402 | 2403 | 2404 | 2405 | 2406 | 2407 | 2408 | 2409 | 2410 | 2411 | 2412 | 2413 | 2414 | 2415 | 2416 | 2417 | 2418 | 2419 | 2420 | 2421 | 2422 | 2423 | 2424 | 2425 | 2426 | 2427 | 2428 | 2429 | 2430 | 2431 | 2432 | 2433 | 2434 | 2435 | 2436 | 2437 | 2438 | 2439 | 2440 | 2441 | 2442 | 2443 | 2444 | 2445 | 2446 | 2447 | 2448 | 2449 | 2450 | 2451 | 2452 | 2453 | 2454 | 2455 | 2456 | 2457 | 2458 | 2459 | 2460 | 2461 | 2462 | 2463 | 2464 | 2465 | 2466 | 2467 | 2468 | 2469 | 2470 | 2471 | 2472 | 2473 | 2474 | 2475 | 2476 | 2477 | 2478 | 2479 | 2480 | 2481 | 2482 | 2483 | 2484 | 2485 | 2486 | 2487 | 2488 | 2489 | 2490 | 2491 | 2492 | 2493 | 2494 | 2495 | 2496 | 2497 | 2498 | 2499 | 2500 | 2501 | 2502 | 2503 | 2504 | 2505 | 2506 | 2507 | 2508 | 2509 | 2510 | 2511 | 2512 | 2513 | 2514 | 2515 | 2516 | 2517 | 2518 | 2519 | 2520 | 2521 | 2522 | 2523 | 2524 | 2525 | 2526 | 2527 | 2528 | 2529 | 2530 | 2531 | 2532 | 2533 | 2534 | 2535 | 2536 | 2537 | 2538 | 2539 | 2540 | 2541 | 2542 | 2543 | 2544 | 2545 | 2546 | 2547 | 2548 | 2549 | 2550 | 2551 | 2552 | 2553 | 2554 | 2555 | 2556 | 2557 | 2558 | 2559 | 2560 | 2561 | 2562 | 2563 | 2564 | 2565 | 2566 | 2567 | 2568 | 2569 | 2570 | 2571 | 2572 | 2573 | 2574 | 2575 | 2576 | 2577 | 2578 | 2579 | 2580 | 2581 | 2582 | 2583 | 2584 | 2585 | 2586 | 2587 | 2588 | 2589 | 2590 | 2591 | 2592 | 2593 | 2594 | 2595 | 2596 | 2597 | 2598 | 2599 | 2600 | 2601 | 2602 | 2603 | 2604 | 2605 | 2606 | 2607 | 2608 | 2609 | 2610 | 2611 | 2612 | 2613 | 2614 | 2615 | 2616 | 2617 | 2618 | 2619 | 2620 | 2621 | 2622 | 2623 | 2624 | 2625 | 2626 | 2627 | 2628 | 2629 | 2630 | 2631 | 2632 | 2633 | 2634 | 2635 | 2636 | 2637 | 2638 | 2639 | 2640 | 2641 | 2642 | 2643 | 2644 | 2645 | 2646 | 2647 | 2648 | 2649 | 2650 | 2651 | 2652 | 2653 | 2654 | 2655 | 2656 | 2657 | 2658 | 2659 | 2660 | 2661 | 2662 | 2663 | 2664 | 2665 | 2666 | 2667 | 2668 | 2669 | 2670 | 2671 | 2672 | 2673 | 2674 | 2675 | 2676 | 2677 | 2678 | 2679 | 2680 | 2681 | 2682 | 2683 | 2684 | 2685 | 2686 | 2687 | 2688 | 2689 | 2690 | 2691 | 2692 | 2693 | 2694 | 2695 | 2696 | 2697 | 2698 | 2699 | 2700 | 2701 | 2702 | 2703 | 2704 | 2705 | 2706 | 2707 | 2708 | 2709 | 2710 | 2711 | 2712 | 2713 | 2714 | 2715 | 2716 | 2717 | 2718 | 2719 | 2720 | 2721 | 2722 | 2723 | 2724 | 2725 | 2726 | 2727 | 2728 | 2729 | 2730 | 2731 | 2732 | 2733 | 2734 | 2735 | 2736 | 2737 | 2738 | 2739 | 2740 | 2741 | 2742 | 2743 | 2744 | 2745 | 2746 | 2747 | 2748 | 2749 | 2750 | 2751 | 2752 | 2753 | 2754 | 2755 | 2756 | 2757 | 2758 | 2759 | 2760 | 2761 | 2762 | 2763 | 2764 | 2765 | 2766 | 2767 | 2768 | 2769 | 2770 | 2771 | 2772 | 2773 | 2774 | 2775 | 2776 | 2777 | 2778 | 2779 | 2780 | 2781 | 2782 | 2783 | 2784 | 2785 | 2786 | 2787 | 2788 | 2789 | 2790 | 2791 | 2792 | 2793 | 2794 | 2795 | 2796 | 2797 | 2798 | 2799 | 2800 | 2801 | 2802 | 2803 | 2804 | 2805 | 2806 | 2807 | 2808 | 2809 | 2810 | 2811 | 2812 | 2813 | 2814 | 2815 | 2816 | 2817 | 2818 | 2819 | 2820 | 2821 | 2822 | 2823 | 2824 | 2825 | 2826 | 2827 | 2828 | 2829 | 2830 | 2831 | 2832 | 2833 | 2834 | 2835 | 2836 | 2837 | 2838 | 2839 | 2840 | 2841 | 2842 | 2843 | 2844 | 2845 | 2846 | 2847 | 2848 | 2849 | 2850 | 2851 | 2852 | 2853 | 2854 | 2855 | 2856 | 2857 | 2858 | 2859 | 2860 | 2861 | 2862 | 2863 | 2864 | 2865 | 2866 | 2867 | 2868 | 2869 | 2870 | 2871 | 2872 | 2873 | 2874 | 2875 | 2876 | 2877 | 2878 | 2879 | 2880 | 2881 | 2882 | 2883 | 2884 | 2885 | 2886 | 2887 | 2888 | 2889 | 2890 | 2891 | 2892 | 2893 | 2894 | 2895 | 2896 | 2897 | 2898 | 2899 | 2900 | 2901 | 2902 | 2903 | 2904 | 2905 | 2906 | 2907 | 2908 | 2909 | 2910 | 2911 | 2912 | 2913 | 2914 | 2915 | 2916 | 2917 | 2918 | 2919 | 2920 | 2921 | 2922 | 2923 | 2924 | 2925 | 2926 | 2927 | 2928 | 2929 | 2930 | 2931 | 2932 | 2933 | 2934 | 2935 | 2936 | 2937 | 2938 | 2939 | 2940 | 2941 | 2942 | 2943 | 2944 | 2945 | 2946 | 2947 | 2948 | 2949 | 2950 | 2951 | 2952 | 2953 | 2954 | 2955 | 2956 | 2957 | 2958 | 2959 | 2960 | 2961 | 2962 | 2963 | 2964 | 2965 | 2966 | 2967 | 2968 | 2969 | 2970 | 2971 | 2972 | 2973 | 2974 | 2975 | 2976 | 2977 | 2978 | 2979 | 2980 | 2981 | 2982 | 2983 | 2984 | 2985 | 2986 | 2987 | 2988 | 2989 | 2990 | 2991 | 2992 | 2993 | 2994 | 2995 | 2996 | 2997 | 2998 | 2999 | 3000 | 3001 | 3002 | 3003 | 3004 | 3005 | 3006 | 3007 | 3008 | 3009 | 3010 | 3011 | 3012 | 3013 | 3014 | 3015 | 3016 | 3017 | 3018 | 3019 | 3020 | 3021 | 3022 | 3023 | 3024 | 3025 | 3026 | 3027 | 3028 | 3029 | 3030 | 3031 | 3032 | 3033 | 3034 | 3035 | 3036 | 3037 | 3038 | 3039 | 3040 | 3041 | 3042 | 3043 | 3044 | 3045 | 3046 | 3047 | 3048 | 3049 | 3050 | 3051 | 3052 | 3053 | 3054 | 3055 | 3056 | 3057 | 3058 | 3059 | 3060 | 3061 | 3062 | 3063 | 3064 | 3065 | 3066 | 3067 | 3068 | 3069 | 3070 | 3071 | 3072 | 3073 | 3074 | 3075 | 3076 | 3077 | 3078 | 3079 | 3080 | 3081 | 3082 | 3083 | 3084 | 3085 | 3086 | 3087 | 3088 | 3089 | 3090 | 3091 | 3092 | 3093 | 3094 | 3095 | 3096 | 3097 | 3098 | 3099 | 3100 | 3101 | 3102 | 3103 | 3104 | 3105 | 3106 | 3107 | 3108 | 3109 | 3110 | 3111 | 3112 | 3113 | 3114 | 3115 | 3116 | 3117 | 3118 | 3119 | 3120 | 3121 | 3122 | 3123 | 3124 | 3125 | 3126 | 3127 | 3128 | 3129 | 3130 | 3131 | 3132 | 3133 | 3134 | 3135 | 3136 | 3137 | 3138 | 3139 | 3140 | 3141 | 3142 | 3143 | 3144 | 3145 | 3146 | 3147 | 3148 | 3149 | 3150 | 3151 | 3152 | 3153 | 3154 | 3155 | 3156 | 3157 | 3158 | 3159 | 3160 | 3161 | 3162 | 3163 | 3164 | 3165 | 3166 | 3167 | 3168 | 3169 | 3170 | 3171 | 3172 | 3173 | 3174 | 3175 | 3176 | 3177 | 3178 | 3179 | 3180 | 3181 | 3182 | 3183 | 3184 | 3185 | 3186 | 3187 | 3188 | 3189 | 3190 | 3191 | 3192 | 3193 | 3194 | 3195 | 3196 | 3197 | 3198 | 3199 | 3200 | 3201 | 3202 | 3203 | 3204 | 3205 | 3206 | 3207 | 3208 | 3209 | 3210 | 3211 | 3212 | 3213 | 3214 | 3215 | 3216 | 3217 | 3218 | 3219 | 3220 | 3221 | 3222 | 3223 | 3224 | 3225 | 3226 | 3227 | 3228 | 3229 | 3230 | 3231 | 3232 | 3233 | 3234 | 3235 | 3236 | 3237 | 3238 | 3239 | 3240 | 3241 | 3242 | 3243 | 3244 | 3245 | 3246 | 3247 | 3248 | 3249 | 3250 | 3251 | 3252 | 3253 | 3254 | 3255 | 3256 | 3257 | 3258 | 3259 | 3260 | 3261 | 3262 | 3263 | 3264 | 3265 | 3266 | 3267 | 3268 | 3269 | 3270 | 3271 | 3272 | 3273 | 3274 | 3275 | 3276 | 3277 | 3278 | 3279 | 3280 | 3281 | 3282 | 3283 | 3284 | 3285 | 3286 | 3287 | 3288 | 3289 | 3290 | 3291 | 3292 | 3293 | 3294 | 3295 | 3296 | 3297 | 3298 | 3299 | 3300 | 3301 | 3302 | 3303 | 3304 | 3305 | 3306 | 3307 | 3308 | 3309 | 3310 | 3311 | 3312 | 3313 | 3314 | 3315 | 3316 | 3317 | 3318 | 3319 | 3320 | 3321 | 3322 | 3323 | 3324 | 3325 | `; 3326 | --------------------------------------------------------------------------------