thelounge/client/js/components.min.js

8 lines
232 KiB
JavaScript
Raw Normal View History

2014-07-09 01:38:38 +00:00
(function(){var a=function(a){"use strict";a=a?a:{};var b={bgColor:"#d00",textColor:"#fff",fontFamily:"sans-serif",fontStyle:"bold",type:"circle",position:"down",animation:"slide",elementId:false};var c,d,e,f,g,h,i,j,k,l,m,n,o;o={};o.ff=/firefox/i.test(navigator.userAgent.toLowerCase());o.chrome=/chrome/i.test(navigator.userAgent.toLowerCase());o.opera=/opera/i.test(navigator.userAgent.toLowerCase());o.ie=/msie/i.test(navigator.userAgent.toLowerCase())||/trident/i.test(navigator.userAgent.toLowerCase());o.supported=o.chrome||o.ff||o.opera;var p=[];m=function(){};j=n=false;var q=function(){c=B(b,a);c.bgColor=A(c.bgColor);c.textColor=A(c.textColor);c.position=c.position.toLowerCase();c.animation=D.types[""+c.animation]?c.animation:b.animation;var j=c.position.indexOf("up")>-1;var k=c.position.indexOf("left")>-1;if(j||k){for(var l=0;l<D.types[""+c.animation].length;l++){var m=D.types[""+c.animation][l];if(j){if(m.y<.6){m.y=m.y-.4}else{m.y=m.y-2*m.y+(1-m.w)}}if(k){if(m.x<.6){m.x=m.x-.4}else{m.x=m.x-2*m.x+(1-m.h)}}D.types[""+c.animation][l]=m}}c.type=s[""+c.type]?c.type:b.type;try{d=z.getIcon();g=document.createElement("canvas");i=document.createElement("img");if(d.hasAttribute("href")){i.setAttribute("src",d.getAttribute("href"));i.onload=function(){e=i.height>0?i.height:32;f=i.width>0?i.width:32;g.height=e;g.width=f;h=g.getContext("2d");r.ready()}}else{i.setAttribute("src","");e=32;f=32;i.height=e;i.width=f;g.height=e;g.width=f;h=g.getContext("2d");r.ready()}}catch(n){throw"Error initializing favico. Message: "+n.message}};var r={};r.ready=function(){j=true;r.reset();m()};r.reset=function(){p=[];k=false;h.clearRect(0,0,f,e);h.drawImage(i,0,0,f,e);z.setIcon(g)};r.start=function(){if(!j||l){return}var a=function(){k=p[0];l=false;if(p.length>0){p.shift();r.start()}else{}};if(p.length>0){l=true;if(k){D.run(k.options,function(){D.run(p[0].options,function(){a()},false)},true)}else{D.run(p[0].options,function(){a()},false)}}};var s={};var t=function(a){a.n=typeof a.n==="number"?Math.abs(a.n|0):a.n;a.x=f*a.x;a.y=e*a.y;a.w=f*a.w;a.h=e*a.h;a.len=(""+a.n).length;return a};s.circle=function(a){a=t(a);var b=false;if(a.len===2){a.x=a.x-a.w*.4;a.w=a.w*1.4;b=true}else if(a.len>=3){a.x=a.x-a.w*.65;a.w=a.w*1.65;b=true}h.clearRect(0,0,f,e);h.drawImage(i,0,0,f,e);h.beginPath();h.font=c.fontStyle+" "+Math.floor(a.h*(a.n>99?.85:1))+"px "+c.fontFamily;h.textAlign="center";if(b){h.moveTo(a.x+a.w/2,a.y);h.lineTo(a.x+a.w-a.h/2,a.y);h.quadraticCurveTo(a.x+a.w,a.y,a.x+a.w,a.y+a.h/2);h.lineTo(a.x+a.w,a.y+a.h-a.h/2);h.quadraticCurveTo(a.x+a.w,a.y+a.h,a.x+a.w-a.h/2,a.y+a.h);h.lineTo(a.x+a.h/2,a.y+a.h);h.quadraticCurveTo(a.x,a.y+a.h,a.x,a.y+a.h-a.h/2);h.lineTo(a.x,a.y+a.h/2);h.quadraticCurveTo(a.x,a.y,a.x+a.h/2,a.y)}else{h.arc(a.x+a.w/2,a.y+a.h/2,a.h/2,0,2*Math.PI)}h.fillStyle="rgba("+c.bgColor.r+","+c.bgColor.g+","+c.bgColor.b+","+a.o+")";h.fill();h.closePath();h.beginPath();h.stroke();h.fillStyle="rgba("+c.textColor.r+","+c.textColor.g+","+c.textColor.b+","+a.o+")";if(typeof a.n==="number"&&a.n>999){h.fillText((a.n>9999?9:Math.floor(a.n/1e3))+"k+",Math.floor(a.x+a.w/2),Math.floor(a.y+a.h-a.h*.2))}else{h.fillText(a.n,Math.floor(a.x+a.w/2),Math.floor(a.y+a.h-a.h*.15))}h.closePath()};s.rectangle=function(a){a=t(a);var b=false;if(a.len===2){a.x=a.x-a.w*.4;a.w=a.w*1.4;b=true}else if(a.len>=3){a.x=a.x-a.w*.65;a.w=a.w*1.65;b=true}h.clearRect(0,0,f,e);h.drawImage(i,0,0,f,e);h.beginPath();h.font="bold "+Math.floor(a.h*(a.n>99?.9:1))+"px sans-serif";h.textAlign="center";h.fillStyle="rgba("+c.bgColor.r+","+c.bgColor.g+","+c.bgColor.b+","+a.o+")";h.fillRect(a.x,a.y,a.w,a.h);h.fillStyle="rgba("+c.textColor.r+","+c.textColor.g+","+c.textColor.b+","+a.o+")";if(typeof a.n==="number"&&a.len>3){h.fillText((a.n>9999?9:Math.floor(a.n/1e3))+"k+",Math.floor(a.x+a.w/2),Math.floor(a.y+a.h-a.h*.2))}else{h.fillText(a.n,Math.floor(a.x+a.w/2),Math.floor(a.y+a.h-a.h*.15))}h.closePath()};var u=function(a,b){m=function(){try{if(typeof a==="number"?a>0:a!==""){if(D.types[""+b]){c.animation=b}p.push({type:"badge",options:{n:a}});if(p.length>100){throw"Too many badges requests in queu
this.conditionStack=["INITIAL"];this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0};if(this.options.ranges)this.yylloc.range=[0,0];this.offset=0;return this},input:function(){var a=this._input[0];this.yytext+=a;this.yyleng++;this.offset++;this.match+=a;this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);if(b){this.yylineno++;this.yylloc.last_line++}else{this.yylloc.last_column++}if(this.options.ranges)this.yylloc.range[1]++;this._input=this._input.slice(1);return a},unput:function(a){var b=a.length;var c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input;this.yytext=this.yytext.substr(0,this.yytext.length-b-1);this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1);this.matched=this.matched.substr(0,this.matched.length-1);if(c.length-1)this.yylineno-=c.length-1;var e=this.yylloc.range;this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b};if(this.options.ranges){this.yylloc.range=[e[0],e[0]+this.yyleng-b]}return this},more:function(){this._more=true;return this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;if(a.length<20){a+=this._input.substr(0,20-a.length)}return(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput();var b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done){return this.EOF}if(!this._input)this.done=true;var a,b,c,d,e,f;if(!this._more){this.yytext="";this.match=""}var g=this._currentRules();for(var h=0;h<g.length;h++){c=this._input.match(this.rules[g[h]]);if(c&&(!b||c[0].length>b[0].length)){b=c;d=h;if(!this.options.flex)break}}if(b){f=b[0].match(/(?:\r\n?|\n).*/g);if(f)this.yylineno+=f.length;this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length};this.yytext+=b[0];this.match+=b[0];this.matches=b;this.yyleng=this.yytext.length;if(this.options.ranges){this.yylloc.range=[this.offset,this.offset+=this.yyleng]}this._more=false;this._input=this._input.slice(b[0].length);this.matched+=b[0];a=this.performAction.call(this,this.yy,this,g[d],this.conditionStack[this.conditionStack.length-1]);if(this.done&&this._input)this.done=false;if(a)return a;else return}if(this._input===""){return this.EOF}else{return this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}},lex:function c(){var a=this.next();if(typeof a!=="undefined"){return a}else{return this.lex()}},begin:function d(a){this.conditionStack.push(a)},popState:function e(){return this.conditionStack.pop()},_currentRules:function f(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function g(a){this.begin(a)}};a.options={};a.performAction=function h(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substr(a,b.yyleng-c)}var f=d;switch(c){case 0:if(b.yytext.slice(-2)==="\\\\"){e(0,1);this.begin("mu")}else if(b.yytext.slice(-1)==="\\"){e(0,1);this.begin("emu")}else{this.begin("mu")}if(b.yytext)return 10;break;case 1:return 10;break;case 2:this.popState();return 10;break;case 3:b.yytext=b.yytext.substr(5,b.yyleng-9);this.popState();return 11;break;case 4:return 10;break;case 5:e(0,4);this.popState();return 17;break;case 6:return 40;break;case 7:return 41;break;case 8:return 18;break;case 9:this.popState();this.begin("raw");return 20;break;case 10:b.yytext=b.yytext.substr(4,b.yyleng-8);this.popState();return"RAW_BLOCK";break;case 11:return 29;break;case 12
while(a[c++]=b[d++]){}a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n){m(b)}b=b||n;d=d||[];if(!a||typeof a!=="string"){return d}if((k=b.nodeType)!==1&&k!==9){return[]}if(p&&!e){if(f=_.exec(a)){if(j=f[1]){if(k===9){h=b.getElementById(j);if(h&&h.parentNode){if(h.id===j){d.push(h);return d}}else{return d}}else{if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j){d.push(h);return d}}}else if(f[2]){I.apply(d,b.getElementsByTagName(a));return d}else if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName){I.apply(d,b.getElementsByClassName(j));return d}}if(c.qsa&&(!q||!q.test(a))){s=r=u;w=b;x=k===9&&a;if(k===1&&b.nodeName.toLowerCase()!=="object"){o=g(a);if(r=b.getAttribute("id")){s=r.replace(bb,"\\$&")}else{b.setAttribute("id",s)}s="[id='"+s+"'] ";l=o.length;while(l--){o[l]=s+qb(o[l])}w=ab.test(a)&&ob(b.parentNode)||b;x=o.join(",")}if(x){try{I.apply(d,w.querySelectorAll(x));return d}catch(y){}finally{if(!r){b.removeAttribute("id")}}}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){if(a.push(c+" ")>d.cacheLength){delete b[a.shift()]}return b[c+" "]=e}return b}function hb(a){a[u]=true;return a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return false}finally{if(b.parentNode){b.parentNode.removeChild(b)}b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--){d.attrHandle[c[e]]=b}}function kb(a,b){var c=b&&a,d=c&&a.nodeType===1&&b.nodeType===1&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d){return d}if(c){while(c=c.nextSibling){if(c===b){return-1}}}return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return c==="input"&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}}function nb(a){return hb(function(b){b=+b;return hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--){if(c[e=f[g]]){c[e]=!(d[e]=c[e])}}})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={};f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?b.nodeName!=="HTML":false};m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;if(e===n||e.nodeType!==9||!e.documentElement){return n}n=e;o=e.documentElement;p=!f(e);if(g&&g!==g.top){if(g.addEventListener){g.addEventListener("unload",function(){m()},false)}else if(g.attachEvent){g.attachEvent("onunload",function(){m()})}}c.attributes=ib(function(a){a.className="i";return!a.getAttribute("className")});c.getElementsByTagName=ib(function(a){a.appendChild(e.createComment(""));return!a.getElementsByTagName("*").length});c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){a.innerHTML="<div class='a'></div><div class='a i'></div>";a.firstChild.className="i";return a.getElementsByClassName("i").length===2});c.getById=ib(function(a){o.appendChild(a).id=u;return!e.getElementsByName||!e.getElementsByName(u).length});if(c.getById){d.find["ID"]=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}};d.filter["ID"]=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}}else{delete d.find["ID"];d.filter["ID"]=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}}d.find["TAG"]=c.getElementsByTagName?function(a,b){if(typeof b.getElementsByTagName!==C){return b.getElementsByTagName(a)}}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if(a==="*"){while(c=f[e++]){if(c.nodeType===1){d.push(c)}}return d}return f};d.find["CLASS"]=c.getElementsByClassName&&function(a,b){if(typeof b.getElementsByClassName!==C&&p){return b.getElementsByClassName(a)}};r=[];q=[];if(c.qsa=$.test(e.querySelectorAll)){ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>";if(a.querySelectorAll("[msallowclip^='']").length){q.push("[*^$]="+M+"*(?:''|\"\")")}if(!a.querySelectorAll("[selected]").length){q.push("\\["+M+"*(?:val
}if(X.test(q+n.event.triggered)){return}if(q.indexOf(".")>=0){r=q.split(".");q=r.shift();r.sort()}k=q.indexOf(":")<0&&"on"+q;b=b[n.expando]?b:new n.Event(q,typeof b==="object"&&b);b.isTrigger=e?2:3;b.namespace=r.join(".");b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;b.result=undefined;if(!b.target){b.target=d}c=c==null?[b]:n.makeArray(c,[b]);o=n.event.special[q]||{};if(!e&&o.trigger&&o.trigger.apply(d,c)===false){return}if(!e&&!o.noBubble&&!n.isWindow(d)){i=o.delegateType||q;if(!X.test(i+q)){g=g.parentNode}for(;g;g=g.parentNode){p.push(g);h=g}if(h===(d.ownerDocument||l)){p.push(h.defaultView||h.parentWindow||a)}}f=0;while((g=p[f++])&&!b.isPropagationStopped()){b.type=f>1?i:o.bindType||q;m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle");if(m){m.apply(g,c)}m=k&&g[k];if(m&&m.apply&&n.acceptData(g)){b.result=m.apply(g,c);if(b.result===false){b.preventDefault()}}}b.type=q;if(!e&&!b.isDefaultPrevented()){if((!o._default||o._default.apply(p.pop(),c)===false)&&n.acceptData(d)){if(k&&n.isFunction(d[q])&&!n.isWindow(d)){h=d[k];if(h){d[k]=null}n.event.triggered=q;d[q]();n.event.triggered=undefined;if(h){d[k]=h}}}}return b.result},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};i[0]=a;a.delegateTarget=this;if(k.preDispatch&&k.preDispatch.call(this,a)===false){return}h=n.event.handlers.call(this,a,j);b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem;c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped()){if(!a.namespace_re||a.namespace_re.test(g.namespace)){a.handleObj=g;a.data=g.data;e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i);if(e!==undefined){if((a.result=e)===false){a.preventDefault();a.stopPropagation()}}}}}if(k.postDispatch){k.postDispatch.call(this,a)}return a.result},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||a.type!=="click")){for(;i!==this;i=i.parentNode||this){if(i.disabled!==true||a.type!=="click"){d=[];for(c=0;c<h;c++){f=b[c];e=f.selector+" ";if(d[e]===undefined){d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length}if(d[e]){d.push(f)}}if(d.length){g.push({elem:i,handlers:d})}}}}if(h<b.length){g.push({elem:this,handlers:b.slice(h)})}return g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){if(a.which==null){a.which=b.charCode!=null?b.charCode:b.keyCode}return a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;if(a.pageX==null&&b.clientX!=null){c=a.target.ownerDocument||l;d=c.documentElement;e=c.body;a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0);a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)}if(!a.which&&f!==undefined){a.which=f&1?1:f&2?3:f&4?2:0}return a}},fix:function(a){if(a[n.expando]){return a}var b,c,d,e=a.type,f=a,g=this.fixHooks[e];if(!g){this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}}d=g.props?this.props.concat(g.props):this.props;a=new n.Event(f);b=d.length;while(b--){c=d[b];a[c]=f[c]}if(!a.target){a.target=l}if(a.target.nodeType===3){a.target=a.target.parentNode}return g.filter?g.filter(a,f):a},special:{load:{noBubble:true},focus:{trigger:function(){if(this!==_()&&this.focus){this.focus();return false}},delegateType:"focusin"},blur:{trigger:function(){if(this===_()&&this.blur){this.blur();return false}},delegateType:"focusout"},click:{trigger:function(){if(this.type==="checkbox"&&this.click&&n.nodeName(this,"input")){this.click();return false}},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){if(a.result!==undefined&&a.originalEvent){a.originalEvent.returnValue=a.result}}}},simulate:function(a
}return}d=n.isFunction(a);return this.each(function(c){var e;if(this.nodeType!==1){return}if(d){e=a.call(this,c,n(this).val())}else{e=a}if(e==null){e=""}else if(typeof e==="number"){e+=""}else if(n.isArray(e)){e=n.map(e,function(a){return a==null?"":a+""})}b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()];if(!b||!("set"in b)||b.set(this,e,"value")===undefined){this.value=e}})}});n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return b!=null?b:n.trim(n.text(a))}},select:{get:function(a){var b,c,d=a.options,e=a.selectedIndex,f=a.type==="select-one"||e<0,g=f?null:[],h=f?e+1:d.length,i=e<0?h:f?e:0;for(;i<h;i++){c=d[i];if((c.selected||i===e)&&(k.optDisabled?!c.disabled:c.getAttribute("disabled")===null)&&(!c.parentNode.disabled||!n.nodeName(c.parentNode,"optgroup"))){b=n(c).val();if(f){return b}g.push(b)}}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--){d=e[g];if(d.selected=n.inArray(d.value,f)>=0){c=true}}if(!c){a.selectedIndex=-1}return f}}}});n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){if(n.isArray(b)){return a.checked=n.inArray(n(a).val(),b)>=0}}};if(!k.checkOn){n.valHooks[this].get=function(a){return a.getAttribute("value")===null?"on":a.value}}});n.each(("blur focus focusin focusout load resize scroll unload click dblclick "+"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+"change select submit keydown keypress keyup error contextmenu").split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}});n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length===1?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now();var dc=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")};n.parseXML=function(a){var b,c;if(!a||typeof a!=="string"){return null}try{c=new DOMParser;b=c.parseFromString(a,"text/xml")}catch(d){b=undefined}if(!b||b.getElementsByTagName("parsererror").length){n.error("Invalid XML: "+a)}return b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \t]*([^\r\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\/\//,mc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=l.createElement("a");fc.href="";fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){if(typeof b!=="string"){c=b;b="*"}var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c)){while(d=f[e++]){if(d[0]==="+"){d=d.slice(1)||"*";(a[d]=a[d]||[]).unshift(c)}else{(a[d]=a[d]||[]).push(c)}}}}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;e[h]=true;n.each(a[h]||[],function(a,h){var j=h(b,c,d);if(typeof j==="string"&&!f&&!e[j]){b.dataTypes.unshift(j);g(j);return false}else if(f){return!(i=j)}});return i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b){if(b[c]!==undefined){(e[c]?a:d||(d={}))[c]=b[c]}}if(d){n.extend(true,a,d)}return a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while(i[0]==="*"){i.shift();if(d===undefined){d=a.mimeType||b.getResponseHeader("Content-Type")}}if(d){for(e in h){if(h[e]&&h[e].test(d)){i.unshift(e);break}}}if(i[0]in c){f=i[0]}else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}if(!g){g=e}}f=f||g}if(f){if(f!==i[0]){i.unshift(f)}return c[f]}}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1]){for(g in a.converters){j[g.toLowerCase()]=a.converters[g]}}f=k.shift();while(f){if(a.responseFields[f]){c[a.responseFields[f]]=b}if(!i&&d&&a.dataFilter){b=a.dataFilter(b,a.dataType)}i=f;f=k.shift();if(f){if(f==="*"){f=i}else if(i!=="*"&&i!==f){g=j[i+" "+f]||j["* "+f];if(!g){for(e in j){h=e.split(" ");if(h[1]===f){g=j[i+" "+h[0]]||j["* "+h[0]];if(g){if(g===true){g=j[e]}else if(j[e]!==true
};n.prototype.destroy=function(){for(var a=0;a<this.subs.length;a++){this.subs[a].destroy()}this.io.destroy(this)};n.prototype.close=n.prototype.disconnect=function(){if(!this.connected)return this;i("performing disconnect (%s)",this.nsp);this.packet({type:d.DISCONNECT});this.destroy();this.onclose("io client disconnect");return this}},{"./on":4,"component-bind":7,"component-emitter":8,debug:9,"has-binary-data":32,indexof:36,"socket.io-parser":40,"to-array":43}],6:[function(a,b,c){var d=typeof self!=="undefined"?self:typeof window!=="undefined"?window:{};var e=a("parseuri");var f=a("debug")("socket.io-client:url");b.exports=g;function g(a,b){var c=a;var b=b||d.location;if(null==a)a=b.protocol+"//"+b.hostname;if("string"==typeof a){if("/"==a.charAt(0)){if("undefined"!=typeof b){a=b.hostname+a}}if(!/^(https?|wss?):\/\//.test(a)){f("protocol-less url %s",a);if("undefined"!=typeof b){a=b.protocol+"//"+a}else{a="https://"+a}}f("parse %s",a);c=e(a)}if(!c.port){if(/^(http|ws)$/.test(c.protocol)){c.port="80"}else if(/^(http|ws)s$/.test(c.protocol)){c.port="443"}}c.path=c.path||"/";c.id=c.protocol+"://"+c.host+":"+c.port;c.href=c.protocol+"://"+c.host+(b&&b.port==c.port?"":":"+c.port);return c}},{debug:9,parseuri:38}],7:[function(a,b,c){var d=[].slice;b.exports=function(a,b){if("string"==typeof b)b=a[b];if("function"!=typeof b)throw new Error("bind() requires a function");var c=d.call(arguments,2);return function(){return b.apply(a,c.concat(d.call(arguments)))}}},{}],8:[function(a,b,c){b.exports=d;function d(a){if(a)return e(a)}function e(a){for(var b in d.prototype){a[b]=d.prototype[b]}return a}d.prototype.on=d.prototype.addEventListener=function(a,b){this._callbacks=this._callbacks||{};(this._callbacks[a]=this._callbacks[a]||[]).push(b);return this};d.prototype.once=function(a,b){var c=this;this._callbacks=this._callbacks||{};function d(){c.off(a,d);b.apply(this,arguments)}d.fn=b;this.on(a,d);return this};d.prototype.off=d.prototype.removeListener=d.prototype.removeAllListeners=d.prototype.removeEventListener=function(a,b){this._callbacks=this._callbacks||{};if(0==arguments.length){this._callbacks={};return this}var c=this._callbacks[a];if(!c)return this;if(1==arguments.length){delete this._callbacks[a];return this}var d;for(var e=0;e<c.length;e++){d=c[e];if(d===b||d.fn===b){c.splice(e,1);break}}return this};d.prototype.emit=function(a){this._callbacks=this._callbacks||{};var b=[].slice.call(arguments,1),c=this._callbacks[a];if(c){c=c.slice(0);for(var d=0,e=c.length;d<e;++d){c[d].apply(this,b)}}return this};d.prototype.listeners=function(a){this._callbacks=this._callbacks||{};return this._callbacks[a]||[]};d.prototype.hasListeners=function(a){return!!this.listeners(a).length}},{}],9:[function(a,b,c){b.exports=d;function d(a){if(!d.enabled(a))return function(){};return function(b){b=e(b);var c=new Date;var f=c-(d[a]||c);d[a]=c;b=a+" "+b+" +"+d.humanize(f);window.console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}}d.names=[];d.skips=[];d.enable=function(a){try{localStorage.debug=a}catch(b){}var c=(a||"").split(/[\s,]+/),e=c.length;for(var f=0;f<e;f++){a=c[f].replace("*",".*?");if(a[0]==="-"){d.skips.push(new RegExp("^"+a.substr(1)+"$"))}else{d.names.push(new RegExp("^"+a+"$"))}}};d.disable=function(){d.enable("")};d.humanize=function(a){var b=1e3,c=60*1e3,d=60*c;if(a>=d)return(a/d).toFixed(1)+"h";if(a>=c)return(a/c).toFixed(1)+"m";if(a>=b)return(a/b|0)+"s";return a+"ms"};d.enabled=function(a){for(var b=0,c=d.skips.length;b<c;b++){if(d.skips[b].test(a)){return false}}for(var b=0,c=d.names.length;b<c;b++){if(d.names[b].test(a)){return true}}return false};function e(a){if(a instanceof Error)return a.stack||a.message;return a}try{if(window.localStorage)d.enable(localStorage.debug)}catch(f){}},{}],10:[function(a,b,c){var d=a("indexof");b.exports=e;function e(a){if(a)return f(a)}function f(a){for(var b in e.prototype){a[b]=e.prototype[b]}return a}e.prototype.on=function(a,b){this._callbacks=this._callbacks||{};(this._callbacks[a]=this._callbacks[a]||[]).push(b);return this};e.prototype.once=function(a,b
function h(a,b){b=b||{};var c=new e;for(var d=0;d<a.length;d++){c.append(a[d])}return b.type?c.getBlob(b.type):c.getBlob()}b.exports=function(){if(f){return d.Blob}else if(g){return h}else{return undefined}}()},{}],28:[function(b,c,d){var e=typeof self!=="undefined"?self:typeof window!=="undefined"?window:{};(function(b){var f=typeof d=="object"&&d;var g=typeof c=="object"&&c&&c.exports==f&&c;var h=typeof e=="object"&&e;if(h.global===h||h.window===h){b=h}var i=String.fromCharCode;function j(a){var b=[];var c=0;var d=a.length;var e;var f;while(c<d){e=a.charCodeAt(c++);if(e>=55296&&e<=56319&&c<d){f=a.charCodeAt(c++);if((f&64512)==56320){b.push(((e&1023)<<10)+(f&1023)+65536)}else{b.push(e);c--}}else{b.push(e)}}return b}function k(a){var b=a.length;var c=-1;var d;var e="";while(++c<b){d=a[c];if(d>65535){d-=65536;e+=i(d>>>10&1023|55296);d=56320|d&1023}e+=i(d)}return e}function l(a,b){return i(a>>b&63|128)}function m(a){if((a&4294967168)==0){return i(a)}var b="";if((a&4294965248)==0){b=i(a>>6&31|192)}else if((a&4294901760)==0){b=i(a>>12&15|224);b+=l(a,6)}else if((a&4292870144)==0){b=i(a>>18&7|240);b+=l(a,12);b+=l(a,6)}b+=i(a&63|128);return b}function n(a){var b=j(a);var c=b.length;var d=-1;var e;var f="";while(++d<c){e=b[d];f+=m(e)}return f}function o(){if(s>=r){throw Error("Invalid byte index")}var a=q[s]&255;s++;if((a&192)==128){return a&63}throw Error("Invalid continuation byte")}function p(){var a;var b;var c;var d;var e;if(s>r){throw Error("Invalid byte index")}if(s==r){return false}a=q[s]&255;s++;if((a&128)==0){return a}if((a&224)==192){var b=o();e=(a&31)<<6|b;if(e>=128){return e}else{throw Error("Invalid continuation byte")}}if((a&240)==224){b=o();c=o();e=(a&15)<<12|b<<6|c;if(e>=2048){return e}else{throw Error("Invalid continuation byte")}}if((a&248)==240){b=o();c=o();d=o();e=(a&15)<<18|b<<12|c<<6|d;if(e>=65536&&e<=1114111){return e}}throw Error("Invalid UTF-8 detected")}var q;var r;var s;function t(a){q=j(a);r=q.length;s=0;var b=[];var c;while((c=p())!==false){b.push(c)}return k(b)}var u={version:"2.0.0",encode:n,decode:t};if(typeof a=="function"&&typeof a.amd=="object"&&a.amd){a(function(){return u})}else if(f&&!f.nodeType){if(g){g.exports=u}else{var v={};var w=v.hasOwnProperty;for(var x in u){w.call(u,x)&&(f[x]=u[x])}}}else{b.utf8=u}})(this)},{}],29:[function(a,b,c){var d=typeof self!=="undefined"?self:typeof window!=="undefined"?window:{};var e=/^[\],:{}\s]*$/;var f=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g;var g=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g;var h=/(?:^|:|,)(?:\s*\[)+/g;var i=/^\s+/;var j=/\s+$/;b.exports=function k(a){if("string"!=typeof a||!a){return null}a=a.replace(i,"").replace(j,"");if(d.JSON&&JSON.parse){return JSON.parse(a)}if(e.test(a.replace(f,"@").replace(g,"]").replace(h,""))){return new Function("return "+a)()}}},{}],30:[function(a,b,c){c.encode=function(a){var b="";for(var c in a){if(a.hasOwnProperty(c)){if(b.length)b+="&";b+=encodeURIComponent(c)+"="+encodeURIComponent(a[c])}}return b};c.decode=function(a){var b={};var c=a.split("&");for(var d=0,e=c.length;d<e;d++){var f=c[d].split("=");b[decodeURIComponent(f[0])]=decodeURIComponent(f[1])}return b}},{}],31:[function(a,b,c){var d=function(){return this}();var e=d.WebSocket||d.MozWebSocket;b.exports=e?f:null;function f(a,b,c){var d;if(b){d=new e(a,b)}else{d=new e(a)}return d}if(e)f.prototype=e.prototype},{}],32:[function(a,b,c){var d=typeof self!=="undefined"?self:typeof window!=="undefined"?window:{};var e=a("isarray");b.exports=f;function f(a){function b(a){if(!a)return false;if(d.Buffer&&Buffer.isBuffer(a)||d.ArrayBuffer&&a instanceof ArrayBuffer||d.Blob&&a instanceof Blob||d.File&&a instanceof File){return true}if(e(a)){for(var c=0;c<a.length;c++){if(b(a[c])){return true}}}else if(a&&"object"==typeof a){if(a.toJSON){a=a.toJSON()}for(var f in a){if(b(a[f])){return true}}}return false}return b(a)}},{isarray:33}],33:[function(a,b,c){b.exports=Array.isArray||function(a){return Object.prototype.toString.call(a)=="[object Array]"}},{}],34:[function(a,b,c){var d=a("global");try{b.exports="XMLHttpRequest"in d&&"withCredent
}if(a){a+="";if(a.charAt(0)===":"){a=a.substring(1)}if(a.match(/[^0-9]/)){throw new TypeError('Port "'+a+'" contains characters other than [0-9]')}}}return u.call(this,a,b)};g.hostname=function(a,b){if(this._parts.urn){return a===undefined?"":this}if(a!==undefined){var c={};f.parseHost(a,c);a=c.hostname}return v.call(this,a,b)};g.host=function(a,b){if(this._parts.urn){return a===undefined?"":this}if(a===undefined){return this._parts.hostname?f.buildHost(this._parts):""}else{f.parseHost(a,this._parts);this.build(!b);return this}};g.authority=function(a,b){if(this._parts.urn){return a===undefined?"":this}if(a===undefined){return this._parts.hostname?f.buildAuthority(this._parts):""}else{f.parseAuthority(a,this._parts);this.build(!b);return this}};g.userinfo=function(a,b){if(this._parts.urn){return a===undefined?"":this}if(a===undefined){if(!this._parts.username){return""}var c=f.buildUserinfo(this._parts);return c.substring(0,c.length-1)}else{if(a[a.length-1]!=="@"){a+="@"}f.parseUserinfo(a,this._parts);this.build(!b);return this}};g.resource=function(a,b){var c;if(a===undefined){return this.path()+this.search()+this.hash()}c=f.parse(a);this._parts.path=c.path;this._parts.query=c.query;this._parts.fragment=c.fragment;this.build(!b);return this};g.subdomain=function(a,b){if(this._parts.urn){return a===undefined?"":this}if(a===undefined){if(!this._parts.hostname||this.is("IP")){return""}var c=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,c)||""}else{var d=this._parts.hostname.length-this.domain().length;var e=this._parts.hostname.substring(0,d);var g=new RegExp("^"+i(e));if(a&&a.charAt(a.length-1)!=="."){a+="."}if(a){f.ensureValidHostname(a)}this._parts.hostname=this._parts.hostname.replace(g,a);this.build(!b);return this}};g.domain=function(a,b){if(this._parts.urn){return a===undefined?"":this}if(typeof a==="boolean"){b=a;a=undefined}if(a===undefined){if(!this._parts.hostname||this.is("IP")){return""}var c=this._parts.hostname.match(/\./g);if(c&&c.length<2){return this._parts.hostname}var d=this._parts.hostname.length-this.tld(b).length-1;d=this._parts.hostname.lastIndexOf(".",d-1)+1;return this._parts.hostname.substring(d)||""}else{if(!a){throw new TypeError("cannot set domain empty")}f.ensureValidHostname(a);if(!this._parts.hostname||this.is("IP")){this._parts.hostname=a}else{var e=new RegExp(i(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(e,a)}this.build(!b);return this}};g.tld=function(a,b){if(this._parts.urn){return a===undefined?"":this}if(typeof a==="boolean"){b=a;a=undefined}if(a===undefined){if(!this._parts.hostname||this.is("IP")){return""}var d=this._parts.hostname.lastIndexOf(".");var e=this._parts.hostname.substring(d+1);if(b!==true&&c&&c.list[e.toLowerCase()]){return c.get(this._parts.hostname)||e}return e}else{var f;if(!a){throw new TypeError("cannot set TLD empty")}else if(a.match(/[^a-zA-Z0-9-]/)){if(c&&c.is(a)){f=new RegExp(i(this.tld())+"$");this._parts.hostname=this._parts.hostname.replace(f,a)}else{throw new TypeError('TLD "'+a+'" contains characters other than [A-Z0-9]')}}else if(!this._parts.hostname||this.is("IP")){throw new ReferenceError("cannot set TLD on non-domain host")}else{f=new RegExp(i(this.tld())+"$");this._parts.hostname=this._parts.hostname.replace(f,a)}this.build(!b);return this}};g.directory=function(a,b){if(this._parts.urn){return a===undefined?"":this}if(a===undefined||a===true){if(!this._parts.path&&!this._parts.hostname){return""}if(this._parts.path==="/"){return"/"}var c=this._parts.path.length-this.filename().length-1;var d=this._parts.path.substring(0,c)||(this._parts.hostname?"/":"");return a?f.decodePath(d):d}else{var e=this._parts.path.length-this.filename().length;var g=this._parts.path.substring(0,e);var h=new RegExp("^"+i(g));if(!this.is("relative")){if(!a){a="/"}if(a.charAt(0)!=="/"){a="/"+a}}if(a&&a.charAt(a.length-1)!=="/"){a+="/"}a=f.recodePath(a);this._parts.path=this._parts.path.replace(h,a);this.build(!b);return this}};g.filename=function(a,b){if(this._parts.urn){return a===undefined?"":this}if(a=