-
Notifications
You must be signed in to change notification settings - Fork 541
/
jd_healthCheck.js
15 lines (10 loc) · 32.8 KB
/
jd_healthCheck.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/*
活动名称:账号健康检查 · 超级无线/超级会员
用于检测账号是否黑了,没有变量直接运行即可不适用一般活动
⚠ 请勿定时或频繁运行!
cron:1 1 1 1 * jd_healthCheck.js
*/
const $ = new Env('账号健康检查(超级无线/超级会员)')
var iil='jsjiami.com.v7';const ii1iiI=iii1II;(function(ill11l,I1lIiI,lllili,IliiiI,Ill11,liiIII,li1i11){return ill11l=ill11l>>0x6,liiIII='hs',li1i11='hs',function(iI11I1,il1i1l,IlIlll,IIIl1I,iil1ii){const i11il1=iii1II;IIIl1I='tfi',liiIII=IIIl1I+liiIII,iil1ii='up',li1i11+=iil1ii,liiIII=IlIlll(liiIII),li1i11=IlIlll(li1i11),IlIlll=0x0;const IlIlli=iI11I1();while(!![]&&--IliiiI+il1i1l){try{IIIl1I=-parseInt(i11il1(0x113,'mM%W'))/0x1*(-parseInt(i11il1(0x13f,'AlW@'))/0x2)+parseInt(i11il1(0x16d,'ecq5'))/0x3+parseInt(i11il1(0x1a6,'f(5p'))/0x4+-parseInt(i11il1(0x13e,'zhwW'))/0x5+parseInt(i11il1(0xe4,'cBUd'))/0x6*(parseInt(i11il1(0x17a,'AlW@'))/0x7)+-parseInt(i11il1(0x1ef,'3B]1'))/0x8*(parseInt(i11il1(0x1d5,'kEBZ'))/0x9)+parseInt(i11il1(0x106,'LB4Y'))/0xa*(-parseInt(i11il1(0x132,'zhwW'))/0xb);}catch(il1i1i){IIIl1I=IlIlll;}finally{iil1ii=IlIlli[liiIII]();if(ill11l<=IliiiI)IlIlll?Ill11?IIIl1I=iil1ii:Ill11=iil1ii:IlIlll=iil1ii;else{if(IlIlll==Ill11['replace'](/[pxIKBPQNWYOESXugGrJ=]/g,'')){if(IIIl1I===il1i1l){IlIlli['un'+liiIII](iil1ii);break;}IlIlli[li1i11](iil1ii);}}}}}(lllili,I1lIiI,function(lil111,i11ilI,ii1ii1,llllI,lllil1,iil1il,ilil1I){return i11ilI='\x73\x70\x6c\x69\x74',lil111=arguments[0x0],lil111=lil111[i11ilI](''),ii1ii1='\x72\x65\x76\x65\x72\x73\x65',lil111=lil111[ii1ii1]('\x76'),llllI='\x6a\x6f\x69\x6e',(0x162867,lil111[llllI](''));});}(0x2f00,0xf3252,Iii11l,0xbe),Iii11l)&&(iil=0x1c09);const jdCookie=require(ii1iiI(0x203,'*FMo')),common=require(ii1iiI(0x152,'[Lso')),notify=require('./utils/Rebels_sendJDNotify'),getToken=require(ii1iiI(0xff,'[Lso'));function iii1II(_0xb391f9,_0x449bfe){const _0x3d93e4=Iii11l();return iii1II=function(_0x5a59a7,_0xab104e){_0x5a59a7=_0x5a59a7-0xdf;let _0x5af8d4=_0x3d93e4[_0x5a59a7];if(iii1II['AYuefc']===undefined){var _0x20f383=function(_0x598a67){const _0x27bbaa='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3c4463='',_0x3261e2='';for(let _0x117fcb=0x0,_0x28f045,_0x4830b3,_0x5d297b=0x0;_0x4830b3=_0x598a67['charAt'](_0x5d297b++);~_0x4830b3&&(_0x28f045=_0x117fcb%0x4?_0x28f045*0x40+_0x4830b3:_0x4830b3,_0x117fcb++%0x4)?_0x3c4463+=String['fromCharCode'](0xff&_0x28f045>>(-0x2*_0x117fcb&0x6)):0x0){_0x4830b3=_0x27bbaa['indexOf'](_0x4830b3);}for(let _0x642393=0x0,_0x29521a=_0x3c4463['length'];_0x642393<_0x29521a;_0x642393++){_0x3261e2+='%'+('00'+_0x3c4463['charCodeAt'](_0x642393)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3261e2);};const _0x1e5711=function(_0x41bd76,_0x59b17b){let _0x156386=[],_0x241f6e=0x0,_0x142b03,_0x55d2c7='';_0x41bd76=_0x20f383(_0x41bd76);let _0x532fdb;for(_0x532fdb=0x0;_0x532fdb<0x100;_0x532fdb++){_0x156386[_0x532fdb]=_0x532fdb;}for(_0x532fdb=0x0;_0x532fdb<0x100;_0x532fdb++){_0x241f6e=(_0x241f6e+_0x156386[_0x532fdb]+_0x59b17b['charCodeAt'](_0x532fdb%_0x59b17b['length']))%0x100,_0x142b03=_0x156386[_0x532fdb],_0x156386[_0x532fdb]=_0x156386[_0x241f6e],_0x156386[_0x241f6e]=_0x142b03;}_0x532fdb=0x0,_0x241f6e=0x0;for(let _0x1604a8=0x0;_0x1604a8<_0x41bd76['length'];_0x1604a8++){_0x532fdb=(_0x532fdb+0x1)%0x100,_0x241f6e=(_0x241f6e+_0x156386[_0x532fdb])%0x100,_0x142b03=_0x156386[_0x532fdb],_0x156386[_0x532fdb]=_0x156386[_0x241f6e],_0x156386[_0x241f6e]=_0x142b03,_0x55d2c7+=String['fromCharCode'](_0x41bd76['charCodeAt'](_0x1604a8)^_0x156386[(_0x156386[_0x532fdb]+_0x156386[_0x241f6e])%0x100]);}return _0x55d2c7;};iii1II['icJRwk']=_0x1e5711,_0xb391f9=arguments,iii1II['AYuefc']=!![];}const _0x316039=_0x3d93e4[0x0],_0x2d0ec0=_0x5a59a7+_0x316039,_0x2194d9=_0xb391f9[_0x2d0ec0];return!_0x2194d9?(iii1II['tueVHL']===undefined&&(iii1II['tueVHL']=!![]),_0x5af8d4=iii1II['icJRwk'](_0x5af8d4,_0xab104e),_0xb391f9[_0x2d0ec0]=_0x5af8d4):_0x5af8d4=_0x2194d9,_0x5af8d4;},iii1II(_0xb391f9,_0x449bfe);}function Iii11l(){const liiIIi=(function(){return[iil,'gSjJpsGjuNiEaOmiWQ.GcIBPoEmYPN.rpvur7KxX==','vWWXsSoS','W7HiaM9AW5RdTq/dQv/cNmoD','WR3cUSoIWQVdTf3dIEw9JEwMVooaOEs4HEs4U+I1GUwnNa','h2xcSSowW5W','vhJdHaWE','WQXYoM51wmoxoG','WOlcHbVcQ1BdRNnaW71zWPW6W7H5fmkSWP7dHColWQSjwmoEWQzhWQ49WQzFW4BdP2ldOCk3bSkeuJhdGwpcQmoxW6OldLL/nLS8b8kHW6dcPq','hIBdOsdcRSkuF8kuW4i1','WO8tWQe3hCkkd8o3WOzoESkewHWJW6bmW4P3W7m','WRxcLuhcTMOsAq','rSkjWPjPW5BdLfddMSorvmkX','44kh5O6656EG44k/6k+b5ywa6i2o5y60imo0WP7dIJ/dGG','W73dNSkoWRzS','W77dKWe','WQ1PW7e','cSkJkJjzW7ZdLCkeW4FcRSk8','W6xdR8kZWPzceq','zCoFW6bJW6G','D35+EmkB','CG3cKq','sCoPW41xW60','W7SfWR0','DGFcL8ofjaHwp8koWONdKfm','edhdVsdcVmoEAq','W7VdSmkRWOKo6lEG57MQ5PA057URWQlIN5a','W4xdNCkjkMb8jXrUW7u','jmknW49QFa','WQH0rW7dObK','W4lcPCo0WPdcSHHWzWWKWPhcMa','hSkiW5G','W5v4WR3dPMXtsG','W7uLjIlcISoNWOJcIa','nvlcUmoFW4HnEmkt','B2vW','W58slcVcNG','aConaa','FSo5W4r2W5q','W5vRWQ52nG','44kn5O+Q56wk44cr6k+F5yEF6iYN5y6QW5LrWPtdK0NcGa','W74UDMhcPaPK','DZGQzmo7z8k+ceNcOCoP','xSkgomkFW7W','WRCwW61mWQ3dLSkXWRa','W5FcIuLzFq','DeVdJJCQ','W6qEWQJdH1HV','WQ50pG','W6HmWRSqW7pdU8krWR9sW5NdLq','W5NdOGWFku8QWONcLSoAAmkEpvZdHSkzW7juW4VdU8kimbjrWRldRWu','tbhcTCopfW','yq96W5JdVq','W4FcPubVEGWuWQJcRCoZFSky','wCohdSkRW4pcNSkC','W4/cTCoyWRqPeSkiW4H4','WPJdSmk5W5i','rIddMW','W5lcSConWQ8Rb8kSW4q','sZ7dQ8ooiW','W5nJWRRdHxjg','WOhcOSoWWRdcLJRcJbWgva','6lAR57IR5l655zgA4P6P','6lAm57Uf5PsP57UA4P2j','W4jLW5JcKZuZqmkdWOpdT8kMWP8','BgfHBmk1','W6vzWRzUhKKY','W5jjWRCGeCkvdW','EdlcMConja','W45HW43cNG','f8kZumoRf3RdOSk7','ydBcGG5K','5Q2k6iAw5P6p5lUh55Ae5lQb5QcC5REM6lwM5yY75PI55zoG6BUX5y2/772g6k2n5yUI6AoK57M86l626koJ776o','WOpcOSo7WRBdQuddKWSgzSoUyqy','W607W4XrWQldH8kS','W7GCBfNcPa','W5vFWOVcHSoZ','amoBW44UWRxdRfG','uHtcK8oaiG','rJldVmoBW6y','WOtdSaCRjK8','W78XgMy','ESoaW5fOW6O','W6xcS2Dbt8kmWO/cLSk6WQGPzq','4P2Oe+AEQ+IcIEASJoEIH+wMV+EqNKW','WO8YW5D2WOq','W75MWObYla','W4tdPmk6W6JcSbdcIISo','W5/dTc/cKSkN','WRZcRNFcVhu','ESoZkCkgWRJcQSkXsGhdRmoKW4rdW7xcLtZcPW','W6rzWQrPhK4wW5xcIa','WQqiW4rEzq','WO8tWQe3hCkkd8o3WOzoESkewHWJW55hW6j9W7bGoJq','WQHLrqJdSb5mW5FdNG','aCoyW4uBWOi','EHBcUWXRW4u','W4/dQCkBm3W','xHZcPSkxq8ocpa','WQVdPCkOW6xdOq','WPNcLqZcQudcOaWgW7a','W6aSWO3dQfq','rI45ECo1'].concat((function(){return['q8kagCk9','W6xdQmkX','5P2h6igF6i+q5y+s55s25OM56yQf5P+q5l6O5OcW772b','CGNcOSkUwG','gJhdUH7cPmoPzCktW5e','W6ZdUmkNWOhdNSov','W7RdS8kKaKTiesjE','vSoeAKW','WPtdR8kPW5hcRG9dtd8IWONcH8oCeSooWPFcPa','mCkLvSoRpg/dN8k3lq','WQiNW6bLCSknrmonwCkkahO','uIHjW5S','W5RcMSoIWPmj','W7pdQ8klWRldNW','W4JcIvq','WRZcIvNcHgmb','rSokDuJdQq','WRhcVSoVxXeAiGTmW5atCa','W45NW7JcLc8','t3FdSa0c','fmkQrCoSeG','BrBcL8oDjrm','WR0yW5DIWRu','W4HHW4RcMHqPFG','C23cLCkwWPm','W77dHG1rh+I2O+E6ToAxJEE7OGJINjS','W7fvfW','lSkVuG','WQmsW5XJWQq','W6bqWPdcP8oQ','W6ToW75gWQddM8kBWPO','W7SUmq3cLmkJ4P2XW5S','W6ZcUSoiWR45','W4zzWQawb8kddSkrWRPnDW','tmohfmk6','W6JdPmk1dLzCncTa','W5LLW5RcJsqVqSkpWP4','WRpcMZ3dHG','W4HLWQVdPwu','W49YW4VcKdm','WPNdVSkgW5hdMW','wHJdJ8o1W7C','W798WOBdTgW','vSo1BhyiW5FdVq','W6CKBNFcQ1a','lLNcQmogW5fD','u8oscCk+W6xdLSoFlchdK8olWOaSW5dcPWNdGI4ghclcH8ogqmoMW7LuW7CGkq5nCmk8W713Dc/cKLfjWO5UumoPgfvDgSov','sfZdPG','l8kLrSoQohZdQG','AsxdLSomlG','dmobe21Oj8kfW6OClsW','W7pdNXjssu9NvaHAoW','EGNcObvxW5FdOG','WRVcHIFdGConnmoP','kqldVqFcRq','uSoqmSkuW48','W70IzNNcQWXSFa','WPdcLslcK0y','mfpcVa','fSoiW44Q','WRjZAX/dUaH5W4W','W4tdTCkRW7pcUWpcSYqz','W7nBhwu','W4OeaWxcLq','W7fpWQP+kG','W7jpbezeW7BdTW','AHxcHSopgq','W74IhgJdLSkfzKRcLWScWRe','W7joWRv0cxCJW4/cLCk/xmkG','WPBdP8kYW47dSa','W5FdHcVcS8o/fSo8vWNcJ8kSW4T7WPdcLmozlq','nCkHxmoT','jCkLqColpgJdV8kXlCoJWOPilfRcHXXZ','W4/dRmkpWP7dTq','WQdcQeJdJSoHzCkprbFcQmkjWQ5T','W4VcUJ3cQLvQWRlcI8oIW7FdOq','Ct4Qqmo0xSkJh3S','WRLHvr/dGbHW','W4HOWRRdLwXg','WRNcIL3cIsBOT7BNUQNKVyZLKzddP+kFIa','4P+ThoAFVUEEPUIUG+AYPfW','W4NcLvq','W7NdPSktp00','WPtcTt3dUSop','WO/cGH3cTfFcMtKCW61sWPmM','WRKTW7TzAW','WQyTW6y','W4VcSCosWRi','bCohbMHQjSkJW7y6kIXD','W73dIrj9u0D0','kSkLvmo1lxpdNCk7mmoLWOn/','WPBdL0nOC8kJWPFcJa','WRpcMhFcH0i','W4mGbKpdHW','W5jiWQyQgSkb','qgD4vSkh','W5CkmuBdOCkBxgNcRsq','WQdWN5gAW5/OVPhOOjFNU4hMNBRdUG','vmoufmkPW7/cGG','W4bNWORcISoCwSki','E8kQk8kfW7dcS8oiWRNdGxpcVwK','eIhdQdZcHa','W7uLnIVcJCo3'].concat((function(){return['EZ4TFSoSACkV','AXVcNSoRkG','WRBcJ1i','W4pcG0DkF8kGWRVcQSkmWRSAnmoaWQS','DaSwxSok','W4HjfxjMW7BdVrK','aSoQW60qWP4','jCkLqCoAnNtdPmk3jSogWO5NnLa','W73cTZJcK1O','WRzNW7/cOq','v1BdOGykWP3dQ3ec','uaDLW4ZdKW','W5rPWOVdKMe','fdRdVtBcR8on','FhhcSSkBW4FOTjlNUi3KVj7LKQSW4P6P','W5ZdTmkZgwTofse','q1BdTtCaWOBdKhejftldOSovCq','W7ddR8k0WQ5xnCkKoJm','dSkFsmo5WQFcOCkwCc7dN8om','WOtORjhMSBhLPlJOTlxdR+kDJmoJ','WQK2W61Lsq','W4eFWQNdO1W','FqFcSreQW4RdUgScW7dcS1L6W5mwWPlcHeVdSs/cP8kVu8kEWOPJW7JdIwNdOstcOdLcW6LEW4jLk8kMW6ZdT8ooWPb/WQVdL8k/WO3dNhH5W4BdU2NdVsOKxe7dImknWRtdMmowWPqLWPSKumoDkGqlxmkMttfXqmkDCCozW4rBimkywmkdW6tdLSkDWPNcOwRdKf8OjLtdM8opxXP5WPxcP8oWWP9rgCoZW6qkzbb5f8kfWOVcMIOcmhGWBv3cSWGhtK4ZtG','nUIURoAWNowtGow4Ms4','stxdTSoFW7ldRCk4','WOXMW4VcKcWpA8kwWPxcV8klWRVcRCoFqcLIF8kiz8kYdmoVd8k9kSkT','W4tcOK1MEWjZWQdcN8orBmkMeW','WPRdU8kZW4tdSfS','WQ5HmM876lA857ID5PA/57MyWQ3INBW','oSo1dw5U','W6GXCY8Xe8kW','bCo0W6qeWO0','W6tdPCk6WRnd','qJVdImoUjrldNuOwkYFcRmovWOxdSSkiW7vmW7JdV8okhZKeiaddGMtdLZm','urJcPSkbD8oxnq','C2n5cq','W4vJWO3cRmoMr8kpWPdcPmktWOJdINJdPa','mv3cQW','WRhcHvdcGcSsyJ9+WQi','6lwC57Uy5PwU57Qy4P6p','W7LBbge','WR9WyZtdKG','iSoxW4agWQm','dZhdVJ/cVmoAAq','WQzyW67cLLnlWRuxmmoQ','etVdQq','xYDzW5/dKW','W6lcPXBdHmoni8o8','tv3dSHeDWP0','W4TWW4NcKYG4C8ksWPNdRCkKW4tcHCouqI1WimkNBmo9vSoXq8o+DCo4o1f4WRtcTH0','W5OqWR7dPu8','kSkQW7nxqYRcISkMWO/dSqlcQcTB','WRtcIvBcM0GsyZm','6lsV57QN5l6J5zkN4P2e','W7C1agddKmkG','WPNdOaayjLOK','W4fSWPhcLSkP6lAT57Md5l+J5zkzW6xIN6W','WQnPvZpcKmo9wxBcJWeDWPm','W6xcS2Dbt8kmWO/cLSk6WQGP','W74eWQldQMm','EsPSW6VdUW','W7RdSSk1cebCcW','W4pdV8kJW6tcSa','hCksW5LWBG','u3VdPdFcNSowy8kwW581','Cgf+rmkZuLC','W65CWQBcRSomE8k7WQNcImklW5q','W441aMxdKq','W74QnIVcQSoXWOe','W7SfWR3dQ0r6','W7pdOW3cLmkJhCoyBtBcQ8kpWOa','aCovW5yRWOldQKi','zH/cV8kSDa','W4dcNKn7rW','tmoXDNe','W6JcO8oHWOue','WQ0NW7vBy8kwzSohrmkmcu1/W64YW4pcPa','E3tcUCkxWORdSSoeCa','W63dR8kmWOPN','W5DcWQ7cPmoG','W6DQW5RcUZu','z8k4oSkpW40','qCkhWP5MW5BcOaBdR8ovASk2WP3dIG','eCkJW7foBG','W68/bwldIG','6lsy57QD5l2Q5zgy4P2K','CCk7kmkcW6S','cmkWW6vNFq','WQvPW7JcSa','W605eu/cPv8UW6tdOSoIW6RdQZi','WRNcLIddTmoamSoR','wcHqW58','WRpdOWeMbG','WQrqW4tcPqi','W7i7Dx7cRa5GBCkvqSkBW73dO243tW','Du/cLmk3WQu','FmovsW','W4RdQSk5cum','W6dcHrBcPMLPWOtcTCom','W6G7b3FdTSk9Bq','q1BdTsykWPRdI3CcmdBdJCopE8kVfCkJ'];}()));}()));}());Iii11l=function(){return liiIIi;};return Iii11l();};let cookie='',activityCookie='',originCookie='';const cookiesArr=Object[ii1iiI(0x12d,'mM%W')](jdCookie)[ii1iiI(0x1e8,'lrqc')](IiilI=>jdCookie[IiilI])[ii1iiI(0x16b,'KOuS')](ii1I11=>ii1I11);!cookiesArr[0x0]&&($['msg']($[ii1iiI(0xed,'(B1Q')],ii1iiI(0x11d,'QpmP')),process[ii1iiI(0x197,'cBUd')](0x1));!(async()=>{const lllilI=ii1iiI,liIi1={'cDNQY':lllilI(0x13d,']Lo0'),'Lveir':function(l1llI1,llIIll){return l1llI1!==llIIll;},'inxDU':'AWoGa','ttiLz':function(IillIi,lii){return IillIi(lii);},'zeMHc':'pt_pin','CUnuC':'\x20➜\x20'};notify['config']({'title':$[lllilI(0x19a,'QpmP')]}),console[lllilI(0x196,'lrqc')](liIi1[lllilI(0xe5,'cG)]')]);for(let IllI1i=0x0;IllI1i<cookiesArr[lllilI(0x1f9,'mJIJ')];IllI1i++){if(liIi1[lllilI(0x143,'^#i&')](lllilI(0xf7,'QszE'),liIi1[lllilI(0x1fe,'3B]1')]))l1lIl1+=lllilI(0x1a7,'uQZp')+IiiIlI['LZ_AES_PIN']+';\x20';else{$[lllilI(0x1f1,'(B1Q')]=IllI1i+0x1,cookie=cookiesArr[IllI1i],originCookie=cookiesArr[IllI1i],$[lllilI(0x1c8,'QpmP')]=liIi1[lllilI(0x109,'5G*J')](decodeURIComponent,common[lllilI(0x1d3,'6&&t')](cookie,liIi1[lllilI(0x195,'6R*X')])),$['UA']=common[lllilI(0x10b,']Lo0')]($[lllilI(0x13b,'F6[T')]),$['message']=notify['create']($[lllilI(0x144,'*M#*')],$['UserName']),$[lllilI(0x1f7,'KOuS')]='',console[lllilI(0x114,'cG)]')](lllilI(0xf9,'zhwW')+$['index']+'】'+($[lllilI(0x1f7,'KOuS')]||$[lllilI(0x1d2,'ecq5')])+lllilI(0x1e1,'dN57')),await Main();if($[lllilI(0x1fa,'WM%m')])break;}}const lI11II=notify['getMessage']();lI11II&&console[lllilI(0x176,'QpmP')](lllilI(0x1bd,'ZQ7F')+lI11II[lllilI(0x1ee,'*FMo')](/:/g,liIi1['CUnuC']));})()['catch'](lil=>$[ii1iiI(0x208,'3B]1')](lil))[ii1iiI(0x1db,'*M#*')](()=>$[ii1iiI(0xea,'@H8S')]());async function Main(){const ilil11=ii1iiI,IllI1l={'ctllO':ilil11(0x124,'3B]1'),'dpENG':'AUTH.FAILED.BLACK','VMYQG':ilil11(0x133,']Lo0'),'gPxrS':ilil11(0x18a,'kEBZ'),'fJYUE':'https://lzkj-isv.isvjd.com','wYriz':function(i11I1i,IillIl,llliil){return i11I1i(IillIl,llliil);},'EqOTl':'获取\x20Token\x20失败!','jTNUB':function(liIl1,II1lll){return liIl1(II1lll);},'aqWPu':function(II1lli,ii1I1I){return II1lli(ii1I1I);},'zWZxJ':ilil11(0x160,'*FMo'),'paETh':ilil11(0x15e,'Yj&1'),'CYiea':function(IiIl,IiIi){return IiIl===IiIi;},'Cmobf':function(iI1ll1,IlI1Il){return iI1ll1(IlI1Il);},'LfAxB':ilil11(0x1df,'dN57'),'YWxMA':'超级无线✅','KucAR':'fNXvx','ivOZY':ilil11(0x134,'7Hq5'),'eVRpX':ilil11(0xfd,'6R*X'),'BdKxI':ilil11(0x1e4,'(^&n'),'kWiKa':function(l1il1l,liIil){return l1il1l(liIil);},'aRZoj':function(IllI1I,liIii){return IllI1I(liIii);},'bPHSG':function(II1ll1,IlI1Ii){return II1ll1!==IlI1Ii;},'MzdKy':'TLrjF'};try{$[ilil11(0x204,'5G*J')]=![],$[ilil11(0x198,'ta1D')]=![],$['secretPin']='',activityCookie='';if($[ilil11(0x190,'7Hq5')]||$[ilil11(0x1fa,'WM%m')])return;$[ilil11(0x11f,'QszE')]=IllI1l['gPxrS'],$[ilil11(0x207,'5dBv')]=IllI1l[ilil11(0x168,'CbPR')],$['origin']=$[ilil11(0x1e5,'GO8w')],$[ilil11(0x201,'zhwW')]=await IllI1l[ilil11(0x141,'V0wm')](getToken,originCookie,$[ilil11(0x1a9,'ta1D')]);if(!$[ilil11(0x16c,'HzoN')]){if('lvOtt'===ilil11(0x174,'@ZWQ')){console[ilil11(0x12e,'(^&n')](IllI1l[ilil11(0x186,'JDoW')]);return;}else typeof Iliiil===IllI1l[ilil11(0x1d7,'$BIW')]&&li1Il===IllI1l[ilil11(0x1ec,'ta1D')]?i1IIl[ilil11(0x135,'ZQ7F')]=![]:I1lll1[ilil11(0x1b2,'$BIW')](''+i1IIi[ilil11(0x1b0,'6R*X')]);}await IllI1l[ilil11(0xf1,'@ZWQ')](getFirstLZCK,$['activityUrl']),await $[ilil11(0x17e,'kEBZ')](0x1f4),await IllI1l['aqWPu'](sendRequest,IllI1l[ilil11(0x1cb,'uQZp')]);if($[ilil11(0x100,'KOuS')])return;if(!$['secretPin']){console[ilil11(0x11a,'Yj&1')](IllI1l[ilil11(0x1ae,'ecq5')]);return;}else IllI1l[ilil11(0xfa,'lrqc')](ilil11(0x1d8,'3B]1'),'MACya')?Iii111['healthResult']=![]:($['secretPin']=IllI1l[ilil11(0x103,'!ADu')](encodeURIComponent,$['secretPin']),$[ilil11(0x135,'ZQ7F')]=!![],await $[ilil11(0x1a3,'F6[T')](0x1f4),await IllI1l[ilil11(0x1bb,'5G*J')](sendRequest,'getUserInfo'),$[ilil11(0x10d,'^#i&')]?(console[ilil11(0x105,'@H8S')](IllI1l[ilil11(0x1a5,'93F&')]),$[ilil11(0x10e,'*FMo')][ilil11(0x131,'JDoW')](IllI1l['YWxMA'])):IllI1l[ilil11(0x119,'5dBv')](ilil11(0x1ce,'(B1Q'),IllI1l['KucAR'])?(console[ilil11(0x114,'cG)]')](ilil11(0x175,'F[CV')),$[ilil11(0x1c3,'QszE')][ilil11(0x1d0,'*FMo')](IllI1l[ilil11(0x193,'kEBZ')])):Iliili[ilil11(0x1b2,'$BIW')](Iliill+'\x20'+IIII11));activityCookie='',$['secretPin']='',$[ilil11(0x18e,'Yj&1')]=IllI1l[ilil11(0xef,'@H8S')],$[ilil11(0x12b,'kEBZ')]=IllI1l['BdKxI'],$[ilil11(0x161,'93F&')]=$[ilil11(0x1e5,'GO8w')],await IllI1l[ilil11(0x130,'(^&n')](getFirstLZCK,$['activityUrl']),await $[ilil11(0x1cc,'@H8S')](0x1f4),await IllI1l[ilil11(0x140,'lO^E')](sendRequest,IllI1l[ilil11(0xe9,'cG)]')]);if($[ilil11(0x19d,'QpmP')])return;if(!$['secretPin']){console['log'](IllI1l[ilil11(0x169,'93F&')]);return;}else $[ilil11(0x159,'6R*X')]=IllI1l[ilil11(0xf3,'ecq5')](encodeURIComponent,IllI1l['aRZoj'](encodeURIComponent,$[ilil11(0x12c,'CbPR')])),$[ilil11(0x1c0,'W#dt')]=!![],await $[ilil11(0x20d,'LB4Y')](0x1f4),await IllI1l['aRZoj'](sendRequest,'getUserInfo'),$[ilil11(0x1b4,'Yj&1')]?IllI1l[ilil11(0x1c7,'QszE')](IllI1l[ilil11(0x1f5,'3B]1')],ilil11(0x147,']Lo0'))?(IiilII['log'](ilil11(0x1d1,'@ZWQ')),IliI1I[ilil11(0x11e,'lO^E')][ilil11(0x1f3,'6&&t')](IllI1l[ilil11(0x14a,'AlW@')])):(console[ilil11(0x15d,'ecq5')](ilil11(0x1fb,'V0wm')),$[ilil11(0x18c,'F6[T')][ilil11(0x1c2,'5dBv')](ilil11(0x1f8,'ZQ7F'))):(console[ilil11(0x177,'F6[T')](ilil11(0x1ab,'KOuS')),$[ilil11(0x191,')DL&')]['insert'](ilil11(0xe7,'QpmP')));await $[ilil11(0x1b3,'CbPR')](0x1f4);}catch(llliii){console['log'](llliii);}}async function handleResponse(IllI11,l1llIi){const illlI1=ii1iiI,II1llI={'IePiv':function(i11I11,l1llIl){return i11I11===l1llIl;},'jkFpY':function(ii1I1l,ii1I1i){return ii1I1l===ii1I1i;},'oufoY':function(llI,llliI){return llI===llliI;},'MIrvx':'ZGhvR','CjjRx':illlI1(0x1e0,'Yj&1'),'MjcDt':illlI1(0x155,'7Hq5'),'fCFVv':illlI1(0x158,'mM%W'),'tfGql':function(iI1li1,lllii1){return iI1li1===lllii1;}};try{switch(IllI11){case illlI1(0xf4,'uQZp'):if(l1llIi[illlI1(0x107,'!ADu')]&&II1llI[illlI1(0x14d,'f(5p')](l1llIi[illlI1(0x189,'lrqc')],!![]))$['secretPin']=l1llIi[illlI1(0x163,'HzoN')]?.[illlI1(0x199,'zhwW')],$[illlI1(0x194,'lO^E')]=l1llIi[illlI1(0x146,'mJIJ')]?.[illlI1(0xfc,'dN57')];else l1llIi['errorMessage']?console[illlI1(0x125,'dN57')](IllI11+'\x20'+l1llIi[illlI1(0x209,'f(5p')]):console[illlI1(0x15d,'ecq5')]('❓'+IllI11+'\x20'+JSON[illlI1(0x14c,'zhwW')](l1llIi));break;case'getUserInfo':const liIli=l1llIi?.['data'];if(l1llIi[illlI1(0x145,'WM%m')]&&II1llI[illlI1(0x184,'mM%W')](l1llIi[illlI1(0x1aa,'JDoW')],!![]))II1llI[illlI1(0x202,'cG)]')](II1llI[illlI1(0x120,'W#dt')],II1llI[illlI1(0x18d,'(^&n')])?I1iIiI[illlI1(0x1f0,'*FMo')]('❓'+li1I1+'\x20'+i1ilil[illlI1(0x162,'ecq5')](lilIii)):typeof liIli===II1llI[illlI1(0xe2,'ZQ7F')]&&II1llI[illlI1(0x1c1,'*FMo')](liIli,illlI1(0x14f,'kEBZ'))&&($[illlI1(0x1b6,'F6[T')]=![]);else l1llIi[illlI1(0xf8,'QpmP')]?illlI1(0x1b9,'mJIJ')===II1llI['fCFVv']?II1llI['tfGql'](typeof liIli,II1llI['MjcDt'])&&liIli===illlI1(0x1a2,'f(5p')?II1llI['IePiv'](illlI1(0x15a,'3B]1'),'OqdNp')?(IIliI[illlI1(0x10a,'^#i&')](ilI1ll),Iillii&&(Iillil['outFlag']=!![])):$[illlI1(0x166,'$BIW')]=![]:console[illlI1(0x1c5,'KOuS')](''+l1llIi[illlI1(0x19f,'mJIJ')]):(i1l1I[illlI1(0x180,'ZQ7F')]=IiilIi[illlI1(0x13a,'ZQ7F')]?.[illlI1(0x165,'F6[T')],IiilIl['nickname']=iii1Ii['data']?.[illlI1(0x121,'AlW@')]):console[illlI1(0x1c5,'KOuS')](IllI11+'\x20'+liIli);break;}}catch(l1lIiI){console[illlI1(0x11a,'Yj&1')]('❌\x20未能正确处理\x20'+IllI11+'\x20请求响应\x20'+(l1lIiI[illlI1(0x187,'LB4Y')]||l1lIiI));}}async function sendRequest(llliiI){const IIIl11=ii1iiI,IilIiI={'pKExq':'未能获取用户鉴权信息!','ixBwD':IIIl11(0x10f,'!ADu'),'VAUtE':IIIl11(0x1ea,'AlW@'),'zeLiI':IIIl11(0x15c,'W#dt'),'rhbEe':IIIl11(0x1a8,'QszE'),'vnbih':IIIl11(0x17d,'[Lso'),'iZGiW':IIIl11(0x1f6,'cG)]'),'btbko':function(IilIii,iI1lil){return IilIii<iI1lil;},'UfjHV':function(l1lIi1,iIli1l){return l1lIi1>iIli1l;},'Uelbu':function(i1i1II,liiIIl){return i1i1II===liiIIl;},'QggXD':IIIl11(0xe3,'W#dt'),'BViHc':function(iil1iI,IlIllI){return iil1iI!==IlIllI;},'dgYEv':IIIl11(0x111,'cG)]'),'dxprW':IIIl11(0x110,'ecq5'),'OcQQP':IIIl11(0x15f,'GO8w'),'BeTVV':IIIl11(0x192,'*FMo'),'WFGbV':IIIl11(0x1fd,'4pGz'),'okvXT':function(il1i1I,lI1li1,iI11II){return il1i1I(lI1li1,iI11II);},'TsZCH':function(iIII1I,ilil1i){return iIII1I>=ilil1i;},'VOFKj':IIIl11(0x1cf,'JDoW'),'fPodt':IIIl11(0x128,'^#i&'),'fexov':IIIl11(0x178,'AlW@')};if($['outFlag'])return;let i1i1I1='',IlII1=null,IiI11=null,lli=null,liIlI=IilIiI[IIIl11(0xe0,'!ADu')];switch(llliiI){case IilIiI[IIIl11(0x154,'cBUd')]:i1i1I1=$[IIIl11(0x173,'ZQ7F')]+'/customer/getMyPing',IlII1=IIIl11(0x188,'lO^E')+$[IIIl11(0xe6,'mJIJ')]+IIIl11(0x1dc,'ZQ7F');break;case IilIiI['vnbih']:i1i1I1=$[IIIl11(0x1bf,'V0wm')]+IIIl11(0x127,'WM%m'),IlII1=IIIl11(0x1e6,'5G*J')+$[IIIl11(0x150,'7d*J')];break;default:console[IIIl11(0x11a,'Yj&1')](IIIl11(0x1ac,'[Lso')+llliiI);return;}const lll={'url':i1i1I1,'method':liIlI,'headers':{'Origin':$[IIIl11(0x1be,'kEBZ')],'Accept':IIIl11(0xf0,'lO^E'),'Accept-Encoding':'gzip,\x20deflate,\x20br','Accept-Language':'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7,en-GB;q=0.6','Connection':IIIl11(0x1e9,'KOuS'),'Content-Type':IIIl11(0x1f4,'ZQ7F'),'Cookie':activityCookie,'User-Agent':$['UA'],'X-Requested-With':IilIiI[IIIl11(0x14b,'7d*J')],'Referer':$[IIIl11(0x18f,'F[CV')]},'data':IlII1,'timeout':0x7530},llli1=0x5;let iIli1i=0x0,iI1lii=null;while(IilIiI[IIIl11(0xe8,'W#dt')](iIli1i,llli1)){IilIiI[IIIl11(0x20b,'GO8w')](iIli1i,0x0)&&(IilIiI[IIIl11(0x206,'mJIJ')](IIIl11(0x19e,'^#i&'),IilIiI[IIIl11(0x1ed,'cBUd')])?await $['wait'](0x3e8):lIIiiI[IIIl11(0xec,')DL&')]=!![]);const IlIIi=await common[IIIl11(0x20a,'cBUd')](lll);if(!IlIIi[IIIl11(0x200,'ecq5')]){iI1lii=llliiI+IIIl11(0x1d6,'4pGz')+IlIIi[IIIl11(0x183,'ZQ7F')],iIli1i++;IlIIi['status']&&([0x193,0x1ed][IIIl11(0x116,'5dBv')](IlIIi[IIIl11(0x171,'^#i&')])&&(ipBlack=!![]));continue;}if([IIIl11(0x17f,'ecq5'),'accessLogWithAD'][IIIl11(0x117,'lrqc')](llliiI))break;if(!IlIIi[IIIl11(0x167,'(B1Q')]){if(IilIiI[IIIl11(0x1af,')DL&')](IIIl11(0x170,'F6[T'),IilIiI[IIIl11(0x172,'AlW@')])){II11Il[IIIl11(0x10c,'3B]1')](IilIiI[IIIl11(0xfb,'6&&t')]);return;}else{iI1lii=llliiI+'\x20请求失败\x20➜\x20无响应数据',iIli1i++;continue;}}const IiI1l=common[IIIl11(0x1a4,'F6[T')](IlIIi,activityCookie);let illlII='';switch(llliiI){case IilIiI[IIIl11(0x182,'JDoW')]:illlII=common[IIIl11(0x1e7,'V0wm')](IiI1l,IilIiI[IIIl11(0x20c,'4pGz')]);illlII?$['LZ_AES_PIN']=illlII:$['skipRun']=!![];break;}llliiI===IIIl11(0x1d4,'!ADu')&&(activityCookie=common[IIIl11(0xf6,'6&&t')](IlIIi,activityCookie));illlII=common[IIIl11(0x1c6,'4pGz')](activityCookie,'LZ_AES_PIN');!illlII&&$['LZ_AES_PIN']&&(IilIiI['BViHc'](IilIiI[IIIl11(0x1ff,'(B1Q')],IilIiI['BeTVV'])?activityCookie+=IIIl11(0x205,'V0wm')+$[IIIl11(0x1bc,'mJIJ')]+';\x20':Ii1iII[IIIl11(0x104,'F[CV')](''+l1i11I[IIIl11(0x1a0,'7d*J')]));const iIII11=common[IIIl11(0x1ca,'F6[T')](activityCookie,IilIiI[IIIl11(0x129,'(B1Q')]);!iIII11&&$[IIIl11(0x153,'ta1D')]&&(activityCookie+=IIIl11(0x148,'4pGz')+$[IIIl11(0x1cd,'6&&t')]+';\x20');await IilIiI[IIIl11(0x136,'5G*J')](handleResponse,llliiI,IlIIi['data']),ipBlack=![];break;}IilIiI[IIIl11(0x20e,'CbPR')](iIli1i,llli1)&&(ipBlack&&(IilIiI['Uelbu'](IilIiI[IIIl11(0x19b,'5dBv')],IilIiI[IIIl11(0x139,'^#i&')])?lilIll[IIIl11(0x16a,'4pGz')](IIIl11(0x149,'6&&t')+l1i111+IIIl11(0x1da,'QszE')+(iliII1[IIIl11(0x157,'GO8w')]||II11I1)):!hotbreak&&(IilIiI[IIIl11(0x179,'V0wm')](IilIiI['fexov'],IilIiI['fexov'])?(II1Ii['log'](IilIiI[IIIl11(0x1b8,'KOuS')]),i1ii['message'][IIIl11(0x1de,'mM%W')](IilIiI['VAUtE'])):$[IIIl11(0x115,'JDoW')]=!![])),console[IIIl11(0x118,'5G*J')](iI1lii));}async function getFirstLZCK(lil11i){const I1lIi1=ii1iiI,IlIIl={'sozPm':function(lllil,iI11Il){return lllil===iI11Il;},'KPmWa':I1lIi1(0x1ba,'[Lso'),'nJEWc':I1lIi1(0x1a2,'f(5p'),'RMTnz':I1lIi1(0xf2,'LB4Y'),'vDCZj':I1lIi1(0x1d9,'7Hq5'),'kzjjR':'keep-alive','bzEwX':I1lIi1(0xdf,'@ZWQ'),'fNBLs':I1lIi1(0x12f,'CbPR'),'Pjsxu':I1lIi1(0xfe,'*FMo'),'rjffe':function(iIII1i,iil1i1){return iIII1i<iil1i1;},'uDWKi':function(il1i11,IlIll1){return il1i11!==IlIll1;},'iTKka':I1lIi1(0x108,']Lo0'),'oyPXd':function(IlIII,ilil1l){return IlIII>ilil1l;},'Pugtx':I1lIi1(0x16e,'ZQ7F'),'EvuxL':I1lIi1(0x123,'6&&t'),'BWimM':I1lIi1(0x156,'ecq5'),'kDqym':function(illlIi,I1lIii){return illlIi>=I1lIii;}};$['skipRun']=!![];const lI1liI={'url':lil11i,'method':IlIIl['RMTnz'],'headers':{'Accept':IlIIl[I1lIi1(0x1e2,'cBUd')],'Accept-Encoding':I1lIi1(0x164,'mM%W'),'Accept-Language':'zh-CN,zh;q=0.9','Connection':IlIIl['kzjjR'],'Sec-Fetch-Dest':IlIIl['bzEwX'],'Sec-Fetch-Mode':IlIIl[I1lIi1(0x14e,'KOuS')],'Sec-Fetch-Site':IlIIl[I1lIi1(0x17c,'CbPR')],'Referer':lil11i,'User-Agent':$['UA']},'timeout':0x7530},i1i1Ii=0x3;let lllii=0x0,iI11Ii=null,iIII1l=![];while(IlIIl['rjffe'](lllii,i1i1Ii)){if(IlIIl[I1lIi1(0x185,'*M#*')](IlIIl[I1lIi1(0x13c,'7Hq5')],I1lIi1(0x19c,'7d*J'))){IlIIl['oyPXd'](lllii,0x0)&&(IlIIl['sozPm'](IlIIl[I1lIi1(0x15b,'QszE')],IlIIl[I1lIi1(0x11b,']Lo0')])?await $['wait'](0x3e8):lIIiii['outFlag']=!![]);const IiI1I=await common[I1lIi1(0x137,'7d*J')](lI1liI);if(!IiI1I[I1lIi1(0x138,'[Lso')]){iI11Ii=I1lIi1(0x17b,'5dBv')+IiI1I[I1lIi1(0x1a1,'mM%W')],lllii++;IiI1I[I1lIi1(0x112,'ta1D')]&&([0x193,0x1ed]['includes'](IiI1I['status'])&&(IlIIl[I1lIi1(0xe1,'V0wm')](IlIIl[I1lIi1(0xee,'WM%m')],I1lIi1(0x1c4,'^#i&'))?iIII1l=!![]:(lilIl1[I1lIi1(0x1ad,'4pGz')](i1l1ii['name'],I1lIi1(0x102,'3B]1')),i1l1[I1lIi1(0x181,')DL&')](0x1))));continue;}if(!IiI1I[I1lIi1(0x1eb,'QpmP')]){if(IlIIl[I1lIi1(0x122,'4pGz')](I1lIi1(0x1c9,'cBUd'),IlIIl[I1lIi1(0x11c,'7d*J')]))IlIIl[I1lIi1(0x1e3,'!ADu')](typeof iliIII,IlIIl['KPmWa'])&&IlIIl[I1lIi1(0x1b1,'$BIW')](iIIl1i,IlIIl[I1lIi1(0x151,'$BIW')])&&(ill111['healthResult']=![]);else{iI11Ii='getCk\x20➜\x20无响应数据',lllii++;continue;}}activityCookie=common[I1lIi1(0x20f,'$BIW')](IiI1I),$[I1lIi1(0xf5,'mJIJ')]=![];break;}else llIllI[I1lIi1(0x142,'cBUd')]=!![];}IlIIl[I1lIi1(0x16f,'6&&t')](lllii,i1i1Ii)&&(console[I1lIi1(0x18b,'6&&t')](iI11Ii),iIII1l&&($[I1lIi1(0x1b5,'F[CV')]=!![]));}var version_ = 'jsjiami.com.v7';
// prettier-ignore
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"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) }