· 8 years ago · Jul 14, 2018, 04:58 AM
1
2X.W().Ab("cachefactory");
3var ct = new $("select name from sqlite_master where type = 'table';"), lt = new $("CREATE TABLE IF NOT EXISTS config_table (key VARCHAR(32) PRIMARY KEY,value TEXT);"), Gt = new $("REPLACE INTO config_table VALUES(?, ?);"), ft = new $("CREATE TABLE IF NOT EXISTS cached_queries (query VARCHAR(255) PRIMARY KEY,toplevel_data TEXT,type VARCHAR(20),totalCount INTEGER,firstIndex INTEGER,lastIndex INTEGER,hit_id INTEGER,lru_time INTEGER,size INTEGER,UNIQUE (hit_id));"), Lt = new $("CREATE UNIQUE INDEX IF NOT EXISTS cached_queries_query ON cached_queries(query ASC);"),
4Mt = new $("CREATE UNIQUE INDEX IF NOT EXISTS cached_queries_hitid ON cached_queries(hit_id ASC);"), gt = new $("CREATE TABLE IF NOT EXISTS hit_to_data (hit_id INTEGER,data_id VARCHAR(16),UNIQUE (hit_id, data_id));"), Nt = new $("CREATE INDEX IF NOT EXISTS hit_to_data_hit_id ON hit_to_data(hit_id ASC);"), Ot = new $("CREATE INDEX IF NOT EXISTS hit_to_data_data_id ON hit_to_data(data_id ASC);"), ht = new $("CREATE TABLE IF NOT EXISTS cached_conversation_headers (conversationId VARCHAR(16) PRIMARY KEY,isUnread INTEGER,isStarred INTEGER,isInbox INTEGER,isSpam INTEGER,isTrash INTEGER,isMuted INTEGER,isPhishy INTEGER,isDraft INTEGER,isActivity INTEGER,isMInbox INTEGER,personalLevel INTEGER,subject TEXT,snippetHtml TEXT,senderListHtml TEXT,numMessages INTEGER,dateMs INTEGER,modifyDateMs INTEGER,userLabelIds TEXT,hasAttachment INTEGER,mostRecentMessageId VARCHAR(16),activityId TEXT);"),
5Pt = new $("CREATE UNIQUE INDEX IF NOT EXISTS cached_conversation_headers_conversationId ON cached_conversation_headers(conversationId ASC);"), it = new $("CREATE TABLE IF NOT EXISTS cached_messages (messageId VARCHAR(16) PRIMARY KEY,conversationId VARCHAR(16),isUnread INTEGER,isStarred INTEGER,isInbox INTEGER,isSpam INTEGER,isTrash INTEGER,isMuted INTEGER,isPhishy INTEGER,isDraft INTEGER,isActivity INTEGER,isMInbox INTEGER,personalLevel INTEGER,subject TEXT,snippetHtml TEXT,address_from VARCHAR(64),address_to VARCHAR(64),address_cc VARCHAR(64),address_bcc VARCHAR(64),address_replyTo VARCHAR(64),receivedDateMs INTEGER,body TEXT,isClipped INTEGER,attachments VARCHAR(64),lastAction VARCHAR(16) DEFAULT NULL,originalMessageId VARCHAR(16) DEFAULT NULL)"),
6Qt = new $("CREATE UNIQUE INDEX IF NOT EXISTS cached_messages_message_id ON cached_messages(messageId ASC);"), Rt = new $("CREATE INDEX IF NOT EXISTS cached_messages_receivedDateMs ON cached_messages(receivedDateMs ASC);"), St = new $("CREATE INDEX IF NOT EXISTS cached_messages_conversationId ON cached_messages(conversationId ASC);"), et = new $("CREATE TABLE IF NOT EXISTS action_queue_8 (action_id INTEGER PRIMARY KEY,backing_id INTEGER DEFAULT NULL,action TEXT,action_type TEXT,referencedDataId VARCHAR(16) DEFAULT NULL,op TEXT DEFAULT NULL,dont_send INTEGER,request_failed INTEGER DEFAULT 0,timestamp INTEGER DEFAULT NULL);"),
7Ht = new $("CREATE UNIQUE INDEX IF NOT EXISTS action_queue_action_id ON action_queue_8(action_id ASC);"), It = new $("CREATE UNIQUE INDEX IF NOT EXISTS action_queue_backing_id ON action_queue_8(backing_id ASC);"), Jt = new $("CREATE INDEX IF NOT EXISTS action_queue_action_type ON action_queue_8(action_type ASC);"), Kt = new $("CREATE INDEX IF NOT EXISTS action_queue_ref_data ON action_queue_8 (referencedDataId ASC);"), jt = new $("CREATE TABLE IF NOT EXISTS cached_labels ( labelId TEXT PRIMARY KEY, position INTEGER, metadata TEXT, totalCount INTEGER, unreadCount INTEGER);"),
8Tt = new $("CREATE UNIQUE INDEX IF NOT EXISTS cached_labels_labelId ON cached_labels(labelId ASC);"), kt = new $("CREATE TABLE IF NOT EXISTS cached_contacts ( contactId INTEGER, name TEXT, emailAddress TEXT, isPrimary INTEGER, popularityRank INTEGER, PRIMARY KEY (contactId, emailAddress));"), Ut = new $("CREATE UNIQUE INDEX IF NOT EXISTS cached_contacts_contactId ON cached_contacts(contactId ASC);"), nt = new $("CREATE TRIGGER IF NOT EXISTS starUnstarMsgTrigger AFTER UPDATE OF isStarred ON cached_messages BEGIN UPDATE cached_conversation_headers SET isStarred = EXISTS ( SELECT 1 FROM cached_messages WHERE conversationId = old.conversationId AND isStarred = 1) WHERE conversationId = old.conversationId; END;"),
9Ct = new $("CREATE TRIGGER IF NOT EXISTS draftMsgAddTrigger AFTER INSERT ON cached_messages WHEN new.isDraft = 1 AND new.lastAction='sd'BEGIN UPDATE cached_conversation_headers SET isDraft = 1, senderListHtml = senderListHtml || ', <font color=\"#cc0000\">Draft</font>' WHERE conversationId = new.conversationId AND isDraft = 0; REPLACE INTO hit_to_data SELECT hit_id, new.messageId FROM cached_queries WHERE query = ('c|' || new.conversationId); UPDATE cached_queries SET totalCount = totalCount + 1, lastIndex = lastIndex + 1 WHERE query = ('c|' || new.conversationId); END;"),
10Dt = new $("CREATE TRIGGER IF NOT EXISTS draftMsgDelTrigger AFTER UPDATE OF lastAction ON cached_messages WHEN old.isDraft = 1 AND (new.lastAction='dd' OR new.lastAction='sem') BEGIN UPDATE cached_conversation_headers SET isDraft = 0, senderListHtml = replace(senderListHtml, ', <font color=\"#cc0000\">Draft</font>', '') WHERE conversationId = old.conversationId AND isDraft = 1 AND NOT EXISTS ( SELECT 1 FROM cached_messages WHERE conversationId = old.conversationId AND isDraft = 1 AND lastAction != 'dd' AND lastAction != 'sem'); UPDATE cached_queries SET totalCount = totalCount - 1, lastIndex = lastIndex - 1 WHERE hit_id IN (SELECT hit_id FROM hit_to_data WHERE hit_to_data.data_id = old.messageId); DELETE FROM cached_conversation_headers WHERE conversationId = old.conversationId AND NOT EXISTS(SELECT * FROM cached_messages WHERE cached_messages.conversationId = old.conversationId); DELETE FROM hit_to_data WHERE data_id = old.messageId;END;"),
11ot = new $("CREATE TRIGGER IF NOT EXISTS readUnreadTrigger AFTER UPDATE OF isUnread ON cached_conversation_headers BEGIN UPDATE cached_messages SET isUnread = new.isUnread WHERE conversationId = old.conversationId; END;"), pt = new $("CREATE TRIGGER IF NOT EXISTS archiveTrigger AFTER UPDATE OF isInbox, isMInbox ON cached_conversation_headers WHEN new.isInbox = 0 AND new.isMInbox = 0 BEGIN UPDATE cached_messages SET isInbox = 0, isMInbox = 0 WHERE conversationId = old.conversationId; END;"), qt =
12new $("CREATE TRIGGER IF NOT EXISTS moveToInboxTrigger AFTER UPDATE OF isInbox ON cached_conversation_headers WHEN new.isInbox = 1 BEGIN UPDATE cached_messages SET isInbox = 1, isSpam = 0, isTrash = 0, isMuted = 0 WHERE conversationId = old.conversationId; END;"), rt = new $("CREATE TRIGGER IF NOT EXISTS spamTrigger AFTER UPDATE OF isSpam ON cached_conversation_headers WHEN new.isSpam = 1 BEGIN UPDATE cached_messages SET isSpam = 1, isInbox = 0, isTrash = 0, isMuted = 0 WHERE conversationId = old.conversationId; END;"),
13st = new $("CREATE TRIGGER IF NOT EXISTS unspamTrigger AFTER UPDATE OF isSpam ON cached_conversation_headers WHEN new.isSpam = 0 BEGIN UPDATE cached_messages SET isSpam = 0 WHERE conversationId = old.conversationId; END;"), tt = new $("CREATE TRIGGER IF NOT EXISTS trashTrigger AFTER UPDATE OF isTrash ON cached_messages WHEN new.isTrash = 1 BEGIN UPDATE cached_conversation_headers SET isTrash = 1 WHERE conversationId = old.conversationId; END;"), ut = new $("CREATE TRIGGER IF NOT EXISTS muteTrigger AFTER UPDATE OF isMuted ON cached_conversation_headers WHEN new.isMuted = 1 BEGIN UPDATE cached_messages SET isMuted = 1, isInbox = 0, isSpam = 0, isTrash = 0 WHERE conversationId = old.conversationId; END;"),
14vt = new $("CREATE TRIGGER IF NOT EXISTS inboxTrigger AFTER UPDATE OF isInbox ON cached_messages WHEN new.isInbox = 0 BEGIN UPDATE cached_conversation_headers SET isInbox = 0 WHERE conversationId = old.conversationId AND NOT EXISTS ( SELECT 1 FROM cached_messages WHERE conversationId = old.conversationId AND isInbox = 1);END;"), wt = new $("CREATE TRIGGER IF NOT EXISTS decUnreadCountTrigger AFTER UPDATE OF isUnread, isStarred, isInbox, isSpam, isTrash, isDraft, userLabelIds ON cached_conversation_headers WHEN old.isUnread = 1 BEGIN UPDATE cached_labels SET unreadCount = unreadCount - 1 WHERE unreadCount > 0 AND ( old.userLabelIds GLOB '*\"' || labelId || '\"*' AND (new.userLabelIds NOT GLOB '*\"' || labelId || '\"*' OR new.isUnread = 0 OR old.isTrash = 0 AND new.isTrash = 1 OR old.isSpam = 0 AND new.isSpam = 1) OR labelId = '^t' AND old.isStarred = 1 AND ( new.isStarred = 0 OR new.isUnread = 0) OR labelId = '^i' AND old.isInbox = 1 AND (new.isInbox = 0 OR new.isUnread = 0) OR labelId = '^s' AND old.isSpam = 1 AND (new.isSpam = 0 OR new.isUnread = 0) OR labelId = '^k' AND old.isTrash = 1 AND (new.isTrash = 0 OR new.isUnread = 0) OR labelId = '^r' AND old.isDraft = 1 AND (new.isDraft = 0 OR new.isUnread = 0) ); END;"),
15xt = new $("CREATE TRIGGER IF NOT EXISTS incUnreadCountTrigger AFTER UPDATE OF isUnread, isStarred, isInbox, isSpam, isTrash, isDraft, userLabelIds ON cached_conversation_headers WHEN new.isUnread = 1 BEGIN UPDATE cached_labels SET unreadCount = unreadCount + 1 WHERE new.userLabelIds GLOB '*\"' || labelId || '\"*' AND (old.userLabelIds NOT GLOB '*\"' || labelId || '\"*' OR old.isUnread = 0 OR old.isTrash = 1 AND new.isTrash = 0 OR old.isSpam = 1 AND new.isSpam = 0) OR labelId = '^t' AND new.isStarred = 1 AND ( old.isStarred = 0 OR old.isUnread = 0) OR labelId = '^i' AND new.isInbox = 1 AND (old.isInbox = 0 OR old.isUnread = 0) OR labelId = '^s' AND new.isSpam = 1 AND (old.isSpam = 0 OR old.isUnread = 0) OR labelId = '^k' AND new.isTrash = 1 AND (old.isTrash = 0 OR old.isUnread = 0) OR labelId = '^r' AND new.isDraft = 1 AND (old.isDraft = 0 OR old.isUnread = 0); END;"),
16yt = new $("CREATE TRIGGER IF NOT EXISTS messageIdChangeTrigger AFTER UPDATE OF messageId ON cached_messages WHEN new.messageId != old.messageId AND old.messageId IS NOT NULL BEGIN UPDATE cached_messages SET conversationId = new.messageId WHERE conversationId = replace(old.messageId, 'fm', 'fc'); UPDATE action_queue_8 SET referencedDataId = new.messageId WHERE referencedDataId = old.messageId; UPDATE cached_conversation_headers SET conversationId = new.messageId, mostRecentMessageId = new.messageId WHERE conversationId = replace(old.messageId, 'fm', 'fc') OR conversationId = old.messageId; UPDATE hit_to_data SET data_id = new.messageId WHERE data_id = old.messageId OR data_id = replace(old.messageId, 'fm', 'fc'); UPDATE cached_queries SET query = ('c|' || new.messageId) WHERE query = ('c|' || replace(old.messageId, 'fm', 'fc')) OR query = ('c|' || old.messageId);END;"),
17zt = new $("CREATE TRIGGER IF NOT EXISTS origMessageIdChangeTrigger AFTER UPDATE OF originalMessageId ON cached_messages WHEN new.originalMessageId != old.originalMessageId AND old.originalMessageId IS NOT NULL BEGIN UPDATE action_queue_8 SET referencedDataId = new.originalMessageId WHERE referencedDataId = old.originalMessageId; END;"), At = new $("CREATE TRIGGER IF NOT EXISTS addToTlTrigger AFTER UPDATE OF isUnread, isStarred, isInbox, isSpam, isTrash, isMuted, isPhishy, isDraft, isActivity, isMInbox, userLabelIds ON cached_conversation_headers BEGIN REPLACE INTO hit_to_data SELECT hit_id, old.conversationId FROM cached_queries WHERE (old.isUnread = 0 AND new.isUnread = 1 AND query = 't|l:^u') OR (old.isStarred = 0 AND new.isStarred = 1 AND query = 't|l:^t') OR (old.isInbox = 0 AND new.isInbox = 1 AND query = 't|l:^i') OR (old.isSpam = 0 AND new.isSpam = 1 AND query = 't|l:^s') OR (old.isTrash = 0 AND new.isTrash = 1 AND query = 't|l:^k') OR (old.isMuted = 0 AND new.isMuted = 1 AND query = 't|l:^g') OR (old.isPhishy = 0 AND new.isPhishy = 1 AND query = 't|l:^p') OR (old.isDraft = 0 AND new.isDraft = 1 AND query = 't|l:^r') OR (old.isActivity = 0 AND new.isActivity = 1 AND query = 't|l:^act') OR (old.isMInbox = 0 AND new.isMInbox = 1 AND query = 't|l:^ii') OR (new.userLabelIds GLOB '*\"' || substr(query, 5, length(query) - 4) || '\"*' AND (old.userLabelIds NOT GLOB '*\"' || substr(query, 5, length(query) - 4) || '\"*' OR (old.isSpam = 1 AND new.isSpam = 0) OR (old.isTrash = 1 AND new.isTrash = 0))); UPDATE cached_queries SET totalCount = totalCount + 1, lastIndex = lastIndex + 1 WHERE (old.isUnread = 0 AND new.isUnread = 1 AND query = 't|l:^u') OR (old.isStarred = 0 AND new.isStarred = 1 AND query = 't|l:^t') OR (old.isInbox = 0 AND new.isInbox = 1 AND query = 't|l:^i') OR (old.isSpam = 0 AND new.isSpam = 1 AND query = 't|l:^s') OR (old.isTrash = 0 AND new.isTrash = 1 AND query = 't|l:^k') OR (old.isMuted = 0 AND new.isMuted = 1 AND query = 't|l:^g') OR (old.isPhishy = 0 AND new.isPhishy = 1 AND query = 't|l:^p') OR (old.isDraft = 0 AND new.isDraft = 1 AND query = 't|l:^r') OR (old.isActivity = 0 AND new.isActivity = 1 AND query = 't|l:^act') OR (old.isMInbox = 0 AND new.isMInbox = 1 AND query = 't|l:^ii') OR (new.userLabelIds GLOB '*\"' || substr(query, 5, length(query) - 4) || '\"*' AND (old.userLabelIds NOT GLOB '*\"' || substr(query, 5, length(query) - 4) || '\"*' OR (old.isSpam = 1 AND new.isSpam = 0) OR (old.isTrash = 1 AND new.isTrash = 0))); END;"),
18Bt = new $("CREATE TRIGGER IF NOT EXISTS removeFromTlTrigger AFTER UPDATE OF isUnread, isStarred, isInbox, isSpam, isTrash, isMuted, isPhishy, isDraft, isActivity, isMInbox, userLabelIds ON cached_conversation_headers BEGIN DELETE FROM hit_to_data WHERE data_id = old.conversationId AND EXISTS ( SELECT * FROM cached_queries WHERE hit_to_data.hit_id = cached_queries.hit_id AND ((old.isUnread = 1 AND new.isUnread = 0 AND query = 't|l:^u') OR (old.isStarred = 1 AND new.isStarred = 0 AND query = 't|l:^t') OR (old.isInbox = 1 AND new.isInbox = 0 AND query = 't|l:^i') OR (old.isSpam = 1 AND new.isSpam = 0 AND query = 't|l:^s') OR (old.isTrash = 1 AND new.isTrash = 0 AND query = 't|l:^k') OR (old.isMuted = 1 AND new.isMuted = 0 AND query = 't|l:^g') OR (old.isPhishy = 1 AND new.isPhishy = 0 AND query = 't|l:^p') OR (old.isDraft = 1 AND new.isDraft = 0 AND query = 't|l:^r') OR (old.isActivity = 1 AND new.isActivity = 0 AND query = 't|l:^act') OR (old.isMInbox = 1 AND new.isMInbox = 0 AND query = 't|l:^ii') OR (old.userLabelIds GLOB '*\"' || substr(query, 5, length(query) - 4) || '\"*' AND (new.userLabelIds NOT GLOB '*\"' || substr(query, 5, length(query) - 4) || '\"*' OR (old.isSpam = 0 AND new.isSpam = 1) OR (old.isTrash = 0 AND new.isTrash = 1)))) ); UPDATE cached_queries SET totalCount = totalCount - 1, lastIndex = lastIndex - 1 WHERE (old.isUnread = 1 AND new.isUnread = 0 AND query = 't|l:^u') OR (old.isStarred = 1 AND new.isStarred = 0 AND query = 't|l:^t') OR (old.isInbox = 1 AND new.isInbox = 0 AND query = 't|l:^i') OR (old.isSpam = 1 AND new.isSpam = 0 AND query = 't|l:^s') OR (old.isTrash = 1 AND new.isTrash = 0 AND query = 't|l:^k') OR (old.isMuted = 1 AND new.isMuted = 0 AND query = 't|l:^g') OR (old.isPhishy = 1 AND new.isPhishy = 0 AND query = 't|l:^p') OR (old.isDraft = 1 AND new.isDraft = 0 AND query = 't|l:^r') OR (old.isActivity = 1 AND new.isActivity = 0 AND query = 't|l:^act') OR (old.isMInbox = 1 AND new.isMInbox = 0 AND query = 't|l:^ii') OR (old.userLabelIds GLOB '*\"' || substr(query, 5, length(query) - 4) || '\"*' AND (new.userLabelIds NOT GLOB '*\"' || substr(query, 5, length(query) - 4) || '\"*' OR (old.isSpam = 0 AND new.isSpam = 1) OR (old.isTrash = 0 AND new.isTrash = 1))); END;"),
19Et = new $("CREATE TRIGGER IF NOT EXISTS deleteConversationHeadersOnQueryRemovalTrigger AFTER DELETE ON cached_queries WHEN old.type = 'tl' BEGIN DELETE FROM hit_to_data WHERE hit_to_data.hit_id IN (SELECT DISTINCT hit_to_data.hit_id FROM hit_to_data LEFT OUTER JOIN cached_queries ON hit_to_data.hit_id = cached_queries.hit_id WHERE cached_queries.hit_id ISNULL); DELETE FROM cached_conversation_headers WHERE cached_conversation_headers.conversationId IN (SELECT DISTINCT cached_conversation_headers.conversationId FROM cached_conversation_headers LEFT OUTER JOIN hit_to_data ON cached_conversation_headers.conversationId = hit_to_data.data_id WHERE hit_to_data.data_id ISNULL); END;"),
20Ft = new $("CREATE TRIGGER IF NOT EXISTS deleteMessagesOnQueryRemovalTrigger AFTER DELETE ON cached_queries WHEN old.type = 'cv' BEGIN DELETE FROM hit_to_data WHERE hit_to_data.hit_id IN (SELECT DISTINCT hit_to_data.hit_id FROM hit_to_data LEFT OUTER JOIN cached_queries ON hit_to_data.hit_id = cached_queries.hit_id WHERE cached_queries.hit_id ISNULL); DELETE FROM cached_messages WHERE cached_messages.messageId IN (SELECT DISTINCT cached_messages.messageId FROM cached_messages LEFT OUTER JOIN hit_to_data ON cached_messages.messageId = hit_to_data.data_id WHERE hit_to_data.data_id ISNULL AND (cached_messages.originalMessageId IS NULL OR cached_messages.messageId = cached_messages.originalMessageId)); END;"),
21mt = new $("CREATE TABLE IF NOT EXISTS log_store (message TEXT);");Hr[u].b = function(a) {
22 var b = {
23 Z: function() {
24 T(a.gb, "sp-ca-scs")
25 },
26 X: function(c) {
27 Cq(a, c, "createSchema failure");
28 T(a.gb, "sp-ca-scf")
29 }
30 };
31 Vt(this, {
32 Z: function() {
33 a.Mh = "v";
34 T(a.gb, "sp-ca-vc")
35 },
36 X: function() {
37 a.Mh = "f";
38 T(a.gb, "sp-ca-bn")
39 }
40 },
41 a, a.gb);
42 dt(this, a, b, g)
43};of(X.W(), "cachefactory");X.W().zb("cachefactory");
44
45//<script id="module_conv">
46function Kl(a, b) {
47 b = b || "#666";
48 a.strokeStyle = b;
49 na(a, b);
50 a.shadowColor = "rgba(0, 0, 0, 0.2)";
51 a.shadowOffsetX = 1;
52 a.shadowOffsetY = 1;
53 a.shadowBlur = 3
54}
55function Ll(a) {
56 return a[v](/&([^;]+);/g,
57 function(b, c) {
58 switch (c) {
59 case "amp":
60 return "&";
61 case "lt":
62 return "<";
63 case "gt":
64 return ">";
65 case "quot":
66 return '"';
67 default:
68 if (c[Xa](0) == "#") {
69 c = da("0" + c[Mb](1));
70 if (!isNaN(c)) return ha.fromCharCode(c)
71 }
72 return b
73 }
74 })
75}
76function Ml(a) {
77 var b = Zb.document[mb]("a");
78 p(b, a);
79 b.normalize && b.normalize();
80 a = b[pb].nodeValue;
81 p(b, "");
82 return a
83}
84function Nl(a) {
85 if (a.tb) {
86 p(a.tb, "");
87 a.Xe(a.tb[D].display != "none")
88 }
89}
90function Ol(a, b, c) {
91 a = Li(a, b);
92 R(a, c)
93}
94function Pl(a) {
95 Kl(a, "#333");
96 a[nb]();
97 a.moveTo(6, 19);
98 a[La](11, 9);
99 a[La](16, 19);
100 a[La](6, 19);
101 a.fill()
102}
103function Ql(a) {
104 Kl(a, "#333");
105 a[nb]();
106 a.moveTo(6, 9);
107 a[La](16, 9);
108 a[La](11, 19);
109 a[La](6, 9);
110 a.fill()
111}
112function Rl(a, b) {
113 Ci[G](this, "icon", a);
114 this.b = b
115}
116function Sl(a, b) {
117 a = a.J.Ca[ - a.J.Ua];
118 return !! (a && a.O == b)
119}
120function Tl(a, b) {
121 S("tlm-biu", a.J.Ca, "BufferedItems should not be undefined");
122 if (a.J.Ca[t]) {
123 a = a.J.Ca[a.J.Ca[t] - 1];
124 return !! (a && a.O == b)
125 }
126 return k
127}
128function Ul(a) {
129 if (a[B]("&") != -1) return "document" in Zb && a[B]("<") == -1 ? Ml(a) : Ll(a);
130 return a
131}
132function Vl(a) {
133 var b = '<span class="Oa">';
134 a = a.md;
135 for (var c = a[t], d = 0; d < c; d++) b += '<span class="A _b"' + (a[d][eb] ? 'style="color:' + a[d][eb] + ";background:" + a[d][$a] + ";border-color:" + a[d][$a] + '"': "") + ">" + U(a[d][L]) + "</span>";
136 return b + "</span>"
137}
138function Wl(a) {
139 var b = '<span class="Pa Xb">';
140 b += a.S ? U(a.S) : "(no subject)";
141 return b + "</span>"
142}
143function Xl(a) {
144 var b = '<div id="' + a.rb.hh + '" class="Rb">' + Yl({
145 B: a.rb.jd
146 }) + "<div " + (!a.rb.jd[a.rb.jd[t] - 1].Ka ? 'class="Wa"': "") + ">" + Zl({
147 Bb: a.rb.jd[a.rb.jd[t] - 1][C].C,
148 dc: a.rb.jd[a.rb.jd[t] - 1].Ka
149 }) + "<div class=\"Qb\" onclick=\"_e(event, 'X', '" + a.rb.hh + '\');"><a class="Ua">';
150 b += a.rb.Zm ? "Show " + (a.rb.Wj + " large messages") : "Show " + (a.rb.Wj + " read messages");
151 return b + '</a></div><div class="Pb"></div><div class="Wa"><div class="Ta"><div class="db"></div></div><div class="Ta"><div class="db"></div><div class="eb"></div></div></div></div>' + Yl({
152 B: a.rb.Fp
153 }) +
154 "</div>"
155}
156function Yl(a) {
157 var b = "";
158 a = a.B;
159 for (var c = a[t], d = 0; d < c; d++) {
160 var e = a[d];
161 b += !e.Wc ? $l({
162 message: e
163 }) : $l({
164 message: e,
165 Me: e.Wc[C].C,
166 Ne: e.Wc.Ka
167 })
168 }
169 return b
170}
171function $l(a) {
172 return '<div id="z_' + a[C][C].C + '" ' + (a.Me && !a.Ne ? 'class="Wa"': "") + ">" + (a[C][C].A.Ya ? am({
173 G: a[C],
174 Bb: a.Me,
175 dc: a.Ne
176 }) : bm({
177 G: a[C],
178 Bb: a.Me,
179 dc: a.Ne
180 }) + cm({
181 G: a[C],
182 Bb: a.Me,
183 dc: a.Ne
184 })) + "</div>"
185}
186function am(a) {
187 return "<div>" + Zl(a) + "<div class=\"Va\" onclick=\"_e(event, 'W', '" + a.G[C].C + "');\"><b>Edit Draft</b></div></div>"
188}
189function Zl(a) {
190 return a.Bb ? '<div class="cb" id="U_' + a.Bb + '" ' + (a.dc ? 'style="display:none"': "") + "></div>": ""
191}
192function bm(a) {
193 return "<div " + (a.G.Ka ? 'style="display:none"': "") + ' class="Sa" id="u_' + a.G[C].C + "\" onclick=\"_e(event, 'P', '" + a.G[C].C + "');\">" + (a.Bb ? '<div class="fb" id="V_' + a.Bb + '" ' + (a.dc ? 'style="display:none"': "") + "></div>": "") + '<div class="Za">' + a.G.al + '</div><div class="Ya _"><span class="Xa" style="color:' + a.G.Yk + '">' + U(Sd(a.G[C].D, g)) + "</span><span> - " + a.G[C].mc + "</span></div></div>"
194}
195function cm(a) {
196 return '<div class="ab" ' + (!a.G.Ka ? 'style="display:none"': "") + ' id="L_' + a.G[C].C + '">' + (a.G.Ka ? dm({
197 G: a.G,
198 Bb: a.Bb,
199 dc: a.dc
200 }) : "") + "</div>"
201}
202function dm(a) {
203 var b;
204 b = {
205 G: a.G,
206 Bb: a.Bb,
207 dc: a.dc
208 };
209 b = '<div class="gb">' + Zl(b) + em({
210 G: b.G
211 }) + '<div class="lb"><div class="mb Xb">' + (b.G[C].Oa && b.G[C].Oa[t] ? '<div class="a m Oc Tb"></div>': "") + b.G.al + "</div><div class=\"nb\" onclick=\"_e(event, 'n', '" + b.G[C].C + '\');" id="p_' + b.G[C].C + '">Show details</div><div class="nb" style="display:none" onclick="_e(event, \'o\', \'' + b.G[C].C + '\');" id="q_' + b.G[C].C + '">Hide details</div></div><div class="ib"><div class="jb _" style="color:' + b.G.Yk + "\" onclick=\"_e(event, 'Q', '" +
212 b.G[C].C + "');\">" + U(Sd(b.G[C].D, g)) + '</div><div class="kb _ Xb" id="s_' + b.G[C].C + '">' + b.G.Jp + "</div></div></div>";
213 return b + fm({
214 G: a.G
215 }) + '<div class="Nb">' + gm({
216 G: a.G
217 }) + "</div>" + hm({
218 G: a.G
219 })
220}
221function em(a) {
222 return "<div " + (!a.G[C].A.na ? ' style="display:none"': "") + "class=\"ob\" onclick=\"_e(event,'T', '" + a.G[C].C + '\');" id="x_' + a.G[C].C + '"><div class="a t"></div></div><div ' + (a.G[C].A.na ? ' style="display:none"': "") + "class=\"ob\" onclick=\"_e(event,'T', '" + a.G[C].C + '\');" id="M_' + a.G[C].C + '"><div class="a s"></div></div>'
223}
224function fm(a) {
225 var b = "Date: " + a.G.Cm;
226 return '<div class="pb Xb" style="display:none" id="r_' + a.G[C].C + '">' + im({
227 label: "To:",
228 qb: a.G.Ip
229 }) + im({
230 label: "Cc:",
231 qb: a.G.Zl
232 }) + im({
233 label: "Bcc:",
234 qb: a.G.Xl
235 }) + "<div>" + b + "</div></div>"
236}
237function hm(a) {
238 var b = '<div class="ub"><div class="wb" onclick="_e(event, \'A\', \'' + a.G[C].C + '\');"><div class="xb"><div class="yb"><div class="a o"></div><div class="zb">Reply</div></div></div></div>';
239 if (a.G.el) b += "<div class=\"wb\" onclick=\"_e(event, 'B', '" + a.G[C].C + '\');"><div class="xb"><div class="yb"><div class="a p"></div><div class="zb">Reply to all</div></div></div></div>';
240 return b + "<div class=\"wb\" onclick=\"_e(event, 'C', '" + a.G[C].C + '\');"><div class="xb"><div class="yb"><div class="a j"></div><div class="zb">Forward</div></div></div></div></div>'
241}
242function im(a) {
243 return a.qb[t] > 0 ? "<div>" + a[Bb] + " " + a.qb + "</div>": ""
244}
245function gm(a) {
246 var b = '<div class="sb Xb">';
247 if (a.G[C][F] && a.G[C][F][t]) {
248 for (var c = a.G[C][F], d = c[t], e = 0; e < d; e++) {
249 var f = c[e];
250 b += (f[K] == Xj.df ? '<div class="Eb Fb"></div>': f[K] == Xj.li ? '<div class="Eb Gb"></div>': f[K] == Xj.fi ? '<div class="Eb Hb"></div>': f[K] == Xj.Cl ? '<div class="Eb" style="display:none"></div>': f[K] == Xj.$h ? '<div><div class="Jb" onclick="_e(event, \'K\');" >- Show quoted text -</div><div style="display:none" class="Ib" onclick="_e(event, \'J\');" >- Hide quoted text -</div><div style="clear:both"></div><div style="display:none" class="Eb Kb"></div></div>': "") +
251 '<div style="clear:both"></div>'
252 }
253 if (ja && a.G[C].A.Ae) b += '<div class="Fb"><a href="' + ja + "#conv/" + a.G.Jd + '">View in Mobile Web Updates ></a></div>';
254 if (a.G[C].Ef) b += '<div class="Fb">[Message clipped]<span class="Lb" onclick="_e(event, \'Y\', \'' + a.G[C].C + "');\">Download entire message</span></div>"
255 }
256 return b + "</div>" + (a.G[C].Oa && a.G[C].Oa[t] ? jm({
257 G: a.G
258 }) : "")
259}
260function jm(a) {
261 var b = '<div class="Cb"></div>';
262 if (a.G[C].Oa[t] > 1) b += '<div class="Sb">' + (a.G[C].Oa[t] + " attachments") + "</div>";
263 a = a.G[C].Oa;
264 for (var c = a[t], d = 0; d < c; d++) b += '<div class="Ab"><div id="att_' + a[d].Ta + '">' + (a[d].Yf ? '<img src="' + a[d].Yf + '" alt="image attachment preview"/>': a[d].Cf ? '<img height="16" width="16" src="' + a[d].Cf + '"/>': "") + '</div><span class="Bb"><a href="' + a[d].Bg + '" target="_blank"><div class="_">' + U(a[d].filename) + "</div></a><span></div>";
265 return b + '<div class="Db"></div>'
266}
267function km(a) {
268 var b = lm[Na](a);
269 if (b) a = b[2];
270 return $b(a)
271}
272function mm(a) {
273 a = a[v](nm, "\n");
274 a = a = a[v](om, "\n");
275 var b = a[jb](pm);
276 if (b) for (var c = 0; c < b[t]; c++) {
277 var d = m[mb]("div");
278 p(d, b[c]);
279 if (d = d[pb].getAttribute("src")) a = a[v](b[c], "<" + d + ">")
280 }
281 for (b = a = a = a; c = qm[Na](a);) {
282 d = m[mb]("div");
283 p(d, c[0]);
284 d = d[pb];
285 if (!d.getAttribute("onclick")) if (d = d.getAttribute("href")) {
286 var e = d[jb](rm);
287 if (e) d = e[1];
288 e = c[1];
289 if (d[v](sm, "") != e[v](sm, "")) b = b[v](c[0], e + " <" + d + ">")
290 }
291 }
292 a = b;
293 return a = a[v](tm, "")
294}
295function um(a) {
296 Wh[G](this, a);
297 this.pd = {};
298 this.ff = {};
299 this.B = [];
300 this.Pa = jj(a, "tl").d;
301 xg(a.ua, this.$o, this);
302 xg(a.b, this.Zo, this);
303 this.Mj = new wg;
304 this.ej = new wg;
305 this.h = new wg;
306 this.ih = new wg;
307 this.xe = new wg;
308 this.gh = new wg;
309 this.of = new wg;
310 this.Jg = new wg;
311 this.g = new wg;
312 this.$i = new wg
313}
314function vm(a) {
315 if (!a) return "";
316 for (var b = [], c = 0; c < a[t]; c++) b[r](U(!a[c][L] || a[c][L][t] == 0 ? a[c].ba: a[c][L]) + (a[c][L] ? ' <span style="color:#666"><' + U(a[c].ba) + "></span>": ""));
317 return b[M](", ")
318}
319function wm(a, b, c, d, e, f) {
320 this.message = a;
321 this.b = b;
322 this.Ka = c;
323 this.Yk = d;
324 this.Ip = vm(a.ja);
325 this.Zl = vm(a.da);
326 this.Xl = vm(a.ya);
327 b = a.D;
328 c = a.ja;
329 d = a.da;
330 var h = a.ic,
331 j = {},
332 o = 2;
333 if (b.ba != USER_EMAIL) {--o;
334 j[b.ba] = 1;
335 j[USER_EMAIL] = 1
336 }
337 o = xm(o, c, j);
338 o = xm(o, d, j);
339 j[b.ba] = 1;
340 o = xm(o, h, j);
341 this.el = b = o <= 0;
342 this.Jp = "to " + Rd(a.ja, a.da)[M](", ");
343 b = new Date(a.Qe);
344 this.al = (a = Wf(a.Qe)) && a[t] > 0 ? a: ad(b, e);
345 this.Cm = Tf($j, b);
346 this.Jd = f
347}
348function xm(a, b, c) {
349 if (!b) return a;
350 for (var d = 0, e = b[t]; d < e && a > 0; ++d) {
351 var f = b[d].ba;
352 if (! (f in c)) {
353 c[f] = 1; --a
354 }
355 }
356 return a
357}
358function ym(a, b) {
359 b = b.B;
360 if (b[t] < a.B[t]) return "re";
361 for (var c = 0, d = a.B[t]; c < d; c++) if (a.B[c][C].C != b[c].C) return "re";
362 if (a.B[t] == b[t]) return "dn";
363 return "am"
364}
365function zm(a, b) {
366 S("cvm-gmr", b, "Message Regions missing in getMessageRegionsAsConcatenatedStr_");
367 a = "";
368 for (var c = 0, d = b[t]; c < d; c++) {
369 var e = b[c];
370 if (e[K] == Xj.df || e[K] == Xj.$h || e[K] == Xj.fi || e[K] == Xj.li) a += e.content
371 }
372 return a
373}
374function Am(a) {
375 Xh(a, "cv-b");
376 Yh(a, "u");
377 a.M.H("tl", a.ta.i, a.ta.Y)
378}
379function Bm(a, b) {
380 var c = Cm(a, b);
381 c = c && c.Ka;
382 Dm(a, b);
383 Xh(a, c ? "cd-c": "cd-e")
384}
385function Em(a, b) {
386 var c = zm(a, b[F]),
387 d = Ul(mm(c));
388 c = new ne;
389 c.b = Zj.cf;
390 c.ka = b.C;
391 c.S = b.S;
392 ua(c, d);
393 c.ja = b.ja;
394 if (b.da && b.da[t] > 0) c.da = b.da;
395 if (b.ya && b.ya[t] > 0) c.ya = b.ya;
396 if (b.Oa) c.g = b.Oa.map(function(e) {
397 return e.Ta
398 });
399 for (d = 0; d < a.B[t]; d++) if (a.B[d][C].C == b.C) {
400 if (d > 0) c.Fb = a.B[d - 1][C].C;
401 break
402 }
403 return c
404}
405function Fm(a, b) {
406 Yh(a, "rpt");
407 var c = Cm(a, b);
408 Gm(a, c[C], b, Hm(a, c[C]));
409 Xh(a, "cd-r")
410}
411function Im(a, b) {
412 Yh(a, "apt");
413 var c = Cm(a, b),
414 d = Hm(a, c[C]),
415 e;
416 e = c[C];
417 if (e.D.ba == USER_EMAIL) e = e.da;
418 else {
419 var f = {};
420 f[USER_EMAIL] = g;
421 for (var h = Hm(a, e), j = 0; j < h[t]; j++) f[h[j].ba] = g;
422 h = [];
423 Jm(a, e.ja, h, f);
424 Jm(a, e.da, h, f);
425 e = h
426 }
427 Gm(a, c[C], b, d, e);
428 Xh(a, "cd-ra")
429}
430function Gm(a, b, c, d, e, f) {
431 var h = "Re: " + km(b.S),
432 j = zm(a, b[F]);
433 j = Ul(mm(j))[Ta]("\n");
434 for (var o = 0; o < j[t]; o++) j[o] = Km[Ja](j[o]) ? "> " + j[o] : ">" + j[o];
435 j = j[M]("\n");
436 b = {
437 Lg: Tf(ak, new Date(b.Qe)),
438 Hh: b.D[L],
439 Gh: b.D.ba,
440 body: j
441 };
442 b = "\n\n" + ("On " + (b.Lg + (", " + (b.Hh + (" <" + (b.Gh + "> wrote:")))))) + "\n" + b[F];
443 j = new ne;
444 j.b = Zj.Ll;
445 j.ja = d;
446 j.da = e;
447 j.ya = f;
448 j.S = h;
449 ua(j, b);
450 j.Fb = c;
451 Lm(a, j)
452}
453function Mm(a, b) {
454 Yh(a, "fpt");
455 var c = Cm(a, b)[C],
456 d = "Fwd: " + km(c.S),
457 e = zm(a, c[F]);
458 e = Ul(mm(e));
459 var f;
460 e = {
461 Lg: Tf(ak, new Date(c.Qe)),
462 Hh: c.D[L],
463 Gh: c.D.ba,
464 S: c.S,
465 ja: cg(c.ja),
466 da: cg(c.da),
467 body: e
468 };
469 f = "\n\n---------- Forwarded message ----------\nFrom: " + e.Hh + " <" + e.Gh + ">\nDate: " + e.Lg + "\nSubject: " + e.S + "\nTo: " + e.ja + "\n";
470 if (e.da) f += "Cc: " + e.da + "\n";
471 f = f + "\n\n" + e[F] + "\n";
472 e = new ne;
473 e.b = Zj.Gl;
474 e.S = d;
475 ua(e, f);
476 e.Fb = b;
477 e.g = [];
478 b = c.Oa || [];
479 for (c = 0; c < b[t]; c++) e.g[r](b[c].Ta);
480 Lm(a, e);
481 Xh(a, "cd-f")
482}
483function Hm(a, b) {
484 return b.D.ba == USER_EMAIL && b.ja[t] ? b.ja: b.ic[t] ? b.ic: [b.D]
485}
486function Jm(a, b, c, d) {
487 for (a = 0; a < b[t]; a++) {
488 var e = b[a];
489 if (!d[e.ba]) {
490 d[e.ba] = g;
491 c[r](e)
492 }
493 }
494}
495function Cm(a, b) {
496 var c = Nm(a, b);
497 S("cvm-menf", c >= 0, "Message entry not found for id: " + b);
498 b = c;
499 return a.B[b]
500}
501function Nm(a, b) {
502 for (var c = 0, d = a.B[t]; c < d; c++) if (a.B[c][C].C == b) return c;
503 return - 1
504}
505function Om(a, b) {
506 var c = Cm(a, b);
507 c[C].A.na = !c[C].A.na;
508 a.ih.b(c);
509 if (c[C].A.na) {
510 a.rd = a.rd + 1;
511 if (a.rd == 1) {
512 a.Jg.b(g);
513 a.pb && pi(a.Pa, [a.Ha], [Y.wb], undefined, undefined, g)
514 }
515 b = new $d(b, Yj.wb);
516 Xh(a, "oa-cv-asm")
517 } else {
518 Pm(a);
519 b = new $d(b, Yj.xb);
520 Xh(a, "oa-cv-rsm")
521 }
522 Dg(a, b)
523}
524function Qm(a) {
525 for (var b = 0, c; c = a.B[b]; ++b) if (c[C].A.na) {
526 c[C].A.na = k;
527 a.ih.b(c);
528 Pm(a)
529 }
530 Rm(a, [Y.xb])
531}
532function Sm(a, b) {
533 S("cvm-rmz", b.B[t], "Expected at least 1 message.");
534 if (!a.T) a.T = Tm(a, b);
535 a.S = b.S || "";
536 oa(a.B, 0);
537 a.rd = 0;
538 a.Bc = 0;
539 a.Oi = 0;
540 a.Fh = {};
541 for (var c = new Date, d = 0, e = b.B[t]; d < e; d++) {
542 var f = b.B[d];
543 if (d + 1 == b.B[t]) Um(a, f, g, c);
544 else if (f.A.qa || f.A.na || f.A.Ya) Um(a, f, g, c);
545 else {
546 Um(a, f, k, c);
547 a.Bc++
548 }
549 f.A.na && a.rd++;
550 if (!f.A.Ya) a.ul = f.C
551 }
552 d = 0;
553 for (e = a.B[t] - 1; d < e; d++) {
554 c = a.B[d];
555 if (a.B[d + 1][C].A.Ya) {
556 if (!c.Ka) {
557 c.Ka = g;
558 a.Bc--
559 }
560 c[C].A.qa = g
561 }
562 }
563 Vm(a);
564 Wm(a);
565 b.qa && Rm(a, [Y.Ic]);
566 a.ff = {};
567 for (d = 0; d < a.B[t]; d++) Xm(a, a.B[d][C])
568}
569function Vm(a) {
570 for (var b = 0, c = 0, d = a.B[t]; c < d; c++) a.B[c][C].A.Ya || b++;
571 if (b <= 1) a.Pc = "sn";
572 else if (a.Bc == 0) {
573 a.Pc = "sca";
574 a.xe.b(k)
575 } else {
576 a.Pc = "sea";
577 a.xe.b(g)
578 }
579}
580function Ym(a, b, c) {
581 b = Nm(a, b);
582 if (b >= 0) {
583 var d = a.B[b];
584 a.B[Eb](b, 1);
585 a.$i.b(d, c)
586 }
587}
588function Dm(a, b) {
589 var c = Cm(a, b);
590 if (c[C].C == a.ul || c[C].A.Ya) {
591 S("cvm-ncne", c.Ka, "A non collapsible msg should be expanded, id: " + b);
592 return g
593 }
594 c.Ka = !c.Ka;
595 a.ej.b(c);
596 c.Ka ? Zm(a) : $m(a);
597 return c.Ka
598}
599function Pm(a) {
600 a.rd = a.rd - 1;
601 if (a.rd == 0) {
602 a.Jg.b(k);
603 a.pb && pi(a.Pa, [a.Ha], [Y.xb], undefined, undefined, g)
604 }
605}
606function $m(a) {
607 a.Bc = a.Bc + 1;
608 a.Bc == 1 && a.xe.b(g)
609}
610function Zm(a) {
611 a.Bc = a.Bc - 1;
612 a.Bc || a.xe.b(k)
613}
614function Um(a, b, c, d) {
615 c = c || b.A.Ya;
616 var e;
617 e = b.D.ba;
618 if (a.Fh) {
619 var f = a.Fh[e];
620 if (!f) {
621 f = a.Oi % an[t];
622 f = n.abs(f);
623 f = an[f];
624 a.Oi++;
625 a.Fh[e] = f
626 }
627 e = f
628 } else e = "#000000";
629 b = new wm(b, k, c, e, d, a.T.Jd);
630 a.B[r](b);
631 return b
632}
633function bn(a) {
634 if (a.pb) return ei(a.Pa, a.Ha)
635}
636function cn(a) {
637 if (a.pb) return gi(a.Pa, a.Ha)
638}
639function dn(a, b) {
640 S("cvm-nd", a.pb, "Cannot switch conversation: no dependency on TL model.");
641 li(a.Pa, b)
642}
643function Lm(a, b) {
644 a.M.H("co", k, b, P(a.mp, a))
645}
646function en(a, b) {
647 var c = Ng(a.ta.i);
648 a = Lg(a.ta.i);
649 if (c || a) return b;
650 c = [];
651 a = 0;
652 for (var d = b[t]; a < d; a++) {
653 var e = b[a];
654 if (!e.A.fc && !e.A.Mb) c[c[t]] = e
655 }
656 return c
657}
658function Tm(a, b) {
659 for (var c = new ze, d = b.B[b.B[t] - 1].C, e = 0, f = b.B[t]; e < f; e++) {
660 var h = b.B[e].A;
661 for (var j in h) {
662 S("cvm-nbt", typeof h[j] == "boolean", "Not boolean type: " + j);
663 c[j] = c[j] || h[j]
664 }
665 }
666 return new Wd(a.Ha, c, 1, b.S, "", "", b.B[t], 0, 0, [], k, d)
667}
668function Rm(a, b, c, d, e) {
669 if (a.pb) pi(a.Pa, [a.Ha], b, c, d, undefined, e);
670 else {
671 S("cvm-ndmc", a.T, "No dep on tlmodel & missing conv header.");
672 e = [];
673 for (var f = 0, h; h = b[f]; ++f) {
674 h = new Oh(a.T, h, c, d);
675 e[f] = Qh(h, a.ta.i)
676 }
677 Cg(a, e)
678 }
679}
680function fn(a) {
681 a.ue = 0
682}
683function gn(a) {
684 a.Gb("re");
685 a.Pa.Gb("op");
686 a.of.b("lsp")
687}
688function Xm(a, b) {
689 for (var c = b.Oa || [], d = 0; d < c[t]; d++) {
690 var e = c[d];
691 if (e.b) {
692 var f;
693 f = b.C;
694 S("cvm-ap", e.b);
695 f = new ee(f, e.Ta, g);
696 f = Dg(a, f);
697 a.ff[f] = e.Ta
698 }
699 }
700}
701function Wm(a) {
702 var b = a.M.Nb;
703 b = Vh(b, a.T.nc);
704 var c,
705 d = a.T.A;
706 c = ["^g"];
707 var e = [];
708 d.Za && e[r]("^i");
709 d.Mb && e[r]("^s");
710 d.fc && e[r]("^k");
711 d.xc && e[r]("^g");
712 d = [];
713 for (var f = 0, h = e[t]; f < h; f++) if (!c || !qc(c, e[f])) d[r](hg[e[f]]);
714 c = d;
715 a.md = c[Va](b)
716}
717function hn(a) {
718 return a.B[a.B[t] - 1][C].C
719}
720function jn() {}
721function kn(a, b, c, d, e, f) {
722 S("mg-mz", a[t] > 0, "Expect at least 1 message in a set ");
723 this.B = a;
724 this.hh = "msgSet-" + this.B[0][C].C;
725 this.Ym = b;
726 this.jd = c || [];
727 this.Fp = d || [];
728 this.Wj = e || 0;
729 this.Zm = !!f
730}
731function Fj(a, b) {
732 Yi[G](this, a, "cv", b);
733 this.Ga = new jn;
734 this.Ti();
735 this.Qk();
736 b = this.d;
737 xg(b.g, this.pn, this);
738 xg(b.Mj, this.Xn, this);
739 xg(b.ej, this.Gn, this);
740 xg(b.xe, this.Fn, this);
741 xg(b.ih, this.Yn, this);
742 xg(b.Jg, this.An, this);
743 xg(b.h, this.Vn, this);
744 xg(b.gh, this.Wn, this);
745 xg(b.of, this.zn, this);
746 xg(b.$i, this.En, this);
747 this.Rk(a)
748}
749function ln(a, b) {
750 if (!b[C].A.Ya) {
751 a = m[x]("L_" + b[C].C);
752 b = b[C][F];
753 var c = pd("Eb", a);
754 S("cv-rl", c[t] == b[t], "regionContainers.length == regions.length");
755 for (var d = 0, e; e = b[d]; ++d) p(c[d], e.content);
756 Cd();
757 a = a[Ib]("iframe");
758 for (b = 0; c = a[b]; ++b) c.onload = Cd
759 }
760}
761function mn(a, b) {
762 for (var c = 0, d; d = b.B[c]; ++c) d.Ka && ln(a, d)
763}
764function nn(a, b, c) {
765 a = m[x](b);
766 S("cv-se", a, "Element not found in document, id: " + b);
767 R(a, c)
768}
769function on(a, b, c) { (a = m[x](b)) && R(a, c)
770}
771function pn(a, b, c) {
772 S("cv-nn", b, "Node cannot be null");
773 a = pd("Jb", b)[0];
774 var d = pd("Ib", b)[0];
775 b = pd("Kb", b)[0];
776 R(a, !c);
777 R(d, c);
778 R(b, c)
779}
780function qn(a, b) {
781 var c = m[x](b);
782 a: {
783 for (var d = 0, e = a.Jf[t]; d < e; d++) {
784 var f = a.Jf[d];
785 if (f.hh == b) {
786 b = f;
787 break a
788 }
789 }
790 S("cv-mnf", k, "Message set not found.");
791 b = void 0
792 }
793 d = Yl({
794 B: b.B
795 });
796 p(c, d);
797 pa(c, "");
798 mn(a, b)
799}
800function rn(a) {
801 S("cv-nicn", Zi(a), "Null inner contents node.");
802 p(Zi(a), "");
803 a.d.B = []
804}
805function sn(a) {
806 a = a.d;
807 if (!Tl(a.Pa, a.Ha) && a.pb) {
808 Yh(a, "j");
809 var b = bn(a);
810 S("cvm-nc", b, "TL does not know what the next conversation is.");
811 dn(a, b)
812 }
813}
814function tn(a) {
815 a = a.d;
816 if (!Sl(a.Pa, a.Ha) && a.pb) {
817 Yh(a, "k");
818 var b = cn(a);
819 S("cvm-pc", b, "TL does not know what the previous conversation is.");
820 dn(a, b)
821 }
822}
823function un(a) {
824 var b = a.d,
825 c = fi(b.Pa, b.Ha);
826 if (c) {
827 b.T = c;
828 Wm(b)
829 }
830 b = V("Oa", a.ea);
831 S("cv-ldnf", b, "Labels div not found.");
832 p(b, Vl({
833 md: a.d.md
834 }))
835}
836Q(Rl, Ci);Rl[u].va = function() {
837 this.b(m[x](this.ub.Uc)[Ib]("canvas")[0][vb]("2d"))
838};
839X.W().Ab("conv");
840var lm = new RegExp("^\\s*(fwd|re|aw|antw|antwort|wg|sv|ang|odp|r\u00e9f\\.|tr|transf|reenv\\.|reenv|res|resp|resp\\.|v\u00e1|v\u00e1lasz|betr|betreff|in|enc|\u8f6c\u53d1|\u56de\u590d|\u041f\u0435\u0440\u0435\u0441\u043b|\u041e\u0442\u0432\u0435\u0442|\u05d4\u05e2\u05d1\u05e8\u05d4|\u05ea\u05e9\u05d5\u05d1\u05d4|\u062a\u0648\u062c\u064a\u0647|\u0631\u062f):\\s*(.*)$", "i"), tm = /<\/?[A-Za-z][^>]*>/g, om = /<br\s*\/?>/g, nm = /<br\s*\/?>\s*\n/g, Km = /^[^>]|^>From /, qm = /<a [^>]*>([^<>]*)<\/a\s*>/ig, rm = /^javascript:_e\({}, 'aa', '([^']*)'\)/i,
841sm = /^http:\/\//i, pm = /<img [^>]*>/ig;Q(um, Wh);
842var an = ["#00681c", "#790619", "#5b1094", "#c88900", "#cc0060", "#008391", "#009486", "#b90038", "#846600", "#330099"];N = um[u];N.Nk = g;N.H = function(a, b) {
843 this.ta = b;
844 this.Ha = a;
845 this.pb = k;
846 this.T = i;
847 this.pd = {};
848 this.ue = 0;
849 if (ii(this.Pa, a) > -1) {
850 this.T = ni(this.Pa, a);
851 this.pb = g
852 }
853 a = new be(this.Ha, this.ta.i, k, this.Wh, this.Nk);
854 a.ee = g;
855 this.L = Cg(this, [a])[0];
856 jj(this.M, "cv").hb = k;
857 return 0
858};
859N.Xj = function(a, b, c) {
860 if (b = this.ff[a]) {
861 delete this.ff[a];
862 S("cvm-ru", c);
863 S("cvm-duu", c.b);
864 S("cvm-ai", b == c.Ta);
865 if (a = Cm(this, c.C)) {
866 a = a[C].Oa || [];
867 for (var d, e = 0; e < a[t]; e++) if (a[e].Ta == b) {
868 d = a[e];
869 break
870 }
871 S("cvm-au", d);
872 if (d) {
873 d.Yf = c.b;
874 this.g.b(d)
875 }
876 }
877 }
878};
879N.Pf = function(a, b, c) {
880 if (c.Vd) if (this.L == a) {
881 c.B = en(this, c.B);
882 if (c.B[t] == 1 && c.B[0].A.Ya) this.M.H("co", k, Em(this, c.B[0]));
883 else {
884 Sm(this, c);
885 $h(this)
886 }
887 } else if (this.ue == a) {
888 var d = ym(this, c);
889 if (d == "am") {
890 b = c.B;
891 c = this.B[t];
892 S("cvm-nm", b[t] > c, "No messages to update!");
893 d = c;
894 for (a = b[t]; d < a; d++) this.h.b(Um(this, b[d], g, new Date));
895 d = b[b[t] - 1];
896 if (!d.A.Ya) this.ul = d.C;
897 Vm(this);
898 b = b[Ra](c);
899 for (d = 0; c = b[d]; ++d) Xm(this, c)
900 } else if (d == "re") {
901 Sm(this, c);
902 $h(this)
903 }
904 this.of.b("lss");
905 this.pb && pi(this.Pa, [this.Ha], [Y.Ic], undefined, undefined,
906 g)
907 } else if (a in this.pd) {
908 b = this.pd[a];
909 delete this.pd[a];
910 c = c.B;
911 a = Cm(this, b);
912 for (var e = 0, f = c[t]; e < f; e++) if (c[e].C == b) {
913 d = c[e][F];
914 break
915 }
916 S("cvm-nmb", d, "No msg body found in response for msgId: " + b);
917 a[C].Ef = k;
918 ua(a[C], d);
919 this.gh.b(a)
920 }
921};N.ak = Ob();N.mp = function(a) {
922 if (a[K] == "sem")(a = a.F.ka) && Ym(this, a, g);
923 else {
924 S("cvm-urt", a[K] == "dd", "Unexpected response type: " + a[K]);
925 Ym(this, a.ka)
926 }
927};
928N.Zo = function(a) {
929 if (a[K] == "dd") a = Nm(this, a.ka) > -1;
930 else if (a[K] == "sd") a = !a.F.ka && Nm(this, a.F.Fb) > -1;
931 else {
932 S("cvm-ucr", a[K] == "sem", "Unexpected composition request in compose model: " + a[K]);
933 a = Nm(this, a.F.Fb) > -1
934 }
935 a && this.Gb("op")
936};N.Gb = function(a) {
937 var b = new be(this.Ha, this.ta.i, k, this.Wh, this.Nk);
938 b.Na = a;
939 this.ue = Dg(this, b)
940};
941N.Ec = function(a, b, c) {
942 if (b[K] == "cv") if (a in this.pd) {
943 delete this.pd[a];
944 var d = this.M;
945 xj(d, c,
946 function() {
947 var e = jj(d, "cv");
948 d.Hb(e)
949 })
950 } else if (a == this.ue) this.of.b("lsf");
951 else a == this.L && xj(this.M, c);
952 else b[K] != "at" && xj(this.M, c)
953};N.$o = function(a) {
954 a = a[w].Tf;
955 a[w] && a[w].sc || a[K] == "cv" && this.Pf(a.w, i, a[w])
956};Q(Fj, Yi);N = Fj[u];N.Rk = O;N.zk = O;N.jj = O;N.Mc = O;N.Gg = function(a) {
957 oa(this.L.jb, 3);
958 this.Hg(a);
959 Rg(this.d.ta) && this.L.jb[r](xk);
960 if (!this.K.Nb.Be) {
961 a = this.d.ta.t;
962 Pg(a) && this.L.jb[r](vk);
963 this.L.jb[r](wk)
964 }
965 Nl(aj(this))
966};N.Hg = function(a) {
967 this.L.jb[1] = a ? Fk: Ek
968};N.Yb = function() {
969 var a = new um(this.K);
970 a.Wh = g;
971 return a
972};N.Vc = function() {
973 Fj.Fa.Vc[G](this);
974 this.hg();
975 this.hb = g
976};N.hg = function() {
977 aj(this).Hb(this.L)
978};N.Cc = function(a) {
979 Fj.Fa.Cc[G](this, a);
980 if (a) {
981 a.vb == "tl" && rn(this);
982 a.vb != "cv" && fn(this.d)
983 }
984};N.bc = function() {
985 return this.hp()
986};
987N.hp = function() {
988 var a = '<div style="display:none" class="C"></div>' + ('<div class="Ma"><div class="Na">' + Wl({
989 S: ""
990 }) + "</div></div>") + '<div class="B"></div>',
991 b = Ii(this.h),
992 c = Ii(this.g);
993 return b + a + c
994};
995N.uc = function() {
996 var a = this.d,
997 b;
998 b = a.B;
999 for (var c = [], d = 0, e = [], f = 0, h = b[t]; f < h; f++) {
1000 var j = b[f];
1001 e[r](j);
1002 if (j[C].A.Ya || j[C].A.qa || j[C].A.na) d++;
1003 if (j[C].A.na || j[C].A.Ya || f + 1 == h) {
1004 e = e;
1005 var o = d,
1006 s = e[t];
1007 if (s - o <= 5) e = new kn(e, k);
1008 else {
1009 d = [e[0]];
1010 j = [];
1011 if (o) j = e[Ra](s - o);
1012 else j[r](e[e[t] - 1]);
1013 o = s - j[t] - d[t];
1014 S("mg-emz", o > 0, "Need at least 1 elided message");
1015 e = new kn(e, g, d, j, o)
1016 }
1017 c[r](e);
1018 d = 0;
1019 e = []
1020 }
1021 }
1022 this.Jf = b = c;
1023 b = {
1024 Pc: a.Pc,
1025 md: a.md,
1026 kn: this.Jf,
1027 S: a.S
1028 };
1029 a.B[0].Wc = i;
1030 c = 1;
1031 for (f = a.B[t]; c < f; c++) a.B[c].Wc = a.B[c - 1];
1032 a = {
1033 Pc: b.Pc
1034 };
1035 a = '<div class="Qa" ' +
1036 (a.Pc != "sca" ? 'style="display:none"': "") + 'id="N" onclick="_e(event, \'R\');"><div class="a g"></div></div><div class="Qa" ' + (a.Pc != "sea" ? 'style="display:none"': "") + 'id="O" onclick="_e(event, \'S\');"><div class="a i"></div></div>';
1037 a = '<div class="Ma"><div class="Na">' + a + Wl({
1038 S: b.S
1039 }) + Vl({
1040 md: b.md
1041 }) + '</div><div class="Ra" id="m">';
1042 b = b.kn;
1043 c = b[t];
1044 for (f = 0; f < c; f++) {
1045 h = b[f];
1046 a += !h.Ym ? Yl({
1047 B: h.B
1048 }) : Xl({
1049 rb: h
1050 })
1051 }
1052 return a = a + '</div></div><div class="Ub"></div>'
1053};N.Xb = function() {
1054 this.Kd()
1055};
1056N.Kd = function() {
1057 this.h.va();
1058 this.g.va()
1059};N.re = function() {
1060 var a = this.d,
1061 b = V("Ma", this.ea);
1062 S("cv-sd", b, "Subject div not found.");
1063 if (a.pb) {
1064 a = a.T.S;
1065 R(b, g);
1066 b = b[pb][pb];
1067 S("cv-sid", b, "Subject inner div not found.");
1068 wd(b, a)
1069 } else R(b, k);
1070 this.Sl();
1071 this.Mc()
1072};N.va = function() {
1073 var a = V("Ma", this.ea);
1074 R(a, k);
1075 this.d.pb && this.rp();
1076 a = 0;
1077 for (var b; b = this.Jf[a]; ++a) mn(this, b);
1078 this.zk();
1079 this.Pi()
1080};N.Pi = function() {
1081 this.Gg(this.d.T.A.na)
1082};
1083N.Nd = function() {
1084 var a = this.d;
1085 Yh(a, "u");
1086 ej(this, "cv-b");
1087 this.K.H("tl", a.ta.i, a.ta.Y);
1088 Zh(a)
1089};N.Eb = function(a, b, c, d, e, f) {
1090 d = (d || "ma-") + this.vb + "-";
1091 for (var h = 0, j; j = a[h]; ++h) {
1092 j = Mh(j);
1093 S("cv-mua", j.Sa, "action descriptor is missing userActionType");
1094 ej(this, d + j.Sa)
1095 }
1096 Rm(this.d, a, b, c, e);
1097 Zh(this.d);
1098 f || Am(this.d)
1099};
1100N.Gn = function(a) {
1101 var b = a[C].C,
1102 c = a.Ka,
1103 d = "u_" + b;
1104 nn(this, d, !c);
1105 var e = "L_" + b,
1106 f = m[x](e);
1107 if (c) {
1108 var h = {
1109 G: a
1110 };
1111 if (a.Wc) {
1112 h.Bb = a.Wc[C].C;
1113 h.dc = a.Wc.Ka
1114 }
1115 h = dm(h);
1116 p(f, h);
1117 ln(this, a)
1118 } else p(f, "");
1119 nn(this, e, c);
1120 if (a = m[x](c ? e: d)) if (a = a[zb]) if (a = a.nextSibling) pa(a, c ? "": "Wa");
1121 on(this, "V_" + b, !c);
1122 on(this, "U_" + b, !c);
1123 dj(this)
1124};N.Xn = function(a) {
1125 var b = a[C].C,
1126 c = a.b;
1127 nn(this, "r_" + b, c);
1128 nn(this, "p_" + b, !c);
1129 nn(this, "q_" + b, c);
1130 b = m[x]("s_" + b);
1131 if (c) wd(b, "<" + a[C].D.ba + ">");
1132 else p(b, "to " + Rd(a[C].ja, a[C].da)[M](", "));
1133 yd(b, c, "rb")
1134};
1135N.Fn = function(a) {
1136 on(this, "O", a);
1137 on(this, "N", !a);
1138 dj(this)
1139};N.Yn = function(a) {
1140 nn(this, "x_" + a[C].C, a[C].A.na);
1141 nn(this, "M_" + a[C].C, !a[C].A.na);
1142 dj(this)
1143};N.An = function(a) {
1144 this.Hg(a);
1145 Nl(aj(this))
1146};N.Vn = function(a) {
1147 var b = this.d.B;
1148 S("cv-bc", b[t] > 1, "Cannot append a message to a blank conversation");
1149 var c = b[b[t] - 2];
1150 b[b[t] - 1].Wc = c;
1151 b = $l({
1152 message: a,
1153 Me: c[C].C,
1154 Ne: g
1155 });
1156 c = m[x]("m");
1157 var d = m[mb]("div");
1158 c[Ba](d);
1159 p(d, b);
1160 ln(this, a)
1161};
1162N.En = function(a) {
1163 S("cv-odr", a[C].C, "onDraftRemoved called with invalid message");
1164 a = m[x]("z_" + a[C].C);
1165 Hc(a)
1166};
1167va(N,
1168function(a) {
1169 var b;
1170 b = g;
1171 if (a.Q) this.b != a.Q && this.Mc();
1172 else a.Q = this.b;
1173 switch (a.$) {
1174 case "o":
1175 case "n":
1176 var c = this.d,
1177 d = Cm(c, a.Q);
1178 d.b = !d.b;
1179 c.Mj.b(d);
1180 break;
1181 case "S":
1182 cj(this, "ea");
1183 c = pd("Rb", Zi(this));
1184 d = [];
1185 for (var e = 0, f = c[t]; e < f; e++) d[e] = c[e].id;
1186 e = 0;
1187 for (f = d[t]; e < f; e++) qn(this, d[e]);
1188 c = this.d;
1189 d = 0;
1190 for (e = c.B[t]; d < e; d++) {
1191 f = c.B[d];
1192 f.Ka || Dm(c, f[C].C)
1193 }
1194 break;
1195 case "R":
1196 cj(this, "ca");
1197 this.b != hn(this.d) && this.Mc();
1198 c = this.d;
1199 d = 0;
1200 for (e = c.B[t]; d < e; d++) {
1201 f = c.B[d];
1202 f.Ka && Dm(c, f[C].C)
1203 }
1204 break;
1205 case "P":
1206 cj(this, "emsg");
1207 Bm(this.d,
1208 a.Q);
1209 break;
1210 case "Q":
1211 this.b == a.Q && this.Mc();
1212 cj(this, "cmsg");
1213 Bm(this.d, a.Q);
1214 break;
1215 case "T":
1216 Cm(this.d, a.Q)[C].A.na ? cj(this, "rs") : cj(this, "as");
1217 Om(this.d, a.Q);
1218 break;
1219 case "A":
1220 Fm(this.d, a.Q);
1221 break;
1222 case "B":
1223 Im(this.d, a.Q);
1224 break;
1225 case "C":
1226 Mm(this.d, a.Q);
1227 break;
1228 case "b":
1229 this.Nd();
1230 break;
1231 case "H":
1232 tn(this);
1233 break;
1234 case "G":
1235 sn(this);
1236 break;
1237 case "K":
1238 S("cv-sqt", a[ib], "ShowQuotedText, event.target is null.");
1239 pn(this, a[ib][zb], g);
1240 break;
1241 case "J":
1242 S("cv-hqt", a[ib], "HideQuotedText, event.target is null.");
1243 pn(this, a[ib][zb],
1244 k);
1245 break;
1246 case "W":
1247 c = this.d;
1248 d = Cm(c, a.Q)[C];
1249 d = Em(c, d);
1250 Lm(c, d);
1251 break;
1252 case "f":
1253 c = this.d;
1254 d = +a.Q;
1255 if (d == Y.wb) {
1256 d = hn(c);
1257 S("cv-as", !Cm(c, d)[C].A.na, "Add star should not be available when message is already starred.");
1258 Om(c, d)
1259 } else d == Y.xb ? Qm(c) : this.Eb([d]);
1260 break;
1261 case "X":
1262 qn(this, a.Q);
1263 break;
1264 case "Y":
1265 c = this.d;
1266 d = a.Q;
1267 e = Cm(c, d);
1268 if (e[C].Ef) {
1269 c.ue = 0;
1270 e = [d];
1271 f = [];
1272 for (var h = 0, j = c.B[t]; h < j; h++) c.B[h][C].C != d && f[r](c.B[h][C].C);
1273 e = new be(c.Ha, c.ta.i, k, c.Wh, k, e, f, 204800);
1274 e.Na = "re";
1275 e = Cg(c, [e])[0];
1276 c.pd[e] = d
1277 } else c.gh.b(e);
1278 break;
1279 case "g":
1280 this.Rf(g);
1281 break;
1282 case "h":
1283 this.Rf(k);
1284 break;
1285 case "aa":
1286 this.K.H("co", k, new ne(Zj.cf, [new ce(a.Q)]));
1287 break;
1288 case "hb":
1289 case "ab":
1290 case "bb":
1291 case "db":
1292 case "eb":
1293 case "fb":
1294 case "gb":
1295 b = k;
1296 break;
1297 case "$":
1298 this.jj(a[ib]);
1299 break;
1300 case "pa":
1301 this.Mc();
1302 break;
1303 default:
1304 b = k;
1305 break
1306 } (b = b) || Fj.Fa[tb][G](this, a)
1307});N.pn = function(a) {
1308 var b = m[x]("att_" + a.Ta);
1309 if (b) p(b, '<img src="' + a.Yf + '">')
1310};N.Rd = function() {
1311 var a = this.d.ta,
1312 b = Vg(a);
1313 return a.Y ? ["search", b, this.d.Ha] : [b, this.d.Ha]
1314};
1315N.Wb = function(a) {
1316 if (a[t] < 2) return k;
1317 var b = a[a[t] - 1],
1318 c = i;
1319 if (a[t] > 2) {
1320 if (a[0] != "search") return k;
1321 c = new Jg(a[1], g)
1322 } else {
1323 c = gg(a[0]);
1324 c = new Jg(c, k)
1325 }
1326 a = this.d.Pa;
1327 S("cv-tlnd", a, "TlModel is not defined");
1328 a.b && ii(a, b) > -1 ? li(a, b) : this.K.H("cv", b, c);
1329 return g
1330};N.We = function(a) {
1331 return a.b == "tl"
1332};
1333N.Wn = function(a) {
1334 var b = a[C].C,
1335 c = m[x]("z_" + b);
1336 S("cv-mdnf", c, "Msg Div not found: " + b);
1337 c = V("Nb", c);
1338 S("cv-mbdnf", c, "Msg Body Div not found: " + b);
1339 b = gm({
1340 G: a
1341 });
1342 p(c, b);
1343 ln(this, a);
1344 a = pd("Jb", c);
1345 b = 0;
1346 for (c = a[t]; b < c; b++) pn(this, a[b][zb], g)
1347};N.Qk = function() {
1348 this.h = new Hi("cntbt", [new Ei("b", "")], []);
1349 this.g = new Hi("cntbb", [new Ei("b", "")], [new Rl("H", Pl), new Rl("G", Ql)], "", "Hd");
1350 this.g.fd = 0
1351};N.Ti = function() {
1352 this.L = new Qi([yk, Ak], [Dk, Ek, Gk])
1353};
1354N.Sl = function() {
1355 var a = this.d;
1356 Ni(this.h, "b", a.ta.Y ? "'" + a.ta.i + "'": Vg(a.ta));
1357 Ni(this.g, "b", a.ta.Y ? "'" + a.ta.i + "'": Vg(a.ta));
1358 Ol(this.g, "H", k);
1359 Ol(this.g, "G", k);
1360 this.fl()
1361};N.fl = O;N.rp = function() {
1362 var a = !Sl(this.d.Pa, this.d.Ha),
1363 b = !Tl(this.d.Pa, this.d.Ha);
1364 Ol(this.g, "H", a);
1365 Ol(this.g, "G", b);
1366 this.gl(a, b)
1367};N.gl = O;N.zn = function(a) {
1368 var b = V("Ub", Zi(this));
1369 if (a == "lsp") {
1370 p(b, '<div class="D"></div><div class="Vb">Loading messages...</div>');
1371 this.zg()
1372 } else p(b, a == "lss" ? "": '<div class="Vb">There was a network error while loading the messages.</div>')
1373};
1374N.Rf = function(a) {
1375 if (!this.K.Nb.Be) {
1376 var b = this.d.ta;
1377 if (! (a && !Pg(b.t))) {
1378 Ui(aj(this));
1379 ej(this, a ? "sp-ml-v": "sp-la-v");
1380 var c = this.d.T,
1381 d = c.nc;
1382 if (c.A.Za) {
1383 d = Yb(d);
1384 d[r]("^i")
1385 }
1386 this.K.vi("lb", a, P(this.ip, this), b, d)
1387 }
1388 }
1389};N.ip = function(a, b, c, d) {
1390 this.hg();
1391 if (b[t]) {
1392 var e = this.d.ta;
1393 a = !(a || qc(d, e.t) || e.t == "^i" && qc(b, Y.ob) || (Lg(e.i) || Ng(e.i)) && qc(b, Y.Jc));
1394 this.Eb(b, c, d, undefined, undefined, a);
1395 a && un(this)
1396 }
1397};
1398if (ENABLE_LOAD_STALE_CONV) Fj[u].zk = function() {
1399 var a;
1400 a = this.d;
1401 a = a.T ? a.T.Ie != a.B[t] : k;
1402 a && gn(this.d)
1403};of(X.W(), "conv");X.W().zb("conv");
1404
1405//<script id="module_tlactions">
1406function Ao(a, b, c) {
1407 this.i = a;
1408 this.Y = b;
1409 this.title = c
1410}
1411function Bo(a) {
1412 a.Eh = new Ao(a.R.i, a.R.Y, a[Ha])
1413}
1414function Co(a, b) {
1415 var c;
1416 if (b) {
1417 Yh(a, "np");
1418 c = a.J;
1419 c.eb += c.Ke;
1420 if (c.eb > c.Zd) {
1421 c.D += c.eb - c.Zd;
1422 c.eb = c.Zd
1423 }
1424 c = Yg(c)
1425 } else {
1426 Yh(a, "pp");
1427 c = bh(a.J)
1428 }
1429 a.lg.b();
1430 c && a.cl.b(b, !b, g)
1431}
1432function Do(a, b) {
1433 Aa(a[D], b ? "": "hidden")
1434}
1435function Nk(a) {
1436 this.ra = a;
1437 this.oa = a.d;
1438 this.Fc = []
1439}
1440function Eo(a, b) {
1441 a = fg(b);
1442 return a.id[Mb](a.id[B]("_") + 1)
1443}
1444function Fo(a) {
1445 for (var b = [], c = a.oa.J.zc, d = 0, e; e = c[d]; ++d) qc(a.Fc, e.O) && b[r](e.O);
1446 return b
1447}
1448function Go(a, b, c) {
1449 var d = fi(a.oa, b);
1450 if (d) a.kb([d.A.na ? Y.xb: Y.wb], c, [b])
1451}
1452function Ho(a, b) {
1453 cj(a.ra, "o");
1454 var c = a.ra,
1455 d = l[Kb];
1456 c.eg = l.pageXOffset;
1457 c.fg = d;
1458 li(a.oa, b)
1459}
1460function Io(a, b, c) {
1461 if (b) {
1462 a = V("gd", b);
1463 b = V("fd", b);
1464 a && R(a, c);
1465 b && Do(b, !c);
1466 if (a) if (c) {
1467 c = ok();
1468 c[D].margin = "0";
1469 a[Ba](c)
1470 } else(c = a[Ib]("canvas")[0]) && a[hb](c)
1471 }
1472}
1473function Jo(a, b, c) {
1474 if (c) qc(a.Fc, b) || a.Fc[r](b);
1475 else sc(a.Fc, b);
1476 S("tlva-st", c == qc(a.Fc, b), "Failed to update selectedThreadIds_ for thread ", b);
1477 Ko(a, c ? b: undefined)
1478}
1479function Lo(a, b) {
1480 for (var c = 0, d = b[t]; c < d; c++) sc(a.Fc, b[c])
1481}
1482function Ko(a, b) {
1483 if (a.ra == a.ra.K.Da) {
1484 var c = bj(If),
1485 d = Fo(a);
1486 Ti(c, d[t]);
1487 a.ra.Sk(b);
1488 d[t] ? c.Hb(a.Vo) : Ui(c)
1489 }
1490}
1491function Mo(a) {
1492 var b = a.oa.R,
1493 c;
1494 c = Lg(b.i) ? [Hk] : Ng(b.i) ? [Bk] : b.t == "^all" ? [Ik] : [yk, Ak];
1495 var d = [];
1496 Ug(b) && !qc(c, Ik) && d[r](Ik);
1497 d[r](Ck);
1498 d[r](Dk);
1499 Sg(b) && !qc(c, yk) && d[r](yk); ! Tg(b) && !qc(c, Ak) && d[r](Ak); (Sg(b) || b.t == "^k" || b.t == "^b") && d[r](Gk);
1500 Rg(b) && d[r](xk);
1501 Tg(b) && !qc(c, Bk) && d[r](Bk);
1502 Pg(b.t) && d[r](vk);
1503 d[r](wk);
1504 a.Vo = new Qi(c, d, g, g);
1505 Ko(a)
1506}
1507function No(a, b, c) {
1508 for (var d = 0, e; e = b[d]; ++d) {
1509 var f = oj(a.ra, b[d]);
1510 sa(V("Tc", f), c);
1511 e = oj(a.ra, e);
1512 yd(e, c, "Rd")
1513 }
1514}
1515X.W().Ab("tlactions");nj[u].Vk = function() {
1516 var a = this;
1517 l[Sa](function() {
1518 fj(a, a.eg, a.fg);
1519 var b = zd();
1520 a.eg = 0;
1521 a.fg = b
1522 },
1523 0)
1524};N = Nk[u];N.uk = O;N.sl = O;N.rl = O;N.tk = O;N.Jk = O;N.Ud = function() {
1525 var a = this.ra;
1526 a.P("ga", this.uo, this);
1527 a.P("ja", this.un, this);
1528 a.P("a", this.Bn, this);
1529 a.P("da", this.Tn, this);
1530 a.P("j", this.lo, this);
1531 a.P("ca", this.$j, this);
1532 a.P("i", this.eo, this);
1533 a.P("ka", this.so, this);
1534 a.P("ia", this.ko, this);
1535 a.P("k", this.Xo, this);
1536 a.P("pa", this.Yj, this);
1537 a.P("f", this.sn, this);
1538 a.P("g", P(this.Qf, this, g));
1539 a.P("h", P(this.Qf, this, k));
1540 this.tk(a);
1541 this.uk(a);
1542 this.Jk(a);
1543 a = this.oa;
1544 xg(a.cl, this.ro, this);
1545 xg(a.ll, this.Cn, this);
1546 Mo(this)
1547};
1548N.uo = function(a) {
1549 a = a[ib];
1550 a = Eo(this, a);
1551 Go(this, a, "ma-tl-")
1552};N.Bn = function(a) {
1553 a = Eo(this, a[ib]);
1554 Ho(this, a)
1555};N.Tn = function() {
1556 this.oa.R && this.oa.R.Y ? ij(this.ra, g) : If.H("mn")
1557};N.lo = function() {
1558 this.ra.Ye(g);
1559 T(If.Wa(), "mh-s")
1560};N.ko = function() {
1561 this.ra.Ye(k)
1562};N.Xo = function() {
1563 this.Hc = g;
1564 var a = this.ra.xf()[Za];
1565 this.ra.Ye(k);
1566 var b = this.oa;
1567 Yh(b, "se");
1568 b.R.Y || Bo(b);
1569 b.M.H("tl", a, g)
1570};N.$j = function() {
1571 cj(this.ra, "cpt");
1572 If.H("co", g)
1573};
1574N.ro = function(a, b, c) {
1575 if (a) {
1576 a = V("ed", this.ra.ea);
1577 Io(this, a, c)
1578 }
1579 if (b) {
1580 a = V("dd", this.ra.ea);
1581 Io(this, a, c)
1582 }
1583};N.eo = function() {
1584 T(If.Wa(), "tl-r");
1585 this.oa.Gb("re")
1586};N.Cn = function(a) {
1587 var b = oj(this.ra, a);
1588 if (b) {
1589 var c = fi(this.oa, a);
1590 if (c) {
1591 var d = V("Vc", b);
1592 yd(b, c.A.qa, "Mc", "Nc");
1593 p(d, c.Gc)
1594 }
1595 }
1596 if (b = oj(this.ra, a)) {
1597 b = V("Qc", b);
1598 if (a = fi(this.oa, a)) {
1599 a = a.A.na;
1600 yd(b, a, "t", "s")
1601 }
1602 }
1603};N.un = function(a) {
1604 var b = a[ib];
1605 if (b[Ma] == "Sc") {
1606 b = b[pb];
1607 sa(b, !b[Qa])
1608 }
1609 a = Eo(this, b);
1610 Jo(this, a, b[Qa]);
1611 b = b[Qa];
1612 a = oj(this.ra, a);
1613 yd(a, b, "Rd")
1614};
1615N.Yj = function() {
1616 var a = Fo(this);
1617 Lo(this, a);
1618 No(this, a, k);
1619 Ko(this)
1620};N.sn = function(a) {
1621 this.kb([ + a.Q], "ma-tl-")
1622};N.kb = function(a, b, c, d, e, f) {
1623 S("tlva-ce", a[t], "convActions must not be empty");
1624 c = c || Fo(this);
1625 if (c[t]) {
1626 var h = Mh(a[0]);
1627 S("tlva-mu", h.Sa, "action descriptor is missing userActionType");
1628 T(If.Wa(), b + h.Sa);
1629 pi(this.oa, c, a, d, e, undefined, f);
1630 fi(this.oa, c[0]) || Lo(this, c);
1631 Ko(this)
1632 }
1633};N.so = function(a) {
1634 Co(this.oa, !!(a.Q - 0))
1635};
1636N.Vl = function(a) {
1637 for (var b = {},
1638 c = 0, d = a[t]; c < d; c += 2) {
1639 var e = m[x](a[c]);
1640 if (e) {
1641 e = e[Db] - a[c + 1];
1642 if (e in b) {
1643 fj(this.ra, 0, a.Op + e);
1644 return g
1645 } else b[e] = 1
1646 }
1647 }
1648};N.gn = function() {
1649 if (l[Ia] < 150) return i;
1650 var a = pd("Kc", this.ra.ea),
1651 b = [],
1652 c = a[t] - 1;
1653 function d(f) {
1654 if (f >= 0 && f <= c) {
1655 f = a[f];
1656 b[r](f.id);
1657 b[r](f[Db])
1658 }
1659 }
1660 var e = this.oa.J.Ke;
1661 d(c);
1662 d(c - e);
1663 d(c - e - 2);
1664 d(2);
1665 d(0);
1666 b.Op = l[Ia];
1667 return b
1668};N.Bk = function() {
1669 var a = Fo(this);
1670 No(this, a, g);
1671 Mo(this)
1672};
1673N.Qf = function(a) {
1674 var b = Fo(this),
1675 c = this.oa.R;
1676 if (! (!b[t] || a && !Pg(c.t))) {
1677 var d,
1678 e = this.oa,
1679 f = ni(e, b[0]);
1680 d = f.A.Za;
1681 for (var h = nh(f.nc), j = 1, o = b[t]; j < o; j++) {
1682 f = ni(e, b[j]);
1683 for (var s = f.nc, z = 0, y = s[t]; z < y; z++) {
1684 var A = s[z];
1685 if (h[A]) h[A] = 2
1686 }
1687 for (A in h) if (h[A] != 2) delete h[A];
1688 else h[A] = 1;
1689 d &= f.A.Za
1690 }
1691 e = xc(h);
1692 d && e[r]("^i");
1693 d = e;
1694 var E;
1695 e = {};
1696 f = 0;
1697 for (h = b[t]; f < h; f++) {
1698 j = ni(this.oa, b[f]);
1699 oh(e, j.nc);
1700 E |= j.A.Za
1701 }
1702 b = xc(e);
1703 E && b[r]("^i");
1704 E = b;
1705 E = nh(E);
1706 ph(E, d);
1707 E = xc(E);
1708 Ui(bj(If));
1709 T(If.Wa(), a ? "sp-ml-v": "sp-la-v");
1710 If.vi("lb", a, P(this.Wo, this),
1711 c, d, E)
1712 }
1713};N.Wo = function(a, b, c, d) {
1714 b[t] ? this.kb(b, "ma-tl-", undefined, c, d) : Ko(this)
1715};
1716function Ro(a) {
1717 var b;
1718 b = (b = a[Ma]) && typeof b[Ta] == "function" ? b[Ta](" ") : [];
1719 for (var c = vc(arguments, 1), d = b, e = 0, f = 0; f < c[t]; f++) if (!qc(d, c[f])) {
1720 d[r](c[f]);
1721 e++
1722 }
1723 c = e == c[t];
1724 pa(a, b[M](" "));
1725 return c
1726}
1727function So(a, b, c) {
1728 S("te-swt", !(b && !c), "show swipe without thread id");
1729 if (c) {
1730 var d = oj(a.ra, c);
1731 if (d)(d = V("kd", d)) && R(d, b)
1732 }
1733 a.Bd = b ? c: undefined
1734}
1735N = Nk[u];N.uk = function(a) {
1736 a.P("va", this.wo, this);
1737 a.P("sa", this.hk, this);
1738 a.P("ta", this.hk, this);
1739 a.P("wa", this.Ln, this);
1740 new xl(a.ea, undefined, undefined, undefined, undefined, "wa")
1741};
1742N.Ln = function() {
1743 So(this, k, this.Bd)
1744};
1745N.hk = function(a) {
1746 T(If.Wa(), a.$ == "ta" ? "sp-te-sl": "sp-te-sr");
1747 if (this.Bd) {
1748 T(If.Wa(), "sp-te-da");
1749 So(this, k, this.Bd)
1750 } else if (!bj(If).yc()) {
1751 a = Eo(this, a[ib]);
1752 var b = oj(this.ra, a),
1753 c = ni(this.oa, a),
1754 d = V("kd", b);
1755 if (!d) {
1756 d = m[mb]("div");
1757 pa(d, "kd");
1758 p(d, '<div class="ld Mc"></div><div class="md" onclick="_e(event, \'va\');"><div class="nd">Archive</div></div>');
1759 b[Ba](d);
1760 d = V("md", d);
1761 S("te-cfsb", d, "Unexpected, cannot find swipe button in dom.");
1762 var e;
1763 e = m[mb]("canvas");
1764 qa(e, 68);
1765 za(e, 28);
1766 var f = e[vb]("2d");
1767 f[nb]();
1768 f.moveTo(0,
1769 5);
1770 f.arc(5, 5, 5, n.PI, -n.PI / 2, k);
1771 f[La](63, 0);
1772 f.arc(63, 5, 5, -n.PI / 2, 0, k);
1773 f[La](68, 23);
1774 f.arc(63, 23, 5, 0, n.PI / 2, k);
1775 f[La](5, 28);
1776 f.arc(5, 23, 5, n.PI / 2, n.PI, k);
1777 f.clip();
1778 yi(f, "#ffb6c1", "#8b0000", 28, 68);
1779 za(e[D], "28px");
1780 qa(e[D], "68px");
1781 e = e;
1782 Ro(e, "od");
1783 d[Ba](e)
1784 }
1785 b = V("ld", b);
1786 yd(b, c.A.qa, "Mc", "Nc");
1787 T(If.Wa(), "sp-te-sa");
1788 So(this, g, a)
1789 }
1790};N.wo = function() {
1791 var a = this.Bd;
1792 S("te-vsn", a, "visibleSwipeButtonThreadId_ null in onSwipeArchive_");
1793 So(this, k, a);
1794 this.kb([Y.ob], "te-", [a])
1795};
1796N.rl = function(a) {
1797 a.$ != "sa" && a.$ != "ta" && a.$ != "ib" && So(this, k, this.Bd)
1798};N.sl = function(a) {
1799 if (this.Bd && (a.$ == "a" || a.$ == "wa")) {
1800 So(this, k, this.Bd);
1801 return g
1802 }
1803};of(X.W(), "tlactions");X.W().zb("tlactions");
1804
1805
1806END_LAZY_MODULES_TIME_MS = +new Date
1807
1808function aa(a) {
1809 throw a;
1810}
1811var g = true, i = null, k = false, ba = encodeURIComponent, l = window, ca = ENABLE_MORE_KEYBOARD_SHORTCUTS, da = Number, ea = Object, fa = ENABLE_MOVE_TO_LABEL, ga = MAIN_URL_PREFIX, ha = String, ia = PRODUCT_NAME_HTML, ja = UPDATES_URL, la = ENABLE_IFRAME_LOGIN, m = document, ma = decodeURIComponent, n = Math;
1812function na(a, b) {
1813 return a.fillStyle = b
1814}
1815function oa(a, b) {
1816 return a.length = b
1817}
1818function pa(a, b) {
1819 return a.className = b
1820}
1821function qa(a, b) {
1822 return a.width = b
1823}
1824function ra(a, b) {
1825 return a.expand = b
1826}
1827function sa(a, b) {
1828 return a.checked = b
1829}
1830function p(a, b) {
1831 return a.innerHTML = b
1832}
1833function ta(a, b) {
1834 return a.value = b
1835}
1836function ua(a, b) {
1837 return a.body = b
1838}
1839function va(a, b) {
1840 return a.handleEvent = b
1841}
1842function q(a, b) {
1843 return a.type = b
1844}
1845function wa(a, b) {
1846 return a.name = b
1847}
1848function xa(a, b) {
1849 return a.label = b
1850}
1851function ya(a, b) {
1852 return a.execute = b
1853}
1854function za(a, b) {
1855 return a.height = b
1856}
1857function Aa(a, b) {
1858 return a.visibility = b
1859}
1860var Ba = "appendChild", Ca = "error", r = "push", Da = "filter", Ea = "toString", Fa = "getMonth", t = "length", Ga = "propertyIsEnumerable", Ha = "title", Ia = "scrollY", u = "prototype", Ja = "test", Ka = "shift", La = "lineTo", Ma = "className", Na = "exec", Oa = "clearTimeout", Pa = "size", Qa = "checked", Ra = "slice", Sa = "setTimeout", v = "replace", w = "data", Ta = "split", Ua = "floor", x = "getElementById", Va = "concat", Wa = "setInterval", Xa = "charAt", Ya = "blur", Za = "value", $a = "bgColor", ab = "location", bb = "preventDefault", cb = "insertBefore", db = "button", B = "indexOf", eb = "color",
1861C = "message",