From 0e7d3b93cde7868a1d65c33fd6d769d66b753df5 Mon Sep 17 00:00:00 2001 From: Mattias Erming Date: Mon, 15 Sep 2014 09:46:46 -0700 Subject: [PATCH] Prevent link exploit --- client/js/libs.min.js | 2 +- client/js/libs/handlebars/uri.js | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/client/js/libs.min.js b/client/js/libs.min.js index a82a558..4e38a20 100644 --- a/client/js/libs.min.js +++ b/client/js/libs.min.js @@ -1,4 +1,4 @@ -(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;l0?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 queue."}r.start()}else{r.reset()}}catch(d){throw"Error setting badge. Message: "+d.message}};if(j){m()}};var v=function(a){m=function(){try{var b=a.width;var c=a.height;var d=document.createElement("img");var i=b/f=0;c--){if(/icon/i.test(a[c].getAttribute("rel"))){return a[c]}}return false};if(c.elementId){a=document.getElementById(c.elementId);a.setAttribute("href",a.getAttribute("src"))}else{a=d();if(a===false){a=document.createElement("link");a.setAttribute("rel","icon");document.getElementsByTagName("head")[0].appendChild(a)}}b=c.elementId?a.src:a.href;if(b.indexOf(document.location.hostname)===-1){throw new Error("Error setting favicon. Favicon image is on different domain (Icon: "+b+", Domain: "+document.location.hostname+")")}a.setAttribute("type","image/png");return a};z.setIcon=function(a){var b=a.toDataURL("image/png");if(c.elementId){document.getElementById(c.elementId).setAttribute("src",b)}else{if(o.ff||o.opera){var e=d;d=document.createElement("link");if(o.opera){d.setAttribute("rel","icon")}d.setAttribute("rel","icon");d.setAttribute("type","image/png");document.getElementsByTagName("head")[0].appendChild(d);d.setAttribute("href",b);if(e.parentNode){e.parentNode.removeChild(e)}}else{d.setAttribute("href",b)}}};function A(a){var b=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;a=a.replace(b,function(a,b,c,d){return b+b+c+c+d+d});var c=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);return c?{r:parseInt(c[1],16),g:parseInt(c[2],16),b:parseInt(c[3],16)}:false}function B(a,b){var c={};var d;for(d in a){c[d]=a[d]}for(d in b){c[d]=b[d]}return c}function C(){return document.hidden||document.msHidden||document.webkitHidden||document.mozHidden}var D={};D.duration=40;D.types={};D.types.fade=[{x:.4,y:.4,w:.6,h:.6,o:0},{x:.4,y:.4,w:.6,h:.6,o:.1},{x:.4,y:.4,w:.6,h:.6,o:.2},{x:.4,y:.4,w:.6,h:.6,o:.3},{x:.4,y:.4,w:.6,h:.6,o:.4},{x:.4,y:.4,w:.6,h:.6,o:.5},{x:.4,y:.4,w:.6,h:.6,o:.6},{x:.4,y:.4,w:.6,h:.6,o:.7},{x:.4,y:.4,w:.6,h:.6,o:.8},{x:.4,y:.4,w:.6,h:.6,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}];D.types.none=[{x:.4,y:.4,w:.6,h:.6,o:1}];D.types.pop=[{x:1,y:1,w:0,h:0,o:1},{x:.9,y:.9,w:.1,h:.1,o:1},{x:.8,y:.8,w:.2,h:.2,o:1},{x:.7,y:.7,w:.3,h:.3,o:1},{x:.6,y:.6,w:.4,h:.4,o:1},{x:.5,y:.5,w:.5,h:.5,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}];D.types.popFade=[{x:.75,y:.75,w:0,h:0,o:0},{x:.65,y:.65,w:.1,h:.1,o:.2},{x:.6,y:.6,w:.2,h:.2,o:.4},{x:.55,y:.55,w:.3,h:.3,o:.6},{x:.5,y:.5,w:.4,h:.4,o:.8},{x:.45,y:.45,w:.5,h:.5,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}];D.types.slide=[{x:.4,y:1,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.8,w:.6,h:.6,o:1},{x:.4,y:.7,w:.6,h:.6,o:1},{x:.4,y:.6,w:.6,h:.6,o:1},{x:.4,y:.5,w:.6,h:.6,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}];D.run=function(a,b,d,e){var f=D.types[C()?"none":c.animation];if(d===true){e=typeof e!=="undefined"?e:f.length-1}else{e=typeof e!=="undefined"?e:0}b=b?b:function(){};if(e=0){s[c.type](B(a,f[e]));setTimeout(function(){if(d){e=e-1}else{e=e+1}D.run(a,b,d,e)},D.duration);z.setIcon(g)}else{b();return}};q();return{badge:u,video:w,image:v,webcam:x,reset:r.reset}};if(typeof define!=="undefined"&&define.amd){define([],function(){return a})}else if(typeof module!=="undefined"&&module.exports){module.exports=a}else{this.Favico=a}})();(function(a,b){if(typeof define==="function"&&define.amd){define([],b)}else if(typeof exports==="object"){module.exports=b()}else{a.Handlebars=a.Handlebars||b()}})(this,function(){var a=function(){"use strict";var a;function b(a){this.string=a}b.prototype.toString=function(){return""+this.string};a=b;return a}();var b=function(a){"use strict";var b={};var c=a;var d={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"};var e=/[&<>"'`]/g;var f=/[&<>"'`]/;function g(a){return d[a]}function h(a){for(var b=1;b= 2.0.0-beta.1"};c.REVISION_CHANGES=h;var i=d.isArray,j=d.isFunction,k=d.toString,l="[object Object]";function m(a,b){this.helpers=a||{};this.partials=b||{};n(this)}c.HandlebarsEnvironment=m;m.prototype={constructor:m,logger:o,log:p,registerHelper:function(a,b){if(k.call(a)===l){if(b){throw new e("Arg not supported with multiple helpers")}d.extend(this.helpers,a)}else{this.helpers[a]=b}},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){if(k.call(a)===l){d.extend(this.partials,a)}else{this.partials[a]=b}},unregisterPartial:function(a){delete this.partials[a]}};function n(a){a.registerHelper("helperMissing",function(){if(arguments.length===1){return undefined}else{throw new e("Missing helper: '"+arguments[arguments.length-1].name+"'")}});a.registerHelper("blockHelperMissing",function(b,c){var e=c.inverse,f=c.fn;if(b===true){return f(this)}else if(b===false||b==null){return e(this)}else if(i(b)){if(b.length>0){if(c.ids){c.ids=[c.name]}return a.helpers.each(b,c)}else{return e(this)}}else{if(c.data&&c.ids){var g=q(c.data);g.contextPath=d.appendContextPath(c.data.contextPath,c.name);c={data:g}}return f(b,c)}});a.registerHelper("each",function(a,b){if(!b){throw new e("Must pass iterator to #each")}var c=b.fn,f=b.inverse;var g=0,h="",k;var l;if(b.data&&b.ids){l=d.appendContextPath(b.data.contextPath,b.ids[0])+"."}if(j(a)){a=a.call(this)}if(b.data){k=q(b.data)}if(a&&typeof a==="object"){if(i(a)){for(var m=a.length;g":">"};return a.replace(/[<>]/g,function(a){return b[a]})}Handlebars.registerHelper("uri",function(a){var b=[];a=URI.withinString(a,function(a){b.push(a);return"$("+(b.length-1)+")"});a=escape(a);for(var c in b){var d=escape(b[c]);a=a.replace("$("+c+")",""+d+"")}return a});Handlebars.registerHelper("users",function(a){return a+" "+(a==1?"user":"users")});(function(a,b){if(typeof module==="object"&&typeof module.exports==="object"){module.exports=a.document?b(a,true):function(a){if(!a.document){throw new Error("jQuery requires a window with a document")}return b(a)}}else{b(a)}})(typeof window!=="undefined"?window:this,function(a,b){var c=[];var d=c.slice;var e=c.concat;var f=c.push;var g=c.indexOf;var h={};var i=h.toString;var j=h.hasOwnProperty;var k={};var l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return a!=null?a<0?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);b.prevObject=this;b.context=this.context;return b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c=0},isPlainObject:function(a){if(n.type(a)!=="object"||a.nodeType||n.isWindow(a)){return false}if(a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")){return false}return true},isEmptyObject:function(a){var b;for(b in a){return false}return true},type:function(a){if(a==null){return a+""}return typeof a==="object"||typeof a==="function"?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a);if(a){if(a.indexOf("use strict")===1){b=l.createElement("script");b.text=a;l.head.appendChild(b).parentNode.removeChild(b)}else{c(a)}}},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;e0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){if(a===b){l=true}return 0},C=typeof undefined,D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){var b=0,c=this.length;for(;b+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,d&1023|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes);F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;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="
";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="";if(a.querySelectorAll("[msallowclip^='']").length){q.push("[*^$]="+M+"*(?:''|\"\")")}if(!a.querySelectorAll("[selected]").length){q.push("\\["+M+"*(?:value|"+L+")")}if(!a.querySelectorAll(":checked").length){q.push(":checked")}});ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden");a.appendChild(b).setAttribute("name","D");if(a.querySelectorAll("[name=d]").length){q.push("name"+M+"*[*^$|!~]?=")}if(!a.querySelectorAll(":enabled").length){q.push(":enabled",":disabled")}a.querySelectorAll("*,:x");q.push(",.*:")})}if(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector)){ib(function(a){c.disconnectedMatch=s.call(a,"div");s.call(a,"[s!='']:x");r.push("!=",Q)})}q=q.length&&new RegExp(q.join("|"));r=r.length&&new RegExp(r.join("|"));b=$.test(o.compareDocumentPosition);t=b||$.test(o.contains)?function(a,b){var c=a.nodeType===9?a.documentElement:a,d=b&&b.parentNode;return a===d||!!(d&&d.nodeType===1&&(c.contains?c.contains(d):a.compareDocumentPosition&&a.compareDocumentPosition(d)&16))}:function(a,b){if(b){while(b=b.parentNode){if(b===a){return true}}}return false};B=b?function(a,b){if(a===b){l=true;return 0}var d=!a.compareDocumentPosition-!b.compareDocumentPosition;if(d){return d}d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1;if(d&1||!c.sortDetached&&b.compareDocumentPosition(a)===d){if(a===e||a.ownerDocument===v&&t(v,a)){return-1}if(b===e||b.ownerDocument===v&&t(v,b)){return 1}return k?K.call(k,a)-K.call(k,b):0}return d&4?-1:1}:function(a,b){if(a===b){l=true;return 0}var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g){return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0}else if(f===g){return kb(a,b)}c=a;while(c=c.parentNode){h.unshift(c)}c=b;while(c=c.parentNode){i.unshift(c)}while(h[d]===i[d]){d++}return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0};return e};fb.matches=function(a,b){return fb(a,null,null,b)};fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n){m(a)}b=b.replace(U,"='$1']");if(c.matchesSelector&&p&&(!r||!r.test(b))&&(!q||!q.test(b))){try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&a.document.nodeType!==11){return d}}catch(e){}}return fb(b,n,null,[a]).length>0};fb.contains=function(a,b){if((a.ownerDocument||a)!==n){m(a)}return t(a,b)};fb.attr=function(a,b){if((a.ownerDocument||a)!==n){m(a)}var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):undefined;return f!==undefined?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null};fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};fb.uniqueSort=function(a){var b,d=[],e=0,f=0;l=!c.detectDuplicates;k=!c.sortStable&&a.slice(0);a.sort(B);if(l){while(b=a[f++]){if(b===a[f]){e=d.push(f)}}while(e--){a.splice(d[e],1)}}k=null;return a};e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(!f){while(b=a[d++]){c+=e(b)}}else if(f===1||f===9||f===11){if(typeof a.textContent==="string"){return a.textContent}else{for(a=a.firstChild;a;a=a.nextSibling){c+=e(a)}}}else if(f===3||f===4){return a.nodeValue}return c};d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){a[1]=a[1].replace(cb,db);a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db);if(a[2]==="~="){a[3]=" "+a[3]+" "}return a.slice(0,4)},CHILD:function(a){a[1]=a[1].toLowerCase();if(a[1].slice(0,3)==="nth"){if(!a[3]){fb.error(a[0])}a[4]=+(a[4]?a[5]+(a[6]||1):2*(a[3]==="even"||a[3]==="odd"));a[5]=+(a[7]+a[8]||a[3]==="odd")}else if(a[3]){fb.error(a[0])}return a},PSEUDO:function(a){var b,c=!a[6]&&a[2];if(X["CHILD"].test(a[0])){return null}if(a[3]){a[2]=a[4]||a[5]||""}else if(c&&V.test(c)&&(b=g(c,true))&&(b=c.indexOf(")",c.length-b)-c.length)){a[0]=a[0].slice(0,b);a[2]=c.slice(0,b)}return a.slice(0,3)}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return a==="*"?function(){return true}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test(typeof a.className==="string"&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"") +(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;l0?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 queue."}r.start()}else{r.reset()}}catch(d){throw"Error setting badge. Message: "+d.message}};if(j){m()}};var v=function(a){m=function(){try{var b=a.width;var c=a.height;var d=document.createElement("img");var i=b/f=0;c--){if(/icon/i.test(a[c].getAttribute("rel"))){return a[c]}}return false};if(c.elementId){a=document.getElementById(c.elementId);a.setAttribute("href",a.getAttribute("src"))}else{a=d();if(a===false){a=document.createElement("link");a.setAttribute("rel","icon");document.getElementsByTagName("head")[0].appendChild(a)}}b=c.elementId?a.src:a.href;if(b.indexOf(document.location.hostname)===-1){throw new Error("Error setting favicon. Favicon image is on different domain (Icon: "+b+", Domain: "+document.location.hostname+")")}a.setAttribute("type","image/png");return a};z.setIcon=function(a){var b=a.toDataURL("image/png");if(c.elementId){document.getElementById(c.elementId).setAttribute("src",b)}else{if(o.ff||o.opera){var e=d;d=document.createElement("link");if(o.opera){d.setAttribute("rel","icon")}d.setAttribute("rel","icon");d.setAttribute("type","image/png");document.getElementsByTagName("head")[0].appendChild(d);d.setAttribute("href",b);if(e.parentNode){e.parentNode.removeChild(e)}}else{d.setAttribute("href",b)}}};function A(a){var b=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;a=a.replace(b,function(a,b,c,d){return b+b+c+c+d+d});var c=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);return c?{r:parseInt(c[1],16),g:parseInt(c[2],16),b:parseInt(c[3],16)}:false}function B(a,b){var c={};var d;for(d in a){c[d]=a[d]}for(d in b){c[d]=b[d]}return c}function C(){return document.hidden||document.msHidden||document.webkitHidden||document.mozHidden}var D={};D.duration=40;D.types={};D.types.fade=[{x:.4,y:.4,w:.6,h:.6,o:0},{x:.4,y:.4,w:.6,h:.6,o:.1},{x:.4,y:.4,w:.6,h:.6,o:.2},{x:.4,y:.4,w:.6,h:.6,o:.3},{x:.4,y:.4,w:.6,h:.6,o:.4},{x:.4,y:.4,w:.6,h:.6,o:.5},{x:.4,y:.4,w:.6,h:.6,o:.6},{x:.4,y:.4,w:.6,h:.6,o:.7},{x:.4,y:.4,w:.6,h:.6,o:.8},{x:.4,y:.4,w:.6,h:.6,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}];D.types.none=[{x:.4,y:.4,w:.6,h:.6,o:1}];D.types.pop=[{x:1,y:1,w:0,h:0,o:1},{x:.9,y:.9,w:.1,h:.1,o:1},{x:.8,y:.8,w:.2,h:.2,o:1},{x:.7,y:.7,w:.3,h:.3,o:1},{x:.6,y:.6,w:.4,h:.4,o:1},{x:.5,y:.5,w:.5,h:.5,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}];D.types.popFade=[{x:.75,y:.75,w:0,h:0,o:0},{x:.65,y:.65,w:.1,h:.1,o:.2},{x:.6,y:.6,w:.2,h:.2,o:.4},{x:.55,y:.55,w:.3,h:.3,o:.6},{x:.5,y:.5,w:.4,h:.4,o:.8},{x:.45,y:.45,w:.5,h:.5,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}];D.types.slide=[{x:.4,y:1,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.8,w:.6,h:.6,o:1},{x:.4,y:.7,w:.6,h:.6,o:1},{x:.4,y:.6,w:.6,h:.6,o:1},{x:.4,y:.5,w:.6,h:.6,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}];D.run=function(a,b,d,e){var f=D.types[C()?"none":c.animation];if(d===true){e=typeof e!=="undefined"?e:f.length-1}else{e=typeof e!=="undefined"?e:0}b=b?b:function(){};if(e=0){s[c.type](B(a,f[e]));setTimeout(function(){if(d){e=e-1}else{e=e+1}D.run(a,b,d,e)},D.duration);z.setIcon(g)}else{b();return}};q();return{badge:u,video:w,image:v,webcam:x,reset:r.reset}};if(typeof define!=="undefined"&&define.amd){define([],function(){return a})}else if(typeof module!=="undefined"&&module.exports){module.exports=a}else{this.Favico=a}})();(function(a,b){if(typeof define==="function"&&define.amd){define([],b)}else if(typeof exports==="object"){module.exports=b()}else{a.Handlebars=a.Handlebars||b()}})(this,function(){var a=function(){"use strict";var a;function b(a){this.string=a}b.prototype.toString=function(){return""+this.string};a=b;return a}();var b=function(a){"use strict";var b={};var c=a;var d={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"};var e=/[&<>"'`]/g;var f=/[&<>"'`]/;function g(a){return d[a]}function h(a){for(var b=1;b= 2.0.0-beta.1"};c.REVISION_CHANGES=h;var i=d.isArray,j=d.isFunction,k=d.toString,l="[object Object]";function m(a,b){this.helpers=a||{};this.partials=b||{};n(this)}c.HandlebarsEnvironment=m;m.prototype={constructor:m,logger:o,log:p,registerHelper:function(a,b){if(k.call(a)===l){if(b){throw new e("Arg not supported with multiple helpers")}d.extend(this.helpers,a)}else{this.helpers[a]=b}},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){if(k.call(a)===l){d.extend(this.partials,a)}else{this.partials[a]=b}},unregisterPartial:function(a){delete this.partials[a]}};function n(a){a.registerHelper("helperMissing",function(){if(arguments.length===1){return undefined}else{throw new e("Missing helper: '"+arguments[arguments.length-1].name+"'")}});a.registerHelper("blockHelperMissing",function(b,c){var e=c.inverse,f=c.fn;if(b===true){return f(this)}else if(b===false||b==null){return e(this)}else if(i(b)){if(b.length>0){if(c.ids){c.ids=[c.name]}return a.helpers.each(b,c)}else{return e(this)}}else{if(c.data&&c.ids){var g=q(c.data);g.contextPath=d.appendContextPath(c.data.contextPath,c.name);c={data:g}}return f(b,c)}});a.registerHelper("each",function(a,b){if(!b){throw new e("Must pass iterator to #each")}var c=b.fn,f=b.inverse;var g=0,h="",k;var l;if(b.data&&b.ids){l=d.appendContextPath(b.data.contextPath,b.ids[0])+"."}if(j(a)){a=a.call(this)}if(b.data){k=q(b.data)}if(a&&typeof a==="object"){if(i(a)){for(var m=a.length;g":">","'":"""};return a.replace(/[<>']/g,function(a){return b[a]})}Handlebars.registerHelper("uri",function(a){var b=[];a=URI.withinString(a,function(a){b.push(a);return"$("+(b.length-1)+")"});a=escape(a);for(var c in b){var d=escape(b[c]);var e=d;if(d.indexOf("javascript:")!==0){e=""+d+""}a=a.replace("$("+c+")",e)}return a});Handlebars.registerHelper("users",function(a){return a+" "+(a==1?"user":"users")});(function(a,b){if(typeof module==="object"&&typeof module.exports==="object"){module.exports=a.document?b(a,true):function(a){if(!a.document){throw new Error("jQuery requires a window with a document")}return b(a)}}else{b(a)}})(typeof window!=="undefined"?window:this,function(a,b){var c=[];var d=c.slice;var e=c.concat;var f=c.push;var g=c.indexOf;var h={};var i=h.toString;var j=h.hasOwnProperty;var k={};var l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return a!=null?a<0?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);b.prevObject=this;b.context=this.context;return b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c=0},isPlainObject:function(a){if(n.type(a)!=="object"||a.nodeType||n.isWindow(a)){return false}if(a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")){return false}return true},isEmptyObject:function(a){var b;for(b in a){return false}return true},type:function(a){if(a==null){return a+""}return typeof a==="object"||typeof a==="function"?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a);if(a){if(a.indexOf("use strict")===1){b=l.createElement("script");b.text=a;l.head.appendChild(b).parentNode.removeChild(b)}else{c(a)}}},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;e0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){if(a===b){l=true}return 0},C=typeof undefined,D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){var b=0,c=this.length;for(;b+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,d&1023|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes);F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;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="
";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="";if(a.querySelectorAll("[msallowclip^='']").length){q.push("[*^$]="+M+"*(?:''|\"\")")}if(!a.querySelectorAll("[selected]").length){q.push("\\["+M+"*(?:value|"+L+")")}if(!a.querySelectorAll(":checked").length){q.push(":checked")}});ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden");a.appendChild(b).setAttribute("name","D");if(a.querySelectorAll("[name=d]").length){q.push("name"+M+"*[*^$|!~]?=")}if(!a.querySelectorAll(":enabled").length){q.push(":enabled",":disabled")}a.querySelectorAll("*,:x");q.push(",.*:")})}if(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector)){ib(function(a){c.disconnectedMatch=s.call(a,"div");s.call(a,"[s!='']:x");r.push("!=",Q)})}q=q.length&&new RegExp(q.join("|"));r=r.length&&new RegExp(r.join("|"));b=$.test(o.compareDocumentPosition);t=b||$.test(o.contains)?function(a,b){var c=a.nodeType===9?a.documentElement:a,d=b&&b.parentNode;return a===d||!!(d&&d.nodeType===1&&(c.contains?c.contains(d):a.compareDocumentPosition&&a.compareDocumentPosition(d)&16))}:function(a,b){if(b){while(b=b.parentNode){if(b===a){return true}}}return false};B=b?function(a,b){if(a===b){l=true;return 0}var d=!a.compareDocumentPosition-!b.compareDocumentPosition;if(d){return d}d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1;if(d&1||!c.sortDetached&&b.compareDocumentPosition(a)===d){if(a===e||a.ownerDocument===v&&t(v,a)){return-1}if(b===e||b.ownerDocument===v&&t(v,b)){return 1}return k?K.call(k,a)-K.call(k,b):0}return d&4?-1:1}:function(a,b){if(a===b){l=true;return 0}var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g){return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0}else if(f===g){return kb(a,b)}c=a;while(c=c.parentNode){h.unshift(c)}c=b;while(c=c.parentNode){i.unshift(c)}while(h[d]===i[d]){d++}return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0};return e};fb.matches=function(a,b){return fb(a,null,null,b)};fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n){m(a)}b=b.replace(U,"='$1']");if(c.matchesSelector&&p&&(!r||!r.test(b))&&(!q||!q.test(b))){try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&a.document.nodeType!==11){return d}}catch(e){}}return fb(b,n,null,[a]).length>0};fb.contains=function(a,b){if((a.ownerDocument||a)!==n){m(a)}return t(a,b)};fb.attr=function(a,b){if((a.ownerDocument||a)!==n){m(a)}var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):undefined;return f!==undefined?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null};fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};fb.uniqueSort=function(a){var b,d=[],e=0,f=0;l=!c.detectDuplicates;k=!c.sortStable&&a.slice(0);a.sort(B);if(l){while(b=a[f++]){if(b===a[f]){e=d.push(f)}}while(e--){a.splice(d[e],1)}}k=null;return a};e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(!f){while(b=a[d++]){c+=e(b)}}else if(f===1||f===9||f===11){if(typeof a.textContent==="string"){return a.textContent}else{for(a=a.firstChild;a;a=a.nextSibling){c+=e(a)}}}else if(f===3||f===4){return a.nodeValue}return c};d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){a[1]=a[1].replace(cb,db);a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db);if(a[2]==="~="){a[3]=" "+a[3]+" "}return a.slice(0,4)},CHILD:function(a){a[1]=a[1].toLowerCase();if(a[1].slice(0,3)==="nth"){if(!a[3]){fb.error(a[0])}a[4]=+(a[4]?a[5]+(a[6]||1):2*(a[3]==="even"||a[3]==="odd"));a[5]=+(a[7]+a[8]||a[3]==="odd")}else if(a[3]){fb.error(a[0])}return a},PSEUDO:function(a){var b,c=!a[6]&&a[2];if(X["CHILD"].test(a[0])){return null}if(a[3]){a[2]=a[4]||a[5]||""}else if(c&&V.test(c)&&(b=g(c,true))&&(b=c.indexOf(")",c.length-b)-c.length)){a[0]=a[0].slice(0,b);a[2]=c.slice(0,b)}return a.slice(0,3)}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return a==="*"?function(){return true}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test(typeof a.className==="string"&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"") })},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);if(e==null){return b==="!="}if(!b){return true}e+="";return b==="="?e===c:b==="!="?e!==c:b==="^="?c&&e.indexOf(c)===0:b==="*="?c&&e.indexOf(c)>-1:b==="$="?c&&e.slice(-c.length)===c:b==="~="?(" "+e+" ").indexOf(c)>-1:b==="|="?e===c||e.slice(0,c.length+1)===c+"-":false}},CHILD:function(a,b,c,d,e){var f=a.slice(0,3)!=="nth",g=a.slice(-4)!=="last",h=b==="of-type";return d===1&&e===0?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p]){if(h?l.nodeName.toLowerCase()===r:l.nodeType===1){return false}}o=p=a==="only"&&!o&&"nextSibling"}return true}o=[g?q.firstChild:q.lastChild];if(g&&s){k=q[u]||(q[u]={});j=k[a]||[];n=j[0]===w&&j[1];m=j[0]===w&&j[2];l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop()){if(l.nodeType===1&&++m&&l===b){k[a]=[w,n,m];break}}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w){m=j[1]}else{while(l=++n&&l&&l[p]||(m=n=0)||o.pop()){if((h?l.nodeName.toLowerCase()===r:l.nodeType===1)&&++m){if(s){(l[u]||(l[u]={}))[a]=[w,m]}if(l===b){break}}}}m-=e;return m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);if(e[u]){return e(b)}if(e.length>1){c=[a,a,"",b];return d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--){d=K.call(a,f[g]);a[d]=!(c[d]=f[g])}}):function(a){return e(a,0,c)}}return e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--){if(f=g[h]){a[h]=!(b[h]=f)}}}):function(a,e,f){b[0]=a;d(b,null,f,c);return!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){if(!W.test(a||"")){fb.error("unsupported lang: "+a)}a=a.replace(cb,db).toLowerCase();return function(b){var c;do{if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang")){c=c.toLowerCase();return c===a||c.indexOf(a+"-")===0}}while((b=b.parentNode)&&b.nodeType===1);return false}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===false},disabled:function(a){return a.disabled===true},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){if(a.parentNode){a.parentNode.selectedIndex}return a.selected===true},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling){if(a.nodeType<6){return false}}return true},parent:function(a){return!d.pseudos["empty"](a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},text:function(a){var b;return a.nodeName.toLowerCase()==="input"&&a.type==="text"&&((b=a.getAttribute("type"))==null||b.toLowerCase()==="text")},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[c<0?c+b:c]}),even:nb(function(a,b){var c=0;for(;c=0;){a.push(d)}return a}),gt:nb(function(a,b,c){var d=c<0?c+b:c;for(;++d1?function(b,c,d){var e=a.length;while(e--){if(!a[e](b,c,d)){return false}}return true}:a[0]}function tb(a,b,c){var d=0,e=b.length;for(;d-1){f[j]=!(g[j]=l)}}}}else{r=ub(r===g?r.splice(o,r.length):r);if(e){e(null,g,r,i)}else{I.apply(g,r)}}})}function wb(a){var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,true),l=rb(function(a){return K.call(b,a)>-1},h,true),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];for(;i1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:a[i-2].type===" "?"*":""})).replace(R,"$1"),c,i0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find["TAG"]("*",k),v=w+=t==null?1:Math.random()||.1,x=u.length;if(k){j=g!==n&&g}for(;q!==x&&(l=u[q])!=null;q++){if(e&&l){m=0;while(o=a[m++]){if(o(l,g,h)){i.push(l);break}}if(k){w=v}}if(c){if(l=!o&&l){p--}if(f){r.push(l)}}}p+=q;if(c&&q!==p){m=0;while(o=b[m++]){o(r,s,g,h)}if(f){if(p>0){while(q--){if(!(r[q]||s[q])){s[q]=G.call(i)}}}s=ub(s)}I.apply(i,s);if(k&&!f&&s.length>0&&p+b.length>1){fb.uniqueSort(i)}}if(k){w=v;j=t}return r};return c?hb(f):f}h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){if(!b){b=g(a)}c=b.length;while(c--){f=wb(b[c]);if(f[u]){d.push(f)}else{e.push(f)}}f=A(a,xb(e,d));f.selector=a}return f};i=fb.select=function(a,b,e,f){var i,j,k,l,m,n=typeof a==="function"&&a,o=!f&&g(a=n.selector||a);e=e||[];if(o.length===1){j=o[0]=o[0].slice(0);if(j.length>2&&(k=j[0]).type==="ID"&&c.getById&&b.nodeType===9&&p&&d.relative[j[1].type]){b=(d.find["ID"](k.matches[0].replace(cb,db),b)||[])[0];if(!b){return e}else if(n){b=b.parentNode}a=a.slice(j.shift().value.length)}i=X["needsContext"].test(a)?0:j.length;while(i--){k=j[i];if(d.relative[l=k.type]){break}if(m=d.find[l]){if(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b)){j.splice(i,1);a=f.length&&qb(j);if(!a){I.apply(e,f);return e}break}}}}(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b);return e};c.sortStable=u.split("").sort(B).join("")===u;c.detectDuplicates=!!l;m();c.sortDetached=ib(function(a){return a.compareDocumentPosition(n.createElement("div"))&1});if(!ib(function(a){a.innerHTML="";return a.firstChild.getAttribute("href")==="#"})){jb("type|href|height|width",function(a,b,c){if(!c){return a.getAttribute(b,b.toLowerCase()==="type"?1:2)}})}if(!c.attributes||!ib(function(a){a.innerHTML="";a.firstChild.setAttribute("value","");return a.firstChild.getAttribute("value")===""})){jb("value",function(a,b,c){if(!c&&a.nodeName.toLowerCase()==="input"){return a.defaultValue}})}if(!ib(function(a){return a.getAttribute("disabled")==null})){jb(L,function(a,b,c){var d;if(!c){return a[b]===true?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}})}return fb}(a);n.find=t;n.expr=t.selectors;n.expr[":"]=n.expr.pseudos;n.unique=t.uniqueSort;n.text=t.getText;n.isXMLDoc=t.isXML;n.contains=t.contains;var u=n.expr.match.needsContext;var v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/;var w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b)){return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c})}if(b.nodeType){return n.grep(a,function(a){return a===b!==c})}if(typeof b==="string"){if(w.test(b)){return n.filter(b,a,c)}b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];if(c){a=":not("+a+")"}return b.length===1&&d.nodeType===1?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return a.nodeType===1}))};n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if(typeof a!=="string"){return this.pushStack(n(a).filter(function(){for(b=0;b1?n.unique(d):d);d.selector=this.selector?this.selector+" "+a:a;return d},filter:function(a){return this.pushStack(x(this,a||[],false))},not:function(a){return this.pushStack(x(this,a||[],true))},is:function(a){return!!x(this,typeof a==="string"&&u.test(a)?n(a):a||[],false).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a){return this}if(typeof a==="string"){if(a[0]==="<"&&a[a.length-1]===">"&&a.length>=3){c=[null,a,null]}else{c=z.exec(a)}if(c&&(c[1]||!b)){if(c[1]){b=b instanceof n?b[0]:b;n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,true));if(v.test(c[1])&&n.isPlainObject(b)){for(c in b){if(n.isFunction(this[c])){this[c](b[c])}else{this.attr(c,b[c])}}}return this}else{d=l.getElementById(c[2]);if(d&&d.parentNode){this.length=1;this[0]=d}this.context=l;this.selector=a;return this}}else if(!b||b.jquery){return(b||y).find(a)}else{return this.constructor(b).find(a)}}else if(a.nodeType){this.context=this[0]=a;this.length=1;return this}else if(n.isFunction(a)){return typeof y.ready!=="undefined"?y.ready(a):a(n)}if(a.selector!==undefined){this.selector=a.selector;this.context=a.context}return n.makeArray(a,this)};A.prototype=n.fn;y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:true,contents:true,next:true,prev:true};n.extend({dir:function(a,b,c){var d=[],e=c!==undefined;while((a=a[b])&&a.nodeType!==9){if(a.nodeType===1){if(e&&n(a).is(c)){break}d.push(a)}}return d},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling){if(a.nodeType===1&&a!==b){c.push(a)}}return c}});n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){var a=0;for(;a-1:c.nodeType===1&&n.find.matchesSelector(c,a))){f.push(c);break}}}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){if(!a){return this[0]&&this[0].parentNode?this.first().prevAll().length:-1}if(typeof a==="string"){return g.call(n(a),this[0])}return g.call(this,a.jquery?a[0]:a)},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&a.nodeType!==1){}return a}n.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);if(a.slice(-5)!=="Until"){d=c}if(d&&typeof d==="string"){e=n.filter(d,e)}if(this.length>1){if(!C[a]){n.unique(e)}if(B.test(a)){e.reverse()}}return this.pushStack(e)}});var E=/\S+/g;var F={};function G(a){var b=F[a]={};n.each(a.match(E)||[],function(a,c){b[c]=true});return b}n.Callbacks=function(a){a=typeof a==="string"?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){b=a.memory&&l;c=true;g=e||0;e=0;f=h.length;d=true;for(;h&&g-1){h.splice(c,1);if(d){if(c<=f){f--}if(c<=g){g--}}}})}return this},has:function(a){return a?n.inArray(a,h)>-1:!!(h&&h.length)},empty:function(){h=[];f=0;return this},disable:function(){h=i=b=undefined;return this},disabled:function(){return!h},lock:function(){i=undefined;if(!b){k.disable()}return this},locked:function(){return!i},fireWith:function(a,b){if(h&&(!c||i)){b=b||[];b=[a,b.slice?b.slice():b];if(d){i.push(b)}else{j(b)}}return this},fire:function(){k.fireWith(this,arguments);return this},fired:function(){return!!c}};return k};n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){e.done(arguments).fail(arguments);return this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);if(a&&n.isFunction(a.promise)){a.promise().done(c.resolve).fail(c.reject).progress(c.notify)}else{c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)}})});a=null}).promise()},promise:function(a){return a!=null?n.extend(a,d):d}},e={};d.pipe=d.then;n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add;if(h){g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock)}e[f[0]]=function(){e[f[0]+"With"](this===e?d:this,arguments);return this};e[f[0]+"With"]=g.fireWith});d.promise(e);if(a){a.call(e,e)}return e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=e!==1||a&&n.isFunction(a.promise)?e:0,g=f===1?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this;c[a]=arguments.length>1?d.call(arguments):e;if(c===i){g.notifyWith(b,c)}else if(!--f){g.resolveWith(b,c)}}},i,j,k;if(e>1){i=new Array(e);j=new Array(e);k=new Array(e);for(;b0){return}H.resolveWith(l,[n]);if(n.fn.triggerHandler){n(l).triggerHandler("ready");n(l).off("ready")}}});function I(){l.removeEventListener("DOMContentLoaded",I,false);a.removeEventListener("load",I,false);n.ready()}n.ready.promise=function(b){if(!H){H=n.Deferred();if(l.readyState==="complete"){setTimeout(n.ready)}else{l.addEventListener("DOMContentLoaded",I,false);a.addEventListener("load",I,false)}}return H.promise(b)};n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=c==null;if(n.type(c)==="object"){e=true;for(h in c){n.access(a,b,h,c[h],true,f,g)}}else if(d!==undefined){e=true;if(!n.isFunction(d)){g=true}if(j){if(g){b.call(a,d);b=null}else{j=b;b=function(a,b,c){return j.call(n(a),c)}}}if(b){for(;h1,null,true)},removeData:function(a){return this.each(function(){M.remove(this,a)})}});n.extend({queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue";d=L.get(a,b);if(c){if(!d||n.isArray(c)){d=L.access(a,b,n.makeArray(c))}else{d.push(c)}}return d||[]}},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};if(e==="inprogress"){e=c.shift();d--}if(e){if(b==="fx"){c.unshift("inprogress")}delete f.stop;e.call(a,g,f)}if(!d&&f){f.empty.fire()}},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}});n.fn.extend({queue:function(a,b){var c=2;if(typeof a!=="string"){b=a;a="fx";c--}if(arguments.lengthx";k.noCloneChecked=!!b.cloneNode(true).lastChild.defaultValue})();var U=typeof undefined;k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return true}function $(){return false}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(!r){return}if(c.handler){f=c;c=f.handler;e=f.selector}if(!c.guid){c.guid=n.guid++}if(!(i=r.events)){i=r.events={}}if(!(g=r.handle)){g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):undefined}}b=(b||"").match(E)||[""];j=b.length;while(j--){h=Y.exec(b[j])||[];o=q=h[1];p=(h[2]||"").split(".").sort();if(!o){continue}l=n.event.special[o]||{};o=(e?l.delegateType:l.bindType)||o;l=n.event.special[o]||{};k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f);if(!(m=i[o])){m=i[o]=[];m.delegateCount=0;if(!l.setup||l.setup.call(a,d,p,g)===false){if(a.addEventListener){a.addEventListener(o,g,false)}}}if(l.add){l.add.call(a,k);if(!k.handler.guid){k.handler.guid=c.guid}}if(e){m.splice(m.delegateCount++,0,k)}else{m.push(k)}n.event.global[o]=true}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(!r||!(i=r.events)){return}b=(b||"").match(E)||[""];j=b.length;while(j--){h=Y.exec(b[j])||[];o=q=h[1];p=(h[2]||"").split(".").sort();if(!o){for(o in i){n.event.remove(a,o+b[j],c,d,true)}continue}l=n.event.special[o]||{};o=(d?l.delegateType:l.bindType)||o;m=i[o]||[];h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)");g=f=m.length;while(f--){k=m[f];if((e||q===k.origType)&&(!c||c.guid===k.guid)&&(!h||h.test(k.namespace))&&(!d||d===k.selector||d==="**"&&k.selector)){m.splice(f,1);if(k.selector){m.delegateCount--}if(l.remove){l.remove.call(a,k)}}}if(g&&!m.length){if(!l.teardown||l.teardown.call(a,p,r.handle)===false){n.removeEvent(a,o,r.handle)}delete i[o]}}if(n.isEmptyObject(i)){delete r.handle;L.remove(a,"events")}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];g=h=d=d||l;if(d.nodeType===3||d.nodeType===8){return}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=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]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*\s*$/g,ib={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ib.optgroup=ib.option;ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead;ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(b.nodeType!==11?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){a.type=(a.getAttribute("type")!==null)+"/"+a.type;return a}function lb(a){var b=gb.exec(a.type);if(b){a.type=b[1]}else{a.removeAttribute("type")}return a}function mb(a,b){var c=0,d=a.length;for(;c0){mb(g,!i&&ob(a,"script"))}return h},buildFragment:function(a,b,c,d){var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;for(;m")+h[2];j=h[0];while(j--){f=f.lastChild}n.merge(l,f.childNodes);f=k.firstChild;f.textContent=""}}}k.textContent="";m=0;while(e=l[m++]){if(d&&n.inArray(e,d)!==-1){continue}i=n.contains(e.ownerDocument,e);f=ob(k.appendChild(e),"script");if(i){mb(f)}if(c){j=0;while(e=f[j++]){if(fb.test(e.type||"")){c.push(e)}}}}return k},cleanData:function(a){var b,c,d,e,f=n.event.special,g=0;for(;(c=a[g])!==undefined;g++){if(n.acceptData(c)){e=c[L.expando];if(e&&(b=L.cache[e])){if(b.events){for(d in b.events){if(f[d]){n.event.remove(c,d)}else{n.removeEvent(c,d,b.handle)}}}if(L.cache[e]){delete L.cache[e]}}}delete M.cache[c[M.expando]]}}});n.fn.extend({text:function(a){return J(this,function(a){return a===undefined?n.text(this):this.empty().each(function(){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){this.textContent=a}})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){if(this.parentNode){this.parentNode.insertBefore(a,this)}})},after:function(){return this.domManip(arguments,function(a){if(this.parentNode){this.parentNode.insertBefore(a,this.nextSibling)}})},remove:function(a,b){var c,d=a?n.filter(a,this):this,e=0;for(;(c=d[e])!=null;e++){if(!b&&c.nodeType===1){n.cleanData(ob(c))}if(c.parentNode){if(b&&n.contains(c.ownerDocument,c)){mb(ob(c,"script"))}c.parentNode.removeChild(c)}}return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){if(a.nodeType===1){n.cleanData(ob(a,false));a.textContent=""}}return this},clone:function(a,b){a=a==null?false:a;b=b==null?a:b;return this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(a===undefined&&b.nodeType===1){return b.innerHTML}if(typeof a==="string"&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1>");try{for(;c1&&typeof p==="string"&&!k.checkClone&&eb.test(p)){return this.each(function(c){var d=m.eq(c);if(q){a[0]=p.call(this,c,d.html())}d.domManip(a,b)})}if(l){c=n.buildFragment(a,this[0].ownerDocument,false,this);d=c.firstChild;if(c.childNodes.length===1){c=d}if(d){f=n.map(ob(c,"script"),kb);g=f.length;for(;j")).appendTo(b.documentElement);b=qb[0].contentDocument;b.write();b.close();c=sb(a,b);qb.detach()}rb[a]=c}return c}var ub=/^margin/;var vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i");var wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;c=c||wb(a);if(c){g=c.getPropertyValue(b)||c[b]}if(c){if(g===""&&!n.contains(a.ownerDocument,a)){g=n.style(a,b)}if(vb.test(g)&&ub.test(b)){d=h.width;e=h.minWidth;f=h.maxWidth;h.minWidth=h.maxWidth=h.width=g;g=c.width;h.width=d;h.minWidth=e;h.maxWidth=f}}return g!==undefined?g+"":g}function yb(a,b){return{get:function(){if(a()){delete this.get;return}return(this.get=b).apply(this,arguments)}}}(function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(!f.style){return}f.style.backgroundClip="content-box";f.cloneNode(true).style.backgroundClip="";k.clearCloneStyle=f.style.backgroundClip==="content-box";e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;"+"position:absolute";e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;"+"box-sizing:border-box;display:block;margin-top:1%;top:1%;"+"border:1px;padding:1px;width:4px;position:absolute";f.innerHTML="";d.appendChild(e);var g=a.getComputedStyle(f,null);b=g.top!=="1%";c=g.width==="4px";d.removeChild(e)}if(a.getComputedStyle){n.extend(k,{pixelPosition:function(){g();return b},boxSizingReliable:function(){if(c==null){g()}return c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;"+"box-sizing:content-box;display:block;margin:0;border:0;padding:0";c.style.marginRight=c.style.width="0";f.style.width="1px";d.appendChild(e);b=!parseFloat(a.getComputedStyle(c,null).marginRight);d.removeChild(e);return b}})}})();n.swap=function(a,b,c,d){var e,f,g={};for(f in b){g[f]=a.style[f];a.style[f]=b[f]}e=c.apply(a,d||[]);for(f in b){a.style[f]=g[f]}return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a){return b}var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--){b=Eb[e]+c;if(b in a){return b}}return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){var f=c===(d?"border":"content")?4:b==="width"?1:0,g=0;for(;f<4;f+=2){if(c==="margin"){g+=n.css(a,c+R[f],true,e)}if(d){if(c==="content"){g-=n.css(a,"padding"+R[f],true,e)}if(c!=="margin"){g-=n.css(a,"border"+R[f]+"Width",true,e)}}else{g+=n.css(a,"padding"+R[f],true,e);if(c!=="padding"){g+=n.css(a,"border"+R[f]+"Width",true,e)}}}return g}function Ib(a,b,c){var d=true,e=b==="width"?a.offsetWidth:a.offsetHeight,f=wb(a),g=n.css(a,"boxSizing",false,f)==="border-box";if(e<=0||e==null){e=xb(a,b,f);if(e<0||e==null){e=a.style[b]}if(vb.test(e)){return e}d=g&&(k.boxSizingReliable()||e===a.style[b]);e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){var c,d,e,f=[],g=0,h=a.length;for(;g1)},show:function(){return Jb(this,true)},hide:function(){return Jb(this)},toggle:function(a){if(typeof a==="boolean"){return a?this.show():this.hide()}return this.each(function(){if(S(this)){n(this).show()}else{n(this).hide()}})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb;Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a;this.prop=c;this.easing=e||"swing";this.options=b;this.start=this.now=this.cur();this.end=d;this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];if(this.options.duration){this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration)}else{this.pos=b=a}this.now=(this.end-this.start)*b+this.start;if(this.options.step){this.options.step.call(this.elem,this.now,this)}if(c&&c.set){c.set(this)}else{Kb.propHooks._default.set(this)}return this}};Kb.prototype.init.prototype=Kb.prototype;Kb.propHooks={_default:{get:function(a){var b;if(a.elem[a.prop]!=null&&(!a.elem.style||a.elem.style[a.prop]==null)){return a.elem[a.prop]}b=n.css(a.elem,a.prop,"");return!b||b==="auto"?0:b},set:function(a){if(n.fx.step[a.prop]){n.fx.step[a.prop](a)}else if(a.elem.style&&(a.elem.style[n.cssProps[a.prop]]!=null||n.cssHooks[a.prop])){n.style(a.elem,a.prop,a.now+a.unit)}else{a.elem[a.prop]=a.now}}}};Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){if(a.elem.nodeType&&a.elem.parentNode){a.elem[a.prop]=a.now}}};n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}};n.fx=Kb.prototype.init;n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||f!=="px"&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3];e=e||[];g=+d||1;do{h=h||".5";g=g/h;n.style(c.elem,a,g+f)}while(h!==(h=c.cur()/d)&&h!==1&&--i)}if(e){g=c.start=+g||+d||0;c.unit=f;c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]}return c}]};function Sb(){setTimeout(function(){Lb=undefined});return Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};b=b?1:0;for(;d<4;d+=2-b){c=R[d];e["margin"+c]=e["padding"+c]=a}if(b){e.opacity=e.width=a}return e}function Ub(a,b,c){var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;for(;f1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}});n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(!a||f===3||f===8||f===2){return}if(typeof a.getAttribute===U){return n.prop(a,b,c)}if(f!==1||!n.isXMLDoc(a)){b=b.toLowerCase();d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)}if(c!==undefined){if(c===null){n.removeAttr(a,b)}else if(d&&"set"in d&&(e=d.set(a,c,b))!==undefined){return e}else{a.setAttribute(b,c+"");return c}}else if(d&&"get"in d&&(e=d.get(a,b))!==null){return e}else{e=n.find.attr(a,b);return e==null?undefined:e}},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&a.nodeType===1){while(c=f[e++]){d=n.propFix[c]||c;if(n.expr.match.bool.test(c)){a[d]=false}a.removeAttribute(c)}}},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&b==="radio"&&n.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b);if(c){a.value=c}return b}}}}});Zb={set:function(a,b,c){if(b===false){n.removeAttr(a,c)}else{a.setAttribute(c,c)}return c}};n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;if(!d){f=$b[b];$b[b]=e;e=c(a,b,d)!=null?b.toLowerCase():null;$b[b]=f}return e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}});n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(!a||g===3||g===8||g===2){return}f=g!==1||!n.isXMLDoc(a);if(f){b=n.propFix[b]||b;e=n.propHooks[b]}if(c!==undefined){return e&&"set"in e&&(d=e.set(a,c,b))!==undefined?d:a[b]=c}else{return e&&"get"in e&&(d=e.get(a,b))!==null?d:a[b]}},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}});if(!k.optSelected){n.propHooks.selected={get:function(a){var b=a.parentNode;if(b&&b.parentNode){b.parentNode.selectedIndex}return null}}}n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=typeof a==="string"&&a,i=0,j=this.length;if(n.isFunction(a)){return this.each(function(b){n(this).addClass(a.call(this,b,this.className))})}if(h){b=(a||"").match(E)||[];for(;i=0){d=d.replace(" "+e+" "," ")}}g=a?n.trim(d):"";if(c.className!==g){c.className=g}}}}return this},toggleClass:function(a,b){var c=typeof a;if(typeof b==="boolean"&&c==="string"){return b?this.addClass(a):this.removeClass(a)}if(n.isFunction(a)){return this.each(function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)})}return this.each(function(){if(c==="string"){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++]){if(e.hasClass(b)){e.removeClass(b)}else{e.addClass(b)}}}else if(c===U||c==="boolean"){if(this.className){L.set(this,"__className__",this.className)}this.className=this.className||a===false?"":L.get(this,"__className__")||""}})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c=0){return true}}return false}});var bc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];if(!arguments.length){if(e){b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()];if(b&&"get"in b&&(c=b.get(e,"value"))!==undefined){return c}c=e.value;return typeof c==="string"?c.replace(bc,""):c==null?"":c}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=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){f=h[0];k.unshift(h[1])}break}}}}if(g!==true){if(g&&a["throws"]){b=g(b)}else{try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}}}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:true,processData:true,async:true,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":true,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:true,context:true}},ajaxSetup:function(a,b){return b?tc(tc(a,n.ajaxSettings),b):tc(n.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){if(typeof a==="object"){b=a;a=undefined}b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(t===2){if(!f){f={};while(b=ic.exec(e)){f[b[1].toLowerCase()]=b[2]}}b=f[a.toLowerCase()]}return b==null?null:b},getAllResponseHeaders:function(){return t===2?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();if(!t){a=s[c]=s[c]||a;r[a]=b}return this},overrideMimeType:function(a){if(!t){k.mimeType=a}return this},statusCode:function(a){var b;if(a){if(t<2){for(b in a){q[b]=[q[b],a[b]]}}else{v.always(a[v.status])}}return this},abort:function(a){var b=a||u;if(c){c.abort(b)}x(0,b);return this}};o.promise(v).complete=p.add;v.success=v.done;v.error=v.fail;k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//");k.type=b.method||b.type||k.method||k.type;k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""];if(k.crossDomain==null){h=mc.exec(k.url.toLowerCase());k.crossDomain=!!(h&&(h[1]!==ec[1]||h[2]!==ec[2]||(h[3]||(h[1]==="http:"?"80":"443"))!==(ec[3]||(ec[1]==="http:"?"80":"443"))))}if(k.data&&k.processData&&typeof k.data!=="string"){k.data=n.param(k.data,k.traditional)}sc(nc,k,b,v);if(t===2){return v}i=k.global;if(i&&n.active++===0){n.event.trigger("ajaxStart")}k.type=k.type.toUpperCase();k.hasContent=!kc.test(k.type);d=k.url;if(!k.hasContent){if(k.data){d=k.url+=(dc.test(d)?"&":"?")+k.data;delete k.data}if(k.cache===false){k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++}}if(k.ifModified){if(n.lastModified[d]){v.setRequestHeader("If-Modified-Since",n.lastModified[d])}if(n.etag[d]){v.setRequestHeader("If-None-Match",n.etag[d])}}if(k.data&&k.hasContent&&k.contentType!==false||b.contentType){v.setRequestHeader("Content-Type",k.contentType)}v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+(k.dataTypes[0]!=="*"?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers){v.setRequestHeader(j,k.headers[j])}if(k.beforeSend&&(k.beforeSend.call(l,v,k)===false||t===2)){return v.abort()}u="abort";for(j in{success:1,error:1,complete:1}){v[j](k[j])}c=sc(oc,k,b,v);if(!c){x(-1,"No Transport")}else{v.readyState=1;if(i){m.trigger("ajaxSend",[v,k])}if(k.async&&k.timeout>0){g=setTimeout(function(){v.abort("timeout")},k.timeout)}try{t=1;c.send(r,x)}catch(w){if(t<2){x(-1,w)}else{throw w}}}function x(a,b,f,h){var j,r,s,u,w,x=b;if(t===2){return}t=2;if(g){clearTimeout(g)}c=undefined;e=h||"";v.readyState=a>0?4:0;j=a>=200&&a<300||a===304;if(f){u=uc(k,v,f)}u=vc(k,u,v,j);if(j){if(k.ifModified){w=v.getResponseHeader("Last-Modified");if(w){n.lastModified[d]=w}w=v.getResponseHeader("etag");if(w){n.etag[d]=w}}if(a===204||k.type==="HEAD"){x="nocontent"}else if(a===304){x="notmodified"}else{x=u.state;r=u.data;s=u.error;j=!s}}else{s=x;if(a||!x){x="error";if(a<0){a=0}}}v.status=a;v.statusText=(b||x)+"";if(j){o.resolveWith(l,[r,x,v])}else{o.rejectWith(l,[v,x,s])}v.statusCode(q);q=undefined;if(i){m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s])}p.fireWith(l,[v,x]);if(i){m.trigger("ajaxComplete",[v,k]);if(!--n.active){n.event.trigger("ajaxStop")}}}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json") },getScript:function(a,b){return n.get(a,undefined,b,"script")}});n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){if(n.isFunction(c)){e=e||d;d=c;c=undefined}return n.ajax({url:a,type:b,dataType:e,data:c,success:d})}});n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}});n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:false,global:false,"throws":true})};n.fn.extend({wrapAll:function(a){var b;if(n.isFunction(a)){return this.each(function(b){n(this).wrapAll(a.call(this,b))})}if(this[0]){b=n(a,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){b.insertBefore(this[0])}b.map(function(){var a=this;while(a.firstElementChild){a=a.firstElementChild}return a}).append(this)}return this},wrapInner:function(a){if(n.isFunction(a)){return this.each(function(b){n(this).wrapInner(a.call(this,b))})}return this.each(function(){var b=n(this),c=b.contents();if(c.length){c.wrapAll(a)}else{b.append(a)}})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){if(!n.nodeName(this,"body")){n(this).replaceWith(this.childNodes)}}).end()}});n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0};n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var wc=/%20/g,xc=/\[\]$/,yc=/\r?\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(n.isArray(b)){n.each(b,function(b,e){if(c||xc.test(a)){d(a,e)}else{Bc(a+"["+(typeof e==="object"?b:"")+"]",e,c,d)}})}else if(!c&&n.type(b)==="object"){for(e in b){Bc(a+"["+e+"]",b[e],c,d)}}else{d(a,b)}}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():b==null?"":b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(b===undefined){b=n.ajaxSettings&&n.ajaxSettings.traditional}if(n.isArray(a)||a.jquery&&!n.isPlainObject(a)){n.each(a,function(){e(this.name,this.value)})}else{for(c in a){Bc(c,a[c],b,e)}}return d.join("&").replace(wc,"+")};n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return c==null?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(yc,"\r\n")}}):{name:b.name,value:c.replace(yc,"\r\n")}}).get()}});n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=n.ajaxSettings.xhr();if(a.ActiveXObject){n(a).on("unload",function(){for(var a in Dc){Dc[a]()}})}k.cors=!!Fc&&"withCredentials"in Fc;k.ajax=Fc=!!Fc;n.ajaxTransport(function(a){var b;if(k.cors||Fc&&!a.crossDomain){return{send:function(c,d){var e,f=a.xhr(),g=++Cc;f.open(a.type,a.url,a.async,a.username,a.password);if(a.xhrFields){for(e in a.xhrFields){f[e]=a.xhrFields[e]}}if(a.mimeType&&f.overrideMimeType){f.overrideMimeType(a.mimeType)}if(!a.crossDomain&&!c["X-Requested-With"]){c["X-Requested-With"]="XMLHttpRequest"}for(e in c){f.setRequestHeader(e,c[e])}b=function(a){return function(){if(b){delete Dc[g];b=f.onload=f.onerror=null;if(a==="abort"){f.abort()}else if(a==="error"){d(f.status,f.statusText)}else{d(Ec[f.status]||f.status,f.statusText,typeof f.responseText==="string"?{text:f.responseText}:undefined,f.getAllResponseHeaders())}}}};f.onload=b();f.onerror=b("error");b=Dc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b){throw h}}},abort:function(){if(b){b()}}}}});n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){n.globalEval(a);return a}}});n.ajaxPrefilter("script",function(a){if(a.cache===undefined){a.cache=false}if(a.crossDomain){a.type="GET"}});n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("