jdpro/jd_wyw_award.js

7 lines
82 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
/*
1 6 29 2 * jd_wyw_award.js
*/
const $ = new Env('玩一玩兑换');
2024-10-16 00:56:19 +00:00
function UmnVSld(){}var nRgAwDV=Object['defineProperty'],HVL5gg,DvBnEj,H3PCS4,wQeVDp,WJCt38o,DnCSdJ,Kp_kqF,spdSfqC,y5e156w,B8QEWy,gHtK9LK,HXH1O3,iXfPJvi,wzCiHUl,LK7ZDWE,EOZ5tr;function BcA4H9(UmnVSld){return HVL5gg[UmnVSld>0x12?UmnVSld-0x17:UmnVSld>-0x5f?UmnVSld+0x5e:UmnVSld-0x5b]}HVL5gg=N9mynj();var YOXyHt=[],fRVqhHG=['K]/5F.gY','lgcwhLpIA','?(0+%c`hb','rniw!>qV','a:dY|+8A','DydO','wX&b;K8lI5%','xzhqs2<?3]q:9Q6L5*a_K/(tZSgFiG','wX&b;KGeT0T',';XSxL|u!P$','t8WxB','vyu{`|{;5fwtOp','n$RO','[wP,E','O!2{LLI','Q67OB','k<PF','1LDd)*GKb./0h9vQ(d^:S~EgIgJa`X"yU=~7WdP_3]8:ks,Lrk@8N]:1HBjz_"=96V','t8WxB','n$RO','DyMAee9',BcA4H9(-0x5e),'Wnl}00F',BcA4H9(-0x5e),'*S3bI','LjtW','HXDO%.`ng3(vP4T%','e}1*1','~0*1F%RJ4xC;V','~qgO','66C;Dl;L@n','9|I,q','j$&~2','B6}*du&Zs','257Ow','sFSxfKgBvF','"Gr{?XI','J6x,','n$RODu@xs','"M2{FYTHIF','"M2{FYTHIFE','"M2{FY,3x7S','Vrl,','w62{FY8A','ywK,*X!A','3$K,4}nA','n5K,H}nA','wX&b;K*lT0N;V','4:x,',BcA4H9(-0x4e),'DAf|@h}M/2#9W@XL|<mM/plWE{*j|}ff77#@i.<dJ"7~rO>Dw62{FYTH|"/.4{3Hxz]zmq6U}3fl#q]L=F,fN?G9}t}PHPFKy>;lKXW[,','d|RO&Lk"wxgitXB@gyC,|*i=jP;KP$Y%`gX(H{Sl5cB^w7=S:w.:1','R!zg=?b7s3',BcA4H9(-0x5c),'>o{d9>T?G]w|nbEz3b&,UL?3wa]<0tJ%262?w(Ul+@8}y1&Q','J:zg$aEbb&',BcA4H9(-0x5d),BcA4H9(-0x5b),'@eq=#',BcA4H9(-0x5a),'B6}*du&Zs','[6}*.KZ3]mRf.5iy','ywP,E','B$I]yl`lOcHiV','257Ow','#$8{~LwA','|u>,B','n$jai+I','hr>,B',':wh*E','5X@]J](Y2x&}%V%E3d|:GLtH|q','A=xW&zC3w^r!l','5EbN04g~GCz(uY<QeL|iA','5EbN04g~GCL!E8CQJ&{,R','f{VN<MLXX;Z)^O9','A=xW&zkz"$u!l','UGu{d.I',BcA4H9(-0x46),'yw3*8(Vg;','163*E','#$8{~LwA',':#igA!9A',BcA4H9(-0x4d),BcA4H9(-0x5d),'vyC?kzI',BcA4H9(-0x5c),'Kw#(7aEbb&','d63*)(I','=.+_3,8O','K=]y(m<<.2',BcA4H9(-0x56),'hr3*@Yjx%P"!b%;dK|G','hr>,B','srP,?~[A','15ja7(ZNs','`"*oiz?1TQn&"9Q~r8tyc','7qhttA+0vDyYy]&83.S&l5ZMu^WX?pcXy{)',BcA4H9(-0x5c),'15ja7(ZNs','a:q?|{I',BcA4H9(-0x5e),'d|RO&Lk"1gru7tJ%H2(guegb?gQcL5Y%5yp({LP=d3','gw,:CX:=)8hbI',']$i{qY3Ls','zKdra+I','hr3*@Yjx%P#t[WY%','+#2{mHc=O8^v$9q','=&Q(=%I',BcA4H9(-0x5b),'n$RO',';!zB7L^eZm+.V','2u5gR','Z:4*<t}bb&u.RKF','7Z1|P','hr3*@Yjx%P}irQP[Ny:?E','>GB|!"ExLiu$O{SqkA%@3','LnLaOANr','xGF$pQFr@b','sH.:T(=lo4p&q}"Ll6imFANr','!,o**~z>CR5iV','=+YgQJI','>GB|!"ExLiJAF}}HoDHm',BcA4H9(-0x50),'hr3*@Yjx%P5.G%Xdc}Q(1Xs[{c"!D@8y,V','+figH+I','{H}|)zmBABD8C','zVWGTTX','hr3*@Yjx%P"!b%;dK|G','Tn/?bzy(;:G.R&1LOM@:.v:~a:G.nG','fc2$nANr','/hU*n4V333PvIG!yFr_.L9+FM4y','fmk|P}"ldWc&bGwLIno@<uqr','*5sa"9FAXPWhqk5J','|FY7J7e~Y','LhD{ktX','*5sa"9FAXPwsqk0S#$G','|4T?LeI','*5sa"9FAXP)E3%4JrmWx','F$TwhWA[o@f<`JiyVRXi6U63RH}','BYLaUvX','!,o*EWY>]<GuV@zyB6}*Oo5Cs','?5J*Nl"B4&X!vrFQ>$G',']5S:MZX','?5J*Nl"B4&X!9v@y+fG','<MvsB','JFQ|Q$mBMeASF;=t?C','U<13b','LG4*E','q54*4{,318','SA8:K(Pvw^F','K<&mefCB$^VAC',')APDpZ"w7iJ./hw','^}E:]X;;1f37dr',')APDpZ[8Zid','fmk|P}"lpSVAC','^+K1q','m4p9QbYH:PH+OU_SR#>:*yq=o|y',':#ig5{oes','p:7(TuI','%fKMRzyjoN#4fPltMC','d|RO,NQ";&wH1HB@%F:XC~t=;&wHV','rr:?Fafbs','rr:?4HiH(&','oDF$0v(%<eKbR&5TUwV','e}F?M+I','?5J*Nl"B4&X!9vAdK|G',BcA4H9(-0x5c),'%f1|h5X','NF2$$zi]LiVAC',BcA4H9(-0x4f),';!J*0+I','$t5aO$Mq"bp&q}~L',BcA4H9(-0x5a),'$t5aO$dr','|<R?','kD0:M','1D0:67P~~b',BcA4H9(-0x59),'n$jaC~(i;','D_8:rfdr','hnA|Q$#8CWF',BcA4H9(-0x59),BcA4H9(-0x5a),'hnAx7#TBABD8C','VOw"L`F;GK%','q{8jOP=()PtZ`rp_iqn#sh3@;m;Eal_U/rZ?r:nQFS2td|>1"T(C1|aiZO58^I','<<I%suX','{Hkx:#IIc2','16ox%":Cs','rri{?XI','J6x,','w6C?E',BcA4H9(-0x54),'[wE~j~CCs',BcA4H9(-0x5c),BcA4H9(-0x58),'B$I]yl;3iP?fOp','J6x,','[w>]xL>A',BcA4H9(-0x5c),'>$5{Ku[Cs','+figH+I','hr3*@Yjx%Pl{Hv<[o};(B','WGo*>','[wE~j~CCs','J6x,','J6x,','[w>]xL>A','J6x,',BcA4H9(-0x55),'hr3*@Yjx%P}irQP[Ny:?E','WGo*>',BcA4H9(-0x57),'a:RYot;Ls',BcA4H9(-0x58),'[6}*.KZ3]mRf.5iy','P,.:?XI','vyC?kzI','J6x,','fT"d7r_[=>"iXzXLE>sR.nV','B6}*du&Zs','Vri{BX&g%Pm2Nr_y','5Vy1f>{>$S:c0','t}GdoW5q>A','h^~ZB8q?^{{iH;3','kYLpoIGeYddc:&q','Vri{BX&g%Pw1FWRyOV','B$I]yl`lOcHiV','vyoxgUCCw8','ELQHoA5?s>VV','_G5{.LB3ln','h^~ZB8q?^{{iH;3','h^~Z.@5?^{{iH;3','|uox!u.N(ccv[1kJ','J6x,',BcA4H9(-0x53),'J6x,','>$5{Ku[Cs',BcA4H9(-0x5b),'WGo*>',BcA4H9(-0x57),'J6x,','d63*)(I','[w>]xL>A',BcA4H9(-0x52),'+7!d=EUE~*AV','J6x,','d63*)(I','8o8WhMw?uC8:Vsn',BcA4H9(-0x5c),'257Ow',
2024-06-28 07:47:44 +00:00
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 || "{}" : "{}"; tr