Files
damai-wx/common.js
MagicalKudzu 8079e6c819 首次提交
2025-12-12 10:35:12 +08:00

10198 lines
383 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

require("@babel/runtime/helpers/Arrayincludes"), (wx.webpackJsonp = wx.webpackJsonp || []).push([
[2076], {
24: function (e, t, n) {
n.d(t, {
M: function () {
return a
}
});
var r = n(4107),
i = n(9761),
o = n(9887),
a = {
wechatglobalconfig: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new o.p((0, r.A)((0, r.A)({}, i.A.wechatglobalconfig), e)).create()
},
getWantGuide: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new o.p((0, r.A)((0, r.A)({}, i.A.getWantGuide), e)).create()
},
certificationStatus: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new o.p((0, r.A)((0, r.A)({}, i.A.certificationStatus), e)).create()
},
getPopUp: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new o.p((0, r.A)((0, r.A)({}, i.A.getPopup), e)).create()
},
getHomeFloat: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new o.p((0, r.A)((0, r.A)({}, i.A.getHomeFloat), e)).create()
},
getBatchLotteryDraw: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new o.p((0, r.A)((0, r.A)({}, i.A.getBatchLotteryDraw), e)).create()
},
relationUpdate: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new o.p((0, r.A)((0, r.A)({}, i.A.relationUpdate), e)).create()
},
reportPopup: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new o.p((0, r.A)((0, r.A)({}, i.A.reportPopup), e)).create()
},
floatReport: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new o.p((0, r.A)((0, r.A)({}, i.A.floatReport), e)).create()
}
}
},
104: function (e, t, n) {
var r = n(5652),
i = n(2555),
o = n(2267);
function a() {
return (a = (0, i.A)((0, r.A)().m((function e(t, n, i) {
var a, c, s, u, l, d = arguments;
return (0, r.A)().w((function (e) {
for (;;) switch (e.n) {
case 0:
return a = d.length > 3 && void 0 !== d[3] ? d[3] : {}, c = t || "大麦网推荐", s = "/pages/home/index?type=share&url=".concat(encodeURIComponent(i)), a.notByHomeOpen && (s = i), u = {
title: c,
imageUrl: n,
path: s
}, o.A.isTT && ((l = a.desc) && (u.desc = l), u.templateId = "88c77g9kgjabciddgn"), e.a(2, u)
}
}), e)
})))).apply(this, arguments)
}
n(5765), t.A = {
createShareObject: function (e, t, n) {
return a.apply(this, arguments)
}
}
},
208: function (e, t, n) {
n.d(t, {
WX: function () {
return l
}
});
var r = n(469),
i = n(29),
o = n(5517),
a = n(9371),
c = n(644),
s = n.n(c),
u = (n(7717), (0, o.A)((function e(t, n, r) {
(0, i.A)(this, e), (0, a.A)(this, "data", void 0), (0, a.A)(this, "type", void 0), (0, a.A)(this, "floorId", void 0), this.data = t, this.floorId = n, this.type = r
}), [{
key: "componentId",
get: function () {
return this.data.data.componentId
}
}, {
key: "nodeId",
get: function () {
return this.data.data.nodeId
}
}, {
key: "listData",
get: function () {
var e = s()(this.data, "nodes", void 0);
if (e) return e.map((function (e) {
return s()(e, "nodes", []).length ? e : e.data
}))
}
}])),
l = (0, o.A)((function e(t) {
var n = this;
(0, i.A)(this, e), (0, a.A)(this, "data", void 0), (0, a.A)(this, "byComponentId", (function (e) {
var t, i = n.componentsArr,
o = (0, r.A)(i);
try {
for (o.s(); !(t = o.n()).done;) {
var a = t.value;
if (a.componentId === e) return a
}
} catch (e) {
o.e(e)
} finally {
o.f()
}
})), (0, a.A)(this, "byComponentType", (function (e) {
var t, i = n.componentsArr,
o = (0, r.A)(i);
try {
for (o.s(); !(t = o.n()).done;) {
var a = t.value;
if ("".concat(a.type) === "".concat(e)) return a
}
} catch (e) {
o.e(e)
} finally {
o.f()
}
})), this.data = t
}), [{
key: "componentsArr",
get: function () {
var e, t = s()(this.data, "nodes", []),
n = [],
i = (0, r.A)(t);
try {
for (i.s(); !(e = i.n()).done;) {
var o, a = e.value,
c = s()(a, "data.nodeId", ""),
l = s()(a, "nodes", []),
d = (0, r.A)(l);
try {
for (d.s(); !(o = d.n()).done;) {
var f = o.value;
n.push(new u(f, c, f.type))
}
} catch (e) {
d.e(e)
} finally {
d.f()
}
}
} catch (e) {
i.e(e)
} finally {
i.f()
}
return n
}
}, {
key: "getLevel3ArrByComponents",
value: function () {
var e, t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [],
n = [],
i = (0, r.A)(t);
try {
for (i.s(); !(e = i.n()).done;) {
var o, a = e.value,
c = s()(a, "nodes", []),
l = (0, r.A)(c);
try {
for (l.s(); !(o = l.n()).done;) {
var d = o.value;
n.push(new u(d, void 0, d.type))
}
} catch (e) {
l.e(e)
} finally {
l.f()
}
}
} catch (e) {
i.e(e)
} finally {
i.f()
}
return n
}
}])
},
283: function (e) {
function t(e) {
var t = new Error("Cannot find module '" + e + "'");
throw t.code = "MODULE_NOT_FOUND", t
}
t.keys = function () {
return []
}, t.resolve = t, t.id = 283, e.exports = t
},
334: function (e, t, n) {
var r = n(2573),
i = n.n(r),
o = n(6432),
a = "5.2.23",
c = "waptest",
s = "wapa",
u = "_LOGINED_SESSION_";
(0, o.hZ)("__appVersion__", a);
var l = {
m: "https://ipassport.damai.cn",
wapa: "https://ipassport.damai.cn",
waptest: "https://ipassport.damai.test"
},
d = {
appVersion: a,
paymethod: 126,
nameReg: /^([*]+)?([A-Za-z0-9\u4e00-\u9fa5+\s ]+)$/,
phoneReg: /(^1[\d]{2}(([\d]{4})|([*]{4}))[\d]{4}$)/,
addrReg: /^[A-Za-z0-9\u4e00-\u9fa5\-\uff0d\u2014\u2014\uff3f _()\uff08\uff09 \uff0c,\u3001\uff0f/;\uff1b\uff03#&\uff06\uff5e~{\u2022}?\uff1f\u3002\xb7.\uff0e]{2,150}$/,
defaultPic: "https://gw.alicdn.com/tfs/TB1DPFug3MPMeJjy1XcXXXpppXa-132-178.png",
source: 10188,
SPM_A: "a2obt",
osType: 4,
storageKey: {},
env: "m",
envPrefix: "market",
detailMtopPreUseOnline: !0,
h5_shows_url: "",
getEnv: function () {
return this.env ? this.env : "m"
},
getEnvPrefix: function () {
return this.envPrefix ? this.envPrefix : "market"
},
envPrefixList: ["market", "pre-market1", "pre-market2", "pre-market3", "pre-market4", "pre-market5"],
envPreName: {
market: "预发",
"pre-market1": "预发1",
"pre-market2": "预发2",
"pre-market3": "预发3",
"pre-market4": "预发4",
"pre-market5": "预发5"
},
havanalogin: {
site: 18,
sessionKey: u,
getGateWay: function () {
return l[f("app_env") || "m"]
},
appEntrance: "weixin",
appid: "wx938b41d0d7e8def0",
type: "weixin_mini_program",
appName: "wx938b41d0d7e8def0",
sessionTimestampKey: u + "_LOGIN_TIMESTAMP"
},
changeEvn: function (e) {
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "";
e && (this.env = e, t && (this.envPrefix = t), this.h5_shows_url = "https://m.damai.cn/shows/", this.env === c ? this.h5_base_url = "http://market.waptest.damai.test/damai/" : e === s ? (this.h5_base_url = "http://".concat(this.envPrefix, ".wapa.damai.cn/damai/"), this.h5_shows_url = "https://".concat(this.envPrefix, ".wapa.damai.cn/shows/")) : this.h5_base_url = "https://m.damai.cn/damai/", p("app_env", e), (0, o.hZ)("currentEnv", e), t && p("app_env_prefix", t))
},
checkAppUpdate: function () {
var e = i().getUpdateManager && i().getUpdateManager();
e && e.onUpdateReady((function () {
i().showModal({
title: "更新提示",
content: "新版本已经准备好,是否重启应用?",
success: function (t) {
t.confirm && e.applyUpdate()
}
})
}))
}
};
function f(e) {
try {
return i().getStorageSync(e)
} catch (e) {
return null
}
}
function p(e, t) {
try {
i().setStorageSync(e, t)
} catch (e) {}
}
var m = f("app_env"),
h = f("app_env_prefix");
d.changeEvn(m || d.env, h || d.envPrefix), t.A = d
},
715: function (e, t, n) {
e = n.nmd(e);
var r, i = n(3919).window,
o = n(906).default;
(function (t, n) {
var r = (Promise || {
resolve: function () {}
}).resolve();
function i() {
var e = {},
t = new Promise((function (t, n) {
e.resolve = t, e.reject = n
}));
return e.promise = t, e
}
function a(e, t) {
for (var n in t) void 0 === e[n] && (e[n] = t[n]);
return e
}
function c(e) {
var t = [];
for (var n in e) e[n] && t.push(n + "=" + encodeURIComponent(e[n]));
return t.join("&")
}
function s(e) {
return wx && wx.getStorageSync(e)
}
String.prototype.trim || (String.prototype.trim = function () {
return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "")
});
var u = {
useJsonpResultType: !1,
safariGoLogin: !0,
useAlipayJSBridge: !1
},
l = [],
d = {
ERROR: -1,
SUCCESS: 0,
TOKEN_EXPIRED: 1,
SESSION_EXPIRED: 2
};
u.mainDomain = "taobao.com", u.subDomain = "m", u.prefix = "h5api";
var f = 0;
function p(e) {
this.id = ++f, this.params = a(e || {}, {
v: "*",
data: {},
type: "get",
dataType: "json"
}), this.params.type = this.params.type.toLowerCase(), "object" === o(this.params.data) && (this.params.data = JSON.stringify(this.params.data)), this.middlewares = l.slice(0)
}
p.prototype.use = function (e) {
if (!e) throw new Error("middleware is undefined");
return this.middlewares.push(e), this
}, p.prototype.__processRequestMethod = function (e) {
var t = this.params,
n = this.options;
"get" === t.type && "json" === t.dataType ? n.getJSON = !0 : "post" === t.type && (n.postJSON = !0), e()
}, p.prototype.__processRequestType = function (e) {
if (this.params, this.options.H5Request = !0, e) return e()
};
var m = "_m_h5_c2";
p.prototype.__getTokenFromCookie = function () {
this.params;
var e = this.options;
return e.token = (s(m) || "").split(";")[0], e.token && (e.token = e.token.split("_")[0]), Promise.resolve()
}, p.prototype.__waitWKWebViewCookie = function (e) {
var n = this.options;
n.waitWKWebViewCookieFn && n.H5Request && t.webkit && t.webkit.messageHandlers ? n.waitWKWebViewCookieFn(e) : e()
}, p.prototype.__processToken = function (e) {
var t = this,
n = this.params,
i = this.options;
return i.token && delete i.token, r.then((function () {
return t.__getTokenFromCookie()
})).then(e).then((function () {
var e = i.retJson,
r = e.ret;
if (r instanceof Array && (r = r.join(",")), r.indexOf("TOKEN_EMPTY") > -1 || !0 === i.CDR && r.indexOf("ILLEGAL_ACCESS") > -1 || "2.0" === n.SV && r.indexOf("TOKEN_ILLEGAL") > -1 || r.indexOf("TOKEN_EXOIRED") > -1) {
if (i.maxRetryTimes = i.maxRetryTimes || 5, i.failTimes = i.failTimes || 0, i.H5Request && ++i.failTimes < i.maxRetryTimes) return t.__sequence([t.__waitWKWebViewCookie, t.__processToken, t.__processRequestUrl, t.middlewares, t.__processRequest]);
e.retType = d.TOKEN_EXPIRED
}
}))
}, p.prototype.__processRequestUrl = function (e) {
var n = this.params,
r = this.options;
if (r.hostSetting && r.hostSetting[t.location.hostname]) {
var i = r.hostSetting[t.location.hostname];
i.prefix && (r.prefix = i.prefix), i.subDomain && (r.subDomain = i.subDomain), i.mainDomain && (r.mainDomain = i.mainDomain)
}
if (!0 === r.H5Request) {
var o = "https://" + (r.prefix ? r.prefix + "." : "") + (r.subDomain ? r.subDomain + "." : "") + r.mainDomain + "/h5/" + n.api.toLowerCase() + "/" + n.v.toLowerCase() + "/",
a = n.appKey || ("waptest" === r.subDomain ? "4272" : "12574478"),
c = (new Date).getTime(),
u = {
jsv: "2.4.12",
appKey: a,
t: c
},
l = {
data: n.data,
ua: n.ua
};
"2.0" === n.SV && (o += "2.0/", u.sign = function (e) {
function t(e, t) {
return e << t | e >>> 32 - t
}
function n(e, t) {
var n, r, i, o, a;
return i = 2147483648 & e, o = 2147483648 & t, a = (1073741823 & e) + (1073741823 & t), (n = 1073741824 & e) & (r = 1073741824 & t) ? 2147483648 ^ a ^ i ^ o : n | r ? 1073741824 & a ? 3221225472 ^ a ^ i ^ o : 1073741824 ^ a ^ i ^ o : a ^ i ^ o
}
function r(e, r, i, o, a, c, s) {
return e = n(e, n(n(function (e, t, n) {
return e & t | ~e & n
}(r, i, o), a), s)), n(t(e, c), r)
}
function i(e, r, i, o, a, c, s) {
return e = n(e, n(n(function (e, t, n) {
return e & n | t & ~n
}(r, i, o), a), s)), n(t(e, c), r)
}
function o(e, r, i, o, a, c, s) {
return e = n(e, n(n(function (e, t, n) {
return e ^ t ^ n
}(r, i, o), a), s)), n(t(e, c), r)
}
function a(e, r, i, o, a, c, s) {
return e = n(e, n(n(function (e, t, n) {
return t ^ (e | ~n)
}(r, i, o), a), s)), n(t(e, c), r)
}
function c(e) {
var t, n = "",
r = "";
for (t = 0; t <= 3; t++) n += (r = "0" + (e >>> 8 * t & 255).toString(16)).substr(r.length - 2, 2);
return n
}
var s, u, l, d, f, p, m, h, v, g;
for (g = function (e) {
for (var t, n = e.length, r = n + 8, i = 16 * ((r - r % 64) / 64 + 1), o = new Array(i - 1), a = 0, c = 0; c < n;) a = c % 4 * 8, o[t = (c - c % 4) / 4] = o[t] | e.charCodeAt(c) << a, c++;
return a = c % 4 * 8, o[t = (c - c % 4) / 4] = o[t] | 128 << a, o[i - 2] = n << 3, o[i - 1] = n >>> 29, o
}(e = function (e) {
e = e.replace(/\r\n/g, "\n");
for (var t = "", n = 0; n < e.length; n++) {
var r = e.charCodeAt(n);
r < 128 ? t += String.fromCharCode(r) : r > 127 && r < 2048 ? (t += String.fromCharCode(r >> 6 | 192), t += String.fromCharCode(63 & r | 128)) : (t += String.fromCharCode(r >> 12 | 224), t += String.fromCharCode(r >> 6 & 63 | 128), t += String.fromCharCode(63 & r | 128))
}
return t
}(e)), p = 1732584193, m = 4023233417, h = 2562383102, v = 271733878, s = 0; s < g.length; s += 16) u = p, l = m, d = h, f = v, p = r(p, m, h, v, g[s + 0], 7, 3614090360), v = r(v, p, m, h, g[s + 1], 12, 3905402710), h = r(h, v, p, m, g[s + 2], 17, 606105819), m = r(m, h, v, p, g[s + 3], 22, 3250441966), p = r(p, m, h, v, g[s + 4], 7, 4118548399), v = r(v, p, m, h, g[s + 5], 12, 1200080426), h = r(h, v, p, m, g[s + 6], 17, 2821735955), m = r(m, h, v, p, g[s + 7], 22, 4249261313), p = r(p, m, h, v, g[s + 8], 7, 1770035416), v = r(v, p, m, h, g[s + 9], 12, 2336552879), h = r(h, v, p, m, g[s + 10], 17, 4294925233), m = r(m, h, v, p, g[s + 11], 22, 2304563134), p = r(p, m, h, v, g[s + 12], 7, 1804603682), v = r(v, p, m, h, g[s + 13], 12, 4254626195), h = r(h, v, p, m, g[s + 14], 17, 2792965006), p = i(p, m = r(m, h, v, p, g[s + 15], 22, 1236535329), h, v, g[s + 1], 5, 4129170786), v = i(v, p, m, h, g[s + 6], 9, 3225465664), h = i(h, v, p, m, g[s + 11], 14, 643717713), m = i(m, h, v, p, g[s + 0], 20, 3921069994), p = i(p, m, h, v, g[s + 5], 5, 3593408605), v = i(v, p, m, h, g[s + 10], 9, 38016083), h = i(h, v, p, m, g[s + 15], 14, 3634488961), m = i(m, h, v, p, g[s + 4], 20, 3889429448), p = i(p, m, h, v, g[s + 9], 5, 568446438), v = i(v, p, m, h, g[s + 14], 9, 3275163606), h = i(h, v, p, m, g[s + 3], 14, 4107603335), m = i(m, h, v, p, g[s + 8], 20, 1163531501), p = i(p, m, h, v, g[s + 13], 5, 2850285829), v = i(v, p, m, h, g[s + 2], 9, 4243563512), h = i(h, v, p, m, g[s + 7], 14, 1735328473), p = o(p, m = i(m, h, v, p, g[s + 12], 20, 2368359562), h, v, g[s + 5], 4, 4294588738), v = o(v, p, m, h, g[s + 8], 11, 2272392833), h = o(h, v, p, m, g[s + 11], 16, 1839030562), m = o(m, h, v, p, g[s + 14], 23, 4259657740), p = o(p, m, h, v, g[s + 1], 4, 2763975236), v = o(v, p, m, h, g[s + 4], 11, 1272893353), h = o(h, v, p, m, g[s + 7], 16, 4139469664), m = o(m, h, v, p, g[s + 10], 23, 3200236656), p = o(p, m, h, v, g[s + 13], 4, 681279174), v = o(v, p, m, h, g[s + 0], 11, 3936430074), h = o(h, v, p, m, g[s + 3], 16, 3572445317), m = o(m, h, v, p, g[s + 6], 23, 76029189), p = o(p, m, h, v, g[s + 9], 4, 3654602809), v = o(v, p, m, h, g[s + 12], 11, 3873151461), h = o(h, v, p, m, g[s + 15], 16, 530742520), p = a(p, m = o(m, h, v, p, g[s + 2], 23, 3299628645), h, v, g[s + 0], 6, 4096336452), v = a(v, p, m, h, g[s + 7], 10, 1126891415), h = a(h, v, p, m, g[s + 14], 15, 2878612391), m = a(m, h, v, p, g[s + 5], 21, 4237533241), p = a(p, m, h, v, g[s + 12], 6, 1700485571), v = a(v, p, m, h, g[s + 3], 10, 2399980690), h = a(h, v, p, m, g[s + 10], 15, 4293915773), m = a(m, h, v, p, g[s + 1], 21, 2240044497), p = a(p, m, h, v, g[s + 8], 6, 1873313359), v = a(v, p, m, h, g[s + 15], 10, 4264355552), h = a(h, v, p, m, g[s + 6], 15, 2734768916), m = a(m, h, v, p, g[s + 13], 21, 1309151649), p = a(p, m, h, v, g[s + 4], 6, 4149444226), v = a(v, p, m, h, g[s + 11], 10, 3174756917), h = a(h, v, p, m, g[s + 2], 15, 718787259), m = a(m, h, v, p, g[s + 9], 21, 3951481745), p = n(p, u), m = n(m, l), h = n(h, d), v = n(v, f);
return (c(p) + c(m) + c(h) + c(v)).toLowerCase()
}(r.token + "&" + c + "&" + a + "&" + n.data), u.c = s(m)), "3.0" === n.SV ? o += "3.0/" : "4.0" === n.SV && (o += "4.0/"), Object.keys(n).forEach((function (e) {
void 0 === u[e] && void 0 === l[e] && "headers" !== e && "ext_headers" !== e && "ext_querys" !== e && (u[e] = n[e])
})), n.ext_querys && Object.keys(n.ext_querys).forEach((function (e) {
u[e] = n.ext_querys[e]
})), r.getJSONP ? u.type = "jsonp" : r.getOriginalJSONP ? u.type = "originaljsonp" : (r.getJSON || r.postJSON) && (u.type = "originaljson"), void 0 !== n.valueType && ("original" === n.valueType ? r.getJSONP || r.getOriginalJSONP ? u.type = "originaljsonp" : (r.getJSON || r.postJSON) && (u.type = "originaljson") : "string" === n.valueType && (r.getJSONP || r.getOriginalJSONP ? u.type = "jsonp" : (r.getJSON || r.postJSON) && (u.type = "json"))), !0 === r.useJsonpResultType && "originaljson" === u.type && delete u.type, r.dangerouslySetProtocol && (o = r.dangerouslySetProtocol + ":" + o), u.SV && delete u.SV, r.querystring = u, r.postdata = l, r.path = o
}
r.$loginClient ? r.$loginClient.getSession((function (t) {
if (t.cookie2) {
var r = "";
Object.keys(t).map((function (e) {
r += "".concat(e, "=").concat(t[e], ";")
}));
var i = JSON.stringify(t);
n.ext_headers ? (n.ext_headers["x-smallstc"] = i, n.ext_headers.Cookie = r) : n.headers ? (n.headers["x-smallstc"] = i, n.ext_headers.Cookie = r) : n.ext_headers = {
"x-smallstc": i,
Cookie: r
}
}
e()
})) : e()
}, p.prototype.__processUnitPrefix = function (e) {
e()
}, p.prototype.__requestJSON = function (e) {
var t, n, r = i(),
o = this.params,
a = this.options,
s = a.path + "?" + c(a.querystring);
if (a.getJSON ? (t = "GET", s += "&" + c(a.postdata)) : a.postJSON && (t = "POST", n = c(a.postdata)), "3.0" === o.SV && a.$signClient) {
var u = a.$signClient.getSign(s.substr(s.indexOf("?") + 1), n);
s += "&sign=" + encodeURIComponent(u)
}
return wx && wx.request({
url: s,
method: t,
data: n || {},
header: Object.assign({
Accept: "application/json",
"x-tap": "wx",
"Content-type": "application/x-www-form-urlencoded"
}, o.ext_headers || o.headers || {}),
success: function (t) {
var n = t,
i = t.header || "";
try {
(n = t.data).responseHeaders = i, a.results = [n], r.resolve()
} catch (t) {
e("PARSE_JSON_ERROR::解析JSON失败")
}
},
fail: function (t) {
e(a.abortErrMsg || "ABORT::接口异常退出")
}
}), r.promise
}, p.prototype.__processRequest = function (e, t) {
var n = this;
return r.then((function () {
return n.options, n.__requestJSON(t)
})).then(e).then((function () {
var e = n.options,
t = n.params,
r = e.results[0],
i = r && r.ret || [];
r.ret = i, i instanceof Array && (i = i.join(","));
var o = r.c;
"2.0" === t.SV && o && function (e, t, n) {
wx && wx.setStorageSync(e, t)
}(m, o, e.pageDomain), i.indexOf("SUCCESS") > -1 ? r.retType = d.SUCCESS : r.retType = d.ERROR, e.retJson = r
}))
}, p.prototype.__sequence = function (e) {
var t = this,
n = [],
o = [];
e.forEach((function e(r) {
if (r instanceof Array) r.forEach(e);
else {
var a, c = i(),
s = i();
n.push((function () {
return c = i(), (a = r.call(t, (function (e) {
return c.resolve(e), s.promise
}), (function (e) {
return c.reject(e), s.promise
}))) && (a = a.catch((function (e) {
c.reject(e)
}))), c.promise
})), o.push((function (e) {
return s.resolve(e), a
}))
}
}));
for (var a, c = r; a = n.shift();) c = c.then(a);
for (; a = o.pop();) c = c.then(a);
return c
};
var h = function (e) {
e()
},
v = function (e) {
e()
};
p.prototype.request = function (e) {
var t = this;
this.options = a(e || {}, u);
var n = Promise.resolve([h, v]).then((function (e) {
var n = e[0],
r = e[1];
return t.__sequence([n, t.__processRequestMethod, t.__processRequestType, t.__processToken, t.__processRequestUrl, t.middlewares, t.__processRequest, r])
})).then((function () {
var e = t.options.retJson;
return e.retType !== d.SUCCESS ? Promise.reject(e) : t.options.successCallback ? void t.options.successCallback(e) : Promise.resolve(e)
})).catch((function (e) {
var n;
if (n = e instanceof Error ? {
ret: [e.message],
stack: [e.stack],
retJson: d.ERROR
} : "string" == typeof e ? {
ret: [e],
retJson: d.ERROR
} : void 0 !== e ? e : t.options.retJson, !t.options.failureCallback) return Promise.reject(n);
t.options.failureCallback(n)
}));
return this.__processRequestType(), t.options.H5Request && (t.constructor.__firstProcessor || (t.constructor.__firstProcessor = n), h = function (e) {
t.constructor.__firstProcessor.then(e).catch(e)
}), n
}, n.mtop = function (e) {
return new p(e)
}, n.mtop.request = function (e, t, n) {
var r = {
H5Request: e.H5Request,
successCallback: t,
failureCallback: n || t
};
return new p(e).request(r)
};
var g = {
onLoad: function (e) {
this.setData({
tmpData: {
showWebView: "miniprogram" !== e.subType,
webViewSrc: decodeURIComponent(e.redirectUrl),
canIUse: !!Ae
}
}), "tt" === ye && ge.setSwipeBackMode(0)
},
onHide: function () {
Ie()
},
onUnload: function () {
Ie()
},
onMessage: function (e) {
var t = "dd" === ye || "my" === ye ? e.detail.data : e.detail.data[0],
n = t.success,
r = t.token,
i = t.expire;
n ? (r && (H({
token: r,
expire: i
}), D("baxiaToken", {
token: r,
expire: i
})), xe("my" === ye ? r : null)) : Ie()
},
bindGetUserInfo: function (e) {
Z(e.detail.userInfo), M(), xe()
},
bindGetUserProfile: function () {
Ae({
desc: "通过授权以进行进一步的安全认证",
success: function (e) {
Z("my" === ye ? JSON.parse(e.response).response : e.userInfo), M(), xe()
},
fail: function (e) {
M(), Ie()
}
})
}
};
n.mtop.middlewares = l, n.mtop.config = u, n.mtop.RESPONSE_TYPE = d, n.mtop.CLASS = p, n.mtop.config.$baxiaMiniprogram = {
params: g,
init: function (e) {
void 0 === e && (e = {}), e.getOpenId && "function" == typeof e.getOpenId && function (e) {
T = e
}(e.getOpenId), e.checkWhiteList && "function" == typeof e.checkWhiteList && function (e) {
E = e
}(e.checkWhiteList);
var t = e.path && e.path.substring(0, e.path.lastIndexOf("/"));
W(t, e.checkWebview), K(e), D("baxiaOptions", e)
}
}, e && (e.exports = {
mtop: n.mtop
});
var y = function (e, t) {
return !!e && e.indexOf(t) > -1
};
function A(e, t, n) {
return e && !y(e, t) ? function (e, t, n) {
return y(e, t) ? e : e.indexOf("?") > -1 ? e + "&" + t + "=" + n : e + "?" + t + "=" + n
}(e, t, n) : e
}
function w(e, t, n) {
var r = t + "=" + n;
if (!e) return r;
if (e.includes(t)) {
var i = new RegExp(t + "=[^;]*", "gi");
return e = e.replace(i, r)
}
return ";" === e.substring(e.length - 1) ? "" + e + r : e + ";" + r
}
var b, _ = "0.0.11",
S = function (e) {
void 0 === e && (e = "");
var t = {
valid: !1,
type: ""
},
n = {};
if ("string" != typeof e && "object" !== o(e)) return t.valid = !0, t;
if ("string" == typeof e) {
if (e.length > 5e4) return t.valid = !0, t;
if (!y(e, "rgv587_flag") && !y(e, "RGV587_ERROR::SM")) return t.valid = !0, t;
try {
n = JSON.parse(e)
} catch (e) {
return t.valid = !0, t
}
} else n = e;
return n && n._bx_upgrade_ ? (t.valid = !0, t) : (n && n.ret && n.data && n.ret.toString().indexOf("RGV587_ERROR::SM") > -1 && n.data.url || (t.valid = !0), t)
},
k = "undefined" != typeof tt && "function" == typeof tt.request ? (b = "tt", tt) : "undefined" != typeof wx && "function" == typeof wx.request ? (b = "wx", wx) : "undefined" == typeof my || "function" != typeof my.request && "function" != typeof my.httpRequest ? "undefined" != typeof dd && "function" == typeof dd.httpRequest ? (b = "dd", dd) : "undefined" != typeof ks && "function" == typeof ks.request ? (b = "ks", ks) : "undefined" != typeof swan && "function" == typeof swan.request ? (b = "swan", swan) : null : (b = "my", my),
I = "dd" === b ? k.httpRequest : "my" === b ? k.request || k.httpRequest : k.request,
x = "my" === b ? k.getOpenUserInfo : k.getUserProfile,
C = "dd" === b || "my" === b ? k.scan : k.scanCode;
var T, E, O = {
platform: k,
platformType: b,
request: I,
scanCode: C,
getParams: function (e) {
return "dd" === b || "my" === b && !k.request && k.httpRequest ? {
httpRequest: {
value: e
}
} : {
request: {
value: e
}
}
},
getUserInfo: x
},
P = O.platform,
N = O.platformType,
L = function (e) {
return "my" == N || "dd" == N ? P.getStorageSync({
key: e
}).data || "" : P.getStorageSync(e) || ""
},
U = function (e) {
return P.getStorage(e)
},
D = function (e, t) {
"my" == N || "dd" == N ? P.setStorageSync({
key: e,
data: t
}) : P.setStorageSync(e, t)
},
R = function (e) {
"my" == N || "dd" == N ? P.removeStorageSync({
key: e
}) : P.removeStorageSync(e)
},
j = function (e, t) {
var n = {
url: e
};
t && (n.complete = t), P.navigateTo(n)
},
M = function () {
P.navigateBack()
},
B = function () {
return P.getFileSystemManager && P.getFileSystemManager()
},
q = function () {
return P.getSystemInfoSync && P.getSystemInfoSync()
},
V = function (e) {
P.showModal(e)
},
W = function (e, t) {
void 0 === e && (e = "/pages/baxia/webview"), void 0 === t && (t = !0);
try {
var n = B() && B().readdirSync(e);
if (!n || n.error) return t ? void setTimeout((function () {
J = L("baxiaWebview") ? _ : 1
}), 1e3) : void(J = 2);
J = n.length ? _ : 1
} catch (e) {
if (!t) return void(J = 2);
J = 1, q() && "android" === q().platform && setTimeout((function () {
J = L("baxiaWebview") ? _ : 1
}), 100)
}
},
J = _,
Y = function () {
return J
},
F = {},
H = function (e) {
F = e
},
G = {
uniqueId: "",
expireTime: 0
},
z = function (e, t) {
G = {
uniqueId: e,
expireTime: t
}
},
Z = function (e) {},
X = {},
K = function (e) {
X = e
},
$ = function () {
return X
},
Q = O.platformType,
ee = O.request,
te = null,
ne = null,
re = null,
ie = null,
oe = null;
try {
var ae = q();
te = ae.brand, ne = ae.model, re = ae.version, ie = ae.system, oe = ae.platform
} catch (e) {}
var ce = function (e, t, n, r) {
if (void 0 === t && (t = 1), void 0 === n && (n = 1), void 0 === r && (r = "baxia"), !(n > 0 && Math.random() >= n)) {
var i = getCurrentPages && getCurrentPages();
i && i.length || (i = [{
route: "",
options: ""
}]);
var o = i[i.length - 1],
a = o.route,
c = JSON.stringify(o.options);
! function (e, t) {
var n = [];
for (var r in e) n.push(r + "=" + encodeURIComponent(e[r]));
ee({
url: "https:" + t + n.join("&"),
method: "GET"
})
}({
code: t,
msg: (e + "").substring(0, 1e3) + ";v:" + _,
pid: r,
page: a,
query: c,
c1: te,
c2: ne,
c3: re,
c4: ie,
c5: oe,
c6: Q
}, "//gm.mmstat.com/fsp.1.1?")
}
};
function se(e) {
ce(e, 14, 1, "baxia")
}
var ue = "/pages/baxia/webview/index",
le = O.platform,
de = O.platformType,
fe = O.request,
pe = O.scanCode,
me = O.getParams,
he = "检测到未引入霸下 webview请根据文档完成 WebView 引入文档https://yuque.antfin-inc.com/security-base/doc/xe1gec",
ve = function (e) {
var t = e.done;
if (le) {
var n = q().platform;
setTimeout((function () {
"devtools" === n && 1 === Y() && (V({
title: "警告",
content: he
}), se("INIT: not import baxia webview"))
}), 1e3);
var r = function (e) {
try {
var r = Y();
if (1 === r && "devtools" === n) return e.fail({
statusCode: 400,
errMsg: he,
data: {
ret: ["FAIL_NO_WEBVIEW", he],
data: null
}
}), void se("Request: not import baxia webview");
var i = "dd" === de || "my" === de ? "headers" : "header";
e[i] = e[i] || {};
var o = F,
a = o.token,
c = o.expire,
s = (new Date).valueOf(),
u = e[i].Cookie ? e[i].cookie ? "cookie" : "Cookie" : "cookie";
c && s - parseInt(c) > 0 ? (H({}), R("baxiaToken")) : a && (e[i][u] = w(e[i][u], "x5sec", a));
var l = G,
d = l.uniqueId,
f = l.expireTime;
f && s - parseInt(f) > 0 ? z("", 0) : d && (e[i][u] = w(e[i][u], "punish_test_id", d), "my" === de && (e[i].punish_test_id = d));
var p = "";
p && (p = "" + encodeURIComponent(JSON.stringify(p)), e[i][u] = w(e[i][u], "bx-userInfo", p), "my" === de && (e[i]["bx-userInfo"] = p));
var m = function () {
if (T) return T();
var e = L("TB_STORAGE");
return e ? e.openId : null
}();
if (m && (e[i]["bx-openId"] = m), ! function (e) {
return E && E(e)
}(e.url)) {
var h = $(),
v = h.appendTo,
g = h.useBusinessDomain;
"header" === v ? (!0 === g && (e[i]["_bx-ubd"] = "true"), e[i]["_bx-m"] = r.toString()) : (!0 === g && (e.url = A(e.url, "_bx-ubd", "true")), e.url = A(e.url, "_bx-m", r.toString()))
}
var y = e.success,
b = e.fail,
_ = e.complete,
S = e;
e.success = function (e) {
var n = e.data;
t({
optionsCallBack: S,
response: e,
data: n,
successCallBack: y,
failCallBack: b,
completeCallBack: _
})
}, e.fail = function (e) {
try {
b && b(e)
} catch (t) {
throw _ && _(e), Error(t)
}
_ && _(e)
}, e.complete = null
} catch (e) {
se("Request Hook MiniProgram ErrorMessage:" + e.message)
}
return this(e)
}.bind(fe),
i = me(r);
Object.defineProperties(le, i);
var o = function (e) {
try {
var t = e.success,
n = e.fail,
r = e.complete;
e.success = function (e) {
var n;
if ("string" == typeof (n = "my" === de || "dd" === de ? e.code : e.result) && n.indexOf("sync-unique-id.html") > -1 && n.indexOf("bxWebviewDomain=") > -1) {
var r = $(),
i = r && r.path || ue,
o = n.match(/id=([^&]+)/) && n.match(/id=([^&]+)/)[1],
a = n.match(/uniqueId=([^&]+)/) && n.match(/uniqueId=([^&]+)/)[1],
c = n.match(/bxWebviewDomain=([^&]+)/) && n.match(/bxWebviewDomain=([^&]+)/)[1];
return o && a && c ? (z(a, (new Date).valueOf() + 6e5), void j(i + "?redirectUrl=" + encodeURIComponent(c + "/_____tmd_____/page/miniprogram_punish_test?rand=0-kl3qxl6j0GZPppl3AQepbgn9EDNG51RB9omWpVB5yAN8I5O6zO62smArMnSvkpPeEV7UTkRWIejP7OGQl5DQ&id=" + o) + "&subType=")) : void V({
title: "警告",
content: "同步失败,刷新控制台后重新扫码测试"
})
}
t(e)
}, e.fail = function (e) {
try {
n && n(e)
} catch (t) {
throw r && r(e), Error(t)
}
r && r(e)
}, e.complete = null
} catch (e) {
se("ScanCode Hook MiniProgram ErrorMessage:" + e.message)
}
return this(e)
}.bind(pe),
a = "dd" === de || "my" === de ? {
scan: {
value: o
}
} : {
scanCode: {
value: o
}
};
Object.defineProperties(le, a)
} else se("No available for current platform")
},
ge = O.platform,
ye = O.platformType,
Ae = O.getUserInfo,
we = O.request,
be = [],
_e = !1,
Se = !1,
ke = !1;
function Ie() {
if (Se = !1, be.length && !ke) {
for (var e = 0; e < be.length; e++) {
var t = be[e],
n = t.optionsCallBack,
r = t.response;
try {
n.fail && n.fail(r)
} catch (e) {
throw n.complete && n.complete(r), Error(e)
}
n.complete && n.complete(r)
}
be = []
}
}
function xe(e) {
if (Se = !1, be.length)
if (e) {
ke = !0;
var t = (be[0].optionsCallBack.url.split("?")[0] || "") + "/_____tmd_____/bxpath?co=" + encodeURIComponent("x5sec=" + e);
we({
url: t,
method: "GET",
fail: function (n) {
se("AliPay setCookie fail: x5sec:" + e + ",url:" + t + ",msg:" + JSON.stringify(n))
},
complete: function () {
for (var e = 0; e < be.length; e++) {
var t = be[e].optionsCallBack;
t && ge.request(t)
}
ke = !1, be = []
}
})
} else {
for (var n = 0; n < be.length; n++) {
var r = be[n].optionsCallBack;
r && ge.request(r)
}
be = []
}
}
function Ce(e) {
ce(e, 12, 1, "spl")
}
W(), U({
key: "baxiaToken",
success: function (e) {
e.data && H(e.data)
}
}), U({
key: "baxiaOptions",
success: function (e) {
e.data && K(e.data)
}
}),
function () {
try {
ve({
done: function (e) {
var t = e.optionsCallBack,
n = e.response,
r = e.data,
i = e.successCallBack,
o = e.failCallBack,
a = e.completeCallBack;
if (S(r).valid) {
try {
i && i(n)
} catch (e) {
throw a && a(n), Error(e)
}
a && a(n)
} else t.success = i, t.fail = o, t.complete = a,
function (e, t, n) {
var r, i;
void 0 === n && (n = {});
try {
var o = n.response,
a = "true" === (null === (r = null == o ? void 0 : o.data) || void 0 === r ? void 0 : r.miniLogin);
if (a || be.push(n), Se || _e) return;
var c = getCurrentPages(),
s = 0 !== c.length ? c[c.length - 1] : "";
if (null === (i = null == s ? void 0 : s.options) || void 0 === i ? void 0 : i.isBaxiaBlock) return;
var u = $() || {},
l = u.loginPage,
d = u.path,
f = void 0 === d ? ue : d,
p = u.ncLanguage;
if (a) return void(l ? (j(l + (l.indexOf("?") > -1 ? "&" : "?") + "isBaxiaBlock=true", (function () {
_e = !1
})), _e = !0) : se("登陆处置未配置登录页param:" + e + "," + JSON.stringify(n.options)));
if (e && -1 === e.indexOf("http")) {
var m = function (e) {
if (!e) return "";
var t = e.match(/(https|http):\/\/([^\/]+)\//i);
return t ? t[0] : ""
}(n.optionsCallBack.url);
e = m + e
}
p = p ? "&ncLanguage=" + p : "", j(f + "?redirectUrl=" + encodeURIComponent(e + "&platform=" + ye + p) + "&subType=" + t), Se = !0
} catch (t) {
Se = !1, se("handler errparam:" + e + "," + JSON.stringify(n.options) + "," + t.message + t.stack)
}
}(r.url || r.data && r.data.url, r.subType || r.data && r.data.subType, {
optionsCallBack: t,
response: n
})
}
})
} catch (e) {
se("Hook MiniProgram ErrorMessage:" + e.message)
}
}(),
function (e) {
ce(e, 15, 1, "baxia")
}("i,c"),
function () {
try {
var e = L("xlly"),
t = e.xlly_s,
n = e.expire,
r = (new Date).valueOf();
if (t && n && r - parseInt(n) < 0) return;
R("xlly"), setTimeout((function () {
return O.platform.request({
url: "https://fourier.taobao.com/rp?ext=52",
method: "GET",
timeout: 1e4,
success: function (e) {
if (function (e) {
return void 0 === e && (e = ""), "object" === o(e) && (e = JSON.stringify(e)), (e = e.toLocaleLowerCase()).indexOf("mini_simple") > -1
}(e)) {
var t = (new Date).getTime() + 864e5;
D("xlly", {
xlly_s: 1,
expire: t
})
}
},
fail: function (e) {
Ce("Send sample Message:" + e.errMsg)
}
})
}))
} catch (e) {
Ce("Send sample Message:" + e.message)
}
}()
})(i || (i = {}), i.lib || (i.lib = {})),
function (e) {
var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
e.enc = function (e) {
for (var n = [], r = 0; r < e.length; r += 3) {
var i = e[r] << 16 | e[r + 1] << 8 | e[r + 2];
n.push(t.charAt(i >> 18), t.charAt(i >> 12 & 63), t.charAt(i >> 6 & 63), t.charAt(63 & i))
}
return n.join("")
}
}(r || (r = {}));
var a, c, s, u, l, d, f, p = function () {
function e(e) {
this.fieldLengths = e, this.fieldOffsets = [];
for (var t = 0, n = 0; n < e.length; n++) this.fieldOffsets[n] = t, t += e[n];
this.buffer = new Uint8Array(t)
}
return e.prototype.set = function (e, t) {
var n = this.fieldOffsets[e],
r = this.fieldLengths[e];
if (1 !== r)
for (var i = r - 1; i >= 0; i--) this.buffer[n + i] = 255 & t, t >>>= 8;
else this.buffer[n] = t
}, e
}();
(function (e) {
var t;
e.enc = function (e) {
t || ((t = new Uint8Array(e.buffer.length + 2))[0] = 1);
var n = function (e) {
for (var t = 0, n = 0, r = e.length; n < r; n++) t = (t << 5) - t + e[n];
return 255 & t
}(e.buffer);
t[1] = n;
var i = n;
return function (e, t, n) {
for (var r = 0; r < e.length; r++) t[r] = e[r] ^ 255 & n, n = ~(131 * n)
}(e.buffer, t.subarray(2), i), r.enc(t)
}
})(a || (a = {})),
function (e) {
e.rand = function () {
return 4294967295 * Math.random() >>> 0
}, e.strHash = function (e) {
for (var t = 0, n = 0, r = e.length; n < r; n++) t = (t << 5) - t + e.charCodeAt(n), t >>>= 0;
return t
}, e.getSeconds = function () {
return Date.now() / 1e3 | 0
}, e.isU32Arr = function (e) {
return !!Array.isArray(e) && !e.some((function (e) {
return e >>> 0 !== e
}))
}, e.bitsToValue = function (e) {
for (var t = 0, n = e.length - 1; n >= 0; n--) {
t = t << 1 | (0 | +e[n])
}
return t
}, e.hook = function (e, t, n) {
var r = n(e[t]);
return e[t] = r, !0
}
}(c || (c = {})),
function (e) {
var t = 0;
e.getEventCount = function () {
return t
}, e.init = function () {
! function () {
var e = Component;
function n(e, n) {
c.hook(e, n, (function (e) {
return function () {
t++, e && e.apply(this, arguments)
}
}))
}
Component = function (t) {
return n(t, "attached"), n(t, "detached"), e(t)
}
}()
}
}(s || (s = {})),
function (e) {
var t, n, r, i, o, a = 255,
s = c.getSeconds();
function u() {
wx.getBatteryInfo({
success: function (e) {
t = 3, a = +e.level, n = e.isCharging;
var i = c.getSeconds();
n && (r += i - s), s = i
},
fail: function () {
t = 2
}
})
}
e.getBatteryState = function () {
return t
}, e.getChargingTime = function () {
return r
}, e.setChargingTime = function (e) {
r = e
}, e.getBatteryLevel = function () {
return a
}, e.isCharging = function () {
return n
}, e.getMotionResult = function () {
return o
}, e.getMotionStatus = function () {
return i
}, e.init = function () {
wx.getBatteryInfo ? (t = 1, u(), setInterval(u, 1e4)) : t = 0, wx.startDeviceMotionListening && wx.onDeviceMotionChange ? (i = 1, wx.onDeviceMotionChange((function (e) {
i = 3, o = e
})), wx.startDeviceMotionListening({
interval: "normal",
success: function () {
i = 3
},
fail: function () {
i = 2
}
})) : i = 0
}
}(u || (u = {})),
function (e) {
var t = new WeakMap,
n = 0,
r = 0;
e.getTopPageInfo = function () {
var e = function () {
var e = getCurrentPages();
if (e.length > 0) return e[e.length - 1]
}();
if (e) {
var n = t.get(e);
return n || (n = {
id: c.rand()
}, t.set(e, n)), n
}
}, e.getScrollEventCount = function () {
return n
}, e.getOtherEventCount = function () {
return r
}, e.init = function () {
! function () {
var e = Page;
function t(e, t) {
c.hook(e, t, (function (e) {
return function () {
"onPageScroll" === t ? n++ : r++, e && e.apply(this, arguments)
}
}))
}
Page = function (n) {
return t(n, "onLoad"), t(n, "onUnload"), t(n, "onShow"), t(n, "onHide"), t(n, "onResize"), t(n, "onPageScroll"), e(n)
}
}()
}
}(l || (l = {})),
function (e) {
var t, n, r, i, o, s, d = "__hsb__",
f = new p([4, 4, 4, 4, 4, 2, 4, 4, 4, 4, 4, 2, 4, 1, 1, 2, 1, 2, 2, 2, 2, 1, 1, 1, 1, 2]),
m = c.getSeconds(),
h = c.rand(),
v = 0,
g = 0;
function y() {
var e = c.getSeconds();
i += e - m, m = e, s = u.getChargingTime()
}
function A(e, t, n) {
return e > n ? 255 : e < t ? 0 : (e - t) / (n - t) * 255 | 0
}
function w(e) {
return "devtools" === e.brand
}
var b = ["devtools", "osx", "android", "windows", "ios"];
var _ = ["arm64-v7a", "arm64-v8a", "x86", "x86_64"];
function S() {
var e = App;
App = function (t) {
return c.hook(t, "onHide", (function (e) {
return function () {
g++,
function () {
y();
var e = [n, r, i, o, s];
wx.setStorageSync(d, e)
}(), e && e.call(this, t)
}
})), e(t)
}
}
e.gen = function (e) {
var n = l.getTopPageInfo(),
r = wx.getSystemInfoSync();
f.set(0, c.strHash(r.brand + r.model)), f.set(1, t), f.set(2, c.strHash(r.version)), f.set(3, function (e) {
var t = e.replace(/^https:\/\//, "").replace(/\?.*/, "");
return c.strHash(t)
}(e)), f.set(4, c.getSeconds()), f.set(5, ++v), f.set(6, n ? n.id : 0), f.set(7, h), y(), f.set(10, i), f.set(12, s), f.set(13, function (e) {
return b.indexOf(e.platform) + 1
}(r)), f.set(14, function (e) {
var t = e.abi || "";
return _.indexOf(t) + 1
}(r));
var o = function (e) {
return ["zh_CN" === e.language, -480 === (new Date).getTimezoneOffset(), w(e), g > 0, u.isCharging(), e.wifiEnabled, e.bluetoothEnabled, e.locationEnabled, e.locationAuthorized, e.microphoneAuthorized, e.notificationAuthorized]
}(r);
f.set(15, c.bitsToValue(o)), f.set(16, u.getBatteryLevel()), f.set(17, l.getScrollEventCount()), f.set(18, l.getOtherEventCount()), f.set(19, r.windowWidth), f.set(20, r.windowHeight);
var d = u.getMotionResult();
d && (f.set(21, A(d.alpha, 0, 360)), f.set(22, A(d.beta, -90, 90)), f.set(23, A(d.gamma, -180, 180)));
var p = u.getBatteryState() << 2 | u.getMotionStatus();
return f.set(24, p), a.enc(f)
}, e.init = function () {
! function () {
var e = wx.getStorageSync(d);
c.isU32Arr(e) ? (n = e[0], r = e[1], i = e[2], o = e[3], s = e[4]) : (n = c.rand(), r = c.getSeconds(), i = 0, o = 0, s = 0)
}();
var e = wx.getAccountInfoSync();
t = c.strHash(e.miniProgram.appId), f.set(9, n), f.set(8, r), f.set(10, i), f.set(11, ++o), u.init(), u.setChargingTime(s), l.init(), S()
}
}(d || (d = {})), f || (f = {}),
function () {
if ("undefined" != typeof wx) try {
(function () {
var e = wx.request;
function t(t) {
try {
if (t && t.url) {
var n = d.gen(t.url);
n && (t.header || (t.header = {}), t.header["x-ticid"] = n)
}
} catch (e) {}
return e(t)
}
Object.defineProperty(wx, "request", {
get: function () {
return t
}
})
})(), d.init()
} catch (e) {}
}()
},
809: function (e, t, n) {
var r = n(715),
i = n.n(r)();
t.A = i
},
858: function (e, t, n) {
n.d(t, {
E: function () {
return m
},
K: function () {
return d
}
});
var r = n(5652),
i = n(2555),
o = n(2573),
a = n.n(o),
c = n(1860),
s = !1,
u = function (e, t) {
return new Promise((function (n) {
setTimeout((function () {
n(t)
}), e)
}))
},
l = function () {
return s = !0, c.D.getCurrentCity()
};
function d() {
return f.apply(this, arguments)
}
function f() {
return (f = (0, i.A)((0, r.A)().m((function e() {
var t, n, i, o, d, f, p, m, h, v, g, y, A, w, b, _, S = arguments;
return (0, r.A)().w((function (e) {
for (;;) switch (e.p = e.n) {
case 0:
if (t = S.length > 0 && void 0 !== S[0] ? S[0] : {}, n = t.timeout, i = void 0 === n ? 10 : n, o = a().getCurrentInstance().router, d = {
code: "852",
name: "北京"
}, e.p = 1, null == o || null === (f = o.params) || void 0 === f || !f.citycode) {
e.n = 2;
break
}
return e.a(2, {
code: null == o || null === (h = o.params) || void 0 === h ? void 0 : h.citycode,
name: null == o || null === (v = o.params) || void 0 === v ? void 0 : v.cityname
});
case 2:
if (g = c.D.getUserSelectedCitySite(), y = g.name, A = g.damaiId, !y || "0" === A) {
e.n = 3;
break
}
return e.a(2, {
name: y,
code: A
});
case 3:
if (!s) {
e.n = 4;
break
}
return e.a(2, d);
case 4:
return e.n = 5, Promise.race([l(), u(i, {
city: d
})]);
case 5:
return w = e.v, b = (null == w || null === (p = w.city) || void 0 === p ? void 0 : p.cityName) || d.name, _ = (null == w || null === (m = w.city) || void 0 === m ? void 0 : m.damaiId) || d.code, e.a(2, {
name: b,
code: _
});
case 6:
return e.p = 6, e.v, e.a(2, Promise.resolve(d))
}
}), e, null, [
[1, 6]
])
})))).apply(this, arguments)
}
var p = function () {
return s = !0, c.D.getLocation()
};
function m() {
return h.apply(this, arguments)
}
function h() {
return (h = (0, i.A)((0, r.A)().m((function e() {
var t, n, i, o, a, l, d, f, m = arguments;
return (0, r.A)().w((function (e) {
for (;;) switch (e.p = e.n) {
case 0:
if (t = m.length > 0 && void 0 !== m[0] ? m[0] : {}, n = t.timeout, i = void 0 === n ? 10 : n, o = {
latitude: "0",
longitude: "0"
}, e.p = 1, a = c.D.getUserLocation(), l = a.latitude, d = a.longitude, "0" === "".concat(l) || "0" === "".concat(d)) {
e.n = 2;
break
}
return e.a(2, {
latitude: l,
longitude: d
});
case 2:
if (!s) {
e.n = 3;
break
}
return e.a(2, o);
case 3:
return e.n = 4, Promise.race([p(), u(i, o)]);
case 4:
return f = e.v, e.a(2, f);
case 5:
return e.p = 5, e.v, e.a(2, o)
}
}), e, null, [
[1, 5]
])
})))).apply(this, arguments)
}
},
898: function (e, t, n) {
n.d(t, {
Di: function () {
return r.D
},
E9: function () {
return i.E
},
KM: function () {
return i.K
}
});
var r = n(1860),
i = n(858)
},
902: function (e) {
function t(e) {
var t = new Error("Cannot find module '" + e + "'");
throw t.code = "MODULE_NOT_FOUND", t
}
t.keys = function () {
return []
}, t.resolve = t, t.id = 902, e.exports = t
},
1091: function (e, t, n) {
var r = n(2573),
i = n.n(r),
o = n(4911);
t.A = function (e, t, n) {
var r = e + "",
a = t + "",
c = n || {},
s = null != c && c.contentlabel ? c.contentlabel : "";
s = s.replace(/%/g, "");
var u = null != c && c.spm_cnt ? c.spm_cnt : "",
l = function (e) {
return null != e && e.liveStatus && e.liveStartTime ? e.schema : ""
}(c.item);
if (l) o.A.navTo(l, {
spm: u,
contentlabel: s
});
else if ("0" !== a && "1" !== a && "2" !== a && (a = r.length > 9 ? "1" : "0"), "0" === a) i().showToast({
title: "该项目已失效~",
icon: "none"
});
else if ("1" === a) o.A.navTo("/subPackages/detail/item", {
spm: u,
id: r,
contentlabel: s
});
else {
if ("2" !== a) return void i().showToast({
title: "该项目已失效~",
icon: "none"
});
var d = "https://m.damai.cn/damai/project/item.html?id=".concat(r);
o.A.navTo(d, {
spm: u
})
}
}
},
1395: function (e) {
var t = "function" == typeof Buffer,
n = "function" == typeof TextDecoder ? new TextDecoder : void 0,
r = "function" == typeof TextEncoder ? new TextEncoder : void 0,
i = Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),
o = function (e) {
var t = {};
return e.forEach((function (e, n) {
return t[e] = n
})), t
}(i),
a = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,
c = String.fromCharCode.bind(String),
s = "function" == typeof Uint8Array.from ? Uint8Array.from.bind(Uint8Array) : function (e) {
return new Uint8Array(Array.prototype.slice.call(e, 0))
},
u = function (e) {
return e.replace(/=/g, "").replace(/[+\/]/g, (function (e) {
return "+" === e ? "-" : "_"
}))
},
l = function (e) {
return e.replace(/[^A-Za-z0-9\+\/]/g, "")
},
d = "function" == typeof btoa ? function (e) {
return btoa(e)
} : t ? function (e) {
return Buffer.from(e, "binary").toString("base64")
} : function (e) {
for (var t, n, r, o, a = "", c = e.length % 3, s = 0; s < e.length;) {
if ((n = e.charCodeAt(s++)) > 255 || (r = e.charCodeAt(s++)) > 255 || (o = e.charCodeAt(s++)) > 255) throw new TypeError("invalid character found");
a += i[(t = n << 16 | r << 8 | o) >> 18 & 63] + i[t >> 12 & 63] + i[t >> 6 & 63] + i[63 & t]
}
return c ? a.slice(0, c - 3) + "===".substring(c) : a
},
f = t ? function (e) {
return Buffer.from(e).toString("base64")
} : function (e) {
for (var t = [], n = 0, r = e.length; n < r; n += 4096) t.push(c.apply(null, e.subarray(n, n + 4096)));
return d(t.join(""))
},
p = function (e) {
if (e.length < 2) {
var t = e.charCodeAt(0);
return t < 128 ? e : t < 2048 ? c(192 | t >>> 6) + c(128 | 63 & t) : c(224 | t >>> 12 & 15) + c(128 | t >>> 6 & 63) + c(128 | 63 & t)
}
return t = 65536 + 1024 * (e.charCodeAt(0) - 55296) + (e.charCodeAt(1) - 56320), c(240 | t >>> 18 & 7) + c(128 | t >>> 12 & 63) + c(128 | t >>> 6 & 63) + c(128 | 63 & t)
},
m = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,
h = t ? function (e) {
return Buffer.from(e, "utf8").toString("base64")
} : r ? function (e) {
return f(r.encode(e))
} : function (e) {
return d(function (e) {
return e.replace(m, p)
}(e))
},
v = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,
g = function (e) {
switch (e.length) {
case 4:
var t = ((7 & e.charCodeAt(0)) << 18 | (63 & e.charCodeAt(1)) << 12 | (63 & e.charCodeAt(2)) << 6 | 63 & e.charCodeAt(3)) - 65536;
return c(55296 + (t >>> 10)) + c(56320 + (1023 & t));
case 3:
return c((15 & e.charCodeAt(0)) << 12 | (63 & e.charCodeAt(1)) << 6 | 63 & e.charCodeAt(2));
default:
return c((31 & e.charCodeAt(0)) << 6 | 63 & e.charCodeAt(1))
}
},
y = function (e) {
return e.replace(v, g)
},
A = "function" == typeof atob ? function (e) {
return atob(l(e))
} : t ? function (e) {
return Buffer.from(e, "base64").toString("binary")
} : function (e) {
if (e = e.replace(/\s+/g, ""), !a.test(e)) throw new TypeError("malformed base64.");
var t, n, r;
e += "==".slice(2 - (3 & e.length));
for (var i = [], s = 0; s < e.length;) t = o[e.charAt(s++)] << 18 | o[e.charAt(s++)] << 12 | (n = o[e.charAt(s++)]) << 6 | (r = o[e.charAt(s++)]), 64 === n ? i.push(c(t >> 16 & 255)) : 64 === r ? i.push(c(t >> 16 & 255, t >> 8 & 255)) : i.push(c(t >> 16 & 255, t >> 8 & 255, 255 & t));
return i.join("")
},
w = t ? function (e) {
return s(Buffer.from(e, "base64"))
} : function (e) {
return s(A(e).split("").map((function (e) {
return e.charCodeAt(0)
})))
},
b = t ? function (e) {
return Buffer.from(e, "base64").toString("utf8")
} : n ? function (e) {
return n.decode(w(e))
} : function (e) {
return y(A(e))
};
e.exports = {
encode: function (e) {
var t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
return t ? u(h(e)) : h(e)
},
decode: function (e) {
return b(function (e) {
return l(e.replace(/[-_]/g, (function (e) {
return "-" === e ? "+" : "/"
})))
}(e))
}
}
},
1479: function (e) {
var t = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.][^>]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,
n = /^<\/([-A-Za-z0-9_]+)[^>]*>/,
r = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,
i = l("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr"),
o = l("a,address,code,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video"),
a = l("abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"),
c = l("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"),
s = l("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),
u = l("wxxxcode-style,script,style,view,scroll-view,block");
function l(e) {
for (var t = {}, n = e.split(","), r = 0; r < n.length; r++) t[n[r]] = !0;
return t
}
e.exports = function (e, l) {
var d, f, p, m = [],
h = e;
for (m.last = function () {
return this[this.length - 1]
}; e;) {
if (f = !0, m.last() && u[m.last()]) e = e.replace(new RegExp("([\\s\\S]*?)</" + m.last() + "[^>]*>"), (function (e, t) {
return t = t.replace(/<!--([\s\S]*?)-->|<!\[CDATA\[([\s\S]*?)]]>/g, "$1$2"), l.chars && l.chars(t), ""
})), y("", m.last());
else if (0 == e.indexOf("\x3c!--") ? (d = e.indexOf("--\x3e")) >= 0 && (l.comment && l.comment(e.substring(4, d)), e = e.substring(d + 3), f = !1) : 0 == e.indexOf("</") ? (p = e.match(n)) && (e = e.substring(p[0].length), p[0].replace(n, y), f = !1) : 0 == e.indexOf("<") && ((p = e.match(t)) && (e = e.substring(p[0].length), p[0].replace(t, g), f = !1)), f) {
d = e.indexOf("<");
for (var v = ""; 0 === d;) v += "<", d = (e = e.substring(1)).indexOf("<");
v += d < 0 ? e : e.substring(0, d), e = d < 0 ? "" : e.substring(d), l.chars && l.chars(v)
}
if (e == h) throw "Parse Error: " + e;
h = e
}
function g(e, t, n, u) {
if (t = t.toLowerCase(), o[t])
for (; m.last() && a[m.last()];) y("", m.last());
if (c[t] && m.last() == t && y("", t), (u = i[t] || !!u) || m.push(t), l.start) {
var d = [];
n.replace(r, (function (e, t) {
var n = arguments[2] ? arguments[2] : arguments[3] ? arguments[3] : arguments[4] ? arguments[4] : s[t] ? t : "";
d.push({
name: t,
value: n,
escaped: n.replace(/(^|[^\\])"/g, '$1\\"')
})
})), l.start && l.start(t, d, u)
}
}
function y(e, t) {
if (t)
for (t = t.toLowerCase(), n = m.length - 1; n >= 0 && m[n] != t; n--);
else var n = 0;
if (n >= 0) {
for (var r = m.length - 1; r >= n; r--) l.end && l.end(m[r]);
m.length = n
}
}
y()
}
},
1789: function (e, t, n) {
n.d(t, {
t: function () {
return y
}
});
var r = n(5652),
i = n(2555),
o = n(4107),
a = n(29),
c = n(5517),
s = n(6703),
u = n(1925),
l = n(2573),
d = n.n(l),
f = n(8835),
p = n(5765),
m = n(4017),
h = n(6432),
v = n(898),
g = "h5_location_key",
y = function (e) {
function t() {
return (0, a.A)(this, t), (0, s.A)(this, t, arguments)
}
return (0, u.A)(t, e), (0, c.A)(t, [{
key: "getLocation",
value: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
t = (0, o.A)({
type: "wgs84",
altitude: !1,
isHighAccuracy: !1
}, e);
return new Promise((function (e, n) {
A().then((function (r) {
r ? e(r) : d().getLocation({
isHighAccuracy: t.isHighAccuracy,
altitude: t.altitude,
type: t.type,
success: function (t) {
d().setStorage({
key: g,
data: {
longitude: t.longitude,
latitude: t.latitude,
storageTime: (new Date).getTime()
}
}), e(t)
},
fail: function (e) {
n(e)
}
})
}))
}))
}
}, {
key: "intercept",
value: function () {
var e = (0, i.A)((0, r.A)().m((function e(t) {
var n, i, o, a, c, s, u, l, d, f, m, g, y, A, w, b = this;
return (0, r.A)().w((function (e) {
for (;;) switch (e.p = e.n) {
case 0:
if (i = t.uri, o = t.params, a = t.options, c = t.delay, s = new p.g(i), u = s.params, o)
for (l in o) u[l] = o[l];
if ("true" !== u.needcoordinate) {
e.n = 4;
break
}
return e.p = 1, e.n = 2, this.getLocation({
isHighAccuracy: !0,
type: "gcj02"
});
case 2:
d = e.v, u.latitude = d.latitude, u.longitude = d.longitude, e.n = 4;
break;
case 3:
e.p = 3, e.v;
case 4:
return (f = ((0, h.Jt)("launchQuery") || {}).query) && "string" == typeof f.bizpass_mock_scene && (u.bizpass_mock_scene = f.bizpass_mock_scene, u.bizpass_mock_cms = "yes"), m = s.toString() && s.toString().trim(), g = v.Di.getUserSelectedCitySite(), y = g.damaiId, A = g.name, y && A && (null === (n = m) || void 0 === n ? void 0 : n.indexOf("//t.damai.cn")) > -1 && (m = "https://t.damai.cn/yep/page/m/dmcacheCityJump?url=".concat(encodeURIComponent(m)), m += "&cityCode=".concat(y, "&cityName=").concat(A, "&overrideCity=YES")), !1, w = "redirectTo" === a.navigateType || "navigateTo" !== a.navigateType && a.redirect, c > 0 ? setTimeout((function () {
b.goto(m, w, a.switchTabPath)
}), c) : this.goto(m, w, a.switchTabPath), e.a(2, !0)
}
}), e, this, [
[1, 3]
])
})));
return function (t) {
return e.apply(this, arguments)
}
}()
}, {
key: "goto",
value: function (e, t, n) {
var r = "/pages/webview/index?url=" + encodeURIComponent(e);
t ? m.A.redirectTo({
url: r
}) : m.A.navigateTo({
url: r
})
}
}])
}(f.c),
A = function () {
return new Promise((function (e) {
d().getStorage({
key: g,
success: function (t) {
var n = t.data || {},
r = (new Date).getTime();
n && n.storageTime && n.storageTime + 9e5 > r ? e(n) : e(void 0)
},
fail: function () {
e(void 0)
}
})
}))
}
},
1860: function (e, t, n) {
n.d(t, {
D: function () {
return g
}
});
var r = n(4107),
i = n(5652),
o = n(2555),
a = n(4492),
c = n(2573),
s = n.n(c),
u = n(6432),
l = function (e, t) {
var n = s().getStorageSync(e),
r = s().getStorageSync(t);
n && !r && (s().setStorageSync(t, n), d(e))
},
d = function (e) {
s().removeStorage({
key: e
})
};
d("city");
var f = "DAMAI_LOC_CURRENT",
p = "DAMAI_LOC_SELECTED",
m = "DAMAI_LOC_COORDS";
l("key_pre_location_city_site", f), l("key_pre_user_selected_city_site", p), l("key_pre_user_slocation", m);
var h = {
damaiId: "852",
name: "北京",
cityCode: "110100"
},
v = {
latitude: 0,
longitude: 0
},
g = {
init: function () {
var e = y(f);
if (e) {
var t = JSON.parse(e);
null != t && t.damaiId && (0, u.hZ)("preLocationCitySite", t)
}(0, u.Jt)("preLocationCitySite") || (0, u.hZ)("preLocationCitySite", h);
var n = y(p);
if (n) {
var r = JSON.parse(n);
null != r && r.damaiId && (0, u.hZ)("preSelectedCitySite", r)
}
var i = y(m);
if (i) {
var o = JSON.parse(i);
o && (o.latitude || o.longitude) && (0, u.hZ)("preUserLocation", o)
}(0, u.Jt)("preSelectedCitySite") || (0, u.hZ)("preSelectedCitySite", h), (0, u.Jt)("preUserLocation") || (0, u.hZ)("preUserLocation", v), (0, u.hZ)("userSelectedCitySite", (0, u.Jt)("preSelectedCitySite")), (0, u.hZ)("userLocation", (0, u.Jt)("preUserLocation"));
var a = !y("frist_start");
(0, u.hZ)("isFirstStart", a), a && A("frist_start", "false"), this.updateUserSelectedCity((0, u.Jt)("userSelectedCitySite"))
},
getLocationCitySite: function () {
return (0, u.Jt)("locationCitySite")
},
getPreLocationCitySite: function () {
return (0, u.Jt)("preLocationCitySite")
},
getFirstStart: function () {
return (0, u.Jt)("isFirstStart")
},
getUserSelectedCitySite: function () {
return (0, u.Jt)("userSelectedCitySite")
},
setUserSelectedCitySite: function (e) {
e && (this.updateUserSelectedCity(e), A(p, JSON.stringify(e)))
},
setUserLocation: function (e) {
e && ((0, u.hZ)("userLocation", e), A(m, JSON.stringify(e)))
},
getUserLocation: function () {
return (0, u.Jt)("userLocation")
},
updateUserSelectedCity: function (e) {
e && (0, u.hZ)("userSelectedCitySite", e)
},
rejectChangeCity: function () {
(0, u.Jt)("locationCitySite")
},
getLocation: function () {
var e = this;
return (0, o.A)((0, i.A)().m((function t() {
var n;
return (0, i.A)().w((function (t) {
for (;;) switch (t.n) {
case 0:
return n = "获取定位失败", t.n = 1, a.A.getCurrentPosition();
case 1:
if (a.A.isAuthed) {
t.n = 2;
break
}
return t.a(2, new Promise((function (t) {
a.A.openAuthConfirm((0, o.A)((0, i.A)().m((function n() {
var r;
return (0, i.A)().w((function (n) {
for (;;) switch (n.n) {
case 0:
return n.n = 1, a.A.getCurrentPosition();
case 1:
(r = a.A.getPostion()) && (e.setUserLocation(r), t(r)), t((0, u.Jt)("userLocation"));
case 2:
return n.a(2)
}
}), n)
}))), (function () {
(0, c.showToast)({
title: n,
icon: "none"
}), t(v)
}))
})));
case 2:
return t.a(2, (0, u.Jt)("userLocation"))
}
}), t)
})))()
},
getDefaultLocation: function () {
return (0, u.Jt)("userLocation")
},
getCurrentCity: function () {
return new Promise((function (e) {
a.A.getCurrentCity().then((function (t) {
var n = t.city,
i = (0, r.A)({
name: n.cityName
}, n);
(0, u.hZ)("locationCitySite", i), e(t)
})).catch((function () {
e({
city: {
damaiId: h.damaiId,
cityName: h.name
}
})
}))
}))
},
checkAlertCitySelect: function () {
return (0, o.A)((0, i.A)().m((function e() {
var t, n, o, c, s;
return (0, i.A)().w((function (e) {
for (;;) switch (e.n) {
case 0:
return e.n = 1, a.A.getCurrentCity();
case 1:
if (n = e.v, o = n.city) {
e.n = 2;
break
}
return e.a(2, !1);
case 2:
if (c = (0, r.A)({
name: o.cityName
}, o), (0, u.hZ)("locationCitySite", c), String(c.damaiId) === String(null === (t = (0, u.Jt)("preLocationCitySite")) || void 0 === t ? void 0 : t.damaiId)) {
e.n = 3;
break
}
if ((0, u.hZ)("preLocationCitySite", c), A(f, JSON.stringify(c)), String(null === (s = (0, u.Jt)("userSelectedCitySite")) || void 0 === s ? void 0 : s.damaiId) === String(c.damaiId)) {
e.n = 3;
break
}
return e.a(2, !0);
case 3:
return e.a(2, !1)
}
}), e)
})))()
},
checkUserLocationChange: function () {
var e = this;
return new Promise((function (t, n) {
e.checkAlertCitySelect().then((function (r) {
var i = a.A.getPostion();
if (e.setUserLocation(i), r) {
var o = e.getLocationCitySite();
if (o) return "true" === String(e.getFirstStart()) ? (e.setUserSelectedCitySite(o), void t(o)) : void(o.name !== h.name ? s().showModal({
title: "地理位置变更",
content: "定位您在".concat(o.name, ",是否切换?"),
confirmText: "切换",
cancelText: "取消",
success: function (r) {
r.confirm ? (e.setUserSelectedCitySite(o), t(o)) : n(r)
},
fail: function (e) {
n(e)
}
}) : t(h));
n({
message: "未获取到城市信息"
})
} else n({
message: "定位城市未改变"
})
}))
}))
}
};
function y(e) {
try {
return s().getStorageSync(e)
} catch (e) {
return null
}
}
function A(e, t) {
try {
s().setStorageSync(e, t)
} catch (e) {}
}
g.init()
},
2267: function (e, t, n) {
var r = n(29),
i = (0, n(5517).A)((function e() {
(0, r.A)(this, e), this.context = null, this.contextName = "", this.isDevTools = !1, this.isAndroid = !1, this.isIos = !1, this.isBD = !1, this.isTT = !1, this.isDOUY = !1, this.isMY = !1, this.isWX = !1, this.appName = "", this.osVersion = "0.0", this.initContext(), this.parserUa()
}), [{
key: "initContext",
value: function () {
"undefined" != typeof tt ? (this.contextName = "tt", this.isTT = !0, this.context = tt, this.appName = "toutiao") : "undefined" != typeof swan ? (this.contextName = "swan", this.isSWAN = !0, this.context = swan, this.appName = "baidu") : "undefined" != typeof my ? (this.contextName = "my", this.isMY = !0, this.context = my, this.appName = "alipay") : "undefined" != typeof wx && (this.contextName = "wx", this.isWX = !0, this.context = wx, this.appName = "weixin")
}
}, {
key: "parserUa",
value: function () {
if (!this.systemInfo) {
try {
this.systemInfo = this.context.getSystemInfoSync()
} catch (e) {
return
}
var e = this.systemInfo.system.split(" "),
t = e[0];
"Android" === t ? this.isAndroid = !0 : "iOS" === t && (this.isIos = !0), this.osVersion = e[1], this.isDevTools = "devtools" === this.systemInfo.platform, this.isTT && !this.isDevTools && (this.appName = this.systemInfo.appName, "Douyin" === this.appName && (this.isDOUY = !0, this.isTT = !1))
}
}
}, {
key: "updateToDouyin",
value: function () {
this.isDevTools && (this.isTT || this.isDOUY) && (this.isDOUY = !0, this.isTT = !1, this.appName = "Douyin")
}
}, {
key: "getSystemInfoSync",
value: function () {
this.ensureUa()
}
}]);
t.A = new i
},
2531: function (e, t, n) {
n.d(t, {
A: function () {
return i
}
});
var r = {
"pages/home/index": {
name: "Page_DMWXHome",
spm: "home",
manualSendPV: !0
},
"pages/city/index": {
name: "Page_DMWXCity",
manualSendPV: !0,
spm: "city_select"
},
"pages/mine/index": {
name: "Page_DMWXMine",
manualSendPV: !0,
spm: "mydamai"
},
"pages/search/index": {
name: "Page_DMWXSearch",
manualSendPV: !0,
spm: "search"
},
"pages/pay/index": {
name: "Page_DMWXPay",
manualSendPV: !0,
spm: "pay"
},
"subPackages/category/index": {
name: "Page_DMWXCategory",
manualSendPV: !0,
spm: ""
},
"subPackages/detail/item": {
name: "Page_DMWXDetail",
manualSendPV: !0,
spm: "product_detail"
},
"subPackages/sku/index": {
name: "Page_DMWXSku",
manualSendPV: !0,
spm: "sku"
},
"subPackages/order-pay/index": {
name: "Page_DMWXOrderPay",
manualSendPV: !0,
spm: "orderconfirm"
}
};
function i() {
return r
}
},
2658: function (e, t, n) {
n.d(t, {
Kj: function () {
return s
},
Ru: function () {
return i
},
Xw: function () {
return c
},
aS: function () {
return a
},
b8: function () {
return u
},
cU: function () {
return d
},
jL: function () {
return r
},
wB: function () {
return l
},
zL: function () {
return o
}
});
var r = "https://oss.taopiaopiao.com",
i = function (e) {
return e.HOME_PRIVACY_POPUP = "HOME_PRIVACY_POPUP", e
}({}),
o = "SEARCH_REQUEST_ID_KEY",
a = ["hixiaoman.com", "debo5debo.cn", "debo4debo.cn", "meta-huanxuan.com", "meta-xuantan.com"],
c = ["ipassport.damai.cn", "ipassportpre.damai.cn", "ipassport.damai.test"],
s = ["skip_sessionfilter/login_token_login"],
u = "大麦网推荐",
l = void 0,
d = {
IOS: 1,
HARMONY: 2,
OPPO: 3,
VIVO: 4,
HONOR: 5
}
},
2945: function (e, t, n) {
n.d(t, {
Ay: function () {
return d
},
ry: function () {
return m
}
});
var r = n(29),
i = n(5517),
o = n(9371),
a = n(2573),
c = n.n(a),
s = n(758),
u = n(3919).document,
l = (0, i.A)((function e() {
(0, r.A)(this, e), (0, o.A)(this, "current", "notExp")
}), [{
key: "onExp",
value: function () {
this.current = "shouldExp"
}
}, {
key: "onCall",
value: function (e) {
e.intersectionRatio > 0 && "notExp" === this.current && (this.current = "shouldExp")
}
}, {
key: "exp",
value: function () {
this.current = "hadExp"
}
}]);
function d(e, t, n, r) {
var i = new l,
o = Array.isArray(n) ? n : [];
(0, s.useEffect)((function () {
var n = h({
className: e,
sm: i,
cb: t,
config: r
});
return function () {
n.disconnect()
}
}), o)
}
var f = [],
p = [];
function m(e, t, n, r) {
var i = Array.isArray(n) ? n : [];
(0, s.useEffect)((function () {
e.forEach((function (e, n) {
var i = new l,
o = h({
className: e,
sm: i,
cb: t,
index: n,
config: r
});
p.push(o)
}))
}), i), (0, s.useEffect)((function () {
return function () {
p.forEach((function (e) {
return null == e ? void 0 : e.disconnect()
})), p = [], f = []
}
}), [])
}
var h = function (e) {
var t = e.index,
n = void 0 === t ? 0 : t,
r = e.className,
i = e.sm,
o = e.cb,
a = (e.config || {}).useDom,
s = void 0 !== a && a,
l = c().createIntersectionObserver(c().getCurrentInstance().page, {
observeAll: !0,
thresholds: [.2, .9]
}),
d = setTimeout((function () {
l.relativeToViewport({}).observe(".".concat(r), (function (e) {
if (!f.includes(r) && (f.push(r), i.onCall(e), "shouldExp" === i.current)) {
var t = null;
s && (t = null != e && e.id ? u.querySelector("#".concat(e.id)) : null), o(n, r, t), i.exp()
}
})), clearTimeout(d)
}));
return l
}
},
3150: function (e, t, n) {
n.d(t, {
Wx: function () {
return c
},
ZV: function () {
return s
}
});
var r = n(9351),
i = n(4752),
o = n(7852),
a = (0, r._U)((function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
t = e.logKey,
n = e.logType,
r = e.logData;
r && (0, o.Qd)(r.msg) && (r.msg = JSON.stringify(r.msg)), i.Ay.sendGoldLog(n, t, r)
})),
c = function (e) {
a("sum", e)
},
s = function (e) {
a("error", e)
};
t.Ay = a
},
3151: function (e, t, n) {
n.d(t, {
A: function () {
return v
}
});
var r = n(5652),
i = n(4576),
o = n(2555),
a = n(7852),
c = n(5059),
s = n(4107),
u = n(29),
l = n(5517),
d = n(3150),
f = n(4017),
p = ["FAIL_SYS_SESSION_EXPIRED", "FAIL_SYS_TRAFFIC_LIMIT"],
m = (0, l.A)((function e() {
(0, u.A)(this, e)
}), null, [{
key: "afterResponse",
value: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
n = arguments.length > 2 ? arguments[2] : void 0,
r = (e.url || e.api || "").toLowerCase();
e && e.data && e.data.patternName && (r = [].concat(r.split("."), e.data.patternName).reverse().join("."));
for (var i = 0 === t.retType, o = t.ret && t.ret[0], a = "[".concat(f.A.is, "] ").concat(o), c = {
eagleeyeId: t.responseHeaders && t.responseHeaders["x-eagleeye-id"],
request: (0, s.A)({}, e.data)
}, u = JSON.stringify(c), l = !0, m = 0, h = p; m < h.length; m++) {
var v = h[m]; - 1 !== a.indexOf(v) && (l = !1)
}
l && (0, d.Ay)("api", r, i, n, a, u)
}
}]);
function h(e) {
e = "string" == typeof e ? {
url: e,
method: "GET"
} : e, this.defaults = e || {}
}
h.prototype.request = function () {
var e = (0, o.A)((0, r.A)().m((function e(t) {
var n, o, s, u, l, d, f, p;
return (0, r.A)().w((function (e) {
for (;;) switch (e.n) {
case 0:
return t = "string" == typeof t ? {
url: t,
method: "GET"
} : (0, a.X$)(!0, {}, this.defaults, t), n = (new Date).getTime(), e.n = 1, (0, c.Ay)(t);
case 1:
o = e.v, s = (0, i.A)(o, 3), u = s[0], l = s[1], d = s[2], f = (new Date).getTime();
try {
p = d.duration || f - n, m.afterResponse(t, d, p)
} catch (e) {}
return e.a(2, [u, l, d])
}
}), e, this)
})));
return function (t) {
return e.apply(this, arguments)
}
}(), h.setChannel = c.Bn;
var v = h
},
3260: function (e, t) {
t.A = "_LOGINED_SESSION_"
},
3338: function (e, t, n) {
n.d(t, {
t: function () {
return l
},
w: function () {
return u
}
});
var r = n(5652),
i = n(2555),
o = n(2573),
a = n.n(o),
c = function (e) {
return "https://kuai-cdn.taopiaopiao.com/cfg/".concat(e, ".json?t=").concat(Date.now())
},
s = function () {
var e = (0, i.A)((0, r.A)().m((function e(t) {
var n;
return (0, r.A)().w((function (e) {
for (;;) switch (e.p = e.n) {
case 0:
return e.p = 0, e.n = 1, a().request({
url: c(t)
});
case 1:
if (200 !== (n = e.v).statusCode) {
e.n = 2;
break
}
return e.a(2, n.data);
case 2:
return e.a(2, void 0);
case 3:
return e.p = 3, e.v, e.a(2, void 0)
}
}), e, null, [
[0, 3]
])
})));
return function (t) {
return e.apply(this, arguments)
}
}(),
u = function () {
var e = (0, i.A)((0, r.A)().m((function e() {
var t;
return (0, r.A)().w((function (e) {
for (;;) switch (e.n) {
case 0:
return t = "9ce6587c749a424b82ed085f1db9b864", e.a(2, s(t))
}
}), e)
})));
return function () {
return e.apply(this, arguments)
}
}(),
l = function () {
var e = (0, i.A)((0, r.A)().m((function e() {
var t;
return (0, r.A)().w((function (e) {
for (;;) switch (e.n) {
case 0:
return t = "0702da4055234221bb8e4c4624cab06b", e.a(2, s(t))
}
}), e)
})));
return function () {
return e.apply(this, arguments)
}
}()
},
3451: function (e, t, n) {
n.d(t, {
c: function () {
return a
}
});
var r = n(5652),
i = n(2555),
o = n(29),
a = (0, n(5517).A)((function e() {
(0, o.A)(this, e)
}), [{
key: "intercept",
value: function () {
var e = (0, i.A)((0, r.A)().m((function e(t) {
return (0, r.A)().w((function (e) {
for (;;) switch (e.n) {
case 0:
case 1:
return e.a(2)
}
}), e)
})));
return function (t) {
return e.apply(this, arguments)
}
}()
}])
},
3523: function (e, t, n) {
var r = n(469),
i = n(5765),
o = n(334),
a = n(3816),
c = n(4492),
s = n(2267),
u = n(9365),
l = n(6432),
d = n(2573),
f = n(898),
p = ["token", "uid", "sid", "munb", "_from", "source_platform", "pc_i", "pu_i", "refurl", "scene_id", "dmpublic_id", "citysite_id", "mpv"];
function m(e) {
return !e || 0 === e.length
}
var h = {
getOriginUrl: function (e) {
return function (e, t) {
if (e && t) {
var n = e.indexOf("http");
if (n >= 0 && n < 8) {
var o, a = new i.g(e),
c = a.params,
s = (0, r.A)(t);
try {
for (s.s(); !(o = s.n()).done;) {
var u = o.value;
u in c && delete c[u]
}
} catch (e) {
s.e(e)
} finally {
s.f()
}
return a.toString()
}
}
return e
}(e, p)
},
getWeappParamsUrl: function (e) {
return function (e) {
if (e) {
var t = u.A,
n = e.indexOf("http");
if (n >= 0 && n < 8) {
for (var r, p = new i.g(e), h = p.params, v = 0, g = Object.keys(h); v < g.length; v++) {
var y = g[v];
"undefined" === h[y] && (h[y] = "")
}
h.munb = a.A.getHavanaId(), h.scene_id = t.getSceneId();
var A = a.A.getUserId(),
w = a.A.getOpenId(),
b = a.A.getUserId();
if (A && (h.uid = A), w && (h.token = w), b && (h.pu_i = b), m(h.utm)) {
var _ = t.getUTM();
m(_) || (h.utm = _)
}
h.pc_i = a.A.getUtdid(), h.mpv = o.A.appVersion, s.A.isWX ? (h._from = "wxProgram", h.source_platform = "weixin") : s.A.isSWAN && (h._from = "duProgram");
var S = (0, d.getCurrentPages)();
if (S && S.length >= 2) {
var k = S[S.length - 1];
k.route = k.route || k.__route__;
var I = "https://m.damai.cn/" + k.route;
h.refurl = I
}
var x = t.getRefAppId();
m(x) || (h.dmpublic_id = x);
var C = c.A.getCity();
C && (h.citysite_id = C.cityId);
var T = null === (r = (0, l.Jt)("SEARCH_REQUEST_ID_KEY")) || void 0 === r ? void 0 : r.id;
if (T ? h.search_request_id = T : h.clear_search_request_id = "true", /\/\/(m|market|pre-market[12345]\.wapa)\.damai\.cn/.test(e) && !h.cityCode) {
var E = f.Di.getUserSelectedCitySite(),
O = E.damaiId,
P = E.name;
O && P && (h.cityCode = O, h.cityName = P, h.overrideCity = "YES")
}
var N = (0, l.Jt)("ossDMArmsRate");
return N && (h.bizpass_arms_rate = N), "1" === (0, l.Jt)("ossEnableDowngrade") && (h.bizpass_downgrade = "yes"), p.toString()
}
}
return e
}(e)
}
};
t.A = h
},
3716: function (e, t, n) {
n.d(t, {
V: function () {
return A
}
});
var r, i = n(4107),
o = n(4576),
a = n(5652),
c = n(2555),
s = n(29),
u = n(5517),
l = n(9371),
d = n(2573),
f = n.n(d),
p = n(3816),
m = n(3150),
h = n(334),
v = n(4921),
g = function () {
return "m" === (null === h.A || void 0 === h.A ? void 0 : h.A.getEnv())
},
y = "https://cfg.damai.cn/cfg/".concat(g() ? "429415df2e44456ebdeb6617d657355a" : "a742d01f6df34115bb4903cfb22fa222", ".json"),
A = function (e) {
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "";
(0, m.Ay)({
code: 1e3,
msg: e,
m1: 1,
c1: JSON.stringify(t)
})
};
function w() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : (new Date).getTime(),
t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : -8,
n = (new Date).getTimezoneOffset() / 60,
r = n - t,
i = e + 60 * r * 60 * 1e3;
return i
}
var b = function () {
function e() {
(0, s.A)(this, e), (0, l.A)(this, "cdnConfig", null), (0, l.A)(this, "wasmWorker", null), (0, l.A)(this, "wasmImgBuffer", null), (0, l.A)(this, "verifyImgBuffer", null), (0, l.A)(this, "wasmSubpackageFlag", !1), (0, l.A)(this, "wasmWorkerFailTimes", {}), (0, l.A)(this, "loadResLock", !1)
}
return (0, u.A)(e, [{
key: "fetchCdnConfig",
value: function () {
var e = this;
return new Promise((function (t) {
if (e.cdnConfig) return t(e.cdnConfig);
f().request({
url: y,
success: function (n) {
var r = n.data;
return r ? (e.cdnConfig = r, t(r)) : (A("wasm_fetch_cdn_empty"), t(null))
},
fail: function (e) {
return A("wasm_fetch_cdn_fail", e), t(null)
}
})
}))
}
}, {
key: "requireSubPackage",
value: function () {
var e = this;
return new Promise((function (t) {
if (e.wasmSubpackageFlag) return t(!0);
require("./utils-packages/wasm/index.js", (function () {
return e.wasmSubpackageFlag = !0, t(!0)
}), (function (n) {
return A("wasm_require_sub_err", n), e.wasmSubpackageFlag = !1, t(!1)
}))
}))
}
}, {
key: "createWorkerProgress",
value: function () {
var e = (0, c.A)((0, a.A)().m((function e() {
var t = this;
return (0, a.A)().w((function (e) {
for (;;) switch (e.n) {
case 0:
return e.a(2, new Promise(function () {
var e = (0, c.A)((0, a.A)().m((function e(n) {
return (0, a.A)().w((function (e) {
for (;;) switch (e.n) {
case 0:
if (!t.wasmWorker) {
e.n = 1;
break
}
return e.a(2, n(!0));
case 1:
(0, v.A)(t.requireSubPackage.bind(t)).then((function (e) {
if (e) try {
var r = function () {
t.wasmWorker = f().createWorker("workers/wasm/wasmWorker.js", {
useExperimentalWorker: !0
}), t.wasmWorker && (t.wasmWorker.onProcessKilled((function () {
return r()
})), t.wasmWorker.onError((function (e) {
return A("wasm_create_worker_on_err", e)
})))
};
return r(), t.wasmWorker ? (A("wasm_create_worker_success"), n(!0)) : (A("wasm_create_worker_empty"), n(!1))
} catch (e) {
return A("wasm_create_worker_catch", e), n(!1)
}
return n(!1)
}));
case 2:
return e.a(2)
}
}), e)
})));
return function (t) {
return e.apply(this, arguments)
}
}()))
}
}), e)
})));
return function () {
return e.apply(this, arguments)
}
}()
}, {
key: "fetchImgBuffer",
value: function (e) {
return new Promise((function (t) {
if (!e) return t(null);
f().request({
url: "".concat(e, "?t=").concat((new Date).getTime()),
responseType: "arraybuffer",
success: function (e) {
return null != e && e.data ? t(null == e ? void 0 : e.data) : (A("wasm_fetch_buffer_empty"), t(null))
},
fail: function (e) {
return A("wasm_fetch_buffer_err", e), t(null)
}
})
}))
}
}, {
key: "fetchWorkerData",
value: function (e) {
var t = this;
return new Promise((function (n) {
try {
t.wasmWorker.postMessage(e), t.wasmWorker.onMessage(n)
} catch (e) {
return A("wasm_fetch_worker_catch", e), n(null)
}
}))
}
}, {
key: "getCommonParams",
value: function (e) {
return {
time: w(),
sid: p.A.getSid(),
userId: p.A.getHavanaId(),
idx_val: e,
idx_key: "itemId"
}
}
}, {
key: "clearCache",
value: function () {
this.cdnConfig = null, this.wasmImgBuffer = null, this.verifyImgBuffer = null
}
}, {
key: "loadWasmPic",
value: function () {
var e = this;
return new Promise(function () {
var t = (0, c.A)((0, a.A)().m((function t(n) {
var r, i, c, s, u, l, d, f, p, m, h, v, y, w, b, _;
return (0, a.A)().w((function (t) {
for (;;) switch (t.p = t.n) {
case 0:
if (!(e.cdnConfig && e.wasmImgBuffer && e.verifyImgBuffer)) {
t.n = 1;
break
}
return t.a(2, n());
case 1:
return t.n = 2, e.fetchCdnConfig();
case 2:
return t.n = 3, e.createWorkerProgress();
case 3:
if (e.wasmWorker) {
t.n = 4;
break
}
return t.a(2, n());
case 4:
if (e.cdnConfig) {
t.n = 5;
break
}
return t.a(2, n());
case 5:
return t.n = 6, e.fetchWorkerData({
type: "decodePic",
data: e.cdnConfig.tt
});
case 6:
if (null !== (r = t.v)) {
t.n = 7;
break
}
return t.a(2, n());
case 7:
if (!r || "decodePic" !== (null == r ? void 0 : r.type)) {
t.n = 15;
break
}
if (null == r || !r.data) {
t.n = 14;
break
}
return t.p = 8, i = JSON.parse(r.data) || {}, c = i.imgUrlProd, s = void 0 === c ? "" : c, u = i.imgUrlPre, l = void 0 === u ? "" : u, d = i.verifyImgUrlProd, f = void 0 === d ? "" : d, p = i.verifyImgUrlPre, m = void 0 === p ? "" : p, h = g() ? s : l, v = g() ? f : m, t.p = 9, t.n = 10, Promise.all([e.fetchImgBuffer(h), e.fetchImgBuffer(v)]);
case 10:
y = t.v, w = (0, o.A)(y, 2), b = w[0], _ = w[1], b && _ && (!e.wasmImgBuffer && (e.wasmImgBuffer = b), !e.verifyImgBuffer && (e.verifyImgBuffer = _)), t.n = 12;
break;
case 11:
t.p = 11, t.v;
case 12:
return t.a(2, n());
case 13:
t.p = 13, t.v;
case 14:
return A("wasm_decode_pic_err", r), t.a(2, n());
case 15:
return A("wasm_decode_pic_mess", r), t.a(2, n());
case 16:
return t.a(2)
}
}), t, null, [
[9, 11],
[8, 13]
])
})));
return function (e) {
return t.apply(this, arguments)
}
}())
}
}, {
key: "verifySign",
value: function (e) {
var t = this,
n = e || {},
r = n.name,
o = n.text,
s = n.itemId,
u = n.ctext;
return new Promise(function () {
var n = (0, c.A)((0, a.A)().m((function n(c) {
var l, d;
return (0, a.A)().w((function (n) {
for (;;) switch (n.n) {
case 0:
if (r && o && s && u) {
n.n = 1;
break
}
return A("wasm_verify_params_empty", e), n.a(2, c(!1));
case 1:
return n.n = 2, t.loadWasmPic();
case 2:
if (t.wasmWorker) {
n.n = 4;
break
}
if (t.wasmWorkerFailTimes[s] = (t.wasmWorkerFailTimes[s] || 0) + 1, !(t.wasmWorkerFailTimes[s] <= 10)) {
n.n = 3;
break
}
return n.a(2, c(!0));
case 3:
return n.a(2, c(!1));
case 4:
if (null !== (l = t.cdnConfig) && void 0 !== l && l.ptt) {
n.n = 5;
break
}
return n.a(2, c(!1));
case 5:
if (t.verifyImgBuffer) {
n.n = 6;
break
}
return n.a(2, c(!1));
case 6:
return n.n = 7, t.fetchWorkerData((0, i.A)({
type: "verify",
text: o,
name: r,
ctext: u,
ptt: t.cdnConfig.ptt,
imageBuffer: t.verifyImgBuffer
}, t.getCommonParams(s)));
case 7:
if (null !== (d = n.v)) {
n.n = 8;
break
}
return n.a(2, c(!1));
case 8:
if (!d || "verify" !== (null == d ? void 0 : d.type)) {
n.n = 11;
break
}
if ("0" !== (null == d ? void 0 : d.data)) {
n.n = 9;
break
}
return A("wasm_verify_sign_success"), n.a(2, c(!0));
case 9:
return t.cdnConfig = null, t.verifyImgBuffer = null, A("wasm_verify_sign_err", {
res: d,
params: e
}), n.a(2, c(!1));
case 10:
n.n = 12;
break;
case 11:
return A("wasm_verify_sign_mess", d), n.a(2, c(!0));
case 12:
return n.a(2)
}
}), n)
})));
return function (e) {
return n.apply(this, arguments)
}
}())
}
}, {
key: "getWasmHeader",
value: function (e) {
var t = this;
return new Promise(function () {
var n = (0, c.A)((0, a.A)().m((function n(r) {
var o, c, s, u, l, d, f, p, m, h;
return (0, a.A)().w((function (n) {
for (;;) switch (n.n) {
case 0:
if (e) {
n.n = 1;
break
}
return A("wasm_header_itemid_empty"), n.a(2, r({}));
case 1:
return n.n = 2, t.loadWasmPic();
case 2:
if (t.wasmWorker) {
n.n = 3;
break
}
return n.a(2, r({}));
case 3:
if (t.wasmImgBuffer) {
n.n = 4;
break
}
return n.a(2, r({}));
case 4:
return o = t.getCommonParams(e), n.n = 5, t.fetchWorkerData((0, i.A)({
type: "encryptHeader",
imageBuffer: t.wasmImgBuffer
}, o));
case 5:
if (!(c = n.v) || "encryptHeader" !== (null == c ? void 0 : c.type)) {
n.n = 8;
break
}
if (s = (null == c ? void 0 : c.data) || {}, u = s.a, l = s.b, d = s.c, f = s.d, p = s.e, m = g() ? 25 : 23, h = o.time, !(u && l && d && f && p)) {
n.n = 6;
break
}
return A("wasm_encrypt_success"), n.a(2, r({
s1: u,
s2: l,
s3: d,
s4: f,
s5: p,
s6: m,
s7: h
}));
case 6:
return t.cdnConfig = null, t.wasmImgBuffer = null, A("wasm_encrypt_err", {
res: c,
commonParams: o
}), n.a(2, r({}));
case 7:
n.n = 9;
break;
case 8:
return A("wasm_get_header_mess", c), n.a(2, r({}));
case 9:
return n.a(2)
}
}), n)
})));
return function (e) {
return n.apply(this, arguments)
}
}())
}
}], [{
key: "getInstance",
value: function () {
return e.instance
}
}])
}();
r = b, (0, l.A)(b, "instance", new r), t.A = b.getInstance()
},
3816: function (e, t, n) {
n.d(t, {
A: function () {
return Ge
}
});
var r = n(4576),
i = n(5652),
o = n(2555),
a = n(469),
c = n(2248),
s = n.n(c),
u = n(2573),
l = n.n(u),
d = n(809),
f = n(4911),
p = n(3151),
m = n(4017),
h = function (e) {
if (e < 0 || e > 53) return NaN;
var t = 0 | 1073741824 * Math.random();
return e > 30 ? t + 1073741824 * (0 | Math.random() * (1 << e - 30)) : t >>> 30 - e
},
v = function (e, t) {
for (var n = e.toString(16), r = t - n.length, i = "0"; r > 0; r >>>= 1, i += i) 1 & r && (n = i + n);
return n
},
g = n(334),
y = n(7422),
A = n(1789),
w = n(9476),
b = {
TOUTIAO: "toutiao_mini_program",
KUAISHOU: "kuaishou_mini_program",
WEIXIN: "weixin_mini_program",
BAIDU: "baidu_mini_program",
DINGTALK: "dingtalk_mini_program",
ALIPAY: "alipay_mini_program",
WEIBO: "weibo_mini_program"
};
function _(e) {
return (_ = "function" == typeof Symbol && "symbol" == (0, w.A)(Symbol.iterator) ? function (e) {
return (0, w.A)(e)
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : (0, w.A)(e)
})(e)
}
function S(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
t && (r = r.filter((function (t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
}))), n.push.apply(n, r)
}
return n
}
function k(e, t, n) {
return (t = function (e) {
var t = function (e, t) {
if ("object" !== _(e) || null === e) return e;
var n = e[Symbol.toPrimitive];
if (void 0 !== n) {
var r = n.call(e, t || "default");
if ("object" !== _(r)) return r;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return ("string" === t ? String : Number)(e)
}(e, "string");
return "symbol" === _(t) ? t : String(t)
}(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e
}
function I() {
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (function (e) {
var t = 16 * Math.random() | 0;
return ("x" === e ? t : 3 & t | 8).toString(16)
}))
}
function x(e) {
if ("Object" !== function (e) {
return Object.prototype.toString.call(e).slice(8, -1)
}(e)) return e;
var t = function (e) {
for (var t = 1; t < arguments.length; t++) {
var n = null != arguments[t] ? arguments[t] : {};
t % 2 ? S(Object(n), !0).forEach((function (t) {
k(e, t, n[t])
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : S(Object(n)).forEach((function (t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
}))
}
return e
}({}, e);
return Object.keys(t).forEach((function (e) {
void 0 === t[e] ? delete t[e] : null === t[e] && (t[e] = "")
})), t
}
function C() {
return "undefined" != typeof tt && "function" == typeof tt.login ? b.TOUTIAO : "undefined" != typeof ks && "function" == typeof ks.login ? b.KUAISHOU : "undefined" != typeof wx && "function" == typeof wx.login ? b.WEIXIN : "undefined" != typeof swan && "function" == typeof swan.login ? b.BAIDU : "undefined" != typeof dd && "function" == typeof dd.getAuthCode ? b.DINGTALK : "undefined" != typeof my && "function" == typeof my.getAuthCode ? b.ALIPAY : "undefined" != typeof wbx && "function" == typeof wbx.wbTPLogin ? b.WEIBO : void 0
}
function T() {
return new Promise((function (e, t) {
C() === b.ALIPAY ? my.call("getClientInfo", {
success: function () {
var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
e(t.umidToken || "")
},
fail: function () {
t("")
}
}) : t("")
}))
}
function E(e) {
var t = "",
n = e && (e.header || e.headers);
return n && (t = n["EagleEye-TraceId"] || n["eagleeye-traceid"]), t
}
function O(e) {
return (O = "function" == typeof Symbol && "symbol" == (0, w.A)(Symbol.iterator) ? function (e) {
return (0, w.A)(e)
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : (0, w.A)(e)
})(e)
}
function P(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
t && (r = r.filter((function (t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
}))), n.push.apply(n, r)
}
return n
}
function N(e) {
for (var t = 1; t < arguments.length; t++) {
var n = null != arguments[t] ? arguments[t] : {};
t % 2 ? P(Object(n), !0).forEach((function (t) {
L(e, t, n[t])
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : P(Object(n)).forEach((function (t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
}))
}
return e
}
function L(e, t, n) {
return (t = function (e) {
var t = function (e, t) {
if ("object" !== O(e) || null === e) return e;
var n = e[Symbol.toPrimitive];
if (void 0 !== n) {
var r = n.call(e, t || "default");
if ("object" !== O(r)) return r;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return ("string" === t ? String : Number)(e)
}(e, "string");
return "symbol" === O(t) ? t : String(t)
}(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e
}
var U = C();
function D(e) {
return (D = "function" == typeof Symbol && "symbol" == (0, w.A)(Symbol.iterator) ? function (e) {
return (0, w.A)(e)
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : (0, w.A)(e)
})(e)
}
function R(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
t && (r = r.filter((function (t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
}))), n.push.apply(n, r)
}
return n
}
function j(e) {
for (var t = 1; t < arguments.length; t++) {
var n = null != arguments[t] ? arguments[t] : {};
t % 2 ? R(Object(n), !0).forEach((function (t) {
M(e, t, n[t])
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : R(Object(n)).forEach((function (t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
}))
}
return e
}
function M(e, t, n) {
return (t = function (e) {
var t = function (e, t) {
if ("object" !== D(e) || null === e) return e;
var n = e[Symbol.toPrimitive];
if (void 0 !== n) {
var r = n.call(e, t || "default");
if ("object" !== D(r)) return r;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return ("string" === t ? String : Number)(e)
}(e, "string");
return "symbol" === D(t) ? t : String(t)
}(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e
}
var B = C();
var q = n(8486);
function V(e) {
return (V = "function" == typeof Symbol && "symbol" == (0, w.A)(Symbol.iterator) ? function (e) {
return (0, w.A)(e)
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : (0, w.A)(e)
})(e)
}
function W(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
t && (r = r.filter((function (t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
}))), n.push.apply(n, r)
}
return n
}
function J(e) {
for (var t = 1; t < arguments.length; t++) {
var n = null != arguments[t] ? arguments[t] : {};
t % 2 ? W(Object(n), !0).forEach((function (t) {
Y(e, t, n[t])
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : W(Object(n)).forEach((function (t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
}))
}
return e
}
function Y(e, t, n) {
return (t = function (e) {
var t = function (e, t) {
if ("object" !== V(e) || null === e) return e;
var n = e[Symbol.toPrimitive];
if (void 0 !== n) {
var r = n.call(e, t || "default");
if ("object" !== V(r)) return r;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return ("string" === t ? String : Number)(e)
}(e, "string");
return "symbol" === V(t) ? t : String(t)
}(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e
}
var F = {
release: "2.4.12"
},
H = function (e) {
var t = e.logkey,
n = e.gmkey,
r = e.gokey;
q.aplus_universal.record(t, n, J(J({}, F), r))
},
G = function (e) {
return Object.assign(F, e)
};
function z(e) {
return (z = "function" == typeof Symbol && "symbol" == (0, w.A)(Symbol.iterator) ? function (e) {
return (0, w.A)(e)
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : (0, w.A)(e)
})(e)
}
var Z = "undefined" != typeof tt && "function" == typeof tt.login ? tt : "undefined" != typeof wx && "function" == typeof wx.login ? wx : "undefined" != typeof ks && "function" == typeof ks.login ? ks : "undefined" != typeof swan && "function" == typeof swan.login ? swan : "undefined" != typeof my && "function" == typeof my.getAuthCode ? my : "undefined" != typeof dd && "function" == typeof dd.getAuthCode ? dd : "undefined" != typeof wbx && "function" == typeof wbx.wbTPLogin ? wbx : null,
X = C(),
K = "alipay_mini_program" === X || "dingtalk_mini_program" === X,
$ = "weibo_mini_program" === X,
Q = {
request: function (e) {
var t = N({}, e);
return new Promise((function (e, n) {
if (t.url) {
t.method ? t.method = t.method.toUpperCase() : t.method = "GET", t.params && (t.url = function (e, t) {
if (!e) return "";
var n = Object.keys(t).map((function (e) {
return "".concat(encodeURIComponent(e), "=").concat(encodeURIComponent(t[e]))
})).join("&"),
r = e.indexOf("?") > -1 ? "&" : "?";
return "".concat(e).concat(r).concat(n)
}(t.url, x(t.params))), /^post|put$/i.test(t.method.toLocaleLowerCase()) && (t.header = Object.assign({}, t.header, {
"content-type": "application/x-www-form-urlencoded"
}));
var r = t.success,
i = t.fail;
t.success = function (n) {
n = Object.assign({
requestConfig: t
}, n), "function" == typeof r && r.call(this, n), e(n)
}, t.fail = function (e) {
e = Object.assign({
requestConfig: t
}, e), "function" == typeof i && i.call(this, e), n(e)
};
var o = {
weixin_mini_program: function () {
wx.request(t)
},
kuaishou_mini_program: function () {
ks.request(t)
},
alipay_mini_program: function () {
t.headers = N({
"content-type": "application/x-www-form-urlencoded"
}, t.header), my.request(t)
},
dingtalk_mini_program: function () {
t.headers = N({
"content-type": "application/x-www-form-urlencoded"
}, t.header), my.httpRequest(t)
},
baidu_mini_program: function () {
swan.request(t)
},
toutiao_mini_program: function () {
tt.request(t)
},
douyin_mini_program: function () {
tt.request(t)
},
weibo_mini_program: function () {
var e = t.data,
n = void 0 === e ? {} : e,
r = {},
i = {};
for (var o in t.header && t.header.cookie && t.header.cookie.split("; ").forEach((function (e) {
var t = e.split("=")[0],
n = e.split("=")[1];
t && (i[t] = n)
})), t.failure = t.fail, t.header["x-smallstc"] = JSON.stringify(i), delete t.fail, delete t.header.cookie, n) "boolean" == typeof n[o] ? r[o] = String(n[o]) : r[o] = n[o];
t.data = r, wbx.request(N({}, t))
}
};
return o[U], o[U]()
}
n(new Error("no url"))
}))
},
oauth: function (e) {
return new Promise((function (t, n) {
var r = e.success,
i = e.fail,
o = function (e) {
"function" == typeof r && r.call(this, e), t(e)
},
a = function (e) {
"function" == typeof i && i.call(this, e), n(e)
},
c = 1,
s = {
weixin_mini_program: function () {
wx.login({
complete: function (e) {
o(JSON.stringify({
authorizationCode: e.code
}))
},
fail: function (e) {
a(e)
}
})
},
kuaishou_mini_program: function () {
ks.login({
complete: function (t) {
e.getUserInfo ? ks.getUserInfo({
success: function (e) {
e && e.encryptedData && e.iv || !(c > 0) ? (c = 1, o(JSON.stringify({
authorizationCode: t.code,
encryptedData: e.encryptedData,
signature: e.signature,
iv: e.iv
}))) : (s.kuaishou_mini_program(), c -= 1)
},
fail: function (e) {
c = 1, a(e)
}
}) : o(JSON.stringify({
authorizationCode: t.code
}))
},
fail: function (e) {
a(e)
}
})
},
alipay_mini_program: function () {
my.getAuthCode({
scopes: e.scopes,
success: function (t) {
e.getUserInfo ? my.getOpenUserInfo({
success: function (e) {
var n = JSON.parse(e.response).response;
o(JSON.stringify({
authorizationCode: t.authCode,
avatarUrl: n.avatar,
nickName: n.nickName
}))
},
fai: function (e) {
a(e)
}
}) : o(JSON.stringify({
authorizationCode: t.authCode
}))
},
fail: function (e) {
a(e)
}
})
},
dingtalk_mini_program: function () {
dd.getAuthCode(j(j({}, e), {}, {
success: function (e) {
o(e.authCode)
},
fail: function (e) {
a(e)
}
}))
},
baidu_mini_program: function () {
(swan.canIUse("getLoginCode") ? swan.getLoginCode : swan.login)({
success: function (e) {
o(e.code)
},
fail: function (e) {
a(e)
}
})
},
toutiao_mini_program: function () {
tt.login({
force: !1,
success: function (e) {
o(e.code)
},
fail: function (e) {
a(e)
}
})
},
douyin_mini_program: function () {
tt.login({
force: !1,
success: function (e) {
o(e.code)
},
fail: function (e) {
a(e)
}
})
},
weibo_mini_program: function () {
wbx.wbTPLogin({
success: function (e) {
o(JSON.stringify({
authorizationCode: e.code
}))
},
failure: function (e, t) {
a(t)
}
})
}
};
return s[B], s[B]()
}))
},
platform: Z,
loginType: X,
setStorageSync: function (e, t) {
if (K || $) Z.setStorageSync({
key: e,
data: t
});
else try {
Z.setStorageSync(e, t)
} catch (e) {
H({
logkey: "/membership2021.malogin.sdk.setstorage.fail",
gmkey: "OTHER",
gokey: {
msg: "object" === z(e) ? JSON.stringify(e) : e
}
})
}
},
getStorageSync: function (e) {
if (K) return Z.getStorageSync({
key: e
}).data;
if ($) {
var t = Z.getStorageSync(e);
return "object" === z(t) ? t.data : t
}
return Z.getStorageSync(e)
},
removeStorageSync: function (e) {
K ? Z.removeStorageSync({
key: e
}) : Z.removeStorageSync(e)
},
toast: function (e) {
K ? Z.showToast({
content: e
}) : setTimeout((function () {
Z.showToast({
title: e,
icon: "none",
duration: 3e3
})
}), 300)
},
showConfirm: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
t = arguments.length > 1 ? arguments[1] : void 0;
K ? Z.confirm({
title: e.title || "温馨提示",
content: e.content || "绑定账号已失效,请确认后换绑",
confirmButtonText: e.confirmBtnText || "确认",
cancelButtonText: e.cancelBtnText || "取消",
success: function (e) {
e.confirm && t && t()
}
}) : Z.showModal({
title: e.title || "温馨提示",
content: e.content || "绑定账号已失效,请确认后换绑",
confirmText: e.confirmBtnText || "确认",
cancelText: e.cancelBtnText || "取消",
showCancel: !0,
cancelColor: "#000000",
confirmColor: "#576B95",
success: function (e) {
e.confirm && t && t()
}
})
},
navigateTo: function (e) {
Z.navigateTo({
url: e
})
}
};
function ee() {
this.eventMap = {}, this.onceEventMap = {}
}
ee.prototype = {
emit: function (e, t) {
var n = this.eventMap[e] = this.eventMap[e] || [],
r = this.onceEventMap[e] = this.onceEventMap[e] || [];
n && n.length && n.forEach((function (e) {
return e(t)
})), r && r.length && (r.forEach((function (e) {
return e(t)
})), this.onceEventMap[e] = [])
},
once: function (e, t) {
var n = this.onceEventMap[e] = this.onceEventMap[e] || []; - 1 === n.indexOf(t) && n.push(t)
},
on: function (e, t) {
var n = this.eventMap[e] = this.eventMap[e] || []; - 1 === n.indexOf(t) && n.push(t)
},
off: function (e, t) {
var n = this.eventMap[e] = this.eventMap[e] || []; - 1 !== n.indexOf(t) && (this.eventMap[e] = n.filter((function (e) {
return e !== t
})))
}
};
var te = new ee,
ne = {
LOGIN_SUCCESS: "@@HAVANA_MINIAPP_LOGIN_SUCCESS",
LOGIN_FAIL: "@@HAVANA_MINIAPP_LOGIN_FAIL",
LOGOUT_SUCCESS: "@@HAVANA_MINIAPP_LOGOUT_SUCCESS",
UNBIND_SUCCESS: "@@HAVANA_MINIAPP_UNBIND_SUCCESS"
};
function re(e) {
return (re = "function" == typeof Symbol && "symbol" == (0, w.A)(Symbol.iterator) ? function (e) {
return (0, w.A)(e)
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : (0, w.A)(e)
})(e)
}
function ie() {
ie = function () {
return e
};
var e = {},
t = Object.prototype,
n = t.hasOwnProperty,
r = Object.defineProperty || function (e, t, n) {
e[t] = n.value
},
i = "function" == typeof Symbol ? Symbol : {},
o = i.iterator || "@@iterator",
a = i.asyncIterator || "@@asyncIterator",
c = i.toStringTag || "@@toStringTag";
function s(e, t, n) {
return Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}), e[t]
}
try {
s({}, "")
} catch (e) {
s = function (e, t, n) {
return e[t] = n
}
}
function u(e, t, n, i) {
var o = t && t.prototype instanceof f ? t : f,
a = Object.create(o.prototype),
c = new I(i || []);
return r(a, "_invoke", {
value: b(e, n, c)
}), a
}
function l(e, t, n) {
try {
return {
type: "normal",
arg: e.call(t, n)
}
} catch (e) {
return {
type: "throw",
arg: e
}
}
}
e.wrap = u;
var d = {};
function f() {}
function p() {}
function m() {}
var h = {};
s(h, o, (function () {
return this
}));
var v = Object.getPrototypeOf,
g = v && v(v(x([])));
g && g !== t && n.call(g, o) && (h = g);
var y = m.prototype = f.prototype = Object.create(h);
function A(e) {
["next", "throw", "return"].forEach((function (t) {
s(e, t, (function (e) {
return this._invoke(t, e)
}))
}))
}
function w(e, t) {
var i;
r(this, "_invoke", {
value: function (r, o) {
function a() {
return new t((function (i, a) {
! function r(i, o, a, c) {
var s = l(e[i], e, o);
if ("throw" !== s.type) {
var u = s.arg,
d = u.value;
return d && "object" == re(d) && n.call(d, "__await") ? t.resolve(d.__await).then((function (e) {
r("next", e, a, c)
}), (function (e) {
r("throw", e, a, c)
})) : t.resolve(d).then((function (e) {
u.value = e, a(u)
}), (function (e) {
return r("throw", e, a, c)
}))
}
c(s.arg)
}(r, o, i, a)
}))
}
return i = i ? i.then(a, a) : a()
}
})
}
function b(e, t, n) {
var r = "suspendedStart";
return function (i, o) {
if ("executing" === r) throw new Error("Generator is already running");
if ("completed" === r) {
if ("throw" === i) throw o;
return {
value: void 0,
done: !0
}
}
for (n.method = i, n.arg = o;;) {
var a = n.delegate;
if (a) {
var c = _(a, n);
if (c) {
if (c === d) continue;
return c
}
}
if ("next" === n.method) n.sent = n._sent = n.arg;
else if ("throw" === n.method) {
if ("suspendedStart" === r) throw r = "completed", n.arg;
n.dispatchException(n.arg)
} else "return" === n.method && n.abrupt("return", n.arg);
r = "executing";
var s = l(e, t, n);
if ("normal" === s.type) {
if (r = n.done ? "completed" : "suspendedYield", s.arg === d) continue;
return {
value: s.arg,
done: n.done
}
}
"throw" === s.type && (r = "completed", n.method = "throw", n.arg = s.arg)
}
}
}
function _(e, t) {
var n = t.method,
r = e.iterator[n];
if (void 0 === r) return t.delegate = null, "throw" === n && e.iterator.return && (t.method = "return", t.arg = void 0, _(e, t), "throw" === t.method) || "return" !== n && (t.method = "throw", t.arg = new TypeError("The iterator does not provide a '" + n + "' method")), d;
var i = l(r, e.iterator, t.arg);
if ("throw" === i.type) return t.method = "throw", t.arg = i.arg, t.delegate = null, d;
var o = i.arg;
return o ? o.done ? (t[e.resultName] = o.value, t.next = e.nextLoc, "return" !== t.method && (t.method = "next", t.arg = void 0), t.delegate = null, d) : o : (t.method = "throw", t.arg = new TypeError("iterator result is not an object"), t.delegate = null, d)
}
function S(e) {
var t = {
tryLoc: e[0]
};
1 in e && (t.catchLoc = e[1]), 2 in e && (t.finallyLoc = e[2], t.afterLoc = e[3]), this.tryEntries.push(t)
}
function k(e) {
var t = e.completion || {};
t.type = "normal", delete t.arg, e.completion = t
}
function I(e) {
this.tryEntries = [{
tryLoc: "root"
}], e.forEach(S, this), this.reset(!0)
}
function x(e) {
if (e) {
var t = e[o];
if (t) return t.call(e);
if ("function" == typeof e.next) return e;
if (!isNaN(e.length)) {
var r = -1,
i = function t() {
for (; ++r < e.length;)
if (n.call(e, r)) return t.value = e[r], t.done = !1, t;
return t.value = void 0, t.done = !0, t
};
return i.next = i
}
}
return {
next: C
}
}
function C() {
return {
value: void 0,
done: !0
}
}
return p.prototype = m, r(y, "constructor", {
value: m,
configurable: !0
}), r(m, "constructor", {
value: p,
configurable: !0
}), p.displayName = s(m, c, "GeneratorFunction"), e.isGeneratorFunction = function (e) {
var t = "function" == typeof e && e.constructor;
return !!t && (t === p || "GeneratorFunction" === (t.displayName || t.name))
}, e.mark = function (e) {
return Object.setPrototypeOf ? Object.setPrototypeOf(e, m) : (e.__proto__ = m, s(e, c, "GeneratorFunction")), e.prototype = Object.create(y), e
}, e.awrap = function (e) {
return {
__await: e
}
}, A(w.prototype), s(w.prototype, a, (function () {
return this
})), e.AsyncIterator = w, e.async = function (t, n, r, i, o) {
void 0 === o && (o = Promise);
var a = new w(u(t, n, r, i), o);
return e.isGeneratorFunction(n) ? a : a.next().then((function (e) {
return e.done ? e.value : a.next()
}))
}, A(y), s(y, c, "Generator"), s(y, o, (function () {
return this
})), s(y, "toString", (function () {
return "[object Generator]"
})), e.keys = function (e) {
var t = Object(e),
n = [];
for (var r in t) n.push(r);
return n.reverse(),
function e() {
for (; n.length;) {
var r = n.pop();
if (r in t) return e.value = r, e.done = !1, e
}
return e.done = !0, e
}
}, e.values = x, I.prototype = {
constructor: I,
reset: function (e) {
if (this.prev = 0, this.next = 0, this.sent = this._sent = void 0, this.done = !1, this.delegate = null, this.method = "next", this.arg = void 0, this.tryEntries.forEach(k), !e)
for (var t in this) "t" === t.charAt(0) && n.call(this, t) && !isNaN(+t.slice(1)) && (this[t] = void 0)
},
stop: function () {
this.done = !0;
var e = this.tryEntries[0].completion;
if ("throw" === e.type) throw e.arg;
return this.rval
},
dispatchException: function (e) {
if (this.done) throw e;
var t = this;
function r(n, r) {
return a.type = "throw", a.arg = e, t.next = n, r && (t.method = "next", t.arg = void 0), !!r
}
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var o = this.tryEntries[i],
a = o.completion;
if ("root" === o.tryLoc) return r("end");
if (o.tryLoc <= this.prev) {
var c = n.call(o, "catchLoc"),
s = n.call(o, "finallyLoc");
if (c && s) {
if (this.prev < o.catchLoc) return r(o.catchLoc, !0);
if (this.prev < o.finallyLoc) return r(o.finallyLoc)
} else if (c) {
if (this.prev < o.catchLoc) return r(o.catchLoc, !0)
} else {
if (!s) throw new Error("try statement without catch or finally");
if (this.prev < o.finallyLoc) return r(o.finallyLoc)
}
}
}
},
abrupt: function (e, t) {
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
var i = this.tryEntries[r];
if (i.tryLoc <= this.prev && n.call(i, "finallyLoc") && this.prev < i.finallyLoc) {
var o = i;
break
}
}
o && ("break" === e || "continue" === e) && o.tryLoc <= t && t <= o.finallyLoc && (o = null);
var a = o ? o.completion : {};
return a.type = e, a.arg = t, o ? (this.method = "next", this.next = o.finallyLoc, d) : this.complete(a)
},
complete: function (e, t) {
if ("throw" === e.type) throw e.arg;
return "break" === e.type || "continue" === e.type ? this.next = e.arg : "return" === e.type ? (this.rval = this.arg = e.arg, this.method = "return", this.next = "end") : "normal" === e.type && t && (this.next = t), d
},
finish: function (e) {
for (var t = this.tryEntries.length - 1; t >= 0; --t) {
var n = this.tryEntries[t];
if (n.finallyLoc === e) return this.complete(n.completion, n.afterLoc), k(n), d
}
},
catch: function (e) {
for (var t = this.tryEntries.length - 1; t >= 0; --t) {
var n = this.tryEntries[t];
if (n.tryLoc === e) {
var r = n.completion;
if ("throw" === r.type) {
var i = r.arg;
k(n)
}
return i
}
}
throw new Error("illegal catch attempt")
},
delegateYield: function (e, t, n) {
return this.delegate = {
iterator: x(e),
resultName: t,
nextLoc: n
}, "next" === this.method && (this.arg = void 0), d
}
}, e
}
function oe(e, t, n, r, i, o, a) {
try {
var c = e[o](a),
s = c.value
} catch (e) {
return void n(e)
}
c.done ? t(s) : Promise.resolve(s).then(r, i)
}
function ae(e) {
return function () {
var t = this,
n = arguments;
return new Promise((function (r, i) {
var o = e.apply(t, n);
function a(e) {
oe(o, r, i, a, c, "next", e)
}
function c(e) {
oe(o, r, i, a, c, "throw", e)
}
a(void 0)
}))
}
}
function ce(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
t && (r = r.filter((function (t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
}))), n.push.apply(n, r)
}
return n
}
function se(e) {
for (var t = 1; t < arguments.length; t++) {
var n = null != arguments[t] ? arguments[t] : {};
t % 2 ? ce(Object(n), !0).forEach((function (t) {
ue(e, t, n[t])
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ce(Object(n)).forEach((function (t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
}))
}
return e
}
function ue(e, t, n) {
return (t = fe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e
}
function le(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}
function de(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, fe(r.key), r)
}
}
function fe(e) {
var t = function (e, t) {
if ("object" !== re(e) || null === e) return e;
var n = e[Symbol.toPrimitive];
if (void 0 !== n) {
var r = n.call(e, t || "default");
if ("object" !== re(r)) return r;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return ("string" === t ? String : Number)(e)
}(e, "string");
return "symbol" === re(t) ? t : String(t)
}
n(7037);
var pe = Q.oauth,
me = Q.request,
he = Q.toast,
ve = Q.showConfirm,
ge = Q.navigateTo,
ye = Q.setStorageSync,
Ae = Q.getStorageSync,
we = Q.removeStorageSync,
be = Q.loginType,
_e = Q.platform,
Se = "系统异常,请稍后重试",
ke = "网络异常,请稍后重试",
Ie = "用户取消",
xe = "授权失败",
Ce = "静默授权取消绑定",
Te = "/membership2021.malogin.sdk.login",
Ee = function () {
function e() {
var t = this,
n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
if (le(this, e), e.instance) return e.instance;
this.defaultConfig = se({
sessionKey: "_LOGINED_SESSION_",
lang: "zh_CN",
isMobile: !0,
gateway: "https://passport.alibaba.com",
toastError: !0,
needPassWebViewCookie: !0,
returnUrl: "",
silentAuth: !1,
scopes: ["auth_base"],
withUmidToken: !1,
env: "",
sellerAppId: ""
}, n), this.config = se(se({}, this.defaultConfig), n), this.sdkTraceId = n.sdkTraceId || n.behaviorTraceId || I(), this.gokey = G(se({
appId: this.config.appId,
appName: this.config.appName,
appEntrance: this.config.appEntrance,
pageTraceId: this.sdkTraceId
}, n.goldlogGokey || {})), this.bizParams = "", this.getAuthTimer = null, ["trySlientLogin", "trySilentLogin", "login", "getAuthCode", "getSession", "webViewSync", "logout", "unbind", "getEventHub", "decodePhoneNumber", "simLogin", "sendVerifyCode", "smsLogin", "changeBind", "h5LoginFlagPolling", "getH5LoginUrl", "setConfig"].forEach((function (e) {
t[e] = t[e].bind(t)
})), be === b.WEIBO && (this.config.needPassWebViewCookie = !1), e.instance = this
}
var t;
return function (e, t, n) {
t && de(e.prototype, t), n && de(e, n), Object.defineProperty(e, "prototype", {
writable: !1
})
}(e, [{
key: "setConfig",
value: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
this.config = se(se({}, this.config), e)
}
}, {
key: "navigateTo",
value: function (e) {
var t = this,
n = this.config,
r = n.navigateTo,
i = n.env;
r && "function" == typeof r ? r(e) : be === b.WEIBO ? _e.wbStartWebService({
name: "pre" === i ? "miniLoginPre" : "miniLogin",
callbacks: {
weiBoMpBridge: function (e) {
var n = e.query,
r = void 0 === n ? "" : n,
i = {};
r && (r.split("&").forEach((function (e) {
var t = e.split("=")[0],
n = e.split("=")[1];
t && (i[t] = n)
})), t.webViewSync(i))
}
},
success: function (e) {},
failure: function () {}
}) : ge(e)
}
}, {
key: "trySlientLogin",
value: function () {
var e = this,
t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
r = se({
isSilent: !0
}, n);
return new Promise((function (n, i) {
e.login(t, r).then((function (e) {
n(e)
})).catch((function (e) {
i(e)
}))
}))
}
}, {
key: "trySilentLogin",
value: function () {
return this.trySlientLogin.apply(this, arguments)
}
}, {
key: "login",
value: function () {
var e = this,
t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
return new Promise((function (r, i) {
if (e.loginRpcLoading) "function" == typeof i && i({
code: "request pending"
});
else {
e.initConfig(t, r, i);
var o = e.config,
a = o.phoneDetail,
c = o.h5Login,
s = o.fail;
e.getAuthCode().then((function () {
if (a)
if (a.iv || a.sign) e.loginRequest(se(se({}, n), {}, {
phoneDetail: a
}), (function () {
e.getAuthCode()
}));
else {
if (c) return void e.loginRequest(se(se({}, n), {}, {
h5Login: !0
}));
"function" == typeof s && s({
msg: Ie,
code: "cancelLogin"
})
}
else c ? e.loginRequest(se(se({}, n), {}, {
h5Login: !0
})) : e.loginRequest(n)
})).catch((function (e) {
"function" == typeof s && s({
msg: xe,
code: "authFail",
err: e
})
}))
}
}))
}
}, {
key: "getAuthCode",
value: function () {
var e = this;
return new Promise((function (t, n) {
var r = e.config,
i = r.scopes,
o = r.silentAuth,
a = r.phoneDetail,
c = r.getAuthCode,
s = void 0 === c ? pe : c,
u = !0;
if ((!e.config || a && !a.type || a && "phone" === a.type) && (u = !1), !e.authCode || !a) return e.loginRpcLoading ? (clearTimeout(e.getAuthTimer), void(e.getAuthTimer = setTimeout((function () {
e.getAuthCode()
}), 10))) : void s({
scopes: i,
silentAuth: o,
getUserInfo: u
}).then((function (n) {
e.authCode = n, t(n)
})).catch((function (t) {
e.authCode = null, n(t)
}));
t(e.authCode)
}))
}
}, {
key: "initConfig",
value: function (e, t, n) {
var r = e.success,
i = e.fail;
e.success = function (e) {
"function" == typeof r && r.call(this, e), t(e)
}, e.fail = function (e) {
"function" == typeof i && i.call(this, e), n(e)
}, this.config = se(se({}, this.config), e), this.webViewSyncSuccess = e.success
}
}, {
key: "convertAuthCode",
value: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
t = this.authCode,
n = se({}, e);
if (n && n.phoneDetail) {
var r = n,
i = r.phoneDetail;
if (delete(n = se({
type: "phone"
}, i)).errMsg, be === b.WEIXIN) {
var o = JSON.parse(t);
"phoneBind" !== n.type && "phoneSns" !== n.type || (o = {
encryptedData2: o.encryptedData,
iv2: o.iv,
authorizationCode: o.authorizationCode
}), n = se(se({}, o), n)
} else be === b.DINGTALK ? this.config.getUnionIdByPNAuth ? n.authorizationCode = "" : n.authorizationCode = t : be === b.ALIPAY ? n = se(se({}, JSON.parse(t)), n) : [b.KUAISHOU, b.WEIBO].includes(be) ? n.authorizationCode = JSON.parse(t).authorizationCode : n.authorizationCode = t;
be === b.ALIPAY && i.response && (n.iv = i.sign, n.encryptedData = i.response), t = JSON.stringify(n)
}
return n && n.h5Login && (t = JSON.stringify({
type: "phone"
})), this.config.corpId && (n.corpId = this.config.corpId, n.authorizationCode = t, t = JSON.stringify(n)), this.authCode = null, t
}
}, {
key: "loginRequest",
value: (t = ae(ie().mark((function e(t, n) {
var r, i, o, a, c, s, u, l, d, f, p, m, h, v, g, y, A, w, b, _, S, k, I, x, C = this;
return ie().wrap((function (e) {
for (;;) switch (e.prev = e.next) {
case 0:
if (r = this.config, i = r.gateway, o = r.appId, a = r.appName, c = r.appEntrance, s = r.sellerAppId, u = r.lang, l = r.isMobile, d = r.pagePath, f = r.needPassWebViewCookie, p = r.returnUrl, m = r.type, h = r.success, v = r.fail, g = r.header, y = void 0 === g ? {} : g, A = r.awsc, w = r.withUmidToken, this.loginRpcLoading = !0, b = this.convertAuthCode(t), _ = t.isSilent, S = t.skipWebViewCookie, k = t.accountBindNewMessage, I = void 0 === k ? {} : k, x = {
type: m || be,
appId: o,
appName: a,
appEntrance: c,
sellerAppId: s,
lang: u,
isMobile: l,
returnUrl: p,
needPassWebViewCookie: f,
authorizationCode: b,
pageTraceId: this.sdkTraceId
}, !w) {
e.next = 14;
break
}
return e.prev = 6, e.next = 9, T();
case 9:
x.umidToken = e.sent, e.next = 14;
break;
case 12:
e.prev = 12, e.t0 = e.catch(6);
case 14:
return A && "function" == typeof A.getFYToken && (y["bx-ua"] = A.getFYToken()), e.next = 17, me({
url: "".concat(i, "/mini_program/login.do"),
data: x,
header: se({}, y),
dataType: "json",
method: "POST",
success: function (e) {
C.loginRpcLoading = !1;
var r = E(e);
if (e.statusCode && 200 !== e.statusCode || e.status && 200 !== e.status) return te.emit(ne.LOGIN_FAIL), H({
logkey: Te,
gokey: {
code: "networkError"
}
}), v && v({
msg: ke,
code: "networkError",
traceId: r
}), void(!_ && C.showError(ke));
if (!e.data || e.data.hasError) return te.emit(ne.LOGIN_FAIL), H({
logkey: Te,
gokey: {
code: "systermError"
}
}), v && v({
msg: Se,
code: "systermError",
traceId: r
}), void(!_ && C.showError(Se));
if (e.data && e.data.content) {
var i = e.data.content.data,
o = void 0 === i ? {} : i;
if (o.traceId = r, "RELEASED_ACCOUNT_BIND_NEW" === o.needAction) return o.titleMsg && (I.content = o.titleMsg), ve(I, (function () {
C.navigateTo("".concat(d, "?url=").concat(encodeURIComponent(o.redirectUrl || o.iframeRedirectUrl)))
})), void H({
logkey: Te,
gokey: {
code: "changeBind"
}
});
if (o.titleMsg) return v && v(se({
msg: o.titleMsg,
code: "loginError"
}, o)), te.emit(ne.LOGIN_FAIL), H({
logkey: Te,
gokey: {
code: "loginError"
}
}), void(!_ && C.showError(o.titleMsg));
var a = {},
c = !1;
if ((o.sid || o.st) && (a = se(se({}, o), {}, {
cookie2: o.sid
}), C.setNativeSession(a), c = !0), o.redirect || o.iframeRedirect) return "auth_base" === C.config.scopes || _ && S ? void(c ? (h && h(se(se({}, a), {}, {
success: !0
})), te.emit(ne.LOGIN_SUCCESS), H({
logkey: Te,
gokey: {
code: "success"
}
}), n && n()) : (H({
logkey: Te,
gokey: {
code: "authBaseCancelBind"
}
}), v && v({
msg: Ce,
code: "authBaseCancelBind"
}), te.emit(ne.LOGIN_FAIL))) : (H({
logkey: Te,
gokey: {
code: "success"
}
}), void C.navigateTo("".concat(d, "?url=").concat(encodeURIComponent(o.redirectUrl || o.iframeRedirectUrl)), {
url: o.redirectUrl || o.iframeRedirectUrl
}));
if (!1 === e.data.content.success) return v && v(se({
msg: o.titleMsg,
code: "loginError"
}, o)), H({
logkey: Te,
gokey: {
code: "loginError"
}
}), void te.emit(ne.LOGIN_FAIL);
h && h(se(se({}, a), {}, {
success: !0
})), H({
logkey: Te,
gokey: {
code: "success"
}
}), n && n()
} else H({
logkey: Te,
gokey: {
code: "contentError"
}
}), v && v(se({
code: "contentError"
}, t))
},
fail: function () {
C.loginRpcLoading = !1, te.emit(ne.LOGIN_FAIL), H({
logkey: Te,
gokey: {
code: "networkError"
}
}), v && v({
msg: ke,
code: "networkError"
}), C.showError(ke), n && n()
}
});
case 17:
case "end":
return e.stop()
}
}), e, this, [
[6, 12]
])
}))), function (e, n) {
return t.apply(this, arguments)
})
}, {
key: "showError",
value: function (e) {
var t = this,
n = this.config,
r = n.toastError,
i = n.showToast;
r && ("function" != typeof i ? setTimeout((function () {
he(e)
}), 100) : setTimeout((function () {
t.config.showToast(e)
}), 100))
}
}, {
key: "getSession",
value: function (e) {
var t = Ae(this.config.sessionKey) || "{}",
n = {};
try {
n = "string" == typeof t ? JSON.parse(t) : t
} catch (e) {}
if ("function" != typeof e) return n;
e(n)
}
}, {
key: "setNativeSession",
value: function (e) {
try {
delete e.returnUrl, delete e.redirectUrl, delete e.asyncUrls, delete e.redirect, delete e.loginSucResultAction, delete e.loginType, e.sgcookie && ye("awsc_sgcookie", e.sgcookie), "string" != typeof e && (e = JSON.stringify(e)), ye(this.config.sessionKey, e)
} catch (e) {}
}
}, {
key: "webViewSync",
value: function (e) {
if (!e) return this.config.fail && this.config.fail({
msg: Ie,
code: "cancelLogin"
}), void H({
logkey: Te,
gokey: {
code: "cancelLogin"
}
});
if ("string" == typeof e && (e = JSON.parse(e)), e.sid || e.st) {
var t = se(se({}, e), {}, {
cookie2: e.sid
});
this.setNativeSession(t)
}
H({
logkey: Te,
gokey: {
code: "success"
}
}), te.emit(ne.LOGIN_SUCCESS), this.webViewSyncSuccess && this.webViewSyncSuccess(e)
}
}, {
key: "logout",
value: function (e, t) {
var n = this.config,
r = n.sessionKey,
i = n.gateway,
o = n.plugin,
a = n.site,
c = n.header,
s = void 0 === c ? {} : c,
u = n.appName,
l = n.appEntrance,
d = n.awsc;
we(r), o && "function" == typeof o.logout ? o.logout(this.config, e, t) : be === b.ALIPAY && a ? (d && "function" == typeof d.getFYToken && (s["bx-ua"] = d.getFYToken()), me({
url: "".concat(i, "/logout.htm"),
data: {
site: a,
appName: u,
appEntrance: l,
redirectURL: "https://item.taobao.com/",
pageTraceId: this.sdkTraceId
},
header: s,
dataType: "text",
method: "GET",
success: function () {
e && e(), te.emit(ne.LOGOUT_SUCCESS)
},
fail: function (e) {
t && t(e)
}
})) : (te.emit(ne.LOGOUT_SUCCESS), e && e())
}
}, {
key: "exchange",
value: function (e, t) {
var n = this.config.plugin;
n && "function" == typeof n.exchange ? n.exchange(this.config, e, t) : e && e()
}
}, {
key: "unbind",
value: function (e, t) {
var n = this;
this.initConfig({});
var r, i = this.config,
o = i.gateway,
a = i.appId,
c = i.appName,
s = i.appEntrance,
u = i.sellerAppId,
l = i.lang,
d = i.isMobile,
f = i.needPassWebViewCookie,
p = i.returnUrl,
m = i.type,
h = i.header,
v = void 0 === h ? {} : h,
g = i.awsc,
y = [],
A = this.getSession();
for (var w in A) y.push("".concat(w, "=").concat(A[w]));
g && "function" == typeof g.getFYToken && (v["bx-ua"] = g.getFYToken()), r = y.join("; "), me({
url: "".concat(o, "/mini_program/logout_and_unbind.do"),
data: {
type: m || be,
appId: a,
appName: c,
appEntrance: s,
sellerAppId: u,
lang: l,
isMobile: d,
returnUrl: p,
needPassWebViewCookie: f,
pageTraceId: this.sdkTraceId
},
header: se(se({}, v), {}, {
cookie: r
}),
dataType: "json",
method: "POST",
success: function (r) {
var i = r.statusCode,
o = void 0 !== i && i,
a = r.status,
c = void 0 !== a && a,
s = r.data,
u = void 0 !== s && s,
l = E(r);
if (200 !== o && 200 !== c) return t && t({
msg: ke,
code: "networkError",
traceId: l
}), void n.showError(ke);
if (u.hasError) return t && t({
msg: Se,
code: "systermError",
traceId: l
}), void n.showError(Se);
var d = u.content,
f = void 0 !== d && d;
f.data ? f.data.titleMsg ? (t && t(se({
traceId: l,
msg: f.data.titleMsg,
code: "loginError"
}, f.data)), n.showError(f.data.titleMsg)) : (n.logout(), te.emit(ne.UNBIND_SUCCESS), e && e(f.data)) : t && t(se({
traceId: l,
code: "contentError"
}, u))
},
fail: function (e) {
t && t({
ret: e
})
}
})
}
}, {
key: "getEventHub",
value: function () {
return {
EventHub: te,
EVENT_LIST: ne
}
}
}, {
key: "catchSystemError",
value: function (e) {
return e.statusCode && 200 !== e.statusCode || e.status && 200 !== e.status ? (this.showError(ke), !0) : !e.data || e.data.hasError ? (this.showError(Se), !0) : !e.data.content
}
}, {
key: "decodePhoneNumber",
value: function (e) {
var t = this,
n = e.phoneDetail,
r = e.extParams,
i = this.config,
o = i.gateway,
a = i.appId,
c = i.appName,
s = i.appEntrance,
u = i.sellerAppId,
l = i.lang,
d = i.isMobile,
f = i.returnUrl,
p = i.header,
m = void 0 === p ? {} : p,
h = i.pagePath,
v = i.type,
g = i.awsc,
y = i.getUnionIdByPNAuth;
g && "function" == typeof g.getFYToken && (m["bx-ua"] = g.getFYToken());
var A = this.convertAuthCode({
phoneDetail: n
});
return new Promise((function (e, n) {
var i = se(se({
type: v || be,
appId: a,
appName: c,
appEntrance: s,
sellerAppId: u,
lang: l,
isMobile: d,
returnUrl: f,
needPassWebViewCookie: !1,
authorizationCode: A,
nativeMp: !0,
getUnionIdByPNAuth: y
}, r), {}, {
pageTraceId: t.sdkTraceId
});
me({
url: "".concat(o, "/mini_program/login.do"),
data: i,
header: se({}, m),
dataType: "json",
method: "POST",
success: function (r) {
var i = E(r);
if (!t.catchSystemError(r)) {
var o = r.data.content.data,
a = void 0 === o ? {} : o;
return t.bizParams = a.bizParams || "", a.traceId = i, a.titleMsg ? (t.showError(a.titleMsg), void(a.actionResultCode ? e(a) : n(a))) : a.sid || a.st ? (t.setNativeSession(se(se({}, a), {}, {
cookie2: a.sid
})), void e(a)) : a.iframeRedirectUrl || a.redirectUrl ? (be === b.TOUTIAO && n({
type: "redirect"
}), t.initConfig({}, e, n), void t.navigateTo("".concat(h, "?url=").concat(encodeURIComponent(a.iframeRedirectUrl || a.redirectUrl)))) : void(a.actionResultCode ? e(a) : n())
}
n()
},
fail: function (e) {
t.showError(ke), n(e)
}
})
}))
}
}, {
key: "simLogin",
value: function (e) {
var t = this,
n = e.extParams,
r = this.config,
i = r.appEntrance,
o = r.gateway,
a = r.appId,
c = r.appName,
s = r.header,
u = void 0 === s ? {} : s,
l = r.pagePath,
d = r.isMobile,
f = r.awsc,
p = se({
appId: a,
appName: c,
appEntrance: i,
isMobile: d,
tokenType: "snsBind",
nativeMp: !0,
bizParams: this.bizParams,
needPassWebViewCookie: !1,
pageTraceId: this.sdkTraceId
}, n);
return f && "function" == typeof f.getFYToken && (u["bx-ua"] = f.getFYToken()), new Promise((function (e, n) {
me({
url: "".concat(o, "/newlogin/sms/simLogin"),
data: p,
header: se({}, u),
dataType: "json",
method: "POST",
success: function (r) {
var i = E(r);
if (!t.catchSystemError(r)) {
var o = r.data.content.data,
a = void 0 === o ? {} : o;
return a.traceId = i, a.titleMsg ? (t.showError(a.titleMsg), void(a.actionResultCode ? e(a) : n(a))) : a.sid || a.st ? (t.setNativeSession(se(se({}, a), {}, {
cookie2: a.sid
})), void e(a)) : a.iframeRedirectUrl || a.redirectUrl ? (be === b.TOUTIAO && n({
type: "redirect"
}), t.initConfig({}, e, n), void t.navigateTo("".concat(l, "?url=").concat(encodeURIComponent(a.iframeRedirectUrl || a.redirectUrl)))) : void(a.actionResultCode ? e(a) : n())
}
n()
},
fail: function (e) {
n(e)
}
})
}))
}
}, {
key: "sendVerifyCode",
value: function (e) {
var t = this,
n = e.extParams,
r = this.config,
i = r.gateway,
o = r.appId,
a = r.appName,
c = r.header,
s = void 0 === c ? {} : c,
u = r.isMobile,
l = r.awsc;
return new Promise((function (e, r) {
l && "function" == typeof l.getFYToken && (s["bx-ua"] = l.getFYToken());
var c = se({
type: be,
appId: o,
appName: a,
isMobile: u,
appEntrance: "mp_bind",
codeLength: 4,
nativeMp: !0,
phoneCode: "86",
countryCode: "CN",
bizParams: t.bizParams,
pageTraceId: t.sdkTraceId
}, n);
me({
url: "".concat(i, "/newlogin/sms/send.do"),
data: c,
header: se({}, s),
dataType: "json",
method: "POST",
success: function (n) {
var i = E(n);
if (t.catchSystemError(n)) r({
traceId: i
});
else {
var o = n.data.content.data,
a = void 0 === o ? {} : o;
if (a.traceId = i, a.titleMsg) return t.showError(a.titleMsg), void r(a);
e(a)
}
},
fail: function (e) {
t.showError(ke), r(e)
}
})
}))
}
}, {
key: "smsLogin",
value: function (e) {
var t = this,
n = e.extParams,
r = this.config,
i = r.gateway,
o = r.appId,
a = r.appName,
c = r.header,
s = void 0 === c ? {} : c,
u = r.pagePath,
l = r.isMobile,
d = r.awsc;
return d && "function" == typeof d.getFYToken && (s["bx-ua"] = d.getFYToken()), new Promise((function (e, r) {
var c = se({
type: be,
appId: o,
appName: a,
appEntrance: "mp_bind",
nativeMp: !0,
bizParams: t.bizParams,
phoneCode: "86",
countryCode: "CN",
pageTraceId: t.sdkTraceId,
needPassWebViewCookie: !1,
isMobile: l
}, n);
me({
url: "".concat(i, "/newlogin/sms/login.do"),
data: c,
header: se({}, s),
dataType: "json",
method: "POST",
success: function (n) {
if (!t.catchSystemError(n)) {
var i = n.data.content.data,
o = void 0 === i ? {} : i,
a = E(n);
return o.traceId = a, o.titleMsg ? (t.showError(o.titleMsg), void(o.actionResultCode ? e(o) : r(o))) : o.iframeRedirectUrl || o.redirectUrl ? ([b.TOUTIAO, b.DINGTALK].includes(be) && r({
type: "redirect"
}), t.initConfig({}, e, r), void t.navigateTo("".concat(u, "?url=").concat(encodeURIComponent(o.iframeRedirectUrl || o.redirectUrl)))) : o.sid || o.st ? (t.setNativeSession(se(se({}, o), {}, {
cookie2: o.sid
})), void e(o)) : void(o.actionResultCode ? e(o) : r(o))
}
r()
},
fail: function (e) {
t.showError(ke), r(e)
}
})
}))
}
}, {
key: "changeBind",
value: function (e) {
var t = this,
n = e.extParams,
r = this.config,
i = r.gateway,
o = r.appName,
a = r.header,
c = void 0 === a ? {} : a,
s = r.isMobile,
u = r.awsc;
return u && "function" == typeof u.getFYToken && (c["bx-ua"] = u.getFYToken()), new Promise((function (e, r) {
var a = se({
appName: o,
appEntrance: "mp_bind",
bizParams: t.bizParams,
isMobile: s
}, n);
me({
url: "".concat(i, "/newlogin/mini_continue_login"),
data: a,
header: se({}, c),
dataType: "json",
method: "POST",
success: function (n) {
if (t.catchSystemError(n)) r();
else {
var i = n.data.content.data,
o = void 0 === i ? {} : i,
a = E(n);
if (o.traceId = a, o.titleMsg) return t.showError(o.titleMsg), void r(o);
o.sid || o.st ? (t.setNativeSession(se(se({}, o), {}, {
cookie2: o.sid
})), e(o)) : r(o)
}
},
fail: function (e) {
t.showError(ke), r(e)
}
})
}))
}
}, {
key: "h5LoginFlagPolling",
value: function (e) {
var t = this,
n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 5,
r = this.config,
i = r.appName,
o = r.appEntrance,
a = r.header,
c = void 0 === a ? {} : a,
s = r.gateway,
u = r.awsc,
l = function () {
n > 0 && setTimeout((function () {
return t.h5LoginFlagPolling(e, n - 1)
}), 2e3)
};
u && "function" == typeof u.getFYToken && (c["bx-ua"] = u.getFYToken()), me({
url: "".concat(s, "/mini_program/syn_cookie_result_check.do"),
data: {
appName: i,
appEntrance: o,
mpSynCookieFlagToken: e
},
header: c,
dataType: "json",
method: "POST",
success: function (e) {
var n = t.getSession();
try {
"login_success" === e.data.content.data.actionResultCode ? (n.h5LoginFlag = !0, n.h5LoginFlagTimer = (new Date).getTime(), t.setNativeSession(n)) : l()
} catch (e) {
l()
}
},
fail: l
})
}
}, {
key: "getH5LoginUrl",
value: function (e) {
var t = this,
n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
r = this.config,
i = r.gateway,
o = r.appId,
a = r.appName,
c = r.appEntrance,
s = r.sellerAppId,
u = r.lang,
l = r.isMobile,
d = r.needPassWebViewCookie,
f = r.returnUrl,
p = r.type,
m = r.header,
h = void 0 === m ? {} : m,
v = r.awsc,
g = n.cookieExpiration,
y = void 0 === g ? 864e5 : g,
A = "",
w = [],
b = this.getSession();
if (!Object.keys(b).length) return Promise.reject("web-view登录态需要使用小程序登录态换取当前小程序无登录态");
for (var _ in b) w.push("".concat(_, "=").concat(b[_]));
return A = w.join("; "), v && "function" == typeof v.getFYToken && (h["bx-ua"] = v.getFYToken()), new Promise((function (n, r) {
!0 === b.h5LoginFlag && (new Date).getTime() - b.h5LoginFlagTimer < y ? n(e) : me({
url: "".concat(i, "/mini_program/apply_trust_login_url.do"),
data: {
type: p || be,
appId: o,
appName: a,
appEntrance: c,
sellerAppId: s,
lang: u,
isMobile: l,
returnUrl: f,
needPassWebViewCookie: d,
pageTraceId: t.sdkTraceId,
targetUrl: e
},
header: se(se({}, h), {}, {
cookie: A
}),
dataType: "json",
method: "POST",
success: function (e) {
try {
var i = E(e),
o = e.data.content.data,
a = void 0 === o ? {} : o;
a.traceId = i, a.redirectUrl ? (t.h5LoginFlagPolling(a.mpSynCookieFlagToken), n && n(a.redirectUrl)) : r && r(a)
} catch (e) {
r && r({
error: e,
data: data
})
}
},
fail: function (e) {
r && r(e)
}
})
}))
}
}]), e
}(),
Oe = n(3847),
Pe = n(2267),
Ne = {
type: "common",
text: "设置",
spm: "top.setting",
url: "/subPackages/setting/index"
};
function Le() {
var e = {},
t = [{
number: 0,
text: "想看的演出",
url: "/pages/want2see/index",
spm: "userstatus.dfavorite_perform"
}, {
number: 0,
text: "关注",
url: "https://m.damai.cn/damai/mine/want-to-see/index.html?tab=0&hideTab=true",
spm: "userstatus.dfavorite_person"
}, {
number: 0,
text: "我的评价",
url: "https://m.damai.cn/shows/pages/my-comment.html",
spm: "userstatus.dcomment"
}, {
number: 0,
text: "优惠券",
url: "https://m.damai.cn/tickets/moviemine/pages/coupon-list/index.html",
spm: "userstatus.dcoupon"
}],
n = {
imgUrl: "https://gw.alicdn.com/tfs/TB1OvYEsrj1gK0jSZFuXXcrHpXa-150-150.png",
userNick: "登录/注册"
};
return e.vipCardInfo = JSON.parse('{\n "buttonText":"查看",\n "cardList":[\n {\n "cardDesc":"",\n "cardId":21\n }\n ],\n "vipLevel": 0,\n "optionalMsg":"更多权益尽在VIP会员",\n "url": "https://m.damai.cn/damai/activity/vip/index.html",\n "spm": "top.dopen_vip"\n }\n '), Pe.A.isTT && (e.vipCardInfo = null), e.userInfoData = {
statusEntrys: t,
userInfo: n,
settingEntry: Ne
}, e
}
var Ue = n(9148);
s().init({
appName: "damai",
filterJanus: function () {
return !0
},
filterUab: function (e) {
return ["mtop.damai.item.detail.getdetail"].some((function (t) {
return -1 !== e.indexOf(t)
}))
},
filterUmid: function () {
return !0
}
});
var De = new A.t,
Re = (0, Ue.er)(),
je = g.A.havanalogin,
Me = je.type,
Be = je.appid,
qe = je.getGateWay,
Ve = je.sessionKey,
We = je.appEntrance,
Je = je.sessionTimestampKey,
Ye = {
wapa: "https://market.wapa.damai.cn/movies/logout.html?delta=1",
m: "https://m.damai.cn/movies/logout.html?delta=1"
};
function Fe(e) {
try {
return m.A.getStorageSync(e)
} catch (e) {
return null
}
}
function He(e, t) {
try {
m.A.setStorageSync(e, t)
} catch (e) {}
}
var Ge = {
miniLogin: null,
session: {},
env: "",
dmUserInfo: {},
authCallbacks: [],
utdid: "",
webviewLoginValid: !1,
requestQueue: [],
logoutH5JumpUrl: "",
init: function () {
var e = qe();
this.miniLogin = new Ee({
awsc: s(),
type: Me,
appid: Be,
gateway: e,
sessionKey: Ve,
appEntrance: We,
toastError: null,
appName: "damai",
pagePath: "/pages/webview/index"
}), d.A.mtop.config.$loginClient = this.miniLogin, this.env = g.A.env, this.logoutH5JumpUrl = Ye[this.env], this.dmUserInfo = Fe("dmUserInfo"), this.utdid = function () {
var e = Fe("dm_utdid");
return e || He("dm_utdid", e = "wx" + function () {
var e = h,
t = v;
return t(e(32), 8) + "-" + t(e(16), 4) + "-" + t(16384 | e(12), 4) + "-" + t(32768 | e(14), 4) + "-" + t(e(48), 12)
}()), e
}()
},
listeners: new Set,
addListener: function (e) {
e && this.listeners.add(e)
},
setAuthResult: function (e) {
var t, n = (0, a.A)(this.authCallbacks);
try {
for (n.s(); !(t = n.n()).done;) {
(0, t.value)(e)
}
} catch (e) {
n.e(e)
} finally {
n.f()
}
this.authCallbacks = []
},
obtainAuth: function () {
var e = this;
return (0, o.A)((0, i.A)().m((function t() {
var n;
return (0, i.A)().w((function (t) {
for (;;) switch (t.n) {
case 0:
return t.n = 1, new Promise((function (t) {
e.authCallbacks.push((function (e) {
t(e)
}));
f.A.navTo("/pages/login/index")
}));
case 1:
return n = t.v, t.a(2, n)
}
}), t)
})))()
},
hasAuthed: function () {
return (0, o.A)((0, i.A)().m((function e() {
var t;
return (0, i.A)().w((function (e) {
for (;;) switch (e.n) {
case 0:
return e.n = 1, new Promise((function (e) {
"tt" !== m.A.is ? "swan" !== m.A.is ? m.A.getUserInfo({
success: function () {
e(!0)
},
fail: function () {
e(!0)
}
}) : swan.getLoginCode({
success: function () {
e(!0)
},
fail: function (t) {
e(!1)
}
}) : e(!0)
}));
case 1:
return t = e.v, e.a(2, t)
}
}), e)
})))()
},
isWebviewLoginValid: function () {
return this.webviewLoginValid
},
setWebviewLoginValid: function (e) {
this.webviewLoginValid = e
},
deleteListener: function (e) {
e && this.listeners.delete(e)
},
getSid: function () {
var e, t = {};
try {
t = JSON.parse(Fe(Ve))
} catch (e) {}
return (null === (e = this.session) || void 0 === e ? void 0 : e.cookie2) || t.cookie2 || ""
},
getHavanaId: function () {
var e, t;
return (null === (e = this.session) || void 0 === e ? void 0 : e.munb) || (null === (t = this.dmUserInfo) || void 0 === t ? void 0 : t.havanaId) || ""
},
getOpenId: function () {
var e;
return (null === (e = this.dmUserInfo) || void 0 === e ? void 0 : e.openid) || ""
},
getUserId: function () {
var e;
return (null === (e = this.dmUserInfo) || void 0 === e ? void 0 : e.userId) || ""
},
getUtdid: function () {
return this.utdid
},
removeMineLoginedData: function () {
try {
l().setStorage({
key: "mine-user-data",
data: JSON.stringify(Le())
})
} catch (e) {}
},
logout: function () {
var e = this;
return new Promise((function (t, n) {
Oe.A.show(), e.session = {}, e.dmUserInfo = {}, He("dmUserInfo", {}), e.removeMineLoginedData(), He(Je, ""), e.miniLogin.unbind((function () {
return Oe.A.hide(), l().showToast({
title: "解绑成功!",
icon: "none"
}), t()
}), (function (e) {
return Oe.A.hide(), l().showToast({
title: e && e.msg || "解绑失败,请稍后再试",
icon: "none"
}), n(e)
}))
}))
},
logoutH5: function () {
if (this.logoutH5JumpUrl) {
var e = "https://ipassport.damai.cn/logout.htm?site=18&toURL=".concat(encodeURIComponent(this.logoutH5JumpUrl)),
t = "/pages/webview/index?url=".concat(encodeURIComponent(e));
l().redirectTo({
url: t
})
}
},
afterSuccessLogin: function (e, t) {
var n = this;
return (0, o.A)((0, i.A)().m((function r() {
return (0, i.A)().w((function (r) {
for (;;) switch (r.n) {
case 0:
if (e) {
r.n = 1;
break
}
return r.a(2, {
success: !1
});
case 1:
return n.session = t, n._updateDMUserInfoFromRemote(t), n.uploadPersonalInfo(), setTimeout((function () {
return n.postNotifyListeners(!0)
}), 500), He(Je, (new Date).getTime()), r.a(2, {
success: !0
})
}
}), r)
})))()
},
login: function () {
var e = this;
return (0, o.A)((0, i.A)().m((function t() {
var n, r, o, a;
return (0, i.A)().w((function (t) {
for (;;) switch (t.n) {
case 0:
return e.miniLogin, t.n = 1, e.hasAuthed();
case 1:
if (t.v) {
t.n = 3;
break
}
return t.n = 2, e.obtainAuth();
case 2:
if (t.v.success) {
t.n = 3;
break
}
return t.a(2, {
success: !1
});
case 3:
return t.n = 4, e.havanaLogin();
case 4:
return n = t.v, r = n.success, o = n.session, t.n = 5, e.afterSuccessLogin(r, o);
case 5:
return a = t.v, t.a(2, a)
}
}), t)
})))()
},
_updateDMUserInfoFromRemote: function (e) {
var t = this;
return (0, o.A)((0, i.A)().m((function n() {
var r;
return (0, i.A)().w((function (n) {
for (;;) switch (n.n) {
case 0:
return n.n = 1, t._getDMUserInfoyBySt(e.st);
case 1:
if (!(r = n.v).error) {
n.n = 2;
break
}
return n.a(2);
case 2:
t.dmUserInfo = r.data, He("dmUserInfo", t.dmUserInfo);
case 3:
return n.a(2)
}
}), n)
})))()
},
handleReturnUrl: function (e) {
return (0, o.A)((0, i.A)().m((function t() {
var n, r, o;
return (0, i.A)().w((function (t) {
for (;;) switch (t.p = t.n) {
case 0:
if (n = e, !e || !e.includes("needcoordinate=true")) {
t.n = 4;
break
}
return t.p = 1, t.n = 2, De.getLocation({
isHighAccuracy: !0,
type: "gcj02"
});
case 2:
r = t.v, o = e.includes("?") ? "&" : "?", n += "".concat(o, "latitude=").concat(r.latitude, "&longitude=").concat(r.longitude), t.n = 4;
break;
case 3:
t.p = 3, t.v;
case 4:
return t.a(2, n)
}
}), t, null, [
[1, 3]
])
})))()
},
havanaLogin: function () {
var e = this;
return (0, o.A)((0, i.A)().m((function t() {
return (0, i.A)().w((function (t) {
for (;;) switch (t.n) {
case 0:
return t.a(2, new Promise((function (t) {
e.miniLogin.login({
needPassWebViewCookie: !1
}).then((function (e) {
t({
success: !0,
session: e
})
})).catch((function (e) {
t({
success: !1,
session: null
})
}))
})))
}
}), t)
})))()
},
trySilentLogin: function () {
var e = this,
t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
n = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1];
return this.miniLogin.trySilentLogin(t, {
skipWebViewCookie: n
}).then((function (t) {
return e.afterSuccessLogin(!0, t), t
})).catch((function (e) {
return e
}))
},
getH5LoginUrl: function (e) {
var t = this;
return (0, o.A)((0, i.A)().m((function n() {
var r;
return (0, i.A)().w((function (n) {
for (;;) switch (n.n) {
case 0:
return n.n = 1, t.handleReturnUrl(e);
case 1:
return r = n.v, n.a(2, t.miniLogin.getH5LoginUrl(r, {
cookieExpiration: 864e5
}).then((function (e) {
return e || ""
})).catch((function (e) {
return y.A.sendGoldLog("OTHER", "/dianying.fe.events", {
data: e,
name: "getH5LoginUrlError",
desc: "换取登录URL失败"
}), ""
})))
}
}), n)
})))()
},
postNotifyListeners: function (e) {
var t, n = (0, a.A)(this.listeners);
try {
for (n.s(); !(t = n.n()).done;) {
var r = t.value;
if (r) {
if (e && r.success) return void r.success();
!e && r.fail && r.fail()
}
}
} catch (e) {
n.e(e)
} finally {
n.f()
}
},
isHasCookie2: function () {
var e = !1;
try {
Fe(Ve) && (e = !0)
} catch (e) {}
return e
},
isCookie2EnableWithLocalCheck: function () {
var e = !1;
try {
var t = Fe(Je);
if (t) {
var n = (new Date).getTime();
t && t + 3e6 > n && (e = !0)
}
} catch (e) {}
return e
},
isLogin: function () {
var e = this;
return (0, o.A)((0, i.A)().m((function t() {
var n, o, a, c;
return (0, i.A)().w((function (t) {
for (;;) switch (t.n) {
case 0:
if (e.dmUserInfo) {
t.n = 1;
break
}
return t.a(2, !1);
case 1:
return t.n = 2, e.hasAuthed();
case 2:
if (t.v) {
t.n = 3;
break
}
return t.a(2, !1);
case 3:
return t.n = 4, new p.A({
url: "mtop.damai.wireless.user.islogin",
v: "1.0",
data: {},
env: e.env
}).request();
case 4:
if (n = t.v, o = (0, r.A)(n, 2), a = o[0], c = o[1], !a) {
t.n = 5;
break
}
return t.a(2, !1);
case 5:
if (!c) {
t.n = 6;
break
}
return t.a(2, !0);
case 6:
return t.a(2, !1)
}
}), t)
})))()
},
_getDMUserInfoyBySt: function (e) {
var t = this;
return (0, o.A)((0, i.A)().m((function n() {
var o, a, c, s;
return (0, i.A)().w((function (n) {
for (;;) switch (n.n) {
case 0:
return n.n = 1, new p.A({
api: "mtop.damai.wireless.user.service.token.validate",
data: {
st: e
},
env: t.env
}).request();
case 1:
return o = n.v, a = (0, r.A)(o, 2), c = a[0], s = a[1], n.a(2, {
error: c,
data: s
})
}
}), n)
})))()
},
uploadPersonalInfo: function () {
var e = this;
return (0, o.A)((0, i.A)().m((function t() {
var n, o, a, c, s, u;
return (0, i.A)().w((function (t) {
for (;;) switch (t.n) {
case 0:
return t.n = 1, new p.A({
api: "mtop.damai.wireless.my.getpersonalinfo",
v: "2.0",
data: {
needUserBaseInfo: !0
},
env: e.env
}).request();
case 1:
if (o = t.v, a = (0, r.A)(o, 2), c = a[0], s = a[1], c || null == s || null === (n = s.userBaseInfo) || void 0 === n || !n.mobile || -1 === Re) {
t.n = 2;
break
}
return t.n = 2, new p.A({
api: "mtop.damai.mc.push.token.uploadnew",
v: "1.1",
data: {
channel: 50001,
tokenPassage: Re,
token: null == s || null === (u = s.userBaseInfo) || void 0 === u ? void 0 : u.mobile
},
env: e.env
}).request();
case 2:
return t.a(2)
}
}), t)
})))()
}
}
},
3847: function (e, t, n) {
var r = n(29),
i = n(5517),
o = n(4017),
a = (0, i.A)((function e() {
(0, r.A)(this, e)
}), [{
key: "show",
value: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "加载中...";
o.A.showLoading({
title: e
})
}
}, {
key: "hide",
value: function () {
o.A.hideLoading()
}
}, {
key: "showNavigationBarLoading",
value: function () {
o.A.showNavigationBarLoading()
}
}, {
key: "hideNavigationBarLoading",
value: function () {
o.A.hideNavigationBarLoading()
}
}]);
t.A = new a
},
4017: function (e, t, n) {
var r = n(2267),
i = function () {
return {}
},
o = null;
try {
o = new Proxy(r.A.context, {
get: function (e, t) {
return "".concat(r.A.contextName, ".").concat(t), e[t] ? e[t] : i
}
})
} catch (e) {
o = r.A.context
}
o.is = r.A.contextName, o.context = r.A.context, t.A = o
},
4043: function (e, t, n) {
var r = n(3260),
i = n(7805),
o = n(2248),
a = n.n(o);
a().init({
appName: "damai",
filterJanus: function () {
return !0
},
filterUab: function (e) {
return ["mtop.damai.item.detail.getdetail"].some((function (t) {
return -1 !== e.indexOf(t)
}))
},
filterUmid: function () {
return !0
}
});
var c = {
appid: "wx938b41d0d7e8def0",
havanalogin: {
appEntrance: "default",
appName: "damai",
loginType: "weixin_mini_program",
sessionKey: r.A,
awsc: a(),
sessionTimestampKey: r.A + "_LOGIN_TIMESTAMP"
},
aplusRefDomain: "wechat-miniapp.damai.cn",
cmsPatternName: {
nowShowing: "outer_home_weixin",
comingSoon: "outer_soonshow_weixin",
homePopup: "outer_home_popup_weixin",
giftPack: "outer_red_envelopes_weixin",
nowShowingVersion: "1.0",
comingSoonVersion: "1.0",
homePopupVersion: "1.0",
giftPackVersion: "1.0"
},
comboChannel: "108",
platformValue: 42,
platformName: "微信",
h5_from: "wechat",
default_sqm: {
DSL: "".concat(i.c, ".wechat.home.0"),
h5: "".concat(i.c, ".wechat.miniapp.unknown")
},
img: {
isNeedHttpsPrefix: !1
}
};
t.A = c
},
4492: function (e, t, n) {
var r = n(4576),
i = n(5652),
o = n(2555),
a = n(29),
c = n(5517),
s = n(2573),
u = n.n(s),
l = n(9365),
d = (0, c.A)((function e() {
(0, a.A)(this, e), this.position = null, this.city = null, this.isAuthed = !1
}), [{
key: "openAuthConfirm",
value: function (e, t) {
var n = this;
u().showModal({
content: "需要先授权[地理位置信息],才可获取你的位置信息",
confirmText: "去设置",
cancelText: "取消",
success: function (r) {
r.confirm ? u().openSetting({
success: function () {
var r = (0, o.A)((0, i.A)().m((function r(o) {
return (0, i.A)().w((function (r) {
for (;;) switch (r.n) {
case 0:
o.authSetting["scope.userLocation"] ? (n.isAuthed = !0, e()) : t();
case 1:
return r.a(2)
}
}), r)
})));
return function (e) {
return r.apply(this, arguments)
}
}()
}) : t()
}
})
}
}, {
key: "getCurrentPosition",
value: function () {
var e = (0, o.A)((0, i.A)().m((function e() {
var t = this;
return (0, i.A)().w((function (e) {
for (;;) switch (e.n) {
case 0:
return e.a(2, new Promise((function (e) {
u().getLocation({
type: "gcj02",
success: function (n) {
t.isAuthed = !0, t.position = n, e({
position: n
})
},
fail: function (n) {
"getLocation:fail auth deny" === n.errMsg && (t.isAuthed = !1), e({
error: n
})
}
})
})))
}
}), e)
})));
return function () {
return e.apply(this, arguments)
}
}()
}, {
key: "getPostion",
value: function () {
return this.position
}
}, {
key: "getCurrentCity",
value: function () {
var e = (0, o.A)((0, i.A)().m((function e() {
var t, n, o, a, c, s;
return (0, i.A)().w((function (e) {
for (;;) switch (e.n) {
case 0:
return e.n = 1, this.getCurrentPosition();
case 1:
if (t = e.v, n = t.position) {
e.n = 2;
break
}
return e.a(2, {
error: {
errorCode: -1,
errorMessage: "定位失败"
}
});
case 2:
return e.n = 3, l.A.$fetch({
url: "mtop.damai.wireless.cities.location.parse",
v: "1.0",
data: {
latitude: n.latitude,
longitude: n.longitude
}
});
case 3:
if (o = e.v, a = (0, r.A)(o, 2), c = a[0], s = a[1], !c) {
e.n = 4;
break
}
return e.a(2, {
error: {
errorCode: -2,
errorMessage: "查询城市失败"
}
});
case 4:
if (!s) {
e.n = 5;
break
}
return this.city = {
cityName: s.name,
cityId: s.cityId,
damaiId: s.damaiId
}, e.a(2, {
city: this.city
});
case 5:
return e.a(2, null)
}
}), e, this)
})));
return function () {
return e.apply(this, arguments)
}
}()
}, {
key: "getCity",
value: function () {
return this.city
}
}]);
t.A = new d
},
4752: function (e, t, n) {
n.d(t, {
Th: function () {
return k
},
kU: function () {
return I
}
});
var r, i = n(4107),
o = n(5882),
a = n(4576),
c = n(2573),
s = n.n(c),
u = n(5507),
l = n.n(u),
d = n(644),
f = n.n(d),
p = n(4043),
m = n(8477),
h = n(6432),
v = n(2531),
g = n(7389),
y = n(3816),
A = n(7805),
w = ["_pageRoute", "spm"],
b = function (e) {
var t = e || (0, h.Jt)("query") || {},
n = t.pid,
r = t.relationId,
i = r ? "--".concat(r) : "";
return n ? n + i : ""
},
_ = function () {
var e, t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
n = t.sqm,
r = t.sqme,
i = t.defSqm,
o = void 0 === i ? g.G : i,
a = n || (null === (e = (0, h.Jt)("query")) || void 0 === e ? void 0 : e.sqm) || o;
if (r || (r = b()), !r) return a;
var c = a.split(".");
return c[4] = [r], c.join(".")
};
l().hooks.commonParams.tapPromise("oldExt", (function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new Promise((function (t) {
s().getSystemInfo({
success: function (n) {
try {
e.app_version = (0, m.ZP)(), e.platformVersionCode = n.version, e.brand = n.brand, e.device_model = n.model, e.os = n.platform, e.os_version = n.system, e.platform = (0, h.Jt)("platformValue"), e._p_maid = p.A.appid, e.app = "damai", e.scene_id = (0, h.Jt)("scene"), e.miniapp = "weixin", e.pc_i = y.A.getUtdid(), e.pu_i = y.A.getUserId(), e.havana_id = y.A.getHavanaId()
} catch (e) {}
t()
},
fail: function () {
t()
}
})
}))
})), l().hooks.commonParams.tapPromise("px_i", (function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
t = (new Date).getTime().toString();
return Promise.all([(0, m.n2)(m.Zb, "KEY_PC_I", (function () {
return Promise.resolve("".concat((new Date).getTime()).concat((0, m.hw)(1, 999999)))
})), (0, m.n2)(m.Zb, "KEY_PS_I", (function () {
return Promise.resolve("".concat(t.slice(t.length / 2)).concat((0, m.hw)(1024, 102400)))
}))]).then((function (t) {
var n = (0, a.A)(t, 2)[1];
e.ps_i = n
}))
})), l().hooks.commonParams.tapPromise("sqm", (function () {
var e, t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return t.sqm = _({
sqm: t.sqm,
defSqm: null === (e = p.A.default_sqm) || void 0 === e ? void 0 : e.DSL
}), Promise.resolve()
})), l().hooks.commonParams.tapPromise("spmad", (function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
t = e._d_index,
n = e.spmC,
r = e.spmD;
return n && r && (void 0 !== t && (r = "".concat(r).concat(t), delete e._d_index), e.spmad = "".concat(l().universalLog.getPageSPM().slice(0, 2).join("."), ".").concat(n, ".").concat(r), delete e.spmC, delete e.spmD), Promise.resolve()
})), l().hooks.commonParams.tapPromise("searchRequestId", (function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
t = (0, m.VO)();
return t && (e.search_request_id = t), Promise.resolve()
})), l().hooks.pv.tapPromise("pageInfo", (function (e, t) {
var n, i = t,
a = i._pageRoute,
c = i.spm;
if (t = (0, o.A)(i, w), e._p_url = e.pageUrl, e.spmA = A.c, a && (0, v.A)().hasOwnProperty(a)) {
e.pageName = (0, v.A)()[a].name, e.spmB = (0, v.A)()[a].spm || (null == e ? void 0 : e.spmB);
var s = f()(p.A, "aplusRefDomain", "h5.m.taobao.com");
e.pageUrl = "https://".concat(s, "/").concat(e.pageName, ".html")
}
var u = c && c.split(".").length > 0,
d = !0;
u && void 0 !== r && (c.split(".")[1] !== r && (d = !1, t.page_resume = "YES"));
if (u && d) e.spmUrl = c, delete e.spm, l().universalLog.updateNextPageProperties({
"spm-url": c
});
else if (void 0 !== r) {
var m = "".concat(A.c, ".").concat(r, ".0.0");
e.spmUrl = m, l().universalLog.updateNextPageProperties({
"spm-url": m
})
} else e.spmUrl = " ";
return r = (null === (n = (0, v.A)()[a]) || void 0 === n ? void 0 : n.spm) || (null == e ? void 0 : e.spmB), Promise.resolve()
}));
var S = function (e, t, n) {
var r;
if (null !== (r = t) && void 0 !== r && r.trackInfo) {
t = t.trackInfo;
var o = "EXP" === e ? t.exposeEventName : t.clickEventName;
o && l().sendGoldLog(e, o, (0, i.A)((0, i.A)({
spmC: t.spmc,
spmD: t.spmd
}, t.args), n))
}
},
k = function (e, t) {
return S("EXP", e, t)
},
I = function (e, t) {
return S("CLK", e, t)
};
t.Ay = l()
},
4911: function (e, t, n) {
n.d(t, {
A: function () {
return I
}
});
var r = n(4576),
i = n(4107),
o = n(5652),
a = n(469),
c = n(2555),
s = n(29),
u = n(5517),
l = n(1789),
d = n(6703),
f = n(1925),
p = n(8835),
m = n(5765),
h = n(4017),
v = function (e) {
function t() {
return (0, s.A)(this, t), (0, d.A)(this, t, arguments)
}
return (0, f.A)(t, e), (0, u.A)(t, [{
key: "intercept",
value: function (e) {
var t = e || {},
n = t.uri,
r = void 0 === n ? "" : n,
i = t.params,
o = t.options,
a = void 0 === o ? {} : o;
r.startsWith("/") || (r = "/" + r), r = "https://m.damai.cn" + r;
var c = new m.g(r),
s = c.params;
if (i)
for (var u in i) s[u] = i[u];
var l, d = c.pathname + c.search;
return l = a.navigateType ? a.navigateType : a.redirect ? "redirectTo" : "navigateTo", this.goto(d, l), !0
}
}, {
key: "goto",
value: function (e, t) {
h.A[t]({
url: e
})
}
}])
}(p.c),
g = n(9365),
y = n(7852),
A = function () {
try {
return h.A.getSystemInfoSync()
} catch (e) {
return {}
}
}(),
w = {
pid: "dm-wx-miniprogram",
code: "2",
msg: "接口异常",
uid: "",
page: "",
title: "",
rel: "",
ua: JSON.stringify(A),
referrer: "",
query: "",
hash: ""
};
function b(e, t, n, r, i, o) {
try {
var a = {
code: 33,
msg: "小程序路由错误",
sampleRate: 1,
c1: e,
c2: t,
c3: n,
c4: r,
c5: i,
c6: o
};
! function (e, t) {
h.A.request({
url: e,
data: t
})
}("https://gm.mmstat.com/fsp.1.1", (0, y.X$)(!0, {}, w, a))
} catch (e) {}
}
var _ = n(8572),
S = n(6432),
k = g.A,
I = new((0, u.A)((function e() {
(0, s.A)(this, e), this.catch = new Map, this.interceptors = [], this.prefetchList = [], this.httpDefaultInterceptor = new l.t, this.nativeDefaultInterceptor = new v
}), [{
key: "addPrefetchConfig",
value: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
t = e.prefetchList,
n = void 0 === t ? [] : t;
this.prefetchList = n
}
}, {
key: "addInterceptor",
value: function (e) {
e instanceof p.c && this.interceptors.push(e)
}
}, {
key: "navTo",
value: function () {
var e = (0, c.A)((0, o.A)().m((function e(t) {
var n, r, i, c, s, u, l, d, f, m, h, v, g, y, A, w, _, k = arguments;
return (0, o.A)().w((function (e) {
for (;;) switch (e.p = e.n) {
case 0:
if (n = k.length > 1 && void 0 !== k[1] ? k[1] : {}, r = k.length > 2 && void 0 !== k[2] ? k[2] : {}, i = !0, e.p = 1, !(A = "function" == typeof wx[(0, S.Jt)("decode")("Z2V0UmVuZGVyZXJVc2VyQWdlbnQ=")])) {
e.n = 3;
break
}
return e.n = 2, wx[(0, S.Jt)("decode")("Z2V0UmVuZGVyZXJVc2VyQWdlbnQ=")]();
case 2:
A = e.v;
case 3:
if (y = A) {
e.n = 4;
break
}
y = "";
case 4:
c = y, (![(0, S.Jt)("decode")("aW9z"), (0, S.Jt)("decode")("YW5kcm9pZA=="), (0, S.Jt)("decode")("b2hvcw==")].includes(wx[(0, S.Jt)("decode")("Z2V0RGV2aWNlSW5mbw==")]()[(0, S.Jt)("decode")("cGxhdGZvcm0=")]) || (0, S.Jt)((0, S.Jt)("decode")("ZW52VmVyc2lvbg==")) === (0, S.Jt)("decode")("cmVsZWFzZQ==") && !0 === wx[(0, S.Jt)("decode")("Z2V0QXBwQmFzZUluZm8=")]()[(0, S.Jt)("decode")("ZW5hYmxlRGVidWc=")] || c.indexOf((0, S.Jt)("decode")("d2VjaGF0ZGV2dG9vbHM=")) > -1 || c.indexOf((0, S.Jt)("decode")("TWluaVByb2dyYW1FbnYvTWFj")) > -1 || c.indexOf((0, S.Jt)("decode")("TWluaVByb2dyYW1FbnYvV2luZG93cw==")) > -1) && (i = !1), e.n = 6;
break;
case 5:
e.p = 5, w = e.v, "function" == typeof armsReport && armsReport({
code: 1e3,
msg: (0, S.Jt)("decode")("aW50ZXJjZXB0LXBj"),
m1: 1,
c1: JSON.stringify(w.message)
});
case 6:
if (!1 !== i) {
e.n = 7;
break
}
return e.a(2, !1);
case 7:
if (s = t, !t) try {
b(t, JSON.stringify(n), JSON.stringify(r))
} catch (e) {}
if (this.formatCmsTrackInfo(n), u = {
uri: t,
params: n,
options: r,
delay: 0
}, !(this.interceptors.length > 0)) {
e.n = 15;
break
}
l = (0, a.A)(this.interceptors), e.p = 8, l.s();
case 9:
if ((d = l.n()).done) {
e.n = 12;
break
}
if (!((f = d.value) instanceof p.c)) {
e.n = 11;
break
}
return e.n = 10, f.intercept(u);
case 10:
if (!e.v) {
e.n = 11;
break
}
return e.a(2, !0);
case 11:
e.n = 9;
break;
case 12:
e.n = 14;
break;
case 13:
e.p = 13, _ = e.v, l.e(_);
case 14:
return e.p = 14, l.f(), e.f(14);
case 15:
if (!u.uri || "undefined" === u.uri) try {
b(s, JSON.stringify(n), JSON.stringify(r), u.uri, JSON.stringify(u.params), JSON.stringify(u.options))
} catch (e) {}
if (m = !1, !(u.uri || "").startsWith("http")) {
e.n = 17;
break
}
return e.n = 16, this.httpDefaultInterceptor.intercept(u);
case 16:
m = e.v;
case 17:
if ((h = this.prefetchList.find((function (e) {
return (u.uri || "").includes(e.path)
}))) && (v = this.formatPrefetchParams(h, u.uri, n), h.prefetch && h.prefetch(v)), m) {
e.n = 19;
break
}
return e.n = 18, this.nativeDefaultInterceptor.intercept(u);
case 18:
m = e.v;
case 19:
return g = m, e.a(2, g)
}
}), e, this, [
[8, 13, 14, 15],
[1, 5]
])
})));
return function (t) {
return e.apply(this, arguments)
}
}()
}, {
key: "navBack",
value: function (e) {
h.A.navigateBack(e)
}
}, {
key: "getTabParams",
value: function (e) {
var t = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1],
n = null;
return e && (n = this.catch.get(e), t && this.catch.delete(e)), n
}
}, {
key: "setTabParams",
value: function (e, t) {
e && this.catch.set(e, t)
}
}, {
key: "sleep",
value: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 100;
return new Promise((function (t) {
setTimeout(t, e)
}))
}
}, {
key: "formatPrefetchParams",
value: function (e, t) {
var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {},
o = e.argsFromRouter,
a = void 0 === o ? [] : o,
c = e.otherArgs,
s = (0, _.A)(t),
u = s.query,
l = void 0 === u ? {} : u,
d = (0, i.A)((0, i.A)({}, l), n),
f = {};
return a.forEach((function (e) {
if (Array.isArray(e)) {
var t = (0, r.A)(e, 2),
n = t[0],
i = t[1],
o = void 0 === i ? [] : i,
a = Object.keys(d).find((function (e) {
return o.includes(e)
}));
a && (f[n] = d[a])
} else "string" == typeof e && (f[e] = d[e])
})), (0, i.A)((0, i.A)({}, c), f)
}
}, {
key: "formatCmsTrackInfo",
value: function (e) {
if (e && e.cmsTrackInfo && e.cmsTrackInfo.trackInfo) {
var t = e.cmsTrackInfo.trackInfo,
n = t.spma,
r = void 0 === n ? k.$spmA : n,
o = t.spmb,
a = t.spmc,
c = t.spmd,
s = t.args,
u = void 0 === s ? {} : s;
c && void 0 !== e._d_index && (c += e._d_index, delete e._d_index), r && o && a && c && (e.spm = "".concat(r, ".").concat(o, ".").concat(a, ".").concat(c), delete e.cmsTrackInfo), e = (0, i.A)((0, i.A)({}, e), u)
}
}
}]))
},
4921: function (e, t) {
var n = function () {
var e = Promise.resolve();
return function (t) {
return e = e.then((function () {
return t()
}))
}
}();
t.A = n
},
5059: function (e, t, n) {
n.d(t, {
vZ: function () {
return v
},
Ay: function () {
return g
},
JV: function () {
return h
},
Bn: function () {
return m
}
});
var r = n(4576),
i = n(2573),
o = n.n(i),
a = n(7852),
c = n(809),
s = n(9476);
var u = {
m: {
prefix: "",
subDomain: "mtop",
mainDomain: "damai.cn"
},
wapa: {
prefix: "",
subDomain: "pre-mtop",
mainDomain: "damai.cn"
},
waptest: {
prefix: "h5api",
subDomain: "waptest",
mainDomain: "taobao.com"
}
};
c.A.mtop.middlewares.push((function (e) {
var t = this,
n = this.options,
r = this.params,
i = !1;
function o(e) {
return "object" === (0, s.A)(e) && (e = JSON.stringify(e)), "string" == typeof e ? e.replace(/(\ud83c[\udf00-\udfff]|\ud83d[\udc00-\ude4f]|\ud83d[\ude80-\udeff])/g, (function (e) {
return i = !0, "\\u" + e.charCodeAt(0).toString(16) + "\\u" + e.charCodeAt(1).toString(16)
})) : e
}
return r.data && (r.data = o(r.data)), t.sendData && (t.sendData = o(t.sendData)), e().then((function () {
var e = n.retJson.ret;
if (e instanceof Array && (e = e.join(",")), i && e.indexOf("FAIL_SYS_ILLEGAL_ACCESS") > -1) return t.__sequence([t.__processToken, t.__processRequestUrl, t.__processUnitPrefix, t.middlewares, t.__processRequest])
}))
}));
var l = "NETWORK_ERROR",
d = "MTOP_GATEWAY_ERROR",
f = "session_invalid";
var p = {
v: "1.0",
dataType: "json",
type: "GET",
SV: "2.0",
ecode: 0,
AntiCreep: !0,
AntiFlood: !0,
data: {
dmChannel: "damai@weixin_weapp"
}
};
function m(e) {
p.data.dmChannel = e
}
function h() {
return p.data.dmChannel
}
function v(e, t) {
var n = e.data;
if (Object.hasOwnProperty.call(n, "result") && (n = n.result), "string" == typeof n) try {
n = n.replace(/\n/g, "").replace(new RegExp("\u2028", "g"), ""), n = JSON.parse(n)
} catch (e) {}
return "string" == typeof n ? Promise.resolve([null, n, e, t]) : n.error ? Promise.resolve([{
type: f,
code: 0,
message: n.err
}, n, e, t]) : Promise.resolve([null, n, e, t])
}
var g = function (e) {
c.A.mtop.config.subDomain = e.env || "m";
var t = u[c.A.mtop.config.subDomain];
return c.A.mtop.config.mainDomain = t.mainDomain, c.A.mtop.config.subDomain = t.subDomain, c.A.mtop.config.prefix = t.prefix, "mtop" === function (e) {
var t = e.url || e.api;
return /^mtop\./.test(t) ? "mtop" : "http"
}(e) ? function (e) {
var t = e.subChannel,
n = (0, a.X$)(!0, {}, p, {
api: e.url,
type: e.method,
headers: e.header,
dataType: e.responseType
}, e);
return t && (delete n.subChannel, n.data.dmChannel = n.data.dmChannel + "#" + t), c.A.mtop.request(n).then((function (e) {
return v(e, n)
}), (function (e) {
return function (e, t) {
var n = e || {},
i = n.ret,
o = void 0 === i ? [] : i,
a = n.data,
c = (o = o.join("")).split("::"),
s = (0, r.A)(c, 2),
u = s[0],
l = s[1],
f = {
type: d,
code: u,
message: l
};
return Promise.resolve([f, a, e, t])
}(e, n)
}))
}(e) : function (e) {
return new Promise((function (t) {
var n = e.originSuccess,
r = e.originFail,
i = (0, a.X$)(!0, {}, e, {
success: function (r) {
n && (0, a.Tn)(n) && n.call(this, r);
var i = r.statusCode,
o = r.data;
(function (e) {
return e >= 200 && e < 300 || 304 == e
})(i) ? t([null, o, o, e]): t([{
type: l,
code: i,
message: "网络异常"
}, o, r, e])
},
fail: function (n) {
r && (0, a.Tn)(r) && r.call(this, n), t([{
type: l,
message: n
}, null, n, e])
}
});
o().request(i)
}))
}(e)
}
},
5602: function (e, t, n) {
n.d(t, {
A: function () {
return v
}
});
var r = n(4107),
i = {
api: "mtop.damai.trade.order.create.h5",
v: "1.0",
data: {},
timeout: 15e3,
method: "POST"
},
o = {
api: "mtop.damai.trade.order.build.h5",
v: "1.0",
data: {},
timeout: 15e3,
method: "POST"
},
a = {
api: "mtop.damai.trade.order.adjust.h5",
v: "1.0",
data: {},
dataType: "json",
method: "post",
type: "post",
ttid: "#t#ip##_h5_2014"
},
c = {
api: "mtop.damai.wireless.order.queryselfmachineaddress",
v: "1.0",
data: {}
},
s = {
api: "mtop.damai.wireless.user.shippingaddress.getuseraddresslist",
v: "1.0",
data: {}
},
u = {
api: "mtop.damai.wireless.user.phone.allowable.query",
v: "1.0",
data: {
scence: "addressConsigneeMobile"
}
},
l = {
api: "mtop.damai.maitix.division.getdisivionchildrenspecial",
v: "1.0",
data: {}
},
d = {
api: "mtop.damai.wireless.user.shippingaddress.modify",
v: "1.0",
data: {}
},
f = {
api: "mtop.damai.wireless.user.shippingaddress.add",
v: "1.0",
data: {}
},
p = n(9887),
m = "20190509-aone2-join-test",
h = "ali.china.damai",
v = {
createOrder: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
t = e.data,
n = e.ext,
o = n || {},
a = o.secretKey,
c = o.secretValue,
s = {
isSec: 1,
AntiCreep: !0,
ttid: "#t#ip##_h5_2014",
tb_eagleeyex_scm_project: e.tag || m
};
return a && (s[a] = c), new p.p((0, r.A)((0, r.A)({}, i), {}, {
data: t,
ext_querys: s,
headers: {
globalCode: h
},
ext_headers: {
globalCode: h
}
})).create()
},
buildOrder: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
t = {
ttid: "#t#ip##_h5_2014"
};
return new p.p((0, r.A)((0, r.A)((0, r.A)({}, o), e), {}, {
ext_querys: t,
headers: {
globalCode: h
},
ext_headers: {
globalCode: h
}
})).create()
},
orderAdjust: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
t = {
ttid: "#t#ip##_h5_2014"
};
return new p.p((0, r.A)((0, r.A)((0, r.A)({}, a), e), {}, {
ext_querys: t,
headers: {
globalCode: h
},
ext_headers: {
globalCode: h
}
})).create()
},
querySelfMachineAddress: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new p.p((0, r.A)((0, r.A)({}, c), e)).create()
},
getAddress: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new p.p((0, r.A)((0, r.A)({}, s), e)).create()
},
fetchPhoneCode: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new p.p((0, r.A)((0, r.A)({}, u), e)).create()
},
fetchDivision: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new p.p((0, r.A)((0, r.A)({}, l), e)).create()
},
fetchAddressUpdate: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new p.p((0, r.A)((0, r.A)({}, d), e)).create()
},
fetchAddressAdd: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new p.p((0, r.A)((0, r.A)({}, f), e)).create()
}
}
},
5723: function (e, t, n) {
n.d(t, {
ce: function () {
return l
}
});
var r = n(469),
i = n(9933),
o = n(3150),
a = n(7129),
c = n.n(a),
s = n(1479),
u = n.n(s);
function l(e) {
var t = e;
try {
if (!t) return;
if (! function (e) {
return "string" == typeof e && e.length > 0 && (e.replace(/<\/?.+?>|\s/g, "").length > 0 || e.includes("img"))
}(t)) return;
return t = function (e) {
return e.replace(/\r?\n+/g, "").replace(/<!--.*?-->/gi, "").replace(/\/\*.*?\*\//gi, "").replace(/[ ]+</gi, "<").replace(/<(script|iframe).*?>.*?<\/\1>|<Switch.*?>/g, "")
}(t = function (e) {
return e.replace(/<\?xml.*\?>\n/, "").replace(/<.*!doctype.*\>\n/, "").replace(/<.*!DOCTYPE.*\>\n/, "")
}(t = function (e) {
var t = e;
t = (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = t.replace(/<!DOCTYPE html>/g, "")).replace(/<\/html>/g, "")).replace(/<svg (.*?)>/g, "")).replace(/<path (.*?)>/g, "")).replace(/<iframe (.*?)>(.*?)<\/iframe>/g, "")).replace(/<video (.*?)>(.*?)<\/video>/g, "")).replace(/ align="(.*?)"/g, "")).replace(/&nbsp;/g, " ")).replace(/<(\d)/g, " < $1")).replace(/(?<!<[^>]*)>(\d)/g, " > $1")).replace(/<p>((<img[^>]+>)+)<\/p>/g, "$1");
var n = "";
return u()(t, {
start: function (e, t) {
if ("img" !== e || 0 !== t.length) {
n += "<".concat(e);
var o, a = (0, r.A)(t);
try {
for (a.s(); !(o = a.n()).done;) {
var c, s = o.value,
u = s.name,
l = s.escaped;
"style" === u && l && (l = null === (c = l.match(/text-align:\s*(left|right|center|justify);?/)) || void 0 === c ? void 0 : c[0]), "img" === e && "src" === u && (l = (0, i.zp)({
url: l,
width: 620,
height: 1e4,
absoluteQuality: 75,
sharpen: 200,
ignorePng: !1
})), "width" !== u && "height" !== u && l && (n += " ".concat(u, '="').concat(l, '"'))
}
} catch (e) {
a.e(e)
} finally {
a.f()
}
n += "img" === e ? " lazy-load=true />" : ">"
}
},
end: function (e) {
n += "</".concat(e, ">")
},
chars: function (e) {
n += e
},
comment: function (e) {
n += "\x3c!--".concat(e, "--\x3e")
}
}), n = (n = (n = (n = n.replace(/ width="(.*?)"/g, "")).replace(/ height="(.*?)"/g, "")).replace(/ damai_height="(.*?)"/g, "")).replace(/ damai_width="(.*?)"/g, "")
}(t))), c().strDiscode(t)
} catch (e) {
(0, o.Ay)("error", "formatRichText error" + e)
}
}
},
5765: function (e, t, n) {
n.d(t, {
g: function () {
return a
}
});
var r = n(9476),
i = n(8572),
o = n(3919).location;
function a(e) {
var t, n = {};
Object.defineProperty(this, "params", {
set: function (e) {
if ("object" === (0, r.A)(e)) {
for (var t in n) delete n[t];
for (var i in e) n[i] = e[i]
}
},
get: function () {
return n
},
enumerable: !0
}), Object.defineProperty(this, "search", {
set: function (e) {
if ("string" == typeof e) {
0 === e.indexOf("?") && (e = e.substr(1));
var t = e.split("&");
for (var r in n) delete n[r];
for (var i = 0; i < t.length; i++) {
var o = t[i].split("=");
if (void 0 !== o[1] && (o[1] = o[1].toString()), o[0]) try {
n[decodeURIComponent(o[0])] = decodeURIComponent(o[1])
} catch (e) {
n[o[0]] = o[1]
}
}
}
},
get: function () {
var e = [];
for (var t in n)
if (void 0 !== n[t])
if ("" !== n[t])
if ((0, i.f)(n[t])) e.push(t + "=" + n[t]);
else try {
e.push(encodeURIComponent(t) + "=" + encodeURIComponent(n[t]))
} catch (r) {
e.push(t + "=" + n[t])
} else try {
e.push(encodeURIComponent(t))
} catch (n) {
e.push(t)
}
return e.length ? "?" + e.join("&") : ""
},
enumerable: !0
}), Object.defineProperty(this, "hash", {
set: function (e) {
"string" == typeof e && (e && e.indexOf("#") < 0 && (e = "#" + e), t = e || "")
},
get: function () {
return t
},
enumerable: !0
}), this.set = function () {
var e, t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "";
if (!(e = (t = t || "").match(new RegExp("^([a-z0-9-]+:)?[/]{2}(?:([^@/:?]+)(?::([^@/:]+))?@)?([^:/?#]+)(?:[:]([0-9]+))?([/][^?#;]*)?(?:[?]([^#]*))?([#][^?]*)?$", "i")))) throw new Error("Wrong uri scheme:" + t);
this.protocol = e[1] || ("object" === (void 0 === o ? "undefined" : (0, r.A)(o)) ? o.protocol : ""), this.username = e[2] || "", this.password = e[3] || "", this.hostname = e[4], this.host = e[4], this.port = e[5] || "", this.pathname = e[6] || "/", this.search = e[7] || "", this.hash = e[8] || "", this.origin = this.protocol + "//" + this.hostname
}, this.toString = function () {
var e = this.protocol + "//";
return this.username && (e += this.username, this.password && (e += ":" + this.password), e += "@"), e += this.host, this.port && "80" !== this.port && (e += ":" + this.port), this.pathname && (e += this.pathname), this.search && (e += this.search), this.hash && (e += this.hash), e
}, e && this.set(e.toString())
}
},
6005: function (e, t, n) {
n.d(t, {
MQ: function () {
return T
},
E0: function () {
return S
}
});
var r = n(9371),
i = n(4107),
o = n(4576),
a = n(644),
c = n.n(a),
s = n(3936),
u = n.n(s),
l = function (e, t) {
var n = {};
return t.forEach((function (t) {
if (Array.isArray(t)) {
var r = (0, o.A)(t, 2),
i = r[0],
a = r[1];
n[i] = c()(e, a)
} else n[t] = c()(e, t)
})), n
},
d = function (e, t, n) {
var o = e || {},
a = o.index,
s = o.displayIndex,
d = t || {},
f = d.forceIndex,
p = void 0 !== f && f,
m = d.trackInfo,
h = void 0 === m ? [] : m,
v = d.logkey,
g = d.spmC,
y = d.data,
A = void 0 === y ? [] : y,
w = d.cssSelectorIndex,
b = d.indexOffset,
_ = void 0 === b ? 0 : b,
S = (null == t ? void 0 : t.spmD) || "",
k = {};
if (w) {
var I = e.closest(w);
a = void 0 === (null == I ? void 0 : I.displayIndex) ? null == I ? void 0 : I.index : null == I ? void 0 : I.displayIndex
} else a = void 0 === s ? a : s;
A.length && (k = l(null == e ? void 0 : e.dataPack, A));
var x = {};
if (h.length) {
var C = (null == e ? void 0 : e.data) || {},
T = c()(C, h, {}),
E = c()(T, "trackInfo.args", {});
u()(T, "trackInfo.args", (0, i.A)((0, i.A)({}, E), k)), x = T, S = c()(C, h.concat(["trackInfo", "spmd"]), "")
} else x = {
trackInfo: (0, r.A)((0, r.A)((0, r.A)((0, r.A)({}, "clk" === n ? "clickEventName" : "exposeEventName", v), "spmc", g), "spmd", S), "args", k)
};
var O = {
index: a + _,
_d_index: a + _
};
return {
trackData: x,
extraData: p || S.endsWith("_") ? O : null
}
},
f = function (e, t, n) {
var r = (e || {}).path,
i = void 0 === r ? [] : r,
o = t || {},
a = o.exp,
c = void 0 === a ? [] : a,
s = o.clk,
u = "exp" === n ? c : void 0 === s ? [] : s,
l = i[i.length - 1];
return {
current: e.parentNode.children[l],
staticConfig: u.find((function (e) {
var t = e.cssSelector.split(" "),
n = t[t.length - 1];
return l.includes(n)
}))
}
},
p = n(4752),
m = n(2645),
h = n.n(m),
v = n(7545),
g = n(29),
y = (0, n(5517).A)((function e() {
(0, g.A)(this, e), (0, r.A)(this, "items", void 0), this.items = []
}), [{
key: "enqueue",
value: function (e) {
this.items.push(e)
}
}, {
key: "dequeue",
value: function () {
return this.isEmpty() ? null : this.items.shift()
}
}, {
key: "isExist",
value: function (e) {
return !this.isEmpty() && this.items.some((function (t) {
return (null == t ? void 0 : t.cssSelector) === e
}))
}
}, {
key: "isEmpty",
value: function () {
return 0 === this.items.length
}
}, {
key: "allItems",
value: function () {
return this.items
}
}, {
key: "clear",
value: function () {
this.items = []
}
}]),
A = n(6136),
w = new v.No,
b = new y,
_ = h()((function () {
if (!b.isEmpty()) {
var e = w,
t = b.allItems();
b.clear(), t.forEach((function (t) {
var n = t.cssSelector,
r = t.staticConfig,
i = (0, A.vP)(t.cssSelector, A.Ik.DynamicDivTree);
e.registerObserve({
selector: n,
autoExp: !1,
useDom: !1
}, (function (e) {
! function (e, t, n) {
var r = t[e.index],
i = d(r, n, "exp"),
o = i.trackData,
a = i.extraData;
(0, p.Th)(o, a)
}(e, i, r)
}))
}))
}
}), 200),
S = function (e, t) {
var n = f(e, t, "exp").staticConfig;
if (n) {
var r = n.cssSelector;
b.isExist(r) || b.enqueue({
cssSelector: r,
node: e,
staticConfig: n
}), _()
}
},
k = n(7468),
I = n.n(k),
x = new y,
C = h()((function (e) {
var t = x.dequeue();
x.clear();
var n = f(t, e, "clk").staticConfig;
if (n) {
var r = n.cssSelector,
i = void 0 === r ? "" : r,
o = (0, A.vP)(i, A.Ik.DynamicDivTree),
a = o.findIndex((function (e) {
return (null == e ? void 0 : e.path) && (null == t ? void 0 : t.path) && I()(e.path, t.path)
})),
c = null == o ? void 0 : o[a],
s = d(c, n, "clk"),
u = s.trackData,
l = s.extraData;
(0, p.kU)(u, l)
}
}), 0),
T = function (e, t, n) {
x.enqueue(t), C(n)
}
},
6432: function (e, t, n) {
n.d(t, {
Jt: function () {
return a
},
hZ: function () {
return o
}
});
var r = n(1395),
i = {
launchQuery: {},
currentEnv: "m",
locationErr: {},
showAddToMine: !1,
longitude: 0,
platformValue: 42,
menubarHeight: 0,
statusBarHeight: 0,
safeAreaInsetBottom: 0,
scene: 1001,
locationCitySite: void 0,
preLocationCitySite: void 0,
preSelectedCitySite: void 0,
preUserLocation: void 0,
userSelectedCitySite: void 0,
userLocation: void 0,
isFirstStart: !1,
isFromWXShareScene: !1,
options: {},
cdnGlobalConfig: {},
currentUrl: "",
envVersion: __wxConfig && __wxConfig.envVersion,
decode: r.decode,
encode: r.encode
};
function o(e, t) {
i[e] = t
}
function a(e) {
return i[e]
}
},
6516: function (e, t, n) {
var r = n(29),
i = n(5517),
o = n(4017),
a = (0, i.A)((function e() {
(0, r.A)(this, e)
}), [{
key: "show",
value: function (e) {
o.A.showToast({
title: e,
icon: "none",
mask: !1
})
}
}]);
t.A = new a
},
6981: function (e, t, n) {
n.d(t, {
rI: function () {
return c
},
X1: function () {
return a
}
});
var r = n(469),
i = n(6070),
o = "fs--tag",
a = function () {
return (0, i.jsx)("div", {
className: "".concat(o),
style: {
display: "none"
}
})
},
c = function (e, t) {
var n = t || {},
i = n.scrollViewX,
a = void 0 === i ? [] : i,
c = n.scrollIntoView,
s = void 0 === c ? {} : c,
u = n.popup,
l = void 0 === u ? [] : u,
d = n.fs_tag,
f = n.firstImageToBackground,
p = void 0 === f ? [] : f,
m = !1,
h = function (e, t) {
var n, i = t,
a = (0, r.A)(e);
try {
for (a.s(); !(n = a.n()).done;) {
var c = n.value,
s = e.findIndex((function (e) {
return ((null == e ? void 0 : e.cl) || "").includes(null != d ? d : o)
}));
if (s > -1) {
var u = e.slice(0, s);
i.cn = u;
break
}
h((null == c ? void 0 : c.cn) || [], c || {})
}
} catch (e) {
a.e(e)
} finally {
a.f()
}
};
h(e, {});
var v = function (e) {
var t, n = (0, r.A)(e);
try {
var i = function () {
var n, r, i, o, c, u = t.value || {},
d = e.findIndex((function (e) {
return l.some((function (t) {
var n;
return null == e || null === (n = e.cl) || void 0 === n ? void 0 : n.includes(t)
}))
}));
if (d > -1 && e.splice(d, 1), null != u && null !== (n = u.cl) && void 0 !== n && null !== (n = n.split(" ")) && void 0 !== n && null !== (r = n.some) && void 0 !== r && r.call(n, (function (e) {
return null == a ? void 0 : a.includes(e)
}))) {
for (var f in u)
if (u.hasOwnProperty(f)) {
var p = u[f];
"[object Boolean]" === Object.prototype.toString.call(p) && (u[f] = !1)
} return 1
}
if (null != u && null !== (i = u.cl) && void 0 !== i && null !== (i = i.split(" ")) && void 0 !== i && null !== (o = i.some) && void 0 !== o && o.call(i, (function (e) {
var t;
return !(null === (t = Object.keys(s)) || void 0 === t || !t.includes(e) || (c = Object.keys(s).find((function (t) {
return t === e
})), 0))
}))) {
for (var m in u)
if (u.hasOwnProperty(m)) {
var h = u[m];
"[object String]" === Object.prototype.toString.call(h) && h.includes(s[c]) && (u[m] = "")
}
} else v((null == u ? void 0 : u.cn) || [])
};
for (n.s(); !(t = n.n()).done && !i(););
} catch (e) {
n.e(e)
} finally {
n.f()
}
};
v(e);
var g = function (e) {
p.forEach((function (t) {
var n = t || {},
i = n.containerClassName,
o = n.imageInfo;
if (i && o) {
var a, c = (0, r.A)(e);
try {
for (c.s(); !(a = c.n()).done;) {
var s = a.value || {},
u = e.find((function (e) {
var t;
return null == e || null === (t = e.cl) || void 0 === t ? void 0 : t.includes(i)
}));
u ? m || y(null == u ? void 0 : u.cn, o) : g((null == s ? void 0 : s.cn) || [])
}
} catch (e) {
c.e(e)
} finally {
c.f()
}
}
}))
},
y = function () {
for (var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = 0; n < e.length; n++) {
var r, i = (null == e ? void 0 : e[n]) || {};
if (null != i && null !== (r = i.cl) && void 0 !== r && r.includes("h5-img")) {
var o, a = null != i && null !== (o = i.st) && void 0 !== o && o.includes("height") ? null == i ? void 0 : i.st : "height: ".concat(null == t ? void 0 : t.height, "px;"),
c = {
nn: "7",
sid: null == i ? void 0 : i.sid,
cn: [],
cl: "h5-div tph",
st: "width: ".concat(null == t ? void 0 : t.width, "px; ").concat(a, " background-image: url(").concat(null == i ? void 0 : i.p3, "); background-repeat: no-repeat; background-size: 100% 100%; margin: 0 -24rpx;")
};
e.splice(n, 1, c), m = !0;
break
}
y(null == i ? void 0 : i.cn, t)
}
};
return g(e), e
}
},
7129: function (e) {
e.exports = {
strDiscode: function (e) {
return e = function (e) {
return e = (e = (e = e.replace(/\r\n/g, "")).replace(/\n/g, "")).replace(/code/g, "wxxxcode-style")
}(e = function (e) {
return e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = e.replace(/&OElig;/g, "Œ")).replace(/&oelig;/g, "œ")).replace(/&Scaron;/g, "Š")).replace(/&scaron;/g, "š")).replace(/&Yuml;/g, "Ÿ")).replace(/&fnof;/g, "ƒ")).replace(/&circ;/g, "ˆ")).replace(/&tilde;/g, "˜")).replace(/&ensp;/g, "")).replace(/&emsp;/g, "")).replace(/&thinsp;/g, "")).replace(/&zwnj;/g, "")).replace(/&zwj;/g, "")).replace(/&lrm;/g, "")).replace(/&rlm;/g, "")).replace(/&ndash;/g, "")).replace(/&mdash;/g, "—")).replace(/&lsquo;/g, "")).replace(/&rsquo;/g, "")).replace(/&sbquo;/g, "")).replace(/&ldquo;/g, "“")).replace(/&rdquo;/g, "”")).replace(/&bdquo;/g, "„")).replace(/&dagger;/g, "†")).replace(/&Dagger;/g, "‡")).replace(/&bull;/g, "•")).replace(/&hellip;/g, "…")).replace(/&permil;/g, "‰")).replace(/&prime;/g, "")).replace(/&Prime;/g, "″")).replace(/&lsaquo;/g, "")).replace(/&rsaquo;/g, "")).replace(/&oline;/g, "‾")).replace(/&euro;/g, "€")).replace(/&trade;/g, "™")).replace(/&larr;/g, "←")).replace(/&uarr;/g, "↑")).replace(/&rarr;/g, "→")).replace(/&darr;/g, "↓")).replace(/&harr;/g, "↔")).replace(/&crarr;/g, "↵")).replace(/&lceil;/g, "⌈")).replace(/&rceil;/g, "⌉")).replace(/&lfloor;/g, "⌊")).replace(/&rfloor;/g, "⌋")).replace(/&loz;/g, "◊")).replace(/&spades;/g, "♠")).replace(/&clubs;/g, "♣")).replace(/&hearts;/g, "♥")).replace(/&diams;/g, "♦")).replace(/&#39;/g, "'")
}(e = function (e) {
return e = (e = (e = (e = (e = (e = e.replace(/&nbsp;/g, " ")).replace(/&quot;/g, "'")).replace(/&amp;/g, "&")).replace(/&lt;/g, "<")).replace(/&gt;/g, ">")).replace(/&#8226;/g, "•")
}(e = function (e) {
return e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = e.replace(/&Alpha;/g, "Α")).replace(/&Beta;/g, "Β")).replace(/&Gamma;/g, "Γ")).replace(/&Delta;/g, "Δ")).replace(/&Epsilon;/g, "Ε")).replace(/&Zeta;/g, "Ζ")).replace(/&Eta;/g, "Η")).replace(/&Theta;/g, "Θ")).replace(/&Iota;/g, "Ι")).replace(/&Kappa;/g, "Κ")).replace(/&Lambda;/g, "Λ")).replace(/&Mu;/g, "Μ")).replace(/&Nu;/g, "Ν")).replace(/&Xi;/g, "Ν")).replace(/&Omicron;/g, "Ο")).replace(/&Pi;/g, "Π")).replace(/&Rho;/g, "Ρ")).replace(/&Sigma;/g, "Σ")).replace(/&Tau;/g, "Τ")).replace(/&Upsilon;/g, "Υ")).replace(/&Phi;/g, "Φ")).replace(/&Chi;/g, "Χ")).replace(/&Psi;/g, "Ψ")).replace(/&Omega;/g, "Ω")).replace(/&alpha;/g, "α")).replace(/&beta;/g, "β")).replace(/&gamma;/g, "γ")).replace(/&delta;/g, "δ")).replace(/&epsilon;/g, "ε")).replace(/&zeta;/g, "ζ")).replace(/&eta;/g, "η")).replace(/&theta;/g, "θ")).replace(/&iota;/g, "ι")).replace(/&kappa;/g, "κ")).replace(/&lambda;/g, "λ")).replace(/&mu;/g, "μ")).replace(/&nu;/g, "ν")).replace(/&xi;/g, "ξ")).replace(/&omicron;/g, "ο")).replace(/&pi;/g, "π")).replace(/&rho;/g, "ρ")).replace(/&sigmaf;/g, "ς")).replace(/&sigma;/g, "σ")).replace(/&tau;/g, "τ")).replace(/&upsilon;/g, "υ")).replace(/&phi;/g, "φ")).replace(/&chi;/g, "χ")).replace(/&psi;/g, "ψ")).replace(/&omega;/g, "ω")).replace(/&thetasym;/g, "ϑ")).replace(/&upsih;/g, "ϒ")).replace(/&piv;/g, "ϖ")).replace(/&middot;/g, "·")
}(e = function (e) {
return e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = e.replace(/&forall;/g, "∀")).replace(/&part;/g, "∂")).replace(/&exists;/g, "∃")).replace(/&empty;/g, "∅")).replace(/&nabla;/g, "∇")).replace(/&isin;/g, "∈")).replace(/&notin;/g, "∉")).replace(/&ni;/g, "∋")).replace(/&prod;/g, "∏")).replace(/&sum;/g, "∑")).replace(/&minus;/g, "")).replace(/&lowast;/g, "")).replace(/&radic;/g, "√")).replace(/&prop;/g, "∝")).replace(/&infin;/g, "∞")).replace(/&ang;/g, "∠")).replace(/&and;/g, "∧")).replace(/&or;/g, "")).replace(/&cap;/g, "∩")).replace(/&cap;/g, "")).replace(/&int;/g, "∫")).replace(/&there4;/g, "∴")).replace(/&sim;/g, "")).replace(/&cong;/g, "≅")).replace(/&asymp;/g, "≈")).replace(/&ne;/g, "≠")).replace(/&le;/g, "≤")).replace(/&ge;/g, "≥")).replace(/&sub;/g, "⊂")).replace(/&sup;/g, "⊃")).replace(/&sup1;/g, "¹")).replace(/&sup2;/g, "²")).replace(/&sup3;/g, "³")).replace(/&nsub;/g, "⊄")).replace(/&sube;/g, "⊆")).replace(/&supe;/g, "⊇")).replace(/&oplus;/g, "⊕")).replace(/&otimes;/g, "⊗")).replace(/&perp;/g, "⊥")).replace(/&sdot;/g, "⋅")
}(e)))))
},
urlToHttpUrl: function (e, t) {
return new RegExp("^//").test(e) && (e = t + ":" + e), e
}
}
},
7389: function (e, t, n) {
n.d(t, {
G: function () {
return a
},
bo: function () {
return s
},
n5: function () {
return c
}
});
var r, i, o = n(4043),
a = (null === (r = o.A.default_sqm) || void 0 === r || r.DSL, null === (i = o.A.default_sqm) || void 0 === i ? void 0 : i.h5),
c = {
locationFail: "定位失败,点击刷新",
locationNoData: "当前地址不在淘票票支持范围内",
error: "小二很忙,系统很累,稍后再试吧",
noShows: "没有更多演出了 (^3^)-☆",
currentCityNoShows: "当前城市没有更多演出,看看附近城市吧 (^3^)-☆"
},
s = {
cityChange: "cityChange",
login: 6001,
mtop: 6002,
city: 6003,
emptyData: 6004,
searchEmpty: 6006,
filterEmpty: 6007,
refresh: 6005,
emptySchedule: 25009,
FLOW_CONTROL: "FLOW_CONTROL",
CDN_ERROR: "CDN_ERROR"
}
},
7422: function (e, t, n) {
n.d(t, {
A: function () {
return V
}
});
var r = n(5652),
i = n(2555),
o = n(4107),
a = n(29),
c = n(5517),
s = n(4017),
u = n(3451),
l = n(6703),
d = n(1925),
f = n(2267),
p = function (e) {
function t() {
var e;
return (0, a.A)(this, t), (e = (0, l.A)(this, t)).init(), e
}
return (0, d.A)(t, e), (0, c.A)(t, [{
key: "init",
value: function () {
var e = this;
s.A.getNetworkType({
success: function (t) {
e.networkType = t.networkType
}
}), s.A.onNetworkStatusChange((function (t) {
e.networkType = t.networkType
}))
}
}, {
key: "intercept",
value: function () {
var e = (0, i.A)((0, r.A)().m((function e(t) {
var n, i;
return (0, r.A)().w((function (e) {
for (;;) switch (e.n) {
case 0:
return n = t.options, (i = t.tracker).appId && (n._p_maid = i.appId), i.appName && (n.app = i.appName), i.appVersion && (n.app_v = i.appVersion), i.miniApp && (n.miniapp = i.miniApp), n.cache = (new Date).getTime(), e.n = 1, this.addDeviceInfo(n);
case 1:
return e.a(2)
}
}), e, this)
})));
return function (t) {
return e.apply(this, arguments)
}
}()
}, {
key: "addDeviceInfo",
value: function () {
var e = (0, i.A)((0, r.A)().m((function e(t) {
var n;
return (0, r.A)().w((function (e) {
for (;;) switch (e.n) {
case 0:
this.systemInfo || (this.systemInfo = this.getSystemInfo()), this.networkType && (t.network = this.networkType), this.systemInfo && (t.device = "".concat(this.systemInfo.brand, " ").concat(this.systemInfo.model), t.host_app_version = this.systemInfo.version, n = "unknown", f.A.isAndroid ? n = "andr" : f.A.isIos && (n = "ios"), t._p_os = n, t._p_pf = this.getPF(), t.system = this.systemInfo.system, t.sdk_version = this.systemInfo.SDKVersion);
case 1:
return e.a(2)
}
}), e, this)
})));
return function (t) {
return e.apply(this, arguments)
}
}()
}, {
key: "getPF",
value: function () {
if (this._pf) return this._pf;
var e = "unknown";
return f.A.isWX ? e = "wx" : f.A.isDOUY ? e = "douyin" : f.A.isTT ? e = "tt" : f.A.isSWAN ? e = "bd" : f.A.isMY && (e = "my"), this._pf = e, e
}
}, {
key: "getSystemInfo",
value: function () {
return s.A.getSystemInfoSync()
}
}])
}(u.c),
m = n(469),
h = ["logtype", "title", "aplus", "cfgver", "pc_i", "pu_i", "_p_url", "_p_ref", "spm-cnt", "spm-url", "_p_os", "_p_pf", "_p_maid", "cache"];
var v = n(4576),
g = n(2573),
y = n.n(g),
A = n(3816),
w = "a2obt",
b = "".concat(w, ".wechat.webview.default"),
_ = "".concat(w, ".wechat.home.0"),
S = "wx938b41d0d7e8def0",
k = {
currentEnv: "m",
locationErr: {},
showAddToMine: !1,
longitude: 0,
platformValue: 42,
menubarHeight: 0,
statusBarHeight: 0,
scene: 1001,
locationCitySite: void 0,
preLocationCitySite: void 0,
preSelectedCitySite: void 0,
preUserLocation: void 0,
userSelectedCitySite: void 0,
userLocation: void 0,
isFirstStart: !1,
options: {}
};
function I(e) {
return k[e]
}
var x = function (e) {
var t = e || I("query") || {},
n = t.pid,
r = t.relationId;
return n ? n + (r ? "--".concat(r) : "") : ""
},
C = function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : b,
t = (I("query") || {}).sqm || e,
n = x("");
if (!n) return t;
var r = t.split(".");
return r[4] = [n], r.join(".")
},
T = function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return e.sqm = C(_), Promise.resolve(e)
},
E = function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new Promise((function (t) {
y().getSystemInfo({
success: function (n) {
try {
e.app_version = "2025.1204.143223", e.platformVersionCode = n.version, e.brand = n.brand, e.device_model = n.model, e.os = n.platform, e.os_version = n.system, e.platform = I("platformValue"), e._p_maid = S, e.app = "damai", e.scene_id = I("scene"), e.miniapp = "weixin", e.pc_i = A.A.getUtdid(), e.pu_i = A.A.getUserId(), e.havana_id = A.A.getHavanaId()
} catch (e) {}
t(e)
},
fail: function () {
t({})
}
})
}))
},
O = function (e) {
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++) n[r - 1] = arguments[r];
return new Promise((function (t, r) {
e.apply(void 0, n).then(t).catch(r)
}))
},
P = function (e, t) {
return new Promise((function (n, r) {
y().getStorage({
key: e,
success: function (i) {
null !== i.data ? n(i.data) : t().then((function (t) {
y().setStorage({
key: e,
data: t
}), n(t)
})).catch(r)
},
fail: function () {
t().then((function (t) {
y().setStorage({
key: e,
data: t
}), n(t)
})).catch(r)
}
})
}))
},
N = function (e, t) {
return e = Math.ceil(e), t = Math.floor(t), Math.floor(Math.random() * (t - e)) + e
},
L = function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
t = (new Date).getTime().toString();
return Promise.all([O(P, "KEY_PC_I", (function () {
return Promise.resolve("".concat((new Date).getTime()).concat(N(1, 999999)))
})), O(P, "KEY_PS_I", (function () {
return Promise.resolve("".concat(t.substr(t.length / 2)).concat(N(1024, 102400)))
}))]).then((function (t) {
var n = (0, v.A)(t, 2),
r = (n[0], n[1]);
return e.ps_i = r, Promise.resolve((0, o.A)({}, e))
}))
},
U = function (e) {
var t = [];
return Object.keys(e).forEach((function (n) {
var r = function (e) {
e = String(e);
return -1 === e.search(/[;,/?:@&=+$]/i) && e.search(/%[a-f0-9]{2}/i) >= 0
}(e[n]) ? e[n] : encodeURIComponent(e[n]);
t.push("".concat(n, "=").concat(r))
})), t.join("&")
};
var D = function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
t = (I("query") || {}).spm || "";
return e["spm-pre"] = t, Promise.resolve(e)
},
R = function () {
return Promise.all([L(), E(), T(), D()]).then((function (e) {
var t = (0, v.A)(e, 4),
n = t[0],
r = t[1],
i = t[2],
a = t[3];
return Promise.resolve((0, o.A)((0, o.A)((0, o.A)((0, o.A)({}, n), r), i), a))
}))
},
j = {
logtype: "1",
cfgver: "vx.1.0",
aplus: ""
},
M = {
logtype: "2",
cfgver: "vx.1.0",
aplus: ""
},
B = "Type-PV",
q = "Type-Click",
V = new((0, c.A)((function e() {
(0, a.A)(this, e), this.TYPE_PV = B, this.TYPE_Click = q, this.interceptors = [], this.interceptors.push(new p)
}), [{
key: "setConfigs",
value: function (e) {
this.pvUrl = e.pvUrl, this.clickUrl = e.clickUrl, this.appId = e.appId, this.appName = e.appName, this.appVersion = e.appVersion, this.miniApp = e.miniApp, this.spmA = e.spmA
}
}, {
key: "addInterceptor",
value: function (e) {
e instanceof u.c && this.interceptors.push(e)
}
}, {
key: "spmParse",
value: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "",
t = arguments.length > 1 ? arguments[1] : void 0,
n = e.split(".");
n && n[0] && n[1] && (n = "".concat(n[0], ".").concat(n[1], ".0.0"));
var r = (0, o.A)((0, o.A)({
spm: e,
"spm-cnt": n || ""
}, M), t);
return r
}
}, {
key: "sendClickEvent",
value: function () {
var e = (0, i.A)((0, r.A)().m((function e(t, n) {
var i;
return (0, r.A)().w((function (e) {
for (;;) switch (e.n) {
case 0:
return i = this.spmParse(t, n), e.n = 1, this._intercept(q, i);
case 1:
this._commit(this.clickUrl, i);
case 2:
return e.a(2)
}
}), e, this)
})));
return function (t, n) {
return e.apply(this, arguments)
}
}()
}, {
key: "sendGoldLog",
value: function () {
var e = (0, i.A)((0, r.A)().m((function e(t, n, i) {
var a, c, s, u, l, d, f, p, m, h, v, y;
return (0, r.A)().w((function (e) {
for (;;) switch (e.n) {
case 0:
return a = i.spmB, c = i.spmC, s = i.spmD, (u = a) || (d = (0, g.getCurrentPages)(), f = null == d ? void 0 : d[d.length - 1], u = (null == f || null === (l = f.config) || void 0 === l ? void 0 : l.spmB) || "unknow"), p = "".concat(this.spmA, ".").concat(u, ".").concat(c || 0, ".").concat(s || 0), m = "".concat(this.spmA, ".").concat(u, ".0.0"), e.n = 1, R();
case 1:
h = e.v, v = this.spmParseNew(t, (0, o.A)((0, o.A)({
spmad: p,
"spm-cnt": m
}, i), h)), y = "https://wgo.mmstat.com/vx" + n, this._commit(y, v);
case 2:
return e.a(2)
}
}), e, this)
})));
return function (t, n, r) {
return e.apply(this, arguments)
}
}()
}, {
key: "spmParseNew",
value: function (e, t) {
return (0, o.A)((0, o.A)({
gmkey: e,
pu_i: A.A.getUserId(),
pc_i: A.A.getUtdid()
}, M), {}, {
gokey: U((0, o.A)((0, o.A)({}, t), {}, {
_g_encode: "utf-8"
}))
})
}
}, {
key: "sendOtherEvent",
value: function () {
var e = (0, i.A)((0, r.A)().m((function e(t, n) {
var i, o, a, c;
return (0, r.A)().w((function (e) {
for (;;) switch (e.n) {
case 0:
return i = n.spmB, o = "".concat(this.spmA, ".").concat(i, ".0.0"), a = this.spmParse(o, n), e.n = 1, this._intercept(q, a);
case 1:
c = "https://wgo.mmstat.com/vx" + t, this._commit(c, a);
case 2:
return e.a(2)
}
}), e, this)
})));
return function (t, n) {
return e.apply(this, arguments)
}
}()
}, {
key: "sendPageEvent",
value: function () {
var e = (0, i.A)((0, r.A)().m((function e(t) {
var n, i, a, c, s, u = arguments;
return (0, r.A)().w((function (e) {
for (;;) switch (e.n) {
case 0:
return n = u.length > 1 && void 0 !== u[1] ? u[1] : "", i = u.length > 2 && void 0 !== u[2] ? u[2] : {}, a = u.length > 3 && void 0 !== u[3] ? u[3] : {}, (c = {}).title = n, c["spm-cnt"] = t, i && (c["spm-url"] = i.spm, c.utm = i.utm, c.page_params = JSON.stringify(i)), s = (0, o.A)((0, o.A)((0, o.A)({}, j), c), a), e.n = 1, this._intercept(B, s);
case 1:
(0, o.A)({}, s), a.useTaroSendPv || this._commit(this.pvUrl, s);
case 2:
return e.a(2)
}
}), e, this)
})));
return function (t) {
return e.apply(this, arguments)
}
}()
}, {
key: "_intercept",
value: function () {
var e = (0, i.A)((0, r.A)().m((function e(t, n) {
var i, o, a, c;
return (0, r.A)().w((function (e) {
for (;;) switch (e.n) {
case 0:
i = {
type: t,
options: n,
tracker: this
}, o = this.interceptors.length, a = o - 1;
case 1:
if (!(a >= 0)) {
e.n = 3;
break
}
if (!((c = this.interceptors[a]) instanceof u.c)) {
e.n = 2;
break
}
return e.n = 2, c.intercept(i);
case 2:
a--, e.n = 1;
break;
case 3:
return e.a(2)
}
}), e, this)
})));
return function (t, n) {
return e.apply(this, arguments)
}
}()
}, {
key: "_commit",
value: function (e, t) {
var n = function (e, t) {
var n, r = [],
i = (0, m.A)(h);
try {
for (i.s(); !(n = i.n()).done;) {
var o = n.value,
a = t[o];
"aplus" === o ? r.push(o) : a && r.push("".concat(o, "=").concat(encodeURIComponent(a))), delete t[o]
}
} catch (e) {
i.e(e)
} finally {
i.f()
}
for (var c in t) {
var s = t[c];
s && r.push("".concat(c, "=").concat(encodeURIComponent(s))), delete t[c]
}
return e + "?" + r.join("&")
}(e, t);
s.A.request({
url: n
})
}
}]))
},
7545: function (e, t, n) {
n.d(t, {
No: function () {
return v
},
Or: function () {
return b
}
});
var r = n(2573),
i = n.n(r),
o = n(6432),
a = n(4107),
c = n(29),
s = n(5517),
u = n(9371),
l = n(644),
d = n.n(l),
f = n(4752),
p = (0, s.A)((function e() {
(0, c.A)(this, e), (0, u.A)(this, "current", "notExp")
}), [{
key: "beforeExp",
value: function () {
this.current = "notExp"
}
}, {
key: "onExp",
value: function (e) {
e.intersectionRatio > 0 && "notExp" === this.current && (this.current = "shouldExp")
}
}, {
key: "afterExp",
value: function () {
this.current = "hadExp"
}
}]),
m = n(3919).document,
h = Symbol.for("ELEMENT_INDEX"),
v = (0, s.A)((function e() {
(0, c.A)(this, e), (0, u.A)(this, "expCache", {}), (0, u.A)(this, "observer", null), this.expCache = {}, this.observer = null
}), [{
key: "initExpCache",
value: function (e) {
return this.expCache[e] || (this.expCache[e] = []), this.expCache
}
}, {
key: "createObserverArea",
value: function () {
var e = function () {
var e = (0, o.Jt)("currentInstance");
if (e) return e;
var t = i().getCurrentInstance();
return (0, o.hZ)("currentInstance", t), t
}().page;
return i().createIntersectionObserver(e, {
observeAll: !0,
thresholds: [.2]
})
}
}, {
key: "registerObserve",
value: function (e, t) {
var n = this,
o = e || {},
c = o.selector,
s = o.index,
u = o.useDom,
l = void 0 !== u && u,
d = o.autoExp,
f = void 0 === d || d,
h = o.indexOffset,
v = void 0 === h ? 0 : h;
if (c) {
var g;
i().createSelectorQuery().selectAll(c).boundingClientRect().exec((function (e) {
g = null == e ? void 0 : e[0]
}));
var y = new p,
A = this.initExpCache(c);
this.observer = this.createObserverArea(), this.observer.relativeToViewport().observe(c, (function (i) {
A[c].includes(i.id) || (A[c].push(i.id), (0, r.nextTick)((function () {
y.beforeExp();
var r = g ? g.findIndex((function (e) {
return e.id === i.id
})) : 0,
o = void 0 !== s ? s : r;
if (y.onExp(i), "shouldExp" === y.current) {
var c = {};
if (l && null != i && i.id) {
var u = m.getElementById(i.id);
c = (null == u ? void 0 : u.dataset) || {}
}
f ? n.expose((0, a.A)({
elements: g,
domIndex: o
}, e)) : null == t || t((0, a.A)((0, a.A)({}, e), {}, {
index: o + v,
dataset: c,
observeRes: i
})), y.afterExp()
}
})))
}))
}
}
}, {
key: "expose",
value: function (e) {
var t = e.elements,
n = e.domIndex,
r = e.trackInfo,
i = e.dataSource,
o = e.indexOffset,
a = void 0 === o ? 0 : o,
c = r.map((function (e) {
return e === h ? n : e
})),
s = d()(i, c, {}),
u = n + a;
(0, f.Th)(s, t.length > 1 ? {
index: u,
_d_index: u
} : null)
}
}, {
key: "destroyObserver",
value: function () {
var e;
null === (e = this.observer) || void 0 === e || e.disconnect(), this.observer = null
}
}]),
g = n(8460),
y = n(5882),
A = n(758),
w = ["dependencies", "end"],
b = function (e, t) {
var n = e.dependencies,
r = e.end,
o = (0, y.A)(e, w),
a = Array.isArray(n) ? n : [],
c = (0, A.useRef)(new v);
(0, A.useEffect)((function () {
if (!r) return i().nextTick((function () {
c.current.registerObserve(o, t)
})),
function () {
c.current.destroyObserver()
}
}), [].concat((0, g.A)(a), [r]))
}
},
7805: function (e, t, n) {
n.d(t, {
c: function () {
return r
}
});
var r = "a2obt"
},
7852: function (e, t, n) {
n.d(t, {
DA: function () {
return p
},
DC: function () {
return b
},
Dh: function () {
return w
},
Di: function () {
return s.Di
},
E9: function () {
return s.E9
},
KM: function () {
return s.KM
},
LI: function () {
return f
},
PP: function () {
return A
},
Qd: function () {
return d
},
Tn: function () {
return l
},
X$: function () {
return _
},
Yq: function () {
return v
},
e4: function () {
return g
},
iL: function () {
return u
}
});
var r = n(9476),
i = n(2573),
o = n.n(i),
a = n(6664),
c = n(2267),
s = n(898),
u = new a.s,
l = function (e) {
return "function" == typeof e
},
d = function (e) {
if ("object" !== function (e) {
var t = (0, r.A)(e);
return "object" === t ? null === e ? "null" : Object.prototype.toString.call(e).slice(8, -1).toLowerCase() : t
}(e)) return !1;
var t = Object.prototype.hasOwnProperty;
return !(e.constructor && !t.call(e, "constructor") && !t.call(e.constructor.prototype || {}, "isPrototypeOf"))
},
f = function () {
var e = o().getWindowInfo().statusBarHeight,
t = void 0 === e ? 0 : e,
n = o().getMenuButtonBoundingClientRect(),
r = n.top - t;
return {
statusBarHeight: t,
menuBarHeight: n.height + 2 * r
}
},
p = function () {
var e = o().getWindowInfo(),
t = e.safeArea,
n = e.screenHeight,
r = void 0 === n ? 0 : n,
i = c.A.isAndroid ? 0 : r - ((null == t ? void 0 : t.bottom) || 0);
return {
"--safe-area-inset-bottom": "".concat(i, "px")
}
};
var m = function (e) {
return function (t) {
return {}.toString.call(t) === "[object " + e + "]"
}
}("Date");
function h(e) {
var t, n, r = e;
return m(r) ? t = r.getTime() : Number.isNaN(r) ? t = (r || "").replace(/-/g, "/") : (r += "", (n = (+new Date + "").length - r.length) && (r += new Array(n).fill(0).join("")), t = +r),
function (e) {
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 8,
n = 60 * e.getTimezoneOffset() * 1e3,
r = +e + n;
return new Date(r + 60 * t * 60 * 1e3)
}(new Date(t))
}
var v = function (e, t) {
var n = "",
r = h(e),
i = r.getFullYear();
if (!i) return n;
var o = r.getMonth() + 1;
o >= 10 || (o = "0" + o);
var a = r.getDate();
a >= 10 || (a = "0" + a);
var c = r.getHours();
c >= 10 || (c = "0" + c);
var s = r.getMinutes();
s >= 10 || (s = "0" + s);
var u = r.getSeconds();
switch (u >= 10 || (u = "0" + u), t) {
case "M月D日":
n = "".concat(o, "月").concat(a, "日");
break;
case "MM-DD HH:mm":
n = "".concat(o, "-").concat(a, " ").concat(c, ":").concat(s);
break;
case "M月D日 HH:mm":
n = "".concat(o, "月").concat(a, "日 ").concat(c, ":").concat(s);
break;
case "YYYY-MM-DD HH:mm":
n = "".concat(i, "-").concat(o, "-").concat(a, " ").concat(c, ":").concat(s);
break;
case "YYYY-MM-DD":
n = "".concat(i, "-").concat(o, "-").concat(a);
break;
case "YYYY.MM.DD":
n = "".concat(i, ".").concat(o, ".").concat(a);
break;
case "MM-DD":
n = "".concat(o, "-").concat(a);
break;
case "HH:mm":
n = "".concat(c, ":").concat(s);
break;
case "ddd":
n = "周" + ["日", "一", "二", "三", "四", "五", "六"][r.getDay()];
break;
default:
n = "".concat(i, "-").concat(o, "-").concat(a, " ").concat(c, ":").concat(s, ":").concat(u)
}
return n
};
function g(e) {
var t = o().getWindowInfo().windowWidth / 750 * Number(e);
return Math.floor(t)
}
var y, A = function () {
for (var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "", t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0, n = !(arguments.length > 2 && void 0 !== arguments[2]) || arguments[2], r = e.length, i = 0, o = "", a = 0; a < r; a++)
if (/[^\x00-\xff]/.test(e[a]) ? i += 2 : i++, i >= t) {
o = e.slice(0, a + 1) + (n && a < r - 1 ? "..." : "");
break
} return {
text: o || e,
overLength: i >= t
}
},
w = function (e) {
return {
index: e,
_d_index: e
}
};
o().getNetworkType({
complete: function (e) {
y = e
}
}), o().onNetworkStatusChange((function (e) {
y = e.networkType
}));
var b = function () {
return y
},
_ = function () {
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n];
var i, o, a, c, s, u, f = t[0] || {},
p = 1,
m = t.length,
h = !1;
for ("boolean" == typeof f && (h = f, f = t[p] || {}, p++), "object" === (0, r.A)(f) || l(f) || (f = {}), p === m && p--; p < m; p++)
if (null != (i = t[p]))
for (var v = 0, g = Object.keys(i); v < g.length; v++) a = f[o = g[v]], f !== (c = i[o]) && (h && c && (d(c) || (s = Array.isArray(c))) ? (s ? (s = !1, u = a && Array.isArray(a) ? a : []) : u = a && d(a) ? a : {}, f[o] = _(h, u, c)) : void 0 !== c && (f[o] = c));
return f
}
},
7867: function (e, t, n) {
n.d(t, {
bV: function () {
return v
},
ne: function () {
return A
},
Yw: function () {
return y
},
TM: function () {
return w
}
});
var r = n(4107),
i = n(4576),
o = n(5652),
a = n(2555),
c = n(9933),
s = n(8838),
u = n(4492),
l = n(3150),
d = n(5723),
f = n(9044),
p = [f.SH.SALE_BUY_NOW, f.SH.SALE_BUY_CHOOSE_SEAT, f.SH.SALE_PRE_ABOUT_TO_START];
function m(e) {
var t = e.item.itemId,
n = e.guide,
r = (void 0 === n ? {} : n).want,
i = void 0 === r ? {} : r,
o = e.buyButton.status,
a = i.showWant,
c = i.subFlag,
s = i.title,
u = i.wantNum,
l = i.wantNumStr,
d = i.wantNumSuffix,
f = i.subFlagIndex,
m = i.wantDesc,
h = i.guideTipTitle,
v = i.guideTipSubTitle,
g = i.guideTipShareTitle,
y = i.guideTipShareSubTitle,
A = i.canFollow,
w = i.unfollowableTip,
b = i.unfollowableToast,
_ = o && p.includes(o);
return {
itemId: t,
status: o,
wantBaseInfo: {
showWant: a,
subFlag: c,
title: s,
wantNum: u,
wantNumStr: l,
wantNumSuffix: d,
subFlagIndex: f,
wantDesc: m,
guideTipTitle: h,
guideTipSubTitle: v,
guideTipShareTitle: g,
guideTipShareSubTitle: y,
disableFollow: "0" === String(A),
unfollowableTip: w,
unfollowableToast: b
},
canSubscribe: _
}
}
var h = n(3716),
v = function (e) {
return e.SCENERY = "1", e
}({}),
g = function (e) {
var t, n, r = e || {},
i = r.item,
o = r.member,
a = r.extra,
c = r.countdown,
s = r.buyButton,
u = [(null == c ? void 0 : c.sellStartTime) || "0", (null == c ? void 0 : c.rcdt) || "0", (null == c ? void 0 : c.countdown) || "0", (null == s ? void 0 : s.status) || "0", (null == s || null === (t = s.afterCountdown) || void 0 === t ? void 0 : t.status) || "0", (null == i ? void 0 : i.itemId) || "0", (null == o ? void 0 : o.launchMsrdc) || "0", (null == o ? void 0 : o.launchScd) || "0", (null == o ? void 0 : o.launchTimeStamp) || "0", (null == o ? void 0 : o.scd) || "0", (null == a ? void 0 : a.timestamp) || "0", (null == o ? void 0 : o.buttonStatus) || "0", (null == o ? void 0 : o.msrdc) || "0", (null == o ? void 0 : o.preBuyTimestamp) || "0", (null == o || null === (n = o.buyButtonAfterLaunchCountdown) || void 0 === n ? void 0 : n.status) || "0"];
return null == u ? void 0 : u.join("")
},
y = function () {
var e = (0, a.A)((0, o.A)().m((function e(t, n) {
var r, i, a, s, u, l, p, y, A, w, D, R, j, M, B, q, V, W, J, Y, F, H, G, z, Z;
return (0, o.A)().w((function (e) {
for (;;) switch (e.n) {
case 0:
return p = (l = n || {}).version, y = l.marketing, A = l.item, w = l.venue, D = l.guide, R = l.desc, j = l.actionControl, M = l.price, B = l.notice, q = l.atmosphere, V = l.renderControl, W = l.extra, Y = (J = W || {}).k, F = J.cid, e.n = 1, h.A.verifySign({
name: Y,
text: F,
itemId: null == A ? void 0 : A.itemId,
ctext: g(n)
});
case 1:
if (H = e.v, !t) {
e.n = 2;
break
}
return e.a(2, {
error: t
});
case 2:
if (1 * (null == A ? void 0 : A.projectBizType) != 1 || 1 * (null == w ? void 0 : w.venueType) != 1) {
e.n = 3;
break
}
return e.a(2, {
data: {
version: v.SCENERY,
itemId: null == n || null === (G = n.item) || void 0 === G ? void 0 : G.itemId,
venueId: null == n || null === (z = n.venue) || void 0 === z ? void 0 : z.venueId
}
});
case 3:
return Z = {
isConcertType: "true" === V.isConcertType,
version: p,
verifyMark: H,
itemId: null == A ? void 0 : A.itemId,
venueId: null == n || null === (r = n.venue) || void 0 === r ? void 0 : r.venueId,
venueType: null == n || null === (i = n.venue) || void 0 === i ? void 0 : i.venueType,
buyInfo: (0, f.l_)(n),
wantInfo: m(n),
groupBuyInfo: _(n),
shareInfo: S(n),
marketing: b(y),
topCardInfo: k(B, A, D, V),
promotionInfo: I(M, q, y),
atmosphere: (0, c.zp)({
url: (null == A ? void 0 : A.catBgUrl) || "",
width: 600,
ignorePng: !1
}),
cityServiceInfo: x(n),
serviceDetailInfo: C(n),
brandInfo: T(n),
performanceStaffInfo: E(n),
detailNoticeInfo: O(n),
detailRatingInfo: P(n),
rankingInfo: U(n),
actionControl: j,
highlight: null == R ? void 0 : R.highLight,
importantInfo: {
title: null == R ? void 0 : R.importantTitle,
content: (0, d.ce)(null == R ? void 0 : R.important)
},
introduceInfo: {
title: null == R ? void 0 : R.introduceTitle,
maxHeight: 2456,
content: (0, d.ce)(null == R ? void 0 : R.introduce)
},
moduleSort: (null == V ? void 0 : V.moduleOrder) || ["header", "rating_wanting", "group_coupon", "mission", "description", "brand", "artist", "show_guide", "comment", "banner", "notice", "footer"],
commonProblem: null == n ? void 0 : n.faqs,
showCommentModule: "false" === (null == j || null === (a = j.degradeControl) || void 0 === a ? void 0 : a.comment) || !1,
userViewingGuide: null == n || null === (s = n.guide) || void 0 === s ? void 0 : s.showGuides,
bannerData: null == n || null === (u = n.banner) || void 0 === u ? void 0 : u.contents,
popupTypeInfo: N(n),
commentParamsInfo: L(n)
}, e.a(2, {
data: Z
})
}
}), e)
})));
return function (t, n) {
return e.apply(this, arguments)
}
}(),
A = function (e) {
var t = e.itemId,
n = u.A.getPostion();
return s.A.getShowDetail({
data: {
itemId: t,
lat: (null == n ? void 0 : n.latitude) || "",
lng: (null == n ? void 0 : n.longitude) || ""
}
})
},
w = function () {
var e = (0, a.A)((0, o.A)().m((function e(t) {
var n;
return (0, o.A)().w((function (e) {
for (;;) switch (e.n) {
case 0:
return n = t.itemId, e.a(2, A({
itemId: n
}).then(function () {
var e = (0, a.A)((0, o.A)().m((function e(t) {
var n, r, a, c;
return (0, o.A)().w((function (e) {
for (;;) switch (e.p = e.n) {
case 0:
return n = (0, i.A)(t, 2), r = n[0], a = n[1], e.p = 1, e.n = 2, y(r, a);
case 2:
return e.a(2, e.v);
case 3:
return e.p = 3, c = e.v, (0, l.Ay)("error", "getShowDetail error ".concat(c)), e.a(2, {
error: c
})
}
}), e, null, [
[1, 3]
])
})));
return function (t) {
return e.apply(this, arguments)
}
}()))
}
}), e)
})));
return function (t) {
return e.apply(this, arguments)
}
}(),
b = function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return (0, r.A)({
taskEntryData: ((null == e ? void 0 : e.interaction) || [])[0]
}, e)
};
function _(e) {
var t = e.marketing,
n = (void 0 === t ? {} : t).pingtuanInfo,
r = void 0 === n ? {} : n;
return {
ruleId: r.ruleId,
tipsTitle: r.tipsTitle,
tipsSubTitle: r.tipsSubTitle,
jumpUrl: r.jumpUrl
}
}
function S(e) {
var t, n = e.item,
r = void 0 === n ? {} : n,
i = r.itemId,
o = void 0 === i ? "" : i,
a = r.itemName,
s = void 0 === a ? "" : a,
u = r.itemPics,
l = (void 0 === u ? {} : u).itemPicList,
d = void 0 === l ? [] : l;
return {
itemName: s,
itemPic: (0, c.zp)({
url: (null == d || null === (t = d[0]) || void 0 === t ? void 0 : t.picUrl) || "",
width: 600,
ignorePng: !1
}),
itemId: o
}
}
function k(e) {
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {},
i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {},
o = ((null == n ? void 0 : n.mediaList) || []).filter((function (e) {
return 2 == +e.type && !!e.videoUrl
})),
a = [null == n ? void 0 : n.guideCat],
c = a.map((function (e) {
return {
tag: e,
style: "normal"
}
}));
return (0, r.A)((0, r.A)({}, t), {}, {
notice: e,
tagList: c,
video: (null == o ? void 0 : o[0]) || null,
renderControl: i
})
}
function I(e, t, n) {
return {
price: e,
atmosphere: t,
marketing: n
}
}
function x(e) {
var t, n, r, i, o = e || {},
a = o.venue,
s = o.guide,
u = o.serviceTips,
l = o.item,
d = (null == s ? void 0 : s.tour) || {},
f = d.projectList,
p = d.showEncoreRequest,
m = d.encoreRequestTargetUrl,
h = l || {},
v = h.seatImages,
g = h.performSeatImages,
y = h.itemId,
A = h.hasNoneSeatImg,
w = h.showTime,
b = h.showDuration,
_ = [];
"true" !== A && (null === (r = _ = (null == g || null === (i = g.filter) || void 0 === i || null === (i = i.call(g, (function (e) {
return null == e ? void 0 : e.seatImg
}))) || void 0 === i ? void 0 : i.map((function (e) {
return null == e ? void 0 : e.seatImg
}))) || v) || void 0 === r || r.map((function (e) {
return (0, c.zp)({
url: e || "",
ignorePng: !1,
width: 600
})
})));
var S = a || {},
k = S.distance,
I = S.showCountText,
x = S.venueAddr,
C = S.venueCityName,
T = S.venueId,
E = S.venueType,
O = S.venueName,
P = S.lng,
N = S.lat,
L = S.venueAddrCustom,
U = null == u || null === (t = u.serviceTerm) || void 0 === t ? void 0 : t.map((function (e) {
var t = e || {},
n = t.icon,
r = t.isSupport,
i = t.tagName,
o = t.tagType;
return {
icon: (0, c.zp)({
url: n,
ignorePng: !1,
width: 100
}),
isSupport: r,
tagName: i,
tagType: o
}
}));
return {
itemId: y,
venueName: O,
venueCityName: C,
venueId: T,
venueAddr: x,
venueType: E,
venueAddrCustom: L,
latitude: Number(N),
longitude: Number(P),
showCountText: I,
distance: k,
projectList: f,
hasNoneSeatImg: "true" === A,
showAddition: "true" === p,
additionTargetUrl: m,
tips: (null == u ? void 0 : u.tips) || [],
seatImages: null !== (n = _) && void 0 !== n && n.length ? _ : v,
serviceNotes: U,
showTime: w,
showDuration: b
}
}
function C(e) {
var t = (e || {}).serviceTips,
n = void 0 === t ? {} : t,
r = n.serviceTerm,
i = n.importantNotes,
o = [];
return null != r && r.length && o.push({
title: "服务说明",
id: "show-detail-service",
data: r
}), null != i && i.length && o.push({
title: "购票观演须知",
id: "show-detail-important-notes",
data: null == i ? void 0 : i.map((function (e) {
var t = e || {},
n = t.icon,
r = t.title,
i = t.content,
o = t.imgUrl;
return {
icon: (0, c.zp)({
url: n,
ignorePng: !1,
width: 100
}),
imgUrl: (0, c.zp)({
url: o,
ignorePng: !1,
width: 600
}),
tagName: r,
tagDesc: i,
hideSupportIcon: !0
}
}))
}), {
list: o
}
}
function T(e) {
var t = ((null == e ? void 0 : e.guide) || {}).brands,
n = void 0 === t ? [] : t;
return null == n ? void 0 : n.map((function (e) {
var t = e || {},
n = t.id,
r = t.fansCountStr,
i = t.fansCountDesc,
o = t.name,
a = t.picUrl,
s = t.subFlag,
u = t.tag,
l = t.activityId,
d = t.followTip;
return {
id: n,
group: "BRAND_GROUP",
type: "BRAND",
pageName: "DM_WX_ITEM_DETAIL",
title: o,
tag: u,
fansCount: r,
fansCountDesc: i || "粉丝",
poster: (0, c.zp)({
url: a || "",
ignorePng: !1,
width: 300
}),
subFlag: "true" === s,
activityId: l,
followTip: d,
hasAttention: "true" === s
}
}))
}
function E(e) {
var t = (null == e ? void 0 : e.guide) || {},
n = t.artistsTitle,
r = t.artists,
i = void 0 === r ? [] : r,
o = ((null == e ? void 0 : e.item) || {}).tcCategoryId,
a = void 0 === o ? "" : o;
return {
artistsTitle: n || "演职人员",
artistList: null == i ? void 0 : i.map((function (e) {
var t = e || {},
n = t.name,
r = t.fansCountStr,
i = t.fansCountDesc,
o = t.sellCount,
s = t.sellCountDesc,
u = t.tag,
l = t.picUrl,
d = t.id,
f = t.subFlag;
return {
group: "ARTIST_GROUP",
type: "ARTIST",
pageName: "DM_WX_ITEM_DETAIL",
tcCategoryId: a,
title: n,
name: n,
fansCount: r,
fansCountDesc: i || "粉丝",
sellCount: o || "",
hasAttention: "true" === f,
sellCountDesc: s || (o && "0" !== o ? "城市巡演" : "暂无在售演出"),
tag: u,
poster: (0, c.zp)({
url: l || "",
ignorePng: !1,
width: 300
}),
avatar: (0, c.zp)({
url: l || "",
ignorePng: !1,
width: 300
}),
id: d
}
}))
}
}
function O(e) {
var t, n = ((null == e ? void 0 : e.serviceTips) || {}).importantNotes,
r = void 0 === n ? [] : n;
return {
title: "购票观演须知",
extra: "全部".concat(null == r ? void 0 : r.length, "条"),
noticeList: null == r || null === (t = r.map((function (e) {
var t = e.title,
n = e.content,
r = e.icon;
return {
title: t,
subtitle: n,
icon: (0, c.zp)({
url: r || "",
ignorePng: !1,
width: 300
})
}
}))) || void 0 === t ? void 0 : t.splice(0, 8)
}
}
function P(e) {
var t, n = ((null == e ? void 0 : e.guide) || {}).rating,
r = (null == e ? void 0 : e.item) || {},
i = r.itemId,
o = r.ipId,
a = n || {},
s = a.rating,
u = a.star,
l = a.starDesc,
d = a.commentUrl,
f = a.ratingNumDesc,
p = a.userRatingVOS;
return {
itemId: i,
ipId: o,
rating: s,
star: u / 2,
ratingNumDesc: f,
starDesc: l,
commentUrl: d,
userRatings: null == p || null === (t = p.map((function (e) {
var t = e || {},
n = t.userImg,
r = t.userNick,
i = t.content;
return {
contentId: t.contentId,
avatar: (0, c.zp)({
url: n || "",
ignorePng: !1,
width: 300
}),
userName: r,
comment: i
}
}))) || void 0 === t ? void 0 : t.splice(0, 3)
}
}
function N(e) {
var t = e.item,
n = void 0 === t ? {} : t,
r = n.itemId,
i = void 0 === r ? "" : r,
o = n.itemType,
a = void 0 === o ? "" : o,
c = n.realName,
s = void 0 === c ? "" : c,
u = e.renderControl,
l = (void 0 === u ? {} : u).showRealNamePopup;
return {
itemId: i,
itemType: a,
realName: s,
showRealNamePopup: "true" === (void 0 === l ? "" : l)
}
}
function L(e) {
var t, n = e.item,
r = n.itemId,
i = n.categoryId,
o = n.ipId;
return {
itemId: r,
tourId: null == e || null === (t = e.guide) || void 0 === t || null === (t = t.tour) || void 0 === t || null === (t = t.projectList) || void 0 === t || null === (t = t[0]) || void 0 === t ? void 0 : t.tourId,
ipId: o,
categoryId: i
}
}
function U(e) {
var t = ((null == e ? void 0 : e.guide) || {}).ranking || {},
n = t.id,
r = t.name,
i = t.order;
return {
rankId: n,
rank: "".concat(r || "").concat(i ? "No." + i : "")
}
}
},
7884: function (e, t, n) {
n.d(t, {
X: function () {
return a
}
});
var r = n(4107),
i = {
api: "mtop.damai.mxm.user.accesstoken.get",
v: "1.0",
SV: "4.0",
data: {}
},
o = n(9887),
a = {
getMxmAccessToken: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new o.p((0, r.A)((0, r.A)({}, i), e)).create()
}
}
},
7963: function (e, t, n) {
n.d(t, {
A: function () {
return l
}
});
var r = n(4107),
i = n(3986),
o = n(2267),
a = n(9365),
c = n(334),
s = n(7852),
u = n(7422);
function l() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
t = a.A.appVersion,
n = o.A.isIos ? "ios" : o.A.isAndroid ? "android" : "unknown",
l = "wifi" === (0, s.DC)() ? "wifi" : "carrier";
return new i.F({
sendGoldLog: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
t = e.logKey,
n = e.logData;
u.A.sendOtherEvent(t, n)
},
logData: (0, r.A)({
os: n,
app: c.A.havanalogin.appEntrance,
miniappVersion: t,
wifi: l
}, e)
})
}
},
8477: function (e, t, n) {
n.d(t, {
H: function () {
return f
},
VO: function () {
return m
},
ZP: function () {
return s
},
Zb: function () {
return u
},
ag: function () {
return h
},
hw: function () {
return l
},
n2: function () {
return d
},
t3: function () {
return p
},
wW: function () {
return v
}
});
var r = n(4107),
i = n(2573),
o = n.n(i),
a = n(2658),
c = n(6432);
function s() {
return "2025.1204.143223"
}
var u = function (e, t) {
return new Promise((function (n, r) {
o().getStorage({
key: e,
success: function (i) {
null !== i.data ? n(i.data) : t().then((function (t) {
o().setStorage({
key: e,
data: t
}), n(t)
})).catch(r)
},
fail: function () {
t().then((function (t) {
o().setStorage({
key: e,
data: t
}), n(t)
})).catch(r)
}
})
}))
},
l = function (e, t) {
var n = Math.ceil(e),
r = Math.floor(t);
return Math.floor(Math.random() * (r - n)) + n
},
d = function (e) {
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++) n[r - 1] = arguments[r];
return new Promise((function (t, r) {
e.apply(void 0, n).then(t).catch(r)
}))
},
f = function (e) {
o().getCurrentPages().slice(-1)[0]._pv_params = (0, r.A)({}, e)
},
p = function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
t = e._pv_params,
n = void 0 === t ? {} : t;
return n
},
m = function () {
try {
return ((0, c.Jt)(a.zL) || {}).id
} catch (e) {
return
}
},
h = function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "",
t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "";
try {
var n = (0, c.Jt)(a.zL) || {},
r = n.keyword;
if (r === t) return;
(0, c.hZ)(a.zL, {
keyword: t,
id: e
})
} catch (e) {}
},
v = function () {
(0, c.hZ)(a.zL, {})
}
},
8572: function (e, t, n) {
function r(e) {
var t = {};
(e.match(new RegExp("[?&][^?&]+=[^?&]+", "g")) || []).forEach((function (e) {
var n = e.substring(1).split("="),
r = decodeURIComponent(n[0]),
i = decodeURIComponent(n[1]);
t[r] = i
}));
var n = e.indexOf("?");
return {
url: -1 === n ? e : e.slice(0, n),
query: t,
noQuery: 0 === Object.keys(t).length
}
}
function i() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "";
try {
return !("string" == typeof e && e.indexOf("/") > -1) && e !== decodeURIComponent(e)
} catch (e) {
return !0
}
}
n.d(t, {
A: function () {
return r
},
f: function () {
return i
}
})
},
8655: function (e, t, n) {
var r = n(4269),
i = n(9063),
o = n(8273),
a = n(4911),
c = n(6070);
t.A = function (e) {
var t = e.open,
n = e.onClose,
s = void 0 === n ? function () {} : n,
u = e.onConfirm,
l = void 0 === u ? function () {} : u,
d = e.onCancel,
f = void 0 === d ? function () {} : d;
return (0, c.jsx)(i.A, {
className: "privacy-modal",
open: t,
onClose: s,
children: (0, c.jsxs)(o.A, {
className: "privacy-modal-card",
children: [(0, c.jsxs)(r.Ss, {
className: "privacy-modal-card-top",
children: [(0, c.jsx)(r.Ss, {
className: "privacy-modal-title",
children: "隐私政策和用户协议"
}), (0, c.jsxs)(r.Ss, {
className: "privacy-modal-link",
children: ["亲爱的用户,欢迎您使用大麦!开启服务前请您认真阅读", (0, c.jsx)(r.EY, {
className: "privacy-modal-link-blue",
onClick: function () {
a.A.navTo("https://help.damai.cn/helpPageH5Context.htm?pageId=38")
},
children: "《大麦用户服务协议》"
}), "、", (0, c.jsx)(r.EY, {
className: "privacy-modal-link-blue",
onClick: function () {
a.A.navTo("https://terms.alicdn.com/legal-agreement/terms/privacy_policy_full/20240408163302242/20240408163302242.html")
},
children: "《大麦小程序隐私政策》"
}), "和", (0, c.jsx)(r.EY, {
className: "privacy-modal-link-blue",
onClick: function () {
var e;
null === (e = wx) || void 0 === e || e.openPrivacyContract()
},
children: "《大麦小程序隐私保护指引》"
}), "。"]
}), (0, c.jsxs)(r.Ss, {
className: "privacy-modal-content",
children: [(0, c.jsx)(r.Ss, {
children: "隐私政策概要如下:"
}), (0, c.jsx)(r.Ss, {
children: "1为向您提供大麦服务我们会处理的信息种类及处理目的、处理方式"
}), (0, c.jsx)(r.Ss, {
children: "2部分服务场景所需申请的权限及第三方插件信息等"
}), (0, c.jsx)(r.Ss, {
children: "3您享有的查询、更正、删除信息等权利"
}), (0, c.jsx)(r.Ss, {
children: "4我们为保护您的信息安全所采取的措施。如您同意以上内容请点击“同意并继续”接受我们的产品和服务。"
})]
})]
}), (0, c.jsxs)(r.Ss, {
className: "privacy-modal-btn",
children: [(0, c.jsx)(r.Ss, {
className: "privacy-modal-btn-cancel",
onClick: f,
children: "不同意"
}), (0, c.jsx)(r.$n, {
className: "privacy-modal-btn-confirm",
openType: "agreePrivacyAuthorization",
onAgreePrivacyAuthorization: l,
children: "同意并继续"
})]
})]
})
})
}
},
8835: function (e, t, n) {
n.d(t, {
c: function () {
return i
}
});
var r = n(29),
i = (0, n(5517).A)((function e() {
(0, r.A)(this, e)
}), [{
key: "intercept",
value: function (e) {
return !1
}
}])
},
8838: function (e, t, n) {
n.d(t, {
A: function () {
return x
}
});
var r = n(4107),
i = {
api: "mtop.damai.wireless.search.projectlist.byrecommend.get",
v: "1.0",
data: {}
},
o = {
api: "mtop.damai.wireless.comment.module.get",
v: "1.1",
data: {}
},
a = {
api: "mtop.damai.wireless.comment.praise",
v: "1.0",
data: {}
},
c = {
api: "mtop.damai.item.detail.getdetail",
v: "1.0",
data: {}
},
s = {
api: "mtop.alibaba.damai.detail.getdetail",
v: "1.2",
data: {}
},
u = {
api: "mtop.alibaba.detail.subpage.getdetail",
v: "2.0",
data: {}
},
l = {
api: "mtop.damai.wireless.user.certification.queryStatus",
v: "1.0",
data: {}
},
d = {
api: "mtop.damai.wireless.follow.relation.update.v2",
v: "1.0",
data: {}
},
f = {
api: "mtop.damai.item.tips.information",
v: "1.0",
data: {}
},
p = {
api: "mtop.damai.wireless.mkt.privilege.verifyandsigncode",
v: "1.0",
data: {}
},
m = {
api: "mtop.damai.wireless.mkt.coupon.applyCoupon4User",
v: "1.0",
data: {}
},
h = {
api: "mtop.damai.wireless.mkt.coupon.queryCouponActsOfItem",
v: "1.0",
data: {}
},
v = {
api: "mtop.damai.wireless.template.query",
v: "1.0",
data: {}
},
g = {
api: "mtop.damai.wireless.template.subscribe",
v: "1.0",
data: {}
},
y = {
api: "mtop.film.MtopTaskAPI.reportTask",
v: "1.0",
data: {}
},
A = {
api: "mtop.item.detail.recommend.all",
v: "1.0",
data: {}
},
w = {
api: "mtop.item.detail.content.feed",
v: "1.0",
data: {}
},
b = {
api: "mtop.damai.wireless.discovery.detail.wanna.getrecommendinfo",
v: "1.0",
data: {}
},
_ = {
api: "mtop.damai.wireless.follow.relation.update.v2",
v: "1.2",
data: {}
},
S = {
api: "mtop.film.MtopNotifyAPI.subscribeMessage",
v: "1.0",
data: {},
ecode: 1
},
k = {
api: "mtop.damai.travel.ticket.detail.getdetail",
v: "1.0",
data: {}
},
I = n(9887),
x = {
getUserLike: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new I.p((0, r.A)((0, r.A)({}, i), e)).create()
},
getCommentList: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new I.p((0, r.A)((0, r.A)({}, o), e)).create()
},
getDetailData: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new I.p((0, r.A)((0, r.A)({}, s), e)).create()
},
commentPraise: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new I.p((0, r.A)((0, r.A)({}, a), e)).create()
},
queryCertificationStatus: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new I.p((0, r.A)((0, r.A)({}, l), e)).create()
},
getShowDetail: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new I.p((0, r.A)((0, r.A)({}, c), e)).create({
valueType: "string"
})
},
followRelationUpdate: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new I.p((0, r.A)((0, r.A)({}, d), e)).create()
},
tipsInformation: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new I.p((0, r.A)((0, r.A)({}, f), e)).create()
},
checkDetailStart: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new I.p((0, r.A)((0, r.A)({}, u), e)).create()
},
privilegeVerifyandSignCode: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new I.p((0, r.A)((0, r.A)({}, p), e)).create()
},
applyCoupon4User: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new I.p((0, r.A)((0, r.A)({}, m), e)).create()
},
queryCouponActsOfItem: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new I.p((0, r.A)((0, r.A)({}, h), e)).create()
},
templateQuery: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new I.p((0, r.A)((0, r.A)({}, v), e)).create()
},
templateSubscribe: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new I.p((0, r.A)((0, r.A)({}, g), e)).create()
},
reportTask: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new I.p((0, r.A)((0, r.A)({}, y), e)).create({
valueType: "string"
})
},
initRecommendAndFeed: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new I.p((0, r.A)((0, r.A)({}, A), e)).create({
valueType: "string"
})
},
paginationFeed: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new I.p((0, r.A)((0, r.A)({}, w), e)).create({
valueType: "string"
})
},
changeRecommend: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new I.p((0, r.A)((0, r.A)({}, b), e)).create({
valueType: "string"
})
},
wantUpdate: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new I.p((0, r.A)((0, r.A)({}, _), e)).create({
valueType: "string"
})
},
subscribeMessage: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new I.p((0, r.A)((0, r.A)({}, S), e)).create({
valueType: "string"
})
},
getTravelDetailInfo: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new I.p((0, r.A)((0, r.A)({}, k), e)).create()
}
}
},
9044: function (e, t, n) {
n.d(t, {
SH: function () {
return o
},
fn: function () {
return c
},
l_: function () {
return m
},
pM: function () {
return a
},
yw: function () {
return p
}
});
var r = n(4107),
i = n(9933),
o = function (e) {
return e.UNKNOWN = "-1", e.PRIVILEGE_EXCEPTION_BUY_CHOOSE_SEAT = "87", e.PRIVILEGE_EXCEPTION_BUY_NOW = "88", e.FOR_SALE_REGISTRATION = "90", e.SOLD_OUT_REGISTRATION = "91", e.SALE_SOLD_OUT = "92", e.SALE_PRE_NOT_AVAILABLE_FOR_SALE = "99", e.SALE_CHANNEL_NOT_AVAILABLE_FOR_SALE = "100", e.SALE_PRE_ABOUT_TO_START = "106", e.SALE_BUY_NOW = "204", e.SALE_BUY_CHOOSE_SEAT = "206", e.SALE_BUY_SPECIAL = "207", e.SALE_BUY_SPECIAL_CHOOSE_SEAT = "208", e.SALE_BUY_COUPON = "209", e.SALE_BUY_COUPON_CHOOSE_SEAT = "210", e.PRIVILEGE_USER_YES_BUY_NOW = "216", e.PRIVILEGE_USER_YES_BUY_CHOOSE_SEAT = "217", e.PRIVILEGE_USER_NO_BUY_NOW = "223", e.PRIVILEGE_USER_NO_BUY_CHOOSE_SEAT = "224", e.PRIVILEGE_CODE_BUY_NOW = "230", e.PRIVILEGE_CODE_BUY_CHOOSE_SEAT = "231", e.SALE_AFTER_DOWN_SHELF = "303", e.PROJECT_CANCEL = "304", e.ITEM_NOT_EXIST = "401", e.ITEM_NOT_SALE = "402", e.SALE_APPOINTMENT_REMINDER = "403", e
}({}),
a = function (e) {
return e[e.HIGHLIGHT = 0] = "HIGHLIGHT", e[e.GRAY = 1] = "GRAY", e
}({}),
c = function (e) {
return e.NONE = "0", e.CODE = "1", e.USER = "3", e.PAY = "4", e
}({}),
s = [c.USER, c.CODE, c.PAY],
u = [o.SALE_PRE_ABOUT_TO_START, o.SALE_BUY_NOW, o.SALE_BUY_CHOOSE_SEAT, o.PRIVILEGE_CODE_BUY_NOW, o.PRIVILEGE_CODE_BUY_CHOOSE_SEAT, o.PRIVILEGE_USER_YES_BUY_NOW, o.PRIVILEGE_USER_YES_BUY_CHOOSE_SEAT, o.FOR_SALE_REGISTRATION, o.SOLD_OUT_REGISTRATION, o.SALE_BUY_SPECIAL, o.SALE_BUY_SPECIAL_CHOOSE_SEAT, o.SALE_BUY_COUPON, o.SALE_BUY_COUPON_CHOOSE_SEAT, o.ITEM_NOT_SALE, o.SALE_APPOINTMENT_REMINDER],
l = [o.SALE_BUY_CHOOSE_SEAT, o.PRIVILEGE_CODE_BUY_CHOOSE_SEAT, o.PRIVILEGE_USER_YES_BUY_CHOOSE_SEAT, o.PRIVILEGE_USER_NO_BUY_CHOOSE_SEAT, o.PRIVILEGE_EXCEPTION_BUY_CHOOSE_SEAT, o.SALE_BUY_SPECIAL_CHOOSE_SEAT, o.SALE_BUY_COUPON_CHOOSE_SEAT],
d = [o.PRIVILEGE_USER_YES_BUY_NOW, o.PRIVILEGE_USER_YES_BUY_CHOOSE_SEAT, o.SALE_BUY_NOW, o.SALE_BUY_CHOOSE_SEAT],
f = [o.SALE_BUY_COUPON, o.SALE_BUY_COUPON_CHOOSE_SEAT];
function p(e) {
var t = e.status,
n = e.itemSubscribed,
i = e.text,
p = e.tip,
m = e.privilege,
h = e.toast;
if (!t) return {};
var v = u.includes(t),
g = v ? a.HIGHLIGHT : a.GRAY,
y = l.includes(t),
A = !1,
w = p || "",
b = i || "",
_ = h || "";
if (null != m && m.type && d.includes(t) && s.includes(null == m ? void 0 : m.type) && (A = !0), (null == m ? void 0 : m.type) === c.PAY && (A = !1, b = "小程序不支持购买"), t === o.SALE_CHANNEL_NOT_AVAILABLE_FOR_SALE && (b = "小程序不支持购买", w = ""), t === o.ITEM_NOT_SALE) {
var S = !!h;
g = S ? a.HIGHLIGHT : a.GRAY, v = S, _ = h
}
return t === o.SALE_APPOINTMENT_REMINDER && (w = ""), {
isPreview: t === o.SALE_PRE_ABOUT_TO_START,
canRedeemCoupon: f.includes(t),
baseInfo: {
status: t,
text: b,
tip: w,
toast: _,
enable: v,
style: g,
isChoose: y
},
privilege: (0, r.A)((0, r.A)({}, m), {}, {
hasPrivilege: A
}),
itemSubscribed: n
}
}
function m(e) {
var t = e.venue,
n = e.item,
o = void 0 === n ? {} : n,
a = o.itemId,
c = void 0 === a ? "" : a,
s = o.projectId,
u = void 0 === s ? "" : s,
l = e.buyButton,
d = void 0 === l ? {} : l,
f = d.status,
m = void 0 === f ? "" : f,
h = d.text,
v = void 0 === h ? "" : h,
g = d.tip,
y = void 0 === g ? "" : g,
A = d.toast,
w = void 0 === A ? "" : A,
b = d.afterCountdown,
_ = void 0 === b ? null : b,
S = d.avatars,
k = void 0 === S ? [] : S,
I = e.privilege,
x = void 0 === I ? {} : I,
C = e.countdown,
T = e.marketing,
E = (void 0 === T ? {} : T).drawCouponMixedId,
O = void 0 === E ? "" : E,
P = e.guide,
N = (void 0 === P ? {} : P).itemSubscribed,
L = p({
text: v,
tip: y,
status: m,
itemSubscribed: void 0 === N ? "" : N,
privilege: x,
toast: w
});
return (0, r.A)((0, r.A)({
itemId: c,
projectId: u,
venue: t,
countDownData: C,
afterCountdown: _,
drawCouponMixedId: O
}, L), {}, {
avatars: k.map((function (e) {
return (0, i.zp)({
url: e,
width: 160
})
}))
})
}
},
9148: function (e, t, n) {
n.d(t, {
UG: function () {
return d
},
X$: function () {
return s
},
er: function () {
return m
},
kf: function () {
return l
},
tp: function () {
return p
},
x3: function () {
return f
}
});
var r = n(9476),
i = n(2573),
o = n.n(i),
a = (n(5765), n(2658));
function c(e) {
return "function" == typeof e
}
function s() {
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n];
var i, o, a, l, d, f, p = t[0] || {},
m = 1,
h = t.length,
v = !1;
for ("boolean" == typeof p && (v = p, p = t[m] || {}, m++), "object" === (0, r.A)(p) || c(p) || (p = {}), m === h && m--; m < h; m++)
if (null != (i = t[m]))
for (var g = 0, y = Object.keys(i); g < y.length; g++) a = p[o = y[g]], p !== (l = i[o]) && (v && l && (u(l) || (d = Array.isArray(l))) ? (d ? (d = !1, f = a && Array.isArray(a) ? a : []) : f = a && u(a) ? a : {}, p[o] = s(v, f, l)) : void 0 !== l && (p[o] = l));
return p
}
function u(e) {
if ("object" !== function (e) {
var t = (0, r.A)(e);
return "object" === t ? null === e ? "null" : Object.prototype.toString.call(e).slice(8, -1).toLowerCase() : t
}(e)) return !1;
var t = Object.prototype.hasOwnProperty;
return !(e.constructor && !t.call(e, "constructor") && !t.call(e.constructor.prototype || {}, "isPrototypeOf"))
}
function l(e) {
return !isNaN(parseFloat(e)) && isFinite(e)
}
function d(e) {
for (var t = [], n = 0; n < e.length; n++) {
var r = e.charCodeAt(n);
r <= 127 ? t.push(r) : r <= 2047 ? t.push(192 | r >> 6, 128 | 63 & r) : r <= 65535 ? t.push(224 | r >> 12, 128 | r >> 6 & 63, 128 | 63 & r) : r <= 1114111 && t.push(240 | r >> 18, 128 | r >> 12 & 63, 128 | r >> 6 & 63, 128 | 63 & r)
}
return new Uint8Array(t)
}
o().getNetworkType({
complete: function (e) {}
}), o().onNetworkStatusChange((function (e) {
e.networkType
}));
var f = function (e) {
return e.indexOf("https:") >= 0 ? e : e.indexOf("http:") >= 0 ? e.replace("http:", "https:") : e.indexOf("//") >= 0 ? "https:" + e : "https://" + e
},
p = function (e) {
var t = decodeURIComponent(e);
return a.Xw.some((function (e) {
return (null == t ? void 0 : t.indexOf(e)) > -1
})) && a.Kj.some((function (e) {
return (null == t ? void 0 : t.indexOf(e)) > -1
}))
},
m = function () {
var e, t = o().getDeviceInfo(),
n = null == t || null === (e = t.brand) || void 0 === e ? void 0 : e.toLowerCase();
return "iphone" === n ? a.cU.IOS : "harmonyos" === n ? a.cU.HARMONY : "oppo" === n || "oneplus" === n || "realme" === n ? a.cU.OPPO : "vivo" === n ? a.cU.VIVO : "honor" === n ? a.cU.HONOR : -1
}
},
9294: function (e, t, n) {
n.d(t, {
A: function () {
return s
}
});
var r = n(4107),
i = {
api: "mtop.damai.wireless.user.my.content.get",
v: "1.0",
method: "GET",
data: {}
},
o = {
api: "mtop.damai.wireless.miniprogram.mine.banner.get",
v: "1.0",
method: "GET",
data: {}
},
a = {
api: "mtop.damai.wireless.user.encrypt.info.get",
v: "1.0",
method: "GET",
data: {}
},
c = n(9887),
s = {
getUserMyContent: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new c.p((0, r.A)((0, r.A)({}, i), e)).create()
},
getMineBanner: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new c.p((0, r.A)((0, r.A)({}, o), e)).create()
},
getEncryptUserInfo: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new c.p((0, r.A)((0, r.A)({}, a), e)).create()
}
}
},
9365: function (e, t, n) {
n.d(t, {
A: function () {
return te
}
});
var r = n(5652),
i = n(2555),
o = n(2248),
a = n.n(o),
c = n(334),
s = n(715),
u = n.n(s),
l = n(9148),
d = n(3151),
f = c.A.h5_base_url,
p = {
search: "search/index.html",
category: "category/index.html",
buyNow: "buy/buy-now/index.html",
seat: "select-seat/index.html",
orderList: "order/list/index.html",
couponList: "https://m.damai.cn/tickets/moviemine/pages/coupon-list/index.html",
addressList: "mine/address-list/index.html",
audience: "mine/audience/index.html",
myTickets: "tickets/index.html",
roadRunTrade: "enroll/input/index.html",
help: "https://sale.damai.cn/app/help",
feedback: "mine/feedback/index.html",
certification: "mine/certificate/index.html",
starsIndex: "activity/passport/index.html",
myFocus: "mine/want-to-see/index.html",
commentList: "https://m.damai.cn/damai/activity/commentlist/index.html#commentlist",
verifiedCommentList: "https://m.damai.cn/damai/activity/commentlist/index.html",
commentDetail: "https://m.damai.cn/damai/activity/dynamic/index.html",
myComment: "https://m.damai.cn/damai/activity/waitcomment/index.html",
ticketsAddress: "tickets/address.html",
mustKnow: "tickets/mustKnow.html",
ticketsSouvernir: "tickets/souvernir.html",
ticketsList: "https://m.damai.cn/shows/ticket/list.html",
ticketsDetail: "https://m.damai.cn/shows/ticket/detail.html"
};
function m(e) {
for (var t = [], n = 0, r = Object.keys(e); n < r.length; n++) {
var i = r[n];
t.push(i + "=" + encodeURIComponent(e[i]))
}
return t.join("&")
}
function h(e, t) {
var n = "";
/^(http|https)/.test(e) ? n = e : /^http/.test(n = p[e]) || (n = f + n);
var r = t || {},
i = /^(.+)#(.+)$/.exec(n),
o = "";
return null != i && i[2] && (n = i[1], o = i[2]), n = n.indexOf("?") > 0 ? n + "&" + m(r) : n + "?" + m(r), o && (n = n + "#" + o), n
}
var v = n(4911),
g = n(7422),
y = "pages/webview/index",
A = ["subPackages/alicare-landing/index"],
w = n(3816),
b = n(2267),
_ = n(4492),
S = n(29),
k = n(5517),
I = n(6703),
x = n(1925),
C = n(8835),
T = n(5765),
E = n(2573),
O = n.n(E),
P = {
"/damai/search/index.html": "/pages/search/index",
"/damai/detail/item.html": "/subPackages/detail/item",
"/damai/perform/item.html": "/pages/perform/index",
"/damai/home/index.html": "/pages/home/index",
"/damai/category/index.html": "/subPackages/category/index",
"/damai/detail/mini.html": "/subPackages/detailmini/index",
"/shows/item.html": "/subPackages/detail/item",
"/shows/search.html": "/pages/search/index",
"/shows/home.html": "/pages/home/index",
"/shows/category.html": "/subPackages/category/index"
},
N = function (e) {
function t() {
return (0, S.A)(this, t), (0, I.A)(this, t, arguments)
}
return (0, x.A)(t, e), (0, k.A)(t, [{
key: "intercept",
value: function (e) {
var t = e,
n = t.uri || "";
if (n.startsWith("http")) {
var r = new T.g(n);
if ("false" === r.params.wh_mini) return !1;
var i = r.host;
if ("piao.damai.cn" === i) {
/^\/[0-9]+\.html$/.test(r.pathname) && O().showToast({
title: "该项目已失效~",
icon: "none"
})
}
if ("detail.damai.cn" === i && "/item.htm" === r.pathname && (r.pathname = "/subPackages/detail/item", t.uri = r.pathname + r.search), "m.damai.cn" === i) {
var o = P[r.pathname];
if (/\/perform\/index/.test(o) && O().showToast({
title: "该项目已失效~",
icon: "none"
}), o) {
var a = !0;
if ("/shows/item.html" === r.pathname || "/damai/detail/item.html" === r.pathname) {
var c = r.params.itemId || r.params.id,
s = (c || "").length;
(s >= 9 && s <= 11 || "100000000000" === c) && (a = !1)
}
a && (r.pathname = o, t.uri = r.pathname + r.search)
}
}
} else if (n.startsWith("damai://")) {
var u = new T.g(n);
if ("V1" === u.host)
if ("/ProjectPage" === u.pathname) {
u.params.id.toString().length > 9 ? u.pathname = "/subPackages/detail/item" : O().showToast({
title: "该项目已失效~",
icon: "none"
}), t.uri = u.pathname + u.search
} else "/DiscountPage" === u.pathname && (t.uri = "https://m.damai.cn/damai/activity/discount/index.html" + u.search)
}
return !1
}
}])
}(C.c),
L = n(4107),
U = n(6516),
D = n(3847),
R = n(4017),
j = n(2658),
M = function (e) {
function t() {
var e;
return (0, S.A)(this, t), (e = (0, I.A)(this, t)).lastWriteCookieTime = -1, e
}
return (0, x.A)(t, e), (0, k.A)(t, [{
key: "intercept",
value: function () {
var e = (0, i.A)((0, r.A)().m((function e(t) {
var n, i, o, a, c, s, u, l, d, f, p, m, h, v, g, y, A, _, S, k;
return (0, r.A)().w((function (e) {
for (;;) switch (e.n) {
case 0:
if (o = (i = (n = t) || {}).uri, a = void 0 === o ? "" : o, c = i.options, s = void 0 === c ? {} : c, !a.startsWith("http")) {
e.n = 9;
break
}
if (u = new T.g(a), l = s.showLoading, d = void 0 === l || l, f = j.aS.some((function (e) {
return "string" == typeof a && a.includes(e)
})), p = s.needLogin || "true" === u.params.needLogin || f, b.A.isSWAN && (p = !0), m = s.alertRetry, !p) {
e.n = 8;
break
}
if (h = (new Date).getTime(), v = h - this.lastWriteCookieTime > 3e5, v || !w.A.isWebviewLoginValid()) {
e.n = 1;
break
}
return D.A.hide(), e.a(2, !1);
case 1:
return d && D.A.show(), e.n = 2, w.A.isLogin();
case 2:
if (g = e.v) {
e.n = 4;
break
}
return e.n = 3, w.A.login();
case 3:
y = e.v, A = y.success, g = A;
case 4:
if (g) {
e.n = 5;
break
}
return D.A.hide(), m ? wx.showModal({
title: "提示",
showCancel: !1,
content: "亲,请登录后再试~~"
}) : U.A.show("请登录后再试~"), e.a(2, !0);
case 5:
if (d && D.A.show(), n.params = (0, L.A)((0, L.A)({}, (null == n ? void 0 : n.params) || {}), {}, {
has_login: "yes",
free_login: f ? "no" : "yes"
}), _ = this.getFinalUrl(n), S = (0, E.getCurrentPages)(), "redirectTo" === s.navigateType && S && S.length >= 2 && (O().navigateBack(), d && D.A.show()), D.A.hide(), this.lastWriteCookieTime = (new Date).getTime(), w.A.setWebviewLoginValid(g), !_) {
e.n = 7;
break
}
if (!s.switchTabPath) {
e.n = 6;
break
}
return "switchTab" === s.navigateType && S && S.length >= 2 && O().navigateBack(), e.a(2, !0);
case 6:
return k = "/pages/webview/index?url=".concat(encodeURIComponent(_), "&isRedirect=true"), "redirectTo" === s.navigateType ? R.A.redirectTo({
url: k
}) : R.A.navigateTo({
url: k
}), e.a(2, !0);
case 7:
return m ? wx.showModal({
title: "提示",
showCancel: !1,
content: "亲,加载失败,请重试~"
}) : U.A.show("加载失败,请重试~"), e.a(2, !0);
case 8:
case 9:
return e.a(2, !1)
}
}), e, this)
})));
return function (t) {
return e.apply(this, arguments)
}
}()
}, {
key: "getFinalUrl",
value: function (e) {
var t = e.uri,
n = e.params,
r = new T.g(t),
i = r.params;
if (n)
for (var o = 0, a = Object.keys(n); o < a.length; o++) {
var c = a[o];
i[c] = n[c]
}
return r.toString()
}
}])
}(C.c),
B = ["/pages/mine/index", "/pages/ticket-wallet/index", "/pages/want2see/index", "/pages/home/index"],
q = function (e) {
function t() {
return (0, S.A)(this, t), (0, I.A)(this, t)
}
return (0, x.A)(t, e), (0, k.A)(t, [{
key: "intercept",
value: function () {
var e = (0, i.A)((0, r.A)().m((function e(t) {
var n, i, o, a, c, s, u, l, d, f, p, m, h;
return (0, r.A)().w((function (e) {
for (;;) switch (e.n) {
case 0:
if (o = (i = (n = t) || {}).uri, a = void 0 === o ? "" : o, c = i.params, s = void 0 === c ? {} : c, u = i.options, l = void 0 === u ? {} : u, !a.startsWith("http")) {
e.n = 1;
break
}
return e.a(2, !1);
case 1:
if (a.startsWith("/") || (a = "/" + a), a = "https://m.damai.cn" + a, d = new T.g(a), B.indexOf(d.pathname) >= 0 && (l.navigateType = "switchTab", n.options = l), f = d.params, s)
for (p = 0, m = Object.keys(s); p < m.length; p++) h = m[p], f[h] = s[h];
return v.A.setTabParams(d.pathname, f), e.a(2, !1)
}
}), e)
})));
return function (t) {
return e.apply(this, arguments)
}
}()
}])
}(C.c),
V = "m.damai.cn",
W = c.A.envPrefixList.map((function (e) {
return "".concat(e, ".wapa.damai.cn")
})),
J = "market.waptest.taobao.com",
Y = {
m: V,
wapa: "".concat(c.A.getEnvPrefix(), ".wapa.damai.cn"),
waptest: J
},
F = {
m: "/damai/",
wapa: "/damai/",
waptest: "/app/damai/damai-msite/"
},
H = function (e) {
function t() {
return (0, S.A)(this, t), (0, I.A)(this, t, arguments)
}
return (0, x.A)(t, e), (0, k.A)(t, [{
key: "intercept",
value: function (e) {
var t = e,
n = t.uri || "";
if (n.startsWith("http")) {
var r = c.A.getEnv(),
i = new T.g(n),
o = i.host,
a = i.pathname,
s = W.indexOf(o) >= 0;
o === V || s || o === J ? (o = s ? "".concat(c.A.getEnvPrefix(), ".wapa.damai.cn") : Y[r], a.indexOf("/app/dmfe/") < 0 && ("m" === r || "wapa" === r ? 0 === a.indexOf(F.waptest) && (a = a.replace(F.waptest, F[r])) : "waptest" === r && a.indexOf(F.waptest) < 0 && (a = a.replace(F[r], F.waptest)))) : o = (o = (o = o.replace(".m.", ".".concat(r, "."))).replace(".wapa.", ".".concat(r, "."))).replace(".waptest.", ".".concat(r, ".")), i.host = o, i.pathname = a, n = i.toString(), t.uri = n
}
return !1
}
}])
}(C.c),
G = {
"/m/home": "/pages/home/index",
"/m/show-detail": "/subPackages/detail/item",
"/m/category": "/subPackages/category/index",
"/m/search": "/pages/search/index",
"/m/profile": "/pages/mine/index",
"/m/ticket-list": "/pages/ticket-wallet/index"
},
z = ["pre.piao.cn", "piao.cn"],
Z = function (e) {
function t() {
return (0, S.A)(this, t), (0, I.A)(this, t, arguments)
}
return (0, x.A)(t, e), (0, k.A)(t, [{
key: "intercept",
value: function (e) {
var t = e,
n = t.uri,
r = t.params;
if (n.startsWith("http")) {
var i = new T.g(n),
o = i.pathname,
a = i.hostname,
c = i.search,
s = i.params,
u = G[o],
l = (null == r ? void 0 : r.intercept) || (null == s ? void 0 : s.intercept);
u && z.includes(a) && "no" !== l && (t.uri = u + c)
}
return !1
}
}])
}(C.c),
X = n(6432),
K = function (e) {
function t() {
return (0, S.A)(this, t), (0, I.A)(this, t, arguments)
}
return (0, x.A)(t, e), (0, k.A)(t, [{
key: "intercept",
value: function (e) {
var t = e,
n = t.uri || "";
if (n.startsWith("http")) {
var r = new T.g(n);
if ("m.damai.cn" === r.host && "/damai/activity/broadsquare/index.html" === r.pathname) {
var i = (0, X.Jt)("userSelectedCitySite");
i && (r.params.cityId = i.damaiId, t.uri = r.toString())
}
}
return !1
}
}])
}(C.c),
$ = function (e) {
function t() {
return (0, S.A)(this, t), (0, I.A)(this, t, arguments)
}
return (0, x.A)(t, e), (0, k.A)(t, [{
key: "updateLancherParams",
value: function (e) {
if (e) {
var t = null,
n = e.query;
n && (n.q && (t = this.parseUTM(n.q)), n.url && (t = this.parseUTM(n.url))), this.utm = t, this.sceneId = e.scene, e.referrerInfo && e.referrerInfo.appId ? this.refAppId = e.referrerInfo.appId : this.refAppId = ""
}
}
}, {
key: "parseUTM",
value: function (e) {
if (!e || !(e || "").startsWith("http")) return null;
var t = decodeURIComponent(e);
if (!t.startsWith("https://")) return null;
var n = new T.g(t),
r = n.params.utm;
!r && n.params.url && n.params.url.startsWith("https://") && (r = new T.g(n.params.url).params.utm);
return r
}
}, {
key: "getUTM",
value: function () {
return this.utm
}
}, {
key: "getSceneId",
value: function () {
return this.sceneId
}
}, {
key: "getRefAppId",
value: function () {
return this.refAppId
}
}, {
key: "intercept",
value: function () {
var e = (0, i.A)((0, r.A)().m((function e(t) {
var n;
return (0, r.A)().w((function (e) {
for (;;) switch (e.n) {
case 0:
(n = t.options).pc_i = w.A.getUtdid(), n.pu_i = w.A.getUserId(), n.havana_id = w.A.getHavanaId(), n.scene_id = this.sceneId, this.isEmptyString(this.refAppId) || (n.dmpublic_id = this.refAppId), this.isEmptyString(n.utm) ? n.utm = this.utm || "" : this.utm = n.utm, this.addPUrl(n), this.addPRef(n);
case 1:
return e.a(2)
}
}), e, this)
})));
return function (t) {
return e.apply(this, arguments)
}
}()
}, {
key: "addPUrl",
value: function (e) {
var t = e;
if (this.isEmptyString(t._p_url)) {
var n = (0, E.getCurrentPages)();
if (n && n.length > 0) {
var r = n[n.length - 1];
r.route = r.route || r.__route__, t._p_url = "https://m.damai.cn/".concat(r.route, ".html")
} else t._p_url = ""
}
}
}, {
key: "addPRef",
value: function (e) {
var t = e;
if (this.isEmptyString(t._p_ref)) {
var n = (0, E.getCurrentPages)();
if (n && n.length > 1) {
var r = n[n.length - 2];
r.route = r.route || r.__route__, t._p_ref = "https://m.damai.cn/".concat(r.route, ".html")
} else t._p_ref = ""
}
}
}, {
key: "isEmptyString",
value: function (e) {
return !e || 0 === e.length
}
}])
}(n(3451).c),
Q = function (e) {
function t() {
var e;
return (0, S.A)(this, t), (e = (0, I.A)(this, t)).validPaths = new Set(["/item.htm", "/shows/item.html"]), e.validDomains = new Set(["m.damai.cn", "detail.damai.cn"]), e
}
return (0, x.A)(t, e), (0, k.A)(t, [{
key: "redirectDSL",
value: function (e) {
var t = this;
return new Promise((function (n, r) {
wx.request({
url: e.trim(),
redirect: "manual",
success: function (e) {},
fail: function (e) {
r(e)
}
}).onHeadersReceived((function (e) {
var r, i, o = new T.g(e.header.location);
if (null != o && o.pathname && t.validPaths.has(null == o ? void 0 : o.pathname) && (t.validDomains.has(null == o ? void 0 : o.hostname) || t.validDomains.has(null == o ? void 0 : o.host)) && (null != o && null !== (r = o.params) && void 0 !== r && r.itemId || null != o && null !== (i = o.params) && void 0 !== i && i.id)) {
var a = [];
Object.keys(o.params).forEach((function (e) {
a.push(e + "=" + o.params[e])
})), n("/subPackages/detail/item?" + a.join("&"))
}
n("")
}))
}))
}
}, {
key: "intercept",
value: function () {
var e = (0, i.A)((0, r.A)().m((function e(t) {
var n, i;
return (0, r.A)().w((function (e) {
for (;;) switch (e.p = e.n) {
case 0:
if (!((n = t.uri).indexOf("piao.cn") < 0)) {
e.n = 1;
break
}
return e.a(2, !1);
case 1:
return i = null, e.p = 2, e.n = 3, this.redirectDSL(n);
case 3:
i = e.v, e.n = 5;
break;
case 4:
e.p = 4, e.v, i = null;
case 5:
if (!i) {
e.n = 6;
break
}
return R.A.navigateTo({
url: i
}), e.a(2, !0);
case 6:
return e.a(2, !1)
}
}), e, this, [
[2, 4]
])
})));
return function (t) {
return e.apply(this, arguments)
}
}()
}])
}(C.c);
a().init({
appName: "damai",
filterJanus: function () {
return !0
},
filterUab: function (e) {
return ["mtop.damai.item.detail.getdetail", "mtop.alibaba.detail.subpage.getdetail", "mtop.damai.trade.order.build.h5", "mtop.damai.trade.order.create.h5", "mtop.damai.trade.order.adjust.h5"].some((function (t) {
return -1 !== e.indexOf(t)
}))
},
filterUmid: function () {
return !0
}
});
var ee = ["pages/home/index"],
te = {
$Tracker: null,
$Router: null,
$spmA: "a2obt",
appId: c.A.havanalogin.appid,
appVersion: c.A.appVersion,
baxiaMiniprogram: u().mtop.config.$baxiaMiniprogram,
awsc: a(),
init: function (e) {
e && e.path && !ee.includes(e.path) && ! function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
t = e.path,
n = e.query,
r = void 0 === n ? {} : n;
if (A.includes(t)) return !0;
if (t === y) try {
var i = r.action,
o = void 0 === i ? "" : i;
if (o = decodeURIComponent(o)) {
var a = (o = JSON.parse(o)) || {},
c = a.type,
s = a.payload;
if ("jump" === c) {
var u = s || {},
l = u.jumpUrl,
d = void 0 === l ? "" : l,
f = A.some((function (e) {
return -1 !== d.indexOf(e)
}));
if (f) return !0
}
}
} catch (e) {}
return !1
}(e) && _.A.getCurrentCity(), this.initMtop(), this.initTracker(e), w.A.init(), this.initRouter()
},
initMtop: function () {
var e = "";
b.A.isWX ? e = "damai@weixin_weapp" : b.A.isDOUY ? e = "damai@douyin_miniapp" : b.A.isTT ? e = "damai@toutiao_miniapp" : b.A.isSWAN && (e = "damai@baidu_h5"), d.A.setChannel(e)
},
initTracker: function (e) {
g.A.setConfigs({
pvUrl: "https://log.mmstat.com/vx.gif",
clickUrl: "https://wgo.mmstat.com/vx/damai_wxmini.default.click",
appId: this.appId,
appName: "damai",
appVersion: this.appVersion,
miniApp: b.A.appName,
spmA: this.$spmA
}), this.trackerInterceptor = new $, this.trackerInterceptor.updateLancherParams(e), g.A.addInterceptor(this.trackerInterceptor), this.$Tracker = g.A
},
updateLancherParams: function (e) {
this.trackerInterceptor && this.trackerInterceptor.updateLancherParams(e)
},
getUTM: function () {
return this.trackerInterceptor ? this.trackerInterceptor.getUTM() : ""
},
getSceneId: function () {
return this.trackerInterceptor ? this.trackerInterceptor.getSceneId() : ""
},
getRefAppId: function () {
return this.trackerInterceptor ? this.trackerInterceptor.getRefAppId() : ""
},
initRouter: function () {
this.$Router = v.A, v.A.addInterceptor(new Z), v.A.addInterceptor(new N), v.A.addInterceptor(new H), v.A.addInterceptor(new K), v.A.addInterceptor(new q), v.A.addInterceptor(new Q), v.A.addInterceptor(new M)
},
configAssign: function (e) {
(0, l.X$)(!0, this, e)
},
$fetch: function (e) {
var t = "string" == typeof e ? {
url: e,
type: "GET"
} : e;
return t = (0, l.X$)(!0, t, {
env: c.A.getEnv()
}), new d.A(t).request()
},
$goH5: function (e) {
var t = arguments;
return (0, i.A)((0, r.A)().m((function n() {
var i, o, a, s, u;
return (0, r.A)().w((function (n) {
for (;;) switch (n.n) {
case 0:
i = t.length > 1 && void 0 !== t[1] ? t[1] : {}, o = t.length > 2 && void 0 !== t[2] ? t[2] : {}, s = {}, u = h(e, a = i), o && (s.needLogin = o.needLogin, o.spm_cnt ? (a.spm = "".concat(c.A.SPM_A, ".").concat(o.spm_cnt), a.spm_cnt = a.spm) : a.spm && (a.spm_cnt = a.spm), o.redirect && (s.navigateType = "redirectTo")), v.A.navTo(u, a, s);
case 1:
return n.a(2)
}
}), n)
})))()
},
globalData: {
appOptions: null,
CONFIG: c.A,
env: c.A.env,
userSelctedCity: null,
domain: "http://wechat.damai.cn/"
}
}
},
9761: function (e, t) {
t.A = {
wechatglobalconfig: {
api: "mtop.damai.wireless.home.wechatglobalconfig",
v: "1.0",
data: {}
},
getWantGuide: {
api: "mtop.damai.wireless.discovery.home.wanna.get",
v: "1.4",
data: {}
},
certificationStatus: {
api: "mtop.damai.wireless.user.certification.querystatus",
v: "1.0",
data: {}
},
getPopup: {
api: "mtop.damai.mec.popup.get",
v: "1.0",
data: {}
},
getHomeFloat: {
api: "mtop.damai.wireless.home.float",
v: "2.4",
data: {}
},
getBatchLotteryDraw: {
api: "mtop.film.MtopLuckyDrawAPI.batchLotteryDraw",
v: "9.3",
data: {}
},
relationUpdate: {
api: "mtop.damai.wireless.follow.relation.update.v2",
v: "1.2",
data: {}
},
reportPopup: {
api: "mtop.damai.mec.popup.report",
v: "1.0",
data: {}
},
floatReport: {
api: "mtop.damai.wireless.home.float.report",
data: {}
}
}
},
9887: function (e, t, n) {
n.d(t, {
p: function () {
return E
}
});
var r = n(5652),
i = n(4576),
o = n(2555),
a = n(4107),
c = n(5882),
s = n(29),
u = n(5517),
l = n(9371),
d = n(7852),
f = n(3151),
p = n(5059),
m = n(334),
h = n(6432),
v = n(6703),
g = n(1925),
y = n(2365),
A = n(2573),
w = n.n(A),
b = function (e) {
function t() {
return (0, s.A)(this, t), (0, v.A)(this, t, arguments)
}
return (0, g.A)(t, e), (0, u.A)(t, [{
key: "request",
value: function (e) {
return new Promise((function (t, n) {
return w().request({
url: e,
success: function (e) {
t(e.data)
},
fail: function (e) {
n()
}
})
}))
}
}])
}(y.Mc),
_ = n(4752),
S = n(2658),
k = function () {
return new Promise((function (e) {
var t = "https://kuai-cdn.taopiaopiao.com/cfg/9ce6587c749a424b82ed085f1db9b864.json?t=".concat(Date.now());
w().request({
url: t
}).catch((function () {})).then((function (t) {
200 !== (null == t ? void 0 : t.statusCode) ? e(void 0) : e(null == t ? void 0 : t.data)
}))
}))
},
I = function (e) {
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
n = "".concat(S.jL, "/combo/").concat(((null == e ? void 0 : e.urlElements) || []).join("_"), ".json");
return _.Ay.sendGoldLog("CLK", "/yanchu.fe.downgrade", (0, a.A)((0, a.A)({}, t), {}, {
cdn: n
})), new Promise((function (t, r) {
w().request({
url: n
}).then((function (n) {
if (200 !== (null == n ? void 0 : n.statusCode)) t([{
downgradeError: !0
}, void 0, n, e]);
else {
var r = (0, a.A)({
isDowngrade: !0
}, null == n ? void 0 : n.data);
t([null, r, n, e])
}
})).catch((function (e) {
r(e)
}))
}))
},
x = function (e) {
var t = e.cmsData,
n = e.configData,
r = e.reqParam,
i = t || {},
o = i.retType,
a = i.nodes,
c = r || {},
s = c.patternName,
u = c.patternVersion,
l = c.useCdnWhenNodesNull,
d = void 0 === l || l,
f = (a || []).length,
p = ((null == n ? void 0 : n.patternNames) || []).some((function (e) {
return e.patternName === s && e.patternVersion === u && "1" === e.on
}));
return p || 0 !== o || d && 0 === f ? I(r, {
on: p ? 1 : 0,
ret_type: o,
layers_len: f
}) : [null, t]
},
C = ["api", "data", "v", "SV", "headers", "method", "timeout", "ext_headers", "downgradeConfig", "ext_querys"],
T = ["downgradeConfig"],
E = (0, u.A)((function e() {
var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
(0, s.A)(this, e), (0, l.A)(this, "options", void 0), (0, l.A)(this, "mockService", void 0);
var n = t;
if (this.mockService = new b, "string" == typeof n) n = {
url: n,
type: "GET"
};
else {
var r = n,
i = r.api,
o = r.data,
u = r.v,
f = r.SV,
p = r.headers,
h = r.method,
v = r.timeout,
g = r.ext_headers,
y = r.downgradeConfig,
A = r.ext_querys,
w = (0, c.A)(r, C);
n = {
url: i,
v: u,
SV: f,
ext_querys: A,
headers: p,
method: h,
timeout: v,
ext_headers: g,
downgradeConfig: y,
data: (0, a.A)((0, a.A)({}, o), w)
}
}
this.options = (0, d.X$)(!0, n, {
env: m.A.getEnv()
})
}), [{
key: "create",
value: function () {
var e = (0, o.A)((0, r.A)().m((function e() {
var t, n, o, s, u, l, d, m, v, g, y, A, w, b, _, S = this,
I = arguments;
return (0, r.A)().w((function (e) {
for (;;) switch (e.p = e.n) {
case 0:
if (n = I.length > 0 && void 0 !== I[0] ? I[0] : {}, o = !0, e.p = 1, !(b = "function" == typeof wx[(0, h.Jt)("decode")("Z2V0UmVuZGVyZXJVc2VyQWdlbnQ=")])) {
e.n = 3;
break
}
return e.n = 2, wx[(0, h.Jt)("decode")("Z2V0UmVuZGVyZXJVc2VyQWdlbnQ=")]();
case 2:
b = e.v;
case 3:
if (w = b) {
e.n = 4;
break
}
w = "";
case 4:
s = w, (![(0, h.Jt)("decode")("aW9z"), (0, h.Jt)("decode")("YW5kcm9pZA=="), (0, h.Jt)("decode")("b2hvcw==")].includes(wx[(0, h.Jt)("decode")("Z2V0RGV2aWNlSW5mbw==")]()[(0, h.Jt)("decode")("cGxhdGZvcm0=")]) || (0, h.Jt)((0, h.Jt)("decode")("ZW52VmVyc2lvbg==")) === (0, h.Jt)("decode")("cmVsZWFzZQ==") && !0 === wx[(0, h.Jt)("decode")("Z2V0QXBwQmFzZUluZm8=")]()[(0, h.Jt)("decode")("ZW5hYmxlRGVidWc=")] || s.indexOf((0, h.Jt)("decode")("d2VjaGF0ZGV2dG9vbHM=")) > -1 || s.indexOf((0, h.Jt)("decode")("TWluaVByb2dyYW1FbnYvTWFj")) > -1 || s.indexOf((0, h.Jt)("decode")("TWluaVByb2dyYW1FbnYvV2luZG93cw==")) > -1) && (o = !1), e.n = 6;
break;
case 5:
e.p = 5, _ = e.v, "function" == typeof armsReport && armsReport({
code: 1e3,
msg: (0, h.Jt)("decode")("aW50ZXJjZXB0LXBj"),
m1: 1,
c1: JSON.stringify(_.message)
});
case 6:
if (!1 !== o) {
e.n = 7;
break
}
return e.a(2, !1);
case 7:
if (u = this.options || {}, l = u.downgradeConfig, d = (0, c.A)(u, T), m = null == l ? void 0 : l.downgradeOpt, v = (m || {}).reqParam, g = (void 0 === v ? {} : v).pageIndex, y = void 0 === g ? 0 : g, A = new f.A(d), this.mockService.isMockOpen(d.url, null === (t = (0, h.Jt)("launchQuery")) || void 0 === t ? void 0 : t.query) && (A = {
request: function (e) {
return new Promise((function (t) {
return S.mockService.hookRequest((function () {
return new f.A(d).request(e).then(t).catch(t)
}))((0, a.A)({
requestOptions: (0, a.A)((0, a.A)({}, d), {}, {
api: d.url
})
}, d), (function (e) {
t((0, p.vZ)(e, {}))
}))
}))
}
}), m && !(y > 1)) {
e.n = 8;
break
}
return e.a(2, A.request(n));
case 8:
return e.a(2, Promise.all([A.request(n).catch((function (e) {
return e
})), k()]).then((function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [],
t = (0, i.A)(e, 2),
n = t[0],
r = t[1],
o = (0, i.A)(n, 2),
c = o[0],
s = o[1];
return x((0, a.A)({
cmsData: (0, a.A)((0, a.A)({}, s), {}, {
retType: c ? 1 : 0
}),
configData: r
}, m))
})))
}
}), e, this, [
[1, 5]
])
})));
return function () {
return e.apply(this, arguments)
}
}()
}])
},
9892: function (e, t, n) {
var r = n(758);
t.A = function (e, t) {
var n = (0, r.useRef)(!1);
(0, r.useEffect)((function () {
n.current ? e() : n.current = !0
}), t)
}
},
9977: function (e, t, n) {
n.d(t, {
l: function () {
return a
},
w: function () {
return c
}
});
var r = n(2573),
i = n.n(r),
o = null;
function a(e, t) {
var n = t.showSelectCity,
r = void 0 === n || n,
a = t.saveCity,
c = void 0 === a || a;
o = e, i().navigateTo({
url: "/pages/city/index?showSelectCity=".concat(r || "", "&saveCity=").concat(c || ""),
success: function (e) {},
fail: function (e) {}
})
}
function c(e) {
setTimeout((function () {
i().navigateBack({
delta: 1
})
}), 0), "function" == typeof o && (o(e), o = null)
}
}
}
]);