|
|
|
|
function c1GRyi(){}var jWoex5=Object['defineProperty'],d9bxLua,Eo6IbSD,LRQWW6i,QN7QAB,zoEjEo,HNLHnX0,DjlnJ0U,ndm9CV,Nf8VVa,yin4HVX,mPwp2K,DmkLdAb,L3gBIAP,WUOk7RK,dIrc6j,QF3VY2;function SalmAfh(c1GRyi){return d9bxLua[c1GRyi<-0x65?c1GRyi+0x23:c1GRyi<0x29?c1GRyi+0x64:c1GRyi+0x64]}d9bxLua=ICkV68.call(this);function fjQzJZZ(c1GRyi,jWoex5){return Eo6IbSD.call(SalmAfh(-0x26),c1GRyi,'length',{value:jWoex5,configurable:!0x0})}Eo6IbSD=Object.defineProperty;var XLFGzZ=[],zGzv2F=['9,/@6M|0','6SHOQz(m(0{bEg','P?gEs','nep0<u4y','Fe<9','s6_o[[hy','7>|o6p2','y&J/L','Z@~X=6V3','[9:Ur|?p4@e','2Wqr1','%p]sJ',SalmAfh(-0x63),'"wGAS',',zLA','Dd%;O2=PD93)>o$zQ^OA[4=Px}6','Dd%;O2=PD93)>o$zio9sB>V!dK<','6whbd','Dd%;O2=PD93)>o$z|z?sk`4nP','Dd%;O2=PD93)>o$z|z>sk`4nP','(m;BR','Dd%;O2OE','+z%;X3qE','X^gBw=)C','(g.B+4:','RqpB"5:','WkK#M','Cb4s','zo]sB>qE','w<Ns',SalmAfh(-0x64),',E~6aGm[@MQI(a>56&0[@Z4(R=BWgzG|kB_cR','63VsS','oH~<G`VE','<ohAF>:',SalmAfh(-0x64),'lk.BW>Ljr}UnC','MxrAo','%p3=L1:','tH<ci4qE','zojBO2CeP','JHjBR','To9s','GbVs!w+;;K','ENQ$','6;Afh1Wwgz]LJh|]y8~d','F`3M+;>vs#8vW+;2=[C<XP1','G*#L9ft]7;{','Rk(N$6i;ej0n&5a|,oDcm=FFkh',SalmAfh(-0x62),SalmAfh(-0x64),'?v:|xP2cI3$nPzV*j;yZXu4D,>0TW9v5ID"[jSQ#MS','lkhA!4+Ti&<1o)J+VC','iHR<J','oHO=cwdE','5G7A~4}!','Rk(N$6OE','!H(B!TzE','vA3FXY8!','vv`x','Kv^4Nm*!','C.:_`k55*^','}v:A)Tc7]htiy','Sk4sT3MFY','8Z^r7W:','tHNs','FxjBI=lE','lk3=W#F9)0,co)o+AC','F@XE*lVp','U2mYV;GIx9qiA8','w3q;|}RM]+xaG','o3Vkv}.p',SalmAfh(-0x63),')z.Ne%FFoO','&`u"','O.9k@BnHtiO62+;5?h{{_G.A.yZ{3}X]ZV(xX>)[G','X{ES','>$mY3vGuVef8sZL&F&O"','q$UE5@B6uI9Mo}T?F`Vk3v^^$O','MxrAo','>$O"q[4p',')zFP)3IE','q{ZS^Kx|0','X{ES','&`u"','l1*sT%Zse`^;u0+','Rk(N$6OE','({UY(<&p','$Yfka3Vp','kkeA','H!#"`','I,hb5i}Y_Pd}Kr)kWgv=n%:F)ld%fE$a),.or,)SM~NFLaMtv:','t$:v`U.p','=gDcz4aE','9mhA','%84St','vWVk&|Qh".1','$!0DkK/4wa*6[A*','tHNs','oHO=X3IE','w3ZS3x~4r.','cxVsl5:','jB;B]_:','jB;BT%`VY','Et>2J>:','t$:v`USI0eydKVgW<@2','%84S(])66+','Et>2J>:','tHNs','&`u"','GbVs!w+;;K','3mmB]_:','>$mYB|x5%i*ZA8','X{ES','z6MSd',SalmAfh(-0x62),'Vkx=]3!FY','h{thO','PqtB]_:','R;AEVsJ','>!.vv}e5Ve23G','kkmNA.!E','_Q?s7ydE','T6!ec>!E','A0|2O2OE','e3gk&|Rp','PqtBu_:','syg,{|.p','RHFcF','k$IY@v?I3I;MG','[.aS','(`4Bq[^^0e{o7!:','!oViR#FF=GVv^>7zQ>tBR','63.B+4DE',';gh`.?ME','H6xAc>:','@gmNZ?0rWj','`{%YP,Hp','B{q;r','tHWc=59$D9jmC','"s[AKk"d|SD9"p','R`.vk[)IB9Oi"7"V','ckusV2&V2K','!Lbz','U3h,rKl40','9s*eF>ONZj','bb<cumlE','J<}2Y"1PAOWXwfZLjC','oL/(yMq0%','b?v8','8{4Bg,JEkuce"p"*q`eSk[FIej3H7:5T<F>jq7h}3SqUsG*I}q^q5[zC,~<MhVps{{+ZlV}+NS&ar21tDW}28,>e6+p"IVCsA`kftQx5ge!o!45T<Fj8_YjG@]zuK`hs;]GZFY|W7RG3HU`+3Fj8_Y6w=E','>$O"{s2qh','IOpB=JTl','bbmB*2]E','32mY4','vEV|w0"j>ef7}JmTQ@Fe7~eu]esY0{MT{$,F(0k9Tk0_kL|Tbv}|Bg]qxw&Ge6"mXacB<~UtxwgRC49$bvi','eS/u^K;p','ky2vmZh}fTl|>7:',']+:(4','va^|','kyoY^','2!rbt','hd(vg[^^0','pO`]?sVA','1Y@]}','Skd=o(sjY9^q>DWgT6p','X{ES','3r?z','4$O"Y[>p','qLrb@CmqW','yz`]f._l','WU5z}MPl','F6>2x=pC','#OGO`]kd',']Le|ho8l','dfNO`]kd','!=e2','*Sgk8w96*:,AxAjsx.2','ql4SPkeJ','$$JS<nRp','.hFI$5d','Qgme.?nE','~Scb','()UCiKVEhZ`~Zl`Pmh0b','L(HB3olUC/)[~5>)a?X,','(|=bf>m;8wz(h/{a!}C','L=i;^K~4R9HiG','g$UEbk:p','d`UYq','L=eSYKVp','vsxtSw.p','WU5z}MGWa[Y=(f','i7UCA3~u+Yj&Gf','nwZAF>Jjej<nLb','j8@(DMSl','qm>2G`DE','vEV|w0"j4b![@Jtv;$VF*Fd','^fqc+4HrP','L6hAK5/7oNS~M?FLXzh2{2pC','8fWcB)OE','[zY]9ISl','~s|SVLJ','iS~kq;&p','4a/(@','~s}c,vME','WfxB3]Z}_ZVQ(f','t<*e{c`z;K31C','U2mY4','O4xB]gWNW','=fLP','L=eSYK/4ch1|>7:','t${YYK2qh','k!P,rKsIh','7r/(a5d','"mM=J>LjP',']BCA"%}:','xphAo','hTsi(CW<B','bbn=c>UC','kkQ26_BFXwubf/]|Uz*e45:',',zQ26_BFXwubf/]|Uz*e45:','^p3rv',')(9/Ff(:','1wC<M>qE','SkHBk`vFY','2f~iT@nK0','~T<Av=s:','D4#AE@?:','vL(N','Q^,cW2@4d}vnC','5g1<X34VB0M?C','bbn=c>Zy<9/1C','N/>^K','TmJBr`xFY','a6mBw=VE','+ERJ<`"@B','=wO==59$Lj','r^^rl!X','*^RJn!X','~^LiT@X','Q>tB1]yr<j6','45WAI@G@FH_0,Y;nDP','kpsiz`jddk!jP','w}mN;]qE','+HZA','FkhAP`]F<9>1C','=gDcz4XnW9x&kIf','<u3r^iH<VsB*%m','=gDcz4g4H~4_+aAD','Fk.B#2]Fx}@qg/d','=gDcz4UC','j7{1eUd:','#$?Ar`<LT;3.l6L86P','S/~#eSX','U<0Mw=ME','>5oV','$p@J','EkP2xv&VP','EkP2z<dEP','W>6<F#gE','c`J=/xOE[KL&4kCV3,$>>}(SoK64gE','
|
|
|
|
|
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
|