var accountPopover=function(){var e=function(e,t){e.find(".account-popover-link-text").addClass("account-popover-link-"+t),e.find(".account-popover-storage-upgrade .btn").addClass("btn-"+t),e.find(".progress-bar").addClass("progress-bar-"+t)},t=function(e){e.find(".account-popover-link-danger").removeClass("account-popover-link-danger"),e.find(".account-popover-link-warning").removeClass("account-popover-link-warning"),e.find(".account-popover-storage-upgrade .btn").removeClass("btn-danger btn-warning"),e.find(".progress-bar").removeClass("progress-bar-danger progress-bar-warning")},o=function(o){if(!o.membership_type||!o.percent_used||!o.total_storage)return console.warn("argument storage must contain the following keys: 'membership_type', 'percent_used', 'total_storage'");var r=$(".account-popover-storage"),a=parseInt(o.percent_used);t(r),r.find(".account-popover-membership_type").html(o.membership_type),r.find(".account-popover-percent_used, .progress-label").html(o.percent_used),r.find(".account-popover-total_storage").html(o.total_storage),r.find(".progress-bar").attr("style","width: "+o.percent_used+";"),a>=100?(e(r,"danger"),r.find(".account-popover-storage-upgrade").show()):a>=90?e(r,"warning"):r.find(".account-popover-storage-upgrade").hide()};return{setAccountStorage:o}}();$(function(){$('[data-toggle="popover-desktop"]').popover({html:!0,content:function(){return $(".account-popover").html()},template:'
',container:".account-popover-container",placement:"bottom"}),$('[data-toggle="popover-mobile"]').popover({html:!0,content:function(){return $(".account-popover").html()},template:' ',container:".account-popover-container-mobile",placement:"bottom"})}),$(function(){$(".account-popover-trigger").on("shown.bs.popover",function(){var e=$(window).height();$(function(){var t=$("#header-is_fixed").outerHeight();t>=e&&($("body").addClass("body-fixed"),$("#header-is_fixed").css("max-height",e),$("#header-is_fixed").addClass("is_scrolling"))})}),$(".account-popover-trigger").on("hidden.bs.popover",function(){$("body").removeClass("body-fixed"),$("#header-is_fixed").removeClass("is_scrolling")}),$("#header-is_fixed .navbar-collapse").on("hide.bs.collapse",function(){$(".popover.account-popover").popover("hide")})}),function(e){e(["jquery"],function(e){return e.fn.blurjs=function(t){function o(e,t,o,a,i,n){if(!(isNaN(n)||1>n)){n|=0;var d,l=e.getContext("2d");try{try{d=l.getImageData(t,o,a,i)}catch(p){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),d=l.getImageData(t,o,a,i)}catch(p){throw alert("Cannot access local image"),new Error("unable to access local image data: "+p)}}}catch(p){throw alert("Cannot access image"),new Error("unable to access image data: "+p)}var g,h,u,f,b,v,m,w,$,x,y,C,k,_,I,H,P,S,z,W,j=d.data,U=n+n+1,A=a-1,K=i-1,D=n+1,M=D*(D+1)/2,B=new r,E=B;for(u=1;U>u;u++)if(E=E.next=new r,u==D)var G=E;E.next=B;var R=null,Z=null;m=v=0;var N=s[n],O=c[n];for(h=0;i>h;h++){for(_=I=H=w=$=x=0,y=D*(P=j[v]),C=D*(S=j[v+1]),k=D*(z=j[v+2]),w+=M*P,$+=M*S,x+=M*z,E=B,u=0;D>u;u++)E.r=P,E.g=S,E.b=z,E=E.next;for(u=1;D>u;u++)f=v+((u>A?A:u)<<2),w+=(E.r=P=j[f])*(W=D-u),$+=(E.g=S=j[f+1])*W,x+=(E.b=z=j[f+2])*W,_+=P,I+=S,H+=z,E=E.next;for(R=B,Z=G,g=0;a>g;g++)j[v]=w*N>>O,j[v+1]=$*N>>O,j[v+2]=x*N>>O,w-=y,$-=C,x-=k,y-=R.r,C-=R.g,k-=R.b,f=m+((f=g+n+1)g;g++){for(I=H=_=$=x=w=0,v=g<<2,y=D*(P=j[v]),C=D*(S=j[v+1]),k=D*(z=j[v+2]),w+=M*P,$+=M*S,x+=M*z,E=B,u=0;D>u;u++)E.r=P,E.g=S,E.b=z,E=E.next;for(b=a,u=1;n>=u;u++)v=b+g<<2,w+=(E.r=P=j[v])*(W=D-u),$+=(E.g=S=j[v+1])*W,x+=(E.b=z=j[v+2])*W,_+=P,I+=S,H+=z,E=E.next,K>u&&(b+=a);for(v=g,R=B,Z=G,h=0;i>h;h++)f=v<<2,j[f]=w*N>>O,j[f+1]=$*N>>O,j[f+2]=x*N>>O,w-=y,$-=C,x-=k,y-=R.r,C-=R.g,k-=R.b,f=g+((f=h+D)