| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- "use strict";(function(){
- var p;function aa(a){this.id=a;this.version=0}aa.prototype.update=function(a,b){void 0!==a.name&&(this.name=a.name);this.version=Math.max(this.version,b)};function ba(a){this.a=a.desc;this.name=a.name;this.type=a.type;this.usage=a.usage;this.T=a.category}function ca(){this.ga={};this.w=[];this.version=0}
- ca.prototype.update=function(a,b){this.ga=JSON.parse(a.emoji_use);a.highlight_words?this.w=(a.highlight_words||"").split(",").filter(function(a){return""!==a.trim()}):a.highlights&&(this.w=a.highlights);this.version=Math.max(this.version,b)};function da(){this.b=null;this.j={};this.m={};this.self=null;this.a={version:0,data:{}};this.i={version:0,data:{}};this.o={};this.B=0}
- function ea(a,b,c){var d=d||"";b.team&&(a.b||(a.b=new aa(b.team.id)),a.b.update(b.team,c));if(b.users)for(var e=0,g=b.users.length;e<g;e++){var f=a.m[d+b.users[e].id];f||(f=a.m[d+b.users[e].id]=new fa(b.users[e].id));f.update(b.users[e],c)}if(b.channels)for(e=0,g=b.channels.length;e<g;e++){f=a.j[d+b.channels[e].id];if(!f){var f=a.j,l=d+b.channels[e].id;var h=b.channels[e];h=h.pv?new q(h.id,a.m[h.user]):new t(h.id);f=f[l]=h}f.update(b.channels[e],a,c,d)}b.emojis&&(a.a.data=b.emojis,a.a.version=c);
- if(void 0!==b.commands){a.i.data={};for(e in b.commands)a.i.data[e]=new ba(b.commands[e]);a.i.version=c}a.B=Math.max(a.B,c);b.self&&(a.self=a.m[d+b.self.id]||null,a.self&&b.self.prefs?(a.self.N||(a.self.N=new ca),a.self.N.update(b.self.prefs,c)):a.B=0)}"undefined"!==typeof module&&(module.I.Ra=da,module.I.Sa=aa,module.I.Ua=ba);function t(a){this.id=a;this.J=!1;this.C=0;this.A=-1;this.m={};this.version=0}
- t.prototype.update=function(a,b,c,d){d=d||"";void 0!==a.name&&(this.name=a.name);void 0!==a.is_archived&&(this.Y=a.is_archived);void 0!==a.is_member&&(this.i=a.is_member);void 0!==a.last_read&&(this.C=Math.max(parseFloat(a.last_read),this.C));void 0!==a.last_msg&&(this.A=parseFloat(a.last_msg));void 0!==a.is_private&&(this.b=a.is_private);a.latest&&(this.A=parseFloat(a.latest.ts));void 0!==a.is_starred&&(this.J=a.is_starred);if(a.members&&(this.m={},a.members))for(var e=0,g=a.members.length;e<g;e++){var f=
- b.m[d+a.members[e]];this.m[f.id]=f;f.j[this.id]=this}this.version=Math.max(this.version,c)};function q(a,b){t.call(this,a);this.a=b;this.name=this.a.name;this.b=!0;b.na=this}q.prototype=Object.create(t.prototype);q.prototype.constructor=q;"undefined"!==typeof module&&(module.I.$a=t,module.I.Za=q);function x(a,b){this.H=a.user;this.username=a.username;this.id=a.id||a.ts;this.l=parseFloat(a.ts);this.text="";this.s=[];this.i=this.F=this.J=!1;this.D={};this.version=b;this.update(a,b)}function z(a,b){x.call(this,a,b)}function A(a,b){x.call(this,a,b)}
- x.prototype.update=function(a,b){if(a){if(this.text=a.text||"",a.attachments&&(this.s=a.attachments),this.J=!!a.is_starred,this.F=void 0===a.edited?!1:a.edited,this.i=!!a.removed,a.reactions){var c={};a.reactions.forEach(function(a){c[a.name]=[];a.users.forEach(function(b){c[a.name].push(b)})});this.D=c}}else this.i=!0;this.version=b};function B(a,b,c,d){this.id="string"===typeof a?a:a.id;this.a=[];this.i=b;c&&ga(this,c,d)}
- function ga(a,b,c){var d=0;b.forEach(function(a){d=Math.max(this.push(a,c),d)}.bind(a));ha(a)}B.prototype.b=function(a,b){return!0===a.isMeMessage?new z(a,b):!0===a.isNotice?new A(a,b):new x(a,b)};B.prototype.push=function(a,b){for(var c,d=!1,e,g=0,f=this.a.length;g<f;g++)if(c=this.a[g],c.id===a.id){e=c.update(a,b);d=!0;break}d||(c=this.b(a,b),this.a.push(c),e=c.l);for(;this.a.length>this.i;)this.a.shift();return e||0};function ia(a){return a.a[a.a.length-1]}
- function ja(a,b){for(var c=0,d=a.a.length;c<d;c++)if(a.a[c].id==b)return a.a[c];return null}function ha(a){a.a.sort(function(a,c){return a.l-c.l})}z.prototype=Object.create(x.prototype);z.prototype.constructor=z;A.prototype=Object.create(x.prototype);A.prototype.constructor=A;"undefined"!==typeof module&&(module.I={Wa:x,Va:z,Ya:A,ab:B});function fa(a){this.id=a;this.j={};this.na=this.N=null;this.version=0}fa.prototype.update=function(a,b){void 0!==a.name&&(this.name=a.name);void 0!==a.deleted&&(this.Da=a.deleted);void 0!==a.status&&(this.status=a.status);void 0!==a.presence&&(this.a="away"!==a.presence);void 0!==a.isPresent&&(this.a=a.isPresent);a.isBot&&(this.Oa=a.isBot);this.version=Math.max(this.version,b)};"undefined"!==typeof module&&(module.I.Ta=fa);function ka(){this.a=[]}ka.prototype.push=function(a){this.a.push(a)};function la(a,b){for(var c=0,d=a.a.length;c<d;c++)if(b===ma(a.a[c]))return a.a[c];return null}function na(a,b){for(var c=0,d=a.a.length;c<d;c++){var e=a.a[c],g;for(g in e.j)if(!0===b(e.j[g],g))return}}function oa(a){for(var b=C.context,c=0,d=b.a.length;c<d&&!0!==a(b.a[c]);c++);}function E(a,b){for(var c=0,d=a.a.length;c<d;c++)if(a.a[c].j[b])return a.a[c];return null}
- function F(a){for(var b=C.context,c=0,d=b.a.length;c<d;c++){var e=b.a[c].j[a];if(e)return e}return null}function pa(a){for(var b=C.context,c=[],d=0,e=b.a.length;d<e;d++){var g=b.a[d].j,f;for(f in g)a&&!a(g[f],b.a[d],f)||c.push(f)}return c}function I(a){for(var b=C.context,c=0,d=b.a.length;c<d;c++){var e=b.a[c].m[a];if(e)return e}return null}function qa(a){for(var b=C.context,c=0,d=b.a.length;c<d;c++)if(b.a[c].self.id===a)return!0;return!1}"undefined"!==typeof module&&(module.I.Xa=ka);var J={},K;function ra(){if(!c){for(var a=0,b=navigator.languages.length;a<b;a++)if(J.hasOwnProperty(navigator.languages[a])){var c=navigator.languages[a];break}c||(c="en")}K=J[c];console.log("Loading language pack: "+c);if(K.c)for(a in K.c)document.getElementById(a).textContent=K.c[a]};J.fr={Qa:"Utilisateur inconnu",Pa:"Channel inconnu",Ha:"Nouveau message",Ga:"Reseau",Ia:"(visible seulement par vous)",J:"Favoris",j:"Discutions",Ka:"Discutions priv\u00e9es",ok:"Ok",Ea:"Annuler",V:function(a){"string"!==typeof a&&(a=parseFloat(a));var b=new Date,c=new Date;a=new Date(a);b.setHours(0,0,0,0);c.setTime(b.getTime());c.setDate(c.getDate()-1);return a.getTime()>b.getTime()?a.toLocaleTimeString():a.getTime()>c.getTime()?"hier, "+a.toLocaleTimeString():a.toLocaleString()},c:{fileUploadCancel:"Annuler",
- neterror:"Impossible de se connecter au chat !"}};J.fr.F=function(a){return"(edité "+J.fr.V(a)+")"};J.en={Qa:"Unknown member",Pa:"Unknown channel",Ha:"New message",Ga:"Network",Ia:"(only visible to you)",J:"Starred",j:"Channels",Ka:"Direct messages",ok:"Ok",Ea:"Cancel",V:function(a){"string"!==typeof a&&(a=parseFloat(a));var b=new Date,c=new Date;a=new Date(a);b.setHours(0,0,0,0);c.setTime(b.getTime());c.setDate(c.getDate()-1);return a.getTime()>b.getTime()?a.toLocaleTimeString():a.getTime()>c.getTime()?"yesterday, "+a.toLocaleTimeString():a.toLocaleString()},c:{fileUploadCancel:"Cancel",neterror:"Cannot connect to chat !"}};
- J.en.F=function(a){return"(edited "+J.en.V(a)+")"};var sa=function(){function a(a){this.text="";this.g=a}function b(b,c,d){this.R=c;this.f=null;this.h=[];this.a=d||"";this.ba="<"===this.a;this.la="*"===this.a;this.ra="_"===this.a;this.ca="~"===this.a||"-"===this.a;this.i=">"===this.a||">"===this.a;this.W=":"===this.a;this.ma="`"===this.a;this.Ba="```"===this.a;this.oa="\n"===this.a;this.qa=void 0!==d&&-1!==n.w.indexOf(d);this.g=b;this.da=null;this.b=this.oa||this.qa?c+d.length-1:!1;this.qa&&(this.f=new a(this),this.h.push(this.f),this.f.text=d)}
- function c(a){return"A"<=a&&"Z">=a||"a"<=a&&"z">=a||"0"<=a&&"9">=a||-1!=="\u00e0\u00e8\u00ec\u00f2\u00f9\u00c0\u00c8\u00cc\u00d2\u00d9\u00e1\u00e9\u00ed\u00f3\u00fa\u00fd\u00c1\u00c9\u00cd\u00d3\u00da\u00dd\u00e2\u00ea\u00ee\u00f4\u00fb\u00c2\u00ca\u00ce\u00d4\u00db\u00e3\u00f1\u00f5\u00c3\u00d1\u00d5\u00e4\u00eb\u00ef\u00f6\u00fc\u00ff\u00c4\u00cb\u00cf\u00d6\u00dc\u0178\u00e7\u00c7\u00df\u00d8\u00f8\u00c5\u00e5\u00c6\u00e6\u0153".indexOf(a)}function d(a){a=a||h;for(var c=0,k=a.h.length;c<k;c++){var e=
- a.h[c];if(e instanceof b)if(e.b){if(e=d(e))return e}else return e}return null}function e(a,c){a.g instanceof b&&(a.g.h.splice(a.g.h.indexOf(a)+(c?1:0)),a.g.f=a.g.h[a.g.h.length-1],e(a.g,!0))}function g(a){return a}function f(a){return{link:a,text:a,Fa:!1}}var l,h,n={w:[],U:g,aa:g,Z:f};b.prototype.ta=function(){return this.la&&!!this.b||this.g instanceof b&&this.g.ta()};b.prototype.wa=function(){return this.ra&&!!this.b||this.g instanceof b&&this.g.wa()};b.prototype.xa=function(){return this.ca&&!!this.b||
- this.g instanceof b&&this.g.xa()};b.prototype.ja=function(){return this.W&&!!this.b||this.g instanceof b&&this.g.ja()};b.prototype.va=function(){return this.qa&&!!this.b||this.g instanceof b&&this.g.va()};b.prototype.ua=function(){return this.ma&&!!this.b||this.g instanceof b&&this.g.ua()};b.prototype.ia=function(){return this.Ba&&!!this.b||this.g instanceof b&&this.g.ia()};b.prototype.ya=function(){for(var a=0,c=this.h.length;a<c;a++)if(this.h[a]instanceof b&&(!this.h[a].b||this.h[a].ya()))return!0;
- return!1};b.prototype.za=function(a){if("<"===this.a&&">"===l[a])return!0;var b=c(l[a-1]);if(!this.i&&l.substr(a,this.a.length)===this.a){if(!b&&(this.la||this.ra||this.ca))return!1;if(this.f&&this.ya())return this.f.Ca();if(this.La())return!0}return"\n"===l[a]&&this.i?!0:!1};b.prototype.La=function(){for(var a=this;a;){for(var c=0,d=a.h.length;c<d;c++)if(a.h[c]instanceof b||a.h[c].text.length)return!0;a=a.da}return!1};b.prototype.Ca=function(){var a=new b(this.g,this.R,this.a);a.da=this;this.f&&
- this.f instanceof b&&(a.f=this.f.Ca(),a.h=[a.f]);return a};b.prototype.Ma=function(a){return this.W&&(" "===l[a]||"\t"===l[a])||(this.W||this.ba||this.la||this.ra||this.ca||this.ma)&&"\n"===l[a]?!1:!0};b.prototype.Na=function(b){if(this.ma||this.W||this.Ba||this.ba)return null;if(!this.f||this.f.b||this.f instanceof a){var d=c(l[b-1]),e=c(l[b+1]);if("```"===l.substr(b,3))return"```";var f=h.ka();if(void 0===f||f){if(">"===l.substr(b,4))return">";if(">"===l[b])return l[b]}if("`"===l[b]&&!d||
- "\n"===l[b]||-1!==["*","~","-","_"].indexOf(l[b])&&(e||-1!=="*~-_<&".split("").indexOf(l[b+1]))&&(d||-1!=="*~-_<&".split("").indexOf(l[b-1]))||-1!==[":"].indexOf(l[b])&&e||-1!==["<"].indexOf(l[b]))return l[b];d=0;for(e=n.w.length;d<e;d++)if(f=n.w[d],l.substr(b,f.length)===f)return f}return null};a.prototype.ka=function(){if(""!==this.text.trim())return!1};b.prototype.ka=function(){for(var a=this.h.length-1;0<=a;a--){var b=this.h[a].ka();if(void 0!==b)return b}if(this.oa||this.i)return!0};a.prototype.B=
- function(a){this.text+=l[a];return 1};b.prototype.B=function(c){var d=this.f&&!this.f.b&&this.f.za?this.f.za(c):null;if(d){var e=this.f.a.length;this.f.sa(c);d instanceof b&&(this.f=d,this.h.push(d));return e}if(!this.f||this.f.b||this.f instanceof a||this.f.Ma(c)){if(d=this.Na(c))return this.f=new b(this,c,d),this.h.push(this.f),this.f.a.length;if(!this.f||this.f.b)this.f=new a(this),this.h.push(this.f);return this.f.B(c)}d=this.f.R+1;h.ha(this.f.R);this.f=new a(this);this.f.B(d-1);this.h.pop();
- this.h.push(this.f);return d-c};b.prototype.sa=function(a){for(var b=this;b;)b.b=a,b=b.da};b.prototype.ha=function(a){this.b&&this.b>=a&&(this.b=!1);this.h.forEach(function(c){c instanceof b&&c.ha(a)})};a.prototype.innerHTML=function(){var a;if(this.g.ja()){for(a=this.g;a&&!a.W;)a=a.g;if(a){var b=a.a+this.text+a.a;return(a=n.U(b))?a:b}return(a=n.U(this.text))?a:this.text}if(this.g.ia()){if("undefined"!==typeof hljs)try{return a=this.text.match(/^\w+/),hljs.configure({useBR:!0,tabReplace:" "}),
- a&&hljs.getLanguage(a[0])?hljs.fixMarkup(hljs.highlight(a[0],this.text.substr(a[0].length)).value):hljs.fixMarkup(hljs.highlightAuto(this.text).value)}catch(r){console.error(r)}return this.text.replace(/\n/g,"<br/>")}return n.aa(this.text)};a.prototype.outerHTML=function(){var a="span",b=[],c="";if(this.g.ia()){a="pre";b.push("codeblock");var d=this.innerHTML()}else this.g.ua()?(b.push("code"),d=this.innerHTML()):(this.g.ba&&(d=n.Z(this.text))?(a="a",c=' href="'+d.link+'"',d.Fa||(c+=' target="_blank"'),
- d=n.aa(d.text)):d=this.innerHTML(),this.g.ta()&&b.push("bold"),this.g.wa()&&b.push("italic"),this.g.xa()&&b.push("strike"),this.g.ja()&&b.push("emoji"),this.g.va()&&b.push("highlight"));return"<"+a+c+(b.length?' class="'+b.join(" ")+'"':"")+">"+d+"</"+a+">"};b.prototype.outerHTML=function(){var a="";this.i&&(a+='<span class="quote">');this.oa&&(a+="<br/>");this.h.forEach(function(b){a+=b.outerHTML()});this.i&&(a+="</span>");return a};b.prototype.Aa=function(a){this.i&&!this.b&&this.sa(a);this.h.forEach(function(c){c instanceof
- b&&c.Aa(a)})};return function(c,m){m||(m={});n.w=m.w||[];n.U=m.U||g;n.aa=m.aa||g;n.Z=m.Z||f;l=c;h=new b(this,0);m=0;c=l.length;do{for(;m<c;)m+=h.B(m);h.Aa(l.length);if(m=d()){e(m,!1);h.ha(m.R);var k=new a(m.g);k.B(m.R);m.g.h.push(k);m.g.f=k;m=m.R+1}else m=void 0}while(void 0!==m);return h.outerHTML()}}();window._formatText=function(a,b){return sa(a,{w:b?b.highlights:void 0})};"undefined"!==typeof module&&(module.I.u=sa);function ta(a,b){this.i=a;this.content=b;this.c=ua(this);this.b=va(this);this.a=[];this.B=[]}
- function ua(a){var b=document.createElement("div"),c=document.createElement("header"),d=document.createElement("span"),e=document.createElement("span"),g=document.createElement("div"),f=document.createElement("footer");b.a=document.createElement("span");b.b=document.createElement("span");d.textContent=a.i;"string"==typeof a.content?g.innerHTML=a.content:g.appendChild(a.content);c.className=wa;d.className=xa;e.className=ya;e.textContent="x";c.appendChild(d);c.appendChild(e);b.appendChild(c);g.className=
- za;b.appendChild(g);b.b.className=Aa;b.b.textContent=K.Ea;b.b.addEventListener("click",function(){L(a,!1)});e.addEventListener("click",function(){L(a,!1)});b.a.addEventListener("click",function(){L(a,!0)});f.appendChild(b.b);b.a.className=Aa;b.a.textContent=K.ok;f.appendChild(b.a);f.className=Ba+" "+Ca;b.appendChild(f);b.className=Da;return b}function L(a,b){(b?a.a:a.B).forEach(function(a){a()});a.close()}
- function va(a){var b=document.createElement("div");b.className=Ea;b.addEventListener("click",function(){L(this,!1)}.bind(a));return b}function Fa(a,b,c){a.c.a.textContent=b;a.c.b.textContent=c;return a}ta.prototype.$=function(a){a=a||document.body;a.appendChild(this.b);a.appendChild(this.c);return this};ta.prototype.close=function(){this.c.remove();this.b.remove();return this};function Ga(a,b){a.a.push(b);return a};var Aa="button",Ba="button-container",Da="dialog",Ea="dialog-overlay",wa="dialog-title",xa="dialog-title-label",ya="dialog-title-close",za="dialog-body",Ca="dialog-footer";var Ha=[],Ia=0;
- function Ja(){var a=document.createDocumentFragment(),b=pa(function(a){return!a.Y&&!1!==a.i}),c=[],d=[],e=[],g=[];b.sort(function(a,b){return a[0]!==b[0]?a[0]-b[0]:F(a).name.localeCompare(F(b).name)});b.forEach(function(a){a=F(a);if(a instanceof q){if(!a.a.Da){var b=document.createElement("li");var f=document.createElement("a");b.id="room_"+a.id;f.href="#"+a.id;b.className="slack-context-room slack-ims";f.textContent=a.a.name;b.appendChild(Ka());b.appendChild(f);a.a.a||b.classList.add("away");M===
- a&&b.classList.add("selected");a.A>a.C&&(b.classList.add("unread"),0<=N.indexOf(a)&&b.classList.add("unreadHi"));b&&(a.J?c.push(b):g.push(b))}}else b=document.createElement("li"),f=document.createElement("a"),b.id="room_"+a.id,f.href="#"+a.id,a.b?(b.className="slack-context-room slack-group",b.dataset.count=Object.keys(a.m||{}).length):b.className="slack-context-room slack-channel",M===a&&b.classList.add("selected"),f.textContent=a.name,b.appendChild(Ka()),b.appendChild(f),a.A>a.C&&(b.classList.add("unread"),
- 0<=N.indexOf(a)&&b.classList.add("unreadHi")),b&&(a.J?c.push(b):a.b?e.push(b):d.push(b))});c.length&&a.appendChild(La(K.J));c.forEach(function(b){a.appendChild(b)});d.length&&a.appendChild(La(K.j));d.forEach(function(b){a.appendChild(b)});e.forEach(function(b){a.appendChild(b)});g.length&&a.appendChild(La(K.Ka));g.forEach(function(b){a.appendChild(b)});document.getElementById("chanList").textContent="";document.getElementById("chanList").appendChild(a);Ma();O();Q&&Na(Q.b.id,Q.m,function(a){document.getElementById("slackCtx").style.backgroundImage=
- "url("+a+")"})}function Oa(){oa(function(a){var b=a.o,c;for(c in a.self.j)if(!a.self.j[c].Y){var d=document.getElementById("room_"+c);b[c]?d.classList.add("slack-context-typing"):d.classList.remove("slack-context-typing")}for(var e in a.m)(c=a.m[e].na)&&!c.Y&&(d=document.getElementById("room_"+c.id))&&(b[c.id]?d.classList.add("slack-context-typing"):d.classList.remove("slack-context-typing"))});Pa()}
- function Pa(){var a;document.getElementById("whoistyping").textContent="";if(Q&&M&&(a=Q.o[M.id])){var b=document.createDocumentFragment(),c=!1,d;for(d in a)(a=I(d))?b.appendChild(Qa(a)):c=!0;c&&(C.b=0);document.getElementById("whoistyping").appendChild(b)}}function Ra(a){a?document.body.classList.remove("no-network"):document.body.classList.add("no-network");O()}
- function Sa(){var a=M.name||(M.a?M.a.name:void 0);if(!a){var b=[];M.m.forEach(function(a){b.push(a.name)});a=b.join(", ")}document.getElementById("currentRoomTitle").textContent=a;Ta();R();document.getElementById("fileUploadContainer").classList.add("hidden");Ua();T&&(T=null,U());V&&(V=null,U());Pa()}
- function U(){if(T){document.body.classList.add("replyingTo");var a=document.getElementById("replyToContainer"),b=document.createElement("a");b.addEventListener("click",function(){T=null;U()});b.className="replyto-close";b.textContent="x";a.textContent="";a.appendChild(b);a.appendChild(T.L())}else document.body.classList.remove("replyingTo"),document.getElementById("replyToContainer").textContent="";R()}
- function W(){if(V){document.body.classList.add("replyingTo");var a=document.getElementById("replyToContainer"),b=document.createElement("a");b.addEventListener("click",function(){V=null;W()});b.className="replyto-close";b.textContent="x";a.textContent="";a.appendChild(b);a.appendChild(V.L());document.getElementById("msgInput").value=V.text}else document.body.classList.remove("replyingTo"),document.getElementById("replyToContainer").textContent="";R()}
- window.toggleReaction=function(a,b,c){var d=C.a[a],e,g;(d=C.a[a])&&(e=ja(d,b))&&(g=E(C.context,a))&&(e.D[c]&&-1!==e.D[c].indexOf(g.self.id)?(d=new XMLHttpRequest,d.open("DELETE","api/reaction?room="+a+"&msg="+b+"&reaction="+encodeURIComponent(c),!0),d.send(null)):Va(a,b,c))};
- function Wa(a){a:{var b={};if(Q){var c;for(c=Q;!b[a];){if(c=c.a.data[a])if("alias:"==c.substr(0,6))b[a]=!0,a=c.substr(6);else{a=document.createElement("span");a.className="emoji-custom emoji";a.style.backgroundImage="url('"+c+"')";break a}break}}}"string"===typeof a&&"makeEmoji"in window&&(a=window.makeEmoji(a));return"string"===typeof a?null:a}function Xa(a,b){document.getElementById("linkFavicon").href=a||b?"favicon.png?h="+a+"&m="+b:"favicon_ok.png"}
- function O(){var a=N.length,b="";if(X)b="!"+K.Ga+" - ",document.getElementById("linkFavicon").href="favicon_err.png";else if(a)b="(!"+a+") - ",Xa(a,a);else{var c=0;na(C.context,function(a){a.A>a.C&&c++});c&&(b="("+c+") - ");Xa(0,c)}C.context.b&&(b+=C.context.b.name);document.title=b}
- function Ya(){if("Notification"in window)if("granted"===Notification.permission){var a=Date.now();if(Ia+3E4<a){var b=new Notification(K.Ha);Ia=a;setTimeout(function(){b.close()},5E3)}}else"denied"!==Notification.permission&&Notification.requestPermission()}
- function Ta(){var a=document.createDocumentFragment(),b=M.id,c=null,d=0,e=null,g;Ha=[];C.a[b]&&C.a[b].a.forEach(function(b){if(b.i)b.P();else{var f=b.M(),h=!1;c&&c.H===b.H&&b.H?30>Math.abs(d-b.l)&&!(b instanceof z)?e.classList.add("slackmsg-same-ts"):d=b.l:(d=b.l,h=!0);(!c||c.l<=M.C)&&b.l>M.C?f.classList.add("slackmsg-first-unread"):f.classList.remove("slackmsg-first-unread");if(b instanceof z)e=c=null,d=0,a.appendChild(f),g=null;else{if(h||!g){var h=I(b.H),n=b.username,k=document.createElement("div"),
- m=document.createElement("div"),r=document.createElement("span");k.S=document.createElement("img");k.S.className="slackmsg-author-img";r.className="slackmsg-author-name";h?(r.textContent=h.name,k.S.src="api/avatar?user="+h.id):(r.textContent=n||"?",k.S.src="");m.appendChild(k.S);m.appendChild(r);m.className="slackmsg-author";k.className="slackmsg-authorGroup";k.appendChild(m);k.content=document.createElement("div");k.content.className="slackmsg-author-messages";k.appendChild(k.content);g=k;Ha.push(g);
- a.appendChild(g)}c=b;e=f;g.content.appendChild(f)}}});b=document.getElementById("chatWindow");b.textContent="";b.appendChild(a);b.scrollTop=b.scrollHeight-b.clientHeight;window.hasFocus&&Ua()}
- function Za(a){function b(a,b){for(b=b||a.target;b!==a.currentTarget&&b;){if(b.id&&b.classList.contains("slackmsg-item"))return b.id;b=b.parentElement}}for(var c,d,e=a.target;e!==a.currentTarget&&e&&!e.classList.contains("slackmsg-hover");){if(e.parentElement&&e.classList.contains("slackmsg-attachment-actions-item")){d=b(a,e);var g=e.dataset.attachmentIndex,f=e.dataset.actionIndex;if(d&&void 0!==g&&void 0!==f){d=d.substr(d.lastIndexOf("_")+1);(c=ja(C.a[M.id],d))&&c.s[g]&&c.s[g].actions&&c.s[g].actions[f]&&
- $a(c,c.s[g],c.s[g].actions[f]);break}}if(e.parentElement&&e.parentElement.classList.contains("slackmsg-hover")){if(d=b(a,e))d=d.substr(d.lastIndexOf("_")+1),(c=ja(C.a[M.id],d))&&e.classList.contains("slackmsg-hover-reply")?(V&&(V=null,W()),T!==c&&(T=c,U())):c&&e.classList.contains("slackmsg-hover-reaction")?ab.$(document.body,Q,function(a){a&&Va(M.id,c.id,a)}):c&&e.classList.contains("slackmsg-hover-edit")?(T&&(T=null,U()),V!==c&&(V=c,W())):c&&e.classList.contains("slackmsg-hover-remove")&&(T&&(T=
- null,U()),V&&(V=null,W()),bb(c));break}e=e.parentElement}}function $a(a,b,c){function d(){var d={actions:[c],attachment_id:b.id,callback_id:b.callback_id,channel_id:e,is_ephemeral:a instanceof A,message_ts:a.id},f=new XMLHttpRequest;f.open("POST","api/attachmentAction?serviceId="+a.H);f.send(JSON.stringify(d))}var e=M.id;c.confirm?Ga(Fa(new ta(c.confirm.title,c.confirm.text),c.confirm.ok_text,c.confirm.dismiss_text),d).$():d()}function R(){document.getElementById("msgInput").focus()}
- function Ma(){var a=document.location.hash.substr(1),b=F(a);b&&b!==M?cb(b):(a=I(a))&&a.b&&cb(a.b)}function db(){var a=document.getElementById("chatWindow").getBoundingClientRect().top;Ha.forEach(function(b){var c=b.S,d=c.clientHeight;b=b.getBoundingClientRect();c.style.top=Math.max(0,Math.min(a-b.top,b.height-d-d/2))+"px"})}
- document.addEventListener("DOMContentLoaded",function(){ra();eb();document.getElementById("chatWindow").addEventListener("click",Za);window.addEventListener("hashchange",function(){document.location.hash&&"#"===document.location.hash[0]&&Ma()});document.getElementById("fileUploadCancel").addEventListener("click",function(a){a.preventDefault();document.getElementById("fileUploadError").classList.add("hidden");document.getElementById("fileUploadContainer").classList.add("hidden");document.getElementById("fileUploadInput").value=
- "";return!1});document.getElementById("fileUploadForm").addEventListener("submit",function(a){a.preventDefault();a=document.getElementById("fileUploadInput");var b=a.value;b&&(b=b.substr(b.lastIndexOf("\\")+1),fb(b,a.files[0],function(a){var b=document.getElementById("fileUploadError");a?(b.textContent=a,b.classList.remove("hidden")):(b.classList.add("hidden"),document.getElementById("fileUploadInput").value="",document.getElementById("fileUploadContainer").classList.add("hidden"))}));return!1});
- document.getElementById("attachFile").addEventListener("click",function(a){a.preventDefault();M&&document.getElementById("fileUploadContainer").classList.remove("hidden");return!1});document.getElementById("msgForm").addEventListener("submit",function(a){a.preventDefault();a=document.getElementById("msgInput");M&&a.value&&gb(a.value)&&(a.value="",T&&(T=null,U()),V&&(V=null,U()),document.getElementById("slashList").textContent="");R();return!1});window.addEventListener("blur",function(){window.hasFocus=
- !1});window.addEventListener("focus",function(){window.hasFocus=!0;Ia=0;M&&Ua();R()});document.getElementById("chatWindow").addEventListener("scroll",db);var a=0;document.getElementById("msgInput").addEventListener("input",function(){if(M){var b=Date.now();a+3E3<b&&(Q.self.a||M instanceof q)&&(hb(),a=b);var b=[],c=this.value;if("/"===this.value[0]){var d=c.indexOf(" "),e=-1!==d,d=-1===d?c.length:d,c=c.substr(0,d),g=Q?Q.i.data:{};for(l in g){var f=g[l];(!e&&f.name.substr(0,d)===c||e&&f.name===c)&&
- b.push(f)}}b.sort(function(a,b){return a.T.localeCompare(b.T)||a.name.localeCompare(b.name)});var l=document.getElementById("slashList");var d=document.createDocumentFragment();l.textContent="";e=0;for(c=b.length;e<c;e++){g=b[e];if(h!==g.T){var h=g.T;d.appendChild(ib(g.T))}d.appendChild(jb(g))}l.appendChild(d)}});window.hasFocus=!0;(function(){var a=document.getElementById("emojiButton");if("makeEmoji"in window){var c=window.makeEmoji("smile");c?a.innerHTML="<span class='emoji-small'>"+c.outerHTML+
- "</span>":a.style.backgroundImage='url("smile.svg")';(c=window.makeEmoji("paperclip"))?document.getElementById("attachFile").innerHTML="<span class='emoji-small'>"+c.outerHTML+"</span>":document.getElementById("attachFile").style.backgroundImage='url("public/paperclip.svg")';a.addEventListener("click",function(){Q&&ab.$(document.body,Q,function(a){a&&(document.getElementById("msgInput").value+=":"+a+":");R()})})}else a.classList.add("hidden")})();kb()});function Ka(){var a=document.createElement("span"),b=document.createElement("span"),c=document.createElement("span"),d=document.createElement("span");a.className="typing-container";b.className="typing-dot1";c.className="typing-dot2";d.className="typing-dot3";b.textContent=c.textContent=d.textContent=".";a.appendChild(b);a.appendChild(c);a.appendChild(d);return a}var La=function(){var a={};return function(b){var c=a[b];c||(c=a[b]=document.createElement("header"),c.textContent=b);return c}}();
- function lb(a){var b=a.b,c=document.createElement("div"),d=document.createElement("div"),e=document.createElement("ul"),g=document.createElement("li");c.s=document.createElement("ul");c.D=document.createElement("ul");c.l=document.createElement("div");c.pa=document.createElement("div");c.fa=document.createElement("span");c.id=b+"_"+a.id;c.className="slackmsg-item";c.l.className="slackmsg-ts";c.pa.className="slackmsg-msg";c.fa.className="slackmsg-author-name";e.className="slackmsg-hover";g.className=
- "slackmsg-hover-reply";e.appendChild(g);if("makeEmoji"in window){var f=document.createElement("li"),l=window.makeEmoji("arrow_heading_down"),h=window.makeEmoji("smile"),n=window.makeEmoji("pencil2"),b=window.makeEmoji("x");f.className="slackmsg-hover-reaction";h?(f.classList.add("emoji-small"),f.appendChild(h)):f.style.backgroundImage='url("smile.svg")';l?(g.classList.add("emoji-small"),g.appendChild(l)):g.style.backgroundImage='url("repl.svg")';e.appendChild(f);qa(a.H)&&(a=document.createElement("li"),
- a.className="slackmsg-hover-edit",n?a.classList.add("emoji-small"):a.style.backgroundImage='url("edit.svg")',a.appendChild(n),e.appendChild(a),a=document.createElement("li"),a.className="slackmsg-hover-remove",b?a.classList.add("emoji-small"):a.style.backgroundImage='url("remove.svg")',a.appendChild(b),e.appendChild(a))}else g.style.backgroundImage='url("repl.svg")',qa(a.H)&&(a=document.createElement("li"),a.className="slackmsg-hover-edit",a.style.backgroundImage='url("edit.svg")',e.appendChild(a),
- a=document.createElement("li"),a.className="slackmsg-hover-remove",a.style.backgroundImage='url("remove.svg")',e.appendChild(a));d.appendChild(c.fa);d.appendChild(c.pa);d.appendChild(c.l);d.appendChild(c.s);c.F=document.createElement("div");c.F.className="slackmsg-edited";d.appendChild(c.F);d.appendChild(c.D);d.className="slackmsg-content";c.s.className="slackmsg-attachments";c.D.className="slackmsg-reactions";c.appendChild(d);c.appendChild(e);return c}
- function mb(a){var b={good:"#2fa44f",warning:"#de9e31",danger:"#d50200"};if(a){if("#"===a[0])return a;if(b[a])return b[a]}return"#e3e4e6"}
- function nb(a,b,c){var d=document.createElement("li"),e=document.createElement("div"),g=document.createElement("div"),f=document.createElement("a"),l=document.createElement("div"),h=document.createElement("img"),n=document.createElement("a"),k=document.createElement("div"),m=document.createElement("div"),r=document.createElement("div"),v=document.createElement("img"),w=document.createElement("div");d.className="slackmsg-attachment";e.style.borderColor=mb(b.color||"");e.className="slackmsg-attachment-block";
- g.className="slackmsg-attachment-pretext";b.pretext?g.innerHTML=a.u(b.pretext):g.classList.add("hidden");f.target="_blank";b.title?(f.innerHTML=a.u(b.title),b.title_link&&(f.href=b.title_link),f.className="slackmsg-attachment-title"):f.className="hidden slackmsg-attachment-title";n.target="_blank";l.className="slackmsg-author";b.author_name&&(n.innerHTML=a.u(b.author_name),n.href=b.author_link||"",n.className="slackmsg-author-name",h.className="slackmsg-author-img",b.author_icon&&(h.src=b.author_icon,
- l.appendChild(h)),l.appendChild(n));r.className="slackmsg-attachment-thumb";b.thumb_url?(h=document.createElement("img"),h.src=b.thumb_url,r.appendChild(h),e.classList.add("has-thumb"),b.video_html&&(r.dataset.video=b.video_html)):r.classList.add("hidden");k.className="slackmsg-attachment-content";h=a.u(b.text||"");m.className="slackmsg-attachment-text";h&&""!=h?m.innerHTML=h:m.classList.add("hidden");v.className="slackmsg-attachment-img";b.image_url?v.src=b.image_url:v.classList.add("hidden");w.className=
- "slackmsg-attachment-footer";b.footer&&(h=document.createElement("span"),h.className="slackmsg-attachment-footer-text",h.innerHTML=a.u(b.footer),b.footer_icon&&(n=document.createElement("img"),n.src=b.footer_icon,n.className="slackmsg-attachment-footer-icon",w.appendChild(n)),w.appendChild(h));b.ts&&(h=document.createElement("span"),h.className="slackmsg-ts",h.innerHTML=K.V(b.ts),w.appendChild(h));k.appendChild(r);k.appendChild(m);e.appendChild(f);e.appendChild(l);e.appendChild(k);e.appendChild(v);
- if(b.fields&&b.fields.length){var u=document.createElement("ul");e.appendChild(u);u.className="slackmsg-attachment-fields";b.fields.forEach(function(b){var c=b.title||"",d=b.value||"";b=!!b["short"];var e=document.createElement("li"),f=document.createElement("div"),g=document.createElement("div");e.className="field";b||e.classList.add("field-long");f.className="field-title";f.textContent=c;g.className="field-text";g.innerHTML=a.u(d);e.appendChild(f);e.appendChild(g);e&&u.appendChild(e)})}if(b.actions&&
- b.actions.length)for(f=document.createElement("ul"),f.className="slackmsg-attachment-actions "+Ba,e.appendChild(f),l=0,k=b.actions.length;l<k;l++)(m=b.actions[l])&&(m=ob(c,l,m))&&f.appendChild(m);e.appendChild(w);d.appendChild(g);d.appendChild(e);return d}
- function ob(a,b,c){var d=document.createElement("li"),e=mb(c.style);d.textContent=c.text;e!==mb()&&(d.style.color=e);d.style.borderColor=e;d.dataset.attachmentIndex=a;d.dataset.actionIndex=b;d.className="slackmsg-attachment-actions-item "+Aa;return d}function Qa(a){var b=document.createElement("li"),c=document.createElement("span");c.textContent=a.name;b.appendChild(Ka());b.appendChild(c);return b}
- function ib(a){var b=document.createElement("lh");b.textContent=a;b.className="slack-command-header";return b}
- function jb(a){var b=document.createElement("li"),c=document.createElement("span"),d=document.createElement("span"),e=document.createElement("span");c.textContent=a.name;d.textContent=a.usage;e.textContent=a.a;b.appendChild(c);b.appendChild(d);b.appendChild(e);b.className="slack-command-item";c.className="slack-command-name";d.className="slack-command-usage";e.className="slack-command-desc";return b};var ab=function(){function a(a,b){for(a=a.target;a!==h&&a&&"LI"!==a.nodeName;)a=a.parentElement;a&&"LI"===a.nodeName&&a.id&&"emojibar-"===a.id.substr(0,9)?b(a.id.substr(9)):b(null)}function b(){if(!c())return!1;D&&D(null);return!0}function c(){return h.parentElement?(h.parentElement.removeChild(n),h.parentElement.removeChild(h),!0):!1}function d(a){var b=0;a=void 0===a?v.value:a;if(l()){var c=window.searchEmojis(a);var d=e(c,S.self.N.ga);for(var f in w)w[f].visible&&(w[f].visible=!1,m.removeChild(w[f].c));
- f=0;for(var h=d.length;f<h;f++){var y=d[f].name;var k=w[y];if(!k){k=w;var H=y,n=y;y=window.makeEmoji(c[y]);var D=document.createElement("span");D.appendChild(y);D.className="emoji-medium";y=g(n,D);k=k[H]=y}k.visible||(k.visible=!0,m.appendChild(k.c));b++}}for(f in u)u[f].visible&&(u[f].visible=!1,r.removeChild(u[f].c));d=e(S.a.data,S.self.N.ga);f=0;for(h=d.length;f<h;f++)y=d[f].name,""!==a&&y.substr(0,a.length)!==a||"alias:"===S.a.data[y].substr(0,6)||(k=u[y],k||(c=u,H=k=y,y=S.a.data[y],n=document.createElement("span"),
- D=document.createElement("span"),n.className="emoji emoji-custom",n.style.backgroundImage='url("'+y+'")',D.appendChild(n),D.className="emoji-medium",y=g(H,D),k=c[k]=y),k.visible||(k.visible=!0,r.appendChild(k.c)),b++);return b}function e(a,b){var c=[],d;for(d in a){var e={name:d,Ja:0,count:0};a[d].names&&a[d].names.forEach(function(a){e.count+=b[a]||0});c.push(e)}return c=c.sort(function(a,b){var c=b.count-a.count;return c?c:a.Ja-b.Ja})}function g(a,b){var c=document.createElement("li");c.appendChild(b);
- c.className="emojibar-list-item";c.id="emojibar-"+a;return{visible:!1,c:c}}function f(a){var b=document.createElement("img"),c=document.createElement("div");b.src=a;c.appendChild(b);c.className="emojibar-header";return c}function l(){return"searchEmojis"in window}var h=document.createElement("div"),n=document.createElement("div"),k=document.createElement("div"),m=document.createElement("ul"),r=document.createElement("ul"),v=document.createElement("input"),w={},u={},G=document.createElement("div"),
- H=document.createElement("span"),P=document.createElement("span"),D,S;n.addEventListener("click",function(a){var c=h.getBoundingClientRect();(a.screenY<c.top||a.screenY>c.bottom||a.screenX<c.left||a.screenX>c.right)&&b()});n.className="emojibar-overlay";h.className="emojibar";k.className="emojibar-emojis";G.className="emojibar-detail";H.className="emojibar-detail-img";P.className="emojibar-detail-name";m.className=r.className="emojibar-list";v.className="emojibar-search";G.appendChild(H);G.appendChild(P);
- k.appendChild(f(window.emojiProviderHeader));k.appendChild(m);k.appendChild(f("emojicustom.png"));k.appendChild(r);h.appendChild(k);h.appendChild(G);h.appendChild(v);v.addEventListener("keyup",function(){d()});h.addEventListener("mousemove",function(b){a(b,function(a){var b=a?w[a]||u[a]:null;b?(H.innerHTML=b.c.outerHTML,P.textContent=":"+a+":"):(H.textContent="",P.textContent="")})});h.addEventListener("click",function(b){a(b,function(a){a&&c()&&D&&D(a)})});return{isSupported:l,$:function(a,b,c){return l()?
- (S=b,D=c,a.appendChild(n),a.appendChild(h),v.value="",d(),v.focus(),!0):!1},search:d,close:b}}();var C,N=[];function pb(){da.call(this)}pb.prototype=Object.create(da.prototype);pb.prototype.constructor=pb;function ma(a){return a.b?a.b.id:null}function qb(){this.b=0;this.context=new ka;this.a={}}
- qb.prototype.update=function(a){var b=Date.now();a.v&&(this.b=a.v);if(a["static"])for(var c in a["static"]){var d=la(this.context,c);d||(d=new pb,this.context.push(d));ea(d,a["static"][c],b)}na(this.context,function(a){a.A===a.C&&(a=N.indexOf(a),-1!==a&&N.splice(a,1))});if(a.live){for(c in a.live)(d=this.a[c])?ga(d,a.live[c],b):d=this.a[c]=new Y(c,250,a.live[c],b);for(var e in a.live)d=E(this.context,e),(c=d.j[e])?(this.a[e].a.length&&(c.A=Math.max(c.A,ia(this.a[e]).l)),c.Y||(rb(d,c,a.live[e]),M&&
- a.live[M.id]&&Ta())):C.b=0}a["static"]&&Ja();var g=!1;a.typing&&this.context.a.forEach(function(c){var d=g,e=a.typing,f=!1;if(c.o)for(var k in c.o)e[k]||(delete c.o[k],f=!0);if(e)for(k in e)if(c.j[k]){c.o[k]||(c.o[k]={});for(var m in e[k])c.o[k][m]||(f=!0),c.o[k][m]=b}g=d|f},this);(a["static"]||g)&&Oa()};
- setInterval(function(){var a=!1,b=Date.now();oa(function(c){var d=!1,e;for(e in c.o){var g=!0,f;for(f in c.o[e])c.o[e][f]+3E3<b?(delete c.o[e][f],d=!0):g=!1;g&&(delete c.o[e],d=!0)}d&&(a=!0)});a&&Oa()},1E3);
- function rb(a,b,c){if(b!==M||!window.hasFocus){var d=new RegExp("<@"+a.self.id),e=!1,g=!1,f=!1;c.forEach(function(c){if(!(parseFloat(c.ts)<=b.C)){g=!0;var h;if(!(h=b instanceof q)&&(h=c.text)&&!(h=c.text.match(d)))a:{h=a.self.N.w;for(var l=0,k=h.length;l<k;l++)if(-1!==c.text.indexOf(h[l])){h=!0;break a}h=!1}h&&(-1===N.indexOf(b)&&(f=!0,N.push(b)),e=!0)}});if(g){O();if(c=document.getElementById("room_"+b.id))c.classList.add("unread"),e&&c.classList.add("unreadHi");f&&!window.hasFocus&&Ya()}}}
- function Ua(){var a=M,b=N.indexOf(a);if(a.A>a.C){var c=new XMLHttpRequest;c.open("POST","api/markread?room="+a.id+"&ts="+a.A,!0);c.send(null);a.C=a.A}0<=b&&(N.splice(b,1),O());a=document.getElementById("room_"+a.id);a.classList.remove("unread");a.classList.remove("unreadHi")}C=new qb;var Na=function(){function a(a,b){b.sort(function(){return Math.random()-.5});for(var c=0,d=20;d<h-40;d+=k)for(var e=0;e+k<=n;e+=k)g(a,b[c],d,e),c++,c===b.length&&(b.sort(function(a,b){return a.X?b.X?Math.random()-.5:-1:1}),c=0)}function b(a,d){for(var e=0,f=a.length;e<f;e++)if(void 0===a[e].X){c(a[e].src,function(c){a[e].X=c;b(a,d)});return}var g=[];a.forEach(function(a){a.X&&g.push(a.X)});d(g)}function c(a,b){var c=new XMLHttpRequest;c.responseType="blob";c.onreadystatechange=function(){if(4===
- c.readyState)if(c.response){var a=new Image;a.onload=function(){var c=document.createElement("canvas");c.height=c.width=v;c=c.getContext("2d");c.drawImage(a,0,0,v,v);for(var c=c.getImageData(0,0,v,v),d=0,e=0;e<c.width*c.height*4;e+=4)c.data[e]=c.data[e+1]=c.data[e+2]=(c.data[e]+c.data[e+1]+c.data[e+2])/3,c.data[e+3]=50,d+=c.data[e];if(50>d/(c.height*c.width))for(e=0;e<c.width*c.height*4;e+=4)c.data[e]=c.data[e+1]=c.data[e+2]=255-c.data[e];b(c)};a.onerror=function(){b(null)};a.src=window.URL.createObjectURL(c.response)}else b(null)};
- c.open("GET",a,!0);c.send(null)}function d(){var a=l.createLinearGradient(0,0,0,n);a.addColorStop(0,"#4D394B");a.addColorStop(1,"#201820");l.fillStyle=a;l.fillRect(0,0,h,n);return l.getImageData(0,0,h,n)}function e(a,b){for(var c=(a.height-b.height)/2,d=0;d<b.height;d++)for(var e=0;e<b.width;e++){var f=b.data[4*(d*b.width+e)]/255,g=4*((d+c)*a.width+e+c);a.data[g]*=f;a.data[g+1]*=f;a.data[g+2]*=f}return a}function g(a,b,c,d){var f=Math.floor(d);a=[a.data[f*h*4+0],a.data[f*h*4+1],a.data[f*h*4+2]];l.fillStyle=
- "#"+(1.1*a[0]<<16|1.1*a[1]<<8|1.1*a[2]).toString(16);l.beginPath();l.moveTo(c+k/2,d+m);l.lineTo(c-m+k,d+k/2);l.lineTo(c+k/2,d-m+k);l.lineTo(c+m,d+k/2);l.closePath();l.fill();l.putImageData(e(l.getImageData(c+m,d+m,r,r),b),c+m,d+m)}var f=document.createElement("canvas"),l=f.getContext("2d"),h=f.width=250,n=f.height=290,k=(h-40)/3,m=.1*k,r=Math.floor(k-2*m),v=.5*r,w={},u={},G={};return function(c,e,g){if(w[c])g(w[c]);else if(G[c])u[c]?u[c].push(g):u[c]=[g];else{var h=d(),k=[];G[c]=!0;u[c]?u[c].push(g):
- u[c]=[g];for(var l in e)e[l].Da||e[l].Oa||k.push({src:"api/avatar?user="+e[l].id});b(k,function(b){a(h,b);w[c]=f.toDataURL();u[c].forEach(function(a){a(w[c])})})}}}();var X=0,M=null,Q=null,T=null,V=null;function eb(){var a=new XMLHttpRequest;a.timeout=6E4;a.onreadystatechange=function(){if(4===a.readyState){var b=document.createElement("script");b.innerHTML=a.response;b.language="text/javascript";document.head.innerHTML+='<link href="hljs-androidstudio.css" rel="stylesheet"/>';document.body.appendChild(b)}};a.open("GET","highlight.pack.js",!0);a.send(null)}function sb(){var a=new XMLHttpRequest;a.open("GET","api/hist?room="+M.id,!0);a.send(null)}
- function tb(a){var b=new XMLHttpRequest;b.timeout=6E4;b.onreadystatechange=function(){if(4===b.readyState)if(b.status){var c=null,d=2===Math.floor(b.status/100);if(d){X&&(X=0,Ra(!0));c=b.response;try{c=JSON.parse(c)}catch(e){c=null}}else X?(X+=Math.floor((X||5)/2),X=Math.min(60,X)):(X=5,Ra(!1));a(d,c)}else X&&(X=0,Ra(!0)),tb(a)};b.open("GET","api?v="+C.b,!0);b.send(null)}function hb(){var a=new XMLHttpRequest;a.open("POST","api/typing?room="+M.id,!0);a.send(null)}
- function ub(a,b){a?(b&&C.update(b),kb()):setTimeout(kb,1E3*X)}function kb(){tb(ub)}function cb(a){M&&document.getElementById("room_"+M.id).classList.remove("selected");document.getElementById("room_"+a.id).classList.add("selected");document.body.classList.remove("no-room-selected");M=a;Q=E(C.context,a.id);Sa();Na(Q.b.id,Q.m,function(a){document.getElementById("slackCtx").style.backgroundImage="url("+a+")"});M.A&&!C.a[M.id]&&sb()}
- function fb(a,b,c){var d=M;new FileReader;var e=new FormData,g=new XMLHttpRequest;e.append("file",b);e.append("filename",a);g.onreadystatechange=function(){4===g.readyState&&(204===g.status?c(null):c(g.statusText))};g.open("POST","api/file?room="+d.id);g.send(e)}
- function gb(a){if(V){var b=new XMLHttpRequest;b.open("PUT","api/msg?room="+M.id+"&ts="+V.id+"&text="+encodeURIComponent(a),!0);b.send(null);return!0}if("/"===a[0]){var c=a.indexOf(" "),b=a.substr(0,-1===c?void 0:c);a=-1===c?"":a.substr(c);return(b=(c=Q)?c.i.data[b]:null)?(c=new XMLHttpRequest,c.open("POST","api/cmd?room="+M.id+"&cmd="+encodeURIComponent(b.name.substr(1))+"&args="+encodeURIComponent(a.trim()),!0),c.send(null),!0):!1}var b=M,c=T,d=new XMLHttpRequest;a="api/msg?room="+b.id+"&text="+
- encodeURIComponent(a);if(c){var e=I(c.H);a+="&attachments="+encodeURIComponent(JSON.stringify([{fallback:c.text,author_name:"<@"+e.id+"|"+e.name+">",text:c.text,footer:b.b?"Private message":b.name,ts:c.l}]))}d.open("POST",a,!0);d.send(null);return!0}function bb(a){var b=new XMLHttpRequest;b.open("DELETE","api/msg?room="+M.id+"&ts="+a.id,!0);b.send(null)}function Va(a,b,c){var d=new XMLHttpRequest;d.open("POST","api/reaction?room="+a+"&msg="+b+"&reaction="+encodeURIComponent(c),!0);d.send(null)};function Y(a,b,c,d){B.call(this,a,b,c,d)}Y.prototype=Object.create(B.prototype);Y.prototype.constructor=Y;Y.prototype.b=function(a,b){return!0===a.isMeMessage?new vb(this.id,a,b):!0===a.isNotice?new wb(this.id,a,b):new xb(this.id,a,b)};
- var Z=function(){function a(a,d){return sa(d,{w:a.context.self.N.w,U:function(a){":"===a[0]&&":"===a[a.length-1]&&(a=a.substr(1,a.length-2));if(a=Wa(a)){var b=document.createElement("span");b.className="emoji-small";b.appendChild(a);return b.outerHTML}return null},Z:function(c){return b(a,c)}})}function b(a,b){var c=b.indexOf("|");if(-1===c)var d=b;else{d=b.substr(0,c);var f=b.substr(c+1)}if("@"===d[0])if(d=ma(a.context)+"|"+d.substr(1),f=I(d))a=!0,d="#"+f.na.id,f="@"+f.name;else return null;else if("#"===
- d[0])if(d=ma(a.context)+"|"+d.substr(1),f=F(d))a=!0,d="#"+d,f="#"+f.name;else return null;else{if(!d.match(/^(https?|mailto):\/\//i))return null;a=!1}return{link:d,text:f||d,Fa:a}}return{G:function(a){a.O=!0;return a},P:function(a){a.c&&a.c.parentElement&&(a.c.remove(),delete a.c);return a},M:function(a){a.c?a.O&&(a.O=!1,a.K()):a.ea().K();return a.c},K:function(b){var c=I(b.H);b.c.l.innerHTML=K.V(b.l);b.c.pa.innerHTML=a(b,b.text);b.c.fa.textContent=c?c.name:b.username||"?";for(var c=document.createDocumentFragment(),
- e=0,g=b.s.length;e<g;e++){var f=b.s[e];f&&(f=nb(b,f,e))&&c.appendChild(f)}b.c.s.textContent="";b.c.s.appendChild(c);c=b.b;e=document.createDocumentFragment();if(b.D)for(var l in b.D){var g=c,f=b.id,h=l,n=b.D[l],k=Wa(h);if(k){for(var m=document.createElement("li"),r=document.createElement("a"),v=document.createElement("span"),w=document.createElement("span"),u=[],G=0,H=n.length;G<H;G++){var P=I(n[G]);P&&u.push(P.name)}u.sort();w.textContent=u.join(", ");v.appendChild(k);v.className="emoji-small";r.href=
- "javascript:toggleReaction('"+g+"', '"+f+"', '"+h+"')";r.appendChild(v);r.appendChild(w);m.className="slackmsg-reaction-item";m.appendChild(r);g=m}else console.warn("Reaction id not found: "+h),g=null;g&&e.appendChild(g)}b.c.D.textContent="";b.c.D.appendChild(e);b.F&&(b.c.F.innerHTML=K.F(b.F),b.c.classList.add("edited"));return b},L:function(a){return a.c.cloneNode(!0)},u:function(b,d){return a(b,d)}}}();
- function vb(a,b,c){x.call(this,b,c);this.context=E(C.context,a);this.b=a;this.c=Z.c;this.O=Z.O}vb.prototype=Object.create(z.prototype);p=vb.prototype;p.constructor=vb;p.G=function(){return Z.G(this)};p.u=function(a){return Z.u(this,a)};p.P=function(){return Z.P(this)};p.M=function(){return Z.M(this)};p.ea=function(){this.c=lb(this);this.c.classList.add("slackmsg-me_message");return this};p.L=function(){return Z.L(this)};p.K=function(){Z.K(this);return this};
- p.update=function(a,b){z.prototype.update.call(this,a,b);this.G()};function xb(a,b,c){x.call(this,b,c);this.context=E(C.context,a);this.b=a;this.c=Z.c;this.O=Z.O}xb.prototype=Object.create(x.prototype);p=xb.prototype;p.constructor=xb;p.G=function(){return Z.G(this)};p.u=function(a){return Z.u(this,a)};p.P=function(){return Z.P(this)};p.M=function(){return Z.M(this)};p.ea=function(){this.c=lb(this);return this};p.L=function(){return Z.L(this)};p.K=function(){Z.K(this);return this};
- p.update=function(a,b){x.prototype.update.call(this,a,b);this.G()};function wb(a,b,c){x.call(this,b,c);this.context=E(C.context,a);this.b=a;this.a=null;this.O=!0}wb.prototype=Object.create(A.prototype);p=wb.prototype;p.constructor=wb;p.G=function(){return Z.G(this)};p.u=function(a){return Z.u(this,a)};p.P=function(){this.a&&this.a.parentElement&&(this.a.remove(),delete this.a);this.c&&delete this.c;return this};p.M=function(){Z.M(this);return this.a};p.L=function(){return this.a.cloneNode(!0)};
- p.ea=function(){this.c=lb(this);this.a=document.createElement("span");this.c.classList.add("slackmsg-notice");this.a.className="slackmsg-notice";this.a.textContent=K.Ia;this.a.appendChild(this.c);return this};p.K=function(){Z.K(this);return this};p.update=function(a,b){A.prototype.update.call(this,a,b);this.G()};
- })();
|