var $ = window.Simple = function(a) {
return typeof(a) == "string" ? document.getElementById(a) : a
};
$.cookie = {
get: function(b) {
var a = document.cookie.match(new RegExp("(^| )" + b + "=([^;]*)(;|$)"));
return ! a ? "": decodeURIComponent(a[2])
},
set: function(c, e, d, f, a) {
var b = new Date();
if (a) {
b.setTime(b.getTime() + 3600000 * a);
document.cookie = c + "=" + e + "; expires=" + b.toGMTString() + "; path=" + (f ? f: "/") + "; " + (d ? ("domain=" + d + ";") : "")
} else {
document.cookie = c + "=" + e + "; path=" + (f ? f: "/") + "; " + (d ? ("domain=" + d + ";") : "")
}
},
del: function(a, b, c) {
document.cookie = a + "=; expires=Mon, 26 Jul 1997 05:00:00 GMT; path=" + (c ? c: "/") + "; " + (b ? ("domain=" + b + ";") : "")
},
uin: function() {
var a = $.cookie.get("uin");
return ! a ? null: parseInt(a.substring(1, a.length), 10)
}
};
$.http = {
jsonp: function(a) {
var b = document.createElement("script");
b.src = a;
document.getElementsByTagName("head")[0].appendChild(b)
},
loadScript: function(c, d, b) {
var a = document.createElement("script");
a.onload = a.onreadystatechange = function() {
if (!this.readyState || this.readyState === "loaded" || this.readyState === "complete") {
if (typeof d == "function") {
d()
}
a.onload = a.onreadystatechange = null;
if (a.parentNode) {
a.parentNode.removeChild(a)
}
}
};
a.src = c;
document.getElementsByTagName("head")[0].appendChild(a)
},
preload: function(a) {
var b = document.createElement("img");
b.src = a;
b = null
}
};
$.get = $.http.get;
$.post = $.http.post;
$.jsonp = $.http.jsonp;
$.browser = function(b) {
if (typeof $.browser.info == "undefined") {
var a = {
type: ""
};
var c = navigator.userAgent.toLowerCase();
if (/chrome/.test(c)) {
a = {
type: "chrome",
version: /chrome[\/ ]([\w.]+)/
}
} else {
if (/opera/.test(c)) {
a = {
type: "opera",
version: /version/.test(c) ? /version[\/ ]([\w.]+)/: /opera[\/ ]([\w.]+)/
}
} else {
if (/msie/.test(c)) {
a = {
type: "msie",
version: /msie ([\w.]+)/
}
} else {
if (/mozilla/.test(c) && !/compatible/.test(c)) {
a = {
type: "ff",
version: /rv:([\w.]+)/
}
} else {
if (/safari/.test(c)) {
a = {
type: "safari",
version: /safari[\/ ]([\w.]+)/
}
}
}
}
}
}
a.version = (a.version && a.version.exec(c) || [0, "0"])[1];
$.browser.info = a
}
return $.browser.info[b]
};
$.e = {
_counter: 0,
_uid: function() {
return "h" + $.e._counter++
},
add: function(c, b, f) {
if (typeof c != "object") {
c = $(c)
}
if (document.addEventListener) {
c.addEventListener(b, f, false)
} else {
if (document.attachEvent) {
if ($.e._find(c, b, f) != -1) {
return
}
var g = function(h) {
if (!h) {
h = window.event
}
var d = {
_event: h,
type: h.type,
target: h.srcElement,
currentTarget: c,
relatedTarget: h.fromElement ? h.fromElement: h.toElement,
eventPhase: (h.srcElement == c) ? 2 : 3,
clientX: h.clientX,
clientY: h.clientY,
screenX: h.screenX,
screenY: h.screenY,
altKey: h.altKey,
ctrlKey: h.ctrlKey,
shiftKey: h.shiftKey,
keyCode: h.keyCode,
data: h.data,
origin: h.origin,
stopPropagation: function() {
this._event.cancelBubble = true
},
preventDefault: function() {
this._event.returnValue = false
}
};
if (Function.prototype.call) {
f.call(c, d)
} else {
c._currentHandler = f;
c._currentHandler(d);
c._currentHandler = null
}
};
c.attachEvent("on" + b, g);
var e = {
element: c,
eventType: b,
handler: f,
wrappedHandler: g
};
var j = c.document || c;
var a = j.parentWindow;
var k = $.e._uid();
if (!a._allHandlers) {
a._allHandlers = {}
}
a._allHandlers[k] = e;
if (!c._handlers) {
c._handlers = []
}
c._handlers.push(k);
if (!a._onunloadHandlerRegistered) {
a._onunloadHandlerRegistered = true;
a.attachEvent("onunload", $.e._removeAllHandlers)
}
}
}
},
remove: function(e, c, g) {
if (document.addEventListener) {
e.removeEventListener(c, g, false)
} else {
if (document.attachEvent) {
var b = $.e._find(e, c, g);
if (b == -1) {
return
}
var k = e.document || e;
var a = k.parentWindow;
var j = e._handlers[b];
var f = a._allHandlers[j];
e.detachEvent("on" + c, f.wrappedHandler);
e._handlers.splice(b, 1);
delete a._allHandlers[j]
}
}
},
_find: function(e, a, l) {
var b = e._handlers;
if (!b) {
return - 1
}
var j = e.document || e;
var k = j.parentWindow;
for (var f = b.length - 1; f >= 0; f--) {
var c = b[f];
var g = k._allHandlers[c];
if (g.eventType == a && g.handler == l) {
return f
}
}
return - 1
},
_removeAllHandlers: function() {
var a = this;
for (id in a._allHandlers) {
var b = a._allHandlers[id];
b.element.detachEvent("on" + b.eventType, b.wrappedHandler);
delete a._allHandlers[id]
}
},
src: function(a) {
return a ? a.target: event.srcElement
},
stopPropagation: function(a) {
a ? a.stopPropagation() : event.cancelBubble = true
}
};
$.bom = {
query: function(b) {
var a = window.location.search.match(new RegExp("(\\?|&)" + b + "=([^&]*)(&|$)"));
return ! a ? "": decodeURIComponent(a[2])
}
};
$.winName = {
set: function(c, a) {
var b = window.name || "";
if (b.match(new RegExp(";" + c + "=([^;]*)(;|$)"))) {
window.name = b.replace(new RegExp(";" + c + "=([^;]*)"), ";" + c + "=" + a)
} else {
window.name = b + ";" + c + "=" + a
}
},
get: function(c) {
var b = window.name || "";
var a = b.match(new RegExp(";" + c + "=([^;]*)(;|$)"));
return a ? a[1] : ""
},
clear: function(b) {
var a = window.name || "";
window.name = a.replace(new RegExp(";" + b + "=([^;]*)"), "")
}
};
$.localStorage = {
isSurport: function() {
try {
return window.localStorage ? true: false
} catch(a) {
return false
}
},
get: function(b) {
var a = "";
try {
a = window.localStorage.getItem(b)
} catch(c) {
a = ""
}
return a
},
set: function(a, b) {
try {
window.localStorage.setItem(a, b)
} catch(c) {}
},
remove: function(a) {
try {
window.localStorage.removeItem(a)
} catch(b) {}
}
};
$.str = (function() {
var htmlDecodeDict = {
quot: '"',
lt: "<",
gt: ">",
amp: "&",
nbsp: " ",
"#34": '"',
"#60": "<",
"#62": ">",
"#38": "&",
"#160": " "
};
var htmlEncodeDict = {
'"': "#34",
"<": "#60",
">": "#62",
"&": "#38",
" ": "#160"
};
return {
decodeHtml: function(s) {
s += "";
return s.replace(/&(quot|lt|gt|amp|nbsp);/ig,
function(all, key) {
return htmlDecodeDict[key]
}).replace(/&#u([a-f\d]{4});/ig,
function(all, hex) {
return String.fromCharCode(parseInt("0x" + hex))
}).replace(/&#(\d+);/ig,
function(all, number) {
return String.fromCharCode( + number)
})
},
encodeHtml: function(s) {
s += "";
return s.replace(/["<>& ]/g,
function(all) {
return "&" + htmlEncodeDict[all] + ";"
})
},
trim: function(str) {
str += "";
var str = str.replace(/^\s+/, ""),
ws = /\s/,
end = str.length;
while (ws.test(str.charAt(--end))) {}
return str.slice(0, end + 1)
},
uin2hex: function(str) {
var maxLength = 16;
str = parseInt(str);
var hex = str.toString(16);
var len = hex.length;
for (var i = len; i < maxLength; i++) {
hex = "0" + hex
}
var arr = [];
for (var j = 0; j < maxLength; j += 2) {
arr.push("\\x" + hex.substr(j, 2))
}
var result = arr.join("");
eval('result="' + result + '"');
return result
},
bin2String: function(a) {
var arr = [];
for (var i = 0,
len = a.length; i < len; i++) {
var temp = a.charCodeAt(i).toString(16);
if (temp.length == 1) {
temp = "0" + temp
}
arr.push(temp)
}
arr = "0x" + arr.join("");
arr = parseInt(arr, 16);
return arr
},
utf8ToUincode: function(s) {
var result = "";
try {
var length = s.length;
var arr = [];
for (i = 0; i < length; i += 2) {
arr.push("%" + s.substr(i, 2))
}
result = decodeURIComponent(arr.join(""));
result = $.str.decodeHtml(result)
} catch(e) {
result = ""
}
return result
},
json2str: function(obj) {
var result = "";
if (typeof JSON != "undefined") {
result = JSON.stringify(obj)
} else {
var arr = [];
for (var i in obj) {
arr.push("'" + i + "':'" + obj[i] + "'")
}
result = "{" + arr.join(",") + "}"
}
return result
},
time33: function(str) {
var hash = 0;
for (var i = 0,
length = str.length; i < length; i++) {
hash = hash * 33 + str.charCodeAt(i)
}
return hash % 4294967296
},
hash33: function(str) {
var hash = 0;
for (var i = 0,
length = str.length; i < length; ++i) {
hash += (hash << 5) + str.charCodeAt(i)
}
return hash & 2147483647
}
}
})();
$.css = function() {
return {
show: function(a) {
if (typeof a == "string") {
a = $(a)
}
a.style.display = "block"
},
hide: function(a) {
if (typeof a == "string") {
a = $(a)
}
a.style.display = "none"
},
getElementViewTop: function(a) {
var b = $(a);
var e = b.offsetTop;
var c = b.offsetParent;
while (c !== null) {
e += c.offsetTop;
c = c.offsetParent
}
if (document.compatMode == "BackCompat") {
var d = document.body.scrollTop
} else {
var d = document.documentElement.scrollTop
}
return e - d
}
}
} ();
$.check = {
isHttps: function() {
return document.location.protocol == "https:"
},
isSsl: function() {
var a = document.location.host;
return /^ssl./i.test(a)
},
isIpad: function() {
var a = navigator.userAgent.toLowerCase();
return /ipad/i.test(a)
},
isQQ: function(a) {
return /^[1-9]{1}\d{4,9}$/.test(a)
},
isNullQQ: function(a) {
return /^\d{1,4}$/.test(a)
},
isNick: function(a) {
return /^[a-zA-Z]{1}([a-zA-Z0-9]|[-_]){0,19}$/.test(a)
},
isName: function(a) {
if (a == "<请输入帐号>") {
return false
}
return /[\u4E00-\u9FA5]{1,8}/.test(a)
},
isPhone: function(a) {
return /^(?:86|886|)1\d{10}\s*$/.test(a)
},
isDXPhone: function(a) {
return /^(?:86|886|)1(?:33|53|80|81|89)\d{8}$/.test(a)
},
isSeaPhone: function(a) {
return /^(00)?(?:852|853|886(0)?\d{1})\d{8}$/.test(a)
},
isMail: function(a) {
return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(a)
},
isPassword: function(a) {
return a && a.length >= 16
},
isForeignPhone: function(a) {
return /^00\d{7,}/.test(a)
},
needVip: function(e) {
var a = ["21001601", "21000110", "21000121", "46000101", "716027609", "716027610", "549000912"];
var b = true;
for (var c = 0,
d = a.length; c < d; c++) {
if (a[c] == e) {
b = false;
break
}
}
return b
},
isPaipai: function() {
return /paipai.com$/.test(window.location.hostname)
},
isPaipaiDuokefu: function(a) {
return /^.+@.+$/.test(a)
},
is_weibo_appid: function(a) {
if (a == 46000101 || a == 607000101 || a == 558032501) {
return true
}
return false
}
};
$.report = {
monitor: function(c, b) {
if (Math.random() > (b || 1)) {
return
}
var a = location.protocol + "//ui.ptlogin2.qq.com/cgi-bin/report?id=" + c;
$.http.preload(a)
},
nlog: function(d, a) {
var c = location.protocol == "https:" ? "https://ssl.qq.com/ptlogin/cgi-bin/ptlogin_report?": "http://log.wtlogin.qq.com/cgi-bin/ptlogin_report?";
var b = encodeURIComponent(d + "|_|" + location.href + "|_|" + window.navigator.userAgent);
a = a ? a + "-487131": 0;
c += ("id=" + a + "&msg=" + b + "&v=" + Math.random());
$.http.preload(c)
}
};
$.detectBrowser = function() {
var b = navigator.userAgent;
var a;
if (/android/i.test(b)) {
if (a = b.match(/MQQBrowser|UCBrowser|360Browser|Firefox/i)) {
a[1] = "location"
} else {
if (a = b.match(/baidubrowse|SogouMobileBrowser|LieBaoFast|XiaoMi\/MiuiBrowser|opr/i)) {
a[1] = "iframe"
} else {
if (a = b.match(/Chrome/i)) {
a[1] = "open"
}
}
}
} else {
if (/iphone|ipod/ig.test(b)) {
if (a = b.match(/MQQBrowser|UCBrowser|baidubrowse|Opera|360Browser|LieBao/i)) {} else {
if (a = b.match(/CriOS|Chrome/i)) { (a[0].toLowerCase() == "crios") && (a[0] = "Chrome")
}
}
}
}
return a || ["others", ""]
}; (function() {
var a = "nohost_guid";
var b = "/nohost_htdocs/js/SwitchHost.js";
if ($.cookie.get(a) != "") {
$.http.loadScript(b,
function() {
var c = window.SwitchHost && window.SwitchHost.init;
c && c()
})
}
})();
$ = window.$ || {};
$.RSA = function() {
function g(z, t) {
return new at(z, t)
}
function ai(aB, aC) {
var t = "";
var z = 0;
while (z + aC < aB.length) {
t += aB.substring(z, z + aC) + "\n";
z += aC
}
return t + aB.substring(z, aB.length)
}
function s(t) {
if (t < 16) {
return "0" + t.toString(16)
} else {
return t.toString(16)
}
}
function ag(aC, aF) {
if (aF < aC.length + 11) {
uv_alert("Message too long for RSA");
return null
}
var aE = new Array();
var aB = aC.length - 1;
while (aB >= 0 && aF > 0) {
var aD = aC.charCodeAt(aB--);
aE[--aF] = aD
}
aE[--aF] = 0;
var z = new ae();
var t = new Array();
while (aF > 2) {
t[0] = 0;
while (t[0] == 0) {
z.nextBytes(t)
}
aE[--aF] = t[0]
}
aE[--aF] = 2;
aE[--aF] = 0;
return new at(aE)
}
function M() {
this.n = null;
this.e = 0;
this.d = null;
this.p = null;
this.q = null;
this.dmp1 = null;
this.dmq1 = null;
this.coeff = null
}
function p(z, t) {
if (z != null && t != null && z.length > 0 && t.length > 0) {
this.n = g(z, 16);
this.e = parseInt(t, 16)
} else {
uv_alert("Invalid RSA public key")
}
}
function X(t) {
return t.modPowInt(this.e, this.n)
}
function q(aB) {
var t = ag(aB, (this.n.bitLength() + 7) >> 3);
if (t == null) {
return null
}
var aC = this.doPublic(t);
if (aC == null) {
return null
}
var z = aC.toString(16);
if ((z.length & 1) == 0) {
return z
} else {
return "0" + z
}
}
M.prototype.doPublic = X;
M.prototype.setPublic = p;
M.prototype.encrypt = q;
var ax;
var aj = 244837814094590;
var aa = ((aj & 16777215) == 15715070);
function at(z, t, aB) {
if (z != null) {
if ("number" == typeof z) {
this.fromNumber(z, t, aB)
} else {
if (t == null && "string" != typeof z) {
this.fromString(z, 256)
} else {
this.fromString(z, t)
}
}
}
}
function h() {
return new at(null)
}
function b(aD, t, z, aC, aF, aE) {
while (--aE >= 0) {
var aB = t * this[aD++] + z[aC] + aF;
aF = Math.floor(aB / 67108864);
z[aC++] = aB & 67108863
}
return aF
}
function az(aD, aI, aJ, aC, aG, t) {
var aF = aI & 32767,
aH = aI >> 15;
while (--t >= 0) {
var aB = this[aD] & 32767;
var aE = this[aD++] >> 15;
var z = aH * aB + aE * aF;
aB = aF * aB + ((z & 32767) << 15) + aJ[aC] + (aG & 1073741823);
aG = (aB >>> 30) + (z >>> 15) + aH * aE + (aG >>> 30);
aJ[aC++] = aB & 1073741823
}
return aG
}
function ay(aD, aI, aJ, aC, aG, t) {
var aF = aI & 16383,
aH = aI >> 14;
while (--t >= 0) {
var aB = this[aD] & 16383;
var aE = this[aD++] >> 14;
var z = aH * aB + aE * aF;
aB = aF * aB + ((z & 16383) << 14) + aJ[aC] + aG;
aG = (aB >> 28) + (z >> 14) + aH * aE;
aJ[aC++] = aB & 268435455
}
return aG
}
if (aa && (navigator.appName == "Microsoft Internet Explorer")) {
at.prototype.am = az;
ax = 30
} else {
if (aa && (navigator.appName != "Netscape")) {
at.prototype.am = b;
ax = 26
} else {
at.prototype.am = ay;
ax = 28
}
}
at.prototype.DB = ax;
at.prototype.DM = ((1 << ax) - 1);
at.prototype.DV = (1 << ax);
var ab = 52;
at.prototype.FV = Math.pow(2, ab);
at.prototype.F1 = ab - ax;
at.prototype.F2 = 2 * ax - ab;
var af = "0123456789abcdefghijklmnopqrstuvwxyz";
var ah = new Array();
var aq, w;
aq = "0".charCodeAt(0);
for (w = 0; w <= 9; ++w) {
ah[aq++] = w
}
aq = "a".charCodeAt(0);
for (w = 10; w < 36; ++w) {
ah[aq++] = w
}
aq = "A".charCodeAt(0);
for (w = 10; w < 36; ++w) {
ah[aq++] = w
}
function aA(t) {
return af.charAt(t)
}
function B(z, t) {
var aB = ah[z.charCodeAt(t)];
return (aB == null) ? -1 : aB
}
function Z(z) {
for (var t = this.t - 1; t >= 0; --t) {
z[t] = this[t]
}
z.t = this.t;
z.s = this.s
}
function o(t) {
this.t = 1;
this.s = (t < 0) ? -1 : 0;
if (t > 0) {
this[0] = t
} else {
if (t < -1) {
this[0] = t + DV
} else {
this.t = 0
}
}
}
function c(t) {
var z = h();
z.fromInt(t);
return z
}
function x(aF, z) {
var aC;
if (z == 16) {
aC = 4
} else {
if (z == 8) {
aC = 3
} else {
if (z == 256) {
aC = 8
} else {
if (z == 2) {
aC = 1
} else {
if (z == 32) {
aC = 5
} else {
if (z == 4) {
aC = 2
} else {
this.fromRadix(aF, z);
return
}
}
}
}
}
}
this.t = 0;
this.s = 0;
var aE = aF.length,
aB = false,
aD = 0;
while (--aE >= 0) {
var t = (aC == 8) ? aF[aE] & 255 : B(aF, aE);
if (t < 0) {
if (aF.charAt(aE) == "-") {
aB = true
}
continue
}
aB = false;
if (aD == 0) {
this[this.t++] = t
} else {
if (aD + aC > this.DB) {
this[this.t - 1] |= (t & ((1 << (this.DB - aD)) - 1)) << aD;
this[this.t++] = (t >> (this.DB - aD))
} else {
this[this.t - 1] |= t << aD
}
}
aD += aC;
if (aD >= this.DB) {
aD -= this.DB
}
}
if (aC == 8 && (aF[0] & 128) != 0) {
this.s = -1;
if (aD > 0) {
this[this.t - 1] |= ((1 << (this.DB - aD)) - 1) << aD
}
}
this.clamp();
if (aB) {
at.ZERO.subTo(this, this)
}
}
function P() {
var t = this.s & this.DM;
while (this.t > 0 && this[this.t - 1] == t) {--this.t
}
}
function r(z) {
if (this.s < 0) {
return "-" + this.negate().toString(z)
}
var aB;
if (z == 16) {
aB = 4
} else {
if (z == 8) {
aB = 3
} else {
if (z == 2) {
aB = 1
} else {
if (z == 32) {
aB = 5
} else {
if (z == 4) {
aB = 2
} else {
return this.toRadix(z)
}
}
}
}
}
var aD = (1 << aB) - 1,
aG,
t = false,
aE = "",
aC = this.t;
var aF = this.DB - (aC * this.DB) % aB;
if (aC-->0) {
if (aF < this.DB && (aG = this[aC] >> aF) > 0) {
t = true;
aE = aA(aG)
}
while (aC >= 0) {
if (aF < aB) {
aG = (this[aC] & ((1 << aF) - 1)) << (aB - aF);
aG |= this[--aC] >> (aF += this.DB - aB)
} else {
aG = (this[aC] >> (aF -= aB)) & aD;
if (aF <= 0) {
aF += this.DB; --aC
}
}
if (aG > 0) {
t = true
}
if (t) {
aE += aA(aG)
}
}
}
return t ? aE: "0"
}
function S() {
var t = h();
at.ZERO.subTo(this, t);
return t
}
function am() {
return (this.s < 0) ? this.negate() : this
}
function H(t) {
var aB = this.s - t.s;
if (aB != 0) {
return aB
}
var z = this.t;
aB = z - t.t;
if (aB != 0) {
return aB
}
while (--z >= 0) {
if ((aB = this[z] - t[z]) != 0) {
return aB
}
}
return 0
}
function k(z) {
var aC = 1,
aB;
if ((aB = z >>> 16) != 0) {
z = aB;
aC += 16
}
if ((aB = z >> 8) != 0) {
z = aB;
aC += 8
}
if ((aB = z >> 4) != 0) {
z = aB;
aC += 4
}
if ((aB = z >> 2) != 0) {
z = aB;
aC += 2
}
if ((aB = z >> 1) != 0) {
z = aB;
aC += 1
}
return aC
}
function v() {
if (this.t <= 0) {
return 0
}
return this.DB * (this.t - 1) + k(this[this.t - 1] ^ (this.s & this.DM))
}
function ar(aB, z) {
var t;
for (t = this.t - 1; t >= 0; --t) {
z[t + aB] = this[t]
}
for (t = aB - 1; t >= 0; --t) {
z[t] = 0
}
z.t = this.t + aB;
z.s = this.s
}
function Y(aB, z) {
for (var t = aB; t < this.t; ++t) {
z[t - aB] = this[t]
}
z.t = Math.max(this.t - aB, 0);
z.s = this.s
}
function u(aG, aC) {
var z = aG % this.DB;
var t = this.DB - z;
var aE = (1 << t) - 1;
var aD = Math.floor(aG / this.DB),
aF = (this.s << z) & this.DM,
aB;
for (aB = this.t - 1; aB >= 0; --aB) {
aC[aB + aD + 1] = (this[aB] >> t) | aF;
aF = (this[aB] & aE) << z
}
for (aB = aD - 1; aB >= 0; --aB) {
aC[aB] = 0
}
aC[aD] = aF;
aC.t = this.t + aD + 1;
aC.s = this.s;
aC.clamp()
}
function m(aF, aC) {
aC.s = this.s;
var aD = Math.floor(aF / this.DB);
if (aD >= this.t) {
aC.t = 0;
return
}
var z = aF % this.DB;
var t = this.DB - z;
var aE = (1 << z) - 1;
aC[0] = this[aD] >> z;
for (var aB = aD + 1; aB < this.t; ++aB) {
aC[aB - aD - 1] |= (this[aB] & aE) << t;
aC[aB - aD] = this[aB] >> z
}
if (z > 0) {
aC[this.t - aD - 1] |= (this.s & aE) << t
}
aC.t = this.t - aD;
aC.clamp()
}
function ac(z, aC) {
var aB = 0,
aD = 0,
t = Math.min(z.t, this.t);
while (aB < t) {
aD += this[aB] - z[aB];
aC[aB++] = aD & this.DM;
aD >>= this.DB
}
if (z.t < this.t) {
aD -= z.s;
while (aB < this.t) {
aD += this[aB];
aC[aB++] = aD & this.DM;
aD >>= this.DB
}
aD += this.s
} else {
aD += this.s;
while (aB < z.t) {
aD -= z[aB];
aC[aB++] = aD & this.DM;
aD >>= this.DB
}
aD -= z.s
}
aC.s = (aD < 0) ? -1 : 0;
if (aD < -1) {
aC[aB++] = this.DV + aD
} else {
if (aD > 0) {
aC[aB++] = aD
}
}
aC.t = aB;
aC.clamp()
}
function E(z, aC) {
var t = this.abs(),
aD = z.abs();
var aB = t.t;
aC.t = aB + aD.t;
while (--aB >= 0) {
aC[aB] = 0
}
for (aB = 0; aB < aD.t; ++aB) {
aC[aB + t.t] = t.am(0, aD[aB], aC, aB, 0, t.t)
}
aC.s = 0;
aC.clamp();
if (this.s != z.s) {
at.ZERO.subTo(aC, aC)
}
}
function R(aB) {
var t = this.abs();
var z = aB.t = 2 * t.t;
while (--z >= 0) {
aB[z] = 0
}
for (z = 0; z < t.t - 1; ++z) {
var aC = t.am(z, t[z], aB, 2 * z, 0, 1);
if ((aB[z + t.t] += t.am(z + 1, 2 * t[z], aB, 2 * z + 1, aC, t.t - z - 1)) >= t.DV) {
aB[z + t.t] -= t.DV;
aB[z + t.t + 1] = 1
}
}
if (aB.t > 0) {
aB[aB.t - 1] += t.am(z, t[z], aB, 2 * z, 0, 1)
}
aB.s = 0;
aB.clamp()
}
function F(aJ, aG, aF) {
var aP = aJ.abs();
if (aP.t <= 0) {
return
}
var aH = this.abs();
if (aH.t < aP.t) {
if (aG != null) {
aG.fromInt(0)
}
if (aF != null) {
this.copyTo(aF)
}
return
}
if (aF == null) {
aF = h()
}
var aD = h(),
z = this.s,
aI = aJ.s;
var aO = this.DB - k(aP[aP.t - 1]);
if (aO > 0) {
aP.lShiftTo(aO, aD);
aH.lShiftTo(aO, aF)
} else {
aP.copyTo(aD);
aH.copyTo(aF)
}
var aL = aD.t;
var aB = aD[aL - 1];
if (aB == 0) {
return
}
var aK = aB * (1 << this.F1) + ((aL > 1) ? aD[aL - 2] >> this.F2: 0);
var aS = this.FV / aK,
aR = (1 << this.F1) / aK,
aQ = 1 << this.F2;
var aN = aF.t,
aM = aN - aL,
aE = (aG == null) ? h() : aG;
aD.dlShiftTo(aM, aE);
if (aF.compareTo(aE) >= 0) {
aF[aF.t++] = 1;
aF.subTo(aE, aF)
}
at.ONE.dlShiftTo(aL, aE);
aE.subTo(aD, aD);
while (aD.t < aL) {
aD[aD.t++] = 0
}
while (--aM >= 0) {
var aC = (aF[--aN] == aB) ? this.DM: Math.floor(aF[aN] * aS + (aF[aN - 1] + aQ) * aR);
if ((aF[aN] += aD.am(0, aC, aF, aM, 0, aL)) < aC) {
aD.dlShiftTo(aM, aE);
aF.subTo(aE, aF);
while (aF[aN] < --aC) {
aF.subTo(aE, aF)
}
}
}
if (aG != null) {
aF.drShiftTo(aL, aG);
if (z != aI) {
at.ZERO.subTo(aG, aG)
}
}
aF.t = aL;
aF.clamp();
if (aO > 0) {
aF.rShiftTo(aO, aF)
}
if (z < 0) {
at.ZERO.subTo(aF, aF)
}
}
function O(t) {
var z = h();
this.abs().divRemTo(t, null, z);
if (this.s < 0 && z.compareTo(at.ZERO) > 0) {
t.subTo(z, z)
}
return z
}
function L(t) {
this.m = t
}
function W(t) {
if (t.s < 0 || t.compareTo(this.m) >= 0) {
return t.mod(this.m)
} else {
return t
}
}
function al(t) {
return t
}
function K(t) {
t.divRemTo(this.m, null, t)
}
function I(t, aB, z) {
t.multiplyTo(aB, z);
this.reduce(z)
}
function av(t, z) {
t.squareTo(z);
this.reduce(z)
}
L.prototype.convert = W;
L.prototype.revert = al;
L.prototype.reduce = K;
L.prototype.mulTo = I;
L.prototype.sqrTo = av;
function C() {
if (this.t < 1) {
return 0
}
var t = this[0];
if ((t & 1) == 0) {
return 0
}
var z = t & 3;
z = (z * (2 - (t & 15) * z)) & 15;
z = (z * (2 - (t & 255) * z)) & 255;
z = (z * (2 - (((t & 65535) * z) & 65535))) & 65535;
z = (z * (2 - t * z % this.DV)) % this.DV;
return (z > 0) ? this.DV - z: -z
}
function f(t) {
this.m = t;
this.mp = t.invDigit();
this.mpl = this.mp & 32767;
this.mph = this.mp >> 15;
this.um = (1 << (t.DB - 15)) - 1;
this.mt2 = 2 * t.t
}
function ak(t) {
var z = h();
t.abs().dlShiftTo(this.m.t, z);
z.divRemTo(this.m, null, z);
if (t.s < 0 && z.compareTo(at.ZERO) > 0) {
this.m.subTo(z, z)
}
return z
}
function au(t) {
var z = h();
t.copyTo(z);
this.reduce(z);
return z
}
function Q(t) {
while (t.t <= this.mt2) {
t[t.t++] = 0
}
for (var aB = 0; aB < this.m.t; ++aB) {
var z = t[aB] & 32767;
var aC = (z * this.mpl + (((z * this.mph + (t[aB] >> 15) * this.mpl) & this.um) << 15)) & t.DM;
z = aB + this.m.t;
t[z] += this.m.am(0, aC, t, aB, 0, this.m.t);
while (t[z] >= t.DV) {
t[z] -= t.DV;
t[++z]++
}
}
t.clamp();
t.drShiftTo(this.m.t, t);
if (t.compareTo(this.m) >= 0) {
t.subTo(this.m, t)
}
}
function an(t, z) {
t.squareTo(z);
this.reduce(z)
}
function A(t, aB, z) {
t.multiplyTo(aB, z);
this.reduce(z)
}
f.prototype.convert = ak;
f.prototype.revert = au;
f.prototype.reduce = Q;
f.prototype.mulTo = A;
f.prototype.sqrTo = an;
function j() {
return ((this.t > 0) ? (this[0] & 1) : this.s) == 0
}
function y(aG, aH) {
if (aG > 4294967295 || aG < 1) {
return at.ONE
}
var aF = h(),
aB = h(),
aE = aH.convert(this),
aD = k(aG) - 1;
aE.copyTo(aF);
while (--aD >= 0) {
aH.sqrTo(aF, aB);
if ((aG & (1 << aD)) > 0) {
aH.mulTo(aB, aE, aF)
} else {
var aC = aF;
aF = aB;
aB = aC
}
}
return aH.revert(aF)
}
function ao(aB, t) {
var aC;
if (aB < 256 || t.isEven()) {
aC = new L(t)
} else {
aC = new f(t)
}
return this.exp(aB, aC)
}
at.prototype.copyTo = Z;
at.prototype.fromInt = o;
at.prototype.fromString = x;
at.prototype.clamp = P;
at.prototype.dlShiftTo = ar;
at.prototype.drShiftTo = Y;
at.prototype.lShiftTo = u;
at.prototype.rShiftTo = m;
at.prototype.subTo = ac;
at.prototype.multiplyTo = E;
at.prototype.squareTo = R;
at.prototype.divRemTo = F;
at.prototype.invDigit = C;
at.prototype.isEven = j;
at.prototype.exp = y;
at.prototype.toString = r;
at.prototype.negate = S;
at.prototype.abs = am;
at.prototype.compareTo = H;
at.prototype.bitLength = v;
at.prototype.mod = O;
at.prototype.modPowInt = ao;
at.ZERO = c(0);
at.ONE = c(1);
var n;
var V;
var ad;
function d(t) {
V[ad++] ^= t & 255;
V[ad++] ^= (t >> 8) & 255;
V[ad++] ^= (t >> 16) & 255;
V[ad++] ^= (t >> 24) & 255;
if (ad >= N) {
ad -= N
}
}
function U() {
d(new Date().getTime())
}
if (V == null) {
V = new Array();
ad = 0;
var J;
if (navigator.appName == "Netscape" && navigator.appVersion < "5" && window.crypto && window.crypto.random) {
var G = window.crypto.random(32);
for (J = 0; J < G.length; ++J) {
V[ad++] = G.charCodeAt(J) & 255
}
}
while (ad < N) {
J = Math.floor(65536 * Math.random());
V[ad++] = J >>> 8;
V[ad++] = J & 255
}
ad = 0;
U()
}
function D() {
if (n == null) {
U();
n = ap();
n.init(V);
for (ad = 0; ad < V.length; ++ad) {
V[ad] = 0
}
ad = 0
}
return n.next()
}
function aw(z) {
var t;
for (t = 0; t < z.length; ++t) {
z[t] = D()
}
}
function ae() {}
ae.prototype.nextBytes = aw;
function l() {
this.i = 0;
this.j = 0;
this.S = new Array()
}
function e(aD) {
var aC, z, aB;
for (aC = 0; aC < 256; ++aC) {
this.S[aC] = aC
}
z = 0;
for (aC = 0; aC < 256; ++aC) {
z = (z + this.S[aC] + aD[aC % aD.length]) & 255;
aB = this.S[aC];
this.S[aC] = this.S[z];
this.S[z] = aB
}
this.i = 0;
this.j = 0
}
function a() {
var z;
this.i = (this.i + 1) & 255;
this.j = (this.j + this.S[this.i]) & 255;
z = this.S[this.i];
this.S[this.i] = this.S[this.j];
this.S[this.j] = z;
return this.S[(z + this.S[this.i]) & 255]
}
l.prototype.init = e;
l.prototype.next = a;
function ap() {
return new l()
}
var N = 256;
function T(aC, aB, z) {
aB = "F20CE00BAE5361F8FA3AE9CEFA495362FF7DA1BA628F64A347F0A8C012BF0B254A30CD92ABFFE7A6EE0DC424CB6166F8819EFA5BCCB20EDFB4AD02E412CCF579B1CA711D55B8B0B3AEB60153D5E0693A2A86F3167D7847A0CB8B00004716A9095D9BADC977CBB804DBDCBA6029A9710869A453F27DFDDF83C016D928B3CBF4C7";
z = "3";
var t = new M();
t.setPublic(aB, z);
return t.encrypt(aC)
}
return {
rsa_encrypt: T
}
} (); (function(r) {
var s = "",
a = 0,
g = [],
x = [],
y = 0,
u = 0,
m = [],
t = [],
n = true;
function e() {
return Math.round(Math.random() * 4294967295)
}
function j(C, D, z) {
if (!z || z > 4) {
z = 4
}
var A = 0;
for (var B = D; B < D + z; B++) {
A <<= 8;
A |= C[B]
}
return (A & 4294967295) >>> 0
}
function b(A, B, z) {
A[B + 3] = (z >> 0) & 255;
A[B + 2] = (z >> 8) & 255;
A[B + 1] = (z >> 16) & 255;
A[B + 0] = (z >> 24) & 255
}
function w(C) {
if (!C) {
return ""
}
var z = "";
for (var A = 0; A < C.length; A++) {
var B = Number(C[A]).toString(16);
if (B.length == 1) {
B = "0" + B
}
z += B
}
return z
}
function v(A) {
var B = "";
for (var z = 0; z < A.length; z += 2) {
B += String.fromCharCode(parseInt(A.substr(z, 2), 16))
}
return B
}
function c(B) {
if (!B) {
return ""
}
var A = [];
for (var z = 0; z < B.length; z++) {
A[z] = B.charCodeAt(z)
}
return w(A)
}
function h(B) {
g = new Array(8);
x = new Array(8);
y = u = 0;
n = true;
a = 0;
var z = B.length;
var C = 0;
a = (z + 10) % 8;
if (a != 0) {
a = 8 - a
}
m = new Array(z + a + 10);
g[0] = ((e() & 248) | a) & 255;
for (var A = 1; A <= a; A++) {
g[A] = e() & 255
}
a++;
for (var A = 0; A < 8; A++) {
x[A] = 0
}
C = 1;
while (C <= 2) {
if (a < 8) {
g[a++] = e() & 255;
C++
}
if (a == 8) {
p()
}
}
var A = 0;
while (z > 0) {
if (a < 8) {
g[a++] = B[A++];
z--
}
if (a == 8) {
p()
}
}
C = 1;
while (C <= 7) {
if (a < 8) {
g[a++] = 0;
C++
}
if (a == 8) {
p()
}
}
return m
}
function q(D) {
var C = 0;
var A = new Array(8);
var z = D.length;
t = D;
if (z % 8 != 0 || z < 16) {
return null
}
x = l(D);
a = x[0] & 7;
C = z - a - 10;
if (C < 0) {
return null
}
for (var B = 0; B < A.length; B++) {
A[B] = 0
}
m = new Array(C);
u = 0;
y = 8;
a++;
var E = 1;
while (E <= 2) {
if (a < 8) {
a++;
E++
}
if (a == 8) {
A = D;
if (!f()) {
return null
}
}
}
var B = 0;
while (C != 0) {
if (a < 8) {
m[B] = (A[u + a] ^ x[a]) & 255;
B++;
C--;
a++
}
if (a == 8) {
A = D;
u = y - 8;
if (!f()) {
return null
}
}
}
for (E = 1; E < 8; E++) {
if (a < 8) {
if ((A[u + a] ^ x[a]) != 0) {
return null
}
a++
}
if (a == 8) {
A = D;
u = y;
if (!f()) {
return null
}
}
}
return m
}
function p() {
for (var z = 0; z < 8; z++) {
if (n) {
g[z] ^= x[z]
} else {
g[z] ^= m[u + z]
}
}
var A = k(g);
for (var z = 0; z < 8; z++) {
m[y + z] = A[z] ^ x[z];
x[z] = g[z]
}
u = y;
y += 8;
a = 0;
n = false
}
function k(A) {
var B = 16;
var G = j(A, 0, 4);
var F = j(A, 4, 4);
var I = j(s, 0, 4);
var H = j(s, 4, 4);
var E = j(s, 8, 4);
var D = j(s, 12, 4);
var C = 0;
var J = 2654435769 >>> 0;
while (B-->0) {
C += J;
C = (C & 4294967295) >>> 0;
G += ((F << 4) + I) ^ (F + C) ^ ((F >>> 5) + H);
G = (G & 4294967295) >>> 0;
F += ((G << 4) + E) ^ (G + C) ^ ((G >>> 5) + D);
F = (F & 4294967295) >>> 0
}
var K = new Array(8);
b(K, 0, G);
b(K, 4, F);
return K
}
function l(A) {
var B = 16;
var G = j(A, 0, 4);
var F = j(A, 4, 4);
var I = j(s, 0, 4);
var H = j(s, 4, 4);
var E = j(s, 8, 4);
var D = j(s, 12, 4);
var C = 3816266640 >>> 0;
var J = 2654435769 >>> 0;
while (B-->0) {
F -= ((G << 4) + E) ^ (G + C) ^ ((G >>> 5) + D);
F = (F & 4294967295) >>> 0;
G -= ((F << 4) + I) ^ (F + C) ^ ((F >>> 5) + H);
G = (G & 4294967295) >>> 0;
C -= J;
C = (C & 4294967295) >>> 0
}
var K = new Array(8);
b(K, 0, G);
b(K, 4, F);
return K
}
function f() {
var z = t.length;
for (var A = 0; A < 8; A++) {
x[A] ^= t[y + A]
}
x = l(x);
y += 8;
a = 0;
return true
}
function o(D, C) {
var B = [];
if (C) {
for (var A = 0; A < D.length; A++) {
B[A] = D.charCodeAt(A) & 255
}
} else {
var z = 0;
for (var A = 0; A < D.length; A += 2) {
B[z++] = parseInt(D.substr(A, 2), 16)
}
}
return B
}
r.TEA = {
encrypt: function(C, B) {
var A = o(C, B);
var z = h(A);
return w(z)
},
enAsBase64: function(E, D) {
var C = o(E, D);
var B = h(C);
var z = "";
for (var A = 0; A < B.length; A++) {
z += String.fromCharCode(B[A])
}
return btoa(z)
},
decrypt: function(B) {
var A = o(B, false);
var z = q(A);
return w(z)
},
initkey: function(z, A) {
s = o(z, A)
},
bytesToStr: v,
strToBytes: c,
bytesInStr: w,
dataFromStr: o
};
var d = {};
d.PADCHAR = "=";
d.ALPHA = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
d.getbyte = function(B, A) {
var z = B.charCodeAt(A);
if (z > 255) {
throw "INVALID_CHARACTER_ERR: DOM Exception 5"
}
return z
};
d.encode = function(D) {
if (arguments.length != 1) {
throw "SyntaxError: Not enough arguments"
}
var A = d.PADCHAR;
var F = d.ALPHA;
var E = d.getbyte;
var C, G;
var z = [];
D = "" + D;
var B = D.length - D.length % 3;
if (D.length == 0) {
return D
}
for (C = 0; C < B; C += 3) {
G = (E(D, C) << 16) | (E(D, C + 1) << 8) | E(D, C + 2);
z.push(F.charAt(G >> 18));
z.push(F.charAt((G >> 12) & 63));
z.push(F.charAt((G >> 6) & 63));
z.push(F.charAt(G & 63))
}
switch (D.length - B) {
case 1:
G = E(D, C) << 16;
z.push(F.charAt(G >> 18) + F.charAt((G >> 12) & 63) + A + A);
break;
case 2:
G = (E(D, C) << 16) | (E(D, C + 1) << 8);
z.push(F.charAt(G >> 18) + F.charAt((G >> 12) & 63) + F.charAt((G >> 6) & 63) + A);
break
}
return z.join("")
};
if (!window.btoa) {
window.btoa = d.encode
}
})(window);
$ = window.$ || {};
$.Encryption = function() {
var hexcase = 1;
var b64pad = "";
var chrsz = 8;
var mode = 32;
function md5(s) {
return hex_md5(s)
}
function hex_md5(s) {
return binl2hex(core_md5(str2binl(s), s.length * chrsz))
}
function str_md5(s) {
return binl2str(core_md5(str2binl(s), s.length * chrsz))
}
function hex_hmac_md5(key, data) {
return binl2hex(core_hmac_md5(key, data))
}
function b64_hmac_md5(key, data) {
return binl2b64(core_hmac_md5(key, data))
}
function str_hmac_md5(key, data) {
return binl2str(core_hmac_md5(key, data))
}
function core_md5(x, len) {
x[len >> 5] |= 128 << ((len) % 32);
x[(((len + 64) >>> 9) << 4) + 14] = len;
var a = 1732584193;
var b = -271733879;
var c = -1732584194;
var d = 271733878;
for (var i = 0; i < x.length; i += 16) {
var olda = a;
var oldb = b;
var oldc = c;
var oldd = d;
a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936);
d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);
c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);
b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);
a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);
d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);
c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);
b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);
a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);
d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);
c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);
b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);
a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);
d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);
c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);
b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);
a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);
d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);
c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);
b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302);
a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);
d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);
c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);
b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);
a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);
d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);
c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);
b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);
a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);
d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);
c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);
b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);
a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);
d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);
c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);
b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);
a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);
d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);
c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);
b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);
a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);
d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222);
c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);
b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);
a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);
d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);
c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);
b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);
a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844);
d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);
c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);
b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);
a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);
d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);
c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);
b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);
a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);
d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);
c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);
b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);
a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);
d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);
c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);
b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);
a = safe_add(a, olda);
b = safe_add(b, oldb);
c = safe_add(c, oldc);
d = safe_add(d, oldd)
}
if (mode == 16) {
return Array(b, c)
} else {
return Array(a, b, c, d)
}
}
function md5_cmn(q, a, b, x, s, t) {
return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b)
}
function md5_ff(a, b, c, d, x, s, t) {
return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t)
}
function md5_gg(a, b, c, d, x, s, t) {
return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t)
}
function md5_hh(a, b, c, d, x, s, t) {
return md5_cmn(b ^ c ^ d, a, b, x, s, t)
}
function md5_ii(a, b, c, d, x, s, t) {
return md5_cmn(c ^ (b | (~d)), a, b, x, s, t)
}
function core_hmac_md5(key, data) {
var bkey = str2binl(key);
if (bkey.length > 16) {
bkey = core_md5(bkey, key.length * chrsz)
}
var ipad = Array(16),
opad = Array(16);
for (var i = 0; i < 16; i++) {
ipad[i] = bkey[i] ^ 909522486;
opad[i] = bkey[i] ^ 1549556828
}
var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz);
return core_md5(opad.concat(hash), 512 + 128)
}
function safe_add(x, y) {
var lsw = (x & 65535) + (y & 65535);
var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
return (msw << 16) | (lsw & 65535)
}
function bit_rol(num, cnt) {
return (num << cnt) | (num >>> (32 - cnt))
}
function str2binl(str) {
var bin = Array();
var mask = (1 << chrsz) - 1;
for (var i = 0; i < str.length * chrsz; i += chrsz) {
bin[i >> 5] |= (str.charCodeAt(i / chrsz) & mask) << (i % 32)
}
return bin
}
function binl2str(bin) {
var str = "";
var mask = (1 << chrsz) - 1;
for (var i = 0; i < bin.length * 32; i += chrsz) {
str += String.fromCharCode((bin[i >> 5] >>> (i % 32)) & mask)
}
return str
}
function binl2hex(binarray) {
var hex_tab = hexcase ? "0123456789ABCDEF": "0123456789abcdef";
var str = "";
for (var i = 0; i < binarray.length * 4; i++) {
str += hex_tab.charAt((binarray[i >> 2] >> ((i % 4) * 8 + 4)) & 15) + hex_tab.charAt((binarray[i >> 2] >> ((i % 4) * 8)) & 15)
}
return str
}
function binl2b64(binarray) {
var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var str = "";
for (var i = 0; i < binarray.length * 4; i += 3) {
var triplet = (((binarray[i >> 2] >> 8 * (i % 4)) & 255) << 16) | (((binarray[i + 1 >> 2] >> 8 * ((i + 1) % 4)) & 255) << 8) | ((binarray[i + 2 >> 2] >> 8 * ((i + 2) % 4)) & 255);
for (var j = 0; j < 4; j++) {
if (i * 8 + j * 6 > binarray.length * 32) {
str += b64pad
} else {
str += tab.charAt((triplet >> 6 * (3 - j)) & 63)
}
}
}
return str
}
function hexchar2bin(str) {
var arr = [];
for (var i = 0; i < str.length; i = i + 2) {
arr.push("\\x" + str.substr(i, 2))
}
arr = arr.join("");
eval("var temp = '" + arr + "'");
return temp
}
function __monitor(mid, probability) {
if (Math.random() > (probability || 1)) {
return
}
var url = location.protocol + "//ui.ptlogin2.qq.com/cgi-bin/report?id=" + mid;
var s = document.createElement("img");
s.src = url;
s = null
}
function getEncryption(password, salt, vcode, isMd5) {
vcode = vcode || "";
password = password || "";
var md5Pwd = isMd5 ? password: md5(password),
h1 = hexchar2bin(md5Pwd),
s2 = md5(h1 + salt),
rsaH1 = $.RSA.rsa_encrypt(h1),
rsaH1Len = (rsaH1.length / 2).toString(16),
hexVcode = TEA.strToBytes(vcode.toUpperCase()),
vcodeLen = "000" + vcode.length.toString(16);
while (rsaH1Len.length < 4) {
rsaH1Len = "0" + rsaH1Len
}
TEA.initkey(s2);
var saltPwd = TEA.enAsBase64(rsaH1Len + rsaH1 + TEA.strToBytes(salt) + vcodeLen + hexVcode);
TEA.initkey("");
__monitor(488358, 1);
return saltPwd.replace(/[\/\+=]/g,
function(a) {
return {
"/": "-",
"+": "*",
"=": "_"
} [a]
})
}
function getRSAEncryption(password, vcode, isMd5) {
var str1 = isMd5 ? password: md5(password);
var str2 = str1 + vcode.toUpperCase();
var str3 = $.RSA.rsa_encrypt(str2);
return str3
}
return {
getEncryption: getEncryption,
getRSAEncryption: getRSAEncryption,
md5: md5
}
} (); (function() {
var ua = navigator.userAgent;
var isAndroid = /android/ig.test(ua) && /mqq/ig.test(ua);
if (typeof mtt !== "undefined") {
isAndroid = true
}
var isIos = /iphone|ipod/ig.test(ua) && /mqq/ig.test(ua);
function getUA() {
if (isAndroid) {
var info = x5.android.getBrowserParam();
if (info) {
info = eval("(" + info + ")");
var qua = info.qua + "";
qua = qua.match(/([0-9\.]+)/ig, "");
if (qua && qua.length > 0) {
return qua[0]
}
}
}
try {
var ua = navigator.userAgent;
var reg = /MQQBrowser\/(\d{2})/;
var regRemoveDot = /\./g;
ua = ua.replace(regRemoveDot, "");
var res = reg.exec(ua);
if (res && res.length > 1) {
return res[1]
}
return undefined
} catch(e) {
return undefined
}
}
var x5 = {
commandQueue: [],
commandQueueFlushing: false,
resources: {
base: !0
}
};
x5.callbackId = 0;
x5.callbacks = {};
x5.callbackStatus = {
NO_RESULT: 0,
OK: 1,
CLASS_NOT_FOUND_EXCEPTION: 2,
ILLEGAL_ACCESS_EXCEPTION: 3,
INSTANTIATION_EXCEPTION: 4,
MALFORMED_URL_EXCEPTION: 5,
IO_EXCEPTION: 6,
INVALID_ACTION: 7,
JSON_EXCEPTION: 8,
ERROR: 9
};
x5.createBridge = function() {
var bridge = document.createElement("iframe");
bridge.setAttribute("style", "display:none;");
bridge.setAttribute("height", "0px");
bridge.setAttribute("width", "0px");
bridge.setAttribute("frameborder", "0");
document.documentElement.appendChild(bridge);
return bridge
};
x5.exec = function(successCallback, errorCallback, service, action, options) {
var callbackId = null;
var command = {
className: service,
methodName: action,
options: {},
arguments: []
};
if (successCallback || errorCallback) {
callbackId = service + x5.callbackId++;
x5.callbacks[callbackId] = {
success: successCallback,
fail: errorCallback
}
}
if (callbackId != null) {
command.arguments.push(callbackId)
}
for (var i = 0; i < options.length; ++i) {
var arg = options[i];
if (arg == undefined || arg == null) {
continue
} else {
if (typeof(arg) == "object") {
command.options = arg
} else {
command.arguments.push(arg)
}
}
}
x5.commandQueue.push(JSON.stringify(command));
if (x5.commandQueue.length == 1 && !x5.commandQueueFlushing) {
if (!x5.bridge) {
x5.bridge = x5.createBridge()
}
x5.bridge.src = "mtt:" + service + ":" + action
}
};
x5.getAndClearQueuedCommands = function() {
var json = JSON.stringify(x5.commandQueue);
x5.commandQueue = [];
return json
};
x5.callbackSuccess = function(callbackId, args) {
if (x5.callbacks[callbackId]) {
if (args.status === x5.callbackStatus.OK) {
try {
if (x5.callbacks[callbackId].success) {
x5.callbacks[callbackId].success(args.message)
}
} catch(e) {
console.log("Error in success callback: " + callbackId + " = " + e)
}
}
if (!args.keepCallback) {
delete x5.callbacks[callbackId]
}
}
};
x5.callbackError = function(callbackId, args) {
if (x5.callbacks[callbackId]) {
try {
if (x5.callbacks[callbackId].fail) {
x5.callbacks[callbackId].fail(args.message)
}
} catch(e) {
console.log("Error in error callback: " + callbackId + " = " + e)
}
if (!args.keepCallback) {
delete x5.callbacks[callbackId]
}
}
};
x5.android = x5.android || {};
x5.ios = x5.ios || {};
if (isAndroid) {
x5.android.getBrowserParam = function() {
var browserparam = "";
if (typeof mtt !== "undefined") {
try {
if (mtt.getBrowserParam) {
browserparam = mtt.getBrowserParam() + ""
}
return browserparam
} catch(e) {
return ""
}
} else {
return ""
}
};
x5.android.getMobileqqSupport = function(succCallback, errCallback) {
var app = null;
try {
app = x5mtt.packages().getSingleApp("com.tencent.mobileqq");
if (app) {
app = JSON.parse(app)
}
} catch(e) {}
succCallback && succCallback(app)
};
x5.android.getUserInfo = function(succCallback, errCallback) {
var sLoginInfo = "";
try {
sLoginInfo = x5mtt.getLoginInfo();
if (sLoginInfo) {
sLoginInfo = JSON.parse(sLoginInfo + "");
succCallback(sLoginInfo)
} else {
succCallback("")
}
} catch(e) {
succCallback("")
}
};
x5.android.refreshToken = function(uin, callback) {
if (window.browser && browser.login.refreshToken) {
browser.login.refreshToken({
uin: uin
},
callback)
}
}
} else {
x5.ios.getMobileAppSupport = function(succCallback, errCallback) {
x5.exec(function(app) {
succCallback && succCallback(app)
},
errCallback, "app", "getMobileAppSupport", [{
scheme: "wtloginmqq2://"
}])
};
x5.ios.getUserInfo = function(succCallback, errCallback) {
x5.exec(succCallback, errCallback, "login", "getUinAndSidInfo", [])
};
x5.ios.refreshToken = function(uin, callback) {
x5.exec(callback, callback, "login", "refreshToken", [{
uin: uin
}])
}
}
x5.isAndroid = isAndroid;
x5.MTTVersion = getUA();
x5.getMobileqqSupport = x5.android.getMobileqqSupport || x5.ios.getMobileAppSupport;
x5.getUserInfo = x5.android.getUserInfo || x5.ios.getUserInfo;
x5.refreshToken = x5.android.refreshToken || x5.ios.refreshToken;
window.x5 = x5
})();
var MTT = {};
MTT.canQlogin = function() {
try {
var c = window.navigator.userAgent;
var h = /msie/i.test(c) && ("notify" in window.external);
if (h) {
return true
}
var d = /iphone/i.test(c) && /MQQBrowser[\/ ]([\d]{2})/.test(c) && /MQQBrowser[\/ ]([\d]{2})/.exec(c)[1] >= 41;
var g = /iphone/i.test(c) && /MQQBrowser[\/ ](\d+)(.\d+)+/.test(c);
var b = /ipad/i.test(c) && /MQQBrowser[\/ ]([\w.]+)/.test(c) && /MQQBrowser[\/ ]([\w.]+)/.exec(c)[1] >= 3.2;
var a = /android/i.test(c) && /MQQBrowser[\/ ]([\w.]+)/.test(c) && /MQQBrowser[\/ ]([\w.]+)/.exec(c)[1] >= 4.2;
if (d || b || a || g) {
return true
} else {
return false
}
} catch(f) {
return false
}
};
MTT.QLogin4PT = function(a) {
var b = ($.cookie.get("pt_qlogincode") != 5) && MTT.canQlogin();
if ("function" != typeof(a)) {
return
}
if (b) {
if (/msie/i.test(window.navigator.userAgent)) {
window.external.notify("#@getUserInfoWT@#pt.qqBrowserCallback");
pt.qqBrowserCallbackClock = setTimeout(function() {
pt.init()
},
pt.qqBrowserCallbackTime)
} else {
x5.getUserInfo(a,
function() {
a("")
});
pt.qqBrowserCallbackClock = setTimeout(function() {
pt.init()
},
pt.qqBrowserCallbackTime)
}
} else {
a("");
if ($.cookie.get("pt_qlogincode") == 5) {
$.report.nlog("iphone快速登录异常:pt_qlogincode=5", "276650")
}
}
};
MTT.canOneKey = function(c, b) {
var a = x5.MTTVersion;
if (!a) {
return false
}
x5 && x5.getMobileqqSupport && x5.getMobileqqSupport(function(d) {
if (a >= 51 && (d.isSupportApp || d.versionname >= "4.7")) {
c && c()
} else {
b && b()
}
});
return false
};
var pt = {
login_param: g_href.substring(g_href.indexOf("?") + 1),
domain: window.ptui_domain,
isHttps: $.check.isHttps(),
errTipClock: 0,
lang: window.STR_LANG,
submit_o: {},
auto_login: false,
switch_position_x: 0,
touchstartTime: 0,
longTouchTime: 500,
default_face_url: "",
is_qlogin: false,
lang_num: window.ptui_lang,
action: [0, 0],
vcode: "",
verifysession: "",
deviceType: 2,
login_uin: "",
login_pwd: "",
needAt: "",
appid: "",
s_url: "",
low_login_enable: window.ptui_low_login,
style: 8,
t_type: 0,
t_appid: 46000101,
isSubmiting: false,
key_interval: 0,
keyindex: 19,
qqBrowserInfo: null,
qqBrowserCallbackTime: 3000,
qqBrowserCallbackTimeOut: 0,
authInfo: null,
authUin: "",
authNick: "",
authLoginUrl: "",
qlogin_list_data: [],
cookieInfo: null,
cookieLogin: false,
regTmp: '<span id="#uin#" pwd="#pwd#" type="#type#" class="header"> <div id="del_touch_#uin#" class="del_touch_icon" > <span id="del_#uin#" class="del_icon" ></span> </div> <img id="img_#uin#" src="#src#" οnerrοr="pt.face_error();" /> <div id="img_out_#uin#" class="img_out" οnclick="pt.clickHeader(event);"></div> <label id="nick_#uin#" class="nick">#nick# </label> </span>',
hulianRegTmp: '<div class="useravatar"> <img id="img_#uin#" src="#src#" οnerrοr="pt.face_error();" alt="#nick#" /> </div> <div class="userinfo"> <div class="usernick">#nick#</div> <div class="userqq">#uin#</div> </div> <button id="userSwitch" class="switch" tabindex="5" href="javascript:void(0)";>切换帐号</button>',
new_vcode: false,
clickEvent: "touchstart",
checkErr: {
"2052": "网络繁忙,请稍后重试。",
"1028": "網絡繁忙,請稍後重試。",
"1033": "The network is busy, please try again later."
},
isHulian: window.ptui_style == 35 || window.ptui_style == 36,
isInIframe: window.ptui_style == 38,
is3gNews: window.ptui_style == 37,
redirect: function(b, a) {
switch (b + "") {
case "0":
if (pt.isInIframe) {
location.replace(a)
} else {
location.href = a
}
break;
case "1":
top.location.href = a;
break;
default:
top.location.href = a
}
},
init: function() {
if (pt.hasInit) {
return
} else {
pt.hasInit = true
}
pt.default_face_url = pt.isHttps ? "https://ui.ptlogin2.qq.com/style/0/images/1.gif": "http://imgcache.qq.com/ptlogin/v4/style/0/images/1.gif";
pt.setClickEvent();
if (pt.isHulian) {
pt.showCookieLogin()
} else {
if (!pt.is3gNews) {
pt.build_qlogin_list()
}
pt.initFace()
}
pt.bindEvent();
pt.bindInput();
pt.hideURLBar();
pt.setVcodeFlag();
$.winName.set("login_param", encodeURIComponent(pt.login_param));
pt.checkIframe();
pt.checkPostMessage();
window.setTimeout(function(a) {
if (window.ptui_appid != "549000929") {
pt.webLoginReport()
}
$.report.monitor(412020, 0.05);
if (!navigator.cookieEnabled) {
$.report.monitor(410030);
if ($.cookie.get("ptcz")) {
$.report.monitor(410031)
}
}
},
2000)
},
ptui_speedReport: function(f) {
var b = "http://isdspeed.qq.com/cgi-bin/r.cgi?flag1=7808&flag2=8";
var g = 1;
if (pt.isHttps) {
g = 2
} else {
if ($.detectBrowser()[0] == "MQQBrowser") {
var d = navigator.connection;
if (d && d.type) {
var c = d.type;
if (c == 1) {
g = 3
} else {
if (c == 2) {
g = 4
} else {
if (c == 3) {
g = 5
} else {
if (c == 4) {
g = 6
} else {
if (c == 5) {
g = 7
} else {
g = 8
}
}
}
}
}
} else {
g = 8
}
} else {
g = 1
}
}
b += "&flag3=" + g;
for (var e in f) {
if (f[e] > 15000 || f[e] < 0) {
continue
}
b += "&" + e + "=" + (f[e] || 1)
}
var a = new Image();
a.src = b
},
webLoginReport: function() {
try {
if (Math.random() > 0.2 && $.detectBrowser()[0] != "MQQBrowser") {
return
}
var d = ["navigationStart", "unloadEventStart", "unloadEventEnd", "redirectStart", "redirectEnd", "fetchStart", "domainLookupStart", "domainLookupEnd", "connectStart", "connectEnd", "requestStart", "responseStart", "responseEnd", "domLoading", "domInteractive", "domContentLoadedEventStart", "domContentLoadedEventEnd", "domComplete", "loadEventStart", "loadEventEnd"];
var h = {};
var c = window.performance ? window.performance.timing: null;
if (c) {
var j = c[d[0]];
for (var b = 1,
a = d.length; b < a; b++) {
if (c[d[b]]) {
h[b] = c[d[b]] - j
}
}
if (loadJs && loadJs.onloadTime) {
h[b++] = loadJs.onloadTime - j
}
var f = c.connectEnd >= c.connectStart && c.responseEnd >= c.responseStart && c.domComplete >= c.domInteractive && c.domInteractive >= c.domLoading && c.loadEventStart >= c.domComplete && c.loadEventEnd >= c.loadEventStart;
if (f) {
pt.ptui_speedReport(h)
}
}
} catch(g) {}
},
setClickEvent: function() {
var a = !/iphone|ipad|android/.test(navigator.userAgent.toLowerCase());
pt.clickEvent = "click"
},
saveLastUin: function(a) {
$.localStorage.set("last_uin", a)
},
getLastUin: function() {
return $.localStorage.get("last_uin")
},
object2param: function(b) {
var a = [];
for (var c in b) {
a.push(c + "=" + b[c] + "&")
}
return a.join("")
},
showErr: function(a, c) {
clearTimeout(pt.errTipClock);
var b = 3000;
if ((typeof c).toLocaleLowerCase() == "number") {
b = parseInt(c, 10);
c = null
}
$("error_message").innerHTML = a;
$.css.show("error_tips");
if (pt.isHulian) {
pt.errTipClock = setTimeout(function() {
pt.hideErr(c)
},
b)
} else {
c && c();
pt.errTipClock = setTimeout(function() {
pt.hideErr()
},
b)
}
},
hideErr: function(a) {
$.css.hide("error_tips");
a && a()
},
checkIframe: function() {
try {
if (top != self && !pt.isHulian) {
$.report.nlog("iphone登录框被iframe;referer=" + document.referrer, "347748")
}
} catch(a) {}
},
checkPostMessage: function() {
if (typeof window.postMessage == "undefined") {
$.report.nlog("iphone登录框不支持postMessage;", "350525")
}
if (typeof window.JSON == "undefined") {
$.report.nlog("iphone登录框不支持JSON;", "362678")
}
},
setVcodeFlag: function() {
if (typeof window.postMessage == "undefined" || typeof window.JSON == "undefined") {
pt.new_vcode = false
} else {
pt.new_vcode = true
}
},
getAuthUrl: function() {
var a = (pt.isHttps ? "https://ssl.": "http://") + "ptlogin2." + pt.domain + "/pt4_auth?daid=" + window.ptui_daid + "&appid=" + window.ptui_appid + "&auth_token=" + $.str.time33($.cookie.get("supertoken"));
if (window.ptui_pt_qzone_sig == "1") {
a += "&pt_qzone_sig=1"
}
return a
},
auth: function() {
pt.getParam();
var a = pt.getAuthUrl();
var b = $.cookie.get("superuin");
if (window.ptui_daid && window.ptui_noAuth != "1" && b != "") {
$.http.loadScript(a)
} else {
pt.qqBrowserQlogin()
}
},
showAuth: function(b) {
var c = b.substr(b.indexOf("?") + 1);
var a = c.match(RegExp("(^|&)uin=([^&]*)(&|$)"));
pt.authUin = !a ? "": decodeURIComponent(a[2]);
pt.authLoginUrl = b;
pt.authNick = $.str.utf8ToUincode($.cookie.get("ptnick_" + pt.authUin)) || pt.authUin;
if (pt.authUin) {
pt.authInfo = {
uin: $.str.encodeHtml(pt.authUin),
nick: $.str.encodeHtml(pt.authNick),
authUrl: pt.authUrl,
type: 3
}
}
},
showCookieLogin: function() {
var b = $.cookie.get("skey");
var c = $.cookie.uin();
var a = $.cookie.get("nick");
if (b && c) {
pt.cookieInfo = {
uin: $.str.encodeHtml(c),
nick: $.str.encodeHtml($.str.utf8ToUincode($.cookie.get("ptnick_" + c)) || c),
skey: b,
type: 4
};
return true
}
return false
},
qqBrowserQlogin: function() {
try {
if (self === top || x5.isAndroid) {
MTT.QLogin4PT(pt.qqBrowserCallback)
} else {
pt.init()
}
} catch(a) {
pt.init();
$.report.nlog("iphone快速登录异常,qqBrowserQlogin," + a.message, "276650")
}
},
qqBrowserCallback: function(b) {
window.clearTimeout(pt.qqBrowserCallbackClock);
try {
if (b && typeof b === "string") {
b = JSON.parse(b)
}
if (b && ($.check.isQQ(b.uin) && b.loginkey.length != 0 && b.loginkey.length > 10)) {
pt.qqBrowserInfo = {};
pt.qqBrowserInfo.uin = $.str.encodeHtml(b.uin);
pt.qqBrowserInfo.nick = $.str.encodeHtml(b.nickname);
pt.qqBrowserInfo.loginkey = b.loginkey;
pt.qqBrowserInfo.type = 2
} else {
if (b && b.uin.length == 0) {
$.report.nlog("iphone快速登录异常:数据返回异常,没有uin", "276650")
} else {
if (b && b.loginkey.length == 0) {
$.report.nlog("iphone快速登录异常:数据返回异常,没有loginkey", "276650")
} else {
if (b) {
$.report.nlog("iphone快速登录异常:数据返回异常:" + b.loginkey.length, "276650")
}
}
}
}
} catch(a) {
$.report.nlog("iphone快速登录异常: qqBrowserCallback " + a.message, "276650")
}
pt.init()
},
getParam: function() {
pt.appid = window.ptui_appid;
if (pt.isInIframe) {
switch (window.ptui_target) {
case "_self":
pt.target = 0;
break;
case "_top":
pt.target = 1;
break;
default:
pt.target = 1;
break
}
} else {
pt.target = 1
}
pt.s_url = $.bom.query("s_url");
pt.style = window.ptui_style ? window.ptui_style: 8
},
build_qlogin_list: function() {
var d = pt.get_qlogin_list();
pt.qlogin_list_data = d;
var b = d.length;
if (b > 0) {
pt._switch();
var c = "";
for (var a = 0; a < b; a++) {
if (d[a].uin != "") {
c += pt.regTmp.replace(/#uin#/g, d[a].uin).replace(/#nick#/g, d[a].nick).replace(/#pwd#/g, d[a].pwd).replace(/#type#/g, d[a].type).replace(/#src#/g, pt.default_face_url)
}
}
$("q_logon_list").innerHTML = c;
for (var a = 0; a < b; a++) {
pt.getShortWord($("nick_" + d[a].uin), d[a].nick, 95)
}
$("swicth_login") && ($("swicth_login").style.display = "block")
} else {
$("web_login") && ($("web_login").style.display = "block");
$("swicth_login") && ($("swicth_login").style.display = "none")
}
},
build_hulian_qlogin_list: function(c) {
if (c.nick) {
pt.cookieInfo.nick = $.str.encodeHtml(c.nick)
}
var g = pt.get_qlogin_list();
pt.qlogin_list_data = g;
var a = (c.skey == 1);
var d = g.length;
if (d > 0) {
pt.hideOneKey();
var f = "";
for (var b = 0; b < d; b++) {
var e = g[b];
if (a && !e.skey) {
continue
}
if (e.uin != "") {
f += pt.hulianRegTmp.replace(/#uin#/g, e.uin).replace(/#nick#/g, e.nick).replace(/#type#/g, e.type).replace(/#src#/g, pt.default_face_url)
}
}
setTimeout(function() {
$("q_logon_list").innerHTML = f;
$.css.show($("q_logon_list"));
$.css.hide($("form_outter_wrap"));
pt.cookieLogin = a;
$("userSwitch") && $.e.add($("userSwitch"), "click",
function(h) {
pt.showOneKey.ever && pt.showOneKey();
pt.qqBrowserInfo = null;
if (pt.open.authListDone) {
xMsg.call("connect", "userSwitch", {},
function() {});
pt.cancle_cookielogin()
}
})
},
0)
}
},
_switch: function() {
if ($("q_login").style.display == "none") {
$("q_login").style.display = "block";
$("web_login").style.display = "none";
$("swicth_login") && ($("swicth_login").innerHTML = $.str.encodeHtml(qlogin_wording));
pt.hideURLBar()
} else {
$("q_login").style.display = "none";
$("web_login").style.display = "block";
$("swicth_login") && ($("swicth_login").innerHTML = $.str.encodeHtml(login_wording));
$("u").focus()
}
if (pt.isInIframe) {
window.setTimeout(function() {
pt.ptui_notifySize("content")
},
0)
}
},
vcodeMessage: function(e) {
var origin = e.origin;
if (origin != (pt.isHttps ? "https://ssl.": "http://") + "captcha.qq.com") {
$.report.nlog("origin postMessage error:" + origin);
return
}
var data = e.data;
if (window.JSON) {
data = JSON.parse(data)
} else {
data = eval("(" + data + ")")
}
if (!data.randstr || !data.sig) {
$.report.nlog("vcode postMessage error:" + e.data)
}
pt.submitNewVcode(data)
},
submitEvent: function(a) {
if (!navigator.onLine) {
pt.showErr(STR_LANG.offline)
} else {
pt._timer = setTimeout(function() {
pt.showErr(STR_LANG.offline)
},
3000)
}
if (pt.isHulian) {
pt.open.getAuthData()
} else {
pt.check(false)
}
},
showOneKey: function() {
$("go").className += " weak";
$("onekey") && $.css.show($("onekey"));
$.report.monitor(414089);
pt.showOneKey.ever = true;
if (pt.isInIframe) {
window.setTimeout(function() {
pt.ptui_notifySize("content")
},
0)
}
},
hideOneKey: function() {
$("go").className = $("go").className.replace("weak", "");
$("onekey") && $.css.hide($("onekey"));
if (pt.isInIframe) {
window.setTimeout(function() {
pt.ptui_notifySize("content")
},
0)
}
},
bindEvent: function() {
$.e.add($("go"), pt.clickEvent, pt.submitEvent);
$.e.add($("p"), "keydown",
function(d) {
var c = d.keyCode;
if (c == 13) {
pt.submitEvent()
}
});
$.e.add($("u"), "keydown",
function(d) {
var c = d.keyCode;
if (c == 13) {
pt.check(false)
}
});
var a = navigator.userAgent.toLowerCase(),
b = a.match(/micromessenger|qq\/|meizu_m9|IEMobile/i);
if (!b && $("onekey")) {
if (pt.isHulian) {
pt.open.waiting("authlist",
function() {
MTT.canOneKey(function() {
pt.showOneKey()
},
function() {
pt.hideOneKey()
})
})
} else {
if (self === top && x5.MTTVersion) {
MTT.canOneKey(function() {
pt.showOneKey()
},
function() {
pt.hideOneKey()
})
} else {
pt.showOneKey()
}
}
$.e.add($("onekey"), pt.clickEvent,
function(f) {
var d = (pt.isHttps ? "https://ssl.": "http://") + "ptlogin2." + pt.domain + "/jump?u1=" + encodeURIComponent(pt.s_url) + "&pt_report=1";
if (window.ptui_pt_ttype == "1") {
d += "&pt_ttype=1"
}
if (window.ptui_daid) {
d += ("&daid=" + ptui_daid)
}
if (pt.low_login_enable) {
d += "&low_login_enable=1&low_login_hour=" + window.ptui_low_login_hour
}
var c = $.detectBrowser()[0];
if (c) {
d += "&pt_ua=" + $.Encryption.md5(a);
d += "&pt_browser=" + c
}
$.report.monitor(414090);
if (pt.isHulian) {
pt.open.waiting("authdata",
function() {
if (window.ptui_pt_3rd_aid) {
d += "&pt_3rd_aid=" + window.ptui_pt_3rd_aid
}
if (pt.submit_o.openlogin_data) {
d += "&pt_openlogin_data=" + pt.submit_o.openlogin_data
}
OneKey("wtloginmqq://ptlogin/qlogin?p=" + encodeURIComponent(d))
})
} else {
OneKey("wtloginmqq://ptlogin/qlogin?p=" + encodeURIComponent(d))
}
})
} else {
pt.hideOneKey()
}
$("show_pwd") && $.e.add($("show_pwd"), "change",
function(d) {
var c = $("p");
if (this.checked) {
c.setAttribute("type", "text")
} else {
c.setAttribute("type", "password")
}
});
$("forgetpwd") && $.e.add($("forgetpwd"), pt.clickEvent,
function(f) {
var d = $("u") && $("u").value;
var c = "http://ptlogin2.qq.com/j_findpwd_url?ptlang=" + pt.lang_num;
if (pt.lang_num != "1033") {
c += "&account=" + d
}
window.open(c)
});
$.e.add(window, "orientationchange",
function(c) {
pt.hideURLBar(c)
});
$.e.add(window, "message",
function(c) {
if (c.data && c.origin && c.data.toLowerCase().indexOf("x-msg://") == 0 && c.origin == "http://openmobile.qq.com") {
return
}
pt.vcodeMessage(c)
})
},
bindInput: function() {
var d = pt.getLastUin();
var a = $("u");
if (d) {
a.value = a.value || d
}
var c = function() {
if (a.value != "") {
$.css.show("del_u")
} else {
$.css.hide("del_u")
}
};
var b = function() {
var f = $("p");
if (f.value != "") {
$.css.show("del_p")
} else {
$.css.hide("del_p")
}
var e = 0;
if (f.selectionStart || f.selectionStart == "0") {
e = Math.max(f.selectionStart, f.selectionEnd)
}
if (window.openSDK && window.openSDK.curPosFromJS) {
window.openSDK.curPosFromJS(e)
}
};
$.e.add($("p"), "focus",
function(f) {
if (this.value != "") {
$.css.show("del_p")
}
if (window.openSDK && window.openSDK.isPasswordEdit) {
window.openSDK.isPasswordEdit(1)
}
});
$.e.add($("p"), "blur",
function(f) {
if (this.value == "") {
$.css.hide("del_p")
}
if (window.openSDK && window.openSDK.isPasswordEdit) {
window.openSDK.isPasswordEdit(0)
}
});
$.e.add($("p"), "input",
function(f) {
window.setTimeout(function() {
b()
},
0)
});
$.e.add($("u"), "focus",
function(f) {
if (this.value != "") {
$.css.show("del_u")
}
});
$.e.add($("u"), "blur",
function(f) {
if (this.value == "") {
$.css.hide("del_u")
} else {
pt.checkQQUin(this.value)
}
});
$.e.add($("u"), "input",
function(f) {
c()
});
$("del_touch") && $.e.add($("del_touch"), "click",
function(f) {
f && f.preventDefault();
$("u").value = "";
$("u").focus();
$.css.hide("del_u")
});
$("del_touch_p") && $.e.add($("del_touch_p"), "click",
function(f) {
f && f.preventDefault();
$("p").value = "";
$("p").focus();
$.css.hide("del_p")
});
if (pt.isHulian) {
$("del_u") && $.e.add($("del_u"), "click",
function(f) {
f && f.preventDefault();
$("u").value = "";
$("u").focus();
$.css.hide("del_u")
});
$("del_p") && $.e.add($("del_p"), "click",
function(f) {
f && f.preventDefault();
$("p").value = "";
if (window.openSDK && window.openSDK.clearAllEdit) {
window.openSDK.clearAllEdit()
}
window.setTimeout(function() {
$("p").focus()
},
100);
$.css.hide("del_p")
})
}
},
bindVcodeEvent: function() {
$("input_tips") && $.e.add($("input_tips"), "click",
function(a) {
$("vcode_input").focus();
$.css.hide("input_tips");
a.stopPropagation()
});
$("vcode_input") && $.e.add($("vcode_input"), "focus",
function(a) {
$.css.hide("input_tips");
a.stopPropagation()
});
$("vcode_input") && $.e.add($("vcode_input"), "blur",
function(a) {
if (this.value == "") {
$.css.show("input_tips")
}
});
$("vcode_img") && $.e.add($("vcode_img"), "click",
function(a) {
$("vcode_input").focus();
$.css.hide("input_tips");
pt.changeCodeImg();
a.stopPropagation()
});
$("submit") && $.e.add($("submit"), "click",
function(a) {
pt.submitVcode()
})
},
hideURLBar: function() {
setTimeout(function() {
window.scrollTo(0, 1)
},
0)
},
addToSet: function(d, e) {
if (!e) {} else {
var f = e.uin;
var b = true;
for (var a = 0,
c = d.length; a < c; a++) {
if (d[a]["uin"] == f) {
b = false
}
}
if (b) {
d.push(e)
}
}
},
get_qlogin_list: function() {
var a = [];
if (pt.isHulian) {
if (pt.cookieInfo) {
pt.addToSet(a, pt.cookieInfo)
}
} else {
if (pt.authInfo) {
pt.addToSet(a, pt.authInfo)
}
}
if (pt.qqBrowserInfo) {
pt.addToSet(a, pt.qqBrowserInfo)
}
return a
},
qlogin_submit: function() {
$.report.monitor(259519);
var b = pt.qqBrowserInfo.uin;
var d = pt.qqBrowserInfo.loginkey;
var a = encodeURIComponent(pt.s_url);
var c = (pt.isHttps ? "https://ssl.": "http://") + "ptlogin2." + pt.domain + "/jump?keyindex=" + pt.keyindex + "&clientuin=" + b + "&clientkey=" + d + "&u1=" + a + "&daid=" + window.ptui_daid;
if (window.ptui_pt_qzone_sig == "1") {
c += "&pt_qzone_sig=1"
}
if (window.ptui_pt_ttype == "1") {
c += "&pt_ttype=1"
}
if (window.ptui_pt_light == "1") {
c += "&pt_light=1"
}
if (pt.low_login_enable) {
c += "&low_login_enable=1&low_login_hour=" + window.ptui_low_login_hour
}
if (window.ptui_pt_3rd_aid) {
c += "&pt_3rd_aid=" + window.ptui_pt_3rd_aid
}
if (pt.submit_o.openlogin_data) {
c += "&pt_openlogin_data=" + pt.submit_o.openlogin_data
}
if (window.ptui_kf_csimc != "0" && window.ptui_kf_csimc) {
c += "&csimc=" + ptui_kf_csimc;
c += "&csnum=" + ptui_kf_csnum;
c += "&authid=" + ptui_kf_authid
}
c += "&device=" + pt.deviceType;
c += "&ptopt=1";
$.http.loadScript(c)
},
cookielogin_submit: function() {
var c = pt.cookieInfo.uin;
var a = pt.cookieInfo.skey;
var b = $.str.hash33(a);
pt.submit_o.skey_token = b;
pt.submit("open")
},
cancle_cookielogin: function() {
$.css.show($("form_outter_wrap"));
$.css.hide($("q_logon_list"));
pt.cookieLogin = false;
delete pt.submit_o.skey_token;
$("u").value = ""
},
authlogin_submit: function() {
var a = pt.authLoginUrl;
a += "®master=" + window.ptui_regmaster + "&aid=" + window.ptui_appid + "&s_url=" + encodeURIComponent(pt.s_url);
if (pt.low_login_enable) {
a += "&low_login_enable=1&low_login_hour=" + window.ptui_low_login_hour
}
if (window.ptui_pt_ttype == "1") {
a += "&pt_ttype=1"
}
if (window.ptui_pt_light == "1") {
a += "&pt_light=1"
}
a += "&device=" + pt.deviceType;
pt.redirect(pt.target, a)
},
submit: function(g) {
var d = "";
var e = "";
if (pt.is_qlogin) {
d = pt.login_uin
} else {
d = pt.needAt ? pt.needAt: $("u").value;
e = $("p").value;
pt.login_uin = d
}
if (g) {
pt.submit_o.pt_vcode_v1 = 0;
pt.submit_o.pt_verifysession_v1 = pt.verifysession
}
pt.submit_o.verifycode = pt.vcode.toUpperCase();
pt.submit_o.u = d;
var e = "";
var b = false;
if (window.openSDK && openSDK.md5Pwd && openSDK.result == 0) {
e = openSDK.md5Pwd;
b = true
} else {
e = $("p").value;
b = false
}
pt.submit_o.p = $.Encryption.getEncryption(e, pt.salt, pt.submit_o.verifycode, b);
pt.submit_o.pt_randsalt = pt.isRandSalt || 0;
pt.submit_o.ptlang = pt.lang_num;
pt.submit_o.low_login_enable = (pt.low_login_enable == 1) ? 1 : 0;
if (pt.submit_o.low_login_enable) {
pt.submit_o.low_login_hour = window.ptui_low_login_hour
}
pt.submit_o.u1 = encodeURIComponent(pt.s_url);
pt.submit_o.from_ui = 1;
pt.submit_o.fp = "loginerroralert";
pt.submit_o.device = pt.deviceType;
pt.submit_o.aid = pt.appid;
if (window.ptui_daid) {
pt.submit_o.daid = window.ptui_daid
}
if (window.ptui_pt_qzone_sig == "1") {
pt.submit_o.pt_qzone_sig = 1
}
if (window.ptui_pt_ttype == "1") {
pt.submit_o.pt_ttype = "1"
}
if (window.ptui_pt_light == "1") {
pt.submit_o.pt_light = "1"
}
if (window.ptui_pt_3rd_aid) {
pt.submit_o.pt_3rd_aid = window.ptui_pt_3rd_aid
}
pt.submit_o.ptredirect = pt.target;
pt.submit_o.h = 1;
pt.submit_o.g = 1;
pt.submit_o.pt_uistyle = window.ptui_style;
if (window.ptui_kf_csimc != "0" && window.ptui_kf_csimc) {
pt.submit_o.csimc = ptui_kf_csimc;
pt.submit_o.csnum = ptui_kf_csnum;
pt.submit_o.authid = ptui_kf_authid
}
var f = pt.object2param(pt.submit_o);
if (!g) {
pt.showVcode();
pt.isSubmiting = false
} else {
var a = pt.isHulian ? "pt_open_login": "login";
var c = (pt.isHttps ? "https://ssl.": "http://") + "ptlogin2." + pt.domain + "/" + a + "?" + f;
$.http.loadScript(c)
}
return false
},
cb: function(d, b, c, g, e, a) {
if (d == 0) {
var f = $("u").value;
pt.saveLastUin(f);
if (c.indexOf("/cgi-bin/mibao_vry") > -1) {
c += "&style=" + pt.style
}
pt.redirect(g, c)
} else {
if (d == 4) {
pt.changeCodeImg()
} else {
pt.go_back()
}
pt.showErr(e)
}
pt.isSubmiting = false
},
cb_checkVC: function(a, d, b, e, c) {
switch (a + "") {
case "0":
pt.vcode = d || "abcd";
pt.verifysession = e;
break;
case "1":
pt.vcode = "";
pt.cap_cd = d;
break;
case "2":
case "3":
break;
default:
break
}
if (a == 2) {
pt.showErr(pt.lang.err_uin);
return
}
if (a == 3) {
pt.showErr(pt.checkErr[ptui_lang]);
return
}
pt.salt = b;
pt.isRandSalt = c;
pt.submit(pt.vcode)
},
check: function(a) {
if (pt.isSubmiting) {
return
}
pt.is_qlogin = a;
if (!pt.is_qlogin) {
if (!pt.checkValidate()) {
clearTimeout(pt._timer);
return
}
}
var c = "";
if (a) {
c = pt.login_uin
} else {
c = pt.needAt ? pt.needAt: $("u").value
}
var b = (pt.isHttps ? "https://ssl.": "http://check.") + "ptlogin2." + pt.domain + "/check?";
b += "pt_tea=1&uin=" + c + "&appid=" + pt.appid + "&ptlang=" + pt.lang_num + "&r=" + Math.random();
$.http.loadScript(b);
return
},
checkValidate: function() {
var a = $("u");
var b = $("p");
if (a.value == "") {
pt.showErr(pt.lang.no_uin,
function() {
a.focus()
});
return false
}
if (!pt.checkQQUin(a.value)) {
pt.showErr(pt.lang.err_uin,
function() {
a.focus()
});
return false
}
a.value = $.str.trim(a.value);
if (b.value == "") {
pt.showErr(pt.lang.no_password,
function() {
b.focus()
});
return false
}
return true
},
checkQQUin: function(a) {
if (a.length == 0) {
return false
}
a = $.str.trim(a);
pt.needAt = "";
var b = $.check;
if (pt.appid == pt.t_appid) {
if (b.isQQ(a) || b.isMail(a)) {
return true
} else {
if (b.isNick(a) || b.isName(a)) {
pt.needAt = "@" + encodeURIComponent(a);
return true
} else {
if (b.isPhone(a)) {
pt.needAt = "@" + a.replace(/^(86|886)/, "");
return true
} else {
if (b.isSeaPhone(a)) {
pt.needAt = "@00" + a.replace(/^(00)/, "");
if (/^(@0088609)/.test(pt.needAt)) {
pt.needAt = pt.needAt.replace(/^(@0088609)/, "@008869")
}
return true
}
}
}
}
pt.needAt = ""
} else {
if (b.isQQ(a) || b.isMail(a)) {
return true
}
if (b.isNick(a)) {
$("u").value = a + "@qq.com";
return true
}
if (b.isPhone(a)) {
pt.needAt = "@" + a.replace(/^(86|886)/, "");
return true
}
}
if (b.isForeignPhone(a)) {
pt.needAt = "@" + a;
return true
}
if (b.isPaipaiDuokefu(a)) {
return true
}
return false
},
checkVcode: function() {
var a = $("vcode_input");
if (a.value == "") {
pt.showErr(pt.lang.no_code);
a.focus();
return false
}
if (a.value.length < 4) {
pt.showErr(pt.lang.less_code);
a.focus();
a.select();
return false
}
if (! (/^[a-zA-Z0-9]+$/.test(a.value))) {
pt.showErr(pt.lang.err_code);
a.focus();
a.select();
return false
}
return true
},
clickHeader: function(e) {
e.preventDefault();
var d = e.target;
var a = d.parentNode;
var c = a.getAttribute("id");
var b = a.getAttribute("type");
pt.login_uin = c;
pt.login_pwd = a.getAttribute("pwd");
switch (b + "") {
case "1":
pt.check(true);
break;
case "2":
pt.qlogin_submit();
break;
case "3":
pt.authlogin_submit();
break;
default:
pt.check(true)
}
},
setHeader: function(a) {
for (var b in a) {
if (a[b].url != "" && b != "") {
if ($("img_" + b)) {
$("img_" + b).src = a[b]
}
}
}
pt.hideURLBar()
},
initFace: function() {
var c = pt.qlogin_list_data;
var b = c.length;
for (var a = 0; a < b; a++) {
$.http.loadScript("http://ptlogin2." + pt.domain + "/getface?appid=" + pt.appid + "&imgtype=3&encrytype=0&devtype=1&keytpye=0&uin=" + c[a].uin + "&r=" + Math.random())
}
},
face_error: function(a) {
if (a.src != pt.default_face_url) {
a.src = pt.default_face_url
}
return false
},
getShortWord: function(d, h, a) {
h = h ? h: "";
var f = "...";
d.innerHTML = h;
if (d.clientWidth <= a) {} else {
var g = h.length;
var c = Math.ceil(g / 2);
for (var e = 0; e < c; e++) {
var b = h.substring(0, c - e);
var j = h.substring(c + e, g);
d.innerHTML = b + f + j;
if (d.clientWidth <= a) {
d.title = h;
break
}
var j = h.substring(c + e + 1, g);
d.innerHTML = b + f + j;
if (d.clientWidth <= a) {
d.title = h;
break
}
}
}
d.style.width = a + "px"
},
changeCodeImg: function() {
if (pt.new_vcode) {
var c = (pt.isHttps ? "https://ssl.": "http://") + "captcha.qq.com/cap_union_show?captype=3";
c += ("&aid=" + pt.appid + "&uin=" + pt.login_uin + "&cap_cd=" + pt.cap_cd + "&v=" + Math.random());
$("cap_iframe").src = c
} else {
var b = $("vcode_img");
var d = pt.domain;
var a = (pt.isHttps ? "https://ssl.": "http://") + "captcha." + d + "/getimage";
if (pt.isHttps && d != "qq.com" && d != "tenpay.com") {
a = "https://ssl.ptlogin2." + d + "/ptgetimage"
}
a += ("?aid=" + pt.appid + "&uin=" + pt.login_uin + "&v=" + Math.random());
b.src = a
}
},
showVcode: function() {
if (pt.new_vcode) {
$("content").style.display = "none";
$("new_vcode").style.display = "block";
var a = (pt.isHttps ? "https://ssl.": "http://") + "captcha.qq.com/cap_union_show?captype=3";
a += ("&lang=" + pt.lang_num + "&aid=" + pt.appid + "&uin=" + pt.login_uin + "&cap_cd=" + pt.cap_cd + "&v=" + Math.random());
$("cap_iframe").src = a;
pt.ptui_notifySize()
} else {
$("login").style.display = "none";
$("vcode").style.display = "block";
pt.bindVcodeEvent();
pt.changeCodeImg()
}
pt.hideURLBar();
$("btn_app_down") && $.css.hide("btn_app_down")
},
go_back: function() {
$("content") && ($("content").style.display = "block");
$("login") && ($("login").style.display = "block");
$("vcode") && ($("vcode").style.display = "none");
$("new_vcode") && ($("new_vcode").style.display = "none")
},
submitVcode: function() {
if (pt.isSubmiting) {
return
}
if (!pt.checkVcode()) {
return false
}
pt.submit_o.verifycode = $("vcode_input").value.toUpperCase();
var d = "";
var b = false;
if (window.openSDK && openSDK.md5Pwd && openSDK.result == 0) {
d = openSDK.md5Pwd;
b = true
} else {
d = $("p").value;
b = false
}
pt.submit_o.p = $.Encryption.getEncryption(d, pt.salt, pt.submit_o.verifycode, b);
pt.submit_o.pt_randsalt = pt.isRandSalt || 0;
var e = pt.object2param(pt.submit_o);
var a = pt.isHulian ? "pt_open_login": "login";
var c = (pt.isHttps ? "https://ssl.": "http://") + "ptlogin2." + pt.domain + "/" + a + "?" + e;
$.http.loadScript(c)
},
submitNewVcode: function(d) {
pt.submit_o.verifycode = d.randstr.toUpperCase();
pt.submit_o.pt_vcode_v1 = 1;
pt.submit_o.pt_verifysession_v1 = d.sig;
var e = "";
var b = false;
if (window.openSDK && openSDK.md5Pwd && openSDK.result == 0) {
e = openSDK.md5Pwd;
b = true
} else {
e = $("p").value;
b = false
}
pt.submit_o.p = $.Encryption.getEncryption(e, pt.salt, pt.submit_o.verifycode, b);
pt.submit_o.pt_randsalt = pt.isRandSalt || 0;
if (window.ptui_kf_csimc != "0" && window.ptui_kf_csimc) {
pt.submit_o.csimc = ptui_kf_csimc;
pt.submit_o.csnum = ptui_kf_csnum;
pt.submit_o.authid = ptui_kf_authid
}
var f = pt.object2param(pt.submit_o);
var a = pt.isHulian ? "pt_open_login": "login";
var c = (pt.isHttps ? "https://ssl.": "http://") + "ptlogin2." + pt.domain + "/" + a + "?" + f;
$.http.loadScript(c)
},
open: {
timer: -1,
authListDone: false,
waiting: function(b, a) {
if (!a) {
return
}
switch (b) {
case "authlist":
if (pt.open.authListDone) {
a()
} else {
pt.open.waiting.authlistFn = a
}
break;
case "authdata":
if (pt.submit_o.openlogin_data) {
a()
} else {
pt.open.getAuthData();
pt.open.waiting.authdataFn = a
}
break
}
},
authListReady: function(a) {
pt.open.authListDone = true;
if (pt.open.waiting.authlistFn) {
pt.open.waiting.authlistFn();
pt.open.waiting.authlistFn = null
}
var b = a.skey;
if (b == 0) {
$.cookie.del("skey", "qq.com");
$.cookie.del("uin", "qq.com")
}
if (b == 1 || pt.qqBrowserInfo) {
pt.build_hulian_qlogin_list(a);
pt.initFace()
}
},
setFrameHeight: function(a) {},
getData: function(a) {
clearTimeout(pt.open.timer);
pt.submit_o.openlogin_data = encodeURIComponent(a.value);
if (pt.open.waiting.authdataFn) {
pt.open.waiting.authdataFn();
pt.open.waiting.authdataFn = null;
return
}
if (pt.cookieLogin) {
pt.cookielogin_submit()
} else {
if (pt.qqBrowserInfo) {
pt.qlogin_submit()
} else {
if (window.openSDK && openSDK.getMD5FromNative) {
openSDK.getMD5FromNative(function() {
pt.check(false)
})
} else {
pt.check(false)
}
}
}
},
getAuthData: function() {
if (!pt.open.authListDone) {
pt.showErr("授权列表加载失败")
}
pt.open.timer = setTimeout(function() {
pt.showErr("授权信息获取失败")
},
3000);
pt.open.authListDone && xMsg.call("connect", "getData", {},
pt.open.getData)
}
},
crossMessage: function(b) {
if (typeof window.postMessage != "undefined") {
var a = $.str.json2str(b);
window.parent.postMessage(a, "*")
}
},
ptui_notifyClose: function(a) {
a && a.preventDefault();
var b = {};
b.action = "close";
pt.crossMessage(b)
},
ptui_notifySize: function(c) {
var a = {};
a.action = "resize";
if (c) {
var b = $(c);
a.width = b.offsetWidth || 1;
a.height = b.offsetHeight || 1
} else {
a.width = 320;
a.height = 441
}
pt.crossMessage(a)
}
};
pt.auth();
function ptui_checkVC(a, d, b, e, c) {
clearTimeout(pt._timer);
pt.cb_checkVC(a, d, b, e, c)
}
function ptui_changeImg() {}
function ptuiCB(d, b, c, f, e, a) {
clearTimeout(pt._timer);
pt.cb(d, b, c, f, e, a)
}
function imgLoadReport() {}
function ptui_checkValidate() {
return pt.checkValidate()
}
function ptui_auth_CB(c, b) {
switch (parseInt(c)) {
case 0:
pt.showAuth(b);
pt.qqBrowserQlogin();
break;
case 1:
pt.qqBrowserQlogin();
break;
case 2:
var a = b + "®master=" + window.ptui_regmaster + "&aid=" + window.ptui_appid + "&s_url=" + encodeURIComponent(pt.s_url);
if (pt.low_login_enable == 1) {
a += "&low_login_enable=1&low_login_hour=" + window.ptui_low_login_hour
}
if (window.ptui_pt_ttype == "1") {
a += "&pt_ttype=1"
}
if (window.ptui_pt_light == "1") {
a += "&pt_light=1"
}
pt.redirect(pt.target, a);
break;
default:
pt.qqBrowserQlogin()
}
}
function ptui_qlogin_CB(b, a, c) {
switch (b + "") {
case "0":
pt.redirect(pt.target, a);
break;
default:
$.report.nlog("qq浏览器快速登录失败," + b, "443881");
pt.showErr(c)
}
}
OneKey.ERRMSG = {
"2052": "使用一键登录,<a href='http://im.qq.com/mobileqq/touch/53/index.html' target='_blank'>请安装最新版本的手机QQ</a>",
"1028": "使用一鍵登錄,<a href='http://im.qq.com/mobileqq/touch/53/index.html' target='_blank'>請安裝最新版本的手機QQ</a>",
"1033": "Have <a href='http://im.qq.com/mobileqq/touch/53/index.html' target='_blank'>the latest Mobile QQ</a>?"
};
function OneKey(a) {
OneKey.done = false;
OneKey.TIMEOUT = 3000;
setTimeout(function() {
openApp(a)
},
100)
}
function openApp(o, d, k) {
if (OneKey.done) {
return
}
if (pt.isLaunching) {
return
}
var h = $("onekey");
h.innerHTML = STR_LANG.onekeying;
pt.isLaunching = true;
var n = OneKey.TIMEOUT;
var a = navigator.userAgent;
if (/android/i.test(a)) {
var l = $.detectBrowser();
var g = l[0];
var f = l[1] || "location";
if (g) {
var m = g.toLowerCase();
var e = {
ucbrowser: "ucweb"
};
if (e[m]) {
o += "&schemacallback=" + encodeURIComponent(e[m] + "://")
}
}
switch (f) {
case "iframe":
if (openApp.iframe) {
openApp.iframe.src = o
} else {
openApp.iframe = document.createElement("iframe");
openApp.iframe.src = o;
openApp.iframe.style.display = "none";
document.body.appendChild(openApp.iframe)
}
openApp.flag = "iframe";
break;
case "open":
var j = window.open(o, "_blank");
setTimeout(function() {
j.close()
},
0);
openApp.flag = "open";
break;
case "location":
location.href = o;
openApp.flag = "location";
break
}
} else {
var l = $.detectBrowser();
var g = l[0];
if (g && g.toLowerCase() == "ucbrowser") {
o += "&schemacallback=" + encodeURIComponent("ucbrowser://")
} else {
if (g && g.toLowerCase() == "chrome") {
o += "&schemacallback=" + encodeURIComponent(pt.isHttps ? "googlechromes://": "googlechrome://");
o = o.replace(/https?%3A%2F%2F/i, "")
}
}
location.href = o;
openApp.flag = "location"
}
var c = new Date();
window.setTimeout(function() {
d && d();
pt.isLaunching = false;
h.innerHTML = STR_LANG.onekey;
if (new Date() - c > n + 200) {
return
} else {
k && k();
pt.showErr(OneKey.ERRMSG[ptui_lang], 5000);
$.report.nlog("callApp failed:" + navigator.userAgent, 424783)
}
},
n)
}
var openSDK = (function() {
var g = "";
var a = 0;
var h = 0;
var d = [];
var c = function(k, j) {
h = 1;
if (typeof j == "function") {
d[h] = j
}
window.location.href = "jsbridge://SecureJsInterface/curPosFromJS/" + h + "/openSDKCallBack/" + k
};
var f = function(j, k) {
h = 2;
if (typeof k == "function") {
d[h] = k
}
window.location.href = "jsbridge://SecureJsInterface/isPasswordEdit/" + h + "/openSDKCallBack/" + j
};
var e = function(j) {
h = 3;
if (typeof j == "function") {
d[h] = j
}
window.location.href = "jsbridge://SecureJsInterface/clearAllEdit/" + h + "/openSDKCallBack"
};
var b = function(j) {
h = 4;
if (typeof j == "function") {
d[h] = j
}
window.location.href = "jsbridge://SecureJsInterface/getMD5FromNative/" + h + "/openSDKCallBack"
};
if (window.ptui_enablePwd == "1") {
return {
curPosFromJS: c,
isPasswordEdit: f,
clearAllEdit: e,
getMD5FromNative: b,
sn: h,
md5Pwd: g,
result: a,
callbackArray: d
}
}
})();
function openSDKCallBack(b) {
var a = b.result;
var c = b.data;
var d = b.sn;
switch (d) {
case 4:
openSDK.md5Pwd = c;
openSDK.result = a;
openSDK.callbackArray[d].call();
break;
default:
break
}
};
QQ空间触屏登录加密JS
最新推荐文章于 2024-01-13 18:29:13 发布