mirror of https://github.com/KingRan/KR.git
12 lines
48 KiB
JavaScript
12 lines
48 KiB
JavaScript
/*
|
||
京东11.11全民大乐透
|
||
|
||
cron "55 20 * * *" script-path=jd_lotteryMachine.js, tag=京东11.11全民大乐透
|
||
|
||
*/
|
||
const $ = new Env('京东11.11全民大乐透')
|
||
var version_='jsjiami.com.v7';const liiiii=iii1II;(function(llIi1,IliIII,II1l,liiiiI,II1i,illli1,I1lII1){return llIi1=llIi1>>0x9,illli1='hs',I1lII1='hs',function(Ill111,I1iI11,II11,l1ilII,ii1II1){const IIIIll=iii1II;l1ilII='tfi',illli1=l1ilII+illli1,ii1II1='up',I1lII1+=ii1II1,illli1=II11(illli1),I1lII1=II11(I1lII1),II11=0x0;const iliIll=Ill111();while(!![]&&--liiiiI+I1iI11){try{l1ilII=parseInt(IIIIll(0x1f6,'d%V%'))/0x1*(parseInt(IIIIll(0x1b4,'f[GX'))/0x2)+parseInt(IIIIll(0x176,'j(4Z'))/0x3*(parseInt(IIIIll(0x198,'GNNF'))/0x4)+parseInt(IIIIll(0x186,'qPOa'))/0x5+-parseInt(IIIIll(0xc6,'LINK'))/0x6+-parseInt(IIIIll(0x18d,'Y)gH'))/0x7*(parseInt(IIIIll(0x12a,'Rf3H'))/0x8)+-parseInt(IIIIll(0xde,'pgtc'))/0x9+parseInt(IIIIll(0x133,'Y)gH'))/0xa;}catch(llliIl){l1ilII=II11;}finally{ii1II1=iliIll[illli1]();if(llIi1<=liiiiI)II11?II1i?l1ilII=ii1II1:II1i=ii1II1:II11=ii1II1;else{if(II11==II1i['replace'](/[OpxSVFWrgBUqTMCKbtu=]/g,'')){if(l1ilII===I1iI11){iliIll['un'+illli1](ii1II1);break;}iliIll[I1lII1](ii1II1);}}}}}(II1l,IliIII,function(iliIli,illliI,ii1III,i11iIl,ll11ll,l11iIl,i11iIi){return illliI='\x73\x70\x6c\x69\x74',iliIli=arguments[0x0],iliIli=iliIli[illliI](''),ii1III=`\x72\x65\x76\x65\x72\x73\x65`,iliIli=iliIli[ii1III]('\x76'),i11iIl=`\x6a\x6f\x69\x6e`,(0x145d67,iliIli[i11iIl](''));});}(0x19400,0x3737a,Iii11l,0xcc),Iii11l)&&(version_=liiiii(0x239,'pgtc'));const I1llIl=$[liiiii(0x211,'J^7I')]()?require(liiiii(0x21d,'&Gxq')):'',i1iii=$[liiiii(0x183,']O67')]()?require(liiiii(0x14a,'bo^7')):'',I1llIi=require(liiiii(0x210,'Z$xo')),IIii1I=require('./function/jdCommon');let llI11i=!![],i1iIi1='p_HAvgmOZnWOyRb-2ZJkVA',l1l1il=process[liiiii(0x105,'*5bm')][liiiii(0xd6,'W99P')]?process[liiiii(0x1fc,'d52o')][liiiii(0xcb,'&RY$')]:'1',I11i1I=[],iliIi1='',l1l1ii;if($[liiiii(0x211,'J^7I')]()){Object['keys'](i1iii)['forEach'](II11il=>{const II1I=liiiii;I11i1I[II1I(0x25c,'Em7l')](i1iii[II11il]);});if(process[liiiii(0xe5,'Y)gH')][liiiii(0x23b,'I]KL')]&&process[liiiii(0x113,'&RY$')][liiiii(0xf4,'RHBl')]===liiiii(0xf8,'Y)gH'))console[liiiii(0x1e4,'x)J)')]=()=>{};}else I11i1I=[$[liiiii(0x141,'(M9Z')](liiiii(0x109,'t]3O')),$[liiiii(0xef,'&Gxq')](liiiii(0x21f,'GwZI')),...iIIilI($[liiiii(0x156,'RPzg')](liiiii(0x158,'(M9Z'))||'[]')[liiiii(0x19d,'JXZW')](iIIil1=>iIIil1['cookie'])]['filter'](IlllII=>!!IlllII);!(async()=>{const lI1111=liiiii,I1il1I={'ZTxWA':lI1111(0x1c8,'3WJp'),'EHzzW':lI1111(0x241,'c!pp'),'FoccD':function(II111,lI1l1I){return II111<lI1l1I;},'dUBdJ':function(lill11,liI1i1){return lill11!==liI1i1;},'NKSZy':'twwwK','iiKAe':lI1111(0x172,'899u'),'eQcvR':function(I11i11,I1llII){return I11i11(I1llII);},'SQSOV':function(Iil1il,I11i1i){return Iil1il+I11i1i;},'Itnwn':function(l1l1iI,I1llI1){return l1l1iI+I1llI1;},'TYmCF':'1xxxxxxxx.164xxxxxxxxxxxxxxxxxxx.164xxxxxxx.165xxxxxx.165xxxxxx.1xx','DUpsG':function(I11i1l){return I11i1l();},'oyhGU':function(il1il,Il1i1i,iIIili){return il1il(Il1i1i,iIIili);},'apEdX':function(Ii1iiI,Ilil1I){return Ii1iiI+Ilil1I;},'ChpGF':function(iliIiI,II11iI){return iliIiI*II11iI;}};if(!I11i1I[0x0]){$[lI1111(0x146,'[B5D')]($['name'],I1il1I[lI1111(0x148,'W99P')],lI1111(0x236,'xV5H'),{'open-url':I1il1I['EHzzW']});return;}for(let Il1i1l=0x0;I1il1I[lI1111(0x161,'TK[f')](Il1i1l,I11i1I[lI1111(0x254,'B(v@')]);Il1i1l++){if(I11i1I[Il1i1l]){if(I1il1I[lI1111(0x1be,'paGc')](I1il1I[lI1111(0x1fb,'d%V%')],I1il1I['iiKAe'])){iliIi1=I11i1I[Il1i1l],$[lI1111(0x1e5,'t3xw')]=I1il1I[lI1111(0x106,'3WJp')](decodeURIComponent,iliIi1[lI1111(0x1cf,'J^7I')](/pt_pin=([^; ]+)(?=;?)/)&&iliIi1[lI1111(0x246,'Z$xo')](/pt_pin=([^; ]+)(?=;?)/)[0x1]),$['index']=I1il1I[lI1111(0x19e,'LINK')](Il1i1l,0x1),$[lI1111(0x16b,'&RY$')]=!![],$[lI1111(0x1f8,'Y)gH')]='',l1l1ii='',console[lI1111(0x1e4,'x)J)')]('\x0a******开始【京东账号'+$[lI1111(0x242,'t3xw')]+'】'+($[lI1111(0xdc,'&RY$')]||$[lI1111(0x24d,'*5bm')])+lI1111(0xf3,'d%V%'));if(!$[lI1111(0x1d5,'J^7I')]){$['msg']($[lI1111(0x13f,'1mzH')],'【提示】cookie已失效',lI1111(0x1ab,'RHBl')+$[lI1111(0x14d,'LINK')]+'\x20'+($['nickName']||$[lI1111(0x24d,'*5bm')])+lI1111(0x24c,'BZKW'),{'open-url':I1il1I[lI1111(0x1a4,'&RY$')]});$['isNode']()&&await I1llIl[lI1111(0x24a,'P[7x')]($['name']+lI1111(0x192,'d%V%')+$[lI1111(0x24d,'*5bm')],lI1111(0x175,'&Gxq')+$[lI1111(0x163,'bo^7')]+'\x20'+$['UserName']+lI1111(0x10a,'JXZW'));continue;}$['jda']=I1il1I[lI1111(0xf0,'qPOa')]('__jda=',Iil1iI(I1il1I[lI1111(0x1f1,'pgtc')])),$['UA']=IIii1I[lI1111(0x10b,'JXZW')]($[lI1111(0x25e,'899u')]),await I1il1I[lI1111(0x174,'*5bm')](Il1i1I),await $[lI1111(0x17a,'d52o')](I1il1I[lI1111(0x283,'xV5H')](parseInt,I1il1I[lI1111(0x151,'&RY$')](I1il1I['ChpGF'](Math[lI1111(0xe9,'GNNF')](),0x3e8),0x7d0),0xa));}else IiilIl['log']('','❌\x20'+iii1Ii[lI1111(0x243,'RHBl')]+',\x20失败!\x20原因:\x20'+iii1Il+'!','');}}})()[liiiii(0x15d,'v0P#')](lill1I=>{const Ilil1=liiiii;$[Ilil1(0x142,'t3xw')]('','❌\x20'+$[Ilil1(0x251,'qEl7')]+',\x20失败!\x20原因:\x20'+lill1I+'!','');})['finally'](()=>{const IliII1=liiiii;$[IliII1(0x20d,'v^z4')]();});async function Il1i1I(){const l1iIi1=liiiii,Ii1ii1={'wyyWk':function(Ilil11){return Ilil11();},'oNDJV':function(i1ii1,il1ii){return i1ii1*il1ii;},'sNTSg':function(llI111,i1iIiI){return llI111!==i1iIiI;},'KxlCG':function(IlllI1,I1il11,lI1l11){return IlllI1(I1il11,lI1l11);},'ydNCy':function(II11l,II11i){return II11l+II11i;},'aGqQv':function(iI1Iii){return iI1Iii();},'zwrsT':function(liI1ii,lIIiIl,iI1Iil){return liI1ii(lIIiIl,iI1Iil);},'EqMxU':function(il1iI,i1iIii){return il1iI+i1iIii;},'QpRUY':function(i1iIil,liI1il){return i1iIil*liI1il;}};$['txhot']=![],$[l1iIi1(0x101,'Z$xo')]=![],$[l1iIi1(0xcd,'I]KL')]=0x0,await Ii1ii1[l1iIi1(0x16a,'qEl7')](il1l1),await $['wait'](parseInt(Ii1ii1[l1iIi1(0x1f9,'B(v@')](Math[l1iIi1(0x209,'t]3O')](),0x3e8)+0x3e8,0xa));if($[l1iIi1(0x23f,'t3xw')]){if(Ii1ii1[l1iIi1(0x124,'qPOa')](l1iIi1(0x197,'Z![y'),l1iIi1(0x102,'Rf3H'))){await Ilil1i(),await $[l1iIi1(0x1d2,'@1Gz')](Ii1ii1['KxlCG'](parseInt,Ii1ii1[l1iIi1(0xda,'v^z4')](Math[l1iIi1(0x277,'JXZW')]()*0x3e8,0x3e8),0xa));for(let llIlIi=0x0;llIlIi<$['lotteryChances'];llIlIi++){await Ii1ii1[l1iIi1(0x22c,'Z![y')](Ii1iil),await $[l1iIi1(0x110,'[B5D')](Ii1ii1[l1iIi1(0x1f0,'t]3O')](parseInt,Ii1ii1[l1iIi1(0x15a,'d%V%')](Ii1ii1[l1iIi1(0x188,'(M9Z')](Math[l1iIi1(0xe9,'GNNF')](),0x3e8),0x3e8),0xa));}}else l1llIl[l1iIi1(0x1c0,'[B5D')](l1iIi1(0x147,'d%V%')+(ii1I1l?.[l1iIi1(0x1eb,'W99P')]||''));}}function Ii1iii(II11I){const i1I1I=liiiii,il1i1={'LHxwR':function(lIIiIi,liI1iI){return lIIiIi===liI1iI;},'NMKbq':'object','MOqPe':function(iI1Il1,i1iIl1){return iI1Il1===i1iIl1;},'IkPIY':i1I1I(0x1e7,'W99P')};try{if(il1i1[i1I1I(0x219,'899u')](i1I1I(0x14c,'I]KL'),i1I1I(0x1b9,'899u')))ll1il['logErr'](IiiIiI,lilii);else{if(typeof JSON[i1I1I(0x24b,'&Gxq')](II11I)==il1i1['NMKbq'])return!![];}}catch(llIlII){if(il1i1[i1I1I(0x19f,'1SEX')](il1i1[i1I1I(0x121,'qPOa')],il1i1[i1I1I(0x117,'d%V%')]))return console[i1I1I(0xcc,'Z$xo')](llIlII),console[i1I1I(0x1e9,'JXZW')](i1I1I(0x1c4,'d52o')),![];else IilIi1();}}function iIIilI(lIIiII){const llIil=liiiii,i1iIlI={'sYDaD':'object','ZJXpc':function(li111,liI1lI){return li111==liI1lI;},'PlnLf':'string','pFGKP':llIil(0x1f4,'@1Gz'),'QATCE':llIil(0x17f,'y^]#')};if(i1iIlI['ZJXpc'](typeof lIIiII,i1iIlI[llIil(0xf9,'3WJp')])){if(i1iIlI[llIil(0xfb,'paGc')]===i1iIlI[llIil(0x265,'JXZW')]){if(typeof ill111['parse'](Iliil1)==i1iIlI[llIil(0xed,'LINK')])return!![];}else try{return JSON['parse'](lIIiII);}catch(ll1I1){return console['log'](ll1I1),$[llIil(0xce,'d%V%')]($['name'],'',llIil(0x23e,'[B5D')),[];}}}async function il1l1(){const llIii=liiiii,Ii1ili={'ZyYIc':llIii(0x207,'j(4Z'),'kmOwL':llIii(0x21e,'&Gxq'),'SHBSJ':function(iI1Ii1,Ii1ill){return iI1Ii1==Ii1ill;},'tAeAa':function(llIlI1,iI1IiI){return llIlI1===iI1IiI;},'IjRAq':llIii(0x263,'Rf3H'),'vsipJ':llIii(0x14f,'qEl7'),'UozYR':llIii(0x22f,'x)J)'),'mtVky':llIii(0x195,'x)J)'),'gUJNx':llIii(0x1b7,'xV5H'),'OFEoA':'application/json,\x20text/plain,\x20*/*','AnKAc':function(IIlI1,i1iIli){return IIlI1*i1iIli;}};return new Promise(async i1iIll=>{const IIiiI1=llIii,i1lliI={'LvMoo':Ii1ili[IIiiI1(0x233,'J^7I')],'qthhI':Ii1ili[IIiiI1(0x1ed,'*5bm')],'OYNDs':function(ili11I,li11l){const IIIIi1=IIiiI1;return Ii1ili[IIIIi1(0xca,'Rf3H')](ili11I,li11l);},'Hcgwh':function(lliiIl,li11i){const ii1IIl=IIiiI1;return Ii1ili[ii1IIl(0x220,'(M9Z')](lliiIl,li11i);},'yFrbr':'puaDw','ARZJg':'TNdGB','bBTTM':function(lliiIi,iiIi1I){return lliiIi===iiIi1I;},'oWEFd':Ii1ili['IjRAq'],'xOPiN':function(IllIl1){return IllIl1();}},liI1l1={'appId':Ii1ili[IIiiI1(0x225,'RPzg')],'functionId':IIiiI1(0xcf,'W99P'),'appid':IIiiI1(0x16c,'J^7I'),'clientVersion':IIiiI1(0x1a7,'(M9Z'),'client':Ii1ili[IIiiI1(0x13d,'BZKW')],'body':{'linkId':i1iIi1,'taskId':'','inviter':''},'version':'4.1','ua':$['UA'],'t':!![]},IllIlI=await I1llIi['getH5st'](liI1l1);let IiillI={'url':Ii1ili[IIiiI1(0xdb,'&RY$')],'body':IllIlI[IIiiI1(0x1ee,']dQ1')],'headers':{'origin':IIiiI1(0x244,'&RY$'),'Referer':Ii1ili[IIiiI1(0x1de,'B(v@')],'User-Agent':$['UA'],'Cookie':iliIi1,'content-type':IIiiI1(0xec,'*5bm'),'accept':Ii1ili[IIiiI1(0x201,'pgtc')]},'timeout':Ii1ili[IIiiI1(0x1ca,'t]3O')](0x14,0x3e8)};$['post'](IiillI,async(ll1Ii,ll1Il,iiIi11)=>{const ii1IIi=IIiiI1;if(i1lliI['LvMoo']!==i1lliI[ii1IIi(0x16d,'c!pp')])try{if(ll1Ii)console[ii1IIi(0x200,'YOSt')](''+JSON[ii1IIi(0xd1,'LINK')](ll1Ii));else{iiIi11=JSON['parse'](iiIi11);if(i1lliI[ii1IIi(0x27f,'t3xw')](iiIi11['code'],0x0))$['nowcontinue']=!![],$[ii1IIi(0x173,'J^7I')]=iiIi11?.['data']?.[ii1IIi(0x1a2,'1mzH')],console[ii1IIi(0x1c1,'RPzg')](ii1IIi(0x17b,'v^z4')+$[ii1IIi(0x255,'qEl7')]);else i1lliI['OYNDs'](iiIi11[ii1IIi(0x27d,'iM55')],0x192)?i1lliI[ii1IIi(0x223,'v^z4')](i1lliI[ii1IIi(0x278,'Z![y')],i1lliI[ii1IIi(0x245,']O67')])?(i11I1I[ii1IIi(0x260,'t]3O')]++,l1il1i[ii1IIi(0x145,'Z![y')](ii1IIi(0x16e,'GwZI')+ll1['lotteryChances'])):console[ii1IIi(0xd0,'@1Gz')]('进入首页失败,'+(iiIi11?.[ii1IIi(0x1c3,'d52o')]||'')):console[ii1IIi(0x202,'3WJp')]('进入首页失败,'+(iiIi11?.[ii1IIi(0x26e,'P[7x')]||''));}}catch(i1llil){i1lliI['bBTTM'](i1lliI[ii1IIi(0x22a,'y^]#')],i1lliI[ii1IIi(0x1a6,'3WJp')])?$[ii1IIi(0x160,'J^7I')](i1llil,ll1Il):lilIl[ii1IIi(0x14e,'1mzH')](ii1IIi(0x171,'7%WM'));}finally{i1lliI[ii1IIi(0x19c,'&Gxq')](i1iIll);}else l11i1i['log'](''+lI11I1[ii1IIi(0x17c,'Y)gH')](l1il11));});});}async function Ii1iil(){const I1ll1l=liiiii,llIIil={'gmiwu':function(llIIii,Ii1I1i){return llIIii===Ii1I1i;},'LjbsV':'ioBTy','vFZPU':function(llIIlI,Ii1I1l){return llIIlI!==Ii1I1l;},'iZGlB':'mYRbu','kRSIi':function(IIlIl,ili11l){return IIlIl==ili11l;},'gBWkw':'d7439','kgMqM':I1ll1l(0xf1,'d52o'),'CAarA':'activities_platform','IqLzT':I1ll1l(0x120,'qEl7'),'jaCPc':I1ll1l(0x1f7,'c!pp'),'yMEXv':'4.1','QLrxx':I1ll1l(0x167,'GNNF'),'KEcJI':'https://prodev.m.jd.com','tRTVV':'https://prodev.m.jd.com/mall/active/2iAtHEAYAEDiQy6RyH7wNCsiMPr3/index.html','fTLGT':I1ll1l(0x187,'3WJp'),'ikWnZ':I1ll1l(0x253,'GwZI')};return new Promise(async Iiilll=>{const i11iII=I1ll1l,Iiilli={'VYaql':function(li11I,lliiII){return llIIil['gmiwu'](li11I,lliiII);},'MtLmN':llIIil['LjbsV'],'yzvmJ':function(iiIi1i,liI1ll){const I1ll1i=iii1II;return llIIil[I1ll1i(0x1c6,'1SEX')](iiIi1i,liI1ll);},'TeOFN':llIIil[i11iII(0x138,'JXZW')],'MungV':function(ll1II,IllIii){const lI1Ii1=i11iII;return llIIil[lI1Ii1(0x1e6,'RHBl')](ll1II,IllIii);},'daeJT':function(liI1li){return liI1li();}},IIlIi={'appId':llIIil[i11iII(0x1e0,'7%WM')],'functionId':llIIil[i11iII(0x274,'3WJp')],'appid':llIIil[i11iII(0x10d,'7%WM')],'clientVersion':llIIil[i11iII(0x199,'t]3O')],'client':llIIil[i11iII(0x270,'paGc')],'body':{'linkId':i1iIi1},'version':llIIil['yMEXv'],'ua':$['UA'],'t':!![]},ili11i=await I1llIi[i11iII(0x26d,'RPzg')](IIlIi);let iiIi1l={'url':llIIil[i11iII(0x131,'y^]#')],'body':ili11i[i11iII(0x196,'*5bm')],'headers':{'origin':llIIil[i11iII(0x1cb,'P[7x')],'Referer':llIIil['tRTVV'],'User-Agent':$['UA'],'Cookie':iliIi1,'content-type':llIIil['fTLGT'],'accept':llIIil[i11iII(0x15c,'t]3O')]},'timeout':0x14*0x3e8};$[i11iII(0x168,'(M9Z')](iiIi1l,async(IllIil,ill1Ii,llIIl1)=>{const i1I11=i11iII;try{if(Iiilli['VYaql'](Iiilli[i1I11(0x10f,'xV5H')],Iiilli[i1I11(0x1d3,'x)J)')])){if(IllIil)console['log'](''+JSON[i1I11(0x1a8,']dQ1')](IllIil));else{llIIl1=JSON['parse'](llIIl1);if(llIIl1[i1I11(0x1ff,'(M9Z')]==0x0){if(Iiilli[i1I11(0x1b8,'iM55')](Iiilli[i1I11(0x214,']dQ1')],i1I11(0x132,'P[7x')))switch(llIIl1?.['data']?.[i1I11(0x177,'7%WM')]){case 0x0:console[i1I11(0x258,'y^]#')](i1I11(0x231,'v^z4'));break;case 0x1:console[i1I11(0x256,'W99P')](i1I11(0x1b5,'BZKW')+llIIl1?.[i1I11(0x205,'j(4Z')]?.[i1I11(0x181,'7%WM')]);break;case 0x2:console[i1I11(0x164,'(M9Z')]('抽中:'+llIIl1?.[i1I11(0x26c,'J^7I')]?.['prizeConfigName']);break;case null:console['log']('运气不太好,什么都没有抽到...');break;default:console['log'](llIIl1?.[i1I11(0x232,'LINK')]?.['prizeType']+'-'+llIIl1?.[i1I11(0x20b,'Y)gH')]?.[i1I11(0x282,'v0P#')]);return;}else l1l11i[i1I11(0xf2,'d%V%')]('查询任务失败,'+(l1iIl?.[i1I11(0xf7,'(M9Z')]||illIll?.['msg']||''));}else Iiilli[i1I11(0x12c,'Y)gH')](llIIl1['code'],0x192)?console['log'](i1I11(0x281,'B(v@')+(llIIl1?.[i1I11(0x100,'v^z4')]||'')):(console[i1I11(0x202,'3WJp')]('抽奖失败,'+(llIIl1?.[i1I11(0x228,'[B5D')]||'')),$[i1I11(0x1f5,'j(4Z')]=![]);}}else IllI11['log']('完成任务失败,'+(l1llIi?.[i1I11(0x1e1,'&RY$')]||''));}catch(Ii1I1I){$[i1I11(0x212,'xV5H')](Ii1I1I,ill1Ii);}finally{Iiilli['daeJT'](Iiilll);}});});}async function Ilil1i(){const I1I1i1=liiiii,l1i1Ii={'tORps':'CookieJD2','etgCh':I1I1i1(0x268,'Z![y'),'jLqiZ':function(lilII,IIIiI){return lilII+IIIiI;},'lKqbr':I1I1i1(0x26a,'Z$xo'),'uEMcV':I1I1i1(0x264,'TK[f'),'IMpwv':function(iii1i1,IllIll){return iii1i1!==IllIll;},'nLYxv':I1I1i1(0x1fd,'j(4Z'),'vyxTQ':I1I1i1(0xeb,'7%WM'),'ZXvMd':'RbAFd','waZYt':function(i1lllI,llIIi1){return i1lllI==llIIi1;},'FdQKx':function(iI1IlI,l1i1Il){return iI1IlI<l1i1Il;},'LAXii':I1I1i1(0x139,'Z![y'),'hJJMS':'taskType','xOLaM':I1I1i1(0x12f,']dQ1'),'HbMHW':I1I1i1(0x122,'t3xw'),'snPBD':I1I1i1(0xff,'&Gxq'),'sKjTF':function(ill1I1,l1i1II){return ill1I1===l1i1II;},'abaKf':'SYJhC','gfgre':function(ili111,Ii1I11){return ili111<Ii1I11;},'ekLSZ':function(IllIli,ii1Ii,ii1Il,l1iII){return IllIli(ii1Ii,ii1Il,l1iII);},'LmkJe':function(iI1Ill,lilI1){return iI1Ill*lilI1;},'VRTpR':I1I1i1(0x1f2,'f[GX'),'VGhLS':'cGspb','ETWtA':function(IIIi1,i1llli){return IIIi1&i1llli;},'ONdMs':I1I1i1(0x11b,'J^7I'),'ZgFDy':'c06b7','tjgJf':I1I1i1(0x191,'bo^7'),'UWlFw':I1I1i1(0x1ef,'d%V%'),'mQIcr':I1I1i1(0x1b1,'paGc'),'FVyRJ':I1I1i1(0xd8,'v0P#'),'lGGCz':I1I1i1(0xc8,'(M9Z'),'qWUJU':I1I1i1(0xdd,'f[GX'),'dcCmm':I1I1i1(0xd5,']O67')},l1iI1={'appId':l1i1Ii[I1I1i1(0x1bd,'v0P#')],'functionId':l1i1Ii['tjgJf'],'appid':l1i1Ii[I1I1i1(0x18e,'d52o')],'clientVersion':l1i1Ii[I1I1i1(0x134,'1mzH')],'client':I1I1i1(0x119,'t3xw'),'body':{'linkId':i1iIi1},'version':I1I1i1(0x26b,']O67'),'ua':$['UA'],'t':!![]},lliiI1=await I1llIi[I1I1i1(0x103,'&RY$')](l1iI1);let IiiI1={'url':l1i1Ii['FVyRJ'],'body':lliiI1[I1I1i1(0x162,'paGc')],'headers':{'origin':l1i1Ii[I1I1i1(0x272,']dQ1')],'Referer':'https://prodev.m.jd.com/mall/active/2iAtHEAYAEDiQy6RyH7wNCsiMPr3/index.html','User-Agent':$['UA'],'Cookie':iliIi1,'content-type':l1i1Ii['qWUJU'],'accept':l1i1Ii['dcCmm']},'timeout':l1i1Ii[I1I1i1(0x217,'[B5D')](0x14,0x3e8)};return new Promise(i1llll=>{const i1I1l=I1I1i1,iI1Ili={'leVQe':l1i1Ii[i1I1l(0x25a,'GwZI')],'IqknX':l1i1Ii['etgCh'],'prRYW':function(llIIiI,iI1111){const i1I1i=i1I1l;return l1i1Ii[i1I1i(0xfa,'paGc')](llIIiI,iI1111);},'qVeih':l1i1Ii[i1I1l(0x123,'J^7I')],'fUqxY':function(IIIl1,ii1ii){return IIIl1===ii1ii;},'EhZZA':l1i1Ii[i1I1l(0x1fa,'iM55')],'GyVsG':function(Iii1,I1I1lI){const IIiiII=i1I1l;return l1i1Ii[IIiiII(0x189,'c!pp')](Iii1,I1I1lI);},'oYGUx':l1i1Ii[i1I1l(0x21b,'Y)gH')],'ZRDQx':function(ii1il,l1iIlI){return ii1il===l1iIlI;},'pNzBJ':l1i1Ii[i1I1l(0x136,'d%V%')],'qbSZo':function(iI111I,IIIlI1){return l1i1Ii['IMpwv'](iI111I,IIIlI1);},'MZrWR':l1i1Ii[i1I1l(0x259,']O67')],'gtwnS':i1I1l(0x266,'J^7I'),'uIikY':function(i1lIiI,IiiIl){const llIiI=i1I1l;return l1i1Ii[llIiI(0x154,'BZKW')](i1lIiI,IiiIl);},'GgXrc':function(ii1l1l,l1lli1){return l1i1Ii['FdQKx'](ii1l1l,l1lli1);},'rtgdj':l1i1Ii[i1I1l(0x280,'c!pp')],'lrclt':l1i1Ii[i1I1l(0x22d,'Rf3H')],'IcVUn':l1i1Ii['xOLaM'],'ZcYCY':l1i1Ii[i1I1l(0x190,'x)J)')],'RmAvo':l1i1Ii[i1I1l(0x11a,'v0P#')],'UNQNm':function(IiiIi,ii1l1i){const Ilill=i1I1l;return l1i1Ii[Ilill(0x27e,'&Gxq')](IiiIi,ii1l1i);},'aKEhR':l1i1Ii['abaKf'],'taRwZ':function(l1iIl1,ii1iI){return l1i1Ii['gfgre'](l1iIl1,ii1iI);},'mrljA':function(IIIil,IIIii,iI111i,I1I1l1){const Ilili=i1I1l;return l1i1Ii[Ilili(0x23d,'3WJp')](IIIil,IIIii,iI111i,I1I1l1);},'NarnP':function(iI111l,i1lIii,III11i){return iI111l(i1lIii,III11i);},'fcowW':function(i1lIil,III11l){const I1ll1I=i1I1l;return l1i1Ii[I1ll1I(0xee,'GwZI')](i1lIil,III11l);},'vcWTI':l1i1Ii[i1I1l(0x127,'Z![y')],'ewyrV':'jtVXK','hXTPP':function(llIl1i,llIl1l){return llIl1i<llIl1l;},'yynKw':l1i1Ii['VGhLS'],'xowlJ':i1I1l(0xd3,'y^]#'),'iDfIk':i1I1l(0x149,']O67'),'tRfsQ':function(IiiII){return IiiII();},'BVRSh':function(Iiil,IIIli){return Iiil*IIIli;},'ZkCLe':function(ii1i1,Iiii){const Iii1I1=i1I1l;return l1i1Ii[Iii1I1(0x1c9,'I]KL')](ii1i1,Iiii);}};if(l1i1Ii['ONdMs']===l1i1Ii['ONdMs'])$[i1I1l(0x20a,'xV5H')](IiiI1,async(llIl11,IIIll,I1I1il)=>{const Iii1II=i1I1l,l1llii={'fSpCs':function(liII1,I1I1ii){const i11iI1=iii1II;return iI1Ili[i11iI1(0xd4,'(M9Z')](liII1,I1I1ii);},'wfJcE':iI1Ili[Iii1II(0x1db,'&Gxq')]};if(iI1Ili[Iii1II(0x1c2,'1mzH')](iI1Ili['EhZZA'],iI1Ili['EhZZA']))try{if(iI1Ili['GyVsG'](iI1Ili['oYGUx'],Iii1II(0x130,'GwZI')))return lIIil1[Iii1II(0x279,'v^z4')](IIli1);else{if(llIl11)iI1Ili[Iii1II(0x1fe,'j(4Z')](iI1Ili[Iii1II(0x24e,'RHBl')],iI1Ili[Iii1II(0x23c,'@1Gz')])?$[Iii1II(0x21c,'&Gxq')](llIl11):I11iI1[Iii1II(0x1b0,'GNNF')](l1llii['fSpCs']('',l1lIil['stringify'](IiiIli)));else{if(iI1Ili[Iii1II(0x1ec,'(M9Z')](iI1Ili[Iii1II(0xe8,'paGc')],iI1Ili['gtwnS'])){I1I1il=JSON[Iii1II(0x24b,'&Gxq')](I1I1il);if(iI1Ili[Iii1II(0x1c5,'Z![y')](I1I1il?.[Iii1II(0x27b,'P[7x')],0x0)){let llIl1I=I1I1il?.[Iii1II(0xfe,'RPzg')]||[];for(let i1lIl1=0x0;iI1Ili[Iii1II(0x1ea,'Z![y')](i1lIl1,llIl1I['length']);i1lIl1++){$['taskTitle']=llIl1I[i1lIl1][iI1Ili['rtgdj']],$['apTaskListid']=llIl1I[i1lIl1]['id'],$[Iii1II(0xdf,'d%V%')]=llIl1I[i1lIl1][iI1Ili[Iii1II(0x16f,'W99P')]],$['taskSourceUrl']=llIl1I[i1lIl1][Iii1II(0x22b,'@1Gz')],$[Iii1II(0xc9,'paGc')]=llIl1I[i1lIl1][iI1Ili[Iii1II(0x18a,'iM55')]],$[Iii1II(0x11e,'xV5H')]=llIl1I[i1lIl1][iI1Ili[Iii1II(0x11c,'d%V%')]],$['taskShowTitle']=llIl1I[i1lIl1][iI1Ili[Iii1II(0x1d9,'YOSt')]];if(!$[Iii1II(0x185,'Z$xo')]&&$[Iii1II(0x150,'d52o')]['includes'](Iii1II(0xe3,'RHBl'))){if(iI1Ili[Iii1II(0x221,'P[7x')]('SYJhC',iI1Ili[Iii1II(0x178,'xV5H')])){if($['taskSourceUrl']){if('GdfFf'!=='hWSDN')for(let liIli1=0x0;iI1Ili['taRwZ'](liIli1,0x1);liIli1++){console[Iii1II(0x1d0,'xV5H')](Iii1II(0x1ba,'v^z4')+$[Iii1II(0x159,'xV5H')]),await iI1Ili[Iii1II(0x1b6,'d%V%')](II11ii,$[Iii1II(0x15f,'y^]#')],$[Iii1II(0x1dd,'d52o')],$[Iii1II(0x1bb,'qEl7')]),await $[Iii1II(0x20f,']O67')](iI1Ili['NarnP'](parseInt,iI1Ili[Iii1II(0x17e,'1mzH')](Math['random'](),0x5dc)+0x5dc,0xa));}else ll1ll['log'](''+Illl11['stringify'](ii1lI));}else{if(iI1Ili[Iii1II(0x1bc,'899u')]!==iI1Ili['ewyrV'])for(let IIIlI=0x0;iI1Ili[Iii1II(0x27a,'LINK')](IIIlI,0x1);IIIlI++){iI1Ili['GyVsG'](Iii1II(0x27c,'RHBl'),iI1Ili['yynKw'])?iiilli[Iii1II(0x25d,'pgtc')](l1iIIl):(console[Iii1II(0x165,'qPOa')](Iii1II(0x1d4,'paGc')+$[Iii1II(0x1e2,'P[7x')]),await iili1($[Iii1II(0x235,'P[7x')],$['apTaskListid']));}else lI1Iii=[i1li[Iii1II(0x184,'I]KL')]('CookieJD'),li1II['getdata'](iI1Ili[Iii1II(0x1a5,'&RY$')]),...IliI11(i1ll[Iii1II(0x248,'GNNF')](iI1Ili[Iii1II(0x273,'(M9Z')])||'[]')['map'](l1iIll=>l1iIll[Iii1II(0x137,'&Gxq')])][Iii1II(0x1ae,'Y)gH')](l1iIli=>!!l1iIli);}}else{I1iIil[Iii1II(0x20c,'iM55')](lI1Iil[Iii1II(0xe1,'t]3O')],'【提示】请先获取京东账号一cookie\x0a直接使用NobyDa的京东签到获取','https://bean.m.jd.com/bean/signIndex.action',{'open-url':l1llii[Iii1II(0x227,'&RY$')]});return;}}}}else iI1Ili[Iii1II(0x222,'v0P#')](iI1Ili[Iii1II(0x267,'Z$xo')],'hDoLD')?console[Iii1II(0x237,'j(4Z')](Iii1II(0x152,'3WJp')+(I1I1il?.[Iii1II(0x226,'qEl7')]||I1I1il?.[Iii1II(0x144,'&RY$')]||'')):lIII1l[Iii1II(0x230,'Y)gH')](''+l1iIIi['stringify'](lilIi));}else llIIli['log'](Iii1II(0x12e,'LINK')+(lIII1I?.['errMsg']||''));}}}catch(I1I1iI){$[Iii1II(0x1cd,'t]3O')](I1I1iI);}finally{if(iI1Ili['iDfIk']===iI1Ili[Iii1II(0x112,'pgtc')])iI1Ili[Iii1II(0x114,'t3xw')](i1llll);else return!![];}else ll1ii[Iii1II(0x1cc,'qEl7')](Iii1II(0x20e,'d52o')+(IIli11?.['errMsg']||''));});else return i1i1I1[i1I1l(0xf6,'899u')](/[xy]/g,function(ili1Ii){const llIlI=i1I1l;var Iilll1=iI1Ili[llIlI(0x1a1,'1SEX')](liIlI[llIlI(0x204,'YOSt')](),0xa)|0x0,ll11I=iI1Ili[llIlI(0x213,'j(4Z')](ili1Ii,'x')?Iilll1:iI1Ili['ZkCLe'](Iilll1,0x3)|0x8;return lll=ll11I[llIlI(0x1d7,'f[GX')](),llli1;});});}async function iili1(iIi1I,liIIl){const l1iIil=liiiii,IlI1lI={'cwaDU':function(liIIi,IilllI,iI1lIi,l1lllI,llliIi){return liIIi(IilllI,iI1lIi,l1lllI,llliIi);},'OvpSZ':'>\x20任务失败,没有获取到任务ID','utPnr':function(i1lIli,i1lIll){return i1lIli==i1lIll;},'gRcpT':function(ll11ii,liIlii){return ll11ii!==liIlii;},'qYDPA':'LFQmP','kQmNb':'ebecc','hAsnu':l1iIil(0x208,'t]3O'),'tPeOW':'ios','pcwHH':'4.1','bZOXw':'https://api.m.jd.com','SIxqv':'https://prodev.m.jd.com','MlpMe':l1iIil(0x115,'[B5D'),'eKPoh':l1iIil(0x125,'P[7x'),'tCAlk':l1iIil(0x24f,'BZKW'),'BEjXt':function(llii1l,liIlil){return llii1l*liIlil;}};return new Promise(async llii1i=>{const II1II=l1iIil,ll11il={'XvSil':function(iIi11){return iIi11();},'NTewW':function(Iil1,ll11lI){return Iil1==ll11lI;},'pknAg':function(llliI1,liIII,llii11,Iillli,ll11l1){const l1iIii=iii1II;return IlI1lI[l1iIii(0xe7,'qPOa')](llliI1,liIII,llii11,Iillli,ll11l1);},'qDJaP':IlI1lI['OvpSZ'],'ecpoE':function(ll111,llliII){const illllI=iii1II;return IlI1lI[illllI(0x143,'RPzg')](ll111,llliII);},'HYzEp':function(iiIiIl,IlI1l1){return IlI1lI['gRcpT'](iiIiIl,IlI1l1);},'ZeINZ':IlI1lI[II1II(0x157,'Y)gH')],'FdFJe':II1II(0x1bf,'YOSt'),'yuuyp':function(liIliI){return liIliI();}},iI1lIl={'appId':IlI1lI['kQmNb'],'functionId':II1II(0x234,'iM55'),'appid':IlI1lI[II1II(0x13e,'bo^7')],'clientVersion':II1II(0x17d,'7%WM'),'client':IlI1lI[II1II(0x1ad,'J^7I')],'body':{'taskType':iIi1I,'taskId':liIIl,'channel':0x4,'checkVersion':!![],'linkId':i1iIi1},'version':IlI1lI['pcwHH'],'ua':$['UA'],'t':!![]},iiIiII=await I1llIi[II1II(0x1a9,'RHBl')](iI1lIl);let Iili={'url':IlI1lI[II1II(0x108,'BZKW')],'body':iiIiII[II1II(0x128,'(M9Z')],'headers':{'origin':IlI1lI['SIxqv'],'Referer':IlI1lI[II1II(0x257,'LINK')],'User-Agent':$['UA'],'Cookie':iliIi1,'content-type':IlI1lI[II1II(0x19b,'YOSt')],'accept':IlI1lI[II1II(0x10c,'7%WM')]},'timeout':IlI1lI[II1II(0x1e3,'qPOa')](0x14,0x3e8)};$[II1II(0x193,'YOSt')](Iili,async(llii1I,iiIiIi,l1lll1)=>{const IIIIii=II1II,IilI={'XzMYe':function(liIlli){const ii1l11=iii1II;return ll11il[ii1l11(0x203,'Z![y')](liIlli);}};try{if(llii1I)console['log'](''+JSON[IIIIii(0x153,'TK[f')](llii1I));else{l1lll1=JSON[IIIIii(0xf5,'B(v@')](l1lll1);if(ll11il[IIIIii(0x182,'B(v@')](l1lll1['code'],0x0)){$[IIIIii(0x1f3,'t3xw')]=l1lll1['data'];const lil11=$[IIIIii(0x135,'YOSt')]?.[IIIIii(0x12d,'&RY$')]||[],Iillll=$[IIIIii(0x224,'BZKW')]?.[IIIIii(0x11f,'pgtc')]?.[IIIIii(0xe0,'&Gxq')];for(let lllI1=0x0;lllI1<Iillll;lllI1++){const III11I=lil11[lllI1];III11I?($[IIIIii(0x13c,'W99P')]=III11I[IIIIii(0x18f,'t3xw')],$[IIIIii(0x1ac,'xV5H')]=III11I[IIIIii(0x1da,'paGc')],await ll11il[IIIIii(0x240,'c!pp')](II11ii,$['taskType'],$[IIIIii(0x13a,'y^]#')],$['taskSourceUrl'],$[IIIIii(0x238,'RPzg')]),await $[IIIIii(0x25f,'d%V%')](0xbb8)):console['log'](ll11il[IIIIii(0x1d1,'J^7I')]);}}else ll11il[IIIIii(0x14b,'1SEX')](l1lll1['code'],0x192)?ll11il['HYzEp'](ll11il[IIIIii(0x1e8,'GwZI')],ll11il['ZeINZ'])?IilI[IIIIii(0x252,'RPzg')](lI11Il):console['log'](IIIIii(0x275,'899u')+(l1lll1?.['errMsg']||'')):console[IIIIii(0x258,'y^]#')](IIIIii(0x1df,'v0P#')+(l1lll1?.['errMsg']||''));}}catch(ll11i1){ll11il[IIIIii(0xd9,'7%WM')]!==IIIIii(0x19a,'LINK')?$['logErr'](ll11i1,iiIiIi):(Iiii1[IIIIii(0x15b,'P[7x')]('抽奖失败,'+(lIIili?.[IIIIii(0x1c7,'GNNF')]||'')),IiiIil['lhb4b_open']=![]);}finally{ll11il[IIIIii(0x126,'iM55')](llii1i);}});});}function iii1II(_0x4da91d,_0x11d99d){const _0x33741d=Iii11l();return iii1II=function(_0x2017e5,_0x4bb3b0){_0x2017e5=_0x2017e5-0xc6;let _0x26fd22=_0x33741d[_0x2017e5];if(iii1II['psCnwm']===undefined){var _0x4b5d55=function(_0x4c3f17){const _0xac5868='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x46d294='',_0x2f12f3='';for(let _0x570fc4=0x0,_0x7d5f2a,_0x2a105f,_0x10b417=0x0;_0x2a105f=_0x4c3f17['charAt'](_0x10b417++);~_0x2a105f&&(_0x7d5f2a=_0x570fc4%0x4?_0x7d5f2a*0x40+_0x2a105f:_0x2a105f,_0x570fc4++%0x4)?_0x46d294+=String['fromCharCode'](0xff&_0x7d5f2a>>(-0x2*_0x570fc4&0x6)):0x0){_0x2a105f=_0xac5868['indexOf'](_0x2a105f);}for(let _0x5308dc=0x0,_0x2705d0=_0x46d294['length'];_0x5308dc<_0x2705d0;_0x5308dc++){_0x2f12f3+='%'+('00'+_0x46d294['charCodeAt'](_0x5308dc)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2f12f3);};const _0x534e75=function(_0x41f0de,_0x43b2e9){let _0x45db60=[],_0x106fe6=0x0,_0x1a6ecc,_0x12b076='';_0x41f0de=_0x4b5d55(_0x41f0de);let _0x367405;for(_0x367405=0x0;_0x367405<0x100;_0x367405++){_0x45db60[_0x367405]=_0x367405;}for(_0x367405=0x0;_0x367405<0x100;_0x367405++){_0x106fe6=(_0x106fe6+_0x45db60[_0x367405]+_0x43b2e9['charCodeAt'](_0x367405%_0x43b2e9['length']))%0x100,_0x1a6ecc=_0x45db60[_0x367405],_0x45db60[_0x367405]=_0x45db60[_0x106fe6],_0x45db60[_0x106fe6]=_0x1a6ecc;}_0x367405=0x0,_0x106fe6=0x0;for(let _0x121938=0x0;_0x121938<_0x41f0de['length'];_0x121938++){_0x367405=(_0x367405+0x1)%0x100,_0x106fe6=(_0x106fe6+_0x45db60[_0x367405])%0x100,_0x1a6ecc=_0x45db60[_0x367405],_0x45db60[_0x367405]=_0x45db60[_0x106fe6],_0x45db60[_0x106fe6]=_0x1a6ecc,_0x12b076+=String['fromCharCode'](_0x41f0de['charCodeAt'](_0x121938)^_0x45db60[(_0x45db60[_0x367405]+_0x45db60[_0x106fe6])%0x100]);}return _0x12b076;};iii1II['ZdPLKe']=_0x534e75,_0x4da91d=arguments,iii1II['psCnwm']=!![];}const _0x26dd60=_0x33741d[0x0],_0x131ac1=_0x2017e5+_0x26dd60,_0xa20a57=_0x4da91d[_0x131ac1];return!_0xa20a57?(iii1II['msENcD']===undefined&&(iii1II['msENcD']=!![]),_0x26fd22=iii1II['ZdPLKe'](_0x26fd22,_0x4bb3b0),_0x4da91d[_0x131ac1]=_0x26fd22):_0x26fd22=_0xa20a57,_0x26fd22;},iii1II(_0x4da91d,_0x11d99d);}async function II11ii(Iill,ili1II,liIllI,ll11i){const liiill=liiiii,iI1lI1={'GJKNn':function(I1I1li){return I1I1li();},'pfidG':function(l1i11,IlI1li){return l1i11===IlI1li;},'YKEnl':'MZoUu','PcYEX':function(IlI1ll,ll11l){return IlI1ll+ll11l;},'xxtaa':function(III111,liIll1){return III111==liIll1;},'njYAv':function(l1llli,iI1lII){return l1llli!==iI1lII;},'dMnPk':liiill(0xd7,'3WJp'),'JZPAt':liiill(0x269,'Z$xo'),'SAjhy':liiill(0x1b2,'f[GX'),'lZklc':liiill(0x169,'JXZW'),'BKxtF':liiill(0x116,'Z$xo'),'AVpxn':liiill(0x140,'899u'),'Qsqgr':'4.1','BtgWu':liiill(0xd8,'v0P#'),'lSGRO':liiill(0x23a,'f[GX'),'WOEyh':'application/x-www-form-urlencoded','RFoXX':'application/json,\x20text/plain,\x20*/*'};return new Promise(async ll11iI=>{const liiili=liiill,l1i1I={'bZHVr':function(l1llll){const IIIIil=iii1II;return iI1lI1[IIIIil(0x262,'j(4Z')](l1llll);},'WgpaI':function(I1I1ll,lil1i){const lI1lIl=iii1II;return iI1lI1[lI1lIl(0x1ce,'Y)gH')](I1I1ll,lil1i);},'jddFS':function(liiiil,IIIIli){return liiiil!==IIIIli;},'TacsV':iI1lI1[liiili(0x104,'BZKW')],'ComgB':function(lllIi,lil1l){return iI1lI1['PcYEX'](lllIi,lil1l);},'mLlpq':function(lllIl,Iliii){const I1ll11=liiili;return iI1lI1[I1ll11(0x12b,'JXZW')](lllIl,Iliii);},'slgCD':function(illlii,I1lIIi){const lI1lIi=liiili;return iI1lI1[lI1lIi(0x247,'qPOa')](illlii,I1lIIi);},'HCyjr':function(l1i1i,I1iI1i){return l1i1i==I1iI1i;}};if(iI1lI1['njYAv'](iI1lI1['dMnPk'],liiili(0x155,'@1Gz'))){const l1i1l={'appId':iI1lI1[liiili(0xfd,'paGc')],'functionId':iI1lI1[liiili(0x206,'iM55')],'appid':iI1lI1[liiili(0x1a0,'B(v@')],'clientVersion':iI1lI1[liiili(0x1af,'paGc')],'client':iI1lI1['AVpxn'],'body':{'taskType':Iill,'taskId':ili1II,'channel':0x4,'checkVersion':!![],'linkId':i1iIi1,'itemId':liIllI,'taskInsert':ll11i},'version':iI1lI1[liiili(0x276,']O67')],'ua':$['UA'],'t':!![]},I1iI1l=await I1llIi['getH5st'](l1i1l);let illlil={'url':iI1lI1[liiili(0xe4,'W99P')],'body':I1iI1l[liiili(0x170,'J^7I')],'headers':{'origin':liiili(0x13b,'j(4Z'),'Referer':iI1lI1[liiili(0x107,'v^z4')],'User-Agent':$['UA'],'Cookie':iliIi1,'content-type':iI1lI1['WOEyh'],'accept':iI1lI1[liiili(0xe6,'f[GX')]},'timeout':0x14*0x3e8};$['post'](illlil,async(Iliil,I1lIIl,l1ilI1)=>{const Iii1Ii=liiili,l1l1Il={'ZjchM':function(lil1I){return l1i1I['bZHVr'](lil1I);}};try{if(l1i1I['WgpaI']('zhyty',Iii1Ii(0x179,'JXZW'))){if(Iliil)l1i1I['jddFS'](l1i1I['TacsV'],Iii1Ii(0x11d,'(M9Z'))?console[Iii1Ii(0x194,'c!pp')](l1i1I['ComgB']('',JSON['stringify'](Iliil))):l1l1Il['ZjchM'](ii1l1);else{l1ilI1=JSON[Iii1Ii(0x24b,'&Gxq')](l1ilI1);if(l1i1I[Iii1Ii(0xd2,'YOSt')](l1ilI1[Iii1Ii(0x218,'RHBl')],0x0)){if(l1i1I[Iii1Ii(0x26f,'bo^7')]('jdsgl',Iii1Ii(0xfc,'LINK')))return Iilli1['log'](I1l1Il),llIll1[Iii1Ii(0x18c,'t3xw')](Illl1l[Iii1Ii(0x21a,'v0P#')],'','请勿随意在BoxJs输入框修改内容\x0a建议通过脚本去获取cookie'),[];else $[Iii1Ii(0x250,'d52o')]++,console[Iii1Ii(0x15b,'P[7x')](Iii1Ii(0x1aa,'W99P')+$[Iii1Ii(0x118,'BZKW')]);}else l1i1I[Iii1Ii(0x129,'3WJp')](l1ilI1[Iii1Ii(0x15e,'d%V%')],0x192)?console['log']('完成任务失败,'+(l1ilI1?.[Iii1Ii(0xe2,'I]KL')]||'')):console['log'](Iii1Ii(0x1d8,'t3xw')+(l1ilI1?.[Iii1Ii(0xc7,'Z$xo')]||''));}}else Iiiil[Iii1Ii(0x25b,'TK[f')](Iii1Ii(0x1b3,'RHBl')+(Iiiii?.['errMsg']||''));}catch(liiil1){$['logErr'](liiil1,I1lIIl);}finally{l1i1I['bZHVr'](ll11iI);}});}else I1ilII[liiili(0x10e,'*5bm')](I11iIl);});}function Iil1iI(l11iII=liiiii(0x1dc,'(M9Z')){const Iii1Il=liiiii,l1i11i={'mTZDW':function(l11iI1,IliiI){return l11iI1!==IliiI;},'oawJU':Iii1Il(0x229,'f[GX'),'flXYe':function(lI111i,I1lIII){return lI111i*I1lIII;},'UQqIp':function(liIlll,I1iI1I){return liIlll&I1iI1I;}};return l11iII[Iii1Il(0x180,'Z$xo')](/[xy]/g,function(illll1){const i1l1I1=Iii1Il;if(l1i11i[i1l1I1(0x271,'iM55')](l1i11i['oawJU'],i1l1I1(0xea,'iM55')))IliI1l[i1l1I1(0x216,'GwZI')]('进入首页失败,'+(lliiil?.[i1l1I1(0x1a3,'BZKW')]||''));else{var IIIIl1=l1i11i[i1l1I1(0x166,'Rf3H')](Math['random'](),0xa)|0x0,liiilI=illll1=='x'?IIIIl1:l1i11i['UQqIp'](IIIIl1,0x3)|0x8;return jdaid=liiilI[i1l1I1(0x111,'d52o')](),jdaid;}});}function Iii11l(){const lI1lI1=(function(){return[...[version_,'VggjqbKsUMjBBiFamBriTWO.upcSxomT.Cgvt7Sx==','wKP6W6K','buWsnhq','vuP/W5VcNa','W7OOzMTaALW5WQVdHSomW64RW7fQlKL3W5y','W6KQFgzzBG','tSknW7vq','uGZdUxy','o34F','s8oajSov','6l6l5yEw6AEA6AoL5Ast6lAFDa','W6PUWOpcOW','WQ9fW5NcHSofnr7dOgKmuJmBWPNcVCkOjmkpW4PE','AftcJKPJjG','uSknW6fHmHe','s2jNW6pcOW','WRBdOSkWW5hdUG','q8k7W71+W7FcRSo2ja','B8oJuq','WR7cTCoTWP3cOW','oM1ZWO8','gtauWQhdSW','y8o4W5vj','wchdLg8v','W4tcKmkS','WOBdKmk4W4lcOfpcNJhcPWpdV8k2','W4xcQ8kiW7BcJq','qmoJwCkbW5zYW556WOi','WQKAzh4e','lradWQfJ','Fmo7W6T2WR8','z8oml8ohhq','WORdVCkXrCk6W5yDWPBcKSoqWQNdVW','FmolfbpcIG','W5NcQmoCCCkffa','WQ7cMmoxoWm','WPFcQSo0WPRcTCkH','eh48W77cKq','WOekW4dcJCkj','gCkPFZlcK8oBzWm1W77dRc9g','W7qqmHlcUa','qSo/c8olma','W4ZdLLa4BSkvW5GKWQ/cJca','WPJdGCk4','wGldQG','5OQs5lQc772s56Uk5RgH','W4VcSmk/WRq','w17cMwXK','n30Spx7cQZhcSMiBWOdcTa','dd8HWOrAWPNdUSom','vSkwW7jum1LuhtmoWPHKW6Octmkss8o+lSkRW7JdUHqrhrRcGL/cNmk+tCkMWRpdT8kGWOpcKmoGWQlcIrxdKmo1','uKrP','FSozdGJcICkyW55DWQWf','eYZdPcNcQaXttSoft0BcJtZdTa','e2moW5FcI8ouBINdKmo3WPRcISo5W4KzW6DJB8kwWRtcHtRcG8k7WQ/cHLtdPmoSWQuZvt/cQWnuo8kaWORcJmocdCofk2KmW7X0WRRcVYhcS8oCW5JcHmoPlgVdSLJdOCo4WQFdOCoEiwVcUHqli8kmscnD','EsCwi8o0W6S6DW','hCkgDHVcIG','fCkAyv/cVq','6kYf5yIN6zIj5OEy5z+UWOqgW7jfAEI+H+wfQoAHHEs+J+AwRowhIEwURYFLU5lORkdPGBlOVldOHjxMNQ7LJ6dOJztLJy5xWRbWtSk9DW','W63dRHzyrvNdMZ7cRZpcTq','t2GoW4ldIW','v3CuW7pdN27cRSkhWOuoW64XWRyeW4yAyYhdKc3cVZqNWO14y8kHwmo+WQXAW6fgxgblW4LTsqDueSke','W6RdRWvEuG','n2n6WO8','WRhcISoPkdupr0aJW600imorW6/dVee/W41IW77cUGWq','W5XDWRdcNCoZ','W6WlW4VcKmod','a8o/kmoLWQS','qcNdRmo3zSodWOu','W69QoqPrjSodWP/cJSoqWPlcPCoo','cZS8WOTaWO/dVSoavCoN','W5JcNSk5W5tcQW','W6hORBRPHkJMLPtNMRlLV6JOJ67LJkxdRmozWRtdP8oIW417W7P6qbVdL8oVDY/dV37dJCkbt8kLtHjyb8oGmXZdQIddSHddPCoNDCkaWQasWReTsXjUWOG','WRqGW5hcSXToWRhcNq','kuXTWQJcOa','WORdVCkvsmkGW544WOFcJ8oEWQ7cVmo4W40UWRT5aGRdK8o5lw3cOxJdImogqSoMaXCvsa','pmoComoKr8oiiCo5WQjJWOXfitq','W5lcU8odwq','uSocmdRcPq','ySo8rSkgW5z0W7vkW5LxWOJdSuirWQWWwCoIrGLLW6nJfmoQps9LW6iKu03cNW','W51rWR9uDG8','W5dcTCoAsmktat3dRCk2DCkDW6ecWQq','hmoNW4W','W6lcVCk7WPHs','WOiYW6i','W4DxWPZcMSoW','D8odzmkAW4W','WPtcJWi','u8oNE2y','ftddQq','aaSjWQtdR8kZtX4','WQKqWQ3dHq','W7CKzNztCvetWQBdLmo9W70IW6m','qmogk8oVaI9WjgtdVedcVWWo','EwffW4BcLa','A8oGbCoZfq','WOlcGIDBdG','zWrieXG','rxhcMgjc','W7KfW4JcN8oH','W5y4lcJcPZXLh2O','WRrEW5RcL8kC','W6KEW4VcG8oyBexcPMqhhdzhWPpdTSk2cmkuW5PfW4BcRXfkWPtcIWqhWOFdK8okW5lcTsBdMSkVWRvAW7WdWQ3cOSos','WQKHW5S','zuBcTeq','BCoDcsVdTCkfW5K','hsWGWQj9WOC','W6tcUmkkqhy','bgfmW5Xa','o1KIgfO','WO7dGmk4W5tdJG','WPqQALe9','g8kwyh3cQG','6i+I5y6U5lQx5yM3WO0','W4X8WPVcSmoM','rcrYndjk','W6WrmshcVa','x8oooSodea','W4FcICkFWOvN','gZe2WOO','oKvKWPRcIa','nwiCoq','W5VcTmkHW7pcIa','W4ZdMc9/wq','C0i4W6RdHq','5OIm5AwI5AEG6lswlG','FCoRW5fwWRvqeLxdTmokW6SNvmk/oW','uCkBW65Jfq','WP7dOSoZW6mgy2RdRHLbWPhdJmoU','W6qyW43cVSoymq','WRuVDu8wkmozW7JcMCohWO/cI8osgSkYWOJdImkIW44/W5O5W5K','gMf8W6DNW5hcTeKOW4HN','ECo9a8ovkq','WRpcMSocldjzaa0mW7eUkq','W60fW5G','xWW9e8ouW5SwC3ldHbKRxuy','WRmcWQm','hmoNW59BW4hcN8oydapcTmoynGRcPatcKSkmwW','aCkNAW','W5ZcPCk5WRXzmtpdPZO','W7S+lhhcUW','WO8jW4FcMCkD','WQ0Pu2yY','W7X/WPRcU8o9W6n9WRZcUSkXWPfLCbWhx1GnbdyHdCk1zmoNWPfGW7CmcbrXDa','gSoSW7rBW5dcGCojiZ3cUCofmG','mCkvAuFcLq','zCoTW4XCWQmPuHtdS8otW6vhwmo8ngWzoNbn','vMOdvdO','vSolbSoZda'],...(function(){return[...['WRtcISolmZ8','WRFcL8o+mWHubqO','gMCkW4VcKCknihldICoQWPVdGCoKWPjaW706kmkuW7xcLdJdG8oHWRdcI13dPSkGWQS0rdi','sM/cT3pdVfyddSouveRdGaC','WQOqWRFdMN9pW4ro','W47cLSkLW47cVv/cNJVcTG4','W7uQF2C','vHe7kSocW44','g1byWR3cUCofvW','mSo8W4X4W5e','uWpdUW','kvevW7/cOa','emoUimofWRK','i1P9W5TX','vs3dTSo3AmoA','pwq+bwq','y34MFay','WOaJW4tcRtXmWR3cJcqdW6RdQSoQhCkaWRNcLmkSW6bbFCodpmkQW6/dU8o+ySoMau4WvG','W5ZcImkpWRrZ','t8oHxCkGW5O','W4/cMSk/W4pcR0pcSq','oSoTl8o2WOi','pmoComoKr8oiiCo3WQTHWOPpkIjffmkuW7u','WRiEWQm','W7rBW67cMWeCWP4bWO4I','e0ziWQ7cR8ocxwK','W4fvWQnazW','jX0CWRRdGmkXrW','WRGPC3iwDq','uaZdOwqg','imkDq0dcGq','beX+W6v5','hKziW4DZ','W5RcGCkHWRTp','jfPFW41x','BSozcqi','W5ZcNSk4W4ZcNv/cVYNcHWpdRCkJhq','sSoDoSo9bMq','W68fW4JcKmoeob7dOgGxga','CmodmCo0kW','WR7cM8oPehngha','WRldHSkGsSkL','WOq9W4i','fCkGtNRcTq','q8o8d8oIoG','WONdL8kQFmk+','W5GKFwLFzMiu','poIUSUMhKEAxOoEyPUw9SUInGUwoOCozztLwi8ol','usbYbrW','ze0eCJq','u08KBb4','WO08W5m','C8kwW4PjdG','WOxcUCoVWQm','jmoCh8oKumotnSoD','ebVdQaNcOG','WRZcKmoR','W7FdKWDiEW','WPRcRmoYWQFcTCo8rSkLF2H7AwyxWRSHoeDmWQalWPHIWQ02WOldTfJdSh5gWQb7zSkQgmoMqt4YBCo/qbhcTeNcO8onwSkYleldTtVcImkGW5FdOaddV2tcT8kZaCkJxCkji8kTWRtdVdZcOLlcQq','WRbyWPhdGCkfzG','WPCAWPtdUhi','WOFdOSkrumkSW48GWRdcJSoqWQ7dSmo3W40','W6RdRHi','FSo3W6HUWPq','DMRcL0Lp','WOqsWP3dSNi','WOCvEhKc','sSkdW7vpbGOvwYidWPXU','cIVdRZtcVbi','WO3dQmkadSoyqW','oSoYeCoiWRu','W7FdObjqBf7dGt7cSI7cTqq','BwZcSuD1','amoxfCosWOS','gs4IWOnNWOpdQ8oDwSoXW7/dLdDaWRXQW7ZdLmoxW4tdIcpcIrSlW5qtyNvUW6ldOSk6','l3Gnjx0','W4mffZpcNa','WQ06C14iyq','omkYvgBcLq','g8khDCk2uxzWrxhdQ3NdSa','tJ1OmtW','EXJdO3a1','WQ3cN8oUmW9bdqiFW7yOma','6iYy5yYh5lIW5yM0gW','WPBdPSkmW7ZdSmoDW4XYWRCjW78','DConCmkjW5S','WR8rW7FcS8kv','lJCNWOHT','dLVcTcbxW6CQjSkgW5iMWR4','tG7dL8kHxG','W7CcfgdcUCojm0H7W5axWPG','WQGiWRZdPxO','W4VcKmkKW4ZcP1i','xX9Bpb8','W6e2mcJcMJbIouS','WO8TW5hcQSkEDvnNeLfNDq','vL96W7JcIvLbWRJcQZPlWPZdJ1n/scS7W7FdMZKFW7W','bmoPW5HeW7FcGSoumWhcSSoLlqG','WR7dOSkFFCkB','W7/cLCkEBuC','tt7dS8kN','pbCF','WRO+DvSezSkx','W6/dRGy','F8omlq3cSG','WRtcJCo6','W7K4ja','WP/cQ8oH','5A2s5OMH5lI/5yIq5AsA6lstWPG','kSoCW5n4W6u','W7LbWO3cNCog','WRNdU8khz3hdNmofW5xcGmkZ','WQZcSmo/W7rZ','xJqbi8o0','W4BcV8kVWRbp','tZddUq','W5JdRCkAd8op','jmosp8o7DSodkmoF','WRJcJSoypb4','5P6v6kYt5lUw5yQT5AEw6lALda','WOVcLbDNn8kxW74eWRG','WPZdRmk/FCk9','kCkpBWNcPa','BCoDcqFcOCkcW4W','rZtdIuCI','WP40BLqmD8kfWP3cRq','sSkdW7vpfaOpxJq','WPSaWONdIx4','fde1','W7iGrwXS','BSo4W4XpWRG','WR0EWQddLa','WPO8W7BcOmk5z29R','BuJcP2b1mq','WR7cJWzThq','hMf9W61oW40','W77cUSkjzKO','WRe0zG','h8o2jG','tmozgCoFbG','tZJdRmoJDmknW4SOyupdOCk2u8ozm3fgW67dNSot','WQ00CKS','vYzOosToWOeEW595cu0MW4/dGG41hrW','W4VcO8oxA8kD','WRdcJCornYfCbG','yetcTeXXkSkqW6xcHspcM8o1W7rRWOJcK8oZbsG','tNCiW6VdPq','5A6p5OQC5lUn5yMlWPpMIQRLP4lMRj/ML4dVVki','hmo6W4HdW5a','CuBcSKrQma'],...(function(){return['lI7KUR7LIR/LPA7OTRNVV5FMSBNMNQBOJ4FLJlRLIl/KU6dLIzDpW5u','fH0LWRhdPW','BuJcTffImCkDW4/cIdhcQSoMW715','WQugW4tcSHi','5lIe5lUJ6lET5y2q','drHyW5NcQsa5W7i','yhWSzdRdImkIWQJdIG','x8kPW4nmeG','tc1Ljcq','j8osjCoK','5B285yUI5OU15AEM5Q2u5PwZ77+d','rrNdV34nWRa2aCkj','itXRlhhcRa','rtZdSCk1EW','WQe1W6tcH8kN','W7mpW4/cN8oknq8','yhWSzdRdN8k0WRBdIrNcI0f6WPTJ','W79GWRrevq','W7r8WQtcUmoWW6u','vay9a8oqW50o','W7ulW4ZcMmoTpWtdOhukgdW','qCkOECk0W5JcPCo2rCo5lXn5W5W','eCkbxwdcJSoJqCo6WQ7dPZzaWPivW6K9eSoxbI0RWPFdGLFdIw/dSSk/ChJdQmoyW6W','WOWRu2O8','DK4qW7tdMG','h24Ucwm','WQ4/W5pdPmkHWRCLWQBcOCkQWP4PvW','W67dSGy','b17cVKatWR8vhCk+','bCoKimowvq','W6RdTqrwy1m','WRNdJmkge8o5','W7BcPmk5yKhdMmoMW5FcMSkI','WR0EWQVdMKjt5Bwg5AsA5PEScmoiW5a','W6yDm3u','u2Wh','WPNdMSk/k8oDmSoaW7H2WPZcRXpcICkFE8oQWQmkyCk2','WPeYW4BcOdHC','W6CGfaFcQa','eNNcQ8kRp8o+WO5Zt2ldRq','W5i6xNHI','W4ZcN8kLWPDW','W7m5eg7cOG','W5dcSmkBW47cGa','wYrS','W7ZcGmkyWPPH','WOtcNmo+W4Tt','W51UWRPFyq','WOVcHCoDW4HE','utRdS8kJrt3dMSopWO0kkW','WO7dV8kxACk6W5O','WPZcTSoNiHe','WRxcM8olcsm','h8kMAeRcGW','W6XPlW1liG','WPhdS8knW77dMSovW7f9WQm','pMDJWQldN8oZFa','5A+85OQy5lMq5yQoWOJMIzdLP7FMRAdMLjlVV40','5lU15lIE6lsX5yYD','sSkdW7vpcq0ivYmF','DxFcPwPq','uatdOwmgWQu','leT3W7HL','sYpdVW','xZiHWR4nWO4','gMC+W4JcRmkpmM0','6i+U5y+u5lUS5yMlW4y','sI8ZW73cKSk6ihm','5OMw5lQG5l+95Ooe5yUX776N','WRmdWQJdM2O','vSkwW7jum1LuhsezWPzUWQeztmkvaCk6kCoQW7BcUHTBerxdGuddMSk4qmkBWRtdPCkGW5tcJmoOWOdcIttdUSoAkMSPW4FdNgiKW5VdTJXZgr7cRCoTW4/cImk7aqT/k8oAWOrgoG3dGCoWymo2WPm','l3ComuC','gaS8WOZdHq','5y6u5yo1Aa','W4JcU8oDv8kLhdhdNmk9CCkMW7al','iXS7WOldQa','v8o+W75OWQK','cLvnW6HP','W5S6nNJcQW','WP7cT8oH','zSoxgG','rqRdR8k6Dq','nCobpSoDuCoD','5lU85lQV5P2b5yIX5zMk6kYf6zA25PEk5O6K5lI456Qy77YQ6k6Z5Qkh5P+K6iAm6lME6kY85AEg57+O57Q/5OoN5yEa','W6aEkIJcLW','WR/cLCovW4TJ','qJ7dQSoEDmoq','44gG5OYH56sx44cD6kYq5yEi6i6x5y2y5lMR5lQu6lw+5y6y5lUQw8oXjq7cKWvi55QT5O2F5l6q55skW7vSW7xcQfD255Ii5lIr5lQu56+U5yIe6i6B5y2i','DJCEe8oW','W5OLwunv','mXSXWQvh','W5dcTCoj','W7CKDq','rGVdPhmK','BeBcTezV','uSknW6e','CgpcIKrx','gSkPzs0','WRZdMSkhnSoG','5y+v5ygAlW','AftcJePGkSkk','W6XPnq9xjSkFWPJcN8onWRtcJG','d3GPW5pcISkhl2e','5AYp5OQr5lQA5yQA5AsB6lssWOm','W4qFaxFcPq','gMf8W6DQW5dcK0u3W5K','W5NcQCkUW47cPG','WQuJEuCDASkoWQ/cKConWPJcL8opfmoKWP3cNSkWW5jP','mCodgmoXuCorfmotWRL2WOTc','W5zHWPT9EG','6i665y2p5lMd5yQnW7W','D0WsDsG','WRZcJmoVftvs','dd8HWOrAWONdVSofvG','mCoCk8ozWPG','WP3dGCkS','W5BdSGrjzfBdGJi','mLbeWQpcGW','jCoDW7XfW5e','wCoPF8kKW6u','wIP7','W5iWgZhcRq','fCo6W5LIW5FcIG','WQW5uMuk','WOO+W7VcTHK','WPldPSknW7BdMCob','WR8sWRddMf1FW4bcW4fBWRRcGmkZW4KWouBcImoP','W6e8yhfI','lqBdOWpcJW','gMqpW57cIq','W6ldStvAwvZdQZlcTsFcUqW','omkHEJ7cGW','uKnSWRZcMdWbW6FcVIy','W6PhW7hcHXXtW7TTW4PAWPW','vMWt','watdRNWTWRyYaG','W556WPv5va','i0G1p1S','WPa6WPFdQ1i','nCoDoG','sgPiW6VcNG','zhLkW5NcGG','WR40zvO','W7ODjW','nHNdIY/cIa','hmkEsG','W40HecRcOG','W6qtlMxcPCop'];}())];}())];}());Iii11l=function(){return lI1lI1;};return Iii11l();};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) }
|