jdpro/jd_car_100.js

13 lines
48 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.

/*
京东汽车概率100豆
cron "31 1 * * *" script-path=jd_superLeague.js, tag=京东汽车100豆
*/
const $ = new Env('京东汽车概率100豆')
var il='jsjiami.com.v7';const IIiiIl=iii1II;(function(I1lIIl,l1ilI1,l1l1Il,lil1I,l1l1Ii,IIIIlI,l1i11l){return I1lIIl=I1lIIl>>0x7,IIIIlI='hs',l1i11l='hs',function(liiil1,lllII,l11iII,l1i11i,l11iI1){const liiii1=iii1II;l1i11i='tfi',IIIIlI=l1i11i+IIIIlI,l11iI1='up',l1i11l+=l11iI1,IIIIlI=l11iII(IIIIlI),l1i11l=l11iII(l1i11l),l11iII=0x0;const IliiI=liiil1();while(!![]&&--lil1I+lllII){try{l1i11i=-parseInt(liiii1(0x16b,'x2Jp'))/0x1*(parseInt(liiii1(0x2d4,'0m2T'))/0x2)+parseInt(liiii1(0x192,'mER8'))/0x3*(-parseInt(liiii1(0x1be,'JjlT'))/0x4)+-parseInt(liiii1(0x2d5,'7P3F'))/0x5*(-parseInt(liiii1(0x20f,'9HF['))/0x6)+-parseInt(liiii1(0x2cc,'Fx&m'))/0x7*(parseInt(liiii1(0x139,'kK6P'))/0x8)+-parseInt(liiii1(0x1a6,'9HF['))/0x9+parseInt(liiii1(0x1c7,'f@TI'))/0xa+-parseInt(liiii1(0x2c0,'mx%7'))/0xb*(-parseInt(liiii1(0x26d,'9KFD'))/0xc);}catch(lI111i){l1i11i=l11iII;}finally{l11iI1=IliiI[IIIIlI]();if(I1lIIl<=lil1I)l11iII?l1l1Ii?l1i11i=l11iI1:l1l1Ii=l11iI1:l11iII=l11iI1;else{if(l11iII==l1l1Ii['replace'](/[FBTHXrnkuSUQfpAqgDyG=]/g,'')){if(l1i11i===lllII){IliiI['un'+IIIIlI](l11iI1);break;}IliiI[l1i11l](l11iI1);}}}}}(l1l1Il,l1ilI1,function(I1lIII,liIlll,I1iI1I,illll1,IIIIl1,liiilI,lI111l){return liIlll='\x73\x70\x6c\x69\x74',I1lIII=arguments[0x0],I1lIII=I1lIII[liIlll](''),I1iI1I=`\x72\x65\x76\x65\x72\x73\x65`,I1lIII=I1lIII[I1iI1I]('\x76'),illll1=`\x6a\x6f\x69\x6e`,(0x14d7f0,I1lIII[illll1](''));});}(0x5e00,0x64979,Iii11l,0xbe),Iii11l)&&(il=`\x985`);const i1ilIl=$['isNode']()?require(IIiiIl(0x2ee,'bni^')):'',llI11I=$['isNode']()?require('./jdCookie'):'',Il1i11=require(IIiiIl(0x198,'mx%7')),iii1li=require(IIiiIl(0x1c1,'iF&f'));function iii1II(_0x3f0b90,_0x14506d){const _0x38c1e8=Iii11l();return iii1II=function(_0x3ae1bf,_0xd4d877){_0x3ae1bf=_0x3ae1bf-0x12c;let _0x45149a=_0x38c1e8[_0x3ae1bf];if(iii1II['OPWluC']===undefined){var _0x234419=function(_0xf43866){const _0x87f242='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3b3691='',_0x44ecea='';for(let _0x4dd1ae=0x0,_0x4f03b8,_0x3c680e,_0x545f44=0x0;_0x3c680e=_0xf43866['charAt'](_0x545f44++);~_0x3c680e&&(_0x4f03b8=_0x4dd1ae%0x4?_0x4f03b8*0x40+_0x3c680e:_0x3c680e,_0x4dd1ae++%0x4)?_0x3b3691+=String['fromCharCode'](0xff&_0x4f03b8>>(-0x2*_0x4dd1ae&0x6)):0x0){_0x3c680e=_0x87f242['indexOf'](_0x3c680e);}for(let _0x3b90d7=0x0,_0x1f7d84=_0x3b3691['length'];_0x3b90d7<_0x1f7d84;_0x3b90d7++){_0x44ecea+='%'+('00'+_0x3b3691['charCodeAt'](_0x3b90d7)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x44ecea);};const _0x5f437b=function(_0x23cacd,_0x1d7914){let _0xb6802b=[],_0x112c8a=0x0,_0x1282ca,_0x4bf8d0='';_0x23cacd=_0x234419(_0x23cacd);let _0x195bf2;for(_0x195bf2=0x0;_0x195bf2<0x100;_0x195bf2++){_0xb6802b[_0x195bf2]=_0x195bf2;}for(_0x195bf2=0x0;_0x195bf2<0x100;_0x195bf2++){_0x112c8a=(_0x112c8a+_0xb6802b[_0x195bf2]+_0x1d7914['charCodeAt'](_0x195bf2%_0x1d7914['length']))%0x100,_0x1282ca=_0xb6802b[_0x195bf2],_0xb6802b[_0x195bf2]=_0xb6802b[_0x112c8a],_0xb6802b[_0x112c8a]=_0x1282ca;}_0x195bf2=0x0,_0x112c8a=0x0;for(let _0x1e9deb=0x0;_0x1e9deb<_0x23cacd['length'];_0x1e9deb++){_0x195bf2=(_0x195bf2+0x1)%0x100,_0x112c8a=(_0x112c8a+_0xb6802b[_0x195bf2])%0x100,_0x1282ca=_0xb6802b[_0x195bf2],_0xb6802b[_0x195bf2]=_0xb6802b[_0x112c8a],_0xb6802b[_0x112c8a]=_0x1282ca,_0x4bf8d0+=String['fromCharCode'](_0x23cacd['charCodeAt'](_0x1e9deb)^_0xb6802b[(_0xb6802b[_0x195bf2]+_0xb6802b[_0x112c8a])%0x100]);}return _0x4bf8d0;};iii1II['lsMoUJ']=_0x5f437b,_0x3f0b90=arguments,iii1II['OPWluC']=!![];}const _0x521474=_0x38c1e8[0x0],_0x21774c=_0x3ae1bf+_0x521474,_0xe482af=_0x3f0b90[_0x21774c];return!_0xe482af?(iii1II['nUUnwl']===undefined&&(iii1II['nUUnwl']=!![]),_0x45149a=iii1II['lsMoUJ'](_0x45149a,_0xd4d877),_0x3f0b90[_0x21774c]=_0x45149a):_0x45149a=_0xe482af,_0x45149a;},iii1II(_0x3f0b90,_0x14506d);}let Iil1i1=!![],IIii11=IIiiIl(0x254,'2PkU'),iliIl1=process[IIiiIl(0x13e,'x2Jp')][IIiiIl(0x282,'vWnC')]?process[IIiiIl(0x147,'FG4H')][IIiiIl(0x262,')E6C')]:'1',Ii1il1=[],iii1ll='',IIliI1;if($[IIiiIl(0x18a,'sZKb')]()){Object[IIiiIl(0x2a8,'r(SR')](llI11I)['forEach'](lI1l1i=>{Ii1il1['push'](llI11I[lI1l1i]);});if(process[IIiiIl(0x21e,'mx%7')][IIiiIl(0x205,'9KFD')]&&process[IIiiIl(0x13f,'jNG]')]['JD_DEBUG']===IIiiIl(0x2db,'@vW@'))console[IIiiIl(0x1dc,'KETV')]=()=>{};}else Ii1il1=[$[IIiiIl(0x221,'$m!5')](IIiiIl(0x283,'Fx&m')),$['getdata'](IIiiIl(0x213,']0R)')),...I1il1l($[IIiiIl(0x280,'c#RV')](IIiiIl(0x1ac,'lo@t'))||'[]')[IIiiIl(0x15a,'kK6P')](i1iil=>i1iil[IIiiIl(0x253,'bni^')])][IIiiIl(0x2b4,'mER8')](llI11l=>!!llI11l);!(async()=>{const l1ilIl=IIiiIl,I1llIl={'ChJXd':function(i1iii,I1llIi){return i1iii==I1llIi;},'VOkJj':function(IIii1I,llI11i){return IIii1I|llI11i;},'mpPjk':function(i1iIi1,l1l1il){return i1iIi1*l1l1il;},'SzIra':'【提示】请先获取京东账号一cookie\x0a直接使用NobyDa的京东签到获取','DAnYZ':l1ilIl(0x1e6,'YFEx'),'gadDT':function(I11i1I,iliIi1){return I11i1I<iliIi1;},'PuKJl':'tHrxk','QSyUH':function(l1l1ii,Il1i1I){return l1l1ii+Il1i1I;},'CMGZa':function(Ii1iii,iIIilI){return Ii1iii!==iIIilI;},'UQrRY':'xlDzl','ysWES':function(il1l1,Ii1iil){return il1l1(Ii1iil);},'SocGz':l1ilIl(0x27c,'lo@t'),'AjmGN':function(Ilil1i){return Ilil1i();},'wGrVJ':function(iili1,II11ii,Iil1iI){return iili1(II11ii,Iil1iI);},'RYBSd':function(II11il,iIIil1){return II11il*iIIil1;}};if(!Ii1il1[0x0]){$[l1ilIl(0x268,'YFEx')]($['name'],I1llIl['SzIra'],I1llIl[l1ilIl(0x1b7,'tNye')],{'open-url':I1llIl[l1ilIl(0x200,'9KFD')]});return;}for(let IlllII=0x0;I1llIl[l1ilIl(0x1c0,'@vW@')](IlllII,Ii1il1[l1ilIl(0x1bb,'@G7T')]);IlllII++){if('tHrxk'!==I1llIl['PuKJl'])try{if(I1llIl[l1ilIl(0x209,'mx%7')](typeof li1I1[l1ilIl(0x177,'Y5Y0')](i1ilil),l1ilIl(0x153,'TcLO')))return!![];}catch(II111){return iIIl1l['log'](II111),llIli1[l1ilIl(0x204,'sZKb')]('京东服务器访问数据为空,请检查自身设备网络情况'),![];}else{if(Ii1il1[IlllII]){iii1ll=Ii1il1[IlllII],$[l1ilIl(0x1a0,'$9e3')]=decodeURIComponent(iii1ll['match'](/pt_pin=([^; ]+)(?=;?)/)&&iii1ll[l1ilIl(0x2b0,'k)#H')](/pt_pin=([^; ]+)(?=;?)/)[0x1]),$[l1ilIl(0x22f,'fpqF')]=I1llIl['QSyUH'](IlllII,0x1),$[l1ilIl(0x24e,'7P3F')]=!![],$[l1ilIl(0x24b,'mx%7')]='',IIliI1='',console['log']('\x0a******开始【京东账号'+$[l1ilIl(0x169,'TcLO')]+'】'+($['nickName']||$['UserName'])+l1ilIl(0x16e,'tNye'));if(!$[l1ilIl(0x2b2,'f@TI')]){if(I1llIl[l1ilIl(0x1e1,'TcLO')](I1llIl[l1ilIl(0x2c9,'mER8')],'IMKGg')){$[l1ilIl(0x197,'oRZH')]($[l1ilIl(0x1b9,'JjlT')],l1ilIl(0x28c,'k4Ia'),l1ilIl(0x1c9,'M$o]')+$['index']+'\x20'+($[l1ilIl(0x295,'sZKb')]||$[l1ilIl(0x1b5,'jNG]')])+l1ilIl(0x1ab,'r(SR'),{'open-url':l1ilIl(0x2cb,'Ukb@')});$[l1ilIl(0x265,'TcLO')]()&&await i1ilIl[l1ilIl(0x17f,'#PC3')]($[l1ilIl(0x244,'Zamp')]+'cookie已失效\x20-\x20'+$['UserName'],l1ilIl(0x2c4,'sZKb')+$[l1ilIl(0x26f,'$m!5')]+'\x20'+$['UserName']+l1ilIl(0x2bf,'k)#H'));continue;}else return i1i1I1[l1ilIl(0x245,'#PC3')](/[xy]/g,function(lill11){const IIiiIi=l1ilIl;var liI1i1=I1llIl[IIiiIi(0x189,'r(SR')](I1llIl[IIiiIi(0x29c,'TcLO')](liIlI[IIiiIi(0x263,'oRZH')](),0xa),0x0),I11i11=I1llIl['ChJXd'](lill11,'x')?liI1i1:I1llIl[IIiiIi(0x15f,'$m!5')](liI1i1&0x3,0x8);return lll=I11i11[IIiiIi(0x1ed,'kK6P')](),llli1;});}$[l1ilIl(0x184,'fpqF')]=I1llIl['QSyUH'](l1ilIl(0x251,'0m2T'),I1llIl[l1ilIl(0x157,'JjlT')](IliIIi,I1llIl[l1ilIl(0x275,'x2Jp')])),$['UA']=iii1li[l1ilIl(0x222,'U]hi')]($['UserName']),await I1llIl[l1ilIl(0x277,'x2Jp')](il1lI),await $[l1ilIl(0x24c,'sZKb')](I1llIl[l1ilIl(0x179,'fpqF')](parseInt,I1llIl['QSyUH'](I1llIl['RYBSd'](Math[l1ilIl(0x13c,'k4Ia')](),0x3e8),0x7d0),0xa));}}}})()[IIiiIl(0x22a,'KETV')](I1llII=>{const l1ilIi=IIiiIl;$['log']('','❌\x20'+$[l1ilIi(0x145,'KETV')]+',\x20失败!\x20原因:\x20'+I1llII+'!','');})[IIiiIl(0x1f7,'2PkU')](()=>{const l11iIi=IIiiIl;$[l11iIi(0x272,'Ctj6')]();});async function il1lI(){const ll11li=IIiiIl,Iil1il={'LHhkT':function(I11i1i,l1l1iI){return I11i1i|l1l1iI;},'MoQVP':function(I1llI1,I11i1l){return I1llI1*I11i1l;},'WWiXL':function(il1il,Il1i1i){return il1il==Il1i1i;},'DJdES':function(iIIili,Ii1iiI){return iIIili|Ii1iiI;},'moidJ':function(Ilil1I,iliIiI){return Ilil1I&iliIiI;},'DOens':function(II11iI){return II11iI();},'yevUA':function(Il1i1l,Iil1ii,lill1I){return Il1i1l(Iil1ii,lill1I);},'MpdGc':function(Ii1ii1,Ilil11){return Ii1ii1+Ilil11;},'yHTbn':function(i1ii1,il1ii){return i1ii1+il1ii;},'BhdTv':'paWJM','BSNAl':ll11li(0x284,'TcLO'),'DAyHb':function(llI111){return llI111();},'uPqgr':function(i1iIiI,IlllI1,I1il11){return i1iIiI(IlllI1,I1il11);},'vhBlJ':function(lI1l11,II11l){return lI1l11*II11l;}};$[ll11li(0x133,'H77@')]=![],$['nowcontinue']=![],$[ll11li(0x185,'2PkU')]=0x0,await Iil1il[ll11li(0x199,'tNye')](lI1l1l),await $[ll11li(0x18b,'tNye')](Iil1il['yevUA'](parseInt,Iil1il['MpdGc'](Iil1il['MoQVP'](Math[ll11li(0x15d,'fpqF')](),0x3e8),0x3e8),0xa));if($[ll11li(0x2c6,'jNG]')]){await iiliI(),await $[ll11li(0x1ec,'bni^')](Iil1il[ll11li(0x218,'6$x3')](parseInt,Iil1il[ll11li(0x276,']0R)')](Iil1il[ll11li(0x26c,'mER8')](Math['random'](),0x3e8),0x3e8),0xa));for(let II11i=0x0;II11i<$['lotteryChances'];II11i++){if(Iil1il[ll11li(0x2a6,'k4Ia')]===Iil1il[ll11li(0x154,'7G]M')]){var liI1ii=Iil1il[ll11li(0x2df,'Ctj6')](Iil1il[ll11li(0x2a0,'lo@t')](liiIIl[ll11li(0x25d,'7G]M')](),0xa),0x0),lIIiIl=Iil1il[ll11li(0x237,'6$x3')](iil1iI,'x')?liI1ii:Iil1il[ll11li(0x240,'jNG]')](Iil1il['moidJ'](liI1ii,0x3),0x8);return IlIllI=lIIiIl[ll11li(0x287,'x2Jp')](),il1i1I;}else await Iil1il[ll11li(0x250,'dh0w')](IIliII),await $['wait'](Iil1il[ll11li(0x1ee,'@G7T')](parseInt,Iil1il[ll11li(0x1b8,'TrJt')](Iil1il['vhBlJ'](Math[ll11li(0x1ce,'$9e3')](),0x3e8),0x3e8),0xa));}}}function IliIIl(iI1Iil){const iliIlI=IIiiIl,il1iI={'hQhxA':function(i1iIii,i1iIil){return i1iIii==i1iIil;},'AGzSj':iliIlI(0x20c,'Ctj6'),'pVnxN':function(liI1il,llIlIi){return liI1il===llIlIi;},'HToap':iliIlI(0x28d,'H77@')};try{if(il1iI['hQhxA'](typeof JSON[iliIlI(0x16d,'Fx&m')](iI1Iil),il1iI[iliIlI(0x22b,'JjlT')])){if(il1iI[iliIlI(0x1da,'k4Ia')](il1iI[iliIlI(0x187,'k)#H')],il1iI[iliIlI(0x1a5,'Ctj6')]))return!![];else iiilli[iliIlI(0x258,'9KFD')](l1iIIl);}}catch(II11I){return console['log'](II11I),console['log']('京东服务器访问数据为空,请检查自身设备网络情况'),![];}}function I1il1l(il1i1){const lI111I=IIiiIl,lIIiIi={'DrZxA':function(liI1iI,iI1Il1){return liI1iI==iI1Il1;},'MHaZk':lI111I(0x1e4,'7P3F')};if(lIIiIi[lI111I(0x14c,'H77@')](typeof il1i1,lI111I(0x210,'Zamp')))try{return JSON[lI111I(0x28b,'0m2T')](il1i1);}catch(i1iIl1){return console[lI111I(0x292,'$m!5')](i1iIl1),$['msg']($[lI111I(0x1b0,'Ukb@')],'',lIIiIi[lI111I(0x1d7,'TrJt')]),[];}}async function lI1l1l(){const IlilI=IIiiIl,i1lli1={'WjPFJ':function(llIlII,IIlII){return llIlII+IIlII;},'DLYQc':function(lIIiII,i1iIlI){return lIIiII===i1iIlI;},'ZDKki':IlilI(0x2b7,'JjlT'),'diiaO':function(li111,liI1lI){return li111==liI1lI;},'VdKWV':function(lIIiI1,ll1I1){return lIIiI1!==ll1I1;},'zWSfr':IlilI(0x1b2,'Ukb@'),'aqbxs':IlilI(0x164,'@vW@'),'nFeuA':function(Ii1ili){return Ii1ili();},'Ukiju':function(iI1Ii1,Ii1ill){return iI1Ii1!==Ii1ill;},'tbxYH':IlilI(0x1d5,'TrJt'),'QhwPA':IlilI(0x22e,'Fx&m'),'pcRNP':IlilI(0x21a,'lo@t'),'XUalN':IlilI(0x22c,'#PC3'),'TNDzv':'ios','RkQyY':IlilI(0x2a3,'sZKb'),'mHyVX':'https://api.m.jd.com','lnuTC':IlilI(0x167,'Ukb@'),'GfbJM':'application/json,\x20text/plain,\x20*/*','AXAEE':function(llIlI1,iI1IiI){return llIlI1*iI1IiI;}};return new Promise(async IIlI1=>{const llIi1=IlilI,i1iIli={'bWqbW':llIi1(0x236,'lo@t')};if(i1lli1['Ukiju'](llIi1(0x14d,'$m!5'),llIi1(0x285,'$9e3'))){const i1iIll={'appId':i1lli1[llIi1(0x2a5,'9HF[')],'functionId':i1lli1[llIi1(0x261,'lo@t')],'appid':i1lli1['pcRNP'],'clientVersion':i1lli1[llIi1(0x256,'@vW@')],'client':i1lli1[llIi1(0x28f,'TcLO')],'body':{'linkId':IIii11,'taskId':'','inviter':'','inJdApp':!![]},'version':i1lli1[llIi1(0x25e,'Y5Y0')],'ua':$['UA'],'t':!![]},i1lliI=await Il1i11[llIi1(0x1dd,'r(SR')](i1iIll);let liI1l1={'url':i1lli1[llIi1(0x1f4,'@vW@')],'body':i1lliI[llIi1(0x1d6,'0m2T')],'headers':{'origin':i1lli1[llIi1(0x239,'dh0w')],'Referer':llIi1(0x1ad,'$9e3'),'User-Agent':$['UA'],'Cookie':iii1ll,'content-type':llIi1(0x23d,'iF&f'),'accept':i1lli1[llIi1(0x2b8,'jNG]')]},'timeout':i1lli1[llIi1(0x15e,'9HF[')](0x14,0x3e8)};$[llIi1(0x160,'7P3F')](liI1l1,async(IllIlI,IiillI,ili11I)=>{const IliIII=llIi1,li11l={'wFRRo':function(lliiIl,li11i){return lliiIl==li11i;}};try{if(IllIlI)console['log'](i1lli1['WjPFJ']('',JSON['stringify'](IllIlI)));else{if(i1lli1[IliIII(0x208,'jNG]')]('JdWJn',i1lli1['ZDKki']))ll1ii[IliIII(0x2af,'H77@')]('进入首页失败,'+(IIli11?.[IliIII(0x1d2,'#PC3')]||''));else{ili11I=JSON[IliIII(0x19a,'fpqF')](ili11I);if(i1lli1[IliIII(0x20b,'Y5Y0')](ili11I['code'],0x0))$[IliIII(0x151,'bni^')]=!![],$['lotteryChances']=ili11I?.['data']?.['remainTimes'],console[IliIII(0x23b,'iF&f')]('当前抽奖次数:'+$[IliIII(0x2bd,']0R)')]);else{if(ili11I[IliIII(0x294,'9KFD')]==0x192)console[IliIII(0x1e3,'Zamp')]('进入首页失败,'+(ili11I?.['errMsg']||''));else{if(i1lli1[IliIII(0x2b9,'7G]M')](i1lli1['zWSfr'],i1lli1[IliIII(0x1d8,'M@h#')])){lii=IllI1i['parse'](i11I1l);if(li11l[IliIII(0x248,'sZKb')](lil[IliIII(0x290,'Ukb@')],0x0))IiIl[IliIII(0x2bb,'$9e3')]++,IiIi['log'](IliIII(0x173,'oRZH')+iI1ll1['lotteryChances']);else llliil['code']==0x192?IlI1Il['log'](IliIII(0x1ea,'H77@')+(l1il1l?.[IliIII(0x217,'sZKb')]||'')):liIil[IliIII(0x273,'r(SR')]('完成任务失败,'+(IllI1I?.[IliIII(0x142,'YFEx')]||''));}else console[IliIII(0x181,'v28e')](IliIII(0x2d9,'dh0w')+(ili11I?.['errMsg']||''));}}}}}catch(IllIl1){i1lli1['aqbxs']!==i1lli1[IliIII(0x227,'iF&f')]?l1llII():$[IliIII(0x1f5,'vWnC')](IllIl1,IiillI);}finally{i1lli1[IliIII(0x2a1,'9HF[')](IIlI1);}});}else{I1iIil['msg'](lI1Iil[llIi1(0x194,'$m!5')],llIi1(0x1c6,'@G7T'),i1iIli[llIi1(0x281,'jNG]')],{'open-url':i1iIli[llIi1(0x28a,'@G7T')]});return;}});}async function IIliII(){const II1l=IIiiIl,iiIi11={'xEHHa':function(ill1II,i1llil){return ill1II===i1llil;},'eItxu':II1l(0x249,'jNG]'),'klpYe':II1l(0x172,'kK6P'),'mHguc':function(i1llii,l1i1I1){return i1llii+l1i1I1;},'UdVIl':function(llIIil,llIIii){return llIIil===llIIii;},'MynuU':II1l(0x274,'$m!5'),'KcYTd':function(Ii1I1i,llIIlI){return Ii1I1i===llIIlI;},'DxtgE':'hsPhD','oGgOT':function(Ii1I1l){return Ii1I1l();},'DrWaL':II1l(0x278,'$m!5'),'fiqHM':'activities_platform','tBFff':II1l(0x26b,']0R)'),'txhOB':II1l(0x26e,'c#RV'),'opEPM':II1l(0x1c5,'YFEx'),'TXJCV':'https://api.m.jd.com','sseYa':II1l(0x2e7,'JjlT'),'FkZSF':'application/json,\x20text/plain,\x20*/*'};return new Promise(async IIlIl=>{const liiiiI=II1l,ili11l={'appId':liiiiI(0x1e9,'Zamp'),'functionId':iiIi11[liiiiI(0x180,']0R)')],'appid':iiIi11[liiiiI(0x2cd,'k)#H')],'clientVersion':iiIi11['tBFff'],'client':iiIi11['txhOB'],'body':{'linkId':IIii11},'version':iiIi11[liiiiI(0x1c2,'k4Ia')],'ua':$['UA'],'t':!![]},Iiilll=await Il1i11['getH5st'](ili11l);let Iiilli={'url':iiIi11[liiiiI(0x1e8,'7P3F')],'body':Iiilll[liiiiI(0x144,'k)#H')],'headers':{'origin':liiiiI(0x279,')E6C'),'Referer':iiIi11['sseYa'],'User-Agent':$['UA'],'Cookie':iii1ll,'content-type':liiiiI(0x13b,'7P3F'),'accept':iiIi11[liiiiI(0x230,'r(SR')]},'timeout':0x14*0x3e8};$['post'](Iiilli,async(IIlIi,ili11i,iiIi1l)=>{const II1i=liiiiI;try{if(iiIi11[II1i(0x16f,'f@TI')](II1i(0x219,'6$x3'),iiIi11['eItxu']))II1Ii[II1i(0x190,'TcLO')](i1ii[I1iIl1]);else{if(IIlIi)iiIi11[II1i(0x1f6,'TcLO')]!==iiIi11['klpYe']?I1ilIi['log'](II1i(0x2c5,'Y5Y0')+(IiiiI?.[II1i(0x2d2,'$m!5')]||'')):console[II1i(0x2e0,'Ctj6')](iiIi11[II1i(0x247,'Y5Y0')]('',JSON[II1i(0x162,'kK6P')](IIlIi)));else{if(iiIi11[II1i(0x175,'Ukb@')](iiIi11[II1i(0x1cb,'$m!5')],'RKCXu')){iiIi1l=JSON[II1i(0x177,'Y5Y0')](iiIi1l);if(iiIi1l[II1i(0x2b6,'TcLO')]==0x0)switch(iiIi1l?.[II1i(0x25f,'x2Jp')]?.[II1i(0x1a4,'0m2T')]){case 0x0:console[II1i(0x203,'x2Jp')](II1i(0x27d,'fpqF'));break;case 0x1:console[II1i(0x137,'9HF[')]('抽中优惠券:'+iiIi1l?.['data']?.[II1i(0x2ed,'U]hi')]);break;case 0x2:console[II1i(0x258,'9KFD')]('抽中:'+iiIi1l?.[II1i(0x25c,'Ukb@')]?.[II1i(0x1fc,'$m!5')]);break;case 0x3:console[II1i(0x13a,'$9e3')](II1i(0x271,'$9e3')+iiIi1l?.['data']?.[II1i(0x1cc,'2PkU')]);break;case null:console[II1i(0x214,'#PC3')]('运气不太好,什么都没有抽到...');break;default:console[II1i(0x23a,'JjlT')](iiIi1l?.[II1i(0x183,'7P3F')]?.[II1i(0x14e,'k)#H')]+'-'+iiIi1l?.[II1i(0x25f,'x2Jp')]?.['prizeConfigName']);return;}else iiIi1l[II1i(0x17c,'H77@')]==0x192?iiIi11[II1i(0x260,'vWnC')](iiIi11[II1i(0x2e4,']0R)')],iiIi11['DxtgE'])?console['log'](II1i(0x158,'7G]M')+(iiIi1l?.['errMsg']||'')):llIIli[II1i(0x2c1,'Ukb@')]('获取任务,'+(lIII1I?.[II1i(0x2aa,'jNG]')]||'')):(console[II1i(0x23a,'JjlT')]('抽奖失败,'+(iiIi1l?.['errMsg']||'')),$[II1i(0x1e7,'G1Bw')]=![]);}else l1llIl[II1i(0x171,'mx%7')]('完成任务失败,'+(ii1I1l?.[II1i(0x19d,'mx%7')]||''));}}}catch(ll1II){$['logErr'](ll1II,ili11i);}finally{iiIi11['oGgOT'](IIlIl);}});});}async function iiliI(){const illli1=IIiiIl,IllIii={'EuLJB':illli1(0x23f,'v28e'),'JJVyS':illli1(0x233,'Ukb@'),'LLjZm':function(llIIl1,ill1Il){return llIIl1!==ill1Il;},'jYkmA':illli1(0x2de,'#PC3'),'OKLmD':illli1(0x2cf,'KETV'),'FWNfF':function(i1lll1,Ii1I1I){return i1lll1===Ii1I1I;},'zNjak':illli1(0x191,']0R)'),'UDtXj':function(l1i1Ii,l1iI1){return l1i1Ii<l1iI1;},'FMbBj':function(lliiI1,IiiI1){return lliiI1!==IiiI1;},'EfVMM':'JKtfl','GyWLV':illli1(0x136,'@G7T'),'qXBrv':'taskType','KXtaF':'taskSourceUrl','jpnBf':illli1(0x182,'mER8'),'iNLgA':illli1(0x1b4,'bni^'),'nneeP':function(lilII,IIIiI){return lilII<IIIiI;},'xudrp':function(iii1i1,IllIll){return iii1i1!==IllIll;},'ywVEh':illli1(0x216,'H77@'),'Swoyb':function(i1lllI,llIIi1,iI1IlI){return i1lllI(llIIi1,iI1IlI);},'zUFZL':function(l1i1Il,ill1I1){return l1i1Il+ill1I1;},'EiVlr':function(l1i1II,ili111){return l1i1II*ili111;},'LcZaQ':function(Ii1I11,IllIli){return Ii1I11!==IllIli;},'CnoHa':'QOepG','PYSga':function(ii1Ii,ii1Il){return ii1Ii<ii1Il;},'yjfdE':function(l1iII,iI1Ill){return l1iII===iI1Ill;},'iouZv':'c06b7','BmaxG':'apTaskList','FBPqH':illli1(0x1ef,'@G7T'),'fGZgD':'ios','RqSli':illli1(0x155,'2PkU'),'RhCNG':illli1(0x14a,'f@TI'),'SVvQI':illli1(0x163,'@G7T'),'QClBt':illli1(0x1de,'G1Bw'),'HxFUH':illli1(0x29b,'kK6P'),'Mhfpf':illli1(0x288,')E6C'),'TpZTR':function(lilI1,IIIi1){return lilI1*IIIi1;}},liI1li={'appId':IllIii[illli1(0x2e9,']0R)')],'functionId':IllIii[illli1(0x2da,'G1Bw')],'appid':IllIii[illli1(0x2d0,'k)#H')],'clientVersion':illli1(0x2d1,'oRZH'),'client':IllIii['fGZgD'],'body':{'linkId':IIii11},'version':IllIii[illli1(0x2b3,'JjlT')],'ua':$['UA'],'t':!![]},IllIil=await Il1i11[illli1(0x231,'7G]M')](liI1li);let ill1Ii={'url':IllIii[illli1(0x212,'JjlT')],'body':IllIil['params'],'headers':{'origin':IllIii[illli1(0x193,'iF&f')],'Referer':IllIii['QClBt'],'User-Agent':$['UA'],'Cookie':iii1ll,'content-type':IllIii[illli1(0x206,'r(SR')],'accept':IllIii[illli1(0x18d,'YFEx')]},'timeout':IllIii[illli1(0x148,'fpqF')](0x14,0x3e8)};return new Promise(i1llli=>{const I1lII1=illli1,i1llll={'nMujf':function(iI1Ili,llIIiI){return IllIii['yjfdE'](iI1Ili,llIIiI);},'sGwDZ':function(iI1111){return iI1111();},'oyJEA':I1lII1(0x224,'f@TI')};$[I1lII1(0x1a2,'Ctj6')](ill1Ii,async(IIIl1,ii1ii,Iii1)=>{const Ill111=I1lII1,I1I1lI={'nSsLP':IllIii['EuLJB']};try{if(IllIii[Ill111(0x16a,'YFEx')]!==IllIii[Ill111(0x293,'x2Jp')]){IiilI1['keys'](IIII1l)['forEach'](l1iIlI=>{IlI11['push'](iIIIIl[l1iIlI]);});if(IlI1I[Ill111(0x2dc,'H77@')][Ill111(0x196,')E6C')]&&i1llll[Ill111(0x150,'jNG]')](II11Ii[Ill111(0x1f9,'dh0w')][Ill111(0x12f,'mER8')],'false'))II11Il[Ill111(0x1dc,'KETV')]=()=>{};}else{if(IIIl1)$[Ill111(0x22d,'f@TI')](IIIl1);else{if(IllIii[Ill111(0x1c4,'jNG]')](IllIii[Ill111(0x1bc,'JjlT')],IllIii[Ill111(0x141,'JjlT')])){Iii1=JSON[Ill111(0x20a,'mx%7')](Iii1);if(Iii1?.['code']==0x0){if(IllIii[Ill111(0x25a,'7P3F')](Ill111(0x1e0,'6$x3'),IllIii['zNjak']))i1llll[Ill111(0x259,'@G7T')](ll1li);else{let IIIlI1=Iii1?.['data']||[];for(let i1lIiI=0x0;IllIii[Ill111(0x2c3,'JjlT')](i1lIiI,IIIlI1['length']);i1lIiI++){if(IllIii[Ill111(0x12c,'U]hi')](IllIii[Ill111(0x23c,'oRZH')],IllIii['EfVMM']))iI1li1['logErr'](lllii1,liIli);else{$[Ill111(0x12e,'7P3F')]=IIIlI1[i1lIiI][IllIii[Ill111(0x1f0,'$9e3')]],$['apTaskListid']=IIIlI1[i1lIiI]['id'],$[Ill111(0x2a7,'@G7T')]=IIIlI1[i1lIiI][IllIii[Ill111(0x289,'sZKb')]],$['taskSourceUrl']=IIIlI1[i1lIiI][IllIii['KXtaF']],$[Ill111(0x202,'U]hi')]=IIIlI1[i1lIiI][Ill111(0x138,'Ukb@')],$[Ill111(0x2e8,'H77@')]=IIIlI1[i1lIiI][IllIii[Ill111(0x246,'KETV')]],$['taskShowTitle']=IIIlI1[i1lIiI][Ill111(0x201,'7G]M')];if(!$[Ill111(0x24d,'Y5Y0')]&&$[Ill111(0x2e1,'iF&f')]['includes'](IllIii[Ill111(0x2d7,'k4Ia')])){if($[Ill111(0x238,'U]hi')])for(let ii1l1l=0x0;IllIii['nneeP'](ii1l1l,0x1);ii1l1l++){if(IllIii[Ill111(0x299,'TrJt')](IllIii[Ill111(0x269,'2PkU')],Ill111(0x2c2,'Y5Y0')))try{return iIIl11[Ill111(0x2c7,'$m!5')](l1l1I1);}catch(IiiIi){return I1ilI1[Ill111(0x1e3,'Zamp')](IiiIi),iillll[Ill111(0x2ca,'kK6P')](lIIilI[Ill111(0x149,'2PkU')],'',i1llll[Ill111(0x168,'mx%7')]),[];}else console[Ill111(0x252,'7G]M')](Ill111(0x143,'v28e')+$['taskTitle']),await I1il1i($[Ill111(0x21d,'oRZH')],$[Ill111(0x161,'k4Ia')],$[Ill111(0x1b6,'Ukb@')]),await $[Ill111(0x27e,'6$x3')](IllIii[Ill111(0x19f,'f@TI')](parseInt,IllIii['zUFZL'](IllIii[Ill111(0x1a8,'TrJt')](Math[Ill111(0x257,']0R)')](),0x5dc),0x5dc),0xa));}else{if(IllIii['LcZaQ'](Ill111(0x2ce,'JjlT'),IllIii[Ill111(0x174,'Fx&m')]))return Iilli1['log'](I1l1Il),llIll1[Ill111(0x225,'dh0w')](Illl1l[Ill111(0x1a9,'#PC3')],'',Ill111(0x224,'f@TI')),[];else for(let l1iIl1=0x0;IllIii[Ill111(0x2ae,'Ctj6')](l1iIl1,0x1);l1iIl1++){console[Ill111(0x1dc,'KETV')](Ill111(0x2b1,'kK6P')+$['taskTitle']),await IllIii[Ill111(0x17d,'TcLO')](Ill11I,$[Ill111(0x165,'KETV')],$[Ill111(0x2d3,'FG4H')]);}}}}}}}else console['log']('查询任务失败,'+(Iii1?.['errMsg']||Iii1?.[Ill111(0x1e5,'r(SR')]||''));}else lilIl[Ill111(0x28e,'@vW@')](I1I1lI['nSsLP']);}}}catch(IIIil){$[Ill111(0x2c8,'0m2T')](IIIil);}finally{i1llli();}});});}function Iii11l(){const IIIIll=(function(){return[...[il,'ynXjksfBHjGiaqmUQuiDA.TXcBpoqmpng.vrBF7S==','rZVcVCoHgW','l8oVkxZcRmooWPFdSSoYWP7dKLlcTSkhrr7cRmkuWOixW6Tjtve+bmopWQRdLKpcMWXE','W5u+W4W','ASk6W6lcRSkH','5AYQ5OI65lUI5yMuW4xMIAxLPiRMRiJML6xVVPS','WRqtk8k4CG','WOCdW6NdUSk2','ButdTLm','d8oJWOJcH8oZ','6i+55y2j5lQI5yQXW6K','kL84WQ3dNW','WPdcLmo0WQW','n8osWO3cJCo3','qvqfiG','b1GmEIO','W5BcKuP4wW','W5ldI0hdRCkIW43cRKGTW4e','cSoTdNhcIq','W79NWOS','lH94FSoYyvXEBMFcTSkD','WP/cLCkfW74','n3WR','WOBdVmoJCbtdN3lcMddcGtncW63cPq','WRqS5AAK6lASowJLJitLMz8vW7i','WRddH3emsa','W4PfFG','cCkXW7hcKg0','luLdW6DRwG','WRf7WO9d','WPdcN8kWW5BcHSoida56qWNdUW','W50mW5mEBq','lYrfBCot','W4CVW5xcLmoc','jfOqAW','dCoLk3VcSa','AeC4jmkhq0bDz33cOq','umk6W64qW7y','iCoIpSo0','W4ZcRtBdNNW','W5dcVgbOwSkzrfm','W4TzFG','WPD+W43dNCkTW5lcKf9HdCoQmCoSW6/dUdT6W4ldS8kx','WOjvWOnzW5e','lxK4WOJdSa','W5vKW4xcKY8','W7aFW6NcRCoJ','W5WJW5NdPCkWW5y','W7VdRxFdUSkF','BaNcMSoqga','W7LZlKXcW5jjWQ0','sN4LkSkJ','W4GRW4vr','WPlcT8oBWP5g','WOpcICo5WRntW6lcIeVdQq','W7aqW5LeWPC','lHZcTrmRjmkBWQ9hW6hdGhn4','W45pb8ojWQfuW4FcOCoWW5BcJq9vxW','WO5LWRmMW4G','W4/dJ0ldRa','lCoWpxu','vEISIEMfL+AvQUEzVow+TEIoT+wpNeevqhJdSYa8WRu4nsRcIttdR8oOWQddKx3dSSogsMtcQSkVW4z+xSodWRTtW5JdK8oTW6BcSv8ps8kWW7ZdHSkDWOldKW','wSktkmoaWPy/W4NdLCoj','W4r0p05/WOKlW6FdVmojWOJcQmoOvcpcGeNdQvH5W4TKWOJdU8oeW4xcKmoxWQ/cUCovWOS2tM/cK8otW7zKkCoUWOddRSkmdmo3bw/cKgNdQ2vpWR7cK8omWPX0W6/cNmoDmSkAamkxl1OhhCoXW6WNWPLe','mYNdU8kyg37cL38PWRb5zmoR','W5xdON/dKCkC','WRWgW5ldLG','5A6v5OUS5lQ85yIk5AEo6lw/WPy','WQupW4/dT8kJ','FH4NW50TFW','WRuQFM80W6RdLG','W63dRWbIiM7cIGu','WQygW4ZdMmkjW6aKwGNcO2e4WO8','WOjBWOHUW7G','WRjeWReOW5q','fmkNW441','pmoxWR/cLCoK','aCo5WRhcQCoZbG','emkFW4G9WR0','W5jwW6tcVHO','qSkcW6KaWP3dQxK','WPqxvv0','W4vbf8o5WPa','lCodW740W5hcJSkOWQ3cPGVdSGSDW75ss8kfhSkZ','AmoeWQ/cRea','m0Oxs33dP8kX','W7tdKa9kaq','WQrkWOy','44g95O2m56EL44oF6k2W5ysM6i2s5yYz5lM25lM26lwl5y6A5lMeomkqCatcQmk7uoEBU+AmI+s/JUEuSgylW4tdG8okW5BNMBpKUkZKUylNRANLIQZOJ4VLJPe','deRdHSkBsgunWPFcISkJiMhcLa','cSkNW5eJWPK','5lQ35lMW6lwZ5y2N','W4xdJ1VdQa','aSo6pCoKWPu','WPRdOCo+FHtdRMtcTt7cItPVW6NcU8oy','WOhcL8kGW7FcUG','W55HjvPJW54','dmkiW77cUwu','W7r7DmkZWOa','W5hdRcHQWPq','W4tdNf3dHmkFW4u','q1GvlSkDWQCNemovmGr3u8kZWOfMwCopdq','W44YW5RdOCkN','WQK7WOf7WO0','WOpcMSoIWQHBW4u','WOzeWOqqW5e','pr/dM8kvoG','W7rTWPGHW6NdQmkJ','D8oIWOtcHem','WORdQ1yLAq','W5ZdRHW','omkBW67cKJlcK3q','W4/dMmo9WPFdGCokrLHZEq3dMdaDWP9gxYRdPmoOWPK1W6hcQfXruW9bWO7dJqjHqSkJumkqBLGeW4DHWR5bymkLWRhdQCkdaCoRWR8zAeykpJBdLv7dOSoNkMBdTKLZWR4HWR7dPmo6WRNcHG','c8oJWONcN8oFWR5vWPxcL1S','W7jLW53cSIy','f2iKwsK','DCozW6iOW55v','W7rJW7i','6kYm5yIl6zM+5OAq5z+5ytPsWPve6l6b5yE25Qcz5lYk5Ps05ywW5A6mCUw6QoITGUMcPoI9M+IeQUADLowmRoInH+wpSJ7cRmk1W5JcUaa','mSknW70','W7GqW4eEEdHWWOBcQmk+W7pdMCk7W6awWOGLvSkOwfTBz27cRSokdmoooSoEWPBdKCkRWQqXW5D0dbSXWQxcPSoS','W4VdHmoRW5pdKmkVbGDMzq','WQ/cRmk7W5ZcHW','WQ48W7hdQIW','5A6U5OIR5lQA5yUM5AEA6lERFW','WQK+W6pdPfWeW5ddNa','WOazweW','xCkKW6lcLSkvWRqQoW','gmomWQ7cQCo1','dmo/WQVcP8oXb8krWQBcVXKYhsG6WOT5amkZWRm','W6T5hhjA','pSo+k3hcQmoE','ySoHWQhcJeG','W65Ndh17','W49OcSoRWPW','F8oFW6KzW4Lv','p0mtwI0','WOZdUSo5zr3dGxi','wCkQW4pcKCkc','WOPzEG','tf4YcmkK','yCoAW7eJW44','p8oXoSoRWQvkjCoDleVdTmkNWRpcVGK','WQf/WPjtW4mYia','W79Xpx1D','W4BdNmoDWOBdGCkBlrj3AGVdKa','W7mnamkMmq','W4hcQsBdT10Kf8o4W5DbW5ZdJKi','WQ12W5lcIx/dQrivCYJdHq','W7GXW4q','kfvQ'],...(function(){return[...['W70imCk7lLFdLmok','f8kgW5ZcJ08','r1ywfmkK','W7ZdKdXbdW','W7O5W6hdSmkN','W4KWW5NdM8kM','g8oRWPpcLCoz','W5CMW5XaWOtcIq','6i2e5yYT5lMR5yMOgG','kYFdR8k2oMm','lbRcTHmTk8oLWPbHW4JdHNS','W6T4W6FdOhyV','WR9LW4pcIKG','kmkUW6aEWRS','dCoWnNVcRmoiWRZdGSkP','W43dGuG','WRTZAHO3','s0KpjSkj','iuH/W4v8wa','W4HRW6hcRWK','W7vzW6pcLG8','EmkFm8ocWOKZW47dTSoOkaaLW4NdT8kvWPddQ0my','WP4xqG','aCoZWRG','W5jlASkEWR3cOsXm','W5W/W50','W5VdSWf1','BWadW7CS','kmoMj8o1WQf9kW','WR5YW4/cT3O','W79zW5hcQse','6k+i5yQb6zM65OAM5z2sfvlcPCkrWQtOV4NLHAhMORdKVilML6lLH7VLRjldU+w4KUIUIUMdI+I8VUIhOUACL+wpSEIoIEwnMgW7WR8bt04','WOjeAW','hSo3WORcVSo9','ySkDW7O5W4W','osDcuSor','W4lcPaZdTgW','W5pdOa9JWRK','o8kbW5KdWPy','WPdcNahcU8ocWPi','uXhcKG','WOqinmkvytCTlCoNjMRdJxlcH28','nhyUWP7dRq','gCkvW4dcIue','W5lcRshdLdS/da','zSoeWR7cNx7dJ8oWW6BcL1/dISoo','WPW0W4xdNSkC','FJVcGSoZma','WPpcGmkfW6/cOHL6bCkVrx3dTZRcKIpcMbSsnSocW53dS10','CCkim8oBWOXGWPxcSmoVpJ47WOVdU8opWPZdOb8wW5RcSSoRWReYW4fsWRtcLslcPCkAWPWAwwRcR8kKBCo/W6ecgxW','W6zzW77cOGq','WQ12W5lcIwJdQtmoFsJdO8kiDW','WOnzEtWI','fSkPW4q','B8kdW78','W6nmt8k4WQq','ySkCW6GTW5BcJSk9WRdcOaRcS04bWPbkuCkFxmk7ymoHh1XVsLbdmSowW51TWPVdPq','EfNdT2PQDa','WQ0O5lIx5yUK5AA56lA577+o5Ro05P2J6i6c5y6d5yM05lI35yQ+WOlcLa','W7ZdLGfvpW','W51CyZOLW7BcTW','WRvUWPrEW4WHkfaJ','WPSsiW','W7zTW7JdRa','W5pdI1/dPCknW4hcVW','W5RdSrvcWRC','eSokWP3cGCo1','m3XFW5PG','W5/dLdD0lG','WQ5UWPjhW5f8BHKQW77dPfFdPSkRWObwW5rnvCkiytlcVqJcQbDJbSoEW5fgWQNdTSklW7Hqs8oRWQ/dMmo2W7ivntj8lmkcWO/cMr8maaRdVSo7z8kcnrNdICkTChddMMLkedCAm8owW4ddT2y','W5C4W4JdG8knW5dcIvm','m1TKW7W','c8oJWONcN8oqWRLiWPNcLKCOW4O','WPlcH8k9W7dcTKO7','W61UeSoqWRW','WQT2Dsad','WQZcPmo6WQ1xWOS','W5NcPZi','WPqxxLmoW4O','WRddI8oCt0JdIMFcKqFcOq4vW4BcLmooWPddNNBcPCkvW7iu','hN4ssqu','W7P1eSorWOO','pmo+n3tcQSoa','W5SJcq','hSoBWQJcISoD','WR3cO8k/W7NcLW','amomjCoGWQ0','WRygW4VdKG','W4FcQtVdUgeH','lCoPWQVcJCop','W7a/W5FcTG','wmotW5CiW58','smkummo7WR4','W7dcNgbyA8k3ExycW7qpkq','W5rlD8krWOBcTq','smk7W6xcG8kuWRyaovG0w3q','pvWTBcZdSq','W47dJexdRmkpW5y','vSoxWRbEWP4','W70xW5i','WPpdPmobqrK','W4hcGqxdUvS','F8kTDYldQ8kD','fXfAq8oK','WOz+gmksl1NdISoU','F8o4W5u','jSoTn8o0WRG','WPFcJSoBWPft','5OIr5lIT772r','W5WRW5Ha','m8krW70','hCoiemojWRu','W4CXW4dcKmoP','n8oxdxlcQW','W5u0W47cKmoD','pmo2i8o0WRjfl8oslvFdTSkLWR3cPXHgAL8','W7lcJeTCBmoHpJSTW6GvigxcISkceruVneZdJmkZWOC','A8kDkCopWPa3','WOqYzfWc','kmkep8otWOCIW4ldP8o1Dw5JWPhdRSkzWO7dVeKnW43cP8k8WQSVW5HeW6pcNJpcUSkmWQ1AddNdO8oYDmoKW60tdMPYaNhdLmoGWOPOW5nWWQFdQSoXW7PRwcG6W6BcL3ddPLuAEW','5OUG5lI1772q56Qb5Rkb','W4zVW77cJG','W4RdUqHXbwhcSWLGW4FdSW','CCoYW5iQW6a1WOa','W5RdIXrYoW','ECouW5eOW49lW5NcVvqTWRX2','WRqsk8kBEH4cca','fwueqIK','W4vMcNbU','imkhWR5OWOKqWOxcTgGiWPHbtW','W6aXW7dcO8oHWQBdGmkS','W7VcIe9aDSk4Cga0W7uuA2RcJ8odeHDLjaFdL8kOW4vJW5z5W5H3WRpdT8ozWOLE','nwjpW7P5','d8olWQ7cRmoq','WOpcMSoIWRPt','44cx5O2K56Eq44oTBSolW5VdQmkkw+w1KEwMK+AvSq','E3iYn8kT','W45pfa','ageNEt4','WReiW5VdLG','W4b7WQuJW4q','i8oSna','W54uW7xcRSoa','W5qJcSkA','kLnUW6nbxSknjq','W6GLWO/dKbxcTG','cCkYW5e5WPldRfecWOG','W7y9W5VcSSoe','WRn5WOe4W4O','W6ldPrnNnq','smk7W4hcJSkoWR4Lkeu6xdC8W5xcQmkCuvVcNmo2WRD3uCkqgSoTEudcP1aMWRm4','ov8ZAsm'],...(function(){return['cHXHuSoZ','W4nyA8k4WPRcVW','wrFcM8oact9ZWRJcVSkZ','vmktfSo9WQ8','C23dOfjy','qfGziSk8','Cbq+','W69lW7NdNvi','AuNdVx5r','rCoCWO7cQhS','gCo9WQZcPCotf8kvWQO','nmkBW6pcQq','6l2l5ysb6AsJ6AcB5As66lsNCW','W53dRHDDh2G','WRPoW6JcPv4','fSkPW5CKWPNdUueNWPLrW415gCk+','CWRcTSoKga','W6GDW6vcWOy','tLqg','WPxdSMOoua','5y6s5ykrWPe','vG3cUCoght5t','kmk3W7a8WPu','pbDNyCorEG','cmk5W7pcSMW','n0ahzG','emk+W5mIWPu','W7/dUGDAiq','W6pcRb7dI1G','xCk2n8ofWPq','W4bVp0PPW4fDWOVdPmoAWONcR8oOuq','Emkme8okWOWXW77dUSo5oJy5','iSoWlwtcOmoFWO/dHCoZWPddKH7cQ8oz','uCkomSoBWOu','W7lORAtPH5pML53NMypLVPFOJjNLJP40BCoDz8o6WQm','WObKWPlcMSoXWOhdNuv7kSk3pSoT','WR4iW5G','fSoWWPtcLCo0','l8kcW5CiWPy','5lUO5lIM6lsR5y2/','5OUc5AEu5AEl6lErWRO','W5BdSXjZa2hcKWLJW5FdPq','p8oIiCoIWQu','WP/cLmo3','dY95r8oT','rmk4W5y','WROtW4VdG8kPWRv+bWJcO1uKW414FSkvFSorBSoxx8kuqSo4WPDit8oNkZf7WRpcLmkPceWkWQjaW5NcJSkOW6u','W4zjDmk0qXWVbmo2','WP7dUM8LDq','k8kjW4yGWRS','W73dHI9sWR0','WR7dKu4CCa','WPCyn8ohW4FdQa','kSoXiCoCWRnU','xmonWRXxWPCEWRRdIsJcH8krW7K','W4tdImkPW7GcWO7cLeldTvZdTSkn','W4NdHmobW5dcLwCErmkm','i04kDW','BSo6WQBcM0W','m3L7W5X1','6lY05yws6AAA6AcD5Awq6lANW4K','W6xdGCoOWP/dTq','W4rbh8ooWQe','r1ux','FmkonCoMWOW9','W4JdJe7dVmkl','W7qmW55oWRm','W5qRW5e','D8knW6SQW6VcLmkSWQe','zCkIW4tcTSkJ','WQy8WOKHWR8','cSoNlxFcGa','jcFdRmkw','pmosd2pcOa','eSkYW5CGWO/cSrDlWOfcW4X+gCk7WQO+WONcSuhcL8oDe8okmcxdKSorEZhdIsyVWQhdNmkRWQr6s8onW6XazYa0WPddHCkNW6eCWPRdVIyuWP45dWXWa1hcS8kVxCkKW7xdVCoIrsddRWdcR1OG','vLOslmkTWQC9emodkt5J','j8oWleRcSW','W5BcPZhdUq','oCo0heRcPa','W7PRW6FdQL8','WQLLW4JcMf7dHsKsEctdKCk0ESkPDq','W5LxqL0jW4VdHZxcICoSvci','WP9AW4pcOfe','qmkkW5yNW7m','WO/cLCkcW7tcHuOHrSk6','edPuuCoXsMDW','vmkPW6BdVmk1xSoCWRZcRYmFctC','uCosWO8','q3eSkSkL','vKmjkmkF','WPrJWPD7W4K','WQ3cMCkIW6NcHq','gCo9WQZcPCotb8krWQpcVW','CutdOG','WQygW4ZdMmkEW6afqqFcO0C','gmo+WOtdLCoxW6KjbwmbwhW','W4bVla','WPRcHmkbW7pcUea0xSk2whZcVcFdIxRcGKjvnmkdW4ZdSr0nW6xcNeeZWQdcTCoxWRqb','DCovWOtcMgldIq','W5ddQbfGhZxdIe99W5ddR2Lmt8o/W4XQBKjRWR/cL8kl','W7eWW5u','W53dSHm','e30HrtW','nCknW689WRG','W7uwW4CJEgu','5yYO5ygsW4W','WOJdSMWmvCkX','W57dObzL','WONcKmkAW5ZcTG','wmotWP4','cwGqWQ/dHW','WOtdSSo6yq','vWRcGCozcw0sW7lcUSkNmYRcM8ocWReAWOxcKSkhsq','fHvs','zKK7p8kQ','kmoBfSodWQW','WOJdOxCxxCkwW5C4mG','W7SRW5LoWO7cMmogWR0Q','W5BdKrb6cG','WPKxrLSiW4hdVtpcK8oWvW','W67cTg90BW','o00jzIVdOa','W7FcMXVdNwi','W57cVCkK','pXXUDSox','a8k1W7qvWQ8','5OIi5AAE5AwK6lA5iG','FSoJW5i+W7j7W444gCoKWOtdPx1nWQC0W6tdTeiIW5KfWQ1fWRdcRmkJomouhNZdRCodid9BWOyHqqFcJSoQD8kfEchdQ3fAc8k5WOtdK3hcM8oHWQz+yYvsW77cMCohpwPsW7XgW6PdzmkGmmo+','rmkQW4e','yCoE5lMH5yM75As26lEf77Ym5RkR5P2c6i+k5y+I5yI85lM45yUYt8oE','WQCAw38G','l3KKWP/dUSkM','xhpdHgjC','gComomoBWQO','WOVcM8kcW6S','zSoeWR7cNx7dJ8o4W6RcKeRdISog','wSk/W4pcI8kjWROToLu','bCoOWQVcVSo0vmokW6dcQHGccseTW5fYqCkRWRP0BmobW5W','W4Dua8opWQC','W4tdOaHRWOuGW5tcKq','wCkQW4pcG8kkWQ4','WROtW4VdG8kPWRv+bXRcTfSUWOzJFSksnmkvACkwuCoutq','W5yOW6hdRCkc','puehzJa','W5OUW6mxwa','WQy1W4ZcHCoxWRVdVa','W4zphCoy','WOCCnSkdDG','W6WWW4WDWOHSAXXWWOy'];}())];}())];}());Iii11l=function(){return IIIIll;};return Iii11l();};async function Ill11I(IIIii,iI111i){const I1iI11=IIiiIl,I1I1l1={'wMWmO':function(iI111l){return iI111l();},'TKdYU':I1iI11(0x140,'TcLO'),'DJpnk':function(i1lIii,III11i){return i1lIii===III11i;},'AEwZJ':function(i1lIil,III11l){return i1lIil==III11l;},'akZTe':I1iI11(0x270,'0m2T'),'skUpz':I1iI11(0x146,'7P3F'),'wlYhb':function(llIl1i,llIl1l,IiiII,Iiil,IIIli){return llIl1i(llIl1l,IiiII,Iiil,IIIli);},'Ffvur':I1iI11(0x15b,'r(SR'),'SsIfL':I1iI11(0x255,'TcLO'),'XuNAR':I1iI11(0x2bc,'lo@t'),'CfNfL':'activities_platform','tlVgr':'12.2.0','ItLmA':'ios','BgGCw':I1iI11(0x14b,'H77@'),'WGihk':I1iI11(0x235,'7P3F'),'OOvqm':I1iI11(0x159,'c#RV'),'sJUde':'application/x-www-form-urlencoded','aLKWp':'application/json,\x20text/plain,\x20*/*','wcqId':function(ii1i1,Iiii){return ii1i1*Iiii;}};return new Promise(async llIl11=>{const ii1II1=I1iI11,IIIll={'zcQhk':function(I1I1ii){return I1I1l1['wMWmO'](I1I1ii);},'neSOO':function(l1llil,IIIlIi){return l1llil!==IIIlIi;},'dAJzp':I1I1l1['TKdYU'],'SqvCQ':function(llIl1I,i1lIl1){const II11=iii1II;return I1I1l1[II11(0x2ba,'lo@t')](llIl1I,i1lIl1);},'PbjGG':'tNdNy','bgrcG':function(liIli1,IIIlIl){const l1ilII=iii1II;return I1I1l1[l1ilII(0x234,'f@TI')](liIli1,IIIlIl);},'bcxeW':I1I1l1['akZTe'],'BbXuj':function(IIIlI,IiiI){return IIIlI<IiiI;},'LiuTD':I1I1l1[ii1II1(0x226,'@G7T')],'djRig':function(iIi1i,l1iIll,l1iIli,iIi1l,i1lIlI){const iliIll=ii1II1;return I1I1l1[iliIll(0x229,'7G]M')](iIi1i,l1iIll,l1iIli,iIi1l,i1lIlI);},'RQmFi':I1I1l1['Ffvur'],'vXLOq':function(l1lliI,I1I1iI){return l1lliI==I1I1iI;},'hEDmH':I1I1l1[ii1II1(0x291,'v28e')],'wCvTz':function(IIIlII){const llliIl=ii1II1;return I1I1l1[llliIl(0x1fb,'c#RV')](IIIlII);}},I1I1il={'appId':ii1II1(0x156,'mER8'),'functionId':I1I1l1['XuNAR'],'appid':I1I1l1[ii1II1(0x12d,'iF&f')],'clientVersion':I1I1l1[ii1II1(0x220,'M$o]')],'client':I1I1l1['ItLmA'],'body':{'taskType':IIIii,'taskId':iI111i,'channel':0x4,'checkVersion':!![],'linkId':IIii11},'version':I1I1l1[ii1II1(0x1f3,'$9e3')],'ua':$['UA'],'t':!![]},l1llii=await Il1i11['getH5st'](I1I1il);let liII1={'url':'https://api.m.jd.com/api','body':l1llii[ii1II1(0x1f1,']0R)')],'headers':{'origin':I1I1l1[ii1II1(0x2b5,'r(SR')],'Referer':I1I1l1[ii1II1(0x25b,'$m!5')],'User-Agent':$['UA'],'Cookie':iii1ll,'content-type':I1I1l1[ii1II1(0x27b,'bni^')],'accept':I1I1l1[ii1II1(0x1a3,'0m2T')]},'timeout':I1I1l1[ii1II1(0x1d4,'mx%7')](0x14,0x3e8)};$['post'](liII1,async(iiIiI1,ili1Il,ili1Ii)=>{const illliI=ii1II1,Iilll1={'jumev':function(ll11I,iIi1I){return ll11I+iIi1I;},'ONamx':function(liIIl){const iliIli=iii1II;return IIIll[iliIli(0x1cd,'7P3F')](liIIl);}};if(IIIll[illliI(0x1fa,'H77@')](IIIll['dAJzp'],IIIll[illliI(0x19c,'x2Jp')]))I11iI1[illliI(0x2c1,'Ukb@')](Iilll1['jumev']('',l1lIil['stringify'](IiiIli)));else try{if(IIIll[illliI(0x1fe,'$9e3')](IIIll[illliI(0x15c,'bni^')],IIIll[illliI(0x29d,'mER8')])){if(iiIiI1)console[illliI(0x214,'#PC3')](''+JSON['stringify'](iiIiI1));else{ili1Ii=JSON[illliI(0x1c8,'JjlT')](ili1Ii);if(IIIll[illliI(0x2ec,'Zamp')](ili1Ii[illliI(0x21f,'jNG]')],0x0)){if(IIIll[illliI(0x18f,'x2Jp')](IIIll[illliI(0x2a2,'H77@')],IIIll[illliI(0x298,'x2Jp')])){$[illliI(0x232,'k4Ia')]=ili1Ii[illliI(0x1ca,'#PC3')];const liIIi=$[illliI(0x264,'kK6P')]?.['taskItemList']||[],IilllI=$[illliI(0x1ff,'G1Bw')]?.['status']?.[illliI(0x29f,'f@TI')];for(let iI1lIi=0x0;IIIll['BbXuj'](iI1lIi,IilllI);iI1lIi++){const l1lllI=liIIi[iI1lIi];l1lllI?IIIll['SqvCQ'](IIIll[illliI(0x2e2,'kK6P')],IIIll[illliI(0x17e,')E6C')])?($['taskSourceUrl']=l1lllI['itemId'],$['taskInsert']=l1lllI[illliI(0x1df,'Y5Y0')],await IIIll[illliI(0x19b,'6$x3')](I1il1i,$['taskType'],$['apTaskListid'],$[illliI(0x1ae,'M@h#')],$['taskInsert']),await $[illliI(0x2d6,'TcLO')](0xbb8)):l11i1i['log'](Iilll1['jumev']('',lI11I1[illliI(0x162,'kK6P')](l1il11))):console['log'](IIIll[illliI(0x1d0,'oRZH')]);}}else Iilll1[illliI(0x24f,'@vW@')](lI11Il);}else IIIll['vXLOq'](ili1Ii[illliI(0x1bf,'bni^')],0x192)?console[illliI(0x243,'Fx&m')](illliI(0x178,']0R)')+(ili1Ii?.['errMsg']||'')):console[illliI(0x214,'#PC3')](illliI(0x20d,'0m2T')+(ili1Ii?.[illliI(0x1d2,'#PC3')]||''));}}else i1lI[illliI(0x16c,'@vW@')]();}catch(ll11ii){IIIll[illliI(0x1a1,'H77@')]!==illliI(0x135,'7P3F')?$[illliI(0x20e,'M@h#')](ll11ii,ili1Il):IiilIl[illliI(0x28e,'@vW@')]('','❌\x20'+iii1Ii['name']+illliI(0x186,'Zamp')+iii1Il+'!','');}finally{IIIll[illliI(0x2d8,'sZKb')](llIl11);}});});}async function I1il1i(llii1l,liIlil,llii1i,ll11il){const ii1III=IIiiIl,iI1lIl={'rMVse':function(iiIiII,Iili){return iiIiII==Iili;},'ClhgB':'Hvnes','eJqKY':ii1III(0x29a,'jNG]'),'frbhs':function(iIi11,Iil1){return iIi11+Iil1;},'ldCCB':function(ll11lI,llliI1){return ll11lI===llliI1;},'zhVFr':function(liIII,llii11){return liIII===llii11;},'uZNxg':ii1III(0x132,'H77@'),'CUEar':ii1III(0x195,'7G]M'),'ZNRCp':function(Iillli,ll11l1){return Iillli===ll11l1;},'XjBig':ii1III(0x19e,'#PC3'),'TDfrV':function(ll111,llliII){return ll111!==llliII;},'tLPXp':ii1III(0x207,'H77@'),'EHcNj':'CookieJD','Hrupz':ii1III(0x14f,'Ctj6'),'cXsDR':function(iiIiIl,IlI1l1){return iiIiIl(IlI1l1);},'NWFSi':'CookiesJD','ahziA':ii1III(0x2e3,'v28e'),'mjjmz':'apsDoTask','tIPeU':ii1III(0x296,'U]hi'),'VCfKV':'4.3','XIbuS':'https://api.m.jd.com/api','Ztclc':ii1III(0x13d,'jNG]'),'amSjE':ii1III(0x24a,'tNye'),'eUKpE':ii1III(0x170,']0R)'),'bGFDD':function(liIliI,llii1I){return liIliI*llii1I;}};return new Promise(async iiIiIi=>{const i11iIl=ii1III,l1lll1={'Svdcb':iI1lIl['EHcNj'],'InjFa':iI1lIl[i11iIl(0x2be,'lo@t')],'wGlTJ':function(Iillll,lllI1){const ll11ll=i11iIl;return iI1lIl[ll11ll(0x1bd,'6$x3')](Iillll,lllI1);},'rxHHQ':iI1lIl[i11iIl(0x223,'6$x3')]},IilI={'appId':iI1lIl['ahziA'],'functionId':iI1lIl['mjjmz'],'appid':i11iIl(0x1d3,'H77@'),'clientVersion':iI1lIl[i11iIl(0x26a,'7G]M')],'client':i11iIl(0x21b,'bni^'),'body':{'taskType':llii1l,'taskId':liIlil,'channel':0x4,'checkVersion':!![],'linkId':IIii11,'itemId':llii1i,'taskInsert':ll11il},'version':iI1lIl['VCfKV'],'ua':$['UA'],'t':!![]},liIlli=await Il1i11[i11iIl(0x1c3,'TcLO')](IilI);let lil11={'url':iI1lIl['XIbuS'],'body':liIlli[i11iIl(0x166,'kK6P')],'headers':{'origin':iI1lIl['Ztclc'],'Referer':iI1lIl[i11iIl(0x1d1,'KETV')],'User-Agent':$['UA'],'Cookie':iii1ll,'content-type':iI1lIl[i11iIl(0x1f2,'k4Ia')],'accept':'application/json,\x20text/plain,\x20*/*'},'timeout':iI1lIl['bGFDD'](0x14,0x3e8)};$[i11iIl(0x176,'9HF[')](lil11,async(III11I,Ilii1,ll11i1)=>{const l11iIl=i11iIl,ili1I1={'cYIGe':function(Iill,ili1II){return iI1lIl['rMVse'](Iill,ili1II);}};try{if(III11I)iI1lIl['ClhgB']!==iI1lIl['eJqKY']?console[l11iIl(0x131,'FG4H')](iI1lIl[l11iIl(0x211,'U]hi')]('',JSON[l11iIl(0x242,'tNye')](III11I))):ll1il['logErr'](IiiIiI,lilii);else{if(iI1lIl['ldCCB'](l11iIl(0x134,'tNye'),'RyqLk')){ll11i1=JSON[l11iIl(0x1f8,'kK6P')](ll11i1);if(ll11i1[l11iIl(0x2e5,'M@h#')]==0x0)$[l11iIl(0x2ac,'JjlT')]++,console[l11iIl(0x188,'oRZH')]('完成任务,抽奖次数:'+$['lotteryChances']);else{if(iI1lIl[l11iIl(0x2e6,']0R)')](ll11i1[l11iIl(0x1aa,']0R)')],0x192))console[l11iIl(0x21c,'@G7T')]('完成任务失败,'+(ll11i1?.[l11iIl(0x29e,'oRZH')]||''));else{if(iI1lIl['zhVFr'](iI1lIl[l11iIl(0x18e,'mER8')],iI1lIl[l11iIl(0x1ba,'Y5Y0')])){iI1lli=ll1iI[l11iIl(0x177,'Y5Y0')](iI1lll);if(ili1I1[l11iIl(0x2ab,'U]hi')](l1lIll[l11iIl(0x2ea,'7G]M')],0x0))IlI1iI[l11iIl(0x2c6,'jNG]')]=!![],Iillil[l11iIl(0x1a7,'@vW@')]=l1lIli?.['data']?.[l11iIl(0x27f,'jNG]')],lIIiiI['log']('当前抽奖次数:'+II1lil['lotteryChances']);else ili1I1[l11iIl(0x228,'mER8')](I1i111[l11iIl(0x17a,'0m2T')],0x192)?IIli1l['log'](l11iIl(0x2a9,'YFEx')+(II1lii?.[l11iIl(0x1b3,'M$o]')]||'')):lIIii1[l11iIl(0x21c,'@G7T')]('进入首页失败,'+(ll1i1?.[l11iIl(0x23e,'9HF[')]||''));}else console['log'](l11iIl(0x1b1,'lo@t')+(ll11i1?.[l11iIl(0x2dd,'lo@t')]||''));}}}else lI1Iii=[i1li[l11iIl(0x1fd,'tNye')](l1lll1[l11iIl(0x1cf,'r(SR')]),li1II['getdata'](l1lll1['InjFa']),...l1lll1[l11iIl(0x2a4,'Zamp')](IliI11,i1ll[l11iIl(0x1d9,'v28e')](l1lll1[l11iIl(0x1db,'k)#H')])||'[]')['map'](I1I1li=>I1I1li['cookie'])][l11iIl(0x1e2,'vWnC')](l1i11=>!!l1i11);}}catch(IlI1li){iI1lIl[l11iIl(0x17b,'@G7T')]('ZCXss',iI1lIl['XjBig'])?$['logErr'](IlI1li,Ilii1):ll1ll['log'](''+Illl11[l11iIl(0x297,'JjlT')](ii1lI));}finally{if(iI1lIl[l11iIl(0x215,'dh0w')](iI1lIl[l11iIl(0x1af,'#PC3')],iI1lIl[l11iIl(0x152,')E6C')])){if(ili1I1['cYIGe'](typeof ill111[l11iIl(0x19a,'fpqF')](Iliil1),l11iIl(0x266,'#PC3')))return!![];}else iiIiIi();}});});}function IliIIi(III111='xxxxxxxxxxxxxxxxxxxx'){const liIll1={'wkEZa':function(l1llli,iI1lII){return l1llli|iI1lII;},'LtCMb':function(ll11iI,l1i1I){return ll11iI*l1i1I;},'kjXhz':function(l1llll,I1I1ll){return l1llll==I1I1ll;}};return III111['replace'](/[xy]/g,function(lil1i){const i11iIi=iii1II;var liiiil=liIll1[i11iIi(0x2eb,']0R)')](liIll1[i11iIi(0x2ad,'f@TI')](Math[i11iIi(0x27a,'lo@t')](),0xa),0x0),IIIIli=liIll1[i11iIi(0x267,'FG4H')](lil1i,'x')?liiiil:liiiil&0x3|0x8;return jdaid=IIIIli['toString'](),jdaid;});}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) }