Skip to content

Instantly share code, notes, and snippets.

@cafe4it
Created October 4, 2020 19:52
Show Gist options
  • Save cafe4it/6f32c9f80710086506608675cf4b0215 to your computer and use it in GitHub Desktop.
Save cafe4it/6f32c9f80710086506608675cf4b0215 to your computer and use it in GitHub Desktop.
// {"framework" : "Rax"}
define("pages/index/index", function (e) {
! function (e) {
var t = {};
function r(n) {
if (t[n]) return t[n].exports;
var o = t[n] = {
i: n,
l: !1,
exports: {}
};
return e[n].call(o.exports, o, o.exports, r), o.l = !0, o.exports
}
r.m = e, r.c = t, r.d = function (e, t, n) {
r.o(e, t) || Object.defineProperty(e, t, {
enumerable: !0,
get: n
})
}, r.r = function (e) {
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
value: "Module"
}), Object.defineProperty(e, "__esModule", {
value: !0
})
}, r.t = function (e, t) {
if (1 & t && (e = r(e)), 8 & t) return e;
if (4 & t && "object" == typeof e && e && e.__esModule) return e;
var n = Object.create(null);
if (r.r(n), Object.defineProperty(n, "default", {
enumerable: !0,
value: e
}), 2 & t && "string" != typeof e)
for (var o in e) r.d(n, o, function (t) {
return e[t]
}.bind(null, o));
return n
}, r.n = function (e) {
var t = e && e.__esModule ? function () {
return e.default
} : function () {
return e
};
return r.d(t, "a", t), t
}, r.o = function (e, t) {
return Object.prototype.hasOwnProperty.call(e, t)
}, r.p = "/build/", r(r.s = 31)
}([function (t, r) {
t.exports = e("rax")
}, function (e, t, r) {
e.exports = r(35)
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}), t.default = void 0;
var n = r(0),
o = r(1);
function i(e) {
return (i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
return typeof e
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
})(e)
}
function a() {
return (a = Object.assign || function (e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t];
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n])
}
return e
}).apply(this, arguments)
}
function s(e, t) {
for (var r = 0; r < t.length; r++) {
var n = t[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
}
}
function u(e) {
return (u = Object.setPrototypeOf ? Object.getPrototypeOf : function (e) {
return e.__proto__ || Object.getPrototypeOf(e)
})(e)
}
function c(e, t) {
return (c = Object.setPrototypeOf || function (e, t) {
return e.__proto__ = t, e
})(e, t)
}
function l(e, t, r) {
return t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r, e
}
var p = function (e) {
function t() {
return function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, t),
function (e, t) {
return !t || "object" !== i(t) && "function" != typeof t ? function (e) {
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e
}(e) : t
}(this, u(t).apply(this, arguments))
}
return function (e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
writable: !0,
configurable: !0
}
}), t && c(e, t)
}(t, n.Component),
function (e, t, r) {
t && s(e.prototype, t)
}(t, [{
key: "render",
value: function () {
var e = this.props;
if (o.isWeex) return (0, n.createElement)("div", e);
var t = function (e) {
for (var t = 1; t < arguments.length; t++) {
var r = null != arguments[t] ? arguments[t] : {},
n = Object.keys(r);
"function" == typeof Object.getOwnPropertySymbols && (n = n.concat(Object.getOwnPropertySymbols(r).filter(function (e) {
return Object.getOwnPropertyDescriptor(r, e).enumerable
}))), n.forEach(function (t) {
l(e, t, r[t])
})
}
return e
}({}, f.initial, e.style);
return (0, n.createElement)("div", a({}, e, {
style: t
}))
}
}]), t
}();
l(p, "propTypes", {});
var f = {
initial: {
border: "0 solid black",
position: "relative",
boxSizing: "border-box",
display: "flex",
flexDirection: "column",
alignContent: "flex-start",
flexShrink: 0
}
},
d = p;
t.default = d, e.exports = t.default
}, function (e, t, r) {
"use strict";
e.exports = r(34)
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}), t.default = void 0;
var n = r(0),
o = r(1);
function i(e) {
return (i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
return typeof e
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
})(e)
}
function a() {
return (a = Object.assign || function (e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t];
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n])
}
return e
}).apply(this, arguments)
}
function s(e) {
for (var t = 1; t < arguments.length; t++) {
var r = null != arguments[t] ? arguments[t] : {},
n = Object.keys(r);
"function" == typeof Object.getOwnPropertySymbols && (n = n.concat(Object.getOwnPropertySymbols(r).filter(function (e) {
return Object.getOwnPropertyDescriptor(r, e).enumerable
}))), n.forEach(function (t) {
f(e, t, r[t])
})
}
return e
}
function u(e, t) {
for (var r = 0; r < t.length; r++) {
var n = t[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
}
}
function c(e) {
return (c = Object.setPrototypeOf ? Object.getPrototypeOf : function (e) {
return e.__proto__ || Object.getPrototypeOf(e)
})(e)
}
function l(e, t) {
return (l = Object.setPrototypeOf || function (e, t) {
return e.__proto__ = t, e
})(e, t)
}
function p(e) {
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e
}
function f(e, t, r) {
return t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r, e
}
var d = function (e) {
function t() {
var e, r;
! function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, t);
for (var u = arguments.length, l = new Array(u), d = 0; d < u; d++) l[d] = arguments[d];
return f(p(p(r = function (e, t) {
return !t || "object" !== i(t) && "function" != typeof t ? p(e) : t
}(this, (e = c(t)).call.apply(e, [this].concat(l))))), "renderText", function () {
var e = r.props,
t = s({}, e, {
style: e.style || {}
}),
i = "";
if (null != e.children && (i = Array.isArray(e.children) ? e.children.join("") : e.children.toString()), r.context.isInAParentText) return (0, n.createElement)("span", t, i);
if (e.onPress && (t.onClick = e.onPress), o.isWeex) return e.numberOfLines && (t.style.lines = e.numberOfLines), t.value = i, (0, n.createElement)("text", t);
var u = s({
whiteSpace: "pre-wrap"
}, y.text, t.style),
c = e.numberOfLines;
return c && (1 === parseInt(c) ? u.whiteSpace = "nowrap" : (u.display = "-webkit-box", u.webkitBoxOrient = "vertical", u.webkitLineClamp = String(c)), u.overflow = "hidden"), (0, n.createElement)("span", a({}, t, {
style: u
}), i)
}), f(p(p(r)), "renderRichText", function () {
var e = r.props,
t = e.children,
i = s({}, e, {
style: e.style || {}
}),
u = s({}, y.richtext, i.style);
return o.isWeex && (t = m(t, p(p(r)))), (0, n.createElement)("p", a({}, i, {
style: u
}), t)
}), r
}
return function (e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
writable: !0,
configurable: !0
}
}), t && l(e, t)
}(t, n.Component),
function (e, t, r) {
t && u(e.prototype, t)
}(t, [{
key: "getChildContext",
value: function () {
return {
isInAParentText: !0
}
}
}, {
key: "render",
value: function () {
var e = this.props.children;
Array.isArray(e) || (e = [e]);
for (var t = !1, r = 0; r < e.length; r++) {
var n = e[r];
if (n && "object" === i(n)) {
t = !0;
break
}
}
return t ? this.renderRichText() : this.renderText()
}
}]), t
}();
function h(e, t) {
var r = e.type,
n = e.props,
o = n.children;
if ("function" == typeof r) {
var i = new r;
return i.props = n, o && (i.props.children = m(o, t)), i.context = t.getChildContext(), i.render()
}
return e
}
function m(e, t) {
var r = [];
Array.isArray(e) || (e = [e]);
for (var n = 0; n < e.length; n++) {
var o = e[n];
"string" == typeof o ? r.push(o) : "object" === i(o) && r.push(h(o, t))
}
return r
}
f(d, "propTypes", {}), f(d, "contextTypes", {
isInAParentText: n.PropTypes.bool
}), f(d, "childContextTypes", {
isInAParentText: n.PropTypes.bool
});
var y = {
text: {
border: "0 solid black",
position: "relative",
boxSizing: "border-box",
display: "block",
flexDirection: "column",
alignContent: "flex-start",
flexShrink: 0,
fontSize: 32
},
richtext: {
marginTop: 0,
marginBottom: 0
}
},
g = d;
t.default = g, e.exports = t.default
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}), t.default = void 0;
var n = r(0),
o = r(1),
i = function (e) {
return e && e.__esModule ? e : {
default: e
}
}(r(2));
function a(e) {
return (a = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
return typeof e
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
})(e)
}
function s() {
return (s = Object.assign || function (e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t];
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n])
}
return e
}).apply(this, arguments)
}
function u(e) {
for (var t = 1; t < arguments.length; t++) {
var r = null != arguments[t] ? arguments[t] : {},
n = Object.keys(r);
"function" == typeof Object.getOwnPropertySymbols && (n = n.concat(Object.getOwnPropertySymbols(r).filter(function (e) {
return Object.getOwnPropertyDescriptor(r, e).enumerable
}))), n.forEach(function (t) {
d(e, t, r[t])
})
}
return e
}
function c(e, t) {
for (var r = 0; r < t.length; r++) {
var n = t[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
}
}
function l(e) {
return (l = Object.setPrototypeOf ? Object.getPrototypeOf : function (e) {
return e.__proto__ || Object.getPrototypeOf(e)
})(e)
}
function p(e, t) {
return (p = Object.setPrototypeOf || function (e, t) {
return e.__proto__ = t, e
})(e, t)
}
function f(e) {
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e
}
function d(e, t, r) {
return t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r, e
}
var h = function (e) {
function t() {
var e, r;
! function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, t);
for (var n = arguments.length, o = new Array(n), i = 0; i < n; i++) o[i] = arguments[i];
return d(f(f(r = function (e, t) {
return !t || "object" !== a(t) && "function" != typeof t ? f(e) : t
}(this, (e = l(t)).call.apply(e, [this].concat(o))))), "state", {
source: r.props.source
}), d(f(f(r)), "onLoad", function (e) {
var t = f(f(r)).onError,
n = r.props.onLoad;
void 0 !== e.success ? e.success ? n(e) : t(e) : void 0 !== e.currentTarget && (e.currentTarget.naturalWidth > 1 && e.currentTarget.naturalHeight > 1 ? n(e) : t(e))
}), d(f(f(r)), "onError", function (e) {
var t = r.props,
n = t.fallbackSource,
o = t.onError,
i = r.state.source;
n.uri && i.uri !== n.uri && (r.isError = !0, r.setState({
source: n
})), o(e)
}), d(f(f(r)), "save", function (e) {
r.refs.nativeImg.save(function (t) {
e(t)
})
}), r
}
return function (e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
writable: !0,
configurable: !0
}
}), t && p(e, t)
}(t, n.PureComponent),
function (e, t, r) {
t && c(e.prototype, t)
}(t, [{
key: "render",
value: function () {
var e = u({}, this.props),
t = this.isError ? this.state.source : e.source;
if (t && t.uri) {
var r, a = e.style,
c = t.width,
l = t.height,
p = t.uri;
null == c && null == l && null == a.height && null == a.width && (c = 0, l = 0), e.style = u({}, u({}, !this.context.isInAParentText && {
display: "flex"
}, {
width: c,
height: l
}), a), e.src = p, e.onLoad = this.onLoad, e.onError = this.onError, delete e.source, r = o.isWeex ? "image" : "img";
var f = e.resizeMode || e.style.resizeMode;
return f && (o.isWeex ? (e.resize = f, e.style.resizeMode = f) : e.style.objectFit = f), this.props.children ? (e.children = null, (0, n.createElement)(i.default, {
style: e.style
}, (0, n.createElement)(r, s({
ref: "nativeImg"
}, e)), (0, n.createElement)(i.default, {
style: m.absoluteImage
}, this.props.children))) : (0, n.createElement)(r, s({
ref: "nativeImg"
}, e))
}
return null
}
}]), t
}();
d(h, "propTypes", {}), d(h, "resizeMode", {
contain: "contain",
cover: "cover",
stretch: "stretch",
center: "center",
repeat: "repeat"
}), d(h, "contextTypes", {
isInAParentText: n.PropTypes.bool
}), d(h, "defaultProps", {
onLoad: function () {},
onError: function () {},
fallbackSource: {}
});
var m = {
absoluteImage: {
left: 0,
top: 0,
position: "absolute"
}
},
y = h;
t.default = y, e.exports = t.default
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var n = "function" == typeof callNative,
o = !n;
t.default = {
isWeex: n,
isWeb: o
}, e.exports = t.default
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}), t.default = void 0;
var n = r(0),
o = r(1),
i = u(r(2)),
a = u(r(15)),
s = u(r(16));
function u(e) {
return e && e.__esModule ? e : {
default: e
}
}
function c(e) {
return (c = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
return typeof e
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
})(e)
}
function l() {
return (l = Object.assign || function (e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t];
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n])
}
return e
}).apply(this, arguments)
}
function p(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}
function f(e, t) {
for (var r = 0; r < t.length; r++) {
var n = t[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
}
}
function d(e, t, r) {
return t && f(e.prototype, t), r && f(e, r), e
}
function h(e, t) {
return !t || "object" !== c(t) && "function" != typeof t ? m(e) : t
}
function m(e) {
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e
}
function y(e) {
return (y = Object.setPrototypeOf ? Object.getPrototypeOf : function (e) {
return e.__proto__ || Object.getPrototypeOf(e)
})(e)
}
function g(e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
writable: !0,
configurable: !0
}
}), t && function (e, t) {
(Object.setPrototypeOf || function (e, t) {
return e.__proto__ = t, e
})(e, t)
}(e, t)
}
function v(e, t, r) {
return t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r, e
}
var b = function (e) {
function t() {
return p(this, t), h(this, y(t).apply(this, arguments))
}
return g(t, n.PureComponent), d(t, [{
key: "render",
value: function () {
return o.isWeex && this.context.isInARecyclerView ? (0, n.createElement)("cell", l({}, this.props, {
append: "tree"
})) : (0, n.createElement)(i.default, this.props)
}
}]), t
}();
v(b, "contextTypes", {
isInARecyclerView: n.PropTypes.bool
});
var _ = function (e) {
function t() {
return p(this, t), h(this, y(t).apply(this, arguments))
}
return g(t, n.PureComponent), d(t, [{
key: "render",
value: function () {
return o.isWeex && this.context.isInARecyclerView ? (0, n.createElement)("header", l({}, this.props, {
append: "tree"
})) : (0, n.createElement)(i.default, this.props)
}
}]), t
}();
v(_, "contextTypes", {
isInARecyclerView: n.PropTypes.bool
});
var w = function (e) {
function t(e) {
var r;
return p(this, t), v(m(m(r = h(this, y(t).call(this, e)))), "loadmoreretry", 1), v(m(m(r)), "handleScroll", function (e) {
e.nativeEvent = {
contentOffset: {
x: -e.contentOffset.x,
y: -e.contentOffset.y
},
contentSize: e.contentSize ? {
width: e.contentSize.width,
height: e.contentSize.height
} : null
}, r.props.onScroll(e)
}), v(m(m(r)), "resetScroll", function () {
o.isWeex ? (r.setState({
loadmoreretry: r.loadmoreretry++
}), r.refs.list.resetLoadmore && r.refs.list.resetLoadmore()) : r.refs.scrollview.resetScroll()
}), v(m(m(r)), "scrollTo", function (e) {
var t = parseInt(e.x),
i = parseInt(e.y);
if (o.isWeex) {
var a = __weex_require__("@weex-module/dom"),
s = (0, n.findDOMNode)(r.refs.firstNodePlaceholder);
a.scrollToElement(s.ref, {
offset: t || i || 0,
animated: !e || void 0 === e.animated || e.animated
})
} else r.refs.scrollview.scrollTo(e)
}), r.state = {
loadmoreretry: 0
}, r
}
return g(t, n.Component), d(t, [{
key: "getChildContext",
value: function () {
return {
isInARecyclerView: !0
}
}
}, {
key: "render",
value: function () {
var e = this.props;
if (o.isWeex) {
var t = e.children;
Array.isArray(t) || (t = [t]);
var r = t.map(function (t, r) {
if (t) {
var o = t.props && "function" == typeof t.props.onRefresh;
return e._autoWrapCell && t.type != s.default && t.type != _ && !o ? (0, n.createElement)(b, null, t) : t
}
return (0, n.createElement)(b, null)
}),
i = r[0].type == b || r[0].type == _ ? 0 : 1;
return r && r.length && r.splice(i, 0, (0, n.createElement)(b, {
ref: "firstNodePlaceholder"
})), (0, n.createElement)("list", l({}, e, {
ref: "list",
onLoadmore: e.onEndReached,
onScroll: e.onScroll ? this.handleScroll : null,
loadmoreretry: this.state.loadmoreretry,
loadmoreoffset: e.onEndReachedThreshold
}), r)
}
return (0, n.createElement)(a.default, l({}, e, {
ref: "scrollview"
}))
}
}]), t
}();
v(w, "defaultProps", {
onEndReachedThreshold: 500
}), v(w, "childContextTypes", {
isInARecyclerView: n.PropTypes.bool
}), w.Header = _, w.Cell = b;
var O = w;
t.default = O, e.exports = t.default
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}), t.getAppConfig = void 0;
var n = Object.assign || function (e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t];
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n])
}
return e
};
t.mtopRequest = function (e, t, a) {
c(function () {
var s = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
u = n({
appKey: 24815441,
timeout: 15e3
}, e);
u.data = n({
platform: "app",
_locale: s.locale || "en_US",
_currency: s.currency || "USD",
_lang: s.lang || "en_US"
}, u.data), l(u.ecode, function () {
i.isWeex ? r(9).request(u, t, a) : (u.H5Request = !0, o.default.request(u, t, a))
})
})
}, t.tppRequest = function (e, t, a) {
c(function () {
var s = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
u = {
api: "mtop.relationrecommend.AliexpressRecommend.recommend",
v: "1.0",
ecode: 0,
appKey: 24815441,
timeout: 15e3,
data: {
appId: e.appId,
params: JSON.stringify(n({
platform: "app",
locale: s.locale || "en_US",
currency: s.currency || "USD",
_lang: s.lang || "en_US"
}, e))
}
};
l(u.ecode, function () {
i.isWeex ? r(9).request(u, t, a) : (u.H5Request = !0, o.default.request(u, t, a))
})
})
};
var o = a(r(49)),
i = r(3);
function a(e) {
return e && e.__esModule ? e : {
default: e
}
}
var s = a(r(20)).default.urlParser.parsed,
u = void 0;
!i.isWeex && window.lib && window.lib.mtop && (window.lib.mtop.config.prefix = "acs", window.lib.mtop.config.subDomain = "", window.lib.mtop.config.H5Request = !0, window.lib.mtop.config.mainDomain = "aliexpress.com/");
var c = t.getAppConfig = function (e) {
void 0 !== u ? e && e(u) : i.isWeex ? r(69).getAppConfig(function (t) {
(u = {}).locale = s.locale || t.locale, u.currency = s.currency || t.currency, u.lang = s.lang || t.language, e && e(u)
}) : ((u = {}).locale = s.locale, u.currency = s.currency, u.lang = s.lang, e && e(u))
};
function l(e, t) {
if ("1" !== e && 1 !== e || !i.isWeex) t();
else {
var n = r(13);
n.getUserInfo(function (e) {
e.isLogin ? t() : n.login(function (e) {
e.isLogin && t()
})
})
}
}
}, function (t, r) {
t.exports = e("@weex-module/mtop")
}, function (e, t, r) {
"use strict";
function n(e) {
for (var t = [], r = 0; r < e.length; r++) {
var n = e[r][0],
o = e[r][1];
t.push(n + "=" + encodeURIComponent(o))
}
return t.join("&")
}
t.getAplusUniversalVersion = function () {
return "1.1.5"
}, t.paramsToObj = function (e) {
for (var t = {}, r = (e = "string" == typeof e ? e : "").split("&"), n = 0; n < r.length; n++) {
var o = r[n],
i = o.split("="),
a = i[0],
s = "";
if (2 === i.length) s = i[1];
else if (i.length > 2) {
var u = o.indexOf("=");
s = o.slice(u + 1)
}
a && (t[a] = s)
}
return t
}, t.objToParams = function (e, t) {
var r = [];
for (var n in e)
if (e.hasOwnProperty(n)) {
var o = n,
i = t ? encodeURIComponent(e[n]) : e[n];
r.push(o + "=" + i)
} return r.join("&")
}, t.getParamFromURL = function (e, t) {
var r = "";
return t || (t = "spm"), e && (e.split("?")[1] || "").split("&").forEach(function (e) {
0 === e.indexOf(t + "=") && (r = e.substr(t.length + 1))
}), r
}, t.simplifyURL = function (e) {
return e || (e = ""), e.indexOf("_wx_tpl=") > -1 && (e = e.substring(e.indexOf("_wx_tpl=") + "_wx_tpl=".length, e.indexOf(".js") + ".js".length)), e.split("?")[0]
}, t.getLocation = function () {
var e;
try {
e = location || {}
} catch (t) {
e = {}
}
return e
}, t.getPVLogUrl = function (e) {
var t = "";
return t = /^\/\/\w+/.test(e) ? "https:" + e : "https://" + e, /\w+\.gif$/.test(e) || (t += "/vx.gif"), t
}, t.getEtagUrl = function (e) {
return (/^\/\/\w+/.test(e) ? "https:" + e : "https://" + e) + "/eg.js"
}, t.getGoldlogUrl = function (e) {
return /^\/\/\w+/.test(e) ? "https:" + e : "https://" + e
}, t.makeCacheNum = function () {
return Math.floor(268435456 * Math.random()).toString(16)
}, t.makeUrl = function (e) {
return [e.preParams ? n(e.preParams) : "", "&aplus&", e.endParams ? n(e.endParams) : ""].join("")
}, t.hostValidity = function (e) {
return /^(\/\/){0,1}(\w+\.){1,}\w+((\/\w+){1,})?$/.test(e)
}
}, function (e, t, r) {
"use strict";
var n = function () {},
o = r(80).extend({
spmAB: ["0", "0"],
spmUrl: "",
spmPre: "",
pageName: "",
isPageDisAppear: !0,
isPageAppear: !1,
_meta_info: {},
record: n,
setPageSPM: n,
getPageSPM: n,
enter: n,
updatePageProperties: n,
updateNextPageProperties: n,
updatePageUtparam: n,
updateNextPageUtparam: n,
skipPage: n,
pageAppear: n,
pageDisappear: n,
setExposureView: n,
setMetaInfo: n,
appendMetaInfo: n,
getMetaInfo: n,
catchException: function (e) {
try {
console && console.error(e)
} catch (e) {}
}
});
e.exports = o
}, function (t, r) {
t.exports = e("@weex-module/windvane")
}, function (t, r) {
t.exports = e("@weex-module/user")
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}), t.default = function (e) {
var t = (i.lang || "en_US").split("_")[0],
r = o[e] || {};
return r[t] || r.en
};
var n = r(8),
o = function () {
var e = {
"TBPS.iOS.errorDefault": {
en_US: "An unexpected error occurred. Please try again later. ",
ru_RU: "Ошибка соединения, попробуйте позже.",
es_ES: "Ha habido un error, inténtalo de nuevo.",
pt_BR: "Ops, algo deu errado. Tente de novo.",
fr_FR: "Une erreur s'est produite. Veuillez réessayer.",
id_ID: "Terjadi kesalahan tak terduga. Silakan coba lagi nanti. ",
tr_TR: "Beklenmeyen bir hata oluştu. Lütfen daha sonra tekrar deneyin.",
th_TH: "ความผิดพลาดที่ไม่คาดฝันเกิดขึ้น กรุณาลองใหม่อีกครั้งในภายหลัง ",
it_IT: "Si è verificato un errore imprevisto. Riprova più tardi. ",
de_DE: "Ein unerwarteter Fehler ist aufgetreten. Bitte versuchen Sie es später wieder. ",
he_IL: "אירעה שגיאה בלתי צפויה. נסו שוב מאוחר יותר.",
ja_JP: "予期せぬエラーが発生しました。 後ほどもう一度お試しください。 ",
ko_KR: "예기치 못한 오류가 발생했습니다. 잠시 후 다시 시도하십시오. ",
nl_NL: "Er is een onverwachte fout opgetreden. Probeer later opnieuw. ",
vi_VN: "Gặp lỗi bất thường. Vui lòng thử lại sau. ",
ar_SA: "حدث خطأ غير متوقع. يُرجى المحاولة مجددًا لاحقًا.",
pl_PL: "Wystąpił nieoczekiwany błąd. Spróbuj ponownie później.",
uk_UA: "Сталася несподівана помилка. Спробуйте ще раз пізніше. "
},
ps_list_zero_result: {
en_US: "No item found",
ru_RU: "Товар не найдён",
es_ES: "No se encontró ningún artículo",
pt_BR: "Nenhum produto encontrado",
fr_FR: "Aucun article trouvé",
id_ID: "Tidak ada item ditemukan",
tr_TR: "Hiçbir öğe bulunamadı",
th_TH: "ไม่พบรายการ",
it_IT: "Nessun articolo trovato",
de_DE: "Kein Artikel gefunden",
he_IL: "פריט לא קיים",
ja_JP: "アイテムが見つかりませんでした",
ko_KR: "아이템을 찾을 수 없습니다",
nl_NL: "Geen artikel gevonden",
vi_VN: "Không tìm thấy mặt hàng",
ar_SA: "لم يتم العثور على أي صنف",
pl_PL: "Nie znaleziono żadnego przedmiotu",
uk_UA: "Товарів не знайдено"
},
"Home.ViewMore": {
id_ID: "Lihat Lainnya",
pt_BR: "Ver Mais",
es_ES: "Ver más",
ru_RU: "Смотреть ещё",
en_US: "View More",
nl_NL: "Meer Weergeven",
uk_UA: "Переглянути більше",
ko_KR: "더 보기",
ar_SA: "عرض المزيد",
de_DE: "Mehr anzeigen",
ja_JP: "もっと見る",
fr_FR: "Voir plus",
th_TH: "ชมสินค้าอื่นๆ",
vi_VN: "XEM NHIỀU HƠN",
he_IL: "הצג יותר",
tr_TR: "Daha Fazla Görüntüle",
pl_PL: "Zobacz więcej",
it_IT: "VEDERE PIÙ"
},
Recommend_Sold: {
ar_SA: " تم البيع",
de_DE: " verkauft",
en_US: " sold",
es_ES: " Vendidos",
fr_FR: " Vendus",
id_ID: " terjual",
it_IT: " venduto",
he_IL: " נמכר",
ja_JP: " 売り切れ",
ko_KR: " 판매",
nl_NL: " verkocht",
pl_PL: " sprzedany",
pt_BR: " Itens Vendidos",
ru_RU: " продано",
th_TH: " ขายแล้ว",
tr_TR: " satıldı",
uk_UA: " продано",
vi_VN: " đã bán"
}
};
for (var t in e) {
var r = e[t],
n = {};
for (var o in r) n[o.split("_")[0]] = r[o];
e[t] = n
}
return e
}(),
i = {};
(0, n.getAppConfig)(function (e) {
i = e
}), e.exports = t.default
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}), t.default = void 0;
var n = r(0),
o = r(1),
i = u(r(2)),
a = u(r(16)),
s = u(r(37));
function u(e) {
return e && e.__esModule ? e : {
default: e
}
}
function c(e) {
return (c = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
return typeof e
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
})(e)
}
function l() {
return (l = Object.assign || function (e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t];
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n])
}
return e
}).apply(this, arguments)
}
function p(e) {
for (var t = 1; t < arguments.length; t++) {
var r = null != arguments[t] ? arguments[t] : {},
n = Object.keys(r);
"function" == typeof Object.getOwnPropertySymbols && (n = n.concat(Object.getOwnPropertySymbols(r).filter(function (e) {
return Object.getOwnPropertyDescriptor(r, e).enumerable
}))), n.forEach(function (t) {
y(e, t, r[t])
})
}
return e
}
function f(e, t) {
for (var r = 0; r < t.length; r++) {
var n = t[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
}
}
function d(e) {
return (d = Object.setPrototypeOf ? Object.getPrototypeOf : function (e) {
return e.__proto__ || Object.getPrototypeOf(e)
})(e)
}
function h(e, t) {
return (h = Object.setPrototypeOf || function (e, t) {
return e.__proto__ = t, e
})(e, t)
}
function m(e) {
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e
}
function y(e, t, r) {
return t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r, e
}
var g = 750,
v = function (e) {
function t(e) {
var r;
return function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, t), y(m(m(r = function (e, t) {
return !t || "object" !== c(t) && "function" != typeof t ? m(e) : t
}(this, d(t).call(this, e)))), "lastScrollDistance", 0), y(m(m(r)), "lastScrollContentSize", 0), y(m(m(r)), "loadmoreretry", 1), y(m(m(r)), "handleScroll", function (e) {
if (o.isWeb && (r.props.onScroll && (e.nativeEvent = {
get contentOffset() {
return {
x: e.target.scrollLeft,
y: e.target.scrollTop
}
},
get contentSize() {
return {
width: e.target.scrollWidth,
height: e.target.scrollHeight
}
}
}, r.props.onScroll(e)), r.props.onEndReached)) {
r.scrollerNode || (r.scrollerNode = (0, n.findDOMNode)(r.refs.scroller), r.scrollerContentNode = (0, n.findDOMNode)(r.refs.contentContainer), r.scrollerNodeSize = r.props.horizontal ? r.scrollerNode.offsetWidth : r.scrollerNode.offsetHeight);
var t = r.props.horizontal ? r.scrollerNode.scrollWidth : r.scrollerNode.scrollHeight,
i = r.props.horizontal ? r.scrollerNode.scrollLeft : r.scrollerNode.scrollTop,
a = t - i - r.scrollerNodeSize < r.props.onEndReachedThreshold,
s = i > r.lastScrollDistance,
u = t != r.lastScrollContentSize;
a && s && u && (r.lastScrollContentSize = t, r.props.onEndReached(e)), r.lastScrollDistance = i
}
o.isWeex && (e.nativeEvent = {
contentOffset: {
x: -e.contentOffset.x,
y: -e.contentOffset.y
},
contentSize: e.contentSize ? {
width: e.contentSize.width,
height: e.contentSize.height
} : null
}, r.props.onScroll(e))
}), y(m(m(r)), "resetScroll", function () {
o.isWeb ? (r.lastScrollContentSize = 0, r.lastScrollDistance = 0) : r.setState({
loadmoreretry: r.loadmoreretry++
})
}), y(m(m(r)), "scrollTo", function (e) {
var t = parseInt(e.x),
i = parseInt(e.y),
a = !e || void 0 === e.animated || e.animated;
if (o.isWeex) {
var u = __weex_require__("@weex-module/dom"),
c = (0, n.findDOMNode)(r.refs.contentContainer);
u.scrollToElement(c.ref, {
offset: t || i || 0,
animated: a
})
} else {
var l = document.documentElement.clientWidth / g,
p = (0, n.findDOMNode)(r.refs.scroller),
f = p.scrollLeft,
d = p.scrollTop;
a ? new s.default({
duration: 400,
easing: "easeOutSine",
onRun: function (e) {
t >= 0 && (p.scrollLeft = f + e.percent * (t * l - f)), i >= 0 && (p.scrollTop = d + e.percent * (i * l - d))
}
}).run() : (t >= 0 && ((0, n.findDOMNode)(r.refs.scroller).scrollLeft = l * t), i >= 0 && ((0, n.findDOMNode)(r.refs.scroller).scrollTop = l * i))
}
}), r.state = {
loadmoreretry: 0
}, r
}
return function (e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
writable: !0,
configurable: !0
}
}), t && h(e, t)
}(t, n.Component),
function (e, t, r) {
t && f(e.prototype, t)
}(t, [{
key: "render",
value: function () {
var e = this,
t = this.props,
r = (t.id, t.style, t.scrollEventThrottle),
s = t.showsHorizontalScrollIndicator,
u = t.showsVerticalScrollIndicator,
c = t.onEndReached,
f = t.onEndReachedThreshold,
d = t.onScroll,
h = t.children;
f = parseInt(f, 10);
var m = [this.props.horizontal && b.contentContainerHorizontal, this.props.contentContainerStyle];
if (o.isWeex || this.props.horizontal || m.push(b.containerWebStyle), this.props.style) {
var y = ["alignItems", "justifyContent"].filter(function (t) {
return void 0 !== e.props.style[t]
});
0 !== y.length && console.warn("ScrollView child layout (" + JSON.stringify(y) + ") must be applied through the contentContainerStyle prop.")
}
var g, v = (0, n.createElement)(i.default, null);
g = Array.isArray(h) ? h.map(function (e, t) {
if (!e || e.type != a.default) return e;
v = e
}) : h;
var _ = (0, n.createElement)(i.default, {
ref: "contentContainer",
style: m
}, g),
w = p({}, this.props.horizontal ? b.baseHorizontal : b.baseVertical, this.props.style),
O = this.props.horizontal ? s : u;
if (o.isWeex) return (0, n.createElement)("scroller", l({}, this.props, {
style: w,
showScrollbar: O,
onLoadmore: c,
onScroll: d ? this.handleScroll : null,
loadmoreoffset: f,
loadmoreretry: this.state.loadmoreretry,
scrollDirection: this.props.horizontal ? "horizontal" : "vertical"
}), v, _);
var x = this.handleScroll;
if (r && (x = function (e, t) {
var r, n, o, i, a = 0;
function s() {
i = 0, a = +new Date, o = e.apply(r, n), r = null, n = null
}
return function () {
r = this, n = arguments;
var e = new Date - a;
return i || (e >= t ? s() : i = setTimeout(s, t - e)), o
}
}(x, r)), !O && "undefined" != typeof document && !document.getElementById("rax-scrollview-style")) {
var S = document.createElement("style");
S.id = "rax-scrollview-style", document.head.appendChild(S), S.innerHTML = ".".concat(this.props.className, "::-webkit-scrollbar{display: none;}")
}
w.webkitOverflowScrolling = "touch", w.overflow = "scroll";
var P = p({}, this.props, {
ref: "scroller",
style: w,
onScroll: x
});
return delete P.onEndReachedThreshold, (0, n.createElement)(i.default, P, _)
}
}]), t
}();
y(v, "propTypes", {}), y(v, "defaultProps", {
scrollEventThrottle: 50,
onEndReachedThreshold: 500,
showsHorizontalScrollIndicator: !0,
showsVerticalScrollIndicator: !0,
className: "rax-scrollview"
});
var b = {
baseVertical: {
flex: 1,
flexDirection: "column"
},
baseHorizontal: {
flex: 1,
flexDirection: "row"
},
contentContainerHorizontal: {
flexDirection: "row"
},
containerWebStyle: {
display: "block"
}
},
_ = v;
t.default = _, e.exports = t.default
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}), t.default = void 0;
var n = r(0),
o = r(1);
function i(e) {
return (i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
return typeof e
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
})(e)
}
function a() {
return (a = Object.assign || function (e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t];
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n])
}
return e
}).apply(this, arguments)
}
function s(e, t) {
for (var r = 0; r < t.length; r++) {
var n = t[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
}
}
function u(e) {
return (u = Object.setPrototypeOf ? Object.getPrototypeOf : function (e) {
return e.__proto__ || Object.getPrototypeOf(e)
})(e)
}
function c(e, t) {
return (c = Object.setPrototypeOf || function (e, t) {
return e.__proto__ = t, e
})(e, t)
}
var l = function (e) {
function t() {
return function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, t),
function (e, t) {
return !t || "object" !== i(t) && "function" != typeof t ? function (e) {
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e
}(e) : t
}(this, u(t).apply(this, arguments))
}
return function (e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
writable: !0,
configurable: !0
}
}), t && c(e, t)
}(t, n.Component),
function (e, t, r) {
t && s(e.prototype, t)
}(t, [{
key: "render",
value: function () {
if (o.isWeex) {
var e = this.props.refreshing ? "show" : "hide";
return (0, n.createElement)("refresh", a({}, this.props, {
display: e
}), this.props.children)
}
return null
}
}]), t
}();
t.default = l, e.exports = t.default
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}), t.default = void 0;
var n = Object.assign || function (e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t];
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n])
}
return e
},
o = function () {
function e(e, t) {
for (var r = 0; r < t.length; r++) {
var n = t[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
}
}
return function (t, r, n) {
return r && e(t.prototype, r), n && e(t, n), t
}
}(),
i = r(0),
a = c(r(4)),
s = c(r(2)),
u = c(r(7));
function c(e) {
return e && e.__esModule ? e : {
default: e
}
}
function l(e) {
if (Array.isArray(e)) {
for (var t = 0, r = Array(e.length); t < e.length; t++) r[t] = e[t];
return r
}
return Array.from(e)
}
var p = function () {
function e(t) {
var r = this;
! function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, e), this.headerText = "", this.rc = 0, this.numOfItems4Row = 1, this.row = function (e, t, o) {
var a = [],
c = null;
Array.isArray(e) || (e = [e]);
var p = e.length;
if (e.map(function (e, n) {
var u = t * p + n + 1,
c = r.item(e, u, o);
return c ? a = [].concat(l(a), [c]) : p > 1 && (a = [].concat(l(a), [(0, i.createElement)(s.default, {
style: {
opacity: 0,
width: 1,
height: 1
}
})])), e
}), a.length > 1 ? c = (0, i.createElement)(s.default, null, (0, i.createElement)(s.default, {
style: n({
flexDirection: "row",
justifyContent: "space-between"
}, r.style4row()),
className: "row-wrap"
}, a)) : 1 === a.length && (c = a[0]), c) return (0, i.createElement)(u.default.Cell, null, c)
}, this.props = t, this.state = {
tips: []
}
}
return o(e, [{
key: "header",
value: function () {
var e = this.headerText;
return this.props.getHeaderText && (e = this.props.getHeaderText()), e ? (0, i.createElement)(u.default.Cell, null, (0, i.createElement)(s.default, {
style: {
height: 96,
padding: 16,
paddingLeft: 24,
paddingRight: 24,
marginBottom: 8,
justifyContent: "center",
overflow: "hidden"
}
}, (0, i.createElement)(a.default, {
style: {
height: 64,
fontSize: 32,
lineHeight: 64,
fontWeight: 600,
color: "#000",
fontFamily: "open sans",
textOverflow: "ellipsis"
},
numberOfLines: 1
}, e || ""))) : null
}
}, {
key: "footer",
value: function () {
return (0, i.createElement)(u.default.Cell, {
style: {
width: 750,
height: 20,
backgroundColor: "#f2f2f2"
}
})
}
}, {
key: "style4row",
value: function () {
return {
width: 734,
marginBottom: 8,
marginLeft: 8,
marginRight: 8
}
}
}, {
key: "key4Data",
value: function () {
return ""
}
}, {
key: "getData",
value: function (e) {
return (0, this.props.getData)(e)
}
}, {
key: "rows",
value: function () {
var e = this,
t = this.key4Data(),
r = this.getData(t),
n = this.props.renderCount();
if (n <= 0) return [];
if (this.props.getStatus && "success" !== this.props.getStatus()) return [];
if (r) {
if (Array.isArray(r)) {
var o = [];
return this.dataTransform(r, this.numOfItems4Row).map(function (t, r) {
if (!(n-- <= 0)) {
var i = e.row(t, r, e.rowDataFlag && e.rowDataFlag(t));
i && (o = [].concat(l(o), [i]))
}
}), o
}
var a = this.item(r, 1);
if (a) {
var s = {};
return this.props4Cell && (s = this.props4Cell()), [(0, i.createElement)(u.default.Cell, s, a)]
}
}
return []
}
}, {
key: "dataTransform",
value: function (e, t) {
var r = this,
n = [],
o = [],
i = 0;
if (e.map(function (e) {
r.rc && n.length >= r.rc ? i++ : t <= 1 ? n = [].concat(l(n), [e]) : (o = [].concat(l(o), [e])).length === t && (n = [].concat(l(n), [o]), o = [])
}), o.length) {
if (o.length < t)
for (var a = t - o.length; a > 0; a--) o = [].concat(l(o), [null]);
n = [].concat(l(n), [o])
}
return !i >= t && (this.rc = 0), n
}
}, {
key: "render",
value: function () {
if (this.props.renderCount() <= 0) return [];
var e = this.rows();
return e && e.length ? (this.didRender = !0, [this.header()].concat(l(e), [this.footer()])) : (this.didRender = !1, [])
}
}]), e
}();
t.default = p, e.exports = t.default
}, function (e, t, r) {
"use strict";
e.exports = r(51)
}, function (t, r) {
t.exports = e("@weex-module/userTrack")
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var n = f(r(55)),
o = f(r(6)),
i = f(r(56)),
a = f(r(57)),
s = f(r(61)),
u = f(r(21)),
c = f(r(62)),
l = f(r(65)),
p = f(r(67));
function f(e) {
return e && e.__esModule ? e : {
default: e
}
}
if (o.default.isWeb) {
var d = window.weex || {},
h = d.config || {},
m = h.env || {},
y = r(22);
m.aeLocale = y.getLocale() || "en_US", m.aeCurrency = y.getCurrency() || "USD", "iw_IL" === m.aeLocale || "ar_MA" === m.aeLocale ? m.layoutDirection = "rtl" : m.layoutDirection = "ltr", h.env = m, d.config = h, window.weex = d
}
t.default = {
logger: n.default,
env: o.default,
MtopRequest: i.default,
urlParser: a.default,
dateParser: s.default,
WeexExposureManager: u.default,
Component: c.default,
NavigationBar: l.default,
User: p.default
}, e.exports = t.default
}, function (e, t, r) {
"use strict";
function n(e, t, r, n) {
this.exposureEvent = e, this.prod = t, this.spmCnt = r, this.additionParams = n, this.times = 0
}
function o() {
if (!(this instanceof o)) return new o(page, params);
this.recordExposureData = new Map, this.rawExposureData = new Map
}
Object.defineProperty(t, "__esModule", {
value: !0
}), o.prototype.startExposure = function (e, t) {
this.pageName = e, this.pageParams = t, this.recordExposureData.clear(), this.rawExposureData.clear()
}, o.prototype.endExposure = function () {
var e = this;
this.rawExposureData.forEach(function (t, r) {
if (t && Date.now() - t.startDate >= 500) {
var o = e.recordExposureData.get(r);
o || (o = new n(t.exposureEvent, t.prod, t.spmCnt, t.additionParams)), o.times += 1, e.recordExposureData.set(r, o)
}
}), this.rawExposureData.clear();
var t = new Map;
if (this.recordExposureData.forEach(function (e, r) {
var n = t.get(e.exposureEvent);
n || (n = {
exposureEvent: e.exposureEvent,
exposureStr: ""
}, t.set(e.exposureEvent, n));
var o = "";
e.additionParams && Object.getOwnPropertyNames(e.additionParams).forEach(function (t, r) {
o += "," + t + "=" + e.additionParams[t]
}), n.exposureStr += "{prod=" + e.prod + ",times=" + e.times + ",spm-cnt=" + e.spmCnt + o + "}"
}), "Web" !== WXEnvironment.platform) {
var r = weex.requireModule("userTrack");
t.forEach(function (t, n) {
try {
r.commitut("expose", 2201, "Page_" + e.pageName, "", t.exposureEvent, "", "", {
exposure: t.exposureStr,
scene: e.pageParams.scene ? e.pageParams.scene : ""
})
} catch (e) {}
})
}
}, o.prototype.itemAppear = function (e, t, r, n) {
if (t)
if (this.rawExposureData.has(t)) console.warn("item exposure not match");
else {
var o = new function (e, t, r, n) {
this.exposureEvent = e, this.prod = t, this.spmCnt = r, this.additionParams = n, this.startDate = Date.now()
}(e, t, r, n);
this.rawExposureData.set(t, o)
}
else console.warn("prod can't be null")
}, o.prototype.itemDisappear = function (e) {
if (e)
if (this.rawExposureData.has(e)) {
var t = this.rawExposureData.get(e);
if (Date.now() - t.startDate > 500) {
var r = this.recordExposureData.get(e);
r || (r = new n(t.exposureEvent, t.prod, t.spmCnt, t.additionParams)), r.times += 1, this.recordExposureData.set(e, r), this.rawExposureData.delete(e)
}
} else console.warn("exposure not match")
};
var i = new o,
a = {
startExposure: function (e, t) {
console.log("startExposure: " + e + ", params: " + JSON.stringify(t)), i.startExposure(e, t)
},
endExposure: function () {
i.endExposure()
},
itemAppear: function (e, t, r, n) {
console.log("itemAppear: " + e + ", " + t + ", " + r + ", " + JSON.stringify(n)), i.itemAppear(e, t, r, n)
},
itemDisappear: function (e) {
console.log("itemDisappear: " + e), i.itemDisappear(e)
}
};
t.default = a, e.exports = t.default
}, function (e, t, r) {
"use strict";
var n = r(68),
o = {
siteFormat: /^[a-z]{3}(_[a-z]{1})?$/,
x_localeFormat: /^[a-z]{2}_[A-Z]{2}$/,
s_localeFormat: /^[a-z]{2}_[A-Z]{2}$/,
b_localeFormat: /^[a-z]{2}_[A-Z]{2}$/,
c_tpFormat: /^[A-Z]{3}$/,
regionFormat: /^[A-Z]{2,3}$/,
siFormat: /^(glo|rus|bra|esp|idn|fra|deu|ita|nld|tur|jpn|tha|kor|vnm)$/,
signFormat: /^(y|n)$/,
x_userFormat: /^.*$/,
issFormat: /^(y)$/,
isbFormat: /^(y)$/,
ispmFormat: /^(y)$/,
isksFormat: /^(y)$/,
isgclFormat: /^(y)$/,
reg_verFormat: /^(new|old)$/,
x_lFormat: /^[01]{1}$/,
ber_l_fgFormat: /^A\d$/
};
function i(e, t) {
var r = n.get(e, {
domain: "aliexpress.com",
path: "/",
raw: !0
}) || "",
i = new RegExp("(.*&?" + t + "=)(.*?)(&.*|$)");
r.match(i);
var a = RegExp.$2;
return i.test(r) && function (e, t) {
return !/(&|=)/.test(t) && !!(t && o[e + "Format"] && o[e + "Format"].test(t))
}(t, a) ? a : ""
}
function a() {
var e = {
country: "",
firstName: "",
lastName: "",
memberSeq: ""
},
t = i("xman_us_f", "x_user").split("|");
return t.length >= 5 && (e.country = t[0], e.firstName = t[1].replace(/</g, "&lt;").replace(/>/g, "&gt;"), e.lastName = t[2].replace(/</g, "&lt;").replace(/>/g, "&gt;"), e.memberSeq = t[4]), e
}
e.exports = {
getSite: function () {
return i("aep_usuc_f", "site")
},
getLocale: function () {
return i("xman_us_f", "x_locale")
},
getBuyerLocale: function () {
return i("aep_usuc_f", "b_locale")
},
getRegion: function () {
return i("aep_usuc_f", "region")
},
getXUserObj: a,
getCurrency: function () {
return i("aep_usuc_f", "c_tp")
},
isNewUser: function () {
return !a().memberSeq
},
isLoggedIn: function () {
return "y" == i("xman_us_t", "sign")
}
}
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}), t.default = void 0;
var n = r(0),
o = r(1),
i = function (e) {
return e && e.__esModule ? e : {
default: e
}
}(r(4));
function a(e) {
return (a = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
return typeof e
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
})(e)
}
function s() {
return (s = Object.assign || function (e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t];
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n])
}
return e
}).apply(this, arguments)
}
function u(e) {
for (var t = 1; t < arguments.length; t++) {
var r = null != arguments[t] ? arguments[t] : {},
n = Object.keys(r);
"function" == typeof Object.getOwnPropertySymbols && (n = n.concat(Object.getOwnPropertySymbols(r).filter(function (e) {
return Object.getOwnPropertyDescriptor(r, e).enumerable
}))), n.forEach(function (t) {
f(e, t, r[t])
})
}
return e
}
function c(e, t) {
for (var r = 0; r < t.length; r++) {
var n = t[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
}
}
function l(e) {
return (l = Object.setPrototypeOf ? Object.getPrototypeOf : function (e) {
return e.__proto__ || Object.getPrototypeOf(e)
})(e)
}
function p(e, t) {
return (p = Object.setPrototypeOf || function (e, t) {
return e.__proto__ = t, e
})(e, t)
}
function f(e, t, r) {
return t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r, e
}
var d = function (e) {
function t() {
return function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, t),
function (e, t) {
return !t || "object" !== a(t) && "function" != typeof t ? function (e) {
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e
}(e) : t
}(this, l(t).apply(this, arguments))
}
return function (e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
writable: !0,
configurable: !0
}
}), t && p(e, t)
}(t, n.Component),
function (e, t, r) {
t && c(e.prototype, t)
}(t, [{
key: "getChildContext",
value: function () {
return {
isInAParentLink: !0
}
}
}, {
key: "render",
value: function () {
if (this.context.isInAParentLink) return console.error("Nested links are illegal");
var e = this.props,
t = e.children,
r = u({}, e),
a = u({}, h.initial, r.style),
c = {
color: a.color,
lines: a.lines,
fontSize: a.fontSize,
fontStyle: a.fontStyle,
fontWeight: a.fontWeight,
textDecoration: a.textDecoration,
textAlign: a.textAlign,
fontFamily: a.fontFamily,
textOverflow: a.textOverflow
};
r.onPress && (r.onClick = r.onPress, delete r.onPress);
var l = t;
return "string" != typeof t || this.context.isInAParentText || (l = (0, n.createElement)(i.default, {
style: c
}, t)), o.isWeex ? (0, n.createElement)("a", r, l) : (0, n.createElement)("a", s({}, r, {
style: a
}), l)
}
}]), t
}();
f(d, "contextTypes", {
isInAParentLink: n.PropTypes.bool,
isInAParentText: n.PropTypes.bool
}), f(d, "childContextTypes", {
isInAParentLink: n.PropTypes.bool
});
var h = {
initial: {
textDecoration: "none"
}
},
m = d;
t.default = m, e.exports = t.default
}, function (e, t, r) {
"use strict";
var n = r(10).objToParams,
o = r(11).extend({
setPageSPM: function (e, t, r) {
this.spmAB = [e, t], (window.goldlog_queue || (window.goldlog_queue = [])).push({
action: "goldlog.setPageSPM",
arguments: [e, t]
}), "function" == typeof r && r()
},
getPageSPM: function () {
return this.spmAB
},
getPageSPMStr: function () {
return this.spmAB.join(".")
},
record: function (e, t, r, o) {
return r = "string" == typeof r ? r : n(r, !0), (window.goldlog_queue || (window.goldlog_queue = [])).push({
action: "goldlog.record",
arguments: [e, t, r, o || "POST"]
}), !0
},
enter: function (e, t) {
e || (e = {}), t || (t = {});
var r = {
is_auto: !1,
page_id: ""
};
return t.page_id && (r.page_id = t.page_id, delete t.page_id), (window.goldlog_queue || (window.goldlog_queue = [])).push({
action: "goldlog.sendPV",
arguments: [r, t]
}), !0
}
});
e.exports = o
}, function (e, t, r) {
"use strict";
var n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
return typeof e
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
},
o = r(1).isWeex,
i = r(26),
a = r(27).requireModule,
s = i.extend({
getUT: function () {
try {
var e = this.UserTrack || {};
"function" != typeof e.enterEvent && "function" != typeof e.commit && (e = a("userTrack") || r(19)), this.UserTrack = e || {}
} catch (e) {
this.UserTrack = {}
}
return this.UserTrack
},
create: function (e) {
var t = new this;
for (var r in e) t[r] = e[r];
return t.isThirdGroupAPI = function () {
var e = "undefined" != typeof __weex_options__ && __weex_options__.weex,
t = !1;
if (o && "object" === (void 0 === e ? "undefined" : n(e)) && "windmill" === e.config.container) try {
var r = a("keyboard");
void 0 !== r && !n(r) || "function" != typeof r.hideKeyboard || (t = !0)
} catch (e) {}
return t
}(), t.getUT(), t
},
record: function (e, t, r) {
var n = this._getRecordParams(e, t, r),
o = n.gmObj || {},
i = this.getUT();
return this.isThirdGroupAPI ? (n.args.isThirdGroupAPI = "1", i.commitut && i.commitut({
type: o.name,
eventId: o.id,
eventid: o.id,
name: n.pageName,
pageName: n.pageName,
arg1: n.arg1,
arg2: n.arg2,
arg3: n.arg3,
param: n.args,
params: n.args
})) : i.customAdvance ? i.customAdvance(n.pageName, o.id, n.arg1, n.arg2, n.arg3, n.args) : i.commitut && i.commitut(o.name, o.id, n.pageName, "", n.arg1, n.arg2, n.arg3, n.args), !0
},
enter: function (e, t) {
var r = this.getUT();
e || (e = {}), t || (t = {});
var n = this._getEnterParams(e, t);
return this.isThirdGroupAPI && r.commitut ? (n.args.isThirdGroupAPI = "1", r.commitut({
type: "enter",
eventId: "-1",
eventid: "-1",
name: n.pageName,
pageName: n.pageName,
comName: "",
arg1: "",
arg2: "",
arg3: "",
param: n.args,
params: n.args
})) : r.enterEvent ? r.enterEvent(n.pageName, n.args) : r.commit && r.commit("enter", n.pageName, "", n.args), !0
},
updatePageProperties: function (e) {},
updateNextPageProperties: function (e) {
var t = this.getUT();
this._updateNextPageSpm(e), "object" === (void 0 === e ? "undefined" : n(e)) && t.commitut && (this.isThirdGroupAPI ? t.commitut({
type: "updateNextProp",
eventId: -1,
eventid: -1,
name: "",
pageName: "",
comName: "",
arg1: "",
arg2: "",
arg3: "",
param: e,
params: e
}) : t.commitut("updateNextProp", -1, "", "", "", "", "", e))
},
updatePageUtparam: function (e) {
var t = this.getUT();
"object" === (void 0 === e ? "undefined" : n(e)) && t.updatePageUtparam && (this.isThirdGroupAPI ? t.updatePageUtparam({
utParamJson: JSON.stringify(e)
}) : t.updatePageUtparam(JSON.stringify(e)))
},
updateNextPageUtparam: function (e) {
var t = this.getUT();
"object" === (void 0 === e ? "undefined" : n(e)) && t.updateNextPageUtparam && (this.isThirdGroupAPI ? t.updateNextPageUtparam({
utParamJson: JSON.stringify(e)
}) : t.updateNextPageUtparam(JSON.stringify(e)))
},
skipPage: function () {
var e = this.getUT();
e.skipPage && e.skipPage()
},
pageAppear: function () {
var e = this.getUT();
e.pageAppear && this.isPageDisAppear && (this.isPageDisAppear = !1, this.isPageAppear = !0, e.pageAppear())
},
pageDisappear: function () {
var e = this.getUT();
e.pageDisAppear && this.isPageAppear && (this.isPageDisAppear = !0, this.isPageAppear = !1, e.pageDisAppear())
},
setExposureView: function (e, t, r) {
var n = this.getUT(),
o = !1;
return n && n.setExposureView && (n.setExposureView(e, t, r), o = !0), o
}
});
e.exports = s
}, function (e, t, r) {
"use strict";
var n = r(27).requireModule,
o = r(11),
i = r(10),
a = i.paramsToObj,
s = i.objToParams,
u = i.getParamFromURL,
c = i.simplifyURL,
l = i.getAplusUniversalVersion,
p = i.getLocation,
f = {
CLK: {
name: "click",
id: "2101"
},
EXP: {
name: "expose",
id: "2201"
},
OTHER: {
name: "other",
id: "19999"
}
},
d = o.extend({
create: function (e) {
var t = new this;
for (var r in e) t[r] = e[r];
try {
t.UserTrack = n("userTrack")
} catch (e) {
t.UserTrack = {}
}
return t._meta_info = {}, t
},
setPageSPM: function (e, t, r) {
if (e && t) {
var n = [];
n.push(e), n.push(t), this.spmAB = n, this.pageName = ""
}
"function" == typeof r && r()
},
_updateNextPageSpm: function (e) {
e && (this.spmPre = this.spmUrl, this.spmUrl = e["spm-url"] || e.spmUrl)
},
getPageSPM: function () {
return this.spmAB
},
getPageSPMStr: function () {
return this.spmAB.join(".")
},
_getRecordParams: function (e, t, r) {
var n = p(),
o = "string" == typeof r ? a(r) : r,
i = o.url || n.currentpagename || n.href || "";
this.spmUrl || (this.spmUrl = u(i, "spm") || ""), this.spmPre || (this.spmPre = u(o.referrer, "spm") || "");
var d = f[t] || "OTHER",
h = {
jsver: "aplus_universal",
lver: l(),
weex: "1",
functype: "ctrl",
funcId: d.id,
_toUT: "2",
logkey: e,
gokey: "string" == typeof r ? encodeURIComponent(r) : encodeURIComponent(s(r, !0)),
gmkey: t,
"spm-cnt": this.getPageSPMStr() + ".0.0",
"spm-url": this.spmUrl,
"spm-pre": this.spmPre,
urlpagename: "",
url: o.url || n.currentpagename || n.href || ""
};
return this.pageName || (this.pageName = h.pageName || n.currentpagename || c(h.url) || ""), {
pageName: this.pageName,
gmObj: d,
arg1: e,
arg2: "",
arg3: "",
args: h
}
},
_getEnterParams: function (e, t) {
e || (e = {}), t || (t = {});
var r = {
width: "0",
height: "0"
};
try {
r = screen
} catch (e) {}
try {
__windmill_environment__ && (r.width = __windmill_environment__.screenWidth, r.height = __windmill_environment__.screenHeight)
} catch (e) {}
var n = p();
t.url = e.pageUrl || n.currentpagename || n.href || "", t = Object.assign(t, {
scm: t.scm || u(t.url, "scm") || "",
functype: "page",
funcId: "2001",
isonepage: e.isonepage ? 1 : -1,
scr: r.width + "x" + r.height,
jsver: "aplus_universal",
lver: l(),
weex: "1",
_toUT: "2"
});
var o = e.pageId ? "/" + e.pageId : "",
i = this.getPageSPMStr();
t["spm-cnt"] = i + "" + o + ".0.0";
var a = e.spmUrl || e["spm-url"] || u(t.url, "spm") || this.spmUrl || "";
a && (this.spmUrl = a, t["spm-url"] = a);
var s = e.spmPre || e["spm-pre"] || u(e.referrer, "spm") || this.spmPre || "";
return this.spmPre && (this.spmPre = s, t["spm-pre"] = s), this.pageName = e.pageName || n.currentpagename || c(t.url) || "", {
pageName: this.pageName,
args: t
}
}
});
e.exports = d
}, function (e, t, r) {
"use strict";
function n(e) {
return e && void 0 !== e
}
t.requireModule = function (e) {
var t;
try {
n(__weex_require__) && (t = __weex_require__(e))
} catch (e) {
t = null
}
if (!t) try {
n(weex) && "function" == typeof weex.requireModule && (t = weex.requireModule(e))
} catch (e) {
t = null
}
if (!t) try {
t = ! function () {
var e = new Error("Cannot find module 'undefined'");
throw e.code = "MODULE_NOT_FOUND", e
}()
} catch (e) {
t = null
}
return t
}
}, function (e, t, r) {
"use strict";
var n = r(26).extend({
create: function (e) {
var t = new this;
for (var r in e) t[r] = e[r];
return t
},
record: function (e, t, r, n) {
var o = this._getRecordParams(e, t, r);
delete o.args.weex, o.args.windmill = 1;
var i = o.gmObj || {};
if (my) {
var a = {
type: i.name,
eventId: i.id,
comName: o.arg1,
arg1: o.arg1,
arg2: o.arg2,
arg3: o.arg3,
param: o.args
};
o.pageName && (a.name = o.pageName, a.pageName = o.pageName), my.callUserTrack ? my.callUserTrack("customAdvance", a) : my.reportAnalytics && my.reportAnalytics("customAdvance", a)
}
},
enter: function (e, t) {
e || (e = {}), t || (t = {});
var r = this._getEnterParams(e, t);
if (delete r.args.weex, r.args.windmill = 1, my) {
var n = {
type: "enter",
eventId: "2001",
eventid: "-1",
pageName: r.pageName,
name: r.pageName,
comName: r.arg1,
arg1: r.arg1,
arg2: r.arg2,
arg3: r.arg3,
param: r.args
};
my.callUserTrack ? my.callUserTrack("commitut", n) : my.reportAnalytics && my.reportAnalytics("enter", n)
}
},
updatePageProperties: function (e) {},
updateNextPageProperties: function (e) {
if (e || (e = {}), this._updateNextPageSpm(e), my) {
var t = {
type: "updateNextProp",
eventId: -1,
eventid: -1,
name: "",
pageName: "",
comName: "",
arg1: "",
arg2: "",
arg3: "",
param: e,
params: e
};
my.callUserTrack ? my.callUserTrack("commitut", t) : my.reportAnalytics && my.reportAnalytics("enter", t)
}
},
updatePageUtparam: function (e) {
e || (e = {}), my && my.callUserTrack && my.callUserTrack("updatePageUtparam", {
utParamJson: JSON.stringify(e)
})
},
updateNextPageUtparam: function (e) {
e || (e = {}), my && my.callUserTrack && my.callUserTrack("updateNextPageUtparam", {
utParamJson: JSON.stringify(e)
})
},
skipPage: function () {
my && my.callUserTrack && my.callUserTrack("skipPage")
},
pageAppear: function () {
my && my.callUserTrack && this.isPageDisAppear && (this.isPageDisAppear = !1, this.isPageAppear = !0, my.callUserTrack("pageAppear"))
},
pageDisappear: function () {
my && my.callUserTrack && this.isPageAppear && (this.isPageDisAppear = !0, this.isPageAppear = !1, my.callUserTrack("pageDisappear"))
}
});
e.exports = n
}, function (e, t, r) {
"use strict";
var n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
return typeof e
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
},
o = r(10),
i = r(81),
a = r(82),
s = {
CNA: "",
set message(e) {
if ("function" == typeof e) this.CNA ? e(this.CNA) : this.logs.push(e);
else if ("object" === (void 0 === e ? "undefined" : n(e)) && e.cna) {
this.CNA = e.cna;
for (var t = 0; t < this.logs.length; t++)(0, this.logs[t])(this.CNA)
}
},
get message() {
return this.logs
},
logs: []
},
u = a.extend({
hasSyncEtag: !1,
_syncEtag: function (e) {
var t = function (t) {
var r = t && t.data ? t.data.cna : "";
r ? e(r) : n()
},
r = this._meta_info["aplus-rhost-v"] || "log.mmstat.com",
n = function () {
var t = o.getEtagUrl(r);
t && i.get(t, {
dataType: "text"
}, function (t) {
var r = t.headers || {},
n = r.ETag || r.Etag || "";
n = n.replace(/\"/g, ""), my.setStorageSync({
key: "__ETAG__CNA__ID__",
data: {
cna: n
}
}), e(n)
})
};
my.getStorage({
key: "__ETAG__CNA__ID__",
success: function (e) {
t(e)
},
fail: function (e) {
t(e)
}
})
},
_addDetailParam: function (e) {
return e.itemId ? {
_p_typ: "pdp",
_p_item: e.itemId,
_p_ispdp: "1"
} : {}
},
_addSellerParam: function (e) {
return e.sellerId ? {
_p_typ: e.itemId ? "pdp" : "slr",
_p_slr: e.sellerId,
_p_isdpp: "1"
} : {}
},
tryAyncEtag: function () {
this.hasSyncEtag || (this.hasSyncEtag = !0, this._syncEtag(function (e) {
e && (s.message = {
cna: e
})
}))
},
record: function (e, t, r, n) {
var a = this;
a.tryAyncEtag(), s.message = function (n) {
var s = o.getGoldlogUrl(a._meta_info["aplus-rhost-g"]),
u = a._getRecordParams(t, r, n);
if (s && u) {
e.startsWith("/vx") || (e = "/vx" + e), s += /^\//.test(e) ? e : "/" + e;
var c = [];
for (var l in u) c.push(l + "=" + u[l]);
s = s + "?" + c.join("&"), i.get(s, {}, function (e) {})
}
}
},
enter: function (e, t) {
e || (e = {}), t || (t = {});
var r = this;
r.tryAyncEtag(), s.message = function (n) {
t.cna = n, r._getEnterParams(e, t, function (e) {
var t = o.getPVLogUrl(r._meta_info["aplus-rhost-v"]);
t && i.get(t + "?" + o.makeUrl(e), {}, function (e) {})
})
}
},
updateNextPageProperties: function (e) {
e || (e = {}), this._updateNextPageSpm(e)
}
});
e.exports = u
}, function (t, r) {
t.exports = e("@weex-module/globalEvent")
}, function (e, t, r) {
e.exports = r(32)
}, function (e, t, r) {
"use strict";
var n = r(0),
o = i(r(33));
function i(e) {
return e && e.__esModule ? e : {
default: e
}
}
var a = i(r(20)).default.urlParser.parsed;
(0, n.render)((0, n.createElement)(o.default, {
query: a
}))
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}), t.default = void 0;
var n = Object.assign || function (e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t];
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n])
}
return e
},
o = function () {
function e(e, t) {
for (var r = 0; r < t.length; r++) {
var n = t[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
}
}
return function (t, r, n) {
return r && e(t.prototype, r), n && e(t, n), t
}
}(),
i = r(0),
a = r(3),
s = v(r(7)),
u = v(r(2)),
c = v(r(5)),
l = v(r(4)),
p = v(r(38)),
f = v(r(71)),
d = v(r(73)),
h = v(r(14)),
m = (v(r(74)), v(r(83))),
y = r(85),
g = v(r(89));
function v(e) {
return e && e.__esModule ? e : {
default: e
}
}
function b(e) {
if (Array.isArray(e)) {
for (var t = 0, r = Array(e.length); t < e.length; t++) r[t] = e[t];
return r
}
return Array.from(e)
}
var _ = a.isWeex ? weex.config.env.aeDirection : "ltr",
w = 8,
O = window.screen,
x = 750 * O.height / O.width,
S = 750;
function P(e) {
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {
x: 0,
y: 0
};
if (a.isWeex) {
if ("iOS" === navigator.platform) return void(0, y.scrollContentTo)("top");
e.scrollTo(t)
} else {
var r = document.documentElement.clientWidth / S,
n = (0, i.findDOMNode)(e),
o = n.scrollLeft,
s = n.scrollTop,
u = new g.default({
duration: 250,
easing: "easeOutSine"
});
u.on("run", function (e) {
n.scrollLeft = o + e.percent * (t.x * r - o), n.scrollTop = s + e.percent * (t.y * r - s)
}), u.on("end", function () {
u.stop()
}), u.run()
}
}
var E = function (e) {
function t(e) {
! function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, t);
var r = function (e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !t || "object" != typeof t && "function" != typeof t ? e : t
}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));
return r.utCtrlClick = function (e) {
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
if (e) {
var o = n({}, r.commonArgs(t), t);
(0, y.utCtrlClick)(e, o)
}
}, r.utExpose = function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "Product_Exposure_Event",
t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
o = t.scene,
i = void 0 === o ? "Search" : o,
a = function (e, t) {
var r = {};
for (var n in e) t.indexOf(n) >= 0 || Object.prototype.hasOwnProperty.call(e, n) && (r[n] = e[n]);
return r
}(t, ["scene"]),
s = JSON.stringify(n({
"spm-cnt": [].concat(b(r.dataSpm), [t.spmc || t.dataSpmC || "0", t.listno || "0"]).join(".")
}, a)).replace(/"/g, "").replace(/:/g, "=").replace(/\s/g, ""),
u = n({}, r.commonArgs(a), {
ctrl: e,
exposureType: "cell",
exposure: s,
scene: i,
pageName: "ProductList"
});
(0, y.utExpose)(u)
}, r.setSearchParams = function (e) {
var t = r.props.query;
!r.upLoadType && e && e.upLoadType && (r.upLoadType = e.upLoadType), !r.cf && e && e.cf && (r.cf = e.cf), e && e.tfskey && e.tfskey !== r.tfskey && (r.tfskey = e.tfskey, r.region = e.region || "", r.cat = e.cat || "", r.cat_name = e.cat_name || t.cat_name || "", r._didLoadFinished_ = !1, r.setState({
pict_pp: {},
itemsArray: [],
style: "",
styleExt: "",
error: "0",
q: ""
}), r.loadData({}))
}, r.regionEditor = function (e) {
e && e.region && e.region !== r.region && (r.region = e.region, P(r.refs.imageresult, {
y: 0
}), r.utCtrlClick("regionEditor"), r.loadData({}))
}, r.renderCount = function () {
return r.state.renderCount - r.renderIndex
}, r.loading = function () {
return (0, i.createElement)(c.default, {
source: {
uri: "//ae01.alicdn.com/kf/He22a02382a644989a48433a9ea35edf3B.png"
},
style: {
width: 750,
height: 1320.5,
marginBottom: 300
}
})
}, r.error = function (e) {
return r.state.loading ? null : (0, i.createElement)(u.default, {
style: {
width: 750,
height: 750,
justifyContent: "center",
alignItems: "center"
}
}, (0, i.createElement)(l.default, {
style: {
textAlign: "center",
color: "#666",
fontSize: 40,
width: 680,
fontFamily: "open sans"
}
}, (0, h.default)(e)))
}, r.onScroll = function (e) {
var t = (e && e.nativeEvent || {}).contentOffset || {},
n = t.y || 0,
o = e && e.contentSize;
!o && e.target && e.target.scrollHeight && (o = {
height: e.target.scrollHeight
}), n !== r.contentOffsetY && (n <= 0 ? (0, y.contentReachTop)(!0) : 0 === r.contentOffsetY && (0, y.contentReachTop)(!1)), r.contentOffsetY = n, o && o.height - x - t.y < x / 2 && r.onEndReached(o.height)
}, r.onEndReached = function (e) {
if (r.reachedSize !== e) {
var t = r.state.renderCount + w;
r.setState({
renderCount: t
})
}
}, r.state = {
status: "loading",
renderCount: w
}, r.contentOffsetY = 0, r.dataSpm = ["a1z65", "productlist"], r
}
return function (e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
enumerable: !1,
writable: !0,
configurable: !0
}
}), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
}(t, i.Component), o(t, [{
key: "commonArgs",
value: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
t = this.state.data || {},
r = this.props.query || {},
o = {
dcateId: t.selectedCat || "",
RN: t.RN || "",
style: this.style,
styleExt: this.styleExt,
photoUrl: this.tfskey || "",
pageType: "PhotoSearch",
"spm-cnt": [].concat(b(this.dataSpm), [e.spmc || e.dataSpmC || "0", e.listno || "0"]).join(".")
},
i = this.cf || r.cf;
i && (o = n({}, o, {
cf: i
}));
var a = this.upLoadType || r.upLoadType;
return a && (o = n({}, o, {
upLoadType: a
})), o
}
}, {
key: "loadFinished",
value: function (e, t, r) {
if (!this._didLoadFinished_) {
this._didLoadFinished_ = !0;
var o = "0";
switch (this.style) {
case "certainty":
case "same":
o = "1";
break;
case "recognition":
o = "2"
}
var i = t && t.theme && t.theme.atmosphere || {},
a = t.btsInfo,
s = void 0 === a ? {} : a,
u = t.selectedSortValue,
c = n({}, this.commonArgs({}), {
ret: e,
error: {
0: "success",
1: "no_result",
2: "mtop_error"
} [e],
dcateId: t.selectedCat || "",
photoUrl: this.tfskey || "",
result_style: o,
image_editor: r ? 1 : 0,
"spm-cnt": this.dataSpm.join("."),
count: t.similarCount || 0,
btsInfo: "",
sortby: u || ""
});
Object.keys(s).length > 0 && (c.btsInfo = JSON.stringify(s)), i.backgroundColor && (c.bg_color = i.backgroundColor), (0, y.loadFinished)(c)
}
}
}, {
key: "loadData",
value: function () {
var e = this,
t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
if (this.tfskey) {
this._didLoadFinished_ && P(this.refs.imageresult, {
y: 0
});
var o = new d.default,
i = [],
a = {
utExpose: this.utExpose,
getData: function (t) {
return e.state.data[t]
},
utCtrlClick: this.utCtrlClick,
getStatus: function () {
return e.state.status
},
isBtsMatch: function (t, r) {
var n = e.state.data && e.state.data.btsInfo || {},
o = n && n[t];
return (o && o.bucket || {}).name === r
},
loadingNode: this.loading,
errorNode: this.error,
renderCount: this.renderCount,
isPreSectionDidRender: function (t) {
var r = e.state.section || [],
n = !1;
for (var o in r) {
if (r[o] === t) return n;
n || (n = r[o].didRender)
}
return !1
}
},
s = n({}, t, {
searchimg: this.tfskey,
cat_name: this.cat_name || "",
region: this.region || ""
});
o.request(s, function (o) {
i = function (t) {
return [new p.default(n({}, a, {
onCatChagne: function (t) {
e.utCtrlClick("TabChange", {
newCat: t
}), e.setState({
data: n({}, e.state.data, {
selectedCat: t,
selectedSort: 0,
selectedSortValue: "best_match"
}),
status: "loading"
}), e.loadData({
cat: t
})
},
onSortChange: function () {
var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
r = t.params,
o = t.currentSortIndex,
i = t.currentSortValue;
e.utCtrlClick("SortBy", {
sortby: i
}), e.setState({
status: "loading",
selectedSort: o,
selectedSortValue: i
});
var s = a.getData("selectedCat");
e.loadData(n({}, r, {
cat: s
}), {
currentSortIndex: o,
currentSortValue: i
})
},
onShowMoreData: function () {
e.setState({
data: n({}, e.state.data)
})
}
})), new f.default(n({}, a, {
currentItemlist: t.similarData.map(function (e) {
return e.item_id
}).slice(0, 19).join(","),
onDataDidLoad: function (t) {
var r = e.state;
e.setState(n({}, r, {
data: n({}, r.data, {
recmdData: t
})
}))
}
}))]
}(o);
var s = e.state.data || {},
u = s.pict_pp && s.pict_pp.category;
u && u[0] && t.cat && (o.pict_pp.category = u), t.extraParams && t.extraParams.indexOf("category:") >= 0 && (o.pict_pp.priorityCategory = s.pict_pp && s.pict_pp.priorityCategory);
var c = {
section: i,
status: "success",
renderCount: w,
data: n({}, o, {
sort: "default",
similarCount: (o.similarData || []).length,
selectedCat: t.cat || o.pict_pp.category && o.pict_pp.category[0] && o.pict_pp.category[0].id,
selectedPriorityCategory: s.selectedPriorityCategory,
selectedSort: r && r.currentSortIndex || 0,
selectedSortValue: r && r.currentSortValue || "best_match"
})
};
e.dataDidLoad = !0, e.setState(n({}, c))
}, function (r) {
t.cat ? e.styleExt = "error" : (e.style = "error", e.styleExt = ""), e.dataDidLoad = !0, e.setState({
status: "error"
})
})
}
}
}, {
key: "showResult",
value: function (e) {
if (this.dataDidLoad) {
this.dataDidLoad = !1;
var t = this.state.data || {},
r = t.pict_pp || {};
"1" === e && (this.styleExt = "noResult");
var n = this.region ? "" : r.region || "",
o = r.bboxes_str || "";
(0, y.updateContext)({
region: n,
cat: this.cat,
bboxes_str: o
}), this.utCtrlClick("ShowResult", {}), this.loadFinished(e, this.state.data || {}, !t.recognition)
}
}
}, {
key: "componentDidMount",
value: function () {
var e = this.props.query;
(0, y.addEventListener)("ImageSearch.result.setSearchParams", this.setSearchParams), (0, y.addEventListener)("ImageSearch.result.regionEditor", this.regionEditor), this.setSearchParams(e), this.tfskey || (0, y.initSearchParams)(this.setSearchParams)
}
}, {
key: "componentWillUnmount",
value: function () {
(0, y.removeEventLister)("ImageSearch.result.setSearchParams"), (0, y.removeEventLister)("ImageSearch.result.regionEditor")
}
}, {
key: "render",
value: function () {
return (0, i.createElement)(u.default, {
style: {
width: 750,
top: 0,
left: 0,
bottom: 0,
right: 0,
backgroundColor: "#ffffff",
position: "absolute",
direction: _
}
}, (0, i.createElement)(s.default, {
ref: "imageresult",
onScroll: this.onScroll,
style: {
backgroundColor: "#F2F2F2",
width: 750,
flex: 1
}
}, this.listContent()))
}
}, {
key: "listContent",
value: function () {
var e = this,
t = [],
r = this.state.section || [];
return this.renderIndex = 0, "loading" === this.state.status && 0 === r.length ? [(0, i.createElement)(s.default.Cell, null, this.loading())] : (r.map(function (r) {
return (r.render() || []).map(function (e) {
return e && (t = [].concat(b(t), [e])), e
}), e.renderIndex = t.length, r
}), 0 === t.length ? (this.showResult("error" === this.state.status ? "2" : "1"), [(0, i.createElement)(s.default.Cell, null, this.error("TBPS.iOS.errorDefault"))]) : (m.default.bottomBarHeight && (t = [].concat(b(t), [(0, i.createElement)(s.default.Cell, null, (0, i.createElement)(u.default, {
style: {
height: m.default.bottomBarHeight
}
}))])), this.showResult("0"), t))
}
}]), t
}();
t.default = E, e.exports = t.default
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var n = r(1);
Object.keys(n).forEach(function (e) {
"default" !== e && "__esModule" !== e && Object.defineProperty(t, e, {
enumerable: !0,
get: function () {
return n[e]
}
})
})
}, function (e, t, r) {
"use strict";
(function (e) {
function r(e) {
return "undefined" === e
}
Object.defineProperty(t, "__esModule", {
value: !0
});
var n = !r(typeof window) && "onload" in window,
o = !r(typeof e) && !(!e.versions || !e.versions.node),
i = !r(typeof callNative) || !r(typeof WXEnvironment) && "Web" !== WXEnvironment.platform,
a = !r(typeof my) && !r(my.navigateTo),
s = !r(typeof wx) && !r(wx.navigateTo);
t.isMiniApp = a, t.isNode = o, t.isWeChatMiniprogram = s, t.isWeb = n, t.isWeex = i
}).call(this, r(36))
}, function (e, t) {
var r, n, o = e.exports = {};
function i() {
throw new Error("setTimeout has not been defined")
}
function a() {
throw new Error("clearTimeout has not been defined")
}
function s(e) {
if (r === setTimeout) return setTimeout(e, 0);
if ((r === i || !r) && setTimeout) return r = setTimeout, setTimeout(e, 0);
try {
return r(e, 0)
} catch (t) {
try {
return r.call(null, e, 0)
} catch (t) {
return r.call(this, e, 0)
}
}
}! function () {
try {
r = "function" == typeof setTimeout ? setTimeout : i
} catch (e) {
r = i
}
try {
n = "function" == typeof clearTimeout ? clearTimeout : a
} catch (e) {
n = a
}
}();
var u, c = [],
l = !1,
p = -1;
function f() {
l && u && (l = !1, u.length ? c = u.concat(c) : p = -1, c.length && d())
}
function d() {
if (!l) {
var e = s(f);
l = !0;
for (var t = c.length; t;) {
for (u = c, c = []; ++p < t;) u && u[p].run();
p = -1, t = c.length
}
u = null, l = !1,
function (e) {
if (n === clearTimeout) return clearTimeout(e);
if ((n === a || !n) && clearTimeout) return n = clearTimeout, clearTimeout(e);
try {
n(e)
} catch (t) {
try {
return n.call(null, e)
} catch (t) {
return n.call(this, e)
}
}
}(e)
}
}
function h(e, t) {
this.fun = e, this.array = t
}
function m() {}
o.nextTick = function (e) {
var t = new Array(arguments.length - 1);
if (arguments.length > 1)
for (var r = 1; r < arguments.length; r++) t[r - 1] = arguments[r];
c.push(new h(e, t)), 1 !== c.length || l || s(d)
}, h.prototype.run = function () {
this.fun.apply(null, this.array)
}, o.title = "browser", o.browser = !0, o.env = {}, o.argv = [], o.version = "", o.versions = {}, o.on = m, o.addListener = m, o.once = m, o.off = m, o.removeListener = m, o.removeAllListeners = m, o.emit = m, o.prependListener = m, o.prependOnceListener = m, o.listeners = function (e) {
return []
}, o.binding = function (e) {
throw new Error("process.binding is not supported")
}, o.cwd = function () {
return "/"
}, o.chdir = function (e) {
throw new Error("process.chdir is not supported")
}, o.umask = function () {
return 0
}
}, function (e, t, r) {
"use strict";
function n(e, t, r) {
return t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r, e
}
function o(e, t) {
for (var r = 0; r < t.length; r++) {
var n = t[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
}
}
Object.defineProperty(t, "__esModule", {
value: !0
}), t.default = void 0;
var i = void 0 === i ? "undefined" == typeof webkitRequestAnimationFrame ? function (e) {
return setTimeout(e, 16)
} : webkitRequestAnimationFrame : i,
a = void 0 === a ? "undefined" == typeof webkitCancelAnimationFrame ? clearTimeout : webkitCancelAnimationFrame : a,
s = {
easeOutSine: function (e) {
return Math.sin(e * Math.PI / 2)
}
},
u = function () {},
c = function () {
function e(t) {
! function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, e), this.config = function (e) {
for (var t = 1; t < arguments.length; t++) {
var r = null != arguments[t] ? arguments[t] : {},
o = Object.keys(r);
"function" == typeof Object.getOwnPropertySymbols && (o = o.concat(Object.getOwnPropertySymbols(r).filter(function (e) {
return Object.getOwnPropertyDescriptor(r, e).enumerable
}))), o.forEach(function (t) {
n(e, t, r[t])
})
}
return e
}({
easing: "linear",
duration: 1 / 0,
onStart: u,
onRun: u,
onStop: u,
onEnd: u
}, t)
}
return function (e, t, r) {
t && o(e.prototype, t)
}(e, [{
key: "run",
value: function () {
var e = this.config,
t = e.duration,
r = e.onStart,
n = e.onRun;
t <= 1 && (this.isfinished = !0, n({
percent: 1
}), this.stop()), this.isfinished || (this._hasFinishedPercent = this._stop && this._stop.percent || 0, this._stop = null, this.start = Date.now(), this.percent = 0, r({
percent: 0,
type: "start"
}), this.easingFn = s[this.config.easing], this._run())
}
}, {
key: "_run",
value: function () {
var e = this,
t = this.config,
r = t.onRun,
n = t.onStop;
this._raf && a(this._raf), this._raf = i(function () {
if (e.now = Date.now(), e.t = e.now - e.start, e.duration = e.now - e.start >= e.config.duration ? e.config.duration : e.now - e.start, e.progress = e.easingFn(e.duration / e.config.duration), e.percent = e.duration / e.config.duration + e._hasFinishedPercent, e.percent >= 1 || e._stop) return e.percent = e._stop && e._stop.percent ? e._stop.percent : 1, e.duration = e._stop && e._stop.duration ? e._stop.duration : e.duration, r({
percent: e.progress,
originPercent: e.percent,
t: e.t,
type: "run"
}), n({
percent: e.percent,
t: e.t,
type: "stop"
}), void(e.percent >= 1 && (e.isfinished = !0, e.stop()));
r({
percent: e.progress,
originPercent: e.percent,
t: e.t,
type: "run"
}), e._run()
})
}
}, {
key: "stop",
value: function () {
var e = this.config.onEnd;
this._stop = {
percent: this.percent,
now: this.now
}, e({
percent: 1,
t: this.t,
type: "end"
}), a(this._raf)
}
}]), e
}();
t.default = c, e.exports = t.default
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}), t.default = void 0;
var n = function () {
function e(e, t) {
for (var r = 0; r < t.length; r++) {
var n = t[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
}
}
return function (t, r, n) {
return r && e(t.prototype, r), n && e(t, n), t
}
}(),
o = function e(t, r, n) {
null === t && (t = Function.prototype);
var o = Object.getOwnPropertyDescriptor(t, r);
if (void 0 === o) {
var i = Object.getPrototypeOf(t);
return null === i ? void 0 : e(i, r, n)
}
if ("value" in o) return o.value;
var a = o.get;
return void 0 !== a ? a.call(n) : void 0
},
i = m(r(17)),
a = r(0),
s = r(3),
u = m(r(7)),
c = m(r(2)),
l = m(r(4)),
p = m(r(39)),
f = m(r(42)),
d = m(r(44)),
h = m(r(14));
function m(e) {
return e && e.__esModule ? e : {
default: e
}
}
function y(e) {
if (Array.isArray(e)) {
for (var t = 0, r = Array(e.length); t < e.length; t++) r[t] = e[t];
return r
}
return Array.from(e)
}
var g = function (e) {
function t(e) {
! function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, t);
var r = function (e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !t || "object" != typeof t && "function" != typeof t ? e : t
}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));
return r.showMoreDataClicked = !1, r.numOfItems4Row = 2, r.item = function (e, t) {
if (!e) return null;
if (e.c) return null;
var n = r.getData("selectedCat"),
o = r.getData("selectedSortValue");
return (0, a.createElement)(d.default, {
idx: t,
data: e,
dataSpmC: "photo_" + n,
sortValue: o,
itemStyle: "item2",
utCtrlClick: r.props.utCtrlClick,
utExpose: r.props.utExpose,
getTheme: function () {
return r.getData("theme")
}
})
}, r.onShowMoreData = function (e) {
r.rc = 0, r.showMoreDataClicked = !0, r.props.onShowMoreData && r.props.onShowMoreData(), r.props.utCtrlClick && r.props.utCtrlClick("viewMoreItems", {})
}, r.state = {}, r.rc = 0, r.headerText = "", r
}
return function (e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
enumerable: !1,
writable: !0,
configurable: !0
}
}), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
}(t, i.default), n(t, [{
key: "header",
value: function () {
return null
}
}, {
key: "footer",
value: function () {
return "success" !== this.props.getStatus() ? [] : o(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "footer", this).call(this)
}
}, {
key: "key4Data",
value: function () {
return "similarData"
}
}, {
key: "getData",
value: function (e) {
var r = o(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "getData", this).call(this, e),
n = 12;
if (this.props.getRc && (n = this.props.getRc()), this.rc = this.showMoreDataClicked ? 0 : n, "similarData" === e) {
var i = this.getData("sort");
if ("sold" === i) return [].concat(y(r)).sort(function (e, t) {
return (t.sold || 0) - (e.sold || 0)
});
if ("prieceDesc" === i) return [].concat(y(r)).sort(function (e, t) {
return (t.priceWap || 0) - (e.priceWap || 0)
});
if ("prieceAsc" === i) return [].concat(y(r)).sort(function (e, t) {
return (e.priceWap || 0) - (t.priceWap || 0)
})
}
return r
}
}, {
key: "dataTransform",
value: function (e, r) {
var n = o(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "dataTransform", this).call(this, e, r),
i = this.getData("pict_pp");
return i && i.tags && s.isWeex && (n.length > 3 && i.tags[0].length && n.splice(3, 0, i.tags[0]), n.length > 6 && i.tags[1].length && n.splice(6, 0, i.tags[1])), n
}
}, {
key: "rows",
value: function () {
var e = [].concat(y(o(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "rows", this).call(this)));
if (this.props.getStatus) {
var r = this.props.getStatus();
if ("loading" === r) return [this.category(), (0, a.createElement)(u.default.Cell, null, this.props.loadingNode())];
if ("error" === r) return [this.category(), (0, a.createElement)(u.default.Cell, null, this.props.errorNode("TBPS.iOS.errorDefault"))]
}
return e.length ? (e = [this.category()].concat(y(e)), this.showMoreDataClicked || (e = [].concat(y(e), [(0, a.createElement)(u.default.Cell, {
style: {
justifyContent: "center",
alignItems: "center",
width: 750
}
}, (0, a.createElement)(c.default, {
style: {
justifyContent: "center",
aligItems: "center",
marginBottom: 24,
width: 734,
height: 85,
backgroundColor: "#fff",
borderRadius: 12
},
onClick: this.onShowMoreData
}, (0, a.createElement)(l.default, {
style: {
textAlign: "center",
color: "#2E9CC3",
fontSize: 28,
fontFamily: "open sans",
fontWeight: 700
}
}, (0, h.default)("Home.ViewMore"))))]))) : e = [this.category(), (0, a.createElement)(u.default.Cell, null, this.props.errorNode("ps_list_zero_result"))], e
}
}, {
key: "category",
value: function () {
var e = this.getData("pict_pp") || {},
t = this.getData("selectedCat"),
r = this.getData("sortBy"),
n = this.getData("selectedSort"),
o = null;
if (e.category && e.category.length && (o = (0, a.createElement)(p.default, {
data: e.category,
selectedCat: t,
onPress: this.props.onCatChagne
})), o) return (0, a.createElement)(u.default.Cell, {
style: {
paddingBottom: 8
}
}, o, (0, a.createElement)(f.default, {
data: r,
selectedSort: n,
onSortChange: this.props.onSortChange
}))
}
}]), t
}();
t.default = g, e.exports = t.default
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var n = function () {
function e(e, t) {
for (var r = 0; r < t.length; r++) {
var n = t[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
}
}
return function (t, r, n) {
return r && e(t.prototype, r), n && e(t, n), t
}
}(),
o = c(r(2)),
i = c(r(40)),
a = c(r(15)),
s = r(3),
u = r(0);
function c(e) {
return e && e.__esModule ? e : {
default: e
}
}
function l(e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !t || "object" != typeof t && "function" != typeof t ? e : t
}
function p(e) {
if (s.isWeex) {
var t = r(41);
return new Promise(function (r, n) {
t.getComponentRect(e, function (e) {
r({
width: e.size.width,
height: e.size.height,
top: e.size.top,
bottom: e.size.bottom,
left: e.size.left,
right: e.size.right
})
})
})
}
var n = window.screen.width / 750,
o = e.getBoundingClientRect();
return Promise.resolve({
width: o.width / n,
height: o.height / n,
top: o.top / n,
bottom: o.bottom / n,
left: o.left / n,
right: o.right / n
})
}
var f = function (e) {
function t() {
var e, r, n;
! function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, t);
for (var o = arguments.length, i = Array(o), a = 0; a < o; a++) i[a] = arguments[a];
return r = n = l(this, (e = t.__proto__ || Object.getPrototypeOf(t)).call.apply(e, [this].concat(i))), n.updateDomSize = function (e, t) {
n.itemsDomSize || (n.itemsDomSize = {}), n.itemsDomSize[e] = t
}, n.onPress = function (e) {
if (n.props.onPress && n.props.onPress(e), n.domSize) {
var t = n.domSize.width / 2,
r = n.props.data,
o = 0,
i = n.itemsDomSize || {};
for (var a in r) {
var s = r[a],
u = i[s.id] || {
width: 0
};
if (s.id === e) {
o += u.width / 2;
break
}
o += u.width
}
var c = o - t;
c < 0 && (c = 0), n.scroller && n.scroller.scrollTo({
x: c,
y: 0
})
}
}, n.switchTo = function (e) {
n.switchIndex
}, l(n, r)
}
return function (e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
enumerable: !1,
writable: !0,
configurable: !0
}
}), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
}(t, u.Component), n(t, [{
key: "shouldComponentUpdate",
value: function (e, t) {
var r = this.props.data,
n = e.data,
o = this.props.selectedCat;
return e.selectedCat !== o || n !== r || e.sort !== this.props.sort
}
}, {
key: "componentDidUpdate",
value: function () {
for (var e = 0; e < this.props.data.length; e++) this.props.selectedCat === this.props.data[e].id && this.switchTo(e)
}
}, {
key: "render",
value: function () {
var e = this;
return (0, u.createElement)(o.default, {
style: {
flexDirection: "row",
alignItems: "center",
width: 750,
backgroundColor: "#fff",
overflow: "hidden"
}
}, (0, u.createElement)(a.default, {
horizontal: !0,
ref: function (t) {
var r = t && (0, u.findDOMNode)(t);
r && (e.scroller = t, p(r).then(function (t) {
e.domSize = t
}).catch(function (e) {
console.log(e)
}))
},
style: {
flexDirection: "row",
justifyContent: "space-between",
backgroundColor: "#ffffff",
width: 750,
height: 90
},
showsHorizontalScrollIndicator: !1
}, this.props.data.map(function (t, r) {
var n = t.id === e.props.selectedCat;
return (0, u.createElement)(i.default, {
key: t.id,
data: t,
onPress: e.onPress,
getDomSize: p,
selected: n,
updateDomSize: e.updateDomSize
})
})))
}
}]), t
}();
t.default = f, e.exports = t.default
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var n = function () {
function e(e, t) {
for (var r = 0; r < t.length; r++) {
var n = t[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
}
}
return function (t, r, n) {
return r && e(t.prototype, r), n && e(t, n), t
}
}(),
o = s(r(2)),
i = s(r(4)),
a = r(0);
function s(e) {
return e && e.__esModule ? e : {
default: e
}
}
function u(e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !t || "object" != typeof t && "function" != typeof t ? e : t
}
var c = function (e) {
function t() {
var e, r, n;
! function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, t);
for (var o = arguments.length, i = Array(o), a = 0; a < o; a++) i[a] = arguments[a];
return r = n = u(this, (e = t.__proto__ || Object.getPrototypeOf(t)).call.apply(e, [this].concat(i))), n.onPress = function (e) {
n.props.selected || n.props.onPress && n.props.onPress(n.props.data.id)
}, u(n, r)
}
return function (e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
enumerable: !1,
writable: !0,
configurable: !0
}
}), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
}(t, a.Component), n(t, [{
key: "shouldComponentUpdate",
value: function (e) {
var t = this.props;
return t.data !== e.data || t.selected !== e.selected
}
}, {
key: "render",
value: function () {
var e = this;
return (0, a.createElement)(o.default, {
style: {
alignItems: "space-between",
justifyContent: "center"
},
ref: function (t) {
t && e.props.getDomSize((0, a.findDOMNode)(t)).then(function (t) {
e.props.updateDomSize(e.props.data.id, t)
}).catch(function (e) {
console.log(e)
})
}
}, (0, a.createElement)(o.default, {
onClick: this.onPress,
style: {
alignItems: "center",
justifyContent: "center",
paddingLeft: 24,
paddingRight: 24,
minWidth: 160,
marginTop: 12
}
}, (0, a.createElement)(o.default, {
style: {
alignItems: "center",
justifyContent: "center",
height: 48
}
}, (0, a.createElement)(i.default, {
style: {
color: this.props.selected ? "#FF4747" : "#666666",
fontSize: 28,
fontFamily: "OpenSans",
fontWeight: 500
}
}, this.props.data.name)), (0, a.createElement)(o.default, {
style: {
height: 6,
width: 48,
marginTop: 6,
backgroundColor: this.props.selected ? "#FF4747" : "rgba(0,0,0,0)"
}
})))
}
}]), t
}();
t.default = c, e.exports = t.default
}, function (t, r) {
t.exports = e("@weex-module/dom")
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var n = function () {
function e(e, t) {
for (var r = 0; r < t.length; r++) {
var n = t[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
}
}
return function (t, r, n) {
return r && e(t.prototype, r), n && e(t, n), t
}
}(),
o = r(0),
i = s(r(2)),
a = s(r(43));
function s(e) {
return e && e.__esModule ? e : {
default: e
}
}
var u = {
sortByWrap: {
width: 750,
height: 81,
paddingTop: 16,
paddingBottom: 16,
flexDirection: "row",
aligItems: "center",
borderTopWidth: "1px",
borderTopStyle: "solid",
borderTopColor: "#f2f2f2",
backgroundColor: "#fff"
}
},
c = function (e) {
function t(e) {
! function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, t);
var r = function (e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !t || "object" != typeof t && "function" != typeof t ? e : t
}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));
return r.handleItemClick = function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
t = e.currentSortIndex;
r.setState({
currentSortIndex: t
});
var n = r.props.onSortChange;
n && "function" == typeof n && n(e)
}, r.state = {
currentSortIndex: 0
}, r
}
return function (e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
enumerable: !1,
writable: !0,
configurable: !0
}
}), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
}(t, o.Component), n(t, [{
key: "componentWillReceiveProps",
value: function (e) {
this.props.selectedSort !== e.selectedSort && this.setState({
currentSortIndex: e.selectedSort
})
}
}, {
key: "render",
value: function () {
var e = this,
t = this.state.currentSortIndex,
r = this.props.data,
n = void 0 === r ? [] : r;
return n.length ? (0, o.createElement)(i.default, {
style: u.sortByWrap
}, n.map(function (r, n) {
var i = t === n;
return (0, o.createElement)(a.default, {
index: n,
data: r,
isCurrent: i,
onClick: e.handleItemClick
})
})) : null
}
}]), t
}();
t.default = c, e.exports = t.default
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var n = function () {
function e(e, t) {
for (var r = 0; r < t.length; r++) {
var n = t[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
}
}
return function (t, r, n) {
return r && e(t.prototype, r), n && e(t, n), t
}
}(),
o = r(0),
i = u(r(2)),
a = u(r(5)),
s = u(r(4));
function u(e) {
return e && e.__esModule ? e : {
default: e
}
}
function c(e, t, r) {
return t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r, e
}
var l = "//ae01.alicdn.com/kf/Hbbf3bc0fa85d42688ac7255b6b8efc09o.png",
p = "//ae01.alicdn.com/kf/H058203bcc38c4549bbc6045536c28ea5A.png",
f = "//ae01.alicdn.com/kf/H90624ae86be84d7b82ca4e81e3aae4f91.png",
d = function (e) {
function t(e) {
! function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, t);
var r = function (e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !t || "object" != typeof t && "function" != typeof t ? e : t
}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));
return r.handleSortItemClick = function () {
var e = r.props,
t = e.index,
n = e.isCurrent,
o = e.data,
i = e.onClick,
a = o || {},
s = a.paramName,
u = a.paramValues;
n || r.setState({
sortType: 0
});
var l = r.state.sortType;
if (u && Array.isArray(u) && u.length > 1) {
r.setState({
sortValue: u[l],
sortType: 1 === l ? 0 : 1
});
var p = {
currentSortIndex: t,
currentSortValue: u[l],
params: c({}, s, u[l])
};
i && i(p)
} else {
if (n) return;
var f = {
currentSortIndex: t,
currentSortValue: "" === u[0] ? "best_match" : u[0],
params: c({}, s, u[0])
};
i && i(f)
}
}, r.getSortIcon = function (e) {
var t = l;
return e && "string" == typeof e ? (e.indexOf("asc") > -1 ? t = p : e.indexOf("desc") > -1 && (t = f), t) : t
}, r.state = {
sortValue: "default",
sortType: 0
}, r
}
return function (e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
enumerable: !1,
writable: !0,
configurable: !0
}
}), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
}(t, o.Component), n(t, [{
key: "render",
value: function () {
var e = this.state.sortValue,
t = this.props,
r = t.data,
n = t.isCurrent,
u = r || {},
c = u.name,
p = u.paramValues,
f = {
color: n ? "#FF4747" : "#333"
},
d = n ? this.getSortIcon(e) : l;
return (0, o.createElement)(i.default, {
style: h.sortItem,
onClick: this.handleSortItemClick
}, (0, o.createElement)(s.default, {
style: [h.sortText, f]
}, c), p && Array.isArray(p) && p.length > 1 ? (0, o.createElement)(a.default, {
style: h.sortIcon,
source: {
uri: d
},
resizeMode: "stretch"
}) : null)
}
}]), t
}(),
h = {
sortItem: {
paddingLeft: 24,
paddingRight: 24,
flexDirection: "row",
aligItems: "center"
},
sortText: {
fontSize: 28,
lineHeight: 48,
fontFamily: "OpenSans",
color: "#333"
},
sortIcon: {
width: 36,
height: 48
}
};
t.default = d, e.exports = t.default
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}), t.default = void 0;
var n = function () {
function e(e, t) {
for (var r = 0; r < t.length; r++) {
var n = t[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
}
}
return function (t, r, n) {
return r && e(t.prototype, r), n && e(t, n), t
}
}(),
o = s(r(45)),
i = s(r(2)),
a = r(0);
function s(e) {
return e && e.__esModule ? e : {
default: e
}
}
function u(e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !t || "object" != typeof t && "function" != typeof t ? e : t
}
var c = function (e) {
function t() {
var e, r, n;
! function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, t);
for (var o = arguments.length, i = Array(o), a = 0; a < o; a++) i[a] = arguments[a];
return r = n = u(this, (e = t.__proto__ || Object.getPrototypeOf(t)).call.apply(e, [this].concat(i))), n.utCtrlClick = function (e) {
var t = n.props.data || {};
return n.props.utCtrlClick && n.props.utCtrlClick("ListItem-ProductList", {
productId: t.item_id,
dataSpmC: n.props.dataSpmC,
listno: n.props.idx,
sortby: n.props.sortValue
}), !0
}, n.onAppear = function () {
if (!n.hasExposed) {
n.hasExposed = !0;
var e = n.props.data || {};
n.props.utExpose && n.props.utExpose("", {
prod: e.item_id,
rid: "",
times: 1,
listno: n.props.idx,
spmc: "similar",
btsInfo: e.btsInfo,
sortby: n.props.sortValue
})
}
}, u(n, r)
}
return function (e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
enumerable: !1,
writable: !0,
configurable: !0
}
}), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
}(t, a.Component), n(t, [{
key: "shouldComponentUpdate",
value: function (e, t) {
var r = e.data,
n = this.props.data,
o = this.props.itemStyle,
i = e.itemStyle;
return !r || !n || !(n.item_id === r.item_id && o === i)
}
}, {
key: "render",
value: function () {
var e = this.props.data;
if (!e) return null;
var t = (0, a.createElement)(o.default, {
data: e,
idx: this.props.idx,
dataSpmC: this.props.dataSpmC,
key: e.item_id,
adRow: this.props.adRow,
getTheme: this.props.getTheme,
onClick: this.utCtrlClick,
utCtrlClick: this.props.utCtrlClick
});
return (0, a.createElement)(i.default, {
onAppear: this.onAppear
}, t)
}
}]), t
}();
t.default = c, e.exports = t.default
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var n = Object.assign || function (e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t];
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n])
}
return e
},
o = function () {
function e(e, t) {
for (var r = 0; r < t.length; r++) {
var n = t[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
}
}
return function (t, r, n) {
return r && e(t.prototype, r), n && e(t, n), t
}
}(),
i = f(r(2)),
a = r(0),
s = f(r(46)),
u = f(r(48)),
c = r(8),
l = f(r(23)),
p = f(r(70));
function f(e) {
return e && e.__esModule ? e : {
default: e
}
}
var d = function (e) {
function t(e) {
! function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, t);
var r = function (e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !t || "object" != typeof t && "function" != typeof t ? e : t
}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));
return r.addToWishList = function () {
var e = r.props.data;
r.addToWishListClicked || (r.addToWishListClicked = !0, r.props.utCtrlClick && r.props.utCtrlClick("addToWishList", {
productId: e.item_id
}), (0, c.mtopRequest)({
api: "wishlist.addToWishList",
v: "102",
timeount: 6e3,
ecode: 1,
data: {
itemId: e.item_id
}
}, function (e) {
var t = n({}, r.state.data, {
like: !0
});
r.setState({
data: t
}), r.addToWishListClicked = !1
}, function (e) {
if (r.addToWishListClicked = !1, e && (e.ret && e.ret[0] && e.ret[0].indexOf("wishList@productAlreadyAdd") >= 0 || "wishList@productAlreadyAdd" === e.bizErrorCode)) {
var t = n({}, r.state.data, {
like: !0
});
r.setState({
data: t
})
} else p.default.show(e && e.errorMsg || "operation failed")
}))
}, r.removeWishList = function () {
var e = r.props.data;
r.removeWishListClicked || (r.removeWishListClicked = !0, r.props.utCtrlClick && r.props.utCtrlClick("removeWishList", {
productId: e.item_id
}), (0, c.mtopRequest)({
api: "wishlist.removeWishList",
v: "101",
ecode: 1,
timeount: 6e3,
appKey: 24815441,
data: {
itemId: e.item_id
}
}, function (e) {
r.removeWishListClicked = !1;
var t = n({}, r.state.data, {
like: !1
});
r.setState({
data: t
})
}, function (e) {
r.removeWishListClicked = !1, p.default.show(e && e.errorMsg || "operation failed")
}))
}, r.state = {
data: e.data
}, r
}
return function (e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
enumerable: !1,
writable: !0,
configurable: !0
}
}), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
}(t, a.Component), o(t, [{
key: "render",
value: function () {
var e = this.state.data;
if (!e) return null;
var t = e.auctionURL;
return t.indexOf("?") >= 0 ? t += "&spm=a1z65.productlist." + this.props.dataSpmC + "." + this.props.idx : t += "?spm=a1z65.productlist." + this.props.dataSpmC + "." + this.props.idx, (0, a.createElement)(i.default, {
style: {
width: 363,
backgroundColor: "#ffffff",
borderRadius: 8,
overflow: "hidden"
}
}, (0, a.createElement)(l.default, {
href: t,
onClick: this.props.onClick
}, (0, a.createElement)(u.default, {
src: e.pic_path,
style: {
width: 363,
height: 363
}
})), (0, a.createElement)(s.default, {
data: e,
addToWishList: this.addToWishList,
removeWishList: this.removeWishList
}))
}
}]), t
}();
t.default = d, e.exports = t.default
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var n = Object.assign || function (e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t];
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n])
}
return e
},
o = function () {
function e(e, t) {
for (var r = 0; r < t.length; r++) {
var n = t[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
}
}
return function (t, r, n) {
return r && e(t.prototype, r), n && e(t, n), t
}
}(),
i = l(r(4)),
a = l(r(2)),
s = r(0),
u = l(r(47)),
c = l(r(5));
function l(e) {
return e && e.__esModule ? e : {
default: e
}
}
var p = "rtl" === (r(3).isWeex ? weex.config.env.aeDirection : "ltr"),
f = function (e) {
function t(e) {
return function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, t),
function (e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !t || "object" != typeof t && "function" != typeof t ? e : t
}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e))
}
return function (e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
enumerable: !1,
writable: !0,
configurable: !0
}
}), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
}(t, s.Component), o(t, [{
key: "shouldComponentUpdate",
value: function (e, t) {
return this.props.data !== e.data
}
}, {
key: "title",
value: function () {
var e = this.props.data;
return e && e.title ? (0, s.createElement)(a.default, {
style: {
height: 32
}
}, (0, s.createElement)(i.default, {
style: {
fontSize: 24,
fontFamily: "OpenSans-Regular",
lineHeight: 32,
color: "#333",
wordWrap: "anywhere",
direction: "ltr",
textOverflow: "ellipsis"
},
numberOfLines: 1
}, e.title)) : []
}
}, {
key: "promotionTag",
value: function () {
var e = this.props.data.promotionTag,
t = ((void 0 === e ? {} : e) || {}).bigSaleResource,
r = ((void 0 === t ? {} : t) || {}).mobileSearchPriceIconInfo,
n = void 0 === r ? {} : r;
if (0 === Object.keys(n).length) return null;
var o = n.url,
i = n.width,
u = n.height,
l = {
width: i && u ? 30 * Number(i) / Number(u) : 92,
height: 30
},
f = p ? {
marginLeft: 8
} : {
marginRight: 8
};
return (0, s.createElement)(a.default, {
style: f
}, (0, s.createElement)(c.default, {
style: l,
source: {
uri: o
}
}))
}
}, {
key: "price",
value: function () {
var e = this.props.data;
return e && e.price ? (0, s.createElement)(a.default, {
style: {
width: 331,
height: 48,
flexDirection: "row",
alignItems: "center",
overflow: "hidden"
}
}, this.promotionTag(), (0, s.createElement)(i.default, {
style: n({}, {
color: "#000",
fontFamily: "open sans"
}, {
height: 48,
fontSize: 32,
lineHeight: 48,
fontWeight: 700
}),
numberOfLines: 1
}, "string" == typeof e.price ? e.price : (0, u.default)(e.price))) : []
}
}, {
key: "like",
value: function () {
var e = this;
return (0, s.createElement)(a.default, {
style: {
width: 64,
height: 64
},
onClick: function (t) {
e.props.data.like ? e.props.removeWishList() : e.props.addToWishList()
}
}, (0, s.createElement)(c.default, {
source: {
uri: this.props.data.like ? "//ae01.alicdn.com/kf/HTB1K8u7bBKw3KVjSZTE763uRpXa0.png" : "//ae01.alicdn.com/kf/H617a2357755f46af93a13f60c80e4fb7K.png"
},
style: {
width: 64,
height: 64
}
}))
}
}, {
key: "row",
value: function () {
var e = this.props.data,
t = {
_evaluation: function (e) {
if (e && e.evarageStar) {
var t = p ? {
marginLeft: 4
} : {
marginRight: 4
};
return (0, s.createElement)(a.default, {
style: {
flexDirection: "row",
alignItems: "center"
}
}, (0, s.createElement)(c.default, {
source: {
uri: "//ae01.alicdn.com/kf/H282dcf7380ed4faea8cd91f60d4b2c0fk.png"
},
style: n({}, t, {
width: 24,
height: 24
})
}), (0, s.createElement)(i.default, {
style: {
display: "flex",
fontFamily: "open sans",
fontSize: 20,
fontWeight: 400,
color: "#999999"
}
}, e.evarageStar.toFixed(1)))
}
},
_trade: function (e) {
if (e && e.tradeDesc) return (0, s.createElement)(i.default, {
style: {
fontFamily: "open sans",
fontSize: 20,
fontWeight: 400,
color: "#999999"
}
}, e.tradeDesc)
},
appendNode: function (r) {
if (t["_" + r] && e[r]) {
var n = t["_" + r](e[r]);
n && (t.nodes.length ? t.nodes = [].concat(function (e) {
if (Array.isArray(e)) {
for (var t = 0, r = Array(e.length); t < e.length; t++) r[t] = e[t];
return r
}
return Array.from(e)
}(t.nodes), [(0, s.createElement)(a.default, {
style: {
width: "1px",
height: 24,
backgroundColor: "#ccc",
marginLeft: 12,
marginRight: 12
}
}), n]) : t.nodes = [n])
}
},
nodes: []
};
return ["evaluation", "trade"].map(function (e) {
t.appendNode(e)
}), (0, s.createElement)(a.default, {
style: {
flexDirection: "row",
width: 331
}
}, (0, s.createElement)(a.default, {
style: {
width: 267,
flex: "none",
overflow: "hidden",
alignItems: "center"
}
}, (0, s.createElement)(a.default, {
style: {
width: 267
}
}, function (e) {
return e ? (0, s.createElement)(a.default, {
style: {
width: 267,
height: 30,
justifyContent: "center",
alignItems: "flex-start"
}
}, (0, s.createElement)(i.default, {
style: {
fontSize: 20,
fontFamily: "open sans",
fontWeight: 400,
color: "#999"
}
}, e.formattedFreightPrice)) : (0, s.createElement)(a.default, {
style: {
height: 30
}
})
}(e.freightDTO), (0, s.createElement)(a.default, {
style: {
flexDirection: "row",
width: 267,
height: 30,
flex: "none",
overflow: "hidden",
alignItems: "center",
marginTop: 4
}
}, t.nodes))), this.like())
}
}, {
key: "render",
value: function () {
return (0, s.createElement)(a.default, {
style: {
justifyContent: "center",
marginLeft: 16,
marginRight: 16,
paddingTop: 8,
paddingBottom: 8
}
}, this.title(), this.price(), this.row())
}
}]), t
}();
t.default = f, e.exports = t.default
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}), t.default = function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
if (e.formatedAmount) return e.formatedAmount;
var t = n[e.currency],
r = e.value;
return r = r.toFixed(2), t ? t.replace("%@", r) : e.currency + " " + r
};
var n = {
USD: "US $%@",
HKD: "HK $%@",
AUD: "AU $%@",
GBP: "£%@",
BRL: "R$ %@",
CAD: "C$ %@",
EUR: "€ %@",
INR: "Rs. %@",
JPY: "¥ %@",
KRW: "₩ %@",
VEB: "Bs. %@",
IDR: "Rp %@",
MXN: "%@MXN$",
RUB: "%@ руб.",
UAH: "%@ грн.",
SGD: "SG$ %@",
NZD: "NZ$ %@",
ILS: "₪ %@",
CNY: "CN¥ %@",
TWD: "NT$ %@",
VND: "₫ %@",
XAF: "FCFA %@",
XCD: "EC$ %@"
};
e.exports = t.default
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var n = Object.assign || function (e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t];
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n])
}
return e
},
o = function () {
function e(e, t) {
for (var r = 0; r < t.length; r++) {
var n = t[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
}
}
return function (t, r, n) {
return r && e(t.prototype, r), n && e(t, n), t
}
}(),
i = u(r(2)),
a = u(r(5)),
s = r(0);
function u(e) {
return e && e.__esModule ? e : {
default: e
}
}
var c = function (e) {
function t() {
return function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, t),
function (e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !t || "object" != typeof t && "function" != typeof t ? e : t
}(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments))
}
return function (e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
enumerable: !1,
writable: !0,
configurable: !0
}
}), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
}(t, s.Component), o(t, [{
key: "render",
value: function () {
var e = this.props.style || {},
t = n({
width: 220,
height: 220
}, e),
r = this.props.src || "";
return (0, s.createElement)(i.default, {
style: {
flex: "none",
width: t.width,
height: t.height
}
}, (0, s.createElement)(a.default, {
source: {
uri: r
},
style: t,
resizeMode: "cover"
}))
}
}]), t
}();
t.default = c, e.exports = t.default
}, function (e, t, r) {
"use strict";
e.exports = r(50)
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var n = Object.assign || function (e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t];
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n])
}
return e
},
o = r(1),
i = function (e) {
return e && e.__esModule ? e : {
default: e
}
}(r(18)),
a = void 0,
s = void 0;
if (o.isWeex) {
try {
a = r(9)
} catch (e) {
console.warn("Mtop require error")
}
try {
s = r(12)
} catch (e) {
console.warn("Windvane require error")
}
} else "undefined" != typeof lib && lib.mtop || r(54);
var u = {
ERROR: -1,
SUCCESS: 0,
TOKEN_EXPIRED: 1,
SESSION_EXPIRED: 2
};
function c(e, t, r) {
var n = location.hostname + location.pathname;
i.default.report({
url: "//tarzan/error/" + n + "/" + e.api + "/" + e.v,
message: JSON.stringify(t),
reverse1: r,
type: "mtop"
})
}
t.default = {
request: function (e, t, r) {
function n() {
return new Promise(function (t, r) {
o.isWeex ? a ? function (e, t, r) {
a.request && (o.isWeex && e.dataType && /^(original){0,1}jsonp$/.test(e.dataType) && (e.dataType = e.dataType.replace("jsonp", "json")), a.request(e, t, r))
}(e, t, r) : s && s.call ? function (e, t, r) {
s && s.call && (e.param = e.data || e.param, "POST" === e.type && (e.post = "1"), s.call({
class: "MtopWVPlugin",
method: "send",
data: e
}, function (e) {
"string" == typeof e && (e = JSON.parse(e)), e.retType === u.SUCCESS || e.ret && e.ret[0].indexOf("SUCCESS") > -1 ? t && t(e) : r && r(e)
}))
}(e, t, r) : r("Windvane & Mtop require error") : lib.mtop.request(e, function (n) {
n && n.ret && n.ret.length && "WV_ERR::PARAM_PARSE_ERROR" === n.ret[0] ? lib.mtop.H5Request(e, t, r) : t(n)
}, r)
})
}
return new Promise(function (o, i) {
n().then(function (e) {
t && t(e), o(e)
}).catch(function (n) {
if (r = r || t, n && (n.api || n.v) || (n = {
api: e.api,
v: e.v,
data: {},
ret: ["FAIL::" + (n || "")],
retType: -1
}), void 0 === n.retType && (n.retType = -1), c(e, n, "0012"), e && (1 == e.ecode || void 0 === e.preventFallback)) return r && r(n), i(n);
(function (e, t) {
return new Promise(function (r, n) {
"string" == typeof e.data && (e.data = JSON.parse(e.data));
var o = function (e) {
var t;
return e.api && (t = function (e, t, r) {
var n;
if (e) {
for (var o in n = [], e) e.hasOwnProperty(o) && (!t || t.indexOf(o) > -1) && void 0 !== e[o] && "" !== e[o] && n.push(o + "-" + (r ? encodeURIComponent(e[o]) : e[o]));
n.sort()
} else n = [];
return n.join("_")
}(e.data, e.requiredParams, e.encodeParam)), "//fallback.alicdn.com/mtop/" + e.api + "_" + (e.v || "1.0") + "/" + t
}(e),
i = new XMLHttpRequest;
i.open("get", o, !0), i.send(null), i.onreadystatechange = function () {
if (4 == this.readyState && 200 == this.status) try {
var o = JSON.parse(this.responseText);
o && o.success && o.result && !o.result.backup ? (c(e, t, "0210"), n(t)) : r(o)
} catch (r) {
c(e, t, "0210"), n(t)
} else 4 == this.readyState && (c(e, t, "0011"), n(t))
}
})
})(e, n).then(o).catch(function (e) {
(r = r || t) && r(e), i(e)
})
})
})
},
config: function (e, t) {
o.isWeex || "undefined" != typeof lib && lib.mtop && ("string" == typeof e ? lib.mtop.config[e] = t : lib.mtop.config = n({}, lib.mtop.config, e))
},
RESPONSE_TYPE: u
}, e.exports = t.default
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
return typeof e
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
},
o = r(1),
i = function (e) {
return e && e.__esModule ? e : {
default: e
}
}(r(52)),
a = 0,
s = {
screen: "undefined" == typeof screen ? "0x0" : (screen && screen.width) + "x" + (screen && screen.height),
sampling: 1,
version: "rx-tracker/2.2.9",
native: o.isWeex ? 1 : 0,
isInWindmill: 0
},
u = "/jstracker.3";
function c(e) {
if (++a > 20 && o.isWeb) return !1;
var t = Object.assign({
url: i.default.format(e)
}, s, e);
if (t.sampling = (o.isNode || "undefined" == typeof location ? "" : location.href).indexOf("jt_debug=1") > -1 ? 1 : t.sampling, Math.random() * t.sampling < 1)
if (o.isWeex) {
var c = void 0;
try {
c = r(19)
} catch (e) {}
var l = "undefined" != typeof __weex_options__ && __weex_options__.weex,
p = o.isWeex && "object" === (void 0 === l ? "undefined" : n(l)) && "windmill" === l.config.container || !1,
f = !1;
if (p) try {
var d = r(53);
void 0 !== d && !n(d) || "function" != typeof d.hideKeyboard || (f = !0)
} catch (e) {}
c.commitEvent && (p && f ? (t.isInWindmill = "weex", c.commitEvent({
eventId: "19999",
eventid: "19999",
name: location.href,
pageName: location.href,
arg1: u,
arg2: "",
arg3: "",
param: t,
params: t
})) : c.commitEvent(location.href, "19999", u, "", "", t))
} else o.isWeb && "undefined" != typeof goldlog ? goldlog.send && goldlog.send("//gm.mmstat.com" + u, t) : "undefined" != typeof my && my.getSystemInfoSync && "function" == typeof my.getSystemInfoSync && ("TB" === my.getSystemInfoSync().app || "alipay" === my.getSystemInfoSync().app) && (t.isInWindmill = "web", function (e) {
my.request && "function" == typeof my.request ? my.request({
url: "http://gm.mmstat.com" + u,
method: "GET",
data: e,
dataType: "text"
}).catch(function (e) {}) : my.httpRequest && "function" == typeof my.httpRequest && my.httpRequest({
url: "//gm.mmstat.com" + u,
method: "get",
data: e,
dataType: "json"
})
}(t))
}
t.default = {
report: c,
reportError: function (e, t, r) {
var n = {};
e && e instanceof Error && (n = {
stack: JSON.stringify(e.stack),
name: e.name,
message: e.message,
type: "error",
module: t
}, r && (n.reverse1 = r), c(n))
},
reportApi: function (e, t) {
e && e.url && (e.type = "api", e.module = t, e.sampling = e.sampling || "100", c(e))
},
setConfig: function (e) {
e && e.sampling && (s.sampling = e.sampling)
}
}, e.exports = t.default
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var n = r(1),
o = {
render: "rx_render_err",
data: "rx_data_fetch_err",
error: "rax_error"
};
t.default = {
format: function (e) {
var t = n.isNode || "undefined" == typeof location ? "" : location.href || "",
r = o[e.type || "custom"] || "rx_user_define_err",
i = [t.replace(/[\?#].*$/, "").replace(/\/$/, ""), e.module || "", r].join("/");
return n.isWeex ? encodeURIComponent(i) : i
}
}, e.exports = t.default
}, function (t, r) {
t.exports = e("@weex-module/keyboard")
}, function (e, t, r) {
"use strict";
var n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
return typeof e
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
};
! function (e, t) {
function r() {
var e = {},
t = new p(function (t, r) {
e.resolve = t, e.reject = r
});
return e.promise = t, e
}
function o(e, t) {
for (var r in t) void 0 === e[r] && (e[r] = t[r]);
return e
}
function i(e) {
var t = [];
for (var r in e) e[r] && t.push(r + "=" + encodeURIComponent(e[r]));
return t.join("&")
}
function a(e) {
return "[object Object]" == {}.toString.call(e)
}
function s(e) {
var t = new RegExp("(?:^|;\\s*)" + e + "\\=([^;]+)(?:;\\s*|$)").exec(document.cookie);
return t ? t[1] : void 0
}
function u(e, t, r) {
var n = new Date;
n.setTime(n.getTime() - 864e5), document.cookie = e + "=;path=/;domain=." + t + ";expires=" + n.toGMTString(), document.cookie = e + "=;path=/;domain=." + r + "." + t + ";expires=" + n.toGMTString()
}
function c(e, t) {
for (var r = e.split("."), n = t.split("."), o = 0; 3 > o; o++) {
var i = Number(r[o]),
a = Number(n[o]);
if (i > a) return 1;
if (a > i) return -1;
if (!isNaN(i) && isNaN(a)) return 1;
if (isNaN(i) && !isNaN(a)) return -1
}
return 0
}
function l(e) {
this.id = "" + (new Date).getTime() + ++v, this.params = o(e || {}, {
v: "*",
data: {},
type: "get",
dataType: "jsonp"
}), this.params.type = this.params.type.toLowerCase(), "object" == n(this.params.data) && (this.params.data = JSON.stringify(this.params.data)), this.middlewares = h.slice(0)
}
var p = e.Promise,
f = (p || {
resolve: function () {}
}).resolve();
String.prototype.trim || (String.prototype.trim = function () {
return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "")
});
var d = {
useJsonpResultType: !1,
safariGoLogin: !0,
useAlipayJSBridge: !1
},
h = [],
m = {
ERROR: -1,
SUCCESS: 0,
TOKEN_EXPIRED: 1,
SESSION_EXPIRED: 2
};
(function () {
var t = e.location.hostname;
if (!t) {
var r = e.parent.location.hostname;
r && ~r.indexOf("zebra.alibaba-inc.com") && (t = r)
}
var n = new RegExp("([^.]*?)\\.?((?:" + ["taobao.net", "taobao.com", "tmall.com", "tmall.hk", "alibaba-inc.com"].join(")|(?:").replace(/\./g, "\\.") + "))", "i"),
o = t.match(n) || [],
i = o[2] || "taobao.com",
a = o[1] || "m";
"taobao.net" !== i || "x" !== a && "waptest" !== a && "daily" !== a ? "taobao.net" === i && "demo" === a ? a = "demo" : "alibaba-inc.com" === i && "zebra" === a ? a = "zebra" : "waptest" !== a && "wapa" !== a && "m" !== a && (a = "m") : a = "waptest";
var s = "h5api";
"taobao.net" === i && "waptest" === a && (s = "acs"), d.mainDomain = i, d.subDomain = a, d.prefix = s
})(),
function () {
var t = e.navigator.userAgent,
r = t.match(/WindVane[\/\s]([\d\.\_]+)/);
r && (d.WindVaneVersion = r[1]);
var n = t.match(/AliApp\(([^\/]+)\/([\d\.\_]+)\)/i);
n && (d.AliAppName = n[1], d.AliAppVersion = n[2]);
var o = t.match(/AMapClient\/([\d\.\_]+)/i);
o && (d.AliAppName = "AMAP", d.AliAppVersion = o[1])
}();
var y = /[Android|Adr]/.test(e.navigator.userAgent),
g = "AP" === d.AliAppName && c(d.AliAppVersion, "10.1.2") >= 0 || "KB" === d.AliAppName && c(d.AliAppVersion, "7.1.62") >= 0 || y && "AMAP" === d.AliAppName && c(d.AliAppVersion, "1.0.1") >= 0,
v = 0;
l.prototype.use = function (e) {
if (!e) throw new Error("middleware is undefined");
return this.middlewares.push(e), this
}, l.prototype.__processRequestMethod = function (e) {
var t = this.params,
r = this.options;
"get" === t.type && "jsonp" === t.dataType ? r.getJSONP = !0 : "get" === t.type && "originaljsonp" === t.dataType ? r.getOriginalJSONP = !0 : "get" === t.type && "json" === t.dataType ? r.getJSON = !0 : "post" === t.type && (r.postJSON = !0), e()
}, l.prototype.__processRequestType = function (r) {
var n = this,
o = this.params,
i = this.options;
if (!0 === d.H5Request && (i.H5Request = !0), !0 === d.WindVaneRequest && (i.WindVaneRequest = !0), !1 === i.H5Request && !0 === i.WindVaneRequest) {
if (!g && (!t.windvane || parseFloat(i.WindVaneVersion) < 5.4)) throw new Error("WINDVANE_NOT_FOUND::缺少WindVane环境");
if (g && !e.AlipayJSBridge) throw new Error("ALIPAY_NOT_READY::支付宝通道未准备好,支付宝请见 https://lark.alipay.com/mtbsdkdocs/mtopjssdkdocs/pucq6z")
} else if (!0 === i.H5Request) i.WindVaneRequest = !1;
else if (void 0 === i.WindVaneRequest && void 0 === i.H5Request && (t.windvane && parseFloat(i.WindVaneVersion) >= 5.4 ? (i.WindVaneRequest = !0, window.self !== window.top && (i.H5Request = !0)) : i.H5Request = !0, g)) {
if (i.WindVaneRequest = i.H5Request = void 0, e.AlipayJSBridge)
if (a(o.data)) i.WindVaneRequest = !0;
else try {
a(JSON.parse(o.data)) ? i.WindVaneRequest = !0 : i.H5Request = !0
} catch (e) {
i.H5Request = !0
} else i.H5Request = !0;
"AMAP" !== d.AliAppName || o.useNebulaJSbridgeWithAMAP || (i.WindVaneRequest = i.H5Request = void 0, i.H5Request = !0)
}
var s = e.navigator.userAgent.toLowerCase();
return s.indexOf("youku") > -1 && i.mainDomain.indexOf("youku.com") < 0 && (i.WindVaneRequest = !1, i.H5Request = !0), i.mainDomain.indexOf("youku.com") > -1 && s.indexOf("youku") < 0 && (i.WindVaneRequest = !1, i.H5Request = !0), r ? r().then(function () {
var e = i.retJson.ret;
if (e instanceof Array && (e = e.join(",")), !0 === i.WindVaneRequest && g && i.retJson.error || !e || e.indexOf("PARAM_PARSE_ERROR") > -1 || e.indexOf("HY_FAILED") > -1 || e.indexOf("HY_NO_HANDLER") > -1 || e.indexOf("HY_CLOSED") > -1 || e.indexOf("HY_EXCEPTION") > -1 || e.indexOf("HY_NO_PERMISSION") > -1) {
if (!g || !isNaN(i.retJson.error) || -1 !== i.retJson.error.indexOf("FAIL_SYS_ACCESS_DENIED")) return g && a(o.data) && (o.data = JSON.stringify(o.data)), d.H5Request = !0, n.__sequence([n.__processRequestType, n.__processToken, n.__processRequestUrl, n.middlewares, n.__processRequest]);
void 0 === i.retJson.api && void 0 === i.retJson.v && (i.retJson.api = o.api, i.retJson.v = o.v, i.retJson.ret = [i.retJson.error + "::" + i.retJson.errorMessage], i.retJson.data = {})
}
}) : void 0
};
var b = "_m_h5_c",
_ = "_m_h5_tk";
l.prototype.__getTokenFromAlipay = function () {
var t = r(),
n = this.options,
o = (e.navigator.userAgent, !!location.protocol.match(/^https?\:$/));
return !0 === n.useAlipayJSBridge && !o && g && e.AlipayJSBridge && e.AlipayJSBridge.call ? e.AlipayJSBridge.call("getMtopToken", function (e) {
e && e.token && (n.token = e.token), t.resolve()
}, function () {
t.resolve()
}) : t.resolve(), t.promise
}, l.prototype.__getTokenFromCookie = function () {
var e = this.options;
return e.CDR && s(b) ? e.token = s(b).split(";")[0] : e.token = e.token || s(_), e.token && (e.token = e.token.split("_")[0]), p.resolve()
}, l.prototype.__waitWKWebViewCookie = function (t) {
var r = this.options;
r.waitWKWebViewCookieFn && r.H5Request && e.webkit && e.webkit.messageHandlers ? r.waitWKWebViewCookieFn(t) : t()
}, l.prototype.__processToken = function (e) {
var t = this,
r = this.options;
return this.params, r.token && delete r.token, !0 !== r.WindVaneRequest ? f.then(function () {
return t.__getTokenFromAlipay()
}).then(function () {
return t.__getTokenFromCookie()
}).then(e).then(function () {
var e = r.retJson,
n = e.ret;
if (n instanceof Array && (n = n.join(",")), n.indexOf("TOKEN_EMPTY") > -1 || (!0 === r.CDR || !0 === r.syncCookieMode) && n.indexOf("ILLEGAL_ACCESS") > -1 || n.indexOf("TOKEN_EXOIRED") > -1) {
if (r.maxRetryTimes = r.maxRetryTimes || 5, r.failTimes = r.failTimes || 0, r.H5Request && ++r.failTimes < r.maxRetryTimes) {
var o = [t.__waitWKWebViewCookie, t.__processToken, t.__processRequestUrl, t.middlewares, t.__processRequest];
return !0 === r.syncCookieMode && t.constructor.__cookieProcessorId !== t.id && (t.constructor.__cookieProcessor ? o = [function (e) {
var r = function () {
t.constructor.__cookieProcessor = null, t.constructor.__cookieProcessorId = null, e()
};
t.constructor.__cookieProcessor ? t.constructor.__cookieProcessor.then(r).catch(r) : e()
}, t.__waitWKWebViewCookie, t.__processToken, t.__processRequestUrl, t.middlewares, t.__processRequest] : (t.constructor.__cookieProcessor = t.__requestProcessor, t.constructor.__cookieProcessorId = t.id)), t.__sequence(o)
}
r.maxRetryTimes > 0 && (u(b, r.pageDomain, "*"), u(_, r.mainDomain, r.subDomain), u("_m_h5_tk_enc", r.mainDomain, r.subDomain)), e.retType = m.TOKEN_EXPIRED
}
}) : void e()
}, l.prototype.__processRequestUrl = function (t) {
var r = this.params,
n = this.options;
if (n.hostSetting && n.hostSetting[e.location.hostname]) {
var o = n.hostSetting[e.location.hostname];
o.prefix && (n.prefix = o.prefix), o.subDomain && (n.subDomain = o.subDomain), o.mainDomain && (n.mainDomain = o.mainDomain)
}
if (!0 === n.H5Request) {
var i = "//" + (n.prefix ? n.prefix + "." : "") + (n.subDomain ? n.subDomain + "." : "") + n.mainDomain + "/h5/" + r.api.toLowerCase() + "/" + r.v.toLowerCase() + "/",
a = r.appKey || ("waptest" === n.subDomain ? "4272" : "12574478"),
s = (new Date).getTime(),
u = function (e) {
function t(e, t) {
return e << t | e >>> 32 - t
}
function r(e, t) {
var r, n, o, i, a;
return o = 2147483648 & e, i = 2147483648 & t, a = (1073741823 & e) + (1073741823 & t), (r = 1073741824 & e) & (n = 1073741824 & t) ? 2147483648 ^ a ^ o ^ i : r | n ? 1073741824 & a ? 3221225472 ^ a ^ o ^ i : 1073741824 ^ a ^ o ^ i : a ^ o ^ i
}
function n(e, n, o, i, a, s, u) {
return r(t(e = r(e, r(r(n & o | ~n & i, a), u)), s), n)
}
function o(e, n, o, i, a, s, u) {
return r(t(e = r(e, r(r(n & i | o & ~i, a), u)), s), n)
}
function i(e, n, o, i, a, s, u) {
return r(t(e = r(e, r(r(n ^ o ^ i, a), u)), s), n)
}
function a(e, n, o, i, a, s, u) {
return r(t(e = r(e, r(r(o ^ (n | ~i), a), u)), s), n)
}
function s(e) {
var t, r = "",
n = "";
for (t = 0; 3 >= t; t++) r += (n = "0" + (e >>> 8 * t & 255).toString(16)).substr(n.length - 2, 2);
return r
}
var u, c, l, p, f, d, h, m, y, g;
for (g = function (e) {
for (var t, r = e.length, n = r + 8, o = 16 * ((n - n % 64) / 64 + 1), i = new Array(o - 1), a = 0, s = 0; r > s;) a = s % 4 * 8, i[t = (s - s % 4) / 4] = i[t] | e.charCodeAt(s) << a, s++;
return a = s % 4 * 8, i[t = (s - s % 4) / 4] = i[t] | 128 << a, i[o - 2] = r << 3, i[o - 1] = r >>> 29, i
}(e = function (e) {
e = e.replace(/\r\n/g, "\n");
for (var t = "", r = 0; r < e.length; r++) {
var n = e.charCodeAt(r);
128 > n ? t += String.fromCharCode(n) : n > 127 && 2048 > n ? (t += String.fromCharCode(n >> 6 | 192), t += String.fromCharCode(63 & n | 128)) : (t += String.fromCharCode(n >> 12 | 224), t += String.fromCharCode(n >> 6 & 63 | 128), t += String.fromCharCode(63 & n | 128))
}
return t
}(e)), d = 1732584193, h = 4023233417, m = 2562383102, y = 271733878, u = 0; u < g.length; u += 16) c = d, l = h, p = m, f = y, h = a(h = a(h = a(h = a(h = i(h = i(h = i(h = i(h = o(h = o(h = o(h = o(h = n(h = n(h = n(h = n(h, m = n(m, y = n(y, d = n(d, h, m, y, g[u + 0], 7, 3614090360), h, m, g[u + 1], 12, 3905402710), d, h, g[u + 2], 17, 606105819), y, d, g[u + 3], 22, 3250441966), m = n(m, y = n(y, d = n(d, h, m, y, g[u + 4], 7, 4118548399), h, m, g[u + 5], 12, 1200080426), d, h, g[u + 6], 17, 2821735955), y, d, g[u + 7], 22, 4249261313), m = n(m, y = n(y, d = n(d, h, m, y, g[u + 8], 7, 1770035416), h, m, g[u + 9], 12, 2336552879), d, h, g[u + 10], 17, 4294925233), y, d, g[u + 11], 22, 2304563134), m = n(m, y = n(y, d = n(d, h, m, y, g[u + 12], 7, 1804603682), h, m, g[u + 13], 12, 4254626195), d, h, g[u + 14], 17, 2792965006), y, d, g[u + 15], 22, 1236535329), m = o(m, y = o(y, d = o(d, h, m, y, g[u + 1], 5, 4129170786), h, m, g[u + 6], 9, 3225465664), d, h, g[u + 11], 14, 643717713), y, d, g[u + 0], 20, 3921069994), m = o(m, y = o(y, d = o(d, h, m, y, g[u + 5], 5, 3593408605), h, m, g[u + 10], 9, 38016083), d, h, g[u + 15], 14, 3634488961), y, d, g[u + 4], 20, 3889429448), m = o(m, y = o(y, d = o(d, h, m, y, g[u + 9], 5, 568446438), h, m, g[u + 14], 9, 3275163606), d, h, g[u + 3], 14, 4107603335), y, d, g[u + 8], 20, 1163531501), m = o(m, y = o(y, d = o(d, h, m, y, g[u + 13], 5, 2850285829), h, m, g[u + 2], 9, 4243563512), d, h, g[u + 7], 14, 1735328473), y, d, g[u + 12], 20, 2368359562), m = i(m, y = i(y, d = i(d, h, m, y, g[u + 5], 4, 4294588738), h, m, g[u + 8], 11, 2272392833), d, h, g[u + 11], 16, 1839030562), y, d, g[u + 14], 23, 4259657740), m = i(m, y = i(y, d = i(d, h, m, y, g[u + 1], 4, 2763975236), h, m, g[u + 4], 11, 1272893353), d, h, g[u + 7], 16, 4139469664), y, d, g[u + 10], 23, 3200236656), m = i(m, y = i(y, d = i(d, h, m, y, g[u + 13], 4, 681279174), h, m, g[u + 0], 11, 3936430074), d, h, g[u + 3], 16, 3572445317), y, d, g[u + 6], 23, 76029189), m = i(m, y = i(y, d = i(d, h, m, y, g[u + 9], 4, 3654602809), h, m, g[u + 12], 11, 3873151461), d, h, g[u + 15], 16, 530742520), y, d, g[u + 2], 23, 3299628645), m = a(m, y = a(y, d = a(d, h, m, y, g[u + 0], 6, 4096336452), h, m, g[u + 7], 10, 1126891415), d, h, g[u + 14], 15, 2878612391), y, d, g[u + 5], 21, 4237533241), m = a(m, y = a(y, d = a(d, h, m, y, g[u + 12], 6, 1700485571), h, m, g[u + 3], 10, 2399980690), d, h, g[u + 10], 15, 4293915773), y, d, g[u + 1], 21, 2240044497), m = a(m, y = a(y, d = a(d, h, m, y, g[u + 8], 6, 1873313359), h, m, g[u + 15], 10, 4264355552), d, h, g[u + 6], 15, 2734768916), y, d, g[u + 13], 21, 1309151649), m = a(m, y = a(y, d = a(d, h, m, y, g[u + 4], 6, 4149444226), h, m, g[u + 11], 10, 3174756917), d, h, g[u + 2], 15, 718787259), y, d, g[u + 9], 21, 3951481745), d = r(d, c), h = r(h, l), m = r(m, p), y = r(y, f);
var token = (s(d) + s(h) + s(m) + s(y)).toLowerCase()
consold.info(token)
return token
}(n.token + "&" + s + "&" + a + "&" + r.data),
c = {
jsv: "2.5.7",
appKey: a,
t: s,
sign: u
},
l = {
data: r.data,
ua: r.ua
};
Object.keys(r).forEach(function (e) {
void 0 === c[e] && void 0 === l[e] && "headers" !== e && "ext_headers" !== e && "ext_querys" !== e && (c[e] = r[e])
}), r.ext_querys && Object.keys(r.ext_querys).forEach(function (e) {
c[e] = r.ext_querys[e]
}), n.getJSONP ? c.type = "jsonp" : n.getOriginalJSONP ? c.type = "originaljsonp" : (n.getJSON || n.postJSON) && (c.type = "originaljson"), void 0 !== r.valueType && ("original" === r.valueType ? n.getJSONP || n.getOriginalJSONP ? c.type = "originaljsonp" : (n.getJSON || n.postJSON) && (c.type = "originaljson") : "string" === r.valueType && (n.getJSONP || n.getOriginalJSONP ? c.type = "jsonp" : (n.getJSON || n.postJSON) && (c.type = "json"))), !0 === n.useJsonpResultType && "originaljson" === c.type && delete c.type, n.dangerouslySetProtocol && (i = n.dangerouslySetProtocol + ":" + i), n.querystring = c, n.postdata = l, n.path = i
}
t()
}, l.prototype.__processUnitPrefix = function (e) {
e()
};
var w = 0;
l.prototype.__requestJSONP = function (e) {
function t(e) {
if (c && clearTimeout(c), l.parentNode && l.parentNode.removeChild(l), "TIMEOUT" === e) window[u] = function () {
window[u] = void 0;
try {
delete window[u]
} catch (e) {}
};
else {
window[u] = void 0;
try {
delete window[u]
} catch (e) {}
}
}
var n = r(),
o = this.params,
a = this.options,
s = o.timeout || 2e4,
u = "mtopjsonp" + (o.jsonpIncPrefix || "") + ++w,
c = setTimeout(function () {
e(a.timeoutErrMsg || "TIMEOUT::接口超时"), t("TIMEOUT")
}, s);
a.querystring.callback = u;
var l = document.createElement("script");
return l.src = a.path + "?" + i(a.querystring) + "&" + i(a.postdata), l.async = !0, l.onerror = function () {
t("ABORT"), e(a.abortErrMsg || "ABORT::接口异常退出")
}, window[u] = function () {
a.results = Array.prototype.slice.call(arguments), t(), n.resolve()
},
function (e) {
(document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0] || document.firstElementChild || document).appendChild(e)
}(l), n.promise
}, l.prototype.__requestJSON = function (t) {
function n(e) {
p && clearTimeout(p), "TIMEOUT" === e && c.abort()
}
var o = r(),
a = this.params,
u = this.options,
c = new e.XMLHttpRequest,
l = a.timeout || 2e4,
p = setTimeout(function () {
t(u.timeoutErrMsg || "TIMEOUT::接口超时"), n("TIMEOUT")
}, l);
u.CDR && s(b) && (u.querystring.c = decodeURIComponent(s(b))), c.onreadystatechange = function () {
if (4 == c.readyState) {
var e, r, i = c.status;
if (i >= 200 && 300 > i || 304 == i) {
n(), e = c.responseText, r = c.getAllResponseHeaders() || "";
try {
(e = /^\s*$/.test(e) ? {} : JSON.parse(e)).responseHeaders = r, u.results = [e], o.resolve()
} catch (e) {
t("PARSE_JSON_ERROR::解析JSON失败")
}
} else n("ABORT"), t(u.abortErrMsg || "ABORT::接口异常退出")
}
};
var f, d, h = u.path + "?" + i(u.querystring);
u.getJSON ? (f = "GET", h += "&" + i(u.postdata)) : u.postJSON && (f = "POST", d = i(u.postdata)), c.open(f, h, !0), c.withCredentials = !0, c.setRequestHeader("Accept", "application/json"), c.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
var m = a.ext_headers || a.headers;
if (m)
for (var y in m) c.setRequestHeader(y, m[y]);
return c.send(d), o.promise
}, l.prototype.__requestWindVane = function (e) {
function n(e) {
a.results = [e], o.resolve()
}
var o = r(),
i = this.params,
a = this.options,
s = i.data,
u = i.api,
c = i.v,
l = a.postJSON ? 1 : 0,
p = a.getJSON || a.postJSON || a.getOriginalJSONP ? "originaljson" : "";
void 0 !== i.valueType && ("original" === i.valueType ? p = "originaljson" : "string" === i.valueType && (p = "")), !0 === a.useJsonpResultType && (p = "");
var f, d, h = "https" === location.protocol ? 1 : 0,
m = i.isSec || 0,
y = i.sessionOption || "AutoLoginOnly",
g = i.ecode || 0,
v = i.ext_headers || {},
b = i.ext_querys || {};
f = 2 * (d = void 0 !== i.timer ? parseInt(i.timer) : void 0 !== i.timeout ? parseInt(i.timeout) : 2e4), !0 === i.needLogin && void 0 === i.sessionOption && (y = "AutoLoginAndManualLogin"), void 0 !== i.secType && void 0 === i.isSec && (m = i.secType);
var _ = {
api: u,
v: c,
post: String(l),
type: p,
isHttps: String(h),
ecode: String(g),
isSec: String(m),
param: JSON.parse(s),
timer: d,
sessionOption: y,
ext_headers: v,
ext_querys: b
};
return i.ttid && !0 === a.dangerouslySetWVTtid && (_.ttid = i.ttid), Object.assign && i.dangerouslySetWindvaneParams && Object.assign(_, i.dangerouslySetWindvaneParams), t.windvane.call("MtopWVPlugin", "send", _, n, n, f), o.promise
}, l.prototype.__requestAlipay = function (t) {
var n = r(),
o = this.params,
i = this.options,
s = {
apiName: o.api,
apiVersion: o.v,
needEcodeSign: "1" === String(o.ecode),
usePost: !!i.postJSON
};
return a(o.data) || (o.data = JSON.parse(o.data)), s.data = o.data, o.ttid && !0 === i.dangerouslySetWVTtid && (s.ttid = o.ttid), (i.getJSON || i.postJSON || i.getOriginalJSONP) && (s.type = "originaljson"), void 0 !== o.valueType && ("original" === o.valueType ? s.type = "originaljson" : "string" === o.valueType && delete s.type), !0 === i.useJsonpResultType && delete s.type, Object.assign && o.dangerouslySetAlipayParams && Object.assign(s, o.dangerouslySetAlipayParams), e.AlipayJSBridge.call("mtop", s, function (e) {
i.results = [e], n.resolve()
}), n.promise
}, l.prototype.__processRequest = function (e, t) {
var r = this;
return f.then(function () {
var e = r.options;
if (e.H5Request && (e.getJSONP || e.getOriginalJSONP)) return r.__requestJSONP(t);
if (e.H5Request && (e.getJSON || e.postJSON)) return r.__requestJSON(t);
if (e.WindVaneRequest) return g ? r.__requestAlipay(t) : r.__requestWindVane(t);
throw new Error("UNEXCEPT_REQUEST::错误的请求类型")
}).then(e).then(function () {
var e = r.options,
t = (r.params, e.results[0]),
n = t && t.ret || [];
t.ret = n, n instanceof Array && (n = n.join(","));
var o = t.c;
e.CDR && o && function (e, t, r) {
var n = r || {};
document.cookie = e.replace(/[^+#$&^`|]/g, encodeURIComponent).replace("(", "%28").replace(")", "%29") + "=" + t.replace(/[^+#$&\/:<-\[\]-}]/g, encodeURIComponent) + (n.domain ? ";domain=" + n.domain : "") + (n.path ? ";path=" + n.path : "") + (n.secure ? ";secure" : "") + (n.httponly ? ";HttpOnly" : "")
}(b, o, {
domain: e.pageDomain,
path: "/"
}), n.indexOf("SUCCESS") > -1 ? t.retType = m.SUCCESS : t.retType = m.ERROR, e.retJson = t
})
}, l.prototype.__sequence = function (e) {
var t = this,
n = [],
o = [];
e.forEach(function e(i) {
if (i instanceof Array) i.forEach(e);
else {
var a, s = r(),
u = r();
n.push(function () {
return s = r(), (a = i.call(t, function (e) {
return s.resolve(e), u.promise
}, function (e) {
return s.reject(e), u.promise
})) && (a = a.catch(function (e) {
s.reject(e)
})), s.promise
}), o.push(function (e) {
return u.resolve(e), a
})
}
});
for (var i, a = f; i = n.shift();) a = a.then(i);
for (; i = o.pop();) a = a.then(i);
return a
};
var O = function (e) {
e()
},
x = function (e) {
e()
};
l.prototype.request = function (r) {
var n = this;
if (this.options = o(r || {}, d), !p) {
var i = "当前浏览器不支持Promise,请在windows对象上挂载Promise对象";
throw t.mtop = {
ERROR: i
}, new Error(i)
}
var a = p.resolve([O, x]).then(function (e) {
var t = e[0],
r = e[1];
return n.__sequence([t, n.__processRequestMethod, n.__processRequestType, n.__processToken, n.__processRequestUrl, n.middlewares, n.__processRequest, r])
}).then(function () {
var e = n.options.retJson;
return e.retType !== m.SUCCESS ? p.reject(e) : n.options.successCallback ? void n.options.successCallback(e) : p.resolve(e)
}).catch(function (e) {
var r;
return e instanceof Error ? (console.error(e.stack), r = {
ret: [e.message],
stack: [e.stack],
retJson: m.ERROR
}) : r = "string" == typeof e ? {
ret: [e],
retJson: m.ERROR
} : void 0 !== e ? e : n.options.retJson, t.mtop.errorListener && t.mtop.errorListener({
api: n.params.api,
data: n.params.data,
v: n.params.v,
retJson: r
}), n.options.failureCallback ? void n.options.failureCallback(r) : p.reject(r)
});
return this.__processRequestType(), n.options.H5Request && (n.constructor.__firstProcessor || (n.constructor.__firstProcessor = a), O = function (e) {
n.constructor.__firstProcessor.then(e).catch(e)
}), ("get" === this.params.type && "json" === this.params.dataType || "post" === this.params.type) && (r.pageDomain = r.pageDomain || function (e) {
try {
return ".com" !== e.substring(e.lastIndexOf(".")) ? (e.split(".") || []).length <= 3 ? e : e.split(".").slice(1).join(".") : e.substring(e.lastIndexOf(".", e.lastIndexOf(".") - 1) + 1)
} catch (t) {
return e.substring(e.lastIndexOf(".", e.lastIndexOf(".") - 1) + 1)
}
}(e.location.hostname), r.mainDomain !== r.pageDomain && (r.maxRetryTimes = 4, r.CDR = !0)), this.__requestProcessor = a, a
}, t.mtop = function (e) {
return new l(e)
}, t.mtop.request = function (e, t, r) {
var n = {
H5Request: e.H5Request,
WindVaneRequest: e.WindVaneRequest,
LoginRequest: e.LoginRequest,
AntiCreep: e.AntiCreep,
AntiFlood: e.AntiFlood,
successCallback: t,
failureCallback: r || t
};
return new l(e).request(n)
}, t.mtop.H5Request = function (e, t, r) {
var n = {
H5Request: !0,
successCallback: t,
failureCallback: r || t
};
return new l(e).request(n)
}, t.mtop.middlewares = h, t.mtop.config = d, t.mtop.RESPONSE_TYPE = m, t.mtop.CLASS = l
}(window, window.lib || (window.lib = {})),
function (e, t) {
function r(e) {
return e.preventDefault(), !1
}
function n(t, n) {
var o = this,
i = e.dpr || 1,
a = document.createElement("div"),
s = document.documentElement.getBoundingClientRect(),
u = Math.max(s.width, window.innerWidth) / i,
c = Math.max(s.height, window.innerHeight) / i;
a.style.cssText = ["-webkit-transform:scale(" + i + ") translateZ(0)", "-ms-transform:scale(" + i + ") translateZ(0)", "transform:scale(" + i + ") translateZ(0)", "-webkit-transform-origin:0 0", "-ms-transform-origin:0 0", "transform-origin:0 0", "width:" + u + "px", "height:" + c + "px", "z-index:999999", "position:" + (u > 800 ? "fixed" : "absolute"), "left:0", "top:0px", "background:" + (u > 800 ? "rgba(0,0,0,.5)" : "#FFF"), "display:none"].join(";");
var l = document.createElement("div");
l.style.cssText = ["width:100%", "height:52px", "background:#EEE", "line-height:52px", "text-align:left", "box-sizing:border-box", "padding-left:20px", "position:absolute", "left:0", "top:0", "font-size:16px", "font-weight:bold", "color:#333"].join(";"), l.innerText = t;
var p = document.createElement("a");
p.style.cssText = ["display:block", "position:absolute", "right:0", "top:0", "height:52px", "line-height:52px", "padding:0 20px", "color:#999"].join(";"), p.innerText = "关闭";
var f = document.createElement("iframe");
f.style.cssText = ["width:100%", "height:100%", "border:0", "overflow:hidden"].join(";"), u > 800 && (l.style.cssText = ["width:370px", "height:52px", "background:#EEE", "line-height:52px", "text-align:left", "box-sizing:border-box", "padding-left:20px", "position:absolute", "left:" + (u / 2 - 185) + "px", "top:40px", "font-size:16px", "font-weight:bold", "color:#333"].join(";"), f.style.cssText = ["position:absolute", "top:92px", "left:" + (u / 2 - 185) + "px", "width:370px", "height:480px", "border:0", "background:#FFF", "overflow:hidden"].join(";")), l.appendChild(p), a.appendChild(l), a.appendChild(f), a.className = "J_MIDDLEWARE_FRAME_WIDGET", document.body.appendChild(a), f.src = n, p.addEventListener("click", function () {
o.hide();
var e = document.createEvent("HTMLEvents");
e.initEvent("close", !1, !1), a.dispatchEvent(e)
}, !1), this.addEventListener = function () {
a.addEventListener.apply(a, arguments)
}, this.removeEventListener = function () {
a.removeEventListener.apply(a, arguments)
}, this.show = function () {
document.addEventListener("touchmove", r, !1), a.style.display = "block", window.scrollTo(0, 0)
}, this.hide = function () {
document.removeEventListener("touchmove", r), window.scrollTo(0, -s.top), a.parentNode && a.parentNode.removeChild(a)
}
}
if (!t || !t.mtop || t.mtop.ERROR) throw new Error("Mtop 初始化失败!");
var o = e.Promise,
i = t.mtop.CLASS,
a = t.mtop.config,
s = t.mtop.RESPONSE_TYPE;
t.mtop.middlewares.push(function (e) {
var r = this,
n = this.options,
o = this.params;
return e().then(function () {
var e = n.retJson,
i = e.ret,
u = navigator.userAgent.toLowerCase(),
c = u.indexOf("safari") > -1 && u.indexOf("chrome") < 0 && u.indexOf("qqbrowser") < 0;
if (i instanceof Array && (i = i.join(",")), (i.indexOf("SESSION_EXPIRED") > -1 || i.indexOf("SID_INVALID") > -1 || i.indexOf("AUTH_REJECT") > -1 || i.indexOf("NEED_LOGIN") > -1) && (e.retType = s.SESSION_EXPIRED, !n.WindVaneRequest && (!0 === a.LoginRequest || !0 === n.LoginRequest || !0 === o.needLogin))) {
if (!t.login) throw new Error("LOGIN_NOT_FOUND::缺少lib.login");
if (!0 !== n.safariGoLogin || !c || "taobao.com" === n.pageDomain) return t.login.goLoginAsync().then(function (e) {
return r.__sequence([r.__processToken, r.__processRequestUrl, r.__processUnitPrefix, r.middlewares, r.__processRequest])
}).catch(function (e) {
throw "CANCEL" === e ? new Error("LOGIN_CANCEL::用户取消登录") : new Error("LOGIN_FAILURE::用户登录失败")
});
t.login.goLogin()
}
})
}), t.mtop.loginRequest = function (e, t, r) {
var n = {
LoginRequest: !0,
H5Request: !0,
successCallback: t,
failureCallback: r || t
};
return new i(e).request(n)
}, t.mtop.antiFloodRequest = function (e, t, r) {
var n = {
AntiFlood: !0,
successCallback: t,
failureCallback: r || t
};
return new i(e).request(n)
}, t.mtop.middlewares.push(function (e) {
var t = this.options;
return this.params, !0 !== t.H5Request || !0 !== a.AntiFlood && !0 !== t.AntiFlood ? void e() : e().then(function () {
var e = t.retJson,
r = e.ret;
r instanceof Array && (r = r.join(",")), r.indexOf("FAIL_SYS_USER_VALIDATE") > -1 && e.data.url && (t.AntiFloodReferer ? location.href = e.data.url.replace(/(http_referer=).+/, "$1" + t.AntiFloodReferer) : location.href = e.data.url)
})
}), t.mtop.antiCreepRequest = function (e, t, r) {
var n = {
AntiCreep: !0,
successCallback: t,
failureCallback: r || t
};
return new i(e).request(n)
}, t.mtop.middlewares.push(function (t) {
var r = this,
i = this.options,
s = this.params;
return !1 !== i.AntiCreep && (i.AntiCreep = !0), !0 !== s.forceAntiCreep && !0 !== i.H5Request || !0 !== a.AntiCreep && !0 !== i.AntiCreep ? void t() : t().then(function () {
var t = i.retJson,
a = t.ret;
if (a instanceof Array && (a = a.join(",")), (a.indexOf("RGV587_ERROR::SM") > -1 || a.indexOf("ASSIST_FLAG") > -1) && t.data.url) {
var u = "_m_h5_smt",
c = function (e) {
var t = new RegExp("(?:^|;\\s*)" + u + "\\=([^;]+)(?:;\\s*|$)").exec(document.cookie);
return t ? t[1] : void 0
}(),
l = !1;
if (!0 === i.saveAntiCreepToken && c)
for (var p in c = JSON.parse(c)) s[p] && (l = !0);
if (!0 === i.saveAntiCreepToken && c && !l) {
for (var p in c) s[p] = c[p];
return r.__sequence([r.__processToken, r.__processRequestUrl, r.__processUnitPrefix, r.middlewares, r.__processRequest])
}
return new o(function (o, a) {
function c() {
p.removeEventListener("close", c), e.removeEventListener("message", l), a("USER_INPUT_CANCEL::用户取消输入")
}
function l(t) {
var n;
try {
n = JSON.parse(t.data) || {}
} catch (e) {}
if (n && "child" === n.type) {
var f;
p.removeEventListener("close", c), e.removeEventListener("message", l), p.hide();
try {
for (var d in "string" == typeof (f = JSON.parse(decodeURIComponent(n.content))) && (f = JSON.parse(f)), f) s[d] = f[d];
!0 === i.saveAntiCreepToken ? (document.cookie = u + "=" + JSON.stringify(f) + ";", e.location.reload()) : r.__sequence([r.__processToken, r.__processRequestUrl, r.__processUnitPrefix, r.middlewares, r.__processRequest]).then(o)
} catch (e) {
a("USER_INPUT_FAILURE::用户输入失败")
}
}
}
var p = new n("", t.data.url);
p.addEventListener("close", c, !1), e.addEventListener("message", l, !1), p.show()
})
}
})
})
}(window, window.lib || (window.lib = {}))
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}), t.default = {
log: function () {
var e;
return (e = console).log.apply(e, arguments)
},
warn: function () {
var e;
return (e = console).warn.apply(e, arguments)
},
error: function () {
var e;
return (e = console).error.apply(e, arguments)
}
}, e.exports = t.default
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var n = function (e) {
return e && e.__esModule ? e : {
default: e
}
}(r(6)),
o = "24770048";
function i(e, t, r) {
if (!(this instanceof i)) return new i(e, t, r);
this.api = e, this.version = t, this.mtopOptions = {}, this.data = {};
var a, s = {
locale: null != weex.config.env.aeLocale ? weex.config.env.aeLocale : "en_US",
currency: a = null != weex.config.env.aeCurrency ? weex.config.env.aeCurrency : "USD",
_currency: a,
platform: "app"
};
for (var u in r) this.data[u] = r[u];
this.data = Object.assign(this.data, s);
var c = {
prefix: "acs",
subDomain: "",
mainDomain: "aliexpress.com",
api: e,
v: t,
secType: 0,
dataType: "json",
appKey: o
};
n.default.isWeb && (window.lib.mtop.config.H5Request = !0, window.lib.mtop.config.mainDomain = "aliexpress.com", window.lib.mtop.config.subDomain = "", window.lib.mtop.config.prefix = "acs", this.mtopOptions.H5Request = "true"), this.mtopOptions = Object.assign(this.mtopOptions, c)
}
i.prototype.addMtee = function (e) {
this.mtopOptions.needMteeHeader = !0, e && (this.mtopOptions.asac = e)
}, i.prototype.request = function () {
var e = this,
t = void 0;
if (e.mtopOptions.data = e.data, n.default.isWeb) t = window.lib.mtop.request(e.mtopOptions);
else {
var o = r(9);
t = new Promise(function (t, r) {
o.request(e.mtopOptions, function (e) {
t(e)
}, function (e) {
r(e)
})
})
}
return t
}, t.default = i, e.exports = t.default
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var n = function () {
function e(e, t) {
for (var r = 0; r < t.length; r++) {
var n = t[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
}
}
return function (t, r, n) {
return r && e(t.prototype, r), n && e(t, n), t
}
}(),
o = function (e) {
return e && e.__esModule ? e : {
default: e
}
}(r(58)),
i = function () {
function e() {
! function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, e), this.parsed = o.default.parse(window.location.search.substr(1))
}
return n(e, [{
key: "getURLParameters",
value: function (e) {
return this.parsed[e]
}
}]), e
}();
t.default = new i, e.exports = t.default
}, function (e, t, r) {
"use strict";
t.decode = t.parse = r(59), t.encode = t.stringify = r(60)
}, function (e, t, r) {
"use strict";
function n(e, t) {
return Object.prototype.hasOwnProperty.call(e, t)
}
e.exports = function (e, t, r, i) {
t = t || "&", r = r || "=";
var a = {};
if ("string" != typeof e || 0 === e.length) return a;
var s = /\+/g;
e = e.split(t);
var u = 1e3;
i && "number" == typeof i.maxKeys && (u = i.maxKeys);
var c = e.length;
u > 0 && c > u && (c = u);
for (var l = 0; l < c; ++l) {
var p, f, d, h, m = e[l].replace(s, "%20"),
y = m.indexOf(r);
y >= 0 ? (p = m.substr(0, y), f = m.substr(y + 1)) : (p = m, f = ""), d = decodeURIComponent(p), h = decodeURIComponent(f), n(a, d) ? o(a[d]) ? a[d].push(h) : a[d] = [a[d], h] : a[d] = h
}
return a
};
var o = Array.isArray || function (e) {
return "[object Array]" === Object.prototype.toString.call(e)
}
}, function (e, t, r) {
"use strict";
var n = function (e) {
switch (typeof e) {
case "string":
return e;
case "boolean":
return e ? "true" : "false";
case "number":
return isFinite(e) ? e : "";
default:
return ""
}
};
e.exports = function (e, t, r, s) {
return t = t || "&", r = r || "=", null === e && (e = void 0), "object" == typeof e ? i(a(e), function (a) {
var s = encodeURIComponent(n(a)) + r;
return o(e[a]) ? i(e[a], function (e) {
return s + encodeURIComponent(n(e))
}).join(t) : s + encodeURIComponent(n(e[a]))
}).join(t) : s ? encodeURIComponent(n(s)) + r + encodeURIComponent(n(e)) : ""
};
var o = Array.isArray || function (e) {
return "[object Array]" === Object.prototype.toString.call(e)
};
function i(e, t) {
if (e.map) return e.map(t);
for (var r = [], n = 0; n < e.length; n++) r.push(t(e[n], n));
return r
}
var a = Object.keys || function (e) {
var t = [];
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.push(r);
return t
}
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}), t.default = {
dateFromServerDate: function (e) {
if ("string" == typeof e) {
var t = [e.slice(0, 4), e.slice(4, 6), e.slice(6, 8)].join("-"),
r = [e.slice(8, 10), e.slice(10, 12), [e.slice(12, 14), "000"].join(".")].join(":"),
n = e.slice(-5, -2);
return n = n + ":" + e.slice(-2), new Date(t + "T" + r + n)
}
},
localTimeFromDate: function (e) {
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : void 0;
if (e && e instanceof Date) {
var r = !0,
n = 2,
o = !0,
i = !0,
a = !0,
s = !0,
u = !1,
c = !0;
t && "string" == typeof t && (-1 !== t.indexOf("YYYY") ? (r = !0, n = 4) : -1 !== t.indexOf("YY") ? (r = !0, n = 2) : r = !1, o = -1 !== t.indexOf("MM"), i = -1 !== t.indexOf("DD"), a = -1 !== t.indexOf("HH"), s = -1 !== t.indexOf("mm"), u = -1 !== t.indexOf("ss"), c = -1 !== t.indexOf("Z"));
var l = {};
r && (l.year = 4 == n ? "numeric" : "2-digit"), o && (l.month = "2-digit"), i && (l.day = "2-digit"), a && (l.hour = "2-digit", l.hour12 = !1), s && (l.minute = "2-digit"), u && (l.second = "2-digit"), c && (l.timeZoneName = "short");
var p, f = "";
"undefined" != typeof weex && void 0 !== weex.config && void 0 !== weex.config.env && (weex.config.env.aeTimeZone && (l.timeZone = weex.config.env.aeTimeZone), p = weex.config.env.aeLocale ? (p = weex.config.env.aeLocale).replace("_", "-") : "en-US"), l.timeZone || (l.timeZone = "America/Los_Angeles", c || (f = " PT"));
var d = null;
return d = a || s || u ? e.toLocaleTimeString(p, l) : e.toLocaleDateString(p, l), f && (d += f), d
}
}
}, e.exports = t.default
}, function (e, t, r) {
"use strict";
e.exports.mdcard = r(63)
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var n = Object.assign || function (e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t];
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n])
}
return e
},
o = function () {
function e(e, t) {
for (var r = 0; r < t.length; r++) {
var n = t[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
}
}
return function (t, r, n) {
return r && e(t.prototype, r), n && e(t, n), t
}
}(),
i = r(0),
a = u(r(64)),
s = u(r(6));
function u(e) {
return e && e.__esModule ? e : {
default: e
}
}
var c = function (e) {
function t() {
return function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, t),
function (e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !t || "object" != typeof t && "function" != typeof t ? e : t
}(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments))
}
return function (e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
enumerable: !1,
writable: !0,
configurable: !0
}
}), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
}(t, i.Component), o(t, [{
key: "render",
value: function () {
return s.default.isWeb ? (0, i.createElement)("div", n({
style: a.default.mdcard
}, this.props)) : (0, i.createElement)("mdcard", this.props)
}
}]), t
}();
t.default = c, e.exports = t.default
}, function (e, t, r) {
e.exports = {
mdcard: {
backgroundColor: "rgb(255,255,255)",
borderRadius: "3px",
boxShadow: "1px 2px 2px #c4c4c4",
overflow: "hidden",
zIndex: 1
}
}
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var n = function (e) {
return e && e.__esModule ? e : {
default: e
}
}(r(6));
t.default = {
setTitle: function (e) {
n.default.isWeex && r(66).setTitle({
title: e
}, function () {}, function () {})
}
}, e.exports = t.default
}, function (t, r) {
t.exports = e("@weex-module/navigationBar")
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var n = function (e) {
return e && e.__esModule ? e : {
default: e
}
}(r(6));
t.default = {
getUserInfo: function (e) {
if (n.default.isWeb) {
var t = {
info: {
nick: "",
memberSeq: 0,
country: ""
},
isLogin: !1
},
o = r(22),
i = o.getXUserObj();
t.info.nick = i.firstName + " " + i.lastName, t.info.memberSeq = i.memberSeq, t.info.country = i.country, t.isLogin = o.isLoggedIn(), e && e(t)
} else r(13).getUserInfo(e)
},
login: function (e) {
n.default.isWeb ? window.seajs.iuse("ae-mobile/common/ms-man/xman.js")(function (t) {
t.asynRender({
defaultIndex: 0,
loginCallback: function () {
e(null, "success")
},
registerCallback: function () {
console.log("registerCallback")
}
})
}) : r(13).login(e)
}
}, e.exports = t.default
}, function (e, t, r) {
"use strict";
var n = decodeURIComponent,
o = encodeURIComponent;
function i(e) {
return "string" == typeof e
}
function a(e) {
return i(e) && "" !== e
}
function s(e) {
if (!a(e)) throw new TypeError("Cookie name must be a non-empty string")
}
function u(e) {
return e
}
var c = {
get: function (e, t) {
s(e), t = "function" == typeof t ? {
converter: t
} : t || {};
var r = function (e, t) {
var r = {};
if (i(e) && e.length > 0)
for (var o, a, s, c = t ? n : u, l = e.split(/;\s/g), p = 0, f = l.length; p < f; p++) {
if ((s = l[p].match(/([^=]+)=/i)) instanceof Array) try {
o = n(s[1]), a = c(l[p].substring(s[1].length + 1))
} catch (e) {} else o = n(l[p]), a = "";
o && (r[o] = a)
}
return r
}(document.cookie, !t.raw);
return (t.converter || u)(r[e])
},
set: function (e, t, r) {
s(e);
var n = (r = r || {}).expires,
i = r.domain,
u = r.path;
r.raw || (t = o(String(t)));
var c = e + "=" + t,
l = n;
return "number" == typeof l && (l = new Date).setDate(l.getDate() + n), l instanceof Date && (c += "; expires=" + l.toUTCString()), a(i) && (c += "; domain=" + i), a(u) && (c += "; path=" + u), r.secure && (c += "; secure"), document.cookie = c, c
},
remove: function (e, t) {
return (t = t || {}).expires = new Date(0), this.set(e, "", t)
}
};
e.exports = c
}, function (t, r) {
t.exports = e("@weex-module/appConfig")
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}), t.default = void 0;
var n, o = r(1),
i = [],
a = !1,
s = {
push: function (e, t) {
i.push({
message: e,
duration: t
}), this.show()
},
show: function () {
var e = this;
if (!i.length) return n && n.parentNode.removeChild(n), void(n = null);
if (!a) {
a = !0;
var t = i.shift();
! function (e) {
if (!n) {
for (var t in n = document.createElement("div"), u.container) n.style[t] = u.container[t];
document.body.appendChild(n)
}
n.style.transform = "translateX(-50%)", n.style.webkitTransform = "translateX(-50%)", n.innerHTML = e
}(t.message), setTimeout(function () {
n && setTimeout(function () {
n.style.transform = "translateX(-50%) scale(0.8)", n.style.webkitTransform = "translateX(-50%) scale(0.8)"
}, 0), a = !1, setTimeout(function () {
return e.show()
}, 600)
}, t.duration)
}
}
},
u = {
container: {
backgroundColor: "rgba(0, 0, 0, 0.6)",
boxSizing: "border-box",
maxWidth: "80%",
color: "#ffffff",
padding: "8px 16px",
position: "fixed",
left: "50%",
bottom: "50%",
fontSize: "16px",
lineHeight: "32px",
fontWeight: "600",
borderRadius: "4px",
textAlign: "center",
transition: "all 0.4s ease-in-out",
webkitTransition: "all 0.4s ease-in-out",
transform: "translateX(-50%)",
webkitTransform: "translateX(-50%)",
zIndex: 9999
}
},
c = {
SHORT: 2e3,
LONG: 3500,
show: function (e) {
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 2e3;
if (o.isWeex) {
var r = __weex_require__("@weex-module/modal");
r.toast && r.toast({
message: e,
duration: Number(t) / 1e3
})
} else s.push(e, t)
}
};
t.default = c, e.exports = t.default
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}), t.default = void 0;
var n = Object.assign || function (e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t];
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n])
}
return e
},
o = function () {
function e(e, t) {
for (var r = 0; r < t.length; r++) {
var n = t[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
}
}
return function (t, r, n) {
return r && e(t.prototype, r), n && e(t, n), t
}
}(),
i = p(r(17)),
a = r(0),
s = r(8),
u = p(r(7)),
c = p(r(14)),
l = p(r(72));
function p(e) {
return e && e.__esModule ? e : {
default: e
}
}
var f = function (e) {
function t(e) {
! function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, t);
var r = function (e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !t || "object" != typeof t && "function" != typeof t ? e : t
}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));
return r.showMoreDataClicked = !0, r.numOfItems4Row = 2, r.item = function (e, t) {
if (!e) return null;
if (e.c) return null;
var o = r.getData("selectedCat");
return (0, a.createElement)(l.default, {
idx: t,
data: e,
dataSpmC: "photo_" + o + "_rc",
utCtrlClick: r.props.utCtrlClick,
utExpose: function (e) {
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
o = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
r.props.utExpose && r.props.utExpose(e, n({
scene: "ImageSearch_rcmd"
}, t, o))
}
})
}, r.onShowMoreData = function (e) {
r.rc = 0, r.showMoreDataClicked = !0, r.props.onShowMoreData && r.props.onShowMoreData()
}, r.state = {}, r.rc = 0, r.headerText = "", r.loadData(e.currentItemlist), r
}
return function (e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
enumerable: !1,
writable: !0,
configurable: !0
}
}), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
}(t, i.default), o(t, [{
key: "loadData",
value: function () {
var e = this;
(0, s.tppRequest)({
appId: 668,
currentItemList: this.props.currentItemlist,
page: 1,
pageSize: 40,
scenario: "appImageSearchRecommend"
}, function (t) {
var r = t && t.data && t.data.result && t.data.result[0] && t.data.result[0].mods || [],
n = r && r.listItems || [],
o = r && r.rcmdTitle,
i = n.map(function (e) {
return {
auctionURL: e.productDetailUrl,
item_id: e.productId,
location: "",
pic_path: e.productImage,
price: e.minPrice,
sellerLoc: "",
title: e.productTitle,
icons: e.icons,
evaluation: e.evaluation,
trade: e.totalTranpro3 && e.totalTranpro3 + (0, c.default)("Recommend_Sold") || "",
trace: e.trace,
freightDTO: ""
}
});
i.length > 0 && (e.headerText = o.title, e.props.onDataDidLoad && e.props.onDataDidLoad(i))
}, function (e) {})
}
}, {
key: "footer",
value: function () {
return "success" !== this.props.getStatus() ? [] : (0, a.createElement)(u.default.Cell, {
style: {
width: 750,
height: 40,
backgroundColor: "#f2f2f2"
}
})
}
}, {
key: "key4Data",
value: function () {
return "recmdData"
}
}, {
key: "getData",
value: function (e) {
var r = function e(t, r, n) {
null === t && (t = Function.prototype);
var o = Object.getOwnPropertyDescriptor(t, r);
if (void 0 === o) {
var i = Object.getPrototypeOf(t);
return null === i ? void 0 : e(i, r, n)
}
if ("value" in o) return o.value;
var a = o.get;
return void 0 !== a ? a.call(n) : void 0
}(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "getData", this).call(this, e),
n = 0;
return this.props.getRc && (n = this.props.getRc()), this.rc = n, r
}
}, {
key: "style4row",
value: function () {
return {
width: 750,
padding: 8,
paddingTop: 0
}
}
}]), t
}();
t.default = f, e.exports = t.default
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var n = function () {
function e(e, t) {
for (var r = 0; r < t.length; r++) {
var n = t[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
}
}
return function (t, r, n) {
return r && e(t.prototype, r), n && e(t, n), t
}
}(),
o = r(0),
i = c(r(2)),
a = c(r(23)),
s = c(r(5)),
u = c(r(4));
function c(e) {
return e && e.__esModule ? e : {
default: e
}
}
var l = {
container: {
width: 363,
borderRadius: 16,
backgroundColor: "#FFF",
overflow: "hidden"
},
item: {
flex: 1
},
itemImage: {
width: 363,
height: 363
},
itemInfo: {
padding: 16,
paddingTop: 8
},
itemTitle: {
width: 331,
height: 30,
fontSize: 20,
lineHeight: 30,
color: "#666",
fontFamily: "OpenSans",
textOverflow: "ellipsis"
},
priceWrap: {
width: 331,
height: 42,
marginTop: 4,
flexDirection: "row",
alignItems: "center",
overflow: "hidden"
},
itemPrice: {
height: 42,
fontSize: 28,
lineHeight: 42,
color: "#000",
fontFamily: "OpenSans-Bold",
fontWeight: 700
},
salesWrap: {
width: 331,
height: 30,
flexDirection: "row",
alignItems: "center",
overflow: "hidden"
},
starWrap: {
height: 30,
flexDirection: "row",
alignItems: "center"
},
starIcon: {
width: 24,
height: 24
},
delimiterIcon: {
width: "1px",
height: 24,
backgroundColor: "#ccc",
marginLeft: 16,
marginRight: 16
},
itemSales: {
height: 30,
fontSize: 20,
lineHeight: 30,
color: "#999",
fontFamily: "OpenSans"
}
},
p = "rtl" === (r(3).isWeex ? weex.config.env.aeDirection : "ltr"),
f = function (e) {
function t(e) {
! function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, t);
var r = function (e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !t || "object" != typeof t && "function" != typeof t ? e : t
}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));
return r.onAppear = function () {
if (!r.hasExposed) {
r.hasExposed = !0;
var e = r.props,
t = e.data,
n = e.idx,
o = e.utExpose,
i = t || {},
a = i.item_id,
s = i.trace,
u = s && "string" == typeof s ? JSON.parse(s).all : {};
o && "function" == typeof o && o("", {
prod: a,
rid: "",
times: 1,
listno: n,
spmc: "recmd"
}, {
itemAlgInfo: u.itemAlgInfo || "",
"scm-cnt": u["scm-cnt"] || ""
})
}
}, r.utCtrlClick = function () {
var e = r.props,
t = e.data,
n = e.dataSpmC,
o = e.idx,
i = e.utCtrlClick,
a = (t || {}).item_id;
return i && "function" == typeof i && i("ListItem-ProductList", {
productId: a,
dataSpmC: n,
listno: o
}), !0
}, r.getDetailUrl = function () {
var e = r.props,
t = e.data,
n = e.dataSpmC,
o = e.idx,
i = t.auctionURL;
return i + (i.indexOf("?") >= 0 ? "&" : "?") + "spm=a1z65.productlist." + n + "." + o
}, r.state = {}, r.hasExposed = !1, r
}
return function (e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
enumerable: !1,
writable: !0,
configurable: !0
}
}), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
}(t, o.Component), n(t, [{
key: "renderSales",
value: function () {
var e = this.props.data,
t = e.evaluation,
r = e.trade,
n = p ? {
marginLeft: 6
} : {
marginRight: 6
};
return (0, o.createElement)(i.default, {
style: l.salesWrap
}, t && t.starRating ? (0, o.createElement)(i.default, {
style: l.starWrap
}, (0, o.createElement)(s.default, {
style: [l.starIcon, n],
source: {
uri: "//ae01.alicdn.com/kf/H282dcf7380ed4faea8cd91f60d4b2c0fk.png"
},
resizeMode: "stretch"
}), (0, o.createElement)(u.default, {
style: l.itemSales
}, t.starRating), (0, o.createElement)(i.default, {
style: l.delimiterIcon
})) : null, (0, o.createElement)(u.default, {
style: l.itemSales,
numberOfLines: 1
}, r))
}
}, {
key: "renderPromotionTag",
value: function (e) {
if (!e || !e.length) return null;
var t = e.find(function (e) {
return "big_sale" === e.iconType
});
if (!t || !t.tagContent) return null;
var r = t.tagContent,
n = r.tagImgUrl,
a = r.tagImgHeight,
u = r.tagImgWidth,
c = {
width: u && a ? 30 * Number(u) / Number(a) : 92,
height: 30
},
l = p ? {
marginLeft: 8
} : {
marginRight: 8
};
return (0, o.createElement)(i.default, {
style: l
}, (0, o.createElement)(s.default, {
style: c,
source: {
uri: n
},
resizeMode: "stretch"
}))
}
}, {
key: "renderPrice",
value: function () {
var e = this.props.data,
t = e.price,
r = e.icons;
return t ? (0, o.createElement)(i.default, {
style: l.priceWrap
}, this.renderPromotionTag(r), (0, o.createElement)(u.default, {
style: l.itemPrice
}, t)) : null
}
}, {
key: "render",
value: function () {
var e = this.props.data,
t = e.pic_path,
r = e.title,
n = this.getDetailUrl();
return (0, o.createElement)(i.default, {
style: l.container,
onAppear: this.onAppear
}, (0, o.createElement)(a.default, {
href: n,
onClick: this.utCtrlClick
}, (0, o.createElement)(i.default, {
style: l.item
}, (0, o.createElement)(s.default, {
style: l.itemImage,
source: {
uri: t
},
resizeMode: "cover"
}), (0, o.createElement)(i.default, {
style: l.itemInfo
}, (0, o.createElement)(u.default, {
style: l.itemTitle,
numberOfLines: 1
}, r), this.renderPrice(), this.renderSales()))))
}
}]), t
}();
t.default = f, e.exports = t.default
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}), t.default = void 0;
var n = Object.assign || function (e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t];
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n])
}
return e
},
o = function () {
function e(e, t) {
for (var r = 0; r < t.length; r++) {
var n = t[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
}
}
return function (t, r, n) {
return r && e(t.prototype, r), n && e(t, n), t
}
}(),
i = r(3),
a = r(8);
! function (e) {
e && e.__esModule
}(r(21));
var s = 0,
u = function () {
function e() {
! function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, e)
}
return o(e, [{
key: "parsePictPp",
value: function (e, t) {
var r = e.pict_pp || {},
n = e.region || {
posBottomRightX: 100,
posBottomRightY: 100,
posTopLeftX: 10,
posTopLeftY: 10
};
return r.category = e.categorys.map(function (e) {
return e.id = "" + e.id, e
}), r.region = n.posTopLeftX + "," + n.posBottomRightX + "," + n.posTopLeftY + "," + n.posBottomRightY, r
}
}, {
key: "parseData",
value: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
t = arguments[1];
return {
sortBy: e.sortBy,
btsInfo: e.btsInfo,
pict_pp: this.parsePictPp(e, t),
RN: e.RN,
similarData: (e.items || []).map(function (t) {
return {
btsInfo: e.btsInfo,
auctionURL: "https://m.aliexpress.com/item/" + t.productId + ".html",
item_id: t.productId,
location: "",
pic_path: t.imgUrl,
price: t.marketingPrice.appPrice.price,
sellerLoc: "",
title: t.subject || "",
promotionTag: t.promotionTag,
evaluation: t.evaluation,
trade: t.trade,
freightDTO: t.freightDTO
}
})
}
}
}, {
key: "request",
value: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
t = this,
r = arguments[1],
o = arguments[2],
u = (e.extraParams, function (e, t) {
var r = {};
for (var n in e) t.indexOf(n) >= 0 || Object.prototype.hasOwnProperty.call(e, n) && (r[n] = e[n]);
return r
}(e, ["extraParams"])),
c = n({
n: 60,
maxn: 60
}, u);
if (c.region) {
var l = c.region.split(",");
c = n({}, c, {
posTopLeftX: parseInt(l[0]),
posBottomRightX: parseInt(l[1]),
posTopLeftY: parseInt(l[2]),
posBottomRightY: parseInt(l[3])
})
}
c.cat && (c.category = c.cat);
var p = ++s;
c.file = c.searchimg, c.shpt_co = i.isWeex ? weex.config.env.aeCountry : "US", (0, a.mtopRequest)({
api: "search.imageSearch",
v: "101",
ecode: 0,
appKey: 24815441,
data: c
}, function (e) {
if (p === s) {
var n = t.parseData(e.data, c);
r && r(n)
}
}, function (e) {
p === s && o && o(e)
})
}
}]), e
}();
t.default = u, e.exports = t.default
}, function (e, t, r) {
"use strict";
e.exports = r(75)
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var n = Object.assign || function (e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t];
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n])
}
return e
},
o = function (e) {
return e && e.__esModule ? e : {
default: e
}
}(r(76)),
i = r(18);
t.default = n({}, o.default, i), e.exports = t.default
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var n = r(77),
o = {
record: function (e, t, r, o) {
n.aplus_universal.record(e, t, r, o)
},
launch: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : n.aplus_universal.getPageSPM(),
t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
n.aplus_universal.setPageSPM(e[0], e[1]), n.aplus_universal.enter({
pageName: t.name,
pageUrl: t.url,
spmUrl: t["spm-url"],
referrer: t.referrer
}, t)
},
updateNextProps: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
n.aplus_universal.updateNextPageProperties(e)
},
updatePageUtparam: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
n.aplus_universal.updatePageUtparam(e)
},
updateNextPageUtparam: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
n.aplus_universal.updateNextPageUtparam(e)
}
};
o.sendPV = o.launch, t.default = o, e.exports = t.default
}, function (e, t, r) {
"use strict";
t.aplus_universal = r(78), t.AplusWeb = r(24), t.AplusWeex = r(25), t.AplusWindmill = r(28), t.AplusWindmillAlipay = r(29)
}, function (e, t, r) {
"use strict";
(function (t) {
var n, o, i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
return typeof e
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
},
a = r(1),
s = a.isWeex,
u = a.isWeb,
c = a.isNode,
l = "object" === ("undefined" == typeof my ? "undefined" : i(my)),
p = {
AplusWeb: r(24),
AplusWeex: r(25),
AplusWindmill: r(28),
AplusWindmillAlipay: r(29),
Common: r(11)
};
if (s) n = "AplusWeex";
else if (l) n = function () {
try {
var e = navigator.userAgent;
return /AlipayClient/.test(e) || /micromessenger/.test(e)
} catch (e) {}
}() ? "AplusWindmillAlipay" : "AplusWindmill";
else if (u) n = "AplusWeb";
else if (c) {
n = "Common";
try {
t.window = {}
} catch (e) {}
}
try {
var f = p[n];
o = f.default ? f.default.create() : f.create()
} catch (e) {
console && console.log(e), o = {}
}
e.exports = o
}).call(this, r(79))
}, function (e, t) {
var r;
r = function () {
return this
}();
try {
r = r || new Function("return this")()
} catch (e) {
"object" == typeof window && (r = window)
}
e.exports = r
}, function (e, t, r) {
"use strict";
function n() {}
n.prototype.extend = function () {}, n.prototype.create = function () {}, n.extend = function (e) {
return this.prototype.extend.call(this, e)
}, n.prototype.create = function (e) {
var t = new this;
for (var r in e) t[r] = e[r];
return t
}, n.prototype.extend = function (e) {
var t = function () {};
try {
for (var r in "function" != typeof Object.create && (Object.create = function (e) {
function t() {}
return t.prototype = e, new t
}), t.prototype = Object.create(this.prototype), e) t.prototype[r] = e[r];
t.prototype.constructor = t, t.extend = t.prototype.extend, t.create = t.prototype.create
} catch (e) {
t = function () {}
}
return t
}, e.exports = n
}, function (e, t, r) {
"use strict";
t.get = function (e, t, r) {
my.httpRequest({
url: e,
method: "GET",
dataType: t && t.dataType ? t.dataType : "text",
timeout: t && t.timeout ? t.timeout : 5e3,
success: function (e) {
r(e)
},
fail: function (e) {
r(e)
}
})
}, t.sendBeacon = function (e, t) {
for (var r in t) "cna" !== r && (t[r] = encodeURIComponent(t[r]));
return navigator.sendBeacon(e, JSON.stringify(t)), e
}
}, function (e, t, r) {
"use strict";
var n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
return typeof e
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
},
o = r(11),
i = r(10),
a = i.paramsToObj,
s = i.objToParams,
u = i.getParamFromURL,
c = i.simplifyURL,
l = i.getAplusUniversalVersion,
p = i.getLocation,
f = {
alipay: "my",
TB: "tb",
Weixin: "wx"
};
var d = o.extend({
create: function (e) {
var t = new this;
for (var r in e) t[r] = e[r];
try {
t._meta_info = Object.assign({
"aplus-rhost-v": "log.mmstat.com",
"aplus-rhost-g": "wgo.mmstat.com",
"aplus-channel": "GET"
}, t._meta_info)
} catch (e) {
console && console.log(e)
}
return t
},
setPageSPM: function (e, t, r) {
if (e && t) {
var n = [];
n.push(e), n.push(t), this.spmAB = n, this.pageName = "", this.pvid = function (e) {
var t, r = "",
n = !1;
function o(e) {
return 1 === e ? "0123456789abcdefhijklmnopqrstuvwxyzABCDEFHIJKLMNOPQRSTUVWXYZ".substr(Math.floor(60 * Math.random()), 1) : 2 === e ? "0123456789abcdefghijkmnopqrstuvwxyzABCDEFGHIJKMNOPQRSTUVWXYZ".substr(Math.floor(60 * Math.random()), 1) : "0"
}
for (; r.length < 14;) t = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".substr(Math.floor(62 * Math.random()), 1), !n && r.length <= 2 && ("g" === t.toLowerCase() || "l" === t.toLowerCase()) && (0 === r.length && "g" === t.toLowerCase() ? Math.random() < .5 && (t = o(1), n = !0) : 1 === r.length && "l" === t.toLowerCase() && "g" === r.charAt(0).toLowerCase() && (t = o(2), n = !0)), r += t;
return r
}()
}
"function" == typeof r && r()
},
_updateNextPageSpm: function (e) {
e && (this.spmPre = this.spmUrl, this.spmUrl = e["spm-url"] || e.spmUrl)
},
getPageSPM: function () {
return this.spmAB
},
getPageSPMStr: function () {
return this.spmAB.join(".")
},
_getRecordParams: function (e, t, r) {
var n = p(),
o = "string" == typeof t ? a(t) : t,
c = o.url || n.currentpagename || n.href || "";
return this.spmUrl || (this.spmUrl = u(c, "spm") || ""), this.spmPre || (this.spmPre = u(o.referrer, "spm") || ""), o = Object.assign({}, o, {
pc_i: o.pc_i || r,
ps_i: o.ps_i || "",
pu_i: o.pu_i || "",
_p_url: o.url || n.currentpagename || n.href || "",
_p_ref: o.pre || "",
"spm-cnt": this.getPageSPMStr() + ".0.0." + this.pvid,
"spm-url": this.spmUrl,
"spm-pre": this.spmPre,
jsver: "aplus_universal",
lver: l(),
windmill: "1",
cache: i.makeCacheNum()
}), {
logtype: "2",
cna: r,
gokey: encodeURIComponent(s(o, !0)),
gmkey: e
}
},
_addDetailParam: function (e) {
return e.itemId ? {
_p_typ: "pdp",
_p_item: e.itemId,
_p_ispdp: "1"
} : {}
},
_initPageSpmParams: function (e, t) {
var r = e.pageId ? "/" + e.pageId : "",
n = this.getPageSPMStr() + "" + r + ".0.0." + this.pvid,
o = e.spmUrl || e["spm-url"] || u(t.url, "spm") || this.spmUrl || "",
i = e.spmPre || e["spm-pre"] || u(e.referrer, "spm") || this.spmPre || "",
a = p(),
s = e.pageName || a.currentpagename || c(t.url) || "";
return this.spmUrl = o, this.spmPre = i, this.pageName = s, {
pageName: s,
spmCnt: n,
spmUrl: o,
spmPre: i
}
},
_addSellerParam: function (e) {
return e.sellerId ? {
_p_typ: e.itemId ? "pdp" : "slr",
_p_slr: e.sellerId,
_p_isdpp: "1"
} : {}
},
_appendParamsIntoArray: function (e, t) {
return e && t && Object.keys(t).forEach(function (r) {
e.push([r, t[r]])
}), e
},
_appendUserParams: function (e, t) {
return ["pc_i", "ps_i", "pu_i"].forEach(function (r) {
t[r] && e.push([r, t[r]])
}), e
},
_getSystemInfo: function (e) {
var t = this,
r = {},
n = t.SYSTEM_INFO || {};
if (n && n.version) e(t.SYSTEM_INFO);
else try {
my.getSystemInfo({
complete: function (n) {
n && n.version ? (t.SYSTEM_INFO = n, e(n)) : e(r)
}
})
} catch (t) {
e(r)
}
},
_getEnterParams: function (e, t, r) {
e || (e = {}), t || (t = {});
var n = this._initPageSpmParams(e, t),
o = [
["logtype", "1"],
["title", encodeURIComponent(n.pageName)],
["cna", t.cna || ""]
],
a = this;
a._getSystemInfo(function (s) {
var u = [
["_p_url", e.pageUrl],
["_p_ref", e.referrer || ""],
["_p_os", function (e) {
var t = "";
return e && (t = {
iphone: "ios",
ipad: "ios",
ios: "ios",
android: "andr",
yunos: "yun",
wp: "wp",
linux: "linux",
unix: "unix",
macos: "mac",
windows: "win"
} [e.toLowerCase()] || ""), t
}(s.platform) || ""],
["_p_scr", s.screenWidth + "x" + s.screenHeight],
["_p_pf", function (e) {
var t = f[s ? s.app : ""] || "";
if (!t) {
var r = navigator.userAgent;
/alipay/i.test(r) ? t = "my" : /AliApp\(TB/i.test(r) ? t = "tb" : /micromessenger/.test(r) && (t = "wx")
}
return t
}()],
["spm-cnt", n.spmCnt],
["spm-url", n.spmUrl],
["spm-pre", n.spmPre]
];
if (u["spm-url"] && (a.spmUrl = u["spm-url"]), u["spm-pre"] && (a.spmPre = u["spm-pre"]), u = a._appendParamsIntoArray(u, a._addDetailParam(t)), u = a._appendParamsIntoArray(u, a._addSellerParam(t)), u = a._appendUserParams(u, t), u = a._appendParamsIntoArray(u, {
jsver: "aplus_universal",
lver: l(),
windmill: "1",
cache: i.makeCacheNum()
}), "function" == typeof r) {
var c = {
pageName: n.pageName,
preParams: o,
endParams: u
};
r(c)
}
})
},
setMetaInfo: function (e, t) {
switch (e) {
case "aplus-rhost-v":
case "aplus-rhost-g":
if (i.hostValidity(t)) {
var r = 0 !== t.indexOf("//") ? "https://" + t : "https:" + t;
this._meta_info[e] = r
} else this.catchException("sorry, metaValue of " + t + " is not legality!");
break;
case "aplus-exdata":
case "aplus-cpvdata":
"object" === (void 0 === t ? "undefined" : n(t)) ? this._meta_info[e] = t: this.catchException("sorry, type of " + t + " must be object!");
break;
case "aplus-channel":
this._meta_info[e] = t;
break;
default:
this.catchException("sorry, aplus do not support the metaKey of " + e)
}
},
appendMetaInfo: function (e, t) {
switch (e) {
case "aplus-exdata":
case "aplus-cpvdata":
if ("object" === (void 0 === t ? "undefined" : n(t))) {
var r = this._meta_info[e];
this._meta_info[e] = Object.assign(r, t)
} else this.catchException("sorry, type of " + t + " must be object!");
break;
default:
this.setMetaInfo(e, t)
}
},
getMetaInfo: function (e) {
return this._meta_info[e]
}
});
e.exports = d
}, function (e, t, r) {
"use strict";
e.exports = r(84)
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
return typeof e
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
},
o = r(1),
i = {
isIphoneXSeries: !1,
isIphoneX: !1,
statusBarHeight: 0,
navBarHeight: 0,
bottomBarHeight: 0
},
a = "object" === ("undefined" == typeof WXEnvironment ? "undefined" : n(WXEnvironment)) ? WXEnvironment : {},
s = void 0 !== n(window.__weex_config__) ? window.__weex_config__ && window.__weex_config__.weex && window.__weex_config__.weex.config : {},
u = o.isWeex && "object" === ("undefined" == typeof weex ? "undefined" : n(weex)) && "windmill" === weex.config.container || !1,
c = a && "iOS" == a.platform;
if (c) 2436 != a.deviceHeight && 2688 != a.deviceHeight && 1792 != a.deviceHeight && 1624 != a.deviceHeight || (i.isIphoneXSeries = !0), i.isIphoneXSeries && 2436 == a.deviceHeight && (i.isIphoneX = !0);
else if (o.isWeb) {
var l;
(l = window && window.screen && window.screen.width && window.screen.height && (375 == parseInt(window.screen.width, 10) && 812 == parseInt(window.screen.height, 10) || 414 == parseInt(window.screen.width, 10) && 896 == parseInt(window.screen.height, 10))) && (i.isIphoneXSeries = !0, i.bottomBarHeight = 68), i.isIphoneX = l && 375 == parseInt(window.screen.width, 10) && 812 == parseInt(window.screen.height, 10)
}
if (o.isWeex) {
if (c) try {
i.navBarHeight = 44 * a.scale * 750 / a.deviceWidth, i.statusBarHeight = 20 * a.scale * 750 / a.deviceWidth, i.isIphoneXSeries && (i.statusBarHeight = 44 * a.scale * 750 / a.deviceWidth, i.bottomBarHeight = 34 * a.scale * 750 / a.deviceWidth)
} catch (e) {
console.log(e)
} else if (i.navBarHeight = 96, i.statusBarHeight = 0, s && s.env && s.env.statusbarHeight && (i.statusBarHeight = 750 * s.env.statusbarHeight / a.deviceWidth || 0), u && s && s.env) {
var p = s.env.androidStatusBarHeight;
p && parseInt(p, 10) ? i.statusBarHeight = 750 * parseInt(p, 10) / a.deviceWidth || 0 : i.statusBarHeight = 50
}
} else i.navBarHeight = 0, i.statusBarHeight = 0;
t.default = i, e.exports = t.default
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}), t.loadFinished = function (e) {
a("loadFinished", e)
}, t.initSearchParams = function (e) {
a("initSearchParams", {}, e)
}, t.updateContext = function (e) {
a("updateContext", e)
}, t.scrollTo = function (e) {
a("scrollTo", {
position: e
})
}, t.scrollContentTo = function (e) {
a("scrollContentTo", {
position: e
})
}, t.updateTopbarStyle = function (e) {
a("updateTopbarStyle", {
style: e
})
}, t.stickyToTop = function (e) {
a("stickyToTop", {
sticky: e
})
}, t.backHandled = function (e) {
a("backHandled", {
status: e
})
}, t.addEventListener = function (e, t) {
if (n.isWeex) {
var o = r(30);
o && o.addEventListener && o.addEventListener(e, t)
} else document.addEventListener(e, function (e) {
e && e.param && t && t(e.param)
})
}, t.removeEventLister = function (e) {
if (n.isWeex) {
var t = r(30);
t && t.removeEventLister && t.removeEventLister(e)
} else document.removeEventListener(e)
}, t.contentReachTop = function (e) {
n.isWeex || i && a("contentReachTop", {
status: e
})
}, t.utCtrlClick = function (e, t, r) {
a("utCtrlClick", {
Page: "ProductList",
Ctrl: e,
Args: t || {}
})
}, t.utExpose = function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
t = e.ctrl,
r = void 0 === t ? "Product_Exposure_Event" : t,
n = function (e, t) {
var r = {};
for (var n in e) t.indexOf(n) >= 0 || Object.prototype.hasOwnProperty.call(e, n) && (r[n] = e[n]);
return r
}(e, ["ctrl"]);
a("utCtrlEvent", {
Page: "ProductList",
id: "2201",
Ctrl: r || "Product_Exposure_Event",
Args: n || {}
})
};
var n = r(3),
o = function (e) {
return e && e.__esModule ? e : {
default: e
}
}(r(86)),
i = /Android/i.test(window.navigator.userAgent);
function a(e, t, i, a) {
n.isWeex ? function (e, t) {
var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : function () {},
o = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : function () {};
try {
var i = r(88),
a = i && i[e];
if (!a) return void o();
a(t, n, o)
} catch (e) {
o()
}
}(e, t, i, a) : function (e, t) {
var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : function () {},
n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : function () {};
o.default.call("TBSImageSearchBridge", e, t, r, n)
}(e, t, i, a)
}
}, function (e, t, r) {
"use strict";
e.exports = r(87)
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var n = r(1),
o = {
call: function (e, t, i, a, s) {
if (n.isWeex) {
var u = void 0;
try {
u = r(12)
} catch (e) {}
u && u.call ? u.call({
class: e,
method: t,
data: i
}, a) : s && s({
msg: "浏览器不支持 windvane",
ret: ["HY_NOT_SUPPORT_DEVICE"]
})
} else "undefined" != typeof WindVane && WindVane.isAvailable ? (o.isAvailable = WindVane.isAvailable, WindVane.call(e, t, i, a, s)) : s && s({
msg: "浏览器不支持 windvane",
ret: ["HY_NOT_SUPPORT_DEVICE"]
})
},
call2: function (e, t, i, a) {
if (n.isWeex) {
var s = void 0;
try {
s = r(12)
} catch (e) {}
s && s.call2 ? s.call2(e, t, i, a) : a && a({
msg: "浏览器不支持 windvane",
ret: ["HY_NOT_SUPPORT_DEVICE"]
})
} else if ("undefined" != typeof WindVane && WindVane.isAvailable)
if (o.isAvailable = WindVane.isAvailable, WindVane && WindVane.call2) WindVane.call2(e, t, i, a);
else {
var u = e.split(".");
WindVane.call(u[0], u[1], t, i, a)
}
else a && a({
msg: "浏览器不支持 windvane",
ret: ["HY_NOT_SUPPORT_DEVICE"]
})
}
};
t.default = o, e.exports = t.default
}, function (t, r) {
t.exports = e("@weex-module/TBSImageSearchModule")
}, function (e, t, r) {
"use strict";
e.exports = r(90)
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}), t.default = void 0;
var n = function () {
function e(e, t) {
for (var r = 0; r < t.length; r++) {
var n = t[r];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
}
}
return function (t, r, n) {
return r && e(t.prototype, r), n && e(t, n), t
}
}(),
o = c(r(91)),
i = c(r(92)),
a = c(r(93)),
s = r(94),
u = c(r(95));
function c(e) {
return e && e.__esModule ? e : {
default: e
}
}
var l = function (e) {
function t(e) {
! function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, t);
var r = function (e, t) {
if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !t || "object" != typeof t && "function" != typeof t ? e : t
}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));
return r.cfg = null, r.cfg = (0, u.default)({
easing: "linear",
duration: 1 / 0
}, e), r
}
return function (e, t) {
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);
e.prototype = Object.create(t && t.prototype, {
constructor: {
value: e,
enumerable: !1,
writable: !0,
configurable: !0
}
}), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
}(t, o.default), n(t, [{
key: "run",
value: function () {
var e = this.cfg.duration;
if (e <= 1 && (this.isfinished = !0, this.emit("run", {
percent: 1
}), this.emit("end", {
percent: 1
})), !this.isfinished) {
this._hasFinishedPercent = this._stop && this._stop.percent || 0, this._stop = null, this.start = Date.now(), this.percent = 0, this.emit("start", {
percent: 0
});
var t = 1e3 / 60 / e / 4,
r = this.cfg.bezierArgs;
this.easingFn = r && 4 === r.length ? (0, a.default)(r[0], r[1], r[2], r[3], t) : i.default[this.cfg.easing], this._run()
}
}
}, {
key: "_run",
value: function () {
var e = this;
(0, s.cancelRAF)(this._raf), this._raf = (0, s.raf)(function () {
if (e.now = Date.now(), e.t = e.now - e.start, e.duration = e.now - e.start >= e.cfg.duration ? e.cfg.duration : e.now - e.start, e.progress = e.easingFn(e.duration / e.cfg.duration), e.percent = e.duration / e.cfg.duration + e._hasFinishedPercent, e.percent >= 1 || e._stop) {
e.percent = e._stop && e._stop.percent ? e._stop.percent : 1, e.duration = e._stop && e._stop.duration ? e._stop.duration : e.duration;
var t = {
percent: e.percent,
t: e.t
};
return e.emit("run", {
percent: e.progress,
originPercent: e.percent,
t: e.t
}), e.emit("stop", t), void(e.percent >= 1 && (e.isfinished = !0, e.emit("end", {
percent: 1,
t: e.t
})))
}
e.emit("run", {
percent: e.progress,
originPercent: e.percent,
t: e.t
}), e._run()
})
}
}, {
key: "stop",
value: function () {
this._stop = {
percent: this.percent,
now: this.now
}, (0, s.cancelRAF)(this._raf)
}
}]), t
}();
t.default = l, e.exports = t.default
}, function (e, t, r) {
"use strict";
var n, o = "object" == typeof Reflect ? Reflect : null,
i = o && "function" == typeof o.apply ? o.apply : function (e, t, r) {
return Function.prototype.apply.call(e, t, r)
};
n = o && "function" == typeof o.ownKeys ? o.ownKeys : Object.getOwnPropertySymbols ? function (e) {
return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))
} : function (e) {
return Object.getOwnPropertyNames(e)
};
var a = Number.isNaN || function (e) {
return e != e
};
function s() {
s.init.call(this)
}
e.exports = s, s.EventEmitter = s, s.prototype._events = void 0, s.prototype._eventsCount = 0, s.prototype._maxListeners = void 0;
var u = 10;
function c(e) {
return void 0 === e._maxListeners ? s.defaultMaxListeners : e._maxListeners
}
function l(e, t, r, n) {
var o, i, a;
if ("function" != typeof r) throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof r);
if (void 0 === (i = e._events) ? (i = e._events = Object.create(null), e._eventsCount = 0) : (void 0 !== i.newListener && (e.emit("newListener", t, r.listener ? r.listener : r), i = e._events), a = i[t]), void 0 === a) a = i[t] = r, ++e._eventsCount;
else if ("function" == typeof a ? a = i[t] = n ? [r, a] : [a, r] : n ? a.unshift(r) : a.push(r), (o = c(e)) > 0 && a.length > o && !a.warned) {
a.warned = !0;
var s = new Error("Possible EventEmitter memory leak detected. " + a.length + " " + String(t) + " listeners added. Use emitter.setMaxListeners() to increase limit");
s.name = "MaxListenersExceededWarning", s.emitter = e, s.type = t, s.count = a.length,
function (e) {
console && console.warn && console.warn(e)
}(s)
}
return e
}
function p(e, t, r) {
var n = {
fired: !1,
wrapFn: void 0,
target: e,
type: t,
listener: r
},
o = function () {
for (var e = [], t = 0; t < arguments.length; t++) e.push(arguments[t]);
this.fired || (this.target.removeListener(this.type, this.wrapFn), this.fired = !0, i(this.listener, this.target, e))
}.bind(n);
return o.listener = r, n.wrapFn = o, o
}
function f(e, t, r) {
var n = e._events;
if (void 0 === n) return [];
var o = n[t];
return void 0 === o ? [] : "function" == typeof o ? r ? [o.listener || o] : [o] : r ? function (e) {
for (var t = new Array(e.length), r = 0; r < t.length; ++r) t[r] = e[r].listener || e[r];
return t
}(o) : h(o, o.length)
}
function d(e) {
var t = this._events;
if (void 0 !== t) {
var r = t[e];
if ("function" == typeof r) return 1;
if (void 0 !== r) return r.length
}
return 0
}
function h(e, t) {
for (var r = new Array(t), n = 0; n < t; ++n) r[n] = e[n];
return r
}
Object.defineProperty(s, "defaultMaxListeners", {
enumerable: !0,
get: function () {
return u
},
set: function (e) {
if ("number" != typeof e || e < 0 || a(e)) throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + e + ".");
u = e
}
}), s.init = function () {
void 0 !== this._events && this._events !== Object.getPrototypeOf(this)._events || (this._events = Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0
}, s.prototype.setMaxListeners = function (e) {
if ("number" != typeof e || e < 0 || a(e)) throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
return this._maxListeners = e, this
}, s.prototype.getMaxListeners = function () {
return c(this)
}, s.prototype.emit = function (e) {
for (var t = [], r = 1; r < arguments.length; r++) t.push(arguments[r]);
var n = "error" === e,
o = this._events;
if (void 0 !== o) n = n && void 0 === o.error;
else if (!n) return !1;
if (n) {
var a;
if (t.length > 0 && (a = t[0]), a instanceof Error) throw a;
var s = new Error("Unhandled error." + (a ? " (" + a.message + ")" : ""));
throw s.context = a, s
}
var u = o[e];
if (void 0 === u) return !1;
if ("function" == typeof u) i(u, this, t);
else {
var c = u.length,
l = h(u, c);
for (r = 0; r < c; ++r) i(l[r], this, t)
}
return !0
}, s.prototype.addListener = function (e, t) {
return l(this, e, t, !1)
}, s.prototype.on = s.prototype.addListener, s.prototype.prependListener = function (e, t) {
return l(this, e, t, !0)
}, s.prototype.once = function (e, t) {
if ("function" != typeof t) throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t);
return this.on(e, p(this, e, t)), this
}, s.prototype.prependOnceListener = function (e, t) {
if ("function" != typeof t) throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t);
return this.prependListener(e, p(this, e, t)), this
}, s.prototype.removeListener = function (e, t) {
var r, n, o, i, a;
if ("function" != typeof t) throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t);
if (void 0 === (n = this._events)) return this;
if (void 0 === (r = n[e])) return this;
if (r === t || r.listener === t) 0 == --this._eventsCount ? this._events = Object.create(null) : (delete n[e], n.removeListener && this.emit("removeListener", e, r.listener || t));
else if ("function" != typeof r) {
for (o = -1, i = r.length - 1; i >= 0; i--)
if (r[i] === t || r[i].listener === t) {
a = r[i].listener, o = i;
break
} if (o < 0) return this;
0 === o ? r.shift() : function (e, t) {
for (; t + 1 < e.length; t++) e[t] = e[t + 1];
e.pop()
}(r, o), 1 === r.length && (n[e] = r[0]), void 0 !== n.removeListener && this.emit("removeListener", e, a || t)
}
return this
}, s.prototype.off = s.prototype.removeListener, s.prototype.removeAllListeners = function (e) {
var t, r, n;
if (void 0 === (r = this._events)) return this;
if (void 0 === r.removeListener) return 0 === arguments.length ? (this._events = Object.create(null), this._eventsCount = 0) : void 0 !== r[e] && (0 == --this._eventsCount ? this._events = Object.create(null) : delete r[e]), this;
if (0 === arguments.length) {
var o, i = Object.keys(r);
for (n = 0; n < i.length; ++n) "removeListener" !== (o = i[n]) && this.removeAllListeners(o);
return this.removeAllListeners("removeListener"), this._events = Object.create(null), this._eventsCount = 0, this
}
if ("function" == typeof (t = r[e])) this.removeListener(e, t);
else if (void 0 !== t)
for (n = t.length - 1; n >= 0; n--) this.removeListener(e, t[n]);
return this
}, s.prototype.listeners = function (e) {
return f(this, e, !0)
}, s.prototype.rawListeners = function (e) {
return f(this, e, !1)
}, s.listenerCount = function (e, t) {
return "function" == typeof e.listenerCount ? e.listenerCount(t) : d.call(e, t)
}, s.prototype.listenerCount = d, s.prototype.eventNames = function () {
return this._eventsCount > 0 ? n(this._events) : []
}
}, function (e, t, r) {
"use strict";
var n = Math.PI,
o = Math.sin,
i = Math.cos,
a = Math.sqrt,
s = Math.pow,
u = 1.70158,
c = 1.525 * u,
l = 2 * n / 3,
p = 2 * n / 4.5;
function f(e) {
var t = 7.5625,
r = 2.75;
return e < 1 / r ? t * e * e : e < 2 / r ? t * (e -= 1.5 / r) * e + .75 : e < 2.5 / r ? t * (e -= 2.25 / r) * e + .9375 : t * (e -= 2.625 / r) * e + .984375
}
var d = {
linear: function (e) {
return e
},
easeInQuad: function (e) {
return e * e
},
easeOutQuad: function (e) {
return 1 - (1 - e) * (1 - e)
},
easeInOutQuad: function (e) {
return e < .5 ? 2 * e * e : 1 - s(-2 * e + 2, 2) / 2
},
easeInCubic: function (e) {
return e * e * e
},
easeOutCubic: function (e) {
return 1 - s(1 - e, 3)
},
easeInOutCubic: function (e) {
return e < .5 ? 4 * e * e * e : 1 - s(-2 * e + 2, 3) / 2
},
easeInQuart: function (e) {
return e * e * e * e
},
easeOutQuart: function (e) {
return 1 - s(1 - e, 4)
},
easeInOutQuart: function (e) {
return e < .5 ? 8 * e * e * e * e : 1 - s(-2 * e + 2, 4) / 2
},
easeInQuint: function (e) {
return e * e * e * e * e
},
easeOutQuint: function (e) {
return 1 - s(1 - e, 5)
},
easeInOutQuint: function (e) {
return e < .5 ? 16 * e * e * e * e * e : 1 - s(-2 * e + 2, 5) / 2
},
easeInSine: function (e) {
return 1 - i(e * n / 2)
},
easeOutSine: function (e) {
return o(e * n / 2)
},
easeInOutSine: function (e) {
return -(i(n * e) - 1) / 2
},
easeInExpo: function (e) {
return 0 === e ? 0 : s(2, 10 * e - 10)
},
easeOutExpo: function (e) {
return 1 === e ? 1 : 1 - s(2, -10 * e)
},
easeInOutExpo: function (e) {
return 0 === e ? 0 : 1 === e ? 1 : e < .5 ? s(2, 20 * e - 10) / 2 : (2 - s(2, -20 * e + 10)) / 2
},
easeInCirc: function (e) {
return 1 - a(1 - s(e, 2))
},
easeOutCirc: function (e) {
return a(1 - s(e - 1, 2))
},
easeInOutCirc: function (e) {
return e < .5 ? (1 - a(1 - s(2 * e, 2))) / 2 : (a(1 - s(-2 * e + 2, 2)) + 1) / 2
},
easeInElastic: function (e) {
return 0 === e ? 0 : 1 === e ? 1 : -s(2, 10 * e - 10) * o((10 * e - 10.75) * l)
},
easeOutElastic: function (e) {
return 0 === e ? 0 : 1 === e ? 1 : s(2, -10 * e) * o((10 * e - .75) * l) + 1
},
easeInOutElastic: function (e) {
return 0 === e ? 0 : 1 === e ? 1 : e < .5 ? -s(2, 20 * e - 10) * o((20 * e - 11.125) * p) / 2 : s(2, -20 * e + 10) * o((20 * e - 11.125) * p) / 2 + 1
},
easeInBack: function (e) {
return 2.70158 * e * e * e - u * e * e
},
easeOutBack: function (e) {
return 1 + 2.70158 * s(e - 1, 3) + u * s(e - 1, 2)
},
easeInOutBack: function (e) {
return e < .5 ? s(2 * e, 2) * (7.189819 * e - c) / 2 : (s(2 * e - 2, 2) * ((c + 1) * (2 * e - 2) + c) + 2) / 2
},
easeInBounce: function (e) {
return 1 - f(1 - e)
},
easeOutBounce: f,
easeInOutBounce: function (e) {
return e < .5 ? (1 - f(1 - 2 * e)) / 2 : (1 + f(2 * e - 1)) / 2
},
cubicBezier: function () {}
};
e.exports = d
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}), t.default = function (e, t, r, n, o) {
var i = function (t) {
var n = 1 - t;
return 3 * n * n * t * e + 3 * n * t * t * r + t * t * t
},
a = function (e) {
var r = 1 - e;
return 3 * r * r * e * t + 3 * r * e * e * n + e * e * e
},
s = function (t) {
var n = 1 - t;
return 3 * (2 * (t - 1) * t + n * n) * e + 3 * (-t * t * t + 2 * n * t) * r
};
return function (e) {
var t, r, n, u, c, l, p = e;
for (n = p, l = 0; l < 8; l++) {
if (u = i(n) - p, Math.abs(u) < o) return a(n);
if (c = s(n), Math.abs(c) < 1e-6) break;
n -= u / c
}
if (r = 1, (n = p) < (t = 0)) return a(t);
if (n > r) return a(r);
for (; t < r;) {
if (u = i(n), Math.abs(u - p) < o) return a(n);
p > u ? t = n : r = n, n = .5 * (r - t) + t
}
return a(n)
}
}, e.exports = t.default
}, function (e, t, r) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var n = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (e) {
window.setTimeout(e, 1e3 / 60)
},
o = window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.oCancelAnimationFrame || window.msCancelAnimationFrame || window.clearTimeout;
t.raf = n, t.cancelRAF = o
}, function (e, t, r) {
"use strict";
var n = Object.getOwnPropertySymbols,
o = Object.prototype.hasOwnProperty,
i = Object.prototype.propertyIsEnumerable;
e.exports = function () {
try {
if (!Object.assign) return !1;
var e = new String("abc");
if (e[5] = "de", "5" === Object.getOwnPropertyNames(e)[0]) return !1;
for (var t = {}, r = 0; r < 10; r++) t["_" + String.fromCharCode(r)] = r;
if ("0123456789" !== Object.getOwnPropertyNames(t).map(function (e) {
return t[e]
}).join("")) return !1;
var n = {};
return "abcdefghijklmnopqrst".split("").forEach(function (e) {
n[e] = e
}), "abcdefghijklmnopqrst" === Object.keys(Object.assign({}, n)).join("")
} catch (e) {
return !1
}
}() ? Object.assign : function (e, t) {
for (var r, a, s = function (e) {
if (null == e) throw new TypeError("Object.assign cannot be called with null or undefined");
return Object(e)
}(e), u = 1; u < arguments.length; u++) {
for (var c in r = Object(arguments[u])) o.call(r, c) && (s[c] = r[c]);
if (n) {
a = n(r);
for (var l = 0; l < a.length; l++) i.call(r, a[l]) && (s[a[l]] = r[a[l]])
}
}
return s
}
}])
}), require("pages/index/index");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment