This commit is contained in:
2024 committed 2026-01-20 17:26:54 +08:00
1 parent b05884a596
commit 133ae840a1
3 files changed
+8 -8

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
/*
cron: 1 1 1 1 *
*/
const $ = new Env('新奇投票');
var Xe5ZqtL,mENzj0K,eueHAvC,zAbDrI,CRwBUdF,ahoXYDI,oUR92gM,J5kMa6,iSLmjHG,M5RttvT,j3s8Kq,A3sArLJ,d_lOx7P;function uZRJG6(mENzj0K,eueHAvC,zAbDrI){for(zAbDrI=0x0;zAbDrI<eueHAvC;zAbDrI++)mENzj0K.push(mENzj0K.shift());return mENzj0K}const REl_iY=uZRJG6([0x217,0x0,null,0x20,0x2,0x1,0x100,0x6,0x3,0x8,0x10,0x4,"undefined","LZString",0xff,0x7,0xd,0xe,0xf,0x58,0x5b,0x1ea,0x80,0x7f,0xdf,0x1f,0x3f,0xef,0xc,0x1f0,0x12,0x1e6,0x1fff,0x75,0x76,0x77,0x78,0x79,0x7a,0x7b,0x14,0x7c,0x7d,0x7e,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0xa,0x3ff,0x10000,0xd800,0xdc00,0x9a,0x9b,0xc0,0xe0,0xf0,0x9c,0x9d,0x9e,!0x1,0x9f,0xa0,0xf8,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,"="," ",0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0xbe,0xbf,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,0xdc,0xdd,0xde,0xe1,0xe2,0xe3,"UA",0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xf1,"\u8D26\u53F7",0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0x101,0x102,0x103,0x104,0x105,0x106,0x107,0x108,0x109,0x10a,0x10b,0x10c,0x10d,0x10e,0x10f,0x110,0x111,0x3e8,0x112,0x113,0x114,0x115,0x116,0x117,";",0x118,0x119,0x11a,0x11b,0x11c,0x11d,0x11e,0x11f,0x120,0x121,0x122,0x123,0x124,0x125,0x126,0x127,0x128,0x129,0x12a,0x12b,0x12c,0x12d,0x12e,0x12f,0x130,0x131,0x132,0x133,0x134,0x135,0x136,0x137,0x138,0x139,0x52d7,0x13a,0x13b,0x13c,0x13d,0x13e,"3",0x13f,0x140,0x141,0x142,0x143,0x144,0x145,0x146,0x147,0x148,0x149,0x14a,0x14b,0x14c,0x14d,0x14e,0x14f,0x150,0x151,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,0x7d0,0x173,!0x0,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,0x1d5,0x1d6,0x1d7,0x1d8,0x1d9,0x1da,0x1db,0x1dc,0x1dd,0x1de,0x1df,0x1e0,0x1e1,0x1e2,0x1e3,0x1e4,0x1e5,0x1e7,0x1e8,"\u706B\u7206",0x1e9,0x1eb,0x1ec,0x1ed,0x1ee,0x1ef,0x1f1,0x1f2,0x1f3,0x1f4,0x1f5,0x1f6,0x7530,0x28,0x20b,0x20c,0x13,0x214,0x18,0x3c,0x221,0x207,0x215],0x1);oaiU20e(Xe5ZqtL=function(){var mENzj0K=String.fromCharCode,eueHAvC="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",zAbDrI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",CRwBUdF={},ahoXYDI;function oUR92gM(ahoXYDI,oUR92gM){if(!CRwBUdF[ahoXYDI]){var J5kMa6;CRwBUdF[ahoXYDI]={};for(J5kMa6=REl_iY[0x0];J5kMa6<ahoXYDI.length;J5kMa6++)CRwBUdF[ahoXYDI][ahoXYDI.charAt(J5kMa6)]=J5kMa6}return CRwBUdF[ahoXYDI][oUR92gM]}ahoXYDI={compressToBase64:function(CRwBUdF){var oUR92gM;if(REl_iY[0x1]==CRwBUdF)return"";oUR92gM=ahoXYDI._compress(CRwBUdF,REl_iY[0x6],function(oUR92gM){return eueHAvC.charAt(oUR92gM)});switch(oUR92gM.length%REl_iY[0xa]){default:case REl_iY[0x0]:return oUR92gM;case REl_iY[0x4]:return oUR92gM+"===";case REl_iY[0x3]:return oUR92gM+"==";case REl_iY[0x7]:return oUR92gM+REl_iY[0x69]}},decompressFromBase64:function(CRwBUdF){return REl_iY[0x1]==CRwBUdF?"":""==CRwBUdF?REl_iY[0x1]:ahoXYDI._decompress(CRwBUdF.length,REl_iY[0x2],function(ahoXYDI){return oUR92gM(eueHAvC,CRwBUdF.charAt(ahoXYDI))})},compressToUTF16:function(zAbDrI){return REl_iY[0x1]==zAbDrI?"":ahoXYDI._compress(zAbDrI,REl_iY[0x11],function(CRwBUdF){return mENzj0K(CRwBUdF+REl_iY[0x2])})+REl_iY[0x6a]},decompressFromUTF16:function(zAbDrI){return REl_iY[0x1]==zAbDrI?"":""==zAbDrI?REl_iY[0x1]:ahoXYDI._decompress(zAbDrI.length,0x4000,function(CRwBUdF){return zAbDrI.charCodeAt(CRwBUdF)-REl_iY[0x2]})},compressToUint8Array:function(J5kMa6){for(var iSLmjHG=ahoXYDI.compress(J5kMa6),M5RttvT=new Uint8Array(REl_iY[0x3]*iSLmjHG.length),j3s8Kq=REl_iY[0x0],A3sArLJ=iSLmjHG.length;j3s8Kq<A3sArLJ;j3s8Kq++){var d_lOx7P=iSLmjHG.charCodeAt(j3s8Kq);oaiU20e(M5RttvT[REl_iY[0x3]*j3s8Kq]=d_lOx7P>>>REl_iY[0x8],M5RttvT[REl_iY[0x3]*j3s8Kq+REl_iY[0x4]]=d_lOx7P%REl_iY[0x5])}return M5RttvT},decompressFromUint8Array:function(J5kMa6){var iSLmjHG;if(REl_iY[0x1]==J5kMa6)return ahoXYDI.decompress(J5kMa6);for(var M5RttvT=new Array(J5kMa6.length/REl_iY[0x3]),j3s8Kq=REl_iY[0x0],A3sArLJ=M5RttvT.length;j3s8Kq<A3sArLJ;j3s8Kq++)M5RttvT[j3s8Kq]=REl_iY[0x5]*J5kMa6[REl_iY[0x3]*j3s8Kq]+J5kMa6[REl_iY[0x3]*j3s8Kq+REl_iY[0x4]];iSLmjHG=[];return M5RttvT.forEach(function(M5RttvT){iSLmjHG.push(mENzj0K(M5RttvT))}),ahoXYDI.decompress(iSLmjHG.join(""))},compressToEncodedURIComponent:fLine truncated
function Env(o, t) { 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((r, i) => { s.call(this, t, (t, e, s) => { t ? i(t) : r(e) }) }) } 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.logLevels = { debug: 0, info: 1, warn: 2, error: 3 }, this.logLevelPrefixs = { debug: "[DEBUG] ", info: "[INFO] ", warn: "[WARN] ", error: "[ERROR] " }, this.logLevel = "info", 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.encoding = "utf-8", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } getEnv() { return "undefined" != typeof $environment && $environment["surge-version"] ? "Surge" : "undefined" != typeof $environment && $environment["stash-version"] ? "Stash" : "undefined" != typeof module && module.exports ? "Node.js" : "undefined" != typeof $task ? "Quantumult X" : "undefined" != typeof $loon ? "Loon" : "undefined" != typeof $rocket ? "Shadowrocket" : void 0 } isNode() { return "Node.js" === this.getEnv() } isQuanX() { return "Quantumult X" === this.getEnv() } isSurge() { return "Surge" === this.getEnv() } isLoon() { return "Loon" === this.getEnv() } isShadowrocket() { return "Shadowrocket" === this.getEnv() } isStash() { return "Stash" === this.getEnv() } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null, ...s) { try { return JSON.stringify(t, ...s) } catch { return e } } getjson(t, e) { let s = e; if (this.getdata(t)) 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(r => { this.get({ url: t }, (t, e, s) => r(s)) }) } runScript(a, o) { return new Promise(r => { let t = this.getdata("@chavy_boxjs_userCfgs.httpapi"); t = t && t.replace(/\n/g, "").trim(); var e = (e = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout")) ? +e : 20, [s, i] = (e = o && o.timeout ? o.timeout : e, t.split("@")); this.post({ url: `http://${i}/v1/scripting/evaluate`, body: { script_text: a, mock_type: "cron", timeout: e }, headers: { "X-Key": s, Accept: "*/*" }, timeout: e }, (t, e, s) => r(s)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; this.fs = this.fs || require("fs"), this.path = this.path || require("path"); var t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), r = !s && this.fs.existsSync(e); if (!s && !r) return {}; r = s ? t : e; try { return JSON.parse(this.fs.readFileSync(r)) } catch (t) { return {} } } writedata() { var t, e, s, r, i; this.isNode() && (this.fs = this.fs || require("fs"), this.path = this.path || require("path"), t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), r = !(s = this.fs.existsSync(t)) && this.fs.existsSync(e), i = JSON.stringify(this.data), !s && r ? this.fs.writeFileSync(e, i) : this.fs.writeFileSync(t, i)) } lodash_get(t, e, s) { let r = t; for (const t of e.replace(/\[(\d+)\]/g, ".$1").split(".")) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, r, e) { return Object(t) === t && ((r = Array.isArray(r) ? r : r.toString().match(/[^.[\]]+/g) || []).slice(0, -1).reduce((t, e, s) => Object(t[e]) === t[e] ? t[e] : t[e] = Math.abs(r[s + 1]) >> 0 == +r[s + 1] ? [] : {}, t)[r[r.length - 1]] = e), t } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { var [, s, r] = /^@(.*?)\.(.*?)$/.exec(t); if (s = s ? this.getval(s) : "") try { const t = JSON.parse(s); e = t ? this.lodash_get(t, r, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { var [, r, i] = /^@(.*?)\.(.*?)$/.exec(e), a = this.getval(r), a = r ? "null" === a ? null : a || "{}" : "{}"; try { const e = JSON.parse(a); this.lodash_set(e, i, t), s = this.setval(JSON.stringify(e), r) } catch (e) { this.lodash_set(a = {}, i, t), s = this.setval(JSON.stringify(a), r) } } else s = this.setval(t, e); return s } getval(t) { switch (this.getEnv()) { case "Surge": case "Loon": case "Stash": case "Shadowrocket": return $persistentStore.read(t); case "Quantumult X": return $prefs.valueForKey(t); case "Node.js": return this.data = this.loaddata(), this.data[t]; default: return this.data && this.data[t] || null } } setval(t, e) { switch (this.getEnv()) { case "Surge": case "Loon": case "Stash": case "Shadowrocket": return $persistentStore.write(t, e); case "Quantumult X": return $prefs.setValueForKey(t, e); case "Node.js": return this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0; default: return this.data && this.data[e] || null } } initGotEnv(t) { this.got = this.got || rLine truncated
-7
View File
@@ -1,7 +0,0 @@
/*
cron: 1 1 1 1 *
*/
const $ = new Env('新奇投票');
var dQeR2x,doAYo35,DT5a78z,QqdFwgX,UxiHiY,nu9MN7,k7ppcl,Clmt5nf,pvuo3b,XXMqEdr,O_b3GY3,Lj0sD5,QUESus;function KCYzOY9(doAYo35,DT5a78z,QqdFwgX){for(QqdFwgX=0x0;QqdFwgX<DT5a78z;QqdFwgX++)doAYo35.push(doAYo35.shift());return doAYo35}const rdDuvoF=KCYzOY9([0x1fd,0x1fe,0x28,0x1ff,0x201,0x202,0x203,0x204,0x205,0x207,0x208,0x209,0x20a,0x20b,0x20c,0x13,0x213,0x7530,0x32,"19",0x214,0x231,0x216,0x18,0x3c,"=",0x0,null,0x20,0x2,0x1,0x100,0x6,0x3,0x8,0x10,0x4,"undefined","LZString",0xff,0x7,0xd,0xe,0xf,0x58,0x5b,0x200,0x80,0x7f,0xdf,0x1f,0x3f,0xef,0xc,0x206,0x12,0x1fc,0x1fff,0x78,0x79,0x7a,0x7b,0x7c,0x7d,0x7e,0x14,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a,0x9b,0x9c,0x9d,0x9e,0x9f,0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0xbe,0xbf,0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,!0x1,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,"UA",0xd7,0xd8,0xd9,0xda,0xdb," ",0xdc,0xdd,0xde,0xe0,0xe1,0xe2,0xe3,"\u8D26\u53F7",0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xa,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0x3e8,0x101,0x102,0x103,0x104,0x105,0x106,0x107,0x108,0x109,0x10a,0x10b,0x10c,0x10d,0x10e,0x10f,0x110,0x111,0x112,0x113,0x114,0x115,0x116,0x117,0x118,0x119,0x11a,0x11b,0x11c,0x11d,0x11e,0x11f,0x120,0x121,0x122,0x123,"id",0x124,0x125,0x126,0x127,0x128,0x129,"3",0x12a,0x12b,0x12c,0x12d,0x12e,0x12f,0x130,0x131,0x132,0x133,0x134,0x135,0x136,0x137,0x138,0x139,0x13a,0x13b,0x13c,0x13d,0x13e,0x13f,0x140,";",0x141,0x142,0x143,0x144,0x145,0x146,0x147,0x148,0x149,0x14a,0x14b,0x14c,0x14d,0x14e,0x14f,0x150,0x151,0x152,0x153,0x154,0x155,0x156,0x157,0x158,0x159,0x15a,0x7d0,0x15b,0x15c,0x15d,0x15e,0x15f,0x160,0x161,0x162,0x163,0x164,!0x0,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,0x1d5,0x1d6,0x1d7,0x1d8,0x1d9,0x1da,0x1db,0x1dc,0x1dd,0x1de,0x1df,0x1e0,0x1e1,0x1e2,0x1e3,0x1e4,0x1e5,0x1e6,"\u706B\u7206",0x1e7,0x1e8,0x1e9,0x1ea,0x1eb,0x1ec,0x1ed,0x1ee,0x1ef,0x1f0,0x1f1,0x1f2,0x1f3,0x1f4,0x1f5,0x1f6,0x1f7,0x1f8,0x1f9,0x1fa,0x1fb],0x1a);HTSoXKN(dQeR2x=function(){var doAYo35=String.fromCharCode,DT5a78z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",QqdFwgX="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",UxiHiY={},nu9MN7;function k7ppcl(nu9MN7,k7ppcl){if(!UxiHiY[nu9MN7]){var Clmt5nf;UxiHiY[nu9MN7]={};for(Clmt5nf=rdDuvoF[0x0];Clmt5nf<nu9MN7.length;Clmt5nf++)UxiHiY[nu9MN7][nu9MN7.charAt(Clmt5nf)]=Clmt5nf}return UxiHiY[nu9MN7][k7ppcl]}nu9MN7={compressToBase64:function(UxiHiY){var k7ppcl;if(rdDuvoF[0x1]==UxiHiY)return"";k7ppcl=nu9MN7._compress(UxiHiY,rdDuvoF[0x6],function(k7ppcl){return DT5a78z.charAt(k7ppcl)});switch(k7ppcl.length%rdDuvoF[0xa]){default:case rdDuvoF[0x0]:return k7ppcl;case rdDuvoF[0x4]:return k7ppcl+"===";case rdDuvoF[0x3]:return k7ppcl+"==";case rdDuvoF[0x7]:return k7ppcl+rdDuvoF[0x1c4]}},decompressFromBase64:function(UxiHiY){return rdDuvoF[0x1]==UxiHiY?"":""==UxiHiY?rdDuvoF[0x1]:nu9MN7._decompress(UxiHiY.length,rdDuvoF[0x2],function(nu9MN7){return k7ppcl(DT5a78z,UxiHiY.charAt(nu9MN7))})},compressToUTF16:function(QqdFwgX){return rdDuvoF[0x1]==QqdFwgX?"":nu9MN7._compress(QqdFwgX,rdDuvoF[0x11],function(UxiHiY){return doAYo35(UxiHiY+rdDuvoF[0x2])})+rdDuvoF[0x85]},decompressFromUTF16:function(QqdFwgX){return rdDuvoF[0x1]==QqdFwgX?"":""==QqdFwgX?rdDuvoF[0x1]:nu9MN7._decompress(QqdFwgX.length,0x4000,function(UxiHiY){return QqdFwgX.charCodeAt(UxiHiY)-rdDuvoF[0x2]})},compressToUint8Array:function(Clmt5nf){for(var pvuo3b=nu9MN7.compress(Clmt5nf),XXMqEdr=new Uint8Array(rdDuvoF[0x3]*pvuo3b.length),O_b3GY3=rdDuvoF[0x0],Lj0sD5=pvuo3b.length;O_b3GY3<Lj0sD5;O_b3GY3++){var QUESus=pvuo3b.charCodeAt(O_b3GY3);HTSoXKN(XXMqEdr[rdDuvoF[0x3]*O_b3GY3]=QUESus>>>rdDuvoF[0x8],XXMqEdr[rdDuvoF[0x3]*O_b3GY3+rdDuvoF[0x4]]=QUESus%rdDuvoF[0x5])}return XXMqEdr},decompressFromUint8Array:function(Clmt5nf){var pvuo3b;if(rdDuvoF[0x1]==Clmt5nf)return nu9MN7.decompress(Clmt5nf);for(var XXMqEdr=new Array(Clmt5nf.length/rdDuvoF[0x3]),O_b3GY3=rdDuvoF[0x0],Lj0sD5=XXMqEdr.length;O_b3GY3<Lj0sD5;O_b3GY3++)XXMqEdr[O_b3GY3]=rdDuvoF[0x5]*Clmt5nf[rdDuvoF[0x3]*O_b3GY3]+Clmt5nf[rdDuvoF[0x3]*O_b3GY3+rdDuvoF[0x4]];pvuo3b=[];return XXMqEdr.forEach(function(XXMqEdr){pvuo3b.pushLine truncated
function Env(o, t) { 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((r, i) => { s.call(this, t, (t, e, s) => { t ? i(t) : r(e) }) }) } 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.logLevels = { debug: 0, info: 1, warn: 2, error: 3 }, this.logLevelPrefixs = { debug: "[DEBUG] ", info: "[INFO] ", warn: "[WARN] ", error: "[ERROR] " }, this.logLevel = "info", 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.encoding = "utf-8", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } getEnv() { return "undefined" != typeof $environment && $environment["surge-version"] ? "Surge" : "undefined" != typeof $environment && $environment["stash-version"] ? "Stash" : "undefined" != typeof module && module.exports ? "Node.js" : "undefined" != typeof $task ? "Quantumult X" : "undefined" != typeof $loon ? "Loon" : "undefined" != typeof $rocket ? "Shadowrocket" : void 0 } isNode() { return "Node.js" === this.getEnv() } isQuanX() { return "Quantumult X" === this.getEnv() } isSurge() { return "Surge" === this.getEnv() } isLoon() { return "Loon" === this.getEnv() } isShadowrocket() { return "Shadowrocket" === this.getEnv() } isStash() { return "Stash" === this.getEnv() } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null, ...s) { try { return JSON.stringify(t, ...s) } catch { return e } } getjson(t, e) { let s = e; if (this.getdata(t)) 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(r => { this.get({ url: t }, (t, e, s) => r(s)) }) } runScript(a, o) { return new Promise(r => { let t = this.getdata("@chavy_boxjs_userCfgs.httpapi"); t = t && t.replace(/\n/g, "").trim(); var e = (e = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout")) ? +e : 20, [s, i] = (e = o && o.timeout ? o.timeout : e, t.split("@")); this.post({ url: `http://${i}/v1/scripting/evaluate`, body: { script_text: a, mock_type: "cron", timeout: e }, headers: { "X-Key": s, Accept: "*/*" }, timeout: e }, (t, e, s) => r(s)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; this.fs = this.fs || require("fs"), this.path = this.path || require("path"); var t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), r = !s && this.fs.existsSync(e); if (!s && !r) return {}; r = s ? t : e; try { return JSON.parse(this.fs.readFileSync(r)) } catch (t) { return {} } } writedata() { var t, e, s, r, i; this.isNode() && (this.fs = this.fs || require("fs"), this.path = this.path || require("path"), t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), r = !(s = this.fs.existsSync(t)) && this.fs.existsSync(e), i = JSON.stringify(this.data), !s && r ? this.fs.writeFileSync(e, i) : this.fs.writeFileSync(t, i)) } lodash_get(t, e, s) { let r = t; for (const t of e.replace(/\[(\d+)\]/g, ".$1").split(".")) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, r, e) { return Object(t) === t && ((r = Array.isArray(r) ? r : r.toString().match(/[^.[\]]+/g) || []).slice(0, -1).reduce((t, e, s) => Object(t[e]) === t[e] ? t[e] : t[e] = Math.abs(r[s + 1]) >> 0 == +r[s + 1] ? [] : {}, t)[r[r.length - 1]] = e), t } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { var [, s, r] = /^@(.*?)\.(.*?)$/.exec(t); if (s = s ? this.getval(s) : "") try { const t = JSON.parse(s); e = t ? this.lodash_get(t, r, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { var [, r, i] = /^@(.*?)\.(.*?)$/.exec(e), a = this.getval(r), a = r ? "null" === a ? null : a || "{}" : "{}"; try { const e = JSON.parse(a); this.lodash_set(e, i, t), s = this.setval(JSON.stringify(e), r) } catch (e) { this.lodash_set(a = {}, i, t), s = this.setval(JSON.stringify(a), r) } } else s = this.setval(t, e); return s } getval(t) { switch (this.getEnv()) { case "Surge": case "Loon": case "Stash": case "Shadowrocket": return $persistentStore.read(t); case "Quantumult X": return $prefs.valueForKey(t); case "Node.js": return this.data = this.loaddata(), this.data[t]; default: return this.data && this.data[t] || null } } setval(t, e) { switch (this.getEnv()) { case "Surge": case "Loon": case "Stash": case "Shadowrocket": return $persistentStore.write(t, e); case "Quantumult X": return $prefs.setValueForKey(t, e); case "Node.js": return this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0; default: return this.data && this.data[e] || null } } initGotEnv(t) { this.got = this.got || rLine truncated
+1 -1
View File
@@ -4,5 +4,5 @@
*/
const $ = new Env('种豆得豆任务');
var bXFVRz2,LyhWV3,n56rlr,c3UIqp,P7tQiUR,mlVFlh,oVE7aH,wng0Gv,AAYyraT,xovbVa9,do6haf7,QotXUe,uv7kUkD;const vXd6Rh=[0x0,null,0x20,0x2,0x1,0x100,0x6,0x3,0x8,0x10,0x4,"undefined","LZString",0xff,0x7,0xd,0xe,0xf,0x58,0x5b,0x2cc,0x80,0x7f,0xdf,0x1f,0x3f,0xef,0xc,0x2d2,0x12,0x2c8,0x1fff,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x7b,0x7c,0x7d,0x7e,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,!0x0,0x99,0x9a,0x9b,0x9c,0x9d,0x9e,0x9f,0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0xbe,0xbf,0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,!0x1,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,"UA",0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7," ",0xd8,0xd9,0xda,0xdb,0xdc,0xdd,0xde,"\u8D26\u53F7",0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xa,0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0x1f4,0xfa,0xfb,0xfc,0xfd,0xfe,0x101,0x102,0x103,0x104,0x105,0x106,0x107,0x108,0x109,0x10a,0x10b,0x10c,0x10d,0x10e,0x10f,0x110,0x111,0x112,0x113,0x114,0x115,0x116,0x117,0x118,0x119,0x11a,0x11b,0x11c,0x11d,0x11e,0x11f,0x120,0x121,"\n",0x122,0x123,0x124,0x125,0x126,0x127,0x128,0x129,0x12a,0x12b,0x12c,0x12d,0x12e,0x12f,0x130,0x131,0x132,0x133,0x134,0x135,0x136,0x137,0x138,0x139,0x13a,0x13b,0x13c,0x13d,0x13e,0x13f,0x140,0x141,0x142,"4",0x143,0x144,"5",0x145,0x146,0x147,0x148,"0",0x149,0x14a,0x14b,0x14c,0x14d,0x14e,0x14f,0x150,0x151,0x152,0x153,0x154,0x155,0x156,0x157,0x158,0x159,0x15a,0x18,0x3c,0x3e8,0x15b,"=",0x15c,0x15d,0x15e,"\u4E2A\n",0x15f,0x160,0x161,0x162,0x163,0x164,0x165,0x166,0x167,0x168,0x169,0x16a,0x16b,0x16c,0x16d,"2",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,0x14,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,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,"id",0x1f7,0x1f8,0x1f9,0x1fa,0x1fb,0x1fc,0x1fd,0x1fe,0x1ff,0x200,0x201,0x202,0x203,0x204,0x205,0x206,0x207,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,0x222,0x223,0x224,0x225,0x226,0x227,0x228,0x229,0x22a,0x22b,0x22c,0x22d,0x22e,0x22f,0x230,0x231,0x232,0x233,0x234,0x235,0x236,0x237,0x238,0x239,0x23a,0x23b,0x23c,0x23d,0x23e,0x23f,0x240,0x241,0x242,0x243,0x244,0x245,0x246,0x247,0x248,";",0x249,0x24a,0x24b,0x24c,0x24d,0x24e,0x24f,0x250,0x251,0x252,0x253,0x254,0x255,0x256,0x257,0x258,0x259,0x25a,0x25b,0x25c,0x25d,0x25e,0x25f,0x260,0x261,0x262,0x263,0x264,0x265,0x266,0x267,0x268,0x269,0x26a,0x26b,0x26c,0x26d,0x26e,0x26f,0x270,0x271,0x272,0x273,0x274,0x275,0x276,0x277,0x278,0x279,0x27a,0x27b,0x27c,0x27d,0x27e,0x27f,0x280,0x281,0x282,0x283,0x284,0x285,0x286,0x287,0x288,0x289,0x28a,0x28b,0x28c,0x28d,0x28e,0x28f,0x290,0x291,0x292,0x293,0x294,0x295,0x296,0x297,0x298,0x299,0x29a,0x29b,0x29c,0x29d,0x29e,0x11,0x29f,0x2a0,0x2a1,0x2a2,0x2a3,0x2a4,0x2a5,0x2a6,0x2a7,0x2a8,0x2a9,0x2aa,0x2ab,0x2ac,0x2ad,0x2ae,0x2af,0x2b0,0x2b1,0x2b2,0x2b3,0x2b4,0x2b5,0x2b6,0x2b7,0x2b8,0x2b9,0x2ba,0x2bb,0x2bc,0x2bd,0x2be,0x2bf,0x2c0,0x2c1,0x2c2,0x2c3,0x2c4,0x2c5,0x2c6,0x2c7,0x2c9,0x2ca,0x2cb,0x2cd,0x2ce,0x2cf,0x2d0,0x2d1,0x2d3,0x2d4,0x2d5,0x2d6,0x2d7,0x2d8,0x2db,0x2e0,0x2e4,0x2d9,0x2e6,0x2ea,void 0x0,0x2e5,0x2f0,0x5265c00,0x1b77400,0x2f2,0x2f5,0x300,0x2f6,0x303,0x304,0x2f4,0x311,0x30b,0x30c,0x317,0x31d,0x31c,"ua",0x30e,0x30f,0x312,0x313,0x314,0x315,0x316,0x319,0x7530,0x31b,0x31e,0x31f,0x320,0x321,0x322,0x323,0x324,0x325,0x326,0x327,0x328,0x32a,0x2710,"1",0x334,0x32c,0x4e20,0x2f8,0x30,0x5,0x318];ShPuY7I(bXFVRz2=function(){var LyhWV3=String.fromCharCode,n56rlr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c3UIqp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",P7tQiUR={},mlVFlh;function oVE7aH(mlVFlh,oVE7aH){if(!P7tQiUR[mlVFlh]){var wng0Gv;P7tQiUR[mlVFlh]={};for(wng0Gv=vXd6Rh[0x0];wng0Gv<mlVFlh.length;wng0Gv++)P7tQiUR[mlVFlh][mlVFlh.charAt(wng0Gv)]=wng0Gv}return P7tQiUR[mlVFlh][oVE7aH]}mlVFlh={compressToBase64:function(P7tQiUR){var oVE7aH;if(vXd6Rh[0x1]==P7tQiUR)return"";oVE7aH=mlVFlh._compress(P7tQiUR,vXd6Rh[0x6],function(oVE7aH){return n56rlr.charAt(oVE7aH)});switch(oVE7aH.length%vXd6Rh[0xa]){default:case vXd6Rh[0x0]:return oVE7aH;caseLine truncated
var UvMwKB,F_smt42,CnsHBd,BV5iNO,al0dRRE,AFM0l_,jYO3Lw,D8A1VVi,BZA1u2,aZ5xbN,ypFNsJ,RKO0EeQ,s7EZLgM;const KWKJv4=[0x0,null,0x20,0x2,0x1,0x100,0x6,0x3,0x8,0x10,0x4,"undefined","LZString",0xff,0x7,0xd,0xe,0xf,0x58,0x5b,0x298,0x80,0x7f,0xdf,0x1f,0x3f,0xef,0xc,0x29e,0x12,0x294,0x1fff,0x63,0x64,0x65,0x2000000,0x4000000,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x7b,0x7c,0x7d,0x7e,0x81,0x82,0x83,0x84,void 0x0,!0x1,!0x0,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x30,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x5,0x9a,0x9b,0x9c,0x9d,0x9e,0x9f,0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0x18,0x3c,0xa8,"=",0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0xbe,0xbf,0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,0xdc,0xdd,0xde,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,"UA",0xea,0xeb,0xec,0xed,0xee,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5," ",0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,"\u8D26\u53F7",0xfe,0x101,0x102,0x103,0x104,0x105,0x3e8,0xa,0x106,0x107,0x108,0x109,0x10a,0x10b,0x10c,0x10d,0x10e,0x10f,0x110,0x111,0x112,0x113,0x114,0x115,0x116,0x117,0x1f4,0x118,0x119,0x11a,0x11b,0x11c,0x11d,0x11e,0x11f,0x120,0x121,0x122,0x123,0x124,0x125,0x126,0x127,0x128,"0",0x129,0x12a,0x12b,0x12c,0x12d,0x12e,0x12f,0x130,0x131,0x132,0x133,0x134,0x135,0x136,0x137,0x138,0x139,0x13a,0x13b,0x13c,0x13d,0x13e,"\n",0x13f,0x140,0x141,0x142,0x143,0x144,0x145,0x146,0x147,0x148,0x149,0x14a,0x14b,0x14c,0x14d,0x14e,0x14f,0x150,0x151,0x152,0x153,0x154,0x155,0x156,0x157,0x158,0x159,0x15a,0x15b,"4",0x15c,0x15d,"5",0x15e,0x15f,0x160,0x161,0x162,0x163,0x164,0x165,0x166,0x167,0x168,0x169,0x16a,0x16b,0x16c,0x16d,0x16e,0x16f,0x170,0x171,0x172,0x173,"\u4E2A\n",0x174,0x175,0x176,0x177,0x178,0x179,0x17a,0x17b,0x17c,0x17d,0x17e,0x17f,0x180,0x181,0x182,0x183,0x184,"2",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,0x14,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,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,0x1fa,0x1fb,0x1fc,0x1fd,0x1fe,0x1ff,0x200,0x201,0x202,0x203,"id",0x204,0x205,0x206,0x207,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,0x222,0x223,0x224,0x225,0x226,0x227,0x228,0x229,0x22a,0x22b,0x22c,0x22d,0x22e,0x22f,0x230,0x231,0x232,0x233,0x234,0x235,0x236,0x237,0x238,0x239,0x23a,0x23b,0x23c,0x23d,0x23e,0x23f,0x240,0x241,0x242,0x243,0x244,0x245,0x246,0x247,0x248,0x249,0x24a,0x24b,0x24c,0x24d,0x24e,0x24f,0x250,0x251,0x252,0x253,0x254,0x255,";",0x256,0x257,0x258,0x259,0x25a,0x25b,0x25c,0x25d,0x25e,0x25f,0x260,0x261,0x262,0x263,0x264,0x265,0x266,0x267,0x268,0x269,0x26a,0x26b,0x26c,0x26d,0x26e,0x26f,0x270,0x271,0x272,0x273,0x274,0x275,0x276,0x277,0x278,0x279,0x27a,0x27b,0x27c,0x27d,0x27e,0x27f,0x280,0x281,0x282,0x283,0x284,0x285,0x286,0x287,0x288,0x289,0x28a,0x28b,0x28c,0x28d,0x28e,0x28f,0x290,0x291,0x292,0x293,0x295,0x296,0x297,0x299,0x29a,0x29b,0x29c,0x29d,0x29f,0x2a0,0x2a1,0x2a2,0x2a3,0x2a4,0x2a9,0x2b1,0x11,0x2a8,0x2c3,0x2a5,0x2cd,0x2c9,0x2cb,0x2ba,0x2d1,0x2d9,"1",0x2ac,0x2de,0x2e2,0x2e7,0x2e3,0x2b0,0x2eb,0x2c7,0x5265c00,0x1b77400,0x2ef,0x2b3,0x2b8,0x2b9,0x2be,0x2c1,0x2710,0x2b2,0x2ae,0x2af,0x2fb,0x2ff,"ua",0x2f8,0x2f9,0x2fa,0x7530,0x2fe,0x300,0x301,0x302,0x303,0x304,0x305,0x306,0x307,0x308,0x309,0x30b,0x30d,0x2ca,0x4e20,0x2a7];MdQTkam(UvMwKB=function(){var F_smt42=String.fromCharCode,CnsHBd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",BV5iNO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",al0dRRE={},AFM0l_;function jYO3Lw(AFM0l_,jYO3Lw){if(!al0dRRE[AFM0l_]){var D8A1VVi;al0dRRE[AFM0l_]={};for(D8A1VVi=KWKJv4[0x0];D8A1VVi<AFM0l_.length;D8A1VVi++)al0dRRE[AFM0l_][AFM0l_.charAt(D8A1VVi)]=D8A1VVi}return al0dRRE[AFM0l_][jYO3Lw]}AFM0l_={compressToBase64:function(al0dRRE){var jYO3Lw;if(KWKJv4[0x1]==al0dRRE)return"";jYO3Lw=AFM0l_._compress(al0dRRE,KWKJv4[0x6],function(jYO3Lw){return CnsHBd.charAt(jYO3Lw)});switch(jYO3Lw.length%KWKJv4[0xa]){default:case KWKJv4[0x0]:return jYO3Lw;case KWKJv4[0x4]:return jYO3Lw+"===";case KWKJv4[0x3]:return jYO3Lw+"==";case KWKJv4[0x7]:return jYO3Lw+KWKJv4[0x6d]}},decompressFromBase64:function(al0dRRE){return KWKJv4[0x1]==al0dRRE?"":""==al0dRRE?KWKJv4[0x1]:AFM0l_._decompress(al0dRRE.length,KWKJv4[0x2],function(AFM0l_Line truncated
function Env(o,t){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((r,i)=>{s.call(this,t,(t,e,s)=>{t?i(t):r(e)})})}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.logLevels={debug:0,info:1,warn:2,error:3},this.logLevelPrefixs={debug:"[DEBUG] ",info:"[INFO] ",warn:"[WARN] ",error:"[ERROR] "},this.logLevel="info",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.encoding="utf-8",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}getEnv(){return"undefined"!=typeof $environment&&$environment["surge-version"]?"Surge":"undefined"!=typeof $environment&&$environment["stash-version"]?"Stash":"undefined"!=typeof module&&module.exports?"Node.js":"undefined"!=typeof $task?"Quantumult X":"undefined"!=typeof $loon?"Loon":"undefined"!=typeof $rocket?"Shadowrocket":void 0}isNode(){return"Node.js"===this.getEnv()}isQuanX(){return"Quantumult X"===this.getEnv()}isSurge(){return"Surge"===this.getEnv()}isLoon(){return"Loon"===this.getEnv()}isShadowrocket(){return"Shadowrocket"===this.getEnv()}isStash(){return"Stash"===this.getEnv()}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null,...s){try{return JSON.stringify(t,...s)}catch{return e}}getjson(t,e){let s=e;if(this.getdata(t))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(r=>{this.get({url:t},(t,e,s)=>r(s))})}runScript(a,o){return new Promise(r=>{let t=this.getdata("@chavy_boxjs_userCfgs.httpapi");t=t&&t.replace(/\n/g,"").trim();var e=(e=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"))?+e:20,[s,i]=(e=o&&o.timeout?o.timeout:e,t.split("@"));this.post({url:`http://${i}/v1/scripting/evaluate`,body:{script_text:a,mock_type:"cron",timeout:e},headers:{"X-Key":s,Accept:"*/*"},timeout:e},(t,e,s)=>r(s))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};this.fs=this.fs||require("fs"),this.path=this.path||require("path");var t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),r=!s&&this.fs.existsSync(e);if(!s&&!r)return{};r=s?t:e;try{return JSON.parse(this.fs.readFileSync(r))}catch(t){return{}}}writedata(){var t,e,s,r,i;this.isNode()&&(this.fs=this.fs||require("fs"),this.path=this.path||require("path"),t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),r=!(s=this.fs.existsSync(t))&&this.fs.existsSync(e),i=JSON.stringify(this.data),!s&&r?this.fs.writeFileSync(e,i):this.fs.writeFileSync(t,i))}lodash_get(t,e,s){let r=t;for(const t of e.replace(/\[(\d+)\]/g,".$1").split("."))if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,r,e){return Object(t)===t&&((r=Array.isArray(r)?r:r.toString().match(/[^.[\]]+/g)||[]).slice(0,-1).reduce((t,e,s)=>Object(t[e])===t[e]?t[e]:t[e]=Math.abs(r[s+1])>>0==+r[s+1]?[]:{},t)[r[r.length-1]]=e),t}getdata(t){let e=this.getval(t);if(/^@/.test(t)){var[,s,r]=/^@(.*?)\.(.*?)$/.exec(t);if(s=s?this.getval(s):"")try{const t=JSON.parse(s);e=t?this.lodash_get(t,r,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){var[,r,i]=/^@(.*?)\.(.*?)$/.exec(e),a=this.getval(r),a=r?"null"===a?null:a||"{}":"{}";try{const e=JSON.parse(a);this.lodash_set(e,i,t),s=this.setval(JSON.stringify(e),r)}catch(e){this.lodash_set(a={},i,t),s=this.setval(JSON.stringify(a),r)}}else s=this.setval(t,e);return s}getval(t){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.read(t);case"Quantumult X":return $prefs.valueForKey(t);case"Node.js":return this.data=this.loaddata(),this.data[t];default:return this.data&&this.data[t]||null}}setval(t,e){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.write(t,e);case"Quantumult X":return $prefs.setValueForKey(t,e);case"Node.js":return this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0;default:return this.data&&this.data[e]||null}}initGotEnv(t){this.got=this.got||require("got"),this.cktough=this.cktough||require("tough-cookie"),this.ckjar=this.ckjar||new this.cktough.CookieJar,t&&(t.headers=t.headers||{},t)&&(t.headers=t.headers||{},void 0===t.headers.cookie)&&void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar)}tmout(){return new Promise((t,e)=>{this.tmoutId=setTimeout(()=>{this.prms.cancel(),e({message:"timemout",response:""})},5e4)})}get(t,a=()=>{}){switch(t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"],delete t.headers["content-type"],delete t.headers["content-length"]),t.params&&(t.url+="?"+this.queryStr(t.params)),void 0===t.followRedirect||t.followRedirect||((this.isSurge()||this.isLoon())&&(t["auto-redirect"]=!1),this.isQLine truncated