2023-08-07 13:32:24 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const lI1I1l=iii1II;(function(l111i,l111l,I1iilI,Ii1II1,lilili,IliIli,lI1ilI){return l111i=l111i>>0x8,IliIli='hs',lI1ilI='hs',function(IllliI,IliIll,iIiili,lilill,IilI1){const lilI1I=iii1II;lilill='tfi',IliIli=lilill+IliIli,IilI1='up',lI1ilI+=IilI1,IliIli=iIiili(IliIli),lI1ilI=iIiili(lI1ilI),iIiili=0x0;const l1lI1=IllliI();while(!![]&&--Ii1II1+IliIll){try{lilill=parseInt(lilI1I(0xf8,'wOY7'))/0x1*(-parseInt(lilI1I(0x176,'PQ7o'))/0x2)+parseInt(lilI1I(0x215,'IhDQ'))/0x3+-parseInt(lilI1I(0x218,'!i&5'))/0x4*(parseInt(lilI1I(0x146,')6)w'))/0x5)+-parseInt(lilI1I(0x278,'#dt0'))/0x6*(parseInt(lilI1I(0x191,'9GcI'))/0x7)+-parseInt(lilI1I(0x115,'7ibz'))/0x8+-parseInt(lilI1I(0x1a0,'pb9$'))/0x9+parseInt(lilI1I(0x1e9,'h9[V'))/0xa;}catch(Ili1I1){lilill=iIiili;}finally{IilI1=l1lI1[IliIli]();if(l111i<=Ii1II1)iIiili?lilili?lilill=IilI1:lilili=IilI1:iIiili=IilI1;else{if(iIiili==lilili['replace'](/[HQdtXJIAhquGVSMpRBgCny=]/g,'')){if(lilill===IliIll){l1lI1['un'+IliIli](IilI1);break;}l1lI1[lI1ilI](IilI1);}}}}}(I1iilI,l111l,function(lI1I1i,liI1II,i1Iii1,l1liii,I1Ili1,l1liil,i1ll1){return liI1II='\x73\x70\x6c\x69\x74',lI1I1i=arguments[0x0],lI1I1i=lI1I1i[liI1II](''),i1Iii1='\x72\x65\x76\x65\x72\x73\x65',lI1I1i=lI1I1i[i1Iii1]('\x76'),l1liii='\x6a\x6f\x69\x6e',(0x1381b6,lI1I1i[l1liii](''));});}(0xcb00,0x876cf,Iii11l,0xcd),Iii11l)&&(version_=Iii11l);function Iii11l(){const i1lii=(function(){return[version_,'MgjHsuQjAGiCqagtmyJiMd.IcpoRmX.hvu7BVJnS==','WRa7W7T1fCkE','W4tcImkXW4FcSG','q8oWDCoCWRC','ospdMCkGxG','t2xcLW','W6aDhuTO','W6HKpgRdKG','WQuhoJ8','W4LUWRddRsy','nSo2nSoJhxKqvq0','ESoDymk1wW','zmkUjSorWQq','uCkHnemr','uSkAjwq4','W7n3ow3dSW','nSoxbmkPW7u','5O2F546e542b6ywF5OM95yQ977Yn','WQzFwmoeW6S','tmo+l2NcNG','d8oZkmkiW5z2wehdMCkTemk/W6mRxMVcISoPWOFdN8kJgCkFWQNdISopW4ZdTZFcSmopF8oyqCkKxeWTWQGyWRDIWPK','W5X0cMa','W7f5WRW+xSo6W6ddJSo2','z0pcMSooDW','lshdGSkPFv8','lZxdN8kL','nCoBFq','W6GroNdcNG','5yEY5O2c57QX5y215OU85yUC','WQXxCCoaW48','W5r6gq','ACk+rSkYWR8e','hCkSWOunedFdP8k+ymoRm8oufW','ECo0c8kLWR4','W6HrWOxdQGXwBq','ySozoYj3CGXNW49gEa','6k6q5yM46zUt5OE35z6ndHGwW7hcU+I/OUwgToAII+s+QoAvIEwgHowTL8on5BIE6kYE6you6l+X6iEN5P+G5yYq6iYw5yY1W6CXWRJdIL/dKW','wd/dVSomW6u','DSk3EmkjW64','y8oTqCo+WRju','ACkcxCkMW5VcJmo6','v8kDzmkyWR0','WQhdImoucmkp','W4qdmNjM','fmoida','cSkxea','WPf4xSkyfeH0bmkVWOOMW6f2','WOGChXnk','WQf9sCkTWRqS','WP57ua','iCo4kLv3','tmkXjxG3','gcPvzwG','WReBr8kFqG','WRX9r8oGW6S','W6bsswBcJ8kUf8kzWQD8WO1fWO7cJmo6WPldNCo+W7SaWOJdJg7cRtqEs8oAe0CM','x8oGgmkWWPXpW7u','bGzCmSk/','W6pcMKlcLgFdSq','W7W2lMfI','WQLhWP3dPCkgW57dI8oxnG','pmoABa','y8kfEveLww5UW7zYx8kiWRBdR8k7F8knWPRcTwTpW5y','44kZ5O+W56sP44gH6kYB5ysl6i6B5y+s5lIc5lQv6lE75yYO5lUCWPGYWO8fW6fhW4RNMz3MJzlKV4/NLA7cTJmsW4OdW4VNMkxKUytKU4ZNRRxLIOdOJBxLJRG','mSo3o20','WRjhWPVdVmkBWOpcJCkEp8k8WOKtshxdJsboWO3cLCkC','zXVdTmouW4y','5OIt54+36yws5OQq5AwN5O6r542B5P2a6k6m5AwT5zkI77Yf5B2l5BUNCq','W6HbWP/dUr8','BrxdV8oIW5e8','5OQX5lU657UL5y6M77+O','W6hcLf/cHa','DCkhfeKD','jmksy3K3','fmkL5AwD6lEXW5WB5yYl5zI9AmkO','Fmk5l8o1WQG','5lME5lIi5PY65yMC5zIs6k6d6zEm5Psr5O6Z5lUd56I1776c6k+V5Qo95P2z6is96lIU6k+D5AEc576m57If5Ok25ywP','WOnbBmohna','WOjbFmoxW5a','hmoWF8ohW5a','dJ94','B8kMiCooWRm','aCoXpmoM','WQq+WPb0x8o9','W5izka','W6OoW5npCa','sxxdUh/dKa','5lQd5lQi5P675yQE5zMp6k666zs55PAH5O2J5lQb56Ip77626k6p5Qkn5P+u6isu6lQ66kYs5AwV57Yt57Mi5Ok+5yEw','WOyjC8kzAvK','WP7dQI7cJCoU','q8o7W5e','ydldVmooW5S','W6vcWRyOxa','W7NcJ1JcGhVcPNFdGcvtBHHXWRWxWRrIW6qoWQK','amkaW5a','sw7cMmomEa','gmogBCoKW6u','zCo7gq','w8oqBCkIqW','BuJcOCo/Dq','WO4KjgVOR7pMSjZLPRNOT5xVVktORkdMO5pMN6JNVOtOT5BPH5/ORPC','W7WOcCo7W650','WQBdT8olnSk6','Emo/W59Xxq','c8oImSkFW5eK','pGtdISkNrq','fmodjwzj','W4HAsWtcJW','a8kBW4HJW4tdLHucCNi','WQf3qa','W4P9WP3dQrW','5OUR54YM6yAE5OQX5AwO5O2F54YF5AwG6lwY772s5B2j5P2b6AoP5BIv5BAq5RIe','W6tcKSkKW53cUtpcVZ0B','zXBdT8oiW5e','WQPsWP3dV8kn','DKTmemk5','pCkcW6TXW5K','i8kEEx8TvG','WQLQrSk9WPa2FSk6W40gfSoF','DSo3q8kozrRdKSoWWOu','r8o5qSkbyXi','WQ0JWOv8xSoO','jJ9z','bbDGpmk7W7FcMSo9W4a7WObEWQ0PWQj+WPZcNmkU','r2VcHmoR','D8omW7DTsG','ncVdJ8kUuq','W6pcICkzW5BcVq','W7NcJ1JcGhVcPNFdGdrrAbHXWRWxWRrIW6qoWQL
|
|
|
|
|
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"])
|