jdpro/jd_wwmanor_merge.js

8 lines
110 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
/*
汪汪庄园
入口京东app-我的-汪汪庄园
7 7 7 7 * https://raw.githubusercontent.com/6dylan6/jdpro/main/jd_wwmanor_merge.js
*/
const $ = new Env('汪汪庄园合成');
2024-11-30 08:35:23 +00:00
function Zw2bpFr(){}var ItPGzz=Object['defineProperty'],m8XnJfM,IAgpml,CFDpLzE,BABFJxC,W5SssZ,Anoogk,UgpP6kU,dVCWYM,ofBh_n,qzQrQN,gef70uq,kOYUCX2,Dnyafk,VQzJAt,gfJF6f,Rrq81bj;function AZEmqL(Zw2bpFr){return m8XnJfM[Zw2bpFr<-0x51?Zw2bpFr+0x39:Zw2bpFr<0x85?Zw2bpFr<-0x51?Zw2bpFr+0x5c:Zw2bpFr<0x85?Zw2bpFr+0x50:Zw2bpFr-0x14:Zw2bpFr-0x5e]}m8XnJfM=uODbxSe();function sl4zeW(Zw2bpFr,ItPGzz){IAgpml(Zw2bpFr,AZEmqL(-0x50),{value:ItPGzz,configurable:!0x0});return Zw2bpFr}Zw2bpFr(IAgpml=Object.defineProperty,CFDpLzE=sl4zeW(hdRMuI((...ItPGzz)=>{Zw2bpFr(ItPGzz[AZEmqL(-0x50)]=0x2,ItPGzz[0x5d]=-0x80);return ItPGzz[0x5d]>ItPGzz[0x5d]+0x45?ItPGzz[-0x3]:ItPGzz[0x1](ItPGzz[ItPGzz[0x5d]+0x80]())}),0x2)(m8zCzbQ,B4rtV4_));var rmlDEX=[],d1tHKUc=[i9lLN1(0x0),i9lLN1(AZEmqL(-0x3c)),i9lLN1(0x2),i9lLN1(AZEmqL(-0x46)),i9lLN1(0x4),i9lLN1(0x3),i9lLN1(0x4),i9lLN1(0x5),i9lLN1(0x6),i9lLN1(0x7),i9lLN1(0x8),i9lLN1(0x9),i9lLN1(0xa),i9lLN1(0xb),i9lLN1(0xc),i9lLN1(0xd),i9lLN1(0x8),i9lLN1(0x9),i9lLN1(0xe),i9lLN1(0xd),i9lLN1(0xe),i9lLN1(AZEmqL(-0x43)),i9lLN1(0xf),'V"/|b;wb','f;:|q5/b',i9lLN1(AZEmqL(-0x1f)),i9lLN1(0x11),i9lLN1(0x12),i9lLN1(0x13),i9lLN1(0x14),i9lLN1(AZEmqL(0x3d)),i9lLN1(AZEmqL(-0x3d)),i9lLN1(0x17),'d+P753)=Tu5QmfNL!:z4CjWM,2`z|6quYV0_?gtI)~JLJ_IUCuf=r=t$=YfL=D1UBuon8RfB?|(6g??m][',i9lLN1(AZEmqL(0x46)),i9lLN1(AZEmqL(-0x30)),i9lLN1(0x1a),i9lLN1(AZEmqL(-0x21)),i9lLN1(AZEmqL(0x82)),i9lLN1(0x1d),'0IL`co{5$RA|}/A`;;lf{[[',i9lLN1(AZEmqL(-0xc)),i9lLN1(0x1f),i9lLN1(0x20),i9lLN1(0x21),i9lLN1(0x22),i9lLN1(0x23),i9lLN1(0x24),i9lLN1(0x25),i9lLN1(0x26),i9lLN1(0xa),i9lLN1(0x27),i9lLN1(AZEmqL(-0x22)),i9lLN1(0x29),i9lLN1(0x2a),i9lLN1(0x2b),i9lLN1(0x2c),'V"/|b;wb',i9lLN1(0x2d),i9lLN1(0x2e),i9lLN1(0x2f),i9lLN1(0x30),i9lLN1(AZEmqL(0x15)),i9lLN1(0x30),i9lLN1(0x32),i9lLN1(0xa),i9lLN1(0x33),i9lLN1(0x11),i9lLN1(0x34),i9lLN1(0x35),i9lLN1(0x1f),i9lLN1(0x20),i9lLN1(0x21),i9lLN1(0x19),i9lLN1(0x36),i9lLN1(0x37),i9lLN1(0x38),i9lLN1(AZEmqL(-0x4f)),i9lLN1(0x39),i9lLN1(0x3a),i9lLN1(AZEmqL(-0x49)),i9lLN1(0x34),i9lLN1(0x3c),i9lLN1(0x3d),i9lLN1(0x3e),i9lLN1(0x3f),i9lLN1(0x40),i9lLN1(0x3a),i9lLN1(0xe),i9lLN1(AZEmqL(-0x17)),i9lLN1(0x42),i9lLN1(0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mqL(-0x7)),i9lLN1(0x63),i9lLN1(AZEmqL(-0x4f)),i9lLN1(0x64),i9lLN1(0x65),i9lLN1(0x5a),i9lLN1(0x22),i9lLN1(0x66),i9lLN1(0x61),i9lLN1(0x67),i9lLN1(0x68),i9lLN1(AZEmqL(-0x4b)),i9lLN1(0x69),i9lLN1(0x6a),i9lLN1(0x6b),i9lLN1(0x6c),i9lLN1(0x6d),i9lLN1(0x6e),i9lLN1(0x6f),i9lLN1(0x70),i9lLN1(0x71),'9c.[bwz{lSS7$Omhe+qX|ZaG',i9lLN1(0x72),i9lLN1(0x73),i9lLN1(0xa),i9lLN1(0x33),i9lLN1(0x74),i9lLN1(0x75),i9lLN1(AZEmqL(-0x8)),i9lLN1(AZEmqL(-0x4a)),i9lLN1(0x78),i9lLN1(0x1f),i9lLN1(AZEmqL(-0x48)),i9lLN1(0x7a),i9lLN1(0x7b),i9lLN1(AZEmqL(0x24)),'^V:|J',i9lLN1(0x5b),i9lLN1(0x7d),i9lLN1(0x7e),i9lLN1(AZEmqL(-0x4a)),i9lLN1(AZEmqL(-0x40)),'DV:|r53uF~Qx[',i9lLN1(AZEmqL(0x45)),i9lLN1(AZEmqL(-0x45)),i9lLN1(0x82),'/0ljIa,]|]V/UH',i9lLN1(0x83),i9lLN1(0x84),i9lLN1(0x85),i9lLN1(0x86),i9lLN1(AZEmqL(-0xe)),'^!c|B#,z]',i9lLN1(0x88),i9lLN1(0x74),i9lLN1(0x89),i9lLN1(0x77),i9lLN1(
2024-06-28 07:47:44 +00:00
function Env(t, e) { 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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) :