Skip to content

Instantly share code, notes, and snippets.

@creotiv
Created September 27, 2011 15:51
Show Gist options
  • Select an option

  • Save creotiv/1245443 to your computer and use it in GitHub Desktop.

Select an option

Save creotiv/1245443 to your computer and use it in GitHub Desktop.
JPEG encoder ported to JavaScript and optimized by Andreas Ritter
(function(){function h(a){throw a;}var j=void 0,k=true,l=null,t=false,u;function aa(a){this.t={};this.tick=function(a,c,d){this.t[a]=[d!=j?d:(new Date).getTime(),c]};this.tick("start",l,a)}var ba=new aa;window.jstiming={Timer:aa,load:ba};try{var ca=l;window.chrome&&window.chrome.csi&&(ca=Math.floor(window.chrome.csi().pageT));ca==l&&window.gtbExternal&&(ca=window.gtbExternal.pageT());ca==l&&window.external&&(ca=window.external.pageT);ca&&(window.jstiming.pt=ca)}catch(da){};if(window.jstiming){window.jstiming.lb={};window.jstiming.Wb=1;var ea=function(a,b,c){var d=a.t[b],e=a.t.start;if(d&&(e||c))return d=a.t[b][0],c!=j?e=c:e=e[0],d-e},fa=function(a,b,c){var d="";window.jstiming.pt&&(d+="&srt="+window.jstiming.pt,delete window.jstiming.pt);try{window.external&&window.external.tran?d+="&tran="+window.external.tran:window.gtbExternal&&window.gtbExternal.tran?d+="&tran="+window.gtbExternal.tran():window.chrome&&window.chrome.csi&&(d+="&tran="+window.chrome.csi().tran)}catch(e){}var f=
window.chrome;if(f&&(f=f.loadTimes))f().wasFetchedViaSpdy&&(d+="&p=s"),f().wasNpnNegotiated&&(d+="&npn=1"),f().wasAlternateProtocolAvailable&&(d+="&apa=1");a.Xb&&(d+="&"+a.Xb);var g=a.t,i=g.start,f=[],n=[],m;for(m in g)if(m!="start"&&m.indexOf("_")!=0){var s=g[m][1];s?g[s]&&n.push(m+"."+ea(a,m,g[s][0])):i&&f.push(m+"."+ea(a,m))}delete g.start;if(b)for(var q in b)d+="&"+q+"="+b[q];(b=c)||(b="https:"==document.location.protocol?"https://csi.gstatic.com/csi":"http://csi.gstatic.com/csi");return[b,"?v=3",
"&s="+(window.jstiming.sn||"_s")+"&action=",a.name,n.length?"&it="+n.join(","):"","",d,"&rt=",f.join(",")].join("")},ga=function(a,b,c){a=fa(a,b,c);if(!a)return"";var b=new Image,d=window.jstiming.Wb++;window.jstiming.lb[d]=b;b.onload=b.onerror=function(){delete window.jstiming.lb[d]};b.src=a;b=l;return a};window.jstiming.report=function(a,b,c){if(document.webkitVisibilityState=="prerender"){var d=t,e=function(){if(!d){b?b.prerender="1":b={prerender:"1"};var f;document.webkitVisibilityState=="prerender"?
f=t:(ga(a,b,c),f=k);f&&(d=k,document.removeEventListener("webkitvisibilitychange",e,t))}};document.addEventListener("webkitvisibilitychange",e,t);return""}return ga(a,b,c)}};var w=this,ha=function(a){for(var a=a.split("."),b=w,c;c=a.shift();)if(b[c]!=l)b=b[c];else return l;return b},ia=function(){},ja=function(a){var b=typeof a;if(b=="object")if(a){if(a instanceof Array)return"array";else if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if(c=="[object Window]")return"object";if(c=="[object Array]"||typeof a.length=="number"&&typeof a.splice!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("splice"))return"array";
if(c=="[object Function]"||typeof a.call!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if(b=="function"&&typeof a.call=="undefined")return"object";return b},ka=function(a){return ja(a)=="array"},na=function(a){var b=ja(a);return b=="array"||b=="object"&&typeof a.length=="number"},x=function(a){return typeof a=="string"},oa=function(a){return ja(a)=="function"},pa=function(a){a=ja(a);return a=="object"||a=="array"||
a=="function"},sa=function(a){return a[qa]||(a[qa]=++ra)},qa="closure_uid_"+Math.floor(Math.random()*2147483648).toString(36),ra=0,ta=function(a,b,c){return a.call.apply(a.bind,arguments)},ua=function(a,b,c){a||h(Error());if(arguments.length>2){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}else return function(){return a.apply(b,arguments)}},z=function(a,b,c){z=Function.prototype.bind&&
Function.prototype.bind.toString().indexOf("native code")!=-1?ta:ua;return z.apply(l,arguments)},wa=function(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}},A=Date.now||function(){return+new Date},C=function(a,b){function c(){}c.prototype=b.prototype;a.j=b.prototype;a.prototype=new c};
Function.prototype.bind=Function.prototype.bind||function(a,b){if(arguments.length>1){var c=Array.prototype.slice.call(arguments,1);c.unshift(this,a);return z.apply(l,c)}else return z(this,a)};var xa=function(a){this.stack=Error().stack||"";if(a)this.message=String(a)};C(xa,Error);xa.prototype.name="CustomError";var ya=function(a,b){for(var c=1;c<arguments.length;c++)var d=String(arguments[c]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,d);return a},za=/^[a-zA-Z0-9\-_.!~*'()]*$/,Aa=function(a){a=String(a);return!za.test(a)?encodeURIComponent(a):a},Ga=function(a){if(!Ba.test(a))return a;a.indexOf("&")!=-1&&(a=a.replace(Ca,"&amp;"));a.indexOf("<")!=-1&&(a=a.replace(Da,"&lt;"));a.indexOf(">")!=-1&&(a=a.replace(Ea,"&gt;"));a.indexOf('"')!=-1&&(a=a.replace(Fa,"&quot;"));return a},Ca=/&/g,Da=/</g,Ea=/>/g,Fa=/\"/g,
Ba=/[&<>\"]/,Ha=function(){return Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^A()).toString(36)},Ja=function(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),g=0;c==0&&g<f;g++){var i=d[g]||"",n=e[g]||"",m=RegExp("(\\d*)(\\D*)","g"),s=RegExp("(\\d*)(\\D*)","g");do{var q=m.exec(i)||["","",""],L=s.exec(n)||["","",""];if(q[0].length==
0&&L[0].length==0)break;c=Ia(q[1].length==0?0:parseInt(q[1],10),L[1].length==0?0:parseInt(L[1],10))||Ia(q[2].length==0,L[2].length==0)||Ia(q[2],L[2])}while(c==0)}return c},Ia=function(a,b){if(a<b)return-1;else if(a>b)return 1;return 0};var Ka=function(a,b){b.unshift(a);xa.call(this,ya.apply(l,b));b.shift();this.a=a};C(Ka,xa);Ka.prototype.name="AssertionError";var La=function(a,b,c){if(!a){var d=Array.prototype.slice.call(arguments,2),e="Assertion failed";if(b){e+=": "+b;var f=d}h(new Ka(""+e,f||[]))}},Ma=function(a,b){h(new Ka("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1)))};var E=Array.prototype,Na=E.indexOf?function(a,b,c){La(a.length!=l);return E.indexOf.call(a,b,c)}:function(a,b,c){c=c==l?0:c<0?Math.max(0,a.length+c):c;if(x(a))return!x(b)||b.length!=1?-1:a.indexOf(b,c);for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},F=E.forEach?function(a,b,c){La(a.length!=l);E.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=x(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)},Oa=function(a,b){for(var c=x(a)?a.split(""):a,d=a.length-1;d>=0;--d)d in c&&b.call(j,
c[d],d,a)},Pa=E.map?function(a,b,c){La(a.length!=l);return E.map.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=Array(d),f=x(a)?a.split(""):a,g=0;g<d;g++)g in f&&(e[g]=b.call(c,f[g],g,a));return e},Qa=function(a,b){var c=Na(a,b);c>=0&&(La(a.length!=l),E.splice.call(a,c,1))},Ra=function(a){return E.concat.apply(E,arguments)},Ua=function(a){if(ka(a))return Ra(a);else{for(var b=[],c=0,d=a.length;c<d;c++)b[c]=a[c];return b}},Va=function(a,b,c){La(a.length!=l);return arguments.length<=2?E.slice.call(a,
b):E.slice.call(a,b,c)};var Wa="StopIteration"in w?w.StopIteration:Error("StopIteration"),Xa=function(){};Xa.prototype.next=function(){h(Wa)};Xa.prototype.e=function(){return this};var Ya=function(a,b){for(var c in a)b.call(j,a[c],c,a)},Za=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b},$a="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),ab=function(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(var f=0;f<$a.length;f++)c=$a[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};var bb=function(a,b){this.b={};this.a=[];var c=arguments.length;if(c>1){c%2&&h(Error("Uneven number of arguments"));for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){if(a instanceof bb)d=cb(a),c=db(a);else{var c=[],e=0;for(d in a)c[e++]=d;d=c;c=Za(a)}for(e=0;e<d.length;e++)this.set(d[e],c[e])}};bb.prototype.m=0;bb.prototype.c=0;var db=function(a){eb(a);for(var b=[],c=0;c<a.a.length;c++)b.push(a.b[a.a[c]]);return b},cb=function(a){eb(a);return a.a.concat()};
bb.prototype.clear=function(){this.b={};this.c=this.m=this.a.length=0};var eb=function(a){if(a.m!=a.a.length){for(var b=0,c=0;b<a.a.length;){var d=a.a[b];Object.prototype.hasOwnProperty.call(a.b,d)&&(a.a[c++]=d);b++}a.a.length=c}if(a.m!=a.a.length){for(var e={},c=b=0;b<a.a.length;)d=a.a[b],Object.prototype.hasOwnProperty.call(e,d)||(a.a[c++]=d,e[d]=1),b++;a.a.length=c}};bb.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.b,a)?this.b[a]:b};
bb.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.b,a)||(this.m++,this.a.push(a),this.c++);this.b[a]=b};bb.prototype.Yb=function(){eb(this);for(var a={},b=0;b<this.a.length;b++){var c=this.a[b];a[c]=this.b[c]}return a};bb.prototype.e=function(a){eb(this);var b=0,c=this.a,d=this.b,e=this.c,f=this,g=new Xa;g.next=function(){for(;;){e!=f.c&&h(Error("The map has changed since the iterator was created"));b>=c.length&&h(Wa);var g=c[b++];return a?g:d[g]}};return g};var fb,gb,hb,kb,lb,mb=function(){return w.navigator?w.navigator.userAgent:l};kb=hb=gb=fb=t;var nb;if(nb=mb()){var ob=w.navigator;fb=nb.indexOf("Opera")==0;gb=!fb&&nb.indexOf("MSIE")!=-1;hb=!fb&&nb.indexOf("WebKit")!=-1;kb=!fb&&!hb&&ob.product=="Gecko"}var pb=fb,J=gb,qb=kb,rb=hb,sb=w.navigator,tb=sb&&sb.platform||"";lb=tb.indexOf("Mac")!=-1;var ub=tb.indexOf("Linux")!=-1,vb;
a:{var wb="",xb;if(pb&&w.opera)var yb=w.opera.version,wb=typeof yb=="function"?yb():yb;else if(qb?xb=/rv\:([^\);]+)(\)|;)/:J?xb=/MSIE\s+([^\);]+)(\)|;)/:rb&&(xb=/WebKit\/(\S+)/),xb)var zb=xb.exec(mb()),wb=zb?zb[1]:"";if(J){var Ab,Bb=w.document;Ab=Bb?Bb.documentMode:j;if(Ab>parseFloat(wb)){vb=String(Ab);break a}}vb=wb}var Cb=vb,Db={},Eb=function(a){Db[a]||(Db[a]=Ja(Cb,a)>=0)},Fb={},Gb=function(){return Fb[9]||(Fb[9]=J&&document.documentMode&&document.documentMode>=9)};var Ib=function(a){return Hb(a||arguments.callee.caller,[])},Hb=function(a,b){var c=[];if(Na(b,a)>=0)c.push("[...circular reference...]");else if(a&&b.length<50){c.push(Jb(a)+"(");for(var d=a.arguments,e=0;e<d.length;e++){e>0&&c.push(", ");var f;f=d[e];switch(typeof f){case "object":f=f?"object":"null";break;case "string":break;case "number":f=String(f);break;case "boolean":f=f?"true":"false";break;case "function":f=(f=Jb(f))?f:"[fn]";break;default:f=typeof f}f.length>40&&(f=f.substr(0,40)+"...");
c.push(f)}b.push(a);c.push(")\n");try{c.push(Hb(a.caller,b))}catch(g){c.push("[exception trying to get caller]\n")}}else a?c.push("[...long stack...]"):c.push("[end]");return c.join("")},Jb=function(a){if(Kb[a])return Kb[a];a=String(a);if(!Kb[a]){var b=/function ([^\(]+)/.exec(a);Kb[a]=b?b[1]:"[Anonymous]"}return Kb[a]},Kb={};var Mb=function(a,b,c,d,e){this.u=typeof e=="number"?e:Lb++;this.f=d||A();this.c=a;this.e=b;this.h=c;delete this.b;delete this.a};Mb.prototype.u=0;Mb.prototype.b=l;Mb.prototype.a=l;var Lb=0;var Ob=function(a){this.h=a};Ob.prototype.b=l;Ob.prototype.e=l;Ob.prototype.c=l;Ob.prototype.a=l;var Pb=function(a,b){this.name=a;this.value=b};Pb.prototype.toString=function(){return this.name};var K=new Pb("SEVERE",1E3),Qb=new Pb("WARNING",900),Rb=new Pb("INFO",800),Sb=new Pb("CONFIG",700),Tb=new Pb("FINE",500),Ub=new Pb("FINEST",300),Vb=function(a){if(a.e)return a.e;if(a.b)return Vb(a.b);Ma("Root logger has no level set.");return l};
Ob.prototype.log=function(a,b,c){if(a.value>=Vb(this).value){a=this.f(a,b,c);b="log:"+a.e;w.console&&(w.console.timeStamp?w.console.timeStamp(b):w.console.markTimeline&&w.console.markTimeline(b));w.msWriteProfilerMark&&w.msWriteProfilerMark(b);for(b=this;b;){var c=b,d=a;if(c.a)for(var e=0,f=j;f=c.a[e];e++)f(d);b=b.b}}};
Ob.prototype.f=function(a,b,c){var d=new Mb(a,String(b),this.h);if(c){d.b=c;var e;var f=arguments.callee.caller;try{var g;var i=ha("window.location.href");if(x(c))g={message:c,name:"Unknown error",lineNumber:"Not available",fileName:i,stack:"Not available"};else{var n,m,s=t;try{n=c.lineNumber||c.$b||"Not available"}catch(q){n="Not available",s=k}try{m=c.fileName||c.filename||c.sourceURL||i}catch(L){m="Not available",s=k}g=s||!c.lineNumber||!c.fileName||!c.stack?{message:c.message,name:c.name,lineNumber:n,
fileName:m,stack:c.stack||"Not available"}:c}e="Message: "+Ga(g.message)+'\nUrl: <a href="view-source:'+g.fileName+'" target="_new">'+g.fileName+"</a>\nLine: "+g.lineNumber+"\n\nBrowser stack:\n"+Ga(g.stack+"-> ")+"[end]\n\nJS stack traversal:\n"+Ga(Ib(f)+"-> ")}catch(v){e="Exception trying to expose exception! You win, we lose. "+v}d.a=e}return d};var Wb=function(a,b){a.log(Qb,b,j)};Ob.prototype.info=function(a,b){this.log(Rb,a,b)};
var O=function(a){N.log(Tb,a,j)},P=function(a){N.log(Ub,a,j)},Xb={},Yb=l,Zb=function(){if(!Yb)Yb=new Ob(""),Xb[""]=Yb,Yb.e=Sb},Q=function(a){Zb();var b;if(!(b=Xb[a])){b=new Ob(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=Q(a.substr(0,c));if(!c.c)c.c={};c.c[d]=b;b.b=c;Xb[a]=b}return b};var $b=function(a){a=String(a);if(/^\s*$/.test(a)?0:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r\u2028\u2029\x00-\x08\x10-\x1f\x80-\x9f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+a+")")}catch(b){}h(Error("Invalid JSON string: "+a))},ac=function(){},cc=function(a){var b=[];bc(new ac,a,b);return b.join("")},bc=function(a,b,c){switch(typeof b){case "string":dc(b,c);break;case "number":c.push(isFinite(b)&&
!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==l){c.push("null");break}if(ka(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),bc(a,b[f],c),e=",";c.push("]");break}c.push("{");d="";for(e in b)Object.prototype.hasOwnProperty.call(b,e)&&(f=b[e],typeof f!="function"&&(c.push(d),dc(e,c),c.push(":"),bc(a,f,c),d=","));c.push("}");break;case "function":break;default:h(Error("Unknown type: "+typeof b))}},ec={'"':'\\"',"\\":"\\\\",
"/":"\\/","\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\u000b":"\\u000b"},fc=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,dc=function(a,b){b.push('"',a.replace(fc,function(a){if(a in ec)return ec[a];var b=a.charCodeAt(0),e="\\u";b<16?e+="000":b<256?e+="00":b<4096&&(e+="0");return ec[a]=e+b.toString(16)}),'"')};var gc=function(a,b){this.x=a!==j?a:0;this.y=b!==j?b:0};gc.prototype.toString=function(){return"("+this.x+", "+this.y+")"};var hc=function(a,b){this.width=a;this.height=b};hc.prototype.toString=function(){return"("+this.width+" x "+this.height+")"};hc.prototype.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};hc.prototype.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};hc.prototype.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};var ic=function(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d};ic.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};var jc=function(){};jc.prototype.u=t;jc.prototype.q=function(){if(!this.u)this.u=k,this.g()};jc.prototype.g=function(){this.Zb&&kc.apply(l,this.Zb)};var lc=function(a){a&&typeof a.q=="function"&&a.q()},kc=function(a){for(var b=0,c=arguments.length;b<c;++b){var d=arguments[b];na(d)?kc.apply(l,d):lc(d)}};var mc,nc=!J||Gb();!qb&&!J||J&&Gb()||qb&&Eb("1.9.1");J&&Eb("9");var oc=function(a,b){var c;c=(c=a.className)&&typeof c.split=="function"?c.split(/\s+/):[];var d=Va(arguments,1),e;e=c;for(var f=0,g=0;g<d.length;g++)Na(e,d[g])>=0||(e.push(d[g]),f++);e=f==d.length;a.className=c.join(" ");return e};var qc=function(){return mc||(mc=new pc)},sc=function(a,b){Ya(b,function(b,d){d=="style"?a.style.cssText=b:d=="class"?a.className=b:d=="for"?a.htmlFor=b:d in rc?a.setAttribute(rc[d],b):d.lastIndexOf("aria-",0)==0?a.setAttribute(d,b):a[d]=b})},rc={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",height:"height",width:"width",usemap:"useMap",frameborder:"frameBorder",maxlength:"maxLength",type:"type"},uc=function(a,b,c){var d=arguments,e=document,
f=d[0],g=d[1];if(!nc&&g&&(g.name||g.type)){f=["<",f];g.name&&f.push(' name="',Ga(g.name),'"');if(g.type){f.push(' type="',Ga(g.type),'"');var i={};ab(i,g);g=i;delete g.type}f.push(">");f=f.join("")}f=e.createElement(f);if(g)x(g)?f.className=g:ka(g)?oc.apply(l,[f].concat(g)):sc(f,g);d.length>2&&tc(e,f,d);return f},tc=function(a,b,c){function d(c){c&&b.appendChild(x(c)?a.createTextNode(c):c)}for(var e=2;e<c.length;e++){var f=c[e];na(f)&&!(pa(f)&&f.nodeType>0)?F(vc(f)?Ua(f):f,d):d(f)}},wc=function(a){a&&
a.parentNode&&a.parentNode.removeChild(a)},vc=function(a){if(a&&typeof a.length=="number")if(pa(a))return typeof a.item=="function"||typeof a.item=="string";else if(oa(a))return typeof a.item=="function";return t},pc=function(a){this.a=a||w.document||document};pc.prototype.B=function(a){return x(a)?this.a.getElementById(a):a};var xc=function(a){xc[" "](a);return a};xc[" "]=ia;var yc=function(a,b){try{return xc(a[b]),k}catch(c){}return t};var zc;!J||Gb();J&&Eb("8");var Ac=function(a,b){this.type=a;this.a=this.target=b};C(Ac,jc);Ac.prototype.g=function(){delete this.type;delete this.target;delete this.a};Ac.prototype.b=t;Ac.prototype.c=k;Ac.prototype.ua=function(){this.b=k};var Bc=function(a){a.ua()};var Cc={ic:"click",nc:"dblclick",Hc:"mousedown",Lc:"mouseup",Kc:"mouseover",Jc:"mouseout",Ic:"mousemove",Vc:"selectstart",Cc:"keypress",Bc:"keydown",Dc:"keyup",gc:"blur",vc:"focus",oc:"deactivate",wc:J?"focusin":"DOMFocusIn",xc:J?"focusout":"DOMFocusOut",hc:"change",Uc:"select",Wc:"submit",Ac:"input",Qc:"propertychange",sc:"dragstart",pc:"dragenter",rc:"dragover",qc:"dragleave",tc:"drop",$c:"touchstart",Zc:"touchmove",Yc:"touchend",Xc:"touchcancel",kc:"contextmenu",uc:"error",zc:"help",Ec:"load",
Fc:"losecapture",Rc:"readystatechange",Sc:"resize",Tc:"scroll",ad:"unload",yc:"hashchange",Mc:"pagehide",Nc:"pageshow",Pc:"popstate",lc:"copy",Oc:"paste",mc:"cut",dc:"beforecopy",ec:"beforecut",fc:"beforepaste",Gc:"message",jc:"connect"};var Dc=function(a,b){a&&this.O(a,b)};C(Dc,Ac);u=Dc.prototype;u.target=l;u.za=l;u.wb=0;u.xb=0;u.clientX=0;u.clientY=0;u.yb=0;u.zb=0;u.rb=0;u.ub=0;u.sb=0;u.tb=t;u.qb=t;u.Ab=t;u.vb=t;u.Bb=t;u.G=l;
u.O=function(a,b){var c=this.type=a.type;Ac.call(this,c);this.target=a.target||a.srcElement;this.a=b;var d=a.relatedTarget;if(d)qb&&(yc(d,"nodeName")||(d=l));else if(c=="mouseover")d=a.fromElement;else if(c=="mouseout")d=a.toElement;this.za=d;this.wb=a.offsetX!==j?a.offsetX:a.layerX;this.xb=a.offsetY!==j?a.offsetY:a.layerY;this.clientX=a.clientX!==j?a.clientX:a.pageX;this.clientY=a.clientY!==j?a.clientY:a.pageY;this.yb=a.screenX||0;this.zb=a.screenY||0;this.rb=a.button;this.ub=a.keyCode||0;this.sb=
a.charCode||(c=="keypress"?a.keyCode:0);this.tb=a.ctrlKey;this.qb=a.altKey;this.Ab=a.shiftKey;this.vb=a.metaKey;this.Bb=lb?a.metaKey:a.ctrlKey;this.e=a.state;this.G=a;delete this.c;delete this.b};u.ua=function(){Dc.j.ua.call(this);this.G.stopPropagation?this.G.stopPropagation():this.G.cancelBubble=k};u.g=function(){Dc.j.g.call(this);this.za=this.a=this.target=this.G=l};var Ec=function(a,b){this.e=b;this.b=[];a>this.e&&h(Error("[goog.structs.SimplePool] Initial cannot be greater than max"));for(var c=0;c<a;c++)this.b.push(this.a?this.a():{})};C(Ec,jc);Ec.prototype.a=l;Ec.prototype.c=l;var Fc=function(a){return a.b.length?a.b.pop():a.a?a.a():{}},Hc=function(a,b){a.b.length<a.e?a.b.push(b):Gc(a,b)},Gc=function(a,b){if(a.c)a.c(b);else if(pa(b))if(oa(b.q))b.q();else for(var c in b)delete b[c]};
Ec.prototype.g=function(){Ec.j.g.call(this);for(var a=this.b;a.length;)Gc(this,a.pop());delete this.b};var Ic,Jc=(Ic="ScriptEngine"in w&&w.ScriptEngine()=="JScript")?w.ScriptEngineMajorVersion()+"."+w.ScriptEngineMinorVersion()+"."+w.ScriptEngineBuildVersion():"0";var Kc=function(){},Lc=0;u=Kc.prototype;u.key=0;u.N=t;u.Na=t;u.O=function(a,b,c,d,e,f){oa(a)?this.a=k:a&&a.handleEvent&&oa(a.handleEvent)?this.a=t:h(Error("Invalid listener argument"));this.T=a;this.b=b;this.src=c;this.type=d;this.capture=!!e;this.ka=f;this.Na=t;this.key=++Lc;this.N=t};u.handleEvent=function(a){return this.a?this.T.call(this.ka||this.src,a):this.T.handleEvent.call(this.T,a)};var Mc,Nc,Oc,Pc,Qc,Rc,Sc,Tc,Uc,Vc,Wc;
(function(){function a(){return{m:0,M:0}}function b(){return[]}function c(){var a=function(b){b=g.call(a.src,a.key,b);if(!b)return b};return a}function d(){return new Kc}function e(){return new Dc}var f=Ic&&!(Ja(Jc,"5.7")>=0),g;Rc=function(a){g=a};if(f){Mc=function(){return Fc(i)};Nc=function(a){Hc(i,a)};Oc=function(){return Fc(n)};Pc=function(a){Hc(n,a)};Qc=function(){return Fc(m)};Sc=function(){Hc(m,c())};Tc=function(){return Fc(s)};Uc=function(a){Hc(s,a)};Vc=function(){return Fc(q)};Wc=function(a){Hc(q,
a)};var i=new Ec(0,600);i.a=a;var n=new Ec(0,600);n.a=b;var m=new Ec(0,600);m.a=c;var s=new Ec(0,600);s.a=d;var q=new Ec(0,600);q.a=e}else Mc=a,Nc=ia,Oc=b,Pc=ia,Qc=c,Sc=ia,Tc=d,Uc=ia,Vc=e,Wc=ia})();var Xc={},R={},Yc={},Zc={},$c=function(a,b,c,d,e){if(b)if(ka(b)){for(var f=0;f<b.length;f++)$c(a,b[f],c,d,e);return l}else{var d=!!d,g=R;b in g||(g[b]=Mc());g=g[b];d in g||(g[d]=Mc(),g.m++);var g=g[d],i=sa(a),n;g.M++;if(g[i]){n=g[i];for(f=0;f<n.length;f++)if(g=n[f],g.T==c&&g.ka==e){if(g.N)break;return n[f].key}}else n=g[i]=Oc(),g.m++;f=Qc();f.src=a;g=Tc();g.O(c,f,a,b,d,e);c=g.key;f.key=c;n.push(g);Xc[c]=g;Yc[i]||(Yc[i]=Oc());Yc[i].push(g);a.addEventListener?(a==w||!a.Ua)&&a.addEventListener(b,f,d):
a.attachEvent(b in Zc?Zc[b]:Zc[b]="on"+b,f);return c}else h(Error("Invalid event type"))},ad=function(a,b,c,d,e){if(ka(b))for(var f=0;f<b.length;f++)ad(a,b[f],c,d,e);else{d=!!d;a:{f=R;if(b in f&&(f=f[b],d in f&&(f=f[d],a=sa(a),f[a]))){a=f[a];break a}a=l}if(a)for(f=0;f<a.length;f++)if(a[f].T==c&&a[f].capture==d&&a[f].ka==e){bd(a[f].key);break}}},bd=function(a){if(!Xc[a])return t;var b=Xc[a];if(b.N)return t;var c=b.src,d=b.type,e=b.b,f=b.capture;c.removeEventListener?(c==w||!c.Ua)&&c.removeEventListener(d,
e,f):c.detachEvent&&c.detachEvent(d in Zc?Zc[d]:Zc[d]="on"+d,e);c=sa(c);e=R[d][f][c];if(Yc[c]){var g=Yc[c];Qa(g,b);g.length==0&&delete Yc[c]}b.N=k;e.Wa=k;cd(d,f,c,e);delete Xc[a];return k},cd=function(a,b,c,d){if(!d.ea&&d.Wa){for(var e=0,f=0;e<d.length;e++)if(d[e].N){var g=d[e].b;g.src=l;Sc(g);Uc(d[e])}else e!=f&&(d[f]=d[e]),f++;d.length=f;d.Wa=t;f==0&&(Pc(d),delete R[a][b][c],R[a][b].m--,R[a][b].m==0&&(Nc(R[a][b]),delete R[a][b],R[a].m--),R[a].m==0&&(Nc(R[a]),delete R[a]))}},dd=function(a,b,c){var d=
0,e=b==l,f=c==l,c=!!c;if(a==l)Ya(Yc,function(a){for(var g=a.length-1;g>=0;g--){var i=a[g];if((e||b==i.type)&&(f||c==i.capture))bd(i.key),d++}});else if(a=sa(a),Yc[a])for(var a=Yc[a],g=a.length-1;g>=0;g--){var i=a[g];if((e||b==i.type)&&(f||c==i.capture))bd(i.key),d++}return d},fd=function(a,b,c,d,e){var f=1,b=sa(b);if(a[b]){a.M--;a=a[b];a.ea?a.ea++:a.ea=1;try{for(var g=a.length,i=0;i<g;i++){var n=a[i];n&&!n.N&&(f&=ed(n,e)!==t)}}finally{a.ea--,cd(c,d,b,a)}}return Boolean(f)},ed=function(a,b){var c=
a.handleEvent(b);a.Na&&bd(a.key);return c};
Rc(function(a,b){if(!Xc[a])return k;var c=Xc[a],d=c.type,e=R;if(!(d in e))return k;var e=e[d],f,g;zc===j&&(zc=J&&!w.addEventListener);if(zc){f=b||ha("window.event");var i=k in e,n=t in e;if(i){if(f.keyCode<0||f.returnValue!=j)return k;a:{var m=t;if(f.keyCode==0)try{f.keyCode=-1;break a}catch(s){m=k}if(m||f.returnValue==j)f.returnValue=k}}m=Vc();m.O(f,this);f=k;try{if(i){for(var q=Oc(),L=m.a;L;L=L.parentNode)q.push(L);g=e[k];g.M=g.m;for(var v=q.length-1;!m.b&&v>=0&&g.M;v--)m.a=q[v],f&=fd(g,q[v],d,
k,m);if(n){g=e[t];g.M=g.m;for(v=0;!m.b&&v<q.length&&g.M;v++)m.a=q[v],f&=fd(g,q[v],d,t,m)}}else f=ed(c,m)}finally{if(q)q.length=0,Pc(q);m.q();Wc(m)}return f}d=new Dc(b,this);try{f=ed(c,d)}finally{d.q()}return f});var gd=function(){this.e={}};C(gd,jc);gd.prototype.f=Q("goog.messaging.AbstractChannel");gd.prototype.w=function(a){a&&a()};gd.prototype.r=function(){return k};gd.prototype.g=function(){gd.j.g.call(this);lc(this.f);delete this.f;delete this.e;delete this.p};var hd=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([\\w\\d\\-\\u0100-\\uffff.%]*)(?::([0-9]+))?)?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$"),id=function(a){var b=a.match(hd),a=b[1],c=b[2],d=b[3],b=b[4],e=[];a&&e.push(a,":");d&&(e.push("//"),c&&e.push(c,"@"),e.push(d),b&&e.push(":",b));return e.join("")};var jd={1:"NativeMessagingTransport",2:"FrameElementMethodTransport",3:"IframeRelayTransport",4:"IframePollingTransport",5:"FlashTransport",6:"NixTransport"},kd=["pu","lru","pru","lpu","ppu"],ld={},nd=function(){for(var a=10,b=md,c=b.length,d="";a-- >0;)d+=b.charAt(Math.floor(Math.random()*c));return d},md="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",N=Q("goog.net.xpc");var od=function(a){this.b=a||qc()};C(od,jc);od.prototype.L=0;var S=function(a){return a.b.a.parentWindow||a.b.a.defaultView};var pd=function(a,b){this.b=b||qc();this.d=a;this.c=[];this.h=z(this.Kb,this)};C(pd,od);u=pd.prototype;u.L=2;u.la=t;u.Pb=0;u.w=function(){qd(this.d)==0?(this.a=this.d.K,this.a.XPC_toOuter=z(this.La,this)):this.Ka()};
u.Ka=function(){var a=k;try{if(!this.a)this.a=S(this).frameElement;if(this.a&&this.a.XPC_toOuter)this.e=this.a.XPC_toOuter,this.a.XPC_toOuter.XPC_toInner=z(this.La,this),a=t,this.send("tp","SETUP_ACK"),rd(this.d)}catch(b){N.log(K,"exception caught while attempting setup: "+b,j)}if(a){if(!this.f)this.f=z(this.Ka,this);S(this).setTimeout(this.f,100)}};u.ja=function(a){qd(this.d)==0&&!this.d.r()&&a=="SETUP_ACK"?(this.e=this.a.XPC_toOuter.XPC_toInner,rd(this.d)):h(Error("Got unexpected transport message."))};
u.La=function(a,b){if(!this.la&&this.c.length==0)this.d.z(a,b);else if(this.c.push({Ob:a,na:b}),this.c.length==1)this.Pb=S(this).setTimeout(this.h,1)};u.Kb=function(){for(;this.c.length;){var a=this.c.shift();this.d.z(a.Ob,a.na)}};u.send=function(a,b){this.la=k;this.e(a,b);this.la=t};u.g=function(){pd.j.g.call(this);this.a=this.e=l};var V=function(a,b){this.b=b||qc();this.d=a;this.R=this.d.a.ppu;this.Eb=this.d.a.lpu;this.F=[]},sd,td;C(V,od);V.prototype.L=4;V.prototype.D=0;V.prototype.Q=t;V.prototype.p=t;var ud=function(a){return"googlexpc_"+a.d.name+"_msg"},vd=function(a){return"googlexpc_"+a.d.name+"_ack"};
V.prototype.w=function(){O("transport connect called");if(!this.p){O("initializing...");var a=ud(this);this.e=wd(this,a);this.S=S(this).frames[a];a=vd(this);this.a=wd(this,a);this.I=S(this).frames[a];this.p=k}if(!xd(this,ud(this))||!xd(this,vd(this))){P("foreign frames not (yet) present");if(qd(this.d)==1&&!this.Fb)P("innerPeerReconnect called"),this.d.name=nd(),P("switching channels: "+this.d.name),yd(this),this.p=t,this.Fb=wd(this,"googlexpc_reconnect_"+this.d.name);else if(qd(this.d)==0){P("outerPeerReconnect called");
for(var a=this.d.n.frames,b=a.length,c=0;c<b;c++){var d;try{if(a[c]&&a[c].name)d=a[c].name}catch(e){}if(d){var f=d.split("_");if(f.length==3&&f[0]=="googlexpc"&&f[1]=="reconnect"){this.d.name=f[2];yd(this);this.p=t;break}}}}S(this).setTimeout(z(this.w,this),100)}else O("foreign frames present"),this.Ja=new zd(this,this.d.n.frames[ud(this)],z(this.Hb,this)),this.Ia=new zd(this,this.d.n.frames[vd(this)],z(this.Gb,this)),this.Ha()};
var wd=function(a,b){P("constructing sender frame: "+b);var c=document.createElement("iframe"),d=c.style;d.position="absolute";d.top="-10px";d.left="10px";d.width="1px";d.height="1px";c.id=c.name=b;c.src=a.R+"#INITIAL";S(a).document.body.appendChild(c);return c},yd=function(a){P("deconstructSenderFrames called");if(a.e)a.e.parentNode.removeChild(a.e),a.e=l,a.S=l;if(a.a)a.a.parentNode.removeChild(a.a),a.a=l,a.I=l},xd=function(a,b){P("checking for receive frame: "+b);try{var c=a.d.n.frames[b];if(!c||
c.location.href.indexOf(a.Eb)!=0)return t}catch(d){return t}return k};V.prototype.Ha=function(){var a=this.d.n.frames;if(!a[vd(this)]||!a[ud(this)]){if(!this.Va)this.Va=z(this.Ha,this);S(this).setTimeout(this.Va,100);O("local frames not (yet) present")}else this.Ta=new Ad(this.R,this.S),this.h=new Ad(this.R,this.I),O("local frames ready"),S(this).setTimeout(z(function(){this.Ta.send("SETUP");this.Q=this.ac=k;O("SETUP sent")},this),100)};
var Bd=function(a){if(a.oa&&a.Ra){if(rd(a.d),a.c){O("delivering queued messages ("+a.c.length+")");for(var b=0,c;b<a.c.length;b++)c=a.c[b],a.d.z(c.Qb,c.na);delete a.c}}else P("checking if connected: ack sent:"+a.oa+", ack rcvd: "+a.Ra)};
V.prototype.Hb=function(a){P("msg received: "+a);if(a=="SETUP"){if(this.h)this.h.send("SETUP_ACK"),P("SETUP_ACK sent"),this.oa=k,Bd(this)}else if(this.d.r()||this.oa){var b=a.indexOf("|"),c=a.substring(0,b),a=a.substring(b+1),b=c.indexOf(",");if(b==-1){var d;this.h.send("ACK:"+c);Cd(this,a)}else{d=c.substring(0,b);this.h.send("ACK:"+d);c=c.substring(b+1).split("/");b=parseInt(c[0],10);c=parseInt(c[1],10);if(b==1)this.ra=[];this.ra.push(a);b==c&&(Cd(this,this.ra.join("")),delete this.ra)}}else Wb(N,
"received msg, but channel is not connected")};V.prototype.Gb=function(a){P("ack received: "+a);a=="SETUP_ACK"?(this.Q=t,this.Ra=k,Bd(this)):this.d.r()?this.Q?parseInt(a.split(":")[1],10)==this.D?(this.Q=t,Dd(this)):Wb(N,"got ack with wrong sequence"):Wb(N,"got unexpected ack"):Wb(N,"received ack, but channel not connected")};
var Dd=function(a){if(!a.Q&&a.F.length){var b=a.F.shift();++a.D;a.Ta.send(a.D+b);P("msg sent: "+a.D+b);a.Q=k}},Cd=function(a,b){var c=b.indexOf(":"),d=b.substr(0,c),c=b.substring(c+1);a.d.r()?a.d.z(d,c):((a.c||(a.c=[])).push({Qb:d,na:c}),P("queued delivery"))};V.prototype.f=3800;V.prototype.send=function(a,b){var c=a+":"+b;if(!J||b.length<=this.f)this.F.push("|"+c);else for(var d=b.length,e=Math.ceil(d/this.f),f=0,g=1;f<d;)this.F.push(","+g+"/"+e+"|"+c.substr(f,this.f)),g++,f+=this.f;Dd(this)};
V.prototype.g=function(){V.j.g.call(this);var a=Ed;Qa(a,this.Ja);Qa(a,this.Ia);this.Ja=this.Ia=l;wc(this.e);wc(this.a);this.S=this.I=this.e=this.a=l};
var Ed=[],Fd=z(function(){var a=t;try{for(var b=0,c=Ed.length;b<c;b++){var d;if(!(d=a)){var e=Ed[b],f=e.b.location.href;if(f!=e.a){e.a=f;var g=f.split("#")[1];g&&(g=g.substr(1),e.c(decodeURIComponent(g)));d=k}else d=t}a=d}}catch(i){if(N.info("receive_() failed: "+i),b=Ed[b].e.d,N.info("Transport Error"),b.close(),!Ed.length)return}b=A();a&&(sd=b);td=window.setTimeout(Fd,b-sd<1E3?10:100)},V),Gd=function(){O("starting receive-timer");sd=A();td&&window.clearTimeout(td);td=window.setTimeout(Fd,10)},Ad=
function(a,b){this.c=a;this.b=b;this.a=0};Ad.prototype.send=function(a){this.a=++this.a%2;a=this.c+"#"+this.a+encodeURIComponent(a);try{rb?this.b.location.href=a:this.b.location.replace(a)}catch(b){N.log(K,"sending failed",b)}Gd()};var zd=function(a,b,c){this.e=a;this.b=b;this.c=c;this.a=this.b.location.href.split("#")[0]+"#INITIAL";Ed.push(this);Gd()};var Id=function(a,b){this.b=b||qc();this.d=a;this.c=this.d.a.pru;this.a=this.d.a.ifrid;rb&&Hd()};C(Id,od);if(rb)var Jd=[],Kd=0,Hd=function(){Kd||(Kd=window.setTimeout(function(){Ld()},1E3))},Ld=function(a){for(var b=A(),a=a||3E3;Jd.length&&b-Jd[0].timestamp>=a;){var c=Jd.shift().Ib;wc(c);P("iframe removed")}Kd=window.setTimeout(Md,1E3)},Md=function(){Ld()};var Nd={};Id.prototype.L=3;Id.prototype.w=function(){S(this).xpcRelay||(S(this).xpcRelay=Od);this.send("tp","SETUP")};
var Od=function(a,b){var c=b.indexOf(":"),d=b.substr(0,c),e=b.substr(c+1);if(!J||(c=d.indexOf("|"))==-1)var f=d;else{var f=d.substr(0,c),d=d.substr(c+1),c=d.indexOf("+"),g=d.substr(0,c),c=parseInt(d.substr(c+1),10),i=Nd[g];i||(i=Nd[g]={jb:[],kb:0,ib:0});if(d.indexOf("++")!=-1)i.ib=c+1;i.jb[c]=e;i.kb++;if(i.kb!=i.ib)return;e=i.jb.join("");delete Nd[g]}ld[a].z(f,decodeURIComponent(e))};Id.prototype.ja=function(a){a=="SETUP"?(this.send("tp","SETUP_ACK"),rd(this.d)):a=="SETUP_ACK"&&rd(this.d)};
Id.prototype.send=function(a,b){var c=encodeURIComponent(b),d=c.length;if(J&&d>1800)for(var e=Ha(),f=0,g=0;f<d;g++){var i=c.substr(f,1800);f+=1800;Pd(this,a,i,e+(f>=d?"++":"+")+g)}else Pd(this,a,c)};
var Pd=function(a,b,c,d){if(J){var e=S(a).document.createElement("div");e.innerHTML='<iframe onload="this.xpcOnload()"></iframe>';e=e.childNodes[0];e.xpcOnload=Qd}else e=S(a).document.createElement("iframe"),rb?Jd.push({timestamp:A(),Ib:e}):$c(e,"load",Qd);var f=e.style;f.visibility="hidden";f.width=e.style.height="0px";f.position="absolute";f=a.c;f+="#"+a.d.name;a.a&&(f+=","+a.a);f+="|"+b;d&&(f+="|"+d);f+=":"+c;e.src=f;S(a).document.body.appendChild(e);P("msg sent: "+f)},Qd=function(){P("iframe-load");
wc(this);this.a=l};Id.prototype.g=function(){Id.j.g.call(this);rb&&Ld(0)};var Rd=function(a,b,c){this.b=c||qc();this.d=a;this.Sa=b||"*"};C(Rd,od);Rd.prototype.a=t;Rd.prototype.L=1;
var Sd={},Td=function(a){var b=a.G.data;if(!x(b))return t;var c=b.indexOf("|"),d=b.indexOf(":");if(c==-1||d==-1)return t;var e=b.substring(0,c),c=b.substring(c+1,d),b=b.substring(d+1);O("messageReceived: channel="+e+", service="+c+", payload="+b);if(d=ld[e])return d.z(c,b,a.G.origin),k;for(var f in ld)if(a=ld[f],qd(a)==1&&!a.r()&&c=="tp"&&b=="SETUP")return O("changing channel name to "+e),a.name=e,delete ld[f],ld[e]=a,a.z(c,b),k;N.info('channel name mismatch; message ignored"');return t};u=Rd.prototype;
u.ja=function(a){switch(a){case "SETUP":this.send("tp","SETUP_ACK");break;case "SETUP_ACK":rd(this.d)}};u.w=function(){var a=S(this),b=sa(a),c=Sd[b];typeof c=="number"||(c=0);c==0&&$c(a.postMessage?a:a.document,"message",Td,t,Rd);Sd[b]=c+1;this.a=k;this.Pa()};u.Pa=function(){!this.d.r()&&!this.u&&(this.send("tp","SETUP"),S(this).setTimeout(z(this.Pa,this),100))};
u.send=function(a,b){var c=this.d.n;if(c){var d=c.postMessage?c:c.document;this.send=function(a,b){O("send(): payload="+b+" to hostname="+this.Sa);d.postMessage(this.d.name+"|"+a+":"+b,this.Sa)};this.send(a,b)}else O("send(): window not ready")};u.g=function(){Rd.j.g.call(this);if(this.a){var a=S(this),b=sa(a),c=Sd[b];Sd[b]=c-1;c==1&&ad(a.postMessage?a:a.document,"message",Td,t,Rd)}delete this.send};var Ud=function(a,b){this.b=b||qc();this.d=a;this.a=a.at||"";this.c=a.rat||"";var c=S(this);if(!c.nix_setup_complete)try{c.execScript("Class GCXPC____NIXVBS_wrapper\n Private m_Transport\nPrivate m_Auth\nPublic Sub SetTransport(transport)\nIf isEmpty(m_Transport) Then\nSet m_Transport = transport\nEnd If\nEnd Sub\nPublic Sub SetAuth(auth)\nIf isEmpty(m_Auth) Then\nm_Auth = auth\nEnd If\nEnd Sub\nPublic Function GetAuthToken()\n GetAuthToken = m_Auth\nEnd Function\nPublic Sub SendMessage(service, payload)\n Call m_Transport.GCXPC____NIXJS_handle_message(service, payload)\nEnd Sub\nPublic Sub CreateChannel(channel)\n Call m_Transport.GCXPC____NIXJS_create_channel(channel)\nEnd Sub\nPublic Sub GCXPC____NIXVBS_container()\n End Sub\nEnd Class\n Function GCXPC____NIXVBS_get_wrapper(transport, auth)\nDim wrap\nSet wrap = New GCXPC____NIXVBS_wrapper\nwrap.SetTransport transport\nwrap.SetAuth auth\nSet GCXPC____NIXVBS_get_wrapper = wrap\nEnd Function",
"vbscript"),c.nix_setup_complete=k}catch(d){N.log(K,"exception caught while attempting global setup: "+d,j)}this.GCXPC____NIXJS_handle_message=this.Db;this.GCXPC____NIXJS_create_channel=this.Cb};C(Ud,od);u=Ud.prototype;u.L=6;u.P=t;u.C=l;u.w=function(){qd(this.d)==0?this.Qa():this.Ma()};
u.Qa=function(){if(!this.P){var a=this.d.K;try{a.contentWindow.opener=S(this).GCXPC____NIXVBS_get_wrapper(this,this.a),this.P=k}catch(b){N.log(K,"exception caught while attempting setup: "+b,j)}this.P||S(this).setTimeout(z(this.Qa,this),100)}};
u.Ma=function(){if(!this.P){try{var a=S(this).opener;if(a&&"GCXPC____NIXVBS_container"in a){this.C=a;if(this.C.GetAuthToken()!=this.c){N.log(K,"Invalid auth token from other party",j);return}this.C.CreateChannel(S(this).GCXPC____NIXVBS_get_wrapper(this,this.a));this.P=k;rd(this.d)}}catch(b){N.log(K,"exception caught while attempting setup: "+b,j);return}this.P||S(this).setTimeout(z(this.Ma,this),100)}};
u.Cb=function(a){(typeof a!="unknown"||!("GCXPC____NIXVBS_container"in a))&&N.log(K,"Invalid NIX channel given to createChannel_",j);this.C=a;this.C.GetAuthToken()!=this.c?N.log(K,"Invalid auth token from other party",j):rd(this.d)};u.Db=function(a,b){S(this).setTimeout(z(function(){this.d.z(a,b)},this),1)};u.send=function(a,b){typeof this.C!=="unknown"&&N.log(K,"NIX channel not connected",j);this.C.SendMessage(a,b)};u.g=function(){Ud.j.g.call(this);this.C=l};var Wd=function(a,b){this.e={};for(var c=0,d;d=kd[c];c++)d in a&&!/^https?:\/\//.test(a[d])&&h(Error("URI "+a[d]+" is invalid for field "+d));this.a=a;this.name=this.a.cn||nd();this.b=b||qc();this.c=[];a.lpu=a.lpu||id((this.b.a.parentWindow||this.b.a.defaultView).location.href)+"/robots.txt";a.ppu=a.ppu||id(a.pu||"")+"/robots.txt";ld[this.name]=this;$c(window,"unload",Vd);N.info("CrossPageChannel created: "+this.name)};C(Wd,gd);var Xd=/^%*tp$/,Yd=/^%+tp$/;u=Wd.prototype;u.l=l;u.qa=1;
u.r=function(){return this.qa==2};u.n=l;u.K=l;u.pb=t;u.U=t;
u.w=function(a){this.h=a||ia;if(this.pb)N.info("connect() deferred"),this.U=k;else{this.U=t;N.info("connect()");if(this.a.ifrid)this.K=this.b.B(this.a.ifrid);if(this.K)(a=this.K.contentWindow)||(a=window.frames[this.a.ifrid]),this.n=a;if(!this.n)window==top?h(Error("CrossPageChannel: Can't connect, peer window-object not set.")):this.n=window.parent;if(!this.l){if(!this.a.tp){var a=this.a,b;if(oa(document.postMessage)||oa(window.postMessage)||J&&window.postMessage)b=1;else if(qb)b=2;else if(J&&this.a.pru)b=
3;else{var c;if(c=J){c=t;try{b=window.opener,window.opener={},c=yc(window,"opener"),window.opener=b}catch(d){}}b=c?6:4}a.tp=b}switch(this.a.tp){case 1:this.l=new Rd(this,this.a.ph,this.b);break;case 6:this.l=new Ud(this,this.b);break;case 2:this.l=new pd(this,this.b);break;case 3:this.l=new Id(this,this.b);break;case 4:this.l=new V(this,this.b)}this.l?N.info("Transport created: "+(jd[this.l.L]||"")):h(Error("CrossPageChannel: No suitable transport found!"))}for(this.l.w();this.c.length>0;)this.c.shift()()}};
u.close=function(){if(this.r())this.qa=3,this.l.q(),this.h=this.l=l,this.U=t,this.c.length=0,N.info('Channel "'+this.name+'" closed')};var rd=function(a){if(!a.r())a.qa=2,N.info('Channel "'+a.name+'" connected'),a.h()};Wd.prototype.send=function(a,b){this.r()?Boolean(this.n.closed)?(N.log(K,"Peer has disappeared.",j),this.close()):(pa(b)&&(b=cc(b)),this.l.send(Zd(a),b)):N.log(K,"Can't send. Channel not connected.",j)};
Wd.prototype.z=function(a,b,c){if(this.U)this.c.push(z(this.z,this,a,b,c));else{var d=this.a.ph;if(/^[\s\xa0]*$/.test(c==l?"":String(c))||/^[\s\xa0]*$/.test(d==l?"":String(d))||c==this.a.ph)if(this.u)Wb(N,"CrossPageChannel::deliver_(): Disposed.");else if(!a||a=="tp")this.l.ja(b);else if(this.r()){if(a=a.replace(/%[0-9a-f]{2}/gi,decodeURIComponent),a=Yd.test(a)?a.substring(1):a,c=this.e[a],c||(this.p?(c=wa(this.p,a),d=pa(b),c={ga:c,ha:d}):(Wb(this.f,'Unknown service name "'+a+'"'),c=l)),c){var e;
a:{if((d=c.ha)&&x(b))try{e=$b(b);break a}catch(f){Wb(this.f,"Expected JSON payload for "+a+', was "'+b+'"');e=l;break a}else if(!d&&!x(b)){e=cc(b);break a}e=b}e!=l&&c.ga(e)}}else N.info("CrossPageChannel::deliver_(): Not connected.");else Wb(N,'Message received from unapproved origin "'+c+'" - rejected.')}};var Zd=function(a){Xd.test(a)&&(a="%"+a);return a.replace(/[%:|]/g,encodeURIComponent)},qd=function(a){return window.parent==a.n?1:0};
Wd.prototype.g=function(){Wd.j.g.call(this);this.close();this.K=this.n=l;delete ld[this.name];this.c.length=0};var Vd=function(){for(var a in ld){var b=ld[a];b&&b.q()}};var $d=function(){};C($d,jc);u=$d.prototype;u.Ua=k;u.Za=l;u.sa=function(a){this.Za=a};u.addEventListener=function(a,b,c,d){$c(this,a,b,c,d)};u.removeEventListener=function(a,b,c,d){ad(this,a,b,c,d)};u.g=function(){$d.j.g.call(this);dd(this);this.Za=l};var ae=w.window,be=function(a,b){oa(a)||(a&&typeof a.handleEvent=="function"?a=z(a.handleEvent,a):h(Error("Invalid listener argument")));b>2147483647||ae.setTimeout(a,b||0)};var ce=function(a){if("isOnce"in a)return a;var b=t,c=function(){b&&h(Error("already called: "+a));b=k;a.apply(w,arguments)};c.isOnce=k;return c},de=function(a){if("isAsyncOnce"in a)return a;var b=ce(function(){var b=arguments;window.setTimeout(function(){a.apply(w,b)},0)});b.isAsyncOnce=k;return b},ee=function(a,b){var c=A()+1E4,d=function(){var e;try{e=a()}catch(f){return b(t,f)}if(e)return b(k);if(c&&A()+100>c)return b(t);be(d,100)};be(d,0)},fe=function(a,b){var c=ia;Oa(Va(arguments,1),function(b){c=
z(b,a,c)});c()};var ge=function(a){return window.JSON?window.JSON.stringify(a):cc(a)};var ve;
(function(){function a(a){a=a.match(/[\d]+/g);a.length=3;return a.join(".")}var b=t,c="";if(navigator.plugins&&navigator.plugins.length){var d=navigator.plugins["Shockwave Flash"];d&&(b=k,d.description&&(c=a(d.description)));navigator.plugins["Shockwave Flash 2.0"]&&(b=k,c="2.0.0.11")}else if(navigator.mimeTypes&&navigator.mimeTypes.length)(b=(d=navigator.mimeTypes["application/x-shockwave-flash"])&&d.enabledPlugin)&&(c=a(d.enabledPlugin.description));else try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"),b=
k,c=a(d.GetVariable("$version"))}catch(e){try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),b=k,c="6.0.21"}catch(f){try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),b=k,c=a(d.GetVariable("$version"))}catch(g){}}}ve=c})();var we,xe,ye,ze,Ae,Be,Ce;Ce=Be=Ae=ze=ye=xe=we=t;var De=mb();De&&(De.indexOf("Firefox")!=-1?we=k:De.indexOf("Camino")!=-1?xe=k:De.indexOf("iPhone")!=-1||De.indexOf("iPod")!=-1?ye=k:De.indexOf("iPad")!=-1?ze=k:De.indexOf("Android")!=-1?Ae=k:De.indexOf("Chrome")!=-1?Be=k:De.indexOf("Safari")!=-1&&(Ce=k));var Ee=we,Fe=xe,Ge=ye,He=ze,Ie=Ae,Je=Be,Ke=Ce;var Le;a:{var Me="",Ne,Oe;if(Ee)Ne=/Firefox\/([0-9.]+)/;else if(J||pb){Le=Cb;break a}else Je?Ne=/Chrome\/([0-9.]+)/:Ke?Ne=/Version\/([0-9.]+)/:Ge||He?(Ne=/Version\/(\S+).*Mobile\/(\S+)/,Oe=k):Ie?Ne=/Android\s+([0-9.]+)(?:.*Version\/([0-9.]+))?/:Fe&&(Ne=/Camino\/([0-9.]+)/);if(Ne)var Pe=Ne.exec(mb()),Me=Pe?Oe?Pe[1]+"."+Pe[2]:Pe[2]||Pe[1]:"";Le=Me}var Qe=Le;var Re="NONE";Ja(ve,"9")>=0&&(Re="FLASH");Ee&&Ja(Qe,"3.6")>=0&&(Re="CANVAS");Ee&&Ja(Qe,"3.5")>=0&&!ub&&(Re="CANVAS");if(Ke||Je)Re="CANVAS";var Se={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",
darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",
ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",
lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",
moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",
seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};var Xe=function(a){var b={},a=String(a),c=a.charAt(0)=="#"?a:"#"+a;if(Te.test(c))return b.va=Ue(c),b.type="hex",b;else{a:{var d=a.match(Ve);if(d){var c=Number(d[1]),e=Number(d[2]),d=Number(d[3]);if(c>=0&&c<=255&&e>=0&&e<=255&&d>=0&&d<=255){c=[c,e,d];break a}}c=[]}if(c.length)return e=c[0],a=c[1],c=c[2],e=Number(e),a=Number(a),c=Number(c),(isNaN(e)||e<0||e>255||isNaN(a)||a<0||a>255||isNaN(c)||c<0||c>255)&&h(Error('"('+e+","+a+","+c+'") is not a valid RGB color')),e=We(e.toString(16)),a=We(a.toString(16)),
c=We(c.toString(16)),b.va="#"+e+a+c,b.type="rgb",b;else if(Se&&(c=Se[a.toLowerCase()]))return b.va=c,b.type="named",b}h(Error(a+" is not a valid color string"))},Ye=/#(.)(.)(.)/,Ue=function(a){Te.test(a)||h(Error("'"+a+"' is not a valid hex color"));a.length==4&&(a=a.replace(Ye,"#$1$1$2$2$3$3"));return a.toLowerCase()},Te=/^#(?:[0-9a-f]{3}){1,2}$/i,Ve=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i,We=function(a){return a.length==1?"0"+a:a};var Ze=function(a){this.b=a;this.a=[]};C(Ze,jc);var $e=[],af=function(a){F(a.a,bd);a.a.length=0};Ze.prototype.g=function(){Ze.j.g.call(this);af(this)};Ze.prototype.handleEvent=function(){h(Error("EventHandler.handleEvent not implemented"))};var bf=function(a){typeof a=="number"&&(a=Math.round(a)+"px");return a};var cf=function(){};(function(a){a.mb=function(){return a.Vb||(a.Vb=new a)}})(cf);cf.prototype.a=0;cf.mb();var W=function(a){this.c=a||qc();this.Ub=df};C(W,$d);W.prototype.S=cf.mb();var df=l;u=W.prototype;u.X=l;u.H=t;u.s=l;u.Ub=l;u.Mb=l;u.v=l;u.ba=l;u.A=l;u.Nb=t;var ef=function(a){return a.X||(a.X=":"+(a.S.a++).toString(36))};u=W.prototype;u.B=function(){return this.s};u.sa=function(a){this.v&&this.v!=a&&h(Error("Method not supported"));W.j.sa.call(this,a)};u.Oa=function(){this.s=this.c.a.createElement("div")};
u.Y=function(a,b){this.H&&h(Error("Component already rendered"));this.s||this.Oa();a?a.insertBefore(this.s,b||l):this.c.a.body.appendChild(this.s);(!this.v||this.v.H)&&this.W()};u.W=function(){this.H=k;ff(this,function(a){!a.H&&a.B()&&a.W()})};var gf=function(a){ff(a,function(a){a.H&&gf(a)});a.b&&af(a.b);a.H=t};
W.prototype.g=function(){W.j.g.call(this);this.H&&gf(this);this.b&&(this.b.q(),delete this.b);ff(this,function(a){a.q()});!this.Nb&&this.s&&wc(this.s);this.v=this.Mb=this.s=this.A=this.ba=l};var ff=function(a,b){a.ba&&F(a.ba,b,j)};
W.prototype.removeChild=function(a,b){if(a){var c=x(a)?a:ef(a),a=this.A&&c?(c in this.A?this.A[c]:j)||l:l;if(c&&a){var d=this.A;c in d&&delete d[c];Qa(this.ba,a);b&&(gf(a),a.s&&wc(a.s));c=a;c==l&&h(Error("Unable to set parent component"));c.v=l;W.j.sa.call(c,l)}}a||h(Error("Child is not in parent component"));return a};var X=function(a,b){W.call(this,b);this.R=a;this.e=new Ze(this);this.a=new bb};C(X,W);X.prototype.k=Q("goog.ui.media.FlashObject");X.prototype.I="window";X.prototype.D="#000000";X.prototype.F="sameDomain";var hf=function(a,b,c){a.p=x(b)?b:Math.round(b)+"px";a.f=x(c)?c:Math.round(c)+"px";if(a.B())b=a.B()?a.B().firstChild:l,c=a.p,a=a.f,c instanceof hc?(a=c.height,c=c.width):a==j&&h(Error("missing height argument")),b.style.width=bf(c),b.style.height=bf(a)};
X.prototype.W=function(){X.j.W.call(this);var a=this.B(),b;b=J?'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" id="%s" name="%s" class="%s"><param name="movie" value="%s"/><param name="quality" value="high"/><param name="FlashVars" value="%s"/><param name="bgcolor" value="%s"/><param name="AllowScriptAccess" value="%s"/><param name="allowFullScreen" value="true"/><param name="SeamlessTabbing" value="false"/>%s</object>':'<embed quality="high" id="%s" name="%s" class="%s" src="%s" FlashVars="%s" bgcolor="%s" AllowScriptAccess="%s" allowFullScreen="true" SeamlessTabbing="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" %s></embed>';
for(var c=J?'<param name="wmode" value="%s"/>':"wmode=%s",c=ya(c,this.I),d=cb(this.a),e=db(this.a),f=[],g=0;g<d.length;g++){var i=Aa(d[g]),n=Aa(e[g]);f.push(i+"="+n)}b=ya(b,ef(this),ef(this),"goog-ui-media-flash-object",Ga(this.R),Ga(f.join("&")),this.D,this.F,c);a.innerHTML=b;this.p&&this.f&&hf(this,this.p,this.f);a=this.e;b=this.B();c=Za(Cc);ka(c)||($e[0]=c,c=$e);for(d=0;d<c.length;d++)a.a.push($c(b,c[d],Bc||a,t,a.b||a))};
X.prototype.Oa=function(){this.h!=l&&!(Ja(ve,this.h)>=0)&&(Wb(this.k,"Required flash version not found:"+this.h),h(Error("Method not supported")));var a=this.c.a.createElement("div");a.className="goog-ui-media-flash";this.s=a};X.prototype.g=function(){X.j.g.call(this);this.a=l;this.e.q();this.e=l};var Y={Tb:"GfVisibleFlash",cd:"GfVisibleLog",cc:"GfAllowUnsupportedPages",bc:"GfAllowUnsupportedBrowsers",bd:"GfUseSimpleFlow"};Y.O=function(){var a=w.GOOGLE_FEEDBACK_FLAGS,b=Y.fa;if(!Y.fa)Y.fa={},b=Y;Ya(b,function(b,d){x(b)&&(Y.fa[d]=b,Y[d]=a&&b in a?!!a[b]:window.location.href.indexOf(b)!=-1?k:t)})};Y.Yb=function(){var a={};Ya(Y.fa,function(b,c){Y[c]&&(a[b]=k)});return a};Y.O();var jf=[{x:0,y:0,width:12,height:12},{x:12,y:0,width:12,height:12},{x:24,y:0,width:12,height:12},{x:36,y:0,width:12,height:12},{x:0,y:12,width:13,height:13},{x:13,y:12,width:13,height:13},{x:26,y:12,width:13,height:13},{x:39,y:12,width:13,height:13}];var kf=function(){};kf.prototype.aa=ia;var lf=function(a){a.da("data:image/png;base64,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")},
mf=function(a,b,c){b=jf[b];a.ta("data:image/png;base64,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",
new ic(c.x,c.y,b.width,b.height),-b.x+"px "+-b.y+"px",t,t)};var nf=function(a,b,c){this.k=Q("userfeedback.render.canvas.FlashCanvas");this.c=!!c;"GF_FLASH_CANVAS_URL"in w||(this.k.info("GF_FLASH_CANVAS_URL not set"),h(Error("GF_FLASH_CANVAS_URL not set")));var d=w.GF_FLASH_CANVAS_URL;this.e=Ha().replace(/-/g,"_");this.k.info("Creating Flash Canvas "+this.e+" thumbnailMode="+this.c+", src="+d);this.J=new hc(a,b);this.b=l;var d=this.a=new X(d),e="GOOGLE_FEEDBACK_FLASH_CANVAS_"+this.e;if(d.v&&d.v.A){var f=d.v.A,g=d.X;g in f&&delete f[g];f=d.v.A;e in f&&h(Error('The object already contains the key "'+
e+'"'));f[e]=d}d.X=e;this.a.F=this.c?"never":"sameDomain";this.a.I=this.c?"opaque":"transparent";hf(this.a,a,b);this.a.h="9";this.a.D="#ffffff";this.c&&this.a.a.set("src",c);this.i=l};C(nf,kf);
var pf=function(a,b){a.k.info("create() called");var b=de(b),c=of(a);a.a.Y(c);a.i=x("GOOGLE_FEEDBACK_FLASH_CANVAS_"+a.e)?document.getElementById("GOOGLE_FEEDBACK_FLASH_CANVAS_"+a.e):"GOOGLE_FEEDBACK_FLASH_CANVAS_"+a.e;a.c?b(a):ee(z(a.h,a),z(function(a){a?(lf(this),b(this)):(this.k.info("Timed out while waiting for FlashCanvas"),this.aa(),b(l,"Timed out while waiting for FlashCanvas"))},a))};
nf.prototype.h=function(){try{if(this.i.flashCanvasIsReady&&!this.f)this.f=k,this.k.info("Flash object ready method exists");var a=this.i.flashCanvasIsReady();if(a&&!this.u)this.u=k,this.k.info("Flash object ready method returns true");return a}catch(b){return t}};
nf.prototype.aa=function(){this.k.info("destroy() called");try{this.f&&this.i.flashCanvasDestroy()}catch(a){this.k.info("exception in flashCanvasDestroy",a)}if(this.b){try{document.body.removeChild(this.b)}catch(b){this.k.info("exception when removing div",b)}this.b=l}this.a=this.i=l};var of=function(a){a.b=Y.Tb?uc("div",{style:"width:100px;height:100px;border:2px dotted yellow;"}):uc("div",{style:"position:absolute;top:0;left:0;"});document.body.appendChild(a.b);return a.b};u=nf.prototype;u.da=function(a){this.i.flashCanvasPreloadImage(a)};
u.Ya=function(a){return this.i.flashCanvasIsImageReady(a)};u.ta=function(a,b,c,d,e){this.i.flashCanvasTileImage(a,b.left,b.top,b.width,b.height,c,d,e)};u.pa=function(a,b){this.i.flashCanvasStretchImage(a,b.left,b.top,b.width,b.height)};u.bb=function(a,b,c,d,e){"transparent"!=e&&(e=qf(e),this.i.flashCanvasStrokeRect(a,b,c,d,e))};u.ab=function(a,b,c){this.fillRect(a,c[0])};u.fillRect=function(a,b){if("transparent"!=b){var c=qf(b);this.i.flashCanvasFillRect(a.left,a.top,a.width,a.height,c)}};
u.cb=function(a,b,c,d,e,f,g,i,n,m){"transparent"!=g&&(g=qf(g),this.i.flashCanvasDrawText(a,b,c,d,e,f,g,i=="bold"||parseInt(i,10)>=550,n,m))};u.$a=function(a,b,c){mf(this,a,new gc(b,c))};u.Xa=function(a){this.i.flashCanvasBeginHighlights();F(a,function(a){this.i.flashCanvasAddHighlight(a.left,a.top,a.width,a.height)},this);this.i.flashCanvasEndHighlights()};u.ca=function(a,b,c,d){this.i.flashCanvasPushClip(a,b,c,d)};u.fb=function(){this.i.flashCanvasPopClip()};u.eb=function(){this.i.flashCanvasPopAllClips()};
u.hb=function(){};u.gb=function(){};u.clear=function(){this.i.flashCanvasClear()};u.ma=function(a){a=de(a);ee(z(this.h,this),z(function(b){if(b){var c;try{c=this.i.flashCanvasToDataUrl(this.J.width,this.J.height)}catch(d){return a(l,d)}return a(c)}return a(l,"flashCanvasToDataUrl timed out")},this))};u.Z=function(a){this.J=a;hf(this.a,a.width,a.height)};
var qf=function(a){try{var b=Xe(a)}catch(c){return 16711680}a=b.va;a=Ue(a);a=[parseInt(a.substr(1,2),16),parseInt(a.substr(3,2),16),parseInt(a.substr(5,2),16)];return(a[0]<<16)+(a[1]<<8)+a[2]},rf=Q("FlashCanvas.swf"),sf=function(a){rf.info(a)},tf="GoogleFeedbackFlashCanvasLog".split("."),uf=w;!(tf[0]in uf)&&uf.execScript&&uf.execScript("var "+tf[0]);for(var vf;tf.length&&(vf=tf.shift());)!tf.length&&sf!==j?uf[vf]=sf:uf=uf[vf]?uf[vf]:uf[vf]={};var wf=function(a,b){this.b=document.createElement("canvas");this.a=this.b.getContext("2d");this.e=document.createElement("canvas");this.c=0;this.h=[];this.f=[];this.$=new bb;this.Z(new hc(a,b));lf(this)};C(wf,kf);u=wf.prototype;u.da=function(a){var b=new Image;b.onload=z(function(){b.width&&this.$.set(a,b)},this);b.src=a};u.Ya=function(a){return Object.prototype.hasOwnProperty.call(this.$.b,a)};
u.ta=function(a,b,c,d,e){if(a=this.$.get(a)){var f=c.split(" "),c=parseInt(f[0],10),g=parseInt(f[1],10);f[0].indexOf("%")!=-1&&(c*=0.01,c=Math.round(b.width*c-a.width*c));f[1].indexOf("%")!=-1&&(g*=0.01,g=Math.round(b.height*g-a.height*g));this.a.save();this.a.beginPath();this.a.rect(b.left,b.top,b.width,b.height);this.a.clip();this.a.beginPath();f="no-repeat";d&&e?(f="repeat",this.a.rect(b.left,b.top,b.width,b.height)):d?(f="repeat-x",this.a.rect(b.left,b.top+g,b.width,a.height)):e?(f="repeat-y",
this.a.rect(b.left+c,b.top,a.width,b.height)):this.a.rect(b.left+c,b.top+g,a.width,a.height);this.a.clip();try{this.a.fillStyle=this.a.createPattern(a,f),this.a.translate(b.left+c,b.top+g),this.a.fillRect(-c,-g,b.width,b.height)}finally{this.a.restore()}}};u.pa=function(a,b){var c=this.$.get(a);c&&this.a.drawImage(c,b.left,b.top,b.width,b.height)};u.bb=function(a,b,c,d,e){this.a.strokeStyle=e;this.a.strokeRect(Math.floor(a),Math.floor(b),c,d)};
u.ab=function(a,b,c){var d=this.a.createLinearGradient(b.left,b.top,b.width,b.height);if(c.length>1){var e=1/(c.length-1);F(c,function(a,b){d.addColorStop(b*e,a)})}else d.addColorStop(1,c[0]);this.a.fillStyle=d;this.a.fillRect(Math.floor(a.left),Math.floor(a.top),a.width,a.height)};u.fillRect=function(a,b){this.a.fillStyle=b;this.a.fillRect(Math.floor(a.left),Math.floor(a.top),a.width,a.height)};
u.cb=function(a,b,c,d,e,f,g,i,n,m){qb&&(c=Math.round(c+e/5));this.a.fillStyle=g;this.a.font=i+(n?" italic ":" ")+e+"px "+d;this.a.fillText(a,b,c);if(m)a=qb?-1.5:1.5-(e>>5),this.a.beginPath(),this.a.moveTo(b,c+e+a),this.a.lineTo(b+f,c+e+a),this.a.strokeStyle=g,this.a.stroke()};u.$a=function(a,b,c){mf(this,a,new gc(b,c))};
u.Xa=function(a){var b=this.e.getContext("2d");b.fillStyle="rgba(0, 0, 0, 0.4)";b.fillRect(0,0,this.b.width,this.b.height);F(a,function(a){b.clearRect(a.left,a.top,a.width,a.height)},this);this.a.drawImage(this.e,0,0)};u.ca=function(a,b,c,d){this.a.save();this.a.beginPath();this.a.rect(a,b,c,d);this.a.clip();this.c++};u.fb=function(){this.a.restore();this.c--};u.V=function(a,b){var c=document.createElement("CANVAS");c.width=a||300;c.height=b||150;return c};
u.hb=function(a){this.f.push(this.b);this.h.push(a);a=this.b;this.b=this.V(a.width,a.height);this.a=this.b.getContext("2d");this.a.textBaseline="top"};u.gb=function(){var a=this.b;this.b=this.f.pop();this.a=this.b.getContext("2d");this.a.globalAlpha=this.h.pop();this.a.drawImage(a,0,0);this.a.globalAlpha=1};u.eb=function(){for(;this.c;)this.a.restore(),this.c--};u.ma=function(a){a=de(a);try{var b=this.b.toDataURL("image/png");a(b)}catch(c){a(l,c)}};
u.Z=function(a){this.b.width=a.width;this.b.height=a.height;this.e.width=a.width;this.e.height=a.height;this.a.fillStyle="white";this.a.fillRect(0,0,a.width,a.height);this.a.textBaseline="top"};u.clear=function(){var a=new hc(this.b.width,this.b.height);this.b=document.createElement("canvas");this.a=this.b.getContext("2d");this.c=0;this.Z(a)};u.aa=function(){this.b=this.a=l};var yf=function(a){xf.info("Canvas size: 100 x 100");a=de(a);if("CANVAS"==Re){xf.info("Using HTML5 canvas");a:{var b=a,c;try{c=new wf(100,100)}catch(d){b(l,d);break a}b(c)}}else if("FLASH"==Re){xf.info("Using FlashCanvas");a:{c=a;try{b=new nf(100,100)}catch(e){c(l,e);break a}pf(b,c)}}else a(l,"Cannot create canvas for RenderingStrategy NONE")},xf=Q("userfeedback.render.canvas");var zf=l,Af=qb||rb||pb||typeof w.atob=="function";/*
Copyright (c) 2008, Adobe Systems Incorporated
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
Neither the name of Adobe Systems Incorporated nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
JPEG encoder ported to JavaScript and optimized by Andreas Ritter, www.bytestrom.eu, 11/2009
Basic GUI blocking jpeg encoder
v 0.9
*/
var Bf=function(){var a=20;function b(a,b){for(var c=0,d=0,e=[],f=1;f<=16;f++){for(var g=1;g<=a[f];g++)e[b[d]]=[],e[b[d]][0]=c,e[b[d]][1]=f,d++,c++;c*=2}return e}function c(a){for(var b=a[0],a=a[1]-1;a>=0;)b&1<<a&&(Sa|=1<<la),a--,la--,la<0&&(Sa==255?(d(255),d(0)):d(Sa),la=7,Sa=0)}function d(a){ib.push(he[a])}function e(a){d(a>>8&255);d(a&255)}function f(a,b,d,e,f){var g=f[0],i=f[240],m,n,q,r,s,o,y,B,D,p=0;for(m=0;m<8;++m){n=a[p];q=a[p+1];r=a[p+2];s=a[p+3];o=a[p+4];y=a[p+5];B=a[p+6];D=a[p+7];var v=
n+D;n=n-D;D=q+B;q=q-B;B=r+y;r=r-y;y=s+o;s=s-o;o=v+y;v=v-y;y=D+B;D=D-B;a[p]=o+y;a[p+4]=o-y;o=(D+v)*0.707106781;a[p+2]=v+o;a[p+6]=v-o;o=s+r;y=r+q;D=q+n;r=(o-D)*0.382683433;s=0.5411961*o+r;o=1.306562965*D+r;y*=0.707106781;r=n+y;n-=y;a[p+5]=n+s;a[p+3]=n-s;a[p+1]=r+o;a[p+7]=r-o;p+=8}for(m=p=0;m<8;++m)n=a[p],q=a[p+8],r=a[p+16],s=a[p+24],o=a[p+32],y=a[p+40],B=a[p+48],D=a[p+56],v=n+D,n=n-D,D=q+B,q=q-B,B=r+y,r=r-y,y=s+o,s=s-o,o=v+y,v=v-y,y=D+B,D=D-B,a[p]=o+y,a[p+32]=o-y,o=(D+v)*0.707106781,a[p+16]=v+o,a[p+
48]=v-o,o=s+r,y=r+q,D=q+n,r=(o-D)*0.382683433,s=0.5411961*o+r,o=1.306562965*D+r,y*=0.707106781,r=n+y,n-=y,a[p+40]=n+s,a[p+24]=n-s,a[p+8]=r+o,a[p+56]=r-o,p++;for(m=0;m<64;++m)p=a[m]*b[m],ie[m]=p>0?p+0.5|0:p-0.5|0;a=ie;for(b=0;b<64;++b)ma[va[b]]=a[b];a=ma[0]-d;d=ma[0];a==0?c(e[0]):(m=32767+a,c(e[Nb[m]]),c($[m]));for(e=63;e>0&&ma[e]==0;e--);if(e==0)return c(g),d;for(a=1;a<=e;){for(b=a;ma[a]==0&&a<=e;++a);b=a-b;if(b>=16){m=b>>4;for(p=1;p<=m;++p)c(i);b&=15}m=32767+ma[a];c(f[(b<<4)+Nb[m]]);c($[m]);a++}e!=
63&&c(g);return d}function g(a){a<=0&&(a=1);a>100&&(a=100);if(je!=a){for(var b=0,b=a<50?Math.floor(5E3/a):Math.floor(200-a*2),c=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],d=0;d<64;d++){var e=i((c[d]*b+50)/100);e<1?e=1:e>255&&(e=255);n[va[d]]=e}c=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,
99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99];for(d=0;d<64;d++)e=i((c[d]*b+50)/100),e<1?e=1:e>255&&(e=255),m[va[d]]=e;b=[1,1.387039845,1.306562965,1.175875602,1,0.785694958,0.5411961,0.275899379];for(d=c=0;d<8;d++)for(e=0;e<8;e++)s[c]=1/(n[va[c]]*b[d]*b[e]*8),q[c]=1/(m[va[c]]*b[d]*b[e]*8),c++;je=a}}var i=Math.floor,n=Array(64),m=Array(64),s=Array(64),q=Array(64),L,v,Ta,jb,$=Array(65535),Nb=Array(65535),ie=Array(64),ma=Array(64),ib=[],Sa=0,la=7,
ke=Array(64),le=Array(64),me=Array(64),he=Array(256),I=Array(2048),je,va=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],ne=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],oe=[0,1,2,3,4,5,6,7,8,9,10,11],pe=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],qe=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,
26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],re=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],se=[0,1,2,3,4,5,
6,7,8,9,10,11],te=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],ue=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,
197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];this.a=function(a,b){b&&g(b);ib=[];Sa=0;la=7;e(65496);e(65504);e(16);d(74);d(70);d(73);d(70);d(0);d(1);d(1);d(0);e(1);e(1);d(0);d(0);e(65499);e(132);d(0);for(var i=0;i<64;i++)d(n[i]);d(1);for(i=0;i<64;i++)d(m[i]);var i=a.width,G=a.height;e(65472);e(17);d(8);e(G);e(i);d(3);d(1);d(17);d(0);d(2);d(17);d(1);d(3);d(17);d(1);e(65476);e(418);d(0);for(i=0;i<16;i++)d(ne[i+1]);
for(i=0;i<=11;i++)d(oe[i]);d(16);for(i=0;i<16;i++)d(pe[i+1]);for(i=0;i<=161;i++)d(qe[i]);d(1);for(i=0;i<16;i++)d(re[i+1]);for(i=0;i<=11;i++)d(se[i]);d(17);for(i=0;i<16;i++)d(te[i+1]);for(i=0;i<=161;i++)d(ue[i]);e(65498);e(12);d(3);d(1);d(0);d(2);d(17);d(3);d(17);d(0);d(63);d(0);var $=0,ma=0,va=0;Sa=0;la=7;this.a.a="_encode_";for(var i=a.data,G=a.height,T=a.width*4,H,U=0,r,M,o,y,B;U<G;){for(H=0;H<T;){y=T*U+H;for(B=0;B<64;B++)M=B>>3,r=(B&7)*4,o=y+M*T+r,U+M>=G&&(o-=T*(U+1+M-G)),H+r>=T&&(o-=H+r-T+4),
r=i[o++],M=i[o++],o=i[o++],ke[B]=(I[r]+I[M+256>>0]+I[o+512>>0]>>16)-128,le[B]=(I[r+768>>0]+I[M+1024>>0]+I[o+1280>>0]>>16)-128,me[B]=(I[r+1280>>0]+I[M+1536>>0]+I[o+1792>>0]>>16)-128;$=f(ke,s,$,L,Ta);ma=f(le,q,ma,v,jb);va=f(me,q,va,v,jb);H+=32}U+=8}la>=0&&(i=[],i[1]=la+1,i[0]=(1<<la+1)-1,c(i));e(65497);if(Af)i=w.btoa(ib.join(""));else{G=ib.join("");i=[];for(H=T=0;H<G.length;H++){for(U=G.charCodeAt(H);U>255;)i[T++]=U&255,U>>=8;i[T++]=U}na(i)||h(Error("encodeByteArray takes an array as a parameter"));
if(!zf){zf={};for(G=0;G<65;G++)zf[G]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(G)}G=zf;T=[];for(H=0;H<i.length;H+=3)r=i[H],M=(U=H+1<i.length)?i[H+1]:0,o=(y=H+2<i.length)?i[H+2]:0,B=r>>2,r=(r&3)<<4|M>>4,M=(M&15)<<2|o>>6,o&=63,y||(o=64,U||(M=64)),T.push(G[B],G[r],G[M],G[o]);i=T.join("")}ib=[];return"data:image/jpeg;base64,"+i};a||(a=50);(function(){for(var a=String.fromCharCode,b=0;b<256;b++)he[b]=a(b)})();L=b(ne,oe);v=b(re,se);Ta=b(pe,qe);jb=b(te,ue);(function(){for(var a=
1,b=2,c=1;c<=15;c++){for(var d=a;d<b;d++)Nb[32767+d]=c,$[32767+d]=[],$[32767+d][1]=c,$[32767+d][0]=d;for(d=-(b-1);d<=-a;d++)Nb[32767+d]=c,$[32767+d]=[],$[32767+d][1]=c,$[32767+d][0]=b-1+d;a<<=1;b<<=1}})();(function(){for(var a=0;a<256;a++)I[a]=19595*a,I[a+256>>0]=38470*a,I[a+512>>0]=7471*a+32768,I[a+768>>0]=-11059*a,I[a+1024>>0]=-21709*a,I[a+1280>>0]=32768*a+8421375,I[a+1536>>0]=-27439*a,I[a+1792>>0]=-5329*a})();g(a)};var Z=Q("userfeedback.render.blackouts.shrink"),Df=function(a){if(a.width*a.height>1E7)return Z.info("ERROR: Image too big pixel-wise."),"";var b,c;try{if(Z.info("Trying toDataURL()..."),b=a.toDataURL(),Cf(b))return b}catch(d){Z.info("Exception: ",d)}try{if(Z.info("Trying toDataURL(jpeg)..."),c=a.toDataURL("image/jpeg"),Cf(c))return c}catch(e){Z.info("Exception: ",e)}if(Ee)try{Z.info("Trying 5M limit, we are on Firefox and cannot use JpegEncoder...");var f=b.length,g=c.length,i=Math.min(f,g);if(i<
5E6)return Z.info("fits: true (Firefox), "+i),f<g?b:c}catch(n){Z.info("Exception: ",n)}else try{Z.info("Trying JpegEncoder...");var m=a.getContext("2d").getImageData(0,0,a.width,a.height);b=(new Bf).a(m);if(Cf(b))return b}catch(s){Z.info("Exception: ",s)}Z.info("ERROR: Nothing fits.");return""},Cf=function(a){var b=a.length;Z.info("Checking if data URL fits: "+b+", "+a.substr(0,80)+"...");a=b<5E5;Z.info("fits: "+a);return a};var Gf=function(a,b,c,d,e,f){Ef.info("renderAnnotations");e=de(e);if("NONE"==Re)Ef.info("ERROR: Rendering Strategy is NONE"),e("");else{try{f.da(b)}catch(g){Ff("preloadImage failed",g,e);return}ee(function(){return f.Ya(b)},function(g,n){Ef.info("waitFor(isImageReady) done");if(n)return Ff("isImageReady failed",n,e);if(!g)return Ff("isImageReady timed out","condition was never true",e);try{f.pa(b,new ic(0,0,a.width,a.height)),d.length!=0&&(f.ca(0,0,a.width,a.height),f.Xa(d)),f.ca(0,0,a.width,a.height),
F(c,function(a){f.fillRect(a,"black")}),f.ma(function(a,b){return b?Ff("canvas.toDataURL failed",b,e):f instanceof wf?(a=Df(f.b),e(a)):e(a)})}catch(m){return Ff("Exception while rendering annotations",m,e)}})}},Ef=Q("userfeedback.render.annotate"),Ff=function(a,b,c){x(b)?Ef.info(a+": "+b):Ef.info(a,b);c("")};var Hf=function(a,b,c){var d={tileImage:function(b,c,d,e,f,g,v,Ta){a.ta(b,new ic(c,d,e,f),g,v,Ta)},stretchImage:function(b,c,d,e,f){a.pa(b,new ic(c,d,e,f))},drawRect:a.bb,fillRect:function(b,c,d,e,f){a.fillRect(new ic(b,c,d,e),f)},drawGradient:function(b,c,d,e,f,g,v,Ta,jb){a.ab(new ic(b,c,d,e),new ic(f,g,v,Ta),jb)},drawText:a.cb,drawBuiltin:a.$a,pushClip:a.ca,popClip:a.fb,popAllClips:a.eb,popOpacity:a.gb,pushOpacity:a.hb},e=Q("userfeedback.render.canvas.commands.run"),f=b.length;e.info("Rendering commands count: "+
f);var g=0;F(b,function(b){try{d[b.type].apply(a,b.args)}catch(n){e.log(K,"Exception for command type: "+b.type,n)}(b=Math.floor(10*(g+1)/f)-Math.floor(10*g/f))&&c(b);g++})};var Jf=function(a,b){var c=Q("userfeedback.web.main.RenderFrameContent");Ya(a,function(d,e){oa(d)&&Ya(b,function(b,g){b===d&&(a[e]=If(a,g,b,c))})})},If=function(a,b,c,d){return function(){var e=A();d.info(b+" called");try{c.apply(a,arguments)}catch(f){h(f)}finally{d.info(b+" finished in "+(A()-e)+"ms")}}};var Lf=function(a,b){var c=Va(arguments,1);c.push(dd);c=wa(Kf,a,c);$c(window,"unload",c)},Kf=function(a,b){F(b,function(b){try{b.apply(a)}catch(d){Mf.info("Cleanup threw exception: "+b,d)}})},Mf=Q("userfeedback.util.cleanup");var Nf=function(){this.a=A()},Of=new Nf;Nf.prototype.set=function(a){this.a=a};Nf.prototype.get=function(){return this.a};var Pf=function(a){this.a=a||"";this.b=Of};u=Pf.prototype;u.wa=k;u.ya=k;u.nb=k;u.xa=t;u.ob=t;var Qf=function(a){return a<10?"0"+a:String(a)},Rf=function(a,b){var c=(a.f-b)/1E3,d=c.toFixed(3),e=0;if(c<1)e=2;else for(;c<100;)e++,c*=10;for(;e-- >0;)d=" "+d;return d},Sf=function(a){Pf.call(this,a)};C(Sf,Pf);var Tf=function(a){this.d=a;this.u=z(this.f,this);this.a=new Sf;this.a.wa=t;this.a.ya=k;this.a.xa=k;this.c=t;this.b=[];this.e=t},Uf=function(a,b){if(b!=a.e){if(!b)F(a.b,function(a){this.d.send("log",a)},a),a.b=[];a.e=b}};
Tf.prototype.f=function(a){if(!this.c){this.c=k;try{var b,c=this.a,d=[];d.push(c.a," ");if(c.wa){var e=new Date(a.f);d.push("[",Qf(e.getFullYear()-2E3)+Qf(e.getMonth()+1)+Qf(e.getDate())+" "+Qf(e.getHours())+":"+Qf(e.getMinutes())+":"+Qf(e.getSeconds())+"."+Qf(Math.floor(e.getMilliseconds()/10)),"] ")}c.ya&&d.push("[",Rf(a,c.b.get()),"s] ");c.nb&&d.push("[",a.h,"] ");c.ob&&d.push("[",a.c.name,"] ");d.push(a.e,"\n");c.xa&&a.b&&d.push(a.a,"\n");b=d.join("");b=b.replace(/\n$/,"");var f=[a.c.toString(),
b];this.e?this.b.push(f):this.d.send("log",f)}finally{this.c=t}}};var Vf=function(){var a;a=document.location.href;var b=a.indexOf("#");a=b<0?l:a.substr(b+1);this.e=$b(a&&decodeURIComponent(a));this.d=new Wd(this.e||{});this.c=t;this.k=Q("userfeedback.web.main.RenderFrameContent");Jf(this,{checkCanvas_:this.Aa,connectXpc_:this.Fa,createCanvas_:this.V,installCleanup_:this.Ga,render_:this.Y,runAnnotateCommands_:this.Ba,runBlackoutCommands_:this.Ca,runRenderingCommands_:this.Da,sendScreenshot_:this.ia,setCommands_:this.Ea});a=this.a=new Tf(this.d);if(k!=a.h){Zb();
var b=Yb,c=a.u;if(!b.a)b.a=[];b.a.push(c);a.h=k}Uf(this.a,k)},Wf=function(){var a=new Vf;fe(a,function(a){this.Ga();be(a,100)},function(a){this.V(a)},function(){this.Fa()})};u=Vf.prototype;u.Ga=function(){Lf(this,function(){this.o.aa()},function(){this.d.close()})};u.V=function(a){yf(z(function(b,c){c?x(c)?this.k.info("createCanvas failed: "+c):this.k.info("createCanvas failed",c):this.o=b;a()},this))};
u.Fa=function(){this.d.e.images={ga:z(this.Rb,this),ha:t};this.d.e.render={ga:z(this.Y,this),ha:t};this.d.w()};u.Rb=function(a){a=window.JSON?window.JSON.parse(a):$b(a);this.o&&F(a,z(this.o.da,this.o))};u.Y=function(a){fe(this,function(a){this.Aa(a)},function(b){this.Ea(a);this.d.send("progress","");be(b)},function(a){this.d.send("progress","");this.Da(a)},function(a){this.d.send("progress","");this.Ba(a)},function(a){this.d.send("progress","");this.Ca(a)},function(){this.ia()})};
u.Aa=function(a){Uf(this.a,t);this.o?a():Xf(this,"Canvas could not be created")};u.Ea=function(a){a=window.JSON?window.JSON.parse(a):$b(a);this.h=a.render;this.b=a.blackout;this.f=a.highlight;this.J=new hc(a.width,a.height);this.o.Z(this.J)};u.Da=function(a){Hf(this.o,this.h,z(function(a){this.d.send("progress",""+a)},this));this.o.ma(z(function(b,c){c?Xf(this,c):(this.Sb=b,a())},this))};
u.Ba=function(a){Yf(this,this.b,this.f,z(function(b){b?(this.Jb=b,a()):Xf(this,"ERROR rendering blackouts + highlights")},this))};u.Ca=function(a){Yf(this,this.b,[],z(function(b){b?(this.Lb=b,a()):Xf(this,"ERROR rendering blackouts")},this))};var Xf=function(a,b){x(b)?a.k.info(b):a.k.info("ERROR",b);a.c=k;a.ia()};Vf.prototype.ia=function(){this.o&&this.o.clear();this.d.send("done",ge([this.Lb,this.Jb,this.c]))};
var Zf=function(a){return Pa(a,function(a){return new ic(a.left,a.top,a.width,a.height)})},Yf=function(a,b,c,d){b=Zf(b);c=Zf(c);a.o.clear();Gf(a.J,a.Sb,b,c,d,a.o)};window!=window.top&&Wf();})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment