faker3/jd_shopping_red.js
2024-06-28 15:57:23 +08:00

14 lines
33 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
逛商品赢红包
可能会403 请使用代理
cron:1 1 1 1 *
*/
const $ = new Env('逛商品赢红包')
var il='jsjiami.com.v7';const ii1ill=iii1II;(function(l1iIII,llI1I1,IlIlil,lIli1I,II1il,lllI11,I1lIll){return l1iIII=l1iIII>>0x5,lllI11='hs',I1lIll='hs',function(I1lIli,II1ii,IIIIII,lillII,ii1ilI){const I1lIlI=iii1II;lillII='tfi',lllI11=lillII+lllI11,ii1ilI='up',I1lIll+=ii1ilI,lllI11=IIIIII(lllI11),I1lIll=IIIIII(I1lIll),IIIIII=0x0;const lI1ll1=I1lIli();while(!![]&&--lIli1I+II1ii){try{lillII=-parseInt(I1lIlI(0x1a4,'pk8y'))/0x1+-parseInt(I1lIlI(0x165,'v]ub'))/0x2*(-parseInt(I1lIlI(0x1d3,'KsfK'))/0x3)+parseInt(I1lIlI(0x24a,'T%q['))/0x4+parseInt(I1lIlI(0x1ab,'KsfK'))/0x5+-parseInt(I1lIlI(0x150,'v]ub'))/0x6*(parseInt(I1lIlI(0x1dd,'J4uS'))/0x7)+-parseInt(I1lIlI(0x1f9,'U[a@'))/0x8+-parseInt(I1lIlI(0x154,'T9v4'))/0x9*(-parseInt(I1lIlI(0x22b,'LVdF'))/0xa);}catch(iIiI1){lillII=IIIIII;}finally{ii1ilI=lI1ll1[lllI11]();if(l1iIII<=lIli1I)IIIIII?II1il?lillII=ii1ilI:II1il=ii1ilI:IIIIII=ii1ilI;else{if(IIIIII==II1il['replace'](/[XAUIbTxVMEqRJthBuLGHK=]/g,'')){if(lillII===II1ii){lI1ll1['un'+lllI11](ii1ilI);break;}lI1ll1[I1lIll](ii1ilI);}}}}}(IlIlil,llI1I1,function(liil1I,i11ii1,IlIliI,l1iII1,iiill1,lIli1i,IIIII1){return i11ii1='\x73\x70\x6c\x69\x74',liil1I=arguments[0x0],liil1I=liil1I[i11ii1](''),IlIliI=`\x72\x65\x76\x65\x72\x73\x65`,liil1I=liil1I[IlIliI]('\x76'),l1iII1=`\x6a\x6f\x69\x6e`,(0x174696,liil1I[l1iII1](''));});}(0x1860,0xbea34,Iii11l,0xc5),Iii11l)&&(il=ii1ill(0x218,'T%q['));const jdCookie=require(ii1ill(0x1a9,'%spH')),notify=require(ii1ill(0x147,'z[j4')),common=require(ii1ill(0x24c,'JLrS')),{H5st}=require('./utils/Rebels_H'),isNotify=![];let cookie='',activityId=ii1ill(0x234,'KEOf'),workflowId='5b7b7ba0683542e3838798b04e2d8e92',pageId=ii1ill(0x1fe,'T9v4');const cookiesArr=Object[ii1ill(0x22e,'$7SA')](jdCookie)['map'](iil1iI=>jdCookie[iil1iI])[ii1ill(0x13a,'!tX^')](IlIllI=>IlIllI);!cookiesArr[0x0]&&($[ii1ill(0x245,'x#Xz')]($['name'],ii1ill(0x12f,'(8Jp')),process[ii1ill(0x175,'Wt8v')](0x1));!(async()=>{const II1iI=ii1ill,il1i1I={'UCghP':function(lI1li1,iI11II){return lI1li1<iI11II;},'DYXPI':function(iIII1I,ilil1i){return iIII1I(ilil1i);},'sDYkw':II1iI(0x1da,'!tX^'),'kbfYR':II1iI(0x179,'LVdF'),'VPxEn':II1iI(0x18c,'lB@6'),'jGRuy':function(IlIIi){return IlIIi();},'CAfrm':function(IiI1l,illlII){return IiI1l!==illlII;},'FNlqi':II1iI(0x1c6,'%spH')};notify['config']({'title':$[II1iI(0x1b9,'mB]8')]});for(let iIII11=0x0;il1i1I['UCghP'](iIII11,cookiesArr[II1iI(0x1f2,'JkO6')]);iIII11++){$[II1iI(0x232,'v]ub')]=iIII11+0x1,cookie=cookiesArr[iIII11],common['setCookie'](cookie),$[II1iI(0x185,'YOST')]=il1i1I['DYXPI'](decodeURIComponent,common['getCookieValue'](cookie,il1i1I[II1iI(0x1c1,'TKJl')])),$['message']=notify['create']($[II1iI(0x18a,'CvlS')],$[II1iI(0x17f,'J4uS')]),$[II1iI(0x1d6,'v]ub')]='',console['log']('\x0a******开始【京东账号'+$['index']+'】'+($[II1iI(0x192,'%spH')]||$[II1iI(0x185,'YOST')])+II1iI(0x182,'Q(Qb')),$['UA']=common[II1iI(0x254,'Zrhq')]($[II1iI(0x1e1,'Wt8v')]),$[II1iI(0x162,'U[a@')]=common[II1iI(0x173,'#xyk')](0x5a,il1i1I[II1iI(0x1ee,'O*FK')])['toUpperCase'](),$['fp']=common[II1iI(0x229,'z[j4')](0x20,il1i1I[II1iI(0x231,'ENA)')]),await il1i1I[II1iI(0x188,'TKJl')](Main),common['unsetCookie']();if($[II1iI(0x23c,'LI[q')])break;await $[II1iI(0x1d2,'Uvcw')](0x3e8);}isNotify&&notify[II1iI(0x1dc,'LVdF')]()&&(il1i1I[II1iI(0x22a,'T9v4')](il1i1I[II1iI(0x1a2,'x#Xz')],II1iI(0x1b2,'mon4'))?await notify[II1iI(0x140,'Q(Qb')]():lilIll['log']('['+l1i111[II1iI(0x1cc,'KEOf')]+']'+iliII1['msg']+II1iI(0x12d,'x#Xz')+II11I1[II1iI(0x1f3,')VLA')]['successRewards']['4'][0x0]['discount']+Iii11I[II1iI(0x1bd,'p!yH')][II1iI(0x1fc,'%spH')]['4'][0x0][II1iI(0x253,'O*FK')]));})()[ii1ill(0x191,'W]$P')](llll1=>$[ii1ill(0x172,'KsfK')](llll1))[ii1ill(0x1f0,'Q(Qb')](()=>$[ii1ill(0x16f,'sdMj')]());async function Main(){const llI1II=ii1ill,lil11l={'MINxc':llI1II(0x258,'x#Xz'),'mqFJm':function(I1lIl1,lil11i){return I1lIl1===lil11i;},'bPVYq':llI1II(0x21f,'SB1a'),'MMapv':function(IlIIl,lI1liI){return IlIIl!==lI1liI;},'BzOtd':llI1II(0x164,'Q(Qb'),'NKQJv':function(i1i1Ii){return i1i1Ii();}},i1i1Il=await common[llI1II(0x1c9,'LI[q')](cookie);if(!i1i1Il&&lil11l['mqFJm'](typeof i1i1Il,lil11l[llI1II(0x14e,'O*FK')])){if(lil11l[llI1II(0x1db,'J4uS')](lil11l[llI1II(0x23b,'mB]8')],llI1II(0x244,'Wt8v')))ll1ll['body'][llI1II(0x1ca,'JLrS')]=!![],delete Illl11[llI1II(0x1fa,'CvlS')][llI1II(0x1bf,'wBw)')],delete ii1lI['body'][lil11l['MINxc']];else{console[llI1II(0x21a,'[*c7')](llI1II(0x174,'pk8y'));return;}}try{if(lil11l[llI1II(0x186,'pk8y')](llI1II(0x1ff,'TKJl'),llI1II(0x19a,'(8Jp'))){$[llI1II(0x227,'pk8y')]=![],await doTask();if($[llI1II(0x178,'JpRB')])return;await lil11l[llI1II(0x1e0,'z[j4')](lottery),await $[llI1II(0x1be,')VLA')](0x3e8),await $[llI1II(0x17c,'KEOf')](0x3e8);}else lilii[llI1II(0x208,'sdMj')][llI1II(0x14f,'p!yH')]=!![];}catch(iIII1l){console[llI1II(0x13c,'#xyk')]('❌\x20脚本运行遇到了错误\x0a'+iIII1l);}}function iii1II(_0xfa7aa5,_0x1d865e){const _0x18b0c2=Iii11l();return iii1II=function(_0x2bc519,_0x1c1e00){_0x2bc519=_0x2bc519-0x12d;let _0x526d0c=_0x18b0c2[_0x2bc519];if(iii1II['HwEzLa']===undefined){var _0x2dc41e=function(_0x23f49a){const _0x123103='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x389455='',_0x25d271='';for(let _0x46c899=0x0,_0x37e379,_0x3a2dbc,_0x25470f=0x0;_0x3a2dbc=_0x23f49a['charAt'](_0x25470f++);~_0x3a2dbc&&(_0x37e379=_0x46c899%0x4?_0x37e379*0x40+_0x3a2dbc:_0x3a2dbc,_0x46c899++%0x4)?_0x389455+=String['fromCharCode'](0xff&_0x37e379>>(-0x2*_0x46c899&0x6)):0x0){_0x3a2dbc=_0x123103['indexOf'](_0x3a2dbc);}for(let _0x479be2=0x0,_0x504820=_0x389455['length'];_0x479be2<_0x504820;_0x479be2++){_0x25d271+='%'+('00'+_0x389455['charCodeAt'](_0x479be2)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x25d271);};const _0x2444c5=function(_0x5e319f,_0x4d039a){let _0x1819f7=[],_0x18747f=0x0,_0x587548,_0x3c741d='';_0x5e319f=_0x2dc41e(_0x5e319f);let _0x507abe;for(_0x507abe=0x0;_0x507abe<0x100;_0x507abe++){_0x1819f7[_0x507abe]=_0x507abe;}for(_0x507abe=0x0;_0x507abe<0x100;_0x507abe++){_0x18747f=(_0x18747f+_0x1819f7[_0x507abe]+_0x4d039a['charCodeAt'](_0x507abe%_0x4d039a['length']))%0x100,_0x587548=_0x1819f7[_0x507abe],_0x1819f7[_0x507abe]=_0x1819f7[_0x18747f],_0x1819f7[_0x18747f]=_0x587548;}_0x507abe=0x0,_0x18747f=0x0;for(let _0x406a3c=0x0;_0x406a3c<_0x5e319f['length'];_0x406a3c++){_0x507abe=(_0x507abe+0x1)%0x100,_0x18747f=(_0x18747f+_0x1819f7[_0x507abe])%0x100,_0x587548=_0x1819f7[_0x507abe],_0x1819f7[_0x507abe]=_0x1819f7[_0x18747f],_0x1819f7[_0x18747f]=_0x587548,_0x3c741d+=String['fromCharCode'](_0x5e319f['charCodeAt'](_0x406a3c)^_0x1819f7[(_0x1819f7[_0x507abe]+_0x1819f7[_0x18747f])%0x100]);}return _0x3c741d;};iii1II['XRCsta']=_0x2444c5,_0xfa7aa5=arguments,iii1II['HwEzLa']=!![];}const _0x1cb0b6=_0x18b0c2[0x0],_0x176b7c=_0x2bc519+_0x1cb0b6,_0x8a1da4=_0xfa7aa5[_0x176b7c];return!_0x8a1da4?(iii1II['gPALtU']===undefined&&(iii1II['gPALtU']=!![]),_0x526d0c=iii1II['XRCsta'](_0x526d0c,_0x1c1e00),_0xfa7aa5[_0x176b7c]=_0x526d0c):_0x526d0c=_0x8a1da4,_0x526d0c;},iii1II(_0xfa7aa5,_0x1d865e);}async function doTask(){const lIli1l=ii1ill,lllil={'NkHnQ':function(iI11Il,iIII1i){return iI11Il(iIII1i);},'WrVOB':lIli1l(0x1b6,'W]$P'),'xcxyT':function(iil1i1,il1i11){return iil1i1===il1i11;},'shQxY':lIli1l(0x248,'f[t$'),'ANYbK':lIli1l(0x168,'$7SA'),'uexgk':function(IlIll1,IlIII){return IlIll1===IlIII;},'CJIIK':lIli1l(0x1f4,'6!iV'),'EaXFF':function(ilil1l,illlIi){return ilil1l>=illlIi;},'OjPig':function(I1lIii,IiI1I){return I1lIii!=IiI1I;},'HBswF':lIli1l(0x1ed,'KEOf')};console['log'](lIli1l(0x20b,'^hrH')),$['qryH5BabelFloors']='',await lllil['NkHnQ'](sendRequest,lllil[lIli1l(0x176,'Q(Qb')]);if($[lIli1l(0x18d,'LI[q')]){let illlIl=$[lIli1l(0x1fb,'#xyk')][lIli1l(0x1e5,'p!yH')]['assignmentList']||[];for(let i11ill of illlIl){if(lllil[lIli1l(0x1bb,'yD]b')](lllil[lIli1l(0x195,'pk8y')],lllil['shQxY'])){const IIIIIi=i11ill[lIli1l(0x221,'%spH')][lIli1l(0x25b,'CvlS')]||0x0,IIIIIl=i11ill[lIli1l(0x252,'aHXA')]||![],I1lIil=i11ill['ext'][lIli1l(0x1c4,'Q(Qb')]||'',IIIl1i=i11ill[lIli1l(0x1f7,'(8Jp')],liiII1=i11ill[lIli1l(0x19e,'ENA)')];$['assignmentName']=i11ill['assignmentName'],console[lIli1l(0x1c5,'J4uS')]('['+$[lIli1l(0x1ad,'J4uS')]+']\x20'+IIIl1i+'/'+liiII1);if(!IIIIIl){if(IIIIIi===0x9&&I1lIil===lIli1l(0x189,'O*FK')){const IIIl1l=i11ill[lIli1l(0x132,'wBw)')]['waitDuration']||0x0;$[lIli1l(0x25a,'CvlS')]=i11ill[lIli1l(0x1b5,'v]ub')]||'',$['advId']=i11ill[lIli1l(0x1b4,'LVdF')]['shoppingActivity'][0x0][lIli1l(0x1ef,'KEOf')]||'',$['action']=0x1,await sendRequest(lIli1l(0x131,'v]ub')),await $['wait'](IIIl1l*0x3e8),$['action']=0x0,await sendRequest(lllil[lIli1l(0x17a,'96fk')]);}else{if(IIIIIi===0x9&&I1lIil==='customMaterial'){const lllll=i11ill['ext'][lIli1l(0x1b7,'XYO7')]||0x0;$[lIli1l(0x16a,'yD]b')]=i11ill[lIli1l(0x152,'f[t$')]||'',$[lIli1l(0x1cd,'W]$P')]='1',$['action']=0x1,await lllil[lIli1l(0x1cf,'x#Xz')](sendRequest,lllil['ANYbK']),await $['wait'](lllll*0x3e8),$[lIli1l(0x1aa,'pk8y')]=0x0,await sendRequest(lllil['ANYbK']);}else{if(IIIIIi===0x8&&lllil[lIli1l(0x1ce,'JfNg')](I1lIil,'productsInfo')){if(lllil[lIli1l(0x17b,'JLrS')]!==lIli1l(0x19b,'p!yH')){const i11ili=i11ill[lIli1l(0x167,'Zrhq')]['waitDuration']||0x0,iil1l1=i11ill[lIli1l(0x12e,'!tX^')]['productsInfo']||[];$[lIli1l(0x1f6,'96fk')]=i11ill[lIli1l(0x249,'mon4')]||'',$['completionCnt']=IIIl1i;for(let lllli of iil1l1){if(lllil['EaXFF']($[lIli1l(0x203,'JpRB')],liiII1))break;const iiili1=lllli[lIli1l(0x134,'p!yH')];if(lllil[lIli1l(0x16e,'lB@6')](iiili1,0x2)){const ill11i=lllil[lIli1l(0x239,'mon4')]['split']('|');let lllill=0x0;while(!![]){switch(ill11i[lllill++]){case'0':$[lIli1l(0x171,'%spH')]=0x0;continue;case'1':$[lIli1l(0x209,'JLrS')]++;continue;case'2':$[lIli1l(0x199,'YOST')]=0x1;continue;case'3':await lllil[lIli1l(0x1ac,'YOST')](sendRequest,lIli1l(0x216,'Wt8v'));continue;case'4':await sendRequest(lIli1l(0x22d,'dydU'));continue;case'5':$[lIli1l(0x1e4,'LI[q')]=lllli[lIli1l(0x15b,'^hrH')];continue;case'6':await $['wait'](i11ili*0x3e8);continue;}break;}}if($[lIli1l(0x1d7,'aHXA')])break;}}else llIIli['message'][lIli1l(0x133,'Zrhq')](lIII1I);}}}}if($[lIli1l(0x230,'T9v4')])break;}else{IiilI1[lIli1l(0x24d,'Uvcw')]('账号无效');return;}}}}async function lottery(){const lillIi=ii1ill,lllili={'ftqSO':function(IliiiI,Ill11){return IliiiI(Ill11);},'uJQPg':function(liiIII,li1i11){return liiIII!==li1i11;},'PbQHL':lillIi(0x17e,'wBw)')};$[lillIi(0x194,'JpRB')]='',await lllili[lillIi(0x14c,'6!iV')](sendRequest,'qryH5BabelFloors');if($[lillIi(0x149,'mB]8')]&&$[lillIi(0x15c,'U[a@')][lillIi(0x19c,'SB1a')]){let iI11I1=$[lillIi(0x16d,'JfNg')]['lotteryConfigs'];if(iI11I1['chances']!==undefined&&lllili['uJQPg'](iI11I1['used'],undefined)){let il1i1l=iI11I1[lillIi(0x1c3,'lB@6')]-iI11I1[lillIi(0x15f,'aHXA')];console['log']('可以抽奖'+il1i1l+'次');for(let IlIlll=0x0;IlIlll<il1i1l;IlIlll++){$[lillIi(0x224,'TKJl')]=0x2,await lllili['ftqSO'](sendRequest,lllili['PbQHL']),await $['wait'](0xbb8);}}}}function Iii11l(){const liil1i=(function(){return[...[il,'JbBjGUsjbLHiHxaABmui.TcqGomtR.EvX7hVItKM==','WRruztvMWOr4W7VdOhNdSwBcLGP5W4WNWR8Z','C8kYW4JdKxj7qCoVWQRdV8oBW5ddRG','4P2mWQdMNj7OG7ZMRRNNOltLPB3NKy/dPa','mCkWathdR2njFCkNztHAiJ4','W6/cQ8o2WPi','yCoIu8kMWOfaW6BcIfFdPCoEEea2W5mm','BMyUW7lcN8oAkmoZimkgWQ3cPvFdGG','WOldHve','s0BdL31ZwmkR','W6CDzCoWW7C','W6hcQ8o1','BJm6','5OQT5lQ977YW','kNS6hw7cV8kXWRnZW6NdKmo/W7G','W73cPCoGWOPtWQekWQRdL8o3','D8o1xSkMWOfXW7m','mCkbrMa','jt7cISonWPG','AJuMWPe','W6bqW5VcSSkfzSkUW43dGSoWfXHV','W7JORB7MSz/LKBxLURPr','5BYY5AA35ycP5lQ05yQf6Ak/57Md5y2E','W4Sjt3bsdSofbxhcSCoNlq','W4FdRmoy','W5ldQSonW5W','vfL4WOKyWRiFECkwcdpcTCoq','obxcNSolWO4','prRcIa8Q','wSkRWPXgWQmyW69znHCSzsddNGpcKa','WRXFDtr+WPnP','jSkQfmkaWQpcH8oBW7rWW7Wpm1/cKa','W7/cOCoJWP5BWQe6','m1z6imoTg282WOaVcSoUw2aaW7/dS8oiWPyEaq','ysKoWODIWQ7dHq','WQ4qAWPCW7RdNSombwilWPrnW4K','W4rdW7iqlCoEvmoqCG','WPpdOXa','W7ddVgtcGmoDdSoEWQm','WP0VWP7cQYm','W7b3WRRcM8oa','EWuL','W5JcNXddHmk/gt8','W4zOWQlcRCoIWOr3wLf5tJRdMwldJW7cLJ/cP8koWO3cSCkLmmklmSohWPBcIvmbW5lcGW','EgS5','WPe6WPHLxW','vSolo8obW4FcHG','W5WUDSoAW7FcOq','WRzFCG8QWOD4','qmkKW6ddLKW','WPCcW7ZdVCo6WR8','lcf7WQFcKmoEpmoUa8kG','q8oBo8owW4JcJmk4W4hdUhTBWRSPW77cRq','pd/cGd8U','W4iXA8ked0JdQui','WQutCq9uW7tdLSkwd2iiWPvdW5nBh8o3imo/yrPHW5PhsY4Ui1tcOIXsga','WOxdGtxcP3rMemkPkCoMlCokhxCTBXqxWPVdGmoI','dmkLWOFdIa','WRxdUNO','drVcGIuSgq','gxTQW7lcNW','l8kos3hcJG','W7JdOu7dPeC','WR1Hd3FdSL8UW5yZbSoBA8kHtCoyW7vJurddPCkamNW2hG4EmW','FhC7W5JcNG','Df0aW5JcQa','W54IzSow','FCoJtq','W5hdKhtcM8oU','WPVdGqtcT3S','WOBdNSojdmkY','WQRdVhpdVuav','W6DEW4lcOW','jZFcP8oxWRO','gSoPWOnPW5C9W7Lx','W6RdP2tcJ8ongCoiWOi7W7/dP8kVF8o+','l8kzeCoNadddLmkBqq','W7DwzWin','W7xdVwa','jvfmn8o3','mbtcIW','W4ddTSotW5a/z37cTmkqW4LswHJdTG','xGKrlKPMWOqJDCknCrpcUHpcMmkzrrldGSolW7K','rcutnLe','W7ZdVgtcNSorgSopWPeTW7VdR8k6DCoGW5ddMdeQpq','W7zAovmmWQ7cHCkkj14aW6LQ','W59dAwG','WQ0qW4pcTSkaB8kPWOVdV8o7nHn3gSoatSozW5RcTmkYCZbt','aSkkWOG','lSkdcmkHWPy','sSk6WPfNW7K0','ksn/W5pcOmoadSo0lq','FrGcFW','W6BcKhlcOfjeW4tcMbbGWOvKWPXx','WO5dhJmfECovmKW','cG4UW6LU','8y6BIce','AsKXWOfIWQK','W6fzx13cRG','nbpcICojWRvA','W7BcNCk+smoNj8k5jhZdOglcJ8ow'],...(function(){return[...['W6JcQSoXWPLhWQi6WORdKmoLWQVdLLZdNmkyW4KoW6OI','W6lcSCoMWO5mWOyVWRJdImocWRVdGvC','CEAlMUs7GE++VG','Faec','44ca5OYn56AF44kW6k+P5yww6i6c5y2qWOBdVSo3W5xdS8oL','W4ddKSoPW7hdNSo5mCoLj250Bb0','kSkvtxxcMcTPkalcJmo+wCkHW7pcJmo3WQ8/W5lcQCo9','cmkoWRm','cWi4','WO0cWPZcJqldQG','8yc6MLC','CSk1W47dQhe','WObLcv3dTW','W4FdTmoiWR4H','WRFdKCoLg8kZBCo4hLJdHgxcRSoJW4q','FXaAASodW4C','5PYo6ykK6l6s','Fmo/tq','nmkTfCkaWQRcJSoFW7DN','W4r3WR/cSCoNWOjIr1D4zNNdKNy','WPabWRjgz8kGb8kummk+baK','W6VdJv7dNG','WP5YAG','eUIUI+AWSEwLVUI0GrNINB17','v8olnSoNW4ZcKCkV','WPGaWQC','W5ldSmodW5O9EMdcG8kBW4P9srhdOa','dITAW7hdLCoJW53cOmkHtvZcRdxcPW','cSkrimoWW4dcJSkVWOhdH01nWQWSW6pcLCkCW4hcRb/cH8o2W5uOALZcMmkA','WP8sWRriyG','WRxdLSo/mmoJxmoQlLJdN0lcSmoOW5JcRHC','WP3ORRRMSydLPOlOTR3dR+kCHH3MLAVLKlBLUQBMLQ/MJk8','WRygDGjpW7pdHmkRcgSj','tCkTWPrDW5K','rCoDiCoTW4BcJa','WPXHirar','WP0zWPdcIrVdVmoJlCoGWPHykCoSFG','D8osgslcNanRhYhcVG','l8k8bSknWQhcM8of','DZOii09UjSoeWQzSW6ucbCkwW6BcTCk4WOZdIG','W6NcUsJcIbTiyCoaW5TxWRboW5tdUW','rKZdNNH0wCkVwNaAWPCfDW','rXGpWOfM','sCoBjSo3W4JcHCk5','dsXqW6JdLCoEW4/cN8kH','W5NdOCopW5Cc','a3uZoga','lmk8aSkzW6NcImoAW7HOW60','qrCgbKa','CCoYtuNdRXGyk8kHzaz9aHH9W7e','WRzOmfVdMG','WQGmzG','W7dcJhRcTa','CCoVx8ozW7BdM8kdW4HhW58Uaf0','WQxcPCoyW58a','zCoPua','FbyaWPPD','W6hdINNdGgC','CmovfYZcNbfTnXpcPa','W63dMgxcHCoI','cbm0','c8k1WPZdMIDDW5mekmo0WQ7dTCkFWOpcJCopW4dcH8kIfZ4','WQxdNLVdMmoe','iSk3bmkBWR3cMCocW5bTW7SOnvZcMmoKWQJcM8o1ea','c8kVWPK','5P+u6ygS6lY6','WOqbWRLHimkVa8kfjSkZjqdcOuhcKMC','WRvYhmo0W5e','BduSWO0','5OU75lUn77Y1','Fha5W7JcLCoh','m8keh8oyfWW','D8o1rmk8W5vSW6pcHv/dMSoSzKy3W4y','6lEd5y6q5Pw45PED','oLTXnq','W4ZdINVdUve','W7X5wh/cQxm9','o3eZbw3cRG','WRjdtSkNc2NdMwBcI2uAW4ZcTei0W7XRW47dPmkMotD7W7VcTwa','WPb0xYvu','W4b1W7/cI8kI','W7HTu0G','jxSW','aCkdWQxdVuldUvRdVSorWQpdSCkmW7HAvZRcOgu8s8oZ','WPbmd0VdGuricG','W6JcMMZcO19gW5u','etfE','WRhcKGFcNdKGWPm','p11/W5xcNa','WRrne3hcUMDedrNdT8oRWOJdT8oFzCoe','W7NdJSoyWRyRsCosBW','WOGwW57dN8o4','WRTjBc5+WPLLWPtdSgxdTs/cJLa','W5CkumogW6e','WO1zgdKqxSoAogJcH8oFc1pcUmklbq','W6tcQSo2WO5g','W77dH8koWQDHWQiJBmkvhSk8','W4OPFSkUWOjiW6JdMKeCW5GYe8oTqH0','WQNdU2tdSbSZmmkwW51wWO5PW7tdNCkvWQy','bSkrWPTiW4zkWPr8WP7dJN14W4ddMa5dWQa2mSoMscO2iSozw2/dGmo0WQNcMmo5WQ0hWP0OWRZcSCozvSkzW6hdU8o5xCkKWRTzlW','W5/cGG3dH8kOnttdMZL4oJu','daG0W5vaW6G'],...(function(){return['W4r5WQBcOSoJ','C3OUW7RcTmoinSoe','dZTDW7RdN8oK','ogyUjtFcMmkKWRH5W6VdLCo9W6nquLq','WPypW4NdRCom','W4ZdTSoh','W7FdM27cJ8oR','W6dcT8o1','W43dNSojWQ0krG','sSknW4ldONe','WRWuWQtcIWu','W5BcNWVdNmk/cIJdQYv3oZNdIHu','W6JdJf/dN31TW7dcIdO','lLHHW57cLSkuWRKmWR5qW6bUWOG3jCkXW6K1WRPs','EW0yWOPq','dmkfWRtdTuVdIa','WOCwWQrbESkz','gYNcGmovWPu','jSk6e8kaWQVcHW','W5bFWQdcRmkNW7ldSdBdM8oAvmoy','WPncea','umoXywVcOG','W7lcKCk+qmk8E8oQk0NdUa','WOBdNKldNmoyW4HghZVdIYRdPNeLoLNdGY94W7ZcICoxWR4','mZWNW7xcUCognmoklmku','WOqeW6ZdVmo6WQu','ACoDqmkTv0ZcGmkVFCk5W7VdJfy','W6ldLSo1WQO0','WQrmgvddQeTicHldR8oJWOxdTCov','EcWVWOPO','WOddVmotlSke','mSkyhW','WOLTl8o+W5moWQ3cVXXsW5GIfmo6','W7VdHLtcLSoI','bCkVWPRdGG','WPz5Eq','i8kotgBcJWr4ertcNmoIsSkQW4NcHSoRWRaqW5O','W5zQWQVcICk+WQv3tf16zNNdNh7dKHm','WPNdI1/dMmoVWOCBut/dKcRdRa','WQ3dP2ldVCoZ','WQRdHCoRhq','W4JcLrVdGmk1da','p8k6h8kqWPa','qmoFiCoL','WOWtWORcMaxdVCoKdCoHWPbX','cJ9qW6y','cmkyWQtdNuxdGG','5OM45lIs772W56Md5RkB','W44jw8oyW68','hbhcIZ0VcmoQA3aJWRinqqS','WPLWlCoZW5uyWQ0','W77dGfNdHhjEW6dcNIy','WQLqdq','Ex4NW4hcVa','WOxdMZa','mwyrcNy','WR/dRgNdTeewomkAW6ToWQLXW67dGq','W6bqW5VcSSkfzSkUW43dGSoWeHP6dG','W57dL1m','W65/svxcOxK1W7alrSo/rmkPFa','W4z8WQtcImoV','WOawWRHoFG','eWZcPmokWQ0','WQDqdKa','mqJcIW','gCkeWOzm','A8oBsSoFpXFdOmkJta','FmkYW4i','WR3dRrxcSgi','kmkjth/cUbvHnq','W7FcMNVcUffv','WPuvW7FdO8o8WQ/dPb7dH8oUBmo2','Amk2WOT6W7m0W7OwbWiABa','Aq0PBSopW5S','WOHYc0NdUq','WPrKECkUk1ZdRu/cPuO','W7ChuWNcVh9XoJFdMCoI','WOWtWPNcKrJdRq','WQfwgvRdOfblgW','ASo1bmooW58','cLb9m8onjwCR','n8kFdmoTfKtcMSozrCkEW73cSftdLr7dNW7cG8oQWRr3r01UWO/cVWddHCoktmo5omkMvdSzbSogWPv+wxJdH8kRWQldKYvfhYC3W7NcImoV','FtPG','WRNdRwVdSuO','WP8fWO7cKbddT8o6iCoHWOjT','WR7cMSoaW7yGWPWeCmkWoSkC','5OU75lUn77Y156MU5RoI','WP9saYapwq','W4JdSCofW5qrBq','W7bkW5xcOCkmCmkPW7BdImoPnqr/gG','B3y6W7dcImonkmoOk8kxWQm','Fga+W7JcNCohnSoek8kfWOlcTL7dLa','WRPWceddTwTUW6LvtSkfwCo1','WPvteraY','W65OthxcOG','W73dKupdL39MW6a','W6j/xq','W4RdM8oOW7NdMmod','dZToW7pdGSo0W53cU8kQxfi','wCkSWRfTW6u','WPCyWP7cLqldVCoYnW'];}())];}())];}());Iii11l=function(){return liil1i;};return Iii11l();};async function handleResponse(IIIl1I,iil1ii){const illIi1=ii1ill,IlIlli={'EZcdx':'【提示】请先获取Cookie','tLBrX':illIi1(0x13b,'z[j4'),'OBMic':function(il1i1i,lil111){return il1i1i!==lil111;},'PyEwR':illIi1(0x211,'T9v4'),'WohZK':illIi1(0x219,'JfNg'),'bhkIo':function(i11ilI,ii1ii1){return i11ilI===ii1ii1;},'xYfid':'TYBvx','CbdSQ':'iNMIR','tlVtR':illIi1(0x24e,'yD]b'),'uxsvg':illIi1(0x1c8,'JpRB'),'cYcRT':function(llllI,lllil1){return llllI!==lllil1;},'nUeah':illIi1(0x159,'JpRB')};try{switch(IIIl1I){case'qryH5BabelFloors':if(iil1ii[illIi1(0x237,'TKJl')]==='0'&&iil1ii[illIi1(0x217,'sdMj')])IlIlli['OBMic'](IlIlli[illIi1(0x226,'(8Jp')],illIi1(0x1b8,'XYO7'))?$[illIi1(0x184,'J4uS')]=iil1ii[illIi1(0x130,'JkO6')][IlIlli[illIi1(0x21d,'W]$P')]][illIi1(0x1d8,'pk8y')]['data']:Iillil[illIi1(0x24d,'Uvcw')](illIi1(0x1e7,'v]ub'));else iil1ii[illIi1(0x13f,'JfNg')]?console[illIi1(0x17d,'JpRB')](iil1ii[illIi1(0x18f,'SB1a')]):console[illIi1(0x1c7,'dydU')]('❓'+IIIl1I+'\x20'+JSON[illIi1(0x13d,'yD]b')](iil1ii));break;case'luban_executeWorkflow':if($[illIi1(0x1a3,'yD]b')]===0x0)IlIlli[illIi1(0x136,'(8Jp')](illIi1(0x1d5,'dydU'),IlIlli[illIi1(0x207,'x#Xz')])?iil1ii[illIi1(0x177,'KEOf')]==='0'&&(iil1ii['rewardsInfo']['successRewards']?IlIlli['CbdSQ']===illIi1(0x236,'%spH')?console[illIi1(0x181,')VLA')]('['+$[illIi1(0x1ec,'%spH')]+']'+iil1ii['msg']+',抽中:'+iil1ii[illIi1(0x14b,'T%q[')][illIi1(0x139,'mB]8')]['4'][0x0]['discount']+iil1ii[illIi1(0x1e6,'#oiC')][illIi1(0x1ea,'JLrS')]['4'][0x0][illIi1(0x157,')VLA')]):IIliI['log'](illIi1(0x170,'v]ub')+ilI1ll['rewardsInfo'][illIi1(0x1b1,'lB@6')]['4'][0x0][illIi1(0x1df,'J4uS')]+Iillii[illIi1(0x1eb,'%spH')][illIi1(0x146,')VLA')]['4'][0x0][illIi1(0x241,'KsfK')]):IlIlli['tlVtR']===illIi1(0x161,'#oiC')?console['log']('['+$[illIi1(0x214,'yD]b')]+']'+iil1ii['msg']):(lilIl1[illIi1(0x1a5,'O*FK')](i1l1ii['name'],IlIlli[illIi1(0x137,'J4uS')]),i1l1['exit'](0x1))):(II1lii[illIi1(0x243,'mon4')](lIIii1[illIi1(0x198,'CvlS')]),[illIi1(0x16c,'p!yH')]['some'](lllilI=>I1iIi1['msg'][illIi1(0x21b,'mon4')](lllilI))&&(lliil1[illIi1(0x1de,'p!yH')]=!![]));else{if(IlIlli['bhkIo']($[illIi1(0x1e8,'O*FK')],0x1))IlIlli[illIi1(0x155,'sdMj')](IlIlli['uxsvg'],'xrFgt')?(llIllI[illIi1(0x17d,'JpRB')]('['+I1ilI1[illIi1(0x246,'QRBO')]+']'+iillll[illIi1(0x144,'JfNg')]),[IlIlli['tLBrX']]['some'](illlI1=>l1lIlI[illIi1(0x1f1,'KEOf')]['includes'](illlI1))&&(IiiIl1[illIi1(0x1a1,'JfNg')]=!![])):(console[illIi1(0x1d1,'x#Xz')]('['+$[illIi1(0x1ad,'J4uS')]+']'+iil1ii[illIi1(0x141,'LVdF')]),[IlIlli['tLBrX']][illIi1(0x20e,'QRBO')](IIIl11=>iil1ii[illIi1(0x196,'QRBO')][illIi1(0x1f5,'p!yH')](IIIl11))&&($[illIi1(0x1ba,'SB1a')]=!![]));else{if($['action']===0x2)iil1ii['subCode']==='0'&&(IlIlli[illIi1(0x233,'Q(Qb')](illIi1(0x23e,'x#Xz'),illIi1(0x1af,'mB]8'))?iil1ii['rewardsInfo'][illIi1(0x1ea,'JLrS')]?console[illIi1(0x1fd,'XYO7')](illIi1(0x202,'#xyk')+iil1ii[illIi1(0x1e6,'#oiC')][illIi1(0x240,'mon4')]['4'][0x0]['discount']+iil1ii[illIi1(0x14b,'T%q[')][illIi1(0x145,'QRBO')]['4'][0x0]['prizeName']):console[illIi1(0x1d4,'(8Jp')](illIi1(0x1c0,'J4uS')):l1ii1[illIi1(0x16b,'$7SA')]('❓'+ii1ll+'\x20'+IliI1l['stringify'](lliiil)));else iil1ii[illIi1(0x22f,'LI[q')]?(console[illIi1(0x1c7,'dydU')](iil1ii[illIi1(0x238,'#xyk')]),[IlIlli[illIi1(0x163,'sdMj')]]['some'](liiIIi=>iil1ii[illIi1(0x1b0,'KsfK')]['includes'](liiIIi))&&(IlIlli[illIi1(0x21c,'p!yH')](IlIlli[illIi1(0x257,'KEOf')],IlIlli['nUeah'])?(l1l11I['outFlag']=!![],lilIl['message']&&Iiiil[illIi1(0x213,'96fk')][illIi1(0x201,'sdMj')](Iiiii)):$[illIi1(0x193,')VLA')]=!![])):console[illIi1(0x15e,'T%q[')]('❓'+IIIl1I+'\x20'+JSON[illIi1(0x19d,'Q(Qb')](iil1ii));}}break;}}catch(Iliii1){console[illIi1(0x200,'CvlS')](illIi1(0x1f8,'U[a@')+IIIl1I+illIi1(0x20a,'LI[q')+(Iliii1[illIi1(0x156,'z[j4')]||Iliii1));}}async function sendRequest(iIiIi){const ii1ili=ii1ill,iil1ll={'dIXLJ':ii1ili(0x24b,'KEOf'),'TmXpe':'newtry','crhsD':ii1ili(0x21e,'ENA)'),'wzRix':ii1ili(0x18e,'Uvcw'),'pvmbm':ii1ili(0x247,'^hrH'),'xdonZ':'35fa0','ruSqa':function(i11iil,Ill1i){return i11iil===Ill1i;},'BpQpF':function(ii1iil,lllI1l){return ii1iil!==lllI1l;},'jkEyX':'BaWMh','mIZWf':function(i11iii,llI1Ii){return i11iii===llI1Ii;},'PqUjx':ii1ili(0x1c2,'T9v4'),'sWZbU':function(lllI1i,li1i1l){return lllI1i===li1i1l;},'cbpID':'encAid','Ktmto':ii1ili(0x1e2,'KsfK'),'izvrz':'gzip,\x20deflate,\x20br','jataw':ii1ili(0x1a8,'XYO7'),'bwbef':ii1ili(0x1cb,'mon4'),'tJbiJ':function(II1i1,lI1lll){return II1i1>lI1lll;},'nIicC':'LApTd','kIuzD':function(iIiII,iil1lI,iiiliI){return iIiII(iil1lI,iiiliI);},'pGGDu':function(li1i1I,illIii){return li1i1I>=illIii;}};if($[ii1ili(0x223,'z[j4')])return;let iiilil='',iil1li=null,lillIl=null,iIiIl=iil1ll[ii1ili(0x222,'JfNg')],iiilii={},li1i1i={};switch(iIiIi){case ii1ili(0x149,'mB]8'):li1i1i={'appId':ii1ili(0x242,'T%q['),'functionId':ii1ili(0x212,'6!iV'),'appid':iil1ll['TmXpe'],'body':{'activityId':activityId,'pageId':pageId,'queryFloorsParam':{'floorParams':{0x62367f7:{}},'type':0x2}},'version':iil1ll['crhsD'],'t':!![]},iiilii=await H5st[ii1ili(0x225,'96fk')](li1i1i),iiilil=iil1ll['wzRix'],lillIl=iiilii[ii1ili(0x204,'CvlS')];break;case iil1ll[ii1ili(0x1ae,'sdMj')]:li1i1i={'appId':iil1ll[ii1ili(0x158,'QRBO')],'functionId':iil1ll[ii1ili(0x183,'ENA)')],'appid':iil1ll['TmXpe'],'body':{'workflowId':workflowId,'action':$[ii1ili(0x24f,'6!iV')],'encAid':$['encryptAssignmentId'],'itemId':$[ii1ili(0x235,'%spH')]},'version':ii1ili(0x1e3,'JpRB'),'t':!![]};if(iil1ll[ii1ili(0x23a,'dydU')]($[ii1ili(0x14d,'z[j4')],0x0))iil1ll['BpQpF'](iil1ll['jkEyX'],'BaWMh')?lili1[ii1ili(0x1de,'p!yH')]=!![]:li1i1i['body'][ii1ili(0x13e,'W]$P')]=!![];else{if(iil1ll['mIZWf']($[ii1ili(0x190,'Zrhq')],0x1))delete li1i1i[ii1ili(0x1b3,'$7SA')][iil1ll[ii1ili(0x1a6,'U[a@')]];else iil1ll[ii1ili(0x15d,'J4uS')]($['action'],0x2)&&(li1i1i['body']['completionFlag']=!![],delete li1i1i['body'][iil1ll['cbpID']],delete li1i1i[ii1ili(0x1d0,'J4uS')][ii1ili(0x1e9,'QRBO')]);}iiilii=await H5st[ii1ili(0x205,'#xyk')](li1i1i),iiilil=iil1ll[ii1ili(0x169,'XYO7')],lillIl=iiilii['paramsData'];break;default:console['log']('❌\x20未知请求\x20'+iIiIi);return;}const IlIli1={};iil1li&&Object[ii1ili(0x256,'sdMj')](iil1li,IlIli1);lillIl&&Object[ii1ili(0x1a0,'wBw)')](lillIl,IlIli1);const illIiI={'url':iiilil,'method':iIiIl,'headers':{'Accept':ii1ili(0x220,'W]$P'),'Accept-Encoding':iil1ll['izvrz'],'Accept-Language':'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6','Connection':ii1ili(0x15a,'yD]b'),'Content-Type':ii1ili(0x22c,'T%q['),'Cookie':cookie,'Origin':iil1ll[ii1ili(0x148,'JfNg')],'Referer':'https://prodev.m.jd.com/mall/active/2m5K4HvCV4jNeTDixt56KGjroeLT/index.html','User-Agent':$['UA']},'params':lillIl,'data':iil1li,'timeout':0x7530};iil1ll[ii1ili(0x19f,'sdMj')](iIiIl,iil1ll['bwbef'])&&(delete illIiI[ii1ili(0x1bc,'z[j4')],delete illIiI[ii1ili(0x151,'yD]b')][ii1ili(0x1d9,'6!iV')]);const lI1lli=0x1;let Ill1l=0x0,llI1Il=null,ii1iii=![];while(Ill1l<lI1lli){iil1ll[ii1ili(0x166,'mon4')](Ill1l,0x0)&&await $[ii1ili(0x206,'v]ub')](0x3e8);const lI1llI=await common[ii1ili(0x215,'CvlS')](illIiI);if(!lI1llI[ii1ili(0x143,'z[j4')]){llI1Il=ii1ili(0x255,'T%q[')+iIiIi+ii1ili(0x142,'^hrH')+lI1llI[ii1ili(0x210,'x#Xz')],Ill1l++;continue;}if(!lI1llI[ii1ili(0x251,'!tX^')]){if('LApTd'===iil1ll[ii1ili(0x197,'mon4')]){llI1Il=ii1ili(0x135,'O*FK')+iIiIi+ii1ili(0x14a,'TKJl'),Ill1l++;continue;}else iIIIIi[ii1ili(0x1c5,'J4uS')](iii1I1['errorMessage']);}await iil1ll[ii1ili(0x138,'YOST')](handleResponse,iIiIi,lI1llI[ii1ili(0x23d,'JLrS')]),ii1iii=![];break;}iil1ll['pGGDu'](Ill1l,lI1lli)&&(console[ii1ili(0x1fd,'XYO7')](llI1Il),ii1iii&&($['outFlag']=!![],$[ii1ili(0x180,'aHXA')]&&$['message'][ii1ili(0x20d,'QRBO')](llI1Il)));}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) }