4879 lines
170 KiB
JavaScript
Executable File
4879 lines
170 KiB
JavaScript
Executable File
!
|
||
function(t) {
|
||
function e(r) {
|
||
if (n[r]) return n[r].exports;
|
||
var i = n[r] = {
|
||
i: r,
|
||
l: !1,
|
||
exports: {}
|
||
};
|
||
return t[r].call(i.exports, i, i.exports, e),
|
||
i.l = !0,
|
||
i.exports
|
||
}
|
||
var n = {};
|
||
e.m = t,
|
||
e.c = n,
|
||
e.d = function(t, n, r) {
|
||
e.o(t, n) || Object.defineProperty(t, n, {
|
||
configurable: !1,
|
||
enumerable: !0,
|
||
get: r
|
||
})
|
||
},
|
||
e.n = function(t) {
|
||
var n = t && t.__esModule ?
|
||
function() {
|
||
return t.
|
||
default
|
||
}:
|
||
function() {
|
||
return t
|
||
};
|
||
return e.d(n, "a", n),
|
||
n
|
||
},
|
||
e.o = function(t, e) {
|
||
return Object.prototype.hasOwnProperty.call(t, e)
|
||
},
|
||
e.p = "//wq.360buyimg.com/wxsq_project/portal/m_jd_index/",
|
||
e(e.s = 43)
|
||
} ([function(t, e) {
|
||
var n = t.exports = "undefined" != typeof window && window.Math == Math ? window: "undefined" != typeof self && self.Math == Math ? self: Function("return this")();
|
||
"number" == typeof __g && (__g = n)
|
||
},
|
||
function(t, e) {
|
||
var n = t.exports = {
|
||
version: "2.5.7"
|
||
};
|
||
"number" == typeof __e && (__e = n)
|
||
},
|
||
function(t, e) {
|
||
var n = {}.hasOwnProperty;
|
||
t.exports = function(t, e) {
|
||
return n.call(t, e)
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(4),
|
||
i = n(13);
|
||
t.exports = n(5) ?
|
||
function(t, e, n) {
|
||
return r.f(t, e, i(1, n))
|
||
}: function(t, e, n) {
|
||
return t[e] = n,
|
||
t
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(12),
|
||
i = n(31),
|
||
o = n(19),
|
||
a = Object.defineProperty;
|
||
e.f = n(5) ? Object.defineProperty: function(t, e, n) {
|
||
if (r(t), e = o(e, !0), r(n), i) try {
|
||
return a(t, e, n)
|
||
} catch(t) {}
|
||
if ("get" in n || "set" in n) throw TypeError("Accessors not supported!");
|
||
return "value" in n && (t[e] = n.value),
|
||
t
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
t.exports = !n(9)(function() {
|
||
return 7 != Object.defineProperty({},
|
||
"a", {
|
||
get: function() {
|
||
return 7
|
||
}
|
||
}).a
|
||
})
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(53),
|
||
i = n(17);
|
||
t.exports = function(t) {
|
||
return r(i(t))
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(23)("wks"),
|
||
i = n(14),
|
||
o = n(0).Symbol,
|
||
a = "function" == typeof o; (t.exports = function(t) {
|
||
return r[t] || (r[t] = a && o[t] || (a ? o: i)("Symbol." + t))
|
||
}).store = r
|
||
},
|
||
function(t, e) {
|
||
t.exports = function(t) {
|
||
return "object" == typeof t ? null !== t: "function" == typeof t
|
||
}
|
||
},
|
||
function(t, e) {
|
||
t.exports = function(t) {
|
||
try {
|
||
return !! t()
|
||
} catch(t) {
|
||
return ! 0
|
||
}
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
"use strict";
|
||
function r(t) {
|
||
return t && t.__esModule ? t: {
|
||
default:
|
||
t
|
||
}
|
||
}
|
||
e.__esModule = !0;
|
||
var i = n(45),
|
||
o = r(i),
|
||
a = n(62),
|
||
s = r(a),
|
||
c = "function" == typeof s.
|
||
default && "symbol" == typeof o.
|
||
default ?
|
||
function(t) {
|
||
return typeof t
|
||
}: function(t) {
|
||
return t && "function" == typeof s.
|
||
default && t.constructor === s.
|
||
default && t !== s.
|
||
default.prototype ? "symbol": typeof t
|
||
};
|
||
e.
|
||
default = "function" == typeof s.
|
||
default && "symbol" === c(o.
|
||
default) ?
|
||
function(t) {
|
||
return void 0 === t ? "undefined": c(t)
|
||
}: function(t) {
|
||
return t && "function" == typeof s.
|
||
default && t.constructor === s.
|
||
default && t !== s.
|
||
default.prototype ? "symbol": void 0 === t ? "undefined": c(t)
|
||
}
|
||
},
|
||
function(t, e) {
|
||
t.exports = !0
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(8);
|
||
t.exports = function(t) {
|
||
if (!r(t)) throw TypeError(t + " is not an object!");
|
||
return t
|
||
}
|
||
},
|
||
function(t, e) {
|
||
t.exports = function(t, e) {
|
||
return {
|
||
enumerable: !(1 & t),
|
||
configurable: !(2 & t),
|
||
writable: !(4 & t),
|
||
value: e
|
||
}
|
||
}
|
||
},
|
||
function(t, e) {
|
||
var n = 0,
|
||
r = Math.random();
|
||
t.exports = function(t) {
|
||
return "Symbol(".concat(void 0 === t ? "": t, ")_", (++n + r).toString(36))
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
"use strict";
|
||
function r(t) {
|
||
return t && t.__esModule ? t: {
|
||
default:
|
||
t
|
||
}
|
||
}
|
||
var i = n(10),
|
||
o = r(i),
|
||
a = n(41),
|
||
s = r(a),
|
||
c = function() {
|
||
function t(t) {
|
||
return null == t ? String(t) : Y[K.call(t)] || "object"
|
||
}
|
||
function e(e) {
|
||
return "function" == t(e)
|
||
}
|
||
function n(t) {
|
||
return null != t && t == t.window
|
||
}
|
||
function r(t) {
|
||
return null != t && t.nodeType == t.DOCUMENT_NODE
|
||
}
|
||
function i(e) {
|
||
return "object" == t(e)
|
||
}
|
||
function a(t) {
|
||
return i(t) && !n(t) && (0, s.
|
||
default)(t) == Object.prototype
|
||
}
|
||
function c(t) {
|
||
var e = !!t && "length" in t && t.length,
|
||
r = S.type(t);
|
||
return "function" != r && !n(t) && ("array" == r || 0 === e || "number" == typeof e && e > 0 && e - 1 in t)
|
||
}
|
||
function u(t) {
|
||
return M.call(t,
|
||
function(t) {
|
||
return null != t
|
||
})
|
||
}
|
||
function l(t) {
|
||
return t.length > 0 ? S.fn.concat.apply([], t) : t
|
||
}
|
||
function f(t) {
|
||
return t.replace(/::/g, "/").replace(/([A-Z]+)([A-Z][a-z])/g, "$1_$2").replace(/([a-z\d])([A-Z])/g, "$1_$2").replace(/_/g, "-").toLowerCase()
|
||
}
|
||
function p(t) {
|
||
return t in N ? N[t] : N[t] = new RegExp("(^|\\s)" + t + "(\\s|$)")
|
||
}
|
||
function h(t, e) {
|
||
return "number" != typeof e || F[f(t)] ? e: e + "px"
|
||
}
|
||
function d(t) {
|
||
var e, n;
|
||
return L[t] || (e = A.createElement(t), A.body.appendChild(e), n = getComputedStyle(e, "").getPropertyValue("display"), e.parentNode.removeChild(e), "none" == n && (n = "block"), L[t] = n),
|
||
L[t]
|
||
}
|
||
function m(t) {
|
||
return "children" in t ? P.call(t.children) : S.map(t.childNodes,
|
||
function(t) {
|
||
if (1 == t.nodeType) return t
|
||
})
|
||
}
|
||
function v(t, e) {
|
||
var n, r = t ? t.length: 0;
|
||
for (n = 0; n < r; n++) this[n] = t[n];
|
||
this.length = r,
|
||
this.selector = e || ""
|
||
}
|
||
function g(t, e, n) {
|
||
for (k in e) n && (a(e[k]) || et(e[k])) ? (a(e[k]) && !a(t[k]) && (t[k] = {}), et(e[k]) && !et(t[k]) && (t[k] = []), g(t[k], e[k], n)) : e[k] !== T && (t[k] = e[k])
|
||
}
|
||
function y(t, e) {
|
||
return null == e ? S(t) : S(t).filter(e)
|
||
}
|
||
function w(t, n, r, i) {
|
||
return e(n) ? n.call(t, r, i) : n
|
||
}
|
||
function b(t, e, n) {
|
||
null == n ? t.removeAttribute(e) : t.setAttribute(e, n)
|
||
}
|
||
function _(t, e) {
|
||
var n = t.className || "",
|
||
r = n && n.baseVal !== T;
|
||
if (e === T) return r ? n.baseVal: n;
|
||
r ? n.baseVal = e: t.className = e
|
||
}
|
||
function x(t) {
|
||
try {
|
||
return t ? "true" == t || "false" != t && ("null" == t ? null: +t + "" == t ? +t: /^[\[\{]/.test(t) ? S.parseJSON(t) : t) : t
|
||
} catch(e) {
|
||
return t
|
||
}
|
||
}
|
||
function j(t, e) {
|
||
e(t);
|
||
for (var n = 0,
|
||
r = t.childNodes.length; n < r; n++) j(t.childNodes[n], e)
|
||
}
|
||
var T, k, S, E, C, O, D = [],
|
||
I = D.concat,
|
||
M = D.filter,
|
||
P = D.slice,
|
||
A = window.document,
|
||
L = {},
|
||
N = {},
|
||
F = {
|
||
"column-count": 1,
|
||
columns: 1,
|
||
"font-weight": 1,
|
||
"line-height": 1,
|
||
opacity: 1,
|
||
"z-index": 1,
|
||
zoom: 1
|
||
},
|
||
R = /^\s*<(\w+|!)[^>]*>/,
|
||
q = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
|
||
J = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
|
||
$ = /^(?:body|html)$/i,
|
||
U = /([A-Z])/g,
|
||
B = ["val", "css", "html", "text", "data", "width", "height", "offset"],
|
||
H = ["after", "prepend", "before", "append"],
|
||
W = A.createElement("table"),
|
||
z = A.createElement("tr"),
|
||
V = {
|
||
tr: A.createElement("tbody"),
|
||
tbody: W,
|
||
thead: W,
|
||
tfoot: W,
|
||
td: z,
|
||
th: z,
|
||
"*": A.createElement("div")
|
||
},
|
||
G = /complete|loaded|interactive/,
|
||
X = /^[\w-]*$/,
|
||
Y = {},
|
||
K = Y.toString,
|
||
Z = {},
|
||
Q = A.createElement("div"),
|
||
tt = {
|
||
tabindex: "tabIndex",
|
||
readonly: "readOnly",
|
||
for: "htmlFor",
|
||
class: "className",
|
||
maxlength: "maxLength",
|
||
cellspacing: "cellSpacing",
|
||
cellpadding: "cellPadding",
|
||
rowspan: "rowSpan",
|
||
colspan: "colSpan",
|
||
usemap: "useMap",
|
||
frameborder: "frameBorder",
|
||
contenteditable: "contentEditable"
|
||
},
|
||
et = Array.isArray ||
|
||
function(t) {
|
||
return t instanceof Array
|
||
};
|
||
return Z.matches = function(t, e) {
|
||
if (!e || !t || 1 !== t.nodeType) return ! 1;
|
||
var n = t.matches || t.webkitMatchesSelector || t.mozMatchesSelector || t.oMatchesSelector || t.matchesSelector;
|
||
if (n) return n.call(t, e);
|
||
var r, i = t.parentNode,
|
||
o = !i;
|
||
return o && (i = Q).appendChild(t),
|
||
r = ~Z.qsa(i, e).indexOf(t),
|
||
o && Q.removeChild(t),
|
||
r
|
||
},
|
||
C = function(t) {
|
||
return t.replace(/-+(.)?/g,
|
||
function(t, e) {
|
||
return e ? e.toUpperCase() : ""
|
||
})
|
||
},
|
||
O = function(t) {
|
||
return M.call(t,
|
||
function(e, n) {
|
||
return t.indexOf(e) == n
|
||
})
|
||
},
|
||
Z.fragment = function(t, e, n) {
|
||
var r, i, o;
|
||
return q.test(t) && (r = S(A.createElement(RegExp.$1))),
|
||
r || (t.replace && (t = t.replace(J, "<$1></$2>")), e === T && (e = R.test(t) && RegExp.$1), e in V || (e = "*"), o = V[e], o.innerHTML = "" + t, r = S.each(P.call(o.childNodes),
|
||
function() {
|
||
o.removeChild(this)
|
||
})),
|
||
a(n) && (i = S(r), S.each(n,
|
||
function(t, e) {
|
||
B.indexOf(t) > -1 ? i[t](e) : i.attr(t, e)
|
||
})),
|
||
r
|
||
},
|
||
Z.Z = function(t, e) {
|
||
return new v(t, e)
|
||
},
|
||
Z.isZ = function(t) {
|
||
return t instanceof Z.Z
|
||
},
|
||
Z.init = function(t, n) {
|
||
var r;
|
||
if (!t) return Z.Z();
|
||
if ("string" == typeof t) if (t = t.trim(), "<" == t[0] && R.test(t)) r = Z.fragment(t, RegExp.$1, n),
|
||
t = null;
|
||
else {
|
||
if (n !== T) return S(n).find(t);
|
||
r = Z.qsa(A, t)
|
||
} else {
|
||
if (e(t)) return S(A).ready(t);
|
||
if (Z.isZ(t)) return t;
|
||
if (et(t)) r = u(t);
|
||
else if (i(t)) r = [t],
|
||
t = null;
|
||
else if (R.test(t)) r = Z.fragment(t.trim(), RegExp.$1, n),
|
||
t = null;
|
||
else {
|
||
if (n !== T) return S(n).find(t);
|
||
r = Z.qsa(A, t)
|
||
}
|
||
}
|
||
return Z.Z(r, t)
|
||
},
|
||
S = function(t, e) {
|
||
return Z.init(t, e)
|
||
},
|
||
S.extend = function(t) {
|
||
var e, n = P.call(arguments, 1);
|
||
return "boolean" == typeof t && (e = t, t = n.shift()),
|
||
n.forEach(function(n) {
|
||
g(t, n, e)
|
||
}),
|
||
t
|
||
},
|
||
Z.qsa = function(t, e) {
|
||
var n, r = "#" == e[0],
|
||
i = !r && "." == e[0],
|
||
o = r || i ? e.slice(1) : e,
|
||
a = X.test(o);
|
||
return t.getElementById && a && r ? (n = t.getElementById(o)) ? [n] : [] : 1 !== t.nodeType && 9 !== t.nodeType && 11 !== t.nodeType ? [] : P.call(a && !r && t.getElementsByClassName ? i ? t.getElementsByClassName(o) : t.getElementsByTagName(e) : t.querySelectorAll(e))
|
||
},
|
||
S.contains = A.documentElement.contains ?
|
||
function(t, e) {
|
||
return t !== e && t.contains(e)
|
||
}: function(t, e) {
|
||
for (; e && (e = e.parentNode);) if (e === t) return ! 0;
|
||
return ! 1
|
||
},
|
||
S.type = t,
|
||
S.isFunction = e,
|
||
S.isWindow = n,
|
||
S.isArray = et,
|
||
S.isPlainObject = a,
|
||
S.isEmptyObject = function(t) {
|
||
var e;
|
||
for (e in t) return ! 1;
|
||
return ! 0
|
||
},
|
||
S.isNumeric = function(t) {
|
||
var e = Number(t),
|
||
n = void 0 === t ? "undefined": (0, o.
|
||
default)(t);
|
||
return null != t && "boolean" != n && ("string" != n || t.length) && !isNaN(e) && isFinite(e) || !1
|
||
},
|
||
S.inArray = function(t, e, n) {
|
||
return D.indexOf.call(e, t, n)
|
||
},
|
||
S.camelCase = C,
|
||
S.trim = function(t) {
|
||
return null == t ? "": String.prototype.trim.call(t)
|
||
},
|
||
S.uuid = 0,
|
||
S.support = {},
|
||
S.expr = {},
|
||
S.noop = function() {},
|
||
S.map = function(t, e) {
|
||
var n, r, i, o = [];
|
||
if (c(t)) for (r = 0; r < t.length; r++) null != (n = e(t[r], r)) && o.push(n);
|
||
else for (i in t) null != (n = e(t[i], i)) && o.push(n);
|
||
return l(o)
|
||
},
|
||
S.each = function(t, e) {
|
||
var n, r;
|
||
if (c(t)) {
|
||
for (n = 0; n < t.length; n++) if (!1 === e.call(t[n], n, t[n])) return t
|
||
} else for (r in t) if (!1 === e.call(t[r], r, t[r])) return t;
|
||
return t
|
||
},
|
||
S.grep = function(t, e) {
|
||
return M.call(t, e)
|
||
},
|
||
window.JSON && (S.parseJSON = JSON.parse),
|
||
S.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),
|
||
function(t, e) {
|
||
Y["[object " + e + "]"] = e.toLowerCase()
|
||
}),
|
||
S.fn = {
|
||
constructor: Z.Z,
|
||
length: 0,
|
||
forEach: D.forEach,
|
||
reduce: D.reduce,
|
||
push: D.push,
|
||
sort: D.sort,
|
||
splice: D.splice,
|
||
indexOf: D.indexOf,
|
||
concat: function() {
|
||
var t, e, n = [];
|
||
for (t = 0; t < arguments.length; t++) e = arguments[t],
|
||
n[t] = Z.isZ(e) ? e.toArray() : e;
|
||
return I.apply(Z.isZ(this) ? this.toArray() : this, n)
|
||
},
|
||
map: function(t) {
|
||
return S(S.map(this,
|
||
function(e, n) {
|
||
return t.call(e, n, e)
|
||
}))
|
||
},
|
||
slice: function() {
|
||
return S(P.apply(this, arguments))
|
||
},
|
||
ready: function(t) {
|
||
return G.test(A.readyState) && A.body ? t(S) : A.addEventListener("DOMContentLoaded",
|
||
function() {
|
||
t(S)
|
||
},
|
||
!1),
|
||
this
|
||
},
|
||
get: function(t) {
|
||
return t === T ? P.call(this) : this[t >= 0 ? t: t + this.length]
|
||
},
|
||
toArray: function() {
|
||
return this.get()
|
||
},
|
||
size: function() {
|
||
return this.length
|
||
},
|
||
remove: function() {
|
||
return this.each(function() {
|
||
null != this.parentNode && this.parentNode.removeChild(this)
|
||
})
|
||
},
|
||
each: function(t) {
|
||
return D.every.call(this,
|
||
function(e, n) {
|
||
return ! 1 !== t.call(e, n, e)
|
||
}),
|
||
this
|
||
},
|
||
filter: function(t) {
|
||
return e(t) ? this.not(this.not(t)) : S(M.call(this,
|
||
function(e) {
|
||
return Z.matches(e, t)
|
||
}))
|
||
},
|
||
add: function(t, e) {
|
||
return S(O(this.concat(S(t, e))))
|
||
},
|
||
is: function(t) {
|
||
return this.length > 0 && Z.matches(this[0], t)
|
||
},
|
||
not: function(t) {
|
||
var n = [];
|
||
if (e(t) && t.call !== T) this.each(function(e) {
|
||
t.call(this, e) || n.push(this)
|
||
});
|
||
else {
|
||
var r = "string" == typeof t ? this.filter(t) : c(t) && e(t.item) ? P.call(t) : S(t);
|
||
this.forEach(function(t) {
|
||
r.indexOf(t) < 0 && n.push(t)
|
||
})
|
||
}
|
||
return S(n)
|
||
},
|
||
has: function(t) {
|
||
return this.filter(function() {
|
||
return i(t) ? S.contains(this, t) : S(this).find(t).size()
|
||
})
|
||
},
|
||
eq: function(t) {
|
||
return - 1 === t ? this.slice(t) : this.slice(t, +t + 1)
|
||
},
|
||
first: function() {
|
||
var t = this[0];
|
||
return t && !i(t) ? t: S(t)
|
||
},
|
||
last: function() {
|
||
var t = this[this.length - 1];
|
||
return t && !i(t) ? t: S(t)
|
||
},
|
||
find: function(t) {
|
||
var e = this;
|
||
return t ? "object" == (void 0 === t ? "undefined": (0, o.
|
||
default)(t)) ? S(t).filter(function() {
|
||
var t = this;
|
||
return D.some.call(e,
|
||
function(e) {
|
||
return S.contains(e, t)
|
||
})
|
||
}) : 1 == this.length ? S(Z.qsa(this[0], t)) : this.map(function() {
|
||
return Z.qsa(this, t)
|
||
}) : S()
|
||
},
|
||
closest: function(t, e) {
|
||
var n = [],
|
||
i = "object" == (void 0 === t ? "undefined": (0, o.
|
||
default)(t)) && S(t);
|
||
return this.each(function(o, a) {
|
||
for (; a && !(i ? i.indexOf(a) >= 0 : Z.matches(a, t));) a = a !== e && !r(a) && a.parentNode;
|
||
a && n.indexOf(a) < 0 && n.push(a)
|
||
}),
|
||
S(n)
|
||
},
|
||
parents: function(t) {
|
||
for (var e = [], n = this; n.length > 0;) n = S.map(n,
|
||
function(t) {
|
||
if ((t = t.parentNode) && !r(t) && e.indexOf(t) < 0) return e.push(t),
|
||
t
|
||
});
|
||
return y(e, t)
|
||
},
|
||
parent: function(t) {
|
||
return y(O(this.pluck("parentNode")), t)
|
||
},
|
||
children: function(t) {
|
||
return y(this.map(function() {
|
||
return m(this)
|
||
}), t)
|
||
},
|
||
contents: function() {
|
||
return this.map(function() {
|
||
return this.contentDocument || P.call(this.childNodes)
|
||
})
|
||
},
|
||
siblings: function(t) {
|
||
return y(this.map(function(t, e) {
|
||
return M.call(m(e.parentNode),
|
||
function(t) {
|
||
return t !== e
|
||
})
|
||
}), t)
|
||
},
|
||
empty: function() {
|
||
return this.each(function() {
|
||
this.innerHTML = ""
|
||
})
|
||
},
|
||
pluck: function(t) {
|
||
return S.map(this,
|
||
function(e) {
|
||
return e[t]
|
||
})
|
||
},
|
||
show: function() {
|
||
return this.each(function() {
|
||
"none" == this.style.display && (this.style.display = ""),
|
||
"none" == getComputedStyle(this, "").getPropertyValue("display") && (this.style.display = d(this.nodeName))
|
||
})
|
||
},
|
||
replaceWith: function(t) {
|
||
return this.before(t).remove()
|
||
},
|
||
wrap: function(t) {
|
||
var n = e(t);
|
||
if (this[0] && !n) var r = S(t).get(0),
|
||
i = r.parentNode || this.length > 1;
|
||
return this.each(function(e) {
|
||
S(this).wrapAll(n ? t.call(this, e) : i ? r.cloneNode(!0) : r)
|
||
})
|
||
},
|
||
wrapAll: function(t) {
|
||
if (this[0]) {
|
||
S(this[0]).before(t = S(t));
|
||
for (var e; (e = t.children()).length;) t = e.first();
|
||
S(t).append(this)
|
||
}
|
||
return this
|
||
},
|
||
wrapInner: function(t) {
|
||
var n = e(t);
|
||
return this.each(function(e) {
|
||
var r = S(this),
|
||
i = r.contents(),
|
||
o = n ? t.call(this, e) : t;
|
||
i.length ? i.wrapAll(o) : r.append(o)
|
||
})
|
||
},
|
||
unwrap: function() {
|
||
return this.parent().each(function() {
|
||
S(this).replaceWith(S(this).children())
|
||
}),
|
||
this
|
||
},
|
||
clone: function() {
|
||
return this.map(function() {
|
||
return this.cloneNode(!0)
|
||
})
|
||
},
|
||
hide: function() {
|
||
return this.css("display", "none")
|
||
},
|
||
toggle: function(t) {
|
||
return this.each(function() {
|
||
var e = S(this); (t === T ? "none" == e.css("display") : t) ? e.show() : e.hide()
|
||
})
|
||
},
|
||
prev: function(t) {
|
||
return S(this.pluck("previousElementSibling")).filter(t || "*")
|
||
},
|
||
next: function(t) {
|
||
return S(this.pluck("nextElementSibling")).filter(t || "*")
|
||
},
|
||
html: function(t) {
|
||
return 0 in arguments ? this.each(function(e) {
|
||
var n = this.innerHTML;
|
||
S(this).empty().append(w(this, t, e, n))
|
||
}) : 0 in this ? this[0].innerHTML: null
|
||
},
|
||
text: function(t) {
|
||
return 0 in arguments ? this.each(function(e) {
|
||
var n = w(this, t, e, this.textContent);
|
||
this.textContent = null == n ? "": "" + n
|
||
}) : 0 in this ? this.pluck("textContent").join("") : null
|
||
},
|
||
attr: function(t, e) {
|
||
var n;
|
||
return "string" != typeof t || 1 in arguments ? this.each(function(n) {
|
||
if (1 === this.nodeType) if (i(t)) for (k in t) b(this, k, t[k]);
|
||
else b(this, t, w(this, e, n, this.getAttribute(t)))
|
||
}) : 0 in this && 1 == this[0].nodeType && null != (n = this[0].getAttribute(t)) ? n: T
|
||
},
|
||
removeAttr: function(t) {
|
||
return this.each(function() {
|
||
1 === this.nodeType && t.split(" ").forEach(function(t) {
|
||
b(this, t)
|
||
},
|
||
this)
|
||
})
|
||
},
|
||
prop: function(t, e) {
|
||
return t = tt[t] || t,
|
||
1 in arguments ? this.each(function(n) {
|
||
this[t] = w(this, e, n, this[t])
|
||
}) : this[0] && this[0][t]
|
||
},
|
||
removeProp: function(t) {
|
||
return t = tt[t] || t,
|
||
this.each(function() {
|
||
delete this[t]
|
||
})
|
||
},
|
||
data: function(t, e) {
|
||
var n = "data-" + t.replace(U, "-$1").toLowerCase(),
|
||
r = 1 in arguments ? this.attr(n, e) : this.attr(n);
|
||
return null !== r ? x(r) : T
|
||
},
|
||
val: function(t) {
|
||
return 0 in arguments ? (null == t && (t = ""), this.each(function(e) {
|
||
this.value = w(this, t, e, this.value)
|
||
})) : this[0] && (this[0].multiple ? S(this[0]).find("option").filter(function() {
|
||
return this.selected
|
||
}).pluck("value") : this[0].value)
|
||
},
|
||
offset: function(t) {
|
||
if (t) return this.each(function(e) {
|
||
var n = S(this),
|
||
r = w(this, t, e, n.offset()),
|
||
i = n.offsetParent().offset(),
|
||
o = {
|
||
top: r.top - i.top,
|
||
left: r.left - i.left
|
||
};
|
||
"static" == n.css("position") && (o.position = "relative"),
|
||
n.css(o)
|
||
});
|
||
if (!this.length) return null;
|
||
if (A.documentElement !== this[0] && !S.contains(A.documentElement, this[0])) return {
|
||
top: 0,
|
||
left: 0
|
||
};
|
||
var e = this[0].getBoundingClientRect();
|
||
return {
|
||
left: e.left + window.pageXOffset,
|
||
top: e.top + window.pageYOffset,
|
||
width: Math.round(e.width),
|
||
height: Math.round(e.height)
|
||
}
|
||
},
|
||
css: function(e, n) {
|
||
if (arguments.length < 2) {
|
||
var r = this[0];
|
||
if ("string" == typeof e) {
|
||
if (!r) return;
|
||
return r.style[C(e)] || getComputedStyle(r, "").getPropertyValue(e)
|
||
}
|
||
if (et(e)) {
|
||
if (!r) return;
|
||
var i = {},
|
||
o = getComputedStyle(r, "");
|
||
return S.each(e,
|
||
function(t, e) {
|
||
i[e] = r.style[C(e)] || o.getPropertyValue(e)
|
||
}),
|
||
i
|
||
}
|
||
}
|
||
var a = "";
|
||
if ("string" == t(e)) n || 0 === n ? a = f(e) + ":" + h(e, n) : this.each(function() {
|
||
this.style.removeProperty(f(e))
|
||
});
|
||
else for (k in e) e[k] || 0 === e[k] ? a += f(k) + ":" + h(k, e[k]) + ";": this.each(function() {
|
||
this.style.removeProperty(f(k))
|
||
});
|
||
return this.each(function() {
|
||
this.style.cssText += ";" + a
|
||
})
|
||
},
|
||
index: function(t) {
|
||
return t ? this.indexOf(S(t)[0]) : this.parent().children().indexOf(this[0])
|
||
},
|
||
hasClass: function(t) {
|
||
return !! t && D.some.call(this,
|
||
function(t) {
|
||
return this.test(_(t))
|
||
},
|
||
p(t))
|
||
},
|
||
addClass: function(t) {
|
||
return t ? this.each(function(e) {
|
||
if ("className" in this) {
|
||
E = [];
|
||
var n = _(this);
|
||
w(this, t, e, n).split(/\s+/g).forEach(function(t) {
|
||
S(this).hasClass(t) || E.push(t)
|
||
},
|
||
this),
|
||
E.length && _(this, n + (n ? " ": "") + E.join(" "))
|
||
}
|
||
}) : this
|
||
},
|
||
removeClass: function(t) {
|
||
return this.each(function(e) {
|
||
if ("className" in this) {
|
||
if (t === T) return _(this, "");
|
||
E = _(this),
|
||
w(this, t, e, E).split(/\s+/g).forEach(function(t) {
|
||
E = E.replace(p(t), " ")
|
||
}),
|
||
_(this, E.trim())
|
||
}
|
||
})
|
||
},
|
||
toggleClass: function(t, e) {
|
||
return t ? this.each(function(n) {
|
||
var r = S(this);
|
||
w(this, t, n, _(this)).split(/\s+/g).forEach(function(t) { (e === T ? !r.hasClass(t) : e) ? r.addClass(t) : r.removeClass(t)
|
||
})
|
||
}) : this
|
||
},
|
||
scrollTop: function(t) {
|
||
if (this.length) {
|
||
var e = "scrollTop" in this[0];
|
||
return t === T ? e ? this[0].scrollTop: this[0].pageYOffset: this.each(e ?
|
||
function() {
|
||
this.scrollTop = t
|
||
}: function() {
|
||
this.scrollTo(this.scrollX, t)
|
||
})
|
||
}
|
||
},
|
||
scrollLeft: function(t) {
|
||
if (this.length) {
|
||
var e = "scrollLeft" in this[0];
|
||
return t === T ? e ? this[0].scrollLeft: this[0].pageXOffset: this.each(e ?
|
||
function() {
|
||
this.scrollLeft = t
|
||
}: function() {
|
||
this.scrollTo(t, this.scrollY)
|
||
})
|
||
}
|
||
},
|
||
position: function() {
|
||
if (this.length) {
|
||
var t = this[0],
|
||
e = this.offsetParent(),
|
||
n = this.offset(),
|
||
r = $.test(e[0].nodeName) ? {
|
||
top: 0,
|
||
left: 0
|
||
}: e.offset();
|
||
return n.top -= parseFloat(S(t).css("margin-top")) || 0,
|
||
n.left -= parseFloat(S(t).css("margin-left")) || 0,
|
||
r.top += parseFloat(S(e[0]).css("border-top-width")) || 0,
|
||
r.left += parseFloat(S(e[0]).css("border-left-width")) || 0,
|
||
{
|
||
top: n.top - r.top,
|
||
left: n.left - r.left
|
||
}
|
||
}
|
||
},
|
||
offsetParent: function() {
|
||
return this.map(function() {
|
||
for (var t = this.offsetParent || A.body; t && !$.test(t.nodeName) && "static" == S(t).css("position");) t = t.offsetParent;
|
||
return t
|
||
})
|
||
}
|
||
},
|
||
S.fn.detach = S.fn.remove,
|
||
["width", "height"].forEach(function(t) {
|
||
var e = t.replace(/./,
|
||
function(t) {
|
||
return t[0].toUpperCase()
|
||
});
|
||
S.fn[t] = function(i) {
|
||
var o, a = this[0];
|
||
return i === T ? n(a) ? a["inner" + e] : r(a) ? a.documentElement["scroll" + e] : (o = this.offset()) && o[t] : this.each(function(e) {
|
||
a = S(this),
|
||
a.css(t, w(this, i, e, a[t]()))
|
||
})
|
||
}
|
||
}),
|
||
H.forEach(function(e, n) {
|
||
var r = n % 2;
|
||
S.fn[e] = function() {
|
||
var e, i, o = S.map(arguments,
|
||
function(n) {
|
||
var r = [];
|
||
return e = t(n),
|
||
"array" == e ? (n.forEach(function(t) {
|
||
return t.nodeType !== T ? r.push(t) : S.zepto.isZ(t) ? r = r.concat(t.get()) : void(r = r.concat(Z.fragment(t)))
|
||
}), r) : "object" == e || null == n ? n: Z.fragment(n)
|
||
}),
|
||
a = this.length > 1;
|
||
return o.length < 1 ? this: this.each(function(t, e) {
|
||
i = r ? e: e.parentNode,
|
||
e = 0 == n ? e.nextSibling: 1 == n ? e.firstChild: 2 == n ? e: null;
|
||
var s = S.contains(A.documentElement, i);
|
||
o.forEach(function(t) {
|
||
if (a) t = t.cloneNode(!0);
|
||
else if (!i) return S(t).remove();
|
||
i.insertBefore(t, e),
|
||
s && j(t,
|
||
function(t) {
|
||
if (! (null == t.nodeName || "SCRIPT" !== t.nodeName.toUpperCase() || t.type && "text/javascript" !== t.type || t.src)) {
|
||
var e = t.ownerDocument ? t.ownerDocument.defaultView: window;
|
||
e.eval.call(e, t.innerHTML)
|
||
}
|
||
})
|
||
})
|
||
})
|
||
},
|
||
S.fn[r ? e + "To": "insert" + (n ? "Before": "After")] = function(t) {
|
||
return S(t)[e](this),
|
||
this
|
||
}
|
||
}),
|
||
Z.Z.prototype = v.prototype = S.fn,
|
||
Z.uniq = O,
|
||
Z.deserializeValue = x,
|
||
S.zepto = Z,
|
||
S
|
||
} ();
|
||
window.Zepto = c,
|
||
void 0 === window.$ && (window.$ = c),
|
||
function(t) {
|
||
function e(t) {
|
||
return t._zid || (t._zid = p++)
|
||
}
|
||
function n(t, n, o, a) {
|
||
if (n = r(n), n.ns) var s = i(n.ns);
|
||
return (v[e(t)] || []).filter(function(t) {
|
||
return t && (!n.e || t.e == n.e) && (!n.ns || s.test(t.ns)) && (!o || e(t.fn) === e(o)) && (!a || t.sel == a)
|
||
})
|
||
}
|
||
function r(t) {
|
||
var e = ("" + t).split(".");
|
||
return {
|
||
e: e[0],
|
||
ns: e.slice(1).sort().join(" ")
|
||
}
|
||
}
|
||
function i(t) {
|
||
return new RegExp("(?:^| )" + t.replace(" ", " .* ?") + "(?: |$)")
|
||
}
|
||
function o(t, e) {
|
||
return t.del && !y && t.e in w || !!e
|
||
}
|
||
function a(t) {
|
||
return b[t] || y && w[t] || t
|
||
}
|
||
function s(n, i, s, c, l, p, h) {
|
||
var d = e(n),
|
||
m = v[d] || (v[d] = []);
|
||
i.split(/\s/).forEach(function(e) {
|
||
if ("ready" == e) return t(document).ready(s);
|
||
var i = r(e);
|
||
i.fn = s,
|
||
i.sel = l,
|
||
i.e in b && (s = function(e) {
|
||
var n = e.relatedTarget;
|
||
if (!n || n !== this && !t.contains(this, n)) return i.fn.apply(this, arguments)
|
||
}),
|
||
i.del = p;
|
||
var d = p || s;
|
||
i.proxy = function(t) {
|
||
if (t = u(t), !t.isImmediatePropagationStopped()) {
|
||
try {
|
||
t.data = c
|
||
} catch(t) {}
|
||
var e = d.apply(n, t._args == f ? [t] : [t].concat(t._args));
|
||
return ! 1 === e && (t.preventDefault(), t.stopPropagation()),
|
||
e
|
||
}
|
||
},
|
||
i.i = m.length,
|
||
m.push(i),
|
||
"addEventListener" in n && n.addEventListener(a(i.e), i.proxy, o(i, h))
|
||
})
|
||
}
|
||
function c(t, r, i, s, c) {
|
||
var u = e(t); (r || "").split(/\s/).forEach(function(e) {
|
||
n(t, e, i, s).forEach(function(e) {
|
||
delete v[u][e.i],
|
||
"removeEventListener" in t && t.removeEventListener(a(e.e), e.proxy, o(e, c))
|
||
})
|
||
})
|
||
}
|
||
function u(e, n) {
|
||
if (n || !e.isDefaultPrevented) {
|
||
n || (n = e),
|
||
t.each(T,
|
||
function(t, r) {
|
||
var i = n[t];
|
||
e[t] = function() {
|
||
return this[r] = _,
|
||
i && i.apply(n, arguments)
|
||
},
|
||
e[r] = x
|
||
});
|
||
try {
|
||
e.timeStamp || (e.timeStamp = Date.now())
|
||
} catch(t) {
|
||
console.log(t)
|
||
} (n.defaultPrevented !== f ? n.defaultPrevented: "returnValue" in n ? !1 === n.returnValue: n.getPreventDefault && n.getPreventDefault()) && (e.isDefaultPrevented = _)
|
||
}
|
||
return e
|
||
}
|
||
function l(t) {
|
||
var e, n = {
|
||
originalEvent: t
|
||
};
|
||
for (e in t) j.test(e) || t[e] === f || (n[e] = t[e]);
|
||
return u(n, t)
|
||
}
|
||
var f, p = 1,
|
||
h = Array.prototype.slice,
|
||
d = t.isFunction,
|
||
m = function(t) {
|
||
return "string" == typeof t
|
||
},
|
||
v = {},
|
||
g = {},
|
||
y = "onfocusin" in window,
|
||
w = {
|
||
focus: "focusin",
|
||
blur: "focusout"
|
||
},
|
||
b = {
|
||
mouseenter: "mouseover",
|
||
mouseleave: "mouseout"
|
||
};
|
||
g.click = g.mousedown = g.mouseup = g.mousemove = "MouseEvents",
|
||
t.event = {
|
||
add: s,
|
||
remove: c
|
||
},
|
||
t.proxy = function(n, r) {
|
||
var i = 2 in arguments && h.call(arguments, 2);
|
||
if (d(n)) {
|
||
var o = function() {
|
||
return n.apply(r, i ? i.concat(h.call(arguments)) : arguments)
|
||
};
|
||
return o._zid = e(n),
|
||
o
|
||
}
|
||
if (m(r)) return i ? (i.unshift(n[r], n), t.proxy.apply(null, i)) : t.proxy(n[r], n);
|
||
throw new TypeError("expected function")
|
||
},
|
||
t.fn.bind = function(t, e, n) {
|
||
return this.on(t, e, n)
|
||
},
|
||
t.fn.unbind = function(t, e) {
|
||
return this.off(t, e)
|
||
},
|
||
t.fn.one = function(t, e, n, r) {
|
||
return this.on(t, e, n, r, 1)
|
||
};
|
||
var _ = function() {
|
||
return ! 0
|
||
},
|
||
x = function() {
|
||
return ! 1
|
||
},
|
||
j = /^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,
|
||
T = {
|
||
preventDefault: "isDefaultPrevented",
|
||
stopImmediatePropagation: "isImmediatePropagationStopped",
|
||
stopPropagation: "isPropagationStopped"
|
||
};
|
||
t.fn.delegate = function(t, e, n) {
|
||
return this.on(e, t, n)
|
||
},
|
||
t.fn.undelegate = function(t, e, n) {
|
||
return this.off(e, t, n)
|
||
},
|
||
t.fn.live = function(e, n) {
|
||
return t(document.body).delegate(this.selector, e, n),
|
||
this
|
||
},
|
||
t.fn.die = function(e, n) {
|
||
return t(document.body).undelegate(this.selector, e, n),
|
||
this
|
||
},
|
||
t.fn.on = function(e, n, r, i, o) {
|
||
var a, u, p = this;
|
||
return e && !m(e) ? (t.each(e,
|
||
function(t, e) {
|
||
p.on(t, n, r, e, o)
|
||
}), p) : (m(n) || d(i) || !1 === i || (i = r, r = n, n = f), i !== f && !1 !== r || (i = r, r = f), !1 === i && (i = x), p.each(function(f, p) {
|
||
o && (a = function(t) {
|
||
return c(p, t.type, i),
|
||
i.apply(this, arguments)
|
||
}),
|
||
n && (u = function(e) {
|
||
var r, o = t(e.target).closest(n, p).get(0);
|
||
if (o && o !== p) return r = t.extend(l(e), {
|
||
currentTarget: o,
|
||
liveFired: p
|
||
}),
|
||
(a || i).apply(o, [r].concat(h.call(arguments, 1)))
|
||
}),
|
||
s(p, e, i, r, n, u || a)
|
||
}))
|
||
},
|
||
t.fn.off = function(e, n, r) {
|
||
var i = this;
|
||
return e && !m(e) ? (t.each(e,
|
||
function(t, e) {
|
||
i.off(t, n, e)
|
||
}), i) : (m(n) || d(r) || !1 === r || (r = n, n = f), !1 === r && (r = x), i.each(function() {
|
||
c(this, e, r, n)
|
||
}))
|
||
},
|
||
t.fn.trigger = function(e, n) {
|
||
return e = m(e) || t.isPlainObject(e) ? t.Event(e) : u(e),
|
||
e._args = n,
|
||
this.each(function() {
|
||
e.type in w && "function" == typeof this[e.type] ? this[e.type]() : "dispatchEvent" in this ? this.dispatchEvent(e) : t(this).triggerHandler(e, n)
|
||
})
|
||
},
|
||
t.fn.triggerHandler = function(e, r) {
|
||
var i, o;
|
||
return this.each(function(a, s) {
|
||
i = l(m(e) ? t.Event(e) : e),
|
||
i._args = r,
|
||
i.target = s,
|
||
t.each(n(s, e.type || e),
|
||
function(t, e) {
|
||
if (o = e.proxy(i), i.isImmediatePropagationStopped()) return ! 1
|
||
})
|
||
}),
|
||
o
|
||
},
|
||
"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(e) {
|
||
t.fn[e] = function(t) {
|
||
return 0 in arguments ? this.bind(e, t) : this.trigger(e)
|
||
}
|
||
}),
|
||
t.Event = function(t, e) {
|
||
m(t) || (e = t, t = e.type);
|
||
var n = document.createEvent(g[t] || "Events"),
|
||
r = !0;
|
||
if (e) for (var i in e)"bubbles" == i ? r = !!e[i] : n[i] = e[i];
|
||
return n.initEvent(t, r, !0),
|
||
u(n)
|
||
}
|
||
} (c),
|
||
function(t) {
|
||
function e(e, n, r) {
|
||
var i = t.Event(n);
|
||
return t(e).trigger(i, r),
|
||
!i.isDefaultPrevented()
|
||
}
|
||
function n(t, n, r, i) {
|
||
if (t.global) return e(n || w, r, i)
|
||
}
|
||
function r(e) {
|
||
e.global && 0 == t.active++&&n(e, null, "ajaxStart")
|
||
}
|
||
function i(e) {
|
||
e.global && !--t.active && n(e, null, "ajaxStop")
|
||
}
|
||
function o(t, e) {
|
||
var r = e.context;
|
||
if (!1 === e.beforeSend.call(r, t, e) || !1 === n(e, r, "ajaxBeforeSend", [t, e])) return ! 1;
|
||
n(e, r, "ajaxSend", [t, e])
|
||
}
|
||
function a(t, e, r, i) {
|
||
var o = r.context;
|
||
r.success.call(o, t, "success", e),
|
||
i && i.resolveWith(o, [t, "success", e]),
|
||
n(r, o, "ajaxSuccess", [e, r, t]),
|
||
c("success", e, r)
|
||
}
|
||
function s(t, e, r, i, o) {
|
||
var a = i.context;
|
||
i.error.call(a, r, e, t),
|
||
o && o.rejectWith(a, [r, e, t]),
|
||
n(i, a, "ajaxError", [r, i, t || e]),
|
||
c(e, r, i)
|
||
}
|
||
function c(t, e, r) {
|
||
var o = r.context;
|
||
r.complete.call(o, e, t),
|
||
n(r, o, "ajaxComplete", [e, r]),
|
||
i(r)
|
||
}
|
||
function u(t, e, n) {
|
||
if (n.dataFilter == l) return t;
|
||
var r = n.context;
|
||
return n.dataFilter.call(r, t, e)
|
||
}
|
||
function l() {}
|
||
function f(t) {
|
||
return t && (t = t.split(";", 2)[0]),
|
||
t && (t == T ? "html": t == j ? "json": _.test(t) ? "script": x.test(t) && "xml") || "text"
|
||
}
|
||
function p(t, e) {
|
||
return "" == e ? t: (t + "&" + e).replace(/[&?]{1,2}/, "?")
|
||
}
|
||
function h(e) {
|
||
e.processData && e.data && "string" != t.type(e.data) && (e.data = t.param(e.data, e.traditional)),
|
||
!e.data || e.type && "GET" != e.type.toUpperCase() && "jsonp" != e.dataType || (e.url = p(e.url, e.data), e.data = void 0)
|
||
}
|
||
function d(e, n, r, i) {
|
||
return t.isFunction(n) && (i = r, r = n, n = void 0),
|
||
t.isFunction(r) || (i = r, r = void 0),
|
||
{
|
||
url: e,
|
||
data: n,
|
||
success: r,
|
||
dataType: i
|
||
}
|
||
}
|
||
function m(e, n, r, i) {
|
||
var o, a = t.isArray(n),
|
||
s = t.isPlainObject(n);
|
||
t.each(n,
|
||
function(n, c) {
|
||
o = t.type(c),
|
||
i && (n = r ? i: i + "[" + (s || "object" == o || "array" == o ? n: "") + "]"),
|
||
!i && a ? e.add(c.name, c.value) : "array" == o || !r && "object" == o ? m(e, c, r, n) : e.add(n, c)
|
||
})
|
||
}
|
||
var v, g, y = +new Date,
|
||
w = window.document,
|
||
b = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
|
||
_ = /^(?:text|application)\/javascript/i,
|
||
x = /^(?:text|application)\/xml/i,
|
||
j = "application/json",
|
||
T = "text/html",
|
||
k = /^\s*$/,
|
||
S = w.createElement("a");
|
||
S.href = window.location.href,
|
||
t.active = 0,
|
||
t.ajaxJSONP = function(e, n) {
|
||
if (! ("type" in e)) return t.ajax(e);
|
||
var r, i, c = e.jsonpCallback,
|
||
u = (t.isFunction(c) ? c() : c) || "Zepto" + y++,
|
||
l = w.createElement("script"),
|
||
f = window[u],
|
||
p = function(e) {
|
||
t(l).triggerHandler("error", e || "abort")
|
||
},
|
||
h = {
|
||
abort: p
|
||
};
|
||
return n && n.promise(h),
|
||
t(l).on("load error",
|
||
function(o, c) {
|
||
clearTimeout(i),
|
||
t(l).off().remove(),
|
||
"error" != o.type && r ? a(r[0], h, e, n) : s(null, c || "error", h, e, n),
|
||
window[u] = f,
|
||
r && t.isFunction(f) && f(r[0]),
|
||
f = r = void 0
|
||
}),
|
||
!1 === o(h, e) ? (p("abort"), h) : (window[u] = function() {
|
||
r = arguments
|
||
},
|
||
l.src = e.url.replace(/\?(.+)=\?/, "?$1=" + u), w.head.appendChild(l), e.timeout > 0 && (i = setTimeout(function() {
|
||
p("timeout")
|
||
},
|
||
e.timeout)), h)
|
||
},
|
||
t.ajaxSettings = {
|
||
type: "GET",
|
||
beforeSend: l,
|
||
success: l,
|
||
error: l,
|
||
complete: l,
|
||
context: null,
|
||
global: !0,
|
||
xhr: function() {
|
||
return new window.XMLHttpRequest
|
||
},
|
||
accepts: {
|
||
script: "text/javascript, application/javascript, application/x-javascript",
|
||
json: j,
|
||
xml: "application/xml, text/xml",
|
||
html: T,
|
||
text: "text/plain"
|
||
},
|
||
crossDomain: !1,
|
||
timeout: 0,
|
||
processData: !0,
|
||
cache: !0,
|
||
dataFilter: l
|
||
},
|
||
t.ajax = function(e) {
|
||
var n, i, c = t.extend({},
|
||
e || {}),
|
||
d = t.Deferred && t.Deferred();
|
||
for (v in t.ajaxSettings) void 0 === c[v] && (c[v] = t.ajaxSettings[v]);
|
||
r(c),
|
||
c.crossDomain || (n = w.createElement("a"), n.href = c.url, n.href = n.href, c.crossDomain = S.protocol + "//" + S.host != n.protocol + "//" + n.host),
|
||
c.url || (c.url = window.location.toString()),
|
||
(i = c.url.indexOf("#")) > -1 && (c.url = c.url.slice(0, i)),
|
||
h(c);
|
||
var m = c.dataType,
|
||
y = /\?.+=\?/.test(c.url);
|
||
if (y && (m = "jsonp"), !1 !== c.cache && (e && !0 === e.cache || "script" != m && "jsonp" != m) || (c.url = p(c.url, "_=" + Date.now())), "jsonp" == m) return y || (c.url = p(c.url, c.jsonp ? c.jsonp + "=?": !1 === c.jsonp ? "": "callback=?")),
|
||
t.ajaxJSONP(c, d);
|
||
var b, _ = c.accepts[m],
|
||
x = {},
|
||
j = function(t, e) {
|
||
x[t.toLowerCase()] = [t, e]
|
||
},
|
||
T = /^([\w-]+:)\/\//.test(c.url) ? RegExp.$1: window.location.protocol,
|
||
E = c.xhr(),
|
||
C = E.setRequestHeader;
|
||
if (d && d.promise(E), c.crossDomain || j("X-Requested-With", "XMLHttpRequest"), j("Accept", _ || "*/*"), (_ = c.mimeType || _) && (_.indexOf(",") > -1 && (_ = _.split(",", 2)[0]), E.overrideMimeType && E.overrideMimeType(_)), (c.contentType || !1 !== c.contentType && c.data && "GET" != c.type.toUpperCase()) && j("Content-Type", c.contentType || "application/x-www-form-urlencoded"), c.headers) for (g in c.headers) j(g, c.headers[g]);
|
||
if (E.setRequestHeader = j, E.onreadystatechange = function() {
|
||
if (4 == E.readyState) {
|
||
E.onreadystatechange = l,
|
||
clearTimeout(b);
|
||
var e, n = !1;
|
||
if (E.status >= 200 && E.status < 300 || 304 == E.status || 0 == E.status && "file:" == T) {
|
||
if (m = m || f(c.mimeType || E.getResponseHeader("content-type")), "arraybuffer" == E.responseType || "blob" == E.responseType) e = E.response;
|
||
else {
|
||
e = E.responseText;
|
||
try {
|
||
e = u(e, m, c),
|
||
"script" == m ? (0, eval)(e) : "xml" == m ? e = E.responseXML: "json" == m && (e = k.test(e) ? null: t.parseJSON(e))
|
||
} catch(t) {
|
||
n = t
|
||
}
|
||
if (n) return s(n, "parsererror", E, c, d)
|
||
}
|
||
a(e, E, c, d)
|
||
} else s(E.statusText || null, E.status ? "error": "abort", E, c, d)
|
||
}
|
||
},
|
||
!1 === o(E, c)) return E.abort(),
|
||
s(null, "abort", E, c, d),
|
||
E;
|
||
var O = !("async" in c) || c.async;
|
||
if (E.open(c.type, c.url, O, c.username, c.password), c.xhrFields) for (g in c.xhrFields) E[g] = c.xhrFields[g];
|
||
for (g in x) C.apply(E, x[g]);
|
||
return c.timeout > 0 && (b = setTimeout(function() {
|
||
E.onreadystatechange = l,
|
||
E.abort(),
|
||
s(null, "timeout", E, c, d)
|
||
},
|
||
c.timeout)),
|
||
E.send(c.data ? c.data: null),
|
||
E
|
||
},
|
||
t.get = function() {
|
||
return t.ajax(d.apply(null, arguments))
|
||
},
|
||
t.post = function() {
|
||
var e = d.apply(null, arguments);
|
||
return e.type = "POST",
|
||
t.ajax(e)
|
||
},
|
||
t.getJSON = function() {
|
||
var e = d.apply(null, arguments);
|
||
return e.dataType = "json",
|
||
t.ajax(e)
|
||
},
|
||
t.fn.load = function(e, n, r) {
|
||
if (!this.length) return this;
|
||
var i, o = this,
|
||
a = e.split(/\s/),
|
||
s = d(e, n, r),
|
||
c = s.success;
|
||
return a.length > 1 && (s.url = a[0], i = a[1]),
|
||
s.success = function(e) {
|
||
o.html(i ? t("<div>").html(e.replace(b, "")).find(i) : e),
|
||
c && c.apply(o, arguments)
|
||
},
|
||
t.ajax(s),
|
||
this
|
||
};
|
||
var E = encodeURIComponent;
|
||
t.param = function(e, n) {
|
||
var r = [];
|
||
return r.add = function(e, n) {
|
||
t.isFunction(n) && (n = n()),
|
||
null == n && (n = ""),
|
||
this.push(E(e) + "=" + E(n))
|
||
},
|
||
m(r, e, n),
|
||
r.join("&").replace(/%20/g, "+")
|
||
}
|
||
} (c),
|
||
function(t) {
|
||
t.fn.serializeArray = function() {
|
||
var e, n, r = [],
|
||
i = function t(n) {
|
||
if (n.forEach) return n.forEach(t);
|
||
r.push({
|
||
name: e,
|
||
value: n
|
||
})
|
||
};
|
||
return this[0] && t.each(this[0].elements,
|
||
function(r, o) {
|
||
n = o.type,
|
||
e = o.name,
|
||
e && "fieldset" != o.nodeName.toLowerCase() && !o.disabled && "submit" != n && "reset" != n && "button" != n && "file" != n && ("radio" != n && "checkbox" != n || o.checked) && i(t(o).val())
|
||
}),
|
||
r
|
||
},
|
||
t.fn.serialize = function() {
|
||
var t = [];
|
||
return this.serializeArray().forEach(function(e) {
|
||
t.push(encodeURIComponent(e.name) + "=" + encodeURIComponent(e.value))
|
||
}),
|
||
t.join("&")
|
||
},
|
||
t.fn.submit = function(e) {
|
||
if (0 in arguments) this.bind("submit", e);
|
||
else if (this.length) {
|
||
var n = t.Event("submit");
|
||
this.eq(0).trigger(n),
|
||
n.isDefaultPrevented() || this.get(0).submit()
|
||
}
|
||
return this
|
||
}
|
||
} (c),
|
||
function() {
|
||
try {
|
||
getComputedStyle(void 0)
|
||
} catch(e) {
|
||
var t = getComputedStyle;
|
||
window.getComputedStyle = function(e, n) {
|
||
try {
|
||
return t(e, n)
|
||
} catch(t) {
|
||
return null
|
||
}
|
||
}
|
||
}
|
||
} (),
|
||
function(t) {
|
||
function e(t, e) {
|
||
var n = this.os = {},
|
||
r = this.browser = {},
|
||
i = t.match(/Web[kK]it[\/]{0,1}([\d.]+)/),
|
||
o = t.match(/(Android);?[\s\/]+([\d.]+)?/),
|
||
a = !!t.match(/\(Macintosh\; Intel /),
|
||
s = t.match(/(iPad).*OS\s([\d_]+)/),
|
||
c = t.match(/(iPod)(.*OS\s([\d_]+))?/),
|
||
u = !s && t.match(/(iPhone\sOS)\s([\d_]+)/),
|
||
l = t.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),
|
||
f = /Win\d{2}|Windows/.test(e),
|
||
p = t.match(/Windows Phone ([\d.]+)/),
|
||
h = l && t.match(/TouchPad/),
|
||
d = t.match(/Kindle\/([\d.]+)/),
|
||
m = t.match(/Silk\/([\d._]+)/),
|
||
v = t.match(/(BlackBerry).*Version\/([\d.]+)/),
|
||
g = t.match(/(BB10).*Version\/([\d.]+)/),
|
||
y = t.match(/(RIM\sTablet\sOS)\s([\d.]+)/),
|
||
w = t.match(/PlayBook/),
|
||
b = t.match(/Chrome\/([\d.]+)/) || t.match(/CriOS\/([\d.]+)/),
|
||
_ = t.match(/Firefox\/([\d.]+)/),
|
||
x = t.match(/\((?:Mobile|Tablet); rv:([\d.]+)\).*Firefox\/[\d.]+/),
|
||
j = t.match(/MSIE\s([\d.]+)/) || t.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/),
|
||
T = !b && t.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/),
|
||
k = T || t.match(/Version\/([\d.]+)([^S](Safari)|[^M]*(Mobile)[^S]*(Safari))/); (r.webkit = !!i) && (r.version = i[1]),
|
||
o && (n.android = !0, n.version = o[2]),
|
||
u && !c && (n.ios = n.iphone = !0, n.version = u[2].replace(/_/g, ".")),
|
||
s && (n.ios = n.ipad = !0, n.version = s[2].replace(/_/g, ".")),
|
||
c && (n.ios = n.ipod = !0, n.version = c[3] ? c[3].replace(/_/g, ".") : null),
|
||
p && (n.wp = !0, n.version = p[1]),
|
||
l && (n.webos = !0, n.version = l[2]),
|
||
h && (n.touchpad = !0),
|
||
v && (n.blackberry = !0, n.version = v[2]),
|
||
g && (n.bb10 = !0, n.version = g[2]),
|
||
y && (n.rimtabletos = !0, n.version = y[2]),
|
||
w && (r.playbook = !0),
|
||
d && (n.kindle = !0, n.version = d[1]),
|
||
m && (r.silk = !0, r.version = m[1]),
|
||
!m && n.android && t.match(/Kindle Fire/) && (r.silk = !0),
|
||
b && (r.chrome = !0, r.version = b[1]),
|
||
_ && (r.firefox = !0, r.version = _[1]),
|
||
x && (n.firefoxos = !0, n.version = x[1]),
|
||
j && (r.ie = !0, r.version = j[1]),
|
||
k && (a || n.ios || f) && (r.safari = !0, n.ios || (r.version = k[1])),
|
||
T && (r.webview = !0),
|
||
n.tablet = !!(s || w || o && !t.match(/Mobile/) || _ && t.match(/Tablet/) || j && !t.match(/Phone/) && t.match(/Touch/)),
|
||
n.phone = !(n.tablet || n.ipod || !(o || u || l || v || g || b && t.match(/Android/) || b && t.match(/CriOS\/([\d.]+)/) || _ && t.match(/Mobile/) || j && t.match(/Touch/)))
|
||
}
|
||
e.call(t, navigator.userAgent, navigator.platform),
|
||
t.__detect = e
|
||
} (c),
|
||
function(t) {
|
||
var e, n = [];
|
||
t.fn.remove = function() {
|
||
return this.each(function() {
|
||
this.parentNode && ("IMG" === this.tagName && (n.push(this), this.src = "data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=", e && clearTimeout(e), e = setTimeout(function() {
|
||
n = []
|
||
},
|
||
6e4)), this.parentNode.removeChild(this))
|
||
})
|
||
}
|
||
} (c),
|
||
function(t) {
|
||
function e(e, r) {
|
||
var c = e[s],
|
||
u = c && i[c];
|
||
if (void 0 === r) return u || n(e);
|
||
if (u) {
|
||
if (r in u) return u[r];
|
||
var l = a(r);
|
||
if (l in u) return u[l]
|
||
}
|
||
return o.call(t(e), r)
|
||
}
|
||
function n(e, n, o) {
|
||
var c = e[s] || (e[s] = ++t.uuid),
|
||
u = i[c] || (i[c] = r(e));
|
||
return void 0 !== n && (u[a(n)] = o),
|
||
u
|
||
}
|
||
function r(e) {
|
||
var n = {};
|
||
return t.each(e.attributes || c,
|
||
function(e, r) {
|
||
0 == r.name.indexOf("data-") && (n[a(r.name.replace("data-", ""))] = t.zepto.deserializeValue(r.value))
|
||
}),
|
||
n
|
||
}
|
||
var i = {},
|
||
o = t.fn.data,
|
||
a = t.camelCase,
|
||
s = t.expando = "Zepto" + +new Date,
|
||
c = [];
|
||
t.fn.data = function(r, i) {
|
||
return void 0 === i ? t.isPlainObject(r) ? this.each(function(e, i) {
|
||
t.each(r,
|
||
function(t, e) {
|
||
n(i, t, e)
|
||
})
|
||
}) : 0 in this ? e(this[0], r) : void 0 : this.each(function() {
|
||
n(this, r, i)
|
||
})
|
||
},
|
||
t.data = function(e, n, r) {
|
||
return t(e).data(n, r)
|
||
},
|
||
t.hasData = function(e) {
|
||
var n = e[s],
|
||
r = n && i[n];
|
||
return !! r && !t.isEmptyObject(r)
|
||
},
|
||
t.fn.removeData = function(e) {
|
||
return "string" == typeof e && (e = e.split(/\s+/)),
|
||
this.each(function() {
|
||
var n = this[s],
|
||
r = n && i[n];
|
||
r && t.each(e || r,
|
||
function(t) {
|
||
delete r[e ? a(this) : t]
|
||
})
|
||
})
|
||
},
|
||
["remove", "empty"].forEach(function(e) {
|
||
var n = t.fn[e];
|
||
t.fn[e] = function() {
|
||
var t = this.find("*");
|
||
return "remove" === e && (t = t.add(this)),
|
||
t.removeData(),
|
||
n.call(this)
|
||
}
|
||
})
|
||
} (c),
|
||
function(t) {
|
||
function e(n) {
|
||
var r = [["resolve", "done", t.Callbacks({
|
||
once: 1,
|
||
memory: 1
|
||
}), "resolved"], ["reject", "fail", t.Callbacks({
|
||
once: 1,
|
||
memory: 1
|
||
}), "rejected"], ["notify", "progress", t.Callbacks({
|
||
memory: 1
|
||
})]],
|
||
i = "pending",
|
||
o = {
|
||
state: function() {
|
||
return i
|
||
},
|
||
always: function() {
|
||
return a.done(arguments).fail(arguments),
|
||
this
|
||
},
|
||
then: function() {
|
||
var n = arguments;
|
||
return e(function(e) {
|
||
t.each(r,
|
||
function(r, i) {
|
||
var s = t.isFunction(n[r]) && n[r];
|
||
a[i[1]](function() {
|
||
var n = s && s.apply(this, arguments);
|
||
if (n && t.isFunction(n.promise)) n.promise().done(e.resolve).fail(e.reject).progress(e.notify);
|
||
else {
|
||
var r = this === o ? e.promise() : this,
|
||
a = s ? [n] : arguments;
|
||
e[i[0] + "With"](r, a)
|
||
}
|
||
})
|
||
}),
|
||
n = null
|
||
}).promise()
|
||
},
|
||
promise: function(e) {
|
||
return null != e ? t.extend(e, o) : o
|
||
}
|
||
},
|
||
a = {};
|
||
return t.each(r,
|
||
function(t, e) {
|
||
var n = e[2],
|
||
s = e[3];
|
||
o[e[1]] = n.add,
|
||
s && n.add(function() {
|
||
i = s
|
||
},
|
||
r[1 ^ t][2].disable, r[2][2].lock),
|
||
a[e[0]] = function() {
|
||
return a[e[0] + "With"](this === a ? o: this, arguments),
|
||
this
|
||
},
|
||
a[e[0] + "With"] = n.fireWith
|
||
}),
|
||
o.promise(a),
|
||
n && n.call(a, a),
|
||
a
|
||
}
|
||
var n = Array.prototype.slice;
|
||
t.when = function(r) {
|
||
var i, o, a, s = n.call(arguments),
|
||
c = s.length,
|
||
u = 0,
|
||
l = 1 !== c || r && t.isFunction(r.promise) ? c: 0,
|
||
f = 1 === l ? r: e(),
|
||
p = function(t, e, r) {
|
||
return function(o) {
|
||
e[t] = this,
|
||
r[t] = arguments.length > 1 ? n.call(arguments) : o,
|
||
r === i ? f.notifyWith(e, r) : --l || f.resolveWith(e, r)
|
||
}
|
||
};
|
||
if (c > 1) for (i = new Array(c), o = new Array(c), a = new Array(c); u < c; ++u) s[u] && t.isFunction(s[u].promise) ? s[u].promise().done(p(u, a, s)).fail(f.reject).progress(p(u, o, i)) : --l;
|
||
return l || f.resolveWith(a, s),
|
||
f.promise()
|
||
},
|
||
t.Deferred = e
|
||
} (c),
|
||
function(t) {
|
||
t.Callbacks = function(e) {
|
||
e = t.extend({},
|
||
e);
|
||
var n, r, i, o, a, s, c = [],
|
||
u = !e.once && [],
|
||
l = function t(l) {
|
||
for (n = e.memory && l, r = !0, s = o || 0, o = 0, a = c.length, i = !0; c && s < a; ++s) if (!1 === c[s].apply(l[0], l[1]) && e.stopOnFalse) {
|
||
n = !1;
|
||
break
|
||
}
|
||
i = !1,
|
||
c && (u ? u.length && t(u.shift()) : n ? c.length = 0 : f.disable())
|
||
},
|
||
f = {
|
||
add: function() {
|
||
if (c) {
|
||
var r = c.length; !
|
||
function n(r) {
|
||
t.each(r,
|
||
function(t, r) {
|
||
"function" == typeof r ? e.unique && f.has(r) || c.push(r) : r && r.length && "string" != typeof r && n(r)
|
||
})
|
||
} (arguments),
|
||
i ? a = c.length: n && (o = r, l(n))
|
||
}
|
||
return this
|
||
},
|
||
remove: function() {
|
||
return c && t.each(arguments,
|
||
function(e, n) {
|
||
for (var r; (r = t.inArray(n, c, r)) > -1;) c.splice(r, 1),
|
||
i && (r <= a && --a, r <= s && --s)
|
||
}),
|
||
this
|
||
},
|
||
has: function(e) {
|
||
return ! (!c || !(e ? t.inArray(e, c) > -1 : c.length))
|
||
},
|
||
empty: function() {
|
||
return a = c.length = 0,
|
||
this
|
||
},
|
||
disable: function() {
|
||
return c = u = n = void 0,
|
||
this
|
||
},
|
||
disabled: function() {
|
||
return ! c
|
||
},
|
||
lock: function() {
|
||
return u = void 0,
|
||
n || f.disable(),
|
||
this
|
||
},
|
||
locked: function() {
|
||
return ! u
|
||
},
|
||
fireWith: function(t, e) {
|
||
return ! c || r && !u || (e = e || [], e = [t, e.slice ? e.slice() : e], i ? u.push(e) : l(e)),
|
||
this
|
||
},
|
||
fire: function() {
|
||
return f.fireWith(this, arguments)
|
||
},
|
||
fired: function() {
|
||
return !! r
|
||
}
|
||
};
|
||
return f
|
||
}
|
||
} (c),
|
||
function(t) {
|
||
function e(e) {
|
||
return e = t(e),
|
||
!(!e.width() && !e.height()) && "none" !== e.css("display")
|
||
}
|
||
function n(t, e) {
|
||
t = t.replace(/=#\]/g, '="#"]');
|
||
var n, r, i = s.exec(t);
|
||
if (i && i[2] in a && (n = a[i[2]], r = i[3], t = i[1], r)) {
|
||
var o = Number(r);
|
||
r = isNaN(o) ? r.replace(/^["']|["']$/g, "") : o
|
||
}
|
||
return e(t, n, r)
|
||
}
|
||
var r = t.zepto,
|
||
i = r.qsa,
|
||
o = r.matches,
|
||
a = t.expr[":"] = {
|
||
visible: function() {
|
||
if (e(this)) return this
|
||
},
|
||
hidden: function() {
|
||
if (!e(this)) return this
|
||
},
|
||
selected: function() {
|
||
if (this.selected) return this
|
||
},
|
||
checked: function() {
|
||
if (this.checked) return this
|
||
},
|
||
parent: function() {
|
||
return this.parentNode
|
||
},
|
||
first: function(t) {
|
||
if (0 === t) return this
|
||
},
|
||
last: function(t, e) {
|
||
if (t === e.length - 1) return this
|
||
},
|
||
eq: function(t, e, n) {
|
||
if (t === n) return this
|
||
},
|
||
contains: function(e, n, r) {
|
||
if (t(this).text().indexOf(r) > -1) return this
|
||
},
|
||
has: function(t, e, n) {
|
||
if (r.qsa(this, n).length) return this
|
||
}
|
||
},
|
||
s = new RegExp("(.*):(\\w+)(?:\\(([^)]+)\\))?$\\s*"),
|
||
c = /^\s*>/,
|
||
u = "Zepto" + +new Date;
|
||
r.qsa = function(e, o) {
|
||
return n(o,
|
||
function(n, a, s) {
|
||
try {
|
||
var l; ! n && a ? n = "*": c.test(n) && (l = t(e).addClass(u), n = "." + u + " " + n);
|
||
var f = i(e, n)
|
||
} catch(t) {
|
||
throw console.error("error performing selector: %o", o),
|
||
t
|
||
} finally {
|
||
l && l.removeClass(u)
|
||
}
|
||
return a ? r.uniq(t.map(f,
|
||
function(t, e) {
|
||
return a.call(t, e, f, s)
|
||
})) : f
|
||
})
|
||
},
|
||
r.matches = function(t, e) {
|
||
return n(e,
|
||
function(e, n, r) {
|
||
return (!e || o(t, e)) && (!n || n.call(t, null, r) === t)
|
||
})
|
||
}
|
||
} (c),
|
||
function(t) {
|
||
function e(t, e, n, r) {
|
||
return Math.abs(t - e) >= Math.abs(n - r) ? t - e > 0 ? "Left": "Right": n - r > 0 ? "Up": "Down"
|
||
}
|
||
function n() {
|
||
l = null,
|
||
p.last && (p.el.trigger("longTap"), p = {})
|
||
}
|
||
function r() {
|
||
l && clearTimeout(l),
|
||
l = null
|
||
}
|
||
function i() {
|
||
s && clearTimeout(s),
|
||
c && clearTimeout(c),
|
||
u && clearTimeout(u),
|
||
l && clearTimeout(l),
|
||
s = c = u = l = null,
|
||
p = {}
|
||
}
|
||
function o(t) {
|
||
return ("touch" == t.pointerType || t.pointerType == t.MSPOINTER_TYPE_TOUCH) && t.isPrimary
|
||
}
|
||
function a(t, e) {
|
||
return t.type == "pointer" + e || t.type.toLowerCase() == "mspointer" + e
|
||
}
|
||
var s, c, u, l, f, p = {};
|
||
t(document).ready(function() {
|
||
var h, d, m, v, g = 0,
|
||
y = 0;
|
||
"MSGesture" in window && (f = new MSGesture, f.target = document.body),
|
||
t(document).bind("MSGestureEnd",
|
||
function(t) {
|
||
var e = t.velocityX > 1 ? "Right": t.velocityX < -1 ? "Left": t.velocityY > 1 ? "Down": t.velocityY < -1 ? "Up": null;
|
||
e && (p.el.trigger("swipe"), p.el.trigger("swipe" + e))
|
||
}).on("touchstart MSPointerDown pointerdown",
|
||
function(e) { (v = a(e, "down")) && !o(e) || (m = v ? e: e.touches[0], e.touches && 1 === e.touches.length && p.x2 && (p.x2 = void 0, p.y2 = void 0), h = Date.now(), d = h - (p.last || h), p.el = t("tagName" in m.target ? m.target: m.target.parentNode), s && clearTimeout(s), p.x1 = m.pageX, p.y1 = m.pageY, d > 0 && d <= 250 && (p.isDoubleTap = !0), p.last = h, l = setTimeout(n, 750), f && v && f.addPointer(e.pointerId))
|
||
}).on("touchmove MSPointerMove pointermove",
|
||
function(t) { (v = a(t, "move")) && !o(t) || (m = v ? t: t.touches[0], r(), p.x2 = m.pageX, p.y2 = m.pageY, g += Math.abs(p.x1 - p.x2), y += Math.abs(p.y1 - p.y2))
|
||
}).on("touchend MSPointerUp pointerup",
|
||
function(n) { (v = a(n, "up")) && !o(n) || (r(), p.x2 && Math.abs(p.x1 - p.x2) > 30 || p.y2 && Math.abs(p.y1 - p.y2) > 30 ? u = setTimeout(function() {
|
||
p.el && (p.el.trigger("swipe"), p.el.trigger("swipe" + e(p.x1, p.x2, p.y1, p.y2))),
|
||
p = {}
|
||
},
|
||
0) : "last" in p && (g < 30 && y < 30 ? c = setTimeout(function() {
|
||
var e = t.Event("tap");
|
||
e.pageX = p.x2 || p.x1 || 0,
|
||
e.pageY = p.y2 || p.y1 || 0,
|
||
e.cancelTouch = i,
|
||
p.el && p.el.trigger(e),
|
||
p.isDoubleTap ? (p.el && p.el.trigger("doubleTap"), p = {}) : s = setTimeout(function() {
|
||
s = null,
|
||
p.el && p.el.trigger("singleTap"),
|
||
p = {}
|
||
},
|
||
250)
|
||
},
|
||
0) : p = {}), g = y = 0)
|
||
}).on("touchcancel MSPointerCancel pointercancel", i),
|
||
t(window).on("scroll", i)
|
||
}),
|
||
["swipe", "swipeLeft", "swipeRight", "swipeUp", "swipeDown", "doubleTap", "tap", "singleTap", "longTap"].forEach(function(e) {
|
||
t.fn[e] = function(t) {
|
||
return this.on(e, t)
|
||
}
|
||
})
|
||
} (c),
|
||
function(t) {
|
||
if (t.os.ios) {
|
||
var e = function(t) {
|
||
return "tagName" in t ? t: t.parentNode
|
||
},
|
||
n = {};
|
||
t(document).bind("gesturestart",
|
||
function(t) {
|
||
var r = Date.now();
|
||
n.last;
|
||
n.target = e(t.target),
|
||
n.e1 = t.scale,
|
||
n.last = r
|
||
}).bind("gesturechange",
|
||
function(t) {
|
||
n.e2 = t.scale
|
||
}).bind("gestureend",
|
||
function(e) {
|
||
n.e2 > 0 ? (0 != Math.abs(n.e1 - n.e2) && t(n.target).trigger("pinch") && t(n.target).trigger("pinch" + (n.e1 - n.e2 > 0 ? "In": "Out")), n.e1 = n.e2 = n.last = 0) : "last" in n && (n = {})
|
||
}),
|
||
["pinch", "pinchIn", "pinchOut"].forEach(function(e) {
|
||
t.fn[e] = function(t) {
|
||
return this.bind(e, t)
|
||
}
|
||
})
|
||
}
|
||
} (c),
|
||
function(t) {
|
||
t.fn.end = function() {
|
||
return this.prevObject || t()
|
||
},
|
||
t.fn.andSelf = function() {
|
||
return this.add(this.prevObject || t())
|
||
},
|
||
"filter,add,not,eq,first,last,find,closest,parents,parent,children,siblings".split(",").forEach(function(e) {
|
||
var n = t.fn[e];
|
||
t.fn[e] = function() {
|
||
var t = n.apply(this, arguments);
|
||
return t.prevObject = this,
|
||
t
|
||
}
|
||
})
|
||
} (c),
|
||
function(t) {
|
||
void 0 === String.prototype.trim && (String.prototype.trim = function() {
|
||
return this.replace(/^\s+|\s+$/g, "")
|
||
}),
|
||
void 0 === Array.prototype.reduce && (Array.prototype.reduce = function(t) {
|
||
if (void 0 === this || null === this) throw new TypeError;
|
||
var e, n = Object(this),
|
||
r = n.length >>> 0,
|
||
i = 0;
|
||
if ("function" != typeof t) throw new TypeError;
|
||
if (0 == r && 1 == arguments.length) throw new TypeError;
|
||
if (arguments.length >= 2) e = arguments[1];
|
||
else for (;;) {
|
||
if (i in n) {
|
||
e = n[i++];
|
||
break
|
||
}
|
||
if (++i >= r) throw new TypeError
|
||
}
|
||
for (; i < r;) i in n && (e = t.call(void 0, e, n[i], i, n)),
|
||
i++;
|
||
return e
|
||
})
|
||
} (),
|
||
t.exports = c
|
||
},
|
||
function(t, e) {
|
||
var n = Math.ceil,
|
||
r = Math.floor;
|
||
t.exports = function(t) {
|
||
return isNaN(t = +t) ? 0 : (t > 0 ? r: n)(t)
|
||
}
|
||
},
|
||
function(t, e) {
|
||
t.exports = function(t) {
|
||
if (void 0 == t) throw TypeError("Can't call method on " + t);
|
||
return t
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(0),
|
||
i = n(1),
|
||
o = n(49),
|
||
a = n(3),
|
||
s = n(2),
|
||
c = function(t, e, n) {
|
||
var u, l, f, p = t & c.F,
|
||
h = t & c.G,
|
||
d = t & c.S,
|
||
m = t & c.P,
|
||
v = t & c.B,
|
||
g = t & c.W,
|
||
y = h ? i: i[e] || (i[e] = {}),
|
||
w = y.prototype,
|
||
b = h ? r: d ? r[e] : (r[e] || {}).prototype;
|
||
h && (n = e);
|
||
for (u in n)(l = !p && b && void 0 !== b[u]) && s(y, u) || (f = l ? b[u] : n[u], y[u] = h && "function" != typeof b[u] ? n[u] : v && l ? o(f, r) : g && b[u] == f ?
|
||
function(t) {
|
||
var e = function(e, n, r) {
|
||
if (this instanceof t) {
|
||
switch (arguments.length) {
|
||
case 0:
|
||
return new t;
|
||
case 1:
|
||
return new t(e);
|
||
case 2:
|
||
return new t(e, n)
|
||
}
|
||
return new t(e, n, r)
|
||
}
|
||
return t.apply(this, arguments)
|
||
};
|
||
return e.prototype = t.prototype,
|
||
e
|
||
} (f) : m && "function" == typeof f ? o(Function.call, f) : f, m && ((y.virtual || (y.virtual = {}))[u] = f, t & c.R && w && !w[u] && a(w, u, f)))
|
||
};
|
||
c.F = 1,
|
||
c.G = 2,
|
||
c.S = 4,
|
||
c.P = 8,
|
||
c.B = 16,
|
||
c.W = 32,
|
||
c.U = 64,
|
||
c.R = 128,
|
||
t.exports = c
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(8);
|
||
t.exports = function(t, e) {
|
||
if (!r(t)) return t;
|
||
var n, i;
|
||
if (e && "function" == typeof(n = t.toString) && !r(i = n.call(t))) return i;
|
||
if ("function" == typeof(n = t.valueOf) && !r(i = n.call(t))) return i;
|
||
if (!e && "function" == typeof(n = t.toString) && !r(i = n.call(t))) return i;
|
||
throw TypeError("Can't convert object to primitive value")
|
||
}
|
||
},
|
||
function(t, e) {
|
||
t.exports = {}
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(35),
|
||
i = n(24);
|
||
t.exports = Object.keys ||
|
||
function(t) {
|
||
return r(t, i)
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(23)("keys"),
|
||
i = n(14);
|
||
t.exports = function(t) {
|
||
return r[t] || (r[t] = i(t))
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(1),
|
||
i = n(0),
|
||
o = i["__core-js_shared__"] || (i["__core-js_shared__"] = {}); (t.exports = function(t, e) {
|
||
return o[t] || (o[t] = void 0 !== e ? e: {})
|
||
})("versions", []).push({
|
||
version: r.version,
|
||
mode: n(11) ? "pure": "global",
|
||
copyright: "© 2018 Denis Pushkarev (zloirock.ru)"
|
||
})
|
||
},
|
||
function(t, e) {
|
||
t.exports = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(4).f,
|
||
i = n(2),
|
||
o = n(7)("toStringTag");
|
||
t.exports = function(t, e, n) {
|
||
t && !i(t = n ? t: t.prototype, o) && r(t, o, {
|
||
configurable: !0,
|
||
value: e
|
||
})
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
e.f = n(7)
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(0),
|
||
i = n(1),
|
||
o = n(11),
|
||
a = n(26),
|
||
s = n(4).f;
|
||
t.exports = function(t) {
|
||
var e = i.Symbol || (i.Symbol = o ? {}: r.Symbol || {});
|
||
"_" == t.charAt(0) || t in e || s(e, t, {
|
||
value: a.f(t)
|
||
})
|
||
}
|
||
},
|
||
function(t, e) {
|
||
e.f = {}.propertyIsEnumerable
|
||
},
|
||
function(t, e, n) {
|
||
t.exports = {
|
||
default:
|
||
n(44),
|
||
__esModule: !0
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
"use strict";
|
||
var r = n(11),
|
||
i = n(18),
|
||
o = n(33),
|
||
a = n(3),
|
||
s = n(20),
|
||
c = n(51),
|
||
u = n(25),
|
||
l = n(37),
|
||
f = n(7)("iterator"),
|
||
p = !([].keys && "next" in [].keys()),
|
||
h = function() {
|
||
return this
|
||
};
|
||
t.exports = function(t, e, n, d, m, v, g) {
|
||
c(n, e, d);
|
||
var y, w, b, _ = function(t) {
|
||
if (!p && t in k) return k[t];
|
||
switch (t) {
|
||
case "keys":
|
||
case "values":
|
||
return function() {
|
||
return new n(this, t)
|
||
}
|
||
}
|
||
return function() {
|
||
return new n(this, t)
|
||
}
|
||
},
|
||
x = e + " Iterator",
|
||
j = "values" == m,
|
||
T = !1,
|
||
k = t.prototype,
|
||
S = k[f] || k["@@iterator"] || m && k[m],
|
||
E = S || _(m),
|
||
C = m ? j ? _("entries") : E: void 0,
|
||
O = "Array" == e ? k.entries || S: S;
|
||
if (O && (b = l(O.call(new t))) !== Object.prototype && b.next && (u(b, x, !0), r || "function" == typeof b[f] || a(b, f, h)), j && S && "values" !== S.name && (T = !0, E = function() {
|
||
return S.call(this)
|
||
}), r && !g || !p && !T && k[f] || a(k, f, E), s[e] = E, s[x] = h, m) if (y = {
|
||
values: j ? E: _("values"),
|
||
keys: v ? E: _("keys"),
|
||
entries: C
|
||
},
|
||
g) for (w in y) w in k || o(k, w, y[w]);
|
||
else i(i.P + i.F * (p || T), e, y);
|
||
return y
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
t.exports = !n(5) && !n(9)(function() {
|
||
return 7 != Object.defineProperty(n(32)("div"), "a", {
|
||
get: function() {
|
||
return 7
|
||
}
|
||
}).a
|
||
})
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(8),
|
||
i = n(0).document,
|
||
o = r(i) && r(i.createElement);
|
||
t.exports = function(t) {
|
||
return o ? i.createElement(t) : {}
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
t.exports = n(3)
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(12),
|
||
i = n(52),
|
||
o = n(24),
|
||
a = n(22)("IE_PROTO"),
|
||
s = function() {},
|
||
c = function() {
|
||
var t, e = n(32)("iframe"),
|
||
r = o.length;
|
||
for (e.style.display = "none", n(57).appendChild(e), e.src = "javascript:", t = e.contentWindow.document, t.open(), t.write("<script>document.F=Object<\/script>"), t.close(), c = t.F; r--;) delete c.prototype[o[r]];
|
||
return c()
|
||
};
|
||
t.exports = Object.create ||
|
||
function(t, e) {
|
||
var n;
|
||
return null !== t ? (s.prototype = r(t), n = new s, s.prototype = null, n[a] = t) : n = c(),
|
||
void 0 === e ? n: i(n, e)
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(2),
|
||
i = n(6),
|
||
o = n(54)(!1),
|
||
a = n(22)("IE_PROTO");
|
||
t.exports = function(t, e) {
|
||
var n, s = i(t),
|
||
c = 0,
|
||
u = [];
|
||
for (n in s) n != a && r(s, n) && u.push(n);
|
||
for (; e.length > c;) r(s, n = e[c++]) && (~o(u, n) || u.push(n));
|
||
return u
|
||
}
|
||
},
|
||
function(t, e) {
|
||
var n = {}.toString;
|
||
t.exports = function(t) {
|
||
return n.call(t).slice(8, -1)
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(2),
|
||
i = n(38),
|
||
o = n(22)("IE_PROTO"),
|
||
a = Object.prototype;
|
||
t.exports = Object.getPrototypeOf ||
|
||
function(t) {
|
||
return t = i(t),
|
||
r(t, o) ? t[o] : "function" == typeof t.constructor && t instanceof t.constructor ? t.constructor.prototype: t instanceof Object ? a: null
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(17);
|
||
t.exports = function(t) {
|
||
return Object(r(t))
|
||
}
|
||
},
|
||
function(t, e) {
|
||
e.f = Object.getOwnPropertySymbols
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(35),
|
||
i = n(24).concat("length", "prototype");
|
||
e.f = Object.getOwnPropertyNames ||
|
||
function(t) {
|
||
return r(t, i)
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
t.exports = {
|
||
default:
|
||
n(73),
|
||
__esModule: !0
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
"use strict";
|
||
function r(t) {
|
||
var e = new RegExp("(^| )" + t + "(?:=([^;]*))?(;|$)"),
|
||
n = document.cookie.match(e);
|
||
if (!n || !n[2]) return "";
|
||
var r = n[2];
|
||
try {
|
||
return /(%[0-9A-F]{2}){2,}/.test(r) ? decodeURIComponent(r) : unescape(r)
|
||
} catch(t) {
|
||
return unescape(r)
|
||
}
|
||
}
|
||
function i(t, e, n, r, i, o) {
|
||
var a = new Date,
|
||
n = arguments[2] || null,
|
||
r = arguments[3] || "/",
|
||
i = arguments[4] || null,
|
||
o = arguments[5] || !1;
|
||
n && a.setMinutes(a.getMinutes() + parseInt(n)),
|
||
document.cookie = t + "=" + escape(e) + (n ? ";expires=" + a.toGMTString() : "") + (r ? ";path=" + r: "") + (i ? ";domain=" + i: "") + (o ? ";secure": "")
|
||
}
|
||
function o(t, e, n, i) {
|
||
if (null != r(t)) {
|
||
var o = new Date;
|
||
o.setMinutes(o.getMinutes() - 1e3),
|
||
e = e || "/",
|
||
document.cookie = t + "=;expires=" + o.toGMTString() + (e ? ";path=" + e: "") + (n ? ";domain=" + n: "") + (i ? ";secure": "")
|
||
}
|
||
}
|
||
t.exports = {
|
||
get: r,
|
||
set: i,
|
||
del: o
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
"use strict";
|
||
function r() {
|
||
var t = tt("#slideWrapper");
|
||
t.length && (et.init({
|
||
tp: "img",
|
||
moveDom: t.find(".j_slide_list"),
|
||
moveChild: t.find(".j_slide_li"),
|
||
tab: t.find(".j_slide_nav span"),
|
||
len: t.find(".j_slide_li").length,
|
||
index: 1,
|
||
loopScroll: !0,
|
||
lockScrY: !0,
|
||
enableTransX: !0,
|
||
tabClass: "active",
|
||
autoTime: parseInt(tt(".slide_time").data("slide_time")) || 3e3,
|
||
fun: function(e) { ! pt && B(t) && tt(".j_slide_li").each(function(t) {
|
||
var n = tt(this);
|
||
t == e && !n.hasClass(st) && n.data("exposal_url") && (n.addClass(st), P(n.data("exposal_url"))),
|
||
t == e + 1 && n.find("img[init_src]").each(function() {
|
||
tt(this).attr("src", tt(this).attr("init_src")).removeAttr("init_src")
|
||
})
|
||
}),
|
||
tt(".j_slide_li").each(function(t) {
|
||
var n = tt(this);
|
||
t == e + 1 && n.find("img[init_src]").each(function() {
|
||
tt(this).attr("src", tt(this).attr("init_src")).removeAttr("init_src")
|
||
})
|
||
})
|
||
}
|
||
}), t.find(".j_slide_li").each(function(t) {
|
||
tt(this).css({
|
||
left: 100 * t + "%"
|
||
})
|
||
}))
|
||
}
|
||
function i() {
|
||
var t = document.querySelectorAll(".catchimg");
|
||
t = Array.prototype.slice.call(t, 0),
|
||
t.forEach(function(t) {
|
||
var e = t.querySelectorAll(".catchimg-skus");
|
||
e = Array.prototype.slice.call(e, 0);
|
||
var n = t.querySelectorAll(".catchimg-skus-link"),
|
||
r = t.clientWidth,
|
||
i = r / 750;
|
||
e.forEach(function(e, r) {
|
||
var o = 0,
|
||
a = e.getAttribute("data-server-position"),
|
||
s = e.getAttribute("data-server-width"),
|
||
c = e.getAttribute("data-server-ani"),
|
||
u = s * i,
|
||
l = e.querySelectorAll(".catchimg-skus-item");
|
||
l = Array.prototype.slice.call(l, 0);
|
||
var f = l.length;
|
||
if (0 != f) {
|
||
var p = n[r];
|
||
l.forEach(function(t) {
|
||
var e = t.getAttribute("jump-href"),
|
||
n = t.getAttribute("data-sku_index");
|
||
e += e.indexOf("?") > -1 ? "&innerIndex=" + n: "?innerIndex=" + n,
|
||
t.setAttribute("jump-href", e)
|
||
}),
|
||
p.onclick = function(t) {
|
||
t.stopPropagation(),
|
||
l[o].click()
|
||
},
|
||
0 === r && (t.onclick = function(t) {
|
||
l[o].click()
|
||
}),
|
||
a = a && a.split(","),
|
||
p.style.left = e.style.left = 1 * a[0] * i + "px",
|
||
p.style.top = e.style.top = 1 * a[1] * i + "px",
|
||
p.style.width = e.style.width = u + "px",
|
||
p.style.height = e.style.height = u + "px",
|
||
p.style.display = e.style.display = "block",
|
||
p.style.position = "absolute",
|
||
1 != f && 2 != c && (1 != c && 0 != c || setInterval(function() {
|
||
o++,
|
||
o >= f && (o = 0),
|
||
e.scrollTop = o ? o * u: 0
|
||
},
|
||
2e3))
|
||
}
|
||
})
|
||
})
|
||
}
|
||
function o() {
|
||
console.log("东家小院灰度");
|
||
var t = window.M_GREY[0].djxy[0],
|
||
e = t.url,
|
||
n = t.ratio;
|
||
if (! (1 * (JD.cookie.get("visitkey").substr( - 2, 2) || parseInt(100 * Math.random())) > 1 * n)) {
|
||
var r = document.querySelectorAll('[event_id="MHome_DGardenFloorExpo"]');
|
||
r = Array.prototype.slice.call(r, 0),
|
||
r.forEach(function(t) {
|
||
var n = t.querySelectorAll("[jump-href]");
|
||
n = Array.prototype.slice.call(n, 0),
|
||
n.forEach(function(t) {
|
||
var n = t.getAttribute("data-jump_params"),
|
||
r = t.getAttribute("data-jump_innerindex"),
|
||
i = (e || "https://h5.m.jd.com/active/yard-channel/index.html") + "?innerIndex=" + r + "&" + n;
|
||
t.setAttribute("jump-href", i)
|
||
})
|
||
})
|
||
}
|
||
}
|
||
function a() {
|
||
var t = tt(".j_slide_06001");
|
||
t.length && t.each(function() {
|
||
var t = tt(this),
|
||
e = !0,
|
||
n = t.find(".slide_06001_li");
|
||
if (n.length) {
|
||
var r = Math.min(t.width(), 640) * (358 / 375);
|
||
n.each(function() {
|
||
tt(this).width(r)
|
||
}),
|
||
et.init({
|
||
tp: "img",
|
||
viewDom: t,
|
||
moveDom: t.find(".slide_06001"),
|
||
moveChild: n,
|
||
len: n.length,
|
||
index: 1,
|
||
tab: t.find(".j_nav"),
|
||
loopScroll: !0,
|
||
lockScrY: !0,
|
||
enableTransX: !1,
|
||
tabClass: "active",
|
||
step: r,
|
||
autoTime: 3e3,
|
||
fun: function(i) {
|
||
if (e) {
|
||
e = !1;
|
||
var o = 0;
|
||
n = t.find(".slide_06001_li"),
|
||
n.each(function() {
|
||
tt(this).width(r),
|
||
tt(this).css({
|
||
left: o + "px"
|
||
}),
|
||
o += r
|
||
})
|
||
}
|
||
n.each(function(t) {
|
||
t == i ? tt(this).css({
|
||
transform: "scale(1)",
|
||
webKitTransform: "scale(1)"
|
||
}) : tt(this).css({
|
||
transform: "scale(0.9)",
|
||
webKitTransform: "scale(0.9)"
|
||
})
|
||
})
|
||
}
|
||
})
|
||
}
|
||
})
|
||
}
|
||
function s() {
|
||
function t() {
|
||
i = document.querySelector(".j_scroll_news .news_item");
|
||
var t = i.offsetHeight + 8;
|
||
r.style.transition = "transform 500ms ease-in-out",
|
||
r.style.webkitTransition = "transform 500ms ease-in-out",
|
||
r.style.transform = "translate3d(0, -" + t + "px, 0)",
|
||
r.style.webkitTransform = "translate3d(0, -" + t + "px, 0)"
|
||
}
|
||
function e() {
|
||
var t = setTimeout(function() {
|
||
clearTimeout(t),
|
||
r.style.transition = "none",
|
||
r.style.webkitTransition = "none",
|
||
r.style.transform = "translate3d(0, 0px, 0)",
|
||
r.style.webkitTransform = "translate3d(0, 0px, 0)",
|
||
i && r.removeChild(i),
|
||
i && r.appendChild(i)
|
||
},
|
||
0)
|
||
}
|
||
var n = "onwebkittransitionend" in window ? "webkitTransitionEnd": "transitionend",
|
||
r = document.querySelector(".j_scroll_news"),
|
||
i = null;
|
||
r && (r.addEventListener(n, e), document.querySelectorAll(".j_scroll_news .news_item").length > 1 && setInterval(t, 2e3))
|
||
}
|
||
function c() {
|
||
var t = document.querySelector(".j_curtain");
|
||
if (t) {
|
||
var e, n = function() {
|
||
mt = !0,
|
||
E(),
|
||
t && t.parentNode && t.parentNode.removeChild(t)
|
||
},
|
||
r = new Date,
|
||
i = "" + r.getFullYear() + (r.getMonth() + 1) + r.getDate();
|
||
if (at.local.getItem("m_jd_index_curtain") == i) return mt = !0,
|
||
void n();
|
||
at.local.setItem("m_jd_index_curtain", i, !0, 86400),
|
||
window.activeData && window.activeData.length ? (window.activeData.forEach(function(t) {
|
||
var n = t.starttime ? new Date(t.starttime) : -1 / 0,
|
||
i = t.endtime ? new Date(t.endtime) : 1 / 0;
|
||
r <= i && r >= n && (e = t)
|
||
}), e && e.pic && e.url && 1 == e.aShow && (tt(".j_curtain_link").attr("jump-href", e.url), tt(".j_curtain_pic").attr("src", window.JD ? JD.img.getImgUrl(e.pic) : e.pic), t.style.display = "block", t.style.opacity = 1, $({
|
||
eventId: "MHome_CurtainExpo"
|
||
})), tt(".j_close_curtain").click(function() {
|
||
n()
|
||
}), tt(".j_curtain").click(function(t) {
|
||
var e = tt(t.target || t.srcElement);
|
||
n(),
|
||
e.hasClass("j_curtain_pic") || e.hasClass("j_curtain_link") || $({
|
||
eventId: "MHome_CurtainClose"
|
||
})
|
||
})) : mt = !0
|
||
}
|
||
}
|
||
function u() {
|
||
var t = JD.url.getUrlParam("debug_skuids"),
|
||
e = t || nt.get("warehistory");
|
||
e = e.replace(/"/g, "").split(",").filter(function(t) {
|
||
return /^[0-9]+$/.test(t)
|
||
}).slice(0, 4),
|
||
e.length < 4 ||
|
||
function() {
|
||
p(e,
|
||
function(t) {
|
||
if (t && 4 === t.length) {
|
||
var n = it.formatJson("footPrintSkuTpl", {
|
||
skuList: t
|
||
});
|
||
tt(".j_foot_print_sku_list").html(n),
|
||
tt("#footPrintFloor").show(),
|
||
tt("#footPrintSeat").hide(),
|
||
$({
|
||
eventId: "MHome_FootFloorExpo"
|
||
}),
|
||
ot.autoLoadImage({
|
||
container: "footPrintFloor",
|
||
skip_invisible: !0
|
||
}),
|
||
h(e,
|
||
function(t) {
|
||
if (t) for (var e in t) {
|
||
var n = t[e].price,
|
||
r = n.split(".")[0],
|
||
i = n.split(".")[1],
|
||
o = '<span class="int">暂无报价</span>';
|
||
parseFloat(n) > 0 && (o = '<span class="symbol">¥</span> <span class="int">' + r + '</span> <span class="float" style="margin-left: 0;">.' + i + "</span>"),
|
||
tt('.j_fp_sku[sku_id="' + e + '"]').find(".j_fp_sku_price").html(o)
|
||
}
|
||
}),
|
||
l(e,
|
||
function(t) {
|
||
if (t) for (var e in t) tt('.j_fp_sku[sku_id="' + e + '"]').find(".j_fp_sku_tag").html(t[e])
|
||
})
|
||
} else tt("#footPrintFloor").hide()
|
||
})
|
||
} ()
|
||
}
|
||
function l(t, e) {
|
||
var n = m("getSkuPromotionInfo"),
|
||
r = [];
|
||
t && t.length && t.forEach(function(t) {
|
||
r.push("J_" + t)
|
||
}),
|
||
window[n] = function(t) {
|
||
console.log(t);
|
||
var n = {
|
||
3 : "赠券",
|
||
4 : "赠京豆",
|
||
5 : "赠品",
|
||
11 : "会员特价",
|
||
22 : "京豆优惠购",
|
||
55 : "满减",
|
||
57 : "加价购",
|
||
58 : "满赠",
|
||
59 : "多买优惠",
|
||
60 : "换购",
|
||
80 : "plus赠品"
|
||
},
|
||
r = {};
|
||
t && t.length && t.forEach(function(t) {
|
||
var e = t.pid,
|
||
i = [];
|
||
t && t.pf && t.pf.length && t.pf.forEach(function(t) {
|
||
if (n[t]) {
|
||
var e = n[t];
|
||
i.push('<span class="ellipse"> <em>' + e + "</em> <span>" + e + "</span> </span>")
|
||
}
|
||
}),
|
||
i.length && (r[e] = i.slice(0, 2).join(""))
|
||
}),
|
||
e && e(r)
|
||
},
|
||
rt.loadScript({
|
||
url: "//pf.3.cn/flags/mgets?skuids=" + r.join(",") + "&origin=1&source=m_index&area=" + d() + "&callback=" + n,
|
||
charset: "utf-8",
|
||
onError: function() {
|
||
e && e(!1)
|
||
},
|
||
onTimeout: function() {
|
||
e && e(!1)
|
||
}
|
||
})
|
||
}
|
||
function f(t) {
|
||
return t.indexOf("360buyimg.com") >= 0 ? JD.img.getImgUrl(t) : JD.img.getImgUrl("//img1" + ~~ (5 * Math.random()) + ".360buyimg.com/n7/" + t)
|
||
}
|
||
function p(t, e) {
|
||
var n = m("getSkuInfo");
|
||
window[n] = function(n) {
|
||
var r = [];
|
||
for (var i in n) {
|
||
var o = n[i];
|
||
r.push({
|
||
name: o.name,
|
||
img: f(o.imagePath),
|
||
link: "//item.m.jd.com/product/" + i + ".html",
|
||
skuId: i
|
||
})
|
||
}
|
||
r.sort(function(e, n) {
|
||
return t.indexOf(e.skuId) - t.indexOf(n.skuId)
|
||
}),
|
||
e && e(r)
|
||
},
|
||
rt.loadScript({
|
||
url: "//yx.3.cn/service/info.action?ids=" + t.join(",") + "&callback=" + n,
|
||
charset: "utf-8",
|
||
onError: function() {
|
||
e && e(!1)
|
||
},
|
||
onTimeout: function() {
|
||
e && e(!1)
|
||
}
|
||
})
|
||
}
|
||
function h(t, e) {
|
||
for (var n = {},
|
||
r = 0,
|
||
i = [], o = 0, a = 0;;) {
|
||
var s = t.slice(20 * r, 20 * (r + 1));
|
||
if (i.push(s), 20 * (r + 1) > t.length) break;
|
||
r++
|
||
}
|
||
i.forEach(function(t, r) {
|
||
var i = m("realTimePriceCB");
|
||
o++,
|
||
window[i] = function(t) {
|
||
a++;
|
||
for (var r = t.length,
|
||
i = 0; i < r; i++) n[t[i].id] = {
|
||
price: t[i].p,
|
||
plusPrice: t[i].tpp
|
||
};
|
||
o == a && e && e(n)
|
||
},
|
||
rt.loadScript({
|
||
url: "//pe.3.cn/prices/mgets?skuids=" + t.join(",") + "&area=" + d() + "&origin=4&source=wxsqpage&callback=" + i + "&t=" + Math.random(),
|
||
charset: "utf-8"
|
||
})
|
||
})
|
||
}
|
||
function d() {
|
||
return (JD.cookie.get("jdAddrId") || JD.cookie.get("jdLOCAddrId") || "1_72_4139_0").split("_").slice(0, 3).join("_")
|
||
}
|
||
function m(t) {
|
||
for (var e = t + Math.ceil(1e6 * Math.random()); window[e];) e = t + Math.ceil(1e6 * Math.random());
|
||
return e
|
||
}
|
||
function v(t, e, n) {
|
||
try {
|
||
JD.report.umpBiz({
|
||
bizid: 975,
|
||
operation: t,
|
||
result: e,
|
||
source: "0",
|
||
message: (n || "").replace(/[,,]/g, "").replace(/\s+/g, "")
|
||
}),
|
||
0 != e && console.log("%cUMP:" + n, "color:red;")
|
||
} catch(t) {
|
||
console.log(t)
|
||
}
|
||
}
|
||
function g() {
|
||
var t;
|
||
try {
|
||
t = window.m_recommend[0]
|
||
} catch(t) {
|
||
console.error("页面片/sinclude/update/wx/2018/9/m-recommend.html丢失!或者数据格式被修改!" + t)
|
||
}
|
||
return t || {}
|
||
}
|
||
function y(t, e) {
|
||
var n = g(),
|
||
r = n.recommendId || 6163,
|
||
i = 1 * n.pageCount || 22;
|
||
tt(".j_scroll_load_rec").show(),
|
||
0 == t && $({
|
||
eventId: "Mhome_BRecommendExpo"
|
||
}),
|
||
tt.ajax({
|
||
dataType: "jsonp",
|
||
url: "https://wqcoss.jd.com/mcoss/reclike/getrecinfo",
|
||
data: {
|
||
pi: t,
|
||
pc: i,
|
||
recpos: r,
|
||
hi: "{page:" + t + ",pagesize:" + i + "}"
|
||
},
|
||
success: function(r) {
|
||
if (v(2, 0, "猜你喜欢接口调用成功"), r.data instanceof Array && r.data.length) {
|
||
var i = tt(".j_similar_li").length;
|
||
r.data.forEach(function(e, o) {
|
||
if (1 == e.jpnonshow) e._showPrice0 = "待发布";
|
||
else if (0 == e.jpnonshow && e.jp) {
|
||
var a = e.jp / 100 + "";
|
||
if (e._showPrice0 = a.split(".")[0] || "", e._showPrice1 = a.split(".")[1] || "", e.dpicon && e.dpicon.icon > 0) {
|
||
var s = "¥ " + e.dpicon.p / 100;
|
||
e._dbPrice = 3 == e.dpicon.icon ? "<del>" + s + "</del>": s
|
||
}
|
||
e._priceTag = _(e),
|
||
e._dbPriceTag = x(e)
|
||
} else console.error("推荐数据缺少jp!!!");
|
||
if (e.yd && (e.yd._time = T(1e3 * e.yd.start) + "-" + T(1e3 * e.yd.end)), e.t = e.t.trim(), e._sourceValue = k(t, o, e, r.flow, r.impr), e._img = f(e.img), e._showIndex = ++i, n.iconCorner instanceof Array && n.iconCorner[0]) {
|
||
var c = n.iconCorner[0],
|
||
u = 1 * new Date(c.beginTime),
|
||
l = 1 * new Date(c.endTime),
|
||
p = 1 * new Date;
|
||
c && 1 == e.prom && p >= u && p <= l && (e._promTag = JD.img.getImgUrl(c.img, "30", "30"))
|
||
}
|
||
});
|
||
var o = it.formatJson("recSkuTpl", {
|
||
getImgUrl: w,
|
||
sourceUrl: "//st.360buyimg.com",
|
||
skuList: r.data
|
||
});
|
||
0 == t ? tt(".j_rec_goods_list").html(o) : tt(".j_rec_goods_list").append(o),
|
||
tt(".j_scroll_load_rec").hide(),
|
||
ot.autoLoadImage({
|
||
container: "recFloor",
|
||
skip_invisible: !0
|
||
});
|
||
var a = setTimeout(function() {
|
||
clearTimeout(a),
|
||
j(),
|
||
F()
|
||
},
|
||
200);
|
||
e && e(!0)
|
||
}
|
||
},
|
||
error: function() {
|
||
v(2, 1, "猜你喜欢接口调用出错"),
|
||
e && e(!1)
|
||
}
|
||
})
|
||
}
|
||
function w(t, e) {
|
||
switch (t) {
|
||
case "sku":
|
||
return f(e);
|
||
case "product-text":
|
||
return b(e);
|
||
default:
|
||
return ""
|
||
}
|
||
}
|
||
function b(t) {
|
||
var e = "";
|
||
try {
|
||
e = ppms_recom[0].iconList.filter(function(e) {
|
||
return e.key == t
|
||
}),
|
||
e = e[0].iconImg
|
||
} catch(t) {
|
||
console.error("页面片/sinclude/update/wx/2018/3/ppms_recom.shtml丢失,或者数据格式被篡改!" + t)
|
||
}
|
||
return e
|
||
}
|
||
function _(t) {
|
||
return t.paicon > 0 ? vt.paicon[t.paicon] || "": ""
|
||
}
|
||
function x(t) {
|
||
return t.dpicon instanceof Object && t.dpicon.icon > 0 ? vt.dbicon[t.dpicon.icon] || "": ""
|
||
}
|
||
function j() {
|
||
tt(".j_rec_goods_pic").each(function() {
|
||
var t = tt(this).parent().width();
|
||
t >= 50 && tt(this).css({
|
||
width: t,
|
||
height: t
|
||
})
|
||
})
|
||
}
|
||
function T(t) {
|
||
var e = new Date(t);
|
||
return e.getMonth() + 1 + "." + e.getDate()
|
||
}
|
||
function k(t, e, n, r, i) {
|
||
var o = n.sku,
|
||
a = n.source,
|
||
s = n.sid;
|
||
return [t, e, o, S("expid", i), r, s, a, "-100", S("reqsig", i), "-100", n.yd ? 1 : 0].join("_")
|
||
}
|
||
function S(t, e) {
|
||
var n = arguments[1] || window.location.search,
|
||
r = new RegExp(t + "=([^$|&]*)"),
|
||
i = n.substr(n.indexOf("?") + 1).match(r);
|
||
return null != i ? i[1] : ""
|
||
}
|
||
function E() {
|
||
if (mt && !gt) {
|
||
gt = !0;
|
||
window.getIpLocate = function(t) {
|
||
if (0 == t.code && t.data && "中国大陆" != t.data.countryName) {
|
||
var e = function() {
|
||
tt("#locatePop").hide(),
|
||
$({
|
||
eventId: "MHome_OverSeaClose"
|
||
})
|
||
};
|
||
$({
|
||
eventId: "MHome_OverSeaExpo"
|
||
}),
|
||
tt(".j_location_title").text(t.data.localCountryName),
|
||
tt(".j_location_desc").text(t.data.markedWords),
|
||
tt(".j_location_okay").text(t.data.buttonChange),
|
||
tt(".j_location_cancel").text(t.data.buttonStay),
|
||
tt("#locatePop").show(),
|
||
tt(".j_location_okay").click(function() {
|
||
$({
|
||
eventId: "MHome_OverSeaSwitch"
|
||
});
|
||
var e = setTimeout(function() {
|
||
clearTimeout(e),
|
||
tt("#locatePop").hide(),
|
||
C(t.data.mUrl)
|
||
},
|
||
ct)
|
||
}),
|
||
tt(".j_location_cancel").click(function() {
|
||
$({
|
||
eventId: "MHome_OverSeaStay"
|
||
}),
|
||
tt("#locatePop").hide()
|
||
}),
|
||
tt(".j_location_mask").click(function() {
|
||
e()
|
||
}),
|
||
tt(".j_location_close").click(function() {
|
||
e()
|
||
})
|
||
}
|
||
},
|
||
rt.loadScript({
|
||
url: "//ip-dict.joybuy.com/countryQuery/get_country_by_ip?callback=getIpLocate",
|
||
charset: "utf-8"
|
||
})
|
||
}
|
||
}
|
||
function C(t) {
|
||
O(t === dt),
|
||
location.href = t
|
||
}
|
||
function O(t) {
|
||
var e = window.pageYOffset,
|
||
n = M();
|
||
ut.length && (n.sksLeft = t ? 0 : ut.scrollLeft()),
|
||
n.st = e,
|
||
D(n)
|
||
}
|
||
function D(t) {
|
||
var e = [];
|
||
for (var n in t) e.push(n + "=" + t[n]);
|
||
var r = e.length ? "#" + e.join("&") : "";
|
||
history.replaceState("", document.title, location.href.replace(location.hash, "") + r)
|
||
}
|
||
function I(t) {
|
||
var e = M();
|
||
delete e[t],
|
||
D(e)
|
||
}
|
||
function M() {
|
||
var t = location.hash.substr(1),
|
||
e = {};
|
||
return t.replace(/([^?&]+)=([^?&]+)/g,
|
||
function(t, n, r) {
|
||
e[n] = r
|
||
}),
|
||
e
|
||
}
|
||
function P(t) { (new Image).src = t
|
||
}
|
||
function A() {
|
||
function t() {
|
||
O(),
|
||
a.css({
|
||
position: "absolute"
|
||
}),
|
||
pt = !0,
|
||
ft.unbind("scroll", n),
|
||
i.hide(),
|
||
tt("#commonNav").hide(),
|
||
tt("#mainContent").hide(),
|
||
tt("#mCommonFooter").hide(),
|
||
a.removeClass("skin_transparent"),
|
||
a.css({
|
||
top: "0"
|
||
});
|
||
var t = setTimeout(function() {
|
||
clearTimeout(t),
|
||
ft.unbind("scroll", n)
|
||
},
|
||
100)
|
||
}
|
||
function e() {
|
||
a.css({
|
||
position: "fixed"
|
||
}),
|
||
pt = !1,
|
||
tt("#commonNav").show(),
|
||
tt("#mainContent").show(),
|
||
tt("#mCommonFooter").show(),
|
||
a.addClass("skin_transparent"),
|
||
ft.unbind("scroll", n).scroll(n),
|
||
ft.scroll(),
|
||
V(!0)
|
||
}
|
||
function n() {
|
||
c && (setTimeout(function() {
|
||
if (c = !0, u || window.pageYOffset >= 5 || !i.data("show") || pt) a.css({
|
||
top: 0
|
||
}),
|
||
i.hide(),
|
||
o.hide();
|
||
else {
|
||
i.show(),
|
||
o.show();
|
||
var t = i.length ? i.offset().height: 0;
|
||
a.css({
|
||
top: t
|
||
})
|
||
}
|
||
r(window.pageYOffset > 5 ? "home_normal": "home_transparent")
|
||
},
|
||
0), c = !1)
|
||
}
|
||
function r(t) {
|
||
window.JD && window.JD.M && window.JD.M.smartbox && window.JD.M.smartbox.changeTheam && JD.M.smartbox.changeTheam(t)
|
||
}
|
||
var i = tt("#m_common_tip"),
|
||
o = tt("#pannelSeat"),
|
||
a = tt(".j_smart_box_wrapper");
|
||
window.JD && window.JD.M && window.JD.M.smartbox && window.JD.M.smartbox.init && (window.JD.M.smartbox.init({
|
||
css: "",
|
||
sf: "home",
|
||
isLogin: lt,
|
||
smartboxBlock: "searchWrapper",
|
||
shortCutShow: !0,
|
||
showCb: function() {
|
||
t()
|
||
},
|
||
hideCb: function() {
|
||
e()
|
||
}
|
||
}), JD.M.smartbox.setLogin(lt));
|
||
var s = tt("#slideWrapper").length ? tt("#slideWrapper").offset().height: 0,
|
||
c = !0,
|
||
u = navigator.userAgent.indexOf("UCBrowser") > -1;
|
||
s ? (ft.unbind("scroll", n).scroll(n), ft.scroll()) : r("home_normal")
|
||
}
|
||
function L() {
|
||
try {
|
||
MPing.inputs.Click.attachEvent()
|
||
} catch(t) {}
|
||
var t = tt(".j_back_to_top");
|
||
window.addEventListener("load",
|
||
function() {
|
||
ht = !0,
|
||
u(),
|
||
E(),
|
||
V(!0)
|
||
}),
|
||
t.click(function() {
|
||
ft.scrollTop(0)
|
||
});
|
||
var e = !0;
|
||
ft.scroll(function() {
|
||
if (e) {
|
||
e = !1;
|
||
var n = setTimeout(function() {
|
||
e = !0,
|
||
clearTimeout(n),
|
||
window.pageYOffset > window.innerHeight ? t.show() : t.hide()
|
||
},
|
||
200)
|
||
}
|
||
}),
|
||
J(),
|
||
U()
|
||
}
|
||
function N() {
|
||
function t() { (o && n || n && B(tt(".j_rec_load_wrapper"))) && (o = !1, n = !1, y(e,
|
||
function(i) {
|
||
n = !0,
|
||
e >= s ? (n = !1, r.show()) : n = !0,
|
||
i && e++,
|
||
ft.unbind("scroll", t);
|
||
var o = setTimeout(function() {
|
||
clearTimeout(o),
|
||
ft.unbind("scroll", t).scroll(t)
|
||
},
|
||
1e3)
|
||
})),
|
||
i || (i = setTimeout(function() {
|
||
clearTimeout(i),
|
||
j(),
|
||
F()
|
||
},
|
||
100))
|
||
}
|
||
var e = 1,
|
||
n = !0,
|
||
r = tt(".j_click_load_rec");
|
||
tt("#recFloor").delegate("[data-click_expo_url]", "click",
|
||
function() {
|
||
var t = tt(this);
|
||
t.data("click_expo_url") && P(t.data("click_expo_url"))
|
||
});
|
||
var i, o = !0,
|
||
a = g(),
|
||
s = 1 * a.scrollPage || 2;
|
||
ft.unbind("scroll", t).scroll(t),
|
||
t(),
|
||
r.click(function() {
|
||
r.hide(),
|
||
y(e,
|
||
function(n) {
|
||
n && e++,
|
||
r.show(),
|
||
ft.unbind("scroll", t)
|
||
})
|
||
})
|
||
}
|
||
function F() {
|
||
var t = tt(".j_similar_goods:first-child").find(".similar-product").height();
|
||
tt(".similar-shop .shop-posre").each(function() {
|
||
tt(this).height(t - 1)
|
||
})
|
||
}
|
||
function R() {
|
||
tt(".j_linear_color").each(function() {
|
||
var t = tt(this).data("color");
|
||
t && -1 == t.indexOf(",") && tt(this).css({
|
||
color: t
|
||
})
|
||
})
|
||
}
|
||
function q(t) {
|
||
var e = (t.data("event_param") || "") + "";
|
||
if (e && ("j_event_param" == e && (e = t.find(".j_event_param").text()), 0 === e.indexOf("j_garden_event_param"))) {
|
||
e = e.replace(/^j_garden_event_param\((.*)\)$/, "$1");
|
||
var n = e.split("|"),
|
||
r = {
|
||
biinfo: n[0] || "",
|
||
floorid: n[1] || "",
|
||
moduleid: n[2] || "",
|
||
position: n[3] || "",
|
||
sku: n[4] || "",
|
||
theme: n[5] || ""
|
||
};
|
||
e = (0, Q.
|
||
default)(r)
|
||
}
|
||
if ($({
|
||
eventId:
|
||
t.data("event_id"),
|
||
eventLevel: t.data("event_level"),
|
||
eventParam: e
|
||
}), t.attr("jump-href")) var i = setTimeout(function() {
|
||
clearTimeout(i),
|
||
C(t.attr("jump-href"))
|
||
},
|
||
ct)
|
||
}
|
||
function J() {
|
||
tt(document).delegate("[data-event_id]", "click",
|
||
function() {
|
||
q(tt(this))
|
||
})
|
||
}
|
||
function $(t) {
|
||
if (t.eventId) try {
|
||
var e = location.origin + location.pathname,
|
||
n = new MPing.inputs.Click(t.eventId);
|
||
n.event_param = t.eventParam || "",
|
||
n.event_level = t.eventLevel || "",
|
||
e && (n.page_name = e),
|
||
n.page_param = "B",
|
||
n.updateEventSeries(); (new MPing).send(n)
|
||
} catch(t) {}
|
||
}
|
||
function U() {
|
||
var t = !0;
|
||
ft.scroll(function() {
|
||
if (t) {
|
||
t = !1;
|
||
var e = setTimeout(function() {
|
||
clearTimeout(e),
|
||
t = !0;
|
||
var n = tt(".j_expo");
|
||
n.length && n.each(function() {
|
||
var t = tt(this);
|
||
t.hasClass(st) || !t.is(":hidden") && B(t) && ($({
|
||
eventId: t.attr("event_id"),
|
||
eventLevel: t.attr("event_level"),
|
||
eventParam: t.attr("event_param")
|
||
}), t.addClass(st))
|
||
});
|
||
var r = tt(".j_similar_li");
|
||
r.length && r.each(function() {
|
||
var t = tt(this);
|
||
if (!t.hasClass(st) && !t.is(":hidden") && B(t)) {
|
||
var e = t.attr("event_param");
|
||
$({
|
||
eventId: t.attr("event_id"),
|
||
eventParam: e
|
||
}),
|
||
t.addClass(st),
|
||
tt('.j_similar_li[event_param="' + e + '"]').addClass(st)
|
||
}
|
||
})
|
||
},
|
||
0)
|
||
}
|
||
})
|
||
}
|
||
function B(t) {
|
||
var e = t.offset().top,
|
||
n = t.offset().height,
|
||
r = e + n,
|
||
i = ft.scrollTop(),
|
||
o = ft.height();
|
||
return e >= i && e < i + o || (r >= i && r < i + o || e <= i && r >= i + o)
|
||
}
|
||
function H() {
|
||
var t = new Date,
|
||
e = t.getFullYear() + "/" + (t.getMonth() + 1) + "/" + t.getDate(),
|
||
n = t.getHours(),
|
||
r = n <= 5 ? 0 : Math.ceil((n - 5) / 2);
|
||
return [{
|
||
name: "0点场",
|
||
endTime: new Date(e + " 06:00:00").getTime()
|
||
},
|
||
{
|
||
name: "6点场",
|
||
endTime: new Date(e + " 08:00:00").getTime()
|
||
},
|
||
{
|
||
name: "8点场",
|
||
endTime: new Date(e + " 10:00:00").getTime()
|
||
},
|
||
{
|
||
name: "10点场",
|
||
endTime: new Date(e + " 12:00:00").getTime()
|
||
},
|
||
{
|
||
name: "12点场",
|
||
endTime: new Date(e + " 14:00:00").getTime()
|
||
},
|
||
{
|
||
name: "14点场",
|
||
endTime: new Date(e + " 16:00:00").getTime()
|
||
},
|
||
{
|
||
name: "16点场",
|
||
endTime: new Date(e + " 18:00:00").getTime()
|
||
},
|
||
{
|
||
name: "18点场",
|
||
endTime: new Date(e + " 20:00:00").getTime()
|
||
},
|
||
{
|
||
name: "20点场",
|
||
endTime: new Date(e + " 22:00:00").getTime()
|
||
},
|
||
{
|
||
name: "22点场",
|
||
endTime: new Date(e + " 00:00:00").getTime() + 864e5
|
||
}][r]
|
||
}
|
||
function W() {
|
||
function t() {
|
||
var t = setTimeout(function() {
|
||
clearTimeout(t);
|
||
var e = tt(".j_sk_list li:first-child img").width(),
|
||
n = tt(".j_sk_list li:first-child img").height();
|
||
tt(".j_sk_list").find("img").each(function() {
|
||
var t = tt(this);
|
||
t.attr("data-src") && t.css({
|
||
width: e + "px",
|
||
height: n + "px"
|
||
})
|
||
})
|
||
},
|
||
0)
|
||
}
|
||
function e() {
|
||
c && t(),
|
||
c = !1;
|
||
var e = ut.scrollLeft();
|
||
a || (n.each(function() {
|
||
var t = tt(this),
|
||
n = t.offset().left,
|
||
r = n + t.width(),
|
||
i = n - e,
|
||
o = r - e; (i <= window.innerWidth && i >= 0 || o <= window.innerWidth && o >= 0) && t.find("img").each(function() {
|
||
var t = tt(this);
|
||
t.attr("data-src") && t.attr("src", t.attr("data-src")).removeAttr("data-src")
|
||
})
|
||
}), ut.find("img[data-src]").length || (a = !0)),
|
||
e + ut.width() + 5 >= tt(".j_sk_list").width() ? (s = !0, o && clearTimeout(o), o = setTimeout(function() {
|
||
clearTimeout(o),
|
||
s && tt(".j_scroll_more_sec_link").click()
|
||
},
|
||
200)) : s = !1
|
||
}
|
||
if (ut.length) {
|
||
var n = tt(".j_sk_list li"),
|
||
r = 0,
|
||
i = ut.offset().width / 4.65;
|
||
n.each(function() {
|
||
tt(this).hasClass("seckill-all-item") ? r += tt(this).width() : (tt(this).width(i), r += i)
|
||
}),
|
||
tt(".j_sk_list").css({
|
||
width: r + 5
|
||
}),
|
||
ut.unbind("scroll", e).scroll(e);
|
||
var o, a = !1,
|
||
s = !1,
|
||
c = !0,
|
||
u = H();
|
||
tt(".j_sec_order").text(u.name),
|
||
tt(".j_more_sec_link").each(function() {
|
||
tt(this).attr("jump-href", dt)
|
||
});
|
||
var l = u.endTime,
|
||
f = l - (new Date).getTime(),
|
||
p = setInterval(function() {
|
||
f <= 0 && clearInterval(p),
|
||
f -= 1e3;
|
||
var t = z(f);
|
||
tt(".j_sk_h").text(t.h),
|
||
tt(".j_sk_m").text(t.m),
|
||
tt(".j_sk_s").text(t.s)
|
||
},
|
||
1e3)
|
||
}
|
||
}
|
||
function z(t) {
|
||
t /= 1e3;
|
||
var e = t / 3600,
|
||
n = t % 3600 / 60,
|
||
r = t % 60;
|
||
return {
|
||
h: Math.floor(e) < 10 ? "0" + Math.floor(e) : Math.floor(e),
|
||
s: Math.floor(r) < 10 ? "0" + Math.floor(r) : Math.floor(r),
|
||
m: Math.floor(n) < 10 ? "0" + Math.floor(n) : Math.floor(n)
|
||
}
|
||
}
|
||
function V(t) {
|
||
var e = JD.url.getHashParam("st");
|
||
e && parseInt(e) > 0 && ft.scrollTop(parseInt(e)),
|
||
(tt("body").offset().height >= parseInt(e) || t) && I("st"),
|
||
G()
|
||
}
|
||
function G() {
|
||
var t = JD.url.getHashParam("sksLeft"),
|
||
e = t ? parseInt(t) / 2 : 0,
|
||
n = 0;
|
||
I("sksLeft");
|
||
var r = setInterval(function() {
|
||
n += e,
|
||
n >= parseInt(t) && clearInterval(r),
|
||
t && ut.length && ut.scrollLeft(n)
|
||
},
|
||
50)
|
||
}
|
||
function X() {
|
||
var t = nt.get("warehistory");
|
||
t = t.replace(/"/g, "").split(",").filter(function(t) {
|
||
return /^[0-9]+$/.test(t)
|
||
}).slice(0, 4),
|
||
$({
|
||
eventId: "MHome_PageExpo",
|
||
eventParam: "null_A1_" + (4 === t.length ? "B2": "A2")
|
||
})
|
||
}
|
||
function Y() {
|
||
var t, e, n, r;
|
||
t = tt(".j_slide_li").length > 0,
|
||
r = tt(".j_app_box").length > 0,
|
||
e = tt(".j_sk_li").length > 0,
|
||
n = tt(".j_scroll_news li").length > 0;
|
||
var i = "";
|
||
t || (i += ";首焦展示异常"),
|
||
r || (i += ";百宝箱展示异常"),
|
||
n || (i += ";京东快报展示异常"),
|
||
e || (i += ";京东秒杀展示异常"),
|
||
t && r && e && n ? v(3, 0, "m首页首屏展示正常") : v(3, 1, "m首页首屏展示异常," + i)
|
||
}
|
||
function K() {
|
||
Y(),
|
||
A(),
|
||
r(),
|
||
s(),
|
||
a(),
|
||
R(),
|
||
c(),
|
||
W(),
|
||
N(),
|
||
X();
|
||
try {
|
||
setTimeout(i, 0)
|
||
} catch(t) {
|
||
console.error("【抓图通栏】", t)
|
||
}
|
||
try {
|
||
setTimeout(o, 0)
|
||
} catch(t) {
|
||
console.error("【东家小院灰度跳转】", t)
|
||
}
|
||
ot.autoLoadImage({
|
||
container: "floorContent",
|
||
skip_invisible: !0
|
||
})
|
||
}
|
||
var Z = n(29),
|
||
Q = function(t) {
|
||
return t && t.__esModule ? t: {
|
||
default:
|
||
t
|
||
}
|
||
} (Z),
|
||
tt = n(15),
|
||
et = n(76),
|
||
nt = n(42),
|
||
rt = n(77),
|
||
it = n(78),
|
||
ot = n(79),
|
||
at = (n(81), n(82)),
|
||
st = "expo_loaded",
|
||
ct = 250,
|
||
ut = tt(".j_sk_wrapper"),
|
||
lt = !(!_cookiePtKey || !_cookiePtPin),
|
||
ft = tt(window),
|
||
pt = !1,
|
||
ht = !1,
|
||
dt = "//wqs.jd.com/portal/wx/seckill_m/index.shtml",
|
||
mt = !1,
|
||
vt = {
|
||
paicon: {
|
||
1 : "满减",
|
||
2 : "券",
|
||
3 : "闪购",
|
||
4 : "新品",
|
||
5 : "秒杀",
|
||
6 : "拼购"
|
||
},
|
||
dbicon: {
|
||
1 : "sam-price",
|
||
2 : "plus-price",
|
||
3 : "rec-seckill-price"
|
||
}
|
||
},
|
||
gt = !1;
|
||
window._PFM_TIMING && (window._PFM_TIMING[3] = new Date),
|
||
function() {
|
||
K(),
|
||
L()
|
||
} ()
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(1),
|
||
i = r.JSON || (r.JSON = {
|
||
stringify: JSON.stringify
|
||
});
|
||
t.exports = function(t) {
|
||
return i.stringify.apply(i, arguments)
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
t.exports = {
|
||
default:
|
||
n(46),
|
||
__esModule: !0
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
n(47),
|
||
n(58),
|
||
t.exports = n(26).f("iterator")
|
||
},
|
||
function(t, e, n) {
|
||
"use strict";
|
||
var r = n(48)(!0);
|
||
n(30)(String, "String",
|
||
function(t) {
|
||
this._t = String(t),
|
||
this._i = 0
|
||
},
|
||
function() {
|
||
var t, e = this._t,
|
||
n = this._i;
|
||
return n >= e.length ? {
|
||
value: void 0,
|
||
done: !0
|
||
}: (t = r(e, n), this._i += t.length, {
|
||
value: t,
|
||
done: !1
|
||
})
|
||
})
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(16),
|
||
i = n(17);
|
||
t.exports = function(t) {
|
||
return function(e, n) {
|
||
var o, a, s = String(i(e)),
|
||
c = r(n),
|
||
u = s.length;
|
||
return c < 0 || c >= u ? t ? "": void 0 : (o = s.charCodeAt(c), o < 55296 || o > 56319 || c + 1 === u || (a = s.charCodeAt(c + 1)) < 56320 || a > 57343 ? t ? s.charAt(c) : o: t ? s.slice(c, c + 2) : a - 56320 + (o - 55296 << 10) + 65536)
|
||
}
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(50);
|
||
t.exports = function(t, e, n) {
|
||
if (r(t), void 0 === e) return t;
|
||
switch (n) {
|
||
case 1:
|
||
return function(n) {
|
||
return t.call(e, n)
|
||
};
|
||
case 2:
|
||
return function(n, r) {
|
||
return t.call(e, n, r)
|
||
};
|
||
case 3:
|
||
return function(n, r, i) {
|
||
return t.call(e, n, r, i)
|
||
}
|
||
}
|
||
return function() {
|
||
return t.apply(e, arguments)
|
||
}
|
||
}
|
||
},
|
||
function(t, e) {
|
||
t.exports = function(t) {
|
||
if ("function" != typeof t) throw TypeError(t + " is not a function!");
|
||
return t
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
"use strict";
|
||
var r = n(34),
|
||
i = n(13),
|
||
o = n(25),
|
||
a = {};
|
||
n(3)(a, n(7)("iterator"),
|
||
function() {
|
||
return this
|
||
}),
|
||
t.exports = function(t, e, n) {
|
||
t.prototype = r(a, {
|
||
next: i(1, n)
|
||
}),
|
||
o(t, e + " Iterator")
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(4),
|
||
i = n(12),
|
||
o = n(21);
|
||
t.exports = n(5) ? Object.defineProperties: function(t, e) {
|
||
i(t);
|
||
for (var n, a = o(e), s = a.length, c = 0; s > c;) r.f(t, n = a[c++], e[n]);
|
||
return t
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(36);
|
||
t.exports = Object("z").propertyIsEnumerable(0) ? Object: function(t) {
|
||
return "String" == r(t) ? t.split("") : Object(t)
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(6),
|
||
i = n(55),
|
||
o = n(56);
|
||
t.exports = function(t) {
|
||
return function(e, n, a) {
|
||
var s, c = r(e),
|
||
u = i(c.length),
|
||
l = o(a, u);
|
||
if (t && n != n) {
|
||
for (; u > l;) if ((s = c[l++]) != s) return ! 0
|
||
} else for (; u > l; l++) if ((t || l in c) && c[l] === n) return t || l || 0;
|
||
return ! t && -1
|
||
}
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(16),
|
||
i = Math.min;
|
||
t.exports = function(t) {
|
||
return t > 0 ? i(r(t), 9007199254740991) : 0
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(16),
|
||
i = Math.max,
|
||
o = Math.min;
|
||
t.exports = function(t, e) {
|
||
return t = r(t),
|
||
t < 0 ? i(t + e, 0) : o(t, e)
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(0).document;
|
||
t.exports = r && r.documentElement
|
||
},
|
||
function(t, e, n) {
|
||
n(59);
|
||
for (var r = n(0), i = n(3), o = n(20), a = n(7)("toStringTag"), s = "CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","), c = 0; c < s.length; c++) {
|
||
var u = s[c],
|
||
l = r[u],
|
||
f = l && l.prototype;
|
||
f && !f[a] && i(f, a, u),
|
||
o[u] = o.Array
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
"use strict";
|
||
var r = n(60),
|
||
i = n(61),
|
||
o = n(20),
|
||
a = n(6);
|
||
t.exports = n(30)(Array, "Array",
|
||
function(t, e) {
|
||
this._t = a(t),
|
||
this._i = 0,
|
||
this._k = e
|
||
},
|
||
function() {
|
||
var t = this._t,
|
||
e = this._k,
|
||
n = this._i++;
|
||
return ! t || n >= t.length ? (this._t = void 0, i(1)) : "keys" == e ? i(0, n) : "values" == e ? i(0, t[n]) : i(0, [n, t[n]])
|
||
},
|
||
"values"),
|
||
o.Arguments = o.Array,
|
||
r("keys"),
|
||
r("values"),
|
||
r("entries")
|
||
},
|
||
function(t, e) {
|
||
t.exports = function() {}
|
||
},
|
||
function(t, e) {
|
||
t.exports = function(t, e) {
|
||
return {
|
||
value: e,
|
||
done: !!t
|
||
}
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
t.exports = {
|
||
default:
|
||
n(63),
|
||
__esModule: !0
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
n(64),
|
||
n(70),
|
||
n(71),
|
||
n(72),
|
||
t.exports = n(1).Symbol
|
||
},
|
||
function(t, e, n) {
|
||
"use strict";
|
||
var r = n(0),
|
||
i = n(2),
|
||
o = n(5),
|
||
a = n(18),
|
||
s = n(33),
|
||
c = n(65).KEY,
|
||
u = n(9),
|
||
l = n(23),
|
||
f = n(25),
|
||
p = n(14),
|
||
h = n(7),
|
||
d = n(26),
|
||
m = n(27),
|
||
v = n(66),
|
||
g = n(67),
|
||
y = n(12),
|
||
w = n(8),
|
||
b = n(6),
|
||
_ = n(19),
|
||
x = n(13),
|
||
j = n(34),
|
||
T = n(68),
|
||
k = n(69),
|
||
S = n(4),
|
||
E = n(21),
|
||
C = k.f,
|
||
O = S.f,
|
||
D = T.f,
|
||
I = r.Symbol,
|
||
M = r.JSON,
|
||
P = M && M.stringify,
|
||
A = h("_hidden"),
|
||
L = h("toPrimitive"),
|
||
N = {}.propertyIsEnumerable,
|
||
F = l("symbol-registry"),
|
||
R = l("symbols"),
|
||
q = l("op-symbols"),
|
||
J = Object.prototype,
|
||
$ = "function" == typeof I,
|
||
U = r.QObject,
|
||
B = !U || !U.prototype || !U.prototype.findChild,
|
||
H = o && u(function() {
|
||
return 7 != j(O({},
|
||
"a", {
|
||
get: function() {
|
||
return O(this, "a", {
|
||
value: 7
|
||
}).a
|
||
}
|
||
})).a
|
||
}) ?
|
||
function(t, e, n) {
|
||
var r = C(J, e);
|
||
r && delete J[e],
|
||
O(t, e, n),
|
||
r && t !== J && O(J, e, r)
|
||
}: O,
|
||
W = function(t) {
|
||
var e = R[t] = j(I.prototype);
|
||
return e._k = t,
|
||
e
|
||
},
|
||
z = $ && "symbol" == typeof I.iterator ?
|
||
function(t) {
|
||
return "symbol" == typeof t
|
||
}: function(t) {
|
||
return t instanceof I
|
||
},
|
||
V = function(t, e, n) {
|
||
return t === J && V(q, e, n),
|
||
y(t),
|
||
e = _(e, !0),
|
||
y(n),
|
||
i(R, e) ? (n.enumerable ? (i(t, A) && t[A][e] && (t[A][e] = !1), n = j(n, {
|
||
enumerable: x(0, !1)
|
||
})) : (i(t, A) || O(t, A, x(1, {})), t[A][e] = !0), H(t, e, n)) : O(t, e, n)
|
||
},
|
||
G = function(t, e) {
|
||
y(t);
|
||
for (var n, r = v(e = b(e)), i = 0, o = r.length; o > i;) V(t, n = r[i++], e[n]);
|
||
return t
|
||
},
|
||
X = function(t, e) {
|
||
return void 0 === e ? j(t) : G(j(t), e)
|
||
},
|
||
Y = function(t) {
|
||
var e = N.call(this, t = _(t, !0));
|
||
return ! (this === J && i(R, t) && !i(q, t)) && (!(e || !i(this, t) || !i(R, t) || i(this, A) && this[A][t]) || e)
|
||
},
|
||
K = function(t, e) {
|
||
if (t = b(t), e = _(e, !0), t !== J || !i(R, e) || i(q, e)) {
|
||
var n = C(t, e);
|
||
return ! n || !i(R, e) || i(t, A) && t[A][e] || (n.enumerable = !0),
|
||
n
|
||
}
|
||
},
|
||
Z = function(t) {
|
||
for (var e, n = D(b(t)), r = [], o = 0; n.length > o;) i(R, e = n[o++]) || e == A || e == c || r.push(e);
|
||
return r
|
||
},
|
||
Q = function(t) {
|
||
for (var e, n = t === J,
|
||
r = D(n ? q: b(t)), o = [], a = 0; r.length > a;) ! i(R, e = r[a++]) || n && !i(J, e) || o.push(R[e]);
|
||
return o
|
||
};
|
||
$ || (I = function() {
|
||
if (this instanceof I) throw TypeError("Symbol is not a constructor!");
|
||
var t = p(arguments.length > 0 ? arguments[0] : void 0),
|
||
e = function(n) {
|
||
this === J && e.call(q, n),
|
||
i(this, A) && i(this[A], t) && (this[A][t] = !1),
|
||
H(this, t, x(1, n))
|
||
};
|
||
return o && B && H(J, t, {
|
||
configurable: !0,
|
||
set: e
|
||
}),
|
||
W(t)
|
||
},
|
||
s(I.prototype, "toString",
|
||
function() {
|
||
return this._k
|
||
}), k.f = K, S.f = V, n(40).f = T.f = Z, n(28).f = Y, n(39).f = Q, o && !n(11) && s(J, "propertyIsEnumerable", Y, !0), d.f = function(t) {
|
||
return W(h(t))
|
||
}),
|
||
a(a.G + a.W + a.F * !$, {
|
||
Symbol: I
|
||
});
|
||
for (var tt = "hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","), et = 0; tt.length > et;) h(tt[et++]);
|
||
for (var nt = E(h.store), rt = 0; nt.length > rt;) m(nt[rt++]);
|
||
a(a.S + a.F * !$, "Symbol", {
|
||
for: function(t) {
|
||
return i(F, t += "") ? F[t] : F[t] = I(t)
|
||
},
|
||
keyFor: function(t) {
|
||
if (!z(t)) throw TypeError(t + " is not a symbol!");
|
||
for (var e in F) if (F[e] === t) return e
|
||
},
|
||
useSetter: function() {
|
||
B = !0
|
||
},
|
||
useSimple: function() {
|
||
B = !1
|
||
}
|
||
}),
|
||
a(a.S + a.F * !$, "Object", {
|
||
create: X,
|
||
defineProperty: V,
|
||
defineProperties: G,
|
||
getOwnPropertyDescriptor: K,
|
||
getOwnPropertyNames: Z,
|
||
getOwnPropertySymbols: Q
|
||
}),
|
||
M && a(a.S + a.F * (!$ || u(function() {
|
||
var t = I();
|
||
return "[null]" != P([t]) || "{}" != P({
|
||
a: t
|
||
}) || "{}" != P(Object(t))
|
||
})), "JSON", {
|
||
stringify: function(t) {
|
||
for (var e, n, r = [t], i = 1; arguments.length > i;) r.push(arguments[i++]);
|
||
if (n = e = r[1], (w(e) || void 0 !== t) && !z(t)) return g(e) || (e = function(t, e) {
|
||
if ("function" == typeof n && (e = n.call(this, t, e)), !z(e)) return e
|
||
}),
|
||
r[1] = e,
|
||
P.apply(M, r)
|
||
}
|
||
}),
|
||
I.prototype[L] || n(3)(I.prototype, L, I.prototype.valueOf),
|
||
f(I, "Symbol"),
|
||
f(Math, "Math", !0),
|
||
f(r.JSON, "JSON", !0)
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(14)("meta"),
|
||
i = n(8),
|
||
o = n(2),
|
||
a = n(4).f,
|
||
s = 0,
|
||
c = Object.isExtensible ||
|
||
function() {
|
||
return ! 0
|
||
},
|
||
u = !n(9)(function() {
|
||
return c(Object.preventExtensions({}))
|
||
}),
|
||
l = function(t) {
|
||
a(t, r, {
|
||
value: {
|
||
i: "O" + ++s,
|
||
w: {}
|
||
}
|
||
})
|
||
},
|
||
f = function(t, e) {
|
||
if (!i(t)) return "symbol" == typeof t ? t: ("string" == typeof t ? "S": "P") + t;
|
||
if (!o(t, r)) {
|
||
if (!c(t)) return "F";
|
||
if (!e) return "E";
|
||
l(t)
|
||
}
|
||
return t[r].i
|
||
},
|
||
p = function(t, e) {
|
||
if (!o(t, r)) {
|
||
if (!c(t)) return ! 0;
|
||
if (!e) return ! 1;
|
||
l(t)
|
||
}
|
||
return t[r].w
|
||
},
|
||
h = function(t) {
|
||
return u && d.NEED && c(t) && !o(t, r) && l(t),
|
||
t
|
||
},
|
||
d = t.exports = {
|
||
KEY: r,
|
||
NEED: !1,
|
||
fastKey: f,
|
||
getWeak: p,
|
||
onFreeze: h
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(21),
|
||
i = n(39),
|
||
o = n(28);
|
||
t.exports = function(t) {
|
||
var e = r(t),
|
||
n = i.f;
|
||
if (n) for (var a, s = n(t), c = o.f, u = 0; s.length > u;) c.call(t, a = s[u++]) && e.push(a);
|
||
return e
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(36);
|
||
t.exports = Array.isArray ||
|
||
function(t) {
|
||
return "Array" == r(t)
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(6),
|
||
i = n(40).f,
|
||
o = {}.toString,
|
||
a = "object" == typeof window && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [],
|
||
s = function(t) {
|
||
try {
|
||
return i(t)
|
||
} catch(t) {
|
||
return a.slice()
|
||
}
|
||
};
|
||
t.exports.f = function(t) {
|
||
return a && "[object Window]" == o.call(t) ? s(t) : i(r(t))
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(28),
|
||
i = n(13),
|
||
o = n(6),
|
||
a = n(19),
|
||
s = n(2),
|
||
c = n(31),
|
||
u = Object.getOwnPropertyDescriptor;
|
||
e.f = n(5) ? u: function(t, e) {
|
||
if (t = o(t), e = a(e, !0), c) try {
|
||
return u(t, e)
|
||
} catch(t) {}
|
||
if (s(t, e)) return i(!r.f.call(t, e), t[e])
|
||
}
|
||
},
|
||
function(t, e) {},
|
||
function(t, e, n) {
|
||
n(27)("asyncIterator")
|
||
},
|
||
function(t, e, n) {
|
||
n(27)("observable")
|
||
},
|
||
function(t, e, n) {
|
||
n(74),
|
||
t.exports = n(1).Object.getPrototypeOf
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(38),
|
||
i = n(37);
|
||
n(75)("getPrototypeOf",
|
||
function() {
|
||
return function(t) {
|
||
return i(r(t))
|
||
}
|
||
})
|
||
},
|
||
function(t, e, n) {
|
||
var r = n(18),
|
||
i = n(1),
|
||
o = n(9);
|
||
t.exports = function(t, e) {
|
||
var n = (i.Object || {})[t] || Object[t],
|
||
a = {};
|
||
a[t] = e(n),
|
||
r(r.S + r.F * o(function() {
|
||
n(1)
|
||
}), "Object", a)
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
"use strict";
|
||
var r = n(15),
|
||
i = function(t) {
|
||
if (this.opt = {
|
||
tp: "text",
|
||
moveDom: null,
|
||
moveChild: [],
|
||
tab: [],
|
||
viewDom: null,
|
||
touchDom2: [],
|
||
sp: {
|
||
x: 0,
|
||
y: 0
|
||
},
|
||
min: 0,
|
||
minp: 0,
|
||
step: 0,
|
||
len: 1,
|
||
index: 1,
|
||
offset: 0,
|
||
loadImg: !1,
|
||
image: [],
|
||
loopScroll: !1,
|
||
lockScrY: !1,
|
||
stopOnce: !1,
|
||
autoTime: 0,
|
||
holdAuto: !1,
|
||
tabClass: "cur",
|
||
transition: .3,
|
||
imgInit: !0,
|
||
imgInitLazy: 4e3,
|
||
enableTransX: !1,
|
||
transXVal: 100,
|
||
useVue: !1,
|
||
ignoreAppend: !1,
|
||
fun: function() {}
|
||
},
|
||
r.extend(this, this.opt, t), this.len = this.moveChild.length, this.min = this.min || {
|
||
text: 100,
|
||
img: 1
|
||
} [this.tp], this.minp = this.minp || Math.max(this.min, 30), this.viewDom || (this.viewDom = r(window)), this.len > 1 && this.startEvent(), this.loadImg && (this.image = this.moveDom.find("img")), this.resize(this.step || this.moveChild.eq(0).width()), this.autoTime) {
|
||
var e = this;
|
||
setInterval(function() {
|
||
e.holdAuto || (e.stopOnce || e.stepMove(e.index + 1), e.stopOnce = !1)
|
||
},
|
||
this.autoTime)
|
||
}
|
||
};
|
||
r.extend(i.prototype, {
|
||
resize: function(t) {
|
||
this.step = t || this.step;
|
||
var e = (this.viewDom.width() - this.step) / 2;
|
||
this.offset = this.loopScroll ? this.step - e: e,
|
||
1 == this.len && (this.offset = -e),
|
||
this.stepMove(this.index, !0)
|
||
},
|
||
addChild: function(t, e) {
|
||
this.loopScroll && (this.moveChild.eq(0).after(t), this.len += 1, this.tab.eq(this.len - 2).after(e), this.tab = this.tab.parent().children(), 2 == this.len ? (this.moveChild = this.moveDom.children(), this.startEvent()) : this.stepMove(2))
|
||
},
|
||
startEvent: function() {
|
||
var t = this,
|
||
e = this.moveDom.get(0),
|
||
n = function(e) {
|
||
e.addEventListener("touchstart", t, !1),
|
||
e.addEventListener("touchmove", t, !1),
|
||
e.addEventListener("touchend", t, !1),
|
||
e.addEventListener("touchcancel", t, !1),
|
||
e.addEventListener("webkitTransitionEnd", t, !1)
|
||
};
|
||
if (n(e), this.tab.each(function(e, n) {
|
||
r(n).attr("no", e + 1),
|
||
r(n).click(function() {
|
||
t.stepMove(r(this).attr("no"))
|
||
})
|
||
}), this.loopScroll) {
|
||
var i = this.moveChild.eq(0).clone().attr({
|
||
id: "",
|
||
onload: ""
|
||
});
|
||
i.find("img").attr({
|
||
id: "",
|
||
onload: ""
|
||
}),
|
||
!this.ignoreAppend && this.moveDom.append(i);
|
||
var o = this.moveChild.eq(this.len - 1).clone().attr({
|
||
id: "",
|
||
onload: ""
|
||
});
|
||
o.find("img").attr({
|
||
id: "",
|
||
onload: ""
|
||
}),
|
||
!this.ignoreAppend && this.moveDom.prepend(o)
|
||
}
|
||
for (var a = 0; a < this.touchDom2.length; a++) n(this.touchDom2[a])
|
||
},
|
||
handleEvent: function(t) {
|
||
switch (t.type) {
|
||
case "touchstart":
|
||
this.sp = this.getPosition(t),
|
||
this.holdAuto = !0,
|
||
this.stopOnce = !0;
|
||
break;
|
||
case "touchmove":
|
||
this.touchmove(t);
|
||
break;
|
||
case "touchend":
|
||
case "touchcancel":
|
||
this.move(t),
|
||
this.holdAuto = !1;
|
||
break;
|
||
case "webkitTransitionEnd":
|
||
t.preventDefault()
|
||
}
|
||
},
|
||
getPosition: function(t) {
|
||
var e = t.changedTouches ? t.changedTouches[0] : t;
|
||
return {
|
||
x: e.pageX,
|
||
y: e.pageY
|
||
}
|
||
},
|
||
touchmove: function(t) {
|
||
var e = this.getPosition(t),
|
||
n = e.x - this.sp.x,
|
||
r = e.y - this.sp.y;
|
||
if (Math.abs(n) - Math.abs(r) > this.min) {
|
||
t.preventDefault();
|
||
var i = n - this.step * (this.index - 1) - this.offset; ! this.useVue && this.moveDom.css({
|
||
"-webkit-backface-visibility": "hidden",
|
||
"-webkit-transform": this.enableTransX ? "translateX(" + (this.loopScroll ? this.index: this.index - 1) * -this.transXVal + "%)": "translate3D(" + i + "px,0,0)",
|
||
"-webkit-transition": "0"
|
||
})
|
||
} else this.lockScrY || t.preventDefault()
|
||
},
|
||
move: function(t) {
|
||
var e = this.getPosition(t),
|
||
n = e.x - this.sp.x,
|
||
r = e.y - this.sp.y;
|
||
if (Math.abs(n) < Math.abs(r) || Math.abs(n) < this.minp) return void this.stepMove(this.index);
|
||
n > 0 ? (t.preventDefault(), this.stepMove(this.index - 1)) : (t.preventDefault(), this.stepMove(this.index + 1))
|
||
},
|
||
loadImage: function(t) {
|
||
var e = this.image,
|
||
n = function(t) {
|
||
e[t] && r(e[t]).attr("back_src") && (e[t].src = r(e[t]).attr("back_src"), r(e[t]).removeAttr("back_src"))
|
||
};
|
||
n(t),
|
||
function(t, e, r) {
|
||
setTimeout(function() {
|
||
n(t - 1),
|
||
n(t + 1)
|
||
},
|
||
e ? r: 0)
|
||
} (t, this.imgInit, this.imgInitLazy),
|
||
this.imgInit = !1
|
||
},
|
||
stepMove: function(t, e) {
|
||
this.index = t > this.len ? this.len: t < 1 ? 1 : t,
|
||
this.tab.removeClass(this.tabClass),
|
||
this.tab.eq(this.index - 1).addClass(this.tabClass);
|
||
var n = -this.step * ((this.loopScroll ? t: this.index) - 1) - this.offset;
|
||
if (!this.useVue && this.moveDom.css({
|
||
"-webkit-transform": this.enableTransX ? "translateX(" + (this.loopScroll ? t: this.index - 1) * -this.transXVal + "%)": "translate3D(" + n + "px,0,0)",
|
||
"-webkit-transition": e ? "0ms": "all " + this.transition + "s ease"
|
||
}), this.loadImg && this.loadImage(this.index), this.fun(this.index), this.loopScroll && !e) {
|
||
var r = this,
|
||
i = t;
|
||
t <= 0 && (i = this.len),
|
||
t > this.len && (i = 1),
|
||
i != t && setTimeout(function() {
|
||
r.stepMove(i, !0)
|
||
},
|
||
1e3 * this.transition)
|
||
}
|
||
},
|
||
_isOutScreen: function(t) {
|
||
return t.offset().top >= r(window).height() + window.scrollY || t.offset().top + t.height() < window.scrollY
|
||
},
|
||
_isElementHidden: function(t) {
|
||
var e = t.parents().concat();
|
||
return e.unshift(t[0]),
|
||
e.some(function(t) {
|
||
if ("none" == getComputedStyle(t, "").getPropertyValue("display")) return ! 0
|
||
})
|
||
}
|
||
}),
|
||
e.init = function(t) {
|
||
return new i(t)
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
"use strict";
|
||
function r(t) {
|
||
for (var e = (t + "").split(""), n = [], r = 0; r < e.length; r++) n.push(m[e[r]]);
|
||
return n.join("")
|
||
}
|
||
function i(t) {
|
||
return d[t] ? d[t] += 1 : d[t] = 1,
|
||
t + r(d[t])
|
||
}
|
||
function o(t) {
|
||
return t.indexOf("wq.360buyimg.com") > -1 || t.indexOf("wqs.jd.com") > -1 || t.indexOf("wqcoss.jd.com/mcoss/") > -1 || t.indexOf("btshow.jd.com/queryBtPlanInfo.do") > -1 || t.indexOf("storage.360buyimg.com") > -1
|
||
}
|
||
function a(t, e) {
|
||
var n, r = {
|
||
onLoad: null,
|
||
onError: null,
|
||
onTimeout: null,
|
||
timeout: 8e3,
|
||
isToken: !0,
|
||
keepProtocol: !1,
|
||
charset: "utf-8",
|
||
setReportUrl: ""
|
||
},
|
||
a = function() {
|
||
d && (n && clearTimeout(n), d.onload = d.onreadystatechange = d.onerror = null, d.parentNode && d.parentNode.removeChild(d), d = null)
|
||
};
|
||
if (1 == arguments.length && ("object" == (0, f.
|
||
default)(arguments[0]) ? (e = arguments[0], t = e.url) : e = {}), "object" == (0, f.
|
||
default)(e.data)) {
|
||
var c = [];
|
||
for (var u in e.data) c.push(u + "=" + e.data[u]);
|
||
c.length > 0 && (c = c.join("&"), t += (t.indexOf("?") > 0 ? "&": "?") + c)
|
||
}
|
||
if (window.traceid) {
|
||
var l = t.split("#");
|
||
t += (l[0].indexOf("?") > 0 ? "&": "?") + "traceid=" + window.traceid + (l[1] ? "#" + l[1] : "")
|
||
}
|
||
for (var p in e) e.hasOwnProperty(p) && (r[p] = e[p]);
|
||
var d = document.createElement("script");
|
||
d.charset = r.charset || "utf-8";
|
||
var m = !1,
|
||
v = !1,
|
||
g = "";
|
||
e.setReportUrl && "function" == typeof e.setReportUrl ? !(g = e.setReportUrl()) && (g = t) : g = window.CGI302ReportKeepUrl ? t: t.replace(/\?.*/, ""),
|
||
d.onload = d.onreadystatechange = function() { (/loaded|complete/i.test(this.readyState) || -1 == navigator.userAgent.toLowerCase().indexOf("msie")) && (r.onLoad && r.onLoad(), m && !v && (window.JD && h.report.umpBiz({
|
||
bizid: 24,
|
||
operation: 3,
|
||
result: "1",
|
||
source: 0,
|
||
message: g
|
||
}), r.onError && r.onError(), window.onerror("", "", "", "", {
|
||
stack: "servererror:" + g
|
||
}), console.log("loadJs Failed:" + t)), a())
|
||
},
|
||
d.onerror = function() {
|
||
window.__reloadResource && window.__reloadResource(d),
|
||
r.onError && r.onError(),
|
||
a()
|
||
};
|
||
var y = r.isToken ? s(t, "ls") : t;
|
||
if (!o(y)) {
|
||
var w, b, _, x = y.replace(/callback=([^&]+)/,
|
||
function(t, e) {
|
||
return w = e,
|
||
"callback=" + (b = i(w))
|
||
});
|
||
w && window[w] && (m = !0, y = x, _ = window[w], window[b] = function(t) {
|
||
v = !0,
|
||
_(t)
|
||
})
|
||
}
|
||
window.JD && (y = h.url.getCgiUrl(y)),
|
||
d.src = r.keepProtocol ? y: y.replace(/^http(s?):/, ""),
|
||
!e.cancleLog && console.log("loadJs request:" + d.src),
|
||
document.getElementsByTagName("head")[0].appendChild(d),
|
||
"function" == typeof r.onTimeout && (n = setTimeout(function() {
|
||
r.onTimeout()
|
||
},
|
||
r.timeout))
|
||
}
|
||
function s(t, e) {
|
||
if ("" == t || 0 != (t.indexOf("://") < 0 ? location.href: t).indexOf("http")) return t;
|
||
var n = c("wq_skey"),
|
||
r = c("pt_key"),
|
||
i = t.split("#"),
|
||
o = i[0].split("?"),
|
||
a = o[0],
|
||
s = (2 == o.length ? o[1] : "").split("&"),
|
||
u = 2 == i.length ? i[1] : "";
|
||
s = s.filter(function(t) {
|
||
return ! (/g_tk=\d+/.test(t) || /g_pt_tk=\d+/.test(t) || /g_ty=\w+/.test(t))
|
||
}),
|
||
n && s.push("g_tk=" + n),
|
||
r && s.push("g_pt_tk=" + r),
|
||
(n || r) && s.push("g_ty=" + e);
|
||
var l = s.join("&");
|
||
return a + (l ? "?" + l: "") + (u ? "#" + u: "")
|
||
}
|
||
function c(t) {
|
||
t = t || "wq_skey";
|
||
var e = p.get(t);
|
||
return e ? u(e) : ""
|
||
}
|
||
function u(t) {
|
||
for (var e = 0,
|
||
n = t.length,
|
||
r = 5381; e < n; ++e) r += (r << 5) + t.charAt(e).charCodeAt();
|
||
return 2147483647 & r
|
||
}
|
||
var l = n(10),
|
||
f = function(t) {
|
||
return t && t.__esModule ? t: {
|
||
default:
|
||
t
|
||
}
|
||
} (l),
|
||
p = n(42),
|
||
h = window.JD,
|
||
d = {},
|
||
m = ["Z", "A", "B", "C", "D", "E", "F", "G", "H", "I"];
|
||
t.exports = e = {},
|
||
e.loadScript = function(t, e) {
|
||
var n = [].slice.call(arguments);
|
||
setTimeout(function() {
|
||
a.apply(null, n)
|
||
},
|
||
0)
|
||
},
|
||
e.addToken = s
|
||
},
|
||
function(t, e, n) {
|
||
"use strict";
|
||
var r = {},
|
||
i = function t(e, n) {
|
||
var i = /\W/.test(e) ? new Function("obj", "var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('" + e.replace(/[\r\t\n]/g, " ").split("<%").join("\t").replace(/((^|%>)[^\t]*)'/g, "$1\r").replace(/\t=(.*?)%>/g, "',$1,'").split("\t").join("');").split("%>").join("p.push('").split("\r").join("\\'") + "');}return p.join('');") : r[e] = r[e] || t(document.getElementById(e).innerHTML);
|
||
return n ? i(n) : i
|
||
};
|
||
e.formatJson = i
|
||
},
|
||
function(t, e, n) {
|
||
"use strict";
|
||
function r() {
|
||
var t = [" <style>", " .ll_fadeIn{", " -webkit-transition: opacity .5s ease-in;", " opacity:0;", " transition:opacity .5s ease-in;", " }", " </style>"].join("");
|
||
i("head").append(t)
|
||
}
|
||
var i = n(15),
|
||
o = n(80).withinviewport,
|
||
a = {};
|
||
a.autoLoadImage = function(t) {
|
||
function e() {
|
||
i("img[" + c.initSrcName + "]").each(function(t, e) {
|
||
var n = i(e),
|
||
r = !n.is(":hidden") && o(e, {
|
||
top: c.top,
|
||
bottom: c.bottom,
|
||
left: c.left,
|
||
right: c.right
|
||
});
|
||
if (c.fadeIn && !n.hasClass("ll_fadeIn") && n.addClass("ll_fadeIn"), r) {
|
||
n.on("load",
|
||
function() {
|
||
c.fadeIn && n.css({
|
||
opacity: 1
|
||
}),
|
||
c.afterImgLoaded && c.afterImgLoaded(n)
|
||
}),
|
||
n.attr("onerror", "__reloadResource(this)");
|
||
var a = n.attr(c.initSrcName);
|
||
if (window.JD) {
|
||
var s = n.attr("data-size") || "",
|
||
u = 0,
|
||
l = 0;
|
||
/^(\d+)x(\d+)$/i.test(s) && (u = RegExp.$1, l = RegExp.$2, a = JD.img.getImgUrl(a, u, l)),
|
||
a = JD.url.getImageUrl(a, u, l)
|
||
}
|
||
n.attr("src", a),
|
||
n.attr(c.initSrcName, null),
|
||
n.attr("loaded", 1)
|
||
}
|
||
})
|
||
}
|
||
var n = i(window).height(),
|
||
s = i(window).width(),
|
||
c = {
|
||
top: -.5 * n,
|
||
bottom: -1 * n,
|
||
left: -.5 * s,
|
||
right: -.5 * s,
|
||
initSrcName: "init_src",
|
||
fadeIn: !0,
|
||
afterImgLoaded: null
|
||
};
|
||
a.init || (a.init = !0, i.extend(c, t || {}), r(), setInterval(e, 150))
|
||
},
|
||
t.exports = a
|
||
},
|
||
function(t, e, n) {
|
||
"use strict";
|
||
var r = n(10),
|
||
i = function(t) {
|
||
return t && t.__esModule ? t: {
|
||
default:
|
||
t
|
||
}
|
||
} (r),
|
||
o = void 0 !== window.innerHeight,
|
||
a = function t(e, n) {
|
||
var r, a, s, c, u, l, f, p, h, d, m, v = !1,
|
||
g = {},
|
||
y = {},
|
||
w = [0, 0];
|
||
if ("undefined" != typeof jQuery && e instanceof jQuery && (e = e.get(0)), "object" !== (void 0 === e ? "undefined": (0, i.
|
||
default)(e)) || 1 !== e.nodeType) throw new Error("First argument must be an element");
|
||
for (e.getAttribute("data-withinviewport-settings") && window.JSON && (g = JSON.parse(e.getAttribute("data-withinviewport-settings"))), r = "string" == typeof n ? {
|
||
sides: n
|
||
}: n || {},
|
||
y.container = r.container || g.container || t.defaults.container || window, y.sides = r.sides || g.sides || t.defaults.sides || "all", y.top = r.top || g.top || t.defaults.top || 0, y.right = r.right || g.right || t.defaults.right || 0, y.bottom = r.bottom || g.bottom || t.defaults.bottom || 0, y.left = r.left || g.left || t.defaults.left || 0, "undefined" != typeof jQuery && y.container instanceof jQuery && (y.container = y.container.get(0)), y.container !== document.body && 1 !== !y.container.nodeType || (y.container = window), s = y.container === window, a = {
|
||
top: function() {
|
||
return s ? c.top >= y.top: c.top >= l - (l - u.top) + y.top
|
||
},
|
||
right: function() {
|
||
return s ? c.right <= u.right + f - y.right: c.right <= u.right - w[0] - y.right
|
||
},
|
||
bottom: function() {
|
||
var t;
|
||
return t = s ? o ? y.container.innerHeight: document.documentElement.clientHeight: u.bottom,
|
||
c.bottom <= t - w[1] - y.bottom
|
||
},
|
||
left: function() {
|
||
return s ? c.left >= y.left: c.left >= f - (f - u.left) + y.left
|
||
},
|
||
all: function() {
|
||
return a.top() && a.bottom() && a.left() && a.right()
|
||
}
|
||
},
|
||
c = e.getBoundingClientRect(), s ? (u = document.documentElement.getBoundingClientRect(), l = document.body.scrollTop, f = document.body.scrollLeft) : (u = y.container.getBoundingClientRect(), l = y.container.scrollTop, f = y.container.scrollLeft), f && (w[0] = 18), l && (w[1] = 16), p = /^top$|^right$|^bottom$|^left$|^all$/, h = y.sides.split(" "), m = h.length; m--;) if (d = h[m].toLowerCase(), p.test(d)) {
|
||
if (!a[d]()) {
|
||
v = !1;
|
||
break
|
||
}
|
||
v = !0
|
||
}
|
||
return v
|
||
};
|
||
a.prototype.defaults = {
|
||
container: document.body,
|
||
sides: "all",
|
||
top: 0,
|
||
right: 0,
|
||
bottom: 0,
|
||
left: 0
|
||
},
|
||
a.defaults = a.prototype.defaults,
|
||
a.prototype.top = function(t) {
|
||
return a(t, "top")
|
||
},
|
||
a.prototype.right = function(t) {
|
||
return a(t, "right")
|
||
},
|
||
a.prototype.bottom = function(t) {
|
||
return a(t, "bottom")
|
||
},
|
||
a.prototype.left = function(t) {
|
||
return a(t, "left")
|
||
},
|
||
e.withinviewport = a
|
||
},
|
||
function(t, e, n) {
|
||
"use strict";
|
||
function r(t) {
|
||
if (!t) return ! 1;
|
||
var e = t;
|
||
for (var n in M) void 0 === e[n] && (e[n] = M[n]);
|
||
if (e.globalLock) {
|
||
if (j) return console.log("ajax loading ..."),
|
||
e.lockCallback && e.lockCallback(),
|
||
!1;
|
||
j = !0
|
||
}
|
||
if (e.cgiKey && (window.cgiData = I), e.cgiKey && I[e.cgiKey]) return console.log("ajax命中临时缓存"),
|
||
e.isCache = 1,
|
||
u(I[e.cgiKey], "", e),
|
||
!1;
|
||
"ppms.jd.com" == location.hostname && (e.dataType = "jsonp"),
|
||
e.url = e.url.replace(/^http:/, ""),
|
||
e.setReportUrl && "function" == typeof e.setReportUrl ? !(F = e.setReportUrl()) && (F = e.url) : F = window.CGI302ReportKeepUrl ? e.url: e.url.replace(/\?.*/, ""),
|
||
e.crossDomain || (e.crossDomain = /^([\w-]+:)?\/\/([^\/]+)/.test(e.url) && RegExp.$2 != window.location.host),
|
||
e.crossDomain && (e.xhrFields = {
|
||
withCredentials: !0
|
||
}),
|
||
e.url || (e.url = window.location.toString()),
|
||
d(e);
|
||
var r = e.dataType,
|
||
o = /\?.+=\?/.test(e.url);
|
||
if (o && (r = "jsonp"), !1 !== e.cache && (t && !0 === t.cache || "script" != r && "jsonp" != r) || (e.url = v(e.url, "_=" + Date.now())), !t.noSceneVal && R && (e.url = v(e.url, "sceneval=" + R)), e.url = v(e.url, "g_login_type=" + J), "jsonp" == r || e.wqunit) return o || (e.urlbak = e.url, e.url = v(e.url, e.jsonp ? e.jsonp + "=?": !1 === e.jsonp ? "": "callback=?")),
|
||
e.url = g(e.url, "ls"),
|
||
a(e);
|
||
if ("post" == e.type.toLowerCase() && e.jsonpCallback) return e.url = g(e.url, "fr"),
|
||
s(e);
|
||
/[?&]ajaxtest=1/.test(location.search) && "json" == r && (e.url = e.url.replace("http://wq.jd.com", "http://wqs.jd.com")),
|
||
e.url = g(e.url, "ajax"),
|
||
window.JD && (e.url = T.url.getCgiUrl(e.url));
|
||
var c, f = e.accepts[r],
|
||
p = {},
|
||
y = function(t, e) {
|
||
p[t.toLowerCase()] = [t, e]
|
||
},
|
||
w = /^([\w-]+:)\/\//.test(e.url) ? RegExp.$1: window.location.protocol,
|
||
b = e.xhr(),
|
||
_ = b.setRequestHeader;
|
||
if (e.crossDomain || y("X-Requested-With", "XMLHttpRequest"), y("Accept", f || "*/*"), (f = e.mimeType || f) && (f.indexOf(",") > -1 && (f = f.split(",", 2)[0]), b.overrideMimeType && b.overrideMimeType(f)), (e.contentType || !1 !== e.contentType && e.data && "GET" != e.type.toUpperCase()) && y("Content-Type", e.contentType || "application/x-www-form-urlencoded"), e.headers) for (var x in e.headers) y(x, e.headers[x]);
|
||
b.setRequestHeader = y,
|
||
b.onreadystatechange = function() {
|
||
if (4 == b.readyState) {
|
||
b.onreadystatechange = h,
|
||
clearTimeout(c);
|
||
var t, n = !1;
|
||
if (b.status >= 200 && b.status < 300 || 304 == b.status || 0 == b.status && "file:" == w) {
|
||
r = r || m(e.mimeType || b.getResponseHeader("content-type")),
|
||
t = b.responseText;
|
||
try {
|
||
"script" == r ? (0, eval)(t) : "xml" == r ? t = b.responseXML: "json" == r && (t = /^\s*$/.test(t) ? null: i(t))
|
||
} catch(t) {
|
||
n = t
|
||
}
|
||
n ? l(n, "parsererror", b, e) : u(t, b, e)
|
||
} else console.log("ajax error", b),
|
||
l(b.statusText || null, "load", b, e)
|
||
}
|
||
};
|
||
var k = !("async" in e) || e.async;
|
||
if (b.open(e.type, e.url, k, e.username, e.password), e.xhrFields) for (x in e.xhrFields) b[x] = e.xhrFields[x];
|
||
for (x in p) _.apply(b, p[x]);
|
||
return e.timeout > 0 && (c = setTimeout(function() {
|
||
b.onreadystatechange = h,
|
||
b.abort(),
|
||
l(null, "timeout", b, e)
|
||
},
|
||
1e3 * e.timeout)),
|
||
b.send(e.data ? e.data: null),
|
||
b
|
||
}
|
||
function i(t) {
|
||
return t && "string" == typeof t ? (t = t.replace(/^\s+|\s+$/g, ""), t ? JSON.parse(t) : t) : t
|
||
}
|
||
function o(t, e) {
|
||
window.JD && T.sendJs("//wq.jd.com/ubanalysis?t=t_ajax&d=" + q + "&tp=" + e)
|
||
}
|
||
function a(t) {
|
||
var e, n, i = t.jsonpCallback,
|
||
a = ("function" == typeof i ? i() : i) || "jsonpCBK" + P.callbackName[P.ajaxCount++%P.callbackName.length],
|
||
s = document.createElement("script"),
|
||
c = (window[a], {
|
||
abort: f
|
||
}),
|
||
f = function(e) {
|
||
p = 1,
|
||
q--,
|
||
console.log(t.url, "timeout"),
|
||
o(q, "timeout"),
|
||
l(null, "timeout", c, t)
|
||
},
|
||
p = 0;
|
||
return t.callbackName = a,
|
||
s.charset = t.charset || "utf-8",
|
||
q++,
|
||
s.onload = s.onerror = function(i, a) {
|
||
if (clearTimeout(n), p) return console.log("timeout"),
|
||
!1;
|
||
q--,
|
||
"error" == i.type ? (console.log(t.url, a || i.type || "error"), o(q, "error"), l(null, "error", c, t)) : e ? e[0] && -1 == e[0].retcode && "没有找到" == e[0].message && 1 == e[0].unitReload ? (t.wqunit = !1, t.url = t.urlbak, r(t)) : u(e[0], c, t) : (o(q, "load"), l(null, i.type, c, t), window.onerror("", "", "", "", {
|
||
stack: "servererror:" + F
|
||
})),
|
||
e = void 0,
|
||
s.parentNode.removeChild(s)
|
||
},
|
||
window[a] = function() {
|
||
e = arguments
|
||
},
|
||
t.url = t.url.replace(/\?(.+)=\?/, "?$1=" + a),
|
||
s.src = t.url,
|
||
t.wqunit && (s.src = "http://ppms.jd.com/wqunit/unittest?pageUrl=" + encodeURIComponent(location.href) + "&cgiUrl=" + encodeURIComponent(s.src) + "&callback=" + a),
|
||
document.head.appendChild(s),
|
||
t.timeout > 0 && (n = setTimeout(function() {
|
||
f("timeout")
|
||
},
|
||
1e3 * t.timeout)),
|
||
c
|
||
}
|
||
function s(t) {
|
||
var e, n = t.jsonpCallback,
|
||
r = ("function" == typeof n ? n() : n) || "jsonpCBK" + A[D++%A.length],
|
||
i = {
|
||
abort: o
|
||
},
|
||
o = function(e) {
|
||
a = 1,
|
||
console.log(t.url, "timeout"),
|
||
l(null, "timeout", i, t)
|
||
},
|
||
a = 0;
|
||
window[r] = function() {
|
||
clearTimeout(e);
|
||
var n = arguments,
|
||
r = document.getElementById("ajaxPostForm");
|
||
r && r.remove();
|
||
var o = document.getElementById("ajaxPostIframe");
|
||
o && o.remove(),
|
||
u(n[0], i, t)
|
||
},
|
||
t.data.callback = r,
|
||
t.data.g_tk = y(),
|
||
c(t, t.isFile),
|
||
t.timeout > 0 && (e = setTimeout(function() {
|
||
window[r] = h,
|
||
o("timeout")
|
||
},
|
||
1e3 * t.timeout))
|
||
}
|
||
function c(t, e) {
|
||
var n = document.getElementById("ajaxPostForm"),
|
||
r = document.getElementById("ajaxPostIframe");
|
||
n || (n = document.createElement("form"), n.id = "ajaxPostForm", r = document.createElement("iframe"), r.height = 0, r.width = 0, r.id = r.name = "ajaxPostIframe", n.style.display = "none", document.body.appendChild(r), document.body.appendChild(n)),
|
||
k("input", n).remove();
|
||
for (var i in t.data) {
|
||
var o = document.createElement("input");
|
||
k(n).append(k(o).attr("type", "hidden").attr("name", i).attr("value", t.data[i]))
|
||
}
|
||
n.target = "ajaxPostIframe",
|
||
n.action = t.url,
|
||
n.method = "POST",
|
||
n.enctype = e ? "multipart/form-data": "application/x-www-form-urlencoded",
|
||
n.submit()
|
||
}
|
||
function u(t, e, n) {
|
||
n.globalLock && (j = !1);
|
||
var r = n.context;
|
||
console.log(n.url, t),
|
||
n.success.call(r, t, n, "success", e),
|
||
p("success", e, n)
|
||
}
|
||
function l(t, e, n, i, o) {
|
||
return i.retryCount <= 0 || "post" == i.type.toLowerCase() ? void f(t, e, n, i) : ["error", "parsererror"].indexOf(e) >= 0 ? void f(t, e, n, i) : void setTimeout(function() {
|
||
i.url = i.url.replace(/(&)?(_|g_tk|g_ty|callback)=\w+/g, ""),
|
||
console.log("start retry," + i),
|
||
i.retryCount--,
|
||
i.globalLock && (j = !1),
|
||
r(i)
|
||
},
|
||
0)
|
||
}
|
||
function f(t, e, n, r) {
|
||
r.globalLock && (j = !1);
|
||
var i = r.context;
|
||
console.log(r.url, e, t),
|
||
r.degrade && (console.log("降级", r.degrade), r.isDegrade = 1, r.success.call(i, r.degrade, r));
|
||
var o = {
|
||
timeout: 8e3,
|
||
error: 5e3,
|
||
load: 3020,
|
||
abort: 5001,
|
||
parsererror: 3021
|
||
};
|
||
r.error.call(i, e, o[e] || 9e3, r, t, n),
|
||
p(e, n, r)
|
||
}
|
||
function p(t, e, n) {
|
||
var r = n.context;
|
||
n.complete.call(r, t, e)
|
||
}
|
||
function h() {}
|
||
function d(t) {
|
||
if (t.processData && t.data && "string" != typeof t.data) {
|
||
if ("post" == t.type.toLowerCase() && t.jsonpCallback) return;
|
||
t.data = x(t.data)
|
||
} ! t.data || t.type && "GET" != t.type.toUpperCase() || (t.url = v(t.url, t.data), t.data = void 0)
|
||
}
|
||
function m(t) {
|
||
return t && (t = t.split(";", 2)[0]),
|
||
t && (t == S ? "html": t == E ? "json": C.test(t) ? "script": O.test(t) && "xml") || "text"
|
||
}
|
||
function v(t, e) {
|
||
return "" == e ? t: (t + "&" + e).replace(/[&?]{1,2}/, "?")
|
||
}
|
||
function g(t, e) {
|
||
var n = y();
|
||
if ("" == t || 0 != (t.indexOf("://") < 0 ? location.href: t).indexOf("http")) return t;
|
||
if ( - 1 != t.indexOf("#")) {
|
||
var r = t.match(/\?.+\#/);
|
||
if (r) {
|
||
var i = r[0].split("#"),
|
||
o = [i[0], "&g_tk=", n, "&g_ty=", e, "#", i[1]].join("");
|
||
return t.replace(r[0], o)
|
||
}
|
||
var i = t.split("#");
|
||
return [i[0], "?g_tk=", n, "&g_ty=", e, "#", i[1]].join("")
|
||
}
|
||
return "" == n ? t + ( - 1 != t.indexOf("?") ? "&": "?") + "g_ty=" + e: t + ( - 1 != t.indexOf("?") ? "&": "?") + "g_tk=" + n + "&g_ty=" + e
|
||
}
|
||
function y() {
|
||
var t = b("wq_skey");
|
||
return null == t ? "": w(t)
|
||
}
|
||
function w(t) {
|
||
for (var e = 0,
|
||
n = t.length,
|
||
r = 5381; e < n; ++e) r += (r << 5) + t.charAt(e).charCodeAt();
|
||
return 2147483647 & r
|
||
}
|
||
function b(t) {
|
||
var e = new RegExp("(^| )" + t + "(?:=([^;]*))?(;|$)"),
|
||
n = document.cookie.match(e);
|
||
return n ? n[2] ? unescape(n[2]) : "": null
|
||
}
|
||
function _(t, e) {
|
||
for (var n in e) t.add(n, e[n])
|
||
}
|
||
function x(t) {
|
||
var e = [];
|
||
return e.add = function(t, e) {
|
||
this.push($(t) + "=" + $(e))
|
||
},
|
||
_(e, t),
|
||
e.join("&").replace(/%20/g, "+")
|
||
}
|
||
var j = !1,
|
||
T = window.JD,
|
||
k = window.$,
|
||
S = window.htmlType,
|
||
E = window.jsonType,
|
||
C = window.scriptTypeRE,
|
||
O = window.xmlTypeRE,
|
||
D = 0,
|
||
I = {},
|
||
M = {
|
||
type: "GET",
|
||
success: h,
|
||
error: h,
|
||
complete: h,
|
||
load: h,
|
||
context: null,
|
||
global: !0,
|
||
retryCount: 0,
|
||
globalLock: 0,
|
||
lockCallback: null,
|
||
cgiKey: !1,
|
||
setCache: function(t) {
|
||
if (!this.cgiKey) throw Error("cgiKey不能为空");
|
||
I[this.cgiKey] = t
|
||
},
|
||
degrade: !1,
|
||
xhr: function() {
|
||
return new window.XMLHttpRequest
|
||
},
|
||
dataType: "json",
|
||
accepts: {
|
||
script: "text/javascript, application/javascript, application/x-javascript",
|
||
json: "application/json",
|
||
xml: "application/xml, text/xml",
|
||
html: "text/html",
|
||
text: "text/plain"
|
||
},
|
||
crossDomain: !1,
|
||
timeout: 8,
|
||
processData: !0,
|
||
cache: !1,
|
||
wqunit: /[?&]_wqunit_=1/.test(location.search),
|
||
setReportUrl: ""
|
||
},
|
||
P = "";
|
||
if (window.JD ? (T.ajax || (T.ajax = {}), P = T.ajax) : P = window, !P.callbackName) {
|
||
for (var A = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"], L = 0; L < 3; L++) for (var N = 0; N < 26; N++) A.push(A[26 * L + N] + A[N]);
|
||
P.callbackName = A
|
||
}
|
||
P.ajaxCount = P.ajaxCount || 0;
|
||
var F = "",
|
||
R = window.JD && T.url && T.url.getUrlParam("sceneval") || (/(\.|^)m\.jd\.com/.test(window.location.hostname) ? 2 : 0),
|
||
q = 0,
|
||
J = function() {
|
||
var t = navigator.userAgent.toLowerCase(),
|
||
e = 0;
|
||
return window.JD && T.wxapp && 3 == T.wxapp.wxappType ? e = 1 : R ? e = 1 : /jdapp;/.test(t) && (e = 1),
|
||
e
|
||
} (),
|
||
$ = encodeURIComponent;
|
||
window.addEventListener("message",
|
||
function(t) {
|
||
if (!t || !t.data) return ! 1;
|
||
var e = t.data.callback;
|
||
e && window[e] && window[e](t.data.data)
|
||
}),
|
||
t.exports = {
|
||
load: r,
|
||
addToken: g
|
||
}
|
||
},
|
||
function(t, e, n) {
|
||
"use strict";
|
||
function r(t) {
|
||
return t && t.__esModule ? t: {
|
||
default:
|
||
t
|
||
}
|
||
}
|
||
function i(t) {
|
||
return null != t && t == t.window
|
||
}
|
||
function o(t) {
|
||
return null != t && "object" == (void 0 === t ? "undefined": (0, g.
|
||
default)(t))
|
||
}
|
||
function a(t) {
|
||
return o(t) && !i(t) && (0, m.
|
||
default)(t) == Object.prototype
|
||
}
|
||
function s(t, e, n) {
|
||
for (var r in e) n && (a(e[r]) || x(e[r])) ? (a(e[r]) && !a(t[r]) && (t[r] = {}), x(e[r]) && !x(t[r]) && (t[r] = []), s(t[r], e[r], n)) : void 0 !== e[r] && (t[r] = e[r]);
|
||
return t
|
||
}
|
||
function c(t) {
|
||
if (!t || "string" != typeof t) return t;
|
||
if (! (t = t.replace(/^\s+|\s+$/g, ""))) return t;
|
||
try {
|
||
t = JSON.parse(t)
|
||
} catch(t) {}
|
||
return t
|
||
}
|
||
function u(t) {
|
||
var e = "";
|
||
try {
|
||
e = j.getItem(t)
|
||
} catch(t) {}
|
||
return e
|
||
}
|
||
function l(t, e, n, r, i, o) {
|
||
if ("function" == typeof i && (o = i, i = !1), "number" == typeof r && (i = r, r = !1), "function" == typeof r && (o = r, r = !1), "function" == typeof n && (o = n, n = !1), "number" == typeof n && (i = n, n = !1), n && (!i || "number" != typeof i)) throw new Error("请设置过期时间");
|
||
j.persistence( !! n),
|
||
j.setItem(t, e, r, i, o)
|
||
}
|
||
function f(t) {
|
||
j.removeItem(t)
|
||
}
|
||
var p = n(29),
|
||
h = r(p),
|
||
d = n(41),
|
||
m = r(d),
|
||
v = n(10),
|
||
g = r(v),
|
||
y = !0,
|
||
w = !0,
|
||
b = window.JD,
|
||
_ = function(t) {
|
||
var e, n = "WXSQ_STOARGE_TEST";
|
||
try {
|
||
return t.setItem(n, 1),
|
||
e = t.getItem(n),
|
||
t.removeItem(n),
|
||
1 == e
|
||
} catch(t) {
|
||
return ! 1
|
||
}
|
||
};
|
||
try {
|
||
y = _(window.sessionStorage),
|
||
w = _(window.localStorage)
|
||
} catch(t) {
|
||
y = !1,
|
||
w = !1
|
||
}
|
||
y && w || b.report.umpBiz({
|
||
bizid: 45,
|
||
operation: 1,
|
||
result: 2,
|
||
source: 0,
|
||
message: "session " + y + "|local " + w
|
||
});
|
||
var x = Array.isArray ||
|
||
function(t) {
|
||
return t instanceof Array
|
||
},
|
||
j = function() {
|
||
var t = window.sessionStorage,
|
||
e = function(t, e, n, r, o) {
|
||
var l = c(u("WQ_" + t));
|
||
l && (n && a(e) && a(l.v) || x(e) && x(l.v)) && (e = s(l.v, e, !0));
|
||
var f = {
|
||
v: e,
|
||
t: (new Date).getTime(),
|
||
e: "number" != typeof r ? "": r
|
||
};
|
||
i("WQ_" + t, f, o)
|
||
},
|
||
n = function(e) {
|
||
var n = t.getItem("WQ_" + e);
|
||
if (!n) return t.getItem(e);
|
||
n = c(n);
|
||
var i = n && n.e;
|
||
return 0 === i || i && new Date - n.t >= 1e3 * i ? (r(e), "") : n.v
|
||
},
|
||
r = function(e) {
|
||
try {
|
||
t.removeItem("WQ_" + e)
|
||
} catch(t) {}
|
||
},
|
||
i = function(e, n, r) {
|
||
var i = "";
|
||
try {
|
||
i = (0, h.
|
||
default)(n)
|
||
} catch(t) {
|
||
throw new Error("JSON数据格式异常:" + t.message)
|
||
}
|
||
try {
|
||
t.setItem(e, i),
|
||
r && r(0)
|
||
} catch(n) {
|
||
r && r(0),
|
||
setTimeout(function() {
|
||
l();
|
||
try {
|
||
t.setItem(e, i)
|
||
} catch(t) {
|
||
return b.report.umpBiz({
|
||
bizid: 45,
|
||
operation: 1,
|
||
result: 1,
|
||
source: 0,
|
||
message: e + "|" + t.message
|
||
}),
|
||
!1
|
||
}
|
||
},
|
||
0)
|
||
}
|
||
return ! 0
|
||
},
|
||
o = function(e) {
|
||
t = e ? window.localStorage: window.sessionStorage
|
||
},
|
||
l = function() {
|
||
for (var e = "",
|
||
r = t.length - 1; r >= 0; r--) e = t.key(r),
|
||
0 == e.indexOf("WQ_") && n(e.slice("WQ_".length))
|
||
};
|
||
return {
|
||
setItem: e,
|
||
getItem: n,
|
||
removeItem: r,
|
||
persistence: o,
|
||
clearOut: l
|
||
}
|
||
} ();
|
||
t.exports = {
|
||
getItem: function(t, e) {
|
||
return j.persistence( !! e),
|
||
u(t)
|
||
},
|
||
setItem: function(t, e, n, r, i, o) {
|
||
return l(t, e, n, r, i, o)
|
||
},
|
||
removeItem: function(t, e) {
|
||
return j.persistence( !! e),
|
||
f(t)
|
||
},
|
||
clearOut: function(t) {
|
||
j.persistence( !! t),
|
||
j.clearOut()
|
||
},
|
||
session: {
|
||
getItem: function(t) {
|
||
return j.persistence(!1),
|
||
u(t)
|
||
},
|
||
setItem: function(t, e, n, r, i) {
|
||
return l(t, e, !1, n, r, i)
|
||
},
|
||
removeItem: function(t) {
|
||
return j.persistence(!1),
|
||
f(t)
|
||
},
|
||
clearOut: function() {
|
||
j.persistence(!1),
|
||
j.clearOut()
|
||
}
|
||
},
|
||
local: {
|
||
getItem: function(t) {
|
||
return j.persistence(!0),
|
||
u(t)
|
||
},
|
||
setItem: function(t, e, n, r, i) {
|
||
return l(t, e, !0, n, r, i)
|
||
},
|
||
removeItem: function(t) {
|
||
return j.persistence(!0),
|
||
f(t)
|
||
},
|
||
clearOut: function() {
|
||
j.persistence(!0),
|
||
j.clearOut()
|
||
}
|
||
}
|
||
}
|
||
}]); |