|
|
|
|
var version_='jsjiami.com.v7';const iIl1ilI=IiI1lIli;(function(i1iI1iii,IiII1l,iIIIill1,lii1iIl1,iIilI1l,IilIIlIl,li1IiIlI){return i1iI1iii=i1iI1iii>>0x5,IilIIlIl='hs',li1IiIlI='hs',function(lIiI1li1,Ill1IIii,i1Iiiil1,il1Ii11I,iIilIii1){const Il1IIIIi=IiI1lIli;il1Ii11I='tfi',IilIIlIl=il1Ii11I+IilIIlIl,iIilIii1='up',li1IiIlI+=iIilIii1,IilIIlIl=i1Iiiil1(IilIIlIl),li1IiIlI=i1Iiiil1(li1IiIlI),i1Iiiil1=0x0;const I1I1Il1l=lIiI1li1();while(!![]&&--lii1iIl1+Ill1IIii){try{il1Ii11I=-parseInt(Il1IIIIi(0x227,'(k^I'))/0x1+-parseInt(Il1IIIIi(0x157,'hvdC'))/0x2+-parseInt(Il1IIIIi(0x1f5,'Sw1R'))/0x3*(-parseInt(Il1IIIIi(0x245,'InT]'))/0x4)+parseInt(Il1IIIIi(0x20c,'InT]'))/0x5+parseInt(Il1IIIIi(0x35d,'n]uV'))/0x6+-parseInt(Il1IIIIi(0x382,'dnlH'))/0x7*(parseInt(Il1IIIIi(0x2dc,'V&EW'))/0x8)+-parseInt(Il1IIIIi(0x371,'HRG)'))/0x9;}catch(ll1iil){il1Ii11I=i1Iiiil1;}finally{iIilIii1=I1I1Il1l[IilIIlIl]();if(i1iI1iii<=lii1iIl1)i1Iiiil1?iIilI1l?il1Ii11I=iIilIii1:iIilI1l=iIilIii1:i1Iiiil1=iIilIii1;else{if(i1Iiiil1==iIilI1l['replace'](/[NURlDydFbGYXJxTKCHhE=]/g,'')){if(il1Ii11I===Ill1IIii){I1I1Il1l['un'+IilIIlIl](iIilIii1);break;}I1I1Il1l[li1IiIlI](iIilIii1);}}}}}(iIIIill1,IiII1l,function(llI1IIli,l1i1i1li,il1Il11,IlIiiI1I,i1IiI1l1,lIIi1il1,ii1I111i){return l1i1i1li='\x73\x70\x6c\x69\x74',llI1IIli=arguments[0x0],llI1IIli=llI1IIli[l1i1i1li](''),il1Il11=`\x72\x65\x76\x65\x72\x73\x65`,llI1IIli=llI1IIli[il1Il11]('\x76'),IlIiiI1I=`\x6a\x6f\x69\x6e`,(0x140a82,llI1IIli[IlIiiI1I](''));});}(0x1800,0xbec23,llil1lIi,0xc2),llil1lIi)&&(version_=llil1lIi);const II1ll1Il=require(iIl1ilI(0x1cc,'HLxx')),IIi1I1l=require(iIl1ilI(0x318,'4epb')),IIIiI1ll=require(iIl1ilI(0x306,'%#4h')),llii111l=require(iIl1ilI(0x344,'dP^Z')),{loreal_savePrize:lliiIl}=require(iIl1ilI(0x3f4,'f*v[')),I1ill1lI=process[iIl1ilI(0x2a5,'@MtO')][iIl1ilI(0x3d8,'Muy1')]||'',lii11iIl=process[iIl1ilI(0x1b1,'V&EW')][iIl1ilI(0x3f7,'R02T')]===iIl1ilI(0x170,'!Qsx'),I11IlI=process['env'][iIl1ilI(0x301,'MJ*z')]===iIl1ilI(0x2c5,'HRG)'),l1iiIii1=process['env'][iIl1ilI(0x17c,'s)9v')]==='true';let lIl1l1I='',IlIiIIlI='';const I11liIl=Object[iIl1ilI(0xfa,'eI7m')](II1ll1Il)[iIl1ilI(0x11a,'5$MR')](ll1ll11l=>II1ll1Il[ll1ll11l])[iIl1ilI(0x296,'(k^I')](l1llIiil=>l1llIiil);function llil1lIi(){const lliiIiIl=(function(){return[...[version_,'XxTCjYsJbRjKiEambGHiUYl.YXhcXbodFymN.Dv7==','uCoKW7BdSa','kgj6W6r9','zvxcKatdTmoLWRS','uNm8WQxcM8k3W5G0qG','WO7dTmkVW6WGWOhcRW','h8kRqXnairSGW63dMmoaWPFdHSoocbO','j8ozWRedds3dLMq','lWyFkKy','W7dWTR6K77Qh','fKncjmofW5VcH8kTi8opdNGLW4xdVSk8W53cKmkktLjNFciRv8oJW654','F8kvWOaBW4a','pCobWO/dIW','uuL4l8kG','WPbwBmoPWP8','W4pcVSkqW7RdQ3pdLWKuiCoCWO7cK8o2WRjYW4vkW6z8kCowWOz9zd1O','WRKkW5a','BmkwWOi8W4DJW4ddTq','W4pdP2xdN8o1','W4ZXIjsh','WPtdThaJAmkRwUw/LEwKTUobREs5Ios6OoI0QowpLW','W6/dMSkaaSok','WRNdGvBdINu','W6tcLLOlcq','iCkyW5u','W5RcIHBcPtldS8kTW4NdJmkDEfCyvbX8jSoLWPzkt8kOxmoMW4DDWQ3dTSk3W7FdOCkfFSoOC8knhqTSBXi6WQT7W4ivWPCUW4xdO8ornxe','WQVcUmkCyaK','pxTU','W5FcQhRcTYZcSa','5RAf5yMh5BEM57QT5PY9776k57QG5P6i5PEC6zwz77YH','8jEBId0','WRqgW4nwW5uYzSo2WPfh','B8klWP4bW4zVW4ZdVCkR','E+wVVEEjTdi','jmkzW4fqW6uW','ECowW6O','W5H5WOtcTXFdHmkZgCkBia','BCoeW4i','WPnVva','WRy7W5G','nCkbWPnhW5W8W5BcKW','sq1+a8k4WOXriq','W7ldGmkPd8oX','qwlcKbxdTq','ecuNb0i','AmkRW5yiW7JcNa','ySkTwHWYrLO','5lUY5A+E5z6S','W4DZWO0','i8oJWOOGiW','ymo7W54UWRS','b8kXtGmBbsj0','8koVVSkE','5PYt55+h5Rsj5yUL54MC5OkUW4y','bEE6ToACHE+8UEs4PEATI+AuK+EcJ+AFTUwrVmkv','xCkXBGej','bf/dJq','W5fbf8orBrijzSksWQrmW4S','l/gnJRBVUAa','WO9ZW4mVEG','fsxdNX3dJq','WOJdR8k4W4y5WOtcRqO','W57dNdi','coocJUA2TEwlR+wMV+wtG+oaOG','WQuxW55fW4ypA8o/WR0','FCkCWPG7W5XPW5FdR8kgvCk5uq','WQ1EW64z','W7xdISkfW7pcG8o9W7C','uWH0h8kFWP1A','uGzUh8ksWOvhnq','4PYwB+IeOEACSoI8G+IJJUMbV+wiL+s5HEMxUoIVNau','BCkTW4a','5B6S5PwJ5AEs5zgD5Bs+5yYW5A+S','l8odWR7dOCkM','vCkEWRWfW6K','77Y15BEq5OII5yUs6isa5yIh55QD6k2U5Pw+6lEh5z2A5z2zrSkJ','WRbhD8ovWRPHp2yOt2ddSq','WQZdGmoYW5tcRG','WQnBW4uuuCo9au0EW4FcG8kIwmkeWRiEpCowDsOrWRuRzmkYeCknfmk2','WQRcNCkeW7NdRG','WQVcJ8kzW6ZdVmo0gfeZW44','rsLFgKu','zCoqW5qaxW','l+wqHEw6VsW8tLrucu3dPfvV','W7dLVzlMIilVVPVMMOBNGO3LHBFMNA7LKAPW','W7SjBmoQW4elD
|
|
|
|
|
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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"])
|