|
|
|
|
var version_='jsjiami.com.v7';function Iii11l(){const iIlliI=(function(){return[version_,'xDUjqGnsKVWjEMiFaqYmQCi.uecUoum.tfvTOB7f==','WPlcUN3dHCoQ','WOWwWQfaWOzBy8oV','W7vptabxreyeEfjJC2lcUSoKca','WOtdHCoTAGq','kGS1lWG','r0pcOG','W61UxZ96','sX1fjG','kaLy','b1RcQaRdHNDV','W7SIW5CN','hxKgmSo9WQ7cKCoYWR4EW6rUW6pdIYfxnCkPea','WPZdI2qZWOy','5B+t5AE/5OQK5As+','jxRcLSk5vq','uHRdOYqB','WQldSh1NzNK','WQpcMgldOmoswa','WRVdNSoM','WRRdMmkDW4VcMG','WORdHCofzdVdOvO8WQ4','WQNdTmks','WOTxyKNcTG','WRZdVNq','rCoYWPpcHCob','WPVdJ8ohqGW','5lQF5lQh5lI56lws5y+jpW','W57dSIPypa','x27cLWyd','WPCSW5RcIColWOW5W7tdM2O','W5BdHCojlCoB','qmkFWRqJW5G','5yUB5yI65AEW6lEfW4W2','WR9xuNRcMhNcKmoTW57dHq','WRPAFq3dTa','WPKOW5RcISo8','WRTrDrJdNLa5gmkqwG','WQVdT8o2WQ7cGCo/','W5i7W6CXWPOjwK9gdCkEws9PW6qBgZVdM8kJWRFcGZxdNCk9WO5VW5ehucNcHmkYfK7cTq','W5ZcKSoKsIa','WRNdNvjYCq','WPDWWQrG','A8kyWRb8WQu','gSoSymognW','WQ7dJCorW7VdRG','fNHkjrDbzc52WP/dN8obWPCyDYfZWO8tCG','zmk1WPGNW6tcM8okW5m','Bmo6bSorkW','cSoRWPxcSCov','WQnkxexcJ0C','W4ldHSoEnCooWQFdJKVdImopWOhcRa','WRpdLmoLw1O','auZdS3PIjr/dNq','WPPTWRL/W6y','W7PwxWDWrKOv','f0VcRJRdGM5+','44kf5yQw5yQN','axbzhmo6W6ZcJCo1','W7NcNSoYwxXfpmk5W5m/WOzL','gxBcGq','WRNdMgPSCq','WPddPmoDW6pdTW','c29ugJy','DhJcVrmfWQRcGCoHDmk6','5ysi5zYf5BY+5BMubaC','WP0IyYHD','bCoHCCoKbCkbW5TfWODVWRC','44cd5BE/5RIY5lUK5lUl5yMQ5yM1','W6mYW4G/xSocW7fHW5jn','WQdWUzc2W6e','WQLexH0','F8oRomoYm8kvha','WONdMxzHBq','562Q5BYuW4lNPAlLKQ7PH6ZORQf65627xG','W5JdPx3cT8oF','imoLWRxcGCowW4X3lLe4DSk2W60Y','aeBcRaS','hvregCkj','W4/dH8o2eSojWQldQMtdLCoAWOxcUCo4','5lMR5lQe6lA35yYC','xCkPWPO','zCogpq','WR17Ea7dGG','W6G7W4SSz8oUW6XsW5flWOldV8oAWPm','AfRcHXW0','WOSxvYHY','W5BdI8oreSozWOJdSu7dNW','44gQ5lQ75lII6lw35y6f','WQhdUCoJWOBcPSo+W4TeyHpcNW','fglcUSkjyW','44kL5Asc5Asm5OUj5AwO44cK','g8oUWPi','tvvUA1S','W4/dQdiHW5pdUgZdGa','5Q+B5OQe5AsD57Ml5P6W','WPFdTKjWsW','j8oYwSoagW','ovPibHK','auZdS3P+obZdGcldVLO','WPldMmoh','W5xdRLpcK8ogW57dLfL+','crCdiJC','W7ZcNGxcJ1G','r3ehk8oQ','dKpdPxjt','WPbSWRPHW6fqgr4zra','WPVdPxXena','Emk0WO/cVCoeW4rMcG','WP0xvZzcW6FdJmkqW6yJkW','Bmo3pmoZ','DYnsbmkf','WPmtssTfW7hdMSkxW5OL','44oZ5yQG5yMp5Aw45y2K57US5P+X44gMrr3LTj3MIl7LI5xNU4lJGOa','WRBdHmkuWQBdHq','W6ZdPSoLgCok','pqTlWQVdVa','rKjfANO','jSkjjva9WQ0wax3dOvn4WP8duCkdWOLvEX9yW6lcQ8kXWQHLW6tdMCkQWRr2rxFcPLLAiCkOnJ/dOvDD','WQxcJ2tdUmoptSoStWng','pcVcOGfn','vX1r','WQT9gmosBG','BSk8WPzPWOC7','xeT4sM0','f1dcUaS','5yIc5yID5Aw96lwqpGG','oJOthaS','W5/cLIJcUW','bmo/WP82WP4','WQe3WOPGWQjTvW','WRn8WQreW5C','WQiKWPLjWQa','WQbBWQrFW6u','nMTsmSkcWQG6','W6u2W4KQ','amk6W48PWP7cHSkxW4PK','W77cHmoCqJ/dJJGzW6rcba','tSoWWOldHmofuYeLmHyVW602WQW','kwfbe8krWQ4','W4JdOIOOW4q','W6pcUbtcJMq','a1nOb8ok','ygJcVHeyWQ3cUSoMumk7fG','W7XlsbWecaGyje55CMpcOmoLaxJcS8kLtb9dz8ofqL3dUmkgytKg','WRWlW4/cRmoU','jCksnhin','brNdS8kZsIL9u8oHW47dIcddSa','W4zBrt5M','tgLiyfi','WPv2o8ocva','WQ/cLwFdRSoysq','W5/dVZWq','v0jlr20','l8kCpKe8','WQZcMhNdV8oEt8ogzaHw','qLP4y2RcOK3cTq','qmoWWP3dNmofra','WQbeDqhdUa','WPxdU0OJWQK','WOyzW4/cNmor','WRzABW','WPmHWPT2WO14w8on','Bmocamo4oW','z3WgpmoH','coACKEEzSEw9MW','WRWtoa0','WRitoZezaW','W4zjAJz9','W7P/CrjZ','WRTmrsHr','W4xdPIC','WP/dT10bWRa','WP7dQCobWONcLq','chVcJ8ksqG','5Ass5AwB5OQl5Ase5Q+v5PAZ5ywnW50','5lMw5lIL6lwT5y2V','WQj1B0NcMq','zCoppCohmG','W6pdTG0Vtq','yuBcUceq','FuBcHYai','F37cTa','eCoNs8oVka','W4RcISobqrG','ESk0WOP+WPWbWRldUCkKDt4meCoMfmk+pmklW77dQ8oN','WQtdNSoZsa','44oR5BEl5RQQ5lIm5lQw5yM65yU1','WQKBW5hcMSo3','WPqutZ50W6a','mcdcOLfw','5Aw85AwS5OM75AsYgowlM+wlQa','WQldUCknWOJdRW','W4xJGlxOROtPL67MJzJLJ5BMR5tML6VOVixLIPNdLSoT5Q65772O5l2T5OoG5lII5yQg6zglwSkNAbRcTUoaN8oC','v8oObSoYaq','W7HqwW','WOBcOvFdR8oQ','W7Wza0WSWRhcU2FcQSoS','WQZdQ0KPWQS','dCoPymoIhSktW5ns','44k45yIG5yUB6l6l5lIb','W4BdPZGwBa','WQ4jlXW','WP0MjsmC','WQZcMgO','W4ZdRKRcKW','WQNdJvC','5AE35AAu5OIy5AE7WO/KU63OPRpPHQVLPQBLIAFLIiW','W4NdJmox','wmkOWPKWW5i','WRavpX8LemkVha','DmoHkW','xHfEpq','zCknWR4GW54','W4BdOWSnxq','qSkPWO8H','WPrqkmoZySkYa2i','W7RdJrm0W6m','qCkSWOWcW4a','WQDnAq0','WPmfWOP8WQe','fGRcOXfz','FeFcHt0/','WRuLmZCe','CuHVFg3cRuBcVW','W4vbvcnu','W47dRdqiW6BdRxO','merEaSoJ','5yMt5yQI5Aw66lA9fSoZ','umoZWPXSW4K
|
2023-08-25 03:43:26 +08:00
|
|
|
|
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"])
|