varr=t.toLowerCase(),a=n.capitalization[r];returna&&Date.now()-a[1]<36e5?void(i.channel=a[0]):voido.push(newRSVP.Promise(function(e,t,o,i){l.ws_send("get_display_name",t,function(s,r){vara=s?r:o;n.capitalization[t]=[a,Date.now()],e.channel=a,i()})||(e.channel=o,i()),setTimeout(function(e,t,n){e.channel||(e.channel=t),n()}.bind(this,e,o,i),5e3)}.bind(this,i,r,t)))}},a=function(){o.length?RSVP.all(o).then(e,e):e()};t=[];for(varc=0;c<i.length;c++){varu=i[c];l._twitch_set_to_channel[u]?r(u,l._twitch_set_to_channel[u]):t.push(u)}t.length>0?(l.ws_send("twitch_sets",t,function(e,n){if(t=[],e){for(varoinn)n.hasOwnProperty(o)&&(l._twitch_set_to_channel[o]=n[o],r(o,n[o]));localStorage.ffzTwitchSets=JSON.stringify(l._twitch_set_to_channel)}a()}),setTimeout(function(){t.length&&a()},5e3)):a()})]).then(function(){for(vart={},n=0;n<o[0].length;n++){vari=o[0][n];l._twitch_emote_sets[i]&&(t[i]=l._twitch_emote_sets[i])}e(t)},function(){e({})})}).then(function(o){try{if("my_emotes"!=t.getAttribute("data-page"))return;t.innerHTML="";vars=[];for(varaino)if(o.hasOwnProperty(a)){varc=o[a];c.channel&&c.emotes&&c.emotes.length&&s.push([1,c.channel,c])}s.sort(function(e,t){if(e[0]<t[0])return-1;if(e[0]>t[0])return1;varn=e[1].toLowerCase(),o=t[1].toLowerCase();return("twitch turbo"===n||"global emoticons"===n)&&(n="zzz"+n),("twitch turbo"===o||"global emoticons"===o)&&(o="zzz"+o),o>n?-1:n>o?1:0});for(varu=0;u<s.length;u++){varc=s[u][2],d=document.createElement("div"),h=document.createElement("div");d.className="heading",d.innerHTML='<span class="right">'+c.source+"</span>"+n.get_capitalization(c.channel),c.badge&&(d.style.backgroundImage='url("'+c.badge+'")'),h.className="emoticon-grid",h.appendChild(d);for(varm=0;m<c.emotes.length;m++){var_=c.emotes[m],p=r[_.code]||_.code,f=document.createElement("span");f.className="emoticon tooltip",f.style.backgroundImage='url("'+i+_.id+'/1.0")';varg='image-set(url("'+i+_.id+'/1.0") 1x, url("'+i+_.id+'/2.0") 2x, url("'+i+_.id+'/3.0") 4x)';f.style.backgroundImage="-webkit-"+g,f.style.backgroundImage="-moz-"+g,f.style.backgroundImage="-ms-"+g,f.style.backgroundImage=g,f.title=p,f.addEventListener("click",l._add_emote.bind(l,e,p)),h.appendChild(f)}t.appendChild(h)}if(!s.length){varh=document.createElement("div");h.className="chat-menu-content center",h.innerHTML="Error Loading Subscriptions",t.appendChild(h)}}catch(v){l.log("My Emotes Menu Error",v),t.innerHTML="";varh=document.createElement("div"),d=document.createElement("div"),b=document.createElement("p");d.className="heading",d.innerHTML="Error Loading Menu",h.appendChild(d),b.className="clearfix",b.textContent=v,h.appendChild(b),h.className="chat-menu-content",t.appendChild(h)}})}}},{"../constants":3}],23:[function(){vart=e.FrankerFaceZ;t.prototype.setup_notifications=function(){this.log("Adding event handler for window focus."),e.addEventListener("focus",this.clear_notifications.bind(this))},t.settings_info.highlight_notifications={type:"boolean",value:!1,category:"Chat",visible:function(){return!this.has_bttv},name:"Highlight Notifications",help:"Display notifications when a highlighted word appears in chat in an unfocused tab.",on_update:function(e,t){if(e&&t){if("denied"===Notification.permission)returnthis.log("Notifications have been denied by the user."),voidthis.settings.set("highlight_notifications",!1);if("granted"!==Notification.permission){varn=this;Notification.requestPermission(function(e){"denied"===e&&(n.log("Notifications have been denied by the user."),n.settings.set("highlight_notifications",!1))})}}}},t.ws_commands.message=function(e){this.show_message(e)},t._notifications={},t._last_notification=0,t.prototype.clear_notifications=function(){for(vareint._notifications){varn=t._notifications[e];if(n)try{n.close()}catch(o){}}t._notifications={},t._last_notification=0},t.prototype.show_notification=function(e,n,o,i,s,r){vara=Notification.permission;if("denied "===a)return!1;if("granted"===a){n=n||"FrankerFaceZ",i=i||1e4;varl={lang:"en-US",dir:"ltr",body:e,tag:o||"FrankerFaceZ",icon:"http://cdn.frankerfac