faker3/jd_healthy_task.js

12 lines
88 KiB
JavaScript
Raw Normal View History

2024-09-12 10:57:47 +08:00
/*
活动名称京东健康能量任务
cron:27 4,16 * * *
*/
const $ = new Env('京东健康能量任务')
function Kn4_2_(){}var ol3XGZ=Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'],dLWqJn,xZQ6k0,IauHni9,E_YBMpE,PRUarP,DJtG2rT,GJfmJT,yyoIvEz,_RvYjj1,ngX2TT6,HDFZtMd,jh8LUk_,D4mWDA,ncMq1oi;function F2CysgB(Kn4_2_){return dLWqJn[Kn4_2_<0xaa?Kn4_2_<0xaa?Kn4_2_<-0x3e?Kn4_2_+0x14:Kn4_2_<0xaa?Kn4_2_+0x3d:Kn4_2_+0x21:Kn4_2_-0x47:Kn4_2_-0x22]}dLWqJn=PFU8oj();function du_r8nm(Kn4_2_,ol3XGZ){return xZQ6k0(Kn4_2_,'\u006c\u0065\u006e\u0067\u0074\u0068',{value:ol3XGZ,configurable:!0x0})}Kn4_2_(xZQ6k0=Object.defineProperty,IauHni9=C_yXRV((Kn4_2_,ol3XGZ)=>{return ol3XGZ(Kn4_2_())},0x2)(Dhntma,nJxvOP));var QSYUBi=[],WeMAOG2=[TQC9HG(F2CysgB(-0x2d)),TQC9HG(F2CysgB(-0x2e)),TQC9HG(F2CysgB(-0x28)),TQC9HG(0x3),TQC9HG(F2CysgB(-0x13)),TQC9HG(0x5),TQC9HG(0x6),TQC9HG(F2CysgB(0x1)),TQC9HG(F2CysgB(-0x17)),TQC9HG(0x9),TQC9HG(0xa),TQC9HG(0xb),TQC9HG(0xc),TQC9HG(F2CysgB(-0x18)),';J8A1_h0!g#c|1%4AW20!{)|Is./oO_:T.}~I',TQC9HG(F2CysgB(-0x11)),TQC9HG(0xf),TQC9HG(0x10),TQC9HG(0x11),TQC9HG(0x12),TQC9HG(0x13),TQC9HG(F2CysgB(-0x8)),TQC9HG(F2CysgB(-0xc)),TQC9HG(F2CysgB(-0x6)),'oW_,|tfhY#UE+Y+c*D',TQC9HG(0x17),TQC9HG(F2CysgB(-0x5)),TQC9HG(F2CysgB(-0x37)),TQC9HG(0x1a),TQC9HG(0x1b),TQC9HG(0x1c),TQC9HG(0x1d),TQC9HG(0x1e),TQC9HG(0x1f),TQC9HG(0x20),TQC9HG(0x21),TQC9HG(0x22),TQC9HG(F2CysgB(-0x9)),TQC9HG(0x24),TQC9HG(F2CysgB(0x6)),TQC9HG(0x26),TQC9HG(0x27),TQC9HG(0x28),TQC9HG(0x29),TQC9HG(0x2a),TQC9HG(0x2b),TQC9HG(0x2c),TQC9HG(F2CysgB(0x15)),TQC9HG(0xf),TQC9HG(0x2e),TQC9HG(0x2f),TQC9HG(0x30),TQC9HG(F2CysgB(-0x3b)),TQC9HG(F2CysgB(-0x3d)),TQC9HG(F2CysgB(-0x3c)),TQC9HG(0x33),TQC9HG(0x34),TQC9HG(0xf),TQC9HG(F2CysgB(-0x3d)),TQC9HG(F2CysgB(-0x3c)),TQC9HG(0x35),TQC9HG(0x36),TQC9HG(0x37),F2CysgB(-0x35),TQC9HG(0x38),TQC9HG(0x39),TQC9HG(F2CysgB(0x18)),'|h"&n:*',TQC9HG(0x3b),'2Mfe3|?Un]"',TQC9HG(0x3c),TQC9HG(0x3d),TQC9HG(F2CysgB(0x0)),TQC9HG(F2CysgB(-0x3b)),TQC9HG(F2CysgB(-0x3a)),TQC9HG(0xf),TQC9HG(F2CysgB(-0x3a)),TQC9HG(0x36),TQC9HG(F2CysgB(0xe)),TQC9HG(0x38),TQC9HG(0x41),'b]D.I|(e>WHhd',TQC9HG(F2CysgB(0x19)),F2CysgB(-0x33),TQC9HG(F2CysgB(0x17)),TQC9HG(0x43),TQC9HG(0x44),TQC9HG(0x38),TQC9HG(0x45),TQC9HG(F2CysgB(-0x3b)),TQC9HG(F2CysgB(-0x2a)),TQC9HG(0x47),TQC9HG(0x2e),F2CysgB(-0x31),TQC9HG(0x19),TQC9HG(F2CysgB(-0x3b)),TQC9HG(F2CysgB(-0x38)),TQC9HG(F2CysgB(-0x3b)),TQC9HG(0xf),TQC9HG(0x48),TQC9HG(F2CysgB(-0x3d)),TQC9HG(F2CysgB(0x1d)),TQC9HG(F2CysgB(-0x39)),'S@w|[S0]lOiExs.+z4?i',TQC9HG(0x4b),TQC9HG(0x4c),TQC9HG(F2CysgB(0x20)),TQC9HG(F2CysgB(0x21)),TQC9HG(0x4f),TQC9HG(0x50),TQC9HG(F2CysgB(0x40)),TQC9HG(F2CysgB(-0x39)),TQC9HG(F2CysgB(-0x38)),TQC9HG(0x4a),TQC9HG(F2CysgB(-0x3b)),TQC9HG(F2CysgB(-0x36)),TQC9HG(0x53),TQC9HG(F2CysgB(-0x32)),TQC9HG(0x2f),TQC9HG(F2CysgB(0x23)),TQC9HG(0x55),TQC9HG(F2CysgB(-0xf)),TQC9HG(F2CysgB(-0x34)),'"C5U|~y,zbC8rvB',TQC9HG(0x57),TQC9HG(F2CysgB(-0x19)),TQC9HG(F2CysgB(0x30)),TQC9HG(0xf),TQC9HG(0x5a),TQC9HG(0x5b),TQC9HG(F2CysgB(-0x23)),TQC9HG(0x4a),TQC9HG(0x51),TQC9HG(0x5d),TQC9HG(0x5e),TQC9HG(0x5f),TQC9HG(0x29),TQC9HG(F2CysgB(-0x37)),TQC9HG(F2CysgB(-0x39)),TQC9HG(0xc),TQC9HG(0x58),TQC9HG(F2CysgB(-0x39)),TQC9HG(F2CysgB(-0x39)),TQC9HG(F2CysgB(-0x36)),F2CysgB(-0x35),TQC9HG(0x2f),'"C5U|~y,zbC8rvB','\x22\x43\x35\x55\x7c\x7e\x23\x7a',TQC9HG(F2CysgB(0x33)),TQC9HG(F2CysgB(-0x1f)),TQC9HG(0x4a),TQC9HG(0x62),TQC9HG(0x63),TQC9HG(F2CysgB(-0x39)),TQC9HG(0x51),TQC9HG(0x5d),TQC9HG(0x5e),TQC9HG(F2CysgB(-0x34)),TQC9HG(0x51),TQC9HG(0x4a),TQC9HG(0xc),TQC9HG(0x4a),TQC9HG(0xf),TQC9HG(F2CysgB(0x1c)),TQC9HG(F2CysgB(0x2)),F2CysgB(-0x33),TQC9HG(0x39),TQC9HG(0x3a),'|h"&n:*',TQC9HG(F2CysgB(0x2d)),TQC9HG(0x51),TQC9HG(F2CysgB(-0x39)),TQC9HG(0xc),TQC9HG(0x4a),TQC9HG(F2CysgB(-0x3b)),TQC9HG(0x52),TQC9HG(F2CysgB(0x34)),TQC9HG(F2CysgB(-0x3b)),TQC9HG(F2CysgB(-0x37)),TQC9HG(0x66),TQC9HG(F2CysgB(0x37)),TQC9HG(0x68),TQC9HG(0x69),'rAByV45F&+$GiMvwXgu+G^+,~+:q4=(w=O{us4f`wfM+5MPo?RS?Xh~,5a([an#og=D.tD|tr@Oq@wi:fhr~?l]@68s}fT,wNY9s&%*',TQC9HG(F2CysgB(-0x1e)),TQC9HG(F2CysgB(0x39)),TQC9HG(0x6c),'S_#$rrh#|]5s:Uwawqqn/w.pf]v"H}&v"]^R{^KJ',TQC9HG(0x6d),TQC9HG(F2CysgB(0x3b)),TQC9HG(0x6f),TQC9HG(F2CysgB(0x3c)),TQC9HG(0x71),TQC9HG(F2CysgB(0x3d)),TQC9HG(0x73),TQC9HG(F2CysgB(0x3e)),TQC9HG(0x
// prettier-ignore
function Env(t, e) { "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); class s { constructor(t) { this.env = t } send(t, e = "GET") { t = "string" == typeof t ? { url: t } : t; let s = this.get; return "POST" === e && (s = this.post), new Promise((e, i) => { s.call(this, t, (t, s, r) => { t ? i(t) : e(s) }) }) } get(t) { return this.send.call(this.env, t) } post(t) { return this.send.call(this.env, t, "POST") } } return new class { constructor(t, e) { this.name = t, this.http = new s(this), this.data = null, this.dataFile = "box.dat", this.logs = [], this.isMute = !1, this.isNeedRewrite = !1, this.logSeparator = "\n", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const i = this.getdata(t); if (i) try { s = JSON.parse(this.getdata(t)) } catch { } return s } setjson(t, e) { try { return this.setdata(JSON.stringify(t), e) } catch { return !1 } } getScript(t) { return new Promise(e => { this.get({ url: t }, (t, s, i) => e(i)) }) } runScript(t, e) { return new Promise(s => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r; const [o, h] = i.split("@"), n = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(n, (t, e, i) => s(i)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e); if (!s && !i) return {}; { const i = s ? t : e; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const i = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of i) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, e, s) { return Object(t) !== t ? t : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []), e.slice(0, -1).reduce((t, s, i) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[i + 1]) >> 0 == +e[i + 1] ? [] : {}, t)[e[e.length - 1]] = s, t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, i, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i), h = i ? "null" === o ? null : o || "{}" : "{}"; try { const e = JSON.parse(h); this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i) } catch (e) { const o = {}; this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i) } } else s = this.setval(t, e); return s } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? (this.data = this.loaddata(), this.data[t]) : this.data && this.d