jdpro/jd_wwmanor_merge.js

8 lines
182 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-12-08 15:13:39 +00:00
var deKKM1x,vvmazn,IRATjTe,oePJGgP,QPOcVgK,mpxbWlc,CWEOku,JKT5Kg,YhEcJ5,yNC58z9,mYis0dA,tnkPbI,K9GD5w;const ysrNpdZ=[0x0,null,0x20,0x2,0x1,0x100,0x6,0x3,0x8,0x10,0x4,"undefined","LZString",0xff,0x7,0xd,0xe,0xf,0x58,0x5b,0x226,0x80,0x7f,0xdf,0x1f,0x3f,0xef,0xc,0x22c,0x12,0x222,0x1fff,0x72,0x73,0x74,0x75,!0x1,0x76,0x77,0x78,0x79,0x7a,0x10b,0x149,0x7b,0xda,0x143,0x105,0xbb,0xe6,0x113,0x7c,0xf0,0x7d,0x144,0xe8,0x7e,0x81,0x82,0x83,0x84,0x85,0x13b,0xe5,0xf8,0xa6,0x118,0x5,0x10a,0xe1,0x107,0x8d,0x9,0x110,0xa,0x86,0x87,0x88,0x89,0x145,0x114,0x129,0x9d,0x14d,0x12f,0xa2,0xf4,0x8a,0x8b,0x8c,0x139,0x9f,0x127,0x132,0xaf,0x8e,0x151,0x8f,0x90,0xec,0xc2,0x9a,0x10c,0xfb,0xa9,0x92,0x91,0x93,0x102,0xc1,0xe2,0x103,0x94,0x95,0x96,0x97,0x98,0x99,0xaa,0x9b,0xca,0x137,0x9c,0x9e,0x125,0xa0,0xa1,0x13d,0xdc,0xa3,0xa4,0x123,0x11f,0xa5,"n",0x12e,0xb3,0xcc,0x121,0x122,0xa7," ",0xa8,0xf7,0xc0,0x14c,0xb6,0xdb,"UA",0x108,0x138,0x1f4,0xab,0x10e,0xce,0x104,0xac,0xc8,0xc3,0xea,0xad,"id",0x128,0xae,0xe7,0xb0,0xb1,0xb2,0x11b,0xf9,0x116,0xc5,0x120,0x136,0xd2,0x130,0xb4,0xb5,0xb7,0xcd,0x1e,0xb8,0x12a,0xb9,0xba,0x109,0xd9,0xbc,!0x0,void 0x0,0xbd,0xe4,0xbe,0xc6,0xbf,0x140,0x11d,"\u3011",0xc4,0x117,0xf2,0xd0,0x150,0xc7,0x13c,0xd5,0xc9,0xcb,0x10d,0xcf,0xd1,0x3ff,0x10000,0xd800,0xdc00,0xd3,0xe0,0xd4,0xd6,0xd7,0xd8,0xdd,0xde,0xe3,0xe9,0xeb,0x126,0xed,0xee,0x111,0xf1,0xf3,0xf5,0xf6,0x13a,0xfa,0xfc,0xfd,0xfe,0x101,0x131,0x19,0x7d0,0x106,0x200,0x10f,0xdbff,0xdfff,0xffff,0x18,0x16,0xb,0x11,0x13,0x1c,0x22,0x27,0x29,0x3d,0x40,0x13e,0x112,0x3e8,0x115,0x124,0x14b,0x148,0x119,0x11a,0x13f,0x14a,0x11c,0x11e,0x207,0x206,0x12b,0x135,0x12c,0x12d,0x133,0x134,0x141,0x142,0x146,0x147,0x14e,0x14f,0x152,0x153,0x154,0x155,0x156,0x157,0x158,0x159,0x15a,0x15b,0x15c,0x15d,0x15e,0x15f,0x160,0x161,0x162,0x163,0x164,0x165,0x166,0x167,0x168,0x169,0x16a,0x16b,0x16c,0x16d,0x16e,0x16f,0x170,0x171,0x172,0x173,0x174,0x175,0x176,0x177,0x178,0x179,0x17a,0x17b,0x17c,0x17d,0x17e,0x17f,0x180,0x181,0x182,0x183,0x184,0x185,0x186,0x187,0x188,0x189,0x18a,0x18b,0x18c,0x18d,0x18e,0x18f,0x190,0x191,0x192,0x193,0x194,0x195,0x196,0x197,0x198,0x199,0x19a,0x19b,0x19c,0x19d,0x19e,0x19f,0x1a0,0x1a1,0x1a2,0x1a3,0x1a4,0x1a5,0x1a6,0x1a7,0x1a8,0x1a9,0x1aa,0x1ab,0x1ac,0x1ad,0x1ae,0x1af,0x1b0,0x1b1,0x1b2,0x1b3,0x1b4,0x1b5,0x1b6,0x1b7,0x1b8,0x1b9,0x1ba,0x1bb,0x1bc,0x1bd,0x1be,0x1bf,0x1c0,0x1c1,0x1c2,0x1c3,0x1c4,0x1c5,0x1c6,0x1c7,0x1c8,0x1c9,0x1ca,0x1cb,0x1cc,0x1cd,0x1ce,0x1cf,0x1d0,0x1d1,0x1d2,0x1d3,0x1d4,"me",0x1d5,0x1d6,0x1d7,0x1d8,0x1d9,0x1da,0x1db,0x1dc,0x1dd,0x1de,0x1df,0x1e0,0x1e1,0x1e2,0x1e3,0x1e4,0x1e5,0x1e6,0x1e7,0x1e8,0x1e9,0x1ea,0x1eb,0x1ec,0x1ed,0x1ee,0x1ef,0x1f0,0x1f1,0x1f2,0x1f3,0x1f5,0x1f6,0x1f7,0x1f8,0x1f9,"y",0x1fa,0x1fb,0x1fc,0x1fd,0x1fe,0x1ff,0x201,0x202,0x203,0x204,0x205,0x208,0x209,0x20a,0x20b,0x20c,0x20d,0x20e,0x20f,0x210,0x211,0x212,0x213,0x214,0x215,0x216,0x217,0x218,0x219,0x21a,0x21b,0x21c,0x21d,0x21e,0x21f,0x220,0x221,0x223,0x224,0x225,0x227,0x228,0x229,0x22a,0x22b,0x22d,0x22e,0x22f,0x230,0x231,0x232,0x64,"s",0x248,0x249,0xfc00,0xffffff80,0xfffff800,0xffff0000,0xffe00000,"e",0x251,0x800,0x256,0x10ffff,0x25e,";",0x25a,0x25b,0x25c,0x25d,0x25f,"ua",0x26a,"&","\u4E07",0x2710,"\u4EBF","\u5343\u4EBF","\u5146","\u5343\u5146"];DKibSG(deKKM1x=function(){var vvmazn=String.fromCharCode,IRATjTe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",oePJGgP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",QPOcVgK={},mpxbWlc;function CWEOku(mpxbWlc,CWEOku){if(!QPOcVgK[mpxbWlc]){var JKT5Kg;QPOcVgK[mpxbWlc]={};for(JKT5Kg=ysrNpdZ[0x0];JKT5Kg<mpxbWlc.length;JKT5Kg++)QPOcVgK[mpxbWlc][mpxbWlc.charAt(JKT5Kg)]=JKT5Kg}return QPOcVgK[mpxbWlc][CWEOku]}mpxbWlc={compressToBase64:function(QPOcVgK){var CWEOku;if(ysrNpdZ[0x1]==QPOcVgK)return"";CWEOku=mpxbWlc._compress(QPOcVgK,ysrNpdZ[0x6],function(CWEOku){return IRATjTe.charAt(CWEOku)});switch(CWEOku.length%ysrNpdZ[0xa]){default:case ysrNpdZ[0x0]:return CWEOku;case ysrNpdZ[0x4]:return CWEOku+"===";case ysrNpdZ[0x3]:return CWEOku+"==";case ysrNpdZ[0x7]:return CWEOku+"="}},decompressFromBase64:function(QPOcVgK){return ysrNpdZ[0x1]==QPOcVgK?"":""
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) :