Created
July 12, 2011 21:55
-
-
Save livingston/1079072 to your computer and use it in GitHub Desktop.
Beautified render_frame.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
function i(a) { | |
throw a; | |
} | |
var j = void 0, | |
q = null, | |
s; | |
function aa(a) { | |
this.t = {}; | |
this.tick = function(a, c, d) { | |
this.t[a] = [d != j ? d: (new Date).getTime(), c] | |
}; | |
this.tick("start", q, a) | |
} | |
var ba = new aa; | |
window.jstiming = { | |
Timer: aa, | |
load: ba | |
}; | |
try { | |
var ca = q; | |
window.chrome && window.chrome.csi && (ca = Math.floor(window.chrome.csi().pageT)); | |
ca == q && window.gtbExternal && (ca = window.gtbExternal.pageT()); | |
ca == q && window.external && (ca = window.external.pageT); | |
ca && (window.jstiming.pt = ca) | |
} catch(da) {}; | |
if (window.jstiming) { | |
window.jstiming.kb = {}; | |
window.jstiming.Wb = 1; | |
var ea = function(a, b, c) { | |
var d = a.t[b], | |
f = a.t.start; | |
if (d && (f || c)) | |
return d = a.t[b][0], | |
c != j ? f = c: f = f[0], | |
d - f | |
}, | |
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(f) {} | |
var e = window.chrome; | |
if (e && (e = e.loadTimes)) | |
e().wasFetchedViaSpdy && (d += "&p=s"), | |
e().wasNpnNegotiated && (d += "&npn=1"), | |
e().wasAlternateProtocolAvailable && (d += "&apa=1"); | |
a.Xb && (d += "&" + a.Xb); | |
var g = a.t, | |
h = g.start, | |
e = [], | |
l = [], | |
k; | |
for (k in g) | |
if (k != "start" && k.indexOf("_") != 0) { | |
var n = g[k][1]; | |
n ? g[n] && l.push(k + "." + ea(a, k, g[n][0])) : h && e.push(k + "." + ea(a, k)) | |
} | |
delete g.start; | |
if (b) | |
for (var p in b) | |
d += "&" + p + "=" + b[p]; (b = c) || (b = "https:" == document.location.protocol ? "http://csi.gstatic.com/csi": "http://csi.gstatic.com/csi"); | |
return [b, "?v=3", "&s=" + (window.jstiming.sn || "_s") + "&action=", a.name, l.length ? "&it=" + l.join(",") : "", "", d, "&rt=", e.join(",")].join("") | |
}; | |
window.jstiming.report = function(a, b, c) { | |
a = fa(a, b, c); | |
if (!a) | |
return ""; | |
var b = new Image, | |
d = window.jstiming.Wb++; | |
window.jstiming.kb[d] = b; | |
b.onload = b.onerror = function() { | |
delete window.jstiming.kb[d] | |
}; | |
b.src = a; | |
b = q; | |
return a | |
} | |
}; | |
var t = this, | |
ga = function(a) { | |
for (var a = a.split("."), b = t, c; c = a.shift();) | |
if (b[c] != q) | |
b = b[c]; | |
else | |
return q; | |
return b | |
}, | |
ha = function() {}, | |
ka = 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 | |
}, | |
la = function(a) { | |
return ka(a) == "array" | |
}, | |
ma = function(a) { | |
var b = ka(a); | |
return b == "array" || b == "object" && typeof a.length == "number" | |
}, | |
u = function(a) { | |
return typeof a == "string" | |
}, | |
na = function(a) { | |
return ka(a) == "function" | |
}, | |
oa = function(a) { | |
a = ka(a); | |
return a == "object" || a == "array" || a == "function" | |
}, | |
ra = function(a) { | |
return a[pa] || (a[pa] = ++qa) | |
}, | |
pa = "closure_uid_" + Math.floor(Math.random() * 2147483648).toString(36), | |
qa = 0, | |
sa = function(a, b, c) { | |
return a.call.apply(a.bind, arguments) | |
}, | |
ua = function(a, b, c) { | |
var d = b || t; | |
if (arguments.length > 2) { | |
var f = Array.prototype.slice.call(arguments, 2); | |
return function() { | |
var b = Array.prototype.slice.call(arguments); | |
Array.prototype.unshift.apply(b, f); | |
return a.apply(d, b) | |
} | |
} else | |
return function() { | |
return a.apply(d, arguments) | |
} | |
}, | |
x = function(a, b, c) { | |
x = Function.prototype.bind && Function.prototype.bind.toString().indexOf("native code") != -1 ? sa: ua; | |
return x.apply(q, arguments) | |
}, | |
va = 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) | |
} | |
}, | |
y = Date.now || function() { | |
return + new Date | |
}, | |
B = function(a, b) { | |
function c() {} | |
c.prototype = b.prototype; | |
a.k = 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 x.apply(q, c) | |
} else | |
return x(this, a) | |
}; | |
var wa = function(a) { | |
this.stack = Error().stack || ""; | |
if (a) | |
this.message = String(a) | |
}; | |
B(wa, Error); | |
wa.prototype.name = "CustomError"; | |
var xa = 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 | |
}, | |
ya = /^[a-zA-Z0-9\-_.!~*'()]*$/, | |
za = function(a) { | |
a = String(a); | |
return ! ya.test(a) ? encodeURIComponent(a) : a | |
}, | |
Fa = function(a) { | |
if (!Aa.test(a)) | |
return a; | |
a.indexOf("&") != -1 && (a = a.replace(Ba, "&")); | |
a.indexOf("<") != -1 && (a = a.replace(Ca, "<")); | |
a.indexOf(">") != -1 && (a = a.replace(Da, ">")); | |
a.indexOf('"') != -1 && (a = a.replace(Ea, """)); | |
return a | |
}, | |
Ba = /&/g, | |
Ca = /</g, | |
Da = />/g, | |
Ea = /\"/g, | |
Aa = /[&<>\"]/, | |
Ga = function() { | |
return Math.floor(Math.random() * 2147483648).toString(36) + Math.abs(Math.floor(Math.random() * 2147483648)^y()).toString(36) | |
}, | |
Ia = function(a, b) { | |
for (var c = 0, d = String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g, "").split("."), f = String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g, "").split("."), e = Math.max(d.length, f.length), g = 0; c == 0 && g < e; g++) { | |
var h = d[g] || "", | |
l = f[g] || "", | |
k = RegExp("(\\d*)(\\D*)", "g"), | |
n = RegExp("(\\d*)(\\D*)", "g"); | |
do { | |
var p = k.exec(h) || ["", "", ""], | |
K = n.exec(l) || ["", "", ""]; | |
if (p[0].length == 0 && K[0].length == 0) | |
break; | |
c = Ha(p[1].length == 0 ? 0: parseInt(p[1], 10), K[1].length == 0 ? 0: parseInt(K[1], 10)) || Ha(p[2].length == 0, K[2].length == 0) || Ha(p[2], K[2]) | |
} | |
while (c == 0) | |
} | |
return c | |
}, | |
Ha = function(a, b) { | |
if (a < b) | |
return - 1; | |
else if (a > b) | |
return 1; | |
return 0 | |
}; | |
var Ja = function(a, b) { | |
b.unshift(a); | |
wa.call(this, xa.apply(q, b)); | |
b.shift(); | |
this.a = a | |
}; | |
B(Ja, wa); | |
Ja.prototype.name = "AssertionError"; | |
var Ka = function(a, b, c) { | |
if (!a) { | |
var d = Array.prototype.slice.call(arguments, 2), | |
f = "Assertion failed"; | |
if (b) { | |
f += ": " + b; | |
var e = d | |
} | |
i(new Ja("" + f, e || [])) | |
} | |
}, | |
La = function(a, b) { | |
i(new Ja("Failure" + (a ? ": " + a: ""), Array.prototype.slice.call(arguments, 1))) | |
}; | |
var C = Array.prototype, | |
Ma = C.indexOf ? function(a, b, c) { | |
Ka(a.length != q); | |
return C.indexOf.call(a, b, c) | |
}: function(a, b, c) { | |
c = c == q ? 0: c < 0 ? Math.max(0, a.length + c) : c; | |
if (u(a)) | |
return ! u(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 | |
}, | |
Na = C.forEach ? function(a, b, c) { | |
Ka(a.length != q); | |
C.forEach.call(a, b, c) | |
}: function(a, b, c) { | |
for (var d = a.length, f = u(a) ? a.split("") : a, e = 0; e < d; e++) | |
e in f && b.call(c, f[e], e, a) | |
}, | |
Oa = function(a, b) { | |
for (var c = u(a) ? a.split("") : a, d = a.length - 1; d >= 0;--d) | |
d in c && b.call(j, c[d], d, a) | |
}, | |
Pa = C.map ? function(a, b, c) { | |
Ka(a.length != q); | |
return C.map.call(a, b, c) | |
}: function(a, b, c) { | |
for (var d = a.length, f = Array(d), e = u(a) ? a.split("") : a, g = 0; g < d; g++) | |
g in e && (f[g] = b.call(c, e[g], g, a)); | |
return f | |
}, | |
Qa = function(a, b) { | |
var c = Ma(a, b); | |
c >= 0 && (Ka(a.length != q), C.splice.call(a, c, 1)) | |
}, | |
Ta = function(a) { | |
return C.concat.apply(C, arguments) | |
}, | |
Ua = function(a) { | |
if (la(a)) | |
return Ta(a); | |
else { | |
for (var b = [], c = 0, d = a.length; c < d; c++) | |
b[c] = a[c]; | |
return b | |
} | |
}, | |
Va = function(a, b, c) { | |
Ka(a.length != q); | |
return arguments.length <= 2 ? C.slice.call(a, b) : C.slice.call(a, b, c) | |
}; | |
var Wa = "StopIteration" in t ? t.StopIteration: Error("StopIteration"), | |
Xa = function() {}; | |
Xa.prototype.next = function() { | |
i(Wa) | |
}; | |
Xa.prototype.d = 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"], | |
ab = function(a, b) { | |
for (var c, d, f = 1; f < arguments.length; f++) { | |
d = arguments[f]; | |
for (c in d) | |
a[c] = d[c]; | |
for (var e = 0; e < $a.length; e++) | |
c = $a[e], | |
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 && i(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 = [], | |
f = 0; | |
for (d in a) | |
c[f++] = d; | |
d = c; | |
c = Za(a) | |
} | |
for (f = 0; f < d.length; f++) | |
this.set(d[f], c[f]) | |
} | |
}; | |
bb.prototype.n = 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.n = this.a.length = 0 | |
}; | |
var eb = function(a) { | |
if (a.n != 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.n != a.a.length) { | |
for (var f = {}, c = b = 0; b < a.a.length;) | |
d = a.a[b], | |
Object.prototype.hasOwnProperty.call(f, d) || (a.a[c++] = d, f[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.n++, 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.d = function(a) { | |
eb(this); | |
var b = 0, | |
c = this.a, | |
d = this.b, | |
f = this.c, | |
e = this, | |
g = new Xa; | |
g.next = function() { | |
for (;;) { | |
f != e.c && i(Error("The map has changed since the iterator was created")); | |
b >= c.length && i(Wa); | |
var g = c[b++]; | |
return a ? g: d[g] | |
} | |
}; | |
return g | |
}; | |
var ib = function(a) { | |
return hb(a || arguments.callee.caller, []) | |
}, | |
hb = function(a, b) { | |
var c = []; | |
if (Ma(b, a) >= 0) | |
c.push("[...circular reference...]"); | |
else if (a && b.length < 50) { | |
c.push(jb(a) + "("); | |
for (var d = a.arguments, f = 0; f < d.length; f++) { | |
f > 0 && c.push(", "); | |
var e; | |
e = d[f]; | |
switch (typeof e) { | |
case "object": | |
e = e ? "object": "null"; | |
break; | |
case "string": | |
break; | |
case "number": | |
e = String(e); | |
break; | |
case "boolean": | |
e = e ? "true": "false"; | |
break; | |
case "function": | |
e = (e = jb(e)) ? e: "[fn]"; | |
break; | |
default: | |
e = typeof e | |
} | |
e.length > 40 && (e = e.substr(0, 40) + "..."); | |
c.push(e) | |
} | |
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, f) { | |
this.u = typeof f == "number" ? f: lb++; | |
this.h = d || y(); | |
this.c = a; | |
this.d = b; | |
this.i = c; | |
delete this.b; | |
delete this.a | |
}; | |
mb.prototype.u = 0; | |
mb.prototype.b = q; | |
mb.prototype.a = q; | |
var lb = 0; | |
var nb = function(a) { | |
this.i = a | |
}; | |
nb.prototype.b = q; | |
nb.prototype.d = q; | |
nb.prototype.c = q; | |
nb.prototype.a = q; | |
var ob = function(a, b) { | |
this.name = a; | |
this.value = b | |
}; | |
ob.prototype.toString = function() { | |
return this.name | |
}; | |
var D = new ob("SEVERE", 1E3), | |
pb = new ob("WARNING", 900), | |
qb = new ob("INFO", 800), | |
rb = new ob("CONFIG", 700), | |
sb = new ob("FINE", 500), | |
tb = new ob("FINEST", 300), | |
ub = function(a) { | |
if (a.d) | |
return a.d; | |
if (a.b) | |
return ub(a.b); | |
La("Root logger has no level set."); | |
return q | |
}; | |
nb.prototype.log = function(a, b, c) { | |
if (a.value >= ub(this).value) { | |
a = this.h(a, b, c); | |
t.console && t.console.markTimeline && t.console.markTimeline("log:" + a.d); | |
for (b = this; b;) { | |
var c = b, | |
d = a; | |
if (c.a) | |
for (var f = 0, e = j; e = c.a[f]; f++) | |
e(d); | |
b = b.b | |
} | |
} | |
}; | |
nb.prototype.h = function(a, b, c) { | |
var d = new mb(a, String(b), this.i); | |
if (c) { | |
d.b = c; | |
var f; | |
var e = arguments.callee.caller; | |
try { | |
var g; | |
var h = ga("window.location.href"); | |
if (u(c)) | |
g = { | |
message: c, | |
name: "Unknown error", | |
lineNumber: "Not available", | |
fileName: h, | |
stack: "Not available" | |
}; | |
else { | |
var l, | |
k, | |
n = !1; | |
try { | |
l = c.lineNumber || c.$b || "Not available" | |
} catch(p) { | |
l = "Not available", | |
n = !0 | |
} | |
try { | |
k = c.fileName || c.filename || c.sourceURL || h | |
} catch(K) { | |
k = "Not available", | |
n = !0 | |
} | |
g = n || !c.lineNumber || !c.fileName || !c.stack ? { | |
message: c.message, | |
name: c.name, | |
lineNumber: l, | |
fileName: k, | |
stack: c.stack || "Not available" | |
}: c | |
} | |
f = "Message: " + Fa(g.message) + '\nUrl: <a href="view-source:' + g.fileName + '" target="_new">' + g.fileName + "</a>\nLine: " + g.lineNumber + "\n\nBrowser stack:\n" + Fa(g.stack + "-> ") + "[end]\n\nJS stack traversal:\n" + Fa(ib(e) + "-> ") | |
} catch(r) { | |
f = "Exception trying to expose exception! You win, we lose. " + r | |
} | |
d.a = f | |
} | |
return d | |
}; | |
var vb = function(a, b) { | |
a.log(pb, b, j) | |
}; | |
nb.prototype.info = function(a, b) { | |
this.log(qb, a, b) | |
}; | |
var I = function(a) { | |
H.log(sb, a, j) | |
}, | |
J = function(a) { | |
H.log(tb, a, j) | |
}, | |
wb = {}, | |
xb = q, | |
yb = function() { | |
if (!xb) | |
xb = new nb(""), | |
wb[""] = xb, | |
xb.d = rb | |
}, | |
L = function(a) { | |
yb(); | |
var b; | |
if (! (b = wb[a])) { | |
b = new nb(a); | |
var c = a.lastIndexOf("."), | |
d = a.substr(c + 1), | |
c = L(a.substr(0, c)); | |
if (!c.c) | |
c.c = {}; | |
c.c[d] = b; | |
b.b = c; | |
wb[a] = b | |
} | |
return b | |
}; | |
var zb = 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) {} | |
i(Error("Invalid JSON string: " + a)) | |
}, | |
Ab = function() {}, | |
Cb = function(a) { | |
var b = []; | |
Bb(new Ab, a, b); | |
return b.join("") | |
}, | |
Bb = function(a, b, c) { | |
switch (typeof b) { | |
case "string": | |
Db(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 == q) { | |
c.push("null"); | |
break | |
} | |
if (la(b)) { | |
var d = b.length; | |
c.push("["); | |
for (var f = "", e = 0; e < d; e++) | |
c.push(f), | |
Bb(a, b[e], c), | |
f = ","; | |
c.push("]"); | |
break | |
} | |
c.push("{"); | |
d = ""; | |
for (f in b) | |
Object.prototype.hasOwnProperty.call(b, f) && (e = b[f], typeof e != "function" && (c.push(d), Db(f, c), c.push(":"), Bb(a, e, c), d = ",")); | |
c.push("}"); | |
break; | |
case "function": | |
break; | |
default: | |
i(Error("Unknown type: " + typeof b)) | |
} | |
}, | |
Eb = { | |
'"': '\\"', | |
"\\": "\\\\", | |
"/": "\\/", | |
"\u0008": "\\b", | |
"\u000c": "\\f", | |
"\n": "\\n", | |
"\r": "\\r", | |
"\t": "\\t", | |
"\u000b": "\\u000b" | |
}, | |
Fb = /\uffff/.test("\uffff") ? /[\\\"\x00-\x1f\x7f-\uffff]/g: /[\\\"\x00-\x1f\x7f-\xff]/g, | |
Db = function(a, b) { | |
b.push('"', a.replace(Fb, function(a) { | |
if (a in Eb) | |
return Eb[a]; | |
var b = a.charCodeAt(0), | |
f = "\\u"; | |
b < 16 ? f += "000": b < 256 ? f += "00": b < 4096 && (f += "0"); | |
return Eb[a] = f + b.toString(16) | |
}), '"') | |
}; | |
var Gb = function(a, b) { | |
this.x = a !== j ? a: 0; | |
this.y = b !== j ? b: 0 | |
}; | |
Gb.prototype.toString = function() { | |
return "(" + this.x + ", " + this.y + ")" | |
}; | |
var Hb = function(a, b, c, d) { | |
this.top = a; | |
this.right = b; | |
this.a = c; | |
this.left = d | |
}; | |
Hb.prototype.toString = function() { | |
return "(" + this.top + "t, " + this.right + "r, " + this.a + "b, " + this.left + "l)" | |
}; | |
var Ib = function(a, b) { | |
this.width = a; | |
this.height = b | |
}; | |
Ib.prototype.toString = function() { | |
return "(" + this.width + " x " + this.height + ")" | |
}; | |
Ib.prototype.ceil = function() { | |
this.width = Math.ceil(this.width); | |
this.height = Math.ceil(this.height); | |
return this | |
}; | |
Ib.prototype.floor = function() { | |
this.width = Math.floor(this.width); | |
this.height = Math.floor(this.height); | |
return this | |
}; | |
Ib.prototype.round = function() { | |
this.width = Math.round(this.width); | |
this.height = Math.round(this.height); | |
return this | |
}; | |
var M = function(a, b, c, d) { | |
this.left = a; | |
this.top = b; | |
this.width = c; | |
this.height = d | |
}; | |
M.prototype.toString = function() { | |
return "(" + this.left + ", " + this.top + " - " + this.width + "w x " + this.height + "h)" | |
}; | |
var Jb = function() {}; | |
Jb.prototype.u = !1; | |
Jb.prototype.q = function() { | |
if (!this.u) | |
this.u = !0, | |
this.g() | |
}; | |
Jb.prototype.g = function() { | |
this.Zb && Lb.apply(q, this.Zb) | |
}; | |
var Mb = function(a) { | |
a && typeof a.q == "function" && a.q() | |
}, | |
Lb = function(a) { | |
for (var b = 0, c = arguments.length; b < c;++b) { | |
var d = arguments[b]; | |
ma(d) ? Lb.apply(q, d) : Mb(d) | |
} | |
}; | |
var Nb, | |
Ob, | |
Pb, | |
Qb, | |
Rb = function() { | |
return t.navigator ? t.navigator.userAgent: q | |
}; | |
Qb = Pb = Ob = Nb = !1; | |
var Sb; | |
if (Sb = Rb()) { | |
var Tb = t.navigator; | |
Nb = Sb.indexOf("Opera") == 0; | |
Ob = !Nb && Sb.indexOf("MSIE") != -1; | |
Pb = !Nb && Sb.indexOf("WebKit") != -1; | |
Qb = !Nb && !Pb && Tb.product == "Gecko" | |
} | |
var Ub = Nb, | |
O = Ob, | |
Vb = Qb, | |
Wb = Pb, | |
Xb = t.navigator, | |
Yb = (Xb && Xb.platform || "").indexOf("Mac") != -1, | |
Zb; | |
a: { | |
var $b = "", | |
ac; | |
if (Ub && t.opera) | |
var bc = t.opera.version, | |
$b = typeof bc == "function" ? bc() : bc; | |
else if (Vb ? ac = /rv\:([^\);]+)(\)|;)/: O ? ac = /MSIE\s+([^\);]+)(\)|;)/: Wb && (ac = /WebKit\/(\S+)/), ac) | |
var cc = ac.exec(Rb()), | |
$b = cc ? cc[1] : ""; | |
if (O) { | |
var dc, | |
ec = t.document; | |
dc = ec ? ec.documentMode: j; | |
if (dc > parseFloat($b)) { | |
Zb = String(dc); | |
break a | |
} | |
} | |
Zb = $b | |
} | |
var fc = Zb, | |
gc = {}, | |
hc = function(a) { | |
gc[a] || (gc[a] = Ia(fc, a) >= 0) | |
}, | |
ic = {}, | |
jc = function() { | |
return ic[9] || (ic[9] = O && document.documentMode && document.documentMode >= 9) | |
}; | |
var kc, | |
lc = !O || jc(); ! Vb && !O || O && jc() || Vb && hc("1.9.1"); | |
O && hc("9"); | |
var mc = function(a, b) { | |
var c; | |
c = (c = a.className) && typeof c.split == "function" ? c.split(/\s+/) : []; | |
var d = Va(arguments, 1), | |
f; | |
f = c; | |
for (var e = 0, g = 0; g < d.length; g++) | |
Ma(f, d[g]) >= 0 || (f.push(d[g]), e++); | |
f = e == d.length; | |
a.className = c.join(" "); | |
return f | |
}; | |
var oc = function() { | |
return kc || (kc = new nc) | |
}, | |
qc = 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 pc ? a.setAttribute(pc[d], b) : a[d] = b | |
}) | |
}, | |
pc = { | |
cellpadding: "cellPadding", | |
cellspacing: "cellSpacing", | |
colspan: "colSpan", | |
rowspan: "rowSpan", | |
valign: "vAlign", | |
height: "height", | |
width: "width", | |
usemap: "useMap", | |
frameborder: "frameBorder", | |
maxlength: "maxLength", | |
type: "type" | |
}, | |
sc = function(a, b, c) { | |
var d = arguments, | |
f = document, | |
e = d[0], | |
g = d[1]; | |
if (!lc && g && (g.name || g.type)) { | |
e = ["<", e]; | |
g.name && e.push(' name="', Fa(g.name), '"'); | |
if (g.type) { | |
e.push(' type="', Fa(g.type), '"'); | |
var h = {}; | |
ab(h, g); | |
g = h; | |
delete g.type | |
} | |
e.push(">"); | |
e = e.join("") | |
} | |
e = f.createElement(e); | |
if (g) | |
u(g) ? e.className = g: la(g) ? mc.apply(q, [e].concat(g)) : qc(e, g); | |
d.length > 2 && rc(f, e, d); | |
return e | |
}, | |
rc = function(a, b, c) { | |
function d(c) { | |
c && b.appendChild(u(c) ? a.createTextNode(c) : c) | |
} | |
for (var f = 2; f < c.length; f++) { | |
var e = c[f]; | |
ma(e) && !(oa(e) && e.nodeType > 0) ? Na(tc(e) ? Ua(e) : e, d) : d(e) | |
} | |
}, | |
uc = function(a) { | |
a && a.parentNode && a.parentNode.removeChild(a) | |
}, | |
tc = function(a) { | |
if (a && typeof a.length == "number") | |
if (oa(a)) | |
return typeof a.item == "function" || typeof a.item == "string"; | |
else if (na(a)) | |
return typeof a.item == "function"; | |
return ! 1 | |
}, | |
nc = function(a) { | |
this.a = a || t.document || document | |
}; | |
nc.prototype.B = function(a) { | |
return u(a) ? this.a.getElementById(a) : a | |
}; | |
var vc = new Function("a", "return a"), | |
wc = function(a, b) { | |
try { | |
return vc(a[b]), | |
!0 | |
} catch(c) {} | |
return ! 1 | |
}; | |
var xc; ! O || jc(); | |
O && hc("8"); | |
var yc = function(a, b) { | |
this.type = a; | |
this.a = this.target = b | |
}; | |
B(yc, Jb); | |
yc.prototype.g = function() { | |
delete this.type; | |
delete this.target; | |
delete this.a | |
}; | |
yc.prototype.b = !1; | |
yc.prototype.c = !0; | |
yc.prototype.sa = function() { | |
this.b = !0 | |
}; | |
var zc = function(a) { | |
a.sa() | |
}; | |
var Ac = { | |
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: O ? "focusin": "DOMFocusIn", | |
xc: O ? "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 Bc = function(a, b) { | |
a && this.P(a, b) | |
}; | |
B(Bc, yc); | |
s = Bc.prototype; | |
s.target = q; | |
s.xa = q; | |
s.ub = 0; | |
s.vb = 0; | |
s.clientX = 0; | |
s.clientY = 0; | |
s.wb = 0; | |
s.xb = 0; | |
s.pb = 0; | |
s.sb = 0; | |
s.qb = 0; | |
s.rb = !1; | |
s.ob = !1; | |
s.yb = !1; | |
s.tb = !1; | |
s.zb = !1; | |
s.G = q; | |
s.P = function(a, b) { | |
var c = this.type = a.type; | |
yc.call(this, c); | |
this.target = a.target || a.srcElement; | |
this.a = b; | |
var d = a.relatedTarget; | |
if (d) | |
Vb && (wc(d, "nodeName") || (d = q)); | |
else if (c == "mouseover") | |
d = a.fromElement; | |
else if (c == "mouseout") | |
d = a.toElement; | |
this.xa = d; | |
this.ub = a.offsetX !== j ? a.offsetX: a.layerX; | |
this.vb = 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.wb = a.screenX || 0; | |
this.xb = a.screenY || 0; | |
this.pb = a.button; | |
this.sb = a.keyCode || 0; | |
this.qb = a.charCode || (c == "keypress" ? a.keyCode: 0); | |
this.rb = a.ctrlKey; | |
this.ob = a.altKey; | |
this.yb = a.shiftKey; | |
this.tb = a.metaKey; | |
this.zb = Yb ? a.metaKey: a.ctrlKey; | |
this.d = a.state; | |
this.G = a; | |
delete this.c; | |
delete this.b | |
}; | |
s.sa = function() { | |
Bc.k.sa.call(this); | |
this.G.stopPropagation ? this.G.stopPropagation() : this.G.cancelBubble = !0 | |
}; | |
s.g = function() { | |
Bc.k.g.call(this); | |
this.xa = this.a = this.target = this.G = q | |
}; | |
var P = function(a, b) { | |
this.d = b; | |
this.b = []; | |
a > this.d && i(Error("[goog.structs.SimplePool] Initial cannot be greater than max")); | |
for (var c = 0; c < a; c++) | |
this.b.push(this.a ? this.a() : {}) | |
}; | |
B(P, Jb); | |
P.prototype.a = q; | |
P.prototype.c = q; | |
var Cc = function(a) { | |
return a.b.length ? a.b.pop() : a.a ? a.a() : {} | |
}, | |
Ec = function(a, b) { | |
a.b.length < a.d ? a.b.push(b) : Dc(a, b) | |
}, | |
Dc = function(a, b) { | |
if (a.c) | |
a.c(b); | |
else if (oa(b)) | |
if (na(b.q)) | |
b.q(); | |
else | |
for (var c in b) | |
delete b[c] | |
}; | |
P.prototype.g = function() { | |
P.k.g.call(this); | |
for (var a = this.b; a.length;) | |
Dc(this, a.pop()); | |
delete this.b | |
}; | |
var Fc, | |
Gc = (Fc = "ScriptEngine" in t && t.ScriptEngine() == "JScript") ? t.ScriptEngineMajorVersion() + "." + t.ScriptEngineMinorVersion() + "." + t.ScriptEngineBuildVersion() : "0"; | |
var Hc = function() {}, | |
Ic = 0; | |
s = Hc.prototype; | |
s.key = 0; | |
s.N = !1; | |
s.Ma = !1; | |
s.P = function(a, b, c, d, f, e) { | |
na(a) ? this.a = !0: a && a.handleEvent && na(a.handleEvent) ? this.a = !1: i(Error("Invalid listener argument")); | |
this.U = a; | |
this.b = b; | |
this.src = c; | |
this.type = d; | |
this.capture = !!f; | |
this.ia = e; | |
this.Ma = !1; | |
this.key = ++Ic; | |
this.N = !1 | |
}; | |
s.handleEvent = function(a) { | |
return this.a ? this.U.call(this.ia || this.src, a) : this.U.handleEvent.call(this.U, a) | |
}; | |
var Jc, | |
Kc, | |
Lc, | |
Mc, | |
Nc, | |
Oc, | |
Pc, | |
Qc, | |
Rc, | |
Sc, | |
Tc; (function() { | |
function a() { | |
return { | |
n: 0, | |
M: 0 | |
} | |
} | |
function b() { | |
return [] | |
} | |
function c() { | |
var a = function(b) { | |
return g.call(a.src, a.key, b) | |
}; | |
return a | |
} | |
function d() { | |
return new Hc | |
} | |
function f() { | |
return new Bc | |
} | |
var e = Fc && !(Ia(Gc, "5.7") >= 0), | |
g; | |
Oc = function(a) { | |
g = a | |
}; | |
if (e) { | |
Jc = function() { | |
return Cc(h) | |
}; | |
Kc = function(a) { | |
Ec(h, a) | |
}; | |
Lc = function() { | |
return Cc(l) | |
}; | |
Mc = function(a) { | |
Ec(l, a) | |
}; | |
Nc = function() { | |
return Cc(k) | |
}; | |
Pc = function() { | |
Ec(k, c()) | |
}; | |
Qc = function() { | |
return Cc(n) | |
}; | |
Rc = function(a) { | |
Ec(n, a) | |
}; | |
Sc = function() { | |
return Cc(p) | |
}; | |
Tc = function(a) { | |
Ec(p, a) | |
}; | |
var h = new P(0, 600); | |
h.a = a; | |
var l = new P(0, 600); | |
l.a = b; | |
var k = new P(0, 600); | |
k.a = c; | |
var n = new P(0, 600); | |
n.a = d; | |
var p = new P(0, 600); | |
p.a = f | |
} else | |
Jc = a, | |
Kc = ha, | |
Lc = b, | |
Mc = ha, | |
Nc = c, | |
Pc = ha, | |
Qc = d, | |
Rc = ha, | |
Sc = f, | |
Tc = ha | |
})(); | |
var Uc = {}, | |
Q = {}, | |
Vc = {}, | |
Wc = {}, | |
Xc = function(a, b, c, d, f) { | |
if (b) | |
if (la(b)) { | |
for (var e = 0; e < b.length; e++) | |
Xc(a, b[e], c, d, f); | |
return q | |
} else { | |
var d = !!d, | |
g = Q; | |
b in g || (g[b] = Jc()); | |
g = g[b]; | |
d in g || (g[d] = Jc(), g.n++); | |
var g = g[d], | |
h = ra(a), | |
l; | |
g.M++; | |
if (g[h]) { | |
l = g[h]; | |
for (e = 0; e < l.length; e++) | |
if (g = l[e], g.U == c && g.ia == f) { | |
if (g.N) | |
break; | |
return l[e].key | |
} | |
} else | |
l = g[h] = Lc(), | |
g.n++; | |
e = Nc(); | |
e.src = a; | |
g = Qc(); | |
g.P(c, e, a, b, d, f); | |
c = g.key; | |
e.key = c; | |
l.push(g); | |
Uc[c] = g; | |
Vc[h] || (Vc[h] = Lc()); | |
Vc[h].push(g); | |
a.addEventListener ? (a == t || !a.Ua) && a.addEventListener(b, e, d) : a.attachEvent(b in Wc ? Wc[b] : Wc[b] = "on" + b, e); | |
return c | |
} else | |
i(Error("Invalid event type")) | |
}, | |
Yc = function(a, b, c, d, f) { | |
if (la(b)) | |
for (var e = 0; e < b.length; e++) | |
Yc(a, b[e], c, d, f); | |
else { | |
d = !!d; | |
a: { | |
e = Q; | |
if (b in e && (e = e[b], d in e && (e = e[d], a = ra(a), e[a]))) { | |
a = e[a]; | |
break a | |
} | |
a = q | |
} | |
if (a) | |
for (e = 0; e < a.length; e++) | |
if (a[e].U == c && a[e].capture == d && a[e].ia == f) { | |
Zc(a[e].key); | |
break | |
} | |
} | |
}, | |
Zc = function(a) { | |
if (Uc[a]) { | |
var b = Uc[a]; | |
if (!b.N) { | |
var c = b.src, | |
d = b.type, | |
f = b.b, | |
e = b.capture; | |
c.removeEventListener ? (c == t || !c.Ua) && c.removeEventListener(d, f, e) : c.detachEvent && c.detachEvent(d in Wc ? Wc[d] : Wc[d] = "on" + d, f); | |
c = ra(c); | |
f = Q[d][e][c]; | |
if (Vc[c]) { | |
var g = Vc[c]; | |
Qa(g, b); | |
g.length == 0 && delete Vc[c] | |
} | |
b.N = !0; | |
f.Wa = !0; | |
$c(d, e, c, f); | |
delete Uc[a] | |
} | |
} | |
}, | |
$c = function(a, b, c, d) { | |
if (!d.ca && d.Wa) { | |
for (var f = 0, e = 0; f < d.length; f++) | |
if (d[f].N) { | |
var g = d[f].b; | |
g.src = q; | |
Pc(g); | |
Rc(d[f]) | |
} else | |
f != e && (d[e] = d[f]), | |
e++; | |
d.length = e; | |
d.Wa = !1; | |
e == 0 && (Mc(d), delete Q[a][b][c], Q[a][b].n--, Q[a][b].n == 0 && (Kc(Q[a][b]), delete Q[a][b], Q[a].n--), Q[a].n == 0 && (Kc(Q[a]), delete Q[a])) | |
} | |
}, | |
ad = function(a, b, c) { | |
var d = 0, | |
f = b == q, | |
e = c == q, | |
c = !!c; | |
if (a == q) | |
Ya(Vc, function(a) { | |
for (var g = a.length - 1; g >= 0; g--) { | |
var h = a[g]; | |
if ((f || b == h.type) && (e || c == h.capture)) | |
Zc(h.key), | |
d++ | |
} | |
}); | |
else if (a = ra(a), Vc[a]) | |
for (var a = Vc[a], g = a.length - 1; g >= 0; g--) { | |
var h = a[g]; | |
if ((f || b == h.type) && (e || c == h.capture)) | |
Zc(h.key), | |
d++ | |
} | |
return d | |
}, | |
cd = function(a, b, c, d, f) { | |
var e = 1, | |
b = ra(b); | |
if (a[b]) { | |
a.M--; | |
a = a[b]; | |
a.ca ? a.ca++:a.ca = 1; | |
try { | |
for (var g = a.length, h = 0; h < g; h++) { | |
var l = a[h]; | |
l && !l.N && (e & =bd(l, f) !== !1) | |
} | |
} finally { | |
a.ca--, | |
$c(c, d, b, a) | |
} | |
} | |
return Boolean(e) | |
}, | |
bd = function(a, b) { | |
var c = a.handleEvent(b); | |
a.Ma && Zc(a.key); | |
return c | |
}; | |
Oc(function(a, b) { | |
if (!Uc[a]) | |
return ! 0; | |
var c = Uc[a], | |
d = c.type, | |
f = Q; | |
if (! (d in f)) | |
return ! 0; | |
var f = f[d], | |
e, | |
g; | |
xc === j && (xc = O && !t.addEventListener); | |
if (xc) { | |
e = b || ga("window.event"); | |
var h = !0 in f, | |
l = !1 in f; | |
if (h) { | |
if (e.keyCode < 0 || e.returnValue != j) | |
return ! 0; | |
a: { | |
var k = !1; | |
if (e.keyCode == 0) | |
try { | |
e.keyCode = -1; | |
break a | |
} catch(n) { | |
k = !0 | |
} | |
if (k || e.returnValue == j) | |
e.returnValue = !0 | |
} | |
} | |
k = Sc(); | |
k.P(e, this); | |
e = !0; | |
try { | |
if (h) { | |
for (var p = Lc(), K = k.a; K; K = K.parentNode) | |
p.push(K); | |
g = f[!0]; | |
g.M = g.n; | |
for (var r = p.length - 1; ! k.b && r >= 0 && g.M; r--) | |
k.a = p[r], | |
e & =cd(g, p[r], d, !0, k); | |
if (l) { | |
g = f[!1]; | |
g.M = g.n; | |
for (r = 0; ! k.b && r < p.length && g.M; r++) | |
k.a = p[r], | |
e & =cd(g, p[r], d, !1, k) | |
} | |
} else | |
e = bd(c, k) | |
} finally { | |
if (p) | |
p.length = 0, | |
Mc(p); | |
k.q(); | |
Tc(k) | |
} | |
return e | |
} | |
d = new Bc(b, this); | |
try { | |
e = bd(c, d) | |
} finally { | |
d.q() | |
} | |
return e | |
}); | |
var dd = function() { | |
this.c = {} | |
}; | |
B(dd, Jb); | |
dd.prototype.d = L("goog.messaging.AbstractChannel"); | |
dd.prototype.w = function(a) { | |
a && a() | |
}; | |
dd.prototype.r = function() { | |
return ! 0 | |
}; | |
dd.prototype.g = function() { | |
dd.k.g.call(this); | |
Mb(this.d); | |
delete this.d; | |
delete this.c; | |
delete this.i | |
}; | |
var ed = RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([\\w\\d\\-\\u0100-\\uffff.%]*)(?::([0-9]+))?)?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$"), | |
fd = function(a) { | |
var b = a.match(ed), | |
a = b[1], | |
c = b[2], | |
d = b[3], | |
b = b[4], | |
f = []; | |
a && f.push(a, ":"); | |
d && (f.push("//"), c && f.push(c, "@"), f.push(d), b && f.push(":", b)); | |
return f.join("") | |
}; | |
var gd = { | |
1: "NativeMessagingTransport", | |
2: "FrameElementMethodTransport", | |
3: "IframeRelayTransport", | |
4: "IframePollingTransport", | |
5: "FlashTransport", | |
6: "NixTransport" | |
}, | |
hd = ["pu", "lru", "pru", "lpu", "ppu"], | |
id = {}, | |
kd = function() { | |
for (var a = 10, b = jd, c = b.length, d = ""; a-->0;) | |
d += b.charAt(Math.floor(Math.random() * c)); | |
return d | |
}, | |
jd = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", | |
H = L("goog.net.xpc"); | |
var ld = function(a) { | |
this.b = a || oc() | |
}; | |
B(ld, Jb); | |
ld.prototype.L = 0; | |
var R = function(a) { | |
return a.b.a.parentWindow || a.b.a.defaultView | |
}; | |
var md = function(a, b) { | |
this.b = b || oc(); | |
this.e = a; | |
this.c = []; | |
this.i = x(this.Kb, this) | |
}; | |
B(md, ld); | |
s = md.prototype; | |
s.L = 2; | |
s.la = !1; | |
s.Pb = 0; | |
s.w = function() { | |
nd(this.e) == 0 ? (this.a = this.e.K, this.a.XPC_toOuter = x(this.La, this)) : this.Ka() | |
}; | |
s.Ka = function() { | |
var a = !0; | |
try { | |
if (!this.a) | |
this.a = R(this).frameElement; | |
if (this.a && this.a.XPC_toOuter) | |
this.d = this.a.XPC_toOuter, | |
this.a.XPC_toOuter.XPC_toInner = x(this.La, this), | |
a = !1, | |
this.send("tp", "SETUP_ACK"), | |
od(this.e) | |
} catch(b) { | |
H.log(D, "exception caught while attempting setup: " + b, j) | |
} | |
if (a) { | |
if (!this.h) | |
this.h = x(this.Ka, this); | |
R(this).setTimeout(this.h, 100) | |
} | |
}; | |
s.ha = function(a) { | |
nd(this.e) == 0 && !this.e.r() && a == "SETUP_ACK" ? (this.d = this.a.XPC_toOuter.XPC_toInner, od(this.e)) : i(Error("Got unexpected transport message.")) | |
}; | |
s.La = function(a, b) { | |
if (!this.la && this.c.length == 0) | |
pd(this.e, a, b); | |
else if (this.c.push({ | |
Ob: a, | |
ma: b | |
}), this.c.length == 1) | |
this.Pb = R(this).setTimeout(this.i, 1) | |
}; | |
s.Kb = function() { | |
for (; this.c.length;) { | |
var a = this.c.shift(); | |
pd(this.e, a.Ob, a.ma) | |
} | |
}; | |
s.send = function(a, b) { | |
this.la = !0; | |
this.d(a, b); | |
this.la = !1 | |
}; | |
s.g = function() { | |
md.k.g.call(this); | |
this.a = this.d = q | |
}; | |
var S = function(a, b) { | |
this.b = b || oc(); | |
this.e = a; | |
this.R = this.e.a.ppu; | |
this.Eb = this.e.a.lpu; | |
this.F = [] | |
}, | |
qd, | |
rd; | |
B(S, ld); | |
S.prototype.L = 4; | |
S.prototype.D = 0; | |
S.prototype.Q = !1; | |
S.prototype.A = !1; | |
var sd = function(a) { | |
return "googlexpc_" + a.e.name + "_msg" | |
}, | |
td = function(a) { | |
return "googlexpc_" + a.e.name + "_ack" | |
}; | |
S.prototype.w = function() { | |
I("transport connect called"); | |
if (!this.A) { | |
I("initializing..."); | |
var a = sd(this); | |
this.d = ud(this, a); | |
this.T = R(this).frames[a]; | |
a = td(this); | |
this.a = ud(this, a); | |
this.I = R(this).frames[a]; | |
this.A = !0 | |
} | |
if (!vd(this, sd(this)) || !vd(this, td(this))) { | |
J("foreign frames not (yet) present"); | |
if (nd(this.e) == 1 && !this.Fb) | |
J("innerPeerReconnect called"), | |
this.e.name = kd(), | |
J("switching channels: " + this.e.name), | |
wd(this), | |
this.A = !1, | |
this.Fb = ud(this, "googlexpc_reconnect_" + this.e.name); | |
else if (nd(this.e) == 0) { | |
J("outerPeerReconnect called"); | |
for (var a = this.e.o.frames, b = a.length, c = 0; c < b; c++) { | |
var d; | |
try { | |
if (a[c] && a[c].name) | |
d = a[c].name | |
} catch(f) {} | |
if (d) { | |
var e = d.split("_"); | |
if (e.length == 3 && e[0] == "googlexpc" && e[1] == "reconnect") { | |
this.e.name = e[2]; | |
wd(this); | |
this.A = !1; | |
break | |
} | |
} | |
} | |
} | |
R(this).setTimeout(x(this.w, this), 100) | |
} else | |
I("foreign frames present"), | |
this.Ia = new xd(this, this.e.o.frames[sd(this)], x(this.Hb, this)), | |
this.Ha = new xd(this, this.e.o.frames[td(this)], x(this.Gb, this)), | |
this.Ga() | |
}; | |
var ud = function(a, b) { | |
J("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"; | |
R(a).document.body.appendChild(c); | |
return c | |
}, | |
wd = function(a) { | |
J("deconstructSenderFrames called"); | |
if (a.d) | |
a.d.parentNode.removeChild(a.d), | |
a.d = q, | |
a.T = q; | |
if (a.a) | |
a.a.parentNode.removeChild(a.a), | |
a.a = q, | |
a.I = q | |
}, | |
vd = function(a, b) { | |
J("checking for receive frame: " + b); | |
try { | |
var c = a.e.o.frames[b]; | |
if (!c || c.location.href.indexOf(a.Eb) != 0) | |
return ! 1 | |
} catch(d) { | |
return ! 1 | |
} | |
return ! 0 | |
}; | |
S.prototype.Ga = function() { | |
var a = this.e.o.frames; | |
if (!a[td(this)] || !a[sd(this)]) { | |
if (!this.Xa) | |
this.Xa = x(this.Ga, this); | |
R(this).setTimeout(this.Xa, 100); | |
I("local frames not (yet) present") | |
} else | |
this.Va = new yd(this.R, this.T), | |
this.i = new yd(this.R, this.I), | |
I("local frames ready"), | |
R(this).setTimeout(x(function() { | |
this.Va.send("SETUP"); | |
this.Q = this.ac = !0; | |
I("SETUP sent") | |
}, this), 100) | |
}; | |
var zd = function(a) { | |
if (a.na && a.Ta) { | |
if (od(a.e), a.c) { | |
I("delivering queued messages (" + a.c.length + ")"); | |
for (var b = 0, c; b < a.c.length; b++) | |
c = a.c[b], | |
pd(a.e, c.Qb, c.ma); | |
delete a.c | |
} | |
} else | |
J("checking if connected: ack sent:" + a.na + ", ack rcvd: " + a.Ta) | |
}; | |
S.prototype.Hb = function(a) { | |
J("msg received: " + a); | |
if (a == "SETUP") { | |
if (this.i) | |
this.i.send("SETUP_ACK"), | |
J("SETUP_ACK sent"), | |
this.na = !0, | |
zd(this) | |
} else if (this.e.r() || this.na) { | |
var b = a.indexOf("|"), | |
c = a.substring(0, b), | |
a = a.substring(b + 1), | |
b = c.indexOf(","); | |
if (b == -1) { | |
var d; | |
this.i.send("ACK:" + c); | |
Ad(this, a) | |
} else { | |
d = c.substring(0, b); | |
this.i.send("ACK:" + d); | |
c = c.substring(b + 1).split("/"); | |
b = parseInt(c[0], 10); | |
c = parseInt(c[1], 10); | |
if (b == 1) | |
this.oa = []; | |
this.oa.push(a); | |
b == c && (Ad(this, this.oa.join("")), delete this.oa) | |
} | |
} else | |
vb(H, "received msg, but channel is not connected") | |
}; | |
S.prototype.Gb = function(a) { | |
J("ack received: " + a); | |
a == "SETUP_ACK" ? (this.Q = !1, this.Ta = !0, zd(this)) : this.e.r() ? this.Q ? parseInt(a.split(":")[1], 10) == this.D ? (this.Q = !1, Bd(this)) : vb(H, "got ack with wrong sequence") : vb(H, "got unexpected ack") : vb(H, "received ack, but channel not connected") | |
}; | |
var Bd = function(a) { | |
if (!a.Q && a.F.length) { | |
var b = a.F.shift();++a.D; | |
a.Va.send(a.D + b); | |
J("msg sent: " + a.D + b); | |
a.Q = !0 | |
} | |
}, | |
Ad = function(a, b) { | |
var c = b.indexOf(":"), | |
d = b.substr(0, c), | |
c = b.substring(c + 1); | |
a.e.r() ? pd(a.e, d, c) : ((a.c || (a.c = [])).push({ | |
Qb: d, | |
ma: c | |
}), J("queued delivery")) | |
}; | |
S.prototype.h = 3800; | |
S.prototype.send = function(a, b) { | |
var c = a + ":" + b; | |
if (!O || b.length <= this.h) | |
this.F.push("|" + c); | |
else | |
for (var d = b.length, f = Math.ceil(d / this.h), e = 0, g = 1; e < d;) | |
this.F.push("," + g + "/" + f + "|" + c.substr(e, this.h)), | |
g++, | |
e += this.h; | |
Bd(this) | |
}; | |
S.prototype.g = function() { | |
S.k.g.call(this); | |
var a = Cd; | |
Qa(a, this.Ia); | |
Qa(a, this.Ha); | |
this.Ia = this.Ha = q; | |
uc(this.d); | |
uc(this.a); | |
this.T = this.I = this.d = this.a = q | |
}; | |
var Cd = [], | |
Dd = x(function() { | |
var a = !1; | |
try { | |
for (var b = 0, c = Cd.length; b < c; b++) { | |
var d; | |
if (! (d = a)) { | |
var f = Cd[b], | |
e = f.b.location.href; | |
if (e != f.a) { | |
f.a = e; | |
var g = e.split("#")[1]; | |
g && (g = g.substr(1), f.c(decodeURIComponent(g))); | |
d = !0 | |
} else | |
d = !1 | |
} | |
a = d | |
} | |
} catch(h) { | |
if (H.info("receive_() failed: " + h), b = Cd[b].d.e, H.info("Transport Error"), b.close(), !Cd.length) | |
return | |
} | |
b = y(); | |
a && (qd = b); | |
rd = window.setTimeout(Dd, b - qd < 1E3 ? 10: 100) | |
}, S), | |
Ed = function() { | |
I("starting receive-timer"); | |
qd = y(); | |
rd && window.clearTimeout(rd); | |
rd = window.setTimeout(Dd, 10) | |
}, | |
yd = function(a, b) { | |
this.c = a; | |
this.b = b; | |
this.a = 0 | |
}; | |
yd.prototype.send = function(a) { | |
this.a = ++this.a % 2; | |
a = this.c + "#" + this.a + encodeURIComponent(a); | |
try { | |
Wb ? this.b.location.href = a: this.b.location.replace(a) | |
} catch(b) { | |
H.log(D, "sending failed", b) | |
} | |
Ed() | |
}; | |
var xd = function(a, b, c) { | |
this.d = a; | |
this.b = b; | |
this.c = c; | |
this.a = this.b.location.href.split("#")[0] + "#INITIAL"; | |
Cd.push(this); | |
Ed() | |
}; | |
var Gd = function(a, b) { | |
this.b = b || oc(); | |
this.e = a; | |
this.c = this.e.a.pru; | |
this.a = this.e.a.ifrid; | |
Wb && Fd() | |
}; | |
B(Gd, ld); | |
if (Wb) | |
var Hd = [], | |
Id = 0, | |
Fd = function() { | |
Id || (Id = window.setTimeout(function() { | |
Jd() | |
}, 1E3)) | |
}, | |
Jd = function(a) { | |
for (var b = y(), a = a || 3E3; Hd.length && b - Hd[0].timestamp >= a;) { | |
var c = Hd.shift().Ib; | |
uc(c); | |
J("iframe removed") | |
} | |
Id = window.setTimeout(Kd, 1E3) | |
}, | |
Kd = function() { | |
Jd() | |
}; | |
var Ld = {}; | |
Gd.prototype.L = 3; | |
Gd.prototype.w = function() { | |
R(this).xpcRelay || (R(this).xpcRelay = Md); | |
this.send("tp", "SETUP") | |
}; | |
var Md = function(a, b) { | |
var c = b.indexOf(":"), | |
d = b.substr(0, c), | |
f = b.substr(c + 1); | |
if (!O || (c = d.indexOf("|")) == -1) | |
var e = d; | |
else { | |
var e = d.substr(0, c), | |
d = d.substr(c + 1), | |
c = d.indexOf("+"), | |
g = d.substr(0, c), | |
c = parseInt(d.substr(c + 1), 10), | |
h = Ld[g]; | |
h || (h = Ld[g] = { | |
ib: [], | |
jb: 0, | |
hb: 0 | |
}); | |
if (d.indexOf("++") != -1) | |
h.hb = c + 1; | |
h.ib[c] = f; | |
h.jb++; | |
if (h.jb != h.hb) | |
return; | |
f = h.ib.join(""); | |
delete Ld[g] | |
} | |
pd(id[a], e, decodeURIComponent(f)) | |
}; | |
Gd.prototype.ha = function(a) { | |
a == "SETUP" ? (this.send("tp", "SETUP_ACK"), od(this.e)) : a == "SETUP_ACK" && od(this.e) | |
}; | |
Gd.prototype.send = function(a, b) { | |
var c = encodeURIComponent(b), | |
d = c.length; | |
if (O && d > 1800) | |
for (var f = Ga(), e = 0, g = 0; e < d; g++) { | |
var h = c.substr(e, 1800); | |
e += 1800; | |
Nd(this, a, h, f + (e >= d ? "++": "+") + g) | |
} else | |
Nd(this, a, c) | |
}; | |
var Nd = function(a, b, c, d) { | |
if (O) { | |
var f = R(a).document.createElement("div"); | |
f.innerHTML = '<iframe onload="this.xpcOnload()"></iframe>'; | |
f = f.childNodes[0]; | |
f.xpcOnload = Od | |
} else | |
f = R(a).document.createElement("iframe"), | |
Wb ? Hd.push({ | |
timestamp: y(), | |
Ib: f | |
}) : Xc(f, "load", Od); | |
var e = f.style; | |
e.visibility = "hidden"; | |
e.width = f.style.height = "0px"; | |
e.position = "absolute"; | |
e = a.c; | |
e += "#" + a.e.name; | |
a.a && (e += "," + a.a); | |
e += "|" + b; | |
d && (e += "|" + d); | |
e += ":" + c; | |
f.src = e; | |
R(a).document.body.appendChild(f); | |
J("msg sent: " + e) | |
}, | |
Od = function() { | |
J("iframe-load"); | |
uc(this); | |
this.a = q | |
}; | |
Gd.prototype.g = function() { | |
Gd.k.g.call(this); | |
Wb && Jd(0) | |
}; | |
var Pd = function(a, b, c) { | |
this.b = c || oc(); | |
this.e = a; | |
this.Sa = b || "*" | |
}; | |
B(Pd, ld); | |
Pd.prototype.a = !1; | |
Pd.prototype.L = 1; | |
var Qd = {}, | |
Rd = function(a) { | |
var b = a.G.data, | |
c = b.indexOf("|"), | |
d = b.indexOf(":"); | |
if (c == -1 || d == -1) | |
return ! 1; | |
var f = b.substring(0, c), | |
c = b.substring(c + 1, d), | |
b = b.substring(d + 1); | |
I("messageReceived: channel=" + f + ", service=" + c + ", payload=" + b); | |
if (d = id[f]) | |
return pd(d, c, b, a.G.origin), | |
!0; | |
for (var e in id) | |
if (a = id[e], nd(a) == 1 && !a.r() && c == "tp" && b == "SETUP") | |
return I("changing channel name to " + f), | |
a.name = f, | |
delete id[e], | |
id[f] = a, | |
pd(a, c, b), | |
!0; | |
H.info('channel name mismatch; message ignored"'); | |
return ! 1 | |
}; | |
s = Pd.prototype; | |
s.ha = function(a) { | |
switch (a) { | |
case "SETUP": | |
this.send("tp", "SETUP_ACK"); | |
break; | |
case "SETUP_ACK": | |
od(this.e) | |
} | |
}; | |
s.w = function() { | |
var a = R(this), | |
b = ra(a), | |
c = Qd[b]; | |
typeof c == "number" || (c = 0); | |
c == 0 && Xc(a.postMessage ? a: a.document, "message", Rd, !1, Pd); | |
Qd[b] = c + 1; | |
this.a = !0; | |
this.Oa() | |
}; | |
s.Oa = function() { ! this.e.r() && !this.u && (this.send("tp", "SETUP"), R(this).setTimeout(x(this.Oa, this), 100)) | |
}; | |
s.send = function(a, b) { | |
var c = this.e.o; | |
if (c) { | |
var d = c.postMessage ? c: c.document; | |
this.send = function(a, b) { | |
I("send(): payload=" + b + " to hostname=" + this.Sa); | |
d.postMessage(this.e.name + "|" + a + ":" + b, this.Sa) | |
}; | |
this.send(a, b) | |
} else | |
I("send(): window not ready") | |
}; | |
s.g = function() { | |
Pd.k.g.call(this); | |
if (this.a) { | |
var a = R(this), | |
b = ra(a), | |
c = Qd[b]; | |
Qd[b] = c - 1; | |
c == 1 && Yc(a.postMessage ? a: a.document, "message", Rd, !1, Pd) | |
} | |
delete this.send | |
}; | |
var fe = function(a, b) { | |
this.b = b || oc(); | |
this.e = a; | |
this.a = a.at || ""; | |
this.c = a.rat || ""; | |
var c = R(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 = !0 | |
} catch(d) { | |
H.log(D, "exception caught while attempting global setup: " + d, j) | |
} | |
this.GCXPC____NIXJS_handle_message = this.Bb; | |
this.GCXPC____NIXJS_create_channel = this.Ab | |
}; | |
B(fe, ld); | |
s = fe.prototype; | |
s.L = 6; | |
s.O = !1; | |
s.C = q; | |
s.w = function() { | |
nd(this.e) == 0 ? this.Pa() : this.Ja() | |
}; | |
s.Pa = function() { | |
if (!this.O) { | |
var a = this.e.K; | |
try { | |
a.contentWindow.opener = R(this).GCXPC____NIXVBS_get_wrapper(this, this.a), | |
this.O = !0 | |
} catch(b) { | |
H.log(D, "exception caught while attempting setup: " + b, j) | |
} | |
this.O || R(this).setTimeout(x(this.Pa, this), 100) | |
} | |
}; | |
s.Ja = function() { | |
if (!this.O) { | |
try { | |
var a = R(this).opener; | |
if (a && "GCXPC____NIXVBS_container" in a) { | |
this.C = a; | |
if (this.C.GetAuthToken() != this.c) { | |
H.log(D, "Invalid auth token from other party", j); | |
return | |
} | |
this.C.CreateChannel(R(this).GCXPC____NIXVBS_get_wrapper(this, this.a)); | |
this.O = !0; | |
od(this.e) | |
} | |
} catch(b) { | |
H.log(D, "exception caught while attempting setup: " + b, j); | |
return | |
} | |
this.O || R(this).setTimeout(x(this.Ja, this), 100) | |
} | |
}; | |
s.Ab = function(a) { (typeof a != "unknown" || !("GCXPC____NIXVBS_container" in a)) && H.log(D, "Invalid NIX channel given to createChannel_", j); | |
this.C = a; | |
this.C.GetAuthToken() != this.c ? H.log(D, "Invalid auth token from other party", j) : od(this.e) | |
}; | |
s.Bb = function(a, b) { | |
R(this).setTimeout(x(function() { | |
pd(this.e, a, b) | |
}, this), 1) | |
}; | |
s.send = function(a, b) { | |
typeof this.C !== "unknown" && H.log(D, "NIX channel not connected", j); | |
this.C.SendMessage(a, b) | |
}; | |
s.g = function() { | |
fe.k.g.call(this); | |
this.C = q | |
}; | |
var he = function(a, b) { | |
this.c = {}; | |
for (var c = 0, d; d = hd[c]; c++) | |
d in a && !/^https?:\/\//.test(a[d]) && i(Error("URI " + a[d] + " is invalid for field " + d)); | |
this.a = a; | |
this.name = this.a.cn || kd(); | |
this.b = b || oc(); | |
a.lpu = a.lpu || fd((this.b.a.parentWindow || this.b.a.defaultView).location.href) + "/robots.txt"; | |
a.ppu = a.ppu || fd(a.pu || "") + "/robots.txt"; | |
id[this.name] = this; | |
Xc(window, "unload", ge); | |
H.info("CrossPageChannel created: " + this.name) | |
}; | |
B(he, dd); | |
var ie = /^%*tp$/, | |
je = /^%+tp$/; | |
s = he.prototype; | |
s.m = q; | |
s.pa = 1; | |
s.r = function() { | |
return this.pa == 2 | |
}; | |
s.o = q; | |
s.K = q; | |
s.Db = !1; | |
s.Cb = !1; | |
s.w = function(a) { | |
this.h = a || ha; | |
if (this.Db) | |
H.info("connect() deferred"), | |
this.Cb = !0; | |
else { | |
H.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.o = a; | |
if (!this.o) | |
window == top ? i(Error("CrossPageChannel: Can't connect, peer window-object not set.")) : this.o = window.parent; | |
if (!this.m) { | |
if (!this.a.tp) { | |
var a = this.a, | |
b; | |
if (na(document.postMessage) || na(window.postMessage) || O && window.postMessage) | |
b = 1; | |
else if (Vb) | |
b = 2; | |
else if (O && this.a.pru) | |
b = 3; | |
else { | |
var c; | |
if (c = O) { | |
c = !1; | |
try { | |
b = window.opener, | |
window.opener = {}, | |
c = wc(window, "opener"), | |
window.opener = b | |
} catch(d) {} | |
} | |
b = c ? 6: 4 | |
} | |
a.tp = b | |
} | |
switch (this.a.tp) { | |
case 1: | |
this.m = new Pd(this, this.a.ph, this.b); | |
break; | |
case 6: | |
this.m = new fe(this, this.b); | |
break; | |
case 2: | |
this.m = new md(this, this.b); | |
break; | |
case 3: | |
this.m = new Gd(this, this.b); | |
break; | |
case 4: | |
this.m = new S(this, this.b) | |
} | |
this.m ? H.info("Transport created: " + (gd[this.m.L] || "")) : i(Error("CrossPageChannel: No suitable transport found!")) | |
} | |
this.m.w() | |
} | |
}; | |
s.close = function() { | |
if (this.r()) | |
this.pa = 3, | |
this.m.q(), | |
this.h = this.m = q, | |
H.info('Channel "' + this.name + '" closed') | |
}; | |
var od = function(a) { | |
if (!a.r()) | |
a.pa = 2, | |
H.info('Channel "' + a.name + '" connected'), | |
a.h() | |
}; | |
he.prototype.send = function(a, b) { | |
this.r() ? this.o.closed ? (H.log(D, "Peer has disappeared.", j), this.close()) : (oa(b) && (b = Cb(b)), this.m.send(ke(a), b)) : H.log(D, "Can't send. Channel not connected.", j) | |
}; | |
var pd = function(a, b, c, d) { | |
var f = a.a.ph; | |
if (/^[\s\xa0]*$/.test(d == q ? "": String(d)) || /^[\s\xa0]*$/.test(f == q ? "": String(f)) || d == a.a.ph) | |
if (a.u) | |
vb(H, "CrossPageChannel::deliver_(): Disposed."); | |
else if (!b || b == "tp") | |
a.m.ha(c); | |
else if (a.r()) { | |
if (b = b.replace(/%[0-9a-f]{2}/gi, decodeURIComponent), b = je.test(b) ? b.substring(1) : b, d = a.c[b], d || (a.i ? (d = va(a.i, b), f = oa(c), d = { | |
fa: d, | |
ga: f | |
}) : (vb(a.d, 'Unknown service name "' + b + '"'), d = q)), d) { | |
var e; | |
a: { | |
if ((f = d.ga) && u(c)) | |
try { | |
e = zb(c); | |
break a | |
} catch(g) { | |
vb(a.d, "Expected JSON payload for " + b + ', was "' + c + '"'); | |
e = q; | |
break a | |
} else if (!f && !u(c)) { | |
e = Cb(c); | |
break a | |
} | |
e = c | |
} | |
e != q && d.fa(e) | |
} | |
} else | |
H.info("CrossPageChannel::deliver_(): Not connected."); | |
else | |
vb(H, 'Message received from unapproved origin "' + d + '" - rejected.') | |
}, | |
ke = function(a) { | |
ie.test(a) && (a = "%" + a); | |
return a.replace(/[%:|]/g, encodeURIComponent) | |
}, | |
nd = function(a) { | |
return window.parent == a.o ? 1: 0 | |
}; | |
he.prototype.g = function() { | |
he.k.g.call(this); | |
this.close(); | |
this.K = this.o = q; | |
delete id[this.name] | |
}; | |
var ge = function() { | |
for (var a in id) { | |
var b = id[a]; | |
b && b.q() | |
} | |
}; | |
var le = function() {}; | |
B(le, Jb); | |
s = le.prototype; | |
s.Ua = !0; | |
s.Ya = q; | |
s.qa = function(a) { | |
this.Ya = a | |
}; | |
s.addEventListener = function(a, b, c, d) { | |
Xc(this, a, b, c, d) | |
}; | |
s.removeEventListener = function(a, b, c, d) { | |
Yc(this, a, b, c, d) | |
}; | |
s.g = function() { | |
le.k.g.call(this); | |
ad(this); | |
this.Ya = q | |
}; | |
var me = t.window, | |
ne = function(a, b) { | |
na(a) || (a && typeof a.handleEvent == "function" ? a = x(a.handleEvent, a) : i(Error("Invalid listener argument"))); | |
b > 2147483647 || me.setTimeout(a, b || 0) | |
}; | |
var oe = function(a) { | |
if ("isOnce" in a) | |
return a; | |
var b = !1, | |
c = function() { | |
b && i(Error("already called: " + a)); | |
b = !0; | |
a.apply(t, arguments) | |
}; | |
c.isOnce = !0; | |
return c | |
}, | |
pe = function(a) { | |
if ("isAsyncOnce" in a) | |
return a; | |
var b = oe(function() { | |
var b = arguments; | |
window.setTimeout(function() { | |
a.apply(t, b) | |
}, 0) | |
}); | |
b.isAsyncOnce = !0; | |
return b | |
}, | |
qe = function(a, b) { | |
var c = y() + 1E4, | |
d = function() { | |
var f; | |
try { | |
f = a() | |
} catch(e) { | |
return b(!1, e) | |
} | |
if (f) | |
return b(!0); | |
if (c && y() + 100 > c) | |
return b(!1); | |
ne(d, 100) | |
}; | |
ne(d, 0) | |
}, | |
re = function(a, b) { | |
var c = ha; | |
Oa(Va(arguments, 1), function(b) { | |
c = x(b, a, c) | |
}); | |
c() | |
}; | |
var se = function(a) { | |
return window.JSON ? window.JSON.stringify(a) : Cb(a) | |
}; | |
var te; (function() { | |
function a(a) { | |
a = a.match(/[\d]+/g); | |
a.length = 3; | |
return a.join(".") | |
} | |
var b = !1, | |
c = ""; | |
if (navigator.plugins && navigator.plugins.length) { | |
var d = navigator.plugins["Shockwave Flash"]; | |
d && (b = !0, d.description && (c = a(d.description))); | |
navigator.plugins["Shockwave Flash 2.0"] && (b = !0, 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 = !0, | |
c = a(d.GetVariable("$version")) | |
} catch(f) { | |
try { | |
d = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"), | |
b = !0, | |
c = "6.0.21" | |
} catch(e) { | |
try { | |
d = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"), | |
b = !0, | |
c = a(d.GetVariable("$version")) | |
} catch(g) {} | |
} | |
} | |
te = c | |
})(); | |
var ue = "NONE"; (function() { | |
Ia(te, "9") >= 0 && (ue = "FLASH"); | |
var a = document.createElement("canvas"); | |
a.width = 2; | |
a.height = 1; | |
var b = a.getContext && a.getContext("2d"); | |
if (b) { | |
var c = document.createElement("img"); | |
c.onload = function() { | |
try { | |
b.drawImage(c, 0, 0); | |
a.toDataURL(); | |
var d; | |
a: { | |
var f = b.getImageData(0, 0, 2, 1).data, | |
e = [0, 255, 0, 255, 255, 0, 0, 255]; | |
if (!ma(e) || !ma(f) || e.length != f.length) | |
d = !1; | |
else { | |
for (var g = e.length, h = 0; h < g; h++) | |
if (e[h] !== f[h]) { | |
d = !1; | |
break a | |
} | |
d = !0 | |
} | |
} | |
d && (ue = "CANVAS") | |
} catch(l) {} | |
}; | |
c.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAABCAYAAAD0In+KAAAAEUlEQVQImWNg+M/w/z8Dw38AEPgD/V7bC9oAAAAASUVORK5CYII=" | |
} | |
})(); | |
var ve = { | |
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 Ae = function(a) { | |
var b = {}, | |
a = String(a), | |
c = a.charAt(0) == "#" ? a: "#" + a; | |
if (we.test(c)) | |
return b.ta = xe(c), | |
b.type = "hex", | |
b; | |
else { | |
a: { | |
var d = a.match(ye); | |
if (d) { | |
var c = Number(d[1]), | |
f = Number(d[2]), | |
d = Number(d[3]); | |
if (c >= 0 && c <= 255 && f >= 0 && f <= 255 && d >= 0 && d <= 255) { | |
c = [c, f, d]; | |
break a | |
} | |
} | |
c = [] | |
} | |
if (c.length) | |
return f = c[0], | |
a = c[1], | |
c = c[2], | |
f = Number(f), | |
a = Number(a), | |
c = Number(c), | |
(isNaN(f) || f < 0 || f > 255 || isNaN(a) || a < 0 || a > 255 || isNaN(c) || c < 0 || c > 255) && i(Error('"(' + f + "," + a + "," + c + '") is not a valid RGB color')), | |
f = ze(f.toString(16)), | |
a = ze(a.toString(16)), | |
c = ze(c.toString(16)), | |
b.ta = "#" + f + a + c, | |
b.type = "rgb", | |
b; | |
else if (ve && (c = ve[a.toLowerCase()])) | |
return b.ta = c, | |
b.type = "named", | |
b | |
} | |
i(Error(a + " is not a valid color string")) | |
}, | |
Be = /#(.)(.)(.)/, | |
xe = function(a) { | |
we.test(a) || i(Error("'" + a + "' is not a valid hex color")); | |
a.length == 4 && (a = a.replace(Be, "#$1$1$2$2$3$3")); | |
return a.toLowerCase() | |
}, | |
we = /^#(?:[0-9a-f]{3}){1,2}$/i, | |
ye = /^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i, | |
ze = function(a) { | |
return a.length == 1 ? "0" + a: a | |
}; | |
var Ce = function(a) { | |
this.c = a | |
}; | |
B(Ce, Jb); | |
var De = new P(0, 100), | |
Ee = [], | |
Fe = function(a) { | |
if (a.a) { | |
for (var b in a.a) | |
Zc(b), | |
delete a.a[b]; | |
Ec(De, a.a); | |
a.a = q | |
} else | |
a.b && Zc(a.b) | |
}; | |
Ce.prototype.g = function() { | |
Ce.k.g.call(this); | |
Fe(this) | |
}; | |
Ce.prototype.handleEvent = function() { | |
i(Error("EventHandler.handleEvent not implemented")) | |
}; | |
var Ge = function(a) { | |
typeof a == "number" && (a = Math.round(a) + "px"); | |
return a | |
}; | |
var He = function() {}; (function(a) { | |
a.lb = function() { | |
return a.Vb || (a.Vb = new a) | |
} | |
})(He); | |
He.prototype.a = 0; | |
He.lb(); | |
var V = function(a) { | |
this.c = a || oc(); | |
this.Ub = Ie | |
}; | |
B(V, le); | |
V.prototype.T = He.lb(); | |
var Ie = q; | |
s = V.prototype; | |
s.W = q; | |
s.H = !1; | |
s.s = q; | |
s.Ub = q; | |
s.Mb = q; | |
s.v = q; | |
s.ba = q; | |
s.z = q; | |
s.Nb = !1; | |
var Je = function(a) { | |
return a.W || (a.W = ":" + (a.T.a++).toString(36)) | |
}; | |
s = V.prototype; | |
s.B = function() { | |
return this.s | |
}; | |
s.qa = function(a) { | |
this.v && this.v != a && i(Error("Method not supported")); | |
V.k.qa.call(this, a) | |
}; | |
s.Na = function() { | |
this.s = this.c.a.createElement("div") | |
}; | |
s.X = function(a, b) { | |
this.H && i(Error("Component already rendered")); | |
this.s || this.Na(); | |
a ? a.insertBefore(this.s, b || q) : this.c.a.body.appendChild(this.s); (!this.v || this.v.H) && this.V() | |
}; | |
s.V = function() { | |
this.H = !0; | |
Ke(this, function(a) { ! a.H && a.B() && a.V() | |
}) | |
}; | |
var Le = function(a) { | |
Ke(a, function(a) { | |
a.H && Le(a) | |
}); | |
a.b && Fe(a.b); | |
a.H = !1 | |
}; | |
V.prototype.g = function() { | |
V.k.g.call(this); | |
this.H && Le(this); | |
this.b && (this.b.q(), delete this.b); | |
Ke(this, function(a) { | |
a.q() | |
}); ! this.Nb && this.s && uc(this.s); | |
this.v = this.Mb = this.s = this.z = this.ba = q | |
}; | |
var Ke = function(a, b) { | |
a.ba && Na(a.ba, b, j) | |
}; | |
V.prototype.removeChild = function(a, b) { | |
if (a) { | |
var c = u(a) ? a: Je(a), | |
a = this.z && c ? (c in this.z ? this.z[c] : j) || q: q; | |
if (c && a) { | |
var d = this.z; | |
c in d && delete d[c]; | |
Qa(this.ba, a); | |
b && (Le(a), a.s && uc(a.s)); | |
c = a; | |
c == q && i(Error("Unable to set parent component")); | |
c.v = q; | |
V.k.qa.call(c, q) | |
} | |
} | |
a || i(Error("Child is not in parent component")); | |
return a | |
}; | |
var W = function(a, b) { | |
V.call(this, b); | |
this.R = a; | |
this.d = new Ce(this); | |
this.a = new bb | |
}; | |
B(W, V); | |
W.prototype.l = L("goog.ui.media.FlashObject"); | |
W.prototype.I = "window"; | |
W.prototype.D = "#000000"; | |
W.prototype.F = "sameDomain"; | |
var Me = function(a, b, c) { | |
a.A = u(b) ? b: Math.round(b) + "px"; | |
a.h = u(c) ? c: Math.round(c) + "px"; | |
if (a.B()) | |
b = a.B() ? a.B().firstChild: q, | |
c = a.A, | |
a = a.h, | |
c instanceof Ib ? (a = c.height, c = c.width) : a == j && i(Error("missing height argument")), | |
b.style.width = Ge(c), | |
b.style.height = Ge(a) | |
}; | |
W.prototype.V = function() { | |
W.k.V.call(this); | |
var a = this.B(), | |
b; | |
b = O ? '<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 = O ? '<param name="wmode" value="%s"/>': "wmode=%s", c = xa(c, this.I), d = cb(this.a), f = db(this.a), e = [], g = 0; g < d.length; g++) { | |
var h = za(d[g]), | |
l = za(f[g]); | |
e.push(h + "=" + l) | |
} | |
b = xa(b, Je(this), Je(this), "goog-ui-media-flash-object", Fa(this.R), Fa(e.join("&")), this.D, this.F, c); | |
a.innerHTML = b; | |
this.A && this.h && Me(this, this.A, this.h); | |
a = this.d; | |
b = this.B(); | |
c = Za(Ac); | |
la(c) || (Ee[0] = c, c = Ee); | |
for (d = 0; d < c.length; d++) | |
f = a, | |
e = Xc(b, c[d], zc || a, !1, a.c || a), | |
f.a ? f.a[e] = !0: f.b ? (f.a = Cc(De), f.a[f.b] = !0, f.b = q, f.a[e] = !0) : f.b = e | |
}; | |
W.prototype.Na = function() { | |
this.i != q && !(Ia(te, this.i) >= 0) && (vb(this.l, "Required flash version not found:" + this.i), i(Error("Method not supported"))); | |
var a = this.c.a.createElement("div"); | |
a.className = "goog-ui-media-flash"; | |
this.s = a | |
}; | |
W.prototype.g = function() { | |
W.k.g.call(this); | |
this.a = q; | |
this.d.q(); | |
this.d = q | |
}; | |
var Ne = function(a, b, c, d) { | |
this.d = a; | |
this.c = b; | |
this.a = c; | |
this.b = d | |
}, | |
Oe = function(a) { | |
return new Ne(a[0], a[1], a[2], a[3]) | |
}; | |
var Pe = function(a, b, c, d) { | |
d || (d = c); | |
a.beginPath(); | |
X(a, 0, 0, c.d, d.d, "top"); | |
X(a, b.width - c.c * 2, 0, c.c, d.c, "top"); | |
X(a, b.width - c.a * 2, b.height - d.a * 2, c.a, d.a, "bottom"); | |
X(a, 0, b.height - d.b * 2, c.b, d.b, "bottom"); | |
a.rect(c.d, 0, b.width - c.d - c.c, b.height / 2); | |
a.rect(b.width / 2, d.c, b.width / 2, b.height - d.c - d.a); | |
a.rect(c.b, b.height / 2, b.width - c.b - c.a, b.height / 2); | |
a.rect(0, d.d, b.width / 2, b.height - d.d - d.b); | |
a.clip() | |
}, | |
X = function(a, b, c, d, f, e) { | |
if (d && f) { | |
var g = 0, | |
h = 2 * Math.PI; | |
if ("top" == e) | |
g = Math.PI, | |
a.moveTo(b, c + f); | |
else { | |
if ("bottom" == e) | |
h = Math.PI; | |
a.moveTo(b + d * 2, c + f) | |
} | |
a.save(); | |
a.translate(b + d, c + f); | |
a.scale(d, f); | |
a.arc(0, 0, 1, g, h, !1); | |
a.restore() | |
} | |
}; | |
var Y = { | |
Sb: "GfVisibleFlash", | |
cd: "GfVisibleLog", | |
cc: "GfAllowUnsupportedPages", | |
bc: "GfAllowUnsupportedBrowsers", | |
bd: "GfUseSimpleFlow" | |
}; | |
Y.P = function() { | |
var a = t.GOOGLE_FEEDBACK_FLAGS, | |
b = Y.da; | |
if (!Y.da) | |
Y.da = {}, | |
b = Y; | |
Ya(b, function(b, d) { | |
u(b) && (Y.da[d] = b, Y[d] = a && b in a ? !!a[b] : window.location.href.indexOf(b) != -1 ? !0: !1) | |
}) | |
}; | |
Y.Yb = function() { | |
var a = {}; | |
Ya(Y.da, function(b, c) { | |
Y[c] && (a[b] = !0) | |
}); | |
return a | |
}; | |
Y.P(); | |
var Qe = [{ | |
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 Re = function() {}; | |
Re.prototype.S = ha; | |
var Se = function(a) { | |
a.aa("data:image/png;base64,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") | |
}, | |
Te = function(a, b, c) { | |
b = Qe[b]; | |
a.ra("data:image/png;base64,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", new M(c.x, c.y, b.width, b.height), -b.x + "px " + -b.y + "px", !1, !1) | |
}; | |
var Ue = function(a, b, c) { | |
this.l = L("userfeedback.render.canvas.FlashCanvas"); | |
this.c = !!c; | |
"GF_SCREENSHOT_RESOURCES_BASE_URL" in t || (this.l.info("GF_SCREENSHOT_RESOURCES_BASE_URL not set"), i(Error("GF_SCREENSHOT_RESOURCES_BASE_URL not set"))); | |
var d = t.GF_SCREENSHOT_RESOURCES_BASE_URL + "/FlashCanvas.swf"; | |
this.d = Ga().replace(/-/g, "_"); | |
this.l.info("Creating Flash Canvas " + this.d + " thumbnailMode=" + this.c + ", src=" + d); | |
this.J = new Ib(a, b); | |
this.b = q; | |
var d = this.a = new W(d), | |
f = "GOOGLE_FEEDBACK_FLASH_CANVAS_" + this.d; | |
if (d.v && d.v.z) { | |
var e = d.v.z, | |
g = d.W; | |
g in e && delete e[g]; | |
e = d.v.z; | |
f in e && i(Error('The object already contains the key "' + f + '"')); | |
e[f] = d | |
} | |
d.W = f; | |
this.a.F = this.c ? "never": "sameDomain"; | |
this.a.I = this.c ? "opaque": "transparent"; | |
Me(this.a, a, b); | |
this.a.i = "9"; | |
this.a.D = "#ffffff"; | |
this.c && this.a.a.set("src", c); | |
this.j = q | |
}; | |
B(Ue, Re); | |
var We = function(a, b) { | |
a.l.info("create() called"); | |
var b = pe(b), | |
c = Ve(a); | |
a.a.X(c); | |
a.j = u("GOOGLE_FEEDBACK_FLASH_CANVAS_" + a.d) ? document.getElementById("GOOGLE_FEEDBACK_FLASH_CANVAS_" + a.d) : "GOOGLE_FEEDBACK_FLASH_CANVAS_" + a.d; | |
a.c ? b(a) : qe(x(a.i, a), x(function(a) { | |
a ? (Se(this), b(this)) : (this.l.info("Timed out while waiting for FlashCanvas"), this.S(), b(q, "Timed out while waiting for FlashCanvas")) | |
}, a)) | |
}; | |
Ue.prototype.i = function() { | |
try { | |
if (this.j.flashCanvasIsReady && !this.h) | |
this.h = !0, | |
this.l.info("Flash object ready method exists"); | |
var a = this.j.flashCanvasIsReady(); | |
if (a && !this.u) | |
this.u = !0, | |
this.l.info("Flash object ready method returns true"); | |
return a | |
} catch(b) { | |
return ! 1 | |
} | |
}; | |
Ue.prototype.S = function() { | |
this.l.info("destroy() called"); | |
try { | |
this.h && this.j.flashCanvasDestroy() | |
} catch(a) { | |
this.l.info("exception in flashCanvasDestroy", a) | |
} | |
if (this.b) { | |
try { | |
document.body.removeChild(this.b) | |
} catch(b) { | |
this.l.info("exception when removing div", b) | |
} | |
this.b = q | |
} | |
this.a = this.j = q | |
}; | |
var Ve = function(a) { | |
a.b = Y.Sb ? sc("div", { | |
style: "width:100px;height:100px;border:2px dotted yellow;" | |
}) : sc("div", { | |
style: "position:absolute;top:0;left:0;" | |
}); | |
document.body.appendChild(a.b); | |
return a.b | |
}; | |
s = Ue.prototype; | |
s.aa = function(a) { | |
this.j.flashCanvasPreloadImage(a) | |
}; | |
s.Ra = function(a) { | |
return this.j.flashCanvasIsImageReady(a) | |
}; | |
s.ra = function(a, b, c, d, f) { | |
this.j.flashCanvasTileImage(a, b.left, b.top, b.width, b.height, c, d, f) | |
}; | |
s.ka = function(a, b) { | |
this.j.flashCanvasStretchImage(a, b.left, b.top, b.width, b.height) | |
}; | |
s.bb = function(a, b, c, d, f) { | |
"transparent" != f && (f = Xe(f), this.j.flashCanvasStrokeRect(a, b, c, d, f)) | |
}; | |
s.ab = function(a, b, c) { | |
this.fillRect(a, c[0]) | |
}; | |
s.Za = function(a, b, c, d, f) { | |
d.top && this.fillRect(new M(a.left - d.left, a.top - d.top, a.width + d.left + d.right, d.top), f[0]); | |
d.right && this.fillRect(new M(a.left + a.width, a.top - d.top, d.right, a.height + d.top + d.a), f[1]); | |
d.a && this.fillRect(new M(a.left - d.left, a.top + a.height, a.width + d.left + d.right, d.a), f[2]); | |
d.left && this.fillRect(new M(a.left - d.left, a.top - d.top, d.left, a.height + d.top + d.a), f[3]) | |
}; | |
s.fillRect = function(a, b) { | |
if ("transparent" != b) { | |
var c = Xe(b); | |
this.j.flashCanvasFillRect(a.left, a.top, a.width, a.height, c) | |
} | |
}; | |
s.cb = function(a, b, c, d, f, e, g, h, l, k) { | |
"transparent" != g && (g = Xe(g), this.j.flashCanvasDrawText(a, b, c, d, f, e, g, h == "bold" || parseInt(h, 10) >= 550, l, k)) | |
}; | |
s.$a = function(a, b, c) { | |
Te(this, a, new Gb(b, c)) | |
}; | |
s.Qa = function(a) { | |
this.j.flashCanvasBeginHighlights(); | |
Na(a, function(a) { | |
this.j.flashCanvasAddHighlight(a.left, a.top, a.width, a.height) | |
}, this); | |
this.j.flashCanvasEndHighlights() | |
}; | |
s.gb = function() {}; | |
s.$ = function(a, b, c, d) { | |
this.j.flashCanvasPushClip(a, b, c, d) | |
}; | |
s.fb = function() { | |
this.j.flashCanvasPopClip() | |
}; | |
s.eb = function() { | |
this.j.flashCanvasPopAllClips() | |
}; | |
s.clear = function() { | |
this.j.flashCanvasClear() | |
}; | |
s.ja = function(a) { | |
a = pe(a); | |
qe(x(this.i, this), x(function(b) { | |
if (b) { | |
var c; | |
try { | |
c = this.j.flashCanvasToDataUrl(this.J.width, this.J.height) | |
} catch(d) { | |
return a(q, d) | |
} | |
return a(c) | |
} | |
return a(q, "flashCanvasToDataUrl timed out") | |
}, this)) | |
}; | |
s.Y = function(a) { | |
this.J = a; | |
Me(this.a, a.width, a.height) | |
}; | |
var Xe = function(a) { | |
try { | |
var b = Ae(a) | |
} catch(c) { | |
return 16711680 | |
} | |
a = b.ta; | |
a = xe(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] | |
}, | |
Ye = L("FlashCanvas.swf"), | |
Ze = function(a) { | |
Ye.info(a) | |
}, | |
$e = "GoogleFeedbackFlashCanvasLog".split("."), | |
af = t; ! ($e[0] in af) && af.execScript && af.execScript("var " + $e[0]); | |
for (var bf; $e.length && (bf = $e.shift());) ! $e.length && Ze !== j ? af[bf] = Ze: af = af[bf] ? af[bf] : af[bf] = {}; | |
var cf = function(a, b, c) { | |
this.a = a; | |
this.c = (this.b = b) || c || q | |
}; | |
var df = function(a, b) { | |
this.a = document.createElement("canvas"); | |
this.f = this.a.getContext("2d"); | |
this.b = 0; | |
this.Z = new bb; | |
this.Y(new Ib(a, b)); | |
Se(this) | |
}; | |
B(df, Re); | |
s = df.prototype; | |
s.aa = function(a) { | |
var b = new Image; | |
b.onload = x(function() { | |
b.width && this.Z.set(a, b) | |
}, this); | |
b.src = a | |
}; | |
s.Ra = function(a) { | |
return Object.prototype.hasOwnProperty.call(this.Z.b, a) | |
}; | |
s.ra = function(a, b, c, d, f) { | |
if (a = this.Z.get(a)) { | |
var e = c.split(" "), | |
c = parseInt(e[0], 10), | |
g = parseInt(e[1], 10); | |
e[0].indexOf("%") != -1 && (c *= 0.01, c = Math.round(b.width * c - a.width * c)); | |
e[1].indexOf("%") != -1 && (g *= 0.01, g = Math.round(b.height * g - a.height * g)); | |
this.f.save(); | |
this.f.beginPath(); | |
this.f.rect(b.left, b.top, b.width, b.height); | |
this.f.clip(); | |
this.f.beginPath(); | |
e = "no-repeat"; | |
d && f ? (e = "repeat", this.f.rect(b.left, b.top, b.width, b.height)) : d ? (e = "repeat-x", this.f.rect(b.left, b.top + g, b.width, a.height)) : f ? (e = "repeat-y", this.f.rect(b.left + c, b.top, a.width, b.height)) : this.f.rect(b.left + c, b.top + g, a.width, a.height); | |
this.f.clip(); | |
try { | |
this.f.fillStyle = this.f.createPattern(a, e), | |
this.f.translate(b.left + c, b.top + g), | |
this.f.fillRect( - c, -g, b.width, b.height) | |
} finally { | |
this.f.restore() | |
} | |
} | |
}; | |
s.ka = function(a, b) { | |
var c = this.Z.get(a); | |
c && this.f.drawImage(c, b.left, b.top, b.width, b.height) | |
}; | |
s.bb = function(a, b, c, d, f) { | |
this.f.strokeStyle = f; | |
this.f.strokeRect(Math.floor(a), Math.floor(b), c, d) | |
}; | |
s.ab = function(a, b, c) { | |
var d = this.f.createLinearGradient(b.left, b.top, b.width, b.height); | |
if (c.length > 1) { | |
var f = 1 / (c.length - 1); | |
Na(c, function(a, b) { | |
d.addColorStop(b * f, a) | |
}) | |
} else | |
d.addColorStop(1, c[0]); | |
this.f.fillStyle = d; | |
this.f.fillRect(Math.floor(a.left), Math.floor(a.top), a.width, a.height) | |
}; | |
s.Za = function(a, b, c, d, f) { | |
a.left -= d.left; | |
a.top -= d.top; | |
a.width += d.left + d.right; | |
a.height += d.top + d.a; | |
b = new cf(a, b, c); | |
a = this.f; | |
a.save(); | |
a.translate(b.a.left, b.a.top); | |
Pe(a, b.a, b.b, b.c); | |
c = f[0]; | |
if (d.top) { | |
a.save(); | |
var e = b.a, | |
g = b.b, | |
h = b.c; | |
a.beginPath(); | |
a.moveTo( - 1, 0); | |
a.lineTo(d.left + g.d - 1, d.top + h.d); | |
a.lineTo(e.width - d.right - g.c, d.top + h.c); | |
a.lineTo(e.width, 0); | |
a.closePath(); | |
a.clip(); | |
a.fillStyle = c; | |
a.fillRect(g.d, 0, e.width - g.c, d.top); | |
a.beginPath(); | |
a.rect(0, 0, g.d, h.d); | |
a.rect(e.width - g.c, 0, g.c, h.c); | |
a.clip(); | |
a.beginPath(); | |
X(a, 0, 0, g.d, h.d, "top"); | |
X(a, e.width - g.c * 2, 0, g.c, h.c, "top"); | |
a.lineWidth = d.top * 2; | |
a.strokeStyle = c; | |
a.stroke(); | |
a.restore() | |
} | |
c = f[1]; | |
if (d.right) | |
a.save(), | |
e = b.a, | |
g = b.b, | |
h = b.c, | |
a.beginPath(), | |
a.moveTo(e.width, -1), | |
a.lineTo(e.width - d.right - g.c, d.top + h.c - 1), | |
a.lineTo(e.width - d.right - g.a, e.height - d.a - h.a), | |
a.lineTo(e.width, e.height), | |
a.closePath(), | |
a.clip(), | |
a.fillStyle = c, | |
a.fillRect(e.width - d.right, h.c, d.right, e.height - h.a), | |
a.beginPath(), | |
a.rect(e.width - g.c, 0, g.c, h.c), | |
a.rect(e.width - g.a, e.height - h.a, g.a, h.a), | |
a.clip(), | |
a.beginPath(), | |
X(a, e.width - g.c * 2, 0, g.c, h.c, "top"), | |
X(a, e.width - g.a * 2, e.height - h.a * 2, g.a, h.a, "bottom"), | |
a.lineWidth = d.right * 2, | |
a.strokeStyle = c, | |
a.stroke(), | |
a.restore(); | |
c = f[2]; | |
if (d.a) | |
a.save(), | |
e = b.a, | |
g = b.b, | |
h = b.c, | |
a.beginPath(), | |
a.moveTo(e.width + 1, e.height), | |
a.lineTo(e.width - d.right - g.a + 1, e.height - d.a - h.a), | |
a.lineTo(d.left + g.b, e.height - d.a - h.b), | |
a.lineTo(0, e.height), | |
a.closePath(), | |
a.clip(), | |
a.fillStyle = c, | |
a.fillRect(g.b, e.height - d.a, e.width - g.a, d.a), | |
a.beginPath(), | |
a.rect(0, e.height - h.b, g.b, h.b + d.a), | |
a.rect(e.width - g.a, e.height - g.a, g.a, h.a), | |
a.lineWidth = 1, | |
a.clip(), | |
a.beginPath(), | |
X(a, e.width - g.a * 2, e.height - h.a * 2, g.a, h.a, "bottom"), | |
X(a, 0, e.height - h.b * 2, g.b, h.b, "bottom"), | |
a.lineWidth = d.a * 2, | |
a.strokeStyle = c, | |
a.stroke(), | |
a.restore(); | |
f = f[3]; | |
if (d.left) | |
a.save(), | |
c = b.a, | |
e = b.b, | |
b = b.c, | |
a.beginPath(), | |
a.moveTo(0, 0), | |
a.lineTo(d.left + e.d, d.top + b.d), | |
a.lineTo(d.left + e.b, c.height - d.a - b.b + 1), | |
a.lineTo(0, c.height + 1), | |
a.closePath(), | |
a.clip(), | |
a.fillStyle = f, | |
a.fillRect(0, b.d, d.left, c.height - b.b), | |
a.beginPath(), | |
a.rect(0, 0, e.d, b.d), | |
a.rect(0, c.height - b.b, e.b, b.b + d.left), | |
a.clip(), | |
a.beginPath(), | |
X(a, 0, 0, e.d, b.d, "top"), | |
X(a, 0, c.height - b.b * 2, e.b, b.b, "bottom"), | |
a.lineWidth = d.left * 2, | |
a.strokeStyle = f, | |
a.stroke(), | |
a.restore(); | |
a.restore() | |
}; | |
s.fillRect = function(a, b) { | |
this.f.fillStyle = b; | |
this.f.fillRect(Math.floor(a.left), Math.floor(a.top), a.width, a.height) | |
}; | |
s.cb = function(a, b, c, d, f, e, g, h, l, k) { | |
Vb && (c = Math.round(c + f / 5)); | |
this.f.fillStyle = g; | |
this.f.font = h + (l ? " italic ": " ") + f + "px " + d; | |
this.f.fillText(a, b, c); | |
if (k) | |
a = Vb ? -1.5: 1.5 - (f >> 5), | |
this.f.beginPath(), | |
this.f.moveTo(b, c + f + a), | |
this.f.lineTo(b + e, c + f + a), | |
this.f.strokeStyle = g, | |
this.f.stroke() | |
}; | |
s.$a = function(a, b, c) { | |
Te(this, a, new Gb(b, c)) | |
}; | |
s.Qa = function(a) { | |
this.f.save(); | |
this.f.beginPath(); | |
this.f.moveTo(0, 0); | |
this.f.lineTo(0, this.a.height); | |
this.f.lineTo(this.a.width, this.a.height); | |
this.f.lineTo(this.a.width, 0); | |
this.f.lineTo(0, 0); | |
Na(a, function(a) { | |
this.f.moveTo(a.left, a.top); | |
this.f.lineTo(a.left + a.width, a.top); | |
this.f.lineTo(a.left + a.width, a.top + a.height); | |
this.f.lineTo(a.left, a.top + a.height); | |
this.f.lineTo(a.left, a.top) | |
}, this); | |
this.f.clip(); | |
this.f.fillStyle = "rgba(0, 0, 0, 0.4)"; | |
this.f.fillRect(0, 0, this.a.width, this.a.height); | |
this.f.restore() | |
}; | |
s.gb = function(a, b, c) { | |
this.f.save(); | |
this.f.translate(a.left, a.top); | |
Pe(this.f, a, b, c); | |
this.f.translate( - a.left, -a.top); | |
this.b++ | |
}; | |
s.$ = function(a, b, c, d) { | |
this.f.save(); | |
this.f.beginPath(); | |
this.f.rect(a, b, c, d); | |
this.f.clip(); | |
this.b++ | |
}; | |
s.fb = function() { | |
this.f.restore(); | |
this.b-- | |
}; | |
s.eb = function() { | |
for (; this.b;) | |
this.f.restore(), | |
this.b-- | |
}; | |
s.ja = function(a) { | |
a = pe(a); | |
try { | |
var b = this.a.toDataURL("image/png"); | |
a(b) | |
} catch(c) { | |
a(q, c) | |
} | |
}; | |
s.Y = function(a) { | |
this.a.width = a.width; | |
this.a.height = a.height; | |
this.f.fillStyle = "white"; | |
this.f.fillRect(0, 0, a.width, a.height); | |
this.f.textBaseline = "top" | |
}; | |
s.clear = function() { | |
var a = new Ib(this.a.width, this.a.height); | |
this.a = document.createElement("canvas"); | |
this.f = this.a.getContext("2d"); | |
this.b = 0; | |
this.Y(a) | |
}; | |
s.S = function() { | |
this.a = this.f = q | |
}; | |
var ff = function(a) { | |
ef.info("Canvas size: 100 x 100"); | |
a = pe(a); | |
if ("CANVAS" == ue) { | |
ef.info("Using HTML5 canvas"); | |
a: { | |
var b = a, | |
c; | |
try { | |
c = new df(100, 100) | |
} catch(d) { | |
b(q, d); | |
break a | |
} | |
b(c) | |
} | |
} else if ("FLASH" == ue) { | |
ef.info("Using FlashCanvas"); | |
a: { | |
c = a; | |
try { | |
b = new Ue(100, 100) | |
} catch(f) { | |
c(q, f); | |
break a | |
} | |
We(b, c) | |
} | |
} else | |
a(q, "Cannot create canvas for RenderingStrategy NONE") | |
}, | |
ef = L("userfeedback.render.canvas"); | |
var gf; | |
gf = !1; | |
var hf = Rb(); | |
hf && hf.indexOf("Firefox") != -1 && (gf = !0); | |
var jf = gf; | |
var kf = q, | |
lf = Vb || Wb || Ub || typeof t.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 mf = 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 && (Ra | =1 << ia), | |
a--, | |
ia--, | |
ia < 0 && (Ra == 255 ? (d(255), d(0)) : d(Ra), ia = 7, Ra = 0) | |
} | |
function d(a) { | |
fb.push(Sd[a]) | |
} | |
function f(a) { | |
d(a >> 8 & 255); | |
d(a & 255) | |
} | |
function e(a, b, d, e, f) { | |
var g = f[0], | |
h = f[240], | |
k, | |
l, | |
p, | |
n, | |
v, | |
m, | |
w, | |
z, | |
A, | |
o = 0; | |
for (k = 0; k < 8;++k) { | |
l = a[o]; | |
p = a[o + 1]; | |
n = a[o + 2]; | |
v = a[o + 3]; | |
m = a[o + 4]; | |
w = a[o + 5]; | |
z = a[o + 6]; | |
A = a[o + 7]; | |
var r = l + A; | |
l = l - A; | |
A = p + z; | |
p = p - z; | |
z = n + w; | |
n = n - w; | |
w = v + m; | |
v = v - m; | |
m = r + w; | |
r = r - w; | |
w = A + z; | |
A = A - z; | |
a[o] = m + w; | |
a[o + 4] = m - w; | |
m = (A + r) * 0.707106781; | |
a[o + 2] = r + m; | |
a[o + 6] = r - m; | |
m = v + n; | |
w = n + p; | |
A = p + l; | |
n = (m - A) * 0.382683433; | |
v = 0.5411961 * m + n; | |
m = 1.306562965 * A + n; | |
w *= 0.707106781; | |
n = l + w; | |
l -= w; | |
a[o + 5] = l + v; | |
a[o + 3] = l - v; | |
a[o + 1] = n + m; | |
a[o + 7] = n - m; | |
o += 8 | |
} | |
for (k = o = 0; k < 8;++k) | |
l = a[o], | |
p = a[o + 8], | |
n = a[o + 16], | |
v = a[o + 24], | |
m = a[o + 32], | |
w = a[o + 40], | |
z = a[o + 48], | |
A = a[o + 56], | |
r = l + A, | |
l = l - A, | |
A = p + z, | |
p = p - z, | |
z = n + w, | |
n = n - w, | |
w = v + m, | |
v = v - m, | |
m = r + w, | |
r = r - w, | |
w = A + z, | |
A = A - z, | |
a[o] = m + w, | |
a[o + 32] = m - w, | |
m = (A + r) * 0.707106781, | |
a[o + 16] = r + m, | |
a[o + 48] = r - m, | |
m = v + n, | |
w = n + p, | |
A = p + l, | |
n = (m - A) * 0.382683433, | |
v = 0.5411961 * m + n, | |
m = 1.306562965 * A + n, | |
w *= 0.707106781, | |
n = l + w, | |
l -= w, | |
a[o + 40] = l + v, | |
a[o + 24] = l - v, | |
a[o + 8] = n + m, | |
a[o + 56] = n - m, | |
o++; | |
for (k = 0; k < 64;++k) | |
o = a[k] * b[k], | |
Td[k] = o > 0 ? o + 0.5 | 0: o - 0.5 | 0; | |
a = Td; | |
for (b = 0; b < 64;++b) | |
ja[ta[b]] = a[b]; | |
a = ja[0] - d; | |
d = ja[0]; | |
a == 0 ? c(e[0]) : (k = 32767 + a, c(e[Kb[k]]), c($[k])); | |
for (e = 63; e > 0 && ja[e] == 0; e--); | |
if (e == 0) | |
return c(g), | |
d; | |
for (a = 1; a <= e;) { | |
for (b = a; ja[a] == 0 && a <= e;++a); | |
b = a - b; | |
if (b >= 16) { | |
k = b >> 4; | |
for (o = 1; o <= k;++o) | |
c(h); | |
b & =15 | |
} | |
k = 32767 + ja[a]; | |
c(f[(b << 4) + Kb[k]]); | |
c($[k]); | |
a++ | |
} | |
e != 63 && c(g); | |
return d | |
} | |
function g(a) { | |
a <= 0 && (a = 1); | |
a > 100 && (a = 100); | |
if (Ud != 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 = h((c[d] * b + 50) / 100); | |
e < 1 ? e = 1: e > 255 && (e = 255); | |
l[ta[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 = h((c[d] * b + 50) / 100), | |
e < 1 ? e = 1: e > 255 && (e = 255), | |
k[ta[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++) | |
n[c] = 1 / (l[ta[c]] * b[d] * b[e] * 8), | |
p[c] = 1 / (k[ta[c]] * b[d] * b[e] * 8), | |
c++; | |
Ud = a | |
} | |
} | |
var h = Math.floor, | |
l = Array(64), | |
k = Array(64), | |
n = Array(64), | |
p = Array(64), | |
K, | |
r, | |
Sa, | |
gb, | |
$ = Array(65535), | |
Kb = Array(65535), | |
Td = Array(64), | |
ja = Array(64), | |
fb = [], | |
Ra = 0, | |
ia = 7, | |
Vd = Array(64), | |
Wd = Array(64), | |
Xd = Array(64), | |
Sd = Array(256), | |
G = Array(2048), | |
Ud, | |
ta = [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], | |
Yd = [0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0], | |
Zd = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], | |
$d = [0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 125], | |
ae = [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], | |
be = [0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0], | |
ce = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], | |
de = [0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 119], | |
ee = [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); | |
fb = []; | |
Ra = 0; | |
ia = 7; | |
f(65496); | |
f(65504); | |
f(16); | |
d(74); | |
d(70); | |
d(73); | |
d(70); | |
d(0); | |
d(1); | |
d(1); | |
d(0); | |
f(1); | |
f(1); | |
d(0); | |
d(0); | |
f(65499); | |
f(132); | |
d(0); | |
for (var h = 0; h < 64; h++) | |
d(l[h]); | |
d(1); | |
for (h = 0; h < 64; h++) | |
d(k[h]); | |
var h = a.width, | |
E = a.height; | |
f(65472); | |
f(17); | |
d(8); | |
f(E); | |
f(h); | |
d(3); | |
d(1); | |
d(17); | |
d(0); | |
d(2); | |
d(17); | |
d(1); | |
d(3); | |
d(17); | |
d(1); | |
f(65476); | |
f(418); | |
d(0); | |
for (h = 0; h < 16; h++) | |
d(Yd[h + 1]); | |
for (h = 0; h <= 11; h++) | |
d(Zd[h]); | |
d(16); | |
for (h = 0; h < 16; h++) | |
d($d[h + 1]); | |
for (h = 0; h <= 161; h++) | |
d(ae[h]); | |
d(1); | |
for (h = 0; h < 16; h++) | |
d(be[h + 1]); | |
for (h = 0; h <= 11; h++) | |
d(ce[h]); | |
d(17); | |
for (h = 0; h < 16; h++) | |
d(de[h + 1]); | |
for (h = 0; h <= 161; h++) | |
d(ee[h]); | |
f(65498); | |
f(12); | |
d(3); | |
d(1); | |
d(0); | |
d(2); | |
d(17); | |
d(3); | |
d(17); | |
d(0); | |
d(63); | |
d(0); | |
var $ = 0, | |
ja = 0, | |
ta = 0; | |
Ra = 0; | |
ia = 7; | |
this.a.a = "_encode_"; | |
for (var h = a.data, E = a.height, T = a.width * 4, F, U = 0, N, v, m, w, z; U < E;) { | |
for (F = 0; F < T;) { | |
w = T * U + F; | |
for (z = 0; z < 64; z++) | |
v = z >> 3, | |
N = (z & 7) * 4, | |
m = w + v * T + N, | |
U + v >= E && (m -= T * (U + 1 + v - E)), | |
F + N >= T && (m -= F + N - T + 4), | |
N = h[m++], | |
v = h[m++], | |
m = h[m++], | |
Vd[z] = (G[N] + G[v + 256 >> 0] + G[m + 512 >> 0] >> 16) - 128, | |
Wd[z] = (G[N + 768 >> 0] + G[v + 1024 >> 0] + G[m + 1280 >> 0] >> 16) - 128, | |
Xd[z] = (G[N + 1280 >> 0] + G[v + 1536 >> 0] + G[m + 1792 >> 0] >> 16) - 128; | |
$ = e(Vd, n, $, K, Sa); | |
ja = e(Wd, p, ja, r, gb); | |
ta = e(Xd, p, ta, r, gb); | |
F += 32 | |
} | |
U += 8 | |
} | |
ia >= 0 && (h = [], h[1] = ia + 1, h[0] = (1 << ia + 1) - 1, c(h)); | |
f(65497); | |
if (lf) | |
h = t.btoa(fb.join("")); | |
else { | |
E = fb.join(""); | |
h = []; | |
for (F = T = 0; F < E.length; F++) { | |
for (U = E.charCodeAt(F); U > 255;) | |
h[T++] = U & 255, | |
U >>= 8; | |
h[T++] = U | |
} | |
ma(h) || i(Error("encodeByteArray takes an array as a parameter")); | |
if (!kf) { | |
kf = {}; | |
for (E = 0; E < 65; E++) | |
kf[E] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(E) | |
} | |
E = kf; | |
T = []; | |
for (F = 0; F < h.length; F += 3) | |
N = h[F], | |
v = (U = F + 1 < h.length) ? h[F + 1] : 0, | |
m = (w = F + 2 < h.length) ? h[F + 2] : 0, | |
z = N >> 2, | |
N = (N & 3) << 4 | v >> 4, | |
v = (v & 15) << 2 | m >> 6, | |
m & =63, | |
w || (m = 64, U || (v = 64)), | |
T.push(E[z], E[N], E[v], E[m]); | |
h = T.join("") | |
} | |
fb = []; | |
return "data:image/jpeg;base64," + h | |
}; | |
a || (a = 50); (function() { | |
for (var a = String.fromCharCode, b = 0; b < 256; b++) | |
Sd[b] = a(b) | |
})(); | |
K = b(Yd, Zd); | |
r = b(be, ce); | |
Sa = b($d, ae); | |
gb = b(de, ee); (function() { | |
for (var a = 1, b = 2, c = 1; c <= 15; c++) { | |
for (var d = a; d < b; d++) | |
Kb[32767 + d] = c, | |
$[32767 + d] = [], | |
$[32767 + d][1] = c, | |
$[32767 + d][0] = d; | |
for (d = -(b - 1); d <= -a; d++) | |
Kb[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++) | |
G[a] = 19595 * a, | |
G[a + 256 >> 0] = 38470 * a, | |
G[a + 512 >> 0] = 7471 * a + 32768, | |
G[a + 768 >> 0] = -11059 * a, | |
G[a + 1024 >> 0] = -21709 * a, | |
G[a + 1280 >> 0] = 32768 * a + 8421375, | |
G[a + 1536 >> 0] = -27439 * a, | |
G[a + 1792 >> 0] = -5329 * a | |
})(); | |
g(a) | |
}; | |
var Z = L("userfeedback.render.blackouts.shrink"), | |
of = 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(), nf(b)) | |
return b | |
} catch(d) { | |
Z.info("Exception: ", d) | |
} | |
try { | |
if (Z.info("Trying toDataURL(jpeg)..."), c = a.toDataURL("image/jpeg"), nf(c)) | |
return c | |
} catch(f) { | |
Z.info("Exception: ", f) | |
} | |
if (jf) | |
try { | |
Z.info("Trying 5M limit, we are on Firefox and cannot use JpegEncoder..."); | |
var e = b.length, | |
g = c.length, | |
h = Math.min(e, g); | |
if (h < 5E6) | |
return Z.info("fits: true (Firefox), " + h), | |
e < g ? b: c | |
} catch(l) { | |
Z.info("Exception: ", l) | |
} else | |
try { | |
Z.info("Trying JpegEncoder..."); | |
var k = a.getContext("2d").getImageData(0, 0, a.width, a.height); | |
b = (new mf).a(k); | |
if (nf(b)) | |
return b | |
} catch(n) { | |
Z.info("Exception: ", n) | |
} | |
Z.info("ERROR: Nothing fits."); | |
return "" | |
}, | |
nf = 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 rf = function(a, b, c, d, f, e) { | |
pf.info("renderAnnotations"); | |
f = pe(f); | |
if ("NONE" == ue) | |
pf.info("ERROR: Rendering Strategy is NONE"), | |
f(""); | |
else { | |
try { | |
e.aa(b) | |
} catch(g) { | |
qf("preloadImage failed", g, f); | |
return | |
} | |
qe(function() { | |
return e.Ra(b) | |
}, function(g, l) { | |
pf.info("waitFor(isImageReady) done"); | |
if (l) | |
return qf("isImageReady failed", l, f); | |
if (!g) | |
return qf("isImageReady timed out", "condition was never true", f); | |
try { | |
e.ka(b, new M(0, 0, a.width, a.height)), | |
d.length != 0 && (e.$(0, 0, a.width, a.height), e.Qa(d)), | |
e.$(0, 0, a.width, a.height), | |
Na(c, function(a) { | |
e.fillRect(a, "black") | |
}), | |
e.ja(function(a, b) { | |
return b ? qf("canvas.toDataURL failed", b, f) : e instanceof df ? (a = of(e.a), f(a)) : f(a) | |
}) | |
} catch(k) { | |
return qf("Exception while rendering annotations", k, f) | |
} | |
}) | |
} | |
}, | |
pf = L("userfeedback.render.annotate"), | |
qf = function(a, b, c) { | |
u(b) ? pf.info(a + ": " + b) : pf.info(a, b); | |
c("") | |
}; | |
var sf = function(a, b, c) { | |
var d = { | |
tileImage: function(b, c, d, e, f, g, r, Sa) { | |
a.ra(b, new M(c, d, e, f), g, r, Sa) | |
}, | |
stretchImage: function(b, c, d, e, f) { | |
a.ka(b, new M(c, d, e, f)) | |
}, | |
drawRect: a.bb, | |
fillRect: function(b, c, d, e, f) { | |
a.fillRect(new M(b, c, d, e), f) | |
}, | |
drawBorder: function(b, c, d, e, f) { | |
a.Za(new M(b[0], b[1], b[2], b[3]), Oe(c), Oe(d), new Hb(e[0], e[1], e[2], e[3]), f) | |
}, | |
drawGradient: function(b, c, d, e, f, g, r, Sa, gb) { | |
a.ab(new M(b, c, d, e), new M(f, g, r, Sa), gb) | |
}, | |
drawText: a.cb, | |
drawBuiltin: a.$a, | |
pushElipticalClip: function(b, c, d) { | |
a.gb(new M(b[0], b[1], b[2], b[3]), Oe(c), Oe(d)) | |
}, | |
pushClip: a.$, | |
popClip: a.fb, | |
popAllClips: a.eb | |
}, | |
f = L("userfeedback.render.canvas.commands.run"), | |
e = b.length; | |
f.info("Rendering commands count: " + e); | |
var g = 0; | |
Na(b, function(b) { | |
try { | |
d[b.type].apply(a, b.args) | |
} catch(l) { | |
f.log(D, "Exception for command type: " + b.type, l) | |
} (b = Math.floor(10 * (g + 1) / e) - Math.floor(10 * g / e)) && c(b); | |
g++ | |
}) | |
}; | |
var uf = function(a, b) { | |
var c = L("userfeedback.web.main.RenderFrameContent"); | |
Ya(a, function(d, f) { | |
na(d) && Ya(b, function(b, g) { | |
b === d && (a[f] = tf(a, g, b, c)) | |
}) | |
}) | |
}, | |
tf = function(a, b, c, d) { | |
return function() { | |
var f = y(); | |
d.info(b + " called"); | |
try { | |
c.apply(a, arguments) | |
} catch(e) { | |
i(e) | |
} finally { | |
d.info(b + " finished in " + (y() - f) + "ms") | |
} | |
} | |
}; | |
var wf = function(a, b) { | |
var c = Va(arguments, 1); | |
c.push(ad); | |
c = va(vf, a, c); | |
Xc(window, "unload", c) | |
}, | |
vf = function(a, b) { | |
Na(b, function(b) { | |
try { | |
b.apply(a) | |
} catch(d) { | |
xf.info("Cleanup threw exception: " + b, d) | |
} | |
}) | |
}, | |
xf = L("userfeedback.util.cleanup"); | |
var yf = function() { | |
this.a = y() | |
}, | |
zf = new yf; | |
yf.prototype.set = function(a) { | |
this.a = a | |
}; | |
yf.prototype.get = function() { | |
return this.a | |
}; | |
var Af = function(a) { | |
this.a = a || ""; | |
this.b = zf | |
}; | |
s = Af.prototype; | |
s.ua = !0; | |
s.wa = !0; | |
s.mb = !0; | |
s.va = !1; | |
s.nb = !1; | |
var Bf = function(a) { | |
return a < 10 ? "0" + a: String(a) | |
}, | |
Cf = function(a, b) { | |
var c = (a.h - b) / 1E3, | |
d = c.toFixed(3), | |
f = 0; | |
if (c < 1) | |
f = 2; | |
else | |
for (; c < 100;) | |
f++, | |
c *= 10; | |
for (; f-->0;) | |
d = " " + d; | |
return d | |
}, | |
Df = function(a) { | |
Af.call(this, a) | |
}; | |
B(Df, Af); | |
var Ef = function(a) { | |
this.e = a; | |
this.u = x(this.h, this); | |
this.a = new Df; | |
this.a.ua = !1; | |
this.a.wa = !0; | |
this.a.va = !0; | |
this.c = !1; | |
this.b = []; | |
this.d = !1 | |
}, | |
Ff = function(a, b) { | |
if (b != a.d) { | |
if (!b) | |
Na(a.b, function(a) { | |
this.e.send("log", a) | |
}, a), | |
a.b = []; | |
a.d = b | |
} | |
}; | |
Ef.prototype.h = function(a) { | |
if (!this.c) { | |
this.c = !0; | |
try { | |
var b, | |
c = this.a, | |
d = []; | |
d.push(c.a, " "); | |
if (c.ua) { | |
var f = new Date(a.h); | |
d.push("[", Bf(f.getFullYear() - 2E3) + Bf(f.getMonth() + 1) + Bf(f.getDate()) + " " + Bf(f.getHours()) + ":" + Bf(f.getMinutes()) + ":" + Bf(f.getSeconds()) + "." + Bf(Math.floor(f.getMilliseconds() / 10)), "] ") | |
} | |
c.wa && d.push("[", Cf(a, c.b.get()), "s] "); | |
c.mb && d.push("[", a.i, "] "); | |
c.nb && d.push("[", a.c.name, "] "); | |
d.push(a.d, "\n"); | |
c.va && a.b && d.push(a.a, "\n"); | |
b = d.join(""); | |
b = b.replace(/\n$/, ""); | |
var e = [a.c.toString(), b]; | |
this.d ? this.b.push(e) : this.e.send("log", e) | |
} finally { | |
this.c = !1 | |
} | |
} | |
}; | |
var Gf = function() { | |
var a; | |
a = document.location.href; | |
var b = a.indexOf("#"); | |
a = b < 0 ? q: a.substr(b + 1); | |
this.d = zb(a && decodeURIComponent(a)); | |
this.e = new he(this.d || {}); | |
this.c = !1; | |
this.l = L("userfeedback.web.main.RenderFrameContent"); | |
uf(this, { | |
checkCanvas_: this.ya, | |
connectXpc_: this.Da, | |
createCanvas_: this.Ea, | |
installCleanup_: this.Fa, | |
render_: this.X, | |
runAnnotateCommands_: this.za, | |
runBlackoutCommands_: this.Aa, | |
runRenderingCommands_: this.Ba, | |
sendScreenshot_: this.ea, | |
setCommands_: this.Ca | |
}); | |
a = this.a = new Ef(this.e); | |
if (!0 != a.i) { | |
yb(); | |
var b = xb, | |
c = a.u; | |
if (!b.a) | |
b.a = []; | |
b.a.push(c); | |
a.i = !0 | |
} | |
Ff(this.a, !0) | |
}, | |
Hf = function() { | |
var a = new Gf; | |
re(a, function(a) { | |
this.Fa(); | |
ne(a, 100) | |
}, function(a) { | |
this.Ea(a) | |
}, function() { | |
this.Da() | |
}) | |
}; | |
s = Gf.prototype; | |
s.Fa = function() { | |
wf(this, function() { | |
this.p.S() | |
}, function() { | |
this.e.close() | |
}) | |
}; | |
s.Ea = function(a) { | |
ff(x(function(b, c) { | |
c ? u(c) ? this.l.info("createCanvas failed: " + c) : this.l.info("createCanvas failed", c) : this.p = b; | |
a() | |
}, this)) | |
}; | |
s.Da = function() { | |
this.e.c.images = { | |
fa: x(this.Rb, this), | |
ga: !1 | |
}; | |
this.e.c.render = { | |
fa: x(this.X, this), | |
ga: !1 | |
}; | |
this.e.w() | |
}; | |
s.Rb = function(a) { | |
a = window.JSON ? window.JSON.parse(a) : zb(a); | |
this.p && Na(a, x(this.p.aa, this.p)) | |
}; | |
s.X = function(a) { | |
re(this, function(a) { | |
this.ya(a) | |
}, function(b) { | |
this.Ca(a); | |
this.e.send("progress", ""); | |
ne(b) | |
}, function(a) { | |
this.e.send("progress", ""); | |
this.Ba(a) | |
}, function(a) { | |
this.e.send("progress", ""); | |
this.za(a) | |
}, function(a) { | |
this.e.send("progress", ""); | |
this.Aa(a) | |
}, function() { | |
this.ea() | |
}) | |
}; | |
s.ya = function(a) { | |
Ff(this.a, !1); | |
this.p ? a() : If (this, "Canvas could not be created") | |
}; | |
s.Ca = function(a) { | |
a = window.JSON ? window.JSON.parse(a) : zb(a); | |
this.i = a.render; | |
this.b = a.blackout; | |
this.h = a.highlight; | |
this.J = new Ib(a.width, a.height); | |
this.p.Y(this.J) | |
}; | |
s.Ba = function(a) { | |
sf(this.p, this.i, x(function(a) { | |
this.e.send("progress", "" + a) | |
}, this)); | |
this.p.ja(x(function(b, c) { | |
c ? If (this, c) : (this.Tb = b, a()) | |
}, this)) | |
}; | |
s.za = function(a) { | |
Jf(this, this.b, this.h, x(function(b) { | |
b ? (this.Jb = b, a()) : If (this, "ERROR rendering blackouts + highlights") | |
}, this)) | |
}; | |
s.Aa = function(a) { | |
Jf(this, this.b, [], x(function(b) { | |
b ? (this.Lb = b, a()) : If (this, "ERROR rendering blackouts") | |
}, this)) | |
}; | |
var If = function(a, b) { | |
u(b) ? a.l.info(b) : a.l.info("ERROR", b); | |
a.c = !0; | |
a.ea() | |
}; | |
Gf.prototype.ea = function() { | |
this.p && this.p.S(); | |
this.e.send("done", se([this.Lb, this.Jb, this.c])) | |
}; | |
var Kf = function(a) { | |
return Pa(a, function(a) { | |
return new M(a.left, a.top, a.width, a.height) | |
}) | |
}, | |
Jf = function(a, b, c, d) { | |
b = Kf(b); | |
c = Kf(c); | |
a.p.clear(); | |
rf(a.J, a.Tb, b, c, d, a.p) | |
}; | |
window != window.top && Hf(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment